Attempt to reset the error count in the Lemon-generated parser after

a parse failure.

FossilOrigin-Name: 91889fa30e84760e0d4b3d429c4abdef5a3f7931
This commit is contained in:
drh 2016-07-05 12:47:28 +00:00
parent 2e993288e6
commit 240c7faf8b
3 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\ssqlite3rbu_state()\sAPI.\sUsed\sto\sdetermine\sthe\scurrent\sstate\s(creating\sOAL,\sready\sto\smove\sOAL,\sincremental-checkpoint,\sfinished\sor\serror)\sof\san\sRBU\soperation. C Attempt\sto\sreset\sthe\serror\scount\sin\sthe\sLemon-generated\sparser\safter\na\sparse\sfailure.
D 2016-07-04T11:47:48.898 D 2016-07-05T12:47:28.882
F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
@ -1432,7 +1432,7 @@ F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
F tool/lemon.c 09a96bed19955697a5e20c49ad863ec2005815a2 F tool/lemon.c 09a96bed19955697a5e20c49ad863ec2005815a2
F tool/lempar.c 8c4e9d8517e50da391f1d89a519e743dd4afbc09 F tool/lempar.c f2c88a13ab6611ce752d176fa8c83318ca715df0
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9 F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862 F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
@ -1504,8 +1504,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P d8bc6feb99938a2aa06142b217045e4b54c66bf1 92e7df0ff5c4c118c63d92a767dc82700438a310 P 0357875fbb1bb462feef5121287b2f84da88e497
R 985e1d1c0fa6ec62417a6fcb0acf4b8c R a578f6c3df8fc8ba3d5f62a27a2cbf5b
T +closed 92e7df0ff5c4c118c63d92a767dc82700438a310 U drh
U dan Z 5d179a5613158bad283b799b101c68f6
Z dee206ff16109350ba5a0f9bf08fce29

View File

@ -1 +1 @@
0357875fbb1bb462feef5121287b2f84da88e497 91889fa30e84760e0d4b3d429c4abdef5a3f7931

View File

@ -390,6 +390,7 @@ static void yy_destructor(
static void yy_pop_parser_stack(yyParser *pParser){ static void yy_pop_parser_stack(yyParser *pParser){
yyStackEntry *yytos; yyStackEntry *yytos;
assert( pParser->yytos!=0 ); assert( pParser->yytos!=0 );
assert( pParser->yytos > pParser->yystack );
yytos = pParser->yytos--; yytos = pParser->yytos--;
#ifndef NDEBUG #ifndef NDEBUG
if( yyTraceFILE ){ if( yyTraceFILE ){
@ -799,7 +800,6 @@ void Parse(
#endif #endif
yyParser *yypParser; /* The parser */ yyParser *yypParser; /* The parser */
/* (re)initialize the parser, if necessary */
yypParser = (yyParser*)yyp; yypParser = (yyParser*)yyp;
assert( yypParser->yytos!=0 ); assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
@ -879,6 +879,9 @@ void Parse(
if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yy_parse_failed(yypParser); yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt = -1;
#endif
yymajor = YYNOCODE; yymajor = YYNOCODE;
}else if( yymx!=YYERRORSYMBOL ){ }else if( yymx!=YYERRORSYMBOL ){
yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);