GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
y.tab.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.2"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 0
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations. */
65 #line 21 "yac.y" /* yacc.c:339 */
66 
67 #include <stdlib.h>
68 #include <string.h>
69 #include <math.h>
70 #include <grass/sqlp.h>
71 
72 #define YYDEBUG 1
73 #define YYERROR_VERBOSE 1
74 
75 
76 #line 77 "y.tab.c" /* yacc.c:339 */
77 
78 # ifndef YY_NULLPTR
79 # if defined __cplusplus && 201103L <= __cplusplus
80 # define YY_NULLPTR nullptr
81 # else
82 # define YY_NULLPTR 0
83 # endif
84 # endif
85 
86 /* Enabling verbose error messages. */
87 #ifdef YYERROR_VERBOSE
88 # undef YYERROR_VERBOSE
89 # define YYERROR_VERBOSE 1
90 #else
91 # define YYERROR_VERBOSE 0
92 #endif
93 
94 /* In a future release of Bison, this section will be replaced
95  by #include "y.tab.h". */
96 #ifndef YY_YY_Y_TAB_H_INCLUDED
97 # define YY_YY_Y_TAB_H_INCLUDED
98 /* Debug traces. */
99 #ifndef YYDEBUG
100 # define YYDEBUG 0
101 #endif
102 #if YYDEBUG
103 extern int yydebug;
104 #endif
105 
106 /* Token type. */
107 #ifndef YYTOKENTYPE
108 # define YYTOKENTYPE
110  {
112  NAME = 259,
113  STRING = 260,
114  INTNUM = 261,
115  FLOATNUM = 262,
116  ADD = 263,
117  DROP = 264,
118  COLUMN = 265,
119  EQUAL = 266,
120  SELECT = 267,
121  FROM = 268,
122  WHERE = 269,
123  DELETE = 270,
124  INSERT = 271,
125  INTO = 272,
126  VALUES = 273,
127  UPDATE = 274,
128  SET = 275,
129  AND = 276,
130  OR = 277,
131  NOT = 278,
132  ALTER = 279,
133  TABLE = 280,
134  CREATE = 281,
135  NULL_VALUE = 282,
136  VARCHAR = 283,
137  INT = 284,
138  INTEGER = 285,
139  DOUBLE = 286,
140  PRECISION = 287,
141  DATE = 288,
142  TIME = 289,
143  ORDER = 290,
144  BY = 291,
145  IS = 292,
146  ASC = 293,
147  DESC = 294
148  };
149 #endif
150 /* Tokens. */
151 #define COMPARISON_OPERATOR 258
152 #define NAME 259
153 #define STRING 260
154 #define INTNUM 261
155 #define FLOATNUM 262
156 #define ADD 263
157 #define DROP 264
158 #define COLUMN 265
159 #define EQUAL 266
160 #define SELECT 267
161 #define FROM 268
162 #define WHERE 269
163 #define DELETE 270
164 #define INSERT 271
165 #define INTO 272
166 #define VALUES 273
167 #define UPDATE 274
168 #define SET 275
169 #define AND 276
170 #define OR 277
171 #define NOT 278
172 #define ALTER 279
173 #define TABLE 280
174 #define CREATE 281
175 #define NULL_VALUE 282
176 #define VARCHAR 283
177 #define INT 284
178 #define INTEGER 285
179 #define DOUBLE 286
180 #define PRECISION 287
181 #define DATE 288
182 #define TIME 289
183 #define ORDER 290
184 #define BY 291
185 #define IS 292
186 #define ASC 293
187 #define DESC 294
188 
189 /* Value type. */
190 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191 typedef union YYSTYPE YYSTYPE;
192 union YYSTYPE
193 {
194 #line 34 "yac.y" /* yacc.c:355 */
195 
196  int intval;
197  double floatval;
198  char *strval;
199  int subtok;
200  SQLPNODE *node;
201 
202 #line 203 "y.tab.c" /* yacc.c:355 */
203 };
204 # define YYSTYPE_IS_TRIVIAL 1
205 # define YYSTYPE_IS_DECLARED 1
206 #endif
207 
208 
209 extern YYSTYPE yylval;
210 
211 int yyparse (void);
212 
213 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
214 
215 /* Copy the second part of user declarations. */
216 #line 88 "yac.y" /* yacc.c:358 */
217 
218 
219 extern int yylex(void);
220 
221 
222 #line 223 "y.tab.c" /* yacc.c:358 */
223 
224 #ifdef short
225 # undef short
226 #endif
227 
228 #ifdef YYTYPE_UINT8
229 typedef YYTYPE_UINT8 yytype_uint8;
230 #else
231 typedef unsigned char yytype_uint8;
232 #endif
233 
234 #ifdef YYTYPE_INT8
235 typedef YYTYPE_INT8 yytype_int8;
236 #else
237 typedef signed char yytype_int8;
238 #endif
239 
240 #ifdef YYTYPE_UINT16
241 typedef YYTYPE_UINT16 yytype_uint16;
242 #else
243 typedef unsigned short int yytype_uint16;
244 #endif
245 
246 #ifdef YYTYPE_INT16
247 typedef YYTYPE_INT16 yytype_int16;
248 #else
249 typedef short int yytype_int16;
250 #endif
251 
252 #ifndef YYSIZE_T
253 # ifdef __SIZE_TYPE__
254 # define YYSIZE_T __SIZE_TYPE__
255 # elif defined size_t
256 # define YYSIZE_T size_t
257 # elif ! defined YYSIZE_T
258 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
259 # define YYSIZE_T size_t
260 # else
261 # define YYSIZE_T unsigned int
262 # endif
263 #endif
264 
265 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
266 
267 #ifndef YY_
268 # if defined YYENABLE_NLS && YYENABLE_NLS
269 # if ENABLE_NLS
270 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
271 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
272 # endif
273 # endif
274 # ifndef YY_
275 # define YY_(Msgid) Msgid
276 # endif
277 #endif
278 
279 #ifndef YY_ATTRIBUTE
280 # if (defined __GNUC__ \
281  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
282  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
283 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
284 # else
285 # define YY_ATTRIBUTE(Spec) /* empty */
286 # endif
287 #endif
288 
289 #ifndef YY_ATTRIBUTE_PURE
290 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
291 #endif
292 
293 #ifndef YY_ATTRIBUTE_UNUSED
294 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
295 #endif
296 
297 #if !defined _Noreturn \
298  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
299 # if defined _MSC_VER && 1200 <= _MSC_VER
300 # define _Noreturn __declspec (noreturn)
301 # else
302 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
303 # endif
304 #endif
305 
306 /* Suppress unused-variable warnings by "using" E. */
307 #if ! defined lint || defined __GNUC__
308 # define YYUSE(E) ((void) (E))
309 #else
310 # define YYUSE(E) /* empty */
311 #endif
312 
313 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
314 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
315 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
316  _Pragma ("GCC diagnostic push") \
317  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
318  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
319 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
320  _Pragma ("GCC diagnostic pop")
321 #else
322 # define YY_INITIAL_VALUE(Value) Value
323 #endif
324 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
325 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
326 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
327 #endif
328 #ifndef YY_INITIAL_VALUE
329 # define YY_INITIAL_VALUE(Value) /* Nothing. */
330 #endif
331 
332 
333 #if ! defined yyoverflow || YYERROR_VERBOSE
334 
335 /* The parser invokes alloca or malloc; define the necessary symbols. */
336 
337 # ifdef YYSTACK_USE_ALLOCA
338 # if YYSTACK_USE_ALLOCA
339 # ifdef __GNUC__
340 # define YYSTACK_ALLOC __builtin_alloca
341 # elif defined __BUILTIN_VA_ARG_INCR
342 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
343 # elif defined _AIX
344 # define YYSTACK_ALLOC __alloca
345 # elif defined _MSC_VER
346 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
347 # define alloca _alloca
348 # else
349 # define YYSTACK_ALLOC alloca
350 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
351 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
352  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
353 # ifndef EXIT_SUCCESS
354 # define EXIT_SUCCESS 0
355 # endif
356 # endif
357 # endif
358 # endif
359 # endif
360 
361 # ifdef YYSTACK_ALLOC
362  /* Pacify GCC's 'empty if-body' warning. */
363 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
364 # ifndef YYSTACK_ALLOC_MAXIMUM
365  /* The OS might guarantee only one guard page at the bottom of the stack,
366  and a page size can be as small as 4096 bytes. So we cannot safely
367  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
368  to allow for a few compiler-allocated temporary stack slots. */
369 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
370 # endif
371 # else
372 # define YYSTACK_ALLOC YYMALLOC
373 # define YYSTACK_FREE YYFREE
374 # ifndef YYSTACK_ALLOC_MAXIMUM
375 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
376 # endif
377 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
378  && ! ((defined YYMALLOC || defined malloc) \
379  && (defined YYFREE || defined free)))
380 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
381 # ifndef EXIT_SUCCESS
382 # define EXIT_SUCCESS 0
383 # endif
384 # endif
385 # ifndef YYMALLOC
386 # define YYMALLOC malloc
387 # if ! defined malloc && ! defined EXIT_SUCCESS
388 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
389 # endif
390 # endif
391 # ifndef YYFREE
392 # define YYFREE free
393 # if ! defined free && ! defined EXIT_SUCCESS
394 void free (void *); /* INFRINGES ON USER NAME SPACE */
395 # endif
396 # endif
397 # endif
398 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
399 
400 
401 #if (! defined yyoverflow \
402  && (! defined __cplusplus \
403  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
404 
405 /* A type that is properly aligned for any stack member. */
406 union yyalloc
407 {
410 };
411 
412 /* The size of the maximum gap between one aligned stack and the next. */
413 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
414 
415 /* The size of an array large to enough to hold all stacks, each with
416  N elements. */
417 # define YYSTACK_BYTES(N) \
418  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
419  + YYSTACK_GAP_MAXIMUM)
420 
421 # define YYCOPY_NEEDED 1
422 
423 /* Relocate STACK from its old location to the new one. The
424  local variables YYSIZE and YYSTACKSIZE give the old and new number of
425  elements in the stack, and YYPTR gives the new location of the
426  stack. Advance YYPTR to a properly aligned location for the next
427  stack. */
428 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
429  do \
430  { \
431  YYSIZE_T yynewbytes; \
432  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
433  Stack = &yyptr->Stack_alloc; \
434  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
435  yyptr += yynewbytes / sizeof (*yyptr); \
436  } \
437  while (0)
438 
439 #endif
440 
441 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
442 /* Copy COUNT objects from SRC to DST. The source and destination do
443  not overlap. */
444 # ifndef YYCOPY
445 # if defined __GNUC__ && 1 < __GNUC__
446 # define YYCOPY(Dst, Src, Count) \
447  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
448 # else
449 # define YYCOPY(Dst, Src, Count) \
450  do \
451  { \
452  YYSIZE_T yyi; \
453  for (yyi = 0; yyi < (Count); yyi++) \
454  (Dst)[yyi] = (Src)[yyi]; \
455  } \
456  while (0)
457 # endif
458 # endif
459 #endif /* !YYCOPY_NEEDED */
460 
461 /* YYFINAL -- State number of the termination state. */
462 #define YYFINAL 27
463 /* YYLAST -- Last index in YYTABLE. */
464 #define YYLAST 156
465 
466 /* YYNTOKENS -- Number of terminals. */
467 #define YYNTOKENS 48
468 /* YYNNTS -- Number of nonterminals. */
469 #define YYNNTS 32
470 /* YYNRULES -- Number of rules. */
471 #define YYNRULES 87
472 /* YYNSTATES -- Number of states. */
473 #define YYNSTATES 157
474 
475 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
476  by yylex, with out-of-bounds checking. */
477 #define YYUNDEFTOK 2
478 #define YYMAXUTOK 294
479 
480 #define YYTRANSLATE(YYX) \
481  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
482 
483 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
484  as returned by yylex, without out-of-bounds checking. */
485 static const yytype_uint8 yytranslate[] =
486 {
487  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491  41, 42, 44, 46, 43, 45, 2, 47, 2, 2,
492  2, 2, 2, 2, 2, 2, 2, 2, 2, 40,
493  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
496  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
499  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
513  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
514  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
515  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
516  35, 36, 37, 38, 39
517 };
518 
519 #if YYDEBUG
520  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
521 static const yytype_uint16 yyrline[] =
522 {
523  0, 97, 97, 98, 99, 100, 101, 102, 103, 104,
524  108, 109, 110, 114, 118, 122, 123, 124, 125, 129,
525  130, 134, 135, 139, 140, 145, 146, 150, 151, 152,
526  153, 154, 155, 156, 160, 161, 165, 166, 170, 174,
527  178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
528  188, 189, 193, 194, 198, 202, 206, 213, 214, 218,
529  219, 223, 224, 225, 230, 233, 236, 239, 246, 247,
530  250, 256, 257, 260, 266, 267, 273, 274, 275, 280,
531  281, 282, 287, 290, 290, 293, 294, 297
532 };
533 #endif
534 
535 #if YYDEBUG || YYERROR_VERBOSE || 0
536 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
537  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
538 static const char *const yytname[] =
539 {
540  "$end", "error", "$undefined", "COMPARISON_OPERATOR", "NAME", "STRING",
541  "INTNUM", "FLOATNUM", "ADD", "DROP", "COLUMN", "EQUAL", "SELECT", "FROM",
542  "WHERE", "DELETE", "INSERT", "INTO", "VALUES", "UPDATE", "SET", "AND",
543  "OR", "NOT", "ALTER", "TABLE", "CREATE", "NULL_VALUE", "VARCHAR", "INT",
544  "INTEGER", "DOUBLE", "PRECISION", "DATE", "TIME", "ORDER", "BY", "IS",
545  "ASC", "DESC", "';'", "'('", "')'", "','", "'*'", "'-'", "'+'", "'/'",
546  "$accept", "y_sql", "y_alter", "y_create", "y_drop", "y_select",
547  "y_delete", "y_insert", "y_update", "y_columndefs", "y_columndef",
548  "y_columns", "y_column_list", "y_table", "y_values", "y_value_list",
549  "y_assignments", "y_assignment", "y_condition", "y_sub_condition",
550  "y_sub_condition2", "y_boolean", "y_comparison", "y_expression",
551  "y_product", "y_term", "y_atom", "y_value", "y_column", "y_order",
552  "y_order_asc", "y_order_desc", YY_NULLPTR
553 };
554 #endif
555 
556 # ifdef YYPRINT
557 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
558  (internal) symbol number NUM (which must be that of a token). */
559 static const yytype_uint16 yytoknum[] =
560 {
561  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
562  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
563  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
564  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
565  59, 40, 41, 44, 42, 45, 43, 47
566 };
567 # endif
568 
569 #define YYPACT_NINF -52
570 
571 #define yypact_value_is_default(Yystate) \
572  (!!((Yystate) == (-52)))
573 
574 #define YYTABLE_NINF -1
575 
576 #define yytable_value_is_error(Yytable_value) \
577  0
578 
579  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
580  STATE-NUM. */
581 static const yytype_int16 yypact[] =
582 {
583  64, -8, 3, 11, 5, 32, 49, 57, 2, -52,
584  -52, -52, -52, -52, -52, -52, 32, -52, -52, 39,
585  41, 32, 32, -52, 102, 32, 32, -52, -52, -52,
586  32, 85, 109, 7, 95, 10, 83, 37, -52, 8,
587  84, 3, -52, 115, -10, -52, 6, 117, 124, 8,
588  93, -52, -52, -52, -52, 8, 8, 55, -52, 108,
589  110, -52, -52, 0, 31, -52, -52, -52, -52, 23,
590  90, 50, 8, 95, 79, 124, -52, 129, 24, -52,
591  99, 131, -52, -16, -2, 55, -52, 8, 8, 55,
592  55, 111, 113, 55, 55, 55, 55, -52, -52, -52,
593  -52, 80, 51, 118, -52, 59, -52, -52, 96, -52,
594  -52, 107, -52, -52, -52, -52, -52, 124, 105, 78,
595  -52, -52, -52, -52, -52, 69, 110, -52, 59, 59,
596  -52, -52, 31, 31, -52, -52, -52, -52, -52, 58,
597  -52, 136, -52, -52, 131, -52, -52, -52, -52, -52,
598  -52, 112, 101, -52, -52, -52, -52
599 };
600 
601  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
602  Performed when YYTABLE does not specify something else to do. Zero
603  means the default is an error. */
604 static const yytype_uint8 yydefact[] =
605 {
606  0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
607  3, 4, 6, 8, 5, 7, 0, 36, 34, 0,
608  35, 0, 0, 38, 0, 0, 0, 1, 9, 14,
609  0, 0, 19, 0, 0, 0, 0, 15, 37, 0,
610  0, 0, 21, 0, 23, 52, 0, 0, 0, 0,
611  0, 82, 79, 80, 81, 0, 0, 0, 20, 56,
612  57, 59, 61, 0, 68, 71, 74, 76, 77, 0,
613  0, 0, 0, 0, 0, 0, 11, 0, 0, 25,
614  16, 0, 63, 0, 0, 0, 75, 0, 0, 0,
615  0, 0, 0, 0, 0, 0, 0, 41, 42, 44,
616  40, 0, 0, 0, 54, 55, 24, 53, 0, 28,
617  29, 30, 32, 33, 10, 12, 13, 0, 0, 85,
618  17, 83, 84, 62, 78, 0, 58, 60, 65, 64,
619  67, 66, 70, 69, 72, 73, 43, 45, 39, 0,
620  22, 0, 31, 26, 0, 86, 87, 47, 48, 50,
621  46, 0, 0, 18, 49, 51, 27
622 };
623 
624  /* YYPGOTO[NTERM-NUM]. */
625 static const yytype_int8 yypgoto[] =
626 {
627  -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
628  -48, 103, -52, 76, 42, -52, -52, 73, 9, 91,
629  61, -47, -52, -51, 27, -25, -52, -52, -52, 12,
630  -52, -52
631 };
632 
633  /* YYDEFGOTO[NTERM-NUM]. */
634 static const yytype_int8 yydefgoto[] =
635 {
636  -1, 8, 9, 10, 11, 12, 13, 14, 15, 78,
637  76, 19, 20, 24, 42, 102, 44, 45, 58, 59,
638  60, 61, 62, 63, 64, 65, 66, 67, 68, 120,
639  121, 122
640 };
641 
642  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
643  positive, shift that token. If negative, reduce the rule whose
644  number is the opposite. If YYTABLE_NINF, syntax error. */
645 static const yytype_uint8 yytable[] =
646 {
647  79, 89, 27, 89, 72, 84, 87, 17, 82, 90,
648  74, 90, 51, 52, 53, 54, 75, 16, 46, 47,
649  105, 91, 22, 91, 21, 40, 123, 114, 97, 98,
650  99, 55, 86, 73, 125, 92, 23, 92, 128, 129,
651  124, 127, 28, 93, 94, 93, 94, 18, 41, 56,
652  100, 49, 30, 57, 51, 52, 53, 54, 80, 51,
653  52, 53, 54, 147, 148, 149, 116, 117, 101, 143,
654  134, 135, 50, 1, 25, 95, 2, 104, 96, 3,
655  4, 106, 26, 5, 31, 150, 136, 137, 6, 38,
656  7, 85, 29, 138, 139, 57, 85, 32, 33, 43,
657  57, 35, 36, 151, 93, 94, 37, 108, 109, 110,
658  111, 124, 112, 113, 93, 94, 145, 146, 154, 155,
659  132, 133, 34, 39, 48, 69, 71, 77, 74, 81,
660  87, 88, 103, 115, 118, 119, 40, 141, 130, 142,
661  131, 144, 152, 156, 70, 140, 107, 83, 126, 0,
662  0, 0, 0, 0, 0, 0, 153
663 };
664 
665 static const yytype_int16 yycheck[] =
666 {
667  48, 3, 0, 3, 14, 56, 22, 4, 55, 11,
668  4, 11, 4, 5, 6, 7, 10, 25, 8, 9,
669  71, 23, 17, 23, 13, 18, 42, 75, 5, 6,
670  7, 23, 57, 43, 85, 37, 4, 37, 89, 90,
671  42, 88, 40, 45, 46, 45, 46, 44, 41, 41,
672  27, 14, 13, 45, 4, 5, 6, 7, 49, 4,
673  5, 6, 7, 5, 6, 7, 42, 43, 45, 117,
674  95, 96, 35, 9, 25, 44, 12, 27, 47, 15,
675  16, 72, 25, 19, 43, 27, 6, 7, 24, 4,
676  26, 41, 16, 42, 43, 45, 41, 21, 22, 4,
677  45, 25, 26, 45, 45, 46, 30, 28, 29, 30,
678  31, 42, 33, 34, 45, 46, 38, 39, 6, 7,
679  93, 94, 20, 14, 41, 41, 11, 10, 4, 36,
680  22, 21, 42, 4, 35, 4, 18, 41, 27, 32,
681  27, 36, 6, 42, 41, 103, 73, 56, 87, -1,
682  -1, -1, -1, -1, -1, -1, 144
683 };
684 
685  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
686  symbol of state STATE-NUM. */
687 static const yytype_uint8 yystos[] =
688 {
689  0, 9, 12, 15, 16, 19, 24, 26, 49, 50,
690  51, 52, 53, 54, 55, 56, 25, 4, 44, 59,
691  60, 13, 17, 4, 61, 25, 25, 0, 40, 61,
692  13, 43, 61, 61, 20, 61, 61, 61, 4, 14,
693  18, 41, 62, 4, 64, 65, 8, 9, 41, 14,
694  35, 4, 5, 6, 7, 23, 41, 45, 66, 67,
695  68, 69, 70, 71, 72, 73, 74, 75, 76, 41,
696  59, 11, 14, 43, 4, 10, 58, 10, 57, 58,
697  66, 36, 69, 67, 71, 41, 73, 22, 21, 3,
698  11, 23, 37, 45, 46, 44, 47, 5, 6, 7,
699  27, 45, 63, 42, 27, 71, 66, 65, 28, 29,
700  30, 31, 33, 34, 58, 4, 42, 43, 35, 4,
701  77, 78, 79, 42, 42, 71, 68, 69, 71, 71,
702  27, 27, 72, 72, 73, 73, 6, 7, 42, 43,
703  62, 41, 32, 58, 36, 38, 39, 5, 6, 7,
704  27, 45, 6, 77, 6, 7, 42
705 };
706 
707  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
708 static const yytype_uint8 yyr1[] =
709 {
710  0, 48, 49, 49, 49, 49, 49, 49, 49, 49,
711  50, 50, 50, 51, 52, 53, 53, 53, 53, 54,
712  54, 55, 55, 56, 56, 57, 57, 58, 58, 58,
713  58, 58, 58, 58, 59, 59, 60, 60, 61, 62,
714  63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
715  63, 63, 64, 64, 65, 65, 66, 67, 67, 68,
716  68, 69, 69, 69, 70, 70, 70, 70, 71, 71,
717  71, 72, 72, 72, 73, 73, 74, 74, 74, 75,
718  75, 75, 76, 77, 77, 78, 78, 79
719 };
720 
721  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
722 static const yytype_uint8 yyr2[] =
723 {
724  0, 2, 1, 1, 1, 1, 1, 1, 1, 2,
725  6, 5, 6, 6, 3, 4, 6, 7, 9, 3,
726  5, 4, 7, 4, 6, 1, 3, 5, 2, 2,
727  2, 3, 2, 2, 1, 1, 1, 3, 1, 4,
728  1, 1, 1, 2, 1, 2, 3, 3, 3, 4,
729  3, 4, 1, 3, 3, 3, 1, 1, 3, 1,
730  3, 1, 3, 2, 3, 3, 3, 3, 1, 3,
731  3, 1, 3, 3, 1, 2, 1, 1, 3, 1,
732  1, 1, 1, 1, 1, 1, 2, 2
733 };
734 
735 
736 #define yyerrok (yyerrstatus = 0)
737 #define yyclearin (yychar = YYEMPTY)
738 #define YYEMPTY (-2)
739 #define YYEOF 0
740 
741 #define YYACCEPT goto yyacceptlab
742 #define YYABORT goto yyabortlab
743 #define YYERROR goto yyerrorlab
744 
745 
746 #define YYRECOVERING() (!!yyerrstatus)
747 
748 #define YYBACKUP(Token, Value) \
749 do \
750  if (yychar == YYEMPTY) \
751  { \
752  yychar = (Token); \
753  yylval = (Value); \
754  YYPOPSTACK (yylen); \
755  yystate = *yyssp; \
756  goto yybackup; \
757  } \
758  else \
759  { \
760  yyerror (YY_("syntax error: cannot back up")); \
761  YYERROR; \
762  } \
763 while (0)
764 
765 /* Error token number */
766 #define YYTERROR 1
767 #define YYERRCODE 256
768 
769 
770 
771 /* Enable debugging if requested. */
772 #if YYDEBUG
773 
774 # ifndef YYFPRINTF
775 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
776 # define YYFPRINTF fprintf
777 # endif
778 
779 # define YYDPRINTF(Args) \
780 do { \
781  if (yydebug) \
782  YYFPRINTF Args; \
783 } while (0)
784 
785 /* This macro is provided for backward compatibility. */
786 #ifndef YY_LOCATION_PRINT
787 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
788 #endif
789 
790 
791 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
792 do { \
793  if (yydebug) \
794  { \
795  YYFPRINTF (stderr, "%s ", Title); \
796  yy_symbol_print (stderr, \
797  Type, Value); \
798  YYFPRINTF (stderr, "\n"); \
799  } \
800 } while (0)
801 
802 
803 /*----------------------------------------.
804 | Print this symbol's value on YYOUTPUT. |
805 `----------------------------------------*/
806 
807 static void
808 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
809 {
810  FILE *yyo = yyoutput;
811  YYUSE (yyo);
812  if (!yyvaluep)
813  return;
814 # ifdef YYPRINT
815  if (yytype < YYNTOKENS)
816  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
817 # endif
818  YYUSE (yytype);
819 }
820 
821 
822 /*--------------------------------.
823 | Print this symbol on YYOUTPUT. |
824 `--------------------------------*/
825 
826 static void
827 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
828 {
829  YYFPRINTF (yyoutput, "%s %s (",
830  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
831 
832  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
833  YYFPRINTF (yyoutput, ")");
834 }
835 
836 /*------------------------------------------------------------------.
837 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
838 | TOP (included). |
839 `------------------------------------------------------------------*/
840 
841 static void
842 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
843 {
844  YYFPRINTF (stderr, "Stack now");
845  for (; yybottom <= yytop; yybottom++)
846  {
847  int yybot = *yybottom;
848  YYFPRINTF (stderr, " %d", yybot);
849  }
850  YYFPRINTF (stderr, "\n");
851 }
852 
853 # define YY_STACK_PRINT(Bottom, Top) \
854 do { \
855  if (yydebug) \
856  yy_stack_print ((Bottom), (Top)); \
857 } while (0)
858 
859 
860 /*------------------------------------------------.
861 | Report that the YYRULE is going to be reduced. |
862 `------------------------------------------------*/
863 
864 static void
865 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
866 {
867  unsigned long int yylno = yyrline[yyrule];
868  int yynrhs = yyr2[yyrule];
869  int yyi;
870  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
871  yyrule - 1, yylno);
872  /* The symbols being reduced. */
873  for (yyi = 0; yyi < yynrhs; yyi++)
874  {
875  YYFPRINTF (stderr, " $%d = ", yyi + 1);
876  yy_symbol_print (stderr,
877  yystos[yyssp[yyi + 1 - yynrhs]],
878  &(yyvsp[(yyi + 1) - (yynrhs)])
879  );
880  YYFPRINTF (stderr, "\n");
881  }
882 }
883 
884 # define YY_REDUCE_PRINT(Rule) \
885 do { \
886  if (yydebug) \
887  yy_reduce_print (yyssp, yyvsp, Rule); \
888 } while (0)
889 
890 /* Nonzero means print parse trace. It is left uninitialized so that
891  multiple parsers can coexist. */
893 #else /* !YYDEBUG */
894 # define YYDPRINTF(Args)
895 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
896 # define YY_STACK_PRINT(Bottom, Top)
897 # define YY_REDUCE_PRINT(Rule)
898 #endif /* !YYDEBUG */
899 
900 
901 /* YYINITDEPTH -- initial size of the parser's stacks. */
902 #ifndef YYINITDEPTH
903 # define YYINITDEPTH 200
904 #endif
905 
906 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
907  if the built-in stack extension method is used).
908 
909  Do not make this value too large; the results are undefined if
910  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
911  evaluated with infinite-precision integer arithmetic. */
912 
913 #ifndef YYMAXDEPTH
914 # define YYMAXDEPTH 10000
915 #endif
916 
917 
918 #if YYERROR_VERBOSE
919 
920 # ifndef yystrlen
921 # if defined __GLIBC__ && defined _STRING_H
922 # define yystrlen strlen
923 # else
924 /* Return the length of YYSTR. */
925 static YYSIZE_T
926 yystrlen (const char *yystr)
927 {
928  YYSIZE_T yylen;
929  for (yylen = 0; yystr[yylen]; yylen++)
930  continue;
931  return yylen;
932 }
933 # endif
934 # endif
935 
936 # ifndef yystpcpy
937 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
938 # define yystpcpy stpcpy
939 # else
940 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
941  YYDEST. */
942 static char *
943 yystpcpy (char *yydest, const char *yysrc)
944 {
945  char *yyd = yydest;
946  const char *yys = yysrc;
947 
948  while ((*yyd++ = *yys++) != '\0')
949  continue;
950 
951  return yyd - 1;
952 }
953 # endif
954 # endif
955 
956 # ifndef yytnamerr
957 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
958  quotes and backslashes, so that it's suitable for yyerror. The
959  heuristic is that double-quoting is unnecessary unless the string
960  contains an apostrophe, a comma, or backslash (other than
961  backslash-backslash). YYSTR is taken from yytname. If YYRES is
962  null, do not copy; instead, return the length of what the result
963  would have been. */
964 static YYSIZE_T
965 yytnamerr (char *yyres, const char *yystr)
966 {
967  if (*yystr == '"')
968  {
969  YYSIZE_T yyn = 0;
970  char const *yyp = yystr;
971 
972  for (;;)
973  switch (*++yyp)
974  {
975  case '\'':
976  case ',':
977  goto do_not_strip_quotes;
978 
979  case '\\':
980  if (*++yyp != '\\')
981  goto do_not_strip_quotes;
982  /* Fall through. */
983  default:
984  if (yyres)
985  yyres[yyn] = *yyp;
986  yyn++;
987  break;
988 
989  case '"':
990  if (yyres)
991  yyres[yyn] = '\0';
992  return yyn;
993  }
994  do_not_strip_quotes: ;
995  }
996 
997  if (! yyres)
998  return yystrlen (yystr);
999 
1000  return yystpcpy (yyres, yystr) - yyres;
1001 }
1002 # endif
1003 
1004 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1005  about the unexpected token YYTOKEN for the state stack whose top is
1006  YYSSP.
1007 
1008  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1009  not large enough to hold the message. In that case, also set
1010  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1011  required number of bytes is too large to store. */
1012 static int
1013 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1014  yytype_int16 *yyssp, int yytoken)
1015 {
1016  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1017  YYSIZE_T yysize = yysize0;
1018  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1019  /* Internationalized format string. */
1020  const char *yyformat = YY_NULLPTR;
1021  /* Arguments of yyformat. */
1022  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1023  /* Number of reported tokens (one for the "unexpected", one per
1024  "expected"). */
1025  int yycount = 0;
1026 
1027  /* There are many possibilities here to consider:
1028  - If this state is a consistent state with a default action, then
1029  the only way this function was invoked is if the default action
1030  is an error action. In that case, don't check for expected
1031  tokens because there are none.
1032  - The only way there can be no lookahead present (in yychar) is if
1033  this state is a consistent state with a default action. Thus,
1034  detecting the absence of a lookahead is sufficient to determine
1035  that there is no unexpected or expected token to report. In that
1036  case, just report a simple "syntax error".
1037  - Don't assume there isn't a lookahead just because this state is a
1038  consistent state with a default action. There might have been a
1039  previous inconsistent state, consistent state with a non-default
1040  action, or user semantic action that manipulated yychar.
1041  - Of course, the expected token list depends on states to have
1042  correct lookahead information, and it depends on the parser not
1043  to perform extra reductions after fetching a lookahead from the
1044  scanner and before detecting a syntax error. Thus, state merging
1045  (from LALR or IELR) and default reductions corrupt the expected
1046  token list. However, the list is correct for canonical LR with
1047  one exception: it will still contain any token that will not be
1048  accepted due to an error action in a later state.
1049  */
1050  if (yytoken != YYEMPTY)
1051  {
1052  int yyn = yypact[*yyssp];
1053  yyarg[yycount++] = yytname[yytoken];
1054  if (!yypact_value_is_default (yyn))
1055  {
1056  /* Start YYX at -YYN if negative to avoid negative indexes in
1057  YYCHECK. In other words, skip the first -YYN actions for
1058  this state because they are default actions. */
1059  int yyxbegin = yyn < 0 ? -yyn : 0;
1060  /* Stay within bounds of both yycheck and yytname. */
1061  int yychecklim = YYLAST - yyn + 1;
1062  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1063  int yyx;
1064 
1065  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1066  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1067  && !yytable_value_is_error (yytable[yyx + yyn]))
1068  {
1069  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1070  {
1071  yycount = 1;
1072  yysize = yysize0;
1073  break;
1074  }
1075  yyarg[yycount++] = yytname[yyx];
1076  {
1077  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1078  if (! (yysize <= yysize1
1079  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1080  return 2;
1081  yysize = yysize1;
1082  }
1083  }
1084  }
1085  }
1086 
1087  switch (yycount)
1088  {
1089 # define YYCASE_(N, S) \
1090  case N: \
1091  yyformat = S; \
1092  break
1093  YYCASE_(0, YY_("syntax error"));
1094  YYCASE_(1, YY_("syntax error, unexpected %s"));
1095  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1096  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1097  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1098  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1099 # undef YYCASE_
1100  }
1101 
1102  {
1103  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1104  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1105  return 2;
1106  yysize = yysize1;
1107  }
1108 
1109  if (*yymsg_alloc < yysize)
1110  {
1111  *yymsg_alloc = 2 * yysize;
1112  if (! (yysize <= *yymsg_alloc
1113  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1114  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1115  return 1;
1116  }
1117 
1118  /* Avoid sprintf, as that infringes on the user's name space.
1119  Don't have undefined behavior even if the translation
1120  produced a string with the wrong number of "%s"s. */
1121  {
1122  char *yyp = *yymsg;
1123  int yyi = 0;
1124  while ((*yyp = *yyformat) != '\0')
1125  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1126  {
1127  yyp += yytnamerr (yyp, yyarg[yyi++]);
1128  yyformat += 2;
1129  }
1130  else
1131  {
1132  yyp++;
1133  yyformat++;
1134  }
1135  }
1136  return 0;
1137 }
1138 #endif /* YYERROR_VERBOSE */
1139 
1140 /*-----------------------------------------------.
1141 | Release the memory associated to this symbol. |
1142 `-----------------------------------------------*/
1143 
1144 static void
1145 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1146 {
1147  YYUSE (yyvaluep);
1148  if (!yymsg)
1149  yymsg = "Deleting";
1150  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1151 
1153  YYUSE (yytype);
1155 }
1156 
1157 
1158 
1159 
1160 /* The lookahead symbol. */
1162 
1163 /* The semantic value of the lookahead symbol. */
1165 /* Number of syntax errors so far. */
1167 
1168 
1169 /*----------.
1170 | yyparse. |
1171 `----------*/
1172 
1173 int
1174 yyparse (void)
1175 {
1176  int yystate;
1177  /* Number of tokens to shift before error messages enabled. */
1178  int yyerrstatus;
1179 
1180  /* The stacks and their tools:
1181  'yyss': related to states.
1182  'yyvs': related to semantic values.
1183 
1184  Refer to the stacks through separate pointers, to allow yyoverflow
1185  to reallocate them elsewhere. */
1186 
1187  /* The state stack. */
1188  yytype_int16 yyssa[YYINITDEPTH];
1189  yytype_int16 *yyss;
1190  yytype_int16 *yyssp;
1191 
1192  /* The semantic value stack. */
1193  YYSTYPE yyvsa[YYINITDEPTH];
1194  YYSTYPE *yyvs;
1195  YYSTYPE *yyvsp;
1196 
1197  YYSIZE_T yystacksize;
1198 
1199  int yyn;
1200  int yyresult;
1201  /* Lookahead token as an internal (translated) token number. */
1202  int yytoken = 0;
1203  /* The variables used to return semantic value and location from the
1204  action routines. */
1205  YYSTYPE yyval;
1206 
1207 #if YYERROR_VERBOSE
1208  /* Buffer for error messages, and its allocated size. */
1209  char yymsgbuf[128];
1210  char *yymsg = yymsgbuf;
1211  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1212 #endif
1213 
1214 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1215 
1216  /* The number of symbols on the RHS of the reduced rule.
1217  Keep to zero when no symbol should be popped. */
1218  int yylen = 0;
1219 
1220  yyssp = yyss = yyssa;
1221  yyvsp = yyvs = yyvsa;
1222  yystacksize = YYINITDEPTH;
1223 
1224  YYDPRINTF ((stderr, "Starting parse\n"));
1225 
1226  yystate = 0;
1227  yyerrstatus = 0;
1228  yynerrs = 0;
1229  yychar = YYEMPTY; /* Cause a token to be read. */
1230  goto yysetstate;
1231 
1232 /*------------------------------------------------------------.
1233 | yynewstate -- Push a new state, which is found in yystate. |
1234 `------------------------------------------------------------*/
1235  yynewstate:
1236  /* In all cases, when you get here, the value and location stacks
1237  have just been pushed. So pushing a state here evens the stacks. */
1238  yyssp++;
1239 
1240  yysetstate:
1241  *yyssp = yystate;
1242 
1243  if (yyss + yystacksize - 1 <= yyssp)
1244  {
1245  /* Get the current used size of the three stacks, in elements. */
1246  YYSIZE_T yysize = yyssp - yyss + 1;
1247 
1248 #ifdef yyoverflow
1249  {
1250  /* Give user a chance to reallocate the stack. Use copies of
1251  these so that the &'s don't force the real ones into
1252  memory. */
1253  YYSTYPE *yyvs1 = yyvs;
1254  yytype_int16 *yyss1 = yyss;
1255 
1256  /* Each stack pointer address is followed by the size of the
1257  data in use in that stack, in bytes. This used to be a
1258  conditional around just the two extra args, but that might
1259  be undefined if yyoverflow is a macro. */
1260  yyoverflow (YY_("memory exhausted"),
1261  &yyss1, yysize * sizeof (*yyssp),
1262  &yyvs1, yysize * sizeof (*yyvsp),
1263  &yystacksize);
1264 
1265  yyss = yyss1;
1266  yyvs = yyvs1;
1267  }
1268 #else /* no yyoverflow */
1269 # ifndef YYSTACK_RELOCATE
1270  goto yyexhaustedlab;
1271 # else
1272  /* Extend the stack our own way. */
1273  if (YYMAXDEPTH <= yystacksize)
1274  goto yyexhaustedlab;
1275  yystacksize *= 2;
1276  if (YYMAXDEPTH < yystacksize)
1277  yystacksize = YYMAXDEPTH;
1278 
1279  {
1280  yytype_int16 *yyss1 = yyss;
1281  union yyalloc *yyptr =
1282  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1283  if (! yyptr)
1284  goto yyexhaustedlab;
1285  YYSTACK_RELOCATE (yyss_alloc, yyss);
1286  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1287 # undef YYSTACK_RELOCATE
1288  if (yyss1 != yyssa)
1289  YYSTACK_FREE (yyss1);
1290  }
1291 # endif
1292 #endif /* no yyoverflow */
1293 
1294  yyssp = yyss + yysize - 1;
1295  yyvsp = yyvs + yysize - 1;
1296 
1297  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1298  (unsigned long int) yystacksize));
1299 
1300  if (yyss + yystacksize - 1 <= yyssp)
1301  YYABORT;
1302  }
1303 
1304  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1305 
1306  if (yystate == YYFINAL)
1307  YYACCEPT;
1308 
1309  goto yybackup;
1310 
1311 /*-----------.
1312 | yybackup. |
1313 `-----------*/
1314 yybackup:
1315 
1316  /* Do appropriate processing given the current state. Read a
1317  lookahead token if we need one and don't already have one. */
1318 
1319  /* First try to decide what to do without reference to lookahead token. */
1320  yyn = yypact[yystate];
1321  if (yypact_value_is_default (yyn))
1322  goto yydefault;
1323 
1324  /* Not known => get a lookahead token if don't already have one. */
1325 
1326  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1327  if (yychar == YYEMPTY)
1328  {
1329  YYDPRINTF ((stderr, "Reading a token: "));
1330  yychar = yylex ();
1331  }
1332 
1333  if (yychar <= YYEOF)
1334  {
1335  yychar = yytoken = YYEOF;
1336  YYDPRINTF ((stderr, "Now at end of input.\n"));
1337  }
1338  else
1339  {
1340  yytoken = YYTRANSLATE (yychar);
1341  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1342  }
1343 
1344  /* If the proper action on seeing token YYTOKEN is to reduce or to
1345  detect an error, take that action. */
1346  yyn += yytoken;
1347  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1348  goto yydefault;
1349  yyn = yytable[yyn];
1350  if (yyn <= 0)
1351  {
1352  if (yytable_value_is_error (yyn))
1353  goto yyerrlab;
1354  yyn = -yyn;
1355  goto yyreduce;
1356  }
1357 
1358  /* Count tokens shifted since error; after three, turn off error
1359  status. */
1360  if (yyerrstatus)
1361  yyerrstatus--;
1362 
1363  /* Shift the lookahead token. */
1364  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1365 
1366  /* Discard the shifted token. */
1367  yychar = YYEMPTY;
1368 
1369  yystate = yyn;
1371  *++yyvsp = yylval;
1373 
1374  goto yynewstate;
1375 
1376 
1377 /*-----------------------------------------------------------.
1378 | yydefault -- do the default action for the current state. |
1379 `-----------------------------------------------------------*/
1380 yydefault:
1381  yyn = yydefact[yystate];
1382  if (yyn == 0)
1383  goto yyerrlab;
1384  goto yyreduce;
1385 
1386 
1387 /*-----------------------------.
1388 | yyreduce -- Do a reduction. |
1389 `-----------------------------*/
1390 yyreduce:
1391  /* yyn is the number of a rule to reduce with. */
1392  yylen = yyr2[yyn];
1393 
1394  /* If YYLEN is nonzero, implement the default value of the action:
1395  '$$ = $1'.
1396 
1397  Otherwise, the following line sets YYVAL to garbage.
1398  This behavior is undocumented and Bison
1399  users should not rely upon it. Assigning to YYVAL
1400  unconditionally makes the parser a bit smaller, and it avoids a
1401  GCC warning that YYVAL may be used uninitialized. */
1402  yyval = yyvsp[1-yylen];
1403 
1404 
1405  YY_REDUCE_PRINT (yyn);
1406  switch (yyn)
1407  {
1408  case 10:
1409 #line 108 "yac.y" /* yacc.c:1646 */
1410  { sqpCommand(SQLP_ADD_COLUMN); }
1411 #line 1412 "y.tab.c" /* yacc.c:1646 */
1412  break;
1413 
1414  case 11:
1415 #line 109 "yac.y" /* yacc.c:1646 */
1416  { sqpCommand(SQLP_ADD_COLUMN); }
1417 #line 1418 "y.tab.c" /* yacc.c:1646 */
1418  break;
1419 
1420  case 12:
1421 #line 110 "yac.y" /* yacc.c:1646 */
1422  { sqpCommand(SQLP_DROP_COLUMN); sqpColumn((yyvsp[0].strval));}
1423 #line 1424 "y.tab.c" /* yacc.c:1646 */
1424  break;
1425 
1426  case 13:
1427 #line 114 "yac.y" /* yacc.c:1646 */
1428  { sqpCommand(SQLP_CREATE); }
1429 #line 1430 "y.tab.c" /* yacc.c:1646 */
1430  break;
1431 
1432  case 14:
1433 #line 118 "yac.y" /* yacc.c:1646 */
1434  { sqpCommand(SQLP_DROP); }
1435 #line 1436 "y.tab.c" /* yacc.c:1646 */
1436  break;
1437 
1438  case 15:
1439 #line 122 "yac.y" /* yacc.c:1646 */
1440  { sqpCommand(SQLP_SELECT); }
1441 #line 1442 "y.tab.c" /* yacc.c:1646 */
1442  break;
1443 
1444  case 16:
1445 #line 123 "yac.y" /* yacc.c:1646 */
1446  { sqpCommand(SQLP_SELECT); }
1447 #line 1448 "y.tab.c" /* yacc.c:1646 */
1448  break;
1449 
1450  case 17:
1451 #line 124 "yac.y" /* yacc.c:1646 */
1452  { sqpCommand(SQLP_SELECT); }
1453 #line 1454 "y.tab.c" /* yacc.c:1646 */
1454  break;
1455 
1456  case 18:
1457 #line 125 "yac.y" /* yacc.c:1646 */
1458  { sqpCommand(SQLP_SELECT); }
1459 #line 1460 "y.tab.c" /* yacc.c:1646 */
1460  break;
1461 
1462  case 19:
1463 #line 129 "yac.y" /* yacc.c:1646 */
1464  { sqpCommand(SQLP_DELETE); }
1465 #line 1466 "y.tab.c" /* yacc.c:1646 */
1466  break;
1467 
1468  case 20:
1469 #line 130 "yac.y" /* yacc.c:1646 */
1470  { sqpCommand(SQLP_DELETE); }
1471 #line 1472 "y.tab.c" /* yacc.c:1646 */
1472  break;
1473 
1474  case 21:
1475 #line 134 "yac.y" /* yacc.c:1646 */
1476  { sqpCommand(SQLP_INSERT); }
1477 #line 1478 "y.tab.c" /* yacc.c:1646 */
1478  break;
1479 
1480  case 22:
1481 #line 135 "yac.y" /* yacc.c:1646 */
1482  { sqpCommand(SQLP_INSERT); }
1483 #line 1484 "y.tab.c" /* yacc.c:1646 */
1484  break;
1485 
1486  case 23:
1487 #line 139 "yac.y" /* yacc.c:1646 */
1488  { sqpCommand(SQLP_UPDATE); }
1489 #line 1490 "y.tab.c" /* yacc.c:1646 */
1490  break;
1491 
1492  case 24:
1493 #line 140 "yac.y" /* yacc.c:1646 */
1494  { sqpCommand(SQLP_UPDATE); }
1495 #line 1496 "y.tab.c" /* yacc.c:1646 */
1496  break;
1497 
1498  case 27:
1499 #line 150 "yac.y" /* yacc.c:1646 */
1500  { sqpColumnDef( (yyvsp[-4].strval), SQLP_VARCHAR, (yyvsp[-1].intval), 0 ); }
1501 #line 1502 "y.tab.c" /* yacc.c:1646 */
1502  break;
1503 
1504  case 28:
1505 #line 151 "yac.y" /* yacc.c:1646 */
1506  { sqpColumnDef( (yyvsp[-1].strval), SQLP_INTEGER, 0, 0 ); }
1507 #line 1508 "y.tab.c" /* yacc.c:1646 */
1508  break;
1509 
1510  case 29:
1511 #line 152 "yac.y" /* yacc.c:1646 */
1512  { sqpColumnDef( (yyvsp[-1].strval), SQLP_INTEGER, 0, 0 ); }
1513 #line 1514 "y.tab.c" /* yacc.c:1646 */
1514  break;
1515 
1516  case 30:
1517 #line 153 "yac.y" /* yacc.c:1646 */
1518  { sqpColumnDef( (yyvsp[-1].strval), SQLP_DOUBLE, 0, 0 ); }
1519 #line 1520 "y.tab.c" /* yacc.c:1646 */
1520  break;
1521 
1522  case 31:
1523 #line 154 "yac.y" /* yacc.c:1646 */
1524  { sqpColumnDef( (yyvsp[-2].strval), SQLP_DOUBLE, 0, 0 ); }
1525 #line 1526 "y.tab.c" /* yacc.c:1646 */
1526  break;
1527 
1528  case 32:
1529 #line 155 "yac.y" /* yacc.c:1646 */
1530  { sqpColumnDef( (yyvsp[-1].strval), SQLP_DATE, 0, 0 ); }
1531 #line 1532 "y.tab.c" /* yacc.c:1646 */
1532  break;
1533 
1534  case 33:
1535 #line 156 "yac.y" /* yacc.c:1646 */
1536  { sqpColumnDef( (yyvsp[-1].strval), SQLP_TIME, 0, 0 ); }
1537 #line 1538 "y.tab.c" /* yacc.c:1646 */
1538  break;
1539 
1540  case 36:
1541 #line 165 "yac.y" /* yacc.c:1646 */
1542  { sqpColumn( (yyvsp[0].strval) ); }
1543 #line 1544 "y.tab.c" /* yacc.c:1646 */
1544  break;
1545 
1546  case 37:
1547 #line 166 "yac.y" /* yacc.c:1646 */
1548  { sqpColumn( (yyvsp[0].strval) ); }
1549 #line 1550 "y.tab.c" /* yacc.c:1646 */
1550  break;
1551 
1552  case 38:
1553 #line 170 "yac.y" /* yacc.c:1646 */
1554  { sqpTable( (yyvsp[0].strval) ); }
1555 #line 1556 "y.tab.c" /* yacc.c:1646 */
1556  break;
1557 
1558  case 40:
1559 #line 178 "yac.y" /* yacc.c:1646 */
1560  { sqpValue( NULL, 0, 0.0, SQLP_NULL ); }
1561 #line 1562 "y.tab.c" /* yacc.c:1646 */
1562  break;
1563 
1564  case 41:
1565 #line 179 "yac.y" /* yacc.c:1646 */
1566  { sqpValue( (yyvsp[0].strval), 0, 0.0, SQLP_S ); }
1567 #line 1568 "y.tab.c" /* yacc.c:1646 */
1568  break;
1569 
1570  case 42:
1571 #line 180 "yac.y" /* yacc.c:1646 */
1572  { sqpValue( NULL, (yyvsp[0].intval), 0.0, SQLP_I ); }
1573 #line 1574 "y.tab.c" /* yacc.c:1646 */
1574  break;
1575 
1576  case 43:
1577 #line 181 "yac.y" /* yacc.c:1646 */
1578  { sqpValue( NULL, -(yyvsp[0].intval), 0.0, SQLP_I ); }
1579 #line 1580 "y.tab.c" /* yacc.c:1646 */
1580  break;
1581 
1582  case 44:
1583 #line 182 "yac.y" /* yacc.c:1646 */
1584  { sqpValue( NULL, 0, (yyvsp[0].floatval), SQLP_D ); }
1585 #line 1586 "y.tab.c" /* yacc.c:1646 */
1586  break;
1587 
1588  case 45:
1589 #line 183 "yac.y" /* yacc.c:1646 */
1590  { sqpValue( NULL, 0, -(yyvsp[0].floatval), SQLP_D ); }
1591 #line 1592 "y.tab.c" /* yacc.c:1646 */
1592  break;
1593 
1594  case 46:
1595 #line 184 "yac.y" /* yacc.c:1646 */
1596  { sqpValue( NULL, 0, 0.0, SQLP_NULL ); }
1597 #line 1598 "y.tab.c" /* yacc.c:1646 */
1598  break;
1599 
1600  case 47:
1601 #line 185 "yac.y" /* yacc.c:1646 */
1602  { sqpValue( (yyvsp[0].strval), 0, 0.0, SQLP_S ); }
1603 #line 1604 "y.tab.c" /* yacc.c:1646 */
1604  break;
1605 
1606  case 48:
1607 #line 186 "yac.y" /* yacc.c:1646 */
1608  { sqpValue( NULL, (yyvsp[0].intval), 0.0, SQLP_I ); }
1609 #line 1610 "y.tab.c" /* yacc.c:1646 */
1610  break;
1611 
1612  case 49:
1613 #line 187 "yac.y" /* yacc.c:1646 */
1614  { sqpValue( NULL, -(yyvsp[0].intval), 0.0, SQLP_I ); }
1615 #line 1616 "y.tab.c" /* yacc.c:1646 */
1616  break;
1617 
1618  case 50:
1619 #line 188 "yac.y" /* yacc.c:1646 */
1620  { sqpValue( NULL, 0, (yyvsp[0].floatval), SQLP_D ); }
1621 #line 1622 "y.tab.c" /* yacc.c:1646 */
1622  break;
1623 
1624  case 51:
1625 #line 189 "yac.y" /* yacc.c:1646 */
1626  { sqpValue( NULL, 0, -(yyvsp[0].floatval), SQLP_D ); }
1627 #line 1628 "y.tab.c" /* yacc.c:1646 */
1628  break;
1629 
1630  case 54:
1631 #line 198 "yac.y" /* yacc.c:1646 */
1632  { sqpAssignment( (yyvsp[-2].strval), NULL, 0, 0.0, NULL, SQLP_NULL ); }
1633 #line 1634 "y.tab.c" /* yacc.c:1646 */
1634  break;
1635 
1636  case 55:
1637 #line 202 "yac.y" /* yacc.c:1646 */
1638  { sqpAssignment( (yyvsp[-2].strval), NULL, 0, 0.0, (yyvsp[0].node), SQLP_EXPR ); }
1639 #line 1640 "y.tab.c" /* yacc.c:1646 */
1640  break;
1641 
1642  case 56:
1643 #line 206 "yac.y" /* yacc.c:1646 */
1644  {
1645  (yyval.node) = (yyvsp[0].node);
1646  sqlpStmt->upperNodeptr = (yyval.node);
1647  }
1648 #line 1649 "y.tab.c" /* yacc.c:1646 */
1649  break;
1650 
1651  case 57:
1652 #line 213 "yac.y" /* yacc.c:1646 */
1653  { (yyval.node) = (yyvsp[0].node); }
1654 #line 1655 "y.tab.c" /* yacc.c:1646 */
1655  break;
1656 
1657  case 58:
1658 #line 214 "yac.y" /* yacc.c:1646 */
1659  { (yyval.node) = sqpNewExpressionNode (SQLP_OR, (yyvsp[-2].node), (yyvsp[0].node)); }
1660 #line 1661 "y.tab.c" /* yacc.c:1646 */
1661  break;
1662 
1663  case 59:
1664 #line 218 "yac.y" /* yacc.c:1646 */
1665  { (yyval.node) = (yyvsp[0].node); }
1666 #line 1667 "y.tab.c" /* yacc.c:1646 */
1667  break;
1668 
1669  case 60:
1670 #line 219 "yac.y" /* yacc.c:1646 */
1671  { (yyval.node) = sqpNewExpressionNode (SQLP_AND, (yyvsp[-2].node), (yyvsp[0].node)); }
1672 #line 1673 "y.tab.c" /* yacc.c:1646 */
1673  break;
1674 
1675  case 61:
1676 #line 223 "yac.y" /* yacc.c:1646 */
1677  { (yyval.node) = (yyvsp[0].node); }
1678 #line 1679 "y.tab.c" /* yacc.c:1646 */
1679  break;
1680 
1681  case 62:
1682 #line 224 "yac.y" /* yacc.c:1646 */
1683  { (yyval.node) = (yyvsp[-1].node); }
1684 #line 1685 "y.tab.c" /* yacc.c:1646 */
1685  break;
1686 
1687  case 63:
1688 #line 225 "yac.y" /* yacc.c:1646 */
1689  { (yyval.node) = sqpNewExpressionNode ( SQLP_NOT, NULL, (yyvsp[0].node)); }
1690 #line 1691 "y.tab.c" /* yacc.c:1646 */
1691  break;
1692 
1693  case 64:
1694 #line 230 "yac.y" /* yacc.c:1646 */
1695  {
1696  (yyval.node) = sqpNewExpressionNode ( SQLP_EQ, (yyvsp[-2].node), (yyvsp[0].node));
1697  }
1698 #line 1699 "y.tab.c" /* yacc.c:1646 */
1699  break;
1700 
1701  case 65:
1702 #line 233 "yac.y" /* yacc.c:1646 */
1703  {
1704  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode((yyvsp[-1].strval)), (yyvsp[-2].node), (yyvsp[0].node));
1705  }
1706 #line 1707 "y.tab.c" /* yacc.c:1646 */
1707  break;
1708 
1709  case 66:
1710 #line 236 "yac.y" /* yacc.c:1646 */
1711  {
1712  (yyval.node) = sqpNewExpressionNode ( SQLP_ISNULL, NULL, (yyvsp[-2].node));
1713  }
1714 #line 1715 "y.tab.c" /* yacc.c:1646 */
1715  break;
1716 
1717  case 67:
1718 #line 239 "yac.y" /* yacc.c:1646 */
1719  {
1720  (yyval.node) = sqpNewExpressionNode ( SQLP_NOTNULL, NULL, (yyvsp[-2].node));
1721  }
1722 #line 1723 "y.tab.c" /* yacc.c:1646 */
1723  break;
1724 
1725  case 68:
1726 #line 246 "yac.y" /* yacc.c:1646 */
1727  { (yyval.node) = (yyvsp[0].node); }
1728 #line 1729 "y.tab.c" /* yacc.c:1646 */
1729  break;
1730 
1731  case 69:
1732 #line 247 "yac.y" /* yacc.c:1646 */
1733  {
1734  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("+"), (yyvsp[-2].node), (yyvsp[0].node) );
1735  }
1736 #line 1737 "y.tab.c" /* yacc.c:1646 */
1737  break;
1738 
1739  case 70:
1740 #line 250 "yac.y" /* yacc.c:1646 */
1741  {
1742  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("-"), (yyvsp[-2].node), (yyvsp[0].node) );
1743  }
1744 #line 1745 "y.tab.c" /* yacc.c:1646 */
1745  break;
1746 
1747  case 71:
1748 #line 256 "yac.y" /* yacc.c:1646 */
1749  { (yyval.node) = (yyvsp[0].node); }
1750 #line 1751 "y.tab.c" /* yacc.c:1646 */
1751  break;
1752 
1753  case 72:
1754 #line 257 "yac.y" /* yacc.c:1646 */
1755  {
1756  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("*"), (yyvsp[-2].node), (yyvsp[0].node) );
1757  }
1758 #line 1759 "y.tab.c" /* yacc.c:1646 */
1759  break;
1760 
1761  case 73:
1762 #line 260 "yac.y" /* yacc.c:1646 */
1763  {
1764  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("/"), (yyvsp[-2].node), (yyvsp[0].node) );
1765  }
1766 #line 1767 "y.tab.c" /* yacc.c:1646 */
1767  break;
1768 
1769  case 74:
1770 #line 266 "yac.y" /* yacc.c:1646 */
1771  { (yyval.node) = (yyvsp[0].node); }
1772 #line 1773 "y.tab.c" /* yacc.c:1646 */
1773  break;
1774 
1775  case 75:
1776 #line 267 "yac.y" /* yacc.c:1646 */
1777  {
1778  (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("-"), sqpNewValueNode ( NULL, 0, 0.0, SQLP_I ), (yyvsp[0].node) );
1779  }
1780 #line 1781 "y.tab.c" /* yacc.c:1646 */
1781  break;
1782 
1783  case 76:
1784 #line 273 "yac.y" /* yacc.c:1646 */
1785  { (yyval.node) = (yyvsp[0].node); }
1786 #line 1787 "y.tab.c" /* yacc.c:1646 */
1787  break;
1788 
1789  case 77:
1790 #line 274 "yac.y" /* yacc.c:1646 */
1791  { (yyval.node) = (yyvsp[0].node); }
1792 #line 1793 "y.tab.c" /* yacc.c:1646 */
1793  break;
1794 
1795  case 78:
1796 #line 275 "yac.y" /* yacc.c:1646 */
1797  { (yyval.node) = (yyvsp[-1].node); }
1798 #line 1799 "y.tab.c" /* yacc.c:1646 */
1799  break;
1800 
1801  case 79:
1802 #line 280 "yac.y" /* yacc.c:1646 */
1803  { (yyval.node) = sqpNewValueNode ( (yyvsp[0].strval), 0, 0.0, SQLP_S ); }
1804 #line 1805 "y.tab.c" /* yacc.c:1646 */
1805  break;
1806 
1807  case 80:
1808 #line 281 "yac.y" /* yacc.c:1646 */
1809  { (yyval.node) = sqpNewValueNode ( NULL, (yyvsp[0].intval), 0.0, SQLP_I ); }
1810 #line 1811 "y.tab.c" /* yacc.c:1646 */
1811  break;
1812 
1813  case 81:
1814 #line 282 "yac.y" /* yacc.c:1646 */
1815  { (yyval.node) = sqpNewValueNode ( NULL, 0, (yyvsp[0].floatval), SQLP_D ); }
1816 #line 1817 "y.tab.c" /* yacc.c:1646 */
1817  break;
1818 
1819  case 82:
1820 #line 287 "yac.y" /* yacc.c:1646 */
1821  {(yyval.node) = sqpNewColumnNode ( (yyvsp[0].strval) );}
1822 #line 1823 "y.tab.c" /* yacc.c:1646 */
1823  break;
1824 
1825  case 85:
1826 #line 293 "yac.y" /* yacc.c:1646 */
1827  { sqpOrderColumn( (yyvsp[0].strval), SORT_ASC ); }
1828 #line 1829 "y.tab.c" /* yacc.c:1646 */
1829  break;
1830 
1831  case 86:
1832 #line 294 "yac.y" /* yacc.c:1646 */
1833  { sqpOrderColumn( (yyvsp[-1].strval), SORT_ASC ); }
1834 #line 1835 "y.tab.c" /* yacc.c:1646 */
1835  break;
1836 
1837  case 87:
1838 #line 297 "yac.y" /* yacc.c:1646 */
1839  { sqpOrderColumn( (yyvsp[-1].strval), SORT_DESC ); }
1840 #line 1841 "y.tab.c" /* yacc.c:1646 */
1841  break;
1842 
1843 
1844 #line 1845 "y.tab.c" /* yacc.c:1646 */
1845  default: break;
1846  }
1847  /* User semantic actions sometimes alter yychar, and that requires
1848  that yytoken be updated with the new translation. We take the
1849  approach of translating immediately before every use of yytoken.
1850  One alternative is translating here after every semantic action,
1851  but that translation would be missed if the semantic action invokes
1852  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1853  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1854  incorrect destructor might then be invoked immediately. In the
1855  case of YYERROR or YYBACKUP, subsequent parser actions might lead
1856  to an incorrect destructor call or verbose syntax error message
1857  before the lookahead is translated. */
1858  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1859 
1860  YYPOPSTACK (yylen);
1861  yylen = 0;
1862  YY_STACK_PRINT (yyss, yyssp);
1863 
1864  *++yyvsp = yyval;
1865 
1866  /* Now 'shift' the result of the reduction. Determine what state
1867  that goes to, based on the state we popped back to and the rule
1868  number reduced by. */
1869 
1870  yyn = yyr1[yyn];
1871 
1872  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1873  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1874  yystate = yytable[yystate];
1875  else
1876  yystate = yydefgoto[yyn - YYNTOKENS];
1877 
1878  goto yynewstate;
1879 
1880 
1881 /*--------------------------------------.
1882 | yyerrlab -- here on detecting error. |
1883 `--------------------------------------*/
1884 yyerrlab:
1885  /* Make sure we have latest lookahead translation. See comments at
1886  user semantic actions for why this is necessary. */
1887  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1888 
1889  /* If not already recovering from an error, report this error. */
1890  if (!yyerrstatus)
1891  {
1892  ++yynerrs;
1893 #if ! YYERROR_VERBOSE
1894  yyerror (YY_("syntax error"));
1895 #else
1896 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1897  yyssp, yytoken)
1898  {
1899  char const *yymsgp = YY_("syntax error");
1900  int yysyntax_error_status;
1901  yysyntax_error_status = YYSYNTAX_ERROR;
1902  if (yysyntax_error_status == 0)
1903  yymsgp = yymsg;
1904  else if (yysyntax_error_status == 1)
1905  {
1906  if (yymsg != yymsgbuf)
1907  YYSTACK_FREE (yymsg);
1908  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1909  if (!yymsg)
1910  {
1911  yymsg = yymsgbuf;
1912  yymsg_alloc = sizeof yymsgbuf;
1913  yysyntax_error_status = 2;
1914  }
1915  else
1916  {
1917  yysyntax_error_status = YYSYNTAX_ERROR;
1918  yymsgp = yymsg;
1919  }
1920  }
1921  yyerror (yymsgp);
1922  if (yysyntax_error_status == 2)
1923  goto yyexhaustedlab;
1924  }
1925 # undef YYSYNTAX_ERROR
1926 #endif
1927  }
1928 
1929 
1930 
1931  if (yyerrstatus == 3)
1932  {
1933  /* If just tried and failed to reuse lookahead token after an
1934  error, discard it. */
1935 
1936  if (yychar <= YYEOF)
1937  {
1938  /* Return failure if at end of input. */
1939  if (yychar == YYEOF)
1940  YYABORT;
1941  }
1942  else
1943  {
1944  yydestruct ("Error: discarding",
1945  yytoken, &yylval);
1946  yychar = YYEMPTY;
1947  }
1948  }
1949 
1950  /* Else will try to reuse lookahead token after shifting the error
1951  token. */
1952  goto yyerrlab1;
1953 
1954 
1955 /*---------------------------------------------------.
1956 | yyerrorlab -- error raised explicitly by YYERROR. |
1957 `---------------------------------------------------*/
1958 yyerrorlab:
1959 
1960  /* Pacify compilers like GCC when the user code never invokes
1961  YYERROR and the label yyerrorlab therefore never appears in user
1962  code. */
1963  if (/*CONSTCOND*/ 0)
1964  goto yyerrorlab;
1965 
1966  /* Do not reclaim the symbols of the rule whose action triggered
1967  this YYERROR. */
1968  YYPOPSTACK (yylen);
1969  yylen = 0;
1970  YY_STACK_PRINT (yyss, yyssp);
1971  yystate = *yyssp;
1972  goto yyerrlab1;
1973 
1974 
1975 /*-------------------------------------------------------------.
1976 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1977 `-------------------------------------------------------------*/
1978 yyerrlab1:
1979  yyerrstatus = 3; /* Each real token shifted decrements this. */
1980 
1981  for (;;)
1982  {
1983  yyn = yypact[yystate];
1984  if (!yypact_value_is_default (yyn))
1985  {
1986  yyn += YYTERROR;
1987  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1988  {
1989  yyn = yytable[yyn];
1990  if (0 < yyn)
1991  break;
1992  }
1993  }
1994 
1995  /* Pop the current state because it cannot handle the error token. */
1996  if (yyssp == yyss)
1997  YYABORT;
1998 
1999 
2000  yydestruct ("Error: popping",
2001  yystos[yystate], yyvsp);
2002  YYPOPSTACK (1);
2003  yystate = *yyssp;
2004  YY_STACK_PRINT (yyss, yyssp);
2005  }
2006 
2008  *++yyvsp = yylval;
2010 
2011 
2012  /* Shift the error token. */
2013  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2014 
2015  yystate = yyn;
2016  goto yynewstate;
2017 
2018 
2019 /*-------------------------------------.
2020 | yyacceptlab -- YYACCEPT comes here. |
2021 `-------------------------------------*/
2022 yyacceptlab:
2023  yyresult = 0;
2024  goto yyreturn;
2025 
2026 /*-----------------------------------.
2027 | yyabortlab -- YYABORT comes here. |
2028 `-----------------------------------*/
2029 yyabortlab:
2030  yyresult = 1;
2031  goto yyreturn;
2032 
2033 #if !defined yyoverflow || YYERROR_VERBOSE
2034 /*-------------------------------------------------.
2035 | yyexhaustedlab -- memory exhaustion comes here. |
2036 `-------------------------------------------------*/
2037 yyexhaustedlab:
2038  yyerror (YY_("memory exhausted"));
2039  yyresult = 2;
2040  /* Fall through. */
2041 #endif
2042 
2043 yyreturn:
2044  if (yychar != YYEMPTY)
2045  {
2046  /* Make sure we have latest lookahead translation. See comments at
2047  user semantic actions for why this is necessary. */
2048  yytoken = YYTRANSLATE (yychar);
2049  yydestruct ("Cleanup: discarding lookahead",
2050  yytoken, &yylval);
2051  }
2052  /* Do not reclaim the symbols of the rule whose action triggered
2053  this YYABORT or YYACCEPT. */
2054  YYPOPSTACK (yylen);
2055  YY_STACK_PRINT (yyss, yyssp);
2056  while (yyssp != yyss)
2057  {
2058  yydestruct ("Cleanup: popping",
2059  yystos[*yyssp], yyvsp);
2060  YYPOPSTACK (1);
2061  }
2062 #ifndef yyoverflow
2063  if (yyss != yyssa)
2064  YYSTACK_FREE (yyss);
2065 #endif
2066 #if YYERROR_VERBOSE
2067  if (yymsg != yymsgbuf)
2068  YYSTACK_FREE (yymsg);
2069 #endif
2070  return yyresult;
2071 }
2072 #line 299 "yac.y" /* yacc.c:1906 */
2073 
2074 
2075 
yytokentype
Definition: y.tab.c:109
#define YYPOPSTACK(N)
#define YYEMPTY
Definition: y.tab.c:738
#define NOT
Definition: y.tab.c:171
#define YYSIZE_T
Definition: y.tab.c:259
short int yytype_int16
Definition: y.tab.c:249
double floatval
Definition: y.tab.c:197
#define YYSTACK_ALLOC_MAXIMUM
Definition: y.tab.c:375
#define DELETE
Definition: y.tab.c:163
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: y.tab.c:326
#define ORDER
Definition: y.tab.c:183
#define DESC
Definition: y.tab.c:187
#define YYUSE(E)
Definition: y.tab.c:308
#define PRECISION
Definition: y.tab.c:180
int subtok
Definition: y.tab.c:199
#define INTO
Definition: y.tab.c:165
#define TIME
Definition: y.tab.c:182
void sqpColumn(char *col)
Definition: sql.c:102
int intval
Definition: y.tab.c:196
#define YYDPRINTF(Args)
Definition: y.tab.c:779
int yydebug
Definition: y.tab.c:892
SQLPNODE * sqpNewColumnNode(char *name)
Definition: sql.c:231
void sqpColumnDef(char *col, int type, int width, int decimals)
Definition: sql.c:114
#define YY_NULLPTR
Definition: y.tab.c:82
#define YYSTACK_BYTES(N)
Definition: y.tab.c:417
#define TABLE
Definition: y.tab.c:173
#define STRING
Definition: y.tab.c:153
#define YYSTACK_FREE
Definition: y.tab.c:373
#define YYMAXDEPTH
Definition: y.tab.c:914
#define EQUAL
Definition: y.tab.c:159
char * strval
Definition: y.tab.c:198
unsigned char yytype_uint8
Definition: y.tab.c:231
#define YYFINAL
Definition: y.tab.c:462
#define INT
Definition: y.tab.c:177
#define INSERT
Definition: y.tab.c:164
Definition: form.c:18
#define UPDATE
Definition: y.tab.c:167
int sqpOperatorCode(char *oper)
Definition: sql.c:280
#define VALUES
Definition: y.tab.c:166
#define CREATE
Definition: y.tab.c:174
signed char yytype_int8
Definition: y.tab.c:237
#define YY_(Msgid)
Definition: y.tab.c:275
YYSTYPE yylval
Definition: y.tab.c:1164
void sqpTable(char *tbl)
Definition: sql.c:96
#define YYINITDEPTH
Definition: y.tab.c:903
int yychar
Definition: y.tab.c:1161
SQLPNODE * sqpNewValueNode(char *strval, int intval, double dblval, int type)
Definition: sql.c:243
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: y.tab.c:325
#define YYFPRINTF
Definition: y.tab.c:776
yytype_int16 yyss_alloc
Definition: y.tab.c:408
void * malloc(YYSIZE_T)
#define DOUBLE
Definition: y.tab.c:179
#define WHERE
Definition: y.tab.c:162
#define FLOATNUM
Definition: y.tab.c:155
YYSTYPE yyvs_alloc
Definition: y.tab.c:409
int yyparse(void)
Definition: y.tab.c:1174
#define YY_REDUCE_PRINT(Rule)
Definition: y.tab.c:884
#define YYTERROR
Definition: y.tab.c:766
#define BY
Definition: y.tab.c:184
void sqpOrderColumn(char *col, int dir)
Definition: sql.c:200
#define ASC
Definition: y.tab.c:186
#define INTEGER
Definition: y.tab.c:178
#define YYACCEPT
Definition: y.tab.c:741
#define NAME
Definition: y.tab.c:152
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: y.tab.c:428
Definition: y.tab.c:406
int yylex(void)
#define YY_STACK_PRINT(Bottom, Top)
Definition: y.tab.c:853
#define INTNUM
Definition: y.tab.c:154
#define ALTER
Definition: y.tab.c:172
#define YYNTOKENS
Definition: y.tab.c:467
return NULL
Definition: dbfopen.c:1394
SQLPNODE * node
Definition: y.tab.c:200
#define SET
Definition: y.tab.c:168
#define YYEOF
Definition: y.tab.c:739
#define yypact_value_is_default(Yystate)
Definition: y.tab.c:571
#define YYCASE_(N, S)
#define YYSYNTAX_ERROR
#define SELECT
Definition: y.tab.c:160
Definition: y.tab.c:192
#define NULL_VALUE
Definition: y.tab.c:175
SQLPNODE * sqpNewExpressionNode(int oper, SQLPNODE *left, SQLPNODE *right)
Definition: sql.c:217
#define YYSTACK_ALLOC
Definition: y.tab.c:372
void free(void *)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: y.tab.c:791
#define OR
Definition: y.tab.c:170
#define YYLAST
Definition: y.tab.c:464
#define AND
Definition: y.tab.c:169
void sqpAssignment(char *col, char *strval, int intval, double dblval, SQLPNODE *expval, int type)
Definition: sql.c:162
#define FROM
Definition: y.tab.c:161
#define COMPARISON_OPERATOR
Definition: y.tab.c:151
#define ADD
Definition: y.tab.c:156
int yynerrs
Definition: y.tab.c:1166
unsigned short int yytype_uint16
Definition: y.tab.c:243
#define VARCHAR
Definition: y.tab.c:176
#define IS
Definition: y.tab.c:185
void sqpValue(char *strval, int intval, double dblval, int type)
Definition: sql.c:129
#define yytable_value_is_error(Yytable_value)
Definition: y.tab.c:576
#define YYABORT
Definition: y.tab.c:742
#define DROP
Definition: y.tab.c:157
#define YYTRANSLATE(YYX)
Definition: y.tab.c:480
#define DATE
Definition: y.tab.c:181
void sqpCommand(int command)
Definition: sql.c:90