t026actions.g
来自「antlr最新版本V3源代码」· G 代码 · 共 40 行
G
40 行
grammar t026actions;options { language = Python;}@lexer::init { self.foobar = "blarz"}prog@init { print "init prog"}@after { print "after prog"} : IDENTIFIER EOF ; catch [ RecognitionException, exc ] { print "Caboom " + str(exc) raise } finally { print "Finally I'm home!" }IDENTIFIER : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* { # a comment print "foo" print $text, $type, $line, $pos, $index, $channel, $start, $stop if True: print "bar" } ;WS: (' ' | '\n')+;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?