In verbose parse error message, don't report `error' as an

expected token.
* tests/actions.at (Printers and Destructors): Adjust.
* tests/calc.at (Calculator $1): Adjust.
* data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
error message, do not report the parser accepts the error token in
that state.
This commit is contained in:
Akim Demaille
2002-07-30 11:56:44 +00:00
parent 52489d4445
commit 217598dadc
8 changed files with 25 additions and 32 deletions

View File

@@ -327,7 +327,7 @@ thing(10): 'x'(10)
sending: ';' (value = 11, line 110)
line(10): thing(10) ';'
sending: 'y' (value = 12, line 120)
120: parse error, unexpected $undefined, expecting $end or error or 'x'
120: parse error, unexpected $undefined, expecting $end or 'x'
sending: EOF
Freeing nterm line (10 from 100)
Freeing nterm line (7 from 70)

View File

@@ -419,7 +419,7 @@ calc: error: 0 != 1])
# Add a studid example demonstrating that Bison can further improve the
# error message. FIXME: Fix this ridiculous message.
_AT_CHECK_CALC_ERROR([$1], [()], [21],
[1.2-1.3: parse error, unexpected ')', expecting error or "number" or '-' or '('])
[1.2-1.3: parse error, unexpected ')', expecting "number" or '-' or '('])
AT_CLEANUP
])# AT_CHECK_CALC