%% Regarding Re: Object-oriented lex(flex) and yacc(bison) for c++?;
>> I'm interested in using lex and yacc to implement a parser for
>> one of my projects, and would really like to know if there's
>> something out there that facilitates something a little easier to
>> incorperate it into my c++ code. I'd like to have a Parser
>> class, which uses the two utilities. What's out there that might
>> help, or be of interest?
lb> GNU flex, a lex replacement will generate C++ code with
lb> the "-+" command line option. There is also an unofficial
lb> modification called "flex++" that does a better (?) job. I'm
lb> not sure about a yacc replacement. Personally I use plain
lb> lex/yacc and encapsulate the parser in my own class. I think
lb> that's a more portable solution.
I'd take a look at PCCTS first, if I were you. It's a much improved
combination of lex & yacc which implements n-token lookahead, is easier
to debug, allows you to pass arguments both to and from rules (multiple
arguments and multiple return values), uses an Enhanced BNF (EBNF)
syntax which makes things like lists easier to write & read, and it's
actively under development for new features.
Further, it's totally unencumbered, unlike Bison which causes your
project to fall under the GPL :(. And it generates quite nice C++
output, as well as good C output.
Check out the newsgroup comp.compilers.tools.pccts for more info, or
check out the ftp site ftp.parr-research.com:/pub/pccts.
--
-------------------------------------------------------------------------------
Senior Software Engineer Bay Networks, Inc.
-------------------------------------------------------------------------------
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions--Bay Networks takes no responsibility for them.