[antlr-interest] Lexer and Parser class packaging
Terence Parr
parrt at cs.usfca.edu
Mon Feb 5 13:49:09 PST 2007
On Feb 5, 2007, at 1:01 PM, Gavin Lambert wrote:
> At 08:30 6/02/2007, Jim Idle wrote:
> >One possibility though is to not have a default for the @header {}
> >which will then just leave @lexer::header and @parser::header,
> >which are probably more obvious.
>
> IMO, @header should either go to both files or it should produce an
> error message telling the user to go use @lexer::header or
> @parser::header instead. Having it just assume the parser:: prefix
> just doesn't feel right -- especially if you're using type-hinting
> file extensions such as .g3l & .g3lp.
So @members {int i;} should also code to both parser and lexer. Which
makes you feel more uncomfortable? the inconsistency or the fact that
@header doesn't go to both? ;)
Ter
More information about the antlr-interest
mailing list