mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
6024 lines
246 KiB
C
6024 lines
246 KiB
C
/* This file is automatically generated by Lemon from input grammar
|
|
** source file "parse.y". */
|
|
/*
|
|
** 2001-09-15
|
|
**
|
|
** The author disclaims copyright to this source code. In place of
|
|
** a legal notice, here is a blessing:
|
|
**
|
|
** May you do good and not evil.
|
|
** May you find forgiveness for yourself and forgive others.
|
|
** May you share freely, never taking more than you give.
|
|
**
|
|
*************************************************************************
|
|
** This file contains SQLite's SQL parser.
|
|
**
|
|
** The canonical source code to this file ("parse.y") is a Lemon grammar
|
|
** file that specifies the input grammar and actions to take while parsing.
|
|
** That input file is processed by Lemon to generate a C-language
|
|
** implementation of a parser for the given grammer. You might be reading
|
|
** this comment as part of the translated C-code. Edits should be made
|
|
** to the original parse.y sources.
|
|
*/
|
|
#line 58 "parse.y"
|
|
|
|
#include "third_party/sqlite3/sqliteInt.h"
|
|
|
|
/*
|
|
** Disable all error recovery processing in the parser push-down
|
|
** automaton.
|
|
*/
|
|
#define YYNOERRORRECOVERY 1
|
|
|
|
/*
|
|
** Make yytestcase() the same as testcase()
|
|
*/
|
|
#define yytestcase(X) testcase(X)
|
|
|
|
/*
|
|
** Indicate that sqlite3ParserFree() will never be called with a null
|
|
** pointer.
|
|
*/
|
|
#define YYPARSEFREENEVERNULL 1
|
|
|
|
/*
|
|
** In the amalgamation, the parse.c file generated by lemon and the
|
|
** tokenize.c file are concatenated. In that case, sqlite3RunParser()
|
|
** has access to the the size of the yyParser object and so the parser
|
|
** engine can be allocated from stack. In that case, only the
|
|
** sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked
|
|
** and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be
|
|
** omitted.
|
|
*/
|
|
#ifdef SQLITE_AMALGAMATION
|
|
# define sqlite3Parser_ENGINEALWAYSONSTACK 1
|
|
#endif
|
|
|
|
/*
|
|
** Alternative datatype for the argument to the malloc() routine passed
|
|
** into sqlite3ParserAlloc(). The default is size_t.
|
|
*/
|
|
#define YYMALLOCARGTYPE u64
|
|
|
|
/*
|
|
** An instance of the following structure describes the event of a
|
|
** TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT,
|
|
** TK_DELETE, or TK_INSTEAD. If the event is of the form
|
|
**
|
|
** UPDATE ON (a,b,c)
|
|
**
|
|
** Then the "b" IdList records the list "a,b,c".
|
|
*/
|
|
struct TrigEvent { int a; IdList * b; };
|
|
|
|
struct FrameBound { int eType; Expr *pExpr; };
|
|
|
|
/*
|
|
** Disable lookaside memory allocation for objects that might be
|
|
** shared across database connections.
|
|
*/
|
|
static void disableLookaside(Parse *pParse){
|
|
sqlite3 *db = pParse->db;
|
|
pParse->disableLookaside++;
|
|
DisableLookaside;
|
|
}
|
|
|
|
#if !defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) \
|
|
&& defined(SQLITE_UDL_CAPABLE_PARSER)
|
|
/*
|
|
** Issue an error message if an ORDER BY or LIMIT clause occurs on an
|
|
** UPDATE or DELETE statement.
|
|
*/
|
|
static void updateDeleteLimitError(
|
|
Parse *pParse,
|
|
ExprList *pOrderBy,
|
|
Expr *pLimit
|
|
){
|
|
if( pOrderBy ){
|
|
sqlite3ErrorMsg(pParse, "syntax error near \"ORDER BY\"");
|
|
}else{
|
|
sqlite3ErrorMsg(pParse, "syntax error near \"LIMIT\"");
|
|
}
|
|
sqlite3ExprListDelete(pParse->db, pOrderBy);
|
|
sqlite3ExprDelete(pParse->db, pLimit);
|
|
}
|
|
#endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */
|
|
|
|
#line 502 "parse.y"
|
|
|
|
/*
|
|
** For a compound SELECT statement, make sure p->pPrior->pNext==p for
|
|
** all elements in the list. And make sure list length does not exceed
|
|
** SQLITE_LIMIT_COMPOUND_SELECT.
|
|
*/
|
|
static void parserDoubleLinkSelect(Parse *pParse, Select *p){
|
|
assert( p!=0 );
|
|
if( p->pPrior ){
|
|
Select *pNext = 0, *pLoop = p;
|
|
int mxSelect, cnt = 1;
|
|
while(1){
|
|
pLoop->pNext = pNext;
|
|
pLoop->selFlags |= SF_Compound;
|
|
pNext = pLoop;
|
|
pLoop = pLoop->pPrior;
|
|
if( pLoop==0 ) break;
|
|
cnt++;
|
|
if( pLoop->pOrderBy || pLoop->pLimit ){
|
|
sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
|
|
pLoop->pOrderBy!=0 ? "ORDER BY" : "LIMIT",
|
|
sqlite3SelectOpName(pNext->op));
|
|
break;
|
|
}
|
|
}
|
|
if( (p->selFlags & SF_MultiValue)==0 &&
|
|
(mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 &&
|
|
cnt>mxSelect
|
|
){
|
|
sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Attach a With object describing the WITH clause to a Select
|
|
** object describing the query for which the WITH clause is a prefix.
|
|
*/
|
|
static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
|
|
if( pSelect ){
|
|
pSelect->pWith = pWith;
|
|
parserDoubleLinkSelect(pParse, pSelect);
|
|
}else{
|
|
sqlite3WithDelete(pParse->db, pWith);
|
|
}
|
|
return pSelect;
|
|
}
|
|
#line 1047 "parse.y"
|
|
|
|
|
|
/* Construct a new Expr object from a single token */
|
|
static Expr *tokenExpr(Parse *pParse, int op, Token t){
|
|
Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
|
|
if( p ){
|
|
/* memset(p, 0, sizeof(Expr)); */
|
|
p->op = (u8)op;
|
|
p->affExpr = 0;
|
|
p->flags = EP_Leaf;
|
|
ExprClearVVAProperties(p);
|
|
/* p->iAgg = -1; // Not required */
|
|
p->pLeft = p->pRight = 0;
|
|
p->pAggInfo = 0;
|
|
memset(&p->x, 0, sizeof(p->x));
|
|
memset(&p->y, 0, sizeof(p->y));
|
|
p->op2 = 0;
|
|
p->iTable = 0;
|
|
p->iColumn = 0;
|
|
p->u.zToken = (char*)&p[1];
|
|
memcpy(p->u.zToken, t.z, t.n);
|
|
p->u.zToken[t.n] = 0;
|
|
p->w.iOfst = (int)(t.z - pParse->zTail);
|
|
if( sqlite3Isquote(p->u.zToken[0]) ){
|
|
sqlite3DequoteExpr(p);
|
|
}
|
|
#if SQLITE_MAX_EXPR_DEPTH>0
|
|
p->nHeight = 1;
|
|
#endif
|
|
if( IN_RENAME_OBJECT ){
|
|
return (Expr*)sqlite3RenameTokenMap(pParse, (void*)p, &t);
|
|
}
|
|
}
|
|
return p;
|
|
}
|
|
|
|
#line 1216 "parse.y"
|
|
|
|
/* A routine to convert a binary TK_IS or TK_ISNOT expression into a
|
|
** unary TK_ISNULL or TK_NOTNULL expression. */
|
|
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
|
|
sqlite3 *db = pParse->db;
|
|
if( pA && pY && pY->op==TK_NULL && !IN_RENAME_OBJECT ){
|
|
pA->op = (u8)op;
|
|
sqlite3ExprDelete(db, pA->pRight);
|
|
pA->pRight = 0;
|
|
}
|
|
}
|
|
#line 1437 "parse.y"
|
|
|
|
/* Add a single new term to an ExprList that is used to store a
|
|
** list of identifiers. Report an error if the ID list contains
|
|
** a COLLATE clause or an ASC or DESC keyword, except ignore the
|
|
** error while parsing a legacy schema.
|
|
*/
|
|
static ExprList *parserAddExprIdListTerm(
|
|
Parse *pParse,
|
|
ExprList *pPrior,
|
|
Token *pIdToken,
|
|
int hasCollate,
|
|
int sortOrder
|
|
){
|
|
ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);
|
|
if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)
|
|
&& pParse->db->init.busy==0
|
|
){
|
|
sqlite3ErrorMsg(pParse, "syntax error after column name \"%.*s\"",
|
|
pIdToken->n, pIdToken->z);
|
|
}
|
|
sqlite3ExprListSetName(pParse, p, pIdToken, 1);
|
|
return p;
|
|
}
|
|
#line 1916 "parse.y"
|
|
|
|
#if TK_SPAN>255
|
|
# error too many tokens in the grammar
|
|
#endif
|
|
#line 258 "parse.c"
|
|
/**************** End of %include directives **********************************/
|
|
/* These constants specify the various numeric values for terminal symbols.
|
|
***************** Begin token definitions *************************************/
|
|
#ifndef TK_SEMI
|
|
#define TK_SEMI 1
|
|
#define TK_EXPLAIN 2
|
|
#define TK_QUERY 3
|
|
#define TK_PLAN 4
|
|
#define TK_BEGIN 5
|
|
#define TK_TRANSACTION 6
|
|
#define TK_DEFERRED 7
|
|
#define TK_IMMEDIATE 8
|
|
#define TK_EXCLUSIVE 9
|
|
#define TK_COMMIT 10
|
|
#define TK_END 11
|
|
#define TK_ROLLBACK 12
|
|
#define TK_SAVEPOINT 13
|
|
#define TK_RELEASE 14
|
|
#define TK_TO 15
|
|
#define TK_TABLE 16
|
|
#define TK_CREATE 17
|
|
#define TK_IF 18
|
|
#define TK_NOT 19
|
|
#define TK_EXISTS 20
|
|
#define TK_TEMP 21
|
|
#define TK_LP 22
|
|
#define TK_RP 23
|
|
#define TK_AS 24
|
|
#define TK_COMMA 25
|
|
#define TK_WITHOUT 26
|
|
#define TK_ABORT 27
|
|
#define TK_ACTION 28
|
|
#define TK_AFTER 29
|
|
#define TK_ANALYZE 30
|
|
#define TK_ASC 31
|
|
#define TK_ATTACH 32
|
|
#define TK_BEFORE 33
|
|
#define TK_BY 34
|
|
#define TK_CASCADE 35
|
|
#define TK_CAST 36
|
|
#define TK_CONFLICT 37
|
|
#define TK_DATABASE 38
|
|
#define TK_DESC 39
|
|
#define TK_DETACH 40
|
|
#define TK_EACH 41
|
|
#define TK_FAIL 42
|
|
#define TK_OR 43
|
|
#define TK_AND 44
|
|
#define TK_IS 45
|
|
#define TK_MATCH 46
|
|
#define TK_LIKE_KW 47
|
|
#define TK_BETWEEN 48
|
|
#define TK_IN 49
|
|
#define TK_ISNULL 50
|
|
#define TK_NOTNULL 51
|
|
#define TK_NE 52
|
|
#define TK_EQ 53
|
|
#define TK_GT 54
|
|
#define TK_LE 55
|
|
#define TK_LT 56
|
|
#define TK_GE 57
|
|
#define TK_ESCAPE 58
|
|
#define TK_ID 59
|
|
#define TK_COLUMNKW 60
|
|
#define TK_DO 61
|
|
#define TK_FOR 62
|
|
#define TK_IGNORE 63
|
|
#define TK_INITIALLY 64
|
|
#define TK_INSTEAD 65
|
|
#define TK_NO 66
|
|
#define TK_KEY 67
|
|
#define TK_OF 68
|
|
#define TK_OFFSET 69
|
|
#define TK_PRAGMA 70
|
|
#define TK_RAISE 71
|
|
#define TK_RECURSIVE 72
|
|
#define TK_REPLACE 73
|
|
#define TK_RESTRICT 74
|
|
#define TK_ROW 75
|
|
#define TK_ROWS 76
|
|
#define TK_TRIGGER 77
|
|
#define TK_VACUUM 78
|
|
#define TK_VIEW 79
|
|
#define TK_VIRTUAL 80
|
|
#define TK_WITH 81
|
|
#define TK_NULLS 82
|
|
#define TK_FIRST 83
|
|
#define TK_LAST 84
|
|
#define TK_CURRENT 85
|
|
#define TK_FOLLOWING 86
|
|
#define TK_PARTITION 87
|
|
#define TK_PRECEDING 88
|
|
#define TK_RANGE 89
|
|
#define TK_UNBOUNDED 90
|
|
#define TK_EXCLUDE 91
|
|
#define TK_GROUPS 92
|
|
#define TK_OTHERS 93
|
|
#define TK_TIES 94
|
|
#define TK_GENERATED 95
|
|
#define TK_ALWAYS 96
|
|
#define TK_MATERIALIZED 97
|
|
#define TK_REINDEX 98
|
|
#define TK_RENAME 99
|
|
#define TK_CTIME_KW 100
|
|
#define TK_ANY 101
|
|
#define TK_BITAND 102
|
|
#define TK_BITOR 103
|
|
#define TK_LSHIFT 104
|
|
#define TK_RSHIFT 105
|
|
#define TK_PLUS 106
|
|
#define TK_MINUS 107
|
|
#define TK_STAR 108
|
|
#define TK_SLASH 109
|
|
#define TK_REM 110
|
|
#define TK_CONCAT 111
|
|
#define TK_PTR 112
|
|
#define TK_COLLATE 113
|
|
#define TK_BITNOT 114
|
|
#define TK_ON 115
|
|
#define TK_INDEXED 116
|
|
#define TK_STRING 117
|
|
#define TK_JOIN_KW 118
|
|
#define TK_CONSTRAINT 119
|
|
#define TK_DEFAULT 120
|
|
#define TK_NULL 121
|
|
#define TK_PRIMARY 122
|
|
#define TK_UNIQUE 123
|
|
#define TK_CHECK 124
|
|
#define TK_REFERENCES 125
|
|
#define TK_AUTOINCR 126
|
|
#define TK_INSERT 127
|
|
#define TK_DELETE 128
|
|
#define TK_UPDATE 129
|
|
#define TK_SET 130
|
|
#define TK_DEFERRABLE 131
|
|
#define TK_FOREIGN 132
|
|
#define TK_DROP 133
|
|
#define TK_UNION 134
|
|
#define TK_ALL 135
|
|
#define TK_EXCEPT 136
|
|
#define TK_INTERSECT 137
|
|
#define TK_SELECT 138
|
|
#define TK_VALUES 139
|
|
#define TK_DISTINCT 140
|
|
#define TK_DOT 141
|
|
#define TK_FROM 142
|
|
#define TK_JOIN 143
|
|
#define TK_USING 144
|
|
#define TK_ORDER 145
|
|
#define TK_GROUP 146
|
|
#define TK_HAVING 147
|
|
#define TK_LIMIT 148
|
|
#define TK_WHERE 149
|
|
#define TK_RETURNING 150
|
|
#define TK_INTO 151
|
|
#define TK_NOTHING 152
|
|
#define TK_FLOAT 153
|
|
#define TK_BLOB 154
|
|
#define TK_INTEGER 155
|
|
#define TK_VARIABLE 156
|
|
#define TK_CASE 157
|
|
#define TK_WHEN 158
|
|
#define TK_THEN 159
|
|
#define TK_ELSE 160
|
|
#define TK_INDEX 161
|
|
#define TK_ALTER 162
|
|
#define TK_ADD 163
|
|
#define TK_WINDOW 164
|
|
#define TK_OVER 165
|
|
#define TK_FILTER 166
|
|
#define TK_COLUMN 167
|
|
#define TK_AGG_FUNCTION 168
|
|
#define TK_AGG_COLUMN 169
|
|
#define TK_TRUEFALSE 170
|
|
#define TK_ISNOT 171
|
|
#define TK_FUNCTION 172
|
|
#define TK_UMINUS 173
|
|
#define TK_UPLUS 174
|
|
#define TK_TRUTH 175
|
|
#define TK_REGISTER 176
|
|
#define TK_VECTOR 177
|
|
#define TK_SELECT_COLUMN 178
|
|
#define TK_IF_NULL_ROW 179
|
|
#define TK_ASTERISK 180
|
|
#define TK_SPAN 181
|
|
#define TK_ERROR 182
|
|
#define TK_SPACE 183
|
|
#define TK_ILLEGAL 184
|
|
#endif
|
|
/**************** End token definitions ***************************************/
|
|
|
|
/* The next sections is a series of control #defines.
|
|
** various aspects of the generated parser.
|
|
** YYCODETYPE is the data type used to store the integer codes
|
|
** that represent terminal and non-terminal symbols.
|
|
** "unsigned char" is used if there are fewer than
|
|
** 256 symbols. Larger types otherwise.
|
|
** YYNOCODE is a number of type YYCODETYPE that is not used for
|
|
** any terminal or nonterminal symbol.
|
|
** YYFALLBACK If defined, this indicates that one or more tokens
|
|
** (also known as: "terminal symbols") have fall-back
|
|
** values which should be used if the original symbol
|
|
** would not parse. This permits keywords to sometimes
|
|
** be used as identifiers, for example.
|
|
** YYACTIONTYPE is the data type used for "action codes" - numbers
|
|
** that indicate what to do in response to the next
|
|
** token.
|
|
** sqlite3ParserTOKENTYPE is the data type used for minor type for terminal
|
|
** symbols. Background: A "minor type" is a semantic
|
|
** value associated with a terminal or non-terminal
|
|
** symbols. For example, for an "ID" terminal symbol,
|
|
** the minor type might be the name of the identifier.
|
|
** Each non-terminal can have a different minor type.
|
|
** Terminal symbols all have the same minor type, though.
|
|
** This macros defines the minor type for terminal
|
|
** symbols.
|
|
** YYMINORTYPE is the data type used for all minor types.
|
|
** This is typically a union of many types, one of
|
|
** which is sqlite3ParserTOKENTYPE. The entry in the union
|
|
** for terminal symbols is called "yy0".
|
|
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
|
|
** zero the stack is dynamically sized using realloc()
|
|
** sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument
|
|
** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
|
|
** sqlite3ParserARG_PARAM Code to pass %extra_argument as a subroutine parameter
|
|
** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
|
|
** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
|
|
** sqlite3ParserCTX_* As sqlite3ParserARG_ except for %extra_context
|
|
** YYERRORSYMBOL is the code number of the error symbol. If not
|
|
** defined, then do no error processing.
|
|
** YYNSTATE the combined number of states.
|
|
** YYNRULE the number of rules in the grammar
|
|
** YYNTOKEN Number of terminal symbols
|
|
** YY_MAX_SHIFT Maximum value for shift actions
|
|
** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
|
|
** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
|
|
** YY_ERROR_ACTION The yy_action[] code for syntax error
|
|
** YY_ACCEPT_ACTION The yy_action[] code for accept
|
|
** YY_NO_ACTION The yy_action[] code for no-op
|
|
** YY_MIN_REDUCE Minimum value for reduce actions
|
|
** YY_MAX_REDUCE Maximum value for reduce actions
|
|
*/
|
|
#ifndef INTERFACE
|
|
# define INTERFACE 1
|
|
#endif
|
|
/************* Begin control #defines *****************************************/
|
|
#define YYCODETYPE unsigned short int
|
|
#define YYNOCODE 319
|
|
#define YYACTIONTYPE unsigned short int
|
|
#define YYWILDCARD 101
|
|
#define sqlite3ParserTOKENTYPE Token
|
|
typedef union {
|
|
int yyinit;
|
|
sqlite3ParserTOKENTYPE yy0;
|
|
TriggerStep* yy33;
|
|
Window* yy41;
|
|
Select* yy47;
|
|
SrcList* yy131;
|
|
struct TrigEvent yy180;
|
|
struct {int value; int mask;} yy231;
|
|
IdList* yy254;
|
|
u32 yy285;
|
|
ExprList* yy322;
|
|
Cte* yy385;
|
|
int yy394;
|
|
Upsert* yy444;
|
|
u8 yy516;
|
|
With* yy521;
|
|
const char* yy522;
|
|
Expr* yy528;
|
|
OnOrUsing yy561;
|
|
struct FrameBound yy595;
|
|
} YYMINORTYPE;
|
|
#ifndef YYSTACKDEPTH
|
|
#define YYSTACKDEPTH 100
|
|
#endif
|
|
#define sqlite3ParserARG_SDECL
|
|
#define sqlite3ParserARG_PDECL
|
|
#define sqlite3ParserARG_PARAM
|
|
#define sqlite3ParserARG_FETCH
|
|
#define sqlite3ParserARG_STORE
|
|
#define sqlite3ParserCTX_SDECL Parse *pParse;
|
|
#define sqlite3ParserCTX_PDECL ,Parse *pParse
|
|
#define sqlite3ParserCTX_PARAM ,pParse
|
|
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
|
|
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
|
|
#define YYFALLBACK 1
|
|
#define YYNSTATE 576
|
|
#define YYNRULE 405
|
|
#define YYNRULE_WITH_ACTION 342
|
|
#define YYNTOKEN 185
|
|
#define YY_MAX_SHIFT 575
|
|
#define YY_MIN_SHIFTREDUCE 835
|
|
#define YY_MAX_SHIFTREDUCE 1239
|
|
#define YY_ERROR_ACTION 1240
|
|
#define YY_ACCEPT_ACTION 1241
|
|
#define YY_NO_ACTION 1242
|
|
#define YY_MIN_REDUCE 1243
|
|
#define YY_MAX_REDUCE 1647
|
|
/************* End control #defines *******************************************/
|
|
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
|
|
|
|
/* Define the yytestcase() macro to be a no-op if is not already defined
|
|
** otherwise.
|
|
**
|
|
** Applications can choose to define yytestcase() in the %include section
|
|
** to a macro that can assist in verifying code coverage. For production
|
|
** code the yytestcase() macro should be turned off. But it is useful
|
|
** for testing.
|
|
*/
|
|
#ifndef yytestcase
|
|
# define yytestcase(X)
|
|
#endif
|
|
|
|
|
|
/* Next are the tables used to determine what action to take based on the
|
|
** current state and lookahead token. These tables are used to implement
|
|
** functions that take a state number and lookahead value and return an
|
|
** action integer.
|
|
**
|
|
** Suppose the action integer is N. Then the action is determined as
|
|
** follows
|
|
**
|
|
** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead
|
|
** token onto the stack and goto state N.
|
|
**
|
|
** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
|
|
** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
|
|
**
|
|
** N == YY_ERROR_ACTION A syntax error has occurred.
|
|
**
|
|
** N == YY_ACCEPT_ACTION The parser accepts its input.
|
|
**
|
|
** N == YY_NO_ACTION No such action. Denotes unused
|
|
** slots in the yy_action[] table.
|
|
**
|
|
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
|
|
** and YY_MAX_REDUCE
|
|
**
|
|
** The action table is constructed as a single large table named yy_action[].
|
|
** Given state S and lookahead X, the action is computed as either:
|
|
**
|
|
** (A) N = yy_action[ yy_shift_ofst[S] + X ]
|
|
** (B) N = yy_default[S]
|
|
**
|
|
** The (A) formula is preferred. The B formula is used instead if
|
|
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
|
|
**
|
|
** The formulas above are for computing the action when the lookahead is
|
|
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
|
|
** a reduce action) then the yy_reduce_ofst[] array is used in place of
|
|
** the yy_shift_ofst[] array.
|
|
**
|
|
** The following are the tables generated in this section:
|
|
**
|
|
** yy_action[] A single table containing all actions.
|
|
** yy_lookahead[] A table containing the lookahead for each entry in
|
|
** yy_action. Used to detect hash collisions.
|
|
** yy_shift_ofst[] For each state, the offset into yy_action for
|
|
** shifting terminals.
|
|
** yy_reduce_ofst[] For each state, the offset into yy_action for
|
|
** shifting non-terminals after a reduce.
|
|
** yy_default[] Default action for each state.
|
|
**
|
|
*********** Begin parsing tables **********************************************/
|
|
#define YY_ACTTAB_COUNT (2098)
|
|
static const YYACTIONTYPE yy_action[] = {
|
|
/* 0 */ 568, 208, 568, 118, 115, 229, 568, 118, 115, 229,
|
|
/* 10 */ 568, 1314, 377, 1293, 408, 562, 562, 562, 568, 409,
|
|
/* 20 */ 378, 1314, 1276, 41, 41, 41, 41, 208, 1526, 71,
|
|
/* 30 */ 71, 971, 419, 41, 41, 491, 303, 279, 303, 972,
|
|
/* 40 */ 397, 71, 71, 125, 126, 80, 1217, 1217, 1050, 1053,
|
|
/* 50 */ 1040, 1040, 123, 123, 124, 124, 124, 124, 476, 409,
|
|
/* 60 */ 1241, 1, 1, 575, 2, 1245, 550, 118, 115, 229,
|
|
/* 70 */ 317, 480, 146, 480, 524, 118, 115, 229, 529, 1327,
|
|
/* 80 */ 417, 523, 142, 125, 126, 80, 1217, 1217, 1050, 1053,
|
|
/* 90 */ 1040, 1040, 123, 123, 124, 124, 124, 124, 118, 115,
|
|
/* 100 */ 229, 327, 122, 122, 122, 122, 121, 121, 120, 120,
|
|
/* 110 */ 120, 119, 116, 444, 284, 284, 284, 284, 442, 442,
|
|
/* 120 */ 442, 1567, 376, 1569, 1192, 375, 1163, 565, 1163, 565,
|
|
/* 130 */ 409, 1567, 537, 259, 226, 444, 101, 145, 449, 316,
|
|
/* 140 */ 559, 240, 122, 122, 122, 122, 121, 121, 120, 120,
|
|
/* 150 */ 120, 119, 116, 444, 125, 126, 80, 1217, 1217, 1050,
|
|
/* 160 */ 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, 142,
|
|
/* 170 */ 294, 1192, 339, 448, 120, 120, 120, 119, 116, 444,
|
|
/* 180 */ 127, 1192, 1193, 1194, 148, 441, 440, 568, 119, 116,
|
|
/* 190 */ 444, 124, 124, 124, 124, 117, 122, 122, 122, 122,
|
|
/* 200 */ 121, 121, 120, 120, 120, 119, 116, 444, 454, 113,
|
|
/* 210 */ 13, 13, 546, 122, 122, 122, 122, 121, 121, 120,
|
|
/* 220 */ 120, 120, 119, 116, 444, 422, 316, 559, 1192, 1193,
|
|
/* 230 */ 1194, 149, 1224, 409, 1224, 124, 124, 124, 124, 122,
|
|
/* 240 */ 122, 122, 122, 121, 121, 120, 120, 120, 119, 116,
|
|
/* 250 */ 444, 465, 342, 1037, 1037, 1051, 1054, 125, 126, 80,
|
|
/* 260 */ 1217, 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124,
|
|
/* 270 */ 124, 124, 1279, 522, 222, 1192, 568, 409, 224, 514,
|
|
/* 280 */ 175, 82, 83, 122, 122, 122, 122, 121, 121, 120,
|
|
/* 290 */ 120, 120, 119, 116, 444, 1007, 16, 16, 1192, 133,
|
|
/* 300 */ 133, 125, 126, 80, 1217, 1217, 1050, 1053, 1040, 1040,
|
|
/* 310 */ 123, 123, 124, 124, 124, 124, 122, 122, 122, 122,
|
|
/* 320 */ 121, 121, 120, 120, 120, 119, 116, 444, 1041, 546,
|
|
/* 330 */ 1192, 373, 1192, 1193, 1194, 252, 1434, 399, 504, 501,
|
|
/* 340 */ 500, 111, 560, 566, 4, 926, 926, 433, 499, 340,
|
|
/* 350 */ 460, 328, 360, 394, 1237, 1192, 1193, 1194, 563, 568,
|
|
/* 360 */ 122, 122, 122, 122, 121, 121, 120, 120, 120, 119,
|
|
/* 370 */ 116, 444, 284, 284, 369, 1580, 1607, 441, 440, 154,
|
|
/* 380 */ 409, 445, 71, 71, 1286, 565, 1221, 1192, 1193, 1194,
|
|
/* 390 */ 85, 1223, 271, 557, 543, 515, 1561, 568, 98, 1222,
|
|
/* 400 */ 6, 1278, 472, 142, 125, 126, 80, 1217, 1217, 1050,
|
|
/* 410 */ 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, 550,
|
|
/* 420 */ 13, 13, 1027, 507, 1224, 1192, 1224, 549, 109, 109,
|
|
/* 430 */ 222, 568, 1238, 175, 568, 427, 110, 197, 445, 570,
|
|
/* 440 */ 569, 430, 1552, 1017, 325, 551, 1192, 270, 287, 368,
|
|
/* 450 */ 510, 363, 509, 257, 71, 71, 543, 71, 71, 359,
|
|
/* 460 */ 316, 559, 1613, 122, 122, 122, 122, 121, 121, 120,
|
|
/* 470 */ 120, 120, 119, 116, 444, 1017, 1017, 1019, 1020, 27,
|
|
/* 480 */ 284, 284, 1192, 1193, 1194, 1158, 568, 1612, 409, 901,
|
|
/* 490 */ 190, 550, 356, 565, 550, 937, 533, 517, 1158, 516,
|
|
/* 500 */ 413, 1158, 552, 1192, 1193, 1194, 568, 544, 1554, 51,
|
|
/* 510 */ 51, 214, 125, 126, 80, 1217, 1217, 1050, 1053, 1040,
|
|
/* 520 */ 1040, 123, 123, 124, 124, 124, 124, 1192, 474, 135,
|
|
/* 530 */ 135, 409, 284, 284, 1490, 505, 121, 121, 120, 120,
|
|
/* 540 */ 120, 119, 116, 444, 1007, 565, 518, 217, 541, 1561,
|
|
/* 550 */ 316, 559, 142, 6, 532, 125, 126, 80, 1217, 1217,
|
|
/* 560 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124,
|
|
/* 570 */ 1555, 122, 122, 122, 122, 121, 121, 120, 120, 120,
|
|
/* 580 */ 119, 116, 444, 485, 1192, 1193, 1194, 482, 281, 1267,
|
|
/* 590 */ 957, 252, 1192, 373, 504, 501, 500, 1192, 340, 571,
|
|
/* 600 */ 1192, 571, 409, 292, 499, 957, 876, 191, 480, 316,
|
|
/* 610 */ 559, 384, 290, 380, 122, 122, 122, 122, 121, 121,
|
|
/* 620 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217,
|
|
/* 630 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 640 */ 124, 409, 394, 1136, 1192, 869, 100, 284, 284, 1192,
|
|
/* 650 */ 1193, 1194, 373, 1093, 1192, 1193, 1194, 1192, 1193, 1194,
|
|
/* 660 */ 565, 455, 32, 373, 233, 125, 126, 80, 1217, 1217,
|
|
/* 670 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124,
|
|
/* 680 */ 1433, 959, 568, 228, 958, 122, 122, 122, 122, 121,
|
|
/* 690 */ 121, 120, 120, 120, 119, 116, 444, 1158, 228, 1192,
|
|
/* 700 */ 157, 1192, 1193, 1194, 1553, 13, 13, 301, 957, 1232,
|
|
/* 710 */ 1158, 153, 409, 1158, 373, 1583, 1176, 5, 369, 1580,
|
|
/* 720 */ 429, 1238, 3, 957, 122, 122, 122, 122, 121, 121,
|
|
/* 730 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217,
|
|
/* 740 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 750 */ 124, 409, 208, 567, 1192, 1028, 1192, 1193, 1194, 1192,
|
|
/* 760 */ 388, 852, 155, 1552, 286, 402, 1098, 1098, 488, 568,
|
|
/* 770 */ 465, 342, 1319, 1319, 1552, 125, 126, 80, 1217, 1217,
|
|
/* 780 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124,
|
|
/* 790 */ 129, 568, 13, 13, 374, 122, 122, 122, 122, 121,
|
|
/* 800 */ 121, 120, 120, 120, 119, 116, 444, 302, 568, 453,
|
|
/* 810 */ 528, 1192, 1193, 1194, 13, 13, 1192, 1193, 1194, 1297,
|
|
/* 820 */ 463, 1267, 409, 1317, 1317, 1552, 1012, 453, 452, 200,
|
|
/* 830 */ 299, 71, 71, 1265, 122, 122, 122, 122, 121, 121,
|
|
/* 840 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217,
|
|
/* 850 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 860 */ 124, 409, 227, 1073, 1158, 284, 284, 419, 312, 278,
|
|
/* 870 */ 278, 285, 285, 1419, 406, 405, 382, 1158, 565, 568,
|
|
/* 880 */ 1158, 1196, 565, 1600, 565, 125, 126, 80, 1217, 1217,
|
|
/* 890 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124,
|
|
/* 900 */ 453, 1482, 13, 13, 1536, 122, 122, 122, 122, 121,
|
|
/* 910 */ 121, 120, 120, 120, 119, 116, 444, 201, 568, 354,
|
|
/* 920 */ 1586, 575, 2, 1245, 840, 841, 842, 1562, 317, 1212,
|
|
/* 930 */ 146, 6, 409, 255, 254, 253, 206, 1327, 9, 1196,
|
|
/* 940 */ 262, 71, 71, 424, 122, 122, 122, 122, 121, 121,
|
|
/* 950 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217,
|
|
/* 960 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 970 */ 124, 568, 284, 284, 568, 1213, 409, 574, 313, 1245,
|
|
/* 980 */ 349, 1296, 352, 419, 317, 565, 146, 491, 525, 1643,
|
|
/* 990 */ 395, 371, 491, 1327, 70, 70, 1295, 71, 71, 240,
|
|
/* 1000 */ 1325, 104, 80, 1217, 1217, 1050, 1053, 1040, 1040, 123,
|
|
/* 1010 */ 123, 124, 124, 124, 124, 122, 122, 122, 122, 121,
|
|
/* 1020 */ 121, 120, 120, 120, 119, 116, 444, 1114, 284, 284,
|
|
/* 1030 */ 428, 448, 1525, 1213, 439, 284, 284, 1489, 1352, 311,
|
|
/* 1040 */ 474, 565, 1115, 971, 491, 491, 217, 1263, 565, 1538,
|
|
/* 1050 */ 568, 972, 207, 568, 1027, 240, 383, 1116, 519, 122,
|
|
/* 1060 */ 122, 122, 122, 121, 121, 120, 120, 120, 119, 116,
|
|
/* 1070 */ 444, 1018, 107, 71, 71, 1017, 13, 13, 912, 568,
|
|
/* 1080 */ 1495, 568, 284, 284, 97, 526, 491, 448, 913, 1326,
|
|
/* 1090 */ 1322, 545, 409, 284, 284, 565, 151, 209, 1495, 1497,
|
|
/* 1100 */ 262, 450, 55, 55, 56, 56, 565, 1017, 1017, 1019,
|
|
/* 1110 */ 443, 332, 409, 527, 12, 295, 125, 126, 80, 1217,
|
|
/* 1120 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 1130 */ 124, 347, 409, 864, 1534, 1213, 125, 126, 80, 1217,
|
|
/* 1140 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 1150 */ 124, 1137, 1641, 474, 1641, 371, 125, 114, 80, 1217,
|
|
/* 1160 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124,
|
|
/* 1170 */ 124, 1495, 329, 474, 331, 122, 122, 122, 122, 121,
|
|
/* 1180 */ 121, 120, 120, 120, 119, 116, 444, 203, 1419, 568,
|
|
/* 1190 */ 1294, 864, 464, 1213, 436, 122, 122, 122, 122, 121,
|
|
/* 1200 */ 121, 120, 120, 120, 119, 116, 444, 553, 1137, 1642,
|
|
/* 1210 */ 539, 1642, 15, 15, 892, 122, 122, 122, 122, 121,
|
|
/* 1220 */ 121, 120, 120, 120, 119, 116, 444, 568, 298, 538,
|
|
/* 1230 */ 1135, 1419, 1559, 1560, 1331, 409, 6, 6, 1169, 1268,
|
|
/* 1240 */ 415, 320, 284, 284, 1419, 508, 565, 525, 300, 457,
|
|
/* 1250 */ 43, 43, 568, 893, 12, 565, 330, 478, 425, 407,
|
|
/* 1260 */ 126, 80, 1217, 1217, 1050, 1053, 1040, 1040, 123, 123,
|
|
/* 1270 */ 124, 124, 124, 124, 568, 57, 57, 288, 1192, 1419,
|
|
/* 1280 */ 496, 458, 392, 392, 391, 273, 389, 1135, 1558, 849,
|
|
/* 1290 */ 1169, 407, 6, 568, 321, 1158, 470, 44, 44, 1557,
|
|
/* 1300 */ 1114, 426, 234, 6, 323, 256, 540, 256, 1158, 431,
|
|
/* 1310 */ 568, 1158, 322, 17, 487, 1115, 58, 58, 122, 122,
|
|
/* 1320 */ 122, 122, 121, 121, 120, 120, 120, 119, 116, 444,
|
|
/* 1330 */ 1116, 216, 481, 59, 59, 1192, 1193, 1194, 111, 560,
|
|
/* 1340 */ 324, 4, 236, 456, 526, 568, 237, 456, 568, 437,
|
|
/* 1350 */ 168, 556, 420, 141, 479, 563, 568, 293, 568, 1095,
|
|
/* 1360 */ 568, 293, 568, 1095, 531, 568, 872, 8, 60, 60,
|
|
/* 1370 */ 235, 61, 61, 568, 414, 568, 414, 568, 445, 62,
|
|
/* 1380 */ 62, 45, 45, 46, 46, 47, 47, 199, 49, 49,
|
|
/* 1390 */ 557, 568, 359, 568, 100, 486, 50, 50, 63, 63,
|
|
/* 1400 */ 64, 64, 561, 415, 535, 410, 568, 1027, 568, 534,
|
|
/* 1410 */ 316, 559, 316, 559, 65, 65, 14, 14, 568, 1027,
|
|
/* 1420 */ 568, 512, 932, 872, 1018, 109, 109, 931, 1017, 66,
|
|
/* 1430 */ 66, 131, 131, 110, 451, 445, 570, 569, 416, 177,
|
|
/* 1440 */ 1017, 132, 132, 67, 67, 568, 467, 568, 932, 471,
|
|
/* 1450 */ 1364, 283, 226, 931, 315, 1363, 407, 568, 459, 407,
|
|
/* 1460 */ 1017, 1017, 1019, 239, 407, 86, 213, 1350, 52, 52,
|
|
/* 1470 */ 68, 68, 1017, 1017, 1019, 1020, 27, 1585, 1180, 447,
|
|
/* 1480 */ 69, 69, 288, 97, 108, 1541, 106, 392, 392, 391,
|
|
/* 1490 */ 273, 389, 568, 879, 849, 883, 568, 111, 560, 466,
|
|
/* 1500 */ 4, 568, 152, 30, 38, 568, 1132, 234, 396, 323,
|
|
/* 1510 */ 111, 560, 527, 4, 563, 53, 53, 322, 568, 163,
|
|
/* 1520 */ 163, 568, 337, 468, 164, 164, 333, 563, 76, 76,
|
|
/* 1530 */ 568, 289, 1514, 568, 31, 1513, 568, 445, 338, 483,
|
|
/* 1540 */ 100, 54, 54, 344, 72, 72, 296, 236, 1080, 557,
|
|
/* 1550 */ 445, 879, 1360, 134, 134, 168, 73, 73, 141, 161,
|
|
/* 1560 */ 161, 1574, 557, 535, 568, 319, 568, 348, 536, 1009,
|
|
/* 1570 */ 473, 261, 261, 891, 890, 235, 535, 568, 1027, 568,
|
|
/* 1580 */ 475, 534, 261, 367, 109, 109, 521, 136, 136, 130,
|
|
/* 1590 */ 130, 1027, 110, 366, 445, 570, 569, 109, 109, 1017,
|
|
/* 1600 */ 162, 162, 156, 156, 568, 110, 1080, 445, 570, 569,
|
|
/* 1610 */ 410, 351, 1017, 568, 353, 316, 559, 568, 343, 568,
|
|
/* 1620 */ 100, 497, 357, 258, 100, 898, 899, 140, 140, 355,
|
|
/* 1630 */ 1310, 1017, 1017, 1019, 1020, 27, 139, 139, 362, 451,
|
|
/* 1640 */ 137, 137, 138, 138, 1017, 1017, 1019, 1020, 27, 1180,
|
|
/* 1650 */ 447, 568, 372, 288, 111, 560, 1021, 4, 392, 392,
|
|
/* 1660 */ 391, 273, 389, 568, 1141, 849, 568, 1076, 568, 258,
|
|
/* 1670 */ 492, 563, 568, 211, 75, 75, 555, 962, 234, 261,
|
|
/* 1680 */ 323, 111, 560, 929, 4, 113, 77, 77, 322, 74,
|
|
/* 1690 */ 74, 42, 42, 1373, 445, 48, 48, 1418, 563, 974,
|
|
/* 1700 */ 975, 1092, 1091, 1092, 1091, 862, 557, 150, 930, 1346,
|
|
/* 1710 */ 113, 1358, 554, 1424, 1021, 1275, 1266, 1254, 236, 1253,
|
|
/* 1720 */ 1255, 445, 1593, 1343, 308, 276, 168, 309, 11, 141,
|
|
/* 1730 */ 393, 310, 232, 557, 1405, 1027, 335, 291, 1400, 219,
|
|
/* 1740 */ 336, 109, 109, 936, 297, 1410, 235, 341, 477, 110,
|
|
/* 1750 */ 502, 445, 570, 569, 1393, 1409, 1017, 400, 1293, 365,
|
|
/* 1760 */ 223, 1486, 1027, 1485, 1355, 1356, 1354, 1353, 109, 109,
|
|
/* 1770 */ 204, 1596, 1232, 558, 265, 218, 110, 205, 445, 570,
|
|
/* 1780 */ 569, 410, 387, 1017, 1533, 179, 316, 559, 1017, 1017,
|
|
/* 1790 */ 1019, 1020, 27, 230, 1531, 1229, 79, 560, 85, 4,
|
|
/* 1800 */ 418, 215, 548, 81, 84, 188, 1406, 173, 181, 461,
|
|
/* 1810 */ 451, 35, 462, 563, 183, 1017, 1017, 1019, 1020, 27,
|
|
/* 1820 */ 184, 1491, 185, 186, 495, 242, 98, 398, 1412, 36,
|
|
/* 1830 */ 1411, 484, 91, 469, 401, 1414, 445, 192, 1480, 246,
|
|
/* 1840 */ 1502, 490, 346, 277, 248, 196, 493, 511, 557, 350,
|
|
/* 1850 */ 1256, 249, 250, 403, 1313, 1312, 111, 560, 432, 4,
|
|
/* 1860 */ 1311, 1304, 93, 1611, 883, 1610, 224, 404, 434, 520,
|
|
/* 1870 */ 263, 435, 1579, 563, 1283, 1282, 364, 1027, 306, 1281,
|
|
/* 1880 */ 264, 1609, 1565, 109, 109, 370, 1303, 307, 1564, 438,
|
|
/* 1890 */ 128, 110, 1378, 445, 570, 569, 445, 546, 1017, 10,
|
|
/* 1900 */ 1466, 105, 381, 1377, 34, 572, 99, 1336, 557, 314,
|
|
/* 1910 */ 1186, 530, 272, 274, 379, 210, 1335, 547, 385, 386,
|
|
/* 1920 */ 275, 573, 1251, 1246, 411, 412, 1518, 165, 178, 1519,
|
|
/* 1930 */ 1017, 1017, 1019, 1020, 27, 1517, 1516, 1027, 78, 147,
|
|
/* 1940 */ 166, 220, 221, 109, 109, 836, 304, 167, 446, 212,
|
|
/* 1950 */ 318, 110, 231, 445, 570, 569, 144, 1090, 1017, 1088,
|
|
/* 1960 */ 326, 180, 169, 1212, 182, 334, 238, 915, 241, 1104,
|
|
/* 1970 */ 187, 170, 171, 421, 87, 88, 423, 189, 89, 90,
|
|
/* 1980 */ 172, 1107, 243, 1103, 244, 158, 18, 245, 345, 247,
|
|
/* 1990 */ 1017, 1017, 1019, 1020, 27, 261, 1096, 193, 1226, 489,
|
|
/* 2000 */ 194, 37, 366, 851, 494, 251, 195, 506, 92, 19,
|
|
/* 2010 */ 498, 358, 20, 503, 881, 361, 94, 894, 305, 159,
|
|
/* 2020 */ 513, 39, 95, 1174, 160, 1056, 966, 1143, 96, 174,
|
|
/* 2030 */ 1142, 225, 280, 282, 198, 960, 113, 1164, 1160, 260,
|
|
/* 2040 */ 21, 22, 23, 1162, 1168, 1167, 1148, 24, 33, 25,
|
|
/* 2050 */ 202, 542, 26, 100, 1071, 102, 1057, 103, 7, 1055,
|
|
/* 2060 */ 1059, 1113, 1060, 1112, 266, 267, 28, 40, 390, 1022,
|
|
/* 2070 */ 863, 112, 29, 564, 1182, 1181, 268, 176, 143, 925,
|
|
/* 2080 */ 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242,
|
|
/* 2090 */ 1242, 1242, 1242, 1242, 269, 1602, 1242, 1601,
|
|
};
|
|
static const YYCODETYPE yy_lookahead[] = {
|
|
/* 0 */ 193, 193, 193, 274, 275, 276, 193, 274, 275, 276,
|
|
/* 10 */ 193, 223, 219, 225, 206, 210, 211, 212, 193, 19,
|
|
/* 20 */ 219, 233, 216, 216, 217, 216, 217, 193, 295, 216,
|
|
/* 30 */ 217, 31, 193, 216, 217, 193, 228, 213, 230, 39,
|
|
/* 40 */ 206, 216, 217, 43, 44, 45, 46, 47, 48, 49,
|
|
/* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 193, 19,
|
|
/* 60 */ 185, 186, 187, 188, 189, 190, 253, 274, 275, 276,
|
|
/* 70 */ 195, 193, 197, 193, 261, 274, 275, 276, 253, 204,
|
|
/* 80 */ 238, 204, 81, 43, 44, 45, 46, 47, 48, 49,
|
|
/* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 274, 275,
|
|
/* 100 */ 276, 262, 102, 103, 104, 105, 106, 107, 108, 109,
|
|
/* 110 */ 110, 111, 112, 113, 239, 240, 239, 240, 210, 211,
|
|
/* 120 */ 212, 314, 315, 314, 59, 316, 86, 252, 88, 252,
|
|
/* 130 */ 19, 314, 315, 256, 257, 113, 25, 72, 296, 138,
|
|
/* 140 */ 139, 266, 102, 103, 104, 105, 106, 107, 108, 109,
|
|
/* 150 */ 110, 111, 112, 113, 43, 44, 45, 46, 47, 48,
|
|
/* 160 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 81,
|
|
/* 170 */ 292, 59, 292, 298, 108, 109, 110, 111, 112, 113,
|
|
/* 180 */ 69, 116, 117, 118, 72, 106, 107, 193, 111, 112,
|
|
/* 190 */ 113, 54, 55, 56, 57, 58, 102, 103, 104, 105,
|
|
/* 200 */ 106, 107, 108, 109, 110, 111, 112, 113, 120, 25,
|
|
/* 210 */ 216, 217, 145, 102, 103, 104, 105, 106, 107, 108,
|
|
/* 220 */ 109, 110, 111, 112, 113, 231, 138, 139, 116, 117,
|
|
/* 230 */ 118, 164, 153, 19, 155, 54, 55, 56, 57, 102,
|
|
/* 240 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
|
/* 250 */ 113, 128, 129, 46, 47, 48, 49, 43, 44, 45,
|
|
/* 260 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
|
|
/* 270 */ 56, 57, 216, 193, 25, 59, 193, 19, 165, 166,
|
|
/* 280 */ 193, 67, 24, 102, 103, 104, 105, 106, 107, 108,
|
|
/* 290 */ 109, 110, 111, 112, 113, 73, 216, 217, 59, 216,
|
|
/* 300 */ 217, 43, 44, 45, 46, 47, 48, 49, 50, 51,
|
|
/* 310 */ 52, 53, 54, 55, 56, 57, 102, 103, 104, 105,
|
|
/* 320 */ 106, 107, 108, 109, 110, 111, 112, 113, 121, 145,
|
|
/* 330 */ 59, 193, 116, 117, 118, 119, 273, 204, 122, 123,
|
|
/* 340 */ 124, 19, 20, 134, 22, 136, 137, 19, 132, 127,
|
|
/* 350 */ 128, 129, 24, 22, 23, 116, 117, 118, 36, 193,
|
|
/* 360 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
|
/* 370 */ 112, 113, 239, 240, 311, 312, 215, 106, 107, 241,
|
|
/* 380 */ 19, 59, 216, 217, 223, 252, 115, 116, 117, 118,
|
|
/* 390 */ 151, 120, 26, 71, 193, 308, 309, 193, 149, 128,
|
|
/* 400 */ 313, 216, 269, 81, 43, 44, 45, 46, 47, 48,
|
|
/* 410 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 253,
|
|
/* 420 */ 216, 217, 100, 95, 153, 59, 155, 261, 106, 107,
|
|
/* 430 */ 25, 193, 101, 193, 193, 231, 114, 25, 116, 117,
|
|
/* 440 */ 118, 113, 304, 121, 193, 204, 59, 119, 120, 121,
|
|
/* 450 */ 122, 123, 124, 125, 216, 217, 193, 216, 217, 131,
|
|
/* 460 */ 138, 139, 230, 102, 103, 104, 105, 106, 107, 108,
|
|
/* 470 */ 109, 110, 111, 112, 113, 153, 154, 155, 156, 157,
|
|
/* 480 */ 239, 240, 116, 117, 118, 76, 193, 23, 19, 25,
|
|
/* 490 */ 22, 253, 23, 252, 253, 108, 87, 204, 89, 261,
|
|
/* 500 */ 198, 92, 261, 116, 117, 118, 193, 306, 307, 216,
|
|
/* 510 */ 217, 150, 43, 44, 45, 46, 47, 48, 49, 50,
|
|
/* 520 */ 51, 52, 53, 54, 55, 56, 57, 59, 193, 216,
|
|
/* 530 */ 217, 19, 239, 240, 283, 23, 106, 107, 108, 109,
|
|
/* 540 */ 110, 111, 112, 113, 73, 252, 253, 142, 308, 309,
|
|
/* 550 */ 138, 139, 81, 313, 145, 43, 44, 45, 46, 47,
|
|
/* 560 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
/* 570 */ 307, 102, 103, 104, 105, 106, 107, 108, 109, 110,
|
|
/* 580 */ 111, 112, 113, 281, 116, 117, 118, 285, 23, 193,
|
|
/* 590 */ 25, 119, 59, 193, 122, 123, 124, 59, 127, 203,
|
|
/* 600 */ 59, 205, 19, 268, 132, 25, 23, 22, 193, 138,
|
|
/* 610 */ 139, 249, 204, 251, 102, 103, 104, 105, 106, 107,
|
|
/* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
|
|
/* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 640 */ 57, 19, 22, 23, 59, 23, 25, 239, 240, 116,
|
|
/* 650 */ 117, 118, 193, 11, 116, 117, 118, 116, 117, 118,
|
|
/* 660 */ 252, 269, 22, 193, 15, 43, 44, 45, 46, 47,
|
|
/* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
/* 680 */ 273, 143, 193, 118, 143, 102, 103, 104, 105, 106,
|
|
/* 690 */ 107, 108, 109, 110, 111, 112, 113, 76, 118, 59,
|
|
/* 700 */ 241, 116, 117, 118, 304, 216, 217, 292, 143, 60,
|
|
/* 710 */ 89, 241, 19, 92, 193, 193, 23, 22, 311, 312,
|
|
/* 720 */ 231, 101, 22, 143, 102, 103, 104, 105, 106, 107,
|
|
/* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
|
|
/* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 750 */ 57, 19, 193, 193, 59, 23, 116, 117, 118, 59,
|
|
/* 760 */ 201, 21, 241, 304, 22, 206, 127, 128, 129, 193,
|
|
/* 770 */ 128, 129, 235, 236, 304, 43, 44, 45, 46, 47,
|
|
/* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
/* 790 */ 22, 193, 216, 217, 193, 102, 103, 104, 105, 106,
|
|
/* 800 */ 107, 108, 109, 110, 111, 112, 113, 231, 193, 193,
|
|
/* 810 */ 193, 116, 117, 118, 216, 217, 116, 117, 118, 226,
|
|
/* 820 */ 80, 193, 19, 235, 236, 304, 23, 211, 212, 231,
|
|
/* 830 */ 204, 216, 217, 205, 102, 103, 104, 105, 106, 107,
|
|
/* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
|
|
/* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 860 */ 57, 19, 193, 123, 76, 239, 240, 193, 253, 239,
|
|
/* 870 */ 240, 239, 240, 193, 106, 107, 193, 89, 252, 193,
|
|
/* 880 */ 92, 59, 252, 141, 252, 43, 44, 45, 46, 47,
|
|
/* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
/* 900 */ 284, 161, 216, 217, 193, 102, 103, 104, 105, 106,
|
|
/* 910 */ 107, 108, 109, 110, 111, 112, 113, 231, 193, 16,
|
|
/* 920 */ 187, 188, 189, 190, 7, 8, 9, 309, 195, 25,
|
|
/* 930 */ 197, 313, 19, 127, 128, 129, 262, 204, 22, 117,
|
|
/* 940 */ 24, 216, 217, 263, 102, 103, 104, 105, 106, 107,
|
|
/* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
|
|
/* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 970 */ 57, 193, 239, 240, 193, 59, 19, 188, 253, 190,
|
|
/* 980 */ 77, 226, 79, 193, 195, 252, 197, 193, 19, 301,
|
|
/* 990 */ 302, 193, 193, 204, 216, 217, 226, 216, 217, 266,
|
|
/* 1000 */ 204, 159, 45, 46, 47, 48, 49, 50, 51, 52,
|
|
/* 1010 */ 53, 54, 55, 56, 57, 102, 103, 104, 105, 106,
|
|
/* 1020 */ 107, 108, 109, 110, 111, 112, 113, 12, 239, 240,
|
|
/* 1030 */ 232, 298, 238, 117, 253, 239, 240, 238, 259, 260,
|
|
/* 1040 */ 193, 252, 27, 31, 193, 193, 142, 204, 252, 193,
|
|
/* 1050 */ 193, 39, 262, 193, 100, 266, 278, 42, 204, 102,
|
|
/* 1060 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
|
/* 1070 */ 113, 117, 159, 216, 217, 121, 216, 217, 63, 193,
|
|
/* 1080 */ 193, 193, 239, 240, 115, 116, 193, 298, 73, 238,
|
|
/* 1090 */ 238, 231, 19, 239, 240, 252, 22, 24, 211, 212,
|
|
/* 1100 */ 24, 193, 216, 217, 216, 217, 252, 153, 154, 155,
|
|
/* 1110 */ 253, 16, 19, 144, 213, 268, 43, 44, 45, 46,
|
|
/* 1120 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 1130 */ 57, 238, 19, 59, 193, 59, 43, 44, 45, 46,
|
|
/* 1140 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 1150 */ 57, 22, 23, 193, 25, 193, 43, 44, 45, 46,
|
|
/* 1160 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
|
/* 1170 */ 57, 284, 77, 193, 79, 102, 103, 104, 105, 106,
|
|
/* 1180 */ 107, 108, 109, 110, 111, 112, 113, 286, 193, 193,
|
|
/* 1190 */ 193, 117, 291, 117, 232, 102, 103, 104, 105, 106,
|
|
/* 1200 */ 107, 108, 109, 110, 111, 112, 113, 204, 22, 23,
|
|
/* 1210 */ 66, 25, 216, 217, 35, 102, 103, 104, 105, 106,
|
|
/* 1220 */ 107, 108, 109, 110, 111, 112, 113, 193, 268, 85,
|
|
/* 1230 */ 101, 193, 309, 309, 240, 19, 313, 313, 94, 208,
|
|
/* 1240 */ 209, 193, 239, 240, 193, 66, 252, 19, 268, 244,
|
|
/* 1250 */ 216, 217, 193, 74, 213, 252, 161, 19, 263, 254,
|
|
/* 1260 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
|
|
/* 1270 */ 54, 55, 56, 57, 193, 216, 217, 5, 59, 193,
|
|
/* 1280 */ 19, 244, 10, 11, 12, 13, 14, 101, 309, 17,
|
|
/* 1290 */ 146, 254, 313, 193, 193, 76, 115, 216, 217, 309,
|
|
/* 1300 */ 12, 263, 30, 313, 32, 46, 87, 46, 89, 130,
|
|
/* 1310 */ 193, 92, 40, 22, 263, 27, 216, 217, 102, 103,
|
|
/* 1320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
|
|
/* 1330 */ 42, 150, 291, 216, 217, 116, 117, 118, 19, 20,
|
|
/* 1340 */ 193, 22, 70, 260, 116, 193, 24, 264, 193, 263,
|
|
/* 1350 */ 78, 63, 61, 81, 116, 36, 193, 260, 193, 29,
|
|
/* 1360 */ 193, 264, 193, 33, 145, 193, 59, 48, 216, 217,
|
|
/* 1370 */ 98, 216, 217, 193, 115, 193, 115, 193, 59, 216,
|
|
/* 1380 */ 217, 216, 217, 216, 217, 216, 217, 255, 216, 217,
|
|
/* 1390 */ 71, 193, 131, 193, 25, 65, 216, 217, 216, 217,
|
|
/* 1400 */ 216, 217, 208, 209, 85, 133, 193, 100, 193, 90,
|
|
/* 1410 */ 138, 139, 138, 139, 216, 217, 216, 217, 193, 100,
|
|
/* 1420 */ 193, 108, 135, 116, 117, 106, 107, 140, 121, 216,
|
|
/* 1430 */ 217, 216, 217, 114, 162, 116, 117, 118, 299, 300,
|
|
/* 1440 */ 121, 216, 217, 216, 217, 193, 244, 193, 135, 244,
|
|
/* 1450 */ 193, 256, 257, 140, 244, 193, 254, 193, 193, 254,
|
|
/* 1460 */ 153, 154, 155, 141, 254, 149, 150, 258, 216, 217,
|
|
/* 1470 */ 216, 217, 153, 154, 155, 156, 157, 0, 1, 2,
|
|
/* 1480 */ 216, 217, 5, 115, 158, 193, 160, 10, 11, 12,
|
|
/* 1490 */ 13, 14, 193, 59, 17, 126, 193, 19, 20, 129,
|
|
/* 1500 */ 22, 193, 22, 22, 24, 193, 23, 30, 25, 32,
|
|
/* 1510 */ 19, 20, 144, 22, 36, 216, 217, 40, 193, 216,
|
|
/* 1520 */ 217, 193, 152, 129, 216, 217, 193, 36, 216, 217,
|
|
/* 1530 */ 193, 99, 193, 193, 53, 193, 193, 59, 23, 193,
|
|
/* 1540 */ 25, 216, 217, 193, 216, 217, 152, 70, 59, 71,
|
|
/* 1550 */ 59, 117, 193, 216, 217, 78, 216, 217, 81, 216,
|
|
/* 1560 */ 217, 318, 71, 85, 193, 133, 193, 193, 90, 23,
|
|
/* 1570 */ 23, 25, 25, 120, 121, 98, 85, 193, 100, 193,
|
|
/* 1580 */ 23, 90, 25, 121, 106, 107, 19, 216, 217, 216,
|
|
/* 1590 */ 217, 100, 114, 131, 116, 117, 118, 106, 107, 121,
|
|
/* 1600 */ 216, 217, 216, 217, 193, 114, 117, 116, 117, 118,
|
|
/* 1610 */ 133, 193, 121, 193, 193, 138, 139, 193, 23, 193,
|
|
/* 1620 */ 25, 23, 23, 25, 25, 7, 8, 216, 217, 193,
|
|
/* 1630 */ 193, 153, 154, 155, 156, 157, 216, 217, 193, 162,
|
|
/* 1640 */ 216, 217, 216, 217, 153, 154, 155, 156, 157, 1,
|
|
/* 1650 */ 2, 193, 193, 5, 19, 20, 59, 22, 10, 11,
|
|
/* 1660 */ 12, 13, 14, 193, 97, 17, 193, 23, 193, 25,
|
|
/* 1670 */ 288, 36, 193, 242, 216, 217, 236, 23, 30, 25,
|
|
/* 1680 */ 32, 19, 20, 23, 22, 25, 216, 217, 40, 216,
|
|
/* 1690 */ 217, 216, 217, 193, 59, 216, 217, 193, 36, 83,
|
|
/* 1700 */ 84, 153, 153, 155, 155, 23, 71, 25, 23, 193,
|
|
/* 1710 */ 25, 193, 193, 193, 117, 193, 193, 193, 70, 193,
|
|
/* 1720 */ 193, 59, 193, 255, 255, 287, 78, 255, 243, 81,
|
|
/* 1730 */ 191, 255, 297, 71, 271, 100, 293, 245, 267, 214,
|
|
/* 1740 */ 246, 106, 107, 108, 246, 271, 98, 245, 293, 114,
|
|
/* 1750 */ 220, 116, 117, 118, 267, 271, 121, 271, 225, 219,
|
|
/* 1760 */ 229, 219, 100, 219, 259, 259, 259, 259, 106, 107,
|
|
/* 1770 */ 249, 196, 60, 280, 141, 243, 114, 249, 116, 117,
|
|
/* 1780 */ 118, 133, 245, 121, 200, 297, 138, 139, 153, 154,
|
|
/* 1790 */ 155, 156, 157, 297, 200, 38, 19, 20, 151, 22,
|
|
/* 1800 */ 200, 150, 140, 294, 294, 22, 272, 43, 234, 18,
|
|
/* 1810 */ 162, 270, 200, 36, 237, 153, 154, 155, 156, 157,
|
|
/* 1820 */ 237, 283, 237, 237, 18, 199, 149, 246, 272, 270,
|
|
/* 1830 */ 272, 200, 158, 246, 246, 234, 59, 234, 246, 199,
|
|
/* 1840 */ 290, 62, 289, 200, 199, 22, 221, 115, 71, 200,
|
|
/* 1850 */ 200, 199, 199, 221, 218, 218, 19, 20, 64, 22,
|
|
/* 1860 */ 218, 227, 22, 224, 126, 224, 165, 221, 24, 305,
|
|
/* 1870 */ 200, 113, 312, 36, 218, 220, 218, 100, 282, 218,
|
|
/* 1880 */ 91, 218, 317, 106, 107, 221, 227, 282, 317, 82,
|
|
/* 1890 */ 148, 114, 265, 116, 117, 118, 59, 145, 121, 22,
|
|
/* 1900 */ 277, 158, 200, 265, 25, 202, 147, 250, 71, 279,
|
|
/* 1910 */ 13, 146, 194, 194, 249, 248, 250, 140, 247, 246,
|
|
/* 1920 */ 6, 192, 192, 192, 303, 303, 213, 207, 300, 213,
|
|
/* 1930 */ 153, 154, 155, 156, 157, 213, 213, 100, 213, 222,
|
|
/* 1940 */ 207, 214, 214, 106, 107, 4, 222, 207, 3, 22,
|
|
/* 1950 */ 163, 114, 15, 116, 117, 118, 16, 23, 121, 23,
|
|
/* 1960 */ 139, 151, 130, 25, 142, 16, 24, 20, 144, 1,
|
|
/* 1970 */ 142, 130, 130, 61, 53, 53, 37, 151, 53, 53,
|
|
/* 1980 */ 130, 116, 34, 1, 141, 5, 22, 115, 161, 141,
|
|
/* 1990 */ 153, 154, 155, 156, 157, 25, 68, 68, 75, 41,
|
|
/* 2000 */ 115, 24, 131, 20, 19, 125, 22, 96, 22, 22,
|
|
/* 2010 */ 67, 23, 22, 67, 59, 24, 22, 28, 67, 23,
|
|
/* 2020 */ 22, 22, 149, 23, 23, 23, 116, 23, 25, 37,
|
|
/* 2030 */ 97, 141, 23, 23, 22, 143, 25, 75, 88, 34,
|
|
/* 2040 */ 34, 34, 34, 86, 75, 93, 23, 34, 22, 34,
|
|
/* 2050 */ 25, 24, 34, 25, 23, 142, 23, 142, 44, 23,
|
|
/* 2060 */ 23, 23, 11, 23, 25, 22, 22, 22, 15, 23,
|
|
/* 2070 */ 23, 22, 22, 25, 1, 1, 141, 25, 23, 135,
|
|
/* 2080 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2090 */ 319, 319, 319, 319, 141, 141, 319, 141, 319, 319,
|
|
/* 2100 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2110 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2120 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2130 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2140 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2150 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2160 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2170 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2180 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2190 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2200 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2210 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2220 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2230 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2240 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2250 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2260 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2270 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
|
|
/* 2280 */ 319, 319, 319,
|
|
};
|
|
#define YY_SHIFT_COUNT (575)
|
|
#define YY_SHIFT_MIN (0)
|
|
#define YY_SHIFT_MAX (2074)
|
|
static const unsigned short int yy_shift_ofst[] = {
|
|
/* 0 */ 1648, 1477, 1272, 322, 322, 1, 1319, 1478, 1491, 1837,
|
|
/* 10 */ 1837, 1837, 471, 0, 0, 214, 1093, 1837, 1837, 1837,
|
|
/* 20 */ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 30 */ 271, 271, 1219, 1219, 216, 88, 1, 1, 1, 1,
|
|
/* 40 */ 1, 40, 111, 258, 361, 469, 512, 583, 622, 693,
|
|
/* 50 */ 732, 803, 842, 913, 1073, 1093, 1093, 1093, 1093, 1093,
|
|
/* 60 */ 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093,
|
|
/* 70 */ 1093, 1093, 1093, 1113, 1093, 1216, 957, 957, 1635, 1662,
|
|
/* 80 */ 1777, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 90 */ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 100 */ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 110 */ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 120 */ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
|
|
/* 130 */ 137, 181, 181, 181, 181, 181, 181, 181, 94, 430,
|
|
/* 140 */ 66, 65, 112, 366, 533, 533, 740, 1261, 533, 533,
|
|
/* 150 */ 79, 79, 533, 412, 412, 412, 77, 412, 123, 113,
|
|
/* 160 */ 113, 22, 22, 2098, 2098, 328, 328, 328, 239, 468,
|
|
/* 170 */ 468, 468, 468, 1015, 1015, 409, 366, 1129, 1186, 533,
|
|
/* 180 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
|
|
/* 190 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 969,
|
|
/* 200 */ 621, 621, 533, 642, 788, 788, 1228, 1228, 822, 822,
|
|
/* 210 */ 67, 1274, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 1307,
|
|
/* 220 */ 954, 954, 585, 472, 640, 387, 695, 538, 541, 700,
|
|
/* 230 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 533,
|
|
/* 240 */ 222, 533, 533, 533, 533, 533, 533, 533, 533, 533,
|
|
/* 250 */ 533, 533, 533, 1179, 1179, 1179, 533, 533, 533, 565,
|
|
/* 260 */ 533, 533, 533, 916, 1144, 533, 533, 1288, 533, 533,
|
|
/* 270 */ 533, 533, 533, 533, 533, 533, 639, 1330, 209, 1076,
|
|
/* 280 */ 1076, 1076, 1076, 580, 209, 209, 1313, 768, 917, 649,
|
|
/* 290 */ 1181, 1316, 405, 1316, 1238, 249, 1181, 1181, 249, 1181,
|
|
/* 300 */ 405, 1238, 1369, 464, 1259, 1012, 1012, 1012, 1368, 1368,
|
|
/* 310 */ 1368, 1368, 184, 184, 1326, 904, 1287, 1480, 1712, 1712,
|
|
/* 320 */ 1633, 1633, 1757, 1757, 1633, 1647, 1651, 1783, 1764, 1791,
|
|
/* 330 */ 1791, 1791, 1791, 1633, 1806, 1677, 1651, 1651, 1677, 1783,
|
|
/* 340 */ 1764, 1677, 1764, 1677, 1633, 1806, 1674, 1779, 1633, 1806,
|
|
/* 350 */ 1823, 1633, 1806, 1633, 1806, 1823, 1732, 1732, 1732, 1794,
|
|
/* 360 */ 1840, 1840, 1823, 1732, 1738, 1732, 1794, 1732, 1732, 1701,
|
|
/* 370 */ 1844, 1758, 1758, 1823, 1633, 1789, 1789, 1807, 1807, 1742,
|
|
/* 380 */ 1752, 1877, 1633, 1743, 1742, 1759, 1765, 1677, 1879, 1897,
|
|
/* 390 */ 1897, 1914, 1914, 1914, 2098, 2098, 2098, 2098, 2098, 2098,
|
|
/* 400 */ 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 207,
|
|
/* 410 */ 1095, 331, 620, 903, 806, 1074, 1483, 1432, 1481, 1322,
|
|
/* 420 */ 1370, 1394, 1515, 1291, 1546, 1547, 1557, 1595, 1598, 1599,
|
|
/* 430 */ 1434, 1453, 1618, 1462, 1567, 1489, 1644, 1654, 1616, 1660,
|
|
/* 440 */ 1548, 1549, 1682, 1685, 1597, 742, 1941, 1945, 1927, 1787,
|
|
/* 450 */ 1937, 1940, 1934, 1936, 1821, 1810, 1832, 1938, 1938, 1942,
|
|
/* 460 */ 1822, 1947, 1824, 1949, 1968, 1828, 1841, 1938, 1842, 1912,
|
|
/* 470 */ 1939, 1938, 1826, 1921, 1922, 1925, 1926, 1850, 1865, 1948,
|
|
/* 480 */ 1843, 1982, 1980, 1964, 1872, 1827, 1928, 1970, 1929, 1923,
|
|
/* 490 */ 1958, 1848, 1885, 1977, 1983, 1985, 1871, 1880, 1984, 1943,
|
|
/* 500 */ 1986, 1987, 1988, 1990, 1946, 1955, 1991, 1911, 1989, 1994,
|
|
/* 510 */ 1951, 1992, 1996, 1873, 1998, 2000, 2001, 2002, 2003, 2004,
|
|
/* 520 */ 1999, 1933, 1890, 2009, 2010, 1910, 2005, 2012, 1892, 2011,
|
|
/* 530 */ 2006, 2007, 2008, 2013, 1950, 1962, 1957, 2014, 1969, 1952,
|
|
/* 540 */ 2015, 2023, 2026, 2027, 2025, 2028, 2018, 1913, 1915, 2031,
|
|
/* 550 */ 2011, 2033, 2036, 2037, 2038, 2039, 2040, 2043, 2051, 2044,
|
|
/* 560 */ 2045, 2046, 2047, 2049, 2050, 2048, 1944, 1935, 1953, 1954,
|
|
/* 570 */ 1956, 2052, 2055, 2053, 2073, 2074,
|
|
};
|
|
#define YY_REDUCE_COUNT (408)
|
|
#define YY_REDUCE_MIN (-271)
|
|
#define YY_REDUCE_MAX (1740)
|
|
static const short yy_reduce_ofst[] = {
|
|
/* 0 */ -125, 733, 789, 241, 293, -123, -193, -191, -183, -187,
|
|
/* 10 */ 166, 238, 133, -207, -199, -267, -176, -6, 204, 489,
|
|
/* 20 */ 576, -175, 598, 686, 615, 725, 860, 778, 781, 857,
|
|
/* 30 */ 616, 887, 87, 240, -192, 408, 626, 796, 843, 854,
|
|
/* 40 */ 1003, -271, -271, -271, -271, -271, -271, -271, -271, -271,
|
|
/* 50 */ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
|
|
/* 60 */ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
|
|
/* 70 */ -271, -271, -271, -271, -271, -271, -271, -271, 80, 83,
|
|
/* 80 */ 313, 886, 888, 996, 1034, 1059, 1081, 1100, 1117, 1152,
|
|
/* 90 */ 1155, 1163, 1165, 1167, 1169, 1172, 1180, 1182, 1184, 1198,
|
|
/* 100 */ 1200, 1213, 1215, 1225, 1227, 1252, 1254, 1264, 1299, 1303,
|
|
/* 110 */ 1308, 1312, 1325, 1328, 1337, 1340, 1343, 1371, 1373, 1384,
|
|
/* 120 */ 1386, 1411, 1420, 1424, 1426, 1458, 1470, 1473, 1475, 1479,
|
|
/* 130 */ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
|
|
/* 140 */ -271, 138, 459, 396, -158, 470, 302, -212, 521, 201,
|
|
/* 150 */ -195, -92, 559, 630, 632, 630, -271, 632, 901, 63,
|
|
/* 160 */ 407, -271, -271, -271, -271, 161, 161, 161, 251, 335,
|
|
/* 170 */ 847, 960, 980, 537, 588, 618, 628, 688, 688, -166,
|
|
/* 180 */ -161, 674, 790, 794, 799, 851, 852, -122, 680, -120,
|
|
/* 190 */ 995, 1038, 415, 1051, 893, 798, 962, 400, 1086, 779,
|
|
/* 200 */ 923, 924, 263, 1041, 979, 990, 1083, 1097, 1031, 1194,
|
|
/* 210 */ 362, 994, 1139, 1005, 1037, 1202, 1205, 1195, 1210, -194,
|
|
/* 220 */ 56, 185, -135, 232, 522, 560, 601, 617, 669, 683,
|
|
/* 230 */ 711, 856, 908, 941, 1048, 1101, 1147, 1257, 1262, 1265,
|
|
/* 240 */ 392, 1292, 1333, 1339, 1342, 1346, 1350, 1359, 1374, 1418,
|
|
/* 250 */ 1421, 1436, 1437, 593, 755, 770, 997, 1445, 1459, 1209,
|
|
/* 260 */ 1500, 1504, 1516, 1132, 1243, 1518, 1519, 1440, 1520, 560,
|
|
/* 270 */ 1522, 1523, 1524, 1526, 1527, 1529, 1382, 1438, 1431, 1468,
|
|
/* 280 */ 1469, 1472, 1476, 1209, 1431, 1431, 1485, 1525, 1539, 1435,
|
|
/* 290 */ 1463, 1471, 1492, 1487, 1443, 1494, 1474, 1484, 1498, 1486,
|
|
/* 300 */ 1502, 1455, 1530, 1531, 1533, 1540, 1542, 1544, 1505, 1506,
|
|
/* 310 */ 1507, 1508, 1521, 1528, 1493, 1537, 1532, 1575, 1488, 1496,
|
|
/* 320 */ 1584, 1594, 1509, 1510, 1600, 1538, 1534, 1541, 1574, 1577,
|
|
/* 330 */ 1583, 1585, 1586, 1612, 1626, 1581, 1556, 1558, 1587, 1559,
|
|
/* 340 */ 1601, 1588, 1603, 1592, 1631, 1640, 1550, 1553, 1643, 1645,
|
|
/* 350 */ 1625, 1649, 1652, 1650, 1653, 1632, 1636, 1637, 1642, 1634,
|
|
/* 360 */ 1639, 1641, 1646, 1656, 1655, 1658, 1659, 1661, 1663, 1560,
|
|
/* 370 */ 1564, 1596, 1605, 1664, 1670, 1565, 1571, 1627, 1638, 1657,
|
|
/* 380 */ 1665, 1623, 1702, 1630, 1666, 1667, 1671, 1673, 1703, 1718,
|
|
/* 390 */ 1719, 1729, 1730, 1731, 1621, 1622, 1628, 1720, 1713, 1716,
|
|
/* 400 */ 1722, 1723, 1733, 1717, 1724, 1727, 1728, 1725, 1740,
|
|
};
|
|
static const YYACTIONTYPE yy_default[] = {
|
|
/* 0 */ 1647, 1647, 1647, 1475, 1240, 1351, 1240, 1240, 1240, 1475,
|
|
/* 10 */ 1475, 1475, 1240, 1381, 1381, 1528, 1273, 1240, 1240, 1240,
|
|
/* 20 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1474, 1240, 1240,
|
|
/* 30 */ 1240, 1240, 1563, 1563, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 40 */ 1240, 1240, 1390, 1240, 1397, 1240, 1240, 1240, 1240, 1240,
|
|
/* 50 */ 1476, 1477, 1240, 1240, 1240, 1527, 1529, 1492, 1404, 1403,
|
|
/* 60 */ 1402, 1401, 1510, 1369, 1395, 1388, 1392, 1470, 1471, 1469,
|
|
/* 70 */ 1473, 1477, 1476, 1240, 1391, 1438, 1454, 1437, 1240, 1240,
|
|
/* 80 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 90 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 100 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 110 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 120 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 130 */ 1446, 1453, 1452, 1451, 1460, 1450, 1447, 1440, 1439, 1441,
|
|
/* 140 */ 1442, 1240, 1240, 1264, 1240, 1240, 1261, 1315, 1240, 1240,
|
|
/* 150 */ 1240, 1240, 1240, 1547, 1546, 1240, 1443, 1240, 1273, 1432,
|
|
/* 160 */ 1431, 1457, 1444, 1456, 1455, 1535, 1599, 1598, 1493, 1240,
|
|
/* 170 */ 1240, 1240, 1240, 1240, 1240, 1563, 1240, 1240, 1240, 1240,
|
|
/* 180 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 190 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1371,
|
|
/* 200 */ 1563, 1563, 1240, 1273, 1563, 1563, 1372, 1372, 1269, 1269,
|
|
/* 210 */ 1375, 1240, 1542, 1342, 1342, 1342, 1342, 1351, 1342, 1240,
|
|
/* 220 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 230 */ 1240, 1240, 1240, 1240, 1532, 1530, 1240, 1240, 1240, 1240,
|
|
/* 240 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 250 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 260 */ 1240, 1240, 1240, 1347, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 270 */ 1240, 1240, 1240, 1240, 1240, 1592, 1240, 1505, 1329, 1347,
|
|
/* 280 */ 1347, 1347, 1347, 1349, 1330, 1328, 1341, 1274, 1247, 1639,
|
|
/* 290 */ 1407, 1396, 1348, 1396, 1636, 1394, 1407, 1407, 1394, 1407,
|
|
/* 300 */ 1348, 1636, 1290, 1615, 1285, 1381, 1381, 1381, 1371, 1371,
|
|
/* 310 */ 1371, 1371, 1375, 1375, 1472, 1348, 1341, 1240, 1639, 1639,
|
|
/* 320 */ 1357, 1357, 1638, 1638, 1357, 1493, 1623, 1416, 1318, 1324,
|
|
/* 330 */ 1324, 1324, 1324, 1357, 1258, 1394, 1623, 1623, 1394, 1416,
|
|
/* 340 */ 1318, 1394, 1318, 1394, 1357, 1258, 1509, 1633, 1357, 1258,
|
|
/* 350 */ 1483, 1357, 1258, 1357, 1258, 1483, 1316, 1316, 1316, 1305,
|
|
/* 360 */ 1240, 1240, 1483, 1316, 1290, 1316, 1305, 1316, 1316, 1581,
|
|
/* 370 */ 1240, 1487, 1487, 1483, 1357, 1573, 1573, 1384, 1384, 1389,
|
|
/* 380 */ 1375, 1478, 1357, 1240, 1389, 1387, 1385, 1394, 1308, 1595,
|
|
/* 390 */ 1595, 1591, 1591, 1591, 1644, 1644, 1542, 1608, 1273, 1273,
|
|
/* 400 */ 1273, 1273, 1608, 1292, 1292, 1274, 1274, 1273, 1608, 1240,
|
|
/* 410 */ 1240, 1240, 1240, 1240, 1240, 1603, 1240, 1537, 1494, 1361,
|
|
/* 420 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 430 */ 1240, 1240, 1240, 1240, 1548, 1240, 1240, 1240, 1240, 1240,
|
|
/* 440 */ 1240, 1240, 1240, 1240, 1240, 1421, 1240, 1243, 1539, 1240,
|
|
/* 450 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1398, 1399, 1362,
|
|
/* 460 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1413, 1240, 1240,
|
|
/* 470 */ 1240, 1408, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 480 */ 1635, 1240, 1240, 1240, 1240, 1240, 1240, 1508, 1507, 1240,
|
|
/* 490 */ 1240, 1359, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 500 */ 1240, 1240, 1240, 1240, 1240, 1288, 1240, 1240, 1240, 1240,
|
|
/* 510 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 520 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1386,
|
|
/* 530 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 540 */ 1240, 1240, 1240, 1240, 1578, 1376, 1240, 1240, 1240, 1240,
|
|
/* 550 */ 1626, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240,
|
|
/* 560 */ 1240, 1240, 1240, 1240, 1240, 1619, 1332, 1423, 1240, 1422,
|
|
/* 570 */ 1426, 1262, 1240, 1252, 1240, 1240,
|
|
};
|
|
/********** End of lemon-generated parsing tables *****************************/
|
|
|
|
/* The next table maps tokens (terminal symbols) into fallback tokens.
|
|
** If a construct like the following:
|
|
**
|
|
** %fallback ID X Y Z.
|
|
**
|
|
** appears in the grammar, then ID becomes a fallback token for X, Y,
|
|
** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
|
|
** but it does not parse, the type of the token is changed to ID and
|
|
** the parse is retried before an error is thrown.
|
|
**
|
|
** This feature can be used, for example, to cause some keywords in a language
|
|
** to revert to identifiers if they keyword does not apply in the context where
|
|
** it appears.
|
|
*/
|
|
#ifdef YYFALLBACK
|
|
static const YYCODETYPE yyFallback[] = {
|
|
0, /* $ => nothing */
|
|
0, /* SEMI => nothing */
|
|
59, /* EXPLAIN => ID */
|
|
59, /* QUERY => ID */
|
|
59, /* PLAN => ID */
|
|
59, /* BEGIN => ID */
|
|
0, /* TRANSACTION => nothing */
|
|
59, /* DEFERRED => ID */
|
|
59, /* IMMEDIATE => ID */
|
|
59, /* EXCLUSIVE => ID */
|
|
0, /* COMMIT => nothing */
|
|
59, /* END => ID */
|
|
59, /* ROLLBACK => ID */
|
|
59, /* SAVEPOINT => ID */
|
|
59, /* RELEASE => ID */
|
|
0, /* TO => nothing */
|
|
0, /* TABLE => nothing */
|
|
0, /* CREATE => nothing */
|
|
59, /* IF => ID */
|
|
0, /* NOT => nothing */
|
|
0, /* EXISTS => nothing */
|
|
59, /* TEMP => ID */
|
|
0, /* LP => nothing */
|
|
0, /* RP => nothing */
|
|
0, /* AS => nothing */
|
|
0, /* COMMA => nothing */
|
|
59, /* WITHOUT => ID */
|
|
59, /* ABORT => ID */
|
|
59, /* ACTION => ID */
|
|
59, /* AFTER => ID */
|
|
59, /* ANALYZE => ID */
|
|
59, /* ASC => ID */
|
|
59, /* ATTACH => ID */
|
|
59, /* BEFORE => ID */
|
|
59, /* BY => ID */
|
|
59, /* CASCADE => ID */
|
|
59, /* CAST => ID */
|
|
59, /* CONFLICT => ID */
|
|
59, /* DATABASE => ID */
|
|
59, /* DESC => ID */
|
|
59, /* DETACH => ID */
|
|
59, /* EACH => ID */
|
|
59, /* FAIL => ID */
|
|
0, /* OR => nothing */
|
|
0, /* AND => nothing */
|
|
0, /* IS => nothing */
|
|
59, /* MATCH => ID */
|
|
59, /* LIKE_KW => ID */
|
|
0, /* BETWEEN => nothing */
|
|
0, /* IN => nothing */
|
|
0, /* ISNULL => nothing */
|
|
0, /* NOTNULL => nothing */
|
|
0, /* NE => nothing */
|
|
0, /* EQ => nothing */
|
|
0, /* GT => nothing */
|
|
0, /* LE => nothing */
|
|
0, /* LT => nothing */
|
|
0, /* GE => nothing */
|
|
0, /* ESCAPE => nothing */
|
|
0, /* ID => nothing */
|
|
59, /* COLUMNKW => ID */
|
|
59, /* DO => ID */
|
|
59, /* FOR => ID */
|
|
59, /* IGNORE => ID */
|
|
59, /* INITIALLY => ID */
|
|
59, /* INSTEAD => ID */
|
|
59, /* NO => ID */
|
|
59, /* KEY => ID */
|
|
59, /* OF => ID */
|
|
59, /* OFFSET => ID */
|
|
59, /* PRAGMA => ID */
|
|
59, /* RAISE => ID */
|
|
59, /* RECURSIVE => ID */
|
|
59, /* REPLACE => ID */
|
|
59, /* RESTRICT => ID */
|
|
59, /* ROW => ID */
|
|
59, /* ROWS => ID */
|
|
59, /* TRIGGER => ID */
|
|
59, /* VACUUM => ID */
|
|
59, /* VIEW => ID */
|
|
59, /* VIRTUAL => ID */
|
|
59, /* WITH => ID */
|
|
59, /* NULLS => ID */
|
|
59, /* FIRST => ID */
|
|
59, /* LAST => ID */
|
|
59, /* CURRENT => ID */
|
|
59, /* FOLLOWING => ID */
|
|
59, /* PARTITION => ID */
|
|
59, /* PRECEDING => ID */
|
|
59, /* RANGE => ID */
|
|
59, /* UNBOUNDED => ID */
|
|
59, /* EXCLUDE => ID */
|
|
59, /* GROUPS => ID */
|
|
59, /* OTHERS => ID */
|
|
59, /* TIES => ID */
|
|
59, /* GENERATED => ID */
|
|
59, /* ALWAYS => ID */
|
|
59, /* MATERIALIZED => ID */
|
|
59, /* REINDEX => ID */
|
|
59, /* RENAME => ID */
|
|
59, /* CTIME_KW => ID */
|
|
0, /* ANY => nothing */
|
|
0, /* BITAND => nothing */
|
|
0, /* BITOR => nothing */
|
|
0, /* LSHIFT => nothing */
|
|
0, /* RSHIFT => nothing */
|
|
0, /* PLUS => nothing */
|
|
0, /* MINUS => nothing */
|
|
0, /* STAR => nothing */
|
|
0, /* SLASH => nothing */
|
|
0, /* REM => nothing */
|
|
0, /* CONCAT => nothing */
|
|
0, /* PTR => nothing */
|
|
0, /* COLLATE => nothing */
|
|
0, /* BITNOT => nothing */
|
|
0, /* ON => nothing */
|
|
0, /* INDEXED => nothing */
|
|
0, /* STRING => nothing */
|
|
0, /* JOIN_KW => nothing */
|
|
0, /* CONSTRAINT => nothing */
|
|
0, /* DEFAULT => nothing */
|
|
0, /* NULL => nothing */
|
|
0, /* PRIMARY => nothing */
|
|
0, /* UNIQUE => nothing */
|
|
0, /* CHECK => nothing */
|
|
0, /* REFERENCES => nothing */
|
|
0, /* AUTOINCR => nothing */
|
|
0, /* INSERT => nothing */
|
|
0, /* DELETE => nothing */
|
|
0, /* UPDATE => nothing */
|
|
0, /* SET => nothing */
|
|
0, /* DEFERRABLE => nothing */
|
|
0, /* FOREIGN => nothing */
|
|
0, /* DROP => nothing */
|
|
0, /* UNION => nothing */
|
|
0, /* ALL => nothing */
|
|
0, /* EXCEPT => nothing */
|
|
0, /* INTERSECT => nothing */
|
|
0, /* SELECT => nothing */
|
|
0, /* VALUES => nothing */
|
|
0, /* DISTINCT => nothing */
|
|
0, /* DOT => nothing */
|
|
0, /* FROM => nothing */
|
|
0, /* JOIN => nothing */
|
|
0, /* USING => nothing */
|
|
0, /* ORDER => nothing */
|
|
0, /* GROUP => nothing */
|
|
0, /* HAVING => nothing */
|
|
0, /* LIMIT => nothing */
|
|
0, /* WHERE => nothing */
|
|
0, /* RETURNING => nothing */
|
|
0, /* INTO => nothing */
|
|
0, /* NOTHING => nothing */
|
|
0, /* FLOAT => nothing */
|
|
0, /* BLOB => nothing */
|
|
0, /* INTEGER => nothing */
|
|
0, /* VARIABLE => nothing */
|
|
0, /* CASE => nothing */
|
|
0, /* WHEN => nothing */
|
|
0, /* THEN => nothing */
|
|
0, /* ELSE => nothing */
|
|
0, /* INDEX => nothing */
|
|
0, /* ALTER => nothing */
|
|
0, /* ADD => nothing */
|
|
0, /* WINDOW => nothing */
|
|
0, /* OVER => nothing */
|
|
0, /* FILTER => nothing */
|
|
0, /* COLUMN => nothing */
|
|
0, /* AGG_FUNCTION => nothing */
|
|
0, /* AGG_COLUMN => nothing */
|
|
0, /* TRUEFALSE => nothing */
|
|
0, /* ISNOT => nothing */
|
|
0, /* FUNCTION => nothing */
|
|
0, /* UMINUS => nothing */
|
|
0, /* UPLUS => nothing */
|
|
0, /* TRUTH => nothing */
|
|
0, /* REGISTER => nothing */
|
|
0, /* VECTOR => nothing */
|
|
0, /* SELECT_COLUMN => nothing */
|
|
0, /* IF_NULL_ROW => nothing */
|
|
0, /* ASTERISK => nothing */
|
|
0, /* SPAN => nothing */
|
|
0, /* ERROR => nothing */
|
|
0, /* SPACE => nothing */
|
|
0, /* ILLEGAL => nothing */
|
|
};
|
|
#endif /* YYFALLBACK */
|
|
|
|
/* The following structure represents a single element of the
|
|
** parser's stack. Information stored includes:
|
|
**
|
|
** + The state number for the parser at this level of the stack.
|
|
**
|
|
** + The value of the token stored at this level of the stack.
|
|
** (In other words, the "major" token.)
|
|
**
|
|
** + The semantic value stored at this level of the stack. This is
|
|
** the information used by the action routines in the grammar.
|
|
** It is sometimes called the "minor" token.
|
|
**
|
|
** After the "shift" half of a SHIFTREDUCE action, the stateno field
|
|
** actually contains the reduce action for the second half of the
|
|
** SHIFTREDUCE.
|
|
*/
|
|
struct yyStackEntry {
|
|
YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
|
|
YYCODETYPE major; /* The major token value. This is the code
|
|
** number for the token at this stack level */
|
|
YYMINORTYPE minor; /* The user-supplied minor token value. This
|
|
** is the value of the token */
|
|
};
|
|
typedef struct yyStackEntry yyStackEntry;
|
|
|
|
/* The state of the parser is completely contained in an instance of
|
|
** the following structure */
|
|
struct yyParser {
|
|
yyStackEntry *yytos; /* Pointer to top element of the stack */
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
int yyhwm; /* High-water mark of the stack */
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
int yyerrcnt; /* Shifts left before out of the error */
|
|
#endif
|
|
sqlite3ParserARG_SDECL /* A place to hold %extra_argument */
|
|
sqlite3ParserCTX_SDECL /* A place to hold %extra_context */
|
|
#if YYSTACKDEPTH<=0
|
|
int yystksz; /* Current side of the stack */
|
|
yyStackEntry *yystack; /* The parser's stack */
|
|
yyStackEntry yystk0; /* First stack entry */
|
|
#else
|
|
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
|
|
yyStackEntry *yystackEnd; /* Last entry in the stack */
|
|
#endif
|
|
};
|
|
typedef struct yyParser yyParser;
|
|
|
|
#include "libc/assert.h"
|
|
#ifndef NDEBUG
|
|
#include "libc/stdio/stdio.h"
|
|
static FILE *yyTraceFILE = 0;
|
|
static char *yyTracePrompt = 0;
|
|
#endif /* NDEBUG */
|
|
|
|
#ifndef NDEBUG
|
|
/*
|
|
** Turn parser tracing on by giving a stream to which to write the trace
|
|
** and a prompt to preface each trace message. Tracing is turned off
|
|
** by making either argument NULL
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A FILE* to which trace output should be written.
|
|
** If NULL, then tracing is turned off.
|
|
** <li> A prefix string written at the beginning of every
|
|
** line of trace output. If NULL, then tracing is
|
|
** turned off.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
|
|
yyTraceFILE = TraceFILE;
|
|
yyTracePrompt = zTracePrompt;
|
|
if( yyTraceFILE==0 ) yyTracePrompt = 0;
|
|
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
|
|
}
|
|
#endif /* NDEBUG */
|
|
|
|
#if defined(YYCOVERAGE) || !defined(NDEBUG)
|
|
/* For tracing shifts, the names of all terminals and nonterminals
|
|
** are required. The following table supplies these names */
|
|
static const char *const yyTokenName[] = {
|
|
/* 0 */ "$",
|
|
/* 1 */ "SEMI",
|
|
/* 2 */ "EXPLAIN",
|
|
/* 3 */ "QUERY",
|
|
/* 4 */ "PLAN",
|
|
/* 5 */ "BEGIN",
|
|
/* 6 */ "TRANSACTION",
|
|
/* 7 */ "DEFERRED",
|
|
/* 8 */ "IMMEDIATE",
|
|
/* 9 */ "EXCLUSIVE",
|
|
/* 10 */ "COMMIT",
|
|
/* 11 */ "END",
|
|
/* 12 */ "ROLLBACK",
|
|
/* 13 */ "SAVEPOINT",
|
|
/* 14 */ "RELEASE",
|
|
/* 15 */ "TO",
|
|
/* 16 */ "TABLE",
|
|
/* 17 */ "CREATE",
|
|
/* 18 */ "IF",
|
|
/* 19 */ "NOT",
|
|
/* 20 */ "EXISTS",
|
|
/* 21 */ "TEMP",
|
|
/* 22 */ "LP",
|
|
/* 23 */ "RP",
|
|
/* 24 */ "AS",
|
|
/* 25 */ "COMMA",
|
|
/* 26 */ "WITHOUT",
|
|
/* 27 */ "ABORT",
|
|
/* 28 */ "ACTION",
|
|
/* 29 */ "AFTER",
|
|
/* 30 */ "ANALYZE",
|
|
/* 31 */ "ASC",
|
|
/* 32 */ "ATTACH",
|
|
/* 33 */ "BEFORE",
|
|
/* 34 */ "BY",
|
|
/* 35 */ "CASCADE",
|
|
/* 36 */ "CAST",
|
|
/* 37 */ "CONFLICT",
|
|
/* 38 */ "DATABASE",
|
|
/* 39 */ "DESC",
|
|
/* 40 */ "DETACH",
|
|
/* 41 */ "EACH",
|
|
/* 42 */ "FAIL",
|
|
/* 43 */ "OR",
|
|
/* 44 */ "AND",
|
|
/* 45 */ "IS",
|
|
/* 46 */ "MATCH",
|
|
/* 47 */ "LIKE_KW",
|
|
/* 48 */ "BETWEEN",
|
|
/* 49 */ "IN",
|
|
/* 50 */ "ISNULL",
|
|
/* 51 */ "NOTNULL",
|
|
/* 52 */ "NE",
|
|
/* 53 */ "EQ",
|
|
/* 54 */ "GT",
|
|
/* 55 */ "LE",
|
|
/* 56 */ "LT",
|
|
/* 57 */ "GE",
|
|
/* 58 */ "ESCAPE",
|
|
/* 59 */ "ID",
|
|
/* 60 */ "COLUMNKW",
|
|
/* 61 */ "DO",
|
|
/* 62 */ "FOR",
|
|
/* 63 */ "IGNORE",
|
|
/* 64 */ "INITIALLY",
|
|
/* 65 */ "INSTEAD",
|
|
/* 66 */ "NO",
|
|
/* 67 */ "KEY",
|
|
/* 68 */ "OF",
|
|
/* 69 */ "OFFSET",
|
|
/* 70 */ "PRAGMA",
|
|
/* 71 */ "RAISE",
|
|
/* 72 */ "RECURSIVE",
|
|
/* 73 */ "REPLACE",
|
|
/* 74 */ "RESTRICT",
|
|
/* 75 */ "ROW",
|
|
/* 76 */ "ROWS",
|
|
/* 77 */ "TRIGGER",
|
|
/* 78 */ "VACUUM",
|
|
/* 79 */ "VIEW",
|
|
/* 80 */ "VIRTUAL",
|
|
/* 81 */ "WITH",
|
|
/* 82 */ "NULLS",
|
|
/* 83 */ "FIRST",
|
|
/* 84 */ "LAST",
|
|
/* 85 */ "CURRENT",
|
|
/* 86 */ "FOLLOWING",
|
|
/* 87 */ "PARTITION",
|
|
/* 88 */ "PRECEDING",
|
|
/* 89 */ "RANGE",
|
|
/* 90 */ "UNBOUNDED",
|
|
/* 91 */ "EXCLUDE",
|
|
/* 92 */ "GROUPS",
|
|
/* 93 */ "OTHERS",
|
|
/* 94 */ "TIES",
|
|
/* 95 */ "GENERATED",
|
|
/* 96 */ "ALWAYS",
|
|
/* 97 */ "MATERIALIZED",
|
|
/* 98 */ "REINDEX",
|
|
/* 99 */ "RENAME",
|
|
/* 100 */ "CTIME_KW",
|
|
/* 101 */ "ANY",
|
|
/* 102 */ "BITAND",
|
|
/* 103 */ "BITOR",
|
|
/* 104 */ "LSHIFT",
|
|
/* 105 */ "RSHIFT",
|
|
/* 106 */ "PLUS",
|
|
/* 107 */ "MINUS",
|
|
/* 108 */ "STAR",
|
|
/* 109 */ "SLASH",
|
|
/* 110 */ "REM",
|
|
/* 111 */ "CONCAT",
|
|
/* 112 */ "PTR",
|
|
/* 113 */ "COLLATE",
|
|
/* 114 */ "BITNOT",
|
|
/* 115 */ "ON",
|
|
/* 116 */ "INDEXED",
|
|
/* 117 */ "STRING",
|
|
/* 118 */ "JOIN_KW",
|
|
/* 119 */ "CONSTRAINT",
|
|
/* 120 */ "DEFAULT",
|
|
/* 121 */ "NULL",
|
|
/* 122 */ "PRIMARY",
|
|
/* 123 */ "UNIQUE",
|
|
/* 124 */ "CHECK",
|
|
/* 125 */ "REFERENCES",
|
|
/* 126 */ "AUTOINCR",
|
|
/* 127 */ "INSERT",
|
|
/* 128 */ "DELETE",
|
|
/* 129 */ "UPDATE",
|
|
/* 130 */ "SET",
|
|
/* 131 */ "DEFERRABLE",
|
|
/* 132 */ "FOREIGN",
|
|
/* 133 */ "DROP",
|
|
/* 134 */ "UNION",
|
|
/* 135 */ "ALL",
|
|
/* 136 */ "EXCEPT",
|
|
/* 137 */ "INTERSECT",
|
|
/* 138 */ "SELECT",
|
|
/* 139 */ "VALUES",
|
|
/* 140 */ "DISTINCT",
|
|
/* 141 */ "DOT",
|
|
/* 142 */ "FROM",
|
|
/* 143 */ "JOIN",
|
|
/* 144 */ "USING",
|
|
/* 145 */ "ORDER",
|
|
/* 146 */ "GROUP",
|
|
/* 147 */ "HAVING",
|
|
/* 148 */ "LIMIT",
|
|
/* 149 */ "WHERE",
|
|
/* 150 */ "RETURNING",
|
|
/* 151 */ "INTO",
|
|
/* 152 */ "NOTHING",
|
|
/* 153 */ "FLOAT",
|
|
/* 154 */ "BLOB",
|
|
/* 155 */ "INTEGER",
|
|
/* 156 */ "VARIABLE",
|
|
/* 157 */ "CASE",
|
|
/* 158 */ "WHEN",
|
|
/* 159 */ "THEN",
|
|
/* 160 */ "ELSE",
|
|
/* 161 */ "INDEX",
|
|
/* 162 */ "ALTER",
|
|
/* 163 */ "ADD",
|
|
/* 164 */ "WINDOW",
|
|
/* 165 */ "OVER",
|
|
/* 166 */ "FILTER",
|
|
/* 167 */ "COLUMN",
|
|
/* 168 */ "AGG_FUNCTION",
|
|
/* 169 */ "AGG_COLUMN",
|
|
/* 170 */ "TRUEFALSE",
|
|
/* 171 */ "ISNOT",
|
|
/* 172 */ "FUNCTION",
|
|
/* 173 */ "UMINUS",
|
|
/* 174 */ "UPLUS",
|
|
/* 175 */ "TRUTH",
|
|
/* 176 */ "REGISTER",
|
|
/* 177 */ "VECTOR",
|
|
/* 178 */ "SELECT_COLUMN",
|
|
/* 179 */ "IF_NULL_ROW",
|
|
/* 180 */ "ASTERISK",
|
|
/* 181 */ "SPAN",
|
|
/* 182 */ "ERROR",
|
|
/* 183 */ "SPACE",
|
|
/* 184 */ "ILLEGAL",
|
|
/* 185 */ "input",
|
|
/* 186 */ "cmdlist",
|
|
/* 187 */ "ecmd",
|
|
/* 188 */ "cmdx",
|
|
/* 189 */ "explain",
|
|
/* 190 */ "cmd",
|
|
/* 191 */ "transtype",
|
|
/* 192 */ "trans_opt",
|
|
/* 193 */ "nm",
|
|
/* 194 */ "savepoint_opt",
|
|
/* 195 */ "create_table",
|
|
/* 196 */ "create_table_args",
|
|
/* 197 */ "createkw",
|
|
/* 198 */ "temp",
|
|
/* 199 */ "ifnotexists",
|
|
/* 200 */ "dbnm",
|
|
/* 201 */ "columnlist",
|
|
/* 202 */ "conslist_opt",
|
|
/* 203 */ "table_option_set",
|
|
/* 204 */ "select",
|
|
/* 205 */ "table_option",
|
|
/* 206 */ "columnname",
|
|
/* 207 */ "carglist",
|
|
/* 208 */ "typetoken",
|
|
/* 209 */ "typename",
|
|
/* 210 */ "signed",
|
|
/* 211 */ "plus_num",
|
|
/* 212 */ "minus_num",
|
|
/* 213 */ "scanpt",
|
|
/* 214 */ "scantok",
|
|
/* 215 */ "ccons",
|
|
/* 216 */ "term",
|
|
/* 217 */ "expr",
|
|
/* 218 */ "onconf",
|
|
/* 219 */ "sortorder",
|
|
/* 220 */ "autoinc",
|
|
/* 221 */ "eidlist_opt",
|
|
/* 222 */ "refargs",
|
|
/* 223 */ "defer_subclause",
|
|
/* 224 */ "generated",
|
|
/* 225 */ "refarg",
|
|
/* 226 */ "refact",
|
|
/* 227 */ "init_deferred_pred_opt",
|
|
/* 228 */ "conslist",
|
|
/* 229 */ "tconscomma",
|
|
/* 230 */ "tcons",
|
|
/* 231 */ "sortlist",
|
|
/* 232 */ "eidlist",
|
|
/* 233 */ "defer_subclause_opt",
|
|
/* 234 */ "orconf",
|
|
/* 235 */ "resolvetype",
|
|
/* 236 */ "raisetype",
|
|
/* 237 */ "ifexists",
|
|
/* 238 */ "fullname",
|
|
/* 239 */ "selectnowith",
|
|
/* 240 */ "oneselect",
|
|
/* 241 */ "wqlist",
|
|
/* 242 */ "multiselect_op",
|
|
/* 243 */ "distinct",
|
|
/* 244 */ "selcollist",
|
|
/* 245 */ "from",
|
|
/* 246 */ "where_opt",
|
|
/* 247 */ "groupby_opt",
|
|
/* 248 */ "having_opt",
|
|
/* 249 */ "orderby_opt",
|
|
/* 250 */ "limit_opt",
|
|
/* 251 */ "window_clause",
|
|
/* 252 */ "values",
|
|
/* 253 */ "nexprlist",
|
|
/* 254 */ "sclp",
|
|
/* 255 */ "as",
|
|
/* 256 */ "seltablist",
|
|
/* 257 */ "stl_prefix",
|
|
/* 258 */ "joinop",
|
|
/* 259 */ "on_using",
|
|
/* 260 */ "indexed_by",
|
|
/* 261 */ "exprlist",
|
|
/* 262 */ "xfullname",
|
|
/* 263 */ "idlist",
|
|
/* 264 */ "indexed_opt",
|
|
/* 265 */ "nulls",
|
|
/* 266 */ "with",
|
|
/* 267 */ "where_opt_ret",
|
|
/* 268 */ "setlist",
|
|
/* 269 */ "insert_cmd",
|
|
/* 270 */ "idlist_opt",
|
|
/* 271 */ "upsert",
|
|
/* 272 */ "returning",
|
|
/* 273 */ "filter_over",
|
|
/* 274 */ "likeop",
|
|
/* 275 */ "between_op",
|
|
/* 276 */ "in_op",
|
|
/* 277 */ "paren_exprlist",
|
|
/* 278 */ "case_operand",
|
|
/* 279 */ "case_exprlist",
|
|
/* 280 */ "case_else",
|
|
/* 281 */ "uniqueflag",
|
|
/* 282 */ "collate",
|
|
/* 283 */ "vinto",
|
|
/* 284 */ "nmnum",
|
|
/* 285 */ "trigger_decl",
|
|
/* 286 */ "trigger_cmd_list",
|
|
/* 287 */ "trigger_time",
|
|
/* 288 */ "trigger_event",
|
|
/* 289 */ "foreach_clause",
|
|
/* 290 */ "when_clause",
|
|
/* 291 */ "trigger_cmd",
|
|
/* 292 */ "trnm",
|
|
/* 293 */ "tridxby",
|
|
/* 294 */ "database_kw_opt",
|
|
/* 295 */ "key_opt",
|
|
/* 296 */ "add_column_fullname",
|
|
/* 297 */ "kwcolumn_opt",
|
|
/* 298 */ "create_vtab",
|
|
/* 299 */ "vtabarglist",
|
|
/* 300 */ "vtabarg",
|
|
/* 301 */ "vtabargtoken",
|
|
/* 302 */ "lp",
|
|
/* 303 */ "anylist",
|
|
/* 304 */ "wqitem",
|
|
/* 305 */ "wqas",
|
|
/* 306 */ "windowdefn_list",
|
|
/* 307 */ "windowdefn",
|
|
/* 308 */ "window",
|
|
/* 309 */ "frame_opt",
|
|
/* 310 */ "part_opt",
|
|
/* 311 */ "filter_clause",
|
|
/* 312 */ "over_clause",
|
|
/* 313 */ "range_or_rows",
|
|
/* 314 */ "frame_bound",
|
|
/* 315 */ "frame_bound_s",
|
|
/* 316 */ "frame_bound_e",
|
|
/* 317 */ "frame_exclude_opt",
|
|
/* 318 */ "frame_exclude",
|
|
};
|
|
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
|
|
|
|
#ifndef NDEBUG
|
|
/* For tracing reduce actions, the names of all rules are required.
|
|
*/
|
|
static const char *const yyRuleName[] = {
|
|
/* 0 */ "explain ::= EXPLAIN",
|
|
/* 1 */ "explain ::= EXPLAIN QUERY PLAN",
|
|
/* 2 */ "cmdx ::= cmd",
|
|
/* 3 */ "cmd ::= BEGIN transtype trans_opt",
|
|
/* 4 */ "transtype ::=",
|
|
/* 5 */ "transtype ::= DEFERRED",
|
|
/* 6 */ "transtype ::= IMMEDIATE",
|
|
/* 7 */ "transtype ::= EXCLUSIVE",
|
|
/* 8 */ "cmd ::= COMMIT|END trans_opt",
|
|
/* 9 */ "cmd ::= ROLLBACK trans_opt",
|
|
/* 10 */ "cmd ::= SAVEPOINT nm",
|
|
/* 11 */ "cmd ::= RELEASE savepoint_opt nm",
|
|
/* 12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
|
|
/* 13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
|
|
/* 14 */ "createkw ::= CREATE",
|
|
/* 15 */ "ifnotexists ::=",
|
|
/* 16 */ "ifnotexists ::= IF NOT EXISTS",
|
|
/* 17 */ "temp ::= TEMP",
|
|
/* 18 */ "temp ::=",
|
|
/* 19 */ "create_table_args ::= LP columnlist conslist_opt RP table_option_set",
|
|
/* 20 */ "create_table_args ::= AS select",
|
|
/* 21 */ "table_option_set ::=",
|
|
/* 22 */ "table_option_set ::= table_option_set COMMA table_option",
|
|
/* 23 */ "table_option ::= WITHOUT nm",
|
|
/* 24 */ "table_option ::= nm",
|
|
/* 25 */ "columnname ::= nm typetoken",
|
|
/* 26 */ "typetoken ::=",
|
|
/* 27 */ "typetoken ::= typename LP signed RP",
|
|
/* 28 */ "typetoken ::= typename LP signed COMMA signed RP",
|
|
/* 29 */ "typename ::= typename ID|STRING",
|
|
/* 30 */ "scanpt ::=",
|
|
/* 31 */ "scantok ::=",
|
|
/* 32 */ "ccons ::= CONSTRAINT nm",
|
|
/* 33 */ "ccons ::= DEFAULT scantok term",
|
|
/* 34 */ "ccons ::= DEFAULT LP expr RP",
|
|
/* 35 */ "ccons ::= DEFAULT PLUS scantok term",
|
|
/* 36 */ "ccons ::= DEFAULT MINUS scantok term",
|
|
/* 37 */ "ccons ::= DEFAULT scantok ID|INDEXED",
|
|
/* 38 */ "ccons ::= NOT NULL onconf",
|
|
/* 39 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
|
|
/* 40 */ "ccons ::= UNIQUE onconf",
|
|
/* 41 */ "ccons ::= CHECK LP expr RP",
|
|
/* 42 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
|
|
/* 43 */ "ccons ::= defer_subclause",
|
|
/* 44 */ "ccons ::= COLLATE ID|STRING",
|
|
/* 45 */ "generated ::= LP expr RP",
|
|
/* 46 */ "generated ::= LP expr RP ID",
|
|
/* 47 */ "autoinc ::=",
|
|
/* 48 */ "autoinc ::= AUTOINCR",
|
|
/* 49 */ "refargs ::=",
|
|
/* 50 */ "refargs ::= refargs refarg",
|
|
/* 51 */ "refarg ::= MATCH nm",
|
|
/* 52 */ "refarg ::= ON INSERT refact",
|
|
/* 53 */ "refarg ::= ON DELETE refact",
|
|
/* 54 */ "refarg ::= ON UPDATE refact",
|
|
/* 55 */ "refact ::= SET NULL",
|
|
/* 56 */ "refact ::= SET DEFAULT",
|
|
/* 57 */ "refact ::= CASCADE",
|
|
/* 58 */ "refact ::= RESTRICT",
|
|
/* 59 */ "refact ::= NO ACTION",
|
|
/* 60 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
|
|
/* 61 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
|
|
/* 62 */ "init_deferred_pred_opt ::=",
|
|
/* 63 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
|
|
/* 64 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
|
|
/* 65 */ "conslist_opt ::=",
|
|
/* 66 */ "tconscomma ::= COMMA",
|
|
/* 67 */ "tcons ::= CONSTRAINT nm",
|
|
/* 68 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
|
|
/* 69 */ "tcons ::= UNIQUE LP sortlist RP onconf",
|
|
/* 70 */ "tcons ::= CHECK LP expr RP onconf",
|
|
/* 71 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
|
|
/* 72 */ "defer_subclause_opt ::=",
|
|
/* 73 */ "onconf ::=",
|
|
/* 74 */ "onconf ::= ON CONFLICT resolvetype",
|
|
/* 75 */ "orconf ::=",
|
|
/* 76 */ "orconf ::= OR resolvetype",
|
|
/* 77 */ "resolvetype ::= IGNORE",
|
|
/* 78 */ "resolvetype ::= REPLACE",
|
|
/* 79 */ "cmd ::= DROP TABLE ifexists fullname",
|
|
/* 80 */ "ifexists ::= IF EXISTS",
|
|
/* 81 */ "ifexists ::=",
|
|
/* 82 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
|
|
/* 83 */ "cmd ::= DROP VIEW ifexists fullname",
|
|
/* 84 */ "cmd ::= select",
|
|
/* 85 */ "select ::= WITH wqlist selectnowith",
|
|
/* 86 */ "select ::= WITH RECURSIVE wqlist selectnowith",
|
|
/* 87 */ "select ::= selectnowith",
|
|
/* 88 */ "selectnowith ::= selectnowith multiselect_op oneselect",
|
|
/* 89 */ "multiselect_op ::= UNION",
|
|
/* 90 */ "multiselect_op ::= UNION ALL",
|
|
/* 91 */ "multiselect_op ::= EXCEPT|INTERSECT",
|
|
/* 92 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
|
|
/* 93 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
|
|
/* 94 */ "values ::= VALUES LP nexprlist RP",
|
|
/* 95 */ "values ::= values COMMA LP nexprlist RP",
|
|
/* 96 */ "distinct ::= DISTINCT",
|
|
/* 97 */ "distinct ::= ALL",
|
|
/* 98 */ "distinct ::=",
|
|
/* 99 */ "sclp ::=",
|
|
/* 100 */ "selcollist ::= sclp scanpt expr scanpt as",
|
|
/* 101 */ "selcollist ::= sclp scanpt STAR",
|
|
/* 102 */ "selcollist ::= sclp scanpt nm DOT STAR",
|
|
/* 103 */ "as ::= AS nm",
|
|
/* 104 */ "as ::=",
|
|
/* 105 */ "from ::=",
|
|
/* 106 */ "from ::= FROM seltablist",
|
|
/* 107 */ "stl_prefix ::= seltablist joinop",
|
|
/* 108 */ "stl_prefix ::=",
|
|
/* 109 */ "seltablist ::= stl_prefix nm dbnm as on_using",
|
|
/* 110 */ "seltablist ::= stl_prefix nm dbnm as indexed_by on_using",
|
|
/* 111 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using",
|
|
/* 112 */ "seltablist ::= stl_prefix LP select RP as on_using",
|
|
/* 113 */ "seltablist ::= stl_prefix LP seltablist RP as on_using",
|
|
/* 114 */ "dbnm ::=",
|
|
/* 115 */ "dbnm ::= DOT nm",
|
|
/* 116 */ "fullname ::= nm",
|
|
/* 117 */ "fullname ::= nm DOT nm",
|
|
/* 118 */ "xfullname ::= nm",
|
|
/* 119 */ "xfullname ::= nm DOT nm",
|
|
/* 120 */ "xfullname ::= nm DOT nm AS nm",
|
|
/* 121 */ "xfullname ::= nm AS nm",
|
|
/* 122 */ "joinop ::= COMMA|JOIN",
|
|
/* 123 */ "joinop ::= JOIN_KW JOIN",
|
|
/* 124 */ "joinop ::= JOIN_KW nm JOIN",
|
|
/* 125 */ "joinop ::= JOIN_KW nm nm JOIN",
|
|
/* 126 */ "on_using ::= ON expr",
|
|
/* 127 */ "on_using ::= USING LP idlist RP",
|
|
/* 128 */ "on_using ::=",
|
|
/* 129 */ "indexed_opt ::=",
|
|
/* 130 */ "indexed_by ::= INDEXED BY nm",
|
|
/* 131 */ "indexed_by ::= NOT INDEXED",
|
|
/* 132 */ "orderby_opt ::=",
|
|
/* 133 */ "orderby_opt ::= ORDER BY sortlist",
|
|
/* 134 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
|
|
/* 135 */ "sortlist ::= expr sortorder nulls",
|
|
/* 136 */ "sortorder ::= ASC",
|
|
/* 137 */ "sortorder ::= DESC",
|
|
/* 138 */ "sortorder ::=",
|
|
/* 139 */ "nulls ::= NULLS FIRST",
|
|
/* 140 */ "nulls ::= NULLS LAST",
|
|
/* 141 */ "nulls ::=",
|
|
/* 142 */ "groupby_opt ::=",
|
|
/* 143 */ "groupby_opt ::= GROUP BY nexprlist",
|
|
/* 144 */ "having_opt ::=",
|
|
/* 145 */ "having_opt ::= HAVING expr",
|
|
/* 146 */ "limit_opt ::=",
|
|
/* 147 */ "limit_opt ::= LIMIT expr",
|
|
/* 148 */ "limit_opt ::= LIMIT expr OFFSET expr",
|
|
/* 149 */ "limit_opt ::= LIMIT expr COMMA expr",
|
|
/* 150 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret",
|
|
/* 151 */ "where_opt ::=",
|
|
/* 152 */ "where_opt ::= WHERE expr",
|
|
/* 153 */ "where_opt_ret ::=",
|
|
/* 154 */ "where_opt_ret ::= WHERE expr",
|
|
/* 155 */ "where_opt_ret ::= RETURNING selcollist",
|
|
/* 156 */ "where_opt_ret ::= WHERE expr RETURNING selcollist",
|
|
/* 157 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret",
|
|
/* 158 */ "setlist ::= setlist COMMA nm EQ expr",
|
|
/* 159 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
|
|
/* 160 */ "setlist ::= nm EQ expr",
|
|
/* 161 */ "setlist ::= LP idlist RP EQ expr",
|
|
/* 162 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
|
|
/* 163 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning",
|
|
/* 164 */ "upsert ::=",
|
|
/* 165 */ "upsert ::= RETURNING selcollist",
|
|
/* 166 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert",
|
|
/* 167 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert",
|
|
/* 168 */ "upsert ::= ON CONFLICT DO NOTHING returning",
|
|
/* 169 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning",
|
|
/* 170 */ "returning ::= RETURNING selcollist",
|
|
/* 171 */ "insert_cmd ::= INSERT orconf",
|
|
/* 172 */ "insert_cmd ::= REPLACE",
|
|
/* 173 */ "idlist_opt ::=",
|
|
/* 174 */ "idlist_opt ::= LP idlist RP",
|
|
/* 175 */ "idlist ::= idlist COMMA nm",
|
|
/* 176 */ "idlist ::= nm",
|
|
/* 177 */ "expr ::= LP expr RP",
|
|
/* 178 */ "expr ::= ID|INDEXED",
|
|
/* 179 */ "expr ::= JOIN_KW",
|
|
/* 180 */ "expr ::= nm DOT nm",
|
|
/* 181 */ "expr ::= nm DOT nm DOT nm",
|
|
/* 182 */ "term ::= NULL|FLOAT|BLOB",
|
|
/* 183 */ "term ::= STRING",
|
|
/* 184 */ "term ::= INTEGER",
|
|
/* 185 */ "expr ::= VARIABLE",
|
|
/* 186 */ "expr ::= expr COLLATE ID|STRING",
|
|
/* 187 */ "expr ::= CAST LP expr AS typetoken RP",
|
|
/* 188 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
|
|
/* 189 */ "expr ::= ID|INDEXED LP STAR RP",
|
|
/* 190 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over",
|
|
/* 191 */ "expr ::= ID|INDEXED LP STAR RP filter_over",
|
|
/* 192 */ "term ::= CTIME_KW",
|
|
/* 193 */ "expr ::= LP nexprlist COMMA expr RP",
|
|
/* 194 */ "expr ::= expr AND expr",
|
|
/* 195 */ "expr ::= expr OR expr",
|
|
/* 196 */ "expr ::= expr LT|GT|GE|LE expr",
|
|
/* 197 */ "expr ::= expr EQ|NE expr",
|
|
/* 198 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
|
|
/* 199 */ "expr ::= expr PLUS|MINUS expr",
|
|
/* 200 */ "expr ::= expr STAR|SLASH|REM expr",
|
|
/* 201 */ "expr ::= expr CONCAT expr",
|
|
/* 202 */ "likeop ::= NOT LIKE_KW|MATCH",
|
|
/* 203 */ "expr ::= expr likeop expr",
|
|
/* 204 */ "expr ::= expr likeop expr ESCAPE expr",
|
|
/* 205 */ "expr ::= expr ISNULL|NOTNULL",
|
|
/* 206 */ "expr ::= expr NOT NULL",
|
|
/* 207 */ "expr ::= expr IS expr",
|
|
/* 208 */ "expr ::= expr IS NOT expr",
|
|
/* 209 */ "expr ::= expr IS NOT DISTINCT FROM expr",
|
|
/* 210 */ "expr ::= expr IS DISTINCT FROM expr",
|
|
/* 211 */ "expr ::= NOT expr",
|
|
/* 212 */ "expr ::= BITNOT expr",
|
|
/* 213 */ "expr ::= PLUS|MINUS expr",
|
|
/* 214 */ "expr ::= expr PTR expr",
|
|
/* 215 */ "between_op ::= BETWEEN",
|
|
/* 216 */ "between_op ::= NOT BETWEEN",
|
|
/* 217 */ "expr ::= expr between_op expr AND expr",
|
|
/* 218 */ "in_op ::= IN",
|
|
/* 219 */ "in_op ::= NOT IN",
|
|
/* 220 */ "expr ::= expr in_op LP exprlist RP",
|
|
/* 221 */ "expr ::= LP select RP",
|
|
/* 222 */ "expr ::= expr in_op LP select RP",
|
|
/* 223 */ "expr ::= expr in_op nm dbnm paren_exprlist",
|
|
/* 224 */ "expr ::= EXISTS LP select RP",
|
|
/* 225 */ "expr ::= CASE case_operand case_exprlist case_else END",
|
|
/* 226 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
|
|
/* 227 */ "case_exprlist ::= WHEN expr THEN expr",
|
|
/* 228 */ "case_else ::= ELSE expr",
|
|
/* 229 */ "case_else ::=",
|
|
/* 230 */ "case_operand ::= expr",
|
|
/* 231 */ "case_operand ::=",
|
|
/* 232 */ "exprlist ::=",
|
|
/* 233 */ "nexprlist ::= nexprlist COMMA expr",
|
|
/* 234 */ "nexprlist ::= expr",
|
|
/* 235 */ "paren_exprlist ::=",
|
|
/* 236 */ "paren_exprlist ::= LP exprlist RP",
|
|
/* 237 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
|
|
/* 238 */ "uniqueflag ::= UNIQUE",
|
|
/* 239 */ "uniqueflag ::=",
|
|
/* 240 */ "eidlist_opt ::=",
|
|
/* 241 */ "eidlist_opt ::= LP eidlist RP",
|
|
/* 242 */ "eidlist ::= eidlist COMMA nm collate sortorder",
|
|
/* 243 */ "eidlist ::= nm collate sortorder",
|
|
/* 244 */ "collate ::=",
|
|
/* 245 */ "collate ::= COLLATE ID|STRING",
|
|
/* 246 */ "cmd ::= DROP INDEX ifexists fullname",
|
|
/* 247 */ "cmd ::= VACUUM vinto",
|
|
/* 248 */ "cmd ::= VACUUM nm vinto",
|
|
/* 249 */ "vinto ::= INTO expr",
|
|
/* 250 */ "vinto ::=",
|
|
/* 251 */ "cmd ::= PRAGMA nm dbnm",
|
|
/* 252 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
|
|
/* 253 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
|
|
/* 254 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
|
|
/* 255 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
|
|
/* 256 */ "plus_num ::= PLUS INTEGER|FLOAT",
|
|
/* 257 */ "minus_num ::= MINUS INTEGER|FLOAT",
|
|
/* 258 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
|
|
/* 259 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
|
|
/* 260 */ "trigger_time ::= BEFORE|AFTER",
|
|
/* 261 */ "trigger_time ::= INSTEAD OF",
|
|
/* 262 */ "trigger_time ::=",
|
|
/* 263 */ "trigger_event ::= DELETE|INSERT",
|
|
/* 264 */ "trigger_event ::= UPDATE",
|
|
/* 265 */ "trigger_event ::= UPDATE OF idlist",
|
|
/* 266 */ "when_clause ::=",
|
|
/* 267 */ "when_clause ::= WHEN expr",
|
|
/* 268 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
|
|
/* 269 */ "trigger_cmd_list ::= trigger_cmd SEMI",
|
|
/* 270 */ "trnm ::= nm DOT nm",
|
|
/* 271 */ "tridxby ::= INDEXED BY nm",
|
|
/* 272 */ "tridxby ::= NOT INDEXED",
|
|
/* 273 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt",
|
|
/* 274 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
|
|
/* 275 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
|
|
/* 276 */ "trigger_cmd ::= scanpt select scanpt",
|
|
/* 277 */ "expr ::= RAISE LP IGNORE RP",
|
|
/* 278 */ "expr ::= RAISE LP raisetype COMMA nm RP",
|
|
/* 279 */ "raisetype ::= ROLLBACK",
|
|
/* 280 */ "raisetype ::= ABORT",
|
|
/* 281 */ "raisetype ::= FAIL",
|
|
/* 282 */ "cmd ::= DROP TRIGGER ifexists fullname",
|
|
/* 283 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
|
|
/* 284 */ "cmd ::= DETACH database_kw_opt expr",
|
|
/* 285 */ "key_opt ::=",
|
|
/* 286 */ "key_opt ::= KEY expr",
|
|
/* 287 */ "cmd ::= REINDEX",
|
|
/* 288 */ "cmd ::= REINDEX nm dbnm",
|
|
/* 289 */ "cmd ::= ANALYZE",
|
|
/* 290 */ "cmd ::= ANALYZE nm dbnm",
|
|
/* 291 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
|
|
/* 292 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
|
|
/* 293 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
|
|
/* 294 */ "add_column_fullname ::= fullname",
|
|
/* 295 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
|
|
/* 296 */ "cmd ::= create_vtab",
|
|
/* 297 */ "cmd ::= create_vtab LP vtabarglist RP",
|
|
/* 298 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
|
|
/* 299 */ "vtabarg ::=",
|
|
/* 300 */ "vtabargtoken ::= ANY",
|
|
/* 301 */ "vtabargtoken ::= lp anylist RP",
|
|
/* 302 */ "lp ::= LP",
|
|
/* 303 */ "with ::= WITH wqlist",
|
|
/* 304 */ "with ::= WITH RECURSIVE wqlist",
|
|
/* 305 */ "wqas ::= AS",
|
|
/* 306 */ "wqas ::= AS MATERIALIZED",
|
|
/* 307 */ "wqas ::= AS NOT MATERIALIZED",
|
|
/* 308 */ "wqitem ::= nm eidlist_opt wqas LP select RP",
|
|
/* 309 */ "wqlist ::= wqitem",
|
|
/* 310 */ "wqlist ::= wqlist COMMA wqitem",
|
|
/* 311 */ "windowdefn_list ::= windowdefn",
|
|
/* 312 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
|
|
/* 313 */ "windowdefn ::= nm AS LP window RP",
|
|
/* 314 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
|
|
/* 315 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
|
|
/* 316 */ "window ::= ORDER BY sortlist frame_opt",
|
|
/* 317 */ "window ::= nm ORDER BY sortlist frame_opt",
|
|
/* 318 */ "window ::= frame_opt",
|
|
/* 319 */ "window ::= nm frame_opt",
|
|
/* 320 */ "frame_opt ::=",
|
|
/* 321 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
|
|
/* 322 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
|
|
/* 323 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
|
|
/* 324 */ "frame_bound_s ::= frame_bound",
|
|
/* 325 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
|
|
/* 326 */ "frame_bound_e ::= frame_bound",
|
|
/* 327 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
|
|
/* 328 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
|
|
/* 329 */ "frame_bound ::= CURRENT ROW",
|
|
/* 330 */ "frame_exclude_opt ::=",
|
|
/* 331 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
|
|
/* 332 */ "frame_exclude ::= NO OTHERS",
|
|
/* 333 */ "frame_exclude ::= CURRENT ROW",
|
|
/* 334 */ "frame_exclude ::= GROUP|TIES",
|
|
/* 335 */ "window_clause ::= WINDOW windowdefn_list",
|
|
/* 336 */ "filter_over ::= filter_clause over_clause",
|
|
/* 337 */ "filter_over ::= over_clause",
|
|
/* 338 */ "filter_over ::= filter_clause",
|
|
/* 339 */ "over_clause ::= OVER LP window RP",
|
|
/* 340 */ "over_clause ::= OVER nm",
|
|
/* 341 */ "filter_clause ::= FILTER LP WHERE expr RP",
|
|
/* 342 */ "input ::= cmdlist",
|
|
/* 343 */ "cmdlist ::= cmdlist ecmd",
|
|
/* 344 */ "cmdlist ::= ecmd",
|
|
/* 345 */ "ecmd ::= SEMI",
|
|
/* 346 */ "ecmd ::= cmdx SEMI",
|
|
/* 347 */ "ecmd ::= explain cmdx SEMI",
|
|
/* 348 */ "trans_opt ::=",
|
|
/* 349 */ "trans_opt ::= TRANSACTION",
|
|
/* 350 */ "trans_opt ::= TRANSACTION nm",
|
|
/* 351 */ "savepoint_opt ::= SAVEPOINT",
|
|
/* 352 */ "savepoint_opt ::=",
|
|
/* 353 */ "cmd ::= create_table create_table_args",
|
|
/* 354 */ "table_option_set ::= table_option",
|
|
/* 355 */ "columnlist ::= columnlist COMMA columnname carglist",
|
|
/* 356 */ "columnlist ::= columnname carglist",
|
|
/* 357 */ "nm ::= ID|INDEXED",
|
|
/* 358 */ "nm ::= STRING",
|
|
/* 359 */ "nm ::= JOIN_KW",
|
|
/* 360 */ "typetoken ::= typename",
|
|
/* 361 */ "typename ::= ID|STRING",
|
|
/* 362 */ "signed ::= plus_num",
|
|
/* 363 */ "signed ::= minus_num",
|
|
/* 364 */ "carglist ::= carglist ccons",
|
|
/* 365 */ "carglist ::=",
|
|
/* 366 */ "ccons ::= NULL onconf",
|
|
/* 367 */ "ccons ::= GENERATED ALWAYS AS generated",
|
|
/* 368 */ "ccons ::= AS generated",
|
|
/* 369 */ "conslist_opt ::= COMMA conslist",
|
|
/* 370 */ "conslist ::= conslist tconscomma tcons",
|
|
/* 371 */ "conslist ::= tcons",
|
|
/* 372 */ "tconscomma ::=",
|
|
/* 373 */ "defer_subclause_opt ::= defer_subclause",
|
|
/* 374 */ "resolvetype ::= raisetype",
|
|
/* 375 */ "selectnowith ::= oneselect",
|
|
/* 376 */ "oneselect ::= values",
|
|
/* 377 */ "sclp ::= selcollist COMMA",
|
|
/* 378 */ "as ::= ID|STRING",
|
|
/* 379 */ "indexed_opt ::= indexed_by",
|
|
/* 380 */ "returning ::=",
|
|
/* 381 */ "expr ::= term",
|
|
/* 382 */ "likeop ::= LIKE_KW|MATCH",
|
|
/* 383 */ "exprlist ::= nexprlist",
|
|
/* 384 */ "nmnum ::= plus_num",
|
|
/* 385 */ "nmnum ::= nm",
|
|
/* 386 */ "nmnum ::= ON",
|
|
/* 387 */ "nmnum ::= DELETE",
|
|
/* 388 */ "nmnum ::= DEFAULT",
|
|
/* 389 */ "plus_num ::= INTEGER|FLOAT",
|
|
/* 390 */ "foreach_clause ::=",
|
|
/* 391 */ "foreach_clause ::= FOR EACH ROW",
|
|
/* 392 */ "trnm ::= nm",
|
|
/* 393 */ "tridxby ::=",
|
|
/* 394 */ "database_kw_opt ::= DATABASE",
|
|
/* 395 */ "database_kw_opt ::=",
|
|
/* 396 */ "kwcolumn_opt ::=",
|
|
/* 397 */ "kwcolumn_opt ::= COLUMNKW",
|
|
/* 398 */ "vtabarglist ::= vtabarg",
|
|
/* 399 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
|
|
/* 400 */ "vtabarg ::= vtabarg vtabargtoken",
|
|
/* 401 */ "anylist ::=",
|
|
/* 402 */ "anylist ::= anylist LP anylist RP",
|
|
/* 403 */ "anylist ::= anylist ANY",
|
|
/* 404 */ "with ::=",
|
|
};
|
|
#endif /* NDEBUG */
|
|
|
|
|
|
#if YYSTACKDEPTH<=0
|
|
/*
|
|
** Try to increase the size of the parser stack. Return the number
|
|
** of errors. Return 0 on success.
|
|
*/
|
|
static int yyGrowStack(yyParser *p){
|
|
int newSize;
|
|
int idx;
|
|
yyStackEntry *pNew;
|
|
|
|
newSize = p->yystksz*2 + 100;
|
|
idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
|
|
if( p->yystack==&p->yystk0 ){
|
|
pNew = malloc(newSize*sizeof(pNew[0]));
|
|
if( pNew ) pNew[0] = p->yystk0;
|
|
}else{
|
|
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
|
|
}
|
|
if( pNew ){
|
|
p->yystack = pNew;
|
|
p->yytos = &p->yystack[idx];
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
|
|
yyTracePrompt, p->yystksz, newSize);
|
|
}
|
|
#endif
|
|
p->yystksz = newSize;
|
|
}
|
|
return pNew==0;
|
|
}
|
|
#endif
|
|
|
|
/* Datatype of the argument to the memory allocated passed as the
|
|
** second argument to sqlite3ParserAlloc() below. This can be changed by
|
|
** putting an appropriate #define in the %include section of the input
|
|
** grammar.
|
|
*/
|
|
#ifndef YYMALLOCARGTYPE
|
|
# define YYMALLOCARGTYPE size_t
|
|
#endif
|
|
|
|
/* Initialize a new parser that has already been allocated.
|
|
*/
|
|
void sqlite3ParserInit(void *yypRawParser sqlite3ParserCTX_PDECL){
|
|
yyParser *yypParser = (yyParser*)yypRawParser;
|
|
sqlite3ParserCTX_STORE
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
yypParser->yyhwm = 0;
|
|
#endif
|
|
#if YYSTACKDEPTH<=0
|
|
yypParser->yytos = NULL;
|
|
yypParser->yystack = NULL;
|
|
yypParser->yystksz = 0;
|
|
if( yyGrowStack(yypParser) ){
|
|
yypParser->yystack = &yypParser->yystk0;
|
|
yypParser->yystksz = 1;
|
|
}
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
yypParser->yytos = yypParser->yystack;
|
|
yypParser->yystack[0].stateno = 0;
|
|
yypParser->yystack[0].major = 0;
|
|
#if YYSTACKDEPTH>0
|
|
yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
|
|
#endif
|
|
}
|
|
|
|
#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
|
|
/*
|
|
** This function allocates a new parser.
|
|
** The only argument is a pointer to a function which works like
|
|
** malloc.
|
|
**
|
|
** Inputs:
|
|
** A pointer to the function used to allocate memory.
|
|
**
|
|
** Outputs:
|
|
** A pointer to a parser. This pointer is used in subsequent calls
|
|
** to sqlite3Parser and sqlite3ParserFree.
|
|
*/
|
|
void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) sqlite3ParserCTX_PDECL){
|
|
yyParser *yypParser;
|
|
yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
|
|
if( yypParser ){
|
|
sqlite3ParserCTX_STORE
|
|
sqlite3ParserInit(yypParser sqlite3ParserCTX_PARAM);
|
|
}
|
|
return (void*)yypParser;
|
|
}
|
|
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */
|
|
|
|
|
|
/* The following function deletes the "minor type" or semantic value
|
|
** associated with a symbol. The symbol can be either a terminal
|
|
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
|
|
** a pointer to the value to be deleted. The code used to do the
|
|
** deletions is derived from the %destructor and/or %token_destructor
|
|
** directives of the input grammar.
|
|
*/
|
|
static void yy_destructor(
|
|
yyParser *yypParser, /* The parser */
|
|
YYCODETYPE yymajor, /* Type code for object to destroy */
|
|
YYMINORTYPE *yypminor /* The object to be destroyed */
|
|
){
|
|
sqlite3ParserARG_FETCH
|
|
sqlite3ParserCTX_FETCH
|
|
switch( yymajor ){
|
|
/* Here is inserted the actions which take place when a
|
|
** terminal or non-terminal is destroyed. This can happen
|
|
** when the symbol is popped from the stack during a
|
|
** reduce or during error processing or when a parser is
|
|
** being destroyed before it is finished parsing.
|
|
**
|
|
** Note: during a reduce, the only symbols destroyed are those
|
|
** which appear on the RHS of the rule, but which are *not* used
|
|
** inside the C code.
|
|
*/
|
|
/********* Begin destructor definitions ***************************************/
|
|
case 204: /* select */
|
|
case 239: /* selectnowith */
|
|
case 240: /* oneselect */
|
|
case 252: /* values */
|
|
{
|
|
#line 496 "parse.y"
|
|
sqlite3SelectDelete(pParse->db, (yypminor->yy47));
|
|
#line 2390 "parse.c"
|
|
}
|
|
break;
|
|
case 216: /* term */
|
|
case 217: /* expr */
|
|
case 246: /* where_opt */
|
|
case 248: /* having_opt */
|
|
case 267: /* where_opt_ret */
|
|
case 278: /* case_operand */
|
|
case 280: /* case_else */
|
|
case 283: /* vinto */
|
|
case 290: /* when_clause */
|
|
case 295: /* key_opt */
|
|
case 311: /* filter_clause */
|
|
{
|
|
#line 1045 "parse.y"
|
|
sqlite3ExprDelete(pParse->db, (yypminor->yy528));
|
|
#line 2407 "parse.c"
|
|
}
|
|
break;
|
|
case 221: /* eidlist_opt */
|
|
case 231: /* sortlist */
|
|
case 232: /* eidlist */
|
|
case 244: /* selcollist */
|
|
case 247: /* groupby_opt */
|
|
case 249: /* orderby_opt */
|
|
case 253: /* nexprlist */
|
|
case 254: /* sclp */
|
|
case 261: /* exprlist */
|
|
case 268: /* setlist */
|
|
case 277: /* paren_exprlist */
|
|
case 279: /* case_exprlist */
|
|
case 310: /* part_opt */
|
|
{
|
|
#line 1435 "parse.y"
|
|
sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
|
|
#line 2426 "parse.c"
|
|
}
|
|
break;
|
|
case 238: /* fullname */
|
|
case 245: /* from */
|
|
case 256: /* seltablist */
|
|
case 257: /* stl_prefix */
|
|
case 262: /* xfullname */
|
|
{
|
|
#line 751 "parse.y"
|
|
sqlite3SrcListDelete(pParse->db, (yypminor->yy131));
|
|
#line 2437 "parse.c"
|
|
}
|
|
break;
|
|
case 241: /* wqlist */
|
|
{
|
|
#line 1722 "parse.y"
|
|
sqlite3WithDelete(pParse->db, (yypminor->yy521));
|
|
#line 2444 "parse.c"
|
|
}
|
|
break;
|
|
case 251: /* window_clause */
|
|
case 306: /* windowdefn_list */
|
|
{
|
|
#line 1851 "parse.y"
|
|
sqlite3WindowListDelete(pParse->db, (yypminor->yy41));
|
|
#line 2452 "parse.c"
|
|
}
|
|
break;
|
|
case 263: /* idlist */
|
|
case 270: /* idlist_opt */
|
|
{
|
|
#line 1030 "parse.y"
|
|
sqlite3IdListDelete(pParse->db, (yypminor->yy254));
|
|
#line 2460 "parse.c"
|
|
}
|
|
break;
|
|
case 273: /* filter_over */
|
|
case 307: /* windowdefn */
|
|
case 308: /* window */
|
|
case 309: /* frame_opt */
|
|
case 312: /* over_clause */
|
|
{
|
|
#line 1788 "parse.y"
|
|
sqlite3WindowDelete(pParse->db, (yypminor->yy41));
|
|
#line 2471 "parse.c"
|
|
}
|
|
break;
|
|
case 286: /* trigger_cmd_list */
|
|
case 291: /* trigger_cmd */
|
|
{
|
|
#line 1550 "parse.y"
|
|
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy33));
|
|
#line 2479 "parse.c"
|
|
}
|
|
break;
|
|
case 288: /* trigger_event */
|
|
{
|
|
#line 1536 "parse.y"
|
|
sqlite3IdListDelete(pParse->db, (yypminor->yy180).b);
|
|
#line 2486 "parse.c"
|
|
}
|
|
break;
|
|
case 314: /* frame_bound */
|
|
case 315: /* frame_bound_s */
|
|
case 316: /* frame_bound_e */
|
|
{
|
|
#line 1793 "parse.y"
|
|
sqlite3ExprDelete(pParse->db, (yypminor->yy595).pExpr);
|
|
#line 2495 "parse.c"
|
|
}
|
|
break;
|
|
/********* End destructor definitions *****************************************/
|
|
default: break; /* If no destructor action specified: do nothing */
|
|
}
|
|
}
|
|
|
|
/*
|
|
** Pop the parser's stack once.
|
|
**
|
|
** If there is a destructor routine associated with the token which
|
|
** is popped from the stack, then call it.
|
|
*/
|
|
static void yy_pop_parser_stack(yyParser *pParser){
|
|
yyStackEntry *yytos;
|
|
assert( pParser->yytos!=0 );
|
|
assert( pParser->yytos > pParser->yystack );
|
|
yytos = pParser->yytos--;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sPopping %s\n",
|
|
yyTracePrompt,
|
|
yyTokenName[yytos->major]);
|
|
}
|
|
#endif
|
|
yy_destructor(pParser, yytos->major, &yytos->minor);
|
|
}
|
|
|
|
/*
|
|
** Clear all secondary memory allocations from the parser
|
|
*/
|
|
void sqlite3ParserFinalize(void *p){
|
|
yyParser *pParser = (yyParser*)p;
|
|
while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
|
|
#if YYSTACKDEPTH<=0
|
|
if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
|
|
#endif
|
|
}
|
|
|
|
#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
|
|
/*
|
|
** Deallocate and destroy a parser. Destructors are called for
|
|
** all stack elements before shutting the parser down.
|
|
**
|
|
** If the YYPARSEFREENEVERNULL macro exists (for example because it
|
|
** is defined in a %include section of the input grammar) then it is
|
|
** assumed that the input pointer is never NULL.
|
|
*/
|
|
void sqlite3ParserFree(
|
|
void *p, /* The parser to be deleted */
|
|
void (*freeProc)(void*) /* Function used to reclaim memory */
|
|
){
|
|
#ifndef YYPARSEFREENEVERNULL
|
|
if( p==0 ) return;
|
|
#endif
|
|
sqlite3ParserFinalize(p);
|
|
(*freeProc)(p);
|
|
}
|
|
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */
|
|
|
|
/*
|
|
** Return the peak depth of the stack for a parser.
|
|
*/
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
int sqlite3ParserStackPeak(void *p){
|
|
yyParser *pParser = (yyParser*)p;
|
|
return pParser->yyhwm;
|
|
}
|
|
#endif
|
|
|
|
/* This array of booleans keeps track of the parser statement
|
|
** coverage. The element yycoverage[X][Y] is set when the parser
|
|
** is in state X and has a lookahead token Y. In a well-tested
|
|
** systems, every element of this matrix should end up being set.
|
|
*/
|
|
#if defined(YYCOVERAGE)
|
|
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
|
|
#endif
|
|
|
|
/*
|
|
** Write into out a description of every state/lookahead combination that
|
|
**
|
|
** (1) has not been used by the parser, and
|
|
** (2) is not a syntax error.
|
|
**
|
|
** Return the number of missed state/lookahead combinations.
|
|
*/
|
|
#if defined(YYCOVERAGE)
|
|
int sqlite3ParserCoverage(FILE *out){
|
|
int stateno, iLookAhead, i;
|
|
int nMissed = 0;
|
|
for(stateno=0; stateno<YYNSTATE; stateno++){
|
|
i = yy_shift_ofst[stateno];
|
|
for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
|
|
if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
|
|
if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
|
|
if( out ){
|
|
fprintf(out,"State %d lookahead %s %s\n", stateno,
|
|
yyTokenName[iLookAhead],
|
|
yycoverage[stateno][iLookAhead] ? "ok" : "missed");
|
|
}
|
|
}
|
|
}
|
|
return nMissed;
|
|
}
|
|
#endif
|
|
|
|
/*
|
|
** Find the appropriate action for a parser given the terminal
|
|
** look-ahead token iLookAhead.
|
|
*/
|
|
static YYACTIONTYPE yy_find_shift_action(
|
|
YYCODETYPE iLookAhead, /* The look-ahead token */
|
|
YYACTIONTYPE stateno /* Current state number */
|
|
){
|
|
int i;
|
|
|
|
if( stateno>YY_MAX_SHIFT ) return stateno;
|
|
assert( stateno <= YY_SHIFT_COUNT );
|
|
#if defined(YYCOVERAGE)
|
|
yycoverage[stateno][iLookAhead] = 1;
|
|
#endif
|
|
do{
|
|
i = yy_shift_ofst[stateno];
|
|
assert( i>=0 );
|
|
assert( i<=YY_ACTTAB_COUNT );
|
|
assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
|
|
assert( iLookAhead!=YYNOCODE );
|
|
assert( iLookAhead < YYNTOKEN );
|
|
i += iLookAhead;
|
|
assert( i<(int)YY_NLOOKAHEAD );
|
|
if( yy_lookahead[i]!=iLookAhead ){
|
|
#ifdef YYFALLBACK
|
|
YYCODETYPE iFallback; /* Fallback token */
|
|
assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
|
|
iFallback = yyFallback[iLookAhead];
|
|
if( iFallback!=0 ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
|
|
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
|
|
}
|
|
#endif
|
|
assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
|
iLookAhead = iFallback;
|
|
continue;
|
|
}
|
|
#endif
|
|
#ifdef YYWILDCARD
|
|
{
|
|
int j = i - iLookAhead + YYWILDCARD;
|
|
assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
|
|
if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
|
yyTracePrompt, yyTokenName[iLookAhead],
|
|
yyTokenName[YYWILDCARD]);
|
|
}
|
|
#endif /* NDEBUG */
|
|
return yy_action[j];
|
|
}
|
|
}
|
|
#endif /* YYWILDCARD */
|
|
return yy_default[stateno];
|
|
}else{
|
|
assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
|
|
return yy_action[i];
|
|
}
|
|
}while(1);
|
|
}
|
|
|
|
/*
|
|
** Find the appropriate action for a parser given the non-terminal
|
|
** look-ahead token iLookAhead.
|
|
*/
|
|
static YYACTIONTYPE yy_find_reduce_action(
|
|
YYACTIONTYPE stateno, /* Current state number */
|
|
YYCODETYPE iLookAhead /* The look-ahead token */
|
|
){
|
|
int i;
|
|
#ifdef YYERRORSYMBOL
|
|
if( stateno>YY_REDUCE_COUNT ){
|
|
return yy_default[stateno];
|
|
}
|
|
#else
|
|
assert( stateno<=YY_REDUCE_COUNT );
|
|
#endif
|
|
i = yy_reduce_ofst[stateno];
|
|
assert( iLookAhead!=YYNOCODE );
|
|
i += iLookAhead;
|
|
#ifdef YYERRORSYMBOL
|
|
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
|
|
return yy_default[stateno];
|
|
}
|
|
#else
|
|
assert( i>=0 && i<YY_ACTTAB_COUNT );
|
|
assert( yy_lookahead[i]==iLookAhead );
|
|
#endif
|
|
return yy_action[i];
|
|
}
|
|
|
|
/*
|
|
** The following routine is called if the stack overflows.
|
|
*/
|
|
static void yyStackOverflow(yyParser *yypParser){
|
|
sqlite3ParserARG_FETCH
|
|
sqlite3ParserCTX_FETCH
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
|
|
}
|
|
#endif
|
|
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
|
|
/* Here code is inserted which will execute if the parser
|
|
** stack every overflows */
|
|
/******** Begin %stack_overflow code ******************************************/
|
|
#line 47 "parse.y"
|
|
|
|
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
|
#line 2716 "parse.c"
|
|
/******** End %stack_overflow code ********************************************/
|
|
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
|
|
sqlite3ParserCTX_STORE
|
|
}
|
|
|
|
/*
|
|
** Print tracing information for a SHIFT action
|
|
*/
|
|
#ifndef NDEBUG
|
|
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
|
|
if( yyTraceFILE ){
|
|
if( yyNewState<YYNSTATE ){
|
|
fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
|
|
yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
|
|
yyNewState);
|
|
}else{
|
|
fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
|
|
yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
|
|
yyNewState - YY_MIN_REDUCE);
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
# define yyTraceShift(X,Y,Z)
|
|
#endif
|
|
|
|
/*
|
|
** Perform a shift action.
|
|
*/
|
|
static void yy_shift(
|
|
yyParser *yypParser, /* The parser to be shifted */
|
|
YYACTIONTYPE yyNewState, /* The new state to shift in */
|
|
YYCODETYPE yyMajor, /* The major token to shift in */
|
|
sqlite3ParserTOKENTYPE yyMinor /* The minor token to shift in */
|
|
){
|
|
yyStackEntry *yytos;
|
|
yypParser->yytos++;
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
|
|
yypParser->yyhwm++;
|
|
assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
|
|
}
|
|
#endif
|
|
#if YYSTACKDEPTH>0
|
|
if( yypParser->yytos>yypParser->yystackEnd ){
|
|
yypParser->yytos--;
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
#else
|
|
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
|
|
if( yyGrowStack(yypParser) ){
|
|
yypParser->yytos--;
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
}
|
|
#endif
|
|
if( yyNewState > YY_MAX_SHIFT ){
|
|
yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
|
|
}
|
|
yytos = yypParser->yytos;
|
|
yytos->stateno = yyNewState;
|
|
yytos->major = yyMajor;
|
|
yytos->minor.yy0 = yyMinor;
|
|
yyTraceShift(yypParser, yyNewState, "Shift");
|
|
}
|
|
|
|
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
|
|
** of that rule */
|
|
static const YYCODETYPE yyRuleInfoLhs[] = {
|
|
189, /* (0) explain ::= EXPLAIN */
|
|
189, /* (1) explain ::= EXPLAIN QUERY PLAN */
|
|
188, /* (2) cmdx ::= cmd */
|
|
190, /* (3) cmd ::= BEGIN transtype trans_opt */
|
|
191, /* (4) transtype ::= */
|
|
191, /* (5) transtype ::= DEFERRED */
|
|
191, /* (6) transtype ::= IMMEDIATE */
|
|
191, /* (7) transtype ::= EXCLUSIVE */
|
|
190, /* (8) cmd ::= COMMIT|END trans_opt */
|
|
190, /* (9) cmd ::= ROLLBACK trans_opt */
|
|
190, /* (10) cmd ::= SAVEPOINT nm */
|
|
190, /* (11) cmd ::= RELEASE savepoint_opt nm */
|
|
190, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
|
|
195, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
|
|
197, /* (14) createkw ::= CREATE */
|
|
199, /* (15) ifnotexists ::= */
|
|
199, /* (16) ifnotexists ::= IF NOT EXISTS */
|
|
198, /* (17) temp ::= TEMP */
|
|
198, /* (18) temp ::= */
|
|
196, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
|
|
196, /* (20) create_table_args ::= AS select */
|
|
203, /* (21) table_option_set ::= */
|
|
203, /* (22) table_option_set ::= table_option_set COMMA table_option */
|
|
205, /* (23) table_option ::= WITHOUT nm */
|
|
205, /* (24) table_option ::= nm */
|
|
206, /* (25) columnname ::= nm typetoken */
|
|
208, /* (26) typetoken ::= */
|
|
208, /* (27) typetoken ::= typename LP signed RP */
|
|
208, /* (28) typetoken ::= typename LP signed COMMA signed RP */
|
|
209, /* (29) typename ::= typename ID|STRING */
|
|
213, /* (30) scanpt ::= */
|
|
214, /* (31) scantok ::= */
|
|
215, /* (32) ccons ::= CONSTRAINT nm */
|
|
215, /* (33) ccons ::= DEFAULT scantok term */
|
|
215, /* (34) ccons ::= DEFAULT LP expr RP */
|
|
215, /* (35) ccons ::= DEFAULT PLUS scantok term */
|
|
215, /* (36) ccons ::= DEFAULT MINUS scantok term */
|
|
215, /* (37) ccons ::= DEFAULT scantok ID|INDEXED */
|
|
215, /* (38) ccons ::= NOT NULL onconf */
|
|
215, /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */
|
|
215, /* (40) ccons ::= UNIQUE onconf */
|
|
215, /* (41) ccons ::= CHECK LP expr RP */
|
|
215, /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */
|
|
215, /* (43) ccons ::= defer_subclause */
|
|
215, /* (44) ccons ::= COLLATE ID|STRING */
|
|
224, /* (45) generated ::= LP expr RP */
|
|
224, /* (46) generated ::= LP expr RP ID */
|
|
220, /* (47) autoinc ::= */
|
|
220, /* (48) autoinc ::= AUTOINCR */
|
|
222, /* (49) refargs ::= */
|
|
222, /* (50) refargs ::= refargs refarg */
|
|
225, /* (51) refarg ::= MATCH nm */
|
|
225, /* (52) refarg ::= ON INSERT refact */
|
|
225, /* (53) refarg ::= ON DELETE refact */
|
|
225, /* (54) refarg ::= ON UPDATE refact */
|
|
226, /* (55) refact ::= SET NULL */
|
|
226, /* (56) refact ::= SET DEFAULT */
|
|
226, /* (57) refact ::= CASCADE */
|
|
226, /* (58) refact ::= RESTRICT */
|
|
226, /* (59) refact ::= NO ACTION */
|
|
223, /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
|
|
223, /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
|
|
227, /* (62) init_deferred_pred_opt ::= */
|
|
227, /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */
|
|
227, /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
|
|
202, /* (65) conslist_opt ::= */
|
|
229, /* (66) tconscomma ::= COMMA */
|
|
230, /* (67) tcons ::= CONSTRAINT nm */
|
|
230, /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
|
|
230, /* (69) tcons ::= UNIQUE LP sortlist RP onconf */
|
|
230, /* (70) tcons ::= CHECK LP expr RP onconf */
|
|
230, /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
|
|
233, /* (72) defer_subclause_opt ::= */
|
|
218, /* (73) onconf ::= */
|
|
218, /* (74) onconf ::= ON CONFLICT resolvetype */
|
|
234, /* (75) orconf ::= */
|
|
234, /* (76) orconf ::= OR resolvetype */
|
|
235, /* (77) resolvetype ::= IGNORE */
|
|
235, /* (78) resolvetype ::= REPLACE */
|
|
190, /* (79) cmd ::= DROP TABLE ifexists fullname */
|
|
237, /* (80) ifexists ::= IF EXISTS */
|
|
237, /* (81) ifexists ::= */
|
|
190, /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
|
|
190, /* (83) cmd ::= DROP VIEW ifexists fullname */
|
|
190, /* (84) cmd ::= select */
|
|
204, /* (85) select ::= WITH wqlist selectnowith */
|
|
204, /* (86) select ::= WITH RECURSIVE wqlist selectnowith */
|
|
204, /* (87) select ::= selectnowith */
|
|
239, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
|
|
242, /* (89) multiselect_op ::= UNION */
|
|
242, /* (90) multiselect_op ::= UNION ALL */
|
|
242, /* (91) multiselect_op ::= EXCEPT|INTERSECT */
|
|
240, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
|
|
240, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
|
|
252, /* (94) values ::= VALUES LP nexprlist RP */
|
|
252, /* (95) values ::= values COMMA LP nexprlist RP */
|
|
243, /* (96) distinct ::= DISTINCT */
|
|
243, /* (97) distinct ::= ALL */
|
|
243, /* (98) distinct ::= */
|
|
254, /* (99) sclp ::= */
|
|
244, /* (100) selcollist ::= sclp scanpt expr scanpt as */
|
|
244, /* (101) selcollist ::= sclp scanpt STAR */
|
|
244, /* (102) selcollist ::= sclp scanpt nm DOT STAR */
|
|
255, /* (103) as ::= AS nm */
|
|
255, /* (104) as ::= */
|
|
245, /* (105) from ::= */
|
|
245, /* (106) from ::= FROM seltablist */
|
|
257, /* (107) stl_prefix ::= seltablist joinop */
|
|
257, /* (108) stl_prefix ::= */
|
|
256, /* (109) seltablist ::= stl_prefix nm dbnm as on_using */
|
|
256, /* (110) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
|
|
256, /* (111) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
|
|
256, /* (112) seltablist ::= stl_prefix LP select RP as on_using */
|
|
256, /* (113) seltablist ::= stl_prefix LP seltablist RP as on_using */
|
|
200, /* (114) dbnm ::= */
|
|
200, /* (115) dbnm ::= DOT nm */
|
|
238, /* (116) fullname ::= nm */
|
|
238, /* (117) fullname ::= nm DOT nm */
|
|
262, /* (118) xfullname ::= nm */
|
|
262, /* (119) xfullname ::= nm DOT nm */
|
|
262, /* (120) xfullname ::= nm DOT nm AS nm */
|
|
262, /* (121) xfullname ::= nm AS nm */
|
|
258, /* (122) joinop ::= COMMA|JOIN */
|
|
258, /* (123) joinop ::= JOIN_KW JOIN */
|
|
258, /* (124) joinop ::= JOIN_KW nm JOIN */
|
|
258, /* (125) joinop ::= JOIN_KW nm nm JOIN */
|
|
259, /* (126) on_using ::= ON expr */
|
|
259, /* (127) on_using ::= USING LP idlist RP */
|
|
259, /* (128) on_using ::= */
|
|
264, /* (129) indexed_opt ::= */
|
|
260, /* (130) indexed_by ::= INDEXED BY nm */
|
|
260, /* (131) indexed_by ::= NOT INDEXED */
|
|
249, /* (132) orderby_opt ::= */
|
|
249, /* (133) orderby_opt ::= ORDER BY sortlist */
|
|
231, /* (134) sortlist ::= sortlist COMMA expr sortorder nulls */
|
|
231, /* (135) sortlist ::= expr sortorder nulls */
|
|
219, /* (136) sortorder ::= ASC */
|
|
219, /* (137) sortorder ::= DESC */
|
|
219, /* (138) sortorder ::= */
|
|
265, /* (139) nulls ::= NULLS FIRST */
|
|
265, /* (140) nulls ::= NULLS LAST */
|
|
265, /* (141) nulls ::= */
|
|
247, /* (142) groupby_opt ::= */
|
|
247, /* (143) groupby_opt ::= GROUP BY nexprlist */
|
|
248, /* (144) having_opt ::= */
|
|
248, /* (145) having_opt ::= HAVING expr */
|
|
250, /* (146) limit_opt ::= */
|
|
250, /* (147) limit_opt ::= LIMIT expr */
|
|
250, /* (148) limit_opt ::= LIMIT expr OFFSET expr */
|
|
250, /* (149) limit_opt ::= LIMIT expr COMMA expr */
|
|
190, /* (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
|
|
246, /* (151) where_opt ::= */
|
|
246, /* (152) where_opt ::= WHERE expr */
|
|
267, /* (153) where_opt_ret ::= */
|
|
267, /* (154) where_opt_ret ::= WHERE expr */
|
|
267, /* (155) where_opt_ret ::= RETURNING selcollist */
|
|
267, /* (156) where_opt_ret ::= WHERE expr RETURNING selcollist */
|
|
190, /* (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
|
|
268, /* (158) setlist ::= setlist COMMA nm EQ expr */
|
|
268, /* (159) setlist ::= setlist COMMA LP idlist RP EQ expr */
|
|
268, /* (160) setlist ::= nm EQ expr */
|
|
268, /* (161) setlist ::= LP idlist RP EQ expr */
|
|
190, /* (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
|
|
190, /* (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
|
|
271, /* (164) upsert ::= */
|
|
271, /* (165) upsert ::= RETURNING selcollist */
|
|
271, /* (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
|
|
271, /* (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
|
|
271, /* (168) upsert ::= ON CONFLICT DO NOTHING returning */
|
|
271, /* (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
|
|
272, /* (170) returning ::= RETURNING selcollist */
|
|
269, /* (171) insert_cmd ::= INSERT orconf */
|
|
269, /* (172) insert_cmd ::= REPLACE */
|
|
270, /* (173) idlist_opt ::= */
|
|
270, /* (174) idlist_opt ::= LP idlist RP */
|
|
263, /* (175) idlist ::= idlist COMMA nm */
|
|
263, /* (176) idlist ::= nm */
|
|
217, /* (177) expr ::= LP expr RP */
|
|
217, /* (178) expr ::= ID|INDEXED */
|
|
217, /* (179) expr ::= JOIN_KW */
|
|
217, /* (180) expr ::= nm DOT nm */
|
|
217, /* (181) expr ::= nm DOT nm DOT nm */
|
|
216, /* (182) term ::= NULL|FLOAT|BLOB */
|
|
216, /* (183) term ::= STRING */
|
|
216, /* (184) term ::= INTEGER */
|
|
217, /* (185) expr ::= VARIABLE */
|
|
217, /* (186) expr ::= expr COLLATE ID|STRING */
|
|
217, /* (187) expr ::= CAST LP expr AS typetoken RP */
|
|
217, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */
|
|
217, /* (189) expr ::= ID|INDEXED LP STAR RP */
|
|
217, /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
|
|
217, /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */
|
|
216, /* (192) term ::= CTIME_KW */
|
|
217, /* (193) expr ::= LP nexprlist COMMA expr RP */
|
|
217, /* (194) expr ::= expr AND expr */
|
|
217, /* (195) expr ::= expr OR expr */
|
|
217, /* (196) expr ::= expr LT|GT|GE|LE expr */
|
|
217, /* (197) expr ::= expr EQ|NE expr */
|
|
217, /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
|
|
217, /* (199) expr ::= expr PLUS|MINUS expr */
|
|
217, /* (200) expr ::= expr STAR|SLASH|REM expr */
|
|
217, /* (201) expr ::= expr CONCAT expr */
|
|
274, /* (202) likeop ::= NOT LIKE_KW|MATCH */
|
|
217, /* (203) expr ::= expr likeop expr */
|
|
217, /* (204) expr ::= expr likeop expr ESCAPE expr */
|
|
217, /* (205) expr ::= expr ISNULL|NOTNULL */
|
|
217, /* (206) expr ::= expr NOT NULL */
|
|
217, /* (207) expr ::= expr IS expr */
|
|
217, /* (208) expr ::= expr IS NOT expr */
|
|
217, /* (209) expr ::= expr IS NOT DISTINCT FROM expr */
|
|
217, /* (210) expr ::= expr IS DISTINCT FROM expr */
|
|
217, /* (211) expr ::= NOT expr */
|
|
217, /* (212) expr ::= BITNOT expr */
|
|
217, /* (213) expr ::= PLUS|MINUS expr */
|
|
217, /* (214) expr ::= expr PTR expr */
|
|
275, /* (215) between_op ::= BETWEEN */
|
|
275, /* (216) between_op ::= NOT BETWEEN */
|
|
217, /* (217) expr ::= expr between_op expr AND expr */
|
|
276, /* (218) in_op ::= IN */
|
|
276, /* (219) in_op ::= NOT IN */
|
|
217, /* (220) expr ::= expr in_op LP exprlist RP */
|
|
217, /* (221) expr ::= LP select RP */
|
|
217, /* (222) expr ::= expr in_op LP select RP */
|
|
217, /* (223) expr ::= expr in_op nm dbnm paren_exprlist */
|
|
217, /* (224) expr ::= EXISTS LP select RP */
|
|
217, /* (225) expr ::= CASE case_operand case_exprlist case_else END */
|
|
279, /* (226) case_exprlist ::= case_exprlist WHEN expr THEN expr */
|
|
279, /* (227) case_exprlist ::= WHEN expr THEN expr */
|
|
280, /* (228) case_else ::= ELSE expr */
|
|
280, /* (229) case_else ::= */
|
|
278, /* (230) case_operand ::= expr */
|
|
278, /* (231) case_operand ::= */
|
|
261, /* (232) exprlist ::= */
|
|
253, /* (233) nexprlist ::= nexprlist COMMA expr */
|
|
253, /* (234) nexprlist ::= expr */
|
|
277, /* (235) paren_exprlist ::= */
|
|
277, /* (236) paren_exprlist ::= LP exprlist RP */
|
|
190, /* (237) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
|
|
281, /* (238) uniqueflag ::= UNIQUE */
|
|
281, /* (239) uniqueflag ::= */
|
|
221, /* (240) eidlist_opt ::= */
|
|
221, /* (241) eidlist_opt ::= LP eidlist RP */
|
|
232, /* (242) eidlist ::= eidlist COMMA nm collate sortorder */
|
|
232, /* (243) eidlist ::= nm collate sortorder */
|
|
282, /* (244) collate ::= */
|
|
282, /* (245) collate ::= COLLATE ID|STRING */
|
|
190, /* (246) cmd ::= DROP INDEX ifexists fullname */
|
|
190, /* (247) cmd ::= VACUUM vinto */
|
|
190, /* (248) cmd ::= VACUUM nm vinto */
|
|
283, /* (249) vinto ::= INTO expr */
|
|
283, /* (250) vinto ::= */
|
|
190, /* (251) cmd ::= PRAGMA nm dbnm */
|
|
190, /* (252) cmd ::= PRAGMA nm dbnm EQ nmnum */
|
|
190, /* (253) cmd ::= PRAGMA nm dbnm LP nmnum RP */
|
|
190, /* (254) cmd ::= PRAGMA nm dbnm EQ minus_num */
|
|
190, /* (255) cmd ::= PRAGMA nm dbnm LP minus_num RP */
|
|
211, /* (256) plus_num ::= PLUS INTEGER|FLOAT */
|
|
212, /* (257) minus_num ::= MINUS INTEGER|FLOAT */
|
|
190, /* (258) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
|
|
285, /* (259) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
|
|
287, /* (260) trigger_time ::= BEFORE|AFTER */
|
|
287, /* (261) trigger_time ::= INSTEAD OF */
|
|
287, /* (262) trigger_time ::= */
|
|
288, /* (263) trigger_event ::= DELETE|INSERT */
|
|
288, /* (264) trigger_event ::= UPDATE */
|
|
288, /* (265) trigger_event ::= UPDATE OF idlist */
|
|
290, /* (266) when_clause ::= */
|
|
290, /* (267) when_clause ::= WHEN expr */
|
|
286, /* (268) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
|
|
286, /* (269) trigger_cmd_list ::= trigger_cmd SEMI */
|
|
292, /* (270) trnm ::= nm DOT nm */
|
|
293, /* (271) tridxby ::= INDEXED BY nm */
|
|
293, /* (272) tridxby ::= NOT INDEXED */
|
|
291, /* (273) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
|
|
291, /* (274) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
|
|
291, /* (275) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
|
|
291, /* (276) trigger_cmd ::= scanpt select scanpt */
|
|
217, /* (277) expr ::= RAISE LP IGNORE RP */
|
|
217, /* (278) expr ::= RAISE LP raisetype COMMA nm RP */
|
|
236, /* (279) raisetype ::= ROLLBACK */
|
|
236, /* (280) raisetype ::= ABORT */
|
|
236, /* (281) raisetype ::= FAIL */
|
|
190, /* (282) cmd ::= DROP TRIGGER ifexists fullname */
|
|
190, /* (283) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
|
|
190, /* (284) cmd ::= DETACH database_kw_opt expr */
|
|
295, /* (285) key_opt ::= */
|
|
295, /* (286) key_opt ::= KEY expr */
|
|
190, /* (287) cmd ::= REINDEX */
|
|
190, /* (288) cmd ::= REINDEX nm dbnm */
|
|
190, /* (289) cmd ::= ANALYZE */
|
|
190, /* (290) cmd ::= ANALYZE nm dbnm */
|
|
190, /* (291) cmd ::= ALTER TABLE fullname RENAME TO nm */
|
|
190, /* (292) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
|
|
190, /* (293) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
|
|
296, /* (294) add_column_fullname ::= fullname */
|
|
190, /* (295) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
|
|
190, /* (296) cmd ::= create_vtab */
|
|
190, /* (297) cmd ::= create_vtab LP vtabarglist RP */
|
|
298, /* (298) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
|
|
300, /* (299) vtabarg ::= */
|
|
301, /* (300) vtabargtoken ::= ANY */
|
|
301, /* (301) vtabargtoken ::= lp anylist RP */
|
|
302, /* (302) lp ::= LP */
|
|
266, /* (303) with ::= WITH wqlist */
|
|
266, /* (304) with ::= WITH RECURSIVE wqlist */
|
|
305, /* (305) wqas ::= AS */
|
|
305, /* (306) wqas ::= AS MATERIALIZED */
|
|
305, /* (307) wqas ::= AS NOT MATERIALIZED */
|
|
304, /* (308) wqitem ::= nm eidlist_opt wqas LP select RP */
|
|
241, /* (309) wqlist ::= wqitem */
|
|
241, /* (310) wqlist ::= wqlist COMMA wqitem */
|
|
306, /* (311) windowdefn_list ::= windowdefn */
|
|
306, /* (312) windowdefn_list ::= windowdefn_list COMMA windowdefn */
|
|
307, /* (313) windowdefn ::= nm AS LP window RP */
|
|
308, /* (314) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
|
|
308, /* (315) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
|
|
308, /* (316) window ::= ORDER BY sortlist frame_opt */
|
|
308, /* (317) window ::= nm ORDER BY sortlist frame_opt */
|
|
308, /* (318) window ::= frame_opt */
|
|
308, /* (319) window ::= nm frame_opt */
|
|
309, /* (320) frame_opt ::= */
|
|
309, /* (321) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
|
|
309, /* (322) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
|
|
313, /* (323) range_or_rows ::= RANGE|ROWS|GROUPS */
|
|
315, /* (324) frame_bound_s ::= frame_bound */
|
|
315, /* (325) frame_bound_s ::= UNBOUNDED PRECEDING */
|
|
316, /* (326) frame_bound_e ::= frame_bound */
|
|
316, /* (327) frame_bound_e ::= UNBOUNDED FOLLOWING */
|
|
314, /* (328) frame_bound ::= expr PRECEDING|FOLLOWING */
|
|
314, /* (329) frame_bound ::= CURRENT ROW */
|
|
317, /* (330) frame_exclude_opt ::= */
|
|
317, /* (331) frame_exclude_opt ::= EXCLUDE frame_exclude */
|
|
318, /* (332) frame_exclude ::= NO OTHERS */
|
|
318, /* (333) frame_exclude ::= CURRENT ROW */
|
|
318, /* (334) frame_exclude ::= GROUP|TIES */
|
|
251, /* (335) window_clause ::= WINDOW windowdefn_list */
|
|
273, /* (336) filter_over ::= filter_clause over_clause */
|
|
273, /* (337) filter_over ::= over_clause */
|
|
273, /* (338) filter_over ::= filter_clause */
|
|
312, /* (339) over_clause ::= OVER LP window RP */
|
|
312, /* (340) over_clause ::= OVER nm */
|
|
311, /* (341) filter_clause ::= FILTER LP WHERE expr RP */
|
|
185, /* (342) input ::= cmdlist */
|
|
186, /* (343) cmdlist ::= cmdlist ecmd */
|
|
186, /* (344) cmdlist ::= ecmd */
|
|
187, /* (345) ecmd ::= SEMI */
|
|
187, /* (346) ecmd ::= cmdx SEMI */
|
|
187, /* (347) ecmd ::= explain cmdx SEMI */
|
|
192, /* (348) trans_opt ::= */
|
|
192, /* (349) trans_opt ::= TRANSACTION */
|
|
192, /* (350) trans_opt ::= TRANSACTION nm */
|
|
194, /* (351) savepoint_opt ::= SAVEPOINT */
|
|
194, /* (352) savepoint_opt ::= */
|
|
190, /* (353) cmd ::= create_table create_table_args */
|
|
203, /* (354) table_option_set ::= table_option */
|
|
201, /* (355) columnlist ::= columnlist COMMA columnname carglist */
|
|
201, /* (356) columnlist ::= columnname carglist */
|
|
193, /* (357) nm ::= ID|INDEXED */
|
|
193, /* (358) nm ::= STRING */
|
|
193, /* (359) nm ::= JOIN_KW */
|
|
208, /* (360) typetoken ::= typename */
|
|
209, /* (361) typename ::= ID|STRING */
|
|
210, /* (362) signed ::= plus_num */
|
|
210, /* (363) signed ::= minus_num */
|
|
207, /* (364) carglist ::= carglist ccons */
|
|
207, /* (365) carglist ::= */
|
|
215, /* (366) ccons ::= NULL onconf */
|
|
215, /* (367) ccons ::= GENERATED ALWAYS AS generated */
|
|
215, /* (368) ccons ::= AS generated */
|
|
202, /* (369) conslist_opt ::= COMMA conslist */
|
|
228, /* (370) conslist ::= conslist tconscomma tcons */
|
|
228, /* (371) conslist ::= tcons */
|
|
229, /* (372) tconscomma ::= */
|
|
233, /* (373) defer_subclause_opt ::= defer_subclause */
|
|
235, /* (374) resolvetype ::= raisetype */
|
|
239, /* (375) selectnowith ::= oneselect */
|
|
240, /* (376) oneselect ::= values */
|
|
254, /* (377) sclp ::= selcollist COMMA */
|
|
255, /* (378) as ::= ID|STRING */
|
|
264, /* (379) indexed_opt ::= indexed_by */
|
|
272, /* (380) returning ::= */
|
|
217, /* (381) expr ::= term */
|
|
274, /* (382) likeop ::= LIKE_KW|MATCH */
|
|
261, /* (383) exprlist ::= nexprlist */
|
|
284, /* (384) nmnum ::= plus_num */
|
|
284, /* (385) nmnum ::= nm */
|
|
284, /* (386) nmnum ::= ON */
|
|
284, /* (387) nmnum ::= DELETE */
|
|
284, /* (388) nmnum ::= DEFAULT */
|
|
211, /* (389) plus_num ::= INTEGER|FLOAT */
|
|
289, /* (390) foreach_clause ::= */
|
|
289, /* (391) foreach_clause ::= FOR EACH ROW */
|
|
292, /* (392) trnm ::= nm */
|
|
293, /* (393) tridxby ::= */
|
|
294, /* (394) database_kw_opt ::= DATABASE */
|
|
294, /* (395) database_kw_opt ::= */
|
|
297, /* (396) kwcolumn_opt ::= */
|
|
297, /* (397) kwcolumn_opt ::= COLUMNKW */
|
|
299, /* (398) vtabarglist ::= vtabarg */
|
|
299, /* (399) vtabarglist ::= vtabarglist COMMA vtabarg */
|
|
300, /* (400) vtabarg ::= vtabarg vtabargtoken */
|
|
303, /* (401) anylist ::= */
|
|
303, /* (402) anylist ::= anylist LP anylist RP */
|
|
303, /* (403) anylist ::= anylist ANY */
|
|
266, /* (404) with ::= */
|
|
};
|
|
|
|
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
|
|
** of symbols on the right-hand side of that rule. */
|
|
static const signed char yyRuleInfoNRhs[] = {
|
|
-1, /* (0) explain ::= EXPLAIN */
|
|
-3, /* (1) explain ::= EXPLAIN QUERY PLAN */
|
|
-1, /* (2) cmdx ::= cmd */
|
|
-3, /* (3) cmd ::= BEGIN transtype trans_opt */
|
|
0, /* (4) transtype ::= */
|
|
-1, /* (5) transtype ::= DEFERRED */
|
|
-1, /* (6) transtype ::= IMMEDIATE */
|
|
-1, /* (7) transtype ::= EXCLUSIVE */
|
|
-2, /* (8) cmd ::= COMMIT|END trans_opt */
|
|
-2, /* (9) cmd ::= ROLLBACK trans_opt */
|
|
-2, /* (10) cmd ::= SAVEPOINT nm */
|
|
-3, /* (11) cmd ::= RELEASE savepoint_opt nm */
|
|
-5, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
|
|
-6, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
|
|
-1, /* (14) createkw ::= CREATE */
|
|
0, /* (15) ifnotexists ::= */
|
|
-3, /* (16) ifnotexists ::= IF NOT EXISTS */
|
|
-1, /* (17) temp ::= TEMP */
|
|
0, /* (18) temp ::= */
|
|
-5, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
|
|
-2, /* (20) create_table_args ::= AS select */
|
|
0, /* (21) table_option_set ::= */
|
|
-3, /* (22) table_option_set ::= table_option_set COMMA table_option */
|
|
-2, /* (23) table_option ::= WITHOUT nm */
|
|
-1, /* (24) table_option ::= nm */
|
|
-2, /* (25) columnname ::= nm typetoken */
|
|
0, /* (26) typetoken ::= */
|
|
-4, /* (27) typetoken ::= typename LP signed RP */
|
|
-6, /* (28) typetoken ::= typename LP signed COMMA signed RP */
|
|
-2, /* (29) typename ::= typename ID|STRING */
|
|
0, /* (30) scanpt ::= */
|
|
0, /* (31) scantok ::= */
|
|
-2, /* (32) ccons ::= CONSTRAINT nm */
|
|
-3, /* (33) ccons ::= DEFAULT scantok term */
|
|
-4, /* (34) ccons ::= DEFAULT LP expr RP */
|
|
-4, /* (35) ccons ::= DEFAULT PLUS scantok term */
|
|
-4, /* (36) ccons ::= DEFAULT MINUS scantok term */
|
|
-3, /* (37) ccons ::= DEFAULT scantok ID|INDEXED */
|
|
-3, /* (38) ccons ::= NOT NULL onconf */
|
|
-5, /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */
|
|
-2, /* (40) ccons ::= UNIQUE onconf */
|
|
-4, /* (41) ccons ::= CHECK LP expr RP */
|
|
-4, /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */
|
|
-1, /* (43) ccons ::= defer_subclause */
|
|
-2, /* (44) ccons ::= COLLATE ID|STRING */
|
|
-3, /* (45) generated ::= LP expr RP */
|
|
-4, /* (46) generated ::= LP expr RP ID */
|
|
0, /* (47) autoinc ::= */
|
|
-1, /* (48) autoinc ::= AUTOINCR */
|
|
0, /* (49) refargs ::= */
|
|
-2, /* (50) refargs ::= refargs refarg */
|
|
-2, /* (51) refarg ::= MATCH nm */
|
|
-3, /* (52) refarg ::= ON INSERT refact */
|
|
-3, /* (53) refarg ::= ON DELETE refact */
|
|
-3, /* (54) refarg ::= ON UPDATE refact */
|
|
-2, /* (55) refact ::= SET NULL */
|
|
-2, /* (56) refact ::= SET DEFAULT */
|
|
-1, /* (57) refact ::= CASCADE */
|
|
-1, /* (58) refact ::= RESTRICT */
|
|
-2, /* (59) refact ::= NO ACTION */
|
|
-3, /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
|
|
-2, /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
|
|
0, /* (62) init_deferred_pred_opt ::= */
|
|
-2, /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */
|
|
-2, /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
|
|
0, /* (65) conslist_opt ::= */
|
|
-1, /* (66) tconscomma ::= COMMA */
|
|
-2, /* (67) tcons ::= CONSTRAINT nm */
|
|
-7, /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
|
|
-5, /* (69) tcons ::= UNIQUE LP sortlist RP onconf */
|
|
-5, /* (70) tcons ::= CHECK LP expr RP onconf */
|
|
-10, /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
|
|
0, /* (72) defer_subclause_opt ::= */
|
|
0, /* (73) onconf ::= */
|
|
-3, /* (74) onconf ::= ON CONFLICT resolvetype */
|
|
0, /* (75) orconf ::= */
|
|
-2, /* (76) orconf ::= OR resolvetype */
|
|
-1, /* (77) resolvetype ::= IGNORE */
|
|
-1, /* (78) resolvetype ::= REPLACE */
|
|
-4, /* (79) cmd ::= DROP TABLE ifexists fullname */
|
|
-2, /* (80) ifexists ::= IF EXISTS */
|
|
0, /* (81) ifexists ::= */
|
|
-9, /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
|
|
-4, /* (83) cmd ::= DROP VIEW ifexists fullname */
|
|
-1, /* (84) cmd ::= select */
|
|
-3, /* (85) select ::= WITH wqlist selectnowith */
|
|
-4, /* (86) select ::= WITH RECURSIVE wqlist selectnowith */
|
|
-1, /* (87) select ::= selectnowith */
|
|
-3, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
|
|
-1, /* (89) multiselect_op ::= UNION */
|
|
-2, /* (90) multiselect_op ::= UNION ALL */
|
|
-1, /* (91) multiselect_op ::= EXCEPT|INTERSECT */
|
|
-9, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
|
|
-10, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
|
|
-4, /* (94) values ::= VALUES LP nexprlist RP */
|
|
-5, /* (95) values ::= values COMMA LP nexprlist RP */
|
|
-1, /* (96) distinct ::= DISTINCT */
|
|
-1, /* (97) distinct ::= ALL */
|
|
0, /* (98) distinct ::= */
|
|
0, /* (99) sclp ::= */
|
|
-5, /* (100) selcollist ::= sclp scanpt expr scanpt as */
|
|
-3, /* (101) selcollist ::= sclp scanpt STAR */
|
|
-5, /* (102) selcollist ::= sclp scanpt nm DOT STAR */
|
|
-2, /* (103) as ::= AS nm */
|
|
0, /* (104) as ::= */
|
|
0, /* (105) from ::= */
|
|
-2, /* (106) from ::= FROM seltablist */
|
|
-2, /* (107) stl_prefix ::= seltablist joinop */
|
|
0, /* (108) stl_prefix ::= */
|
|
-5, /* (109) seltablist ::= stl_prefix nm dbnm as on_using */
|
|
-6, /* (110) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
|
|
-8, /* (111) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
|
|
-6, /* (112) seltablist ::= stl_prefix LP select RP as on_using */
|
|
-6, /* (113) seltablist ::= stl_prefix LP seltablist RP as on_using */
|
|
0, /* (114) dbnm ::= */
|
|
-2, /* (115) dbnm ::= DOT nm */
|
|
-1, /* (116) fullname ::= nm */
|
|
-3, /* (117) fullname ::= nm DOT nm */
|
|
-1, /* (118) xfullname ::= nm */
|
|
-3, /* (119) xfullname ::= nm DOT nm */
|
|
-5, /* (120) xfullname ::= nm DOT nm AS nm */
|
|
-3, /* (121) xfullname ::= nm AS nm */
|
|
-1, /* (122) joinop ::= COMMA|JOIN */
|
|
-2, /* (123) joinop ::= JOIN_KW JOIN */
|
|
-3, /* (124) joinop ::= JOIN_KW nm JOIN */
|
|
-4, /* (125) joinop ::= JOIN_KW nm nm JOIN */
|
|
-2, /* (126) on_using ::= ON expr */
|
|
-4, /* (127) on_using ::= USING LP idlist RP */
|
|
0, /* (128) on_using ::= */
|
|
0, /* (129) indexed_opt ::= */
|
|
-3, /* (130) indexed_by ::= INDEXED BY nm */
|
|
-2, /* (131) indexed_by ::= NOT INDEXED */
|
|
0, /* (132) orderby_opt ::= */
|
|
-3, /* (133) orderby_opt ::= ORDER BY sortlist */
|
|
-5, /* (134) sortlist ::= sortlist COMMA expr sortorder nulls */
|
|
-3, /* (135) sortlist ::= expr sortorder nulls */
|
|
-1, /* (136) sortorder ::= ASC */
|
|
-1, /* (137) sortorder ::= DESC */
|
|
0, /* (138) sortorder ::= */
|
|
-2, /* (139) nulls ::= NULLS FIRST */
|
|
-2, /* (140) nulls ::= NULLS LAST */
|
|
0, /* (141) nulls ::= */
|
|
0, /* (142) groupby_opt ::= */
|
|
-3, /* (143) groupby_opt ::= GROUP BY nexprlist */
|
|
0, /* (144) having_opt ::= */
|
|
-2, /* (145) having_opt ::= HAVING expr */
|
|
0, /* (146) limit_opt ::= */
|
|
-2, /* (147) limit_opt ::= LIMIT expr */
|
|
-4, /* (148) limit_opt ::= LIMIT expr OFFSET expr */
|
|
-4, /* (149) limit_opt ::= LIMIT expr COMMA expr */
|
|
-6, /* (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
|
|
0, /* (151) where_opt ::= */
|
|
-2, /* (152) where_opt ::= WHERE expr */
|
|
0, /* (153) where_opt_ret ::= */
|
|
-2, /* (154) where_opt_ret ::= WHERE expr */
|
|
-2, /* (155) where_opt_ret ::= RETURNING selcollist */
|
|
-4, /* (156) where_opt_ret ::= WHERE expr RETURNING selcollist */
|
|
-9, /* (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
|
|
-5, /* (158) setlist ::= setlist COMMA nm EQ expr */
|
|
-7, /* (159) setlist ::= setlist COMMA LP idlist RP EQ expr */
|
|
-3, /* (160) setlist ::= nm EQ expr */
|
|
-5, /* (161) setlist ::= LP idlist RP EQ expr */
|
|
-7, /* (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
|
|
-8, /* (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
|
|
0, /* (164) upsert ::= */
|
|
-2, /* (165) upsert ::= RETURNING selcollist */
|
|
-12, /* (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
|
|
-9, /* (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
|
|
-5, /* (168) upsert ::= ON CONFLICT DO NOTHING returning */
|
|
-8, /* (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
|
|
-2, /* (170) returning ::= RETURNING selcollist */
|
|
-2, /* (171) insert_cmd ::= INSERT orconf */
|
|
-1, /* (172) insert_cmd ::= REPLACE */
|
|
0, /* (173) idlist_opt ::= */
|
|
-3, /* (174) idlist_opt ::= LP idlist RP */
|
|
-3, /* (175) idlist ::= idlist COMMA nm */
|
|
-1, /* (176) idlist ::= nm */
|
|
-3, /* (177) expr ::= LP expr RP */
|
|
-1, /* (178) expr ::= ID|INDEXED */
|
|
-1, /* (179) expr ::= JOIN_KW */
|
|
-3, /* (180) expr ::= nm DOT nm */
|
|
-5, /* (181) expr ::= nm DOT nm DOT nm */
|
|
-1, /* (182) term ::= NULL|FLOAT|BLOB */
|
|
-1, /* (183) term ::= STRING */
|
|
-1, /* (184) term ::= INTEGER */
|
|
-1, /* (185) expr ::= VARIABLE */
|
|
-3, /* (186) expr ::= expr COLLATE ID|STRING */
|
|
-6, /* (187) expr ::= CAST LP expr AS typetoken RP */
|
|
-5, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */
|
|
-4, /* (189) expr ::= ID|INDEXED LP STAR RP */
|
|
-6, /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
|
|
-5, /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */
|
|
-1, /* (192) term ::= CTIME_KW */
|
|
-5, /* (193) expr ::= LP nexprlist COMMA expr RP */
|
|
-3, /* (194) expr ::= expr AND expr */
|
|
-3, /* (195) expr ::= expr OR expr */
|
|
-3, /* (196) expr ::= expr LT|GT|GE|LE expr */
|
|
-3, /* (197) expr ::= expr EQ|NE expr */
|
|
-3, /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
|
|
-3, /* (199) expr ::= expr PLUS|MINUS expr */
|
|
-3, /* (200) expr ::= expr STAR|SLASH|REM expr */
|
|
-3, /* (201) expr ::= expr CONCAT expr */
|
|
-2, /* (202) likeop ::= NOT LIKE_KW|MATCH */
|
|
-3, /* (203) expr ::= expr likeop expr */
|
|
-5, /* (204) expr ::= expr likeop expr ESCAPE expr */
|
|
-2, /* (205) expr ::= expr ISNULL|NOTNULL */
|
|
-3, /* (206) expr ::= expr NOT NULL */
|
|
-3, /* (207) expr ::= expr IS expr */
|
|
-4, /* (208) expr ::= expr IS NOT expr */
|
|
-6, /* (209) expr ::= expr IS NOT DISTINCT FROM expr */
|
|
-5, /* (210) expr ::= expr IS DISTINCT FROM expr */
|
|
-2, /* (211) expr ::= NOT expr */
|
|
-2, /* (212) expr ::= BITNOT expr */
|
|
-2, /* (213) expr ::= PLUS|MINUS expr */
|
|
-3, /* (214) expr ::= expr PTR expr */
|
|
-1, /* (215) between_op ::= BETWEEN */
|
|
-2, /* (216) between_op ::= NOT BETWEEN */
|
|
-5, /* (217) expr ::= expr between_op expr AND expr */
|
|
-1, /* (218) in_op ::= IN */
|
|
-2, /* (219) in_op ::= NOT IN */
|
|
-5, /* (220) expr ::= expr in_op LP exprlist RP */
|
|
-3, /* (221) expr ::= LP select RP */
|
|
-5, /* (222) expr ::= expr in_op LP select RP */
|
|
-5, /* (223) expr ::= expr in_op nm dbnm paren_exprlist */
|
|
-4, /* (224) expr ::= EXISTS LP select RP */
|
|
-5, /* (225) expr ::= CASE case_operand case_exprlist case_else END */
|
|
-5, /* (226) case_exprlist ::= case_exprlist WHEN expr THEN expr */
|
|
-4, /* (227) case_exprlist ::= WHEN expr THEN expr */
|
|
-2, /* (228) case_else ::= ELSE expr */
|
|
0, /* (229) case_else ::= */
|
|
-1, /* (230) case_operand ::= expr */
|
|
0, /* (231) case_operand ::= */
|
|
0, /* (232) exprlist ::= */
|
|
-3, /* (233) nexprlist ::= nexprlist COMMA expr */
|
|
-1, /* (234) nexprlist ::= expr */
|
|
0, /* (235) paren_exprlist ::= */
|
|
-3, /* (236) paren_exprlist ::= LP exprlist RP */
|
|
-12, /* (237) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
|
|
-1, /* (238) uniqueflag ::= UNIQUE */
|
|
0, /* (239) uniqueflag ::= */
|
|
0, /* (240) eidlist_opt ::= */
|
|
-3, /* (241) eidlist_opt ::= LP eidlist RP */
|
|
-5, /* (242) eidlist ::= eidlist COMMA nm collate sortorder */
|
|
-3, /* (243) eidlist ::= nm collate sortorder */
|
|
0, /* (244) collate ::= */
|
|
-2, /* (245) collate ::= COLLATE ID|STRING */
|
|
-4, /* (246) cmd ::= DROP INDEX ifexists fullname */
|
|
-2, /* (247) cmd ::= VACUUM vinto */
|
|
-3, /* (248) cmd ::= VACUUM nm vinto */
|
|
-2, /* (249) vinto ::= INTO expr */
|
|
0, /* (250) vinto ::= */
|
|
-3, /* (251) cmd ::= PRAGMA nm dbnm */
|
|
-5, /* (252) cmd ::= PRAGMA nm dbnm EQ nmnum */
|
|
-6, /* (253) cmd ::= PRAGMA nm dbnm LP nmnum RP */
|
|
-5, /* (254) cmd ::= PRAGMA nm dbnm EQ minus_num */
|
|
-6, /* (255) cmd ::= PRAGMA nm dbnm LP minus_num RP */
|
|
-2, /* (256) plus_num ::= PLUS INTEGER|FLOAT */
|
|
-2, /* (257) minus_num ::= MINUS INTEGER|FLOAT */
|
|
-5, /* (258) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
|
|
-11, /* (259) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
|
|
-1, /* (260) trigger_time ::= BEFORE|AFTER */
|
|
-2, /* (261) trigger_time ::= INSTEAD OF */
|
|
0, /* (262) trigger_time ::= */
|
|
-1, /* (263) trigger_event ::= DELETE|INSERT */
|
|
-1, /* (264) trigger_event ::= UPDATE */
|
|
-3, /* (265) trigger_event ::= UPDATE OF idlist */
|
|
0, /* (266) when_clause ::= */
|
|
-2, /* (267) when_clause ::= WHEN expr */
|
|
-3, /* (268) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
|
|
-2, /* (269) trigger_cmd_list ::= trigger_cmd SEMI */
|
|
-3, /* (270) trnm ::= nm DOT nm */
|
|
-3, /* (271) tridxby ::= INDEXED BY nm */
|
|
-2, /* (272) tridxby ::= NOT INDEXED */
|
|
-9, /* (273) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
|
|
-8, /* (274) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
|
|
-6, /* (275) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
|
|
-3, /* (276) trigger_cmd ::= scanpt select scanpt */
|
|
-4, /* (277) expr ::= RAISE LP IGNORE RP */
|
|
-6, /* (278) expr ::= RAISE LP raisetype COMMA nm RP */
|
|
-1, /* (279) raisetype ::= ROLLBACK */
|
|
-1, /* (280) raisetype ::= ABORT */
|
|
-1, /* (281) raisetype ::= FAIL */
|
|
-4, /* (282) cmd ::= DROP TRIGGER ifexists fullname */
|
|
-6, /* (283) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
|
|
-3, /* (284) cmd ::= DETACH database_kw_opt expr */
|
|
0, /* (285) key_opt ::= */
|
|
-2, /* (286) key_opt ::= KEY expr */
|
|
-1, /* (287) cmd ::= REINDEX */
|
|
-3, /* (288) cmd ::= REINDEX nm dbnm */
|
|
-1, /* (289) cmd ::= ANALYZE */
|
|
-3, /* (290) cmd ::= ANALYZE nm dbnm */
|
|
-6, /* (291) cmd ::= ALTER TABLE fullname RENAME TO nm */
|
|
-7, /* (292) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
|
|
-6, /* (293) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
|
|
-1, /* (294) add_column_fullname ::= fullname */
|
|
-8, /* (295) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
|
|
-1, /* (296) cmd ::= create_vtab */
|
|
-4, /* (297) cmd ::= create_vtab LP vtabarglist RP */
|
|
-8, /* (298) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
|
|
0, /* (299) vtabarg ::= */
|
|
-1, /* (300) vtabargtoken ::= ANY */
|
|
-3, /* (301) vtabargtoken ::= lp anylist RP */
|
|
-1, /* (302) lp ::= LP */
|
|
-2, /* (303) with ::= WITH wqlist */
|
|
-3, /* (304) with ::= WITH RECURSIVE wqlist */
|
|
-1, /* (305) wqas ::= AS */
|
|
-2, /* (306) wqas ::= AS MATERIALIZED */
|
|
-3, /* (307) wqas ::= AS NOT MATERIALIZED */
|
|
-6, /* (308) wqitem ::= nm eidlist_opt wqas LP select RP */
|
|
-1, /* (309) wqlist ::= wqitem */
|
|
-3, /* (310) wqlist ::= wqlist COMMA wqitem */
|
|
-1, /* (311) windowdefn_list ::= windowdefn */
|
|
-3, /* (312) windowdefn_list ::= windowdefn_list COMMA windowdefn */
|
|
-5, /* (313) windowdefn ::= nm AS LP window RP */
|
|
-5, /* (314) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
|
|
-6, /* (315) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
|
|
-4, /* (316) window ::= ORDER BY sortlist frame_opt */
|
|
-5, /* (317) window ::= nm ORDER BY sortlist frame_opt */
|
|
-1, /* (318) window ::= frame_opt */
|
|
-2, /* (319) window ::= nm frame_opt */
|
|
0, /* (320) frame_opt ::= */
|
|
-3, /* (321) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
|
|
-6, /* (322) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
|
|
-1, /* (323) range_or_rows ::= RANGE|ROWS|GROUPS */
|
|
-1, /* (324) frame_bound_s ::= frame_bound */
|
|
-2, /* (325) frame_bound_s ::= UNBOUNDED PRECEDING */
|
|
-1, /* (326) frame_bound_e ::= frame_bound */
|
|
-2, /* (327) frame_bound_e ::= UNBOUNDED FOLLOWING */
|
|
-2, /* (328) frame_bound ::= expr PRECEDING|FOLLOWING */
|
|
-2, /* (329) frame_bound ::= CURRENT ROW */
|
|
0, /* (330) frame_exclude_opt ::= */
|
|
-2, /* (331) frame_exclude_opt ::= EXCLUDE frame_exclude */
|
|
-2, /* (332) frame_exclude ::= NO OTHERS */
|
|
-2, /* (333) frame_exclude ::= CURRENT ROW */
|
|
-1, /* (334) frame_exclude ::= GROUP|TIES */
|
|
-2, /* (335) window_clause ::= WINDOW windowdefn_list */
|
|
-2, /* (336) filter_over ::= filter_clause over_clause */
|
|
-1, /* (337) filter_over ::= over_clause */
|
|
-1, /* (338) filter_over ::= filter_clause */
|
|
-4, /* (339) over_clause ::= OVER LP window RP */
|
|
-2, /* (340) over_clause ::= OVER nm */
|
|
-5, /* (341) filter_clause ::= FILTER LP WHERE expr RP */
|
|
-1, /* (342) input ::= cmdlist */
|
|
-2, /* (343) cmdlist ::= cmdlist ecmd */
|
|
-1, /* (344) cmdlist ::= ecmd */
|
|
-1, /* (345) ecmd ::= SEMI */
|
|
-2, /* (346) ecmd ::= cmdx SEMI */
|
|
-3, /* (347) ecmd ::= explain cmdx SEMI */
|
|
0, /* (348) trans_opt ::= */
|
|
-1, /* (349) trans_opt ::= TRANSACTION */
|
|
-2, /* (350) trans_opt ::= TRANSACTION nm */
|
|
-1, /* (351) savepoint_opt ::= SAVEPOINT */
|
|
0, /* (352) savepoint_opt ::= */
|
|
-2, /* (353) cmd ::= create_table create_table_args */
|
|
-1, /* (354) table_option_set ::= table_option */
|
|
-4, /* (355) columnlist ::= columnlist COMMA columnname carglist */
|
|
-2, /* (356) columnlist ::= columnname carglist */
|
|
-1, /* (357) nm ::= ID|INDEXED */
|
|
-1, /* (358) nm ::= STRING */
|
|
-1, /* (359) nm ::= JOIN_KW */
|
|
-1, /* (360) typetoken ::= typename */
|
|
-1, /* (361) typename ::= ID|STRING */
|
|
-1, /* (362) signed ::= plus_num */
|
|
-1, /* (363) signed ::= minus_num */
|
|
-2, /* (364) carglist ::= carglist ccons */
|
|
0, /* (365) carglist ::= */
|
|
-2, /* (366) ccons ::= NULL onconf */
|
|
-4, /* (367) ccons ::= GENERATED ALWAYS AS generated */
|
|
-2, /* (368) ccons ::= AS generated */
|
|
-2, /* (369) conslist_opt ::= COMMA conslist */
|
|
-3, /* (370) conslist ::= conslist tconscomma tcons */
|
|
-1, /* (371) conslist ::= tcons */
|
|
0, /* (372) tconscomma ::= */
|
|
-1, /* (373) defer_subclause_opt ::= defer_subclause */
|
|
-1, /* (374) resolvetype ::= raisetype */
|
|
-1, /* (375) selectnowith ::= oneselect */
|
|
-1, /* (376) oneselect ::= values */
|
|
-2, /* (377) sclp ::= selcollist COMMA */
|
|
-1, /* (378) as ::= ID|STRING */
|
|
-1, /* (379) indexed_opt ::= indexed_by */
|
|
0, /* (380) returning ::= */
|
|
-1, /* (381) expr ::= term */
|
|
-1, /* (382) likeop ::= LIKE_KW|MATCH */
|
|
-1, /* (383) exprlist ::= nexprlist */
|
|
-1, /* (384) nmnum ::= plus_num */
|
|
-1, /* (385) nmnum ::= nm */
|
|
-1, /* (386) nmnum ::= ON */
|
|
-1, /* (387) nmnum ::= DELETE */
|
|
-1, /* (388) nmnum ::= DEFAULT */
|
|
-1, /* (389) plus_num ::= INTEGER|FLOAT */
|
|
0, /* (390) foreach_clause ::= */
|
|
-3, /* (391) foreach_clause ::= FOR EACH ROW */
|
|
-1, /* (392) trnm ::= nm */
|
|
0, /* (393) tridxby ::= */
|
|
-1, /* (394) database_kw_opt ::= DATABASE */
|
|
0, /* (395) database_kw_opt ::= */
|
|
0, /* (396) kwcolumn_opt ::= */
|
|
-1, /* (397) kwcolumn_opt ::= COLUMNKW */
|
|
-1, /* (398) vtabarglist ::= vtabarg */
|
|
-3, /* (399) vtabarglist ::= vtabarglist COMMA vtabarg */
|
|
-2, /* (400) vtabarg ::= vtabarg vtabargtoken */
|
|
0, /* (401) anylist ::= */
|
|
-4, /* (402) anylist ::= anylist LP anylist RP */
|
|
-2, /* (403) anylist ::= anylist ANY */
|
|
0, /* (404) with ::= */
|
|
};
|
|
|
|
static void yy_accept(yyParser*); /* Forward Declaration */
|
|
|
|
/*
|
|
** Perform a reduce action and the shift that must immediately
|
|
** follow the reduce.
|
|
**
|
|
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
|
|
** access to the lookahead token (if any). The yyLookahead will be YYNOCODE
|
|
** if the lookahead token has already been consumed. As this procedure is
|
|
** only called from one place, optimizing compilers will in-line it, which
|
|
** means that the extra parameters have no performance impact.
|
|
*/
|
|
static YYACTIONTYPE yy_reduce(
|
|
yyParser *yypParser, /* The parser */
|
|
unsigned int yyruleno, /* Number of the rule by which to reduce */
|
|
int yyLookahead, /* Lookahead token, or YYNOCODE if none */
|
|
sqlite3ParserTOKENTYPE yyLookaheadToken /* Value of the lookahead token */
|
|
sqlite3ParserCTX_PDECL /* %extra_context */
|
|
){
|
|
int yygoto; /* The next state */
|
|
YYACTIONTYPE yyact; /* The next action */
|
|
yyStackEntry *yymsp; /* The top of the parser's stack */
|
|
int yysize; /* Amount to pop the stack */
|
|
sqlite3ParserARG_FETCH
|
|
(void)yyLookahead;
|
|
(void)yyLookaheadToken;
|
|
yymsp = yypParser->yytos;
|
|
|
|
switch( yyruleno ){
|
|
/* Beginning here are the reduction cases. A typical example
|
|
** follows:
|
|
** case 0:
|
|
** #line <lineno> <grammarfile>
|
|
** { ... } // User supplied code
|
|
** #line <lineno> <thisfile>
|
|
** break;
|
|
*/
|
|
/********** Begin reduce actions **********************************************/
|
|
YYMINORTYPE yylhsminor;
|
|
case 0: /* explain ::= EXPLAIN */
|
|
#line 151 "parse.y"
|
|
{ pParse->explain = 1; }
|
|
#line 3647 "parse.c"
|
|
break;
|
|
case 1: /* explain ::= EXPLAIN QUERY PLAN */
|
|
#line 152 "parse.y"
|
|
{ pParse->explain = 2; }
|
|
#line 3652 "parse.c"
|
|
break;
|
|
case 2: /* cmdx ::= cmd */
|
|
#line 154 "parse.y"
|
|
{ sqlite3FinishCoding(pParse); }
|
|
#line 3657 "parse.c"
|
|
break;
|
|
case 3: /* cmd ::= BEGIN transtype trans_opt */
|
|
#line 159 "parse.y"
|
|
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy394);}
|
|
#line 3662 "parse.c"
|
|
break;
|
|
case 4: /* transtype ::= */
|
|
#line 164 "parse.y"
|
|
{yymsp[1].minor.yy394 = TK_DEFERRED;}
|
|
#line 3667 "parse.c"
|
|
break;
|
|
case 5: /* transtype ::= DEFERRED */
|
|
case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
|
|
case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
|
|
case 323: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==323);
|
|
#line 165 "parse.y"
|
|
{yymsp[0].minor.yy394 = yymsp[0].major; /*A-overwrites-X*/}
|
|
#line 3675 "parse.c"
|
|
break;
|
|
case 8: /* cmd ::= COMMIT|END trans_opt */
|
|
case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
|
|
#line 168 "parse.y"
|
|
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
|
|
#line 3681 "parse.c"
|
|
break;
|
|
case 10: /* cmd ::= SAVEPOINT nm */
|
|
#line 173 "parse.y"
|
|
{
|
|
sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 3688 "parse.c"
|
|
break;
|
|
case 11: /* cmd ::= RELEASE savepoint_opt nm */
|
|
#line 176 "parse.y"
|
|
{
|
|
sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 3695 "parse.c"
|
|
break;
|
|
case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
|
|
#line 179 "parse.y"
|
|
{
|
|
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 3702 "parse.c"
|
|
break;
|
|
case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
|
|
#line 186 "parse.y"
|
|
{
|
|
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy394,0,0,yymsp[-2].minor.yy394);
|
|
}
|
|
#line 3709 "parse.c"
|
|
break;
|
|
case 14: /* createkw ::= CREATE */
|
|
#line 189 "parse.y"
|
|
{disableLookaside(pParse);}
|
|
#line 3714 "parse.c"
|
|
break;
|
|
case 15: /* ifnotexists ::= */
|
|
case 18: /* temp ::= */ yytestcase(yyruleno==18);
|
|
case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
|
|
case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
|
|
case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
|
|
case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
|
|
case 98: /* distinct ::= */ yytestcase(yyruleno==98);
|
|
case 244: /* collate ::= */ yytestcase(yyruleno==244);
|
|
#line 192 "parse.y"
|
|
{yymsp[1].minor.yy394 = 0;}
|
|
#line 3726 "parse.c"
|
|
break;
|
|
case 16: /* ifnotexists ::= IF NOT EXISTS */
|
|
#line 193 "parse.y"
|
|
{yymsp[-2].minor.yy394 = 1;}
|
|
#line 3731 "parse.c"
|
|
break;
|
|
case 17: /* temp ::= TEMP */
|
|
#line 196 "parse.y"
|
|
{yymsp[0].minor.yy394 = pParse->db->init.busy==0;}
|
|
#line 3736 "parse.c"
|
|
break;
|
|
case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
|
|
#line 199 "parse.y"
|
|
{
|
|
sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy285,0);
|
|
}
|
|
#line 3743 "parse.c"
|
|
break;
|
|
case 20: /* create_table_args ::= AS select */
|
|
#line 202 "parse.y"
|
|
{
|
|
sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy47);
|
|
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy47);
|
|
}
|
|
#line 3751 "parse.c"
|
|
break;
|
|
case 21: /* table_option_set ::= */
|
|
#line 208 "parse.y"
|
|
{yymsp[1].minor.yy285 = 0;}
|
|
#line 3756 "parse.c"
|
|
break;
|
|
case 22: /* table_option_set ::= table_option_set COMMA table_option */
|
|
#line 210 "parse.y"
|
|
{yylhsminor.yy285 = yymsp[-2].minor.yy285|yymsp[0].minor.yy285;}
|
|
#line 3761 "parse.c"
|
|
yymsp[-2].minor.yy285 = yylhsminor.yy285;
|
|
break;
|
|
case 23: /* table_option ::= WITHOUT nm */
|
|
#line 211 "parse.y"
|
|
{
|
|
if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
|
|
yymsp[-1].minor.yy285 = TF_WithoutRowid | TF_NoVisibleRowid;
|
|
}else{
|
|
yymsp[-1].minor.yy285 = 0;
|
|
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
|
|
}
|
|
}
|
|
#line 3774 "parse.c"
|
|
break;
|
|
case 24: /* table_option ::= nm */
|
|
#line 219 "parse.y"
|
|
{
|
|
if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
|
|
yylhsminor.yy285 = TF_Strict;
|
|
}else{
|
|
yylhsminor.yy285 = 0;
|
|
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
|
|
}
|
|
}
|
|
#line 3786 "parse.c"
|
|
yymsp[0].minor.yy285 = yylhsminor.yy285;
|
|
break;
|
|
case 25: /* columnname ::= nm typetoken */
|
|
#line 229 "parse.y"
|
|
{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
|
|
#line 3792 "parse.c"
|
|
break;
|
|
case 26: /* typetoken ::= */
|
|
case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
|
|
case 104: /* as ::= */ yytestcase(yyruleno==104);
|
|
#line 316 "parse.y"
|
|
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
|
|
#line 3799 "parse.c"
|
|
break;
|
|
case 27: /* typetoken ::= typename LP signed RP */
|
|
#line 318 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
|
|
}
|
|
#line 3806 "parse.c"
|
|
break;
|
|
case 28: /* typetoken ::= typename LP signed COMMA signed RP */
|
|
#line 321 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
|
|
}
|
|
#line 3813 "parse.c"
|
|
break;
|
|
case 29: /* typename ::= typename ID|STRING */
|
|
#line 326 "parse.y"
|
|
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
|
|
#line 3818 "parse.c"
|
|
break;
|
|
case 30: /* scanpt ::= */
|
|
#line 344 "parse.y"
|
|
{
|
|
assert( yyLookahead!=YYNOCODE );
|
|
yymsp[1].minor.yy522 = yyLookaheadToken.z;
|
|
}
|
|
#line 3826 "parse.c"
|
|
break;
|
|
case 31: /* scantok ::= */
|
|
#line 348 "parse.y"
|
|
{
|
|
assert( yyLookahead!=YYNOCODE );
|
|
yymsp[1].minor.yy0 = yyLookaheadToken;
|
|
}
|
|
#line 3834 "parse.c"
|
|
break;
|
|
case 32: /* ccons ::= CONSTRAINT nm */
|
|
case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
|
|
#line 358 "parse.y"
|
|
{pParse->constraintName = yymsp[0].minor.yy0;}
|
|
#line 3840 "parse.c"
|
|
break;
|
|
case 33: /* ccons ::= DEFAULT scantok term */
|
|
#line 360 "parse.y"
|
|
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy528,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
|
|
#line 3845 "parse.c"
|
|
break;
|
|
case 34: /* ccons ::= DEFAULT LP expr RP */
|
|
#line 362 "parse.y"
|
|
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy528,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
|
|
#line 3850 "parse.c"
|
|
break;
|
|
case 35: /* ccons ::= DEFAULT PLUS scantok term */
|
|
#line 364 "parse.y"
|
|
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy528,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
|
|
#line 3855 "parse.c"
|
|
break;
|
|
case 36: /* ccons ::= DEFAULT MINUS scantok term */
|
|
#line 365 "parse.y"
|
|
{
|
|
Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy528, 0);
|
|
sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
|
|
}
|
|
#line 3863 "parse.c"
|
|
break;
|
|
case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
|
|
#line 369 "parse.y"
|
|
{
|
|
Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
|
|
if( p ){
|
|
sqlite3ExprIdToTrueFalse(p);
|
|
testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
|
|
}
|
|
sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
|
|
}
|
|
#line 3875 "parse.c"
|
|
break;
|
|
case 38: /* ccons ::= NOT NULL onconf */
|
|
#line 382 "parse.y"
|
|
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy394);}
|
|
#line 3880 "parse.c"
|
|
break;
|
|
case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
|
|
#line 384 "parse.y"
|
|
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy394,yymsp[0].minor.yy394,yymsp[-2].minor.yy394);}
|
|
#line 3885 "parse.c"
|
|
break;
|
|
case 40: /* ccons ::= UNIQUE onconf */
|
|
#line 385 "parse.y"
|
|
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy394,0,0,0,0,
|
|
SQLITE_IDXTYPE_UNIQUE);}
|
|
#line 3891 "parse.c"
|
|
break;
|
|
case 41: /* ccons ::= CHECK LP expr RP */
|
|
#line 387 "parse.y"
|
|
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy528,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
|
|
#line 3896 "parse.c"
|
|
break;
|
|
case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
|
|
#line 389 "parse.y"
|
|
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy394);}
|
|
#line 3901 "parse.c"
|
|
break;
|
|
case 43: /* ccons ::= defer_subclause */
|
|
#line 390 "parse.y"
|
|
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy394);}
|
|
#line 3906 "parse.c"
|
|
break;
|
|
case 44: /* ccons ::= COLLATE ID|STRING */
|
|
#line 391 "parse.y"
|
|
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
|
|
#line 3911 "parse.c"
|
|
break;
|
|
case 45: /* generated ::= LP expr RP */
|
|
#line 394 "parse.y"
|
|
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy528,0);}
|
|
#line 3916 "parse.c"
|
|
break;
|
|
case 46: /* generated ::= LP expr RP ID */
|
|
#line 395 "parse.y"
|
|
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy528,&yymsp[0].minor.yy0);}
|
|
#line 3921 "parse.c"
|
|
break;
|
|
case 48: /* autoinc ::= AUTOINCR */
|
|
#line 400 "parse.y"
|
|
{yymsp[0].minor.yy394 = 1;}
|
|
#line 3926 "parse.c"
|
|
break;
|
|
case 49: /* refargs ::= */
|
|
#line 408 "parse.y"
|
|
{ yymsp[1].minor.yy394 = OE_None*0x0101; /* EV: R-19803-45884 */}
|
|
#line 3931 "parse.c"
|
|
break;
|
|
case 50: /* refargs ::= refargs refarg */
|
|
#line 409 "parse.y"
|
|
{ yymsp[-1].minor.yy394 = (yymsp[-1].minor.yy394 & ~yymsp[0].minor.yy231.mask) | yymsp[0].minor.yy231.value; }
|
|
#line 3936 "parse.c"
|
|
break;
|
|
case 51: /* refarg ::= MATCH nm */
|
|
#line 411 "parse.y"
|
|
{ yymsp[-1].minor.yy231.value = 0; yymsp[-1].minor.yy231.mask = 0x000000; }
|
|
#line 3941 "parse.c"
|
|
break;
|
|
case 52: /* refarg ::= ON INSERT refact */
|
|
#line 412 "parse.y"
|
|
{ yymsp[-2].minor.yy231.value = 0; yymsp[-2].minor.yy231.mask = 0x000000; }
|
|
#line 3946 "parse.c"
|
|
break;
|
|
case 53: /* refarg ::= ON DELETE refact */
|
|
#line 413 "parse.y"
|
|
{ yymsp[-2].minor.yy231.value = yymsp[0].minor.yy394; yymsp[-2].minor.yy231.mask = 0x0000ff; }
|
|
#line 3951 "parse.c"
|
|
break;
|
|
case 54: /* refarg ::= ON UPDATE refact */
|
|
#line 414 "parse.y"
|
|
{ yymsp[-2].minor.yy231.value = yymsp[0].minor.yy394<<8; yymsp[-2].minor.yy231.mask = 0x00ff00; }
|
|
#line 3956 "parse.c"
|
|
break;
|
|
case 55: /* refact ::= SET NULL */
|
|
#line 416 "parse.y"
|
|
{ yymsp[-1].minor.yy394 = OE_SetNull; /* EV: R-33326-45252 */}
|
|
#line 3961 "parse.c"
|
|
break;
|
|
case 56: /* refact ::= SET DEFAULT */
|
|
#line 417 "parse.y"
|
|
{ yymsp[-1].minor.yy394 = OE_SetDflt; /* EV: R-33326-45252 */}
|
|
#line 3966 "parse.c"
|
|
break;
|
|
case 57: /* refact ::= CASCADE */
|
|
#line 418 "parse.y"
|
|
{ yymsp[0].minor.yy394 = OE_Cascade; /* EV: R-33326-45252 */}
|
|
#line 3971 "parse.c"
|
|
break;
|
|
case 58: /* refact ::= RESTRICT */
|
|
#line 419 "parse.y"
|
|
{ yymsp[0].minor.yy394 = OE_Restrict; /* EV: R-33326-45252 */}
|
|
#line 3976 "parse.c"
|
|
break;
|
|
case 59: /* refact ::= NO ACTION */
|
|
#line 420 "parse.y"
|
|
{ yymsp[-1].minor.yy394 = OE_None; /* EV: R-33326-45252 */}
|
|
#line 3981 "parse.c"
|
|
break;
|
|
case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
|
|
#line 422 "parse.y"
|
|
{yymsp[-2].minor.yy394 = 0;}
|
|
#line 3986 "parse.c"
|
|
break;
|
|
case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
|
|
case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
|
|
case 171: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==171);
|
|
#line 423 "parse.y"
|
|
{yymsp[-1].minor.yy394 = yymsp[0].minor.yy394;}
|
|
#line 3993 "parse.c"
|
|
break;
|
|
case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
|
|
case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
|
|
case 216: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==216);
|
|
case 219: /* in_op ::= NOT IN */ yytestcase(yyruleno==219);
|
|
case 245: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==245);
|
|
#line 426 "parse.y"
|
|
{yymsp[-1].minor.yy394 = 1;}
|
|
#line 4002 "parse.c"
|
|
break;
|
|
case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
|
|
#line 427 "parse.y"
|
|
{yymsp[-1].minor.yy394 = 0;}
|
|
#line 4007 "parse.c"
|
|
break;
|
|
case 66: /* tconscomma ::= COMMA */
|
|
#line 433 "parse.y"
|
|
{pParse->constraintName.n = 0;}
|
|
#line 4012 "parse.c"
|
|
break;
|
|
case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
|
|
#line 437 "parse.y"
|
|
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy394,yymsp[-2].minor.yy394,0);}
|
|
#line 4017 "parse.c"
|
|
break;
|
|
case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
|
|
#line 439 "parse.y"
|
|
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy394,0,0,0,0,
|
|
SQLITE_IDXTYPE_UNIQUE);}
|
|
#line 4023 "parse.c"
|
|
break;
|
|
case 70: /* tcons ::= CHECK LP expr RP onconf */
|
|
#line 442 "parse.y"
|
|
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy528,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
|
|
#line 4028 "parse.c"
|
|
break;
|
|
case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
|
|
#line 444 "parse.y"
|
|
{
|
|
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy394);
|
|
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy394);
|
|
}
|
|
#line 4036 "parse.c"
|
|
break;
|
|
case 73: /* onconf ::= */
|
|
case 75: /* orconf ::= */ yytestcase(yyruleno==75);
|
|
#line 458 "parse.y"
|
|
{yymsp[1].minor.yy394 = OE_Default;}
|
|
#line 4042 "parse.c"
|
|
break;
|
|
case 74: /* onconf ::= ON CONFLICT resolvetype */
|
|
#line 459 "parse.y"
|
|
{yymsp[-2].minor.yy394 = yymsp[0].minor.yy394;}
|
|
#line 4047 "parse.c"
|
|
break;
|
|
case 77: /* resolvetype ::= IGNORE */
|
|
#line 463 "parse.y"
|
|
{yymsp[0].minor.yy394 = OE_Ignore;}
|
|
#line 4052 "parse.c"
|
|
break;
|
|
case 78: /* resolvetype ::= REPLACE */
|
|
case 172: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==172);
|
|
#line 464 "parse.y"
|
|
{yymsp[0].minor.yy394 = OE_Replace;}
|
|
#line 4058 "parse.c"
|
|
break;
|
|
case 79: /* cmd ::= DROP TABLE ifexists fullname */
|
|
#line 468 "parse.y"
|
|
{
|
|
sqlite3DropTable(pParse, yymsp[0].minor.yy131, 0, yymsp[-1].minor.yy394);
|
|
}
|
|
#line 4065 "parse.c"
|
|
break;
|
|
case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
|
|
#line 479 "parse.y"
|
|
{
|
|
sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[0].minor.yy47, yymsp[-7].minor.yy394, yymsp[-5].minor.yy394);
|
|
}
|
|
#line 4072 "parse.c"
|
|
break;
|
|
case 83: /* cmd ::= DROP VIEW ifexists fullname */
|
|
#line 482 "parse.y"
|
|
{
|
|
sqlite3DropTable(pParse, yymsp[0].minor.yy131, 1, yymsp[-1].minor.yy394);
|
|
}
|
|
#line 4079 "parse.c"
|
|
break;
|
|
case 84: /* cmd ::= select */
|
|
#line 489 "parse.y"
|
|
{
|
|
SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
|
|
sqlite3Select(pParse, yymsp[0].minor.yy47, &dest);
|
|
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy47);
|
|
}
|
|
#line 4088 "parse.c"
|
|
break;
|
|
case 85: /* select ::= WITH wqlist selectnowith */
|
|
#line 551 "parse.y"
|
|
{yymsp[-2].minor.yy47 = attachWithToSelect(pParse,yymsp[0].minor.yy47,yymsp[-1].minor.yy521);}
|
|
#line 4093 "parse.c"
|
|
break;
|
|
case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
|
|
#line 553 "parse.y"
|
|
{yymsp[-3].minor.yy47 = attachWithToSelect(pParse,yymsp[0].minor.yy47,yymsp[-1].minor.yy521);}
|
|
#line 4098 "parse.c"
|
|
break;
|
|
case 87: /* select ::= selectnowith */
|
|
#line 555 "parse.y"
|
|
{
|
|
Select *p = yymsp[0].minor.yy47;
|
|
if( p ){
|
|
parserDoubleLinkSelect(pParse, p);
|
|
}
|
|
yymsp[0].minor.yy47 = p; /*A-overwrites-X*/
|
|
}
|
|
#line 4109 "parse.c"
|
|
break;
|
|
case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
|
|
#line 565 "parse.y"
|
|
{
|
|
Select *pRhs = yymsp[0].minor.yy47;
|
|
Select *pLhs = yymsp[-2].minor.yy47;
|
|
if( pRhs && pRhs->pPrior ){
|
|
SrcList *pFrom;
|
|
Token x;
|
|
x.n = 0;
|
|
parserDoubleLinkSelect(pParse, pRhs);
|
|
pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0);
|
|
pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
|
|
}
|
|
if( pRhs ){
|
|
pRhs->op = (u8)yymsp[-1].minor.yy394;
|
|
pRhs->pPrior = pLhs;
|
|
if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
|
|
pRhs->selFlags &= ~SF_MultiValue;
|
|
if( yymsp[-1].minor.yy394!=TK_ALL ) pParse->hasCompound = 1;
|
|
}else{
|
|
sqlite3SelectDelete(pParse->db, pLhs);
|
|
}
|
|
yymsp[-2].minor.yy47 = pRhs;
|
|
}
|
|
#line 4135 "parse.c"
|
|
break;
|
|
case 89: /* multiselect_op ::= UNION */
|
|
case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
|
|
#line 588 "parse.y"
|
|
{yymsp[0].minor.yy394 = yymsp[0].major; /*A-overwrites-OP*/}
|
|
#line 4141 "parse.c"
|
|
break;
|
|
case 90: /* multiselect_op ::= UNION ALL */
|
|
#line 589 "parse.y"
|
|
{yymsp[-1].minor.yy394 = TK_ALL;}
|
|
#line 4146 "parse.c"
|
|
break;
|
|
case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
|
|
#line 595 "parse.y"
|
|
{
|
|
yymsp[-8].minor.yy47 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy131,yymsp[-4].minor.yy528,yymsp[-3].minor.yy322,yymsp[-2].minor.yy528,yymsp[-1].minor.yy322,yymsp[-7].minor.yy394,yymsp[0].minor.yy528);
|
|
}
|
|
#line 4153 "parse.c"
|
|
break;
|
|
case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
|
|
#line 601 "parse.y"
|
|
{
|
|
yymsp[-9].minor.yy47 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy322,yymsp[-6].minor.yy131,yymsp[-5].minor.yy528,yymsp[-4].minor.yy322,yymsp[-3].minor.yy528,yymsp[-1].minor.yy322,yymsp[-8].minor.yy394,yymsp[0].minor.yy528);
|
|
if( yymsp[-9].minor.yy47 ){
|
|
yymsp[-9].minor.yy47->pWinDefn = yymsp[-2].minor.yy41;
|
|
}else{
|
|
sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy41);
|
|
}
|
|
}
|
|
#line 4165 "parse.c"
|
|
break;
|
|
case 94: /* values ::= VALUES LP nexprlist RP */
|
|
#line 616 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy47 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy322,0,0,0,0,0,SF_Values,0);
|
|
}
|
|
#line 4172 "parse.c"
|
|
break;
|
|
case 95: /* values ::= values COMMA LP nexprlist RP */
|
|
#line 619 "parse.y"
|
|
{
|
|
Select *pRight, *pLeft = yymsp[-4].minor.yy47;
|
|
pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy322,0,0,0,0,0,SF_Values|SF_MultiValue,0);
|
|
if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
|
|
if( pRight ){
|
|
pRight->op = TK_ALL;
|
|
pRight->pPrior = pLeft;
|
|
yymsp[-4].minor.yy47 = pRight;
|
|
}else{
|
|
yymsp[-4].minor.yy47 = pLeft;
|
|
}
|
|
}
|
|
#line 4188 "parse.c"
|
|
break;
|
|
case 96: /* distinct ::= DISTINCT */
|
|
#line 636 "parse.y"
|
|
{yymsp[0].minor.yy394 = SF_Distinct;}
|
|
#line 4193 "parse.c"
|
|
break;
|
|
case 97: /* distinct ::= ALL */
|
|
#line 637 "parse.y"
|
|
{yymsp[0].minor.yy394 = SF_All;}
|
|
#line 4198 "parse.c"
|
|
break;
|
|
case 99: /* sclp ::= */
|
|
case 132: /* orderby_opt ::= */ yytestcase(yyruleno==132);
|
|
case 142: /* groupby_opt ::= */ yytestcase(yyruleno==142);
|
|
case 232: /* exprlist ::= */ yytestcase(yyruleno==232);
|
|
case 235: /* paren_exprlist ::= */ yytestcase(yyruleno==235);
|
|
case 240: /* eidlist_opt ::= */ yytestcase(yyruleno==240);
|
|
#line 650 "parse.y"
|
|
{yymsp[1].minor.yy322 = 0;}
|
|
#line 4208 "parse.c"
|
|
break;
|
|
case 100: /* selcollist ::= sclp scanpt expr scanpt as */
|
|
#line 651 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[-2].minor.yy528);
|
|
if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy322, &yymsp[0].minor.yy0, 1);
|
|
sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy322,yymsp[-3].minor.yy522,yymsp[-1].minor.yy522);
|
|
}
|
|
#line 4217 "parse.c"
|
|
break;
|
|
case 101: /* selcollist ::= sclp scanpt STAR */
|
|
#line 656 "parse.y"
|
|
{
|
|
Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
|
|
yymsp[-2].minor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, p);
|
|
}
|
|
#line 4225 "parse.c"
|
|
break;
|
|
case 102: /* selcollist ::= sclp scanpt nm DOT STAR */
|
|
#line 660 "parse.y"
|
|
{
|
|
Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
|
|
Expr *pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);
|
|
Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, pDot);
|
|
}
|
|
#line 4235 "parse.c"
|
|
break;
|
|
case 103: /* as ::= AS nm */
|
|
case 115: /* dbnm ::= DOT nm */ yytestcase(yyruleno==115);
|
|
case 256: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==256);
|
|
case 257: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==257);
|
|
#line 671 "parse.y"
|
|
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
|
|
#line 4243 "parse.c"
|
|
break;
|
|
case 105: /* from ::= */
|
|
case 108: /* stl_prefix ::= */ yytestcase(yyruleno==108);
|
|
#line 685 "parse.y"
|
|
{yymsp[1].minor.yy131 = 0;}
|
|
#line 4249 "parse.c"
|
|
break;
|
|
case 106: /* from ::= FROM seltablist */
|
|
#line 686 "parse.y"
|
|
{
|
|
yymsp[-1].minor.yy131 = yymsp[0].minor.yy131;
|
|
sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy131);
|
|
}
|
|
#line 4257 "parse.c"
|
|
break;
|
|
case 107: /* stl_prefix ::= seltablist joinop */
|
|
#line 694 "parse.y"
|
|
{
|
|
if( ALWAYS(yymsp[-1].minor.yy131 && yymsp[-1].minor.yy131->nSrc>0) ) yymsp[-1].minor.yy131->a[yymsp[-1].minor.yy131->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy394;
|
|
}
|
|
#line 4264 "parse.c"
|
|
break;
|
|
case 109: /* seltablist ::= stl_prefix nm dbnm as on_using */
|
|
#line 698 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy131,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy561);
|
|
}
|
|
#line 4271 "parse.c"
|
|
break;
|
|
case 110: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
|
|
#line 701 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy131,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy561);
|
|
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy131, &yymsp[-1].minor.yy0);
|
|
}
|
|
#line 4279 "parse.c"
|
|
break;
|
|
case 111: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
|
|
#line 705 "parse.y"
|
|
{
|
|
yymsp[-7].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy131,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy561);
|
|
sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy131, yymsp[-3].minor.yy322);
|
|
}
|
|
#line 4287 "parse.c"
|
|
break;
|
|
case 112: /* seltablist ::= stl_prefix LP select RP as on_using */
|
|
#line 710 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy131,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy47,&yymsp[0].minor.yy561);
|
|
}
|
|
#line 4294 "parse.c"
|
|
break;
|
|
case 113: /* seltablist ::= stl_prefix LP seltablist RP as on_using */
|
|
#line 713 "parse.y"
|
|
{
|
|
if( yymsp[-5].minor.yy131==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy561.pOn==0 && yymsp[0].minor.yy561.pUsing==0 ){
|
|
yymsp[-5].minor.yy131 = yymsp[-3].minor.yy131;
|
|
}else if( yymsp[-3].minor.yy131->nSrc==1 ){
|
|
yymsp[-5].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy131,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy561);
|
|
if( yymsp[-5].minor.yy131 ){
|
|
SrcItem *pNew = &yymsp[-5].minor.yy131->a[yymsp[-5].minor.yy131->nSrc-1];
|
|
SrcItem *pOld = yymsp[-3].minor.yy131->a;
|
|
pNew->zName = pOld->zName;
|
|
pNew->zDatabase = pOld->zDatabase;
|
|
pNew->pSelect = pOld->pSelect;
|
|
if( pNew->pSelect && (pNew->pSelect->selFlags & SF_NestedFrom)!=0 ){
|
|
pNew->fg.isNestedFrom = 1;
|
|
}
|
|
if( pOld->fg.isTabFunc ){
|
|
pNew->u1.pFuncArg = pOld->u1.pFuncArg;
|
|
pOld->u1.pFuncArg = 0;
|
|
pOld->fg.isTabFunc = 0;
|
|
pNew->fg.isTabFunc = 1;
|
|
}
|
|
pOld->zName = pOld->zDatabase = 0;
|
|
pOld->pSelect = 0;
|
|
}
|
|
sqlite3SrcListDelete(pParse->db, yymsp[-3].minor.yy131);
|
|
}else{
|
|
Select *pSubquery;
|
|
sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy131);
|
|
pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy131,0,0,0,0,SF_NestedFrom,0);
|
|
yymsp[-5].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy131,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy561);
|
|
}
|
|
}
|
|
#line 4329 "parse.c"
|
|
break;
|
|
case 114: /* dbnm ::= */
|
|
case 129: /* indexed_opt ::= */ yytestcase(yyruleno==129);
|
|
#line 747 "parse.y"
|
|
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
|
|
#line 4335 "parse.c"
|
|
break;
|
|
case 116: /* fullname ::= nm */
|
|
#line 752 "parse.y"
|
|
{
|
|
yylhsminor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
|
|
if( IN_RENAME_OBJECT && yylhsminor.yy131 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy131->a[0].zName, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 4343 "parse.c"
|
|
yymsp[0].minor.yy131 = yylhsminor.yy131;
|
|
break;
|
|
case 117: /* fullname ::= nm DOT nm */
|
|
#line 756 "parse.y"
|
|
{
|
|
yylhsminor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
|
|
if( IN_RENAME_OBJECT && yylhsminor.yy131 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy131->a[0].zName, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 4352 "parse.c"
|
|
yymsp[-2].minor.yy131 = yylhsminor.yy131;
|
|
break;
|
|
case 118: /* xfullname ::= nm */
|
|
#line 764 "parse.y"
|
|
{yymsp[0].minor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
|
|
#line 4358 "parse.c"
|
|
break;
|
|
case 119: /* xfullname ::= nm DOT nm */
|
|
#line 766 "parse.y"
|
|
{yymsp[-2].minor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
|
|
#line 4363 "parse.c"
|
|
break;
|
|
case 120: /* xfullname ::= nm DOT nm AS nm */
|
|
#line 767 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
|
|
if( yymsp[-4].minor.yy131 ) yymsp[-4].minor.yy131->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 4371 "parse.c"
|
|
break;
|
|
case 121: /* xfullname ::= nm AS nm */
|
|
#line 771 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy131 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
|
|
if( yymsp[-2].minor.yy131 ) yymsp[-2].minor.yy131->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 4379 "parse.c"
|
|
break;
|
|
case 122: /* joinop ::= COMMA|JOIN */
|
|
#line 777 "parse.y"
|
|
{ yymsp[0].minor.yy394 = JT_INNER; }
|
|
#line 4384 "parse.c"
|
|
break;
|
|
case 123: /* joinop ::= JOIN_KW JOIN */
|
|
#line 779 "parse.y"
|
|
{yymsp[-1].minor.yy394 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
|
|
#line 4389 "parse.c"
|
|
break;
|
|
case 124: /* joinop ::= JOIN_KW nm JOIN */
|
|
#line 781 "parse.y"
|
|
{yymsp[-2].minor.yy394 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
|
|
#line 4394 "parse.c"
|
|
break;
|
|
case 125: /* joinop ::= JOIN_KW nm nm JOIN */
|
|
#line 783 "parse.y"
|
|
{yymsp[-3].minor.yy394 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
|
|
#line 4399 "parse.c"
|
|
break;
|
|
case 126: /* on_using ::= ON expr */
|
|
#line 804 "parse.y"
|
|
{yymsp[-1].minor.yy561.pOn = yymsp[0].minor.yy528; yymsp[-1].minor.yy561.pUsing = 0;}
|
|
#line 4404 "parse.c"
|
|
break;
|
|
case 127: /* on_using ::= USING LP idlist RP */
|
|
#line 805 "parse.y"
|
|
{yymsp[-3].minor.yy561.pOn = 0; yymsp[-3].minor.yy561.pUsing = yymsp[-1].minor.yy254;}
|
|
#line 4409 "parse.c"
|
|
break;
|
|
case 128: /* on_using ::= */
|
|
#line 806 "parse.y"
|
|
{yymsp[1].minor.yy561.pOn = 0; yymsp[1].minor.yy561.pUsing = 0;}
|
|
#line 4414 "parse.c"
|
|
break;
|
|
case 130: /* indexed_by ::= INDEXED BY nm */
|
|
#line 822 "parse.y"
|
|
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
|
|
#line 4419 "parse.c"
|
|
break;
|
|
case 131: /* indexed_by ::= NOT INDEXED */
|
|
#line 823 "parse.y"
|
|
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
|
|
#line 4424 "parse.c"
|
|
break;
|
|
case 133: /* orderby_opt ::= ORDER BY sortlist */
|
|
case 143: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==143);
|
|
#line 836 "parse.y"
|
|
{yymsp[-2].minor.yy322 = yymsp[0].minor.yy322;}
|
|
#line 4430 "parse.c"
|
|
break;
|
|
case 134: /* sortlist ::= sortlist COMMA expr sortorder nulls */
|
|
#line 837 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322,yymsp[-2].minor.yy528);
|
|
sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy322,yymsp[-1].minor.yy394,yymsp[0].minor.yy394);
|
|
}
|
|
#line 4438 "parse.c"
|
|
break;
|
|
case 135: /* sortlist ::= expr sortorder nulls */
|
|
#line 841 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy528); /*A-overwrites-Y*/
|
|
sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy322,yymsp[-1].minor.yy394,yymsp[0].minor.yy394);
|
|
}
|
|
#line 4446 "parse.c"
|
|
break;
|
|
case 136: /* sortorder ::= ASC */
|
|
#line 848 "parse.y"
|
|
{yymsp[0].minor.yy394 = SQLITE_SO_ASC;}
|
|
#line 4451 "parse.c"
|
|
break;
|
|
case 137: /* sortorder ::= DESC */
|
|
#line 849 "parse.y"
|
|
{yymsp[0].minor.yy394 = SQLITE_SO_DESC;}
|
|
#line 4456 "parse.c"
|
|
break;
|
|
case 138: /* sortorder ::= */
|
|
case 141: /* nulls ::= */ yytestcase(yyruleno==141);
|
|
#line 850 "parse.y"
|
|
{yymsp[1].minor.yy394 = SQLITE_SO_UNDEFINED;}
|
|
#line 4462 "parse.c"
|
|
break;
|
|
case 139: /* nulls ::= NULLS FIRST */
|
|
#line 853 "parse.y"
|
|
{yymsp[-1].minor.yy394 = SQLITE_SO_ASC;}
|
|
#line 4467 "parse.c"
|
|
break;
|
|
case 140: /* nulls ::= NULLS LAST */
|
|
#line 854 "parse.y"
|
|
{yymsp[-1].minor.yy394 = SQLITE_SO_DESC;}
|
|
#line 4472 "parse.c"
|
|
break;
|
|
case 144: /* having_opt ::= */
|
|
case 146: /* limit_opt ::= */ yytestcase(yyruleno==146);
|
|
case 151: /* where_opt ::= */ yytestcase(yyruleno==151);
|
|
case 153: /* where_opt_ret ::= */ yytestcase(yyruleno==153);
|
|
case 229: /* case_else ::= */ yytestcase(yyruleno==229);
|
|
case 231: /* case_operand ::= */ yytestcase(yyruleno==231);
|
|
case 250: /* vinto ::= */ yytestcase(yyruleno==250);
|
|
#line 864 "parse.y"
|
|
{yymsp[1].minor.yy528 = 0;}
|
|
#line 4483 "parse.c"
|
|
break;
|
|
case 145: /* having_opt ::= HAVING expr */
|
|
case 152: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==152);
|
|
case 154: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==154);
|
|
case 228: /* case_else ::= ELSE expr */ yytestcase(yyruleno==228);
|
|
case 249: /* vinto ::= INTO expr */ yytestcase(yyruleno==249);
|
|
#line 865 "parse.y"
|
|
{yymsp[-1].minor.yy528 = yymsp[0].minor.yy528;}
|
|
#line 4492 "parse.c"
|
|
break;
|
|
case 147: /* limit_opt ::= LIMIT expr */
|
|
#line 879 "parse.y"
|
|
{yymsp[-1].minor.yy528 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy528,0);}
|
|
#line 4497 "parse.c"
|
|
break;
|
|
case 148: /* limit_opt ::= LIMIT expr OFFSET expr */
|
|
#line 881 "parse.y"
|
|
{yymsp[-3].minor.yy528 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);}
|
|
#line 4502 "parse.c"
|
|
break;
|
|
case 149: /* limit_opt ::= LIMIT expr COMMA expr */
|
|
#line 883 "parse.y"
|
|
{yymsp[-3].minor.yy528 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy528,yymsp[-2].minor.yy528);}
|
|
#line 4507 "parse.c"
|
|
break;
|
|
case 150: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
|
|
#line 901 "parse.y"
|
|
{
|
|
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy131, &yymsp[-1].minor.yy0);
|
|
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy131,yymsp[0].minor.yy528,0,0);
|
|
}
|
|
#line 4515 "parse.c"
|
|
break;
|
|
case 155: /* where_opt_ret ::= RETURNING selcollist */
|
|
#line 917 "parse.y"
|
|
{sqlite3AddReturning(pParse,yymsp[0].minor.yy322); yymsp[-1].minor.yy528 = 0;}
|
|
#line 4520 "parse.c"
|
|
break;
|
|
case 156: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
|
|
#line 919 "parse.y"
|
|
{sqlite3AddReturning(pParse,yymsp[0].minor.yy322); yymsp[-3].minor.yy528 = yymsp[-2].minor.yy528;}
|
|
#line 4525 "parse.c"
|
|
break;
|
|
case 157: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
|
|
#line 951 "parse.y"
|
|
{
|
|
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy131, &yymsp[-4].minor.yy0);
|
|
sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy322,"set list");
|
|
if( yymsp[-1].minor.yy131 ){
|
|
SrcList *pFromClause = yymsp[-1].minor.yy131;
|
|
if( pFromClause->nSrc>1 ){
|
|
Select *pSubquery;
|
|
Token as;
|
|
pSubquery = sqlite3SelectNew(pParse,0,pFromClause,0,0,0,0,SF_NestedFrom,0);
|
|
as.n = 0;
|
|
as.z = 0;
|
|
pFromClause = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&as,pSubquery,0);
|
|
}
|
|
yymsp[-5].minor.yy131 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy131, pFromClause);
|
|
}
|
|
sqlite3Update(pParse,yymsp[-5].minor.yy131,yymsp[-2].minor.yy322,yymsp[0].minor.yy528,yymsp[-6].minor.yy394,0,0,0);
|
|
}
|
|
#line 4546 "parse.c"
|
|
break;
|
|
case 158: /* setlist ::= setlist COMMA nm EQ expr */
|
|
#line 975 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy528);
|
|
sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy322, &yymsp[-2].minor.yy0, 1);
|
|
}
|
|
#line 4554 "parse.c"
|
|
break;
|
|
case 159: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
|
|
#line 979 "parse.y"
|
|
{
|
|
yymsp[-6].minor.yy322 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy322, yymsp[-3].minor.yy254, yymsp[0].minor.yy528);
|
|
}
|
|
#line 4561 "parse.c"
|
|
break;
|
|
case 160: /* setlist ::= nm EQ expr */
|
|
#line 982 "parse.y"
|
|
{
|
|
yylhsminor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy528);
|
|
sqlite3ExprListSetName(pParse, yylhsminor.yy322, &yymsp[-2].minor.yy0, 1);
|
|
}
|
|
#line 4569 "parse.c"
|
|
yymsp[-2].minor.yy322 = yylhsminor.yy322;
|
|
break;
|
|
case 161: /* setlist ::= LP idlist RP EQ expr */
|
|
#line 986 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy254, yymsp[0].minor.yy528);
|
|
}
|
|
#line 4577 "parse.c"
|
|
break;
|
|
case 162: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
|
|
#line 993 "parse.y"
|
|
{
|
|
sqlite3Insert(pParse, yymsp[-3].minor.yy131, yymsp[-1].minor.yy47, yymsp[-2].minor.yy254, yymsp[-5].minor.yy394, yymsp[0].minor.yy444);
|
|
}
|
|
#line 4584 "parse.c"
|
|
break;
|
|
case 163: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
|
|
#line 997 "parse.y"
|
|
{
|
|
sqlite3Insert(pParse, yymsp[-4].minor.yy131, 0, yymsp[-3].minor.yy254, yymsp[-6].minor.yy394, 0);
|
|
}
|
|
#line 4591 "parse.c"
|
|
break;
|
|
case 164: /* upsert ::= */
|
|
#line 1008 "parse.y"
|
|
{ yymsp[1].minor.yy444 = 0; }
|
|
#line 4596 "parse.c"
|
|
break;
|
|
case 165: /* upsert ::= RETURNING selcollist */
|
|
#line 1009 "parse.y"
|
|
{ yymsp[-1].minor.yy444 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy322); }
|
|
#line 4601 "parse.c"
|
|
break;
|
|
case 166: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
|
|
#line 1012 "parse.y"
|
|
{ yymsp[-11].minor.yy444 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy322,yymsp[-6].minor.yy528,yymsp[-2].minor.yy322,yymsp[-1].minor.yy528,yymsp[0].minor.yy444);}
|
|
#line 4606 "parse.c"
|
|
break;
|
|
case 167: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
|
|
#line 1014 "parse.y"
|
|
{ yymsp[-8].minor.yy444 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy322,yymsp[-3].minor.yy528,0,0,yymsp[0].minor.yy444); }
|
|
#line 4611 "parse.c"
|
|
break;
|
|
case 168: /* upsert ::= ON CONFLICT DO NOTHING returning */
|
|
#line 1016 "parse.y"
|
|
{ yymsp[-4].minor.yy444 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
|
|
#line 4616 "parse.c"
|
|
break;
|
|
case 169: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
|
|
#line 1018 "parse.y"
|
|
{ yymsp[-7].minor.yy444 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy322,yymsp[-1].minor.yy528,0);}
|
|
#line 4621 "parse.c"
|
|
break;
|
|
case 170: /* returning ::= RETURNING selcollist */
|
|
#line 1020 "parse.y"
|
|
{sqlite3AddReturning(pParse,yymsp[0].minor.yy322);}
|
|
#line 4626 "parse.c"
|
|
break;
|
|
case 173: /* idlist_opt ::= */
|
|
#line 1032 "parse.y"
|
|
{yymsp[1].minor.yy254 = 0;}
|
|
#line 4631 "parse.c"
|
|
break;
|
|
case 174: /* idlist_opt ::= LP idlist RP */
|
|
#line 1033 "parse.y"
|
|
{yymsp[-2].minor.yy254 = yymsp[-1].minor.yy254;}
|
|
#line 4636 "parse.c"
|
|
break;
|
|
case 175: /* idlist ::= idlist COMMA nm */
|
|
#line 1035 "parse.y"
|
|
{yymsp[-2].minor.yy254 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy254,&yymsp[0].minor.yy0);}
|
|
#line 4641 "parse.c"
|
|
break;
|
|
case 176: /* idlist ::= nm */
|
|
#line 1037 "parse.y"
|
|
{yymsp[0].minor.yy254 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
|
|
#line 4646 "parse.c"
|
|
break;
|
|
case 177: /* expr ::= LP expr RP */
|
|
#line 1086 "parse.y"
|
|
{yymsp[-2].minor.yy528 = yymsp[-1].minor.yy528;}
|
|
#line 4651 "parse.c"
|
|
break;
|
|
case 178: /* expr ::= ID|INDEXED */
|
|
case 179: /* expr ::= JOIN_KW */ yytestcase(yyruleno==179);
|
|
#line 1087 "parse.y"
|
|
{yymsp[0].minor.yy528=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
|
|
#line 4657 "parse.c"
|
|
break;
|
|
case 180: /* expr ::= nm DOT nm */
|
|
#line 1089 "parse.y"
|
|
{
|
|
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
|
|
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
|
|
yylhsminor.yy528 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
|
|
}
|
|
#line 4666 "parse.c"
|
|
yymsp[-2].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 181: /* expr ::= nm DOT nm DOT nm */
|
|
#line 1094 "parse.y"
|
|
{
|
|
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);
|
|
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
|
|
Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
|
|
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
|
|
if( IN_RENAME_OBJECT ){
|
|
sqlite3RenameTokenRemap(pParse, 0, temp1);
|
|
}
|
|
yylhsminor.yy528 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
|
|
}
|
|
#line 4681 "parse.c"
|
|
yymsp[-4].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 182: /* term ::= NULL|FLOAT|BLOB */
|
|
case 183: /* term ::= STRING */ yytestcase(yyruleno==183);
|
|
#line 1104 "parse.y"
|
|
{yymsp[0].minor.yy528=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
|
|
#line 4688 "parse.c"
|
|
break;
|
|
case 184: /* term ::= INTEGER */
|
|
#line 1106 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
|
|
if( yylhsminor.yy528 ) yylhsminor.yy528->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);
|
|
}
|
|
#line 4696 "parse.c"
|
|
yymsp[0].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 185: /* expr ::= VARIABLE */
|
|
#line 1110 "parse.y"
|
|
{
|
|
if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
|
|
u32 n = yymsp[0].minor.yy0.n;
|
|
yymsp[0].minor.yy528 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
|
|
sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy528, n);
|
|
}else{
|
|
/* When doing a nested parse, one can include terms in an expression
|
|
** that look like this: #1 #2 ... These terms refer to registers
|
|
** in the virtual machine. #N is the N-th register. */
|
|
Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
|
|
assert( t.n>=2 );
|
|
if( pParse->nested==0 ){
|
|
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
|
|
yymsp[0].minor.yy528 = 0;
|
|
}else{
|
|
yymsp[0].minor.yy528 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
|
|
if( yymsp[0].minor.yy528 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy528->iTable);
|
|
}
|
|
}
|
|
}
|
|
#line 4721 "parse.c"
|
|
break;
|
|
case 186: /* expr ::= expr COLLATE ID|STRING */
|
|
#line 1130 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy528 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy528, &yymsp[0].minor.yy0, 1);
|
|
}
|
|
#line 4728 "parse.c"
|
|
break;
|
|
case 187: /* expr ::= CAST LP expr AS typetoken RP */
|
|
#line 1134 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy528 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
|
|
sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy528, yymsp[-3].minor.yy528, 0);
|
|
}
|
|
#line 4736 "parse.c"
|
|
break;
|
|
case 188: /* expr ::= ID|INDEXED LP distinct exprlist RP */
|
|
#line 1141 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy394);
|
|
}
|
|
#line 4743 "parse.c"
|
|
yymsp[-4].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 189: /* expr ::= ID|INDEXED LP STAR RP */
|
|
#line 1144 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
|
|
}
|
|
#line 4751 "parse.c"
|
|
yymsp[-3].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 190: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
|
|
#line 1149 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy322, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy394);
|
|
sqlite3WindowAttach(pParse, yylhsminor.yy528, yymsp[0].minor.yy41);
|
|
}
|
|
#line 4760 "parse.c"
|
|
yymsp[-5].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 191: /* expr ::= ID|INDEXED LP STAR RP filter_over */
|
|
#line 1153 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
|
|
sqlite3WindowAttach(pParse, yylhsminor.yy528, yymsp[0].minor.yy41);
|
|
}
|
|
#line 4769 "parse.c"
|
|
yymsp[-4].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 192: /* term ::= CTIME_KW */
|
|
#line 1159 "parse.y"
|
|
{
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
|
|
}
|
|
#line 4777 "parse.c"
|
|
yymsp[0].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 193: /* expr ::= LP nexprlist COMMA expr RP */
|
|
#line 1163 "parse.y"
|
|
{
|
|
ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy322, yymsp[-1].minor.yy528);
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
|
|
if( yymsp[-4].minor.yy528 ){
|
|
yymsp[-4].minor.yy528->x.pList = pList;
|
|
if( ALWAYS(pList->nExpr) ){
|
|
yymsp[-4].minor.yy528->flags |= pList->a[0].pExpr->flags & EP_Propagate;
|
|
}
|
|
}else{
|
|
sqlite3ExprListDelete(pParse->db, pList);
|
|
}
|
|
}
|
|
#line 4794 "parse.c"
|
|
break;
|
|
case 194: /* expr ::= expr AND expr */
|
|
#line 1176 "parse.y"
|
|
{yymsp[-2].minor.yy528=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);}
|
|
#line 4799 "parse.c"
|
|
break;
|
|
case 195: /* expr ::= expr OR expr */
|
|
case 196: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==196);
|
|
case 197: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==197);
|
|
case 198: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==198);
|
|
case 199: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==199);
|
|
case 200: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==200);
|
|
case 201: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==201);
|
|
#line 1177 "parse.y"
|
|
{yymsp[-2].minor.yy528=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);}
|
|
#line 4810 "parse.c"
|
|
break;
|
|
case 202: /* likeop ::= NOT LIKE_KW|MATCH */
|
|
#line 1190 "parse.y"
|
|
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
|
|
#line 4815 "parse.c"
|
|
break;
|
|
case 203: /* expr ::= expr likeop expr */
|
|
#line 1191 "parse.y"
|
|
{
|
|
ExprList *pList;
|
|
int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
|
|
yymsp[-1].minor.yy0.n &= 0x7fffffff;
|
|
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy528);
|
|
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy528);
|
|
yymsp[-2].minor.yy528 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
|
|
if( bNot ) yymsp[-2].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy528, 0);
|
|
if( yymsp[-2].minor.yy528 ) yymsp[-2].minor.yy528->flags |= EP_InfixFunc;
|
|
}
|
|
#line 4829 "parse.c"
|
|
break;
|
|
case 204: /* expr ::= expr likeop expr ESCAPE expr */
|
|
#line 1201 "parse.y"
|
|
{
|
|
ExprList *pList;
|
|
int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
|
|
yymsp[-3].minor.yy0.n &= 0x7fffffff;
|
|
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy528);
|
|
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy528);
|
|
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy528);
|
|
yymsp[-4].minor.yy528 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
|
|
if( bNot ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0);
|
|
if( yymsp[-4].minor.yy528 ) yymsp[-4].minor.yy528->flags |= EP_InfixFunc;
|
|
}
|
|
#line 4844 "parse.c"
|
|
break;
|
|
case 205: /* expr ::= expr ISNULL|NOTNULL */
|
|
#line 1213 "parse.y"
|
|
{yymsp[-1].minor.yy528 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy528,0);}
|
|
#line 4849 "parse.c"
|
|
break;
|
|
case 206: /* expr ::= expr NOT NULL */
|
|
#line 1214 "parse.y"
|
|
{yymsp[-2].minor.yy528 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy528,0);}
|
|
#line 4854 "parse.c"
|
|
break;
|
|
case 207: /* expr ::= expr IS expr */
|
|
#line 1235 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy528 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);
|
|
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-2].minor.yy528, TK_ISNULL);
|
|
}
|
|
#line 4862 "parse.c"
|
|
break;
|
|
case 208: /* expr ::= expr IS NOT expr */
|
|
#line 1239 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy528 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy528,yymsp[0].minor.yy528);
|
|
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-3].minor.yy528, TK_NOTNULL);
|
|
}
|
|
#line 4870 "parse.c"
|
|
break;
|
|
case 209: /* expr ::= expr IS NOT DISTINCT FROM expr */
|
|
#line 1243 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy528 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy528,yymsp[0].minor.yy528);
|
|
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-5].minor.yy528, TK_ISNULL);
|
|
}
|
|
#line 4878 "parse.c"
|
|
break;
|
|
case 210: /* expr ::= expr IS DISTINCT FROM expr */
|
|
#line 1247 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy528,yymsp[0].minor.yy528);
|
|
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-4].minor.yy528, TK_NOTNULL);
|
|
}
|
|
#line 4886 "parse.c"
|
|
break;
|
|
case 211: /* expr ::= NOT expr */
|
|
case 212: /* expr ::= BITNOT expr */ yytestcase(yyruleno==212);
|
|
#line 1253 "parse.y"
|
|
{yymsp[-1].minor.yy528 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy528, 0);/*A-overwrites-B*/}
|
|
#line 4892 "parse.c"
|
|
break;
|
|
case 213: /* expr ::= PLUS|MINUS expr */
|
|
#line 1256 "parse.y"
|
|
{
|
|
yymsp[-1].minor.yy528 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy528, 0);
|
|
/*A-overwrites-B*/
|
|
}
|
|
#line 4900 "parse.c"
|
|
break;
|
|
case 214: /* expr ::= expr PTR expr */
|
|
#line 1261 "parse.y"
|
|
{
|
|
ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy528);
|
|
pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy528);
|
|
yylhsminor.yy528 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
|
|
}
|
|
#line 4909 "parse.c"
|
|
yymsp[-2].minor.yy528 = yylhsminor.yy528;
|
|
break;
|
|
case 215: /* between_op ::= BETWEEN */
|
|
case 218: /* in_op ::= IN */ yytestcase(yyruleno==218);
|
|
#line 1268 "parse.y"
|
|
{yymsp[0].minor.yy394 = 0;}
|
|
#line 4916 "parse.c"
|
|
break;
|
|
case 217: /* expr ::= expr between_op expr AND expr */
|
|
#line 1270 "parse.y"
|
|
{
|
|
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy528);
|
|
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy528);
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy528, 0);
|
|
if( yymsp[-4].minor.yy528 ){
|
|
yymsp[-4].minor.yy528->x.pList = pList;
|
|
}else{
|
|
sqlite3ExprListDelete(pParse->db, pList);
|
|
}
|
|
if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0);
|
|
}
|
|
#line 4931 "parse.c"
|
|
break;
|
|
case 220: /* expr ::= expr in_op LP exprlist RP */
|
|
#line 1285 "parse.y"
|
|
{
|
|
if( yymsp[-1].minor.yy322==0 ){
|
|
/* Expressions of the form
|
|
**
|
|
** expr1 IN ()
|
|
** expr1 NOT IN ()
|
|
**
|
|
** simplify to constants 0 (false) and 1 (true), respectively,
|
|
** regardless of the value of expr1.
|
|
*/
|
|
sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy528);
|
|
yymsp[-4].minor.yy528 = sqlite3Expr(pParse->db, TK_STRING, yymsp[-3].minor.yy394 ? "true" : "false");
|
|
if( yymsp[-4].minor.yy528 ) sqlite3ExprIdToTrueFalse(yymsp[-4].minor.yy528);
|
|
}else{
|
|
Expr *pRHS = yymsp[-1].minor.yy322->a[0].pExpr;
|
|
if( yymsp[-1].minor.yy322->nExpr==1 && sqlite3ExprIsConstant(pRHS) && yymsp[-4].minor.yy528->op!=TK_VECTOR ){
|
|
yymsp[-1].minor.yy322->a[0].pExpr = 0;
|
|
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322);
|
|
pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy528, pRHS);
|
|
}else{
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0);
|
|
if( yymsp[-4].minor.yy528==0 ){
|
|
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322);
|
|
}else if( yymsp[-4].minor.yy528->pLeft->op==TK_VECTOR ){
|
|
int nExpr = yymsp[-4].minor.yy528->pLeft->x.pList->nExpr;
|
|
Select *pSelectRHS = sqlite3ExprListToValues(pParse, nExpr, yymsp[-1].minor.yy322);
|
|
if( pSelectRHS ){
|
|
parserDoubleLinkSelect(pParse, pSelectRHS);
|
|
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy528, pSelectRHS);
|
|
}
|
|
}else{
|
|
yymsp[-4].minor.yy528->x.pList = yymsp[-1].minor.yy322;
|
|
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy528);
|
|
}
|
|
}
|
|
if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0);
|
|
}
|
|
}
|
|
#line 4974 "parse.c"
|
|
break;
|
|
case 221: /* expr ::= LP select RP */
|
|
#line 1324 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy528 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
|
|
sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy528, yymsp[-1].minor.yy47);
|
|
}
|
|
#line 4982 "parse.c"
|
|
break;
|
|
case 222: /* expr ::= expr in_op LP select RP */
|
|
#line 1328 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0);
|
|
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy528, yymsp[-1].minor.yy47);
|
|
if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0);
|
|
}
|
|
#line 4991 "parse.c"
|
|
break;
|
|
case 223: /* expr ::= expr in_op nm dbnm paren_exprlist */
|
|
#line 1333 "parse.y"
|
|
{
|
|
SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
|
|
Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
|
|
if( yymsp[0].minor.yy322 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy322);
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0);
|
|
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy528, pSelect);
|
|
if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0);
|
|
}
|
|
#line 5003 "parse.c"
|
|
break;
|
|
case 224: /* expr ::= EXISTS LP select RP */
|
|
#line 1341 "parse.y"
|
|
{
|
|
Expr *p;
|
|
p = yymsp[-3].minor.yy528 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
|
|
sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy47);
|
|
}
|
|
#line 5012 "parse.c"
|
|
break;
|
|
case 225: /* expr ::= CASE case_operand case_exprlist case_else END */
|
|
#line 1349 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy528, 0);
|
|
if( yymsp[-4].minor.yy528 ){
|
|
yymsp[-4].minor.yy528->x.pList = yymsp[-1].minor.yy528 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[-1].minor.yy528) : yymsp[-2].minor.yy322;
|
|
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy528);
|
|
}else{
|
|
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
|
|
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy528);
|
|
}
|
|
}
|
|
#line 5026 "parse.c"
|
|
break;
|
|
case 226: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
|
|
#line 1361 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy528);
|
|
yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[0].minor.yy528);
|
|
}
|
|
#line 5034 "parse.c"
|
|
break;
|
|
case 227: /* case_exprlist ::= WHEN expr THEN expr */
|
|
#line 1365 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy528);
|
|
yymsp[-3].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, yymsp[0].minor.yy528);
|
|
}
|
|
#line 5042 "parse.c"
|
|
break;
|
|
case 230: /* case_operand ::= expr */
|
|
#line 1375 "parse.y"
|
|
{yymsp[0].minor.yy528 = yymsp[0].minor.yy528; /*A-overwrites-X*/}
|
|
#line 5047 "parse.c"
|
|
break;
|
|
case 233: /* nexprlist ::= nexprlist COMMA expr */
|
|
#line 1386 "parse.y"
|
|
{yymsp[-2].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy528);}
|
|
#line 5052 "parse.c"
|
|
break;
|
|
case 234: /* nexprlist ::= expr */
|
|
#line 1388 "parse.y"
|
|
{yymsp[0].minor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy528); /*A-overwrites-Y*/}
|
|
#line 5057 "parse.c"
|
|
break;
|
|
case 236: /* paren_exprlist ::= LP exprlist RP */
|
|
case 241: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==241);
|
|
#line 1396 "parse.y"
|
|
{yymsp[-2].minor.yy322 = yymsp[-1].minor.yy322;}
|
|
#line 5063 "parse.c"
|
|
break;
|
|
case 237: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
|
|
#line 1403 "parse.y"
|
|
{
|
|
sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
|
|
sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy322, yymsp[-10].minor.yy394,
|
|
&yymsp[-11].minor.yy0, yymsp[0].minor.yy528, SQLITE_SO_ASC, yymsp[-8].minor.yy394, SQLITE_IDXTYPE_APPDEF);
|
|
if( IN_RENAME_OBJECT && pParse->pNewIndex ){
|
|
sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
|
|
}
|
|
}
|
|
#line 5075 "parse.c"
|
|
break;
|
|
case 238: /* uniqueflag ::= UNIQUE */
|
|
case 280: /* raisetype ::= ABORT */ yytestcase(yyruleno==280);
|
|
#line 1413 "parse.y"
|
|
{yymsp[0].minor.yy394 = OE_Abort;}
|
|
#line 5081 "parse.c"
|
|
break;
|
|
case 239: /* uniqueflag ::= */
|
|
#line 1414 "parse.y"
|
|
{yymsp[1].minor.yy394 = OE_None;}
|
|
#line 5086 "parse.c"
|
|
break;
|
|
case 242: /* eidlist ::= eidlist COMMA nm collate sortorder */
|
|
#line 1464 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy322 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy322, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy394, yymsp[0].minor.yy394);
|
|
}
|
|
#line 5093 "parse.c"
|
|
break;
|
|
case 243: /* eidlist ::= nm collate sortorder */
|
|
#line 1467 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy322 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy394, yymsp[0].minor.yy394); /*A-overwrites-Y*/
|
|
}
|
|
#line 5100 "parse.c"
|
|
break;
|
|
case 246: /* cmd ::= DROP INDEX ifexists fullname */
|
|
#line 1478 "parse.y"
|
|
{sqlite3DropIndex(pParse, yymsp[0].minor.yy131, yymsp[-1].minor.yy394);}
|
|
#line 5105 "parse.c"
|
|
break;
|
|
case 247: /* cmd ::= VACUUM vinto */
|
|
#line 1485 "parse.y"
|
|
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy528);}
|
|
#line 5110 "parse.c"
|
|
break;
|
|
case 248: /* cmd ::= VACUUM nm vinto */
|
|
#line 1486 "parse.y"
|
|
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy528);}
|
|
#line 5115 "parse.c"
|
|
break;
|
|
case 251: /* cmd ::= PRAGMA nm dbnm */
|
|
#line 1494 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
|
|
#line 5120 "parse.c"
|
|
break;
|
|
case 252: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
|
|
#line 1495 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
|
|
#line 5125 "parse.c"
|
|
break;
|
|
case 253: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
|
|
#line 1496 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
|
|
#line 5130 "parse.c"
|
|
break;
|
|
case 254: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
|
|
#line 1498 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
|
|
#line 5135 "parse.c"
|
|
break;
|
|
case 255: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
|
|
#line 1500 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
|
|
#line 5140 "parse.c"
|
|
break;
|
|
case 258: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
|
|
#line 1516 "parse.y"
|
|
{
|
|
Token all;
|
|
all.z = yymsp[-3].minor.yy0.z;
|
|
all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
|
|
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy33, &all);
|
|
}
|
|
#line 5150 "parse.c"
|
|
break;
|
|
case 259: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
|
|
#line 1525 "parse.y"
|
|
{
|
|
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy394, yymsp[-4].minor.yy180.a, yymsp[-4].minor.yy180.b, yymsp[-2].minor.yy131, yymsp[0].minor.yy528, yymsp[-10].minor.yy394, yymsp[-8].minor.yy394);
|
|
yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
|
|
}
|
|
#line 5158 "parse.c"
|
|
break;
|
|
case 260: /* trigger_time ::= BEFORE|AFTER */
|
|
#line 1531 "parse.y"
|
|
{ yymsp[0].minor.yy394 = yymsp[0].major; /*A-overwrites-X*/ }
|
|
#line 5163 "parse.c"
|
|
break;
|
|
case 261: /* trigger_time ::= INSTEAD OF */
|
|
#line 1532 "parse.y"
|
|
{ yymsp[-1].minor.yy394 = TK_INSTEAD;}
|
|
#line 5168 "parse.c"
|
|
break;
|
|
case 262: /* trigger_time ::= */
|
|
#line 1533 "parse.y"
|
|
{ yymsp[1].minor.yy394 = TK_BEFORE; }
|
|
#line 5173 "parse.c"
|
|
break;
|
|
case 263: /* trigger_event ::= DELETE|INSERT */
|
|
case 264: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==264);
|
|
#line 1537 "parse.y"
|
|
{yymsp[0].minor.yy180.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy180.b = 0;}
|
|
#line 5179 "parse.c"
|
|
break;
|
|
case 265: /* trigger_event ::= UPDATE OF idlist */
|
|
#line 1539 "parse.y"
|
|
{yymsp[-2].minor.yy180.a = TK_UPDATE; yymsp[-2].minor.yy180.b = yymsp[0].minor.yy254;}
|
|
#line 5184 "parse.c"
|
|
break;
|
|
case 266: /* when_clause ::= */
|
|
case 285: /* key_opt ::= */ yytestcase(yyruleno==285);
|
|
#line 1546 "parse.y"
|
|
{ yymsp[1].minor.yy528 = 0; }
|
|
#line 5190 "parse.c"
|
|
break;
|
|
case 267: /* when_clause ::= WHEN expr */
|
|
case 286: /* key_opt ::= KEY expr */ yytestcase(yyruleno==286);
|
|
#line 1547 "parse.y"
|
|
{ yymsp[-1].minor.yy528 = yymsp[0].minor.yy528; }
|
|
#line 5196 "parse.c"
|
|
break;
|
|
case 268: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
|
|
#line 1551 "parse.y"
|
|
{
|
|
assert( yymsp[-2].minor.yy33!=0 );
|
|
yymsp[-2].minor.yy33->pLast->pNext = yymsp[-1].minor.yy33;
|
|
yymsp[-2].minor.yy33->pLast = yymsp[-1].minor.yy33;
|
|
}
|
|
#line 5205 "parse.c"
|
|
break;
|
|
case 269: /* trigger_cmd_list ::= trigger_cmd SEMI */
|
|
#line 1556 "parse.y"
|
|
{
|
|
assert( yymsp[-1].minor.yy33!=0 );
|
|
yymsp[-1].minor.yy33->pLast = yymsp[-1].minor.yy33;
|
|
}
|
|
#line 5213 "parse.c"
|
|
break;
|
|
case 270: /* trnm ::= nm DOT nm */
|
|
#line 1567 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
|
|
sqlite3ErrorMsg(pParse,
|
|
"qualified table names are not allowed on INSERT, UPDATE, and DELETE "
|
|
"statements within triggers");
|
|
}
|
|
#line 5223 "parse.c"
|
|
break;
|
|
case 271: /* tridxby ::= INDEXED BY nm */
|
|
#line 1579 "parse.y"
|
|
{
|
|
sqlite3ErrorMsg(pParse,
|
|
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
|
|
"within triggers");
|
|
}
|
|
#line 5232 "parse.c"
|
|
break;
|
|
case 272: /* tridxby ::= NOT INDEXED */
|
|
#line 1584 "parse.y"
|
|
{
|
|
sqlite3ErrorMsg(pParse,
|
|
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
|
|
"within triggers");
|
|
}
|
|
#line 5241 "parse.c"
|
|
break;
|
|
case 273: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
|
|
#line 1597 "parse.y"
|
|
{yylhsminor.yy33 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy131, yymsp[-3].minor.yy322, yymsp[-1].minor.yy528, yymsp[-7].minor.yy394, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy522);}
|
|
#line 5246 "parse.c"
|
|
yymsp[-8].minor.yy33 = yylhsminor.yy33;
|
|
break;
|
|
case 274: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
|
|
#line 1601 "parse.y"
|
|
{
|
|
yylhsminor.yy33 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy254,yymsp[-2].minor.yy47,yymsp[-6].minor.yy394,yymsp[-1].minor.yy444,yymsp[-7].minor.yy522,yymsp[0].minor.yy522);/*yylhsminor.yy33-overwrites-yymsp[-6].minor.yy394*/
|
|
}
|
|
#line 5254 "parse.c"
|
|
yymsp[-7].minor.yy33 = yylhsminor.yy33;
|
|
break;
|
|
case 275: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
|
|
#line 1606 "parse.y"
|
|
{yylhsminor.yy33 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy528, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy522);}
|
|
#line 5260 "parse.c"
|
|
yymsp[-5].minor.yy33 = yylhsminor.yy33;
|
|
break;
|
|
case 276: /* trigger_cmd ::= scanpt select scanpt */
|
|
#line 1610 "parse.y"
|
|
{yylhsminor.yy33 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy47, yymsp[-2].minor.yy522, yymsp[0].minor.yy522); /*yylhsminor.yy33-overwrites-yymsp[-1].minor.yy47*/}
|
|
#line 5266 "parse.c"
|
|
yymsp[-2].minor.yy33 = yylhsminor.yy33;
|
|
break;
|
|
case 277: /* expr ::= RAISE LP IGNORE RP */
|
|
#line 1613 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy528 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
|
|
if( yymsp[-3].minor.yy528 ){
|
|
yymsp[-3].minor.yy528->affExpr = OE_Ignore;
|
|
}
|
|
}
|
|
#line 5277 "parse.c"
|
|
break;
|
|
case 278: /* expr ::= RAISE LP raisetype COMMA nm RP */
|
|
#line 1619 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy528 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1);
|
|
if( yymsp[-5].minor.yy528 ) {
|
|
yymsp[-5].minor.yy528->affExpr = (char)yymsp[-3].minor.yy394;
|
|
}
|
|
}
|
|
#line 5287 "parse.c"
|
|
break;
|
|
case 279: /* raisetype ::= ROLLBACK */
|
|
#line 1628 "parse.y"
|
|
{yymsp[0].minor.yy394 = OE_Rollback;}
|
|
#line 5292 "parse.c"
|
|
break;
|
|
case 281: /* raisetype ::= FAIL */
|
|
#line 1630 "parse.y"
|
|
{yymsp[0].minor.yy394 = OE_Fail;}
|
|
#line 5297 "parse.c"
|
|
break;
|
|
case 282: /* cmd ::= DROP TRIGGER ifexists fullname */
|
|
#line 1635 "parse.y"
|
|
{
|
|
sqlite3DropTrigger(pParse,yymsp[0].minor.yy131,yymsp[-1].minor.yy394);
|
|
}
|
|
#line 5304 "parse.c"
|
|
break;
|
|
case 283: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
|
|
#line 1642 "parse.y"
|
|
{
|
|
sqlite3Attach(pParse, yymsp[-3].minor.yy528, yymsp[-1].minor.yy528, yymsp[0].minor.yy528);
|
|
}
|
|
#line 5311 "parse.c"
|
|
break;
|
|
case 284: /* cmd ::= DETACH database_kw_opt expr */
|
|
#line 1645 "parse.y"
|
|
{
|
|
sqlite3Detach(pParse, yymsp[0].minor.yy528);
|
|
}
|
|
#line 5318 "parse.c"
|
|
break;
|
|
case 287: /* cmd ::= REINDEX */
|
|
#line 1660 "parse.y"
|
|
{sqlite3Reindex(pParse, 0, 0);}
|
|
#line 5323 "parse.c"
|
|
break;
|
|
case 288: /* cmd ::= REINDEX nm dbnm */
|
|
#line 1661 "parse.y"
|
|
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
|
|
#line 5328 "parse.c"
|
|
break;
|
|
case 289: /* cmd ::= ANALYZE */
|
|
#line 1666 "parse.y"
|
|
{sqlite3Analyze(pParse, 0, 0);}
|
|
#line 5333 "parse.c"
|
|
break;
|
|
case 290: /* cmd ::= ANALYZE nm dbnm */
|
|
#line 1667 "parse.y"
|
|
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
|
|
#line 5338 "parse.c"
|
|
break;
|
|
case 291: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
|
|
#line 1673 "parse.y"
|
|
{
|
|
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy131,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 5345 "parse.c"
|
|
break;
|
|
case 292: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
|
|
#line 1677 "parse.y"
|
|
{
|
|
yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
|
|
sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
|
|
}
|
|
#line 5353 "parse.c"
|
|
break;
|
|
case 293: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
|
|
#line 1681 "parse.y"
|
|
{
|
|
sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy131, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 5360 "parse.c"
|
|
break;
|
|
case 294: /* add_column_fullname ::= fullname */
|
|
#line 1685 "parse.y"
|
|
{
|
|
disableLookaside(pParse);
|
|
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy131);
|
|
}
|
|
#line 5368 "parse.c"
|
|
break;
|
|
case 295: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
|
|
#line 1689 "parse.y"
|
|
{
|
|
sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy131, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 5375 "parse.c"
|
|
break;
|
|
case 296: /* cmd ::= create_vtab */
|
|
#line 1701 "parse.y"
|
|
{sqlite3VtabFinishParse(pParse,0);}
|
|
#line 5380 "parse.c"
|
|
break;
|
|
case 297: /* cmd ::= create_vtab LP vtabarglist RP */
|
|
#line 1702 "parse.y"
|
|
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
|
|
#line 5385 "parse.c"
|
|
break;
|
|
case 298: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
|
|
#line 1704 "parse.y"
|
|
{
|
|
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy394);
|
|
}
|
|
#line 5392 "parse.c"
|
|
break;
|
|
case 299: /* vtabarg ::= */
|
|
#line 1709 "parse.y"
|
|
{sqlite3VtabArgInit(pParse);}
|
|
#line 5397 "parse.c"
|
|
break;
|
|
case 300: /* vtabargtoken ::= ANY */
|
|
case 301: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==301);
|
|
case 302: /* lp ::= LP */ yytestcase(yyruleno==302);
|
|
#line 1711 "parse.y"
|
|
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
|
|
#line 5404 "parse.c"
|
|
break;
|
|
case 303: /* with ::= WITH wqlist */
|
|
case 304: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==304);
|
|
#line 1728 "parse.y"
|
|
{ sqlite3WithPush(pParse, yymsp[0].minor.yy521, 1); }
|
|
#line 5410 "parse.c"
|
|
break;
|
|
case 305: /* wqas ::= AS */
|
|
#line 1732 "parse.y"
|
|
{yymsp[0].minor.yy516 = M10d_Any;}
|
|
#line 5415 "parse.c"
|
|
break;
|
|
case 306: /* wqas ::= AS MATERIALIZED */
|
|
#line 1733 "parse.y"
|
|
{yymsp[-1].minor.yy516 = M10d_Yes;}
|
|
#line 5420 "parse.c"
|
|
break;
|
|
case 307: /* wqas ::= AS NOT MATERIALIZED */
|
|
#line 1734 "parse.y"
|
|
{yymsp[-2].minor.yy516 = M10d_No;}
|
|
#line 5425 "parse.c"
|
|
break;
|
|
case 308: /* wqitem ::= nm eidlist_opt wqas LP select RP */
|
|
#line 1735 "parse.y"
|
|
{
|
|
yymsp[-5].minor.yy385 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy322, yymsp[-1].minor.yy47, yymsp[-3].minor.yy516); /*A-overwrites-X*/
|
|
}
|
|
#line 5432 "parse.c"
|
|
break;
|
|
case 309: /* wqlist ::= wqitem */
|
|
#line 1738 "parse.y"
|
|
{
|
|
yymsp[0].minor.yy521 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy385); /*A-overwrites-X*/
|
|
}
|
|
#line 5439 "parse.c"
|
|
break;
|
|
case 310: /* wqlist ::= wqlist COMMA wqitem */
|
|
#line 1741 "parse.y"
|
|
{
|
|
yymsp[-2].minor.yy521 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy521, yymsp[0].minor.yy385);
|
|
}
|
|
#line 5446 "parse.c"
|
|
break;
|
|
case 311: /* windowdefn_list ::= windowdefn */
|
|
#line 1755 "parse.y"
|
|
{ yylhsminor.yy41 = yymsp[0].minor.yy41; }
|
|
#line 5451 "parse.c"
|
|
yymsp[0].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 312: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
|
|
#line 1756 "parse.y"
|
|
{
|
|
assert( yymsp[0].minor.yy41!=0 );
|
|
sqlite3WindowChain(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy41);
|
|
yymsp[0].minor.yy41->pNextWin = yymsp[-2].minor.yy41;
|
|
yylhsminor.yy41 = yymsp[0].minor.yy41;
|
|
}
|
|
#line 5462 "parse.c"
|
|
yymsp[-2].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 313: /* windowdefn ::= nm AS LP window RP */
|
|
#line 1765 "parse.y"
|
|
{
|
|
if( ALWAYS(yymsp[-1].minor.yy41) ){
|
|
yymsp[-1].minor.yy41->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
|
|
}
|
|
yylhsminor.yy41 = yymsp[-1].minor.yy41;
|
|
}
|
|
#line 5473 "parse.c"
|
|
yymsp[-4].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 314: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
|
|
#line 1799 "parse.y"
|
|
{
|
|
yymsp[-4].minor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy322, yymsp[-1].minor.yy322, 0);
|
|
}
|
|
#line 5481 "parse.c"
|
|
break;
|
|
case 315: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
|
|
#line 1802 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy322, yymsp[-1].minor.yy322, &yymsp[-5].minor.yy0);
|
|
}
|
|
#line 5488 "parse.c"
|
|
yymsp[-5].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 316: /* window ::= ORDER BY sortlist frame_opt */
|
|
#line 1805 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, yymsp[-1].minor.yy322, 0);
|
|
}
|
|
#line 5496 "parse.c"
|
|
break;
|
|
case 317: /* window ::= nm ORDER BY sortlist frame_opt */
|
|
#line 1808 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
|
|
}
|
|
#line 5503 "parse.c"
|
|
yymsp[-4].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 318: /* window ::= frame_opt */
|
|
case 337: /* filter_over ::= over_clause */ yytestcase(yyruleno==337);
|
|
#line 1811 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = yymsp[0].minor.yy41;
|
|
}
|
|
#line 5512 "parse.c"
|
|
yymsp[0].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 319: /* window ::= nm frame_opt */
|
|
#line 1814 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, 0, &yymsp[-1].minor.yy0);
|
|
}
|
|
#line 5520 "parse.c"
|
|
yymsp[-1].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 320: /* frame_opt ::= */
|
|
#line 1818 "parse.y"
|
|
{
|
|
yymsp[1].minor.yy41 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
|
|
}
|
|
#line 5528 "parse.c"
|
|
break;
|
|
case 321: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
|
|
#line 1821 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy394, yymsp[-1].minor.yy595.eType, yymsp[-1].minor.yy595.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy516);
|
|
}
|
|
#line 5535 "parse.c"
|
|
yymsp[-2].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 322: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
|
|
#line 1825 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy394, yymsp[-3].minor.yy595.eType, yymsp[-3].minor.yy595.pExpr, yymsp[-1].minor.yy595.eType, yymsp[-1].minor.yy595.pExpr, yymsp[0].minor.yy516);
|
|
}
|
|
#line 5543 "parse.c"
|
|
yymsp[-5].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 324: /* frame_bound_s ::= frame_bound */
|
|
case 326: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==326);
|
|
#line 1831 "parse.y"
|
|
{yylhsminor.yy595 = yymsp[0].minor.yy595;}
|
|
#line 5550 "parse.c"
|
|
yymsp[0].minor.yy595 = yylhsminor.yy595;
|
|
break;
|
|
case 325: /* frame_bound_s ::= UNBOUNDED PRECEDING */
|
|
case 327: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==327);
|
|
case 329: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==329);
|
|
#line 1832 "parse.y"
|
|
{yylhsminor.yy595.eType = yymsp[-1].major; yylhsminor.yy595.pExpr = 0;}
|
|
#line 5558 "parse.c"
|
|
yymsp[-1].minor.yy595 = yylhsminor.yy595;
|
|
break;
|
|
case 328: /* frame_bound ::= expr PRECEDING|FOLLOWING */
|
|
#line 1837 "parse.y"
|
|
{yylhsminor.yy595.eType = yymsp[0].major; yylhsminor.yy595.pExpr = yymsp[-1].minor.yy528;}
|
|
#line 5564 "parse.c"
|
|
yymsp[-1].minor.yy595 = yylhsminor.yy595;
|
|
break;
|
|
case 330: /* frame_exclude_opt ::= */
|
|
#line 1841 "parse.y"
|
|
{yymsp[1].minor.yy516 = 0;}
|
|
#line 5570 "parse.c"
|
|
break;
|
|
case 331: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
|
|
#line 1842 "parse.y"
|
|
{yymsp[-1].minor.yy516 = yymsp[0].minor.yy516;}
|
|
#line 5575 "parse.c"
|
|
break;
|
|
case 332: /* frame_exclude ::= NO OTHERS */
|
|
case 333: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==333);
|
|
#line 1845 "parse.y"
|
|
{yymsp[-1].minor.yy516 = yymsp[-1].major; /*A-overwrites-X*/}
|
|
#line 5581 "parse.c"
|
|
break;
|
|
case 334: /* frame_exclude ::= GROUP|TIES */
|
|
#line 1847 "parse.y"
|
|
{yymsp[0].minor.yy516 = yymsp[0].major; /*A-overwrites-X*/}
|
|
#line 5586 "parse.c"
|
|
break;
|
|
case 335: /* window_clause ::= WINDOW windowdefn_list */
|
|
#line 1852 "parse.y"
|
|
{ yymsp[-1].minor.yy41 = yymsp[0].minor.yy41; }
|
|
#line 5591 "parse.c"
|
|
break;
|
|
case 336: /* filter_over ::= filter_clause over_clause */
|
|
#line 1854 "parse.y"
|
|
{
|
|
if( yymsp[0].minor.yy41 ){
|
|
yymsp[0].minor.yy41->pFilter = yymsp[-1].minor.yy528;
|
|
}else{
|
|
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy528);
|
|
}
|
|
yylhsminor.yy41 = yymsp[0].minor.yy41;
|
|
}
|
|
#line 5603 "parse.c"
|
|
yymsp[-1].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 338: /* filter_over ::= filter_clause */
|
|
#line 1865 "parse.y"
|
|
{
|
|
yylhsminor.yy41 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
|
|
if( yylhsminor.yy41 ){
|
|
yylhsminor.yy41->eFrmType = TK_FILTER;
|
|
yylhsminor.yy41->pFilter = yymsp[0].minor.yy528;
|
|
}else{
|
|
sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy528);
|
|
}
|
|
}
|
|
#line 5617 "parse.c"
|
|
yymsp[0].minor.yy41 = yylhsminor.yy41;
|
|
break;
|
|
case 339: /* over_clause ::= OVER LP window RP */
|
|
#line 1875 "parse.y"
|
|
{
|
|
yymsp[-3].minor.yy41 = yymsp[-1].minor.yy41;
|
|
assert( yymsp[-3].minor.yy41!=0 );
|
|
}
|
|
#line 5626 "parse.c"
|
|
break;
|
|
case 340: /* over_clause ::= OVER nm */
|
|
#line 1879 "parse.y"
|
|
{
|
|
yymsp[-1].minor.yy41 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
|
|
if( yymsp[-1].minor.yy41 ){
|
|
yymsp[-1].minor.yy41->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
|
|
}
|
|
}
|
|
#line 5636 "parse.c"
|
|
break;
|
|
case 341: /* filter_clause ::= FILTER LP WHERE expr RP */
|
|
#line 1886 "parse.y"
|
|
{ yymsp[-4].minor.yy528 = yymsp[-1].minor.yy528; }
|
|
#line 5641 "parse.c"
|
|
break;
|
|
default:
|
|
/* (342) input ::= cmdlist */ yytestcase(yyruleno==342);
|
|
/* (343) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==343);
|
|
/* (344) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=344);
|
|
/* (345) ecmd ::= SEMI */ yytestcase(yyruleno==345);
|
|
/* (346) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==346);
|
|
/* (347) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=347);
|
|
/* (348) trans_opt ::= */ yytestcase(yyruleno==348);
|
|
/* (349) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==349);
|
|
/* (350) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==350);
|
|
/* (351) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==351);
|
|
/* (352) savepoint_opt ::= */ yytestcase(yyruleno==352);
|
|
/* (353) cmd ::= create_table create_table_args */ yytestcase(yyruleno==353);
|
|
/* (354) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=354);
|
|
/* (355) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==355);
|
|
/* (356) columnlist ::= columnname carglist */ yytestcase(yyruleno==356);
|
|
/* (357) nm ::= ID|INDEXED */ yytestcase(yyruleno==357);
|
|
/* (358) nm ::= STRING */ yytestcase(yyruleno==358);
|
|
/* (359) nm ::= JOIN_KW */ yytestcase(yyruleno==359);
|
|
/* (360) typetoken ::= typename */ yytestcase(yyruleno==360);
|
|
/* (361) typename ::= ID|STRING */ yytestcase(yyruleno==361);
|
|
/* (362) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=362);
|
|
/* (363) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=363);
|
|
/* (364) carglist ::= carglist ccons */ yytestcase(yyruleno==364);
|
|
/* (365) carglist ::= */ yytestcase(yyruleno==365);
|
|
/* (366) ccons ::= NULL onconf */ yytestcase(yyruleno==366);
|
|
/* (367) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==367);
|
|
/* (368) ccons ::= AS generated */ yytestcase(yyruleno==368);
|
|
/* (369) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==369);
|
|
/* (370) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==370);
|
|
/* (371) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=371);
|
|
/* (372) tconscomma ::= */ yytestcase(yyruleno==372);
|
|
/* (373) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=373);
|
|
/* (374) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=374);
|
|
/* (375) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=375);
|
|
/* (376) oneselect ::= values */ yytestcase(yyruleno==376);
|
|
/* (377) sclp ::= selcollist COMMA */ yytestcase(yyruleno==377);
|
|
/* (378) as ::= ID|STRING */ yytestcase(yyruleno==378);
|
|
/* (379) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=379);
|
|
/* (380) returning ::= */ yytestcase(yyruleno==380);
|
|
/* (381) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=381);
|
|
/* (382) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==382);
|
|
/* (383) exprlist ::= nexprlist */ yytestcase(yyruleno==383);
|
|
/* (384) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=384);
|
|
/* (385) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=385);
|
|
/* (386) nmnum ::= ON */ yytestcase(yyruleno==386);
|
|
/* (387) nmnum ::= DELETE */ yytestcase(yyruleno==387);
|
|
/* (388) nmnum ::= DEFAULT */ yytestcase(yyruleno==388);
|
|
/* (389) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==389);
|
|
/* (390) foreach_clause ::= */ yytestcase(yyruleno==390);
|
|
/* (391) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==391);
|
|
/* (392) trnm ::= nm */ yytestcase(yyruleno==392);
|
|
/* (393) tridxby ::= */ yytestcase(yyruleno==393);
|
|
/* (394) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==394);
|
|
/* (395) database_kw_opt ::= */ yytestcase(yyruleno==395);
|
|
/* (396) kwcolumn_opt ::= */ yytestcase(yyruleno==396);
|
|
/* (397) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==397);
|
|
/* (398) vtabarglist ::= vtabarg */ yytestcase(yyruleno==398);
|
|
/* (399) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==399);
|
|
/* (400) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==400);
|
|
/* (401) anylist ::= */ yytestcase(yyruleno==401);
|
|
/* (402) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==402);
|
|
/* (403) anylist ::= anylist ANY */ yytestcase(yyruleno==403);
|
|
/* (404) with ::= */ yytestcase(yyruleno==404);
|
|
break;
|
|
/********** End reduce actions ************************************************/
|
|
};
|
|
assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
|
|
yygoto = yyRuleInfoLhs[yyruleno];
|
|
yysize = yyRuleInfoNRhs[yyruleno];
|
|
yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
|
|
|
|
/* There are no SHIFTREDUCE actions on nonterminals because the table
|
|
** generator has simplified them to pure REDUCE actions. */
|
|
assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );
|
|
|
|
/* It is not possible for a REDUCE to be followed by an error */
|
|
assert( yyact!=YY_ERROR_ACTION );
|
|
|
|
yymsp += yysize+1;
|
|
yypParser->yytos = yymsp;
|
|
yymsp->stateno = (YYACTIONTYPE)yyact;
|
|
yymsp->major = (YYCODETYPE)yygoto;
|
|
yyTraceShift(yypParser, yyact, "... then shift");
|
|
return yyact;
|
|
}
|
|
|
|
/*
|
|
** The following code executes when the parse fails
|
|
*/
|
|
#ifndef YYNOERRORRECOVERY
|
|
static void yy_parse_failed(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
sqlite3ParserARG_FETCH
|
|
sqlite3ParserCTX_FETCH
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
|
|
}
|
|
#endif
|
|
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
|
|
/* Here code is inserted which will be executed whenever the
|
|
** parser fails */
|
|
/************ Begin %parse_failure code ***************************************/
|
|
/************ End %parse_failure code *****************************************/
|
|
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
|
|
sqlite3ParserCTX_STORE
|
|
}
|
|
#endif /* YYNOERRORRECOVERY */
|
|
|
|
/*
|
|
** The following code executes when a syntax error first occurs.
|
|
*/
|
|
static void yy_syntax_error(
|
|
yyParser *yypParser, /* The parser */
|
|
int yymajor, /* The major type of the error token */
|
|
sqlite3ParserTOKENTYPE yyminor /* The minor type of the error token */
|
|
){
|
|
sqlite3ParserARG_FETCH
|
|
sqlite3ParserCTX_FETCH
|
|
#define TOKEN yyminor
|
|
/************ Begin %syntax_error code ****************************************/
|
|
#line 39 "parse.y"
|
|
|
|
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
|
|
if( TOKEN.z[0] ){
|
|
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
|
}else{
|
|
sqlite3ErrorMsg(pParse, "incomplete input");
|
|
}
|
|
#line 5774 "parse.c"
|
|
/************ End %syntax_error code ******************************************/
|
|
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
|
|
sqlite3ParserCTX_STORE
|
|
}
|
|
|
|
/*
|
|
** The following is executed when the parser accepts
|
|
*/
|
|
static void yy_accept(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
sqlite3ParserARG_FETCH
|
|
sqlite3ParserCTX_FETCH
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
|
|
}
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
assert( yypParser->yytos==yypParser->yystack );
|
|
/* Here code is inserted which will be executed whenever the
|
|
** parser accepts */
|
|
/*********** Begin %parse_accept code *****************************************/
|
|
/*********** End %parse_accept code *******************************************/
|
|
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
|
|
sqlite3ParserCTX_STORE
|
|
}
|
|
|
|
/* The main parser program.
|
|
** The first argument is a pointer to a structure obtained from
|
|
** "sqlite3ParserAlloc" which describes the current state of the parser.
|
|
** The second argument is the major token number. The third is
|
|
** the minor token. The fourth optional argument is whatever the
|
|
** user wants (and specified in the grammar) and is available for
|
|
** use by the action routines.
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A pointer to the parser (an opaque structure.)
|
|
** <li> The major token number.
|
|
** <li> The minor token number.
|
|
** <li> An option argument of a grammar-specified type.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void sqlite3Parser(
|
|
void *yyp, /* The parser */
|
|
int yymajor, /* The major token code number */
|
|
sqlite3ParserTOKENTYPE yyminor /* The value for the token */
|
|
sqlite3ParserARG_PDECL /* Optional %extra_argument parameter */
|
|
){
|
|
YYMINORTYPE yyminorunion;
|
|
YYACTIONTYPE yyact; /* The parser action. */
|
|
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
|
|
int yyendofinput; /* True if we are at the end of input */
|
|
#endif
|
|
#ifdef YYERRORSYMBOL
|
|
int yyerrorhit = 0; /* True if yymajor has invoked an error */
|
|
#endif
|
|
yyParser *yypParser = (yyParser*)yyp; /* The parser */
|
|
sqlite3ParserCTX_FETCH
|
|
sqlite3ParserARG_STORE
|
|
|
|
assert( yypParser->yytos!=0 );
|
|
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
|
|
yyendofinput = (yymajor==0);
|
|
#endif
|
|
|
|
yyact = yypParser->yytos->stateno;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
if( yyact < YY_MIN_REDUCE ){
|
|
fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
|
|
yyTracePrompt,yyTokenName[yymajor],yyact);
|
|
}else{
|
|
fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
|
|
yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
|
|
}
|
|
}
|
|
#endif
|
|
|
|
while(1){ /* Exit by "break" */
|
|
assert( yypParser->yytos>=yypParser->yystack );
|
|
assert( yyact==yypParser->yytos->stateno );
|
|
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
|
|
if( yyact >= YY_MIN_REDUCE ){
|
|
unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
|
|
#ifndef NDEBUG
|
|
assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
|
|
if( yyTraceFILE ){
|
|
int yysize = yyRuleInfoNRhs[yyruleno];
|
|
if( yysize ){
|
|
fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
|
|
yyTracePrompt,
|
|
yyruleno, yyRuleName[yyruleno],
|
|
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
|
|
yypParser->yytos[yysize].stateno);
|
|
}else{
|
|
fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
|
|
yyTracePrompt, yyruleno, yyRuleName[yyruleno],
|
|
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
|
|
}
|
|
}
|
|
#endif /* NDEBUG */
|
|
|
|
/* Check that the stack is large enough to grow by a single entry
|
|
** if the RHS of the rule is empty. This ensures that there is room
|
|
** enough on the stack to push the LHS value */
|
|
if( yyRuleInfoNRhs[yyruleno]==0 ){
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
|
|
yypParser->yyhwm++;
|
|
assert( yypParser->yyhwm ==
|
|
(int)(yypParser->yytos - yypParser->yystack));
|
|
}
|
|
#endif
|
|
#if YYSTACKDEPTH>0
|
|
if( yypParser->yytos>=yypParser->yystackEnd ){
|
|
yyStackOverflow(yypParser);
|
|
break;
|
|
}
|
|
#else
|
|
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
|
|
if( yyGrowStack(yypParser) ){
|
|
yyStackOverflow(yypParser);
|
|
break;
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor sqlite3ParserCTX_PARAM);
|
|
}else if( yyact <= YY_MAX_SHIFTREDUCE ){
|
|
yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt--;
|
|
#endif
|
|
break;
|
|
}else if( yyact==YY_ACCEPT_ACTION ){
|
|
yypParser->yytos--;
|
|
yy_accept(yypParser);
|
|
return;
|
|
}else{
|
|
assert( yyact == YY_ERROR_ACTION );
|
|
yyminorunion.yy0 = yyminor;
|
|
#ifdef YYERRORSYMBOL
|
|
int yymx;
|
|
#endif
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
|
|
}
|
|
#endif
|
|
#ifdef YYERRORSYMBOL
|
|
/* A syntax error has occurred.
|
|
** The response to an error depends upon whether or not the
|
|
** grammar defines an error token "ERROR".
|
|
**
|
|
** This is what we do if the grammar does define ERROR:
|
|
**
|
|
** * Call the %syntax_error function.
|
|
**
|
|
** * Begin popping the stack until we enter a state where
|
|
** it is legal to shift the error symbol, then shift
|
|
** the error symbol.
|
|
**
|
|
** * Set the error count to three.
|
|
**
|
|
** * Begin accepting and shifting new tokens. No new error
|
|
** processing will occur until three tokens have been
|
|
** shifted successfully.
|
|
**
|
|
*/
|
|
if( yypParser->yyerrcnt<0 ){
|
|
yy_syntax_error(yypParser,yymajor,yyminor);
|
|
}
|
|
yymx = yypParser->yytos->major;
|
|
if( yymx==YYERRORSYMBOL || yyerrorhit ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sDiscard input token %s\n",
|
|
yyTracePrompt,yyTokenName[yymajor]);
|
|
}
|
|
#endif
|
|
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
|
|
yymajor = YYNOCODE;
|
|
}else{
|
|
while( yypParser->yytos > yypParser->yystack ){
|
|
yyact = yy_find_reduce_action(yypParser->yytos->stateno,
|
|
YYERRORSYMBOL);
|
|
if( yyact<=YY_MAX_SHIFTREDUCE ) break;
|
|
yy_pop_parser_stack(yypParser);
|
|
}
|
|
if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
yy_parse_failed(yypParser);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
yymajor = YYNOCODE;
|
|
}else if( yymx!=YYERRORSYMBOL ){
|
|
yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
|
|
}
|
|
}
|
|
yypParser->yyerrcnt = 3;
|
|
yyerrorhit = 1;
|
|
if( yymajor==YYNOCODE ) break;
|
|
yyact = yypParser->yytos->stateno;
|
|
#elif defined(YYNOERRORRECOVERY)
|
|
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
|
|
** do any kind of error recovery. Instead, simply invoke the syntax
|
|
** error routine and continue going as if nothing had happened.
|
|
**
|
|
** Applications can set this macro (for example inside %include) if
|
|
** they intend to abandon the parse upon the first syntax error seen.
|
|
*/
|
|
yy_syntax_error(yypParser,yymajor, yyminor);
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
break;
|
|
#else /* YYERRORSYMBOL is not defined */
|
|
/* This is what we do if the grammar does not define ERROR:
|
|
**
|
|
** * Report an error message, and throw away the input token.
|
|
**
|
|
** * If the input token is $, then fail the parse.
|
|
**
|
|
** As before, subsequent error messages are suppressed until
|
|
** three input tokens have been successfully shifted.
|
|
*/
|
|
if( yypParser->yyerrcnt<=0 ){
|
|
yy_syntax_error(yypParser,yymajor, yyminor);
|
|
}
|
|
yypParser->yyerrcnt = 3;
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
if( yyendofinput ){
|
|
yy_parse_failed(yypParser);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
}
|
|
break;
|
|
#endif
|
|
}
|
|
}
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
yyStackEntry *i;
|
|
char cDiv = '[';
|
|
fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
|
|
for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
|
|
fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
|
|
cDiv = ' ';
|
|
}
|
|
fprintf(yyTraceFILE,"]\n");
|
|
}
|
|
#endif
|
|
return;
|
|
}
|
|
|
|
/*
|
|
** Return the fallback token corresponding to canonical token iToken, or
|
|
** 0 if iToken has no fallback.
|
|
*/
|
|
int sqlite3ParserFallback(int iToken){
|
|
#ifdef YYFALLBACK
|
|
assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
|
|
return yyFallback[iToken];
|
|
#else
|
|
(void)iToken;
|
|
return 0;
|
|
#endif
|
|
}
|