47 #define YYBISON_VERSION "2.7.12-4996"
50 #define YYSKELETON_NAME "yacc.c"
71 #include <grass/sqlp.h>
74 #define YYERROR_VERBOSE 1
81 # if defined __cplusplus && 201103L <= __cplusplus
82 # define YY_NULL nullptr
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
93 # define YYERROR_VERBOSE 0
98 #ifndef YY_YY_Y_TAB_H_INCLUDED
99 # define YY_YY_Y_TAB_H_INCLUDED
154 #define COMPARISON_OPERATOR 258
178 #define NULL_VALUE 282
183 #define PRECISION 287
194 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
210 # define YYSTYPE_IS_TRIVIAL 1
211 # define yystype YYSTYPE
212 # define YYSTYPE_IS_DECLARED 1
218 #if defined __STDC__ || defined __cplusplus
219 int yyparse (
void *YYPARSE_PARAM);
224 #if defined __STDC__ || defined __cplusplus
238 extern int yylex(
void);
256 #elif (defined __STDC__ || defined __C99__FUNC__ \
257 || defined __cplusplus || defined _MSC_VER)
276 # ifdef __SIZE_TYPE__
277 # define YYSIZE_T __SIZE_TYPE__
278 # elif defined size_t
279 # define YYSIZE_T size_t
280 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
281 || defined __cplusplus || defined _MSC_VER)
283 # define YYSIZE_T size_t
285 # define YYSIZE_T unsigned int
289 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
292 # if defined YYENABLE_NLS && YYENABLE_NLS
294 # include <libintl.h>
295 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
299 # define YY_(Msgid) Msgid
303 #ifndef __attribute__
305 # if (! defined __GNUC__ || __GNUC__ < 2 \
306 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
307 # define __attribute__(Spec)
312 #if ! defined lint || defined __GNUC__
313 # define YYUSE(E) ((void) (E))
323 #if (defined __STDC__ || defined __C99__FUNC__ \
324 || defined __cplusplus || defined _MSC_VER)
337 #if ! defined yyoverflow || YYERROR_VERBOSE
341 # ifdef YYSTACK_USE_ALLOCA
342 # if YYSTACK_USE_ALLOCA
344 # define YYSTACK_ALLOC __builtin_alloca
345 # elif defined __BUILTIN_VA_ARG_INCR
348 # define YYSTACK_ALLOC __alloca
349 # elif defined _MSC_VER
351 # define alloca _alloca
353 # define YYSTACK_ALLOC alloca
354 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
355 || defined __cplusplus || defined _MSC_VER)
358 # ifndef EXIT_SUCCESS
359 # define EXIT_SUCCESS 0
366 # ifdef YYSTACK_ALLOC
368 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
369 # ifndef YYSTACK_ALLOC_MAXIMUM
374 # define YYSTACK_ALLOC_MAXIMUM 4032
377 # define YYSTACK_ALLOC YYMALLOC
378 # define YYSTACK_FREE YYFREE
379 # ifndef YYSTACK_ALLOC_MAXIMUM
380 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
382 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
383 && ! ((defined YYMALLOC || defined malloc) \
384 && (defined YYFREE || defined free)))
386 # ifndef EXIT_SUCCESS
387 # define EXIT_SUCCESS 0
391 # define YYMALLOC malloc
392 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
393 || defined __cplusplus || defined _MSC_VER)
399 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
400 || defined __cplusplus || defined _MSC_VER)
408 #if (! defined yyoverflow \
409 && (! defined __cplusplus \
410 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
420 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
424 # define YYSTACK_BYTES(N) \
425 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
426 + YYSTACK_GAP_MAXIMUM)
428 # define YYCOPY_NEEDED 1
435 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
438 YYSIZE_T yynewbytes; \
439 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
440 Stack = &yyptr->Stack_alloc; \
441 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
442 yyptr += yynewbytes / sizeof (*yyptr); \
448 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
452 # if defined __GNUC__ && 1 < __GNUC__
453 # define YYCOPY(Dst, Src, Count) \
454 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
456 # define YYCOPY(Dst, Src, Count) \
460 for (yyi = 0; yyi < (Count); yyi++) \
461 (Dst)[yyi] = (Src)[yyi]; \
480 #define YYNSTATES 157
484 #define YYMAXUTOK 294
486 #define YYTRANSLATE(YYX) \
487 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
492 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
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 41, 42, 44, 46, 43, 45, 2, 47, 2, 2,
497 2, 2, 2, 2, 2, 2, 2, 2, 2, 40,
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, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
518 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
519 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
520 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
529 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
530 20, 27, 33, 40, 47, 51, 56, 63, 71, 81,
531 85, 91, 96, 104, 109, 116, 118, 122, 128, 131,
532 134, 137, 141, 144, 147, 149, 151, 153, 157, 159,
533 164, 166, 168, 170, 173, 175, 178, 182, 186, 190,
534 195, 199, 204, 206, 210, 214, 218, 220, 222, 226,
535 228, 232, 234, 238, 241, 245, 249, 253, 257, 259,
536 263, 267, 269, 273, 277, 279, 282, 284, 286, 290,
537 292, 294, 296, 298, 300, 302, 304, 307
543 49, 0, -1, 50, -1, 51, -1, 52, -1, 55,
544 -1, 53, -1, 56, -1, 54, -1, 49, 40, -1,
545 24, 25, 61, 8, 10, 58, -1, 24, 25, 61,
546 8, 58, -1, 24, 25, 61, 9, 10, 4, -1,
547 26, 25, 61, 41, 57, 42, -1, 9, 25, 61,
548 -1, 12, 59, 13, 61, -1, 12, 59, 13, 61,
549 14, 66, -1, 12, 59, 13, 61, 35, 36, 77,
550 -1, 12, 59, 13, 61, 14, 66, 35, 36, 77,
551 -1, 15, 13, 61, -1, 15, 13, 61, 14, 66,
552 -1, 16, 17, 61, 62, -1, 16, 17, 61, 41,
553 59, 42, 62, -1, 19, 61, 20, 64, -1, 19,
554 61, 20, 64, 14, 66, -1, 58, -1, 57, 43,
555 58, -1, 4, 28, 41, 6, 42, -1, 4, 29,
556 -1, 4, 30, -1, 4, 31, -1, 4, 31, 32,
557 -1, 4, 33, -1, 4, 34, -1, 44, -1, 60,
558 -1, 4, -1, 60, 43, 4, -1, 4, -1, 18,
559 41, 63, 42, -1, 27, -1, 5, -1, 6, -1,
560 45, 6, -1, 7, -1, 45, 7, -1, 63, 43,
561 27, -1, 63, 43, 5, -1, 63, 43, 6, -1,
562 63, 43, 45, 6, -1, 63, 43, 7, -1, 63,
563 43, 45, 7, -1, 65, -1, 64, 43, 65, -1,
564 4, 11, 27, -1, 4, 11, 71, -1, 67, -1,
565 68, -1, 67, 22, 68, -1, 69, -1, 68, 21,
566 69, -1, 70, -1, 41, 67, 42, -1, 23, 69,
567 -1, 71, 11, 71, -1, 71, 3, 71, -1, 71,
568 37, 27, -1, 71, 23, 27, -1, 72, -1, 71,
569 46, 72, -1, 71, 45, 72, -1, 73, -1, 72,
570 44, 73, -1, 72, 47, 73, -1, 74, -1, 45,
571 73, -1, 75, -1, 76, -1, 41, 71, 42, -1,
572 5, -1, 6, -1, 7, -1, 4, -1, 78, -1,
573 79, -1, 4, -1, 4, 38, -1, 4, 39, -1
579 0, 97, 97, 98, 99, 100, 101, 102, 103, 104,
580 108, 109, 110, 114, 118, 122, 123, 124, 125, 129,
581 130, 134, 135, 139, 140, 145, 146, 150, 151, 152,
582 153, 154, 155, 156, 160, 161, 165, 166, 170, 174,
583 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
584 188, 189, 193, 194, 198, 202, 206, 213, 214, 218,
585 219, 223, 224, 225, 230, 233, 236, 239, 246, 247,
586 250, 256, 257, 260, 266, 267, 273, 274, 275, 280,
587 281, 282, 287, 290, 290, 293, 294, 297
591 #if YYDEBUG || YYERROR_VERBOSE || 0
594 static const char *
const yytname[] =
596 "$end",
"error",
"$undefined",
"COMPARISON_OPERATOR",
"NAME",
"STRING",
597 "INTNUM",
"FLOATNUM",
"ADD",
"DROP",
"COLUMN",
"EQUAL",
"SELECT",
"FROM",
598 "WHERE",
"DELETE",
"INSERT",
"INTO",
"VALUES",
"UPDATE",
"SET",
"AND",
599 "OR",
"NOT",
"ALTER",
"TABLE",
"CREATE",
"NULL_VALUE",
"VARCHAR",
"INT",
600 "INTEGER",
"DOUBLE",
"PRECISION",
"DATE",
"TIME",
"ORDER",
"BY",
"IS",
601 "ASC",
"DESC",
"';'",
"'('",
"')'",
"','",
"'*'",
"'-'",
"'+'",
"'/'",
602 "$accept",
"y_sql",
"y_alter",
"y_create",
"y_drop",
"y_select",
603 "y_delete",
"y_insert",
"y_update",
"y_columndefs",
"y_columndef",
604 "y_columns",
"y_column_list",
"y_table",
"y_values",
"y_value_list",
605 "y_assignments",
"y_assignment",
"y_condition",
"y_sub_condition",
606 "y_sub_condition2",
"y_boolean",
"y_comparison",
"y_expression",
607 "y_product",
"y_term",
"y_atom",
"y_value",
"y_column",
"y_order",
608 "y_order_asc",
"y_order_desc",
YY_NULL
617 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
618 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
619 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
620 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
621 59, 40, 41, 44, 42, 45, 43, 47
628 0, 48, 49, 49, 49, 49, 49, 49, 49, 49,
629 50, 50, 50, 51, 52, 53, 53, 53, 53, 54,
630 54, 55, 55, 56, 56, 57, 57, 58, 58, 58,
631 58, 58, 58, 58, 59, 59, 60, 60, 61, 62,
632 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
633 63, 63, 64, 64, 65, 65, 66, 67, 67, 68,
634 68, 69, 69, 69, 70, 70, 70, 70, 71, 71,
635 71, 72, 72, 72, 73, 73, 74, 74, 74, 75,
636 75, 75, 76, 77, 77, 78, 78, 79
642 0, 2, 1, 1, 1, 1, 1, 1, 1, 2,
643 6, 5, 6, 6, 3, 4, 6, 7, 9, 3,
644 5, 4, 7, 4, 6, 1, 3, 5, 2, 2,
645 2, 3, 2, 2, 1, 1, 1, 3, 1, 4,
646 1, 1, 1, 2, 1, 2, 3, 3, 3, 4,
647 3, 4, 1, 3, 3, 3, 1, 1, 3, 1,
648 3, 1, 3, 2, 3, 3, 3, 3, 1, 3,
649 3, 1, 3, 3, 1, 2, 1, 1, 3, 1,
650 1, 1, 1, 1, 1, 1, 2, 2
658 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
659 3, 4, 6, 8, 5, 7, 0, 36, 34, 0,
660 35, 0, 0, 38, 0, 0, 0, 1, 9, 14,
661 0, 0, 19, 0, 0, 0, 0, 15, 37, 0,
662 0, 0, 21, 0, 23, 52, 0, 0, 0, 0,
663 0, 82, 79, 80, 81, 0, 0, 0, 20, 56,
664 57, 59, 61, 0, 68, 71, 74, 76, 77, 0,
665 0, 0, 0, 0, 0, 0, 11, 0, 0, 25,
666 16, 0, 63, 0, 0, 0, 75, 0, 0, 0,
667 0, 0, 0, 0, 0, 0, 0, 41, 42, 44,
668 40, 0, 0, 0, 54, 55, 24, 53, 0, 28,
669 29, 30, 32, 33, 10, 12, 13, 0, 0, 85,
670 17, 83, 84, 62, 78, 0, 58, 60, 65, 64,
671 67, 66, 70, 69, 72, 73, 43, 45, 39, 0,
672 22, 0, 31, 26, 0, 86, 87, 47, 48, 50,
673 46, 0, 0, 18, 49, 51, 27
679 -1, 8, 9, 10, 11, 12, 13, 14, 15, 78,
680 76, 19, 20, 24, 42, 102, 44, 45, 58, 59,
681 60, 61, 62, 63, 64, 65, 66, 67, 68, 120,
687 #define YYPACT_NINF -52
690 64, -8, 3, 11, 5, 32, 49, 57, 2, -52,
691 -52, -52, -52, -52, -52, -52, 32, -52, -52, 39,
692 41, 32, 32, -52, 102, 32, 32, -52, -52, -52,
693 32, 85, 109, 7, 95, 10, 83, 37, -52, 8,
694 84, 3, -52, 115, -10, -52, 6, 117, 124, 8,
695 93, -52, -52, -52, -52, 8, 8, 55, -52, 108,
696 110, -52, -52, 0, 31, -52, -52, -52, -52, 23,
697 90, 50, 8, 95, 79, 124, -52, 129, 24, -52,
698 99, 131, -52, -16, -2, 55, -52, 8, 8, 55,
699 55, 111, 113, 55, 55, 55, 55, -52, -52, -52,
700 -52, 80, 51, 118, -52, 59, -52, -52, 96, -52,
701 -52, 107, -52, -52, -52, -52, -52, 124, 105, 78,
702 -52, -52, -52, -52, -52, 69, 110, -52, 59, 59,
703 -52, -52, 31, 31, -52, -52, -52, -52, -52, 58,
704 -52, 136, -52, -52, 131, -52, -52, -52, -52, -52,
705 -52, 112, 101, -52, -52, -52, -52
711 -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
712 -48, 103, -52, 76, 42, -52, -52, 73, 9, 91,
713 61, -47, -52, -51, 27, -25, -52, -52, -52, 12,
720 #define YYTABLE_NINF -1
723 79, 89, 27, 89, 72, 84, 87, 17, 82, 90,
724 74, 90, 51, 52, 53, 54, 75, 16, 46, 47,
725 105, 91, 22, 91, 21, 40, 123, 114, 97, 98,
726 99, 55, 86, 73, 125, 92, 23, 92, 128, 129,
727 124, 127, 28, 93, 94, 93, 94, 18, 41, 56,
728 100, 49, 30, 57, 51, 52, 53, 54, 80, 51,
729 52, 53, 54, 147, 148, 149, 116, 117, 101, 143,
730 134, 135, 50, 1, 25, 95, 2, 104, 96, 3,
731 4, 106, 26, 5, 31, 150, 136, 137, 6, 38,
732 7, 85, 29, 138, 139, 57, 85, 32, 33, 43,
733 57, 35, 36, 151, 93, 94, 37, 108, 109, 110,
734 111, 124, 112, 113, 93, 94, 145, 146, 154, 155,
735 132, 133, 34, 39, 48, 69, 71, 77, 74, 81,
736 87, 88, 103, 115, 118, 119, 40, 141, 130, 142,
737 131, 144, 152, 156, 70, 140, 107, 83, 126, 0,
738 0, 0, 0, 0, 0, 0, 153
741 #define yypact_value_is_default(Yystate) \
742 (!!((Yystate) == (-52)))
744 #define yytable_value_is_error(Yytable_value) \
749 48, 3, 0, 3, 14, 56, 22, 4, 55, 11,
750 4, 11, 4, 5, 6, 7, 10, 25, 8, 9,
751 71, 23, 17, 23, 13, 18, 42, 75, 5, 6,
752 7, 23, 57, 43, 85, 37, 4, 37, 89, 90,
753 42, 88, 40, 45, 46, 45, 46, 44, 41, 41,
754 27, 14, 13, 45, 4, 5, 6, 7, 49, 4,
755 5, 6, 7, 5, 6, 7, 42, 43, 45, 117,
756 95, 96, 35, 9, 25, 44, 12, 27, 47, 15,
757 16, 72, 25, 19, 43, 27, 6, 7, 24, 4,
758 26, 41, 16, 42, 43, 45, 41, 21, 22, 4,
759 45, 25, 26, 45, 45, 46, 30, 28, 29, 30,
760 31, 42, 33, 34, 45, 46, 38, 39, 6, 7,
761 93, 94, 20, 14, 41, 41, 11, 10, 4, 36,
762 22, 21, 42, 4, 35, 4, 18, 41, 27, 32,
763 27, 36, 6, 42, 41, 103, 73, 56, 87, -1,
764 -1, -1, -1, -1, -1, -1, 144
771 0, 9, 12, 15, 16, 19, 24, 26, 49, 50,
772 51, 52, 53, 54, 55, 56, 25, 4, 44, 59,
773 60, 13, 17, 4, 61, 25, 25, 0, 40, 61,
774 13, 43, 61, 61, 20, 61, 61, 61, 4, 14,
775 18, 41, 62, 4, 64, 65, 8, 9, 41, 14,
776 35, 4, 5, 6, 7, 23, 41, 45, 66, 67,
777 68, 69, 70, 71, 72, 73, 74, 75, 76, 41,
778 59, 11, 14, 43, 4, 10, 58, 10, 57, 58,
779 66, 36, 69, 67, 71, 41, 73, 22, 21, 3,
780 11, 23, 37, 45, 46, 44, 47, 5, 6, 7,
781 27, 45, 63, 42, 27, 71, 66, 65, 28, 29,
782 30, 31, 33, 34, 58, 4, 42, 43, 35, 4,
783 77, 78, 79, 42, 42, 71, 68, 69, 71, 71,
784 27, 27, 72, 72, 73, 73, 6, 7, 42, 43,
785 62, 41, 32, 58, 36, 38, 39, 5, 6, 7,
786 27, 45, 6, 77, 6, 7, 42
789 #define yyerrok (yyerrstatus = 0)
790 #define yyclearin (yychar = YYEMPTY)
794 #define YYACCEPT goto yyacceptlab
795 #define YYABORT goto yyabortlab
796 #define YYERROR goto yyerrorlab
806 #define YYFAIL goto yyerrlab
814 #define YYRECOVERING() (!!yyerrstatus)
816 #define YYBACKUP(Token, Value) \
818 if (yychar == YYEMPTY) \
822 YYPOPSTACK (yylen); \
828 yyerror (YY_("syntax error: cannot back up")); \
835 #define YYERRCODE 256
839 #ifndef YY_LOCATION_PRINT
840 # 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)
894 FILE *yyo = yyoutput;
900 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
912 #if (defined __STDC__ || defined __C99__FUNC__ \
913 || defined __cplusplus || defined _MSC_VER)
915 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
918 yy_symbol_print (yyoutput, yytype, yyvaluep)
921 YYSTYPE const * const yyvaluep;
925 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
927 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
938 #if (defined __STDC__ || defined __C99__FUNC__ \
939 || defined __cplusplus || defined _MSC_VER)
944 yy_stack_print (yybottom, yytop)
950 for (; yybottom <=
yytop; yybottom++)
952 int yybot = *yybottom;
958 # define YY_STACK_PRINT(Bottom, Top) \
961 yy_stack_print ((Bottom), (Top)); \
969 #if (defined __STDC__ || defined __C99__FUNC__ \
970 || defined __cplusplus || defined _MSC_VER)
975 yy_reduce_print (yyvsp, yyrule)
980 int yynrhs = yyr2[
yyrule];
983 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
986 for (yyi = 0; yyi < yynrhs; yyi++)
989 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
990 &(yyvsp[(yyi + 1) - (yynrhs)])
996 # define YY_REDUCE_PRINT(Rule) \
999 yy_reduce_print (yyvsp, Rule); \
1006 # define YYDPRINTF(Args)
1007 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1008 # define YY_STACK_PRINT(Bottom, Top)
1009 # define YY_REDUCE_PRINT(Rule)
1015 # define YYINITDEPTH 200
1026 # define YYMAXDEPTH 10000
1033 # if defined __GLIBC__ && defined _STRING_H
1034 # define yystrlen strlen
1037 #if (defined __STDC__ || defined __C99__FUNC__ \
1038 || defined __cplusplus || defined _MSC_VER)
1040 yystrlen (
const char *yystr)
1048 for (yylen = 0; yystr[
yylen]; yylen++)
1056 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1057 # define yystpcpy stpcpy
1061 #if (defined __STDC__ || defined __C99__FUNC__ \
1062 || defined __cplusplus || defined _MSC_VER)
1064 yystpcpy (
char *yydest,
const char *
yysrc)
1067 yystpcpy (yydest, yysrc)
1075 while ((*yyd++ = *yys++) !=
'\0')
1092 yytnamerr (
char *yyres,
const char *yystr)
1097 char const *yyp = yystr;
1104 goto do_not_strip_quotes;
1108 goto do_not_strip_quotes;
1121 do_not_strip_quotes: ;
1125 return yystrlen (yystr);
1127 return yystpcpy (yyres, yystr) - yyres;
1145 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1147 const char *yyformat =
YY_NULL;
1149 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1184 yyarg[yycount++] = yytname[
yytoken];
1190 int yyxbegin = yyn < 0 ? -yyn : 0;
1192 int yychecklim =
YYLAST - yyn + 1;
1196 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1197 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1200 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1206 yyarg[yycount++] = yytname[yyx];
1209 if (! (yysize <= yysize1
1220 # define YYCASE_(N, S) \
1225 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1226 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1227 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1228 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1229 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1234 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1240 if (*yymsg_alloc < yysize)
1242 *yymsg_alloc = 2 * yysize;
1243 if (! (yysize <= *yymsg_alloc
1255 while ((*yyp = *yyformat) !=
'\0')
1256 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1258 yyp += yytnamerr (yyp, yyarg[yyi++]);
1276 #if (defined __STDC__ || defined __C99__FUNC__ \
1277 || defined __cplusplus || defined _MSC_VER)
1304 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1305 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1306 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1308 #ifndef YY_INITIAL_VALUE
1309 # define YY_INITIAL_VALUE(Value)
1323 #ifdef YYPARSE_PARAM
1324 #if (defined __STDC__ || defined __C99__FUNC__ \
1325 || defined __cplusplus || defined _MSC_VER)
1331 void *YYPARSE_PARAM;
1334 #if (defined __STDC__ || defined __C99__FUNC__ \
1335 || defined __cplusplus || defined _MSC_VER)
1383 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1389 yyssp = yyss =
yyssa;
1390 yyvsp = yyvs =
yyvsa;
1393 YYDPRINTF ((stderr,
"Starting parse\n"));
1412 if (yyss + yystacksize - 1 <= yyssp)
1415 YYSIZE_T yysize = yyssp - yyss + 1;
1429 yyoverflow (
YY_(
"memory exhausted"),
1430 &yyss1, yysize *
sizeof (*yyssp),
1431 &yyvs1, yysize *
sizeof (*yyvsp),
1438 # ifndef YYSTACK_RELOCATE
1439 goto yyexhaustedlab;
1443 goto yyexhaustedlab;
1453 goto yyexhaustedlab;
1456 # undef YYSTACK_RELOCATE
1463 yyssp = yyss + yysize - 1;
1464 yyvsp = yyvs + yysize - 1;
1466 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1467 (
unsigned long int) yystacksize));
1469 if (yyss + yystacksize - 1 <= yyssp)
1473 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1498 YYDPRINTF ((stderr,
"Reading a token: "));
1504 yychar = yytoken =
YYEOF;
1505 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1516 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1571 yyval = yyvsp[1-
yylen];
1670 {
sqpColumnDef( (yyvsp[(1) - (5)].strval), SQLP_VARCHAR, (yyvsp[(4) - (5)].intval), 0 ); }
1676 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER, 0, 0 ); }
1682 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER, 0, 0 ); }
1688 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DOUBLE, 0, 0 ); }
1694 {
sqpColumnDef( (yyvsp[(1) - (3)].strval), SQLP_DOUBLE, 0, 0 ); }
1700 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DATE, 0, 0 ); }
1706 {
sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_TIME, 0, 0 ); }
1712 {
sqpColumn( (yyvsp[(1) - (1)].strval) ); }
1718 {
sqpColumn( (yyvsp[(3) - (3)].strval) ); }
1724 {
sqpTable( (yyvsp[(1) - (1)].strval) ); }
1736 {
sqpValue( (yyvsp[(1) - (1)].strval), 0, 0.0, SQLP_S ); }
1742 {
sqpValue(
NULL, (yyvsp[(1) - (1)].intval), 0.0, SQLP_I ); }
1748 {
sqpValue(
NULL, -(yyvsp[(2) - (2)].intval), 0.0, SQLP_I ); }
1754 {
sqpValue(
NULL, 0, (yyvsp[(1) - (1)].floatval), SQLP_D ); }
1760 {
sqpValue(
NULL, 0, -(yyvsp[(2) - (2)].floatval), SQLP_D ); }
1772 {
sqpValue( (yyvsp[(3) - (3)].strval), 0, 0.0, SQLP_S ); }
1778 {
sqpValue(
NULL, (yyvsp[(3) - (3)].intval), 0.0, SQLP_I ); }
1784 {
sqpValue(
NULL, -(yyvsp[(4) - (4)].intval), 0.0, SQLP_I ); }
1790 {
sqpValue(
NULL, 0, (yyvsp[(3) - (3)].floatval), SQLP_D ); }
1796 {
sqpValue(
NULL, 0, -(yyvsp[(4) - (4)].floatval), SQLP_D ); }
1808 {
sqpAssignment( (yyvsp[(1) - (3)].strval),
NULL, 0, 0.0, (yyvsp[(3) - (3)].node), SQLP_EXPR ); }
1815 (yyval.
node) = (yyvsp[(1) - (1)].node);
1816 sqlpStmt->upperNodeptr = (yyval.
node);
1823 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1835 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1847 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1853 { (yyval.
node) = (yyvsp[(2) - (3)].node); }
1897 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1919 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1941 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1955 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1961 { (yyval.
node) = (yyvsp[(1) - (1)].node); }
1967 { (yyval.
node) = (yyvsp[(2) - (3)].node); }
2014 #line 2015 "y.tab.c"
2043 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
2063 #if ! YYERROR_VERBOSE
2066 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2069 char const *yymsgp =
YY_(
"syntax error");
2070 int yysyntax_error_status;
2072 if (yysyntax_error_status == 0)
2074 else if (yysyntax_error_status == 1)
2076 if (yymsg != yymsgbuf)
2083 yysyntax_error_status = 2;
2092 if (yysyntax_error_status == 2)
2093 goto yyexhaustedlab;
2095 # undef YYSYNTAX_ERROR
2101 if (yyerrstatus == 3)
2106 if (yychar <=
YYEOF)
2109 if (yychar ==
YYEOF)
2171 yystos[yystate], yyvsp);
2203 #if !defined yyoverflow || YYERROR_VERBOSE
2226 while (yyssp != yyss)
2229 yystos[*yyssp], yyvsp);
2237 if (yymsg != yymsgbuf)
2241 return YYID (yyresult);
#define YYSTACK_ALLOC_MAXIMUM
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
yytype_int16 yyssa[YYINITDEPTH]
void sqpColumn(char *col)
SQLPNODE * sqpNewColumnNode(char *name)
void sqpColumnDef(char *col, int type, int width, int decimals)
YYSTYPE yyvsa[YYINITDEPTH]
unsigned char yytype_uint8
int sqpOperatorCode(char *oper)
SQLPNODE * sqpNewValueNode(char *strval, int intval, double dblval, int type)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
yydestruct("Cleanup: discarding lookahead", yytoken,&yylval)
#define YY_REDUCE_PRINT(Rule)
void sqpOrderColumn(char *col, int dir)
yy_symbol_value_print(yyoutput, yytype, yyvaluep)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YY_INITIAL_VALUE(Value)
#define YY_STACK_PRINT(Bottom, Top)
YYSTYPE const *const yyvaluep
#define yypact_value_is_default(Yystate)
SQLPNODE * sqpNewExpressionNode(int oper, SQLPNODE *left, SQLPNODE *right)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
void sqpAssignment(char *col, char *strval, int intval, double dblval, SQLPNODE *expval, int type)
#define COMPARISON_OPERATOR
YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate
unsigned short int yytype_uint16
void sqpValue(char *strval, int intval, double dblval, int type)
#define yytable_value_is_error(Yytable_value)
void sqpCommand(int command)