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