mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-04-24 02:29:43 +00:00
java: fix location handling bug.
Reported at
<http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
* data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
reversed access to location stack.
* THANKS (Bernd Kiefer): Add.
(cherry picked from commit 8db68289d1)
This commit is contained in:
committed by
Joel E. Denny
parent
8407249529
commit
aa3bcdf35e
+1
-1
@@ -120,7 +120,7 @@ b4_locations_if([[
|
||||
private ]b4_location_type[ yylloc (YYStack rhs, int n)
|
||||
{
|
||||
if (n > 0)
|
||||
return new ]b4_location_type[ (rhs.locationAt (1).begin, rhs.locationAt (n).end);
|
||||
return new ]b4_location_type[ (rhs.locationAt (n-1).begin, rhs.locationAt (0).end);
|
||||
else
|
||||
return new ]b4_location_type[ (rhs.locationAt (0).end);
|
||||
}]])[
|
||||
|
||||
Reference in New Issue
Block a user