From: drh Date: Sat, 27 Jan 2007 02:38:29 +0000 (+0000) Subject: Parser changes to allow parenthesized numerical arguments to pragmas, X-Git-Tag: version-3.6.10~2560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3eb4b44c4f4fa7cc1905b062c12892e9ccc68e5;p=thirdparty%2Fsqlite.git Parser changes to allow parenthesized numerical arguments to pragmas, in support of the integrity_check enhancement of check-in (3609) and ticket #2176. (CVS 3610) FossilOrigin-Name: ab6322bf9398c2989b648b24c1ebdf09493accdf --- diff --git a/manifest b/manifest index 0246e350b8..baf95b0fe1 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Limit\sthe\snumber\sof\serrors\sreturned\sby\sPRAGMA\sintegrity_check\sto\s100\sby\ndefault.\s\sSpecify\san\salternative\slimit\susing\san\sargument\sto\sthe\spragma.\nTicket\s#2176.\s(CVS\s3609) -D 2007-01-27T02:24:55 +C Parser\schanges\sto\sallow\sparenthesized\snumerical\sarguments\sto\spragmas,\nin\ssupport\sof\sthe\sintegrity_check\senhancement\sof\scheck-in\s(3609)\nand\sticket\s#2176.\s(CVS\s3610) +D 2007-01-27T02:38:30 F Makefile.in 7fa74bf4359aa899da5586e394d17735f221315f F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -87,7 +87,7 @@ F src/os_win.c 8736cf3a49fd651a6538857480f302807d57814c F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b F src/pager.c d6ad66eb119602cb2e6a097f8f635372ba677d23 F src/pager.h 2e6d42f4ae004ae748a037b8468112b851c447a7 -F src/parse.y 2f571c5f6219428d7fb08737db3d113742b1cceb +F src/parse.y 31ea08df1305100abd5bcee61b4a01c4e43cbd35 F src/pragma.c 5091300911670ddaa552bfa12c45cbca1bb7e7d6 F src/prepare.c 484389c6811415b8f23d259ac9c029613e1c72c3 F src/printf.c aade23a789d7cc88b397ec0d33a0a01a33a7a9c1 @@ -428,7 +428,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 93edd3b0565d08383b3034c57f221073fde6de4b -R 557df95c56e9de3c85559166fb533aa4 +P d564a039f27be2bb2c3973e79dc99b25869139da +R 391c93b26258880b34efda350f4d952f U drh -Z 0cf02b2f60ab84b0a3c77c11c5fcb2c4 +Z 8953b7a02ab9cda0f53ad9c4a7a06c8f diff --git a/manifest.uuid b/manifest.uuid index 3668855f5c..e5dc08236e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d564a039f27be2bb2c3973e79dc99b25869139da \ No newline at end of file +ab6322bf9398c2989b648b24c1ebdf09493accdf \ No newline at end of file diff --git a/src/parse.y b/src/parse.y index 8502f56ad0..1ca6f56da0 100644 --- a/src/parse.y +++ b/src/parse.y @@ -14,7 +14,7 @@ ** the parser. Lemon will also generate a header file containing ** numeric codes for all of the tokens. ** -** @(#) $Id: parse.y,v 1.212 2006/12/20 02:15:00 drh Exp $ +** @(#) $Id: parse.y,v 1.213 2007/01/27 02:38:30 drh Exp $ */ // All token codes are small integers with #defines that begin with "TK_" @@ -892,14 +892,15 @@ cmd ::= VACUUM nm. {sqlite3Vacuum(pParse);} ///////////////////////////// The PRAGMA command ///////////////////////////// // %ifndef SQLITE_OMIT_PRAGMA -cmd ::= PRAGMA nm(X) dbnm(Z) EQ nm(Y). {sqlite3Pragma(pParse,&X,&Z,&Y,0);} +cmd ::= PRAGMA nm(X) dbnm(Z) EQ nmnum(Y). {sqlite3Pragma(pParse,&X,&Z,&Y,0);} cmd ::= PRAGMA nm(X) dbnm(Z) EQ ON(Y). {sqlite3Pragma(pParse,&X,&Z,&Y,0);} -cmd ::= PRAGMA nm(X) dbnm(Z) EQ plus_num(Y). {sqlite3Pragma(pParse,&X,&Z,&Y,0);} cmd ::= PRAGMA nm(X) dbnm(Z) EQ minus_num(Y). { sqlite3Pragma(pParse,&X,&Z,&Y,1); } -cmd ::= PRAGMA nm(X) dbnm(Z) LP nm(Y) RP. {sqlite3Pragma(pParse,&X,&Z,&Y,0);} +cmd ::= PRAGMA nm(X) dbnm(Z) LP nmnum(Y) RP. {sqlite3Pragma(pParse,&X,&Z,&Y,0);} cmd ::= PRAGMA nm(X) dbnm(Z). {sqlite3Pragma(pParse,&X,&Z,0,0);} +nmnum(A) ::= plus_num(X). {A = X;} +nmnum(A) ::= nm(X). {A = X;} %endif SQLITE_OMIT_PRAGMA plus_num(A) ::= plus_opt number(X). {A = X;} minus_num(A) ::= MINUS number(X). {A = X;}