]> git.saurik.com Git - bison.git/commitdiff
* src/reader.c (copy_action): When --yacc, don't append a `;'
authorAkim Demaille <akim@epita.fr>
Sat, 15 Dec 2001 11:07:56 +0000 (11:07 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 15 Dec 2001 11:07:56 +0000 (11:07 +0000)
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.

ChangeLog
NEWS
THANKS
src/reader.c

index 1b97368530f9fd2d29be9823a7c0af1f6d34c7c9..f9b0e6b3a89b2e5b5bd30618aabaf12cc1a57439 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-15  Akim Demaille  <akim@epita.fr>
+
+       * src/reader.c (copy_action): When --yacc, don't append a `;'
+       to the user action: let it fail if lacking.
+       Suggested by Aharon Robbins and Tom Tromey.
+
 2001-12-13  Akim Demaille  <akim@epita.fr>
 
        Version 1.30g.
diff --git a/NEWS b/NEWS
index 10e920e831822e372724c8b887782daff6d14371..5888490984112d6fff2642fd09b37d5aefe09131 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,11 @@ Bison News
 
 Changes in version 1.30h:
 
+* User Actions
+  Bison has always permitted actions such as { $$ = $1 }: it adds the
+  ending semicolon.  Now if in Yacc compatibility mode, the semicolon
+  is no longer output: one has to write { $$ = $1; }.
+
 Changes in version 1.30g:
 
 * Bug fixes
diff --git a/THANKS b/THANKS
index e0ae913f053258836e32d35c18b2c92d15106c1b..195a04639ab255764f1046f510840b00b52fb6b7 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -2,6 +2,7 @@ Bison was originally written by Robert Corbett.  It would not be what
 it is today without the invaluable help of these people:
 
 Airy Andre              Airy.Andre@edf.fr
+Aharon Robbins          arnold@gnu.org
 Akim Demaille           akim@freefriends.org
 Albert Chin-A-Young     china@thewrittenword.com
 Alexander Belopolsky    alexb@rentec.com
@@ -28,6 +29,7 @@ Richard Stallman        rms@gnu.org
 Robert Anisko           anisko_r@epita.fr
 Shura                   debil_urod@ngs.ru
 Tom Lane                tgl@sss.pgh.pa.us
+Tom Tromey              tromey@cygnus.com
 Wolfram Wagner          ww@mpi-sb.mpg.de
 Wwp                     subscript@free.fr
 
index 028ffc0bfe8e7fa1fc37bb99334cbd319c036d3f..33f8e13014cef751c35993ecdbec598a20fc8c67 100644 (file)
@@ -1125,7 +1125,13 @@ copy_action (symbol_list *rule, int stack_offset)
        }
     }
 
-  obstack_sgrow (&action_obstack, ";\n    break;}");
+  /* As a Bison extension, add the ending semicolon.  Since some Yacc
+     don't do that, help people using bison as a Yacc finding their
+     missing semicolons.  */
+  if (yacc_flag)
+    obstack_sgrow (&action_obstack, "}\n    break;");
+  else
+    obstack_sgrow (&action_obstack, ";\n    break;}");
 }
 \f
 /*-------------------------------------------------------------------.