From 62a223e5dd9227b7aa41e66d53df723d61fcf185 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 9 Jun 2014 13:11:40 +0000 Subject: [PATCH] Modify the %nonassoc directive in lemon so that it generates a run-time error rather than a parsing conflict. This changes is due to a bug report on the mailing list. SQLite does not use the %nonassoc directive in its grammar so this change does not affect SQLite. FossilOrigin-Name: 1925f3a0a2caa709569df015a8e0d26412f1a9ff --- manifest | 12 ++++++------ manifest.uuid | 2 +- tool/lemon.c | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 8babedd8a7..6555b4ed1a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sa\stest\scase\sto\sensure\sthat\sestLog()\sworks\sfor\snegative\snumbers. -D 2014-06-06T20:49:19.299 +C Modify\sthe\s%nonassoc\sdirective\sin\slemon\sso\sthat\sit\sgenerates\sa\srun-time\nerror\srather\sthan\sa\sparsing\sconflict.\s\sThis\schanges\sis\sdue\sto\sa\sbug\sreport\non\sthe\smailing\slist.\s\sSQLite\sdoes\snot\suse\sthe\s%nonassoc\sdirective\sin\sits\ngrammar\sso\sthis\schange\sdoes\snot\saffect\sSQLite. +D 2014-06-09T13:11:40.535 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -1134,7 +1134,7 @@ F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce -F tool/lemon.c 07aba6270d5a5016ba8107b09e431eea4ecdc123 +F tool/lemon.c 3ff0fec22f92dfb54e62eeb48772eddffdbeb0d6 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc F tool/logest.c eef612f8adf4d0993dafed0416064cf50d5d33c6 F tool/mkautoconfamal.sh f8d8dbf7d62f409ebed5134998bf5b51d7266383 @@ -1174,7 +1174,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 75437bee4905949c66dc7694ea234d4d5aefd981 -R cd7c3066c722d9461c491648a12f3bbc +P 813469d98519b609669a004b7b604af78ef40c02 +R 17b9b9add2b8e980cb35f959c7029199 U drh -Z bd1ed1df3d77361aa69d91899562bfbf +Z c031771471155f639666c4eafbc642f6 diff --git a/manifest.uuid b/manifest.uuid index 1ffa7c04c8..6a1ff5c5e1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -813469d98519b609669a004b7b604af78ef40c02 \ No newline at end of file +1925f3a0a2caa709569df015a8e0d26412f1a9ff \ No newline at end of file diff --git a/tool/lemon.c b/tool/lemon.c index d7179ad423..85e94f7007 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -1183,8 +1183,7 @@ static int resolve_conflict( apx->type = SH_RESOLVED; }else{ assert( spx->prec==spy->prec && spx->assoc==NONE ); - apy->type = SRCONFLICT; - errcnt++; + apx->type = ERROR; } }else if( apx->type==REDUCE && apy->type==REDUCE ){ spx = apx->x.rp->precsym;