mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 04:43:03 +00:00
bison: catch bad symbol names.
* src/scan-gram.l({int}{id}): Report as an invalid identifier.
* tests/input.at: Adjust.
This commit is contained in:
@@ -208,6 +208,12 @@ splice (\\[ \f\t\v]*\n)*
|
||||
complain_at (*loc, _("invalid directive: %s"), quote (yytext));
|
||||
}
|
||||
|
||||
/* Identifiers may not start with a digit. Yet, don't silently
|
||||
accept "1FOO" as "1 FOO". */
|
||||
{int}{id} {
|
||||
complain_at (*loc, _("invalid identifier: %s"), quote (yytext));
|
||||
}
|
||||
|
||||
"=" return EQUAL;
|
||||
"|" return PIPE;
|
||||
";" return SEMICOLON;
|
||||
|
||||
Reference in New Issue
Block a user