In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
authorAkim Demaille <akim@epita.fr>
Tue, 5 Oct 2004 08:39:17 +0000 (08:39 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 5 Oct 2004 08:39:17 +0000 (08:39 +0000)
commitb4a2033855c7d7838f8e079c0656d4e91bbb6361
treebe9424e46c74a6e698f70706423c46647e5d5b20
parentf85a5e6f4b9867cf91ec6c93bdbbb8a3b4ba8e11
In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
whether the reducion was empty or not.  This leaves room to
improve the use of YYLLOC_DEFAULT in such a case.
lalr1.cc is still experimental, so changing this is acceptable.
And finally, there are probably not many users who changed the
handling of locations in GLR, so changing is admissible too.
* data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
empty reduction, set @$ to an empty location ending the previously
stacked symbol.
Adjust uses to make sure the code is triggered on empty
reductions.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
expected output: empty reductions have empty locations.
ChangeLog
data/glr.c
data/lalr1.cc
data/yacc.c
tests/actions.at