Re: bison, flex and c++

"Piotr Zgorecki" <pioter@terramail.CUTTHIS.pl>
20 Oct 2002 22:52:33 -0400

          From comp.compilers

Related articles
bison, flex and c++ shrew@cs.utexas.edu (Shashank G. Khandelwal) (2002-10-18)
Re: bison, flex and c++ wobble@gmx.de (Jan Kleinsorge) (2002-10-20)
Re: bison, flex and c++ hundhaus@hawaii.edu (Chris Hundhausen) (2002-10-20)
Re: bison, flex and c++ pioter@terramail.CUTTHIS.pl (Piotr Zgorecki) (2002-10-20)
Re: bison, flex and c++ g.douglas@readytext.co.uk (Graham Douglas) (2002-10-25)
Re: bison, flex and c++ dsieber@spamnot.attbi.com (Dave Sieber) (2002-11-06)
| List of all articles for this month |

From: "Piotr Zgorecki" <pioter@terramail.CUTTHIS.pl>
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,
Pete


Post a followup to this message

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