lexer

package
v0.0.0-...-dcb838f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NoState    = -1
	NumStates  = 160
	NumSymbols = 71
)

Variables

View Source
var ActTab = ActionTable{}/* 160 elements not displayed */
View Source
var TransTab = TransitionTable{}/* 160 elements not displayed */

Functions

This section is empty.

Types

type ActionRow

type ActionRow struct {
	Accept token.Type
	Ignore string
}

func (ActionRow) String

func (this ActionRow) String() string

type ActionTable

type ActionTable [NumStates]ActionRow

type Lexer

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

func NewLexer

func NewLexer(src []byte) *Lexer

func NewLexerFile

func NewLexerFile(fpath string) (*Lexer, error)

func (*Lexer) Reset

func (this *Lexer) Reset()

func (*Lexer) Scan

func (this *Lexer) Scan() (tok *token.Token)

type TransitionTable

type TransitionTable [NumStates]func(rune) int

Let s be the current state Let r be the current input rune transitionTable[s](r) returns the next state.

Jump to

Keyboard shortcuts

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