Re: bison, flex and c++

"Piotr Zgorecki" <>
20 Oct 2002 22:52:33 -0400

          From comp.compilers

Related articles
bison, flex and c++ (Shashank G. Khandelwal) (2002-10-18)
Re: bison, flex and c++ (Jan Kleinsorge) (2002-10-20)
Re: bison, flex and c++ (Chris Hundhausen) (2002-10-20)
Re: bison, flex and c++ (Piotr Zgorecki) (2002-10-20)
Re: bison, flex and c++ (Graham Douglas) (2002-10-25)
Re: bison, flex and c++ (Dave Sieber) (2002-11-06)
| List of all articles for this month |

From: "Piotr Zgorecki" <>
Newsgroups: comp.compilers
Date: 20 Oct 2002 22:52:33 -0400
Organization: Internet Cable Provider News Server
References: 02-10-061
Keywords: yacc, C++
Posted-Date: 20 Oct 2002 22:52:33 EDT

You wrote:
> I'm very wet behind the ears at this bison, flex game. I'd like to use bison,
> flex with C++. Much searching online has failed to provide a simple example
> that uses all three. I'd like to build a tree of given lisp formulas by
> populating and linking the nodes of the tree from bison.
> I'd appreciate it if someone could point me to, or provide a simple example.

As I recall, bison itself doesn't have C++ support, but it might have
changed since I used it. Anyway, the "support" is mainly about iostream
library. As long as you don't need it, you can use bison+flex+c++ just
as you would use them with C. If you really need it, then there is a
bison fork with iostream support built in (plus it generates a class
instead of a "flat" file). It is called bison++ and it works with
flex++. And it has an example.

Hope this helps,

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.