sql.tab.c
来自「一个类似windows」· C语言 代码 · 共 2,284 行 · 第 1/5 页
C
2,284 行
/* Copy the second part of user declarations. */
/* Line 214 of yacc.c. */
#line 465 "sql.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
# ifndef YYFREE
# define YYFREE free
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# endif
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# endif
# else
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined (__GNUC__) && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 29
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 124
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 147
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 31
/* YYNRULES -- Number of rules. */
#define YYNRULES 69
/* YYNRULES -- Number of states. */
#define YYNSTATES 127
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 401
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const unsigned char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
145, 146
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
static const unsigned char yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 26,
38, 45, 53, 60, 63, 68, 72, 74, 77, 79,
82, 84, 88, 90, 95, 97, 99, 101, 103, 105,
107, 112, 114, 117, 121, 124, 126, 130, 132, 134,
138, 141, 145, 149, 153, 157, 161, 165, 169, 173,
177, 181, 185, 190, 192, 194, 196, 200, 202, 206,
210, 212, 215, 217, 219, 221, 225, 227, 229, 231
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
148, 0, -1, 149, -1, 161, -1, 151, -1, 150,
-1, 152, -1, 153, -1, 67, 72, 175, 83, 164,
110, 134, 83, 169, 110, -1, 67, 72, 175, 83,
164, 110, 134, 83, 169, 110, 122, -1, 31, 121,
175, 83, 154, 110, -1, 31, 121, 175, 83, 154,
110, 59, -1, 130, 175, 114, 170, 137, 167, -1,
35, 165, -1, 155, 102, 77, 164, -1, 155, 24,
156, -1, 156, -1, 174, 157, -1, 158, -1, 158,
86, -1, 159, -1, 159, 90, 92, -1, 19, -1,
19, 83, 160, 110, -1, 82, -1, 115, -1, 69,
-1, 81, -1, 93, -1, 177, -1, 162, 99, 16,
164, -1, 162, -1, 112, 163, -1, 112, 38, 163,
-1, 164, 165, -1, 174, -1, 174, 24, 164, -1,
118, -1, 166, -1, 166, 137, 167, -1, 52, 175,
-1, 83, 167, 110, -1, 173, 45, 173, -1, 167,
7, 167, -1, 167, 97, 167, -1, 173, 45, 168,
-1, 173, 57, 168, -1, 173, 85, 168, -1, 173,
78, 168, -1, 173, 54, 168, -1, 173, 89, 168,
-1, 173, 73, 92, -1, 173, 73, 90, 92, -1,
173, -1, 172, -1, 172, -1, 172, 24, 169, -1,
171, -1, 171, 24, 170, -1, 174, 45, 172, -1,
177, -1, 88, 177, -1, 120, -1, 138, -1, 174,
-1, 175, 39, 176, -1, 176, -1, 176, -1, 66,
-1, 70, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short yyrline[] =
{
0, 138, 138, 146, 147, 148, 149, 150, 154, 165,
178, 190, 205, 218, 231, 241, 251, 258, 266, 270,
277, 281, 288, 292, 296, 300, 304, 308, 312, 319,
328, 340, 344, 348, 364, 385, 386, 390, 397, 398,
414, 427, 433, 439, 445, 451, 457, 463, 469, 475,
481, 487, 493, 502, 503, 507, 514, 525, 526, 534,
542, 548, 554, 560, 569, 578, 584, 593, 600, 609
};
#endif
#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "TK_ABORT", "TK_AFTER",
"TK_AGG_FUNCTION", "TK_ALL", "TK_AND", "TK_AS", "TK_ASC", "TK_BEFORE",
"TK_BEGIN", "TK_BETWEEN", "TK_BITAND", "TK_BITNOT", "TK_BITOR", "TK_BY",
"TK_CASCADE", "TK_CASE", "TK_CHAR", "TK_CHECK", "TK_CLUSTER",
"TK_COLLATE", "TK_COLUMN", "TK_COMMA", "TK_COMMENT", "TK_COMMIT",
"TK_CONCAT", "TK_CONFLICT", "TK_CONSTRAINT", "TK_COPY", "TK_CREATE",
"TK_DEFAULT", "TK_DEFERRABLE", "TK_DEFERRED", "TK_DELETE",
"TK_DELIMITERS", "TK_DESC", "TK_DISTINCT", "TK_DOT", "TK_DROP",
"TK_EACH", "TK_ELSE", "TK_END", "TK_END_OF_FILE", "TK_EQ", "TK_EXCEPT",
"TK_EXPLAIN", "TK_FAIL", "TK_FLOAT", "TK_FOR", "TK_FOREIGN", "TK_FROM",
"TK_FUNCTION", "TK_GE", "TK_GLOB", "TK_GROUP", "TK_GT", "TK_HAVING",
"TK_HOLD", "TK_IGNORE", "TK_ILLEGAL", "TK_IMMEDIATE", "TK_IN",
"TK_INDEX", "TK_INITIALLY", "TK_ID", "TK_INSERT", "TK_INSTEAD", "TK_INT",
"TK_INTEGER", "TK_INTERSECT", "TK_INTO", "TK_IS", "TK_ISNULL", "TK_JOIN",
"TK_JOIN_KW", "TK_KEY", "TK_LE", "TK_LIKE", "TK_LIMIT", "TK_LONG",
"TK_LONGCHAR", "TK_LP", "TK_LSHIFT", "TK_LT", "TK_LOCALIZABLE",
"TK_MATCH", "TK_MINUS", "TK_NE", "TK_NOT", "TK_NOTNULL", "TK_NULL",
"TK_OBJECT", "TK_OF", "TK_OFFSET", "TK_ON", "TK_OR",
"TK_ORACLE_OUTER_JOIN", "TK_ORDER", "TK_PLUS", "TK_PRAGMA", "TK_PRIMARY",
"TK_RAISE", "TK_REFERENCES", "TK_REM", "TK_REPLACE", "TK_RESTRICT",
"TK_ROLLBACK", "TK_ROW", "TK_RP", "TK_RSHIFT", "TK_SELECT", "TK_SEMI",
"TK_SET", "TK_SHORT", "TK_SLASH", "TK_SPACE", "TK_STAR", "TK_STATEMENT",
"TK_STRING", "TK_TABLE", "TK_TEMP", "TK_THEN", "TK_TRANSACTION",
"TK_TRIGGER", "TK_UMINUS", "TK_UNCLOSED_STRING", "TK_UNION", "TK_UNIQUE",
"TK_UPDATE", "TK_UPLUS", "TK_USING", "TK_VACUUM", "TK_VALUES", "TK_VIEW",
"TK_WHEN", "TK_WHERE", "TK_WILDCARD", "AGG_FUNCTION.", "COLUMN",
"FUNCTION", "COMMENT", "UNCLOSED_STRING", "SPACE", "ILLEGAL",
"END_OF_FILE", "$accept", "query", "onequery", "oneinsert", "onecreate",
"oneupdate", "onedelete", "table_def", "column_def", "column_and_type",
"column_type", "data_type_l", "data_type", "data_count", "oneselect",
"unorderedsel", "selectfrom", "selcollist", "from", "fromtable", "expr",
"val", "constlist", "update_assign_list", "column_assignment",
"const_val", "column_val", "column", "table", "id", "number", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
395, 396, 397, 398, 399, 400, 401
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] =
{
0, 147, 148, 149, 149, 149, 149, 149, 150, 150,
151, 151, 152, 153, 154, 155, 155, 156, 157, 157,
158, 158, 159, 159, 159, 159, 159, 159, 159, 160,
161, 161, 162, 162, 163, 164, 164, 164, 165, 165,
166, 167, 167, 167, 167, 167, 167, 167, 167, 167,
167, 167, 167, 168, 168, 169, 169, 170, 170, 171,
172, 172, 172, 172, 173, 174, 174, 175, 176, 177
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const unsigned char yyr2[] =
{
0, 2, 1, 1, 1, 1, 1, 1, 10, 11,
6, 7, 6, 2, 4, 3, 1, 2, 1, 2,
1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
4, 1, 2, 3, 2, 1, 3, 1, 1, 3,
2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 4, 1, 1, 1, 3, 1, 3, 3,
1, 2, 1, 1, 1, 3, 1, 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const unsigned char yydefact[] =
{
0, 0, 0, 0, 0, 0, 0, 2, 5, 4,
6, 7, 3, 31, 0, 0, 13, 38, 0, 0,
68, 37, 32, 0, 35, 0, 66, 0, 67, 1,
0, 0, 40, 0, 0, 33, 34, 0, 0, 0,
0, 0, 0, 39, 0, 64, 0, 36, 65, 0,
57, 0, 30, 0, 0, 16, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 10, 0, 0, 22, 26, 27, 24, 28, 25,
17, 18, 20, 41, 43, 44, 69, 0, 62, 63,
45, 54, 42, 60, 49, 53, 46, 0, 51, 48,
47, 50, 0, 12, 58, 59, 11, 15, 0, 0,
19, 0, 61, 52, 0, 14, 0, 29, 21, 0,
23, 0, 55, 8, 0, 9, 56
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
-1, 6, 7, 8, 9, 10, 11, 53, 54, 55,
80, 81, 82, 116, 12, 13, 22, 23, 16, 17,
43, 90, 121, 49, 50, 91, 44, 45, 25, 26,
93
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -111
static const yysigned_char yypact[] =
{
-28, -110, -38, -46, -32, -42, 29, -111, -111, -111,
-111, -111, -111, -67, -42, -42, -111, -99, -42, -48,
-111, -111, -111, -38, 17, 7, 11, -62, -111, -111,
37, -22, -111, -43, -16, -111, -111, -48, -42, -42,
-48, -42, -43, -3, -29, -111, -48, -111, -111, -68,
48, 28, -111, -36, -19, -111, -18, -5, -43, -43,
-58, -58, -58, -70, -58, -58, -58, -34, -43, -42,
-61, 20, -42, 5, 2, -111, -111, -111, -111, -111,
-111, 1, -2, -111, -3, -3, -111, 19, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -1, -111, -111,
-111, -111, -41, -3, -111, -111, -111, -111, -48, 19,
-111, 3, -111, -111, 13, -111, -12, -111, -111, -61,
-111, -9, 91, -13, -61, -111, -111
};
/* YYPGOTO[NTERM-NUM]. */
static const yysigned_char yypgoto[] =
{
-111, -111, -111, -111, -111, -111, -111, -111, -111, 47,
-111, -111, -111, -111, -111, -111, 101, -27, 98, -111,
-11, 52, 0, 53, -111, -53, 46, -4, 85, 40,
-66
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -68
static const yysigned_char yytable[] =
{
24, 74, 58, 1, 58, 72, 19, 2, 20, 86,
47, 14, 86, 52, 15, 24, 60, 105, 20, 67,
97, 112, 98, 20, 20, 61, 18, 87, 62, 29,
87, 57, 30, 24, 20, 51, 24, 56, 33, 3,
42, 37, 24, 117, 63, 28, 38, 84, 85, 64,
-67, 75, 39, 40, 28, 28, 65, 103, 28, 88,
66, 41, 88, 76, 77, 51, 122, 46, 56, 68,
21, 122, 69, 70, 71, 78, 102, 89, 48, 106,
89, 115, 108, 73, 4, 109, 21, 110, 111, 86,
27, 113, 59, 114, 59, 118, 119, 79, 120, 31,
32, 123, 5, 34, 24, 83, 92, 95, 95, 125,
95, 95, 95, 94, 96, 124, 99, 100, 101, 107,
35, 36, 104, 0, 126
};
static const short yycheck[] =
{
4, 19, 7, 31, 7, 24, 38, 35, 66, 70,
37, 121, 70, 40, 52, 19, 45, 70, 66, 46,
90, 87, 92, 66, 66, 54, 72, 88, 57, 0,
88, 42, 99, 37, 66, 39, 40, 41, 137, 67,
83, 24, 46, 109, 73, 5, 39, 58, 59, 78,
39, 69, 114, 16, 14, 15, 85, 68, 18, 120,
89, 83, 120, 81, 82, 69, 119, 83, 72, 137,
118, 124, 24, 45, 110, 93, 110, 138, 38, 59,
138, 108, 77, 102, 112, 83, 118, 86, 90, 70,
5, 92, 97, 134, 97, 92, 83, 115, 110, 14,
15, 110, 130, 18, 108, 110, 60, 61, 62, 122,
64, 65, 66, 61, 62, 24, 64, 65, 66, 72,
19, 23, 69, -1, 124
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const unsigned char yystos[] =
{
0, 31, 35, 67, 112, 130, 148, 149, 150, 151,
152, 153, 161, 162, 121, 52, 165, 166, 72, 38,
66, 118, 163, 164, 174, 175, 176, 175, 176, 0,
99, 175, 175, 137, 175, 163, 165, 24, 39, 114,
16, 83, 83, 167, 173, 174, 83, 164, 176, 170,
171, 174, 164, 154, 155, 156, 174, 167, 7, 97,
45, 54, 57, 73, 78, 85, 89, 164, 137, 24,
45, 110, 24, 102, 19, 69, 81, 82, 93, 115,
157, 158, 159, 110, 167, 167, 70, 88, 120, 138,
168, 172, 173, 177, 168, 173, 168, 90, 92, 168,
168, 168, 110, 167, 170, 172, 59, 156, 77, 83,
86, 90, 177, 92, 134, 164, 160, 177, 92, 83,
110, 169, 172, 110, 24, 122, 169
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
#define YYEOF 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?