1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-24 14:17:58 +03:00

In the lemon-generated parser, store the number of symbols on the RHS of each

rule as a negative number and add it to the stack pointer, rather than storing
the value as a positive and subtracting it.  This makes the parser faster.

FossilOrigin-Name: b362f0d8ed34839bf3b29d10ed0853ab94245fba135ccd28e619caa6ee6992d5
This commit is contained in:
drh
2017-06-28 13:47:56 +00:00
parent bd8fcc130a
commit 6be95366c7
4 changed files with 15 additions and 15 deletions

View File

@@ -4422,7 +4422,7 @@ void ReportTable(
** sequentually beginning with 0.
*/
for(rp=lemp->rule; rp; rp=rp->next){
fprintf(out," { %d, %d },\n",rp->lhs->index,rp->nrhs); lineno++;
fprintf(out," { %d, %d },\n",rp->lhs->index,-rp->nrhs); lineno++;
}
tplt_xfer(lemp->name,in,out,&lineno);