parser: warn about hexadecimal token numbers 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:22:43 +01:00
parent aadf6c0bf3
commit 953a95695a
2 changed files with 7 additions and 0 deletions

View File

@@ -147,6 +147,9 @@ AT_BISON_CHECK([-fcaret -Wyacc input.y], [0], [],
[[input.y:1.1-6: warning: POSIX Yacc does not support %nterm [-Wyacc]
%nterm exp
^^^^^^
input.y:2.12-15: warning: POSIX Yacc does not support hexadecimal literals [-Wyacc]
%token NUM 0x40 "number"
^^^^
]])
AT_CLEANUP