-C Minor\schange\sto\sthe\swalcrash4.test\smodule\sso\sthat\sit\sworks\swhen\nSQLITE_DEFAULT_WAL_SYNCHRONOUS\sis\sset\sto\ssomething\sother\sthan\s2.
-D 2016-05-24T18:50:41.162
+C Enhance\sLemon\sand\sthe\sparser\stemplate\sso\sthat\sit\scan\sonce\sagain\sbuild\sparsers\nthat\shave\sno\sunreachable\sbranches.
+D 2016-05-24T18:55:08.844
F Makefile.in f59e0763ff448719fc1bd25513882b0567286317
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 306d73e854b1a92ea06e5d1e637faa5c44de53c7
F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
-F tool/lemon.c b4da2f0181b4defe538eb437eb96c721cf342d39
-F tool/lempar.c 8569dd3e4c22831e08e441ab7a0eb6bbefa1d38a
+F tool/lemon.c 09a96bed19955697a5e20c49ad863ec2005815a2
+F tool/lempar.c 1f69ad7531e39612915570a3d2c67a3cc1e9bbf0
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
F tool/mkautoconfamal.sh e855df211ecbcc7131dee817110ff386cfb112f7
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 37de3eab67f12ae1ce5bc8d5e541c64fc6b1fd80
-R a85ab0cafd821231f355609347ddd044
+P 61e239bc4310eff172e1e50d51522ecc75dd997e
+R 871f96c4fa63421d837cdbce37a6939a
U drh
-Z c6593df9e63293d2b7fb6ab3cfe0f9b0
+Z 9f1d9f44ca67035c6f1f764382efebdf
-61e239bc4310eff172e1e50d51522ecc75dd997e
\ No newline at end of file
+41fd46e2962ba9a1e1f6867567499d1f6f5b8372
\ No newline at end of file
int index; /* An index number for this rule */
int iRule; /* Rule number as used in the generated tables */
Boolean canReduce; /* True if this rule is ever reduced */
+ Boolean doesReduce; /* Reduce actions occur after optimization */
struct rule *nextlhs; /* Next rule with the same LHS */
struct rule *next; /* Next rule in the global list */
};
}
free(ax);
+ /* Mark rules that are actually used for reduce actions after all
+ ** optimizations have been applied
+ */
+ for(rp=lemp->rule; rp; rp=rp->next) rp->doesReduce = LEMON_FALSE;
+ for(i=0; i<lemp->nxstate; i++){
+ struct action *ap;
+ for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){
+ if( ap->type==REDUCE || ap->type==SHIFTREDUCE ){
+ ap->x.rp->doesReduce = i;
+ }
+ }
+ }
+
/* Finish rendering the constants now that the action table has
** been computed */
fprintf(out,"#define YYNSTATE %d\n",lemp->nxstate); lineno++;
assert( rp->noCode );
fprintf(out," /* (%d) ", rp->iRule);
writeRuleText(out, rp);
- fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp->iRule); lineno++;
+ if( rp->doesReduce ){
+ fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp->iRule); lineno++;
+ }else{
+ fprintf(out, " (OPTIMIZED OUT) */ assert(yyruleno!=%d);\n",
+ rp->iRule); lineno++;
+ }
}
fprintf(out," break;\n"); lineno++;
tplt_xfer(lemp->name,in,out,&lineno);
fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
}
#endif
- while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
+ assert( yypParser->yytos==yypParser->yystack );
/* Here code is inserted which will be executed whenever the
** parser accepts */
/*********** Begin %parse_accept code *****************************************/