[antlr-interest] initializing a variable within the lexer

Ric Klaren klaren at cs.utwente.nl
Fri Apr 2 01:24:14 PST 2004


On Thu, Apr 01, 2004 at 06:28:35PM -0000, Jerry Dy wrote:
> My question is, how do I initialize the inTag attribute? I'd like to 
> insert an inTag = false in the lexer's construction. Thanks!

Three approaches, if you're already using a custom constructor add it to that
one (and make sure not to call the default ones). Or use some initialize
method. Or use the noConstructors option to turn off the default
constructors and write your own (do not forget to copy the stuff from the
default constructors though)

Where to add constructors you can find in the cpp-runtime.html doc.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  "I think we better split up."
  "Good idea. We can do more damage that way."
  --- Ghostbusters



 
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