]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the PRAGMA parser so that it can accept negative numbers in parentheses,
authordrh <drh@noemail.net>
Fri, 3 Apr 2009 01:43:57 +0000 (01:43 +0000)
committerdrh <drh@noemail.net>
Fri, 3 Apr 2009 01:43:57 +0000 (01:43 +0000)
like the syntax diagrams say it should be able to. (CVS 6444)

FossilOrigin-Name: 286e83178ddcd2efe2888697bcf8cc95ccdef880

manifest
manifest.uuid
src/parse.y

index 2a21103fd01acd50eccfcb8dea7e7878648c2705..ee43d0d9b90734ef8098852ca32ae00e685d6a12 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\ssure\scount(*)\sworks\son\sthe\ssqlite_master\stable\sof\san\sempty\sdatabase.\nTicket\s#3774.\s(CVS\s6443)
-D 2009-04-02T20:27:28
+C Fix\sthe\sPRAGMA\sparser\sso\sthat\sit\scan\saccept\snegative\snumbers\sin\sparentheses,\nlike\sthe\ssyntax\sdiagrams\ssay\sit\sshould\sbe\sable\sto.\s(CVS\s6444)
+D 2009-04-03T01:43:57
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -145,7 +145,7 @@ F src/os_unix.c 5d667f24615043c937a138faaed5f3e93b8619b0
 F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684
 F src/pager.c 34aeb87dc8177901d49dd02207828a2121064c25
 F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
-F src/parse.y b9ba0946a13e9f32a96044e64a3e8780269b08b0
+F src/parse.y 070215cf461ab917c23253a9cbf0903f2b0d8f19
 F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
 F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
 F src/pcache1.c f587565f4ba0fd1772067eaa96814dce761b7a4c
@@ -715,7 +715,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 85e6a4740d6db731c8c35a331031c346e9189c27
-R bd78ffb4482bff31a318e650753900a9
+P e0c1a780f5a356c48b2a4cc66fab988fe441722f
+R 296c5be54eca157c79928abcd498e13b
 U drh
-Z 65e49db46664fd71c4cc25be1e95b592
+Z 399a97baf64ccdeed33e787dae76324d
index edefd6890ff05acd2931cef7de915bbcbbb55f48..8cb900a48a4c413ed91f4a0c452fdb76a3cadb31 100644 (file)
@@ -1 +1 @@
-e0c1a780f5a356c48b2a4cc66fab988fe441722f
\ No newline at end of file
+286e83178ddcd2efe2888697bcf8cc95ccdef880
\ No newline at end of file
index 1f14b41682ee0f6ebbc93273421488a69e90ec31..cfbbd5085f652e7dddc43b34e4a009b187d44745 100644 (file)
@@ -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.272 2009/03/24 15:08:10 drh Exp $
+** @(#) $Id: parse.y,v 1.273 2009/04/03 01:43:57 drh Exp $
 */
 
 // All token codes are small integers with #defines that begin with "TK_"
@@ -1006,16 +1006,18 @@ cmd ::= VACUUM nm.             {sqlite3Vacuum(pParse);}
 //
 %ifndef SQLITE_OMIT_PARSER
 %ifndef SQLITE_OMIT_PRAGMA
-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 DELETE(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).                {sqlite3Pragma(pParse,&X,&Z,0,0);}
+cmd ::= PRAGMA nm(X) dbnm(Z) EQ nmnum(Y).    {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);}
+cmd ::= PRAGMA nm(X) dbnm(Z) EQ minus_num(Y). 
+                                             {sqlite3Pragma(pParse,&X,&Z,&Y,1);}
+cmd ::= PRAGMA nm(X) dbnm(Z) LP minus_num(Y) RP.
+                                             {sqlite3Pragma(pParse,&X,&Z,&Y,1);}
+
 nmnum(A) ::= plus_num(X).             {A = X;}
 nmnum(A) ::= nm(X).                   {A = X;}
+nmnum(A) ::= ON(X).                   {A = X;}
+nmnum(A) ::= DELETE(X).               {A = X;}
 %endif SQLITE_OMIT_PRAGMA
 %endif SQLITE_OMIT_PARSER
 plus_num(A) ::= plus_opt number(X).   {A = X;}