|Bison++ and flex++ available email@example.com (John Levine) (1992-10-13)|
|From:||John Levine <firstname.lastname@example.org>|
|Keywords:||C++, yacc, flex|
|Date:||Tue, 13 Oct 1992 14:19:27 GMT|
Alain Coetmeur <email@example.com> has contributed his C++-ized versions of
bison and flex to the compilers archives. They're a bunch of files in the
subdirectory bison++flex++ on iecc.com and primost.cs.wisc.edu.
They're much too big to mail; I'll see if I can figure out something for
the mail server.
Here are some bugs he noted:
1- On SUN C++, the compiler is "Brain Damaged" (citation) and
reject any goto, even when there is no constructor/destructor in the bloc
that is scoped. So Flex++ skeleton is not compilable. Who can help me !!
With ATT-Cfront 3, Microsoft C7, Borland C++, Windows NT SDK, there is
no problem and (hopefully) we don't have any SUN C++ locally.
2- The tokens symbols generated by BISON++ are declared as
"static const int " (class member constant) in C++ and defined in the
skeleton. So these symbols are not compile-time constant, and cannot
be used to size array or such compile-time initialisation. I studied
the possibility to generate "enum" and not "const". It would be easy,
but may change some behaviour ... I propose to generate "enum" in a
new version, but to keep backward compatibility, there will be a
%define symbol to switch back to "static const int". What do you think
of it ? what problems do the current users preview ? I will modify
bison++ in this direction as soon as I get time to do, and if users
don't show me problems ...
3- There should be a C++ Stream implementation. Nowaday you can
do it easily by redefining virtual function, but there should be a clean
and automatic way to use Streams. I propose to use a %define symbol to
switch from stdio to streamio. Like everything it is waiting for me to
get time. Before I start, tell me if you disagree in any way...
Return to the
Search the comp.compilers archives again.