Fix lempar.c so that the shift-reduce optimization works for error processing.

This is a Lemon issue only and has no impact on SQLite.

FossilOrigin-Name: 3665a2f554e5b8d2717d952dbaf325a39c637c31
This commit is contained in:
drh 2016-06-06 18:17:36 +00:00
parent 4335ad05b8
commit 0efd37f28b
3 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Initialize\sthe\syyerrcnt\svariable\sin\sthe\slemon\sparser\stemplate.\s\sThis\shas\sno\neffect\son\sSQLite\sitself.
D 2016-06-06T13:24:57.848
C Fix\slempar.c\sso\sthat\sthe\sshift-reduce\soptimization\sworks\sfor\serror\sprocessing.\nThis\sis\sa\sLemon\sissue\sonly\sand\shas\sno\simpact\son\sSQLite.
D 2016-06-06T18:17:36.269
F Makefile.in 7321ef0b584224781ec7731408857fa8962c32cc
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 831503fc4e988f571590af1405645fff121b5f1e
@ -1428,7 +1428,7 @@ F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
F tool/lemon.c 09a96bed19955697a5e20c49ad863ec2005815a2
F tool/lempar.c 66a16b5e00fefff278b9e6e3aae14037c0246427
F tool/lempar.c 8c4e9d8517e50da391f1d89a519e743dd4afbc09
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
@ -1500,7 +1500,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P e106a77d85c20ae23ebe49a5acceeaffecb40fc2
R 44ddd09e002da6e14637db41834f8d1e
P 45531654f7f5be3a08e9ee8598f14efe028245d8
R ca88b1e538e49deb8a0ada7b00edb9b6
U drh
Z 4d4207228c1d0bca23b591b2a4bc29d5
Z 8cae88ab86923e6f759f4ae6a119c6f0

View File

@ -1 +1 @@
45531654f7f5be3a08e9ee8598f14efe028245d8
3665a2f554e5b8d2717d952dbaf325a39c637c31

View File

@ -601,6 +601,9 @@ static void yy_shift(
}
}
#endif
if( yyNewState > YY_MAX_SHIFT ){
yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
}
yytos = yypParser->yytos;
yytos->stateno = (YYACTIONTYPE)yyNewState;
yytos->major = (YYCODETYPE)yyMajor;
@ -813,9 +816,6 @@ void Parse(
do{
yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
if( yyact <= YY_MAX_SHIFTREDUCE ){
if( yyact > YY_MAX_SHIFT ){
yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
}
yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt--;