opensubscriber
   Find in this group all groups
 
Unknown more information…

h : help-flex@gnu.org 23 June 2012 • 1:42AM -0400

How can I use namespaces with the C++ interface ?
by Timothy Madden

REPLY TO AUTHOR
 
REPLY TO GROUP




Hello

How could I use a namespace like yy (the same way bison does) for the
generated scanner with the C++ interface ?

I tried to open "namespace yy {" at the %top of the file, and to close
it "}" at the bottom, but all the included standard headers in the
generated scanner would be included in the namespace yy this way,
instead of the expected global namespace.

I had no other idea than to explicitly include the C/C++ standard
headers used by the scanner before I open the yy namespaces, at the top
of the file, so that when the scanner later includes them, they will
each see they have been already included and skip over any included content.

Can namespaces please be added to flex C++ interface ?

Thank you,
Timothy Madden


_______________________________________________
help-flex mailing list
help-flex@gnu....
https://lists.gnu.org/mailman/listinfo/help-flex

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.