ANTLR v3 grammar written in ANTLR v3 with AST construction
Match stuff like @parser::members {int i;}
Sometimes the scope names will collide with keywords; allow them as * ids for action scopes.
Match stuff like @init {int i;}
Matches ENBF blocks (and token sets via block rule)
Build a tree for a template rewrite: ^(TEMPLATE (ID|ACTION) ^(ARGLIST ^(ARG ID ACTION) ...) ) where ARGLIST is always there even if no args exist. ID can be "template" keyword. If first child is ACTION then it's an indirect template ref -> foo(a={...}, b={...}) -> ({string-e})(a={...}, b={...}) // e evaluates to template name -> {%{$ID.text}} // create literal template from string (done in ActionTranslator) -> {st-expr} // st-expr evaluates to ST
-> foo(a={...}, ...)
-> ({expr})(a={...}, ...)
Match the start of an options section. Don't allow normal * action processing on the {...} as it's not a action.
Reset the file and line information; useful when the grammar * has been generated so that errors are shown relative to the * original file like the old C preprocessor used to do.