|Parsing C++ with lex++ and bison++ ? firstname.lastname@example.org (1994-06-16)|
|Re: Parsing C++ with lex++ and bison++ ? email@example.com (1994-06-19)|
|Re: Parsing C++ with lex++ and bison++ ? firstname.lastname@example.org (Boris Burshteyn) (1994-06-23)|
|Re: Parsing C++ with lex++ and bison++ ? email@example.com (1994-06-25)|
|Re: Parsing C++ with lex++ and bison++ ? firstname.lastname@example.org (Boris Burshteyn) (1994-06-29)|
|From:||Boris Burshteyn <email@example.com>|
|Keywords:||C++, parse, tools|
|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.
Return to the
Search the comp.compilers archives again.