* 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.
This commit is contained in:
Akim Demaille
2001-12-15 11:09:05 +00:00
parent 50d780b566
commit 51576fb3c6
3 changed files with 15 additions and 1 deletions
+6
View File
@@ -1,3 +1,9 @@
2001-12-15 Akim Demaille <[email protected]>
* 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-14 Akim Demaille <[email protected]>
* src/lex.c (literalchar): Simply return the char you decoded, non
+2
View File
@@ -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 [email protected]
Aharon Robbins [email protected]
Akim Demaille [email protected]
Albert Chin-A-Young [email protected]
Alexander Belopolsky [email protected]
@@ -28,6 +29,7 @@ Richard Stallman [email protected]
Robert Anisko [email protected]
Shura [email protected]
Tom Lane [email protected]
Tom Tromey [email protected]
Wolfram Wagner [email protected]
Wwp [email protected]
+7 -1
View File
@@ -1198,7 +1198,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;}");
}
/*-------------------------------------------------------------------.