Using Bison parser with C++ code

Wayne Mitchinson <wayne.mitchinson@jennic.com>
29 May 2001 23:18:26 -0400

          From comp.compilers

Related articles
Using Bison parser with C++ code wayne.mitchinson@jennic.com (Wayne Mitchinson) (2001-05-29)
Re: Using Bison parser with C++ code ifo@xnet.com (Fraser Orr) (2001-05-31)
| List of all articles for this month |

From: Wayne Mitchinson <wayne.mitchinson@jennic.com>
Newsgroups: comp.compilers
Date: 29 May 2001 23:18:26 -0400
Organization: jennic
Keywords: parse, yacc, C++, question
Posted-Date: 29 May 2001 23:18:26 EDT

I'm sure this question has been asked before,


Does anyone know of some good online examples for integrating a
bison/yacc compiler into a C++ program. I'm new at this parser
writing game and needless to say, the learning curve is steep.


I did a search for the internet to try and find C++ code generators
and found references to Bison++, but also these links stated that it
is no longer maintained. Also, several links mentioned that they just
used the C version of the parser code in their programs. How so ?


I am vaguely familiar with JavaCC, and I am aware that Antlr will
generate C++ code, but I'd rather stay within the lex/flex yacc/bison
environmnet as these are generally available on most unix boxes...


To re-iterate, I'm no expert, but I can get bison/flex to successfully
process an input file. I now want to integrate this parser into some
C++ code to create object instances based on the data in the parsed
file.


Help and direction will be a godsend!!


Cheers!


--
_______________________________________________
Wayne Mitchinson.
Jennic Ltd, Furnival Street, Sheffield S1 4QT
email: wayne.mitchinson@jennic.com


Post a followup to this message

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