WANTED: Info on YACC clones/derivatives.

"Ronald F. Guilmette" <rfg@rahul.net>
Sat, 11 Mar 1995 21:49:13 GMT

          From comp.compilers

Related articles
WANTED: Info on YACC clones/derivatives. rfg@rahul.net (Ronald F. Guilmette) (1995-03-11)
Visual Parse++ parsing tool for C++ 71332.2577@CompuServe.COM (Bill Donahue) (1995-03-15)
| List of all articles for this month |

Newsgroups: comp.compilers
From: "Ronald F. Guilmette" <rfg@rahul.net>
Keywords: yacc, C++, question
Organization: a2i network
Date: Sat, 11 Mar 1995 21:49:13 GMT

Unless I am mistaken, there are a number of YACC-like tools out there which
claim to provide some support for either:


a) C++, or


b) multiple parsers in the same executable.


I would like to obtain detailed information on any/all such YACC-like tools.
In particular, I'm interested in finding out how these tools deal with the
YACC value stack (and elements thereof). To be even more specific about it,
I'd like to know how various YACC-like tools deal with:


o The `yyval' variable.


o The `yylval' variable.


o C++ constructors & destructors for elements of the YACC value
stack _and_ the `yyval' and `yylval' variable.


Having created a tool myself which shares some of the properties of YACC
(and which tries to support C++) I've noticed that the existance of the
`yyval' and `yylval' variables seems to imply an awful lot of (inefficient?)
object construction, destruction, and copying, and so I'm inclined to wonder
if other people have noticed this too (and if others have chosen to dispense
with `yyval' and `yylval' as I have). The existance of `yyval' and `yylval'
would also seem to negatively affect our ability to embed multiple parsers
in any single executable, so this also seems like a good reason to do away
with them.


Of course I'm also curious about what YACC extensions people have implemented
to support having elements of the YACC value stack be objects of full-fledged
C++ class types. In particular I'd like to know what people have done (in
various YACC-like tools) to allow the user to define and use constructors
and destructors for the %union type which YACC uses as the type for all of
its value stack elements.


If you have any pointers to papers or documents describing how various YACC
clones handle any of these things, please send them to me via E-mail. Thanks.


--


-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- E-mail: rfg@segfault.us.com ----------- Purveyors of Compiler Test ----
-------------------------------------------- Suites and Bullet-Proof Shoes -
--


Post a followup to this message

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