Merge the Lemon enhancement from trunk, resulting in smaller parser tables.
FossilOrigin-Name: 641f41722c68f1d51251b10d4d3d7c473d08ee999f6db20023ef6dcd4dc5f6e8
This commit is contained in:
commit
f1a0223077
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\sthe\sMySQL\supsert\ssyntax.\s\s\sAs\san\soptional\salias\sto\sthe\sinsert\stable\nname\sin\sorder\sto\sfinish\sout\sPostgreSQL\supsert\ssyntax\semulation.
|
||||
D 2018-04-16T13:26:53.730
|
||||
C Merge\sthe\sLemon\senhancement\sfrom\strunk,\sresulting\sin\ssmaller\sparser\stables.
|
||||
D 2018-04-16T14:36:34.684
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F Makefile.in 5ce9343cba9c189046f1afe6d2bcc1f68079439febc05267b98aec6ecc752439
|
||||
@ -1638,7 +1638,7 @@ F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
|
||||
F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
|
||||
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
|
||||
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
|
||||
F tool/lemon.c c1a87d15983f96851b253707985dba8783fbe41ba21ba1b76720e06c8a262206
|
||||
F tool/lemon.c 3b5fb488c6b27e7cc4e3191cc1014af6d6250786dcae02991fb0df0d598fc5df
|
||||
F tool/lempar.c 468a155e8729cfbccfe1d85bf60d064f1dab76167a51149ec5c7928a2de63953
|
||||
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
|
||||
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
|
||||
@ -1719,7 +1719,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 0203f34faae07fbea0bff2d23b81fb37df8854cded4cdadac5a034132a096b6d
|
||||
R 16a23a99570059dda96879cb45289d18
|
||||
P 810d9f63be46c1452718b05e51c519fb64e9fabf2f1813b5e07b1041dbb71880 3b7801acff91905d0e78e06121ebcf2664f6de5f605699dc8726ec9bcb558eb8
|
||||
R 8378bae31105ea55776764904c4e0579
|
||||
U drh
|
||||
Z 35bd09850d2fa1954c923b0a7bd25a8f
|
||||
Z 93044c8cf04465dc31bbf55ccd133682
|
||||
|
@ -1 +1 @@
|
||||
810d9f63be46c1452718b05e51c519fb64e9fabf2f1813b5e07b1041dbb71880
|
||||
641f41722c68f1d51251b10d4d3d7c473d08ee999f6db20023ef6dcd4dc5f6e8
|
11
tool/lemon.c
11
tool/lemon.c
@ -1663,8 +1663,6 @@ int main(int argc, char **argv)
|
||||
lem.basisflag = basisflag;
|
||||
lem.nolinenosflag = nolinenosflag;
|
||||
Symbol_new("$");
|
||||
lem.errsym = Symbol_new("error");
|
||||
lem.errsym->useCnt = 0;
|
||||
|
||||
/* Parse the input file */
|
||||
Parse(&lem);
|
||||
@ -1673,6 +1671,7 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr,"Empty grammar.\n");
|
||||
exit(1);
|
||||
}
|
||||
lem.errsym = Symbol_find("error");
|
||||
|
||||
/* Count and index the symbols of the grammar */
|
||||
Symbol_new("{default}");
|
||||
@ -3994,7 +3993,7 @@ void print_stack_union(
|
||||
fprintf(out," %s yy%d;\n",types[i],i+1); lineno++;
|
||||
free(types[i]);
|
||||
}
|
||||
if( lemp->errsym->useCnt ){
|
||||
if( lemp->errsym && lemp->errsym->useCnt ){
|
||||
fprintf(out," int yy%d;\n",lemp->errsym->dtnum); lineno++;
|
||||
}
|
||||
free(stddt);
|
||||
@ -4144,8 +4143,8 @@ void ReportTable(
|
||||
|
||||
/* Generate the defines */
|
||||
fprintf(out,"#define YYCODETYPE %s\n",
|
||||
minimum_size_type(0, lemp->nsymbol+1, &szCodeType)); lineno++;
|
||||
fprintf(out,"#define YYNOCODE %d\n",lemp->nsymbol+1); lineno++;
|
||||
minimum_size_type(0, lemp->nsymbol, &szCodeType)); lineno++;
|
||||
fprintf(out,"#define YYNOCODE %d\n",lemp->nsymbol); lineno++;
|
||||
fprintf(out,"#define YYACTIONTYPE %s\n",
|
||||
minimum_size_type(0,lemp->maxAction,&szActionType)); lineno++;
|
||||
if( lemp->wildcard ){
|
||||
@ -4183,7 +4182,7 @@ void ReportTable(
|
||||
if( mhflag ){
|
||||
fprintf(out,"#endif\n"); lineno++;
|
||||
}
|
||||
if( lemp->errsym->useCnt ){
|
||||
if( lemp->errsym && lemp->errsym->useCnt ){
|
||||
fprintf(out,"#define YYERRORSYMBOL %d\n",lemp->errsym->index); lineno++;
|
||||
fprintf(out,"#define YYERRSYMDT yy%d\n",lemp->errsym->dtnum); lineno++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user