This may be a stupid question, but I'm trying to use a proper C++ scanner with flex++ and, after reading some of the tokens, I need to make the value that I've read available to the rest of my program.
Obviously a global yylval is out - I want something encapsulated within the class, but the class is defined in (/usr/include/)FlexLexer.h and so shouldn't be messed around with. Although I can inherit from the class, the code in lex.ll can't write to whatever the derived class's properties are because it thinks it's in class yyFlexLexer (correctly). Is there a clean way to handle this? Or should I include the header for the derived class and do something nasty like recasting this-> to get the variables? Thanks in advance for any help, Rupert
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Help-flex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-flex
