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

Brian DeVries contingencyplan at gmail.com
Sat Oct 14 05:04:25 PDT 2006


Thanks, that worked.
~Brian DeVries

On 10/14/06, David Holroyd <dave at badgers-in-foil.co.uk> wrote:
> 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