[antlr-interest] Header not copied to lexer file?

Terence Parr parrt at cs.usfca.edu
Sat Oct 14 08:45:09 PDT 2006


On Oct 13, 2006, at 7:38 PM, Brian DeVries wrote:

> In my 3.0b4 grammar file, I have the lines
>
> @header
> {
> 	package parsing;
> }
>
> The generated Java parsing file contains this line. However, the
> generated lexer grammar and Java files do not, resulting in a compiler
> error.
>
> What can I do to fix this, aside from manually entereing the header in
> the lexer file each time?

@lexer::header { package parsing; }

:)

Actions have scopes now.  @lexer::members {...} too.

Ter



More information about the antlr-interest mailing list