[antlr-interest] Antlr 2.7 Header sectiond
Xue Yong Zhi
zhixueyong at hotmail.com
Thu Feb 1 09:39:45 PST 2007
>
> What I would like to do is to declare a variable set in the lexer which
> I can use in the parser. To do this I think I need to declare it as a
> global in the lexer and use it as an extern in the parser (or vice
> versa). to do that I need separate headers for lexer and parser.
>
You can declare it in another file, then refer it ("extern") in .g file.
--
Xue Yong Zhi
http://xruby.blogspot.com
More information about the antlr-interest
mailing list