Documentation
¶
Index ¶
Constants ¶
View Source
const ( NoState = -1 NumStates = 64 NumSymbols = 71 )
Variables ¶
View Source
var ActTab = ActionTable{ ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: -1, Ignore: "!whitespace", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 9, Ignore: "", }, ActionRow{ Accept: 10, Ignore: "", }, ActionRow{ Accept: 11, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 4, Ignore: "", }, ActionRow{ Accept: 13, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 14, Ignore: "", }, ActionRow{ Accept: 15, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 5, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 16, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 0, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 8, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 12, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: -1, Ignore: "!comment", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 17, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 20, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 6, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 19, Ignore: "", }, ActionRow{ Accept: 7, Ignore: "", }, ActionRow{ Accept: 3, Ignore: "", }, ActionRow{ Accept: 18, Ignore: "", }, ActionRow{ Accept: 21, Ignore: "", }, }
View Source
var TransTab = TransitionTable{ func(r rune) int { switch { case r == 9: return 1 case r == 10: return 1 case r == 13: return 1 case r == 32: return 1 case r == 34: return 2 case r == 40: return 3 case r == 41: return 4 case r == 44: return 5 case r == 47: return 6 case 48 <= r && r <= 57: return 7 case r == 61: return 8 case 65 <= r && r <= 90: return 9 case r == 95: return 9 case r == 97: return 9 case r == 98: return 10 case 99 <= r && r <= 100: return 9 case r == 101: return 11 case r == 102: return 12 case 103 <= r && r <= 104: return 9 case r == 105: return 13 case 106 <= r && r <= 109: return 9 case r == 110: return 14 case 111 <= r && r <= 113: return 9 case r == 114: return 15 case r == 115: return 9 case r == 116: return 16 case r == 117: return 9 case r == 118: return 17 case r == 119: return 18 case 120 <= r && r <= 122: return 9 case r == 123: return 19 case r == 125: return 20 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case r == 42: return 25 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 7 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 113: return 27 case r == 114: return 28 case 115 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 107: return 27 case r == 108: return 29 case 109 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case r == 97: return 30 case 98 <= r && r <= 116: return 27 case r == 117: return 31 case 118 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 101: return 27 case r == 102: return 32 case 103 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 104: return 27 case r == 105: return 33 case 106 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 34 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 113: return 27 case r == 114: return 35 case 115 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case r == 97: return 36 case 98 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 103: return 27 case r == 104: return 37 case 105 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 38 case r == 34: return 39 case 35 <= r && r <= 91: return 38 case r == 92: return 39 case 93 <= r && r <= 127: return 38 case 128 <= r && r <= 65532: return 40 case 65534 <= r && r <= 1114111: return 40 } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { case r == 42: return 41 default: return 25 } }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 42 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 114: return 27 case r == 115: return 43 case 116 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 107: return 27 case r == 108: return 44 case 109 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 109: return 27 case r == 110: return 45 case 111 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 107: return 27 case r == 108: return 46 case 109 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 115: return 27 case r == 116: return 47 case 117 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 116: return 27 case r == 117: return 48 case 118 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 113: return 27 case r == 114: return 49 case 115 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 104: return 27 case r == 105: return 50 case 106 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { case 1 <= r && r <= 33: return 21 case r == 34: return 22 case 35 <= r && r <= 91: return 21 case r == 92: return 23 case 93 <= r && r <= 127: return 21 case 128 <= r && r <= 65532: return 24 case 65534 <= r && r <= 1114111: return 24 } return NoState }, func(r rune) int { switch { case r == 42: return 41 case r == 47: return 51 default: return 25 } }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case r == 97: return 52 case 98 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 53 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 114: return 27 case r == 115: return 54 case 116 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 98: return 27 case r == 99: return 55 case 100 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 116: return 27 case r == 117: return 56 case 118 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 57 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 107: return 27 case r == 108: return 58 case 109 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 106: return 27 case r == 107: return 59 case 108 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 60 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 113: return 27 case r == 114: return 61 case 115 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 100: return 27 case r == 101: return 62 case 102 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 109: return 27 case r == 110: return 63 case 111 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } return NoState }, func(r rune) int { switch { case 48 <= r && r <= 57: return 26 case 65 <= r && r <= 90: return 27 case r == 95: return 27 case 97 <= r && r <= 122: return 27 } 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.