Java: Fix syntax error handling without error token.

* data/lalr1.java (YYParser::parse): Here.
* tests/java.at: Add test case.
This commit is contained in:
Tim Landscheidt
2012-02-12 01:29:41 +00:00
committed by Akim Demaille
parent bbaf618c3e
commit e34e97bcd7
2 changed files with 67 additions and 1 deletions

View File

@@ -642,7 +642,7 @@ m4_popdef([b4_at_dollar])])dnl
}
/* Pop the current state because it cannot handle the error token. */
if (yystack.height == 1)
if (yystack.height == 0)
return false;
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[