bug-bison
[Top][All Lists]
Advanced

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

Re: Another - Bison 1.35 works but Bison 1.50 Doesn't


From: Paul Eggert
Subject: Re: Another - Bison 1.35 works but Bison 1.50 Doesn't
Date: Mon, 14 Oct 2002 02:02:10 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 14 Oct 2002 10:39:15 +0200
> 
> I was thinking that the default action could be really implemented as
> a default action (a default: in the switch, or even an explicit action
> per missing case:), not as a pre-action.  In languages which are more
> properly type checked than C, our trick of typelessly pre-storing $1
> in $$ is not a good thing TM.

True.

> So I was thinking that having the user make explicit what they want is
> a better options.

But this doesn't follow.  If the Bison user doesn't specify any
action, and if $$ is untyped but $1 is typed, then the user can't make
use of the default action's side effects, so the default action is
functionally equivalent to {} in this case.  So it is purely a
notational convenience that the user doesn't need to explicitly say
"{}" in this case.  Bison can implement it the same, regardless of
whether the user explicitly says "{}".

This is similar to the "(void) close (0);" statement in C: the
"(void)" doesn't need to alter the code that gets generated, since the
C program has the same meaning if the "(void)" is omitted.




reply via email to

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