|WANTED: Info on YACC clones/derivatives. firstname.lastname@example.org (Ronald F. Guilmette) (1995-03-11)|
|Visual Parse++ parsing tool for C++ 71332.2577@CompuServe.COM (Bill Donahue) (1995-03-15)|
|From:||"Ronald F. Guilmette" <email@example.com>|
|Keywords:||yacc, C++, question|
|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
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: firstname.lastname@example.org ----------- Purveyors of Compiler Test ----
-------------------------------------------- Suites and Bullet-Proof Shoes -
Return to the
Search the comp.compilers archives again.