• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file is automatically generated by Lemon from input grammar
2 ** source file "src/trace_processor/perfetto_sql/grammar/perfettosql_grammar.y".
3 */
4 /*
5 ** 2000-05-29
6 **
7 ** The author disclaims copyright to this source code.  In place of
8 ** a legal notice, here is a blessing:
9 **
10 **    May you do good and not evil.
11 **    May you find forgiveness for yourself and forgive others.
12 **    May you share freely, never taking more than you give.
13 **
14 *************************************************************************
15 ** Driver template for the LEMON parser generator.
16 **
17 ** The "lemon" program processes an LALR(1) input grammar file, then uses
18 ** this template to construct a parser.  The "lemon" program inserts text
19 ** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
20 ** interstitial "-" characters) contained in this template is changed into
21 ** the value of the %name directive from the grammar.  Otherwise, the content
22 ** of this template is copied straight through into the generate parser
23 ** source file.
24 **
25 ** The following is the concatenation of all %include directives from the
26 ** input grammar file:
27 */
28 /************ Begin %include sections from the grammar ************************/
29 #include <stdio.h>
30 #include <stddef.h>
31 #include "src/trace_processor/perfetto_sql/grammar/perfettosql_grammar_interface.h"
32 
33 #define YYNOERRORRECOVERY 1
34 #define YYPARSEFREENEVERNULL 1
35 /**************** End of %include directives **********************************/
36 /* These constants specify the various numeric values for terminal symbols.
37 ***************** Begin token definitions *************************************/
38 #ifndef TK_CREATE
39 #define TK_CREATE                          1
40 #define TK_REPLACE                         2
41 #define TK_PERFETTO                        3
42 #define TK_MACRO                           4
43 #define TK_INCLUDE                         5
44 #define TK_MODULE                          6
45 #define TK_RETURNS                         7
46 #define TK_FUNCTION                        8
47 #define TK_OR                              9
48 #define TK_AND                            10
49 #define TK_NOT                            11
50 #define TK_IS                             12
51 #define TK_MATCH                          13
52 #define TK_LIKE_KW                        14
53 #define TK_BETWEEN                        15
54 #define TK_IN                             16
55 #define TK_ISNULL                         17
56 #define TK_NOTNULL                        18
57 #define TK_NE                             19
58 #define TK_EQ                             20
59 #define TK_GT                             21
60 #define TK_LE                             22
61 #define TK_LT                             23
62 #define TK_GE                             24
63 #define TK_ESCAPE                         25
64 #define TK_BITAND                         26
65 #define TK_BITOR                          27
66 #define TK_LSHIFT                         28
67 #define TK_RSHIFT                         29
68 #define TK_PLUS                           30
69 #define TK_MINUS                          31
70 #define TK_STAR                           32
71 #define TK_SLASH                          33
72 #define TK_REM                            34
73 #define TK_CONCAT                         35
74 #define TK_PTR                            36
75 #define TK_COLLATE                        37
76 #define TK_BITNOT                         38
77 #define TK_ON                             39
78 #define TK_ID                             40
79 #define TK_ABORT                          41
80 #define TK_ACTION                         42
81 #define TK_AFTER                          43
82 #define TK_ANALYZE                        44
83 #define TK_ASC                            45
84 #define TK_ATTACH                         46
85 #define TK_BEFORE                         47
86 #define TK_BEGIN                          48
87 #define TK_BY                             49
88 #define TK_CASCADE                        50
89 #define TK_CAST                           51
90 #define TK_COLUMNKW                       52
91 #define TK_CONFLICT                       53
92 #define TK_DATABASE                       54
93 #define TK_DEFERRED                       55
94 #define TK_DESC                           56
95 #define TK_DETACH                         57
96 #define TK_DO                             58
97 #define TK_EACH                           59
98 #define TK_END                            60
99 #define TK_EXCLUSIVE                      61
100 #define TK_EXPLAIN                        62
101 #define TK_FAIL                           63
102 #define TK_FOR                            64
103 #define TK_IGNORE                         65
104 #define TK_IMMEDIATE                      66
105 #define TK_INITIALLY                      67
106 #define TK_INSTEAD                        68
107 #define TK_NO                             69
108 #define TK_PLAN                           70
109 #define TK_QUERY                          71
110 #define TK_KEY                            72
111 #define TK_OF                             73
112 #define TK_OFFSET                         74
113 #define TK_PRAGMA                         75
114 #define TK_RAISE                          76
115 #define TK_RECURSIVE                      77
116 #define TK_RELEASE                        78
117 #define TK_RESTRICT                       79
118 #define TK_ROW                            80
119 #define TK_ROWS                           81
120 #define TK_ROLLBACK                       82
121 #define TK_SAVEPOINT                      83
122 #define TK_TEMP                           84
123 #define TK_TRIGGER                        85
124 #define TK_VACUUM                         86
125 #define TK_VIEW                           87
126 #define TK_VIRTUAL                        88
127 #define TK_WITH                           89
128 #define TK_WITHOUT                        90
129 #define TK_NULLS                          91
130 #define TK_FIRST                          92
131 #define TK_LAST                           93
132 #define TK_CURRENT                        94
133 #define TK_FOLLOWING                      95
134 #define TK_PARTITION                      96
135 #define TK_PRECEDING                      97
136 #define TK_RANGE                          98
137 #define TK_UNBOUNDED                      99
138 #define TK_EXCLUDE                        100
139 #define TK_GROUPS                         101
140 #define TK_OTHERS                         102
141 #define TK_TIES                           103
142 #define TK_GENERATED                      104
143 #define TK_ALWAYS                         105
144 #define TK_MATERIALIZED                   106
145 #define TK_REINDEX                        107
146 #define TK_RENAME                         108
147 #define TK_CTIME_KW                       109
148 #define TK_IF                             110
149 #define TK_ANY                            111
150 #define TK_LP                             112
151 #define TK_DOT                            113
152 #define TK_RP                             114
153 #define TK_COMMA                          115
154 #define TK_AS                             116
155 #define TK_TABLE                          117
156 #define TK_INDEX                          118
157 #define TK_INTERSECT                      119
158 #define TK_DROP                           120
159 #define TK_COMMIT                         121
160 #define TK_TO                             122
161 #define TK_EXISTS                         123
162 #define TK_STRING                         124
163 #define TK_CONSTRAINT                     125
164 #define TK_DEFAULT                        126
165 #define TK_INDEXED                        127
166 #define TK_NULL                           128
167 #define TK_PRIMARY                        129
168 #define TK_UNIQUE                         130
169 #define TK_CHECK                          131
170 #define TK_REFERENCES                     132
171 #define TK_AUTOINCR                       133
172 #define TK_INSERT                         134
173 #define TK_DELETE                         135
174 #define TK_UPDATE                         136
175 #define TK_SET                            137
176 #define TK_DEFERRABLE                     138
177 #define TK_FOREIGN                        139
178 #define TK_UNION                          140
179 #define TK_ALL                            141
180 #define TK_EXCEPT                         142
181 #define TK_SELECT                         143
182 #define TK_VALUES                         144
183 #define TK_DISTINCT                       145
184 #define TK_FROM                           146
185 #define TK_JOIN                           147
186 #define TK_JOIN_KW                        148
187 #define TK_USING                          149
188 #define TK_ORDER                          150
189 #define TK_GROUP                          151
190 #define TK_HAVING                         152
191 #define TK_LIMIT                          153
192 #define TK_WHERE                          154
193 #define TK_RETURNING                      155
194 #define TK_INTO                           156
195 #define TK_NOTHING                        157
196 #define TK_FLOAT                          158
197 #define TK_BLOB                           159
198 #define TK_INTEGER                        160
199 #define TK_VARIABLE                       161
200 #define TK_CASE                           162
201 #define TK_WHEN                           163
202 #define TK_THEN                           164
203 #define TK_ELSE                           165
204 #define TK_SEMI                           166
205 #define TK_ALTER                          167
206 #define TK_ADD                            168
207 #define TK_WINDOW                         169
208 #define TK_OVER                           170
209 #define TK_FILTER                         171
210 #define TK_TRANSACTION                    172
211 #define TK_SPACE                          173
212 #define TK_ILLEGAL                        174
213 #endif
214 /**************** End token definitions ***************************************/
215 
216 /* The next sections is a series of control #defines.
217 ** various aspects of the generated parser.
218 **    YYCODETYPE         is the data type used to store the integer codes
219 **                       that represent terminal and non-terminal symbols.
220 **                       "unsigned char" is used if there are fewer than
221 **                       256 symbols.  Larger types otherwise.
222 **    YYNOCODE           is a number of type YYCODETYPE that is not used for
223 **                       any terminal or nonterminal symbol.
224 **    YYFALLBACK         If defined, this indicates that one or more tokens
225 **                       (also known as: "terminal symbols") have fall-back
226 **                       values which should be used if the original symbol
227 **                       would not parse.  This permits keywords to sometimes
228 **                       be used as identifiers, for example.
229 **    YYACTIONTYPE       is the data type used for "action codes" - numbers
230 **                       that indicate what to do in response to the next
231 **                       token.
232 **    PerfettoSqlParseTOKENTYPE     is the data type used for minor type for terminal
233 **                       symbols.  Background: A "minor type" is a semantic
234 **                       value associated with a terminal or non-terminal
235 **                       symbols.  For example, for an "ID" terminal symbol,
236 **                       the minor type might be the name of the identifier.
237 **                       Each non-terminal can have a different minor type.
238 **                       Terminal symbols all have the same minor type, though.
239 **                       This macros defines the minor type for terminal
240 **                       symbols.
241 **    YYMINORTYPE        is the data type used for all minor types.
242 **                       This is typically a union of many types, one of
243 **                       which is PerfettoSqlParseTOKENTYPE.  The entry in the union
244 **                       for terminal symbols is called "yy0".
245 **    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
246 **                       zero the stack is dynamically sized using realloc()
247 **    PerfettoSqlParseARG_SDECL     A static variable declaration for the %extra_argument
248 **    PerfettoSqlParseARG_PDECL     A parameter declaration for the %extra_argument
249 **    PerfettoSqlParseARG_PARAM     Code to pass %extra_argument as a subroutine parameter
250 **    PerfettoSqlParseARG_STORE     Code to store %extra_argument into yypParser
251 **    PerfettoSqlParseARG_FETCH     Code to extract %extra_argument from yypParser
252 **    PerfettoSqlParseCTX_*         As PerfettoSqlParseARG_ except for %extra_context
253 **    YYERRORSYMBOL      is the code number of the error symbol.  If not
254 **                       defined, then do no error processing.
255 **    YYNSTATE           the combined number of states.
256 **    YYNRULE            the number of rules in the grammar
257 **    YYNTOKEN           Number of terminal symbols
258 **    YY_MAX_SHIFT       Maximum value for shift actions
259 **    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
260 **    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
261 **    YY_ERROR_ACTION    The yy_action[] code for syntax error
262 **    YY_ACCEPT_ACTION   The yy_action[] code for accept
263 **    YY_NO_ACTION       The yy_action[] code for no-op
264 **    YY_MIN_REDUCE      Minimum value for reduce actions
265 **    YY_MAX_REDUCE      Maximum value for reduce actions
266 */
267 #ifndef INTERFACE
268 # define INTERFACE 1
269 #endif
270 /************* Begin control #defines *****************************************/
271 #define YYCODETYPE unsigned short int
272 #define YYNOCODE 320
273 #define YYACTIONTYPE unsigned short int
274 #define YYWILDCARD 111
275 #define PerfettoSqlParseTOKENTYPE struct PerfettoSqlToken
276 typedef union {
277   int yyinit;
278   PerfettoSqlParseTOKENTYPE yy0;
279   int yy92;
280   struct PerfettoSqlArgumentList* yy208;
281   struct PerfettoSqlFnReturnType* yy355;
282   struct PerfettoSqlIndexedColumnList* yy368;
283   struct PerfettoSqlMacroArgumentList* yy526;
284 } YYMINORTYPE;
285 #ifndef YYSTACKDEPTH
286 #define YYSTACKDEPTH 100
287 #endif
288 #define PerfettoSqlParseARG_SDECL
289 #define PerfettoSqlParseARG_PDECL
290 #define PerfettoSqlParseARG_PARAM
291 #define PerfettoSqlParseARG_FETCH
292 #define PerfettoSqlParseARG_STORE
293 #define PerfettoSqlParseCTX_SDECL struct PerfettoSqlParserState* state;
294 #define PerfettoSqlParseCTX_PDECL ,struct PerfettoSqlParserState* state
295 #define PerfettoSqlParseCTX_PARAM ,state
296 #define PerfettoSqlParseCTX_FETCH struct PerfettoSqlParserState* state=yypParser->state;
297 #define PerfettoSqlParseCTX_STORE yypParser->state=state;
298 #define YYFALLBACK 1
299 #define YYNSTATE             645
300 #define YYNRULE              435
301 #define YYNRULE_WITH_ACTION  28
302 #define YYNTOKEN             175
303 #define YY_MAX_SHIFT         644
304 #define YY_MIN_SHIFTREDUCE   924
305 #define YY_MAX_SHIFTREDUCE   1358
306 #define YY_ERROR_ACTION      1359
307 #define YY_ACCEPT_ACTION     1360
308 #define YY_NO_ACTION         1361
309 #define YY_MIN_REDUCE        1362
310 #define YY_MAX_REDUCE        1796
311 /************* End control #defines *******************************************/
312 #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
313 
314 /* Define the yytestcase() macro to be a no-op if is not already defined
315 ** otherwise.
316 **
317 ** Applications can choose to define yytestcase() in the %include section
318 ** to a macro that can assist in verifying code coverage.  For production
319 ** code the yytestcase() macro should be turned off.  But it is useful
320 ** for testing.
321 */
322 #ifndef yytestcase
323 # define yytestcase(X)
324 #endif
325 
326 
327 /* Next are the tables used to determine what action to take based on the
328 ** current state and lookahead token.  These tables are used to implement
329 ** functions that take a state number and lookahead value and return an
330 ** action integer.
331 **
332 ** Suppose the action integer is N.  Then the action is determined as
333 ** follows
334 **
335 **   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
336 **                                      token onto the stack and goto state N.
337 **
338 **   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
339 **     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
340 **
341 **   N == YY_ERROR_ACTION               A syntax error has occurred.
342 **
343 **   N == YY_ACCEPT_ACTION              The parser accepts its input.
344 **
345 **   N == YY_NO_ACTION                  No such action.  Denotes unused
346 **                                      slots in the yy_action[] table.
347 **
348 **   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
349 **     and YY_MAX_REDUCE
350 **
351 ** The action table is constructed as a single large table named yy_action[].
352 ** Given state S and lookahead X, the action is computed as either:
353 **
354 **    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
355 **    (B)   N = yy_default[S]
356 **
357 ** The (A) formula is preferred.  The B formula is used instead if
358 ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
359 **
360 ** The formulas above are for computing the action when the lookahead is
361 ** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
362 ** a reduce action) then the yy_reduce_ofst[] array is used in place of
363 ** the yy_shift_ofst[] array.
364 **
365 ** The following are the tables generated in this section:
366 **
367 **  yy_action[]        A single table containing all actions.
368 **  yy_lookahead[]     A table containing the lookahead for each entry in
369 **                     yy_action.  Used to detect hash collisions.
370 **  yy_shift_ofst[]    For each state, the offset into yy_action for
371 **                     shifting terminals.
372 **  yy_reduce_ofst[]   For each state, the offset into yy_action for
373 **                     shifting non-terminals after a reduce.
374 **  yy_default[]       Default action for each state.
375 **
376 *********** Begin parsing tables **********************************************/
377 #define YY_ACTTAB_COUNT (2214)
378 static const YYACTIONTYPE yy_action[] = {
379  /*     0 */  1753,  122,  119,  236,  289,  122,  119,  236, 1753,  129,
380  /*    10 */   131,  432,   84, 1333, 1333, 1170, 1173, 1160, 1160,  127,
381  /*    20 */   127,  128,  128,  128,  128, 1675,  126,  126,  126,  126,
382  /*    30 */   125,  125,  124,  124,  124,  123,  120,  474, 1709,    6,
383  /*    40 */  1157, 1157, 1171, 1174,  181, 1090,  125,  125,  124,  124,
384  /*    50 */   124,  123,  120,  474,  474,  351, 1091,  124,  124,  124,
385  /*    60 */   123,  120,  474,  122,  119,  236,  129,  131,  432,   84,
386  /*    70 */  1333, 1333, 1170, 1173, 1160, 1160,  127,  127,  128,  128,
387  /*    80 */   128,  128,  553,  126,  126,  126,  126,  125,  125,  124,
388  /*    90 */   124,  124,  123,  120,  474,  129,  131,  432,   84, 1333,
389  /*   100 */  1333, 1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,
390  /*   110 */   128, 1309,  126,  126,  126,  126,  125,  125,  124,  124,
391  /*   120 */   124,  123,  120,  474,  131,  432,   84, 1333, 1333, 1170,
392  /*   130 */  1173, 1160, 1160,  127,  127,  128,  128,  128,  128, 1639,
393  /*   140 */   126,  126,  126,  126,  125,  125,  124,  124,  124,  123,
394  /*   150 */   120,  474, 1280,  520, 1280, 1161, 1349,  585,  585,    6,
395  /*   160 */   132,  239,  129,  131,  432,   84, 1333, 1333, 1170, 1173,
396  /*   170 */  1160, 1160,  127,  127,  128,  128,  128,  128, 1147,  126,
397  /*   180 */   126,  126,  126,  125,  125,  124,  124,  124,  123,  120,
398  /*   190 */   474, 1355,  416, 1136, 1354, 1310, 1312, 1135, 1309,  511,
399  /*   200 */   364,  103,  128,  128,  128,  128,  121,  126,  126,  126,
400  /*   210 */   126,  125,  125,  124,  124,  124,  123,  120,  474, 1309,
401  /*   220 */  1254, 1256,  305, 1788, 1788,   90,  249, 1135, 1135, 1137,
402  /*   230 */  1254, 1256,  936, 1789, 1789,  129,  131,  432,   84, 1333,
403  /*   240 */  1333, 1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,
404  /*   250 */   128,  622,  126,  126,  126,  126,  125,  125,  124,  124,
405  /*   260 */   124,  123,  120,  474,  129,  131,  432,   84, 1333, 1333,
406  /*   270 */  1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,  128,
407  /*   280 */  1312,  126,  126,  126,  126,  125,  125,  124,  124,  124,
408  /*   290 */   123,  120,  474,  129,  131,  432,   84, 1333, 1333, 1170,
409  /*   300 */  1173, 1160, 1160,  127,  127,  128,  128,  128,  128,  572,
410  /*   310 */   126,  126,  126,  126,  125,  125,  124,  124,  124,  123,
411  /*   320 */   120,  474,  622,  622,  129,  131,  432,   84, 1333, 1333,
412  /*   330 */  1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,  128,
413  /*   340 */   330,  126,  126,  126,  126,  125,  125,  124,  124,  124,
414  /*   350 */   123,  120,  474,  129,  131,  432,   84, 1333, 1333, 1170,
415  /*   360 */  1173, 1160, 1160,  127,  127,  128,  128,  128,  128,  489,
416  /*   370 */   126,  126,  126,  126,  125,  125,  124,  124,  124,  123,
417  /*   380 */   120,  474,  129,  131,  432,   84, 1333, 1333, 1170, 1173,
418  /*   390 */  1160, 1160,  127,  127,  128,  128,  128,  128,  995,  126,
419  /*   400 */   126,  126,  126,  125,  125,  124,  124,  124,  123,  120,
420  /*   410 */   474,  235,  594,  129,  131,  432,   84, 1333, 1333, 1170,
421  /*   420 */  1173, 1160, 1160,  127,  127,  128,  128,  128,  128,  988,
422  /*   430 */   126,  126,  126,  126,  125,  125,  124,  124,  124,  123,
423  /*   440 */   120,  474, 1790,  417,  129,  131,  432,   84, 1333, 1333,
424  /*   450 */  1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,  128,
425  /*   460 */    91,  126,  126,  126,  126,  125,  125,  124,  124,  124,
426  /*   470 */   123,  120,  474,  129,  131,  432,   84, 1333, 1333, 1170,
427  /*   480 */  1173, 1160, 1160,  127,  127,  128,  128,  128,  128,  411,
428  /*   490 */   126,  126,  126,  126,  125,  125,  124,  124,  124,  123,
429  /*   500 */   120,  474,  126,  126,  126,  126,  125,  125,  124,  124,
430  /*   510 */   124,  123,  120,  474,  628, 1275,  589,  450, 1148,  577,
431  /*   520 */  1463,  628, 1442,  628, 1501,  321,  628,  484,  221, 1463,
432  /*   530 */   598, 1425, 1275,   77,   77, 1275,  211,  484,  484, 1428,
433  /*   540 */    77,   77,   77,   77,  333,   54,   54,  393,  413, 1131,
434  /*   550 */   128,  128,  128,  128,  628,  126,  126,  126,  126,  125,
435  /*   560 */   125,  124,  124,  124,  123,  120,  474,  295,  611,  295,
436  /*   570 */   295,   19,  295,   75,   75,  611,  578,  611, 1293,  625,
437  /*   580 */   590,  440,  625,  610,  597,  467,  272,  232,  129,  131,
438  /*   590 */   432,   84, 1333, 1333, 1170, 1173, 1160, 1160,  127,  127,
439  /*   600 */   128,  128,  128,  128, 1126,  126,  126,  126,  126,  125,
440  /*   610 */   125,  124,  124,  124,  123,  120,  474,  129,  131,  432,
441  /*   620 */    84, 1333, 1333, 1170, 1173, 1160, 1160,  127,  127,  128,
442  /*   630 */   128,  128,  128,  406,  126,  126,  126,  126,  125,  125,
443  /*   640 */   124,  124,  124,  123,  120,  474,  129,  131,  432,   84,
444  /*   650 */  1333, 1333, 1170, 1173, 1160, 1160,  127,  127,  128,  128,
445  /*   660 */   128,  128,  470,  126,  126,  126,  126,  125,  125,  124,
446  /*   670 */   124,  124,  123,  120,  474,  129,  131,  432,   84, 1333,
447  /*   680 */  1333, 1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,
448  /*   690 */   128,  147,  126,  126,  126,  126,  125,  125,  124,  124,
449  /*   700 */   124,  123,  120,  474,  129,  118,  432,   84, 1333, 1333,
450  /*   710 */  1170, 1173, 1160, 1160,  127,  127,  128,  128,  128,  128,
451  /*   720 */   628,  126,  126,  126,  126,  125,  125,  124,  124,  124,
452  /*   730 */   123,  120,  474,  470,  470, 1275,  362, 1309,  395,   45,
453  /*   740 */    45,  291, 1076,  109,  628,  326,  629,  469,  468,  407,
454  /*   750 */   628,  398, 1275,  214,  238, 1275, 1338, 1309,  483,  480,
455  /*   760 */   479,  628,  991,   45,   45, 1427,  303,  424,  478,   45,
456  /*   770 */    45,  288,  112,  288, 1076,  234, 1466, 1309,  157, 1759,
457  /*   780 */    77,   77,  522,  625,  432,   84, 1333, 1333, 1170, 1173,
458  /*   790 */  1160, 1160,  127,  127,  128,  128,  128,  128,  454,  126,
459  /*   800 */   126,  126,  126,  125,  125,  124,  124,  124,  123,  120,
460  /*   810 */   474, 1732,  328,  116,  151,  583,  552,  295,  295,  295,
461  /*   820 */   295, 1310,  238,  627, 1309,  579,  483,  480,  479,  625,
462  /*   830 */   625, 1147,  114,  114,  395, 1309,  478, 1466,  399,  399,
463  /*   840 */   115, 1310,  472, 1340, 1309, 1309, 1136,  518,  157,  991,
464  /*   850 */  1135,  401, 1339,  623,  147,  250,  371,  349,  374,  286,
465  /*   860 */   400, 1310,  454,  400, 1309, 1309,  602,  211,  348,  602,
466  /*   870 */   587,  380,  153,  543,  158, 1341, 1032, 1341,  617,  414,
467  /*   880 */  1135, 1135, 1137,  116,  959, 1309,  252,    8,  376,  377,
468  /*   890 */   961,  147,  562,  379,  267,  960,  642,  175,  402,  297,
469  /*   900 */   146,  628,  114,  114,  122,  119,  236, 1309,  326,  629,
470  /*   910 */   115, 1147,  472, 1414,    4, 1234,  628, 1309,  251, 1310,
471  /*   920 */    13,   13, 1309,  623, 1414,  620,  626, 1309,  520,  472,
472  /*   930 */  1135,  431,  380, 1329,  441,   13,   13, 1235,  628, 1031,
473  /*   940 */   545,  580,  500, 1309,  158,  326,  629,  211,  617,  298,
474  /*   950 */   472,  122,  119,  236,  326,  629, 1233,   77,   77,  422,
475  /*   960 */  1135, 1135, 1137, 1138,   28,  328,  600,  953, 1275,  552,
476  /*   970 */   396,  599, 1707,    6, 1644,  569,  230, 1297,  498,  447,
477  /*   980 */  1309, 1147, 1703,  607,    4, 1275, 1309,  591, 1275,  192,
478  /*   990 */  1309, 1310,  322,  297, 1309,  620,  626,  308,  328,  472,
479  /*  1000 */  1135, 1310,  552, 1309, 1309,  571,  567,  224,  250,  275,
480  /*  1010 */   349, 1310,  286,  582, 1309, 1309,  475, 1329,  243,  437,
481  /*  1020 */   472,  348, 1362,   93,  380, 1309,  543,  500,  499,  500,
482  /*  1030 */  1135, 1135, 1137, 1138,   28, 1309,  116,  596,  579,  252,
483  /*  1040 */   496,  250,  377,  349,  436,  286,  379,  267, 1468, 1309,
484  /*  1050 */   175, 1309,  193,  146,  348,  114,  114,  380,    5, 1644,
485  /*  1060 */  1646, 1644,  116,  115, 1310,  472,  100, 1309,  469,  468,
486  /*  1070 */  1310,  251,  252, 1309, 1310,  377,  623, 1309,  455,  379,
487  /*  1080 */   267,  114,  114,  175,  431,  380,  146, 1310, 1309,  115,
488  /*  1090 */  1309,  472,  147, 1329, 1309,  628, 1051,  531, 1309,  449,
489  /*  1100 */  1050,  617,  623,  528,  251,  545,  628,  326,  629, 1468,
490  /*  1110 */  1078, 1309, 1056,  395,   13,   13, 1371,  431,  380,  600,
491  /*  1120 */  1309,  549,  644,   35,  601,   13,   13,  617,  452,  501,
492  /*  1130 */  1297,  498,  606, 1310, 1147, 1310, 1309,    4, 1309,  457,
493  /*  1140 */   326,  629,  455,  337,  369,  600,  326,  629,  620,  626,
494  /*  1150 */   599,  154,  472, 1135,  580, 1412, 1077, 1309,  233, 1309,
495  /*  1160 */  1147,  116,  353,    4,  498,    9,  421,  420, 1584,  275,
496  /*  1170 */  1730, 1309,  576,  472,  620,  626,  581, 1329,  472, 1135,
497  /*  1180 */   114,  114, 1055, 1135, 1135, 1137, 1138,   28,  115,  949,
498  /*  1190 */   472,   16,   16,  123,  120,  474, 1341,  949, 1341,  472,
499  /*  1200 */   628,  623,  116,  382, 1310,  384,  295, 1309,  295, 1135,
500  /*  1210 */  1135, 1137, 1138,   28,  181,  403, 1584,  612,  625,   13,
501  /*  1220 */    13,  114,  114, 1702,  449,   83,  617,  628, 1309,  115,
502  /*  1230 */   628,  472,  560,  465,  556,  385,  383,  628, 1217, 1217,
503  /*  1240 */   534,  312,  623,    3,  114,  114,   77,   77,   88,   13,
504  /*  1250 */    13,  512,  115,  950,  472, 1310,   77,   77, 1309, 1147,
505  /*  1260 */   456,  950,    4,  206,  628,  623,  116,  617,  295,  449,
506  /*  1270 */   295,  971,  359,  620,  626,  509,  949,  472, 1135, 1309,
507  /*  1280 */   625,  611, 1275,   13,   13,  114,  114,  212,  604,  613,
508  /*  1290 */   617,  323,  295,  115,  295,  472, 1126,  207,  472, 1275,
509  /*  1300 */  1147,  628, 1275,    4,  625, 1631,  623,  464, 1135, 1135,
510  /*  1310 */  1137, 1138,   28,  603,  620,  626,  106, 1192,  472, 1135,
511  /*  1320 */    13,   13, 1286, 1147,  456,  587,    4,  595,  595,    6,
512  /*  1330 */   446,  617,  213,  296,  605,  296,  609,  620,  626,  472,
513  /*  1340 */   950,  472, 1135, 1474,  427,  625,  487,  428,  487, 1135,
514  /*  1350 */  1135, 1137, 1138,   28,    2,  487,  443, 1708,    6,  608,
515  /*  1360 */   299,  152,  472,  202, 1147,  628,  545,    4,  628,  545,
516  /*  1370 */  1286,  464, 1135, 1135, 1137, 1138,   28,  520,  620,  626,
517  /*  1380 */  1234,  100,  472, 1135,   77,   77,   12,   77,   77,  573,
518  /*  1390 */   619,  326,  629,  393,  295,  295,  295,  295,  295,  295,
519  /*  1400 */   295,  295, 1235,  472,  616, 1674,  625,  625, 1638,  430,
520  /*  1410 */   625,  625,   12, 1135, 1135, 1137, 1138,   28,  524,  471,
521  /*  1420 */   533, 1233,  473,  491,  487,  256,  487,  463,  362,  507,
522  /*  1430 */   354,  255,    2,  487,  253,  334,  588,  588,  299,  152,
523  /*  1440 */   295,  295,  295,  295,  245,  283,  311,  336,  494,  339,
524  /*  1450 */   493,  244,  625,  625, 1706,    6,  486,  337,  486,  208,
525  /*  1460 */   295,  488,  295,   32,  510,  486, 1011,  628, 1446, 1076,
526  /*  1470 */   299,  152,  625,  628,  242,  241,  240,  295,  628,  295,
527  /*  1480 */   628, 1360,    1,    1,  533,  492,  137,  137,  628,  625,
528  /*  1490 */   527,  581,  139,  139,  628, 1012,  628,   47,   47,   48,
529  /*  1500 */    48, 1076,  234,  256,  628,  545,  628,   49,   49,  295,
530  /*  1510 */   628,  295,  516,   50,   50,   59,   59,  628, 1705,    6,
531  /*  1520 */   243,  625,  628,   60,   60,   15,   15,  405,  628,   51,
532  /*  1530 */    51,  628, 1417,  439,  525,  256,   61,   61,  628,  488,
533  /*  1540 */   628,   52,   52,  628, 1475,  628,  436,   62,   62,  628,
534  /*  1550 */    63,   63,  130,  444,  628,   31,  628,   64,   64,   65,
535  /*  1560 */    65, 1733,   66,   66,   67,   67,  628,  545,   68,   68,
536  /*  1570 */   628,  488,  628,   69,   69,   70,   70,  628, 1328,  628,
537  /*  1580 */  1214,  628,  575,  628, 1214,   53,   53,  606,  628,   55,
538  /*  1590 */    55,   14,   14,  628,  526,  628,  135,  135,  136,  136,
539  /*  1600 */    72,   72,   56,   56,  628,  532, 1471,   73,   73,  224,
540  /*  1610 */   628, 1212,   74,   74,   57,   57,  628,  395,  628,  526,
541  /*  1620 */   628,  503,  628,  168,  168,  503,  628,  526,  223,  169,
542  /*  1630 */   169,  998,  628,  329,  628,   81,   81,   58,   58,  138,
543  /*  1640 */   138,   76,   76,  628,  983,  166,  166,  628,  621,  439,
544  /*  1650 */   628,  140,  140,  134,  134,  628, 1583,  161, 1582,  628,
545  /*  1660 */   395,  628,  167,  167,  628,  520,  160,  160,  306,  144,
546  /*  1670 */   144,  628,  306,  628,  143,  143,  628, 1260,  141,  141,
547  /*  1680 */   142,  142,  628,   79,   79,  230,  511,  364, 1045,  307,
548  /*  1690 */    71,   71,   80,   80, 1459,   78,   78,  326,  629, 1415,
549  /*  1700 */   159,   46,   46,  403, 1583,  403, 1582, 1355,  416,  630,
550  /*  1710 */  1255, 1045,  106, 1480,  361,  998,  156,  633,  640,  442,
551  /*  1720 */   183, 1199,  314,  625,  101,  504,  505,  161,  983,  513,
552  /*  1730 */  1002,  517,  293,  232,  313,  429,  429,  325,  113,  429,
553  /*  1740 */   111,  429, 1758, 1020, 1090,  149, 1051,  429,  514,   37,
554  /*  1750 */  1050, 1139,   94,  220, 1445, 1091,  476,  271,  331,  106,
555  /*  1760 */  1251,  418, 1010, 1017, 1009,  343,  302,  360,  106,  309,
556  /*  1770 */   159, 1128,  274,  165, 1018,  342,  519,  274,  345,  521,
557  /*  1780 */   274,  365,  106,  940,  563,  932,  639,  937,  639, 1195,
558  /*  1790 */   271, 1081,  274,  164,  106, 1093, 1094, 1211, 1210, 1211,
559  /*  1800 */  1210,  981,  155, 1049,  130, 1199,  294, 1747, 1444,  592,
560  /*  1810 */  1048,  130, 1443,  338, 1424, 1685, 1687,  497, 1683,  346,
561  /*  1820 */   347,  502,  350, 1513, 1512,  506, 1499, 1690,  355,  204,
562  /*  1830 */  1721, 1663,  615,  537, 1662, 1139,  529,  216,  366,  284,
563  /*  1840 */   370,  373,  375, 1403, 1402, 1404,  248, 1740, 1509,  394,
564  /*  1850 */  1492,   11,  318, 1522, 1567,  319, 1495, 1507,  320,  614,
565  /*  1860 */  1554, 1572,  550,  381, 1559,  357,  523, 1381, 1549, 1542,
566  /*  1870 */  1504, 1505,  201,  495,  618, 1558,  425,   33,   86,  445,
567  /*  1880 */   226, 1002, 1743, 1349,  631,  643,  185,  246,  278, 1346,
568  /*  1890 */    93,  222, 1640,  190,  481,  180,  540,  536,  341, 1303,
569  /*  1900 */   229, 1442,   99,  544,   89, 1635, 1634,   92,  101,  485,
570  /*  1910 */   952,  942,  389,  269,  461,  462,  466, 1682,  277,   10,
571  /*  1920 */  1462,  415,  638,  304, 1461,  358,  310,  363, 1460, 1757,
572  /*  1930 */  1755, 1431, 1756, 1432,  419,  340, 1453, 1430,  225,  410,
573  /*  1940 */   209,  210, 1680, 1452,  448,  508, 1503,  258, 1502,  530,
574  /*  1950 */   262,  315,  285,  263,  187,  538,  372,  264,  266,  265,
575  /*  1960 */  1563,  268, 1405,  194,  541, 1400,  423,  458, 1395,  515,
576  /*  1970 */   568,  459,  426,  197,  570, 1629,  276,  133,  198,  460,
577  /*  1980 */   606,  235,  199,  110,  404,  342,  392,  200, 1555,   36,
578  /*  1990 */   102,  584, 1368, 1561, 1560,   38, 1377, 1367, 1376,  237,
579  /*  2000 */   182,  477,   85,   17, 1373,   18,  332,  482, 1299,  173,
580  /*  2010 */   145, 1298,  219, 1000, 1485,  335,  490,  397,  227,  148,
581  /*  2020 */   228, 1013,   87, 1651,  300,  368, 1667,  301,  174,  344,
582  /*  2030 */   409,  215, 1484,  408,  316, 1668, 1666, 1665, 1527, 1526,
583  /*  2040 */   247,   82,  150,  186,  317, 1209,  574, 1207,  352,  176,
584  /*  2050 */   254, 1328,  188,  189,  257, 1616,  356,  177,  178,  451,
585  /*  2060 */   324, 1223,  453,   95,  191,   96,   97,   98, 1226,  179,
586  /*  2070 */   259,  260,  162,   20,  261, 1222, 1215,  367,  274,  195,
587  /*  2080 */  1343, 1712,  535,  196,   39,  970,  539,  378, 1711,  955,
588  /*  2090 */  1034,  170,  171,  542,  270,  951,  546, 1726,  547,  438,
589  /*  2100 */   548,  287,  551,  184,  434,  435,  945,  944,  172,  554,
590  /*  2110 */   555,  557,  386,  558,  561,  565,  559,  217,  941,  387,
591  /*  2120 */   564,  566,  388,  390,   40,  391,   41,   42, 1262,  231,
592  /*  2130 */  1079, 1261,  290,  273,  292,   21,   22,   23, 1085,  203,
593  /*  2140 */    24,  130, 1266,   34, 1176,  586,  105,  205,  104,  593,
594  /*  2150 */   163,   25, 1291, 1277, 1279,    7, 1284, 1281,   26, 1285,
595  /*  2160 */    27,  280,  327,  106, 1190, 1177, 1175, 1232, 1180,  634,
596  /*  2170 */   636,  412,  641,   43,  433,  279, 1231, 1179, 1140,  982,
597  /*  2180 */   107, 1044,  117,  624,   29,  108, 1748,  934, 1361, 1361,
598  /*  2190 */  1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361,  281, 1361,
599  /*  2200 */  1361, 1361,  282, 1361,   30, 1361,   44,  632,  928,  635,
600  /*  2210 */   637, 1361,  639,  218,
601 };
602 static const YYCODETYPE yy_lookahead[] = {
603  /*     0 */   211,  268,  269,  270,  209,  268,  269,  270,  219,    9,
604  /*    10 */    10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
605  /*    20 */    20,   21,   22,   23,   24,  292,   26,   27,   28,   29,
606  /*    30 */    30,   31,   32,   33,   34,   35,   36,   37,  307,  308,
607  /*    40 */    13,   14,   15,   16,  193,   45,   30,   31,   32,   33,
608  /*    50 */    34,   35,   36,   37,   37,  193,   56,   32,   33,   34,
609  /*    60 */    35,   36,   37,  268,  269,  270,    9,   10,   11,   12,
610  /*    70 */    13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
611  /*    80 */    23,   24,   40,   26,   27,   28,   29,   30,   31,   32,
612  /*    90 */    33,   34,   35,   36,   37,    9,   10,   11,   12,   13,
613  /*   100 */    14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
614  /*   110 */    24,   40,   26,   27,   28,   29,   30,   31,   32,   33,
615  /*   120 */    34,   35,   36,   37,   10,   11,   12,   13,   14,   15,
616  /*   130 */    16,   17,   18,   19,   20,   21,   22,   23,   24,  277,
617  /*   140 */    26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
618  /*   150 */    36,   37,   95,  193,   97,  128,   52,  306,  307,  308,
619  /*   160 */    74,   90,    9,   10,   11,   12,   13,   14,   15,   16,
620  /*   170 */    17,   18,   19,   20,   21,   22,   23,   24,  109,   26,
621  /*   180 */    27,   28,   29,   30,   31,   32,   33,   34,   35,   36,
622  /*   190 */    37,  111,  112,  124,  114,  124,   40,  128,  127,  135,
623  /*   200 */   136,  115,   21,   22,   23,   24,   25,   26,   27,   28,
624  /*   210 */    29,   30,   31,   32,   33,   34,   35,   36,   37,  148,
625  /*   220 */   111,  112,  262,  114,  115,   72,  122,  158,  159,  160,
626  /*   230 */   111,  112,   40,  114,  115,    9,   10,   11,   12,   13,
627  /*   240 */    14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
628  /*   250 */    24,  208,   26,   27,   28,   29,   30,   31,   32,   33,
629  /*   260 */    34,   35,   36,   37,    9,   10,   11,   12,   13,   14,
630  /*   270 */    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
631  /*   280 */   124,   26,   27,   28,   29,   30,   31,   32,   33,   34,
632  /*   290 */    35,   36,   37,    9,   10,   11,   12,   13,   14,   15,
633  /*   300 */    16,   17,   18,   19,   20,   21,   22,   23,   24,  117,
634  /*   310 */    26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
635  /*   320 */    36,   37,  279,  280,    9,   10,   11,   12,   13,   14,
636  /*   330 */    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
637  /*   340 */   114,   26,   27,   28,   29,   30,   31,   32,   33,   34,
638  /*   350 */    35,   36,   37,    9,   10,   11,   12,   13,   14,   15,
639  /*   360 */    16,   17,   18,   19,   20,   21,   22,   23,   24,  114,
640  /*   370 */    26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
641  /*   380 */    36,   37,    9,   10,   11,   12,   13,   14,   15,   16,
642  /*   390 */    17,   18,   19,   20,   21,   22,   23,   24,  114,   26,
643  /*   400 */    27,   28,   29,   30,   31,   32,   33,   34,   35,   36,
644  /*   410 */    37,  170,  171,    9,   10,   11,   12,   13,   14,   15,
645  /*   420 */    16,   17,   18,   19,   20,   21,   22,   23,   24,  114,
646  /*   430 */    26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
647  /*   440 */    36,   37,  299,  300,    9,   10,   11,   12,   13,   14,
648  /*   450 */    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
649  /*   460 */   116,   26,   27,   28,   29,   30,   31,   32,   33,   34,
650  /*   470 */    35,   36,   37,    9,   10,   11,   12,   13,   14,   15,
651  /*   480 */    16,   17,   18,   19,   20,   21,   22,   23,   24,   40,
652  /*   490 */    26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
653  /*   500 */    36,   37,   26,   27,   28,   29,   30,   31,   32,   33,
654  /*   510 */    34,   35,   36,   37,  193,   81,  183,   58,  114,  183,
655  /*   520 */   219,  193,  221,  193,  253,  254,  193,  193,  155,  228,
656  /*   530 */    96,  212,   98,  212,  213,  101,  193,  203,  204,  212,
657  /*   540 */   212,  213,  212,  213,  201,  212,  213,  193,  205,  114,
658  /*   550 */    21,   22,   23,   24,  193,   26,   27,   28,   29,   30,
659  /*   560 */    31,   32,   33,   34,   35,   36,   37,  234,  247,  236,
660  /*   570 */   234,  112,  236,  212,  213,  247,  255,  247,  114,  246,
661  /*   580 */   247,  227,  246,  255,  150,  255,  250,  251,    9,   10,
662  /*   590 */    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
663  /*   600 */    21,   22,   23,   24,    2,   26,   27,   28,   29,   30,
664  /*   610 */    31,   32,   33,   34,   35,   36,   37,    9,   10,   11,
665  /*   620 */    12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
666  /*   630 */    22,   23,   24,  272,   26,   27,   28,   29,   30,   31,
667  /*   640 */    32,   33,   34,   35,   36,   37,    9,   10,   11,   12,
668  /*   650 */    13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
669  /*   660 */    23,   24,  208,   26,   27,   28,   29,   30,   31,   32,
670  /*   670 */    33,   34,   35,   36,   37,    9,   10,   11,   12,   13,
671  /*   680 */    14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
672  /*   690 */    24,   89,   26,   27,   28,   29,   30,   31,   32,   33,
673  /*   700 */    34,   35,   36,   37,    9,   10,   11,   12,   13,   14,
674  /*   710 */    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
675  /*   720 */   193,   26,   27,   28,   29,   30,   31,   32,   33,   34,
676  /*   730 */    35,   36,   37,  279,  280,   81,  134,   40,  193,  212,
677  /*   740 */   213,  114,  115,  164,  193,  143,  144,   30,   31,  243,
678  /*   750 */   193,  245,   98,  116,  125,  101,   39,   40,  129,  130,
679  /*   760 */   131,  193,   40,  212,  213,  212,  183,  183,  139,  212,
680  /*   770 */   213,  234,  164,  236,  147,  148,  229,   40,  233,  225,
681  /*   780 */   212,  213,  193,  246,   11,   12,   13,   14,   15,   16,
682  /*   790 */    17,   18,   19,   20,   21,   22,   23,   24,  193,   26,
683  /*   800 */    27,   28,   29,   30,   31,   32,   33,   34,   35,   36,
684  /*   810 */    37,    0,    1,   11,   77,  247,    5,  234,  234,  236,
685  /*   820 */   236,  124,  125,  193,  127,   11,  129,  130,  131,  246,
686  /*   830 */   246,  109,   30,   31,  193,   40,  139,  290,  311,  312,
687  /*   840 */    38,  124,   40,  126,  127,  148,  124,  263,  303,  127,
688  /*   850 */   128,  215,  135,   51,   89,   44,   85,   46,   87,   48,
689  /*   860 */   309,  124,  257,  312,  127,  148,  309,  193,   57,  312,
690  /*   870 */   193,   60,   77,   62,  233,  158,    2,  160,   76,  205,
691  /*   880 */   158,  159,  160,   11,   55,  148,   75,   15,  117,   78,
692  /*   890 */    61,   89,    4,   82,   83,   66,    8,   86,  215,  225,
693  /*   900 */    89,  193,   30,   31,  268,  269,  270,   40,  143,  144,
694  /*   910 */    38,  109,   40,  193,  112,   41,  193,   40,  107,  124,
695  /*   920 */   212,  213,  127,   51,  204,  123,  124,   40,  193,  127,
696  /*   930 */   128,  120,  121,   40,  226,  212,  213,   63,  193,   65,
697  /*   940 */   193,  127,  193,  148,  303,  143,  144,  193,   76,  226,
698  /*   950 */   148,  268,  269,  270,  143,  144,   82,  212,  213,  205,
699  /*   960 */   158,  159,  160,  161,  162,    1,   94,  111,   81,    5,
700  /*   970 */   193,   99,  307,  308,  193,   87,  115,  166,  167,  232,
701  /*   980 */    40,  109,  305,   96,  112,   98,   40,   32,  101,  112,
702  /*   990 */    40,  124,  247,  319,  127,  123,  124,  262,    1,  127,
703  /*  1000 */   128,  124,    5,   40,  127,  117,  118,  146,   44,  116,
704  /*  1010 */    46,  124,   48,  193,  127,  148,   11,  124,   13,  197,
705  /*  1020 */   148,   57,  166,  156,   60,  148,   62,  278,  279,  280,
706  /*  1030 */   158,  159,  160,  161,  162,  148,   11,  150,   11,   75,
707  /*  1040 */   293,   44,   78,   46,   39,   48,   82,   83,  229,   40,
708  /*  1050 */    86,   40,  112,   89,   57,   30,   31,   60,  112,  278,
709  /*  1060 */   279,  280,   11,   38,  124,   40,   39,  127,   30,   31,
710  /*  1070 */   124,  107,   75,  127,  124,   78,   51,  127,  193,   82,
711  /*  1080 */    83,   30,   31,   86,  120,  121,   89,  124,  148,   38,
712  /*  1090 */   127,   40,   89,   40,  148,  193,  141,  275,  148,  193,
713  /*  1100 */   145,   76,   51,  281,  107,  193,  193,  143,  144,  290,
714  /*  1110 */   147,  148,   32,  193,  212,  213,    3,  120,  121,   94,
715  /*  1120 */    40,    3,    9,  112,   99,  212,  213,   76,  226,  126,
716  /*  1130 */   166,  167,  150,  124,  109,  124,  127,  112,  127,  226,
717  /*  1140 */   143,  144,  257,  138,  232,   94,  143,  144,  123,  124,
718  /*  1150 */    99,  169,  127,  128,  127,  183,  147,  148,  193,  148,
719  /*  1160 */   109,   11,  256,  112,  167,  112,   30,   31,  267,  116,
720  /*  1170 */   193,   40,  193,  148,  123,  124,  149,  124,  127,  128,
721  /*  1180 */    30,   31,   32,  158,  159,  160,  161,  162,   38,   32,
722  /*  1190 */    40,  212,  213,   35,   36,   37,  158,   40,  160,  148,
723  /*  1200 */   193,   51,   11,   85,  124,   87,  234,  127,  236,  158,
724  /*  1210 */   159,  160,  161,  162,  193,  314,  315,  183,  246,  212,
725  /*  1220 */   213,   30,   31,  303,  193,   11,   76,  193,  148,   38,
726  /*  1230 */   193,   40,  185,  226,  187,  117,  118,  193,  134,  135,
727  /*  1240 */   136,  183,   51,  112,   30,   31,  212,  213,  112,  212,
728  /*  1250 */   213,  136,   38,   32,   40,  124,  212,  213,  127,  109,
729  /*  1260 */   193,   40,  112,  226,  193,   51,   11,   76,  234,  193,
730  /*  1270 */   236,   84,  157,  123,  124,   88,  119,  127,  128,  148,
731  /*  1280 */   246,  247,   81,  212,  213,   30,   31,  256,   69,  255,
732  /*  1290 */    76,  247,  234,   38,  236,   40,    2,  226,  148,   98,
733  /*  1300 */   109,  193,  101,  112,  246,  118,   51,  193,  158,  159,
734  /*  1310 */   160,  161,  162,   94,  123,  124,  115,  130,  127,  128,
735  /*  1320 */   212,  213,  103,  109,  257,  193,  112,  306,  307,  308,
736  /*  1330 */    11,   76,  256,  234,  226,  236,  145,  123,  124,  148,
737  /*  1340 */   119,  127,  128,  183,  183,  246,  181,  183,  183,  158,
738  /*  1350 */   159,  160,  161,  162,  189,  190,   37,  307,  308,  145,
739  /*  1360 */   195,  196,  148,  115,  109,  193,  193,  112,  193,  193,
740  /*  1370 */   151,  257,  158,  159,  160,  161,  162,  193,  123,  124,
741  /*  1380 */    41,   39,  127,  128,  212,  213,  209,  212,  213,  183,
742  /*  1390 */   183,  143,  144,  193,  234,  234,  236,  236,  234,  234,
743  /*  1400 */   236,  236,   63,  148,   65,  232,  246,  246,  232,  183,
744  /*  1410 */   246,  246,  209,  158,  159,  160,  161,  162,   11,  247,
745  /*  1420 */   193,   82,  247,  104,  181,  260,  183,  227,  134,  135,
746  /*  1430 */   136,  113,  189,  190,  116,  116,  304,  305,  195,  196,
747  /*  1440 */   234,  234,  236,  236,  125,  126,  262,  128,  129,  130,
748  /*  1450 */   131,  132,  246,  246,  307,  308,  181,  138,  183,  282,
749  /*  1460 */   234,  296,  236,   20,  287,  190,   50,  193,  222,  115,
750  /*  1470 */   195,  196,  246,  193,  134,  135,  136,  234,  193,  236,
751  /*  1480 */   193,  316,  317,  318,  257,   69,  212,  213,  193,  246,
752  /*  1490 */   287,  149,  212,  213,  193,   79,  193,  212,  213,  212,
753  /*  1500 */   213,  147,  148,  260,  193,  193,  193,  212,  213,  234,
754  /*  1510 */   193,  236,   39,  212,  213,  212,  213,  193,  307,  308,
755  /*  1520 */    13,  246,  193,  212,  213,  212,  213,  193,  193,  212,
756  /*  1530 */   213,  193,  206,  207,  127,  260,  212,  213,  193,  296,
757  /*  1540 */   193,  212,  213,  193,  232,  193,   39,  212,  213,  193,
758  /*  1550 */   212,  213,  115,  137,  193,  112,  193,  212,  213,  212,
759  /*  1560 */   213,  318,  212,  213,  212,  213,  193,  193,  212,  213,
760  /*  1570 */   193,  296,  193,  212,  213,  212,  213,  193,  115,  193,
761  /*  1580 */    43,  193,   11,  193,   47,  212,  213,  150,  193,  212,
762  /*  1590 */   213,  212,  213,  193,  193,  193,  212,  213,  212,  213,
763  /*  1600 */   212,  213,  212,  213,  193,   68,  232,  212,  213,  146,
764  /*  1610 */   193,   60,  212,  213,  212,  213,  193,  193,  193,  193,
765  /*  1620 */   193,  254,  193,  212,  213,  258,  193,  193,  155,  212,
766  /*  1630 */   213,   40,  193,  193,  193,  212,  213,  212,  213,  212,
767  /*  1640 */   213,  212,  213,  193,   40,  212,  213,  193,  206,  207,
768  /*  1650 */   193,  212,  213,  212,  213,  193,  267,  233,  267,  193,
769  /*  1660 */   193,  193,  212,  213,  193,  193,  212,  213,  254,  212,
770  /*  1670 */   213,  193,  258,  193,  212,  213,  193,  106,  212,  213,
771  /*  1680 */   212,  213,  193,  212,  213,  115,  135,  136,  119,  288,
772  /*  1690 */   212,  213,  212,  213,  193,  212,  213,  143,  144,  193,
773  /*  1700 */   233,  212,  213,  314,  315,  314,  315,  111,  112,  140,
774  /*  1710 */   114,  142,  115,  236,  288,  124,  112,  176,  177,  297,
775  /*  1720 */   298,   40,  288,  246,  154,  238,  238,  303,  124,  238,
776  /*  1730 */   133,  238,  250,  251,  262,  248,  248,  238,  163,  248,
777  /*  1740 */   165,  248,  114,  115,   45,  112,  141,  248,  136,  116,
778  /*  1750 */   145,   40,  154,  155,  222,   56,  114,  115,  114,  115,
779  /*  1760 */   114,  115,  126,   55,  128,  128,  108,  114,  115,  157,
780  /*  1770 */   303,  114,  115,  114,   66,  138,  114,  115,  120,  114,
781  /*  1780 */   115,  114,  115,  114,  115,  114,  115,  114,  115,  114,
782  /*  1790 */   115,  114,  115,  114,  115,   92,   93,  158,  158,  160,
783  /*  1800 */   160,  114,  115,  114,  115,  124,  112,  113,  222,  150,
784  /*  1810 */   114,  115,  193,  193,  193,  193,  193,  193,  193,  193,
785  /*  1820 */   193,  263,  193,  193,  193,  193,  252,  193,  193,  249,
786  /*  1830 */   313,  193,  290,  284,  193,  124,  193,  235,  193,  283,
787  /*  1840 */   193,  193,  193,  193,  193,  193,  294,  193,  193,  193,
788  /*  1850 */   249,  237,  249,  193,  193,  249,  193,  193,  249,  193,
789  /*  1860 */   265,  193,  188,  191,  265,  289,  289,  175,  261,  261,
790  /*  1870 */   253,  253,  112,   39,  274,  265,  265,  115,  112,   67,
791  /*  1880 */   210,  133,  200,   52,  182,  180,  294,  294,  113,   54,
792  /*  1890 */   156,  155,  277,  112,  216,    9,  110,   64,  215,   83,
793  /*  1900 */   224,  221,  163,  110,  291,  215,  215,  291,  154,  202,
794  /*  1910 */   111,   40,  112,  172,  116,   37,   91,  199,  100,  112,
795  /*  1920 */   214,  217,   40,  239,  214,  240,  240,  239,  214,  220,
796  /*  1930 */   214,  216,  220,  214,  217,  214,  223,  214,  237,  239,
797  /*  1940 */   243,  243,  199,  223,  199,  199,  253,  198,  253,  199,
798  /*  1950 */   198,  186,  199,  198,  230,  217,  199,  198,  194,  198,
799  /*  1960 */   230,  194,  199,  230,  192,  192,  240,  184,  192,  240,
800  /*  1970 */   179,  177,  240,  231,  179,  240,  199,  153,  231,  177,
801  /*  1980 */   150,  170,  231,  163,  199,  138,  217,  231,  266,  264,
802  /*  1990 */   152,  151,  178,  266,  266,  264,  175,  178,  175,  132,
803  /*  2000 */   112,   72,  112,  112,  175,  112,  114,   72,  166,  115,
804  /*  2010 */   114,  166,  112,   40,  244,  116,  105,  243,  210,  218,
805  /*  2020 */   210,   42,  112,  286,  218,  285,  209,   72,   53,  168,
806  /*  2030 */   240,  242,  244,  241,  276,  209,  209,  209,  259,  259,
807  /*  2040 */   122,  209,  117,  156,  276,  114,  302,  114,  144,  137,
808  /*  2050 */   116,  115,  146,  146,  149,  271,  117,  137,  137,   58,
809  /*  2060 */   273,  166,   53,   20,  156,   20,   20,   20,  127,  137,
810  /*  2070 */    49,  113,   48,  112,   39,  166,   73,  118,  115,   73,
811  /*  2080 */    80,  310,   59,   39,  116,  123,   11,  122,  310,   70,
812  /*  2090 */   123,  295,  295,   71,  113,   40,   39,  315,   40,  113,
813  /*  2100 */   118,    6,    3,  298,  301,  301,   40,   40,  295,   40,
814  /*  2110 */   115,   40,  116,    7,   40,   39,  114,  112,   40,  112,
815  /*  2120 */    40,   40,   40,   40,  116,  112,  116,  112,  114,  113,
816  /*  2130 */   147,  106,  114,   49,  114,   49,   49,   49,  127,  112,
817  /*  2140 */    49,  115,  114,  112,  114,  116,  154,  115,  115,  112,
818  /*  2150 */   114,   49,  114,   97,   95,   10,  102,   80,   49,   80,
819  /*  2160 */    49,  112,    7,  115,  114,  114,  114,  114,   60,   40,
820  /*  2170 */    40,   40,   40,  112,    3,  115,  114,  114,  114,  114,
821  /*  2180 */   146,  141,  112,  115,  112,  146,  113,    2,  320,  320,
822  /*  2190 */   320,  320,  320,  320,  320,  320,  320,  320,  113,  320,
823  /*  2200 */   320,  320,  113,  320,  112,  320,  116,  114,  114,  113,
824  /*  2210 */   112,  320,  115,  112,  320,  320,  320,  320,  320,  320,
825  /*  2220 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
826  /*  2230 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
827  /*  2240 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
828  /*  2250 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
829  /*  2260 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
830  /*  2270 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
831  /*  2280 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
832  /*  2290 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
833  /*  2300 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
834  /*  2310 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
835  /*  2320 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
836  /*  2330 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
837  /*  2340 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
838  /*  2350 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
839  /*  2360 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
840  /*  2370 */   320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
841  /*  2380 */   320,  320,  320,  320,  320,  320,  320,  320,  320,
842 };
843 #define YY_SHIFT_COUNT    (644)
844 #define YY_SHIFT_MIN      (0)
845 #define YY_SHIFT_MAX      (2185)
846 static const unsigned short int yy_shift_ofst[] = {
847  /*     0 */   964,  811,  997,  802,  802,  765,  872, 1025, 1051, 1255,
848  /*    10 */  1255, 1255,  602,    0,    0,  153,  666, 1255, 1255, 1255,
849  /*    20 */  1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255,
850  /*    30 */  1255,  717,  717,  697,  887,  887, 1003,  765,  765,  765,
851  /*    40 */   765,  765,  765,  765,  765,   57,   86,  226,  255,  284,
852  /*    50 */   315,  344,  373,  404,  435,  464,  579,  608,  637,  666,
853  /*    60 */   666,  666,  666,  666,  666,  666,  666,  666,  666,  666,
854  /*    70 */   666,  666,  666,  666,  666,  666,  695,  666,  666,  114,
855  /*    80 */   773,  773, 1150, 1191, 1214, 1255, 1255, 1255, 1255, 1255,
856  /*    90 */  1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255,
857  /*   100 */  1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255,
858  /*   110 */  1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255,
859  /*   120 */  1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255, 1255,
860  /*   130 */  1255, 1255, 1255, 1255,  181,  529,  529,  529,  529,  529,
861  /*   140 */   529,  529,  476,   16,   25,   71,  737,  795, 1005,  950,
862  /*   150 */   950,  950, 1187,  950,  950, 1038, 1038, 1248, 1248, 1248,
863  /*   160 */  1158, 1248,   64,  241,  241,  241,   17,   17, 2214, 2214,
864  /*   170 */  1319, 1319, 1319,   71,  874,  867,  877,  877,  877,  877,
865  /*   180 */   874,  434,  950,  109,  119,  950,  950,  950,  950,  950,
866  /*   190 */   950,  950,  950,  950,  950,  950,  950,  950,  950,  950,
867  /*   200 */   950,  950,  950,  950, 1027,  950, 1201, 1201, 1551,  654,
868  /*   210 */   654,  156,  814,  814,  156,  982, 1554,   42,  449, 2214,
869  /*   220 */  2214, 2214, 2214, 2214, 2214, 2214,  722,   69,   69,  629,
870  /*   230 */   940, 1080,  946,  963, 1009, 1011, 1131,  950,  950,  950,
871  /*   240 */  1416, 1416, 1416,  950,  950,  950,  950,  950,  950,  950,
872  /*   250 */   950,  950,  950,  950,  950,  950, 1294,  950,  950,  950,
873  /*   260 */   950,  950,  950,  950,  950,  950,  950,  950,  950,  950,
874  /*   270 */   950,  950,  627,  950,  950,  950, 1053, 1219,  950,  950,
875  /*   280 */  1339,  950,  950, 1136, 1104, 1537,  829, 1157, 1569,  893,
876  /*   290 */   893,  893,  893, 1354,  955, 1569, 1569, 1628, 1597, 1633,
877  /*   300 */  1507, 1699,  104, 1473, 1598,  861, 1598, 1407, 1570, 1473,
878  /*   310 */  1473, 1570, 1473,  861, 1407,  856, 1699, 1699, 1342, 1342,
879  /*   320 */  1342, 1342, 1437, 1437, 1575, 1463, 1605,  192, 1113, 1760,
880  /*   330 */  1834, 1834, 1834, 1762, 1766, 1766, 1834, 1812, 1760, 1834,
881  /*   340 */  1748, 1834, 1812, 1834, 1831, 1831, 1775, 1775, 1835, 1835,
882  /*   350 */  1775, 1734, 1736, 1781, 1886, 1775, 1786, 1754, 1736, 1736,
883  /*   360 */  1754, 1781, 1886, 1754, 1886, 1754, 1775, 1786, 1739, 1833,
884  /*   370 */  1775, 1786, 1760, 1775, 1786, 1775, 1786, 1816, 1816, 1741,
885  /*   380 */  1741, 1741, 1793, 1793, 1793, 1793, 1799, 1871, 1800,  449,
886  /*   390 */  1800,  449, 1798, 1878, 1878, 1760, 1775, 1824, 1830, 1818,
887  /*   400 */  1818, 1825, 1825, 1811, 1807, 1775, 1820, 1824, 1838, 1840,
888  /*   410 */  1754, 1882, 1882, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
889  /*   420 */  2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
890  /*   430 */  2214, 1118,   27,  888,   80, 1596, 1340,  771, 1221, 1604,
891  /*   440 */  1642, 1644, 1646, 1591, 1636, 1708, 1637, 1658, 1443, 1318,
892  /*   450 */  1115, 1612, 1653,  459, 1657, 1662, 1665, 1667, 1669, 1671,
893  /*   460 */  1673, 1571, 1681, 1675, 1677, 1679, 1703, 1659, 1639, 1640,
894  /*   470 */  1687, 1689, 1694, 1696, 1711, 1847, 1867, 1888, 1929, 1890,
895  /*   480 */  1891, 1892, 1893, 1935, 1894, 1896, 1842, 1845, 1900, 1973,
896  /*   490 */  1899, 1911, 1979, 1910, 1955, 1975, 1861, 1918, 1925, 1931,
897  /*   500 */  1933, 1904, 1887, 1912, 1936, 1936, 1934, 1906, 1905, 1939,
898  /*   510 */  1895, 1907, 1920, 1936, 1921, 2001, 2009, 1936, 1908, 2043,
899  /*   520 */  2045, 2046, 2047, 1932, 1941, 2021, 1958, 1909, 2024, 1961,
900  /*   530 */  2035, 1959, 2003, 1963, 2006, 2000, 2023, 2044, 1968, 1962,
901  /*   540 */  2075, 1965, 2019, 2022, 1967, 1981, 2055, 2057, 2058, 1982,
902  /*   550 */  1986, 2095, 2099, 2066, 2067, 2069, 1995, 1996, 2071, 2106,
903  /*   560 */  2002, 2005, 2074, 2078, 2007, 2080, 2076, 2081, 2008, 2082,
904  /*   570 */  2010, 2083, 2013, 2014, 2015, 2025, 2016, 2018, 2020, 2011,
905  /*   580 */  2084, 2027, 1983, 2026, 2086, 2028, 2031, 2029, 2032, 2030,
906  /*   590 */  2033, 2036, 2087, 1992, 2037, 2038, 2088, 2091, 2102, 2056,
907  /*   600 */  2077, 2059, 2145, 2079, 2054, 2048, 2109, 2111, 2034, 2039,
908  /*   610 */  2050, 2026, 2051, 2052, 2053, 2060, 2062, 2049, 2108, 2063,
909  /*   620 */  2061, 2064, 2065, 2070, 2072, 2068, 2073, 2085, 2089, 2092,
910  /*   630 */  2040, 2090, 2155, 2093, 2094, 2129, 2096, 2130, 2098, 2131,
911  /*   640 */  2097, 2101, 2132, 2171, 2185,
912 };
913 #define YY_REDUCE_COUNT (430)
914 #define YY_REDUCE_MIN   (-269)
915 #define YY_REDUCE_MAX   (1832)
916 static const short yy_reduce_ofst[] = {
917  /*     0 */  1165, 1243, 1275, 1034,  333,  336,  551,  527,  557,  321,
918  /*    10 */   328,  330,  584,  636,  683, -267, -205,  708,  723,  902,
919  /*    20 */   913,  568, 1007, 1037, 1071,  745, 1108, 1044,  361, 1172,
920  /*    30 */  1175,  749,  781,  674, -149, 1021,  583,  972, 1058, 1160,
921  /*    40 */  1161, 1164, 1206, 1207, 1226, -263, -263, -263, -263, -263,
922  /*    50 */  -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
923  /*    60 */  -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
924  /*    70 */  -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
925  /*    80 */  -263, -263,  979, 1274, 1280, 1285, 1287, 1295, 1301, 1303,
926  /*    90 */  1311, 1313, 1317, 1324, 1329, 1335, 1338, 1345, 1347, 1350,
927  /*   100 */  1352, 1356, 1361, 1363, 1373, 1377, 1379, 1384, 1386, 1388,
928  /*   110 */  1390, 1395, 1400, 1402, 1411, 1417, 1423, 1425, 1427, 1429,
929  /*   120 */  1433, 1439, 1441, 1450, 1454, 1457, 1462, 1466, 1468, 1471,
930  /*   130 */  1478, 1480, 1483, 1489, -263, -263, -263, -263, -263, -263,
931  /*   140 */  -263, -263, -263, -263, -263,  334,  641, 1424,  301,  343,
932  /*   150 */   747,  545,  822, 1467, 1132,   43,  454,  537, 1099,  537,
933  /*   160 */  -263, 1099, 1177,  901, 1389, 1391, -263, -263, -263, -263,
934  /*   170 */  -211, -211, -211,  720,  547, -138,  -40,  735, 1184, 1472,
935  /*   180 */   819, -269,  354,  143,  143,  754,  906, 1031, 1076, 1401,
936  /*   190 */   605, 1426,  885, 1067, 1434, 1227,  912, 1173, 1176, 1312,
937  /*   200 */  1374, 1200,  920, 1114,  271,  677,  665, 1050, 1203, 1147,
938  /*   210 */  1211, 1326, 1367, 1414, 1442,  506, 1477, 1047, 1541, 1422,
939  /*   220 */  1487, 1488, 1491, 1493, 1482, 1499,  319,  327,  553,  554,
940  /*   230 */   589,  630,  777,  820,  965,  977, 1334, 1440, 1501, 1506,
941  /*   240 */  1246, 1532, 1586, 1619, 1620, 1621, 1622, 1623, 1624, 1625,
942  /*   250 */  1626, 1627, 1629, 1630, 1631, 1632, 1558, 1634, 1635, 1638,
943  /*   260 */  1641, 1643, 1645, 1647, 1648, 1649, 1650, 1651, 1652, 1654,
944  /*   270 */  1655, 1656, 1574, 1660, 1661, 1663, 1580, 1517, 1664, 1666,
945  /*   280 */  1542, 1668,  630, 1670, 1549, 1556, 1672, 1674, 1602, 1601,
946  /*   290 */  1603, 1606, 1609, 1574, 1614, 1602, 1602, 1676, 1678, 1682,
947  /*   300 */  1680, 1683, 1552, 1595, 1607, 1684, 1608, 1576, 1685, 1599,
948  /*   310 */  1610, 1686, 1611, 1688, 1577, 1692, 1690, 1691, 1617, 1618,
949  /*   320 */  1693, 1695, 1697, 1698, 1600, 1700, 1701, 1702, 1705, 1704,
950  /*   330 */  1706, 1710, 1714, 1707, 1709, 1712, 1716, 1713, 1717, 1719,
951  /*   340 */  1715, 1721, 1720, 1723, 1592, 1593, 1718, 1743, 1613, 1616,
952  /*   350 */  1745, 1615, 1722, 1725, 1724, 1746, 1749, 1726, 1727, 1728,
953  /*   360 */  1729, 1731, 1730, 1732, 1733, 1735, 1750, 1752, 1737, 1740,
954  /*   370 */  1753, 1755, 1738, 1757, 1759, 1763, 1761, 1764, 1767, 1772,
955  /*   380 */  1773, 1776, 1742, 1747, 1751, 1756, 1765, 1783, 1791, 1794,
956  /*   390 */  1795, 1802, 1744, 1758, 1768, 1769, 1777, 1770, 1774, 1771,
957  /*   400 */  1778, 1779, 1780, 1782, 1784, 1785, 1787, 1788, 1789, 1792,
958  /*   410 */  1790, 1814, 1819, 1796, 1797, 1801, 1803, 1804, 1805, 1806,
959  /*   420 */  1808, 1810, 1813, 1817, 1826, 1827, 1828, 1821, 1823, 1832,
960  /*   430 */  1829,
961 };
962 static const YYACTIONTYPE yy_default[] = {
963  /*     0 */  1794, 1794, 1794, 1624, 1359, 1500, 1359, 1359, 1359, 1624,
964  /*    10 */  1624, 1624, 1359, 1530, 1530, 1677, 1422, 1359, 1359, 1359,
965  /*    20 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1623, 1359,
966  /*    30 */  1359, 1359, 1359, 1359, 1710, 1710, 1359, 1359, 1359, 1359,
967  /*    40 */  1359, 1359, 1359, 1359, 1359, 1359, 1539, 1359, 1359, 1359,
968  /*    50 */  1359, 1359, 1546, 1625, 1626, 1359, 1359, 1359, 1359, 1676,
969  /*    60 */  1678, 1641, 1553, 1552, 1551, 1550, 1659, 1518, 1544, 1537,
970  /*    70 */  1541, 1625, 1620, 1621, 1619, 1772, 1359, 1626, 1540, 1588,
971  /*    80 */  1587, 1604, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
972  /*    90 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
973  /*   100 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
974  /*   110 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
975  /*   120 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
976  /*   130 */  1359, 1359, 1359, 1359, 1596, 1603, 1602, 1601, 1610, 1600,
977  /*   140 */  1597, 1590, 1589, 1591, 1592, 1413, 1359, 1359, 1464, 1359,
978  /*   150 */  1359, 1359, 1410, 1359, 1359, 1359, 1359, 1696, 1695, 1359,
979  /*   160 */  1593, 1359, 1422, 1581, 1580, 1579, 1607, 1594, 1606, 1605,
980  /*   170 */  1746, 1745, 1684, 1359, 1359, 1642, 1359, 1359, 1359, 1359,
981  /*   180 */  1359, 1710, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
982  /*   190 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
983  /*   200 */  1359, 1359, 1359, 1359, 1520, 1359, 1710, 1710, 1422, 1710,
984  /*   210 */  1710, 1418, 1521, 1521, 1418, 1524, 1359, 1384, 1363, 1691,
985  /*   220 */  1491, 1491, 1491, 1491, 1500, 1491, 1359, 1359, 1359, 1359,
986  /*   230 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
987  /*   240 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
988  /*   250 */  1681, 1679, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
989  /*   260 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1739,
990  /*   270 */  1359, 1359, 1359, 1359, 1359, 1359, 1496, 1359, 1359, 1359,
991  /*   280 */  1359, 1359, 1359, 1423, 1359, 1654, 1396, 1359, 1478, 1496,
992  /*   290 */  1496, 1496, 1496, 1498, 1490, 1479, 1477, 1761, 1439, 1359,
993  /*   300 */  1434, 1530, 1786, 1556, 1545, 1497, 1545, 1783, 1543, 1556,
994  /*   310 */  1556, 1543, 1556, 1497, 1783, 1359, 1530, 1530, 1520, 1520,
995  /*   320 */  1520, 1520, 1524, 1524, 1622, 1497, 1490, 1359, 1406, 1632,
996  /*   330 */  1465, 1465, 1465, 1457, 1359, 1359, 1465, 1454, 1632, 1465,
997  /*   340 */  1439, 1465, 1454, 1465, 1786, 1786, 1506, 1506, 1785, 1785,
998  /*   350 */  1506, 1642, 1769, 1565, 1467, 1506, 1407, 1543, 1769, 1769,
999  /*   360 */  1543, 1565, 1467, 1543, 1467, 1543, 1506, 1407, 1658, 1780,
1000  /*   370 */  1506, 1407, 1632, 1506, 1407, 1506, 1407, 1742, 1742, 1738,
1001  /*   380 */  1738, 1738, 1473, 1473, 1473, 1473, 1359, 1359, 1369, 1359,
1002  /*   390 */  1369, 1359, 1359, 1636, 1636, 1632, 1506, 1538, 1524, 1720,
1003  /*   400 */  1720, 1533, 1533, 1728, 1627, 1506, 1359, 1538, 1536, 1534,
1004  /*   410 */  1543, 1359, 1359, 1754, 1754, 1441, 1791, 1791, 1691, 1441,
1005  /*   420 */  1423, 1423, 1754, 1422, 1422, 1422, 1422, 1362, 1362, 1422,
1006  /*   430 */  1362, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1749,
1007  /*   440 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1686, 1643, 1510,
1008  /*   450 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1009  /*   460 */  1359, 1697, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1010  /*   470 */  1359, 1359, 1570, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1011  /*   480 */  1359, 1359, 1359, 1359, 1411, 1359, 1359, 1359, 1688, 1437,
1012  /*   490 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1013  /*   500 */  1359, 1359, 1359, 1359, 1547, 1548, 1511, 1359, 1359, 1359,
1014  /*   510 */  1359, 1359, 1359, 1562, 1359, 1359, 1359, 1557, 1359, 1359,
1015  /*   520 */  1359, 1359, 1359, 1359, 1359, 1359, 1782, 1359, 1359, 1359,
1016  /*   530 */  1359, 1359, 1359, 1657, 1656, 1359, 1359, 1359, 1359, 1359,
1017  /*   540 */  1359, 1401, 1359, 1392, 1359, 1508, 1359, 1359, 1359, 1359,
1018  /*   550 */  1386, 1359, 1359, 1359, 1359, 1359, 1385, 1359, 1359, 1359,
1019  /*   560 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1020  /*   570 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1021  /*   580 */  1359, 1359, 1359, 1535, 1359, 1359, 1359, 1359, 1725, 1359,
1022  /*   590 */  1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1023  /*   600 */  1359, 1359, 1359, 1359, 1359, 1525, 1359, 1359, 1359, 1359,
1024  /*   610 */  1359, 1773, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359,
1025  /*   620 */  1359, 1359, 1359, 1359, 1359, 1765, 1574, 1571, 1359, 1359,
1026  /*   630 */  1481, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1365, 1359,
1027  /*   640 */  1364, 1359, 1359, 1359, 1359,
1028 };
1029 /********** End of lemon-generated parsing tables *****************************/
1030 
1031 /* The next table maps tokens (terminal symbols) into fallback tokens.
1032 ** If a construct like the following:
1033 **
1034 **      %fallback ID X Y Z.
1035 **
1036 ** appears in the grammar, then ID becomes a fallback token for X, Y,
1037 ** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
1038 ** but it does not parse, the type of the token is changed to ID and
1039 ** the parse is retried before an error is thrown.
1040 **
1041 ** This feature can be used, for example, to cause some keywords in a language
1042 ** to revert to identifiers if they keyword does not apply in the context where
1043 ** it appears.
1044 */
1045 #ifdef YYFALLBACK
1046 static const YYCODETYPE yyFallback[] = {
1047     0,  /*          $ => nothing */
1048     0,  /*     CREATE => nothing */
1049    40,  /*    REPLACE => ID */
1050    40,  /*   PERFETTO => ID */
1051     0,  /*      MACRO => nothing */
1052     0,  /*    INCLUDE => nothing */
1053    40,  /*     MODULE => ID */
1054     0,  /*    RETURNS => nothing */
1055    40,  /*   FUNCTION => ID */
1056     0,  /*         OR => nothing */
1057     0,  /*        AND => nothing */
1058     0,  /*        NOT => nothing */
1059     0,  /*         IS => nothing */
1060    40,  /*      MATCH => ID */
1061    40,  /*    LIKE_KW => ID */
1062     0,  /*    BETWEEN => nothing */
1063     0,  /*         IN => nothing */
1064     0,  /*     ISNULL => nothing */
1065     0,  /*    NOTNULL => nothing */
1066     0,  /*         NE => nothing */
1067     0,  /*         EQ => nothing */
1068     0,  /*         GT => nothing */
1069     0,  /*         LE => nothing */
1070     0,  /*         LT => nothing */
1071     0,  /*         GE => nothing */
1072     0,  /*     ESCAPE => nothing */
1073     0,  /*     BITAND => nothing */
1074     0,  /*      BITOR => nothing */
1075     0,  /*     LSHIFT => nothing */
1076     0,  /*     RSHIFT => nothing */
1077     0,  /*       PLUS => nothing */
1078     0,  /*      MINUS => nothing */
1079     0,  /*       STAR => nothing */
1080     0,  /*      SLASH => nothing */
1081     0,  /*        REM => nothing */
1082     0,  /*     CONCAT => nothing */
1083     0,  /*        PTR => nothing */
1084     0,  /*    COLLATE => nothing */
1085     0,  /*     BITNOT => nothing */
1086     0,  /*         ON => nothing */
1087     0,  /*         ID => nothing */
1088    40,  /*      ABORT => ID */
1089    40,  /*     ACTION => ID */
1090    40,  /*      AFTER => ID */
1091    40,  /*    ANALYZE => ID */
1092    40,  /*        ASC => ID */
1093    40,  /*     ATTACH => ID */
1094    40,  /*     BEFORE => ID */
1095    40,  /*      BEGIN => ID */
1096    40,  /*         BY => ID */
1097    40,  /*    CASCADE => ID */
1098    40,  /*       CAST => ID */
1099    40,  /*   COLUMNKW => ID */
1100    40,  /*   CONFLICT => ID */
1101    40,  /*   DATABASE => ID */
1102    40,  /*   DEFERRED => ID */
1103    40,  /*       DESC => ID */
1104    40,  /*     DETACH => ID */
1105    40,  /*         DO => ID */
1106    40,  /*       EACH => ID */
1107    40,  /*        END => ID */
1108    40,  /*  EXCLUSIVE => ID */
1109    40,  /*    EXPLAIN => ID */
1110    40,  /*       FAIL => ID */
1111    40,  /*        FOR => ID */
1112    40,  /*     IGNORE => ID */
1113    40,  /*  IMMEDIATE => ID */
1114    40,  /*  INITIALLY => ID */
1115    40,  /*    INSTEAD => ID */
1116    40,  /*         NO => ID */
1117    40,  /*       PLAN => ID */
1118    40,  /*      QUERY => ID */
1119    40,  /*        KEY => ID */
1120    40,  /*         OF => ID */
1121    40,  /*     OFFSET => ID */
1122    40,  /*     PRAGMA => ID */
1123    40,  /*      RAISE => ID */
1124    40,  /*  RECURSIVE => ID */
1125    40,  /*    RELEASE => ID */
1126    40,  /*   RESTRICT => ID */
1127    40,  /*        ROW => ID */
1128    40,  /*       ROWS => ID */
1129    40,  /*   ROLLBACK => ID */
1130    40,  /*  SAVEPOINT => ID */
1131    40,  /*       TEMP => ID */
1132    40,  /*    TRIGGER => ID */
1133    40,  /*     VACUUM => ID */
1134    40,  /*       VIEW => ID */
1135    40,  /*    VIRTUAL => ID */
1136    40,  /*       WITH => ID */
1137    40,  /*    WITHOUT => ID */
1138    40,  /*      NULLS => ID */
1139    40,  /*      FIRST => ID */
1140    40,  /*       LAST => ID */
1141    40,  /*    CURRENT => ID */
1142    40,  /*  FOLLOWING => ID */
1143    40,  /*  PARTITION => ID */
1144    40,  /*  PRECEDING => ID */
1145    40,  /*      RANGE => ID */
1146    40,  /*  UNBOUNDED => ID */
1147    40,  /*    EXCLUDE => ID */
1148    40,  /*     GROUPS => ID */
1149    40,  /*     OTHERS => ID */
1150    40,  /*       TIES => ID */
1151    40,  /*  GENERATED => ID */
1152    40,  /*     ALWAYS => ID */
1153    40,  /* MATERIALIZED => ID */
1154    40,  /*    REINDEX => ID */
1155    40,  /*     RENAME => ID */
1156    40,  /*   CTIME_KW => ID */
1157    40,  /*         IF => ID */
1158     0,  /*        ANY => nothing */
1159     0,  /*         LP => nothing */
1160     0,  /*        DOT => nothing */
1161     0,  /*         RP => nothing */
1162     0,  /*      COMMA => nothing */
1163     0,  /*         AS => nothing */
1164     0,  /*      TABLE => nothing */
1165     0,  /*      INDEX => nothing */
1166     0,  /*  INTERSECT => nothing */
1167     0,  /*       DROP => nothing */
1168     0,  /*     COMMIT => nothing */
1169     0,  /*         TO => nothing */
1170     0,  /*     EXISTS => nothing */
1171     0,  /*     STRING => nothing */
1172     0,  /* CONSTRAINT => nothing */
1173     0,  /*    DEFAULT => nothing */
1174     0,  /*    INDEXED => nothing */
1175     0,  /*       NULL => nothing */
1176     0,  /*    PRIMARY => nothing */
1177     0,  /*     UNIQUE => nothing */
1178     0,  /*      CHECK => nothing */
1179     0,  /* REFERENCES => nothing */
1180     0,  /*   AUTOINCR => nothing */
1181     0,  /*     INSERT => nothing */
1182     0,  /*     DELETE => nothing */
1183     0,  /*     UPDATE => nothing */
1184     0,  /*        SET => nothing */
1185     0,  /* DEFERRABLE => nothing */
1186     0,  /*    FOREIGN => nothing */
1187     0,  /*      UNION => nothing */
1188     0,  /*        ALL => nothing */
1189     0,  /*     EXCEPT => nothing */
1190     0,  /*     SELECT => nothing */
1191     0,  /*     VALUES => nothing */
1192     0,  /*   DISTINCT => nothing */
1193     0,  /*       FROM => nothing */
1194     0,  /*       JOIN => nothing */
1195     0,  /*    JOIN_KW => nothing */
1196     0,  /*      USING => nothing */
1197     0,  /*      ORDER => nothing */
1198     0,  /*      GROUP => nothing */
1199     0,  /*     HAVING => nothing */
1200     0,  /*      LIMIT => nothing */
1201     0,  /*      WHERE => nothing */
1202     0,  /*  RETURNING => nothing */
1203     0,  /*       INTO => nothing */
1204     0,  /*    NOTHING => nothing */
1205     0,  /*      FLOAT => nothing */
1206     0,  /*       BLOB => nothing */
1207     0,  /*    INTEGER => nothing */
1208     0,  /*   VARIABLE => nothing */
1209     0,  /*       CASE => nothing */
1210     0,  /*       WHEN => nothing */
1211     0,  /*       THEN => nothing */
1212     0,  /*       ELSE => nothing */
1213     0,  /*       SEMI => nothing */
1214     0,  /*      ALTER => nothing */
1215     0,  /*        ADD => nothing */
1216     0,  /*     WINDOW => nothing */
1217     0,  /*       OVER => nothing */
1218     0,  /*     FILTER => nothing */
1219     0,  /* TRANSACTION => nothing */
1220     0,  /*      SPACE => nothing */
1221     0,  /*    ILLEGAL => nothing */
1222 };
1223 #endif /* YYFALLBACK */
1224 
1225 /* The following structure represents a single element of the
1226 ** parser's stack.  Information stored includes:
1227 **
1228 **   +  The state number for the parser at this level of the stack.
1229 **
1230 **   +  The value of the token stored at this level of the stack.
1231 **      (In other words, the "major" token.)
1232 **
1233 **   +  The semantic value stored at this level of the stack.  This is
1234 **      the information used by the action routines in the grammar.
1235 **      It is sometimes called the "minor" token.
1236 **
1237 ** After the "shift" half of a SHIFTREDUCE action, the stateno field
1238 ** actually contains the reduce action for the second half of the
1239 ** SHIFTREDUCE.
1240 */
1241 struct yyStackEntry {
1242   YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
1243   YYCODETYPE major;      /* The major token value.  This is the code
1244                          ** number for the token at this stack level */
1245   YYMINORTYPE minor;     /* The user-supplied minor token value.  This
1246                          ** is the value of the token  */
1247 };
1248 typedef struct yyStackEntry yyStackEntry;
1249 
1250 /* The state of the parser is completely contained in an instance of
1251 ** the following structure */
1252 struct yyParser {
1253   yyStackEntry *yytos;          /* Pointer to top element of the stack */
1254 #ifdef YYTRACKMAXSTACKDEPTH
1255   int yyhwm;                    /* High-water mark of the stack */
1256 #endif
1257 #ifndef YYNOERRORRECOVERY
1258   int yyerrcnt;                 /* Shifts left before out of the error */
1259 #endif
1260   PerfettoSqlParseARG_SDECL                /* A place to hold %extra_argument */
1261   PerfettoSqlParseCTX_SDECL                /* A place to hold %extra_context */
1262 #if YYSTACKDEPTH<=0
1263   int yystksz;                  /* Current side of the stack */
1264   yyStackEntry *yystack;        /* The parser's stack */
1265   yyStackEntry yystk0;          /* First stack entry */
1266 #else
1267   yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
1268   yyStackEntry *yystackEnd;            /* Last entry in the stack */
1269 #endif
1270 };
1271 typedef struct yyParser yyParser;
1272 
1273 #include <assert.h>
1274 #ifndef NDEBUG
1275 #include <stdio.h>
1276 static FILE *yyTraceFILE = 0;
1277 static char *yyTracePrompt = 0;
1278 #endif /* NDEBUG */
1279 
1280 #ifndef NDEBUG
1281 /*
1282 ** Turn parser tracing on by giving a stream to which to write the trace
1283 ** and a prompt to preface each trace message.  Tracing is turned off
1284 ** by making either argument NULL
1285 **
1286 ** Inputs:
1287 ** <ul>
1288 ** <li> A FILE* to which trace output should be written.
1289 **      If NULL, then tracing is turned off.
1290 ** <li> A prefix string written at the beginning of every
1291 **      line of trace output.  If NULL, then tracing is
1292 **      turned off.
1293 ** </ul>
1294 **
1295 ** Outputs:
1296 ** None.
1297 */
PerfettoSqlParseTrace(FILE * TraceFILE,char * zTracePrompt)1298 void PerfettoSqlParseTrace(FILE *TraceFILE, char *zTracePrompt){
1299   yyTraceFILE = TraceFILE;
1300   yyTracePrompt = zTracePrompt;
1301   if( yyTraceFILE==0 ) yyTracePrompt = 0;
1302   else if( yyTracePrompt==0 ) yyTraceFILE = 0;
1303 }
1304 #endif /* NDEBUG */
1305 
1306 #if defined(YYCOVERAGE) || !defined(NDEBUG)
1307 /* For tracing shifts, the names of all terminals and nonterminals
1308 ** are required.  The following table supplies these names */
1309 static const char *const yyTokenName[] = {
1310   /*    0 */ "$",
1311   /*    1 */ "CREATE",
1312   /*    2 */ "REPLACE",
1313   /*    3 */ "PERFETTO",
1314   /*    4 */ "MACRO",
1315   /*    5 */ "INCLUDE",
1316   /*    6 */ "MODULE",
1317   /*    7 */ "RETURNS",
1318   /*    8 */ "FUNCTION",
1319   /*    9 */ "OR",
1320   /*   10 */ "AND",
1321   /*   11 */ "NOT",
1322   /*   12 */ "IS",
1323   /*   13 */ "MATCH",
1324   /*   14 */ "LIKE_KW",
1325   /*   15 */ "BETWEEN",
1326   /*   16 */ "IN",
1327   /*   17 */ "ISNULL",
1328   /*   18 */ "NOTNULL",
1329   /*   19 */ "NE",
1330   /*   20 */ "EQ",
1331   /*   21 */ "GT",
1332   /*   22 */ "LE",
1333   /*   23 */ "LT",
1334   /*   24 */ "GE",
1335   /*   25 */ "ESCAPE",
1336   /*   26 */ "BITAND",
1337   /*   27 */ "BITOR",
1338   /*   28 */ "LSHIFT",
1339   /*   29 */ "RSHIFT",
1340   /*   30 */ "PLUS",
1341   /*   31 */ "MINUS",
1342   /*   32 */ "STAR",
1343   /*   33 */ "SLASH",
1344   /*   34 */ "REM",
1345   /*   35 */ "CONCAT",
1346   /*   36 */ "PTR",
1347   /*   37 */ "COLLATE",
1348   /*   38 */ "BITNOT",
1349   /*   39 */ "ON",
1350   /*   40 */ "ID",
1351   /*   41 */ "ABORT",
1352   /*   42 */ "ACTION",
1353   /*   43 */ "AFTER",
1354   /*   44 */ "ANALYZE",
1355   /*   45 */ "ASC",
1356   /*   46 */ "ATTACH",
1357   /*   47 */ "BEFORE",
1358   /*   48 */ "BEGIN",
1359   /*   49 */ "BY",
1360   /*   50 */ "CASCADE",
1361   /*   51 */ "CAST",
1362   /*   52 */ "COLUMNKW",
1363   /*   53 */ "CONFLICT",
1364   /*   54 */ "DATABASE",
1365   /*   55 */ "DEFERRED",
1366   /*   56 */ "DESC",
1367   /*   57 */ "DETACH",
1368   /*   58 */ "DO",
1369   /*   59 */ "EACH",
1370   /*   60 */ "END",
1371   /*   61 */ "EXCLUSIVE",
1372   /*   62 */ "EXPLAIN",
1373   /*   63 */ "FAIL",
1374   /*   64 */ "FOR",
1375   /*   65 */ "IGNORE",
1376   /*   66 */ "IMMEDIATE",
1377   /*   67 */ "INITIALLY",
1378   /*   68 */ "INSTEAD",
1379   /*   69 */ "NO",
1380   /*   70 */ "PLAN",
1381   /*   71 */ "QUERY",
1382   /*   72 */ "KEY",
1383   /*   73 */ "OF",
1384   /*   74 */ "OFFSET",
1385   /*   75 */ "PRAGMA",
1386   /*   76 */ "RAISE",
1387   /*   77 */ "RECURSIVE",
1388   /*   78 */ "RELEASE",
1389   /*   79 */ "RESTRICT",
1390   /*   80 */ "ROW",
1391   /*   81 */ "ROWS",
1392   /*   82 */ "ROLLBACK",
1393   /*   83 */ "SAVEPOINT",
1394   /*   84 */ "TEMP",
1395   /*   85 */ "TRIGGER",
1396   /*   86 */ "VACUUM",
1397   /*   87 */ "VIEW",
1398   /*   88 */ "VIRTUAL",
1399   /*   89 */ "WITH",
1400   /*   90 */ "WITHOUT",
1401   /*   91 */ "NULLS",
1402   /*   92 */ "FIRST",
1403   /*   93 */ "LAST",
1404   /*   94 */ "CURRENT",
1405   /*   95 */ "FOLLOWING",
1406   /*   96 */ "PARTITION",
1407   /*   97 */ "PRECEDING",
1408   /*   98 */ "RANGE",
1409   /*   99 */ "UNBOUNDED",
1410   /*  100 */ "EXCLUDE",
1411   /*  101 */ "GROUPS",
1412   /*  102 */ "OTHERS",
1413   /*  103 */ "TIES",
1414   /*  104 */ "GENERATED",
1415   /*  105 */ "ALWAYS",
1416   /*  106 */ "MATERIALIZED",
1417   /*  107 */ "REINDEX",
1418   /*  108 */ "RENAME",
1419   /*  109 */ "CTIME_KW",
1420   /*  110 */ "IF",
1421   /*  111 */ "ANY",
1422   /*  112 */ "LP",
1423   /*  113 */ "DOT",
1424   /*  114 */ "RP",
1425   /*  115 */ "COMMA",
1426   /*  116 */ "AS",
1427   /*  117 */ "TABLE",
1428   /*  118 */ "INDEX",
1429   /*  119 */ "INTERSECT",
1430   /*  120 */ "DROP",
1431   /*  121 */ "COMMIT",
1432   /*  122 */ "TO",
1433   /*  123 */ "EXISTS",
1434   /*  124 */ "STRING",
1435   /*  125 */ "CONSTRAINT",
1436   /*  126 */ "DEFAULT",
1437   /*  127 */ "INDEXED",
1438   /*  128 */ "NULL",
1439   /*  129 */ "PRIMARY",
1440   /*  130 */ "UNIQUE",
1441   /*  131 */ "CHECK",
1442   /*  132 */ "REFERENCES",
1443   /*  133 */ "AUTOINCR",
1444   /*  134 */ "INSERT",
1445   /*  135 */ "DELETE",
1446   /*  136 */ "UPDATE",
1447   /*  137 */ "SET",
1448   /*  138 */ "DEFERRABLE",
1449   /*  139 */ "FOREIGN",
1450   /*  140 */ "UNION",
1451   /*  141 */ "ALL",
1452   /*  142 */ "EXCEPT",
1453   /*  143 */ "SELECT",
1454   /*  144 */ "VALUES",
1455   /*  145 */ "DISTINCT",
1456   /*  146 */ "FROM",
1457   /*  147 */ "JOIN",
1458   /*  148 */ "JOIN_KW",
1459   /*  149 */ "USING",
1460   /*  150 */ "ORDER",
1461   /*  151 */ "GROUP",
1462   /*  152 */ "HAVING",
1463   /*  153 */ "LIMIT",
1464   /*  154 */ "WHERE",
1465   /*  155 */ "RETURNING",
1466   /*  156 */ "INTO",
1467   /*  157 */ "NOTHING",
1468   /*  158 */ "FLOAT",
1469   /*  159 */ "BLOB",
1470   /*  160 */ "INTEGER",
1471   /*  161 */ "VARIABLE",
1472   /*  162 */ "CASE",
1473   /*  163 */ "WHEN",
1474   /*  164 */ "THEN",
1475   /*  165 */ "ELSE",
1476   /*  166 */ "SEMI",
1477   /*  167 */ "ALTER",
1478   /*  168 */ "ADD",
1479   /*  169 */ "WINDOW",
1480   /*  170 */ "OVER",
1481   /*  171 */ "FILTER",
1482   /*  172 */ "TRANSACTION",
1483   /*  173 */ "SPACE",
1484   /*  174 */ "ILLEGAL",
1485   /*  175 */ "pscantok",
1486   /*  176 */ "sql_argument_list",
1487   /*  177 */ "sql_argument_list_nonempty",
1488   /*  178 */ "sql_argument_type",
1489   /*  179 */ "table_schema",
1490   /*  180 */ "or_replace",
1491   /*  181 */ "cmd",
1492   /*  182 */ "return_type",
1493   /*  183 */ "select",
1494   /*  184 */ "indexed_column_list",
1495   /*  185 */ "macro_argument_list",
1496   /*  186 */ "macro_body",
1497   /*  187 */ "macro_argument_list_nonempty",
1498   /*  188 */ "module_name",
1499   /*  189 */ "explain",
1500   /*  190 */ "cmdx",
1501   /*  191 */ "transtype",
1502   /*  192 */ "trans_opt",
1503   /*  193 */ "nm",
1504   /*  194 */ "savepoint_opt",
1505   /*  195 */ "create_table",
1506   /*  196 */ "createkw",
1507   /*  197 */ "temp",
1508   /*  198 */ "ifnotexists",
1509   /*  199 */ "dbnm",
1510   /*  200 */ "create_table_args",
1511   /*  201 */ "columnlist",
1512   /*  202 */ "conslist_opt",
1513   /*  203 */ "table_option_set",
1514   /*  204 */ "table_option",
1515   /*  205 */ "columnname",
1516   /*  206 */ "typetoken",
1517   /*  207 */ "typename",
1518   /*  208 */ "signed",
1519   /*  209 */ "scanpt",
1520   /*  210 */ "scantok",
1521   /*  211 */ "ccons",
1522   /*  212 */ "term",
1523   /*  213 */ "expr",
1524   /*  214 */ "onconf",
1525   /*  215 */ "sortorder",
1526   /*  216 */ "autoinc",
1527   /*  217 */ "eidlist_opt",
1528   /*  218 */ "refargs",
1529   /*  219 */ "defer_subclause",
1530   /*  220 */ "generated",
1531   /*  221 */ "refarg",
1532   /*  222 */ "refact",
1533   /*  223 */ "init_deferred_pred_opt",
1534   /*  224 */ "tconscomma",
1535   /*  225 */ "tcons",
1536   /*  226 */ "sortlist",
1537   /*  227 */ "eidlist",
1538   /*  228 */ "defer_subclause_opt",
1539   /*  229 */ "resolvetype",
1540   /*  230 */ "orconf",
1541   /*  231 */ "ifexists",
1542   /*  232 */ "fullname",
1543   /*  233 */ "wqlist",
1544   /*  234 */ "selectnowith",
1545   /*  235 */ "multiselect_op",
1546   /*  236 */ "oneselect",
1547   /*  237 */ "distinct",
1548   /*  238 */ "selcollist",
1549   /*  239 */ "from",
1550   /*  240 */ "where_opt",
1551   /*  241 */ "groupby_opt",
1552   /*  242 */ "having_opt",
1553   /*  243 */ "orderby_opt",
1554   /*  244 */ "limit_opt",
1555   /*  245 */ "window_clause",
1556   /*  246 */ "values",
1557   /*  247 */ "nexprlist",
1558   /*  248 */ "sclp",
1559   /*  249 */ "as",
1560   /*  250 */ "seltablist",
1561   /*  251 */ "stl_prefix",
1562   /*  252 */ "joinop",
1563   /*  253 */ "on_using",
1564   /*  254 */ "indexed_by",
1565   /*  255 */ "exprlist",
1566   /*  256 */ "xfullname",
1567   /*  257 */ "idlist",
1568   /*  258 */ "indexed_opt",
1569   /*  259 */ "nulls",
1570   /*  260 */ "with",
1571   /*  261 */ "where_opt_ret",
1572   /*  262 */ "setlist",
1573   /*  263 */ "insert_cmd",
1574   /*  264 */ "idlist_opt",
1575   /*  265 */ "upsert",
1576   /*  266 */ "returning",
1577   /*  267 */ "filter_over",
1578   /*  268 */ "likeop",
1579   /*  269 */ "between_op",
1580   /*  270 */ "in_op",
1581   /*  271 */ "paren_exprlist",
1582   /*  272 */ "case_operand",
1583   /*  273 */ "case_exprlist",
1584   /*  274 */ "case_else",
1585   /*  275 */ "uniqueflag",
1586   /*  276 */ "collate",
1587   /*  277 */ "vinto",
1588   /*  278 */ "nmnum",
1589   /*  279 */ "minus_num",
1590   /*  280 */ "plus_num",
1591   /*  281 */ "trigger_decl",
1592   /*  282 */ "trigger_cmd_list",
1593   /*  283 */ "trigger_time",
1594   /*  284 */ "trigger_event",
1595   /*  285 */ "foreach_clause",
1596   /*  286 */ "when_clause",
1597   /*  287 */ "trigger_cmd",
1598   /*  288 */ "trnm",
1599   /*  289 */ "tridxby",
1600   /*  290 */ "raisetype",
1601   /*  291 */ "database_kw_opt",
1602   /*  292 */ "key_opt",
1603   /*  293 */ "add_column_fullname",
1604   /*  294 */ "kwcolumn_opt",
1605   /*  295 */ "carglist",
1606   /*  296 */ "create_vtab",
1607   /*  297 */ "vtabarglist",
1608   /*  298 */ "vtabarg",
1609   /*  299 */ "vtabargtoken",
1610   /*  300 */ "lp",
1611   /*  301 */ "anylist",
1612   /*  302 */ "wqas",
1613   /*  303 */ "wqitem",
1614   /*  304 */ "windowdefn_list",
1615   /*  305 */ "windowdefn",
1616   /*  306 */ "window",
1617   /*  307 */ "frame_opt",
1618   /*  308 */ "range_or_rows",
1619   /*  309 */ "frame_bound_s",
1620   /*  310 */ "frame_exclude_opt",
1621   /*  311 */ "frame_bound_e",
1622   /*  312 */ "frame_bound",
1623   /*  313 */ "frame_exclude",
1624   /*  314 */ "filter_clause",
1625   /*  315 */ "over_clause",
1626   /*  316 */ "input",
1627   /*  317 */ "cmdlist",
1628   /*  318 */ "ecmd",
1629   /*  319 */ "conslist",
1630 };
1631 #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
1632 
1633 #ifndef NDEBUG
1634 /* For tracing reduce actions, the names of all rules are required.
1635 */
1636 static const char *const yyRuleName[] = {
1637  /*   0 */ "pscantok ::=",
1638  /*   1 */ "sql_argument_list ::=",
1639  /*   2 */ "sql_argument_list ::= sql_argument_list_nonempty",
1640  /*   3 */ "sql_argument_type ::= ID",
1641  /*   4 */ "sql_argument_type ::= ID LP ID DOT ID RP",
1642  /*   5 */ "sql_argument_list_nonempty ::= sql_argument_list_nonempty COMMA ID sql_argument_type",
1643  /*   6 */ "sql_argument_list_nonempty ::= ID sql_argument_type",
1644  /*   7 */ "table_schema ::=",
1645  /*   8 */ "table_schema ::= LP sql_argument_list_nonempty RP",
1646  /*   9 */ "or_replace ::=",
1647  /*  10 */ "or_replace ::= OR REPLACE",
1648  /*  11 */ "cmd ::= CREATE or_replace PERFETTO FUNCTION ID LP sql_argument_list RP RETURNS return_type AS select pscantok",
1649  /*  12 */ "return_type ::= ID",
1650  /*  13 */ "return_type ::= TABLE LP sql_argument_list_nonempty RP",
1651  /*  14 */ "cmd ::= CREATE or_replace PERFETTO TABLE ID table_schema AS select pscantok",
1652  /*  15 */ "cmd ::= CREATE or_replace PERFETTO VIEW ID table_schema AS select pscantok",
1653  /*  16 */ "cmd ::= CREATE or_replace PERFETTO INDEX ID ON ID LP indexed_column_list RP",
1654  /*  17 */ "indexed_column_list ::= indexed_column_list COMMA ID",
1655  /*  18 */ "indexed_column_list ::= ID",
1656  /*  19 */ "cmd ::= CREATE or_replace PERFETTO MACRO ID LP macro_argument_list RP RETURNS ID AS macro_body pscantok",
1657  /*  20 */ "macro_argument_list_nonempty ::= macro_argument_list_nonempty COMMA ID ID",
1658  /*  21 */ "macro_argument_list_nonempty ::= ID ID",
1659  /*  22 */ "macro_argument_list ::=",
1660  /*  23 */ "macro_argument_list ::= macro_argument_list_nonempty",
1661  /*  24 */ "cmd ::= INCLUDE PERFETTO MODULE module_name",
1662  /*  25 */ "module_name ::= ID|STAR|INTERSECT",
1663  /*  26 */ "module_name ::= module_name DOT ID|STAR|INTERSECT",
1664  /*  27 */ "cmd ::= DROP PERFETTO INDEX ID ON ID",
1665  /*  28 */ "macro_body ::= ANY",
1666  /*  29 */ "macro_body ::= macro_body ANY",
1667  /*  30 */ "explain ::= EXPLAIN",
1668  /*  31 */ "explain ::= EXPLAIN QUERY PLAN",
1669  /*  32 */ "cmdx ::= cmd",
1670  /*  33 */ "cmd ::= BEGIN transtype trans_opt",
1671  /*  34 */ "transtype ::=",
1672  /*  35 */ "transtype ::= DEFERRED",
1673  /*  36 */ "transtype ::= IMMEDIATE",
1674  /*  37 */ "transtype ::= EXCLUSIVE",
1675  /*  38 */ "cmd ::= COMMIT|END trans_opt",
1676  /*  39 */ "cmd ::= ROLLBACK trans_opt",
1677  /*  40 */ "cmd ::= SAVEPOINT nm",
1678  /*  41 */ "cmd ::= RELEASE savepoint_opt nm",
1679  /*  42 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
1680  /*  43 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
1681  /*  44 */ "createkw ::= CREATE",
1682  /*  45 */ "ifnotexists ::=",
1683  /*  46 */ "ifnotexists ::= IF NOT EXISTS",
1684  /*  47 */ "temp ::= TEMP",
1685  /*  48 */ "temp ::=",
1686  /*  49 */ "create_table_args ::= LP columnlist conslist_opt RP table_option_set",
1687  /*  50 */ "create_table_args ::= AS select",
1688  /*  51 */ "table_option_set ::=",
1689  /*  52 */ "table_option_set ::= table_option_set COMMA table_option",
1690  /*  53 */ "table_option ::= WITHOUT nm",
1691  /*  54 */ "table_option ::= nm",
1692  /*  55 */ "columnname ::= nm typetoken",
1693  /*  56 */ "typetoken ::=",
1694  /*  57 */ "typetoken ::= typename LP signed RP",
1695  /*  58 */ "typetoken ::= typename LP signed COMMA signed RP",
1696  /*  59 */ "typename ::= typename ID|STRING",
1697  /*  60 */ "scanpt ::=",
1698  /*  61 */ "scantok ::=",
1699  /*  62 */ "ccons ::= CONSTRAINT nm",
1700  /*  63 */ "ccons ::= DEFAULT scantok term",
1701  /*  64 */ "ccons ::= DEFAULT LP expr RP",
1702  /*  65 */ "ccons ::= DEFAULT PLUS scantok term",
1703  /*  66 */ "ccons ::= DEFAULT MINUS scantok term",
1704  /*  67 */ "ccons ::= DEFAULT scantok ID|INDEXED",
1705  /*  68 */ "ccons ::= NOT NULL onconf",
1706  /*  69 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
1707  /*  70 */ "ccons ::= UNIQUE onconf",
1708  /*  71 */ "ccons ::= CHECK LP expr RP",
1709  /*  72 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
1710  /*  73 */ "ccons ::= defer_subclause",
1711  /*  74 */ "ccons ::= COLLATE ID|STRING",
1712  /*  75 */ "generated ::= LP expr RP",
1713  /*  76 */ "generated ::= LP expr RP ID",
1714  /*  77 */ "autoinc ::=",
1715  /*  78 */ "autoinc ::= AUTOINCR",
1716  /*  79 */ "refargs ::=",
1717  /*  80 */ "refargs ::= refargs refarg",
1718  /*  81 */ "refarg ::= MATCH nm",
1719  /*  82 */ "refarg ::= ON INSERT refact",
1720  /*  83 */ "refarg ::= ON DELETE refact",
1721  /*  84 */ "refarg ::= ON UPDATE refact",
1722  /*  85 */ "refact ::= SET NULL",
1723  /*  86 */ "refact ::= SET DEFAULT",
1724  /*  87 */ "refact ::= CASCADE",
1725  /*  88 */ "refact ::= RESTRICT",
1726  /*  89 */ "refact ::= NO ACTION",
1727  /*  90 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
1728  /*  91 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
1729  /*  92 */ "init_deferred_pred_opt ::=",
1730  /*  93 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
1731  /*  94 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
1732  /*  95 */ "conslist_opt ::=",
1733  /*  96 */ "tconscomma ::= COMMA",
1734  /*  97 */ "tcons ::= CONSTRAINT nm",
1735  /*  98 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
1736  /*  99 */ "tcons ::= UNIQUE LP sortlist RP onconf",
1737  /* 100 */ "tcons ::= CHECK LP expr RP onconf",
1738  /* 101 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
1739  /* 102 */ "defer_subclause_opt ::=",
1740  /* 103 */ "onconf ::=",
1741  /* 104 */ "onconf ::= ON CONFLICT resolvetype",
1742  /* 105 */ "orconf ::=",
1743  /* 106 */ "orconf ::= OR resolvetype",
1744  /* 107 */ "resolvetype ::= IGNORE",
1745  /* 108 */ "resolvetype ::= REPLACE",
1746  /* 109 */ "cmd ::= DROP TABLE ifexists fullname",
1747  /* 110 */ "ifexists ::= IF EXISTS",
1748  /* 111 */ "ifexists ::=",
1749  /* 112 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
1750  /* 113 */ "cmd ::= DROP VIEW ifexists fullname",
1751  /* 114 */ "cmd ::= select",
1752  /* 115 */ "select ::= WITH wqlist selectnowith",
1753  /* 116 */ "select ::= WITH RECURSIVE wqlist selectnowith",
1754  /* 117 */ "select ::= selectnowith",
1755  /* 118 */ "selectnowith ::= selectnowith multiselect_op oneselect",
1756  /* 119 */ "multiselect_op ::= UNION",
1757  /* 120 */ "multiselect_op ::= UNION ALL",
1758  /* 121 */ "multiselect_op ::= EXCEPT|INTERSECT",
1759  /* 122 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
1760  /* 123 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
1761  /* 124 */ "values ::= VALUES LP nexprlist RP",
1762  /* 125 */ "values ::= values COMMA LP nexprlist RP",
1763  /* 126 */ "distinct ::= DISTINCT",
1764  /* 127 */ "distinct ::= ALL",
1765  /* 128 */ "distinct ::=",
1766  /* 129 */ "sclp ::=",
1767  /* 130 */ "selcollist ::= sclp scanpt expr scanpt as",
1768  /* 131 */ "selcollist ::= sclp scanpt STAR",
1769  /* 132 */ "selcollist ::= sclp scanpt nm DOT STAR",
1770  /* 133 */ "as ::= AS nm",
1771  /* 134 */ "as ::=",
1772  /* 135 */ "from ::=",
1773  /* 136 */ "from ::= FROM seltablist",
1774  /* 137 */ "stl_prefix ::= seltablist joinop",
1775  /* 138 */ "stl_prefix ::=",
1776  /* 139 */ "seltablist ::= stl_prefix nm dbnm as on_using",
1777  /* 140 */ "seltablist ::= stl_prefix nm dbnm as indexed_by on_using",
1778  /* 141 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using",
1779  /* 142 */ "seltablist ::= stl_prefix LP select RP as on_using",
1780  /* 143 */ "seltablist ::= stl_prefix LP seltablist RP as on_using",
1781  /* 144 */ "dbnm ::=",
1782  /* 145 */ "dbnm ::= DOT nm",
1783  /* 146 */ "fullname ::= nm",
1784  /* 147 */ "fullname ::= nm DOT nm",
1785  /* 148 */ "xfullname ::= nm",
1786  /* 149 */ "xfullname ::= nm DOT nm",
1787  /* 150 */ "xfullname ::= nm DOT nm AS nm",
1788  /* 151 */ "xfullname ::= nm AS nm",
1789  /* 152 */ "joinop ::= COMMA|JOIN",
1790  /* 153 */ "joinop ::= JOIN_KW JOIN",
1791  /* 154 */ "joinop ::= JOIN_KW nm JOIN",
1792  /* 155 */ "joinop ::= JOIN_KW nm nm JOIN",
1793  /* 156 */ "on_using ::= ON expr",
1794  /* 157 */ "on_using ::= USING LP idlist RP",
1795  /* 158 */ "on_using ::=",
1796  /* 159 */ "indexed_opt ::=",
1797  /* 160 */ "indexed_by ::= INDEXED BY nm",
1798  /* 161 */ "indexed_by ::= NOT INDEXED",
1799  /* 162 */ "orderby_opt ::=",
1800  /* 163 */ "orderby_opt ::= ORDER BY sortlist",
1801  /* 164 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
1802  /* 165 */ "sortlist ::= expr sortorder nulls",
1803  /* 166 */ "sortorder ::= ASC",
1804  /* 167 */ "sortorder ::= DESC",
1805  /* 168 */ "sortorder ::=",
1806  /* 169 */ "nulls ::= NULLS FIRST",
1807  /* 170 */ "nulls ::= NULLS LAST",
1808  /* 171 */ "nulls ::=",
1809  /* 172 */ "groupby_opt ::=",
1810  /* 173 */ "groupby_opt ::= GROUP BY nexprlist",
1811  /* 174 */ "having_opt ::=",
1812  /* 175 */ "having_opt ::= HAVING expr",
1813  /* 176 */ "limit_opt ::=",
1814  /* 177 */ "limit_opt ::= LIMIT expr",
1815  /* 178 */ "limit_opt ::= LIMIT expr OFFSET expr",
1816  /* 179 */ "limit_opt ::= LIMIT expr COMMA expr",
1817  /* 180 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret",
1818  /* 181 */ "where_opt ::=",
1819  /* 182 */ "where_opt ::= WHERE expr",
1820  /* 183 */ "where_opt_ret ::=",
1821  /* 184 */ "where_opt_ret ::= WHERE expr",
1822  /* 185 */ "where_opt_ret ::= RETURNING selcollist",
1823  /* 186 */ "where_opt_ret ::= WHERE expr RETURNING selcollist",
1824  /* 187 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret",
1825  /* 188 */ "setlist ::= setlist COMMA nm EQ expr",
1826  /* 189 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
1827  /* 190 */ "setlist ::= nm EQ expr",
1828  /* 191 */ "setlist ::= LP idlist RP EQ expr",
1829  /* 192 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
1830  /* 193 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning",
1831  /* 194 */ "upsert ::=",
1832  /* 195 */ "upsert ::= RETURNING selcollist",
1833  /* 196 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert",
1834  /* 197 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert",
1835  /* 198 */ "upsert ::= ON CONFLICT DO NOTHING returning",
1836  /* 199 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning",
1837  /* 200 */ "returning ::= RETURNING selcollist",
1838  /* 201 */ "insert_cmd ::= INSERT orconf",
1839  /* 202 */ "insert_cmd ::= REPLACE",
1840  /* 203 */ "idlist_opt ::=",
1841  /* 204 */ "idlist_opt ::= LP idlist RP",
1842  /* 205 */ "idlist ::= idlist COMMA nm",
1843  /* 206 */ "idlist ::= nm",
1844  /* 207 */ "expr ::= LP expr RP",
1845  /* 208 */ "expr ::= ID|INDEXED|JOIN_KW",
1846  /* 209 */ "expr ::= nm DOT nm",
1847  /* 210 */ "expr ::= nm DOT nm DOT nm",
1848  /* 211 */ "term ::= NULL|FLOAT|BLOB",
1849  /* 212 */ "term ::= STRING",
1850  /* 213 */ "term ::= INTEGER",
1851  /* 214 */ "expr ::= VARIABLE",
1852  /* 215 */ "expr ::= expr COLLATE ID|STRING",
1853  /* 216 */ "expr ::= CAST LP expr AS typetoken RP",
1854  /* 217 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP",
1855  /* 218 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP",
1856  /* 219 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP",
1857  /* 220 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over",
1858  /* 221 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over",
1859  /* 222 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over",
1860  /* 223 */ "term ::= CTIME_KW",
1861  /* 224 */ "expr ::= LP nexprlist COMMA expr RP",
1862  /* 225 */ "expr ::= expr AND expr",
1863  /* 226 */ "expr ::= expr OR expr",
1864  /* 227 */ "expr ::= expr LT|GT|GE|LE expr",
1865  /* 228 */ "expr ::= expr EQ|NE expr",
1866  /* 229 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
1867  /* 230 */ "expr ::= expr PLUS|MINUS expr",
1868  /* 231 */ "expr ::= expr STAR|SLASH|REM expr",
1869  /* 232 */ "expr ::= expr CONCAT expr",
1870  /* 233 */ "likeop ::= NOT LIKE_KW|MATCH",
1871  /* 234 */ "expr ::= expr likeop expr",
1872  /* 235 */ "expr ::= expr likeop expr ESCAPE expr",
1873  /* 236 */ "expr ::= expr ISNULL|NOTNULL",
1874  /* 237 */ "expr ::= expr NOT NULL",
1875  /* 238 */ "expr ::= expr IS expr",
1876  /* 239 */ "expr ::= expr IS NOT expr",
1877  /* 240 */ "expr ::= expr IS NOT DISTINCT FROM expr",
1878  /* 241 */ "expr ::= expr IS DISTINCT FROM expr",
1879  /* 242 */ "expr ::= NOT expr",
1880  /* 243 */ "expr ::= BITNOT expr",
1881  /* 244 */ "expr ::= PLUS|MINUS expr",
1882  /* 245 */ "expr ::= expr PTR expr",
1883  /* 246 */ "between_op ::= BETWEEN",
1884  /* 247 */ "between_op ::= NOT BETWEEN",
1885  /* 248 */ "expr ::= expr between_op expr AND expr",
1886  /* 249 */ "in_op ::= IN",
1887  /* 250 */ "in_op ::= NOT IN",
1888  /* 251 */ "expr ::= expr in_op LP exprlist RP",
1889  /* 252 */ "expr ::= LP select RP",
1890  /* 253 */ "expr ::= expr in_op LP select RP",
1891  /* 254 */ "expr ::= expr in_op nm dbnm paren_exprlist",
1892  /* 255 */ "expr ::= EXISTS LP select RP",
1893  /* 256 */ "expr ::= CASE case_operand case_exprlist case_else END",
1894  /* 257 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
1895  /* 258 */ "case_exprlist ::= WHEN expr THEN expr",
1896  /* 259 */ "case_else ::= ELSE expr",
1897  /* 260 */ "case_else ::=",
1898  /* 261 */ "case_operand ::=",
1899  /* 262 */ "exprlist ::=",
1900  /* 263 */ "nexprlist ::= nexprlist COMMA expr",
1901  /* 264 */ "nexprlist ::= expr",
1902  /* 265 */ "paren_exprlist ::=",
1903  /* 266 */ "paren_exprlist ::= LP exprlist RP",
1904  /* 267 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
1905  /* 268 */ "uniqueflag ::= UNIQUE",
1906  /* 269 */ "uniqueflag ::=",
1907  /* 270 */ "eidlist_opt ::=",
1908  /* 271 */ "eidlist_opt ::= LP eidlist RP",
1909  /* 272 */ "eidlist ::= eidlist COMMA nm collate sortorder",
1910  /* 273 */ "eidlist ::= nm collate sortorder",
1911  /* 274 */ "collate ::=",
1912  /* 275 */ "collate ::= COLLATE ID|STRING",
1913  /* 276 */ "cmd ::= DROP INDEX ifexists fullname",
1914  /* 277 */ "cmd ::= VACUUM vinto",
1915  /* 278 */ "cmd ::= VACUUM nm vinto",
1916  /* 279 */ "vinto ::= INTO expr",
1917  /* 280 */ "vinto ::=",
1918  /* 281 */ "cmd ::= PRAGMA nm dbnm",
1919  /* 282 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
1920  /* 283 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
1921  /* 284 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
1922  /* 285 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
1923  /* 286 */ "plus_num ::= PLUS INTEGER|FLOAT",
1924  /* 287 */ "minus_num ::= MINUS INTEGER|FLOAT",
1925  /* 288 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
1926  /* 289 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
1927  /* 290 */ "trigger_time ::= BEFORE|AFTER",
1928  /* 291 */ "trigger_time ::= INSTEAD OF",
1929  /* 292 */ "trigger_time ::=",
1930  /* 293 */ "trigger_event ::= DELETE|INSERT",
1931  /* 294 */ "trigger_event ::= UPDATE",
1932  /* 295 */ "trigger_event ::= UPDATE OF idlist",
1933  /* 296 */ "when_clause ::=",
1934  /* 297 */ "when_clause ::= WHEN expr",
1935  /* 298 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
1936  /* 299 */ "trigger_cmd_list ::= trigger_cmd SEMI",
1937  /* 300 */ "trnm ::= nm DOT nm",
1938  /* 301 */ "tridxby ::= INDEXED BY nm",
1939  /* 302 */ "tridxby ::= NOT INDEXED",
1940  /* 303 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt",
1941  /* 304 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
1942  /* 305 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
1943  /* 306 */ "trigger_cmd ::= scanpt select scanpt",
1944  /* 307 */ "expr ::= RAISE LP IGNORE RP",
1945  /* 308 */ "expr ::= RAISE LP raisetype COMMA nm RP",
1946  /* 309 */ "raisetype ::= ROLLBACK",
1947  /* 310 */ "raisetype ::= ABORT",
1948  /* 311 */ "raisetype ::= FAIL",
1949  /* 312 */ "cmd ::= DROP TRIGGER ifexists fullname",
1950  /* 313 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
1951  /* 314 */ "cmd ::= DETACH database_kw_opt expr",
1952  /* 315 */ "key_opt ::=",
1953  /* 316 */ "key_opt ::= KEY expr",
1954  /* 317 */ "cmd ::= REINDEX",
1955  /* 318 */ "cmd ::= REINDEX nm dbnm",
1956  /* 319 */ "cmd ::= ANALYZE",
1957  /* 320 */ "cmd ::= ANALYZE nm dbnm",
1958  /* 321 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
1959  /* 322 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
1960  /* 323 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
1961  /* 324 */ "add_column_fullname ::= fullname",
1962  /* 325 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
1963  /* 326 */ "cmd ::= create_vtab",
1964  /* 327 */ "cmd ::= create_vtab LP vtabarglist RP",
1965  /* 328 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
1966  /* 329 */ "vtabarg ::=",
1967  /* 330 */ "vtabargtoken ::= ANY",
1968  /* 331 */ "vtabargtoken ::= lp anylist RP",
1969  /* 332 */ "lp ::= LP",
1970  /* 333 */ "with ::= WITH wqlist",
1971  /* 334 */ "with ::= WITH RECURSIVE wqlist",
1972  /* 335 */ "wqas ::= AS",
1973  /* 336 */ "wqas ::= AS MATERIALIZED",
1974  /* 337 */ "wqas ::= AS NOT MATERIALIZED",
1975  /* 338 */ "wqitem ::= nm eidlist_opt wqas LP select RP",
1976  /* 339 */ "wqlist ::= wqitem",
1977  /* 340 */ "wqlist ::= wqlist COMMA wqitem",
1978  /* 341 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
1979  /* 342 */ "windowdefn ::= nm AS LP window RP",
1980  /* 343 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
1981  /* 344 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
1982  /* 345 */ "window ::= ORDER BY sortlist frame_opt",
1983  /* 346 */ "window ::= nm ORDER BY sortlist frame_opt",
1984  /* 347 */ "window ::= nm frame_opt",
1985  /* 348 */ "frame_opt ::=",
1986  /* 349 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
1987  /* 350 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
1988  /* 351 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
1989  /* 352 */ "frame_bound_s ::= frame_bound",
1990  /* 353 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
1991  /* 354 */ "frame_bound_e ::= frame_bound",
1992  /* 355 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
1993  /* 356 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
1994  /* 357 */ "frame_bound ::= CURRENT ROW",
1995  /* 358 */ "frame_exclude_opt ::=",
1996  /* 359 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
1997  /* 360 */ "frame_exclude ::= NO OTHERS",
1998  /* 361 */ "frame_exclude ::= CURRENT ROW",
1999  /* 362 */ "frame_exclude ::= GROUP|TIES",
2000  /* 363 */ "window_clause ::= WINDOW windowdefn_list",
2001  /* 364 */ "filter_over ::= filter_clause over_clause",
2002  /* 365 */ "filter_over ::= over_clause",
2003  /* 366 */ "filter_over ::= filter_clause",
2004  /* 367 */ "over_clause ::= OVER LP window RP",
2005  /* 368 */ "over_clause ::= OVER nm",
2006  /* 369 */ "filter_clause ::= FILTER LP WHERE expr RP",
2007  /* 370 */ "input ::= cmdlist",
2008  /* 371 */ "cmdlist ::= cmdlist ecmd",
2009  /* 372 */ "cmdlist ::= ecmd",
2010  /* 373 */ "ecmd ::= SEMI",
2011  /* 374 */ "ecmd ::= cmdx SEMI",
2012  /* 375 */ "ecmd ::= explain cmdx SEMI",
2013  /* 376 */ "trans_opt ::=",
2014  /* 377 */ "trans_opt ::= TRANSACTION",
2015  /* 378 */ "trans_opt ::= TRANSACTION nm",
2016  /* 379 */ "savepoint_opt ::= SAVEPOINT",
2017  /* 380 */ "savepoint_opt ::=",
2018  /* 381 */ "cmd ::= create_table create_table_args",
2019  /* 382 */ "table_option_set ::= table_option",
2020  /* 383 */ "columnlist ::= columnlist COMMA columnname carglist",
2021  /* 384 */ "columnlist ::= columnname carglist",
2022  /* 385 */ "nm ::= ID|INDEXED|JOIN_KW",
2023  /* 386 */ "nm ::= STRING",
2024  /* 387 */ "typetoken ::= typename",
2025  /* 388 */ "typename ::= ID|STRING",
2026  /* 389 */ "signed ::= plus_num",
2027  /* 390 */ "signed ::= minus_num",
2028  /* 391 */ "carglist ::= carglist ccons",
2029  /* 392 */ "carglist ::=",
2030  /* 393 */ "ccons ::= NULL onconf",
2031  /* 394 */ "ccons ::= GENERATED ALWAYS AS generated",
2032  /* 395 */ "ccons ::= AS generated",
2033  /* 396 */ "conslist_opt ::= COMMA conslist",
2034  /* 397 */ "conslist ::= conslist tconscomma tcons",
2035  /* 398 */ "conslist ::= tcons",
2036  /* 399 */ "tconscomma ::=",
2037  /* 400 */ "defer_subclause_opt ::= defer_subclause",
2038  /* 401 */ "resolvetype ::= raisetype",
2039  /* 402 */ "selectnowith ::= oneselect",
2040  /* 403 */ "oneselect ::= values",
2041  /* 404 */ "sclp ::= selcollist COMMA",
2042  /* 405 */ "as ::= ID|STRING",
2043  /* 406 */ "indexed_opt ::= indexed_by",
2044  /* 407 */ "returning ::=",
2045  /* 408 */ "expr ::= term",
2046  /* 409 */ "likeop ::= LIKE_KW|MATCH",
2047  /* 410 */ "case_operand ::= expr",
2048  /* 411 */ "exprlist ::= nexprlist",
2049  /* 412 */ "nmnum ::= plus_num",
2050  /* 413 */ "nmnum ::= nm",
2051  /* 414 */ "nmnum ::= ON",
2052  /* 415 */ "nmnum ::= DELETE",
2053  /* 416 */ "nmnum ::= DEFAULT",
2054  /* 417 */ "plus_num ::= INTEGER|FLOAT",
2055  /* 418 */ "foreach_clause ::=",
2056  /* 419 */ "foreach_clause ::= FOR EACH ROW",
2057  /* 420 */ "trnm ::= nm",
2058  /* 421 */ "tridxby ::=",
2059  /* 422 */ "database_kw_opt ::= DATABASE",
2060  /* 423 */ "database_kw_opt ::=",
2061  /* 424 */ "kwcolumn_opt ::=",
2062  /* 425 */ "kwcolumn_opt ::= COLUMNKW",
2063  /* 426 */ "vtabarglist ::= vtabarg",
2064  /* 427 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
2065  /* 428 */ "vtabarg ::= vtabarg vtabargtoken",
2066  /* 429 */ "anylist ::=",
2067  /* 430 */ "anylist ::= anylist LP anylist RP",
2068  /* 431 */ "anylist ::= anylist ANY",
2069  /* 432 */ "with ::=",
2070  /* 433 */ "windowdefn_list ::= windowdefn",
2071  /* 434 */ "window ::= frame_opt",
2072 };
2073 #endif /* NDEBUG */
2074 
2075 
2076 #if YYSTACKDEPTH<=0
2077 /*
2078 ** Try to increase the size of the parser stack.  Return the number
2079 ** of errors.  Return 0 on success.
2080 */
yyGrowStack(yyParser * p)2081 static int yyGrowStack(yyParser *p){
2082   int newSize;
2083   int idx;
2084   yyStackEntry *pNew;
2085 
2086   newSize = p->yystksz*2 + 100;
2087   idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
2088   if( p->yystack==&p->yystk0 ){
2089     pNew = malloc(newSize*sizeof(pNew[0]));
2090     if( pNew ) pNew[0] = p->yystk0;
2091   }else{
2092     pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
2093   }
2094   if( pNew ){
2095     p->yystack = pNew;
2096     p->yytos = &p->yystack[idx];
2097 #ifndef NDEBUG
2098     if( yyTraceFILE ){
2099       fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
2100               yyTracePrompt, p->yystksz, newSize);
2101     }
2102 #endif
2103     p->yystksz = newSize;
2104   }
2105   return pNew==0;
2106 }
2107 #endif
2108 
2109 /* Datatype of the argument to the memory allocated passed as the
2110 ** second argument to PerfettoSqlParseAlloc() below.  This can be changed by
2111 ** putting an appropriate #define in the %include section of the input
2112 ** grammar.
2113 */
2114 #ifndef YYMALLOCARGTYPE
2115 # define YYMALLOCARGTYPE size_t
2116 #endif
2117 
2118 /* Initialize a new parser that has already been allocated.
2119 */
PerfettoSqlParseInit(void * yypRawParser PerfettoSqlParseCTX_PDECL)2120 void PerfettoSqlParseInit(void *yypRawParser PerfettoSqlParseCTX_PDECL){
2121   yyParser *yypParser = (yyParser*)yypRawParser;
2122   PerfettoSqlParseCTX_STORE
2123 #ifdef YYTRACKMAXSTACKDEPTH
2124   yypParser->yyhwm = 0;
2125 #endif
2126 #if YYSTACKDEPTH<=0
2127   yypParser->yytos = NULL;
2128   yypParser->yystack = NULL;
2129   yypParser->yystksz = 0;
2130   if( yyGrowStack(yypParser) ){
2131     yypParser->yystack = &yypParser->yystk0;
2132     yypParser->yystksz = 1;
2133   }
2134 #endif
2135 #ifndef YYNOERRORRECOVERY
2136   yypParser->yyerrcnt = -1;
2137 #endif
2138   yypParser->yytos = yypParser->yystack;
2139   yypParser->yystack[0].stateno = 0;
2140   yypParser->yystack[0].major = 0;
2141 #if YYSTACKDEPTH>0
2142   yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
2143 #endif
2144 }
2145 
2146 #ifndef PerfettoSqlParse_ENGINEALWAYSONSTACK
2147 /*
2148 ** This function allocates a new parser.
2149 ** The only argument is a pointer to a function which works like
2150 ** malloc.
2151 **
2152 ** Inputs:
2153 ** A pointer to the function used to allocate memory.
2154 **
2155 ** Outputs:
2156 ** A pointer to a parser.  This pointer is used in subsequent calls
2157 ** to PerfettoSqlParse and PerfettoSqlParseFree.
2158 */
PerfettoSqlParseAlloc(void * (* mallocProc)(YYMALLOCARGTYPE)PerfettoSqlParseCTX_PDECL)2159 void *PerfettoSqlParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) PerfettoSqlParseCTX_PDECL){
2160   yyParser *yypParser;
2161   yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
2162   if( yypParser ){
2163     PerfettoSqlParseCTX_STORE
2164     PerfettoSqlParseInit(yypParser PerfettoSqlParseCTX_PARAM);
2165   }
2166   return (void*)yypParser;
2167 }
2168 #endif /* PerfettoSqlParse_ENGINEALWAYSONSTACK */
2169 
2170 
2171 /* The following function deletes the "minor type" or semantic value
2172 ** associated with a symbol.  The symbol can be either a terminal
2173 ** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
2174 ** a pointer to the value to be deleted.  The code used to do the
2175 ** deletions is derived from the %destructor and/or %token_destructor
2176 ** directives of the input grammar.
2177 */
yy_destructor(yyParser * yypParser,YYCODETYPE yymajor,YYMINORTYPE * yypminor)2178 static void yy_destructor(
2179   yyParser *yypParser,    /* The parser */
2180   YYCODETYPE yymajor,     /* Type code for object to destroy */
2181   YYMINORTYPE *yypminor   /* The object to be destroyed */
2182 ){
2183   PerfettoSqlParseARG_FETCH
2184   PerfettoSqlParseCTX_FETCH
2185   switch( yymajor ){
2186     /* Here is inserted the actions which take place when a
2187     ** terminal or non-terminal is destroyed.  This can happen
2188     ** when the symbol is popped from the stack during a
2189     ** reduce or during error processing or when a parser is
2190     ** being destroyed before it is finished parsing.
2191     **
2192     ** Note: during a reduce, the only symbols destroyed are those
2193     ** which appear on the RHS of the rule, but which are *not* used
2194     ** inside the C code.
2195     */
2196 /********* Begin destructor definitions ***************************************/
2197     case 176: /* sql_argument_list */
2198     case 177: /* sql_argument_list_nonempty */
2199     case 179: /* table_schema */
2200 {
2201  OnPerfettoSqlFreeArgumentList(state, (yypminor->yy208));
2202 }
2203       break;
2204     case 182: /* return_type */
2205 {
2206  OnPerfettoSqlFnFreeReturnType(state, (yypminor->yy355));
2207 }
2208       break;
2209     case 184: /* indexed_column_list */
2210 {
2211  OnPerfettoSqlFreeIndexedColumnList(state, (yypminor->yy368));
2212 }
2213       break;
2214     case 185: /* macro_argument_list */
2215     case 187: /* macro_argument_list_nonempty */
2216 {
2217  OnPerfettoSqlFreeMacroArgumentList(state, (yypminor->yy526));
2218 }
2219       break;
2220 /********* End destructor definitions *****************************************/
2221     default:  break;   /* If no destructor action specified: do nothing */
2222   }
2223 }
2224 
2225 /*
2226 ** Pop the parser's stack once.
2227 **
2228 ** If there is a destructor routine associated with the token which
2229 ** is popped from the stack, then call it.
2230 */
yy_pop_parser_stack(yyParser * pParser)2231 static void yy_pop_parser_stack(yyParser *pParser){
2232   yyStackEntry *yytos;
2233   assert( pParser->yytos!=0 );
2234   assert( pParser->yytos > pParser->yystack );
2235   yytos = pParser->yytos--;
2236 #ifndef NDEBUG
2237   if( yyTraceFILE ){
2238     fprintf(yyTraceFILE,"%sPopping %s\n",
2239       yyTracePrompt,
2240       yyTokenName[yytos->major]);
2241   }
2242 #endif
2243   yy_destructor(pParser, yytos->major, &yytos->minor);
2244 }
2245 
2246 /*
2247 ** Clear all secondary memory allocations from the parser
2248 */
PerfettoSqlParseFinalize(void * p)2249 void PerfettoSqlParseFinalize(void *p){
2250   yyParser *pParser = (yyParser*)p;
2251   while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
2252 #if YYSTACKDEPTH<=0
2253   if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2254 #endif
2255 }
2256 
2257 #ifndef PerfettoSqlParse_ENGINEALWAYSONSTACK
2258 /*
2259 ** Deallocate and destroy a parser.  Destructors are called for
2260 ** all stack elements before shutting the parser down.
2261 **
2262 ** If the YYPARSEFREENEVERNULL macro exists (for example because it
2263 ** is defined in a %include section of the input grammar) then it is
2264 ** assumed that the input pointer is never NULL.
2265 */
PerfettoSqlParseFree(void * p,void (* freeProc)(void *))2266 void PerfettoSqlParseFree(
2267   void *p,                    /* The parser to be deleted */
2268   void (*freeProc)(void*)     /* Function used to reclaim memory */
2269 ){
2270 #ifndef YYPARSEFREENEVERNULL
2271   if( p==0 ) return;
2272 #endif
2273   PerfettoSqlParseFinalize(p);
2274   (*freeProc)(p);
2275 }
2276 #endif /* PerfettoSqlParse_ENGINEALWAYSONSTACK */
2277 
2278 /*
2279 ** Return the peak depth of the stack for a parser.
2280 */
2281 #ifdef YYTRACKMAXSTACKDEPTH
PerfettoSqlParseStackPeak(void * p)2282 int PerfettoSqlParseStackPeak(void *p){
2283   yyParser *pParser = (yyParser*)p;
2284   return pParser->yyhwm;
2285 }
2286 #endif
2287 
2288 /* This array of booleans keeps track of the parser statement
2289 ** coverage.  The element yycoverage[X][Y] is set when the parser
2290 ** is in state X and has a lookahead token Y.  In a well-tested
2291 ** systems, every element of this matrix should end up being set.
2292 */
2293 #if defined(YYCOVERAGE)
2294 static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
2295 #endif
2296 
2297 /*
2298 ** Write into out a description of every state/lookahead combination that
2299 **
2300 **   (1)  has not been used by the parser, and
2301 **   (2)  is not a syntax error.
2302 **
2303 ** Return the number of missed state/lookahead combinations.
2304 */
2305 #if defined(YYCOVERAGE)
PerfettoSqlParseCoverage(FILE * out)2306 int PerfettoSqlParseCoverage(FILE *out){
2307   int stateno, iLookAhead, i;
2308   int nMissed = 0;
2309   for(stateno=0; stateno<YYNSTATE; stateno++){
2310     i = yy_shift_ofst[stateno];
2311     for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
2312       if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
2313       if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
2314       if( out ){
2315         fprintf(out,"State %d lookahead %s %s\n", stateno,
2316                 yyTokenName[iLookAhead],
2317                 yycoverage[stateno][iLookAhead] ? "ok" : "missed");
2318       }
2319     }
2320   }
2321   return nMissed;
2322 }
2323 #endif
2324 
2325 /*
2326 ** Find the appropriate action for a parser given the terminal
2327 ** look-ahead token iLookAhead.
2328 */
yy_find_shift_action(YYCODETYPE iLookAhead,YYACTIONTYPE stateno)2329 static YYACTIONTYPE yy_find_shift_action(
2330   YYCODETYPE iLookAhead,    /* The look-ahead token */
2331   YYACTIONTYPE stateno      /* Current state number */
2332 ){
2333   int i;
2334 
2335   if( stateno>YY_MAX_SHIFT ) return stateno;
2336   assert( stateno <= YY_SHIFT_COUNT );
2337 #if defined(YYCOVERAGE)
2338   yycoverage[stateno][iLookAhead] = 1;
2339 #endif
2340   do{
2341     i = yy_shift_ofst[stateno];
2342     assert( i>=0 );
2343     assert( i<=YY_ACTTAB_COUNT );
2344     assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
2345     assert( iLookAhead!=YYNOCODE );
2346     assert( iLookAhead < YYNTOKEN );
2347     i += iLookAhead;
2348     assert( i<(int)YY_NLOOKAHEAD );
2349     if( yy_lookahead[i]!=iLookAhead ){
2350 #ifdef YYFALLBACK
2351       YYCODETYPE iFallback;            /* Fallback token */
2352       assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
2353       iFallback = yyFallback[iLookAhead];
2354       if( iFallback!=0 ){
2355 #ifndef NDEBUG
2356         if( yyTraceFILE ){
2357           fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
2358              yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
2359         }
2360 #endif
2361         assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
2362         iLookAhead = iFallback;
2363         continue;
2364       }
2365 #endif
2366 #ifdef YYWILDCARD
2367       {
2368         int j = i - iLookAhead + YYWILDCARD;
2369         assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
2370         if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
2371 #ifndef NDEBUG
2372           if( yyTraceFILE ){
2373             fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
2374                yyTracePrompt, yyTokenName[iLookAhead],
2375                yyTokenName[YYWILDCARD]);
2376           }
2377 #endif /* NDEBUG */
2378           return yy_action[j];
2379         }
2380       }
2381 #endif /* YYWILDCARD */
2382       return yy_default[stateno];
2383     }else{
2384       assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
2385       return yy_action[i];
2386     }
2387   }while(1);
2388 }
2389 
2390 /*
2391 ** Find the appropriate action for a parser given the non-terminal
2392 ** look-ahead token iLookAhead.
2393 */
yy_find_reduce_action(YYACTIONTYPE stateno,YYCODETYPE iLookAhead)2394 static YYACTIONTYPE yy_find_reduce_action(
2395   YYACTIONTYPE stateno,     /* Current state number */
2396   YYCODETYPE iLookAhead     /* The look-ahead token */
2397 ){
2398   int i;
2399 #ifdef YYERRORSYMBOL
2400   if( stateno>YY_REDUCE_COUNT ){
2401     return yy_default[stateno];
2402   }
2403 #else
2404   assert( stateno<=YY_REDUCE_COUNT );
2405 #endif
2406   i = yy_reduce_ofst[stateno];
2407   assert( iLookAhead!=YYNOCODE );
2408   i += iLookAhead;
2409 #ifdef YYERRORSYMBOL
2410   if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
2411     return yy_default[stateno];
2412   }
2413 #else
2414   assert( i>=0 && i<YY_ACTTAB_COUNT );
2415   assert( yy_lookahead[i]==iLookAhead );
2416 #endif
2417   return yy_action[i];
2418 }
2419 
2420 /*
2421 ** The following routine is called if the stack overflows.
2422 */
yyStackOverflow(yyParser * yypParser)2423 static void yyStackOverflow(yyParser *yypParser){
2424    PerfettoSqlParseARG_FETCH
2425    PerfettoSqlParseCTX_FETCH
2426 #ifndef NDEBUG
2427    if( yyTraceFILE ){
2428      fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
2429    }
2430 #endif
2431    while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
2432    /* Here code is inserted which will execute if the parser
2433    ** stack every overflows */
2434 /******** Begin %stack_overflow code ******************************************/
2435 /******** End %stack_overflow code ********************************************/
2436    PerfettoSqlParseARG_STORE /* Suppress warning about unused %extra_argument var */
2437    PerfettoSqlParseCTX_STORE
2438 }
2439 
2440 /*
2441 ** Print tracing information for a SHIFT action
2442 */
2443 #ifndef NDEBUG
yyTraceShift(yyParser * yypParser,int yyNewState,const char * zTag)2444 static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
2445   if( yyTraceFILE ){
2446     if( yyNewState<YYNSTATE ){
2447       fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
2448          yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
2449          yyNewState);
2450     }else{
2451       fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
2452          yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
2453          yyNewState - YY_MIN_REDUCE);
2454     }
2455   }
2456 }
2457 #else
2458 # define yyTraceShift(X,Y,Z)
2459 #endif
2460 
2461 /*
2462 ** Perform a shift action.
2463 */
yy_shift(yyParser * yypParser,YYACTIONTYPE yyNewState,YYCODETYPE yyMajor,PerfettoSqlParseTOKENTYPE yyMinor)2464 static void yy_shift(
2465   yyParser *yypParser,          /* The parser to be shifted */
2466   YYACTIONTYPE yyNewState,      /* The new state to shift in */
2467   YYCODETYPE yyMajor,           /* The major token to shift in */
2468   PerfettoSqlParseTOKENTYPE yyMinor        /* The minor token to shift in */
2469 ){
2470   yyStackEntry *yytos;
2471   yypParser->yytos++;
2472 #ifdef YYTRACKMAXSTACKDEPTH
2473   if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
2474     yypParser->yyhwm++;
2475     assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
2476   }
2477 #endif
2478 #if YYSTACKDEPTH>0
2479   if( yypParser->yytos>yypParser->yystackEnd ){
2480     yypParser->yytos--;
2481     yyStackOverflow(yypParser);
2482     return;
2483   }
2484 #else
2485   if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
2486     if( yyGrowStack(yypParser) ){
2487       yypParser->yytos--;
2488       yyStackOverflow(yypParser);
2489       return;
2490     }
2491   }
2492 #endif
2493   if( yyNewState > YY_MAX_SHIFT ){
2494     yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
2495   }
2496   yytos = yypParser->yytos;
2497   yytos->stateno = yyNewState;
2498   yytos->major = yyMajor;
2499   yytos->minor.yy0 = yyMinor;
2500   yyTraceShift(yypParser, yyNewState, "Shift");
2501 }
2502 
2503 /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
2504 ** of that rule */
2505 static const YYCODETYPE yyRuleInfoLhs[] = {
2506    175,  /* (0) pscantok ::= */
2507    176,  /* (1) sql_argument_list ::= */
2508    176,  /* (2) sql_argument_list ::= sql_argument_list_nonempty */
2509    178,  /* (3) sql_argument_type ::= ID */
2510    178,  /* (4) sql_argument_type ::= ID LP ID DOT ID RP */
2511    177,  /* (5) sql_argument_list_nonempty ::= sql_argument_list_nonempty COMMA ID sql_argument_type */
2512    177,  /* (6) sql_argument_list_nonempty ::= ID sql_argument_type */
2513    179,  /* (7) table_schema ::= */
2514    179,  /* (8) table_schema ::= LP sql_argument_list_nonempty RP */
2515    180,  /* (9) or_replace ::= */
2516    180,  /* (10) or_replace ::= OR REPLACE */
2517    181,  /* (11) cmd ::= CREATE or_replace PERFETTO FUNCTION ID LP sql_argument_list RP RETURNS return_type AS select pscantok */
2518    182,  /* (12) return_type ::= ID */
2519    182,  /* (13) return_type ::= TABLE LP sql_argument_list_nonempty RP */
2520    181,  /* (14) cmd ::= CREATE or_replace PERFETTO TABLE ID table_schema AS select pscantok */
2521    181,  /* (15) cmd ::= CREATE or_replace PERFETTO VIEW ID table_schema AS select pscantok */
2522    181,  /* (16) cmd ::= CREATE or_replace PERFETTO INDEX ID ON ID LP indexed_column_list RP */
2523    184,  /* (17) indexed_column_list ::= indexed_column_list COMMA ID */
2524    184,  /* (18) indexed_column_list ::= ID */
2525    181,  /* (19) cmd ::= CREATE or_replace PERFETTO MACRO ID LP macro_argument_list RP RETURNS ID AS macro_body pscantok */
2526    187,  /* (20) macro_argument_list_nonempty ::= macro_argument_list_nonempty COMMA ID ID */
2527    187,  /* (21) macro_argument_list_nonempty ::= ID ID */
2528    185,  /* (22) macro_argument_list ::= */
2529    185,  /* (23) macro_argument_list ::= macro_argument_list_nonempty */
2530    181,  /* (24) cmd ::= INCLUDE PERFETTO MODULE module_name */
2531    188,  /* (25) module_name ::= ID|STAR|INTERSECT */
2532    188,  /* (26) module_name ::= module_name DOT ID|STAR|INTERSECT */
2533    181,  /* (27) cmd ::= DROP PERFETTO INDEX ID ON ID */
2534    186,  /* (28) macro_body ::= ANY */
2535    186,  /* (29) macro_body ::= macro_body ANY */
2536    189,  /* (30) explain ::= EXPLAIN */
2537    189,  /* (31) explain ::= EXPLAIN QUERY PLAN */
2538    190,  /* (32) cmdx ::= cmd */
2539    181,  /* (33) cmd ::= BEGIN transtype trans_opt */
2540    191,  /* (34) transtype ::= */
2541    191,  /* (35) transtype ::= DEFERRED */
2542    191,  /* (36) transtype ::= IMMEDIATE */
2543    191,  /* (37) transtype ::= EXCLUSIVE */
2544    181,  /* (38) cmd ::= COMMIT|END trans_opt */
2545    181,  /* (39) cmd ::= ROLLBACK trans_opt */
2546    181,  /* (40) cmd ::= SAVEPOINT nm */
2547    181,  /* (41) cmd ::= RELEASE savepoint_opt nm */
2548    181,  /* (42) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
2549    195,  /* (43) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
2550    196,  /* (44) createkw ::= CREATE */
2551    198,  /* (45) ifnotexists ::= */
2552    198,  /* (46) ifnotexists ::= IF NOT EXISTS */
2553    197,  /* (47) temp ::= TEMP */
2554    197,  /* (48) temp ::= */
2555    200,  /* (49) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
2556    200,  /* (50) create_table_args ::= AS select */
2557    203,  /* (51) table_option_set ::= */
2558    203,  /* (52) table_option_set ::= table_option_set COMMA table_option */
2559    204,  /* (53) table_option ::= WITHOUT nm */
2560    204,  /* (54) table_option ::= nm */
2561    205,  /* (55) columnname ::= nm typetoken */
2562    206,  /* (56) typetoken ::= */
2563    206,  /* (57) typetoken ::= typename LP signed RP */
2564    206,  /* (58) typetoken ::= typename LP signed COMMA signed RP */
2565    207,  /* (59) typename ::= typename ID|STRING */
2566    209,  /* (60) scanpt ::= */
2567    210,  /* (61) scantok ::= */
2568    211,  /* (62) ccons ::= CONSTRAINT nm */
2569    211,  /* (63) ccons ::= DEFAULT scantok term */
2570    211,  /* (64) ccons ::= DEFAULT LP expr RP */
2571    211,  /* (65) ccons ::= DEFAULT PLUS scantok term */
2572    211,  /* (66) ccons ::= DEFAULT MINUS scantok term */
2573    211,  /* (67) ccons ::= DEFAULT scantok ID|INDEXED */
2574    211,  /* (68) ccons ::= NOT NULL onconf */
2575    211,  /* (69) ccons ::= PRIMARY KEY sortorder onconf autoinc */
2576    211,  /* (70) ccons ::= UNIQUE onconf */
2577    211,  /* (71) ccons ::= CHECK LP expr RP */
2578    211,  /* (72) ccons ::= REFERENCES nm eidlist_opt refargs */
2579    211,  /* (73) ccons ::= defer_subclause */
2580    211,  /* (74) ccons ::= COLLATE ID|STRING */
2581    220,  /* (75) generated ::= LP expr RP */
2582    220,  /* (76) generated ::= LP expr RP ID */
2583    216,  /* (77) autoinc ::= */
2584    216,  /* (78) autoinc ::= AUTOINCR */
2585    218,  /* (79) refargs ::= */
2586    218,  /* (80) refargs ::= refargs refarg */
2587    221,  /* (81) refarg ::= MATCH nm */
2588    221,  /* (82) refarg ::= ON INSERT refact */
2589    221,  /* (83) refarg ::= ON DELETE refact */
2590    221,  /* (84) refarg ::= ON UPDATE refact */
2591    222,  /* (85) refact ::= SET NULL */
2592    222,  /* (86) refact ::= SET DEFAULT */
2593    222,  /* (87) refact ::= CASCADE */
2594    222,  /* (88) refact ::= RESTRICT */
2595    222,  /* (89) refact ::= NO ACTION */
2596    219,  /* (90) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
2597    219,  /* (91) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
2598    223,  /* (92) init_deferred_pred_opt ::= */
2599    223,  /* (93) init_deferred_pred_opt ::= INITIALLY DEFERRED */
2600    223,  /* (94) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
2601    202,  /* (95) conslist_opt ::= */
2602    224,  /* (96) tconscomma ::= COMMA */
2603    225,  /* (97) tcons ::= CONSTRAINT nm */
2604    225,  /* (98) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
2605    225,  /* (99) tcons ::= UNIQUE LP sortlist RP onconf */
2606    225,  /* (100) tcons ::= CHECK LP expr RP onconf */
2607    225,  /* (101) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
2608    228,  /* (102) defer_subclause_opt ::= */
2609    214,  /* (103) onconf ::= */
2610    214,  /* (104) onconf ::= ON CONFLICT resolvetype */
2611    230,  /* (105) orconf ::= */
2612    230,  /* (106) orconf ::= OR resolvetype */
2613    229,  /* (107) resolvetype ::= IGNORE */
2614    229,  /* (108) resolvetype ::= REPLACE */
2615    181,  /* (109) cmd ::= DROP TABLE ifexists fullname */
2616    231,  /* (110) ifexists ::= IF EXISTS */
2617    231,  /* (111) ifexists ::= */
2618    181,  /* (112) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
2619    181,  /* (113) cmd ::= DROP VIEW ifexists fullname */
2620    181,  /* (114) cmd ::= select */
2621    183,  /* (115) select ::= WITH wqlist selectnowith */
2622    183,  /* (116) select ::= WITH RECURSIVE wqlist selectnowith */
2623    183,  /* (117) select ::= selectnowith */
2624    234,  /* (118) selectnowith ::= selectnowith multiselect_op oneselect */
2625    235,  /* (119) multiselect_op ::= UNION */
2626    235,  /* (120) multiselect_op ::= UNION ALL */
2627    235,  /* (121) multiselect_op ::= EXCEPT|INTERSECT */
2628    236,  /* (122) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
2629    236,  /* (123) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
2630    246,  /* (124) values ::= VALUES LP nexprlist RP */
2631    246,  /* (125) values ::= values COMMA LP nexprlist RP */
2632    237,  /* (126) distinct ::= DISTINCT */
2633    237,  /* (127) distinct ::= ALL */
2634    237,  /* (128) distinct ::= */
2635    248,  /* (129) sclp ::= */
2636    238,  /* (130) selcollist ::= sclp scanpt expr scanpt as */
2637    238,  /* (131) selcollist ::= sclp scanpt STAR */
2638    238,  /* (132) selcollist ::= sclp scanpt nm DOT STAR */
2639    249,  /* (133) as ::= AS nm */
2640    249,  /* (134) as ::= */
2641    239,  /* (135) from ::= */
2642    239,  /* (136) from ::= FROM seltablist */
2643    251,  /* (137) stl_prefix ::= seltablist joinop */
2644    251,  /* (138) stl_prefix ::= */
2645    250,  /* (139) seltablist ::= stl_prefix nm dbnm as on_using */
2646    250,  /* (140) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
2647    250,  /* (141) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
2648    250,  /* (142) seltablist ::= stl_prefix LP select RP as on_using */
2649    250,  /* (143) seltablist ::= stl_prefix LP seltablist RP as on_using */
2650    199,  /* (144) dbnm ::= */
2651    199,  /* (145) dbnm ::= DOT nm */
2652    232,  /* (146) fullname ::= nm */
2653    232,  /* (147) fullname ::= nm DOT nm */
2654    256,  /* (148) xfullname ::= nm */
2655    256,  /* (149) xfullname ::= nm DOT nm */
2656    256,  /* (150) xfullname ::= nm DOT nm AS nm */
2657    256,  /* (151) xfullname ::= nm AS nm */
2658    252,  /* (152) joinop ::= COMMA|JOIN */
2659    252,  /* (153) joinop ::= JOIN_KW JOIN */
2660    252,  /* (154) joinop ::= JOIN_KW nm JOIN */
2661    252,  /* (155) joinop ::= JOIN_KW nm nm JOIN */
2662    253,  /* (156) on_using ::= ON expr */
2663    253,  /* (157) on_using ::= USING LP idlist RP */
2664    253,  /* (158) on_using ::= */
2665    258,  /* (159) indexed_opt ::= */
2666    254,  /* (160) indexed_by ::= INDEXED BY nm */
2667    254,  /* (161) indexed_by ::= NOT INDEXED */
2668    243,  /* (162) orderby_opt ::= */
2669    243,  /* (163) orderby_opt ::= ORDER BY sortlist */
2670    226,  /* (164) sortlist ::= sortlist COMMA expr sortorder nulls */
2671    226,  /* (165) sortlist ::= expr sortorder nulls */
2672    215,  /* (166) sortorder ::= ASC */
2673    215,  /* (167) sortorder ::= DESC */
2674    215,  /* (168) sortorder ::= */
2675    259,  /* (169) nulls ::= NULLS FIRST */
2676    259,  /* (170) nulls ::= NULLS LAST */
2677    259,  /* (171) nulls ::= */
2678    241,  /* (172) groupby_opt ::= */
2679    241,  /* (173) groupby_opt ::= GROUP BY nexprlist */
2680    242,  /* (174) having_opt ::= */
2681    242,  /* (175) having_opt ::= HAVING expr */
2682    244,  /* (176) limit_opt ::= */
2683    244,  /* (177) limit_opt ::= LIMIT expr */
2684    244,  /* (178) limit_opt ::= LIMIT expr OFFSET expr */
2685    244,  /* (179) limit_opt ::= LIMIT expr COMMA expr */
2686    181,  /* (180) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
2687    240,  /* (181) where_opt ::= */
2688    240,  /* (182) where_opt ::= WHERE expr */
2689    261,  /* (183) where_opt_ret ::= */
2690    261,  /* (184) where_opt_ret ::= WHERE expr */
2691    261,  /* (185) where_opt_ret ::= RETURNING selcollist */
2692    261,  /* (186) where_opt_ret ::= WHERE expr RETURNING selcollist */
2693    181,  /* (187) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
2694    262,  /* (188) setlist ::= setlist COMMA nm EQ expr */
2695    262,  /* (189) setlist ::= setlist COMMA LP idlist RP EQ expr */
2696    262,  /* (190) setlist ::= nm EQ expr */
2697    262,  /* (191) setlist ::= LP idlist RP EQ expr */
2698    181,  /* (192) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
2699    181,  /* (193) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
2700    265,  /* (194) upsert ::= */
2701    265,  /* (195) upsert ::= RETURNING selcollist */
2702    265,  /* (196) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
2703    265,  /* (197) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
2704    265,  /* (198) upsert ::= ON CONFLICT DO NOTHING returning */
2705    265,  /* (199) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
2706    266,  /* (200) returning ::= RETURNING selcollist */
2707    263,  /* (201) insert_cmd ::= INSERT orconf */
2708    263,  /* (202) insert_cmd ::= REPLACE */
2709    264,  /* (203) idlist_opt ::= */
2710    264,  /* (204) idlist_opt ::= LP idlist RP */
2711    257,  /* (205) idlist ::= idlist COMMA nm */
2712    257,  /* (206) idlist ::= nm */
2713    213,  /* (207) expr ::= LP expr RP */
2714    213,  /* (208) expr ::= ID|INDEXED|JOIN_KW */
2715    213,  /* (209) expr ::= nm DOT nm */
2716    213,  /* (210) expr ::= nm DOT nm DOT nm */
2717    212,  /* (211) term ::= NULL|FLOAT|BLOB */
2718    212,  /* (212) term ::= STRING */
2719    212,  /* (213) term ::= INTEGER */
2720    213,  /* (214) expr ::= VARIABLE */
2721    213,  /* (215) expr ::= expr COLLATE ID|STRING */
2722    213,  /* (216) expr ::= CAST LP expr AS typetoken RP */
2723    213,  /* (217) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
2724    213,  /* (218) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
2725    213,  /* (219) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
2726    213,  /* (220) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
2727    213,  /* (221) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
2728    213,  /* (222) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
2729    212,  /* (223) term ::= CTIME_KW */
2730    213,  /* (224) expr ::= LP nexprlist COMMA expr RP */
2731    213,  /* (225) expr ::= expr AND expr */
2732    213,  /* (226) expr ::= expr OR expr */
2733    213,  /* (227) expr ::= expr LT|GT|GE|LE expr */
2734    213,  /* (228) expr ::= expr EQ|NE expr */
2735    213,  /* (229) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
2736    213,  /* (230) expr ::= expr PLUS|MINUS expr */
2737    213,  /* (231) expr ::= expr STAR|SLASH|REM expr */
2738    213,  /* (232) expr ::= expr CONCAT expr */
2739    268,  /* (233) likeop ::= NOT LIKE_KW|MATCH */
2740    213,  /* (234) expr ::= expr likeop expr */
2741    213,  /* (235) expr ::= expr likeop expr ESCAPE expr */
2742    213,  /* (236) expr ::= expr ISNULL|NOTNULL */
2743    213,  /* (237) expr ::= expr NOT NULL */
2744    213,  /* (238) expr ::= expr IS expr */
2745    213,  /* (239) expr ::= expr IS NOT expr */
2746    213,  /* (240) expr ::= expr IS NOT DISTINCT FROM expr */
2747    213,  /* (241) expr ::= expr IS DISTINCT FROM expr */
2748    213,  /* (242) expr ::= NOT expr */
2749    213,  /* (243) expr ::= BITNOT expr */
2750    213,  /* (244) expr ::= PLUS|MINUS expr */
2751    213,  /* (245) expr ::= expr PTR expr */
2752    269,  /* (246) between_op ::= BETWEEN */
2753    269,  /* (247) between_op ::= NOT BETWEEN */
2754    213,  /* (248) expr ::= expr between_op expr AND expr */
2755    270,  /* (249) in_op ::= IN */
2756    270,  /* (250) in_op ::= NOT IN */
2757    213,  /* (251) expr ::= expr in_op LP exprlist RP */
2758    213,  /* (252) expr ::= LP select RP */
2759    213,  /* (253) expr ::= expr in_op LP select RP */
2760    213,  /* (254) expr ::= expr in_op nm dbnm paren_exprlist */
2761    213,  /* (255) expr ::= EXISTS LP select RP */
2762    213,  /* (256) expr ::= CASE case_operand case_exprlist case_else END */
2763    273,  /* (257) case_exprlist ::= case_exprlist WHEN expr THEN expr */
2764    273,  /* (258) case_exprlist ::= WHEN expr THEN expr */
2765    274,  /* (259) case_else ::= ELSE expr */
2766    274,  /* (260) case_else ::= */
2767    272,  /* (261) case_operand ::= */
2768    255,  /* (262) exprlist ::= */
2769    247,  /* (263) nexprlist ::= nexprlist COMMA expr */
2770    247,  /* (264) nexprlist ::= expr */
2771    271,  /* (265) paren_exprlist ::= */
2772    271,  /* (266) paren_exprlist ::= LP exprlist RP */
2773    181,  /* (267) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
2774    275,  /* (268) uniqueflag ::= UNIQUE */
2775    275,  /* (269) uniqueflag ::= */
2776    217,  /* (270) eidlist_opt ::= */
2777    217,  /* (271) eidlist_opt ::= LP eidlist RP */
2778    227,  /* (272) eidlist ::= eidlist COMMA nm collate sortorder */
2779    227,  /* (273) eidlist ::= nm collate sortorder */
2780    276,  /* (274) collate ::= */
2781    276,  /* (275) collate ::= COLLATE ID|STRING */
2782    181,  /* (276) cmd ::= DROP INDEX ifexists fullname */
2783    181,  /* (277) cmd ::= VACUUM vinto */
2784    181,  /* (278) cmd ::= VACUUM nm vinto */
2785    277,  /* (279) vinto ::= INTO expr */
2786    277,  /* (280) vinto ::= */
2787    181,  /* (281) cmd ::= PRAGMA nm dbnm */
2788    181,  /* (282) cmd ::= PRAGMA nm dbnm EQ nmnum */
2789    181,  /* (283) cmd ::= PRAGMA nm dbnm LP nmnum RP */
2790    181,  /* (284) cmd ::= PRAGMA nm dbnm EQ minus_num */
2791    181,  /* (285) cmd ::= PRAGMA nm dbnm LP minus_num RP */
2792    280,  /* (286) plus_num ::= PLUS INTEGER|FLOAT */
2793    279,  /* (287) minus_num ::= MINUS INTEGER|FLOAT */
2794    181,  /* (288) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
2795    281,  /* (289) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
2796    283,  /* (290) trigger_time ::= BEFORE|AFTER */
2797    283,  /* (291) trigger_time ::= INSTEAD OF */
2798    283,  /* (292) trigger_time ::= */
2799    284,  /* (293) trigger_event ::= DELETE|INSERT */
2800    284,  /* (294) trigger_event ::= UPDATE */
2801    284,  /* (295) trigger_event ::= UPDATE OF idlist */
2802    286,  /* (296) when_clause ::= */
2803    286,  /* (297) when_clause ::= WHEN expr */
2804    282,  /* (298) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
2805    282,  /* (299) trigger_cmd_list ::= trigger_cmd SEMI */
2806    288,  /* (300) trnm ::= nm DOT nm */
2807    289,  /* (301) tridxby ::= INDEXED BY nm */
2808    289,  /* (302) tridxby ::= NOT INDEXED */
2809    287,  /* (303) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
2810    287,  /* (304) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
2811    287,  /* (305) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
2812    287,  /* (306) trigger_cmd ::= scanpt select scanpt */
2813    213,  /* (307) expr ::= RAISE LP IGNORE RP */
2814    213,  /* (308) expr ::= RAISE LP raisetype COMMA nm RP */
2815    290,  /* (309) raisetype ::= ROLLBACK */
2816    290,  /* (310) raisetype ::= ABORT */
2817    290,  /* (311) raisetype ::= FAIL */
2818    181,  /* (312) cmd ::= DROP TRIGGER ifexists fullname */
2819    181,  /* (313) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
2820    181,  /* (314) cmd ::= DETACH database_kw_opt expr */
2821    292,  /* (315) key_opt ::= */
2822    292,  /* (316) key_opt ::= KEY expr */
2823    181,  /* (317) cmd ::= REINDEX */
2824    181,  /* (318) cmd ::= REINDEX nm dbnm */
2825    181,  /* (319) cmd ::= ANALYZE */
2826    181,  /* (320) cmd ::= ANALYZE nm dbnm */
2827    181,  /* (321) cmd ::= ALTER TABLE fullname RENAME TO nm */
2828    181,  /* (322) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
2829    181,  /* (323) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
2830    293,  /* (324) add_column_fullname ::= fullname */
2831    181,  /* (325) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
2832    181,  /* (326) cmd ::= create_vtab */
2833    181,  /* (327) cmd ::= create_vtab LP vtabarglist RP */
2834    296,  /* (328) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
2835    298,  /* (329) vtabarg ::= */
2836    299,  /* (330) vtabargtoken ::= ANY */
2837    299,  /* (331) vtabargtoken ::= lp anylist RP */
2838    300,  /* (332) lp ::= LP */
2839    260,  /* (333) with ::= WITH wqlist */
2840    260,  /* (334) with ::= WITH RECURSIVE wqlist */
2841    302,  /* (335) wqas ::= AS */
2842    302,  /* (336) wqas ::= AS MATERIALIZED */
2843    302,  /* (337) wqas ::= AS NOT MATERIALIZED */
2844    303,  /* (338) wqitem ::= nm eidlist_opt wqas LP select RP */
2845    233,  /* (339) wqlist ::= wqitem */
2846    233,  /* (340) wqlist ::= wqlist COMMA wqitem */
2847    304,  /* (341) windowdefn_list ::= windowdefn_list COMMA windowdefn */
2848    305,  /* (342) windowdefn ::= nm AS LP window RP */
2849    306,  /* (343) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
2850    306,  /* (344) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
2851    306,  /* (345) window ::= ORDER BY sortlist frame_opt */
2852    306,  /* (346) window ::= nm ORDER BY sortlist frame_opt */
2853    306,  /* (347) window ::= nm frame_opt */
2854    307,  /* (348) frame_opt ::= */
2855    307,  /* (349) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
2856    307,  /* (350) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
2857    308,  /* (351) range_or_rows ::= RANGE|ROWS|GROUPS */
2858    309,  /* (352) frame_bound_s ::= frame_bound */
2859    309,  /* (353) frame_bound_s ::= UNBOUNDED PRECEDING */
2860    311,  /* (354) frame_bound_e ::= frame_bound */
2861    311,  /* (355) frame_bound_e ::= UNBOUNDED FOLLOWING */
2862    312,  /* (356) frame_bound ::= expr PRECEDING|FOLLOWING */
2863    312,  /* (357) frame_bound ::= CURRENT ROW */
2864    310,  /* (358) frame_exclude_opt ::= */
2865    310,  /* (359) frame_exclude_opt ::= EXCLUDE frame_exclude */
2866    313,  /* (360) frame_exclude ::= NO OTHERS */
2867    313,  /* (361) frame_exclude ::= CURRENT ROW */
2868    313,  /* (362) frame_exclude ::= GROUP|TIES */
2869    245,  /* (363) window_clause ::= WINDOW windowdefn_list */
2870    267,  /* (364) filter_over ::= filter_clause over_clause */
2871    267,  /* (365) filter_over ::= over_clause */
2872    267,  /* (366) filter_over ::= filter_clause */
2873    315,  /* (367) over_clause ::= OVER LP window RP */
2874    315,  /* (368) over_clause ::= OVER nm */
2875    314,  /* (369) filter_clause ::= FILTER LP WHERE expr RP */
2876    316,  /* (370) input ::= cmdlist */
2877    317,  /* (371) cmdlist ::= cmdlist ecmd */
2878    317,  /* (372) cmdlist ::= ecmd */
2879    318,  /* (373) ecmd ::= SEMI */
2880    318,  /* (374) ecmd ::= cmdx SEMI */
2881    318,  /* (375) ecmd ::= explain cmdx SEMI */
2882    192,  /* (376) trans_opt ::= */
2883    192,  /* (377) trans_opt ::= TRANSACTION */
2884    192,  /* (378) trans_opt ::= TRANSACTION nm */
2885    194,  /* (379) savepoint_opt ::= SAVEPOINT */
2886    194,  /* (380) savepoint_opt ::= */
2887    181,  /* (381) cmd ::= create_table create_table_args */
2888    203,  /* (382) table_option_set ::= table_option */
2889    201,  /* (383) columnlist ::= columnlist COMMA columnname carglist */
2890    201,  /* (384) columnlist ::= columnname carglist */
2891    193,  /* (385) nm ::= ID|INDEXED|JOIN_KW */
2892    193,  /* (386) nm ::= STRING */
2893    206,  /* (387) typetoken ::= typename */
2894    207,  /* (388) typename ::= ID|STRING */
2895    208,  /* (389) signed ::= plus_num */
2896    208,  /* (390) signed ::= minus_num */
2897    295,  /* (391) carglist ::= carglist ccons */
2898    295,  /* (392) carglist ::= */
2899    211,  /* (393) ccons ::= NULL onconf */
2900    211,  /* (394) ccons ::= GENERATED ALWAYS AS generated */
2901    211,  /* (395) ccons ::= AS generated */
2902    202,  /* (396) conslist_opt ::= COMMA conslist */
2903    319,  /* (397) conslist ::= conslist tconscomma tcons */
2904    319,  /* (398) conslist ::= tcons */
2905    224,  /* (399) tconscomma ::= */
2906    228,  /* (400) defer_subclause_opt ::= defer_subclause */
2907    229,  /* (401) resolvetype ::= raisetype */
2908    234,  /* (402) selectnowith ::= oneselect */
2909    236,  /* (403) oneselect ::= values */
2910    248,  /* (404) sclp ::= selcollist COMMA */
2911    249,  /* (405) as ::= ID|STRING */
2912    258,  /* (406) indexed_opt ::= indexed_by */
2913    266,  /* (407) returning ::= */
2914    213,  /* (408) expr ::= term */
2915    268,  /* (409) likeop ::= LIKE_KW|MATCH */
2916    272,  /* (410) case_operand ::= expr */
2917    255,  /* (411) exprlist ::= nexprlist */
2918    278,  /* (412) nmnum ::= plus_num */
2919    278,  /* (413) nmnum ::= nm */
2920    278,  /* (414) nmnum ::= ON */
2921    278,  /* (415) nmnum ::= DELETE */
2922    278,  /* (416) nmnum ::= DEFAULT */
2923    280,  /* (417) plus_num ::= INTEGER|FLOAT */
2924    285,  /* (418) foreach_clause ::= */
2925    285,  /* (419) foreach_clause ::= FOR EACH ROW */
2926    288,  /* (420) trnm ::= nm */
2927    289,  /* (421) tridxby ::= */
2928    291,  /* (422) database_kw_opt ::= DATABASE */
2929    291,  /* (423) database_kw_opt ::= */
2930    294,  /* (424) kwcolumn_opt ::= */
2931    294,  /* (425) kwcolumn_opt ::= COLUMNKW */
2932    297,  /* (426) vtabarglist ::= vtabarg */
2933    297,  /* (427) vtabarglist ::= vtabarglist COMMA vtabarg */
2934    298,  /* (428) vtabarg ::= vtabarg vtabargtoken */
2935    301,  /* (429) anylist ::= */
2936    301,  /* (430) anylist ::= anylist LP anylist RP */
2937    301,  /* (431) anylist ::= anylist ANY */
2938    260,  /* (432) with ::= */
2939    304,  /* (433) windowdefn_list ::= windowdefn */
2940    306,  /* (434) window ::= frame_opt */
2941 };
2942 
2943 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
2944 ** of symbols on the right-hand side of that rule. */
2945 static const signed char yyRuleInfoNRhs[] = {
2946     0,  /* (0) pscantok ::= */
2947     0,  /* (1) sql_argument_list ::= */
2948    -1,  /* (2) sql_argument_list ::= sql_argument_list_nonempty */
2949    -1,  /* (3) sql_argument_type ::= ID */
2950    -6,  /* (4) sql_argument_type ::= ID LP ID DOT ID RP */
2951    -4,  /* (5) sql_argument_list_nonempty ::= sql_argument_list_nonempty COMMA ID sql_argument_type */
2952    -2,  /* (6) sql_argument_list_nonempty ::= ID sql_argument_type */
2953     0,  /* (7) table_schema ::= */
2954    -3,  /* (8) table_schema ::= LP sql_argument_list_nonempty RP */
2955     0,  /* (9) or_replace ::= */
2956    -2,  /* (10) or_replace ::= OR REPLACE */
2957   -13,  /* (11) cmd ::= CREATE or_replace PERFETTO FUNCTION ID LP sql_argument_list RP RETURNS return_type AS select pscantok */
2958    -1,  /* (12) return_type ::= ID */
2959    -4,  /* (13) return_type ::= TABLE LP sql_argument_list_nonempty RP */
2960    -9,  /* (14) cmd ::= CREATE or_replace PERFETTO TABLE ID table_schema AS select pscantok */
2961    -9,  /* (15) cmd ::= CREATE or_replace PERFETTO VIEW ID table_schema AS select pscantok */
2962   -10,  /* (16) cmd ::= CREATE or_replace PERFETTO INDEX ID ON ID LP indexed_column_list RP */
2963    -3,  /* (17) indexed_column_list ::= indexed_column_list COMMA ID */
2964    -1,  /* (18) indexed_column_list ::= ID */
2965   -13,  /* (19) cmd ::= CREATE or_replace PERFETTO MACRO ID LP macro_argument_list RP RETURNS ID AS macro_body pscantok */
2966    -4,  /* (20) macro_argument_list_nonempty ::= macro_argument_list_nonempty COMMA ID ID */
2967    -2,  /* (21) macro_argument_list_nonempty ::= ID ID */
2968     0,  /* (22) macro_argument_list ::= */
2969    -1,  /* (23) macro_argument_list ::= macro_argument_list_nonempty */
2970    -4,  /* (24) cmd ::= INCLUDE PERFETTO MODULE module_name */
2971    -1,  /* (25) module_name ::= ID|STAR|INTERSECT */
2972    -3,  /* (26) module_name ::= module_name DOT ID|STAR|INTERSECT */
2973    -6,  /* (27) cmd ::= DROP PERFETTO INDEX ID ON ID */
2974    -1,  /* (28) macro_body ::= ANY */
2975    -2,  /* (29) macro_body ::= macro_body ANY */
2976    -1,  /* (30) explain ::= EXPLAIN */
2977    -3,  /* (31) explain ::= EXPLAIN QUERY PLAN */
2978    -1,  /* (32) cmdx ::= cmd */
2979    -3,  /* (33) cmd ::= BEGIN transtype trans_opt */
2980     0,  /* (34) transtype ::= */
2981    -1,  /* (35) transtype ::= DEFERRED */
2982    -1,  /* (36) transtype ::= IMMEDIATE */
2983    -1,  /* (37) transtype ::= EXCLUSIVE */
2984    -2,  /* (38) cmd ::= COMMIT|END trans_opt */
2985    -2,  /* (39) cmd ::= ROLLBACK trans_opt */
2986    -2,  /* (40) cmd ::= SAVEPOINT nm */
2987    -3,  /* (41) cmd ::= RELEASE savepoint_opt nm */
2988    -5,  /* (42) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
2989    -6,  /* (43) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
2990    -1,  /* (44) createkw ::= CREATE */
2991     0,  /* (45) ifnotexists ::= */
2992    -3,  /* (46) ifnotexists ::= IF NOT EXISTS */
2993    -1,  /* (47) temp ::= TEMP */
2994     0,  /* (48) temp ::= */
2995    -5,  /* (49) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
2996    -2,  /* (50) create_table_args ::= AS select */
2997     0,  /* (51) table_option_set ::= */
2998    -3,  /* (52) table_option_set ::= table_option_set COMMA table_option */
2999    -2,  /* (53) table_option ::= WITHOUT nm */
3000    -1,  /* (54) table_option ::= nm */
3001    -2,  /* (55) columnname ::= nm typetoken */
3002     0,  /* (56) typetoken ::= */
3003    -4,  /* (57) typetoken ::= typename LP signed RP */
3004    -6,  /* (58) typetoken ::= typename LP signed COMMA signed RP */
3005    -2,  /* (59) typename ::= typename ID|STRING */
3006     0,  /* (60) scanpt ::= */
3007     0,  /* (61) scantok ::= */
3008    -2,  /* (62) ccons ::= CONSTRAINT nm */
3009    -3,  /* (63) ccons ::= DEFAULT scantok term */
3010    -4,  /* (64) ccons ::= DEFAULT LP expr RP */
3011    -4,  /* (65) ccons ::= DEFAULT PLUS scantok term */
3012    -4,  /* (66) ccons ::= DEFAULT MINUS scantok term */
3013    -3,  /* (67) ccons ::= DEFAULT scantok ID|INDEXED */
3014    -3,  /* (68) ccons ::= NOT NULL onconf */
3015    -5,  /* (69) ccons ::= PRIMARY KEY sortorder onconf autoinc */
3016    -2,  /* (70) ccons ::= UNIQUE onconf */
3017    -4,  /* (71) ccons ::= CHECK LP expr RP */
3018    -4,  /* (72) ccons ::= REFERENCES nm eidlist_opt refargs */
3019    -1,  /* (73) ccons ::= defer_subclause */
3020    -2,  /* (74) ccons ::= COLLATE ID|STRING */
3021    -3,  /* (75) generated ::= LP expr RP */
3022    -4,  /* (76) generated ::= LP expr RP ID */
3023     0,  /* (77) autoinc ::= */
3024    -1,  /* (78) autoinc ::= AUTOINCR */
3025     0,  /* (79) refargs ::= */
3026    -2,  /* (80) refargs ::= refargs refarg */
3027    -2,  /* (81) refarg ::= MATCH nm */
3028    -3,  /* (82) refarg ::= ON INSERT refact */
3029    -3,  /* (83) refarg ::= ON DELETE refact */
3030    -3,  /* (84) refarg ::= ON UPDATE refact */
3031    -2,  /* (85) refact ::= SET NULL */
3032    -2,  /* (86) refact ::= SET DEFAULT */
3033    -1,  /* (87) refact ::= CASCADE */
3034    -1,  /* (88) refact ::= RESTRICT */
3035    -2,  /* (89) refact ::= NO ACTION */
3036    -3,  /* (90) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
3037    -2,  /* (91) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
3038     0,  /* (92) init_deferred_pred_opt ::= */
3039    -2,  /* (93) init_deferred_pred_opt ::= INITIALLY DEFERRED */
3040    -2,  /* (94) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
3041     0,  /* (95) conslist_opt ::= */
3042    -1,  /* (96) tconscomma ::= COMMA */
3043    -2,  /* (97) tcons ::= CONSTRAINT nm */
3044    -7,  /* (98) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
3045    -5,  /* (99) tcons ::= UNIQUE LP sortlist RP onconf */
3046    -5,  /* (100) tcons ::= CHECK LP expr RP onconf */
3047   -10,  /* (101) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
3048     0,  /* (102) defer_subclause_opt ::= */
3049     0,  /* (103) onconf ::= */
3050    -3,  /* (104) onconf ::= ON CONFLICT resolvetype */
3051     0,  /* (105) orconf ::= */
3052    -2,  /* (106) orconf ::= OR resolvetype */
3053    -1,  /* (107) resolvetype ::= IGNORE */
3054    -1,  /* (108) resolvetype ::= REPLACE */
3055    -4,  /* (109) cmd ::= DROP TABLE ifexists fullname */
3056    -2,  /* (110) ifexists ::= IF EXISTS */
3057     0,  /* (111) ifexists ::= */
3058    -9,  /* (112) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
3059    -4,  /* (113) cmd ::= DROP VIEW ifexists fullname */
3060    -1,  /* (114) cmd ::= select */
3061    -3,  /* (115) select ::= WITH wqlist selectnowith */
3062    -4,  /* (116) select ::= WITH RECURSIVE wqlist selectnowith */
3063    -1,  /* (117) select ::= selectnowith */
3064    -3,  /* (118) selectnowith ::= selectnowith multiselect_op oneselect */
3065    -1,  /* (119) multiselect_op ::= UNION */
3066    -2,  /* (120) multiselect_op ::= UNION ALL */
3067    -1,  /* (121) multiselect_op ::= EXCEPT|INTERSECT */
3068    -9,  /* (122) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
3069   -10,  /* (123) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
3070    -4,  /* (124) values ::= VALUES LP nexprlist RP */
3071    -5,  /* (125) values ::= values COMMA LP nexprlist RP */
3072    -1,  /* (126) distinct ::= DISTINCT */
3073    -1,  /* (127) distinct ::= ALL */
3074     0,  /* (128) distinct ::= */
3075     0,  /* (129) sclp ::= */
3076    -5,  /* (130) selcollist ::= sclp scanpt expr scanpt as */
3077    -3,  /* (131) selcollist ::= sclp scanpt STAR */
3078    -5,  /* (132) selcollist ::= sclp scanpt nm DOT STAR */
3079    -2,  /* (133) as ::= AS nm */
3080     0,  /* (134) as ::= */
3081     0,  /* (135) from ::= */
3082    -2,  /* (136) from ::= FROM seltablist */
3083    -2,  /* (137) stl_prefix ::= seltablist joinop */
3084     0,  /* (138) stl_prefix ::= */
3085    -5,  /* (139) seltablist ::= stl_prefix nm dbnm as on_using */
3086    -6,  /* (140) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
3087    -8,  /* (141) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
3088    -6,  /* (142) seltablist ::= stl_prefix LP select RP as on_using */
3089    -6,  /* (143) seltablist ::= stl_prefix LP seltablist RP as on_using */
3090     0,  /* (144) dbnm ::= */
3091    -2,  /* (145) dbnm ::= DOT nm */
3092    -1,  /* (146) fullname ::= nm */
3093    -3,  /* (147) fullname ::= nm DOT nm */
3094    -1,  /* (148) xfullname ::= nm */
3095    -3,  /* (149) xfullname ::= nm DOT nm */
3096    -5,  /* (150) xfullname ::= nm DOT nm AS nm */
3097    -3,  /* (151) xfullname ::= nm AS nm */
3098    -1,  /* (152) joinop ::= COMMA|JOIN */
3099    -2,  /* (153) joinop ::= JOIN_KW JOIN */
3100    -3,  /* (154) joinop ::= JOIN_KW nm JOIN */
3101    -4,  /* (155) joinop ::= JOIN_KW nm nm JOIN */
3102    -2,  /* (156) on_using ::= ON expr */
3103    -4,  /* (157) on_using ::= USING LP idlist RP */
3104     0,  /* (158) on_using ::= */
3105     0,  /* (159) indexed_opt ::= */
3106    -3,  /* (160) indexed_by ::= INDEXED BY nm */
3107    -2,  /* (161) indexed_by ::= NOT INDEXED */
3108     0,  /* (162) orderby_opt ::= */
3109    -3,  /* (163) orderby_opt ::= ORDER BY sortlist */
3110    -5,  /* (164) sortlist ::= sortlist COMMA expr sortorder nulls */
3111    -3,  /* (165) sortlist ::= expr sortorder nulls */
3112    -1,  /* (166) sortorder ::= ASC */
3113    -1,  /* (167) sortorder ::= DESC */
3114     0,  /* (168) sortorder ::= */
3115    -2,  /* (169) nulls ::= NULLS FIRST */
3116    -2,  /* (170) nulls ::= NULLS LAST */
3117     0,  /* (171) nulls ::= */
3118     0,  /* (172) groupby_opt ::= */
3119    -3,  /* (173) groupby_opt ::= GROUP BY nexprlist */
3120     0,  /* (174) having_opt ::= */
3121    -2,  /* (175) having_opt ::= HAVING expr */
3122     0,  /* (176) limit_opt ::= */
3123    -2,  /* (177) limit_opt ::= LIMIT expr */
3124    -4,  /* (178) limit_opt ::= LIMIT expr OFFSET expr */
3125    -4,  /* (179) limit_opt ::= LIMIT expr COMMA expr */
3126    -6,  /* (180) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
3127     0,  /* (181) where_opt ::= */
3128    -2,  /* (182) where_opt ::= WHERE expr */
3129     0,  /* (183) where_opt_ret ::= */
3130    -2,  /* (184) where_opt_ret ::= WHERE expr */
3131    -2,  /* (185) where_opt_ret ::= RETURNING selcollist */
3132    -4,  /* (186) where_opt_ret ::= WHERE expr RETURNING selcollist */
3133    -9,  /* (187) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
3134    -5,  /* (188) setlist ::= setlist COMMA nm EQ expr */
3135    -7,  /* (189) setlist ::= setlist COMMA LP idlist RP EQ expr */
3136    -3,  /* (190) setlist ::= nm EQ expr */
3137    -5,  /* (191) setlist ::= LP idlist RP EQ expr */
3138    -7,  /* (192) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
3139    -8,  /* (193) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
3140     0,  /* (194) upsert ::= */
3141    -2,  /* (195) upsert ::= RETURNING selcollist */
3142   -12,  /* (196) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
3143    -9,  /* (197) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
3144    -5,  /* (198) upsert ::= ON CONFLICT DO NOTHING returning */
3145    -8,  /* (199) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
3146    -2,  /* (200) returning ::= RETURNING selcollist */
3147    -2,  /* (201) insert_cmd ::= INSERT orconf */
3148    -1,  /* (202) insert_cmd ::= REPLACE */
3149     0,  /* (203) idlist_opt ::= */
3150    -3,  /* (204) idlist_opt ::= LP idlist RP */
3151    -3,  /* (205) idlist ::= idlist COMMA nm */
3152    -1,  /* (206) idlist ::= nm */
3153    -3,  /* (207) expr ::= LP expr RP */
3154    -1,  /* (208) expr ::= ID|INDEXED|JOIN_KW */
3155    -3,  /* (209) expr ::= nm DOT nm */
3156    -5,  /* (210) expr ::= nm DOT nm DOT nm */
3157    -1,  /* (211) term ::= NULL|FLOAT|BLOB */
3158    -1,  /* (212) term ::= STRING */
3159    -1,  /* (213) term ::= INTEGER */
3160    -1,  /* (214) expr ::= VARIABLE */
3161    -3,  /* (215) expr ::= expr COLLATE ID|STRING */
3162    -6,  /* (216) expr ::= CAST LP expr AS typetoken RP */
3163    -5,  /* (217) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
3164    -8,  /* (218) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
3165    -4,  /* (219) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
3166    -6,  /* (220) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
3167    -9,  /* (221) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
3168    -5,  /* (222) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
3169    -1,  /* (223) term ::= CTIME_KW */
3170    -5,  /* (224) expr ::= LP nexprlist COMMA expr RP */
3171    -3,  /* (225) expr ::= expr AND expr */
3172    -3,  /* (226) expr ::= expr OR expr */
3173    -3,  /* (227) expr ::= expr LT|GT|GE|LE expr */
3174    -3,  /* (228) expr ::= expr EQ|NE expr */
3175    -3,  /* (229) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
3176    -3,  /* (230) expr ::= expr PLUS|MINUS expr */
3177    -3,  /* (231) expr ::= expr STAR|SLASH|REM expr */
3178    -3,  /* (232) expr ::= expr CONCAT expr */
3179    -2,  /* (233) likeop ::= NOT LIKE_KW|MATCH */
3180    -3,  /* (234) expr ::= expr likeop expr */
3181    -5,  /* (235) expr ::= expr likeop expr ESCAPE expr */
3182    -2,  /* (236) expr ::= expr ISNULL|NOTNULL */
3183    -3,  /* (237) expr ::= expr NOT NULL */
3184    -3,  /* (238) expr ::= expr IS expr */
3185    -4,  /* (239) expr ::= expr IS NOT expr */
3186    -6,  /* (240) expr ::= expr IS NOT DISTINCT FROM expr */
3187    -5,  /* (241) expr ::= expr IS DISTINCT FROM expr */
3188    -2,  /* (242) expr ::= NOT expr */
3189    -2,  /* (243) expr ::= BITNOT expr */
3190    -2,  /* (244) expr ::= PLUS|MINUS expr */
3191    -3,  /* (245) expr ::= expr PTR expr */
3192    -1,  /* (246) between_op ::= BETWEEN */
3193    -2,  /* (247) between_op ::= NOT BETWEEN */
3194    -5,  /* (248) expr ::= expr between_op expr AND expr */
3195    -1,  /* (249) in_op ::= IN */
3196    -2,  /* (250) in_op ::= NOT IN */
3197    -5,  /* (251) expr ::= expr in_op LP exprlist RP */
3198    -3,  /* (252) expr ::= LP select RP */
3199    -5,  /* (253) expr ::= expr in_op LP select RP */
3200    -5,  /* (254) expr ::= expr in_op nm dbnm paren_exprlist */
3201    -4,  /* (255) expr ::= EXISTS LP select RP */
3202    -5,  /* (256) expr ::= CASE case_operand case_exprlist case_else END */
3203    -5,  /* (257) case_exprlist ::= case_exprlist WHEN expr THEN expr */
3204    -4,  /* (258) case_exprlist ::= WHEN expr THEN expr */
3205    -2,  /* (259) case_else ::= ELSE expr */
3206     0,  /* (260) case_else ::= */
3207     0,  /* (261) case_operand ::= */
3208     0,  /* (262) exprlist ::= */
3209    -3,  /* (263) nexprlist ::= nexprlist COMMA expr */
3210    -1,  /* (264) nexprlist ::= expr */
3211     0,  /* (265) paren_exprlist ::= */
3212    -3,  /* (266) paren_exprlist ::= LP exprlist RP */
3213   -12,  /* (267) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
3214    -1,  /* (268) uniqueflag ::= UNIQUE */
3215     0,  /* (269) uniqueflag ::= */
3216     0,  /* (270) eidlist_opt ::= */
3217    -3,  /* (271) eidlist_opt ::= LP eidlist RP */
3218    -5,  /* (272) eidlist ::= eidlist COMMA nm collate sortorder */
3219    -3,  /* (273) eidlist ::= nm collate sortorder */
3220     0,  /* (274) collate ::= */
3221    -2,  /* (275) collate ::= COLLATE ID|STRING */
3222    -4,  /* (276) cmd ::= DROP INDEX ifexists fullname */
3223    -2,  /* (277) cmd ::= VACUUM vinto */
3224    -3,  /* (278) cmd ::= VACUUM nm vinto */
3225    -2,  /* (279) vinto ::= INTO expr */
3226     0,  /* (280) vinto ::= */
3227    -3,  /* (281) cmd ::= PRAGMA nm dbnm */
3228    -5,  /* (282) cmd ::= PRAGMA nm dbnm EQ nmnum */
3229    -6,  /* (283) cmd ::= PRAGMA nm dbnm LP nmnum RP */
3230    -5,  /* (284) cmd ::= PRAGMA nm dbnm EQ minus_num */
3231    -6,  /* (285) cmd ::= PRAGMA nm dbnm LP minus_num RP */
3232    -2,  /* (286) plus_num ::= PLUS INTEGER|FLOAT */
3233    -2,  /* (287) minus_num ::= MINUS INTEGER|FLOAT */
3234    -5,  /* (288) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
3235   -11,  /* (289) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
3236    -1,  /* (290) trigger_time ::= BEFORE|AFTER */
3237    -2,  /* (291) trigger_time ::= INSTEAD OF */
3238     0,  /* (292) trigger_time ::= */
3239    -1,  /* (293) trigger_event ::= DELETE|INSERT */
3240    -1,  /* (294) trigger_event ::= UPDATE */
3241    -3,  /* (295) trigger_event ::= UPDATE OF idlist */
3242     0,  /* (296) when_clause ::= */
3243    -2,  /* (297) when_clause ::= WHEN expr */
3244    -3,  /* (298) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
3245    -2,  /* (299) trigger_cmd_list ::= trigger_cmd SEMI */
3246    -3,  /* (300) trnm ::= nm DOT nm */
3247    -3,  /* (301) tridxby ::= INDEXED BY nm */
3248    -2,  /* (302) tridxby ::= NOT INDEXED */
3249    -9,  /* (303) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
3250    -8,  /* (304) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
3251    -6,  /* (305) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
3252    -3,  /* (306) trigger_cmd ::= scanpt select scanpt */
3253    -4,  /* (307) expr ::= RAISE LP IGNORE RP */
3254    -6,  /* (308) expr ::= RAISE LP raisetype COMMA nm RP */
3255    -1,  /* (309) raisetype ::= ROLLBACK */
3256    -1,  /* (310) raisetype ::= ABORT */
3257    -1,  /* (311) raisetype ::= FAIL */
3258    -4,  /* (312) cmd ::= DROP TRIGGER ifexists fullname */
3259    -6,  /* (313) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
3260    -3,  /* (314) cmd ::= DETACH database_kw_opt expr */
3261     0,  /* (315) key_opt ::= */
3262    -2,  /* (316) key_opt ::= KEY expr */
3263    -1,  /* (317) cmd ::= REINDEX */
3264    -3,  /* (318) cmd ::= REINDEX nm dbnm */
3265    -1,  /* (319) cmd ::= ANALYZE */
3266    -3,  /* (320) cmd ::= ANALYZE nm dbnm */
3267    -6,  /* (321) cmd ::= ALTER TABLE fullname RENAME TO nm */
3268    -7,  /* (322) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
3269    -6,  /* (323) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
3270    -1,  /* (324) add_column_fullname ::= fullname */
3271    -8,  /* (325) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
3272    -1,  /* (326) cmd ::= create_vtab */
3273    -4,  /* (327) cmd ::= create_vtab LP vtabarglist RP */
3274    -8,  /* (328) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
3275     0,  /* (329) vtabarg ::= */
3276    -1,  /* (330) vtabargtoken ::= ANY */
3277    -3,  /* (331) vtabargtoken ::= lp anylist RP */
3278    -1,  /* (332) lp ::= LP */
3279    -2,  /* (333) with ::= WITH wqlist */
3280    -3,  /* (334) with ::= WITH RECURSIVE wqlist */
3281    -1,  /* (335) wqas ::= AS */
3282    -2,  /* (336) wqas ::= AS MATERIALIZED */
3283    -3,  /* (337) wqas ::= AS NOT MATERIALIZED */
3284    -6,  /* (338) wqitem ::= nm eidlist_opt wqas LP select RP */
3285    -1,  /* (339) wqlist ::= wqitem */
3286    -3,  /* (340) wqlist ::= wqlist COMMA wqitem */
3287    -3,  /* (341) windowdefn_list ::= windowdefn_list COMMA windowdefn */
3288    -5,  /* (342) windowdefn ::= nm AS LP window RP */
3289    -5,  /* (343) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
3290    -6,  /* (344) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
3291    -4,  /* (345) window ::= ORDER BY sortlist frame_opt */
3292    -5,  /* (346) window ::= nm ORDER BY sortlist frame_opt */
3293    -2,  /* (347) window ::= nm frame_opt */
3294     0,  /* (348) frame_opt ::= */
3295    -3,  /* (349) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
3296    -6,  /* (350) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
3297    -1,  /* (351) range_or_rows ::= RANGE|ROWS|GROUPS */
3298    -1,  /* (352) frame_bound_s ::= frame_bound */
3299    -2,  /* (353) frame_bound_s ::= UNBOUNDED PRECEDING */
3300    -1,  /* (354) frame_bound_e ::= frame_bound */
3301    -2,  /* (355) frame_bound_e ::= UNBOUNDED FOLLOWING */
3302    -2,  /* (356) frame_bound ::= expr PRECEDING|FOLLOWING */
3303    -2,  /* (357) frame_bound ::= CURRENT ROW */
3304     0,  /* (358) frame_exclude_opt ::= */
3305    -2,  /* (359) frame_exclude_opt ::= EXCLUDE frame_exclude */
3306    -2,  /* (360) frame_exclude ::= NO OTHERS */
3307    -2,  /* (361) frame_exclude ::= CURRENT ROW */
3308    -1,  /* (362) frame_exclude ::= GROUP|TIES */
3309    -2,  /* (363) window_clause ::= WINDOW windowdefn_list */
3310    -2,  /* (364) filter_over ::= filter_clause over_clause */
3311    -1,  /* (365) filter_over ::= over_clause */
3312    -1,  /* (366) filter_over ::= filter_clause */
3313    -4,  /* (367) over_clause ::= OVER LP window RP */
3314    -2,  /* (368) over_clause ::= OVER nm */
3315    -5,  /* (369) filter_clause ::= FILTER LP WHERE expr RP */
3316    -1,  /* (370) input ::= cmdlist */
3317    -2,  /* (371) cmdlist ::= cmdlist ecmd */
3318    -1,  /* (372) cmdlist ::= ecmd */
3319    -1,  /* (373) ecmd ::= SEMI */
3320    -2,  /* (374) ecmd ::= cmdx SEMI */
3321    -3,  /* (375) ecmd ::= explain cmdx SEMI */
3322     0,  /* (376) trans_opt ::= */
3323    -1,  /* (377) trans_opt ::= TRANSACTION */
3324    -2,  /* (378) trans_opt ::= TRANSACTION nm */
3325    -1,  /* (379) savepoint_opt ::= SAVEPOINT */
3326     0,  /* (380) savepoint_opt ::= */
3327    -2,  /* (381) cmd ::= create_table create_table_args */
3328    -1,  /* (382) table_option_set ::= table_option */
3329    -4,  /* (383) columnlist ::= columnlist COMMA columnname carglist */
3330    -2,  /* (384) columnlist ::= columnname carglist */
3331    -1,  /* (385) nm ::= ID|INDEXED|JOIN_KW */
3332    -1,  /* (386) nm ::= STRING */
3333    -1,  /* (387) typetoken ::= typename */
3334    -1,  /* (388) typename ::= ID|STRING */
3335    -1,  /* (389) signed ::= plus_num */
3336    -1,  /* (390) signed ::= minus_num */
3337    -2,  /* (391) carglist ::= carglist ccons */
3338     0,  /* (392) carglist ::= */
3339    -2,  /* (393) ccons ::= NULL onconf */
3340    -4,  /* (394) ccons ::= GENERATED ALWAYS AS generated */
3341    -2,  /* (395) ccons ::= AS generated */
3342    -2,  /* (396) conslist_opt ::= COMMA conslist */
3343    -3,  /* (397) conslist ::= conslist tconscomma tcons */
3344    -1,  /* (398) conslist ::= tcons */
3345     0,  /* (399) tconscomma ::= */
3346    -1,  /* (400) defer_subclause_opt ::= defer_subclause */
3347    -1,  /* (401) resolvetype ::= raisetype */
3348    -1,  /* (402) selectnowith ::= oneselect */
3349    -1,  /* (403) oneselect ::= values */
3350    -2,  /* (404) sclp ::= selcollist COMMA */
3351    -1,  /* (405) as ::= ID|STRING */
3352    -1,  /* (406) indexed_opt ::= indexed_by */
3353     0,  /* (407) returning ::= */
3354    -1,  /* (408) expr ::= term */
3355    -1,  /* (409) likeop ::= LIKE_KW|MATCH */
3356    -1,  /* (410) case_operand ::= expr */
3357    -1,  /* (411) exprlist ::= nexprlist */
3358    -1,  /* (412) nmnum ::= plus_num */
3359    -1,  /* (413) nmnum ::= nm */
3360    -1,  /* (414) nmnum ::= ON */
3361    -1,  /* (415) nmnum ::= DELETE */
3362    -1,  /* (416) nmnum ::= DEFAULT */
3363    -1,  /* (417) plus_num ::= INTEGER|FLOAT */
3364     0,  /* (418) foreach_clause ::= */
3365    -3,  /* (419) foreach_clause ::= FOR EACH ROW */
3366    -1,  /* (420) trnm ::= nm */
3367     0,  /* (421) tridxby ::= */
3368    -1,  /* (422) database_kw_opt ::= DATABASE */
3369     0,  /* (423) database_kw_opt ::= */
3370     0,  /* (424) kwcolumn_opt ::= */
3371    -1,  /* (425) kwcolumn_opt ::= COLUMNKW */
3372    -1,  /* (426) vtabarglist ::= vtabarg */
3373    -3,  /* (427) vtabarglist ::= vtabarglist COMMA vtabarg */
3374    -2,  /* (428) vtabarg ::= vtabarg vtabargtoken */
3375     0,  /* (429) anylist ::= */
3376    -4,  /* (430) anylist ::= anylist LP anylist RP */
3377    -2,  /* (431) anylist ::= anylist ANY */
3378     0,  /* (432) with ::= */
3379    -1,  /* (433) windowdefn_list ::= windowdefn */
3380    -1,  /* (434) window ::= frame_opt */
3381 };
3382 
3383 static void yy_accept(yyParser*);  /* Forward Declaration */
3384 
3385 /*
3386 ** Perform a reduce action and the shift that must immediately
3387 ** follow the reduce.
3388 **
3389 ** The yyLookahead and yyLookaheadToken parameters provide reduce actions
3390 ** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
3391 ** if the lookahead token has already been consumed.  As this procedure is
3392 ** only called from one place, optimizing compilers will in-line it, which
3393 ** means that the extra parameters have no performance impact.
3394 */
yy_reduce(yyParser * yypParser,unsigned int yyruleno,int yyLookahead,PerfettoSqlParseTOKENTYPE yyLookaheadToken PerfettoSqlParseCTX_PDECL)3395 static YYACTIONTYPE yy_reduce(
3396   yyParser *yypParser,         /* The parser */
3397   unsigned int yyruleno,       /* Number of the rule by which to reduce */
3398   int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
3399   PerfettoSqlParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
3400   PerfettoSqlParseCTX_PDECL                   /* %extra_context */
3401 ){
3402   int yygoto;                     /* The next state */
3403   YYACTIONTYPE yyact;             /* The next action */
3404   yyStackEntry *yymsp;            /* The top of the parser's stack */
3405   int yysize;                     /* Amount to pop the stack */
3406   PerfettoSqlParseARG_FETCH
3407   (void)yyLookahead;
3408   (void)yyLookaheadToken;
3409   yymsp = yypParser->yytos;
3410 
3411   switch( yyruleno ){
3412   /* Beginning here are the reduction cases.  A typical example
3413   ** follows:
3414   **   case 0:
3415   **  #line <lineno> <grammarfile>
3416   **     { ... }           // User supplied code
3417   **  #line <lineno> <thisfile>
3418   **     break;
3419   */
3420 /********** Begin reduce actions **********************************************/
3421         YYMINORTYPE yylhsminor;
3422       case 0: /* pscantok ::= */
3423 {
3424   assert( yyLookahead!=YYNOCODE );
3425   yymsp[1].minor.yy0 = yyLookaheadToken;
3426 }
3427         break;
3428       case 1: /* sql_argument_list ::= */
3429       case 7: /* table_schema ::= */ yytestcase(yyruleno==7);
3430 { yymsp[1].minor.yy208 = 0; }
3431         break;
3432       case 2: /* sql_argument_list ::= sql_argument_list_nonempty */
3433 { yylhsminor.yy208 = yymsp[0].minor.yy208; }
3434   yymsp[0].minor.yy208 = yylhsminor.yy208;
3435         break;
3436       case 3: /* sql_argument_type ::= ID */
3437 { yylhsminor.yy0 = yymsp[0].minor.yy0; }
3438   yymsp[0].minor.yy0 = yylhsminor.yy0;
3439         break;
3440       case 4: /* sql_argument_type ::= ID LP ID DOT ID RP */
3441 { yylhsminor.yy0 = yymsp[-5].minor.yy0; }
3442   yymsp[-5].minor.yy0 = yylhsminor.yy0;
3443         break;
3444       case 5: /* sql_argument_list_nonempty ::= sql_argument_list_nonempty COMMA ID sql_argument_type */
3445 {
3446   yylhsminor.yy208 = OnPerfettoSqlCreateOrAppendArgument(state, yymsp[-3].minor.yy208, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3447 }
3448   yymsp[-3].minor.yy208 = yylhsminor.yy208;
3449         break;
3450       case 6: /* sql_argument_list_nonempty ::= ID sql_argument_type */
3451 {
3452   yylhsminor.yy208 = OnPerfettoSqlCreateOrAppendArgument(state, 0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3453 }
3454   yymsp[-1].minor.yy208 = yylhsminor.yy208;
3455         break;
3456       case 8: /* table_schema ::= LP sql_argument_list_nonempty RP */
3457 { yymsp[-2].minor.yy208 = yymsp[-1].minor.yy208; }
3458         break;
3459       case 9: /* or_replace ::= */
3460 { yymsp[1].minor.yy92 = 0; }
3461         break;
3462       case 10: /* or_replace ::= OR REPLACE */
3463 { yymsp[-1].minor.yy92 = 1; }
3464         break;
3465       case 11: /* cmd ::= CREATE or_replace PERFETTO FUNCTION ID LP sql_argument_list RP RETURNS return_type AS select pscantok */
3466 {
3467   OnPerfettoSqlCreateFunction(state, yymsp[-11].minor.yy92, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy208, yymsp[-3].minor.yy355, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3468 }
3469         break;
3470       case 12: /* return_type ::= ID */
3471 {
3472   yylhsminor.yy355 = OnPerfettoSqlCreateScalarReturnType(&yymsp[0].minor.yy0);
3473 }
3474   yymsp[0].minor.yy355 = yylhsminor.yy355;
3475         break;
3476       case 13: /* return_type ::= TABLE LP sql_argument_list_nonempty RP */
3477 {
3478   yymsp[-3].minor.yy355 = OnPerfettoSqlCreateTableReturnType(yymsp[-1].minor.yy208);
3479 }
3480         break;
3481       case 14: /* cmd ::= CREATE or_replace PERFETTO TABLE ID table_schema AS select pscantok */
3482 {
3483   OnPerfettoSqlCreateTable(state, yymsp[-7].minor.yy92, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy208, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3484 }
3485         break;
3486       case 15: /* cmd ::= CREATE or_replace PERFETTO VIEW ID table_schema AS select pscantok */
3487 {
3488   OnPerfettoSqlCreateView(state, yymsp[-7].minor.yy92, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy208, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3489 }
3490         break;
3491       case 16: /* cmd ::= CREATE or_replace PERFETTO INDEX ID ON ID LP indexed_column_list RP */
3492 {
3493   OnPerfettoSqlCreateIndex(state, yymsp[-8].minor.yy92, &yymsp[-9].minor.yy0, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy368);
3494 }
3495         break;
3496       case 17: /* indexed_column_list ::= indexed_column_list COMMA ID */
3497 {
3498   yylhsminor.yy368 = OnPerfettoSqlCreateOrAppendIndexedColumn(yymsp[-2].minor.yy368, &yymsp[0].minor.yy0);
3499 }
3500   yymsp[-2].minor.yy368 = yylhsminor.yy368;
3501         break;
3502       case 18: /* indexed_column_list ::= ID */
3503 {
3504   yylhsminor.yy368 = OnPerfettoSqlCreateOrAppendIndexedColumn(0, &yymsp[0].minor.yy0);
3505 }
3506   yymsp[0].minor.yy368 = yylhsminor.yy368;
3507         break;
3508       case 19: /* cmd ::= CREATE or_replace PERFETTO MACRO ID LP macro_argument_list RP RETURNS ID AS macro_body pscantok */
3509 {
3510   OnPerfettoSqlCreateMacro(state, yymsp[-11].minor.yy92, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy526, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3511 }
3512         break;
3513       case 20: /* macro_argument_list_nonempty ::= macro_argument_list_nonempty COMMA ID ID */
3514 {
3515   yylhsminor.yy526 = OnPerfettoSqlCreateOrAppendMacroArgument(state, yymsp[-3].minor.yy526, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3516 }
3517   yymsp[-3].minor.yy526 = yylhsminor.yy526;
3518         break;
3519       case 21: /* macro_argument_list_nonempty ::= ID ID */
3520 {
3521   yylhsminor.yy526 = OnPerfettoSqlCreateOrAppendMacroArgument(state, 0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);
3522 }
3523   yymsp[-1].minor.yy526 = yylhsminor.yy526;
3524         break;
3525       case 22: /* macro_argument_list ::= */
3526 { yymsp[1].minor.yy526 = 0; }
3527         break;
3528       case 23: /* macro_argument_list ::= macro_argument_list_nonempty */
3529 { yylhsminor.yy526 = yymsp[0].minor.yy526; }
3530   yymsp[0].minor.yy526 = yylhsminor.yy526;
3531         break;
3532       case 24: /* cmd ::= INCLUDE PERFETTO MODULE module_name */
3533 {
3534   OnPerfettoSqlInclude(state, &yymsp[0].minor.yy0);
3535 }
3536         break;
3537       case 25: /* module_name ::= ID|STAR|INTERSECT */
3538 {
3539   yylhsminor.yy0 = yymsp[0].minor.yy0;
3540 }
3541   yymsp[0].minor.yy0 = yylhsminor.yy0;
3542         break;
3543       case 26: /* module_name ::= module_name DOT ID|STAR|INTERSECT */
3544 {
3545   yylhsminor.yy0 = (struct PerfettoSqlToken) {yymsp[-2].minor.yy0.ptr, yymsp[0].minor.yy0.ptr + yymsp[0].minor.yy0.n - yymsp[-2].minor.yy0.ptr};
3546 }
3547   yymsp[-2].minor.yy0 = yylhsminor.yy0;
3548         break;
3549       case 27: /* cmd ::= DROP PERFETTO INDEX ID ON ID */
3550 {
3551   OnPerfettoSqlDropIndex(state, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
3552 }
3553         break;
3554       default:
3555       /* (28) macro_body ::= ANY */ yytestcase(yyruleno==28);
3556       /* (29) macro_body ::= macro_body ANY */ yytestcase(yyruleno==29);
3557       /* (30) explain ::= EXPLAIN */ yytestcase(yyruleno==30);
3558       /* (31) explain ::= EXPLAIN QUERY PLAN */ yytestcase(yyruleno==31);
3559       /* (32) cmdx ::= cmd (OPTIMIZED OUT) */ assert(yyruleno!=32);
3560       /* (33) cmd ::= BEGIN transtype trans_opt */ yytestcase(yyruleno==33);
3561       /* (34) transtype ::= */ yytestcase(yyruleno==34);
3562       /* (35) transtype ::= DEFERRED */ yytestcase(yyruleno==35);
3563       /* (36) transtype ::= IMMEDIATE */ yytestcase(yyruleno==36);
3564       /* (37) transtype ::= EXCLUSIVE */ yytestcase(yyruleno==37);
3565       /* (38) cmd ::= COMMIT|END trans_opt */ yytestcase(yyruleno==38);
3566       /* (39) cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==39);
3567       /* (40) cmd ::= SAVEPOINT nm */ yytestcase(yyruleno==40);
3568       /* (41) cmd ::= RELEASE savepoint_opt nm */ yytestcase(yyruleno==41);
3569       /* (42) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ yytestcase(yyruleno==42);
3570       /* (43) create_table ::= createkw temp TABLE ifnotexists nm dbnm */ yytestcase(yyruleno==43);
3571       /* (44) createkw ::= CREATE */ yytestcase(yyruleno==44);
3572       /* (45) ifnotexists ::= */ yytestcase(yyruleno==45);
3573       /* (46) ifnotexists ::= IF NOT EXISTS */ yytestcase(yyruleno==46);
3574       /* (47) temp ::= TEMP */ yytestcase(yyruleno==47);
3575       /* (48) temp ::= */ yytestcase(yyruleno==48);
3576       /* (49) create_table_args ::= LP columnlist conslist_opt RP table_option_set */ yytestcase(yyruleno==49);
3577       /* (50) create_table_args ::= AS select */ yytestcase(yyruleno==50);
3578       /* (51) table_option_set ::= */ yytestcase(yyruleno==51);
3579       /* (52) table_option_set ::= table_option_set COMMA table_option */ yytestcase(yyruleno==52);
3580       /* (53) table_option ::= WITHOUT nm */ yytestcase(yyruleno==53);
3581       /* (54) table_option ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=54);
3582       /* (55) columnname ::= nm typetoken */ yytestcase(yyruleno==55);
3583       /* (56) typetoken ::= */ yytestcase(yyruleno==56);
3584       /* (57) typetoken ::= typename LP signed RP */ yytestcase(yyruleno==57);
3585       /* (58) typetoken ::= typename LP signed COMMA signed RP */ yytestcase(yyruleno==58);
3586       /* (59) typename ::= typename ID|STRING */ yytestcase(yyruleno==59);
3587       /* (60) scanpt ::= */ yytestcase(yyruleno==60);
3588       /* (61) scantok ::= */ yytestcase(yyruleno==61);
3589       /* (62) ccons ::= CONSTRAINT nm */ yytestcase(yyruleno==62);
3590       /* (63) ccons ::= DEFAULT scantok term */ yytestcase(yyruleno==63);
3591       /* (64) ccons ::= DEFAULT LP expr RP */ yytestcase(yyruleno==64);
3592       /* (65) ccons ::= DEFAULT PLUS scantok term */ yytestcase(yyruleno==65);
3593       /* (66) ccons ::= DEFAULT MINUS scantok term */ yytestcase(yyruleno==66);
3594       /* (67) ccons ::= DEFAULT scantok ID|INDEXED */ yytestcase(yyruleno==67);
3595       /* (68) ccons ::= NOT NULL onconf */ yytestcase(yyruleno==68);
3596       /* (69) ccons ::= PRIMARY KEY sortorder onconf autoinc */ yytestcase(yyruleno==69);
3597       /* (70) ccons ::= UNIQUE onconf */ yytestcase(yyruleno==70);
3598       /* (71) ccons ::= CHECK LP expr RP */ yytestcase(yyruleno==71);
3599       /* (72) ccons ::= REFERENCES nm eidlist_opt refargs */ yytestcase(yyruleno==72);
3600       /* (73) ccons ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=73);
3601       /* (74) ccons ::= COLLATE ID|STRING */ yytestcase(yyruleno==74);
3602       /* (75) generated ::= LP expr RP */ yytestcase(yyruleno==75);
3603       /* (76) generated ::= LP expr RP ID */ yytestcase(yyruleno==76);
3604       /* (77) autoinc ::= */ yytestcase(yyruleno==77);
3605       /* (78) autoinc ::= AUTOINCR */ yytestcase(yyruleno==78);
3606       /* (79) refargs ::= */ yytestcase(yyruleno==79);
3607       /* (80) refargs ::= refargs refarg */ yytestcase(yyruleno==80);
3608       /* (81) refarg ::= MATCH nm */ yytestcase(yyruleno==81);
3609       /* (82) refarg ::= ON INSERT refact */ yytestcase(yyruleno==82);
3610       /* (83) refarg ::= ON DELETE refact */ yytestcase(yyruleno==83);
3611       /* (84) refarg ::= ON UPDATE refact */ yytestcase(yyruleno==84);
3612       /* (85) refact ::= SET NULL */ yytestcase(yyruleno==85);
3613       /* (86) refact ::= SET DEFAULT */ yytestcase(yyruleno==86);
3614       /* (87) refact ::= CASCADE */ yytestcase(yyruleno==87);
3615       /* (88) refact ::= RESTRICT */ yytestcase(yyruleno==88);
3616       /* (89) refact ::= NO ACTION */ yytestcase(yyruleno==89);
3617       /* (90) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==90);
3618       /* (91) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==91);
3619       /* (92) init_deferred_pred_opt ::= */ yytestcase(yyruleno==92);
3620       /* (93) init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==93);
3621       /* (94) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==94);
3622       /* (95) conslist_opt ::= */ yytestcase(yyruleno==95);
3623       /* (96) tconscomma ::= COMMA */ yytestcase(yyruleno==96);
3624       /* (97) tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==97);
3625       /* (98) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ yytestcase(yyruleno==98);
3626       /* (99) tcons ::= UNIQUE LP sortlist RP onconf */ yytestcase(yyruleno==99);
3627       /* (100) tcons ::= CHECK LP expr RP onconf */ yytestcase(yyruleno==100);
3628       /* (101) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ yytestcase(yyruleno==101);
3629       /* (102) defer_subclause_opt ::= */ yytestcase(yyruleno==102);
3630       /* (103) onconf ::= */ yytestcase(yyruleno==103);
3631       /* (104) onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==104);
3632       /* (105) orconf ::= */ yytestcase(yyruleno==105);
3633       /* (106) orconf ::= OR resolvetype */ yytestcase(yyruleno==106);
3634       /* (107) resolvetype ::= IGNORE */ yytestcase(yyruleno==107);
3635       /* (108) resolvetype ::= REPLACE */ yytestcase(yyruleno==108);
3636       /* (109) cmd ::= DROP TABLE ifexists fullname */ yytestcase(yyruleno==109);
3637       /* (110) ifexists ::= IF EXISTS */ yytestcase(yyruleno==110);
3638       /* (111) ifexists ::= */ yytestcase(yyruleno==111);
3639       /* (112) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ yytestcase(yyruleno==112);
3640       /* (113) cmd ::= DROP VIEW ifexists fullname */ yytestcase(yyruleno==113);
3641       /* (114) cmd ::= select (OPTIMIZED OUT) */ assert(yyruleno!=114);
3642       /* (115) select ::= WITH wqlist selectnowith */ yytestcase(yyruleno==115);
3643       /* (116) select ::= WITH RECURSIVE wqlist selectnowith */ yytestcase(yyruleno==116);
3644       /* (117) select ::= selectnowith */ yytestcase(yyruleno==117);
3645       /* (118) selectnowith ::= selectnowith multiselect_op oneselect */ yytestcase(yyruleno==118);
3646       /* (119) multiselect_op ::= UNION */ yytestcase(yyruleno==119);
3647       /* (120) multiselect_op ::= UNION ALL */ yytestcase(yyruleno==120);
3648       /* (121) multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==121);
3649       /* (122) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ yytestcase(yyruleno==122);
3650       /* (123) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ yytestcase(yyruleno==123);
3651       /* (124) values ::= VALUES LP nexprlist RP */ yytestcase(yyruleno==124);
3652       /* (125) values ::= values COMMA LP nexprlist RP */ yytestcase(yyruleno==125);
3653       /* (126) distinct ::= DISTINCT */ yytestcase(yyruleno==126);
3654       /* (127) distinct ::= ALL */ yytestcase(yyruleno==127);
3655       /* (128) distinct ::= */ yytestcase(yyruleno==128);
3656       /* (129) sclp ::= */ yytestcase(yyruleno==129);
3657       /* (130) selcollist ::= sclp scanpt expr scanpt as */ yytestcase(yyruleno==130);
3658       /* (131) selcollist ::= sclp scanpt STAR */ yytestcase(yyruleno==131);
3659       /* (132) selcollist ::= sclp scanpt nm DOT STAR */ yytestcase(yyruleno==132);
3660       /* (133) as ::= AS nm */ yytestcase(yyruleno==133);
3661       /* (134) as ::= */ yytestcase(yyruleno==134);
3662       /* (135) from ::= */ yytestcase(yyruleno==135);
3663       /* (136) from ::= FROM seltablist */ yytestcase(yyruleno==136);
3664       /* (137) stl_prefix ::= seltablist joinop */ yytestcase(yyruleno==137);
3665       /* (138) stl_prefix ::= */ yytestcase(yyruleno==138);
3666       /* (139) seltablist ::= stl_prefix nm dbnm as on_using */ yytestcase(yyruleno==139);
3667       /* (140) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */ yytestcase(yyruleno==140);
3668       /* (141) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */ yytestcase(yyruleno==141);
3669       /* (142) seltablist ::= stl_prefix LP select RP as on_using */ yytestcase(yyruleno==142);
3670       /* (143) seltablist ::= stl_prefix LP seltablist RP as on_using */ yytestcase(yyruleno==143);
3671       /* (144) dbnm ::= */ yytestcase(yyruleno==144);
3672       /* (145) dbnm ::= DOT nm */ yytestcase(yyruleno==145);
3673       /* (146) fullname ::= nm */ yytestcase(yyruleno==146);
3674       /* (147) fullname ::= nm DOT nm */ yytestcase(yyruleno==147);
3675       /* (148) xfullname ::= nm */ yytestcase(yyruleno==148);
3676       /* (149) xfullname ::= nm DOT nm */ yytestcase(yyruleno==149);
3677       /* (150) xfullname ::= nm DOT nm AS nm */ yytestcase(yyruleno==150);
3678       /* (151) xfullname ::= nm AS nm */ yytestcase(yyruleno==151);
3679       /* (152) joinop ::= COMMA|JOIN */ yytestcase(yyruleno==152);
3680       /* (153) joinop ::= JOIN_KW JOIN */ yytestcase(yyruleno==153);
3681       /* (154) joinop ::= JOIN_KW nm JOIN */ yytestcase(yyruleno==154);
3682       /* (155) joinop ::= JOIN_KW nm nm JOIN */ yytestcase(yyruleno==155);
3683       /* (156) on_using ::= ON expr */ yytestcase(yyruleno==156);
3684       /* (157) on_using ::= USING LP idlist RP */ yytestcase(yyruleno==157);
3685       /* (158) on_using ::= */ yytestcase(yyruleno==158);
3686       /* (159) indexed_opt ::= */ yytestcase(yyruleno==159);
3687       /* (160) indexed_by ::= INDEXED BY nm */ yytestcase(yyruleno==160);
3688       /* (161) indexed_by ::= NOT INDEXED */ yytestcase(yyruleno==161);
3689       /* (162) orderby_opt ::= */ yytestcase(yyruleno==162);
3690       /* (163) orderby_opt ::= ORDER BY sortlist */ yytestcase(yyruleno==163);
3691       /* (164) sortlist ::= sortlist COMMA expr sortorder nulls */ yytestcase(yyruleno==164);
3692       /* (165) sortlist ::= expr sortorder nulls */ yytestcase(yyruleno==165);
3693       /* (166) sortorder ::= ASC */ yytestcase(yyruleno==166);
3694       /* (167) sortorder ::= DESC */ yytestcase(yyruleno==167);
3695       /* (168) sortorder ::= */ yytestcase(yyruleno==168);
3696       /* (169) nulls ::= NULLS FIRST */ yytestcase(yyruleno==169);
3697       /* (170) nulls ::= NULLS LAST */ yytestcase(yyruleno==170);
3698       /* (171) nulls ::= */ yytestcase(yyruleno==171);
3699       /* (172) groupby_opt ::= */ yytestcase(yyruleno==172);
3700       /* (173) groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==173);
3701       /* (174) having_opt ::= */ yytestcase(yyruleno==174);
3702       /* (175) having_opt ::= HAVING expr */ yytestcase(yyruleno==175);
3703       /* (176) limit_opt ::= */ yytestcase(yyruleno==176);
3704       /* (177) limit_opt ::= LIMIT expr */ yytestcase(yyruleno==177);
3705       /* (178) limit_opt ::= LIMIT expr OFFSET expr */ yytestcase(yyruleno==178);
3706       /* (179) limit_opt ::= LIMIT expr COMMA expr */ yytestcase(yyruleno==179);
3707       /* (180) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */ yytestcase(yyruleno==180);
3708       /* (181) where_opt ::= */ yytestcase(yyruleno==181);
3709       /* (182) where_opt ::= WHERE expr */ yytestcase(yyruleno==182);
3710       /* (183) where_opt_ret ::= */ yytestcase(yyruleno==183);
3711       /* (184) where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==184);
3712       /* (185) where_opt_ret ::= RETURNING selcollist */ yytestcase(yyruleno==185);
3713       /* (186) where_opt_ret ::= WHERE expr RETURNING selcollist */ yytestcase(yyruleno==186);
3714       /* (187) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ yytestcase(yyruleno==187);
3715       /* (188) setlist ::= setlist COMMA nm EQ expr */ yytestcase(yyruleno==188);
3716       /* (189) setlist ::= setlist COMMA LP idlist RP EQ expr */ yytestcase(yyruleno==189);
3717       /* (190) setlist ::= nm EQ expr */ yytestcase(yyruleno==190);
3718       /* (191) setlist ::= LP idlist RP EQ expr */ yytestcase(yyruleno==191);
3719       /* (192) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */ yytestcase(yyruleno==192);
3720       /* (193) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */ yytestcase(yyruleno==193);
3721       /* (194) upsert ::= */ yytestcase(yyruleno==194);
3722       /* (195) upsert ::= RETURNING selcollist */ yytestcase(yyruleno==195);
3723       /* (196) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */ yytestcase(yyruleno==196);
3724       /* (197) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */ yytestcase(yyruleno==197);
3725       /* (198) upsert ::= ON CONFLICT DO NOTHING returning */ yytestcase(yyruleno==198);
3726       /* (199) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */ yytestcase(yyruleno==199);
3727       /* (200) returning ::= RETURNING selcollist */ yytestcase(yyruleno==200);
3728       /* (201) insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==201);
3729       /* (202) insert_cmd ::= REPLACE */ yytestcase(yyruleno==202);
3730       /* (203) idlist_opt ::= */ yytestcase(yyruleno==203);
3731       /* (204) idlist_opt ::= LP idlist RP */ yytestcase(yyruleno==204);
3732       /* (205) idlist ::= idlist COMMA nm */ yytestcase(yyruleno==205);
3733       /* (206) idlist ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=206);
3734       /* (207) expr ::= LP expr RP */ yytestcase(yyruleno==207);
3735       /* (208) expr ::= ID|INDEXED|JOIN_KW */ yytestcase(yyruleno==208);
3736       /* (209) expr ::= nm DOT nm */ yytestcase(yyruleno==209);
3737       /* (210) expr ::= nm DOT nm DOT nm */ yytestcase(yyruleno==210);
3738       /* (211) term ::= NULL|FLOAT|BLOB */ yytestcase(yyruleno==211);
3739       /* (212) term ::= STRING */ yytestcase(yyruleno==212);
3740       /* (213) term ::= INTEGER */ yytestcase(yyruleno==213);
3741       /* (214) expr ::= VARIABLE */ yytestcase(yyruleno==214);
3742       /* (215) expr ::= expr COLLATE ID|STRING */ yytestcase(yyruleno==215);
3743       /* (216) expr ::= CAST LP expr AS typetoken RP */ yytestcase(yyruleno==216);
3744       /* (217) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */ yytestcase(yyruleno==217);
3745       /* (218) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */ yytestcase(yyruleno==218);
3746       /* (219) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */ yytestcase(yyruleno==219);
3747       /* (220) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */ yytestcase(yyruleno==220);
3748       /* (221) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */ yytestcase(yyruleno==221);
3749       /* (222) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */ yytestcase(yyruleno==222);
3750       /* (223) term ::= CTIME_KW */ yytestcase(yyruleno==223);
3751       /* (224) expr ::= LP nexprlist COMMA expr RP */ yytestcase(yyruleno==224);
3752       /* (225) expr ::= expr AND expr */ yytestcase(yyruleno==225);
3753       /* (226) expr ::= expr OR expr */ yytestcase(yyruleno==226);
3754       /* (227) expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==227);
3755       /* (228) expr ::= expr EQ|NE expr */ yytestcase(yyruleno==228);
3756       /* (229) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==229);
3757       /* (230) expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==230);
3758       /* (231) expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==231);
3759       /* (232) expr ::= expr CONCAT expr */ yytestcase(yyruleno==232);
3760       /* (233) likeop ::= NOT LIKE_KW|MATCH */ yytestcase(yyruleno==233);
3761       /* (234) expr ::= expr likeop expr */ yytestcase(yyruleno==234);
3762       /* (235) expr ::= expr likeop expr ESCAPE expr */ yytestcase(yyruleno==235);
3763       /* (236) expr ::= expr ISNULL|NOTNULL */ yytestcase(yyruleno==236);
3764       /* (237) expr ::= expr NOT NULL */ yytestcase(yyruleno==237);
3765       /* (238) expr ::= expr IS expr */ yytestcase(yyruleno==238);
3766       /* (239) expr ::= expr IS NOT expr */ yytestcase(yyruleno==239);
3767       /* (240) expr ::= expr IS NOT DISTINCT FROM expr */ yytestcase(yyruleno==240);
3768       /* (241) expr ::= expr IS DISTINCT FROM expr */ yytestcase(yyruleno==241);
3769       /* (242) expr ::= NOT expr */ yytestcase(yyruleno==242);
3770       /* (243) expr ::= BITNOT expr */ yytestcase(yyruleno==243);
3771       /* (244) expr ::= PLUS|MINUS expr */ yytestcase(yyruleno==244);
3772       /* (245) expr ::= expr PTR expr */ yytestcase(yyruleno==245);
3773       /* (246) between_op ::= BETWEEN */ yytestcase(yyruleno==246);
3774       /* (247) between_op ::= NOT BETWEEN */ yytestcase(yyruleno==247);
3775       /* (248) expr ::= expr between_op expr AND expr */ yytestcase(yyruleno==248);
3776       /* (249) in_op ::= IN */ yytestcase(yyruleno==249);
3777       /* (250) in_op ::= NOT IN */ yytestcase(yyruleno==250);
3778       /* (251) expr ::= expr in_op LP exprlist RP */ yytestcase(yyruleno==251);
3779       /* (252) expr ::= LP select RP */ yytestcase(yyruleno==252);
3780       /* (253) expr ::= expr in_op LP select RP */ yytestcase(yyruleno==253);
3781       /* (254) expr ::= expr in_op nm dbnm paren_exprlist */ yytestcase(yyruleno==254);
3782       /* (255) expr ::= EXISTS LP select RP */ yytestcase(yyruleno==255);
3783       /* (256) expr ::= CASE case_operand case_exprlist case_else END */ yytestcase(yyruleno==256);
3784       /* (257) case_exprlist ::= case_exprlist WHEN expr THEN expr */ yytestcase(yyruleno==257);
3785       /* (258) case_exprlist ::= WHEN expr THEN expr */ yytestcase(yyruleno==258);
3786       /* (259) case_else ::= ELSE expr */ yytestcase(yyruleno==259);
3787       /* (260) case_else ::= */ yytestcase(yyruleno==260);
3788       /* (261) case_operand ::= */ yytestcase(yyruleno==261);
3789       /* (262) exprlist ::= */ yytestcase(yyruleno==262);
3790       /* (263) nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==263);
3791       /* (264) nexprlist ::= expr */ yytestcase(yyruleno==264);
3792       /* (265) paren_exprlist ::= */ yytestcase(yyruleno==265);
3793       /* (266) paren_exprlist ::= LP exprlist RP */ yytestcase(yyruleno==266);
3794       /* (267) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ yytestcase(yyruleno==267);
3795       /* (268) uniqueflag ::= UNIQUE */ yytestcase(yyruleno==268);
3796       /* (269) uniqueflag ::= */ yytestcase(yyruleno==269);
3797       /* (270) eidlist_opt ::= */ yytestcase(yyruleno==270);
3798       /* (271) eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==271);
3799       /* (272) eidlist ::= eidlist COMMA nm collate sortorder */ yytestcase(yyruleno==272);
3800       /* (273) eidlist ::= nm collate sortorder */ yytestcase(yyruleno==273);
3801       /* (274) collate ::= */ yytestcase(yyruleno==274);
3802       /* (275) collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==275);
3803       /* (276) cmd ::= DROP INDEX ifexists fullname */ yytestcase(yyruleno==276);
3804       /* (277) cmd ::= VACUUM vinto */ yytestcase(yyruleno==277);
3805       /* (278) cmd ::= VACUUM nm vinto */ yytestcase(yyruleno==278);
3806       /* (279) vinto ::= INTO expr */ yytestcase(yyruleno==279);
3807       /* (280) vinto ::= */ yytestcase(yyruleno==280);
3808       /* (281) cmd ::= PRAGMA nm dbnm */ yytestcase(yyruleno==281);
3809       /* (282) cmd ::= PRAGMA nm dbnm EQ nmnum */ yytestcase(yyruleno==282);
3810       /* (283) cmd ::= PRAGMA nm dbnm LP nmnum RP */ yytestcase(yyruleno==283);
3811       /* (284) cmd ::= PRAGMA nm dbnm EQ minus_num */ yytestcase(yyruleno==284);
3812       /* (285) cmd ::= PRAGMA nm dbnm LP minus_num RP */ yytestcase(yyruleno==285);
3813       /* (286) plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==286);
3814       /* (287) minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==287);
3815       /* (288) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ yytestcase(yyruleno==288);
3816       /* (289) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ yytestcase(yyruleno==289);
3817       /* (290) trigger_time ::= BEFORE|AFTER */ yytestcase(yyruleno==290);
3818       /* (291) trigger_time ::= INSTEAD OF */ yytestcase(yyruleno==291);
3819       /* (292) trigger_time ::= */ yytestcase(yyruleno==292);
3820       /* (293) trigger_event ::= DELETE|INSERT */ yytestcase(yyruleno==293);
3821       /* (294) trigger_event ::= UPDATE */ yytestcase(yyruleno==294);
3822       /* (295) trigger_event ::= UPDATE OF idlist */ yytestcase(yyruleno==295);
3823       /* (296) when_clause ::= */ yytestcase(yyruleno==296);
3824       /* (297) when_clause ::= WHEN expr */ yytestcase(yyruleno==297);
3825       /* (298) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ yytestcase(yyruleno==298);
3826       /* (299) trigger_cmd_list ::= trigger_cmd SEMI */ yytestcase(yyruleno==299);
3827       /* (300) trnm ::= nm DOT nm */ yytestcase(yyruleno==300);
3828       /* (301) tridxby ::= INDEXED BY nm */ yytestcase(yyruleno==301);
3829       /* (302) tridxby ::= NOT INDEXED */ yytestcase(yyruleno==302);
3830       /* (303) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ yytestcase(yyruleno==303);
3831       /* (304) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ yytestcase(yyruleno==304);
3832       /* (305) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ yytestcase(yyruleno==305);
3833       /* (306) trigger_cmd ::= scanpt select scanpt */ yytestcase(yyruleno==306);
3834       /* (307) expr ::= RAISE LP IGNORE RP */ yytestcase(yyruleno==307);
3835       /* (308) expr ::= RAISE LP raisetype COMMA nm RP */ yytestcase(yyruleno==308);
3836       /* (309) raisetype ::= ROLLBACK */ yytestcase(yyruleno==309);
3837       /* (310) raisetype ::= ABORT */ yytestcase(yyruleno==310);
3838       /* (311) raisetype ::= FAIL */ yytestcase(yyruleno==311);
3839       /* (312) cmd ::= DROP TRIGGER ifexists fullname */ yytestcase(yyruleno==312);
3840       /* (313) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ yytestcase(yyruleno==313);
3841       /* (314) cmd ::= DETACH database_kw_opt expr */ yytestcase(yyruleno==314);
3842       /* (315) key_opt ::= */ yytestcase(yyruleno==315);
3843       /* (316) key_opt ::= KEY expr */ yytestcase(yyruleno==316);
3844       /* (317) cmd ::= REINDEX */ yytestcase(yyruleno==317);
3845       /* (318) cmd ::= REINDEX nm dbnm */ yytestcase(yyruleno==318);
3846       /* (319) cmd ::= ANALYZE */ yytestcase(yyruleno==319);
3847       /* (320) cmd ::= ANALYZE nm dbnm */ yytestcase(yyruleno==320);
3848       /* (321) cmd ::= ALTER TABLE fullname RENAME TO nm */ yytestcase(yyruleno==321);
3849       /* (322) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ yytestcase(yyruleno==322);
3850       /* (323) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ yytestcase(yyruleno==323);
3851       /* (324) add_column_fullname ::= fullname */ yytestcase(yyruleno==324);
3852       /* (325) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ yytestcase(yyruleno==325);
3853       /* (326) cmd ::= create_vtab */ yytestcase(yyruleno==326);
3854       /* (327) cmd ::= create_vtab LP vtabarglist RP */ yytestcase(yyruleno==327);
3855       /* (328) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ yytestcase(yyruleno==328);
3856       /* (329) vtabarg ::= */ yytestcase(yyruleno==329);
3857       /* (330) vtabargtoken ::= ANY */ yytestcase(yyruleno==330);
3858       /* (331) vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==331);
3859       /* (332) lp ::= LP */ yytestcase(yyruleno==332);
3860       /* (333) with ::= WITH wqlist */ yytestcase(yyruleno==333);
3861       /* (334) with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==334);
3862       /* (335) wqas ::= AS */ yytestcase(yyruleno==335);
3863       /* (336) wqas ::= AS MATERIALIZED */ yytestcase(yyruleno==336);
3864       /* (337) wqas ::= AS NOT MATERIALIZED */ yytestcase(yyruleno==337);
3865       /* (338) wqitem ::= nm eidlist_opt wqas LP select RP */ yytestcase(yyruleno==338);
3866       /* (339) wqlist ::= wqitem (OPTIMIZED OUT) */ assert(yyruleno!=339);
3867       /* (340) wqlist ::= wqlist COMMA wqitem */ yytestcase(yyruleno==340);
3868       /* (341) windowdefn_list ::= windowdefn_list COMMA windowdefn */ yytestcase(yyruleno==341);
3869       /* (342) windowdefn ::= nm AS LP window RP */ yytestcase(yyruleno==342);
3870       /* (343) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ yytestcase(yyruleno==343);
3871       /* (344) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ yytestcase(yyruleno==344);
3872       /* (345) window ::= ORDER BY sortlist frame_opt */ yytestcase(yyruleno==345);
3873       /* (346) window ::= nm ORDER BY sortlist frame_opt */ yytestcase(yyruleno==346);
3874       /* (347) window ::= nm frame_opt */ yytestcase(yyruleno==347);
3875       /* (348) frame_opt ::= */ yytestcase(yyruleno==348);
3876       /* (349) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ yytestcase(yyruleno==349);
3877       /* (350) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ yytestcase(yyruleno==350);
3878       /* (351) range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==351);
3879       /* (352) frame_bound_s ::= frame_bound (OPTIMIZED OUT) */ assert(yyruleno!=352);
3880       /* (353) frame_bound_s ::= UNBOUNDED PRECEDING */ yytestcase(yyruleno==353);
3881       /* (354) frame_bound_e ::= frame_bound (OPTIMIZED OUT) */ assert(yyruleno!=354);
3882       /* (355) frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==355);
3883       /* (356) frame_bound ::= expr PRECEDING|FOLLOWING */ yytestcase(yyruleno==356);
3884       /* (357) frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==357);
3885       /* (358) frame_exclude_opt ::= */ yytestcase(yyruleno==358);
3886       /* (359) frame_exclude_opt ::= EXCLUDE frame_exclude */ yytestcase(yyruleno==359);
3887       /* (360) frame_exclude ::= NO OTHERS */ yytestcase(yyruleno==360);
3888       /* (361) frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==361);
3889       /* (362) frame_exclude ::= GROUP|TIES */ yytestcase(yyruleno==362);
3890       /* (363) window_clause ::= WINDOW windowdefn_list */ yytestcase(yyruleno==363);
3891       /* (364) filter_over ::= filter_clause over_clause */ yytestcase(yyruleno==364);
3892       /* (365) filter_over ::= over_clause (OPTIMIZED OUT) */ assert(yyruleno!=365);
3893       /* (366) filter_over ::= filter_clause */ yytestcase(yyruleno==366);
3894       /* (367) over_clause ::= OVER LP window RP */ yytestcase(yyruleno==367);
3895       /* (368) over_clause ::= OVER nm */ yytestcase(yyruleno==368);
3896       /* (369) filter_clause ::= FILTER LP WHERE expr RP */ yytestcase(yyruleno==369);
3897       /* (370) input ::= cmdlist */ yytestcase(yyruleno==370);
3898       /* (371) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==371);
3899       /* (372) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=372);
3900       /* (373) ecmd ::= SEMI */ yytestcase(yyruleno==373);
3901       /* (374) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==374);
3902       /* (375) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==375);
3903       /* (376) trans_opt ::= */ yytestcase(yyruleno==376);
3904       /* (377) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==377);
3905       /* (378) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==378);
3906       /* (379) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==379);
3907       /* (380) savepoint_opt ::= */ yytestcase(yyruleno==380);
3908       /* (381) cmd ::= create_table create_table_args */ yytestcase(yyruleno==381);
3909       /* (382) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=382);
3910       /* (383) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==383);
3911       /* (384) columnlist ::= columnname carglist */ yytestcase(yyruleno==384);
3912       /* (385) nm ::= ID|INDEXED|JOIN_KW */ yytestcase(yyruleno==385);
3913       /* (386) nm ::= STRING */ yytestcase(yyruleno==386);
3914       /* (387) typetoken ::= typename */ yytestcase(yyruleno==387);
3915       /* (388) typename ::= ID|STRING */ yytestcase(yyruleno==388);
3916       /* (389) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=389);
3917       /* (390) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=390);
3918       /* (391) carglist ::= carglist ccons */ yytestcase(yyruleno==391);
3919       /* (392) carglist ::= */ yytestcase(yyruleno==392);
3920       /* (393) ccons ::= NULL onconf */ yytestcase(yyruleno==393);
3921       /* (394) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==394);
3922       /* (395) ccons ::= AS generated */ yytestcase(yyruleno==395);
3923       /* (396) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==396);
3924       /* (397) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==397);
3925       /* (398) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=398);
3926       /* (399) tconscomma ::= */ yytestcase(yyruleno==399);
3927       /* (400) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=400);
3928       /* (401) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=401);
3929       /* (402) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=402);
3930       /* (403) oneselect ::= values */ yytestcase(yyruleno==403);
3931       /* (404) sclp ::= selcollist COMMA */ yytestcase(yyruleno==404);
3932       /* (405) as ::= ID|STRING */ yytestcase(yyruleno==405);
3933       /* (406) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=406);
3934       /* (407) returning ::= */ yytestcase(yyruleno==407);
3935       /* (408) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=408);
3936       /* (409) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==409);
3937       /* (410) case_operand ::= expr */ yytestcase(yyruleno==410);
3938       /* (411) exprlist ::= nexprlist */ yytestcase(yyruleno==411);
3939       /* (412) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=412);
3940       /* (413) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=413);
3941       /* (414) nmnum ::= ON */ yytestcase(yyruleno==414);
3942       /* (415) nmnum ::= DELETE */ yytestcase(yyruleno==415);
3943       /* (416) nmnum ::= DEFAULT */ yytestcase(yyruleno==416);
3944       /* (417) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==417);
3945       /* (418) foreach_clause ::= */ yytestcase(yyruleno==418);
3946       /* (419) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==419);
3947       /* (420) trnm ::= nm */ yytestcase(yyruleno==420);
3948       /* (421) tridxby ::= */ yytestcase(yyruleno==421);
3949       /* (422) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==422);
3950       /* (423) database_kw_opt ::= */ yytestcase(yyruleno==423);
3951       /* (424) kwcolumn_opt ::= */ yytestcase(yyruleno==424);
3952       /* (425) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==425);
3953       /* (426) vtabarglist ::= vtabarg */ yytestcase(yyruleno==426);
3954       /* (427) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==427);
3955       /* (428) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==428);
3956       /* (429) anylist ::= */ yytestcase(yyruleno==429);
3957       /* (430) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==430);
3958       /* (431) anylist ::= anylist ANY */ yytestcase(yyruleno==431);
3959       /* (432) with ::= */ yytestcase(yyruleno==432);
3960       /* (433) windowdefn_list ::= windowdefn (OPTIMIZED OUT) */ assert(yyruleno!=433);
3961       /* (434) window ::= frame_opt (OPTIMIZED OUT) */ assert(yyruleno!=434);
3962         break;
3963 /********** End reduce actions ************************************************/
3964   };
3965   assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
3966   yygoto = yyRuleInfoLhs[yyruleno];
3967   yysize = yyRuleInfoNRhs[yyruleno];
3968   yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
3969 
3970   /* There are no SHIFTREDUCE actions on nonterminals because the table
3971   ** generator has simplified them to pure REDUCE actions. */
3972   assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );
3973 
3974   /* It is not possible for a REDUCE to be followed by an error */
3975   assert( yyact!=YY_ERROR_ACTION );
3976 
3977   yymsp += yysize+1;
3978   yypParser->yytos = yymsp;
3979   yymsp->stateno = (YYACTIONTYPE)yyact;
3980   yymsp->major = (YYCODETYPE)yygoto;
3981   yyTraceShift(yypParser, yyact, "... then shift");
3982   return yyact;
3983 }
3984 
3985 /*
3986 ** The following code executes when the parse fails
3987 */
3988 #ifndef YYNOERRORRECOVERY
yy_parse_failed(yyParser * yypParser)3989 static void yy_parse_failed(
3990   yyParser *yypParser           /* The parser */
3991 ){
3992   PerfettoSqlParseARG_FETCH
3993   PerfettoSqlParseCTX_FETCH
3994 #ifndef NDEBUG
3995   if( yyTraceFILE ){
3996     fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
3997   }
3998 #endif
3999   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
4000   /* Here code is inserted which will be executed whenever the
4001   ** parser fails */
4002 /************ Begin %parse_failure code ***************************************/
4003 /************ End %parse_failure code *****************************************/
4004   PerfettoSqlParseARG_STORE /* Suppress warning about unused %extra_argument variable */
4005   PerfettoSqlParseCTX_STORE
4006 }
4007 #endif /* YYNOERRORRECOVERY */
4008 
4009 /*
4010 ** The following code executes when a syntax error first occurs.
4011 */
yy_syntax_error(yyParser * yypParser,int yymajor,PerfettoSqlParseTOKENTYPE yyminor)4012 static void yy_syntax_error(
4013   yyParser *yypParser,           /* The parser */
4014   int yymajor,                   /* The major type of the error token */
4015   PerfettoSqlParseTOKENTYPE yyminor         /* The minor type of the error token */
4016 ){
4017   PerfettoSqlParseARG_FETCH
4018   PerfettoSqlParseCTX_FETCH
4019 #define TOKEN yyminor
4020 /************ Begin %syntax_error code ****************************************/
4021 
4022   OnPerfettoSqlSyntaxError(state, &yyminor);
4023 /************ End %syntax_error code ******************************************/
4024   PerfettoSqlParseARG_STORE /* Suppress warning about unused %extra_argument variable */
4025   PerfettoSqlParseCTX_STORE
4026 }
4027 
4028 /*
4029 ** The following is executed when the parser accepts
4030 */
yy_accept(yyParser * yypParser)4031 static void yy_accept(
4032   yyParser *yypParser           /* The parser */
4033 ){
4034   PerfettoSqlParseARG_FETCH
4035   PerfettoSqlParseCTX_FETCH
4036 #ifndef NDEBUG
4037   if( yyTraceFILE ){
4038     fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
4039   }
4040 #endif
4041 #ifndef YYNOERRORRECOVERY
4042   yypParser->yyerrcnt = -1;
4043 #endif
4044   assert( yypParser->yytos==yypParser->yystack );
4045   /* Here code is inserted which will be executed whenever the
4046   ** parser accepts */
4047 /*********** Begin %parse_accept code *****************************************/
4048 /*********** End %parse_accept code *******************************************/
4049   PerfettoSqlParseARG_STORE /* Suppress warning about unused %extra_argument variable */
4050   PerfettoSqlParseCTX_STORE
4051 }
4052 
4053 /* The main parser program.
4054 ** The first argument is a pointer to a structure obtained from
4055 ** "PerfettoSqlParseAlloc" which describes the current state of the parser.
4056 ** The second argument is the major token number.  The third is
4057 ** the minor token.  The fourth optional argument is whatever the
4058 ** user wants (and specified in the grammar) and is available for
4059 ** use by the action routines.
4060 **
4061 ** Inputs:
4062 ** <ul>
4063 ** <li> A pointer to the parser (an opaque structure.)
4064 ** <li> The major token number.
4065 ** <li> The minor token number.
4066 ** <li> An option argument of a grammar-specified type.
4067 ** </ul>
4068 **
4069 ** Outputs:
4070 ** None.
4071 */
PerfettoSqlParse(void * yyp,int yymajor,PerfettoSqlParseTOKENTYPE yyminor PerfettoSqlParseARG_PDECL)4072 void PerfettoSqlParse(
4073   void *yyp,                   /* The parser */
4074   int yymajor,                 /* The major token code number */
4075   PerfettoSqlParseTOKENTYPE yyminor       /* The value for the token */
4076   PerfettoSqlParseARG_PDECL               /* Optional %extra_argument parameter */
4077 ){
4078   YYMINORTYPE yyminorunion;
4079   YYACTIONTYPE yyact;   /* The parser action. */
4080 #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
4081   int yyendofinput;     /* True if we are at the end of input */
4082 #endif
4083 #ifdef YYERRORSYMBOL
4084   int yyerrorhit = 0;   /* True if yymajor has invoked an error */
4085 #endif
4086   yyParser *yypParser = (yyParser*)yyp;  /* The parser */
4087   PerfettoSqlParseCTX_FETCH
4088   PerfettoSqlParseARG_STORE
4089 
4090   assert( yypParser->yytos!=0 );
4091 #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
4092   yyendofinput = (yymajor==0);
4093 #endif
4094 
4095   yyact = yypParser->yytos->stateno;
4096 #ifndef NDEBUG
4097   if( yyTraceFILE ){
4098     if( yyact < YY_MIN_REDUCE ){
4099       fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
4100               yyTracePrompt,yyTokenName[yymajor],yyact);
4101     }else{
4102       fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
4103               yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
4104     }
4105   }
4106 #endif
4107 
4108   while(1){ /* Exit by "break" */
4109     assert( yypParser->yytos>=yypParser->yystack );
4110     assert( yyact==yypParser->yytos->stateno );
4111     yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
4112     if( yyact >= YY_MIN_REDUCE ){
4113       unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
4114 #ifndef NDEBUG
4115       assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
4116       if( yyTraceFILE ){
4117         int yysize = yyRuleInfoNRhs[yyruleno];
4118         if( yysize ){
4119           fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
4120             yyTracePrompt,
4121             yyruleno, yyRuleName[yyruleno],
4122             yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
4123             yypParser->yytos[yysize].stateno);
4124         }else{
4125           fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
4126             yyTracePrompt, yyruleno, yyRuleName[yyruleno],
4127             yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
4128         }
4129       }
4130 #endif /* NDEBUG */
4131 
4132       /* Check that the stack is large enough to grow by a single entry
4133       ** if the RHS of the rule is empty.  This ensures that there is room
4134       ** enough on the stack to push the LHS value */
4135       if( yyRuleInfoNRhs[yyruleno]==0 ){
4136 #ifdef YYTRACKMAXSTACKDEPTH
4137         if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
4138           yypParser->yyhwm++;
4139           assert( yypParser->yyhwm ==
4140                   (int)(yypParser->yytos - yypParser->yystack));
4141         }
4142 #endif
4143 #if YYSTACKDEPTH>0
4144         if( yypParser->yytos>=yypParser->yystackEnd ){
4145           yyStackOverflow(yypParser);
4146           break;
4147         }
4148 #else
4149         if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
4150           if( yyGrowStack(yypParser) ){
4151             yyStackOverflow(yypParser);
4152             break;
4153           }
4154         }
4155 #endif
4156       }
4157       yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor PerfettoSqlParseCTX_PARAM);
4158     }else if( yyact <= YY_MAX_SHIFTREDUCE ){
4159       yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
4160 #ifndef YYNOERRORRECOVERY
4161       yypParser->yyerrcnt--;
4162 #endif
4163       break;
4164     }else if( yyact==YY_ACCEPT_ACTION ){
4165       yypParser->yytos--;
4166       yy_accept(yypParser);
4167       return;
4168     }else{
4169       assert( yyact == YY_ERROR_ACTION );
4170       yyminorunion.yy0 = yyminor;
4171 #ifdef YYERRORSYMBOL
4172       int yymx;
4173 #endif
4174 #ifndef NDEBUG
4175       if( yyTraceFILE ){
4176         fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
4177       }
4178 #endif
4179 #ifdef YYERRORSYMBOL
4180       /* A syntax error has occurred.
4181       ** The response to an error depends upon whether or not the
4182       ** grammar defines an error token "ERROR".
4183       **
4184       ** This is what we do if the grammar does define ERROR:
4185       **
4186       **  * Call the %syntax_error function.
4187       **
4188       **  * Begin popping the stack until we enter a state where
4189       **    it is legal to shift the error symbol, then shift
4190       **    the error symbol.
4191       **
4192       **  * Set the error count to three.
4193       **
4194       **  * Begin accepting and shifting new tokens.  No new error
4195       **    processing will occur until three tokens have been
4196       **    shifted successfully.
4197       **
4198       */
4199       if( yypParser->yyerrcnt<0 ){
4200         yy_syntax_error(yypParser,yymajor,yyminor);
4201       }
4202       yymx = yypParser->yytos->major;
4203       if( yymx==YYERRORSYMBOL || yyerrorhit ){
4204 #ifndef NDEBUG
4205         if( yyTraceFILE ){
4206           fprintf(yyTraceFILE,"%sDiscard input token %s\n",
4207              yyTracePrompt,yyTokenName[yymajor]);
4208         }
4209 #endif
4210         yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
4211         yymajor = YYNOCODE;
4212       }else{
4213         while( yypParser->yytos > yypParser->yystack ){
4214           yyact = yy_find_reduce_action(yypParser->yytos->stateno,
4215                                         YYERRORSYMBOL);
4216           if( yyact<=YY_MAX_SHIFTREDUCE ) break;
4217           yy_pop_parser_stack(yypParser);
4218         }
4219         if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
4220           yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4221           yy_parse_failed(yypParser);
4222 #ifndef YYNOERRORRECOVERY
4223           yypParser->yyerrcnt = -1;
4224 #endif
4225           yymajor = YYNOCODE;
4226         }else if( yymx!=YYERRORSYMBOL ){
4227           yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
4228         }
4229       }
4230       yypParser->yyerrcnt = 3;
4231       yyerrorhit = 1;
4232       if( yymajor==YYNOCODE ) break;
4233       yyact = yypParser->yytos->stateno;
4234 #elif defined(YYNOERRORRECOVERY)
4235       /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
4236       ** do any kind of error recovery.  Instead, simply invoke the syntax
4237       ** error routine and continue going as if nothing had happened.
4238       **
4239       ** Applications can set this macro (for example inside %include) if
4240       ** they intend to abandon the parse upon the first syntax error seen.
4241       */
4242       yy_syntax_error(yypParser,yymajor, yyminor);
4243       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4244       break;
4245 #else  /* YYERRORSYMBOL is not defined */
4246       /* This is what we do if the grammar does not define ERROR:
4247       **
4248       **  * Report an error message, and throw away the input token.
4249       **
4250       **  * If the input token is $, then fail the parse.
4251       **
4252       ** As before, subsequent error messages are suppressed until
4253       ** three input tokens have been successfully shifted.
4254       */
4255       if( yypParser->yyerrcnt<=0 ){
4256         yy_syntax_error(yypParser,yymajor, yyminor);
4257       }
4258       yypParser->yyerrcnt = 3;
4259       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4260       if( yyendofinput ){
4261         yy_parse_failed(yypParser);
4262 #ifndef YYNOERRORRECOVERY
4263         yypParser->yyerrcnt = -1;
4264 #endif
4265       }
4266       break;
4267 #endif
4268     }
4269   }
4270 #ifndef NDEBUG
4271   if( yyTraceFILE ){
4272     yyStackEntry *i;
4273     char cDiv = '[';
4274     fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
4275     for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
4276       fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
4277       cDiv = ' ';
4278     }
4279     fprintf(yyTraceFILE,"]\n");
4280   }
4281 #endif
4282   return;
4283 }
4284 
4285 /*
4286 ** Return the fallback token corresponding to canonical token iToken, or
4287 ** 0 if iToken has no fallback.
4288 */
PerfettoSqlParseFallback(int iToken)4289 int PerfettoSqlParseFallback(int iToken){
4290 #ifdef YYFALLBACK
4291   assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
4292   return yyFallback[iToken];
4293 #else
4294   (void)iToken;
4295   return 0;
4296 #endif
4297 }
4298