lang.g
来自「antlr最新版本V3源代码」· G 代码 · 共 23 行
G
23 行
grammar Lang;options { language=Python; output=AST; ASTLabelType=CommonTree;}tokens {DECL;} // an imaginary nodestart : decl ;decl : type ID ';' -> ^(DECL type ID) ;type : INTTYPE // automatic tree construction builds a node for this rule | FLOATTYPE ;INTTYPE : 'int' ;FLOATTYPE : 'float' ;ID : 'a'..'z'+ ;INT : '0'..'9'+ ;WS : (' '|'\n') {$channel=HIDDEN;} ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?