bison-patches
[Top][All Lists]
Advanced

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

Re: push parser


From: Paul Eggert
Subject: Re: push parser
Date: Mon, 18 Dec 2006 13:35:56 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> writes:

>> >   #define yyparse() yypull_parse (NULL, &yylex)
>> 
>> This will break a lot of code, I'm afraid, since many apps assume
>> yyparse is a true function and is not a macro.
>
> No apps assume that for %push-parser since no apps use %push-parser yet.

OK, but I want push.c to go away; I want its contents to replace
yacc.c.  Otherwise it's too much of a maintenance hassle.  (Hence
I want to get rid of the by-hand steps one must currently use after
"cp push.c yacc.c".)

Adding this "#define" unconditionally makes this goal harder to
achieve.  It should be fairly easy to put in the #define only for the
cases where it's harmless to use a #define, and stick with the
traditional approach otherwise.  (The problem with yylex being a macro
could be treated similarly.)

> We could add another Bison declaration to enable a yyparse function.

That's extra user complexity.  I'd rather have Bison do the right
thing without bothering the user.




reply via email to

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