X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/34136e65fc7bd6babcfedcbfcfdca3b9feb10f1d..c547693afdacf4b865027d3bb8c53f601eadb5ae:/data/lalr1.java?ds=sidebyside diff --git a/data/lalr1.java b/data/lalr1.java index 43e9b970..a40d6c27 100644 --- a/data/lalr1.java +++ b/data/lalr1.java @@ -686,7 +686,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);])[ @@ -848,7 +848,7 @@ m4_popdef([b4_at_dollar])])dnl /* The symbols being reduced. */ for (int yyi = 0; yyi < yynrhs; yyi++) yy_symbol_print (" $" + (yyi + 1) + " =", - yystos_[yystack.stateAt(yyi + 1 - yynrhs)], + yystos_[yystack.stateAt(yynrhs - (yyi + 1))], ]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([, b4_rhs_location(yynrhs, yyi + 1)])[); }