]> git.saurik.com Git - bison.git/commit - NEWS
lalr1, yacc: use the default location as initial error location
authorAkim Demaille <akim@lrde.epita.fr>
Tue, 11 Aug 2015 11:48:57 +0000 (13:48 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 12 Aug 2015 11:56:07 +0000 (13:56 +0200)
commit476c1cca5945eeef3493cfc6ef06ed6d0972d787
treeaa27fdaf9edf565867d52f76c09169433c02e23d
parent55fb68aabf15f6c2a9046c0bc3ad21a4aa2ca760
lalr1, yacc: use the default location as initial error location

Currently lalr1.cc makes an out-of-bound access when trying to read @1
in rules with an empty rhs (i.e., when there is no @1) that raises an
error (YYERROR).

glr.c already gracefully handles this by using @$ as initial location
for the errors.  Let's do that in yacc.c and lalr1.cc.

* data/lalr1.cc, data/yacc.c: Use @$ to initialize the error location.
* tests/actions.at: Check that case.
NEWS
data/lalr1.cc
data/yacc.c
tests/actions.at