mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix the PRAGMA parser so that it can accept negative numbers in parentheses,
like the syntax diagrams say it should be able to. (CVS 6444) FossilOrigin-Name: 286e83178ddcd2efe2888697bcf8cc95ccdef880
This commit is contained in:
12
manifest
12
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)
|
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-02T20:27:28
|
D 2009-04-03T01:43:57
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -145,7 +145,7 @@ F src/os_unix.c 5d667f24615043c937a138faaed5f3e93b8619b0
|
|||||||
F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684
|
F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684
|
||||||
F src/pager.c 34aeb87dc8177901d49dd02207828a2121064c25
|
F src/pager.c 34aeb87dc8177901d49dd02207828a2121064c25
|
||||||
F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
|
F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
|
||||||
F src/parse.y b9ba0946a13e9f32a96044e64a3e8780269b08b0
|
F src/parse.y 070215cf461ab917c23253a9cbf0903f2b0d8f19
|
||||||
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
|
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
|
||||||
F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
|
F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
|
||||||
F src/pcache1.c f587565f4ba0fd1772067eaa96814dce761b7a4c
|
F src/pcache1.c f587565f4ba0fd1772067eaa96814dce761b7a4c
|
||||||
@@ -715,7 +715,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
P 85e6a4740d6db731c8c35a331031c346e9189c27
|
P e0c1a780f5a356c48b2a4cc66fab988fe441722f
|
||||||
R bd78ffb4482bff31a318e650753900a9
|
R 296c5be54eca157c79928abcd498e13b
|
||||||
U drh
|
U drh
|
||||||
Z 65e49db46664fd71c4cc25be1e95b592
|
Z 399a97baf64ccdeed33e787dae76324d
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
e0c1a780f5a356c48b2a4cc66fab988fe441722f
|
286e83178ddcd2efe2888697bcf8cc95ccdef880
|
||||||
18
src/parse.y
18
src/parse.y
@@ -14,7 +14,7 @@
|
|||||||
** the parser. Lemon will also generate a header file containing
|
** the parser. Lemon will also generate a header file containing
|
||||||
** numeric codes for all of the tokens.
|
** 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_"
|
// 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_PARSER
|
||||||
%ifndef SQLITE_OMIT_PRAGMA
|
%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) 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). {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) 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) ::= plus_num(X). {A = X;}
|
||||||
nmnum(A) ::= nm(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_PRAGMA
|
||||||
%endif SQLITE_OMIT_PARSER
|
%endif SQLITE_OMIT_PARSER
|
||||||
plus_num(A) ::= plus_opt number(X). {A = X;}
|
plus_num(A) ::= plus_opt number(X). {A = X;}
|
||||||
|
|||||||
Reference in New Issue
Block a user