[antlr-interest] Passing parameters to lexer grammars.
Johannes Luber
jaluber at gmx.de
Tue Oct 23 05:32:14 PDT 2007
Michael LeBlanc wrote:
> I have something like the following in a combined parser/lexer grammar.
> I want this to be visible to the lexer, but it isn't.
>
> @members {
> myClass mine = new myClass();
> }
>
> How can I pass the myClass reference to the lexer grammar?
>
Use
@lexer::members {
myClass mine = new myClass();
}
instead. BTW, please create a new email instead changing the subject of
a reply, as this messes the thread view up.
Johannes
More information about the antlr-interest
mailing list