diff options
author | drh <drh@noemail.net> | 2006-06-13 15:37:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-06-13 15:37:26 +0000 |
commit | 03bea70cd83be4cf43f122f413c51afaad0b7913 (patch) | |
tree | 2e3072d5a3dd7e53587e999038c8c8c66190f968 /src | |
parent | 5dc1aaa9d135cd96b661d6f0491cdbe34377194c (diff) | |
download | sqlite-03bea70cd83be4cf43f122f413c51afaad0b7913.tar.gz sqlite-03bea70cd83be4cf43f122f413c51afaad0b7913.zip |
Add support for the MATCH operator. (CVS 3231)
FossilOrigin-Name: 815b84d5273b42978edcee0d4afe7f91a7933f4e
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y index ce3a69dba..9b760ecb1 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.202 2006/06/11 23:41:55 drh Exp $ +** @(#) $Id: parse.y,v 1.203 2006/06/13 15:37:26 drh Exp $ */ // All token codes are small integers with #defines that begin with "TK_" @@ -198,7 +198,7 @@ id(A) ::= ID(X). {A = X;} %left OR. %left AND. %right NOT. -%left IS LIKE_KW BETWEEN IN ISNULL NOTNULL NE EQ. +%left IS MATCH LIKE_KW BETWEEN IN ISNULL NOTNULL NE EQ. %left GT LE LT GE. %right ESCAPE. %left BITAND BITOR LSHIFT RSHIFT. @@ -690,6 +690,8 @@ expr(A) ::= expr(X) CONCAT(OP) expr(Y). {A = sqlite3Expr(@OP, X, Y, 0);} %type likeop {struct LikeOp} likeop(A) ::= LIKE_KW(X). {A.eOperator = X; A.not = 0;} likeop(A) ::= NOT LIKE_KW(X). {A.eOperator = X; A.not = 1;} +likeop(A) ::= MATCH(X). {A.eOperator = X; A.not = 0;} +likeop(A) ::= NOT MATCH(X). {A.eOperator = X; A.not = 1;} %type escape {Expr*} %destructor escape {sqlite3ExprDelete($$);} escape(X) ::= ESCAPE expr(A). [ESCAPE] {X = A;} |