[antlr-interest] Antlr v3.0ea8 : @header not taken into account
in automatically generated lexer java code...
Terence Parr
parrt at cs.usfca.edu
Tue May 2 13:45:22 PDT 2006
On May 2, 2006, at 1:09 PM, Prashant Deva wrote:
> No, what i meant was this-
> According to the parent post, it seems if we want to declare a
> header for a parser, we just use-
> @header{}
>
> But to declare a header for lexer, we gotta use-
> @lexer::header{}
That is *only* if you are combining lexer and parser :)
> That is where it doesnt feel uniform.
@header{} is used if it's in the lexer by itself I believe.
> Dont you think it would be better if we used -
> @parser::header{}
> &
> @lexer::header{}
> for both the lexer & the parser.
I believe parser::header works; just implied.
> That way it would seem more uniform :)
Yep
Ter
More information about the antlr-interest
mailing list