parser

package
v0.0.0-...-3de8b62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2015 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEOF = errors.New("EOF")

Functions

This section is empty.

Types

type OutputLine

type OutputLine struct {
	Signal   string
	FuncName string
	Args     []string
	Result   string
}

func (*OutputLine) Unparse

func (o *OutputLine) Unparse() string

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser represents a parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of Parser.

func (*Parser) Parse

func (p *Parser) Parse() (*OutputLine, error)

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner is a lexical scanner implemented with a buffered reader.

func NewScanner

func NewScanner(r io.Reader) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan() (tok Token, lit string)

Scan returns the next token and literal string it represents.

type Token

type Token int
const (
	ILLEGAL Token = iota
	EOF
	NEWLINE
	WS          // Whitespace
	IDENT       // Identifier, e.g. function name.
	MEMADDR     // Hex address, e.g. 0xcafef00d
	OPEN_PAREN  // (
	CLOSE_PAREN // )
	OPEN_BRACE  // {
	CLOSE_BRACE // }
	OPEN_SQ     // [
	CLOSE_SQ    // ]
	PIPE        // |
	STRING      // Delimited by "
	SEP         // ,
	EQUALS      // =
	SIGNAL      // ---
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL