diff options
author | drh <> | 2024-11-18 16:44:26 +0000 |
---|---|---|
committer | drh <> | 2024-11-18 16:44:26 +0000 |
commit | 5cad859f61145644513cdf901afbb8d88dcc9b9b (patch) | |
tree | e948dd51ca96b20fefb0190aa728c0029e92eba0 /src | |
parent | 0df847cc776131919935658230fe2e629906dabb (diff) | |
download | sqlite-5cad859f61145644513cdf901afbb8d88dcc9b9b.tar.gz sqlite-5cad859f61145644513cdf901afbb8d88dcc9b9b.zip |
Attempt to reduce divergence with begin-concurrent.
FossilOrigin-Name: f783d90187fb326faa3d0244b30138b023c4a8483486f260b7a022a927c13f3a
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.y | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y index 8fdea9bfa..b8d904d12 100644 --- a/src/parse.y +++ b/src/parse.y @@ -43,7 +43,7 @@ %syntax_error { UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ if( TOKEN.z[0] ){ - sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); + parserSyntaxError(pParse, &TOKEN); }else{ sqlite3ErrorMsg(pParse, "incomplete input"); } @@ -112,6 +112,13 @@ struct TrigEvent { int a; IdList * b; }; struct FrameBound { int eType; Expr *pExpr; }; /* +** Generate a syntax error +*/ +static void parserSyntaxError(Parse *pParse, Token *p){ + sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", p); +} + +/* ** Disable lookaside memory allocation for objects that might be ** shared across database connections. */ @@ -1156,7 +1163,7 @@ expr(A) ::= VARIABLE(X). { Token t = X; /*A-overwrites-X*/ assert( t.n>=2 ); if( pParse->nested==0 ){ - sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t); + parserSyntaxError(pParse, &t); A = 0; }else{ A = sqlite3PExpr(pParse, TK_REGISTER, 0, 0); |