47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYLSP_NEEDED 0
74 #include <grass/sqlp.h>
77 #define YYERROR_VERBOSE 1
90 #ifdef YYERROR_VERBOSE
91 # undef YYERROR_VERBOSE
92 # define YYERROR_VERBOSE 1
94 # define YYERROR_VERBOSE 0
99 # define YYTOKEN_TABLE 0
149 #define COMPARISON_OPERATOR 258
173 #define NULL_VALUE 282
178 #define PRECISION 287
190 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
208 # define YYSTYPE_IS_TRIVIAL 1
209 # define yystype YYSTYPE
210 # define YYSTYPE_IS_DECLARED 1
220 extern int yylex(
void);
239 #elif (defined __STDC__ || defined __C99__FUNC__ \
240 || defined __cplusplus || defined _MSC_VER)
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)
266 # define YYSIZE_T size_t
268 # define YYSIZE_T unsigned int
272 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
275 # if defined YYENABLE_NLS && YYENABLE_NLS
277 # include <libintl.h>
278 # define YY_(msgid) dgettext ("bison-runtime", msgid)
282 # define YY_(msgid) msgid
287 #if ! defined lint || defined __GNUC__
288 # define YYUSE(e) ((void) (e))
297 #if (defined __STDC__ || defined __C99__FUNC__ \
298 || defined __cplusplus || defined _MSC_VER)
311 #if ! defined yyoverflow || YYERROR_VERBOSE
315 # ifdef YYSTACK_USE_ALLOCA
316 # if YYSTACK_USE_ALLOCA
318 # define YYSTACK_ALLOC __builtin_alloca
319 # elif defined __BUILTIN_VA_ARG_INCR
322 # define YYSTACK_ALLOC __alloca
323 # elif defined _MSC_VER
325 # define alloca _alloca
327 # define YYSTACK_ALLOC alloca
328 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
329 || defined __cplusplus || defined _MSC_VER)
331 # ifndef EXIT_SUCCESS
332 # define EXIT_SUCCESS 0
339 # ifdef YYSTACK_ALLOC
341 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
342 # ifndef YYSTACK_ALLOC_MAXIMUM
347 # define YYSTACK_ALLOC_MAXIMUM 4032
350 # define YYSTACK_ALLOC YYMALLOC
351 # define YYSTACK_FREE YYFREE
352 # ifndef YYSTACK_ALLOC_MAXIMUM
353 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
355 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
356 && ! ((defined YYMALLOC || defined malloc) \
357 && (defined YYFREE || defined free)))
359 # ifndef EXIT_SUCCESS
360 # define EXIT_SUCCESS 0
364 # define YYMALLOC malloc
365 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
366 || defined __cplusplus || defined _MSC_VER)
372 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
373 || defined __cplusplus || defined _MSC_VER)
381 #if (! defined yyoverflow \
382 && (! defined __cplusplus \
383 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
393 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
397 # define YYSTACK_BYTES(N) \
398 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
399 + YYSTACK_GAP_MAXIMUM)
401 # define YYCOPY_NEEDED 1
408 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
421 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
425 # if defined __GNUC__ && 1 < __GNUC__
426 # define YYCOPY(To, From, Count) \
427 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
429 # define YYCOPY(To, From, Count) \
433 for (yyi = 0; yyi < (Count); yyi++) \
434 (To)[yyi] = (From)[yyi]; \
453 #define YYNSTATES 157
457 #define YYMAXUTOK 294
459 #define YYTRANSLATE(YYX) \
460 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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,
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
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
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
564 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
567 static const char *
const yytname[] =
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
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
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
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
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
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,
660 #define YYPACT_NINF -52
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
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,
693 #define YYTABLE_NINF -1
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
714 #define yypact_value_is_default(yystate) \
717 #define yytable_value_is_error(yytable_value) \
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
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
762 #define yyerrok (yyerrstatus = 0)
763 #define yyclearin (yychar = YYEMPTY)
767 #define YYACCEPT goto yyacceptlab
768 #define YYABORT goto yyabortlab
769 #define YYERROR goto yyerrorlab
779 #define YYFAIL goto yyerrlab
787 #define YYRECOVERING() (!!yyerrstatus)
789 #define YYBACKUP(Token, Value) \
791 if (yychar == YYEMPTY && yylen == 1) \
800 yyerror (YY_("syntax error: cannot back up")); \
807 #define YYERRCODE 256
814 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
815 #ifndef YYLLOC_DEFAULT
816 # define YYLLOC_DEFAULT(Current, Rhs, N) \
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; \
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; \
838 #ifndef YY_LOCATION_PRINT
839 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
846 # define YYLEX yylex (YYLEX_PARAM)
848 # define YYLEX yylex ()
856 # define YYFPRINTF fprintf
859 # define YYDPRINTF(Args) \
865 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
869 YYFPRINTF (stderr, "%s ", Title); \
870 yy_symbol_print (stderr, \
872 YYFPRINTF (stderr, "\n"); \
882 #if (defined __STDC__ || defined __C99__FUNC__ \
883 || defined __cplusplus || defined _MSC_VER)
885 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
888 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
891 YYSTYPE const * const yyvaluep;
898 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
914 #if (defined __STDC__ || defined __C99__FUNC__ \
915 || defined __cplusplus || defined _MSC_VER)
917 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
920 yy_symbol_print (yyoutput, yytype, yyvaluep)
923 YYSTYPE const * const yyvaluep;
927 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
929 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
931 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
940 #if (defined __STDC__ || defined __C99__FUNC__ \
941 || defined __cplusplus || defined _MSC_VER)
946 yy_stack_print (yybottom, yytop)
952 for (; yybottom <= yytop; yybottom++)
954 int yybot = *yybottom;
960 # define YY_STACK_PRINT(Bottom, Top) \
963 yy_stack_print ((Bottom), (Top)); \
971 #if (defined __STDC__ || defined __C99__FUNC__ \
972 || defined __cplusplus || defined _MSC_VER)
974 yy_reduce_print (
YYSTYPE *yyvsp,
int yyrule)
977 yy_reduce_print (yyvsp, yyrule)
982 int yynrhs = yyr2[yyrule];
984 unsigned long int yylno = yyrline[yyrule];
985 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
988 for (yyi = 0; yyi < yynrhs; yyi++)
991 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
992 &(yyvsp[(yyi + 1) - (yynrhs)])
998 # define YY_REDUCE_PRINT(Rule) \
1001 yy_reduce_print (yyvsp, Rule); \
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)
1017 # define YYINITDEPTH 200
1028 # define YYMAXDEPTH 10000
1035 # if defined __GLIBC__ && defined _STRING_H
1036 # define yystrlen strlen
1039 #if (defined __STDC__ || defined __C99__FUNC__ \
1040 || defined __cplusplus || defined _MSC_VER)
1042 yystrlen (
const char *yystr)
1050 for (yylen = 0; yystr[yylen]; yylen++)
1058 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1059 # define yystpcpy stpcpy
1063 #if (defined __STDC__ || defined __C99__FUNC__ \
1064 || defined __cplusplus || defined _MSC_VER)
1066 yystpcpy (
char *yydest,
const char *yysrc)
1069 yystpcpy (yydest, yysrc)
1075 const char *yys = yysrc;
1077 while ((*yyd++ = *yys++) !=
'\0')
1094 yytnamerr (
char *yyres,
const char *yystr)
1099 char const *yyp = yystr;
1106 goto do_not_strip_quotes;
1110 goto do_not_strip_quotes;
1123 do_not_strip_quotes: ;
1127 return yystrlen (yystr);
1129 return yystpcpy (yyres, yystr) - yyres;
1142 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1145 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1148 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1150 const char *yyformat = 0;
1152 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1186 int yyn = yypact[*yyssp];
1187 yyarg[yycount++] = yytname[yytoken];
1193 int yyxbegin = yyn < 0 ? -yyn : 0;
1195 int yychecklim =
YYLAST - yyn + 1;
1199 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1200 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1203 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1209 yyarg[yycount++] = yytname[yyx];
1210 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1211 if (! (yysize <= yysize1
1221 # define YYCASE_(N, S) \
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"));
1234 yysize1 = yysize + yystrlen (yyformat);
1239 if (*yymsg_alloc < yysize)
1241 *yymsg_alloc = 2 * yysize;
1242 if (! (yysize <= *yymsg_alloc
1254 while ((*yyp = *yyformat) !=
'\0')
1255 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1257 yyp += yytnamerr (yyp, yyarg[yyi++]);
1275 #if (defined __STDC__ || defined __C99__FUNC__ \
1276 || defined __cplusplus || defined _MSC_VER)
1278 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep)
1281 yydestruct (yymsg, yytype, yyvaluep)
1303 #ifdef YYPARSE_PARAM
1304 #if defined __STDC__ || defined __cplusplus
1305 int yyparse (
void *YYPARSE_PARAM);
1310 #if defined __STDC__ || defined __cplusplus
1332 #ifdef YYPARSE_PARAM
1333 #if (defined __STDC__ || defined __C99__FUNC__ \
1334 || defined __cplusplus || defined _MSC_VER)
1340 void *YYPARSE_PARAM;
1343 #if (defined __STDC__ || defined __C99__FUNC__ \
1344 || defined __cplusplus || defined _MSC_VER)
1388 char *yymsg = yymsgbuf;
1389 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1392 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1403 YYDPRINTF ((stderr,
"Starting parse\n"));
1430 if (yyss + yystacksize - 1 <= yyssp)
1433 YYSIZE_T yysize = yyssp - yyss + 1;
1447 yyoverflow (
YY_(
"memory exhausted"),
1448 &yyss1, yysize *
sizeof (*yyssp),
1449 &yyvs1, yysize *
sizeof (*yyvsp),
1456 # ifndef YYSTACK_RELOCATE
1457 goto yyexhaustedlab;
1461 goto yyexhaustedlab;
1471 goto yyexhaustedlab;
1474 # undef YYSTACK_RELOCATE
1481 yyssp = yyss + yysize - 1;
1482 yyvsp = yyvs + yysize - 1;
1484 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1485 (
unsigned long int) yystacksize));
1487 if (yyss + yystacksize - 1 <= yyssp)
1491 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1507 yyn = yypact[yystate];
1516 YYDPRINTF ((stderr,
"Reading a token: "));
1520 if (yychar <=
YYEOF)
1522 yychar = yytoken =
YYEOF;
1523 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1534 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1566 yyn = yydefact[yystate];
1587 yyval = yyvsp[1-yylen];
1702 {
sqpColumnDef( (yyvsp[(1) - (5)].strval), SQLP_VARCHAR, (yyvsp[(4) - (5)].intval), 0 ); }
1709 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER, 0, 0 ); }
1716 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER, 0, 0 ); }
1723 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DOUBLE, 0, 0 ); }
1730 {
sqpColumnDef( (yyvsp[(1) - (3)].strval), SQLP_DOUBLE, 0, 0 ); }
1737 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DATE, 0, 0 ); }
1744 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_TIME, 0, 0 ); }
1751 {
sqpColumn( (yyvsp[(1) - (1)].strval) ); }
1758 {
sqpColumn( (yyvsp[(3) - (3)].strval) ); }
1765 {
sqpTable( (yyvsp[(1) - (1)].strval) ); }
1779 {
sqpValue( (yyvsp[(1) - (1)].strval), 0, 0.0, SQLP_S ); }
1786 {
sqpValue(
NULL, (yyvsp[(1) - (1)].intval), 0.0, SQLP_I ); }
1793 {
sqpValue(
NULL, -(yyvsp[(2) - (2)].intval), 0.0, SQLP_I ); }
1800 {
sqpValue(
NULL, 0, (yyvsp[(1) - (1)].floatval), SQLP_D ); }
1807 {
sqpValue(
NULL, 0, -(yyvsp[(2) - (2)].floatval), SQLP_D ); }
1821 {
sqpValue( (yyvsp[(3) - (3)].strval), 0, 0.0, SQLP_S ); }
1828 {
sqpValue(
NULL, (yyvsp[(3) - (3)].intval), 0.0, SQLP_I ); }
1835 {
sqpValue(
NULL, -(yyvsp[(4) - (4)].intval), 0.0, SQLP_I ); }
1842 {
sqpValue(
NULL, 0, (yyvsp[(3) - (3)].floatval), SQLP_D ); }
1849 {
sqpValue(
NULL, 0, -(yyvsp[(4) - (4)].floatval), SQLP_D ); }
1863 {
sqpAssignment( (yyvsp[(1) - (3)].strval),
NULL, 0, 0.0, (yyvsp[(3) - (3)].node), SQLP_EXPR ); }
1871 (yyval.
node) = (yyvsp[(1) - (1)].node);
1872 sqlpStmt->upperNodeptr = (yyval.
node);
1880 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1894 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1908 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1915 { (yyval.
node) = (yyvsp[(2) - (3)].node); }
1965 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1990 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
2015 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
2031 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
2038 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
2045 { (yyval.
node) = (yyvsp[(2) - (3)].node); }
2100 #line 2101 "y.tab.c"
2128 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
2129 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
2130 yystate = yytable[yystate];
2149 #if ! YYERROR_VERBOSE
2152 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2155 char const *yymsgp =
YY_(
"syntax error");
2156 int yysyntax_error_status;
2158 if (yysyntax_error_status == 0)
2160 else if (yysyntax_error_status == 1)
2162 if (yymsg != yymsgbuf)
2168 yymsg_alloc =
sizeof yymsgbuf;
2169 yysyntax_error_status = 2;
2178 if (yysyntax_error_status == 2)
2179 goto yyexhaustedlab;
2181 # undef YYSYNTAX_ERROR
2187 if (yyerrstatus == 3)
2192 if (yychar <=
YYEOF)
2195 if (yychar ==
YYEOF)
2200 yydestruct (
"Error: discarding",
2239 yyn = yypact[yystate];
2256 yydestruct (
"Error: popping",
2257 yystos[yystate], yyvsp);
2287 #if !defined(yyoverflow) || YYERROR_VERBOSE
2303 yydestruct (
"Cleanup: discarding lookahead",
2310 while (yyssp != yyss)
2312 yydestruct (
"Cleanup: popping",
2313 yystos[*yyssp], yyvsp);
2321 if (yymsg != yymsgbuf)
2325 return YYID (yyresult);