parser: warn about string literals in Yacc mode

* src/scan-gram.l (scan_integer): Warn.
* tests/input.at (Yacc warnings on symbols): Check.
This commit is contained in:
Akim Demaille
2018-12-13 18:26:24 +01:00
parent 953a95695a
commit 465a47d46b
2 changed files with 12 additions and 0 deletions

View File

@@ -521,6 +521,8 @@ eqopt ([[:space:]]*=)?
STRING_FINISH;
BEGIN INITIAL;
loc->start = token_start;
complain (loc, Wyacc,
_("POSIX Yacc does not support string literals"));
RETURN_VALUE (STRING, last_string);
}
<<EOF>> unexpected_eof (token_start, "\"");