[antlr-interest] Setting a variable in the lexer and accessing it in the parser.
Ric Klaren
klaren at cs.utwente.nl
Tue Feb 24 01:57:40 PST 2004
On Tue, Feb 24, 2004 at 01:01:00AM -0800, BLade X wrote:
> I am filtering some html elements in the lexer,
> but whenever I see a particular pattern I want that to
> be known in the parser. How do I set a variable (in
> C++ code) in the lexer and access it in the parser.
> Also is there a way I can add variables and methods to
> the lexer and parser class ? Like the main parser and
> lexer class that is generated, can I add my own
> methods and variables to that ? And probably access
> the variables in the lexer class in the parser ?
Did you read the C++ runtime docs? It's in the doc directory of the
distribution.
Cheers,
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
"Of all the things I've lost I miss my mind the most --- Ozzy Osbourne
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list