Documentation
¶
Index ¶
Constants ¶
View Source
const ( NoState = -1 NumStates = 52 NumSymbols = 64 )
Variables ¶
View Source
var ActTab = ActionTable{ ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: -1, Ignore: "!whitespace", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 9, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 6, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 15, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 7, Ignore: "", }, ActionRow{ Accept: 13, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 14, Ignore: "", }, ActionRow{ Accept: 11, Ignore: "", }, ActionRow{ Accept: 11, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 11, Ignore: "", }, ActionRow{ Accept: 11, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 12, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 10, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 4, Ignore: "", }, }
View Source
var TransTab = TransitionTable{ func(r rune) int { switch { case r == 9: return 1 case r == 10: return 2 case r == 13: return 1 case r == 32: return 1 case r == 33: return 3 case r == 37: return 3 case r == 40: return 1 case r == 41: return 1 case r == 42: return 3 case r == 43: return 4 case r == 44: return 5 case r == 45: return 6 case r == 46: return 7 case r == 47: return 3 case r == 48: return 8 case 49 <= r && r <= 57: return 9 case r == 58: return 3 case r == 64: return 3 case 65 <= r && r <= 90: return 3 case r == 91: return 10 case r == 93: return 11 case r == 95: return 12 case r == 97: return 3 case r == 98: return 13 case r == 99: return 14 case 100 <= r && r <= 102: return 3 case r == 103: return 15 case 104 <= r && r <= 108: return 3 case r == 109: return 16 case 110 <= r && r <= 122: return 3 case r == 123: return 1 case r == 125: return 1 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 48: return 19 case 49 <= r && r <= 57: return 20 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 21 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 22 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 9 case r == 120: return 23 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 9 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case r == 58: return 24 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 120: return 17 case r == 121: return 25 case r == 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 113: return 17 case r == 114: return 26 case 115 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 110: return 17 case r == 111: return 27 case 112 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 104: return 17 case r == 105: return 28 case 106 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 20 case r == 120: return 29 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 20 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 21 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 30 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 31 case r == 63: return 32 case 65 <= r && r <= 70: return 32 case 97 <= r && r <= 102: return 32 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 100: return 17 case r == 101: return 33 case 102 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 113: return 17 case r == 114: return 34 case 115 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 109: return 17 case r == 110: return 35 case 111 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 36 case r == 63: return 37 case 65 <= r && r <= 70: return 37 case 97 <= r && r <= 102: return 37 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 31 case r == 63: return 32 case 65 <= r && r <= 70: return 32 case 97 <= r && r <= 102: return 32 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 31 case r == 63: return 32 case 65 <= r && r <= 70: return 32 case 97 <= r && r <= 102: return 32 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case r == 97: return 38 case 98 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 110: return 17 case r == 111: return 39 case 112 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 116: return 17 case r == 117: return 40 case 118 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 36 case r == 63: return 37 case 65 <= r && r <= 70: return 37 case 97 <= r && r <= 102: return 37 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 36 case r == 63: return 37 case 65 <= r && r <= 70: return 37 case 97 <= r && r <= 102: return 37 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 115: return 17 case r == 116: return 41 case 117 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 116: return 17 case r == 117: return 42 case 118 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 115: return 17 case r == 116: return 43 case 117 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 100: return 17 case r == 101: return 44 case 102 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 115: return 17 case r == 116: return 45 case 117 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 100: return 17 case r == 101: return 46 case 102 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 99: return 17 case r == 100: return 47 case 101 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 104: return 17 case r == 105: return 48 case 106 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 114: return 17 case r == 115: return 49 case 116 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 109: return 17 case r == 110: return 50 case 111 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 100: return 17 case r == 101: return 51 case 102 <= r && r <= 122: return 17 } return NoState }, func(r rune) int { switch { case r == 33: return 17 case r == 37: return 17 case r == 42: return 17 case r == 45: return 17 case r == 46: return 17 case r == 47: return 17 case 48 <= r && r <= 57: return 18 case r == 58: return 17 case r == 64: return 17 case 65 <= r && r <= 90: return 17 case r == 95: return 17 case 97 <= r && r <= 122: return 17 } return NoState }, }
Functions ¶
This section is empty.
Types ¶
type ActionTable ¶
type Lexer ¶
func NewLexerFile ¶
type SourceContext ¶
type SourceContext struct {
Filepath string
}
SourceContext is a simple instance of a token.Context which contains the name of the source file.
func (*SourceContext) Source ¶
func (s *SourceContext) Source() string
type TransitionTable ¶
Let s be the current state Let r be the current input rune transitionTable[s](r) returns the next state.
Click to show internal directories.
Click to hide internal directories.