help-flex
[Top][All Lists]
Advanced

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

C++ scanner passing values back out


From: Rupert Swarbrick
Subject: C++ scanner passing values back out
Date: Tue, 24 May 2005 08:55:54 +0100
User-agent: Debian Thunderbird 1.0 (X11/20050116)

Just to say that I have had some success - recasting the "this" pointer
does work, but it's extremely unsatisfactory - not to mention error prone.

For anyone that needs to do it, though, heres a nice macro for your
legacy flex code:

#define yylval ((lexer_class*)this)->val_ref()

where

value_t& lexer_class::val_ref()
{
    return private_value_rep;
}

Or I thought it was nice, anyway!

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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