1
/* A Bison parser, made by GNU Bison 1.875d. */
3
/* Skeleton parser for Yacc-like parsing with Bison,
4
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330,
19
Boston, MA 02111-1307, USA. */
21
/* As a special exception, when this file is copied by Bison into a
22
Bison output file, you may use that output file without restriction.
23
This special exception was added by the Free Software Foundation
24
in version 1.24 of Bison. */
26
/* Written by Richard Stallman by simplifying the original so called
27
``semantic'' parser. */
29
/* All symbols defined below should begin with yy or YY, to avoid
30
infringing on user name space. This should be done even for local
31
variables, as they might otherwise be expanded by user macros.
32
There are some unavoidable exceptions within include files to
33
define necessary library symbols; they are noted "INFRINGES ON
34
USER NAME SPACE" below. */
36
/* Identify Bison output. */
40
#define YYSKELETON_NAME "yacc.c"
45
/* Using locations. */
46
#define YYLSP_NEEDED 0
53
/* Put the tokens into the symbol table, so that GDB and other debuggers
59
PARS_FIXBINARY_LIT = 261,
69
PARS_PROCEDURE_TOKEN = 271,
72
PARS_BINARY_TOKEN = 274,
73
PARS_BLOB_TOKEN = 275,
75
PARS_INTEGER_TOKEN = 277,
76
PARS_FLOAT_TOKEN = 278,
77
PARS_CHAR_TOKEN = 279,
79
PARS_BEGIN_TOKEN = 281,
82
PARS_THEN_TOKEN = 284,
83
PARS_ELSE_TOKEN = 285,
84
PARS_ELSIF_TOKEN = 286,
85
PARS_LOOP_TOKEN = 287,
86
PARS_WHILE_TOKEN = 288,
87
PARS_RETURN_TOKEN = 289,
88
PARS_SELECT_TOKEN = 290,
90
PARS_COUNT_TOKEN = 292,
91
PARS_DISTINCT_TOKEN = 293,
92
PARS_FROM_TOKEN = 294,
93
PARS_WHERE_TOKEN = 295,
95
PARS_DDOT_TOKEN = 297,
96
PARS_READ_TOKEN = 298,
97
PARS_ORDER_TOKEN = 299,
100
PARS_DESC_TOKEN = 302,
101
PARS_INSERT_TOKEN = 303,
102
PARS_INTO_TOKEN = 304,
103
PARS_VALUES_TOKEN = 305,
104
PARS_UPDATE_TOKEN = 306,
105
PARS_SET_TOKEN = 307,
106
PARS_DELETE_TOKEN = 308,
107
PARS_CURRENT_TOKEN = 309,
109
PARS_CREATE_TOKEN = 311,
110
PARS_TABLE_TOKEN = 312,
111
PARS_INDEX_TOKEN = 313,
112
PARS_UNIQUE_TOKEN = 314,
113
PARS_CLUSTERED_TOKEN = 315,
114
PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 316,
116
PARS_ASSIGN_TOKEN = 318,
117
PARS_DECLARE_TOKEN = 319,
118
PARS_CURSOR_TOKEN = 320,
119
PARS_SQL_TOKEN = 321,
120
PARS_OPEN_TOKEN = 322,
121
PARS_FETCH_TOKEN = 323,
122
PARS_CLOSE_TOKEN = 324,
123
PARS_NOTFOUND_TOKEN = 325,
124
PARS_TO_CHAR_TOKEN = 326,
125
PARS_TO_NUMBER_TOKEN = 327,
126
PARS_TO_BINARY_TOKEN = 328,
127
PARS_BINARY_TO_NUMBER_TOKEN = 329,
128
PARS_SUBSTR_TOKEN = 330,
129
PARS_REPLSTR_TOKEN = 331,
130
PARS_CONCAT_TOKEN = 332,
131
PARS_INSTR_TOKEN = 333,
132
PARS_LENGTH_TOKEN = 334,
133
PARS_SYSDATE_TOKEN = 335,
134
PARS_PRINTF_TOKEN = 336,
135
PARS_ASSERT_TOKEN = 337,
136
PARS_RND_TOKEN = 338,
137
PARS_RND_STR_TOKEN = 339,
138
PARS_ROW_PRINTF_TOKEN = 340,
139
PARS_COMMIT_TOKEN = 341,
140
PARS_ROLLBACK_TOKEN = 342,
141
PARS_WORK_TOKEN = 343,
142
PARS_UNSIGNED_TOKEN = 344,
143
PARS_EXIT_TOKEN = 345,
144
PARS_FUNCTION_TOKEN = 346,
145
PARS_LOCK_TOKEN = 347,
146
PARS_SHARE_TOKEN = 348,
147
PARS_MODE_TOKEN = 349,
151
#define PARS_INT_LIT 258
152
#define PARS_FLOAT_LIT 259
153
#define PARS_STR_LIT 260
154
#define PARS_FIXBINARY_LIT 261
155
#define PARS_BLOB_LIT 262
156
#define PARS_NULL_LIT 263
157
#define PARS_ID_TOKEN 264
158
#define PARS_AND_TOKEN 265
159
#define PARS_OR_TOKEN 266
160
#define PARS_NOT_TOKEN 267
161
#define PARS_GE_TOKEN 268
162
#define PARS_LE_TOKEN 269
163
#define PARS_NE_TOKEN 270
164
#define PARS_PROCEDURE_TOKEN 271
165
#define PARS_IN_TOKEN 272
166
#define PARS_OUT_TOKEN 273
167
#define PARS_BINARY_TOKEN 274
168
#define PARS_BLOB_TOKEN 275
169
#define PARS_INT_TOKEN 276
170
#define PARS_INTEGER_TOKEN 277
171
#define PARS_FLOAT_TOKEN 278
172
#define PARS_CHAR_TOKEN 279
173
#define PARS_IS_TOKEN 280
174
#define PARS_BEGIN_TOKEN 281
175
#define PARS_END_TOKEN 282
176
#define PARS_IF_TOKEN 283
177
#define PARS_THEN_TOKEN 284
178
#define PARS_ELSE_TOKEN 285
179
#define PARS_ELSIF_TOKEN 286
180
#define PARS_LOOP_TOKEN 287
181
#define PARS_WHILE_TOKEN 288
182
#define PARS_RETURN_TOKEN 289
183
#define PARS_SELECT_TOKEN 290
184
#define PARS_SUM_TOKEN 291
185
#define PARS_COUNT_TOKEN 292
186
#define PARS_DISTINCT_TOKEN 293
187
#define PARS_FROM_TOKEN 294
188
#define PARS_WHERE_TOKEN 295
189
#define PARS_FOR_TOKEN 296
190
#define PARS_DDOT_TOKEN 297
191
#define PARS_READ_TOKEN 298
192
#define PARS_ORDER_TOKEN 299
193
#define PARS_BY_TOKEN 300
194
#define PARS_ASC_TOKEN 301
195
#define PARS_DESC_TOKEN 302
196
#define PARS_INSERT_TOKEN 303
197
#define PARS_INTO_TOKEN 304
198
#define PARS_VALUES_TOKEN 305
199
#define PARS_UPDATE_TOKEN 306
200
#define PARS_SET_TOKEN 307
201
#define PARS_DELETE_TOKEN 308
202
#define PARS_CURRENT_TOKEN 309
203
#define PARS_OF_TOKEN 310
204
#define PARS_CREATE_TOKEN 311
205
#define PARS_TABLE_TOKEN 312
206
#define PARS_INDEX_TOKEN 313
207
#define PARS_UNIQUE_TOKEN 314
208
#define PARS_CLUSTERED_TOKEN 315
209
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 316
210
#define PARS_ON_TOKEN 317
211
#define PARS_ASSIGN_TOKEN 318
212
#define PARS_DECLARE_TOKEN 319
213
#define PARS_CURSOR_TOKEN 320
214
#define PARS_SQL_TOKEN 321
215
#define PARS_OPEN_TOKEN 322
216
#define PARS_FETCH_TOKEN 323
217
#define PARS_CLOSE_TOKEN 324
218
#define PARS_NOTFOUND_TOKEN 325
219
#define PARS_TO_CHAR_TOKEN 326
220
#define PARS_TO_NUMBER_TOKEN 327
221
#define PARS_TO_BINARY_TOKEN 328
222
#define PARS_BINARY_TO_NUMBER_TOKEN 329
223
#define PARS_SUBSTR_TOKEN 330
224
#define PARS_REPLSTR_TOKEN 331
225
#define PARS_CONCAT_TOKEN 332
226
#define PARS_INSTR_TOKEN 333
227
#define PARS_LENGTH_TOKEN 334
228
#define PARS_SYSDATE_TOKEN 335
229
#define PARS_PRINTF_TOKEN 336
230
#define PARS_ASSERT_TOKEN 337
231
#define PARS_RND_TOKEN 338
232
#define PARS_RND_STR_TOKEN 339
233
#define PARS_ROW_PRINTF_TOKEN 340
234
#define PARS_COMMIT_TOKEN 341
235
#define PARS_ROLLBACK_TOKEN 342
236
#define PARS_WORK_TOKEN 343
237
#define PARS_UNSIGNED_TOKEN 344
238
#define PARS_EXIT_TOKEN 345
239
#define PARS_FUNCTION_TOKEN 346
240
#define PARS_LOCK_TOKEN 347
241
#define PARS_SHARE_TOKEN 348
242
#define PARS_MODE_TOKEN 349
248
/* Copy the first part of user declarations. */
249
#line 13 "pars0grm.y"
251
/* The value of the semantic attribute is a pointer to a query tree node
255
#include <math.h> /* Can't be before univ.i */
256
#include "pars0pars.h"
258
#include "que0types.h"
262
#define YYSTYPE que_node_t*
264
/* #define __STDC__ */
270
/* Enabling traces. */
275
/* Enabling verbose error messages. */
276
#ifdef YYERROR_VERBOSE
277
# undef YYERROR_VERBOSE
278
# define YYERROR_VERBOSE 1
280
# define YYERROR_VERBOSE 0
283
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
285
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
286
# define YYSTYPE_IS_DECLARED 1
287
# define YYSTYPE_IS_TRIVIAL 1
292
/* Copy the second part of user declarations. */
295
/* Line 214 of yacc.c. */
296
#line 297 "pars0grm.tab.c"
298
#if ! defined (yyoverflow) || YYERROR_VERBOSE
304
# define YYMALLOC malloc
307
/* The parser invokes alloca or malloc; define the necessary symbols. */
309
# ifdef YYSTACK_USE_ALLOCA
310
# if YYSTACK_USE_ALLOCA
311
# define YYSTACK_ALLOC alloca
314
# if defined (alloca) || defined (_ALLOCA_H)
315
# define YYSTACK_ALLOC alloca
318
# define YYSTACK_ALLOC __builtin_alloca
323
# ifdef YYSTACK_ALLOC
324
/* Pacify GCC's `empty if-body' warning. */
325
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
327
# if defined (__STDC__) || defined (__cplusplus)
328
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
329
# define YYSIZE_T size_t
331
# define YYSTACK_ALLOC YYMALLOC
332
# define YYSTACK_FREE YYFREE
334
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
337
#if (! defined (yyoverflow) \
338
&& (! defined (__cplusplus) \
339
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
341
/* A type that is properly aligned for any stack member. */
348
/* The size of the maximum gap between one aligned stack and the next. */
349
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
351
/* The size of an array large to enough to hold all stacks, each with
353
# define YYSTACK_BYTES(N) \
354
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
355
+ YYSTACK_GAP_MAXIMUM)
357
/* Copy COUNT objects from FROM to TO. The source and destination do
360
# if defined (__GNUC__) && 1 < __GNUC__
361
# define YYCOPY(To, From, Count) \
362
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
364
# define YYCOPY(To, From, Count) \
367
register YYSIZE_T yyi; \
368
for (yyi = 0; yyi < (Count); yyi++) \
369
(To)[yyi] = (From)[yyi]; \
375
/* Relocate STACK from its old location to the new one. The
376
local variables YYSIZE and YYSTACKSIZE give the old and new number of
377
elements in the stack, and YYPTR gives the new location of the
378
stack. Advance YYPTR to a properly aligned location for the next
380
# define YYSTACK_RELOCATE(Stack) \
383
YYSIZE_T yynewbytes; \
384
YYCOPY (&yyptr->Stack, Stack, yysize); \
385
Stack = &yyptr->Stack; \
386
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
387
yyptr += yynewbytes / sizeof (*yyptr); \
393
#if defined (__STDC__) || defined (__cplusplus)
394
typedef signed char yysigned_char;
396
typedef short int yysigned_char;
399
/* YYFINAL -- State number of the termination state. */
401
/* YYLAST -- Last index in YYTABLE. */
404
/* YYNTOKENS -- Number of terminals. */
405
#define YYNTOKENS 111
406
/* YYNNTS -- Number of nonterminals. */
408
/* YYNRULES -- Number of rules. */
410
/* YYNRULES -- Number of states. */
411
#define YYNSTATES 339
413
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
415
#define YYMAXUTOK 350
417
#define YYTRANSLATE(YYX) \
418
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
420
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
421
static const unsigned char yytranslate[] =
423
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426
2, 2, 2, 2, 2, 2, 2, 103, 2, 2,
427
105, 106, 100, 99, 108, 98, 2, 101, 2, 2,
428
2, 2, 2, 2, 2, 2, 2, 2, 2, 104,
429
96, 95, 97, 107, 2, 2, 2, 2, 2, 2,
430
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435
2, 2, 2, 109, 2, 110, 2, 2, 2, 2,
436
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
449
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
450
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
451
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
452
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
453
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
454
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
455
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
456
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
457
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
462
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
464
static const unsigned short int yyprhs[] =
466
0, 0, 3, 6, 8, 11, 14, 17, 20, 23,
467
26, 29, 32, 35, 38, 41, 44, 47, 50, 53,
468
56, 59, 62, 65, 68, 71, 73, 76, 78, 83,
469
85, 87, 89, 91, 93, 95, 97, 101, 105, 109,
470
113, 116, 120, 124, 128, 132, 136, 140, 144, 148,
471
152, 155, 159, 163, 165, 167, 169, 171, 173, 175,
472
177, 179, 181, 183, 185, 186, 188, 192, 199, 204,
473
206, 208, 210, 214, 216, 220, 221, 223, 227, 228,
474
230, 234, 236, 241, 247, 252, 253, 255, 259, 261,
475
265, 267, 268, 271, 272, 275, 276, 281, 282, 284,
476
286, 287, 292, 301, 305, 311, 314, 318, 320, 324,
477
329, 334, 337, 340, 344, 347, 350, 353, 357, 362,
478
364, 367, 368, 371, 373, 381, 388, 399, 401, 403,
479
406, 409, 414, 419, 425, 427, 431, 432, 436, 437,
480
439, 440, 443, 444, 446, 454, 456, 460, 461, 463,
481
464, 466, 477, 480, 483, 485, 487, 489, 491, 493,
482
497, 501, 502, 504, 508, 512, 513, 515, 518, 525,
483
530, 532, 534, 535, 537, 540
486
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
487
static const short int yyrhs[] =
489
112, 0, -1, 180, 104, -1, 118, -1, 119, 104,
490
-1, 151, 104, -1, 152, 104, -1, 153, 104, -1,
491
150, 104, -1, 154, 104, -1, 146, 104, -1, 133,
492
104, -1, 135, 104, -1, 145, 104, -1, 143, 104,
493
-1, 144, 104, -1, 140, 104, -1, 141, 104, -1,
494
155, 104, -1, 157, 104, -1, 156, 104, -1, 169,
495
104, -1, 170, 104, -1, 164, 104, -1, 168, 104,
496
-1, 113, -1, 114, 113, -1, 9, -1, 116, 105,
497
124, 106, -1, 3, -1, 4, -1, 5, -1, 6,
498
-1, 7, -1, 8, -1, 66, -1, 115, 99, 115,
499
-1, 115, 98, 115, -1, 115, 100, 115, -1, 115,
500
101, 115, -1, 98, 115, -1, 105, 115, 106, -1,
501
115, 95, 115, -1, 115, 96, 115, -1, 115, 97,
502
115, -1, 115, 13, 115, -1, 115, 14, 115, -1,
503
115, 15, 115, -1, 115, 10, 115, -1, 115, 11,
504
115, -1, 12, 115, -1, 9, 103, 70, -1, 66,
505
103, 70, -1, 71, -1, 72, -1, 73, -1, 74,
506
-1, 75, -1, 77, -1, 78, -1, 79, -1, 80,
507
-1, 83, -1, 84, -1, -1, 107, -1, 117, 108,
508
107, -1, 109, 9, 105, 117, 106, 110, -1, 120,
509
105, 124, 106, -1, 76, -1, 81, -1, 82, -1,
510
9, 105, 106, -1, 9, -1, 122, 108, 9, -1,
511
-1, 9, -1, 123, 108, 9, -1, -1, 115, -1,
512
124, 108, 115, -1, 115, -1, 37, 105, 100, 106,
513
-1, 37, 105, 38, 9, 106, -1, 36, 105, 115,
514
106, -1, -1, 125, -1, 126, 108, 125, -1, 100,
515
-1, 126, 49, 123, -1, 126, -1, -1, 40, 115,
516
-1, -1, 41, 51, -1, -1, 92, 17, 93, 94,
517
-1, -1, 46, -1, 47, -1, -1, 44, 45, 9,
518
131, -1, 35, 127, 39, 122, 128, 129, 130, 132,
519
-1, 48, 49, 9, -1, 134, 50, 105, 124, 106,
520
-1, 134, 133, -1, 9, 95, 115, -1, 136, -1,
521
137, 108, 136, -1, 40, 54, 55, 9, -1, 51,
522
9, 52, 137, -1, 139, 128, -1, 139, 138, -1,
523
53, 39, 9, -1, 142, 128, -1, 142, 138, -1,
524
85, 133, -1, 9, 63, 115, -1, 31, 115, 29,
525
114, -1, 147, -1, 148, 147, -1, -1, 30, 114,
526
-1, 148, -1, 28, 115, 29, 114, 149, 27, 28,
527
-1, 33, 115, 32, 114, 27, 32, -1, 41, 9,
528
17, 115, 42, 115, 32, 114, 27, 32, -1, 90,
529
-1, 34, -1, 67, 9, -1, 69, 9, -1, 68,
530
9, 49, 123, -1, 68, 9, 49, 121, -1, 9,
531
171, 160, 161, 162, -1, 158, -1, 159, 108, 158,
532
-1, -1, 105, 3, 106, -1, -1, 89, -1, -1,
533
12, 8, -1, -1, 61, -1, 56, 57, 9, 105,
534
159, 106, 163, -1, 9, -1, 165, 108, 9, -1,
535
-1, 59, -1, -1, 60, -1, 56, 166, 167, 58,
536
9, 62, 9, 105, 165, 106, -1, 86, 88, -1,
537
87, 88, -1, 21, -1, 22, -1, 24, -1, 19,
538
-1, 20, -1, 9, 17, 171, -1, 9, 18, 171,
539
-1, -1, 172, -1, 173, 108, 172, -1, 9, 171,
540
104, -1, -1, 174, -1, 175, 174, -1, 64, 65,
541
9, 25, 133, 104, -1, 64, 91, 9, 104, -1,
542
176, -1, 177, -1, -1, 178, -1, 179, 178, -1,
543
16, 9, 105, 173, 106, 25, 175, 179, 26, 114,
547
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
548
static const unsigned short int yyrline[] =
550
0, 138, 138, 141, 142, 143, 144, 145, 146, 147,
551
148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
552
158, 159, 160, 161, 162, 166, 167, 172, 173, 175,
553
176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
554
186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
555
196, 197, 199, 204, 205, 206, 207, 209, 210, 211,
556
212, 213, 214, 215, 218, 220, 221, 225, 230, 235,
557
236, 237, 241, 245, 246, 251, 252, 253, 258, 259,
558
260, 264, 265, 270, 276, 283, 284, 285, 290, 292,
559
294, 298, 299, 303, 304, 309, 310, 315, 316, 317,
560
321, 322, 327, 337, 342, 344, 349, 353, 354, 359,
561
365, 372, 377, 382, 388, 393, 398, 403, 408, 414,
562
415, 420, 421, 423, 427, 434, 440, 448, 452, 456,
563
462, 468, 470, 475, 480, 481, 486, 487, 492, 493,
564
499, 500, 506, 507, 513, 519, 520, 525, 526, 530,
565
531, 535, 543, 548, 553, 554, 555, 556, 557, 561,
566
564, 570, 571, 572, 577, 581, 583, 584, 588, 594,
567
599, 600, 603, 605, 606, 610
571
#if YYDEBUG || YYERROR_VERBOSE
572
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
573
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
574
static const char *const yytname[] =
576
"$end", "error", "$undefined", "PARS_INT_LIT", "PARS_FLOAT_LIT",
577
"PARS_STR_LIT", "PARS_FIXBINARY_LIT", "PARS_BLOB_LIT", "PARS_NULL_LIT",
578
"PARS_ID_TOKEN", "PARS_AND_TOKEN", "PARS_OR_TOKEN", "PARS_NOT_TOKEN",
579
"PARS_GE_TOKEN", "PARS_LE_TOKEN", "PARS_NE_TOKEN",
580
"PARS_PROCEDURE_TOKEN", "PARS_IN_TOKEN", "PARS_OUT_TOKEN",
581
"PARS_BINARY_TOKEN", "PARS_BLOB_TOKEN", "PARS_INT_TOKEN",
582
"PARS_INTEGER_TOKEN", "PARS_FLOAT_TOKEN", "PARS_CHAR_TOKEN",
583
"PARS_IS_TOKEN", "PARS_BEGIN_TOKEN", "PARS_END_TOKEN", "PARS_IF_TOKEN",
584
"PARS_THEN_TOKEN", "PARS_ELSE_TOKEN", "PARS_ELSIF_TOKEN",
585
"PARS_LOOP_TOKEN", "PARS_WHILE_TOKEN", "PARS_RETURN_TOKEN",
586
"PARS_SELECT_TOKEN", "PARS_SUM_TOKEN", "PARS_COUNT_TOKEN",
587
"PARS_DISTINCT_TOKEN", "PARS_FROM_TOKEN", "PARS_WHERE_TOKEN",
588
"PARS_FOR_TOKEN", "PARS_DDOT_TOKEN", "PARS_READ_TOKEN",
589
"PARS_ORDER_TOKEN", "PARS_BY_TOKEN", "PARS_ASC_TOKEN", "PARS_DESC_TOKEN",
590
"PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", "PARS_VALUES_TOKEN",
591
"PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", "PARS_DELETE_TOKEN",
592
"PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", "PARS_CREATE_TOKEN",
593
"PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", "PARS_UNIQUE_TOKEN",
594
"PARS_CLUSTERED_TOKEN", "PARS_DOES_NOT_FIT_IN_MEM_TOKEN",
595
"PARS_ON_TOKEN", "PARS_ASSIGN_TOKEN", "PARS_DECLARE_TOKEN",
596
"PARS_CURSOR_TOKEN", "PARS_SQL_TOKEN", "PARS_OPEN_TOKEN",
597
"PARS_FETCH_TOKEN", "PARS_CLOSE_TOKEN", "PARS_NOTFOUND_TOKEN",
598
"PARS_TO_CHAR_TOKEN", "PARS_TO_NUMBER_TOKEN", "PARS_TO_BINARY_TOKEN",
599
"PARS_BINARY_TO_NUMBER_TOKEN", "PARS_SUBSTR_TOKEN", "PARS_REPLSTR_TOKEN",
600
"PARS_CONCAT_TOKEN", "PARS_INSTR_TOKEN", "PARS_LENGTH_TOKEN",
601
"PARS_SYSDATE_TOKEN", "PARS_PRINTF_TOKEN", "PARS_ASSERT_TOKEN",
602
"PARS_RND_TOKEN", "PARS_RND_STR_TOKEN", "PARS_ROW_PRINTF_TOKEN",
603
"PARS_COMMIT_TOKEN", "PARS_ROLLBACK_TOKEN", "PARS_WORK_TOKEN",
604
"PARS_UNSIGNED_TOKEN", "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN",
605
"PARS_LOCK_TOKEN", "PARS_SHARE_TOKEN", "PARS_MODE_TOKEN", "'='", "'<'",
606
"'>'", "'-'", "'+'", "'*'", "'/'", "NEG", "'%'", "';'", "'('", "')'",
607
"'?'", "','", "'{'", "'}'", "$accept", "top_statement", "statement",
608
"statement_list", "exp", "function_name", "question_mark_list",
609
"stored_procedure_call", "predefined_procedure_call",
610
"predefined_procedure_name", "user_function_call", "table_list",
611
"variable_list", "exp_list", "select_item", "select_item_list",
612
"select_list", "search_condition", "for_update_clause",
613
"lock_shared_clause", "order_direction", "order_by_clause",
614
"select_statement", "insert_statement_start", "insert_statement",
615
"column_assignment", "column_assignment_list", "cursor_positioned",
616
"update_statement_start", "update_statement_searched",
617
"update_statement_positioned", "delete_statement_start",
618
"delete_statement_searched", "delete_statement_positioned",
619
"row_printf_statement", "assignment_statement", "elsif_element",
620
"elsif_list", "else_part", "if_statement", "while_statement",
621
"for_statement", "exit_statement", "return_statement",
622
"open_cursor_statement", "close_cursor_statement", "fetch_statement",
623
"column_def", "column_def_list", "opt_column_len", "opt_unsigned",
624
"opt_not_null", "not_fit_in_memory", "create_table", "column_list",
625
"unique_def", "clustered_def", "create_index", "commit_statement",
626
"rollback_statement", "type_name", "parameter_declaration",
627
"parameter_declaration_list", "variable_declaration",
628
"variable_declaration_list", "cursor_declaration",
629
"function_declaration", "declaration", "declaration_list",
630
"procedure_definition", 0
635
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
637
static const unsigned short int yytoknum[] =
639
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
640
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
641
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
642
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
643
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
644
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
645
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
646
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
647
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
648
345, 346, 347, 348, 349, 61, 60, 62, 45, 43,
649
42, 47, 350, 37, 59, 40, 41, 63, 44, 123,
654
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
655
static const unsigned char yyr1[] =
657
0, 111, 112, 113, 113, 113, 113, 113, 113, 113,
658
113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
659
113, 113, 113, 113, 113, 114, 114, 115, 115, 115,
660
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
661
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
662
115, 115, 115, 116, 116, 116, 116, 116, 116, 116,
663
116, 116, 116, 116, 117, 117, 117, 118, 119, 120,
664
120, 120, 121, 122, 122, 123, 123, 123, 124, 124,
665
124, 125, 125, 125, 125, 126, 126, 126, 127, 127,
666
127, 128, 128, 129, 129, 130, 130, 131, 131, 131,
667
132, 132, 133, 134, 135, 135, 136, 137, 137, 138,
668
139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
669
148, 149, 149, 149, 150, 151, 152, 153, 154, 155,
670
156, 157, 157, 158, 159, 159, 160, 160, 161, 161,
671
162, 162, 163, 163, 164, 165, 165, 166, 166, 167,
672
167, 168, 169, 170, 171, 171, 171, 171, 171, 172,
673
172, 173, 173, 173, 174, 175, 175, 175, 176, 177,
674
178, 178, 179, 179, 179, 180
677
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
678
static const unsigned char yyr2[] =
680
0, 2, 2, 1, 2, 2, 2, 2, 2, 2,
681
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
682
2, 2, 2, 2, 2, 1, 2, 1, 4, 1,
683
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
684
2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
685
2, 3, 3, 1, 1, 1, 1, 1, 1, 1,
686
1, 1, 1, 1, 0, 1, 3, 6, 4, 1,
687
1, 1, 3, 1, 3, 0, 1, 3, 0, 1,
688
3, 1, 4, 5, 4, 0, 1, 3, 1, 3,
689
1, 0, 2, 0, 2, 0, 4, 0, 1, 1,
690
0, 4, 8, 3, 5, 2, 3, 1, 3, 4,
691
4, 2, 2, 3, 2, 2, 2, 3, 4, 1,
692
2, 0, 2, 1, 7, 6, 10, 1, 1, 2,
693
2, 4, 4, 5, 1, 3, 0, 3, 0, 1,
694
0, 2, 0, 1, 7, 1, 3, 0, 1, 0,
695
1, 10, 2, 2, 1, 1, 1, 1, 1, 3,
696
3, 0, 1, 3, 3, 0, 1, 2, 6, 4,
700
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
701
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
702
means the default is an error. */
703
static const unsigned char yydefact[] =
705
0, 0, 0, 0, 0, 1, 2, 161, 0, 162,
706
0, 0, 0, 0, 0, 157, 158, 154, 155, 156,
707
159, 160, 165, 163, 0, 166, 172, 0, 0, 167,
708
170, 171, 173, 0, 164, 0, 0, 0, 174, 0,
709
0, 0, 0, 0, 128, 85, 0, 0, 0, 0,
710
147, 0, 0, 0, 69, 70, 71, 0, 0, 0,
711
127, 0, 25, 0, 3, 0, 0, 0, 0, 0,
712
91, 0, 0, 91, 0, 0, 0, 0, 0, 0,
713
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
714
0, 169, 0, 29, 30, 31, 32, 33, 34, 27,
715
0, 35, 53, 54, 55, 56, 57, 58, 59, 60,
716
61, 62, 63, 0, 0, 0, 0, 0, 0, 0,
717
88, 81, 86, 90, 0, 0, 0, 0, 0, 0,
718
148, 149, 129, 0, 130, 116, 152, 153, 0, 175,
719
26, 4, 78, 11, 0, 105, 12, 0, 111, 112,
720
16, 17, 114, 115, 14, 15, 13, 10, 8, 5,
721
6, 7, 9, 18, 20, 19, 23, 24, 21, 22,
722
0, 117, 0, 50, 0, 40, 0, 0, 0, 0,
723
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
724
78, 0, 0, 0, 75, 0, 0, 0, 103, 0,
725
113, 0, 150, 0, 75, 64, 79, 0, 78, 0,
726
92, 168, 51, 52, 41, 48, 49, 45, 46, 47,
727
121, 42, 43, 44, 37, 36, 38, 39, 0, 0,
728
0, 0, 0, 76, 89, 87, 73, 91, 0, 0,
729
107, 110, 0, 0, 76, 132, 131, 65, 0, 68,
730
0, 0, 0, 0, 0, 119, 123, 0, 28, 0,
731
84, 0, 82, 0, 0, 0, 93, 0, 0, 0,
732
0, 134, 0, 0, 0, 0, 0, 80, 104, 109,
733
122, 0, 120, 0, 125, 83, 77, 74, 0, 95,
734
0, 106, 108, 136, 142, 0, 0, 72, 67, 66,
735
0, 124, 94, 0, 100, 0, 0, 138, 143, 144,
736
135, 0, 118, 0, 0, 102, 0, 0, 139, 140,
737
0, 0, 0, 0, 137, 0, 133, 145, 0, 96,
738
97, 126, 141, 151, 0, 98, 99, 101, 146
741
/* YYDEFGOTO[NTERM-NUM]. */
742
static const short int yydefgoto[] =
744
-1, 2, 62, 63, 206, 116, 248, 64, 65, 66,
745
245, 237, 234, 207, 122, 123, 124, 148, 289, 304,
746
337, 315, 67, 68, 69, 240, 241, 149, 70, 71,
747
72, 73, 74, 75, 76, 77, 255, 256, 257, 78,
748
79, 80, 81, 82, 83, 84, 85, 271, 272, 307,
749
319, 326, 309, 86, 328, 131, 203, 87, 88, 89,
750
20, 9, 10, 25, 26, 30, 31, 32, 33, 3
753
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
755
#define YYPACT_NINF -177
756
static const short int yypact[] =
758
28, 38, 54, -46, -29, -177, -177, 56, 50, -177,
759
-75, 8, 8, 46, 56, -177, -177, -177, -177, -177,
760
-177, -177, 63, -177, 8, -177, 2, -26, -51, -177,
761
-177, -177, -177, -13, -177, 71, 72, 587, -177, 57,
762
-21, 26, 272, 272, -177, 13, 91, 55, 96, 67,
763
-22, 99, 100, 103, -177, -177, -177, 75, 29, 35,
764
-177, 116, -177, 396, -177, 22, 23, 27, -9, 30,
765
87, 31, 32, 87, 47, 49, 52, 58, 59, 60,
766
61, 62, 65, 66, 74, 77, 78, 86, 89, 102,
767
75, -177, 272, -177, -177, -177, -177, -177, -177, 39,
768
272, 51, -177, -177, -177, -177, -177, -177, -177, -177,
769
-177, -177, -177, 272, 272, 361, 25, 489, 45, 90,
770
-177, 651, -177, -39, 93, 142, 124, 108, 152, 170,
771
-177, 131, -177, 143, -177, -177, -177, -177, 98, -177,
772
-177, -177, 272, -177, 110, -177, -177, 256, -177, -177,
773
-177, -177, -177, -177, -177, -177, -177, -177, -177, -177,
774
-177, -177, -177, -177, -177, -177, -177, -177, -177, -177,
775
112, 651, 137, 101, 147, 204, 88, 272, 272, 272,
776
272, 272, 587, 272, 272, 272, 272, 272, 272, 272,
777
272, 587, 272, -30, 211, 168, 212, 272, -177, 213,
778
-177, 118, -177, 167, 217, 122, 651, -63, 272, 175,
779
651, -177, -177, -177, -177, 101, 101, 21, 21, 651,
780
332, 21, 21, 21, -6, -6, 204, 204, -60, 460,
781
198, 222, 126, -177, 125, -177, -177, -33, 584, 140,
782
-177, 128, 228, 229, 139, -177, 125, -177, -53, -177,
783
272, -49, 240, 587, 272, -177, 224, 226, -177, 225,
784
-177, 150, -177, 258, 272, 260, 230, 272, 272, 213,
785
8, -177, -45, 208, 166, 164, 176, 651, -177, -177,
786
587, 631, -177, 254, -177, -177, -177, -177, 234, 194,
787
638, 651, -177, 182, 227, 228, 280, -177, -177, -177,
788
587, -177, -177, 273, 247, 587, 289, 214, -177, -177,
789
-177, 195, 587, 209, 261, -177, 524, 199, -177, 295,
790
292, 215, 299, 279, -177, 304, -177, -177, -44, -177,
791
-8, -177, -177, -177, 305, -177, -177, -177, -177
794
/* YYPGOTO[NTERM-NUM]. */
795
static const short int yypgoto[] =
797
-177, -177, -62, -176, -40, -177, -177, -177, -177, -177,
798
-177, -177, 109, -166, 120, -177, -177, -69, -177, -177,
799
-177, -177, -34, -177, -177, 48, -177, 243, -177, -177,
800
-177, -177, -177, -177, -177, -177, 64, -177, -177, -177,
801
-177, -177, -177, -177, -177, -177, -177, 24, -177, -177,
802
-177, -177, -177, -177, -177, -177, -177, -177, -177, -177,
803
-12, 307, -177, 297, -177, -177, -177, 285, -177, -177
806
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
807
positive, shift that token. If negative, reduce the rule which
808
number is the opposite. If zero, do what YYDEFACT says.
809
If YYTABLE_NINF, syntax error. */
810
#define YYTABLE_NINF -1
811
static const unsigned short int yytable[] =
813
21, 140, 115, 117, 152, 121, 220, 264, 231, 181,
814
194, 24, 27, 37, 35, 229, 93, 94, 95, 96,
815
97, 98, 99, 135, 228, 100, 45, 15, 16, 17,
816
18, 13, 19, 14, 145, 129, 181, 130, 335, 336,
817
36, 144, 251, 249, 1, 250, 258, 4, 250, 118,
818
119, 28, 171, 275, 5, 276, 170, 278, 6, 250,
819
173, 294, 333, 295, 334, 8, 28, 11, 12, 195,
820
232, 22, 24, 175, 176, 265, 7, 280, 34, 101,
821
39, 40, 90, 91, 102, 103, 104, 105, 106, 92,
822
107, 108, 109, 110, 188, 189, 111, 112, 177, 178,
823
125, 179, 180, 181, 126, 127, 128, 210, 132, 133,
824
45, 113, 134, 120, 179, 180, 181, 136, 114, 186,
825
187, 188, 189, 137, 312, 138, 141, 147, 142, 316,
826
190, 143, 196, 198, 146, 150, 151, 215, 216, 217,
827
218, 219, 172, 221, 222, 223, 224, 225, 226, 227,
828
192, 154, 230, 155, 174, 121, 156, 238, 140, 197,
829
199, 200, 157, 158, 159, 160, 161, 140, 266, 162,
830
163, 93, 94, 95, 96, 97, 98, 99, 164, 201,
831
100, 165, 166, 183, 184, 185, 186, 187, 188, 189,
832
167, 202, 204, 168, 214, 193, 183, 184, 185, 186,
833
187, 188, 189, 205, 118, 119, 169, 212, 177, 178,
834
277, 179, 180, 181, 281, 208, 211, 213, 140, 181,
835
233, 236, 239, 242, 210, 243, 244, 290, 291, 247,
836
252, 261, 262, 263, 101, 268, 269, 270, 273, 102,
837
103, 104, 105, 106, 274, 107, 108, 109, 110, 279,
838
140, 111, 112, 283, 140, 254, 285, 284, 293, 93,
839
94, 95, 96, 97, 98, 99, 113, 286, 100, 287,
840
296, 288, 297, 114, 298, 93, 94, 95, 96, 97,
841
98, 99, 301, 299, 100, 302, 303, 306, 308, 311,
842
313, 314, 317, 183, 184, 185, 186, 187, 188, 189,
843
320, 327, 321, 318, 260, 324, 322, 325, 330, 329,
844
209, 331, 332, 246, 338, 235, 153, 292, 38, 310,
845
282, 23, 101, 29, 0, 0, 0, 102, 103, 104,
846
105, 106, 0, 107, 108, 109, 110, 0, 101, 111,
847
112, 41, 0, 102, 103, 104, 105, 106, 0, 107,
848
108, 109, 110, 0, 113, 111, 112, 0, 0, 0,
849
42, 114, 253, 254, 0, 43, 44, 45, 0, 0,
850
113, 177, 178, 46, 179, 180, 181, 114, 0, 0,
851
47, 0, 0, 48, 0, 49, 0, 0, 50, 0,
852
182, 0, 0, 0, 0, 0, 0, 0, 0, 51,
853
52, 53, 0, 0, 0, 41, 0, 0, 54, 0,
854
0, 0, 0, 55, 56, 0, 0, 57, 58, 59,
855
0, 0, 60, 139, 42, 0, 0, 0, 0, 43,
856
44, 45, 0, 0, 0, 0, 0, 46, 0, 0,
857
0, 61, 0, 0, 47, 0, 0, 48, 0, 49,
858
0, 0, 50, 0, 0, 0, 183, 184, 185, 186,
859
187, 188, 189, 51, 52, 53, 0, 0, 0, 41,
860
0, 0, 54, 0, 0, 0, 0, 55, 56, 0,
861
0, 57, 58, 59, 0, 0, 60, 259, 42, 0,
862
0, 0, 0, 43, 44, 45, 0, 0, 0, 177,
863
178, 46, 179, 180, 181, 61, 0, 0, 47, 0,
864
0, 48, 0, 49, 0, 0, 50, 0, 0, 0,
865
0, 191, 0, 0, 0, 0, 0, 51, 52, 53,
866
0, 0, 0, 41, 0, 0, 54, 0, 0, 0,
867
0, 55, 56, 0, 0, 57, 58, 59, 0, 0,
868
60, 323, 42, 0, 0, 0, 0, 43, 44, 45,
869
0, 0, 0, 0, 0, 46, 0, 0, 0, 61,
870
0, 0, 47, 0, 0, 48, 0, 49, 0, 0,
871
50, 0, 0, 0, 183, 184, 185, 186, 187, 188,
872
189, 51, 52, 53, 177, 178, 41, 179, 180, 181,
873
54, 0, 0, 0, 0, 55, 56, 0, 0, 57,
874
58, 59, 0, 0, 60, 42, 0, 0, 0, 0,
875
43, 44, 45, 0, 0, 0, 267, 0, 46, 0,
876
0, 0, 0, 61, 0, 47, 0, 0, 48, 0,
877
49, 177, 178, 50, 179, 180, 181, 0, 177, 178,
878
0, 179, 180, 181, 51, 52, 53, 0, 0, 0,
879
300, 177, 178, 54, 179, 180, 181, 0, 55, 56,
880
305, 0, 57, 58, 59, 0, 0, 60, 0, 183,
881
184, 185, 186, 187, 188, 189, 0, 0, 0, 0,
882
0, 0, 0, 0, 0, 0, 61, 0, 0, 0,
883
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
884
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
885
0, 0, 0, 0, 0, 0, 183, 184, 185, 186,
886
187, 188, 189, 183, 184, 185, 186, 187, 188, 189,
887
0, 0, 0, 0, 0, 0, 183, 184, 185, 186,
891
static const short int yycheck[] =
893
12, 63, 42, 43, 73, 45, 182, 40, 38, 15,
894
49, 9, 24, 26, 65, 191, 3, 4, 5, 6,
895
7, 8, 9, 57, 190, 12, 35, 19, 20, 21,
896
22, 106, 24, 108, 68, 57, 15, 59, 46, 47,
897
91, 50, 208, 106, 16, 108, 106, 9, 108, 36,
898
37, 64, 92, 106, 0, 108, 90, 106, 104, 108,
899
100, 106, 106, 108, 108, 9, 64, 17, 18, 108,
900
100, 25, 9, 113, 114, 108, 105, 253, 104, 66,
901
9, 9, 25, 104, 71, 72, 73, 74, 75, 63,
902
77, 78, 79, 80, 100, 101, 83, 84, 10, 11,
903
9, 13, 14, 15, 49, 9, 39, 147, 9, 9,
904
35, 98, 9, 100, 13, 14, 15, 88, 105, 98,
905
99, 100, 101, 88, 300, 9, 104, 40, 105, 305,
906
105, 104, 39, 9, 104, 104, 104, 177, 178, 179,
907
180, 181, 103, 183, 184, 185, 186, 187, 188, 189,
908
105, 104, 192, 104, 103, 195, 104, 197, 220, 17,
909
52, 9, 104, 104, 104, 104, 104, 229, 237, 104,
910
104, 3, 4, 5, 6, 7, 8, 9, 104, 9,
911
12, 104, 104, 95, 96, 97, 98, 99, 100, 101,
912
104, 60, 49, 104, 106, 105, 95, 96, 97, 98,
913
99, 100, 101, 105, 36, 37, 104, 70, 10, 11,
914
250, 13, 14, 15, 254, 105, 104, 70, 280, 15,
915
9, 9, 9, 105, 264, 58, 9, 267, 268, 107,
916
55, 9, 106, 108, 66, 95, 108, 9, 9, 71,
917
72, 73, 74, 75, 105, 77, 78, 79, 80, 9,
918
312, 83, 84, 27, 316, 31, 106, 32, 270, 3,
919
4, 5, 6, 7, 8, 9, 98, 9, 12, 9,
920
62, 41, 106, 105, 110, 3, 4, 5, 6, 7,
921
8, 9, 28, 107, 12, 51, 92, 105, 61, 9,
922
17, 44, 3, 95, 96, 97, 98, 99, 100, 101,
923
105, 9, 93, 89, 106, 106, 45, 12, 9, 94,
924
54, 32, 8, 204, 9, 195, 73, 269, 33, 295,
925
256, 14, 66, 26, -1, -1, -1, 71, 72, 73,
926
74, 75, -1, 77, 78, 79, 80, -1, 66, 83,
927
84, 9, -1, 71, 72, 73, 74, 75, -1, 77,
928
78, 79, 80, -1, 98, 83, 84, -1, -1, -1,
929
28, 105, 30, 31, -1, 33, 34, 35, -1, -1,
930
98, 10, 11, 41, 13, 14, 15, 105, -1, -1,
931
48, -1, -1, 51, -1, 53, -1, -1, 56, -1,
932
29, -1, -1, -1, -1, -1, -1, -1, -1, 67,
933
68, 69, -1, -1, -1, 9, -1, -1, 76, -1,
934
-1, -1, -1, 81, 82, -1, -1, 85, 86, 87,
935
-1, -1, 90, 27, 28, -1, -1, -1, -1, 33,
936
34, 35, -1, -1, -1, -1, -1, 41, -1, -1,
937
-1, 109, -1, -1, 48, -1, -1, 51, -1, 53,
938
-1, -1, 56, -1, -1, -1, 95, 96, 97, 98,
939
99, 100, 101, 67, 68, 69, -1, -1, -1, 9,
940
-1, -1, 76, -1, -1, -1, -1, 81, 82, -1,
941
-1, 85, 86, 87, -1, -1, 90, 27, 28, -1,
942
-1, -1, -1, 33, 34, 35, -1, -1, -1, 10,
943
11, 41, 13, 14, 15, 109, -1, -1, 48, -1,
944
-1, 51, -1, 53, -1, -1, 56, -1, -1, -1,
945
-1, 32, -1, -1, -1, -1, -1, 67, 68, 69,
946
-1, -1, -1, 9, -1, -1, 76, -1, -1, -1,
947
-1, 81, 82, -1, -1, 85, 86, 87, -1, -1,
948
90, 27, 28, -1, -1, -1, -1, 33, 34, 35,
949
-1, -1, -1, -1, -1, 41, -1, -1, -1, 109,
950
-1, -1, 48, -1, -1, 51, -1, 53, -1, -1,
951
56, -1, -1, -1, 95, 96, 97, 98, 99, 100,
952
101, 67, 68, 69, 10, 11, 9, 13, 14, 15,
953
76, -1, -1, -1, -1, 81, 82, -1, -1, 85,
954
86, 87, -1, -1, 90, 28, -1, -1, -1, -1,
955
33, 34, 35, -1, -1, -1, 42, -1, 41, -1,
956
-1, -1, -1, 109, -1, 48, -1, -1, 51, -1,
957
53, 10, 11, 56, 13, 14, 15, -1, 10, 11,
958
-1, 13, 14, 15, 67, 68, 69, -1, -1, -1,
959
29, 10, 11, 76, 13, 14, 15, -1, 81, 82,
960
32, -1, 85, 86, 87, -1, -1, 90, -1, 95,
961
96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
962
-1, -1, -1, -1, -1, -1, 109, -1, -1, -1,
963
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
964
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
965
-1, -1, -1, -1, -1, -1, 95, 96, 97, 98,
966
99, 100, 101, 95, 96, 97, 98, 99, 100, 101,
967
-1, -1, -1, -1, -1, -1, 95, 96, 97, 98,
971
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
972
symbol of state STATE-NUM. */
973
static const unsigned char yystos[] =
975
0, 16, 112, 180, 9, 0, 104, 105, 9, 172,
976
173, 17, 18, 106, 108, 19, 20, 21, 22, 24,
977
171, 171, 25, 172, 9, 174, 175, 171, 64, 174,
978
176, 177, 178, 179, 104, 65, 91, 26, 178, 9,
979
9, 9, 28, 33, 34, 35, 41, 48, 51, 53,
980
56, 67, 68, 69, 76, 81, 82, 85, 86, 87,
981
90, 109, 113, 114, 118, 119, 120, 133, 134, 135,
982
139, 140, 141, 142, 143, 144, 145, 146, 150, 151,
983
152, 153, 154, 155, 156, 157, 164, 168, 169, 170,
984
25, 104, 63, 3, 4, 5, 6, 7, 8, 9,
985
12, 66, 71, 72, 73, 74, 75, 77, 78, 79,
986
80, 83, 84, 98, 105, 115, 116, 115, 36, 37,
987
100, 115, 125, 126, 127, 9, 49, 9, 39, 57,
988
59, 166, 9, 9, 9, 133, 88, 88, 9, 27,
989
113, 104, 105, 104, 50, 133, 104, 40, 128, 138,
990
104, 104, 128, 138, 104, 104, 104, 104, 104, 104,
991
104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
992
133, 115, 103, 115, 103, 115, 115, 10, 11, 13,
993
14, 15, 29, 95, 96, 97, 98, 99, 100, 101,
994
105, 32, 105, 105, 49, 108, 39, 17, 9, 52,
995
9, 9, 60, 167, 49, 105, 115, 124, 105, 54,
996
115, 104, 70, 70, 106, 115, 115, 115, 115, 115,
997
114, 115, 115, 115, 115, 115, 115, 115, 124, 114,
998
115, 38, 100, 9, 123, 125, 9, 122, 115, 9,
999
136, 137, 105, 58, 9, 121, 123, 107, 117, 106,
1000
108, 124, 55, 30, 31, 147, 148, 149, 106, 27,
1001
106, 9, 106, 108, 40, 108, 128, 42, 95, 108,
1002
9, 158, 159, 9, 105, 106, 108, 115, 106, 9,
1003
114, 115, 147, 27, 32, 106, 9, 9, 41, 129,
1004
115, 115, 136, 171, 106, 108, 62, 106, 110, 107,
1005
29, 28, 51, 92, 130, 32, 105, 160, 61, 163,
1006
158, 9, 114, 17, 44, 132, 114, 3, 89, 161,
1007
105, 93, 45, 27, 106, 12, 162, 9, 165, 94,
1008
9, 32, 8, 106, 108, 46, 47, 131, 9
1011
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1012
# define YYSIZE_T __SIZE_TYPE__
1014
#if ! defined (YYSIZE_T) && defined (size_t)
1015
# define YYSIZE_T size_t
1017
#if ! defined (YYSIZE_T)
1018
# if defined (__STDC__) || defined (__cplusplus)
1019
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1020
# define YYSIZE_T size_t
1023
#if ! defined (YYSIZE_T)
1024
# define YYSIZE_T unsigned int
1027
#define yyerrok (yyerrstatus = 0)
1028
#define yyclearin (yychar = YYEMPTY)
1029
#define YYEMPTY (-2)
1032
#define YYACCEPT goto yyacceptlab
1033
#define YYABORT goto yyabortlab
1034
#define YYERROR goto yyerrorlab
1037
/* Like YYERROR except do call yyerror. This remains here temporarily
1038
to ease the transition to the new meaning of YYERROR, for GCC.
1039
Once GCC version 2 has supplanted version 1, this can go. */
1041
#define YYFAIL goto yyerrlab
1043
#define YYRECOVERING() (!!yyerrstatus)
1045
#define YYBACKUP(Token, Value) \
1047
if (yychar == YYEMPTY && yylen == 1) \
1051
yytoken = YYTRANSLATE (yychar); \
1057
yyerror ("syntax error: cannot back up");\
1063
#define YYERRCODE 256
1065
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
1068
#ifndef YYLLOC_DEFAULT
1069
# define YYLLOC_DEFAULT(Current, Rhs, N) \
1070
((Current).first_line = (Rhs)[1].first_line, \
1071
(Current).first_column = (Rhs)[1].first_column, \
1072
(Current).last_line = (Rhs)[N].last_line, \
1073
(Current).last_column = (Rhs)[N].last_column)
1076
/* YYLEX -- calling `yylex' with the right arguments. */
1079
# define YYLEX yylex (YYLEX_PARAM)
1081
# define YYLEX yylex ()
1084
/* Enable debugging if requested. */
1088
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1089
# define YYFPRINTF fprintf
1092
# define YYDPRINTF(Args) \
1098
# define YYDSYMPRINT(Args) \
1104
# define YYDSYMPRINTF(Title, Token, Value, Location) \
1108
YYFPRINTF (stderr, "%s ", Title); \
1109
yysymprint (stderr, \
1111
YYFPRINTF (stderr, "\n"); \
1115
/*------------------------------------------------------------------.
1116
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1118
`------------------------------------------------------------------*/
1120
#if defined (__STDC__) || defined (__cplusplus)
1122
yy_stack_print (short int *bottom, short int *top)
1125
yy_stack_print (bottom, top)
1130
YYFPRINTF (stderr, "Stack now");
1131
for (/* Nothing. */; bottom <= top; ++bottom)
1132
YYFPRINTF (stderr, " %d", *bottom);
1133
YYFPRINTF (stderr, "\n");
1136
# define YY_STACK_PRINT(Bottom, Top) \
1139
yy_stack_print ((Bottom), (Top)); \
1143
/*------------------------------------------------.
1144
| Report that the YYRULE is going to be reduced. |
1145
`------------------------------------------------*/
1147
#if defined (__STDC__) || defined (__cplusplus)
1149
yy_reduce_print (int yyrule)
1152
yy_reduce_print (yyrule)
1157
unsigned int yylno = yyrline[yyrule];
1158
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
1160
/* Print the symbols being reduced, and their result. */
1161
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1162
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
1163
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
1166
# define YY_REDUCE_PRINT(Rule) \
1169
yy_reduce_print (Rule); \
1172
/* Nonzero means print parse trace. It is left uninitialized so that
1173
multiple parsers can coexist. */
1175
#else /* !YYDEBUG */
1176
# define YYDPRINTF(Args)
1177
# define YYDSYMPRINT(Args)
1178
# define YYDSYMPRINTF(Title, Token, Value, Location)
1179
# define YY_STACK_PRINT(Bottom, Top)
1180
# define YY_REDUCE_PRINT(Rule)
1181
#endif /* !YYDEBUG */
1184
/* YYINITDEPTH -- initial size of the parser's stacks. */
1186
# define YYINITDEPTH 200
1189
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1190
if the built-in stack extension method is used).
1192
Do not make this value too large; the results are undefined if
1193
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1194
evaluated with infinite-precision integer arithmetic. */
1196
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
1201
# define YYMAXDEPTH 10000
1209
# if defined (__GLIBC__) && defined (_STRING_H)
1210
# define yystrlen strlen
1212
/* Return the length of YYSTR. */
1214
# if defined (__STDC__) || defined (__cplusplus)
1215
yystrlen (const char *yystr)
1221
register const char *yys = yystr;
1223
while (*yys++ != '\0')
1226
return yys - yystr - 1;
1232
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1233
# define yystpcpy stpcpy
1235
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1238
# if defined (__STDC__) || defined (__cplusplus)
1239
yystpcpy (char *yydest, const char *yysrc)
1241
yystpcpy (yydest, yysrc)
1246
register char *yyd = yydest;
1247
register const char *yys = yysrc;
1249
while ((*yyd++ = *yys++) != '\0')
1257
#endif /* !YYERROR_VERBOSE */
1262
/*--------------------------------.
1263
| Print this symbol on YYOUTPUT. |
1264
`--------------------------------*/
1266
#if defined (__STDC__) || defined (__cplusplus)
1268
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1271
yysymprint (yyoutput, yytype, yyvaluep)
1277
/* Pacify ``unused variable'' warnings. */
1280
if (yytype < YYNTOKENS)
1282
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1284
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1288
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1295
YYFPRINTF (yyoutput, ")");
1298
#endif /* ! YYDEBUG */
1299
/*-----------------------------------------------.
1300
| Release the memory associated to this symbol. |
1301
`-----------------------------------------------*/
1303
#if defined (__STDC__) || defined (__cplusplus)
1305
yydestruct (int yytype, YYSTYPE *yyvaluep)
1308
yydestruct (yytype, yyvaluep)
1313
/* Pacify ``unused variable'' warnings. */
1325
/* Prevent warnings from -Wmissing-prototypes. */
1327
#ifdef YYPARSE_PARAM
1328
# if defined (__STDC__) || defined (__cplusplus)
1329
int yyparse (void *YYPARSE_PARAM);
1333
#else /* ! YYPARSE_PARAM */
1334
#if defined (__STDC__) || defined (__cplusplus)
1339
#endif /* ! YYPARSE_PARAM */
1343
/* The lookahead symbol. */
1346
/* The semantic value of the lookahead symbol. */
1349
/* Number of syntax errors so far. */
1358
#ifdef YYPARSE_PARAM
1359
# if defined (__STDC__) || defined (__cplusplus)
1360
int yyparse (void *YYPARSE_PARAM)
1362
int yyparse (YYPARSE_PARAM)
1363
void *YYPARSE_PARAM;
1365
#else /* ! YYPARSE_PARAM */
1366
#if defined (__STDC__) || defined (__cplusplus)
1377
register int yystate;
1380
/* Number of tokens to shift before error messages enabled. */
1382
/* Lookahead token as an internal (translated) token number. */
1385
/* Three stacks and their tools:
1386
`yyss': related to states,
1387
`yyvs': related to semantic values,
1388
`yyls': related to locations.
1390
Refer to the stacks thru separate pointers, to allow yyoverflow
1391
to reallocate them elsewhere. */
1393
/* The state stack. */
1394
short int yyssa[YYINITDEPTH];
1395
short int *yyss = yyssa;
1396
register short int *yyssp;
1398
/* The semantic value stack. */
1399
YYSTYPE yyvsa[YYINITDEPTH];
1400
YYSTYPE *yyvs = yyvsa;
1401
register YYSTYPE *yyvsp;
1405
#define YYPOPSTACK (yyvsp--, yyssp--)
1407
YYSIZE_T yystacksize = YYINITDEPTH;
1409
/* The variables used to return semantic value and location from the
1414
/* When reducing, the number of symbols on the RHS of the reduced
1418
YYDPRINTF ((stderr, "Starting parse\n"));
1423
yychar = YYEMPTY; /* Cause a token to be read. */
1425
/* Initialize stack pointers.
1426
Waste one element of value and location stack
1427
so that they stay on the same level as the state stack.
1428
The wasted elements are never initialized. */
1436
/*------------------------------------------------------------.
1437
| yynewstate -- Push a new state, which is found in yystate. |
1438
`------------------------------------------------------------*/
1440
/* In all cases, when you get here, the value and location stacks
1441
have just been pushed. so pushing a state here evens the stacks.
1448
if (yyss + yystacksize - 1 <= yyssp)
1450
/* Get the current used size of the three stacks, in elements. */
1451
YYSIZE_T yysize = yyssp - yyss + 1;
1455
/* Give user a chance to reallocate the stack. Use copies of
1456
these so that the &'s don't force the real ones into
1458
YYSTYPE *yyvs1 = yyvs;
1459
short int *yyss1 = yyss;
1462
/* Each stack pointer address is followed by the size of the
1463
data in use in that stack, in bytes. This used to be a
1464
conditional around just the two extra args, but that might
1465
be undefined if yyoverflow is a macro. */
1466
yyoverflow ("parser stack overflow",
1467
&yyss1, yysize * sizeof (*yyssp),
1468
&yyvs1, yysize * sizeof (*yyvsp),
1475
#else /* no yyoverflow */
1476
# ifndef YYSTACK_RELOCATE
1479
/* Extend the stack our own way. */
1480
if (YYMAXDEPTH <= yystacksize)
1483
if (YYMAXDEPTH < yystacksize)
1484
yystacksize = YYMAXDEPTH;
1487
short int *yyss1 = yyss;
1488
union yyalloc *yyptr =
1489
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1492
YYSTACK_RELOCATE (yyss);
1493
YYSTACK_RELOCATE (yyvs);
1495
# undef YYSTACK_RELOCATE
1497
YYSTACK_FREE (yyss1);
1500
#endif /* no yyoverflow */
1502
yyssp = yyss + yysize - 1;
1503
yyvsp = yyvs + yysize - 1;
1506
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1507
(unsigned long int) yystacksize));
1509
if (yyss + yystacksize - 1 <= yyssp)
1513
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1522
/* Do appropriate processing given the current state. */
1523
/* Read a lookahead token if we need one and don't already have one. */
1526
/* First try to decide what to do without reference to lookahead token. */
1528
yyn = yypact[yystate];
1529
if (yyn == YYPACT_NINF)
1532
/* Not known => get a lookahead token if don't already have one. */
1534
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1535
if (yychar == YYEMPTY)
1537
YYDPRINTF ((stderr, "Reading a token: "));
1541
if (yychar <= YYEOF)
1543
yychar = yytoken = YYEOF;
1544
YYDPRINTF ((stderr, "Now at end of input.\n"));
1548
yytoken = YYTRANSLATE (yychar);
1549
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1552
/* If the proper action on seeing token YYTOKEN is to reduce or to
1553
detect an error, take that action. */
1555
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1560
if (yyn == 0 || yyn == YYTABLE_NINF)
1569
/* Shift the lookahead token. */
1570
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1572
/* Discard the token being shifted unless it is eof. */
1573
if (yychar != YYEOF)
1579
/* Count tokens shifted since error; after three, turn off error
1588
/*-----------------------------------------------------------.
1589
| yydefault -- do the default action for the current state. |
1590
`-----------------------------------------------------------*/
1592
yyn = yydefact[yystate];
1598
/*-----------------------------.
1599
| yyreduce -- Do a reduction. |
1600
`-----------------------------*/
1602
/* yyn is the number of a rule to reduce with. */
1605
/* If YYLEN is nonzero, implement the default value of the action:
1608
Otherwise, the following line sets YYVAL to garbage.
1609
This behavior is undocumented and Bison
1610
users should not rely upon it. Assigning to YYVAL
1611
unconditionally makes the parser a bit smaller, and it avoids a
1612
GCC warning that YYVAL may be used uninitialized. */
1613
yyval = yyvsp[1-yylen];
1616
YY_REDUCE_PRINT (yyn);
1620
#line 166 "pars0grm.y"
1621
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
1625
#line 168 "pars0grm.y"
1626
{ yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;}
1630
#line 172 "pars0grm.y"
1631
{ yyval = yyvsp[0];;}
1635
#line 174 "pars0grm.y"
1636
{ yyval = pars_func(yyvsp[-3], yyvsp[-1]); ;}
1640
#line 175 "pars0grm.y"
1641
{ yyval = yyvsp[0];;}
1645
#line 176 "pars0grm.y"
1646
{ yyval = yyvsp[0];;}
1650
#line 177 "pars0grm.y"
1651
{ yyval = yyvsp[0];;}
1655
#line 178 "pars0grm.y"
1656
{ yyval = yyvsp[0];;}
1660
#line 179 "pars0grm.y"
1661
{ yyval = yyvsp[0];;}
1665
#line 180 "pars0grm.y"
1666
{ yyval = yyvsp[0];;}
1670
#line 181 "pars0grm.y"
1671
{ yyval = yyvsp[0];;}
1675
#line 182 "pars0grm.y"
1676
{ yyval = pars_op('+', yyvsp[-2], yyvsp[0]); ;}
1680
#line 183 "pars0grm.y"
1681
{ yyval = pars_op('-', yyvsp[-2], yyvsp[0]); ;}
1685
#line 184 "pars0grm.y"
1686
{ yyval = pars_op('*', yyvsp[-2], yyvsp[0]); ;}
1690
#line 185 "pars0grm.y"
1691
{ yyval = pars_op('/', yyvsp[-2], yyvsp[0]); ;}
1695
#line 186 "pars0grm.y"
1696
{ yyval = pars_op('-', yyvsp[0], NULL); ;}
1700
#line 187 "pars0grm.y"
1701
{ yyval = yyvsp[-1]; ;}
1705
#line 188 "pars0grm.y"
1706
{ yyval = pars_op('=', yyvsp[-2], yyvsp[0]); ;}
1710
#line 189 "pars0grm.y"
1711
{ yyval = pars_op('<', yyvsp[-2], yyvsp[0]); ;}
1715
#line 190 "pars0grm.y"
1716
{ yyval = pars_op('>', yyvsp[-2], yyvsp[0]); ;}
1720
#line 191 "pars0grm.y"
1721
{ yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); ;}
1725
#line 192 "pars0grm.y"
1726
{ yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); ;}
1730
#line 193 "pars0grm.y"
1731
{ yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); ;}
1735
#line 194 "pars0grm.y"
1736
{ yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); ;}
1740
#line 195 "pars0grm.y"
1741
{ yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); ;}
1745
#line 196 "pars0grm.y"
1746
{ yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); ;}
1750
#line 198 "pars0grm.y"
1751
{ yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;}
1755
#line 200 "pars0grm.y"
1756
{ yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;}
1760
#line 204 "pars0grm.y"
1761
{ yyval = &pars_to_char_token; ;}
1765
#line 205 "pars0grm.y"
1766
{ yyval = &pars_to_number_token; ;}
1770
#line 206 "pars0grm.y"
1771
{ yyval = &pars_to_binary_token; ;}
1775
#line 208 "pars0grm.y"
1776
{ yyval = &pars_binary_to_number_token; ;}
1780
#line 209 "pars0grm.y"
1781
{ yyval = &pars_substr_token; ;}
1785
#line 210 "pars0grm.y"
1786
{ yyval = &pars_concat_token; ;}
1790
#line 211 "pars0grm.y"
1791
{ yyval = &pars_instr_token; ;}
1795
#line 212 "pars0grm.y"
1796
{ yyval = &pars_length_token; ;}
1800
#line 213 "pars0grm.y"
1801
{ yyval = &pars_sysdate_token; ;}
1805
#line 214 "pars0grm.y"
1806
{ yyval = &pars_rnd_token; ;}
1810
#line 215 "pars0grm.y"
1811
{ yyval = &pars_rnd_str_token; ;}
1815
#line 226 "pars0grm.y"
1816
{ yyval = pars_stored_procedure_call(yyvsp[-4]); ;}
1820
#line 231 "pars0grm.y"
1821
{ yyval = pars_procedure_call(yyvsp[-3], yyvsp[-1]); ;}
1825
#line 235 "pars0grm.y"
1826
{ yyval = &pars_replstr_token; ;}
1830
#line 236 "pars0grm.y"
1831
{ yyval = &pars_printf_token; ;}
1835
#line 237 "pars0grm.y"
1836
{ yyval = &pars_assert_token; ;}
1840
#line 241 "pars0grm.y"
1841
{ yyval = yyvsp[-2]; ;}
1845
#line 245 "pars0grm.y"
1846
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
1850
#line 247 "pars0grm.y"
1851
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
1855
#line 251 "pars0grm.y"
1860
#line 252 "pars0grm.y"
1861
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
1865
#line 254 "pars0grm.y"
1866
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
1870
#line 258 "pars0grm.y"
1875
#line 259 "pars0grm.y"
1876
{ yyval = que_node_list_add_last(NULL, yyvsp[0]);;}
1880
#line 260 "pars0grm.y"
1881
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
1885
#line 264 "pars0grm.y"
1886
{ yyval = yyvsp[0]; ;}
1890
#line 266 "pars0grm.y"
1891
{ yyval = pars_func(&pars_count_token,
1892
que_node_list_add_last(NULL,
1893
sym_tab_add_int_lit(
1894
pars_sym_tab_global, 1))); ;}
1898
#line 271 "pars0grm.y"
1899
{ yyval = pars_func(&pars_count_token,
1900
que_node_list_add_last(NULL,
1901
pars_func(&pars_distinct_token,
1902
que_node_list_add_last(
1903
NULL, yyvsp[-1])))); ;}
1907
#line 277 "pars0grm.y"
1908
{ yyval = pars_func(&pars_sum_token,
1909
que_node_list_add_last(NULL,
1914
#line 283 "pars0grm.y"
1919
#line 284 "pars0grm.y"
1920
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
1924
#line 286 "pars0grm.y"
1925
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
1929
#line 290 "pars0grm.y"
1930
{ yyval = pars_select_list(&pars_star_denoter,
1935
#line 293 "pars0grm.y"
1936
{ yyval = pars_select_list(yyvsp[-2], yyvsp[0]); ;}
1940
#line 294 "pars0grm.y"
1941
{ yyval = pars_select_list(yyvsp[0], NULL); ;}
1945
#line 298 "pars0grm.y"
1950
#line 299 "pars0grm.y"
1951
{ yyval = yyvsp[0]; ;}
1955
#line 303 "pars0grm.y"
1960
#line 305 "pars0grm.y"
1961
{ yyval = &pars_update_token; ;}
1965
#line 309 "pars0grm.y"
1970
#line 311 "pars0grm.y"
1971
{ yyval = &pars_share_token; ;}
1975
#line 315 "pars0grm.y"
1976
{ yyval = &pars_asc_token; ;}
1980
#line 316 "pars0grm.y"
1981
{ yyval = &pars_asc_token; ;}
1985
#line 317 "pars0grm.y"
1986
{ yyval = &pars_desc_token; ;}
1990
#line 321 "pars0grm.y"
1995
#line 323 "pars0grm.y"
1996
{ yyval = pars_order_by(yyvsp[-1], yyvsp[0]); ;}
2000
#line 332 "pars0grm.y"
2001
{ yyval = pars_select_statement(yyvsp[-6], yyvsp[-4], yyvsp[-3],
2002
yyvsp[-2], yyvsp[-1], yyvsp[0]); ;}
2006
#line 338 "pars0grm.y"
2007
{ yyval = yyvsp[0]; ;}
2011
#line 343 "pars0grm.y"
2012
{ yyval = pars_insert_statement(yyvsp[-4], yyvsp[-1], NULL); ;}
2016
#line 345 "pars0grm.y"
2017
{ yyval = pars_insert_statement(yyvsp[-1], NULL, yyvsp[0]); ;}
2021
#line 349 "pars0grm.y"
2022
{ yyval = pars_column_assignment(yyvsp[-2], yyvsp[0]); ;}
2026
#line 353 "pars0grm.y"
2027
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
2031
#line 355 "pars0grm.y"
2032
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
2036
#line 361 "pars0grm.y"
2037
{ yyval = yyvsp[0]; ;}
2041
#line 367 "pars0grm.y"
2042
{ yyval = pars_update_statement_start(FALSE,
2043
yyvsp[-2], yyvsp[0]); ;}
2047
#line 373 "pars0grm.y"
2048
{ yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;}
2052
#line 378 "pars0grm.y"
2053
{ yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;}
2057
#line 383 "pars0grm.y"
2058
{ yyval = pars_update_statement_start(TRUE,
2063
#line 389 "pars0grm.y"
2064
{ yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;}
2068
#line 394 "pars0grm.y"
2069
{ yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;}
2073
#line 399 "pars0grm.y"
2074
{ yyval = pars_row_printf_statement(yyvsp[0]); ;}
2078
#line 404 "pars0grm.y"
2079
{ yyval = pars_assignment_statement(yyvsp[-2], yyvsp[0]); ;}
2083
#line 410 "pars0grm.y"
2084
{ yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); ;}
2088
#line 414 "pars0grm.y"
2089
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
2093
#line 416 "pars0grm.y"
2094
{ yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;}
2098
#line 420 "pars0grm.y"
2103
#line 422 "pars0grm.y"
2104
{ yyval = yyvsp[0]; ;}
2108
#line 423 "pars0grm.y"
2109
{ yyval = yyvsp[0]; ;}
2113
#line 430 "pars0grm.y"
2114
{ yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); ;}
2118
#line 436 "pars0grm.y"
2119
{ yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); ;}
2123
#line 444 "pars0grm.y"
2124
{ yyval = pars_for_statement(yyvsp[-8], yyvsp[-6], yyvsp[-4], yyvsp[-2]); ;}
2128
#line 448 "pars0grm.y"
2129
{ yyval = pars_exit_statement(); ;}
2133
#line 452 "pars0grm.y"
2134
{ yyval = pars_return_statement(); ;}
2138
#line 457 "pars0grm.y"
2139
{ yyval = pars_open_statement(
2140
ROW_SEL_OPEN_CURSOR, yyvsp[0]); ;}
2144
#line 463 "pars0grm.y"
2145
{ yyval = pars_open_statement(
2146
ROW_SEL_CLOSE_CURSOR, yyvsp[0]); ;}
2150
#line 469 "pars0grm.y"
2151
{ yyval = pars_fetch_statement(yyvsp[-2], yyvsp[0], NULL); ;}
2155
#line 471 "pars0grm.y"
2156
{ yyval = pars_fetch_statement(yyvsp[-2], NULL, yyvsp[0]); ;}
2160
#line 476 "pars0grm.y"
2161
{ yyval = pars_column_def(yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;}
2165
#line 480 "pars0grm.y"
2166
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
2170
#line 482 "pars0grm.y"
2171
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
2175
#line 486 "pars0grm.y"
2180
#line 488 "pars0grm.y"
2181
{ yyval = yyvsp[-1]; ;}
2185
#line 492 "pars0grm.y"
2190
#line 494 "pars0grm.y"
2191
{ yyval = &pars_int_token;
2192
/* pass any non-NULL pointer */ ;}
2196
#line 499 "pars0grm.y"
2201
#line 501 "pars0grm.y"
2202
{ yyval = &pars_int_token;
2203
/* pass any non-NULL pointer */ ;}
2207
#line 506 "pars0grm.y"
2212
#line 508 "pars0grm.y"
2213
{ yyval = &pars_int_token;
2214
/* pass any non-NULL pointer */ ;}
2218
#line 515 "pars0grm.y"
2219
{ yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;}
2223
#line 519 "pars0grm.y"
2224
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
2228
#line 521 "pars0grm.y"
2229
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
2233
#line 525 "pars0grm.y"
2238
#line 526 "pars0grm.y"
2239
{ yyval = &pars_unique_token; ;}
2243
#line 530 "pars0grm.y"
2248
#line 531 "pars0grm.y"
2249
{ yyval = &pars_clustered_token; ;}
2253
#line 539 "pars0grm.y"
2254
{ yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;}
2258
#line 544 "pars0grm.y"
2259
{ yyval = pars_commit_statement(); ;}
2263
#line 549 "pars0grm.y"
2264
{ yyval = pars_rollback_statement(); ;}
2268
#line 553 "pars0grm.y"
2269
{ yyval = &pars_int_token; ;}
2273
#line 554 "pars0grm.y"
2274
{ yyval = &pars_int_token; ;}
2278
#line 555 "pars0grm.y"
2279
{ yyval = &pars_char_token; ;}
2283
#line 556 "pars0grm.y"
2284
{ yyval = &pars_binary_token; ;}
2288
#line 557 "pars0grm.y"
2289
{ yyval = &pars_blob_token; ;}
2293
#line 562 "pars0grm.y"
2294
{ yyval = pars_parameter_declaration(yyvsp[-2],
2295
PARS_INPUT, yyvsp[0]); ;}
2299
#line 565 "pars0grm.y"
2300
{ yyval = pars_parameter_declaration(yyvsp[-2],
2301
PARS_OUTPUT, yyvsp[0]); ;}
2305
#line 570 "pars0grm.y"
2310
#line 571 "pars0grm.y"
2311
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
2315
#line 573 "pars0grm.y"
2316
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
2320
#line 578 "pars0grm.y"
2321
{ yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;}
2325
#line 590 "pars0grm.y"
2326
{ yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;}
2330
#line 595 "pars0grm.y"
2331
{ yyval = pars_function_declaration(yyvsp[-1]); ;}
2335
#line 616 "pars0grm.y"
2336
{ yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7],
2343
/* Line 1010 of yacc.c. */
2344
#line 2345 "pars0grm.tab.c"
2350
YY_STACK_PRINT (yyss, yyssp);
2355
/* Now `shift' the result of the reduction. Determine what state
2356
that goes to, based on the state we popped back to and the rule
2357
number reduced by. */
2361
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2362
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2363
yystate = yytable[yystate];
2365
yystate = yydefgoto[yyn - YYNTOKENS];
2370
/*------------------------------------.
2371
| yyerrlab -- here on detecting error |
2372
`------------------------------------*/
2374
/* If not already recovering from an error, report this error. */
2379
yyn = yypact[yystate];
2381
if (YYPACT_NINF < yyn && yyn < YYLAST)
2383
YYSIZE_T yysize = 0;
2384
int yytype = YYTRANSLATE (yychar);
2385
const char* yyprefix;
2389
/* Start YYX at -YYN if negative to avoid negative indexes in
2391
int yyxbegin = yyn < 0 ? -yyn : 0;
2393
/* Stay within bounds of both yycheck and yytname. */
2394
int yychecklim = YYLAST - yyn;
2395
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2398
yyprefix = ", expecting ";
2399
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2400
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2402
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
2410
yysize += (sizeof ("syntax error, unexpected ")
2411
+ yystrlen (yytname[yytype]));
2412
yymsg = (char *) YYSTACK_ALLOC (yysize);
2415
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
2416
yyp = yystpcpy (yyp, yytname[yytype]);
2420
yyprefix = ", expecting ";
2421
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2422
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2424
yyp = yystpcpy (yyp, yyprefix);
2425
yyp = yystpcpy (yyp, yytname[yyx]);
2430
YYSTACK_FREE (yymsg);
2433
yyerror ("syntax error; also virtual memory exhausted");
2436
#endif /* YYERROR_VERBOSE */
2437
yyerror ("syntax error");
2442
if (yyerrstatus == 3)
2444
/* If just tried and failed to reuse lookahead token after an
2445
error, discard it. */
2447
if (yychar <= YYEOF)
2449
/* If at end of input, pop the error token,
2450
then the rest of the stack, then return failure. */
2451
if (yychar == YYEOF)
2457
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2458
yydestruct (yystos[*yyssp], yyvsp);
2463
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
2464
yydestruct (yytoken, &yylval);
2470
/* Else will try to reuse lookahead token after shifting the error
2475
/*---------------------------------------------------.
2476
| yyerrorlab -- error raised explicitly by YYERROR. |
2477
`---------------------------------------------------*/
2481
/* Pacify GCC when the user code never invokes YYERROR and the label
2482
yyerrorlab therefore never appears in user code. */
2493
/*-------------------------------------------------------------.
2494
| yyerrlab1 -- common code for both syntax error and YYERROR. |
2495
`-------------------------------------------------------------*/
2497
yyerrstatus = 3; /* Each real token shifted decrements this. */
2501
yyn = yypact[yystate];
2502
if (yyn != YYPACT_NINF)
2505
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2513
/* Pop the current state because it cannot handle the error token. */
2517
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2518
yydestruct (yystos[yystate], yyvsp);
2521
YY_STACK_PRINT (yyss, yyssp);
2527
YYDPRINTF ((stderr, "Shifting error token, "));
2536
/*-------------------------------------.
2537
| yyacceptlab -- YYACCEPT comes here. |
2538
`-------------------------------------*/
2543
/*-----------------------------------.
2544
| yyabortlab -- YYABORT comes here. |
2545
`-----------------------------------*/
2551
/*----------------------------------------------.
2552
| yyoverflowlab -- parser overflow comes here. |
2553
`----------------------------------------------*/
2555
yyerror ("parser stack overflow");
2563
YYSTACK_FREE (yyss);
2569
#line 620 "pars0grm.y"