Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Actions are specific to one grammar. When using a combined parser/lexer grammar, use

// applies only to the parser:
@header {package foo;}

// applies only to the lexer:
@lexer::header {package foo;}

not just the @header.

When using a separate (non-combined) parser, @header applies to the parser. Likewise, when using a separate (non-combined) lexer, @header applies to the lexer (it is not necessary to use @lexer::header in this case).

  • No labels