mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* src/parse-gram.y (rules_or_grammar_declaration): Add an error
recovery rule, and forbid extensions when --yacc. (gram_error): Use complain_at. * src/reader.c (reader): Exit if there were parse errors.
This commit is contained in:
@@ -502,6 +502,11 @@ reader (void)
|
||||
scanner_initialize ();
|
||||
gram_parse (&gram_control);
|
||||
|
||||
/* If something went wrong during the parsing, don't try to
|
||||
continue. */
|
||||
if (complain_message_count)
|
||||
exit (1);
|
||||
|
||||
/* Grammar has been read. Do some checking */
|
||||
if (nrules == 0)
|
||||
fatal (_("no rules in the input grammar"));
|
||||
|
||||
Reference in New Issue
Block a user