mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +00:00
* 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:
@@ -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;}");
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------.
|
||||
|
||||
Reference in New Issue
Block a user