Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: third_party/sqlite/src/ext/fts5/fts5parse.y

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/fts5/fts5_vocab.c ('k') | third_party/sqlite/src/ext/fts5/test/fts5_common.tcl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/fts5/fts5parse.y
diff --git a/third_party/sqlite/src/ext/fts5/fts5parse.y b/third_party/sqlite/src/ext/fts5/fts5parse.y
index 0e81771b4f1bf2184e459c6e7b9503107eee5fee..1cc4b88e18de6b8e564a097d789d8ca52bf63129 100644
--- a/third_party/sqlite/src/ext/fts5/fts5parse.y
+++ b/third_party/sqlite/src/ext/fts5/fts5parse.y
@@ -28,12 +28,13 @@
// This code runs whenever there is a syntax error
//
%syntax_error {
+ UNUSED_PARAM(yymajor); /* Silence a compiler warning */
sqlite3Fts5ParseError(
pParse, "fts5: syntax error near \"%.*s\"",TOKEN.n,TOKEN.p
);
}
%stack_overflow {
- assert( 0 );
+ sqlite3Fts5ParseError(pParse, "fts5: parser stack overflow");
}
// The name of the generated procedure that implements the parser
@@ -103,7 +104,7 @@ expr(A) ::= exprlist(X). {A = X;}
exprlist(A) ::= cnearset(X). {A = X;}
exprlist(A) ::= exprlist(X) cnearset(Y). {
- A = sqlite3Fts5ParseNode(pParse, FTS5_AND, X, Y, 0);
+ A = sqlite3Fts5ParseImplicitAnd(pParse, X, Y);
}
cnearset(A) ::= nearset(X). {
@@ -119,10 +120,17 @@ cnearset(A) ::= colset(X) COLON nearset(Y). {
%type colsetlist {Fts5Colset*}
%destructor colsetlist { sqlite3_free($$); }
+colset(A) ::= MINUS LCP colsetlist(X) RCP. {
+ A = sqlite3Fts5ParseColsetInvert(pParse, X);
+}
colset(A) ::= LCP colsetlist(X) RCP. { A = X; }
colset(A) ::= STRING(X). {
A = sqlite3Fts5ParseColset(pParse, 0, &X);
}
+colset(A) ::= MINUS STRING(X). {
+ A = sqlite3Fts5ParseColset(pParse, 0, &X);
+ A = sqlite3Fts5ParseColsetInvert(pParse, A);
+}
colsetlist(A) ::= colsetlist(Y) STRING(X). {
A = sqlite3Fts5ParseColset(pParse, Y, &X); }
@@ -130,7 +138,6 @@ colsetlist(A) ::= STRING(X). {
A = sqlite3Fts5ParseColset(pParse, 0, &X);
}
-
%type nearset {Fts5ExprNearset*}
%type nearphrases {Fts5ExprNearset*}
%destructor nearset { sqlite3Fts5ParseNearsetFree($$); }
« no previous file with comments | « third_party/sqlite/src/ext/fts5/fts5_vocab.c ('k') | third_party/sqlite/src/ext/fts5/test/fts5_common.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698