diff options
author | drh <drh@noemail.net> | 2017-06-28 13:47:56 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-06-28 13:47:56 +0000 |
commit | 6be95366c7ea598b7a11ba09814db507472cabb0 (patch) | |
tree | 021171e2da70a6638ba986cf3ed5373c545c94e0 /tool/lemon.c | |
parent | bd8fcc130afb9873eec8d762a41fac6d83f5158b (diff) | |
download | sqlite-6be95366c7ea598b7a11ba09814db507472cabb0.tar.gz sqlite-6be95366c7ea598b7a11ba09814db507472cabb0.zip |
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
Diffstat (limited to 'tool/lemon.c')
-rw-r--r-- | tool/lemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lemon.c b/tool/lemon.c index 8a00787a4..fe0fb4c61 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -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); |