Re: Parsing C++ with lex++ and bison++ ?

Boris Burshteyn <bburshte@us.oracle.com>
Thu, 23 Jun 1994 21:40:04 GMT

          From comp.compilers

Related articles
Parsing C++ with lex++ and bison++ ? kumar@decster.uta.edu (1994-06-16)
Re: Parsing C++ with lex++ and bison++ ? ruiter@ruls41.leidenuniv.nl (1994-06-19)
Re: Parsing C++ with lex++ and bison++ ? bburshte@us.oracle.com (Boris Burshteyn) (1994-06-23)
Re: Parsing C++ with lex++ and bison++ ? aleung@netcom.com (1994-06-25)
Re: Parsing C++ with lex++ and bison++ ? bburshte@us.oracle.com (Boris Burshteyn) (1994-06-29)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Boris Burshteyn <bburshte@us.oracle.com>
Keywords: C++, parse, tools
Organization: Compilers Central
References: 94-06-095 94-06-117
Date: Thu, 23 Jun 1994 21:40:04 GMT

Jan-Peter de Ruiter writes:


>Flex++ and Bison++ do generate C++ code, but they do not cooperate well
>with some C++ features. A great disappointment for me was that I couldn't
>use $-types that were classes with user-defined constructors. You have to
>do everything with pointers, i.e. do your own memory management. This, for
>me, spoiled all the fun.


I do not know exactly why BISON++ does not allow $-types with user-defined
constructors, but one could suppose this comes from the fact that a
LR1 parser constantly pushes attributes on the stack during shifts and goto
steps, and then pops them out at reductions. It might be inefficient to
allow for user-defined constructors and destructors to be called in this
manner. Although, it is certainly doable and can be optimized.


Thanks, Boris.
--


Post a followup to this message

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