Skip to content

Commit

Permalink
synchronize previous fix with upstream lemon.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksherlock committed Oct 8, 2016
1 parent 025aa03 commit ea1708d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ void Parse(
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
yymajor = YYNOCODE;
}else{
while( yypParser->yytos >= &yypParser->yystack[0]
while( yypParser->yytos >= yypParser->yystack
&& yymx != YYERRORSYMBOL
&& (yyact = yy_find_reduce_action(
yypParser->yytos->stateno,
Expand Down
2 changes: 1 addition & 1 deletion lempar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void Parse(
//yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yymajor = YYNOCODE;
}else{
while( yypParser->yytos >= &yypParser->yystack[0]
while( yypParser->yytos >= yypParser->yystack
&& yymx != YYERRORSYMBOL
&& (yyact = yy_find_reduce_action(
yypParser->yytos->stateno,
Expand Down
4 changes: 2 additions & 2 deletions lempar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class yypParser : public LEMON_SUPER {
}
#endif

const yyStackEntry *begin() const { return &yystack[0]; }
const yyStackEntry *begin() const { return yystack; }
const yyStackEntry *end() const { return yytos + 1; }

protected:
Expand Down Expand Up @@ -1018,7 +1018,7 @@ void yypParser::parse(
//yy_destructor(yyminor);
yymajor = YYNOCODE;
}else{
while( yytos >= &yystack[0]
while( yytos >= yystack
&& yymx != YYERRORSYMBOL
&& (yyact = yy_find_reduce_action(
yytos->stateno,
Expand Down

0 comments on commit ea1708d

Please sign in to comment.