[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flex and Bison C++ Example
From: |
Istvan Sandor |
Subject: |
Re: Flex and Bison C++ Example |
Date: |
Mon, 8 Mar 2010 09:33:33 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
I definitely wouldn't say this:
"Edit: March 7 2010 [...] In C mode, the generated
code uses global variables to store information, making them
non-thread-safe. It is also a pain to create multiple different parsers
/ scanners and include them in the same program. Using C++ mode, all of
the data needed is encapsulated by the object, making all of the
generated code reentrant. You can have multiple different parsers /
scanners in the same program, and instantiate and use multiple instances
of each at the same time."
This simply isn't true, you can generate reentrant parsers with bison
and you can also safely have multiple different parsers by renaming
yyparse() and the like.
Just my 2 cents.
Istvan
On Sat, Mar 06, 2010 at 09:05:30PM -0500, Robert Hollencamp wrote:
> I made an example of using Flex and Bison together in C++ and was wondering
> if you guys could provide some feedback. Despite the C++ interface being
> 'experimental' I found it works out pretty good after you figure it out.
>
> http://www.thewaffleshop.net/2010/03/06/flex-bison-cpp-example/
>
> --
> Robert Hollencamp
> address@hidden
> _______________________________________________
> address@hidden http://lists.gnu.org/mailman/listinfo/help-bison