From 123db1926c65ac6b8c9a25f02f02510af963c6d1 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 20 Mar 2016 12:04:21 -0500 Subject: [PATCH] Lemon update 2015-09-07 20:02:39 on branch lemon-update - Fix an unreachable branch in the new parse automaton. (user: drh) --- tools/lemon/lempar.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/lemon/lempar.c b/tools/lemon/lempar.c index 561fbdc873..13ea600687 100644 --- a/tools/lemon/lempar.c +++ b/tools/lemon/lempar.c @@ -406,10 +406,9 @@ static int yy_find_shift_action( int stateno = pParser->yystack[pParser->yyidx].stateno; if( stateno>=YY_MIN_REDUCE ) return stateno; - if( stateno>YY_SHIFT_COUNT - || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){ - return yy_default[stateno]; - } + assert( stateno <= YY_SHIFT_COUNT ); + i = yy_shift_ofst[stateno]; + if( i==YY_SHIFT_USE_DFLT ) return yy_default[stateno]; assert( iLookAhead!=YYNOCODE ); i += iLookAhead; if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){