lexmachine
lexmachine copied to clipboard
Lex machinary for go.
Trying in lexer.go to parse: lexer.Add([]byte(`(?i)(varchar\([0-9]+\))`), token("VARCHARID")) results: (debug=true) ... 01/14 20:10:48 enter alternation 0 '(?i)(varchar\([0-9]+\))' 2020/01/14 20:10:48 enter atomicOps 0 '(?i)(varchar\([0-9]+\))' 2020/01/14 20:10:48 enter atomicOp 0 '(?i)(varchar\([0-9]+\))' 2020/01/14 20:10:48...
Would it be possible to have the regex parser support character classes like `\w` within other character classes? I had a regex pattern earlier that used the character class `[0-9a-zA-Z_\.-]`,...
This is an experimental PR which contains support for generating lexers for programming languages directly from a DFA specification. It does not use the same API as the rest of...
This PR will add support for scanning a byte stream instead of needing to read in the entire file. Note, because of how lexical analysis lookahead works in rare cases...