help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

%parse-param and C++ parsers


From: John Madsen
Subject: %parse-param and C++ parsers
Date: Wed, 23 Apr 2003 11:27:59 -0400

I realize that the C++ skeleton, lalr1.cc, is still under heavy
development and not yet documented, but I've discovered that it doesn't
yet support the %parse-param directive (or, of course, the deprecated
YYPARSE_PARAM).  From what I can determine about the m4 code, this can
be easily fixed with two changes:

First, in the declaration of the parse member function:

int parse (]b4_c_ansi_formals(b4_parse_param)[);

And then at the definition:

int
yy::]b4_parser_class_name[::parse (]b4_c_ansi_formals(b4_parse_param)[)

This now allows one to pass whatever they want to the parse member
function.  Is this an acceptable solution, or am I missing some nuances?

Thanks,

John Madsen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]