On 1 May 2007, at 18:40, Leviathan wrote:

My intention is to change yylex name to e.g my_yylex . I have read in
bison's gnu manual that such thing is possible via the %name- prefix="my_yy" directive but it will also change prefix for yyparse , yyerror etc. I just want to change yylex's name and keep the default names for the rest .Is
there a way to do that?

I doubt it, because the idea is to create a name space, avoiding name conflicts in case one uses more than one parser. Instead, define a new function calling it, or if that is not possible, use the C/C++ preprocessor, something like:
#define yylex my_yy
... /* Changes yylex -> my_yy here */
#undef yylex

  Hans Aberg




_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to