📄 parser.cc
字号:
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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */static const yytype_uint8 yyprhs[] ={ 0, 0, 3, 4, 7, 10, 15, 20, 25, 30, 34, 35, 38, 40, 44, 46, 50, 52, 55, 57, 60, 63, 65, 68, 70, 72, 74};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yytype_int8 yyrhs[] ={ 20, 0, -1, -1, 20, 22, -1, 20, 21, -1, 5, 12, 24, 13, -1, 5, 12, 24, 14, -1, 9, 12, 10, 13, -1, 9, 12, 11, 13, -1, 24, 23, 6, -1, -1, 14, 24, -1, 25, -1, 24, 15, 25, -1, 26, -1, 25, 16, 26, -1, 27, -1, 26, 27, -1, 29, -1, 29, 28, -1, 29, 3, -1, 4, -1, 28, 4, -1, 5, -1, 7, -1, 8, -1, 17, 24, 18, -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const yytype_uint8 yyrline[] ={ 0, 84, 84, 86, 88, 91, 95, 97, 99, 103, 108, 109, 113, 115, 119, 121, 128, 130, 134, 136, 150, 156, 158, 162, 166, 168, 170};#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", "error", "$undefined", "CLOSESIZE", "CLOSE", "ID", "CODE", "RANGE", "STRING", "CONFIG", "VALUE", "NUMBER", "'='", "';'", "'/'", "'|'", "'\\\\'", "'('", "')'", "$accept", "spec", "decl", "rule", "look", "expr", "diff", "term", "factor", "close", "primary", 0};#endif# ifdef YYPRINT/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */static const yytype_uint16 yytoknum[] ={ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 61, 59, 47, 124, 92, 40, 41};# endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const yytype_uint8 yyr1[] ={ 0, 19, 20, 20, 20, 21, 21, 21, 21, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 27, 28, 28, 29, 29, 29, 29};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const yytype_uint8 yyr2[] ={ 0, 2, 0, 2, 2, 4, 4, 4, 4, 3, 0, 2, 1, 3, 1, 3, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 3};/* 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 yytype_uint8 yydefact[] ={ 2, 0, 1, 23, 24, 25, 0, 0, 4, 3, 10, 12, 14, 16, 18, 0, 0, 23, 0, 0, 0, 0, 0, 17, 20, 21, 19, 0, 0, 0, 26, 11, 13, 9, 15, 22, 5, 6, 7, 8};/* YYDEFGOTO[NTERM-NUM]. */static const yytype_int8 yydefgoto[] ={ -1, 1, 8, 9, 21, 10, 11, 12, 13, 26, 14};/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */#define YYPACT_NINF -13static const yytype_int8 yypact[] ={ -13, 1, -13, -5, -13, -13, 0, -3, -13, -13, 9, 13, -3, -13, 22, -3, 17, -13, -2, -3, -3, 11, -3, -13, -13, -13, 26, 6, 18, 19, -13, 20, 13, -13, -3, -13, -13, -13, -13, -13};/* YYPGOTO[NTERM-NUM]. */static const yytype_int8 yypgoto[] ={ -13, -13, -13, -13, -13, -4, 14, 15, -12, -13, -13};/* 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 -1static const yytype_uint8 yytable[] ={ 23, 2, 17, 18, 4, 5, 3, 15, 4, 5, 6, 27, 16, 20, 7, 31, 30, 33, 7, 36, 37, 20, 23, 19, 20, 24, 25, 28, 29, 22, 35, 38, 39, 0, 32, 20, 0, 34};static const yytype_int8 yycheck[] ={ 12, 0, 5, 7, 7, 8, 5, 12, 7, 8, 9, 15, 12, 15, 17, 19, 18, 6, 17, 13, 14, 15, 34, 14, 15, 3, 4, 10, 11, 16, 4, 13, 13, -1, 20, 15, -1, 22};/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */static const yytype_uint8 yystos[] ={ 0, 20, 0, 5, 7, 8, 9, 17, 21, 22, 24, 25, 26, 27, 29, 12, 12, 5, 24, 14, 15, 23, 16, 27, 3, 4, 28, 24, 10, 11, 18, 24, 25, 6, 26, 4, 13, 14, 13, 13};#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 (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \while (YYID (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 (YYID (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 (YYID (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 (YYLEX_PARAM)#else# define YYLEX yylex ()#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 (YYID (0))# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \} while (YYID (0))/*--------------------------------.| Print this symbol on YYOUTPUT. |`--------------------------------*//*ARGSUSED*/#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static voidyy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)#elsestatic voidyy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep;#endif{ if (!yyvaluep) return;# ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);# else YYUSE (yyoutput);# endif switch (yytype) { default: break; }}/*--------------------------------.| Print this symbol on YYOUTPUT. |`--------------------------------*/#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static voidyy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)#elsestatic voidyy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep;#endif{ if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")");}/*------------------------------------------------------------------.| yy_stack_print -- Print the state stack from its BOTTOM up to its || TOP (included). |`------------------------------------------------------------------*/#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static voidyy_stack_print (yytype_int16 *bottom, yytype_int16 *top)#elsestatic voidyy_stack_print (bottom, top) yytype_int16 *bottom; yytype_int16 *top;#endif{ YYFPRINTF (stderr, "Stack now"); for (; 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 (YYID (0))/*------------------------------------------------.| Report that the YYRULE is going to be reduced. |`------------------------------------------------*/#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static voidyy_reduce_print (YYSTYPE *yyvsp, int yyrule)#elsestatic voidyy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule;#endif{ int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); }}# define YY_REDUCE_PRINT(Rule) \do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \} while (YYID (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/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */#ifndef YYMAXDEPTH# define YYMAXDEPTH 10000#endif#if YYERROR_VERBOSE# ifndef yystrlen# if defined __GLIBC__ && defined _STRING_H# define yystrlen strlen# else/* Return the length of YYSTR. */#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static YYSIZE_Tyystrlen (const char *yystr)#elsestatic YYSIZE_Tyystrlen (yystr) const char *yystr;#endif{ YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen;}# endif# endif# ifndef yystpcpy# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE# define yystpcpy stpcpy# else/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static char *yystpcpy (char *yydest, const char *yysrc)#elsestatic char *yystpcpy (yydest, yysrc) char *yydest; const char *yysrc;#endif{ char *yyd = yydest;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -