📄 parse-gram.c
字号:
{ 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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */static const unsigned char yyprhs[] ={ 0, 0, 3, 8, 9, 12, 14, 16, 18, 22, 24, 26, 29, 32, 36, 38, 40, 42, 44, 48, 50, 52, 56, 58, 60, 63, 65, 67, 69, 71, 73, 75, 78, 80, 83, 86, 88, 90, 91, 95, 96, 100, 104, 108, 110, 112, 114, 115, 117, 119, 122, 124, 126, 129, 132, 136, 138, 141, 143, 146, 148, 151, 154, 155, 159, 161, 165, 168, 169, 172, 175, 179, 183, 187, 189, 191, 193, 195, 197, 198};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yysigned_char yyrhs[] ={ 52, 0, -1, 53, 47, 65, 75, -1, -1, 53, 54, -1, 55, -1, 48, -1, 17, -1, 19, 74, 74, -1, 20, -1, 21, -1, 22, 4, -1, 23, 4, -1, 24, 42, 74, -1, 25, -1, 26, -1, 27, -1, 28, -1, 29, 42, 74, -1, 31, -1, 32, -1, 33, 42, 74, -1, 34, -1, 35, -1, 36, 74, -1, 38, -1, 39, -1, 40, -1, 43, -1, 59, -1, 56, -1, 37, 71, -1, 10, -1, 8, 62, -1, 9, 62, -1, 18, -1, 30, -1, -1, 6, 57, 64, -1, -1, 5, 58, 64, -1, 7, 41, 62, -1, 60, 61, 62, -1, 11, -1, 12, -1, 13, -1, -1, 41, -1, 71, -1, 62, 71, -1, 41, -1, 45, -1, 45, 4, -1, 45, 73, -1, 45, 4, 73, -1, 63, -1, 64, 63, -1, 66, -1, 65, 66, -1, 67, -1, 55, 43, -1, 1, 43, -1, -1, 46, 68, 69, -1, 70, -1, 69, 44, 70, -1, 69, 43, -1, -1, 70, 71, -1, 70, 72, -1, 70, 14, 71, -1, 70, 15, 4, -1, 70, 16, 41, -1, 45, -1, 73, -1, 50, -1, 3, -1, 3, -1, -1, 47, 49, -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const unsigned short int yyrline[] ={ 0, 188, 188, 196, 198, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 216, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 236, 237, 238, 242, 248, 255, 262, 266, 273, 273, 278, 278, 283, 293, 308, 309, 310, 314, 315, 321, 322, 327, 331, 336, 342, 348, 359, 360, 369, 370, 376, 377, 382, 389, 389, 393, 394, 395, 400, 401, 403, 405, 407, 409, 414, 415, 419, 425, 434, 439, 441};#endif#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */static const char *const yytname[] ={ "\"end of file\"", "error", "$undefined", "\"string\"", "\"integer\"", "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor {...}\"", "\"%printer {...}\"", "\"%union {...}\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", "\"%prec\"", "\"%dprec\"", "\"%merge\"", "\"%debug\"", "\"%default-prec\"", "\"%define\"", "\"%defines\"", "\"%error-verbose\"", "\"%expect\"", "\"%expect-rr\"", "\"%file-prefix\"", "\"%glr-parser\"", "\"%initial-action {...}\"", "\"%lex-param {...}\"", "\"%locations\"", "\"%name-prefix\"", "\"%no-default-prec\"", "\"%no-lines\"", "\"%nondeterministic-parser\"", "\"%output\"", "\"%parse-param {...}\"", "\"%pure-parser\"", "\"%skeleton\"", "\"%start\"", "\"%token-table\"", "\"%verbose\"", "\"%yacc\"", "\"type\"", "\"=\"", "\";\"", "\"|\"", "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"%{...%}\"", "\"epilogue\"", "\"{...}\"", "$accept", "input", "declarations", "declaration", "grammar_declaration", "symbol_declaration", "@1", "@2", "precedence_declaration", "precedence_declarator", "type.opt", "symbols.1", "symbol_def", "symbol_defs.1", "grammar", "rules_or_grammar_declaration", "rules", "@3", "rhses.1", "rhs", "symbol", "action", "string_as_id", "string_content", "epilogue.opt", 0};#endif# ifdef YYPRINT/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */static const unsigned short int 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};# endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const unsigned char yyr1[] ={ 0, 51, 52, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 57, 56, 58, 56, 56, 59, 60, 60, 60, 61, 61, 62, 62, 63, 63, 63, 63, 63, 64, 64, 65, 65, 66, 66, 66, 68, 67, 69, 69, 69, 70, 70, 70, 70, 70, 70, 71, 71, 72, 73, 74, 75, 75};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const unsigned char yyr2[] ={ 0, 2, 4, 0, 2, 1, 1, 1, 3, 1, 1, 2, 2, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 0, 3, 0, 3, 3, 3, 1, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 1, 2, 1, 2, 2, 0, 3, 1, 3, 2, 0, 2, 2, 3, 3, 3, 1, 1, 1, 1, 1, 0, 2};/* 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[] ={ 3, 0, 0, 1, 39, 37, 0, 0, 0, 32, 43, 44, 45, 7, 35, 0, 9, 10, 0, 0, 0, 14, 15, 16, 17, 0, 36, 19, 20, 0, 22, 23, 0, 0, 25, 26, 27, 28, 0, 6, 4, 5, 30, 29, 46, 0, 0, 0, 76, 73, 33, 48, 74, 34, 77, 0, 11, 12, 0, 0, 0, 24, 31, 0, 62, 0, 0, 57, 59, 47, 0, 50, 51, 55, 40, 38, 41, 49, 8, 13, 18, 21, 61, 67, 60, 0, 58, 2, 42, 52, 53, 56, 63, 64, 79, 54, 66, 67, 0, 0, 0, 75, 68, 69, 65, 70, 71, 72};/* YYDEFGOTO[NTERM-NUM]. */static const yysigned_char yydefgoto[] ={ -1, 1, 2, 40, 65, 42, 46, 45, 43, 44, 70, 50, 73, 74, 66, 67, 68, 83, 92, 93, 51, 103, 52, 55, 87};/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */#define YYPACT_NINF -67static const yysigned_char yypact[] ={ -67, 5, 110, -67, -67, -67, -34, 0, 0, -67, -67, -67, -67, -67, -67, 13, -67, -67, 20, 31, -17, -67, -67, -67, -67, -6, -67, -67, -67, -5, -67, -67, 13, 0, -67, -67, -67, -67, 68, -67, -67, -67, -67, -67, -3, -37, -37, 0, -67, -67, 0, -67, -67, 0, -67, 13, -67, -67, 13, 13, 13, -67, -67, -2, -67, 3, 21, -67, -67, -67, 0, -67, 6, -67, -37, -37, 0, -67, -67, -67, -67, -67, -67, -67, -67, 1, -67, -67, 0, 39, -67, -67, -32, -1, -67, -67, -67, -67, 0, 43, 7, -67, -67, -67, -1, -67, -67, -67};/* YYPGOTO[NTERM-NUM]. */static const yysigned_char yypgoto[] ={ -67, -67, -67, -67, 50, -67, -67, -67, -67, -67, -67, -7, -56, 8, -67, -13, -67, -67, -67, -41, -33, -67, -66, 29, -67};/* 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 -79static const yysigned_char yytable[] ={ 62, 53, 48, 48, 71, 3, 90, 47, 72, 48, 89, 96, 97, 98, 99, 100, 54, 77, 91, 91, 77, -78, 63, 95, 56, 58, 4, 5, 6, 7, 8, 9, 10, 11, 12, 57, 59, 60, 69, 14, 76, 82, 48, 77, 49, 49, 84, 106, 107, 101, 94, 26, 41, 86, 75, 77, 104, 0, 33, 0, 102, 61, 0, 88, 0, 105, 0, 64, 85, 63, 0, 102, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 78, 0, 14, 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 64, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 0, 0, 37, 0, 0, 0, 38, 39};static const yysigned_char yycheck[] ={ 33, 8, 3, 3, 41, 0, 72, 41, 45, 3, 4, 43, 44, 14, 15, 16, 3, 50, 74, 75, 53, 0, 1, 89, 4, 42, 5, 6, 7, 8, 9, 10, 11, 12, 13, 4, 42, 42, 41, 18, 47, 43, 3, 76, 45, 45, 43, 4, 41, 50, 49, 30, 2, 66, 46, 88, 97, -1, 37, -1, 93, 32, -1, 70, -1, 98, -1, 46, 47, 1, -1, 104, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, 55, -1, 18, 58, 59, 60, -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, 46, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, 43, -1, -1, -1, 47, 48};/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */static const unsigned char yystos[] ={ 0, 52, 53, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 47, 48, 54, 55, 56, 59, 60, 58, 57, 41, 3, 45, 62, 71, 73, 62, 3, 74, 4, 4, 42, 42, 42, 74, 71, 1, 46, 55, 65, 66, 67, 41, 61, 41, 45, 63, 64, 64, 62, 71, 74, 74, 74, 74, 43, 68, 43, 47, 66, 75, 62, 4, 73, 63, 69, 70, 49, 73, 43, 44, 14, 15, 16, 50, 71, 72, 70, 71, 4, 41};#define yyerrok (yyerrstatus = 0)#define yyclearin (yychar = YYEMPTY)#define YYEMPTY (-2)#define YYEOF 0#define YYACCEPT goto yyacceptlab#define YYABORT goto yyabortlab#define YYERROR goto yyerrorlab/* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */#define YYFAIL goto yyerrlab#define YYRECOVERING() (!!yyerrstatus)#define YYBACKUP(Token, Value) \do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \while (0)#define YYTERROR 1#define YYERRCODE 256/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */#define YYRHSLOC(Rhs, K) ((Rhs)[K])#ifndef YYLLOC_DEFAULT# define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (0)#endif/* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */#ifndef YY_LOCATION_PRINT# if YYLTYPE_IS_TRIVIAL# define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column)# else# define YY_LOCATION_PRINT(File, Loc) ((void) 0)# endif#endif/* YYLEX -- calling `yylex' with the right arguments. */#ifdef YYLEX_PARAM# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)#else# define YYLEX yylex (&yylval, &yylloc)#endif/* Enable debugging if requested. */#if YYDEBUG# ifndef YYFPRINTF# include <stdio.h> /* INFRINGES ON USER NAME SPACE */# define YYFPRINTF fprintf# endif# define YYDPRINTF(Args) \do { \ if (yydebug) \ YYFPRINTF Args; \} while (0)# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yysymprint (stderr, \ Type, Value, Location); \ YYFPRINTF (stderr, "\n"); \ } \} while (0)/*------------------------------------------------------------------.| yy_stack_print -- Print the state stack from its BOTTOM up to its || TOP (included). |`------------------------------------------------------------------*/#if defined (__STDC__) || defined (__cplusplus)static voidyy_stack_print (short int *bottom, short int *top)#elsestatic voidyy_stack_print (bottom, top) short int *bottom; short int *top;#endif{ YYFPRINTF (stderr, "Stack now"); for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n");}# define YY_STACK_PRINT(Bottom, Top) \do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \} while (0)/*------------------------------------------------.| Report that the YYRULE is going to be reduced. |`------------------------------------------------*/#if defined (__STDC__) || defined (__cplusplus)static voidyy_reduce_print (int yyrule)#elsestatic voidyy_reduce_print (yyrule) int yyrule;#endif{ int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);}# define YY_REDUCE_PRINT(Rule) \do { \ if (yydebug) \ yy_reduce_print (Rule); \} while (0)/* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */int yydebug;#else /* !YYDEBUG */# define YYDPRINTF(Args)# define YY_SYMBOL_PRINT(Title, Type, Value, Location)# define YY_STACK_PRINT(Bottom, Top)# define YY_REDUCE_PRINT(Rule)#endif /* !YYDEBUG *//* YYINITDEPTH -- initial size of the parser's stacks. */#ifndef YYINITDEPTH# define YYINITDEPTH 200#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -