help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Question] Generating C++ code with member variables from Flex


From: John W. Millaway
Subject: Re: [Question] Generating C++ code with member variables from Flex
Date: Fri, 5 Oct 2001 16:46:17 -0700 (PDT)

> There is any method to include member variables in the class and access it
> within the actions?

It's awkward, yes, but it can be done. Create a subclass of yyFlexLexer with
your variable in it. In your action, dynamically cast 'this' to your subclass.

%%
\n    { dynamic_cast<MySubClass*>(this) ->count++;}
%%




__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]