📄 pl_gram.c
字号:
stack. */# define PLPGSQL_YYSTACK_RELOCATE(Stack) \ do \ { \ PLPGSQL_YYSIZE_T plpgsql_yynewbytes; \ PLPGSQL_YYCOPY (&plpgsql_yyptr->Stack, Stack, plpgsql_yysize); \ Stack = &plpgsql_yyptr->Stack; \ plpgsql_yynewbytes = plpgsql_yystacksize * sizeof (*Stack) + PLPGSQL_YYSTACK_GAP_MAXIMUM; \ plpgsql_yyptr += plpgsql_yynewbytes / sizeof (*plpgsql_yyptr); \ } \ while (0)#endif#if defined (__STDC__) || defined (__cplusplus) typedef signed char plpgsql_yysigned_char;#else typedef short plpgsql_yysigned_char;#endif/* PLPGSQL_YYFINAL -- State number of the termination state. */#define PLPGSQL_YYFINAL 9/* PLPGSQL_YYLAST -- Last index in PLPGSQL_YYTABLE. */#define PLPGSQL_YYLAST 204/* PLPGSQL_YYNTOKENS -- Number of terminals. */#define PLPGSQL_YYNTOKENS 72/* PLPGSQL_YYNNTS -- Number of nonterminals. */#define PLPGSQL_YYNNTS 75/* PLPGSQL_YYNRULES -- Number of rules. */#define PLPGSQL_YYNRULES 135/* PLPGSQL_YYNRULES -- Number of states. */#define PLPGSQL_YYNSTATES 233/* PLPGSQL_YYTRANSLATE(PLPGSQL_YYLEX) -- Bison symbol number corresponding to PLPGSQL_YYLEX. */#define PLPGSQL_YYUNDEFTOK 2#define PLPGSQL_YYMAXUTOK 319#define PLPGSQL_YYTRANSLATE(PLPGSQL_YYX) \ ((unsigned int) (PLPGSQL_YYX) <= PLPGSQL_YYMAXUTOK ? plpgsql_yytranslate[PLPGSQL_YYX] : PLPGSQL_YYUNDEFTOK)/* PLPGSQL_YYTRANSLATE[PLPGSQL_YYLEX] -- Bison symbol number corresponding to PLPGSQL_YYLEX. */static const unsigned char plpgsql_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, 68, 69, 2, 2, 70, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 65, 66, 2, 67, 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, 71, 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};#if PLPGSQL_YYDEBUG/* PLPGSQL_YYPRHS[PLPGSQL_YYN] -- Index of the first RHS symbol of rule number PLPGSQL_YYN in PLPGSQL_YYRHS. */static const unsigned short plpgsql_yyprhs[] ={ 0, 0, 3, 8, 13, 14, 16, 19, 21, 24, 25, 27, 33, 35, 38, 42, 44, 47, 49, 55, 57, 59, 65, 69, 73, 79, 85, 86, 93, 94, 95, 99, 101, 105, 108, 110, 112, 114, 116, 118, 120, 121, 123, 124, 125, 128, 130, 132, 134, 136, 137, 139, 142, 144, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 189, 194, 200, 206, 210, 212, 214, 216, 218, 222, 231, 232, 238, 241, 246, 252, 261, 263, 265, 267, 268, 277, 286, 288, 290, 293, 298, 301, 304, 311, 317, 319, 321, 323, 325, 327, 329, 331, 334, 336, 339, 344, 347, 351, 355, 360, 365, 367, 369, 371, 373, 374, 375, 376, 377, 378, 384, 385, 387, 389, 392, 394};/* PLPGSQL_YYRHS -- A `-1'-separated list of the rules' RHS. */static const short plpgsql_yyrhs[] ={ 73, 0, -1, 52, 74, 78, 77, -1, 53, 74, 78, 77, -1, -1, 75, -1, 75, 76, -1, 76, -1, 63, 64, -1, -1, 65, -1, 79, 5, 146, 99, 16, -1, 142, -1, 142, 80, -1, 142, 80, 81, -1, 10, -1, 81, 82, -1, 82, -1, 66, 66, 145, 67, 67, -1, 10, -1, 83, -1, 92, 94, 95, 96, 97, -1, 92, 39, 65, -1, 92, 91, 65, -1, 92, 3, 20, 90, 65, -1, 40, 93, 47, 93, 65, -1, -1, 92, 8, 84, 86, 89, 85, -1, -1, -1, 68, 87, 69, -1, 88, -1, 87, 70, 88, -1, 92, 95, -1, 28, -1, 20, -1, 61, -1, 57, -1, 61, -1, 61, -1, -1, 7, -1, -1, -1, 32, 34, -1, 65, -1, 98, -1, 4, -1, 11, -1, -1, 100, -1, 100, 101, -1, 101, -1, 78, 65, -1, 103, -1, 109, -1, 111, -1, 112, -1, 113, -1, 117, -1, 120, -1, 121, -1, 122, -1, 123, -1, 124, -1, 130, -1, 131, -1, 118, -1, 102, -1, 104, -1, 132, -1, 133, -1, 134, -1, 36, 146, 138, -1, 108, 146, 4, 138, -1, 23, 12, 146, 105, 65, -1, 105, 70, 107, 4, 106, -1, 107, 4, 106, -1, 37, -1, 41, -1, 56, -1, 56, -1, 108, 71, 139, -1, 24, 146, 140, 99, 110, 16, 24, 65, -1, -1, 15, 146, 140, 99, 110, -1, 14, 99, -1, 142, 30, 146, 129, -1, 142, 51, 146, 141, 129, -1, 142, 20, 146, 114, 25, 116, 141, 129, -1, 115, -1, 56, -1, 61, -1, -1, 142, 20, 146, 119, 25, 45, 141, 129, -1, 142, 20, 146, 119, 25, 18, 141, 129, -1, 58, -1, 57, -1, 45, 146, -1, 19, 146, 143, 144, -1, 42, 146, -1, 43, 146, -1, 38, 146, 126, 125, 127, 65, -1, 38, 146, 126, 125, 65, -1, 54, -1, 17, -1, 49, -1, 33, -1, 26, -1, 29, -1, 9, -1, 127, 128, -1, 128, -1, 70, 56, -1, 99, 16, 30, 65, -1, 137, 146, -1, 18, 146, 138, -1, 35, 146, 135, -1, 21, 146, 136, 27, -1, 6, 146, 136, 65, -1, 56, -1, 56, -1, 61, -1, 62, -1, -1, -1, -1, -1, -1, 66, 66, 145, 67, 67, -1, -1, 60, -1, 65, -1, 50, 138, -1, 61, -1, -1};/* PLPGSQL_YYRLINE[PLPGSQL_YYN] -- source line where rule number PLPGSQL_YYN was defined. */static const unsigned short plpgsql_yyrline[] ={ 0, 211, 211, 215, 221, 222, 225, 226, 229, 235, 236, 239, 260, 268, 276, 287, 293, 295, 299, 301, 303, 307, 361, 375, 385, 390, 395, 394, 446, 458, 461, 485, 511, 522, 545, 546, 548, 576, 582, 594, 605, 606, 611, 622, 623, 627, 629, 680, 681, 685, 692, 696, 707, 724, 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 766, 781, 797, 814, 829, 839, 843, 849, 857, 862, 879, 897, 904, 947, 953, 971, 990, 1012, 1038, 1048, 1061, 1079, 1110, 1141, 1143, 1149, 1156, 1172, 1215, 1246, 1262, 1279, 1285, 1289, 1293, 1297, 1301, 1305, 1311, 1324, 1333, 1339, 1343, 1356, 1369, 1502, 1514, 1527, 1544, 1561, 1563, 1568, 1572, 1576, 1580, 1584, 1588, 1596, 1597, 1601, 1603, 1607, 1618};#endif#if PLPGSQL_YYDEBUG || PLPGSQL_YYERROR_VERBOSE/* PLPGSQL_YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at PLPGSQL_YYNTOKENS, nonterminals. */static const char *const plpgsql_yytname[] ={ "$end", "error", "$undefined", "K_ALIAS", "K_ASSIGN", "K_BEGIN", "K_CLOSE", "K_CONSTANT", "K_CURSOR", "K_DEBUG", "K_DECLARE", "K_DEFAULT", "K_DIAGNOSTICS", "K_DOTDOT", "K_ELSE", "K_ELSIF", "K_END", "K_EXCEPTION", "K_EXECUTE", "K_EXIT", "K_FOR", "K_FETCH", "K_FROM", "K_GET", "K_IF", "K_IN", "K_INFO", "K_INTO", "K_IS", "K_LOG", "K_LOOP", "K_NEXT", "K_NOT", "K_NOTICE", "K_NULL", "K_OPEN", "K_PERFORM", "K_ROW_COUNT", "K_RAISE", "K_RECORD", "K_RENAME", "K_RESULT_OID", "K_RETURN", "K_RETURN_NEXT", "K_REVERSE", "K_SELECT", "K_THEN", "K_TO", "K_TYPE", "K_WARNING", "K_WHEN", "K_WHILE", "T_FUNCTION", "T_TRIGGER", "T_STRING", "T_NUMBER", "T_VARIABLE", "T_ROW", "T_RECORD", "T_DTYPE", "T_LABEL", "T_WORD", "T_ERROR", "O_OPTION", "O_DUMP", "';'", "'<'", "'>'", "'('", "')'", "','", "'['", "$accept", "pl_function", "comp_optsect", "comp_options", "comp_option", "opt_semi", "pl_block", "decl_sect", "decl_start", "decl_stmts", "decl_stmt", "decl_statement", "@1", "decl_cursor_query", "decl_cursor_args", "decl_cursor_arglist", "decl_cursor_arg", "decl_is_from", "decl_aliasitem", "decl_rowtype", "decl_varname", "decl_renname", "decl_const", "decl_datatype", "decl_notnull", "decl_defval", "decl_defkey", "proc_sect", "proc_stmts", "proc_stmt", "stmt_perform", "stmt_assign", "stmt_getdiag", "getdiag_list", "getdiag_item", "getdiag_target", "assign_var", "stmt_if", "stmt_else", "stmt_loop", "stmt_while", "stmt_fori", "fori_var", "fori_varname", "fori_lower", "stmt_fors", "stmt_dynfors", "fors_target", "stmt_select", "stmt_exit", "stmt_return", "stmt_return_next", "stmt_raise", "raise_msg", "raise_level", "raise_params", "raise_param", "loop_body", "stmt_execsql", "stmt_dynexecute", "stmt_open", "stmt_fetch", "stmt_close", "cursor_varptr", "cursor_variable", "execsql_start", "expr_until_semi", "expr_until_rightbracket", "expr_until_then", "expr_until_loop", "opt_label", "opt_exitlabel", "opt_exitcond", "opt_lblname", "lno", 0};#endif# ifdef PLPGSQL_YYPRINT/* PLPGSQL_YYTOKNUM[PLPGSQL_YYLEX-NUM] -- Internal token number corresponding to token PLPGSQL_YYLEX-NUM. */static const unsigned short plpgsql_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, 59, 60, 62, 40, 41, 44, 91};# endif/* PLPGSQL_YYR1[PLPGSQL_YYN] -- Symbol number of symbol that rule PLPGSQL_YYN derives. */static const unsigned char plpgsql_yyr1[] ={ 0, 72, 73, 73, 74, 74, 75, 75, 76, 77, 77, 78, 79, 79, 79, 80, 81, 81, 82, 82, 82, 83, 83, 83, 83, 83, 84, 83, 85, 86, 86, 87, 87, 88, 89, 89, 90, 91, 92, 93, 94, 94, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 102, 103, 104, 105, 105, 106, 106, 107, 108, 108, 109, 110, 110, 110, 111, 112, 113, 114, 115, 115, 116, 117, 118, 119, 119, 120, 121, 122, 123, 124, 124, 125, 126, 126, 126, 126, 126, 126, 127, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 137, 138, 139, 140, 141, 142, 142, 143, 143, 144, 144, 145, 146};/* PLPGSQL_YYR2[PLPGSQL_YYN] -- Number of symbols composing right hand side of rule PLPGSQL_YYN. */static const unsigned char plpgsql_yyr2[] ={ 0, 2, 4, 4, 0, 1, 2, 1, 2, 0, 1, 5, 1, 2, 3, 1, 2, 1, 5, 1, 1, 5, 3, 3, 5, 5, 0, 6, 0, 0, 3, 1, 3, 2, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1, 1, 1, 1, 0, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 5, 3, 1, 1, 1, 1, 3, 8, 0, 5, 2, 4, 5, 8, 1, 1, 1, 0, 8, 8, 1, 1, 2, 4, 2, 2, 6, 5, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 3, 3, 4, 4, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5, 0, 1, 1, 2, 1, 0};/* PLPGSQL_YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when PLPGSQL_YYTABLE doesn't specify something else to do. Zero means the default is an error. */static const unsigned char plpgsql_yydefact[] ={ 0, 4, 4, 0, 0, 128, 5, 7, 128, 1, 8, 0, 9, 0, 12, 6, 9, 0, 10, 2, 135, 15, 13, 3, 134, 0, 128, 19, 0, 38, 0, 14, 17, 20, 40, 0, 135, 135, 135, 135, 0, 135, 135, 135, 135, 135, 135, 135, 81, 122, 123, 0, 0, 128, 52, 68, 54, 69, 135, 55, 56, 57, 58, 59, 67, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 135, 12, 39, 0, 0, 16, 0, 41, 26, 0, 37, 0, 42, 129, 0, 124, 130, 0, 135, 126, 0, 124, 0, 100, 101, 98, 53, 11, 51, 125, 0, 115, 135, 135, 135, 0, 0, 0, 29, 22, 23, 43, 121, 0, 116, 131, 0, 0, 0, 128, 120, 117, 73, 110, 105, 108, 109, 107, 106, 0, 82, 124, 0, 128, 127, 0, 0, 36, 0, 0, 0, 0, 0, 119, 124, 132, 99, 118, 80, 0, 0, 84, 104, 0, 74, 91, 97, 96, 92, 0, 90, 0, 0, 87, 128, 25, 18, 24, 0, 31, 42, 35, 34, 28, 44, 47, 48, 45, 21, 46, 133, 75, 0, 0, 128, 135, 0, 103, 0, 0, 112, 93, 0, 0, 88, 30, 0, 33, 27, 0, 78, 79, 77, 86, 126, 0, 113, 102, 111, 127, 127, 127, 0, 32, 0, 128, 0, 128, 128, 128, 114, 76, 84, 83, 89, 95, 94, 85};/* PLPGSQL_YYDEFGOTO[NTERM-NUM]. */static const short plpgsql_yydefgoto[] ={ -1, 3, 5, 6, 7, 19, 51, 13, 22, 31, 32, 33, 113, 203, 145, 173, 174, 178, 143, 86, 34, 78, 87, 116, 147, 183, 184, 167, 53, 54, 55, 56, 57, 154, 207, 155, 58, 59, 191, 60, 61, 62, 164, 165, 214, 63, 64, 166, 65, 66, 67, 68, 69, 158, 134, 194, 195, 168, 70, 71, 72, 73, 74, 126, 118, 75, 119, 135, 124, 169, 76, 121, 151, 25, 26};/* PLPGSQL_YYPACT[STATE-NUM] -- Index in PLPGSQL_YYTABLE of the portion describing STATE-NUM. */#define PLPGSQL_YYPACT_NINF -143static const short plpgsql_yypact[] ={ 47, -13, -13, 18, -12, -5, -13, -143, -5, -143, -143, 2, 25, 49, 91, -143, 25, 51, -143, -143, -143, -143, 5, -143, -143, 52, 124, -143, 59, -143, 44, 5, -143, -143, 28, 54, -143, -143, -143, -143, 110, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 58, 108, 41, -143, -143, -143, -143, 56, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 12, -143, 82, 51, -143, 111, -143, -143, 69, -143, 71, -143, -143, 81, -143, 78, 81, -143, -143, 83, -143, 20, -143, -143, -143, -143, -143, -143, -143, 137, -143, -143, -143, -143, 59, 77, 88, 85, -143, -143, 118, -143, 89, -143, -143, -45, 130, 102, 90, -143, -143, -143, -143, -143, -143, -143, -143, -143, 107, -143, -143, 31, 124, -143, 99, 98, -143, 103, 109, -3, 138, 10, -143, -143, -143, -143, -143, -143, -46, 167, 101, -143, -37, -143, -143, -143, -143, -143, 148, -143, 149, 159, -143, 124, -143, -143, -143, 48, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 102, -11, 124, -143, 160, -143, 121, -31, -143, -143, -2, 151, -143, -143, 109, -143, -143, 174, -143, -143, -143, -143, -143, 155, -143, -143, -143, -143, -143, -143, 117, -143, -11, 90, 119, 124, 124, 124, -143, -143, 101, -143, -143, -143, -143, -143};/* PLPGSQL_YYPGOTO[NTERM-NUM]. */static const short plpgsql_yypgoto[] ={ -143, -143, 181, -143, 182, 171, 36, -143, -143, -143, 158, -143, -143, -143, -143, -143, -10, -143, -143, -143, -131, 86, -143, 17, -143, -143, -143, -26, -143, 140, -143, -143, -143, -143, -24, 11, -143, -143, -30, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, 6, -142, -143, -143, -143, -143, -143, -143, 112, -143, -58, -143, -8, -121, 43, -143, -143, 120, -35};/* PLPGSQL_YYTABLE[PLPGSQL_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 PLPGSQL_YYDEFACT says. If PLPGSQL_YYTABLE_NINF, syntax error. */#define PLPGSQL_YYTABLE_NINF -51static const short plpgsql_yytable[] ={ 52, 89, 90, 91, 92, 149, 94, 95, 96, 97, 98, 99, 100, 175, 180, 27, 215, 176, 9, 186, 150, 181, 21, 105, 187, 177, 205, 199, 192, 128, 206, 81, 107, 193, 212, 82, 83, 129, 127, 193, 106, 12, 108, 216, 16, 28, 130, 36, 14, 131, 4, 14, 10, 132, 20, -50, -50, -50, 123, 37, 38, 11, 39, 109, 40, 41, 29, 84, 17, 133, 175, 30, 137, 138, 139, 182, 42, 43, 159, 44, 229, 230, 231, 45, 46, 85, 47, 160, 161, 162, 18, 185, 163, 222, 223, 224, 36, 48, 156, 1, 2, 21, 49, 50, -49, -49, -49, 11, 37, 38, 79, 39, 24, 40, 41, 189, 190, 200, 201, 35, 77, 88, 93, 101, 102, 42, 43, 104, 44, 110, 36, 112, 45, 46, 114, 47, 115, 117, 120, 125, -49, 136, 37, 38, 141, 39, 48, 40, 41, 142, 146, 49, 50, 144, 148, 209, 11, 152, 153, 42, 43, 157, 44, 208, 170, 171, 45, 46, 172, 47, 29, 188, 179, 196, 197, 198, 210, 211, 219, 221, 48, 217, 225, 8, 228, 49, 50, 23, 15, 80, 11, 218, 202, 103, 227, 226, 140, 232, 204, 111, 213, 220, 0, 0, 122};static const short plpgsql_yycheck[] ={ 26, 36, 37, 38, 39, 50, 41, 42, 43, 44, 45, 46, 47, 144, 4, 10, 18, 20, 0, 65, 65, 11, 10, 58, 70, 28, 37, 169, 65, 9, 41, 3, 20, 70, 65, 7, 8, 17, 96, 70, 75, 5, 30, 45, 8, 40, 26, 6, 5, 29, 63, 8, 64, 33, 5, 14, 15, 16, 93, 18, 19, 66, 21, 51, 23, 24, 61, 39, 66, 49, 201, 66, 107, 108, 109, 65, 35, 36, 136, 38, 222, 223, 224, 42, 43, 57, 45, 56, 57, 58, 65, 149, 61, 214, 215, 216, 6, 56, 124, 52, 53, 10, 61, 62, 14, 15, 16, 66, 18, 19,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -