aboutsummaryrefslogtreecommitdiff
path: root/tool/lemon.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-06-28 13:47:56 +0000
committerdrh <drh@noemail.net>2017-06-28 13:47:56 +0000
commit6be95366c7ea598b7a11ba09814db507472cabb0 (patch)
tree021171e2da70a6638ba986cf3ed5373c545c94e0 /tool/lemon.c
parentbd8fcc130afb9873eec8d762a41fac6d83f5158b (diff)
downloadsqlite-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.c2
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);