gonum: gonum.org/v1/gonum/graph/formats/dot/internal/lexer Index | Files

package lexer

import "gonum.org/v1/gonum/graph/formats/dot/internal/lexer"

Package lexer provides generated internal lexer functions for DOT parsing.


Package Files

acttab.go doc.go lexer.go transitiontable.go


const (
    NoState    = -1
    NumStates  = 143
    NumSymbols = 184


var ActTab = ActionTable{ /* 143 elements not displayed */

var TransTab = TransitionTable{ /* 143 elements not displayed */


type ActionRow Uses

type ActionRow struct {
    Accept token.Type
    Ignore string

func (ActionRow) String Uses

func (a ActionRow) String() string

type ActionTable Uses

type ActionTable [NumStates]ActionRow

type Lexer Uses

type Lexer struct {
    // contains filtered or unexported fields

func NewLexer Uses

func NewLexer(src []byte) *Lexer

func NewLexerFile Uses

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

func (*Lexer) Reset Uses

func (l *Lexer) Reset()

func (*Lexer) Scan Uses

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

type TransitionTable Uses

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.

Package lexer imports 4 packages (graph) and is imported by 1 packages. Updated 2019-03-11. Refresh now. Tools for package owners.