This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
gitmirror
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
39
Wiki
Activity
Browse Source
Added a few anon-token names
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.5.1
Erez Shinan
8 years ago
parent
115c4c6d21
commit
2ee72baf09
1 changed files
with
15 additions
and
9 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+15
-9
lark/load_grammar.py
+ 15
- 9
lark/load_grammar.py
View File
@@ -12,36 +12,42 @@ from .tree import Tree as T, Transformer, InlineTransformer, Visitor
unicode_escape = codecs.getdecoder('unicode_escape')
_TOKEN_NAMES = {
'
:' : '_COLON
',
'
.' : 'DOT
',
',' : 'COMMA',
':' : 'COLON',
';' : 'SEMICOLON',
'+' : 'PLUS',
'-' : 'MINUS',
'*' : 'STAR',
'/' : 'SLASH',
'\\' : 'BACKSLASH',
'|' : 'VBAR',
'!' : 'BANG',
'?' : 'QMARK',
'!' : 'BANG',
'@' : 'AT',
'#' : 'HASH',
'$' : 'DOLLAR',
'%' : 'PERCENT',
'^' : 'CIRCUMFLEX',
'&' : 'AMPERSAND',
'_' : 'UNDERSCORE',
'<' : 'LESSTHAN',
'>' : 'MORETHAN',
'=' : 'EQUAL',
'.' : '_DOT',
'%' : 'PERCENT',
'`' : 'BACKQUOTE',
'^' : 'CIRCUMFLEX',
'"' : 'DBLQUOTE',
'\'' : 'QUOTE',
'`' : 'BACKQUOTE',
'~' : 'TILDE',
'@' : 'AT',
'(' : '_LPAR',
')' : '_RPAR',
'(' : 'LPAR',
')' : 'RPAR',
'{' : 'LBRACE',
'}' : 'RBRACE',
'[' : 'LSQB',
']' : 'RSQB',
'\n' : 'NEWLINE',
'\r\n' : 'CRLF',
'\t' : 'TAB',
' ' : 'SPACE',
}
# Grammar Parser
Write
Preview
Loading…
Cancel
Save