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

David Holroyd dave at badgers-in-foil.co.uk
Sat Oct 14 04:48:49 PDT 2006


On Fri, Oct 13, 2006 at 09:38:38PM -0500, 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?

I think the above section is implicitly just for the parser, so
duplicate for the lexer, like so,

@lexer::header
{
	package parsing;
}



ta,
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list