Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • package -Wrap the generated classes with the specified package.
  • header - Will be inserted right after ANTLRs own imports at the top of the generated file. Use it for import statements or any other functions/classes which you need in the module package scope.
  • init - Will be inserted at the end of the _init_ method constructor of the lexer/parser. Here you can setup your own instance attributes.
  • members - Will be inserted in the class body of the lexer/parser right after _init_. This is the right place for custom methods and class attributes.

For rules the additional action @decorate is recognized. The contents are placed right before the rule method and can be used for decorators.

Code Block

r
@decorate { @logThis }
: s ;

will create something like

...

Caveats

TBD.

Unsupported features

...