Le 4 nov. 08 à 22:09, Akim Demaille a écrit :

Yes, sorry, I did not realize that was ambiguous.  I'm doing it now.

I added the following.

** Temporary hack for adding a semicolon to the user action.

  Bison used to prepend a trailing semicolon at the end of the user
  action for reductions.  This allowed actions such as

    exp: exp "+" exp { $$ = $1 + $3 };

  instead of

    exp: exp "+" exp { $$ = $1 + $3; };

  This prevents the future support for languages than do not use `;'
  as C/C++/Java do.  Yet some grammars still depend on this `feature'.
  Bison 2.4.1 restores the previous behavior to leave more time for
  grammars depending on the old behavior to be adjusted.  Future
  release of Bison will disable this feature.

Looking at the code, I think the simplest solution would be to provide a means not to issue the ';'. It then suffices that one person tries to build with the "feature" disabled. Currently it is bound to --yacc only, which is not good enough (it influences many more features).

Adding an option is a PITA.

I'm tempted by the envvar approach, but that's hacky :)

        BISON_NO_ADDED_SEMICOLON=1 bison ...

Reply via email to