📄 parser.c
字号:
52, -1, 16, 53, -1, 11, 48, -1, 12, 30, -1, 13, 30, -1, 14, 30, -1, 19, 30, -1, 17, 54, -1, 18, 54, -1, 23, -1, 23, -1, 25, -1, 27, -1, 28, -1, 23, -1, 26, -1, 23, -1, 26, -1, 23, -1, 26, -1, 21, -1, 22, -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const yytype_uint16 yyrline[] ={ 0, 77, 77, 77, 79, 81, 83, 87, 93, 97, 101, 106, 107, 107, 107, 107, 109, 113, 117, 121, 125, 129, 137, 143, 152, 158, 169, 180, 184, 185, 185, 185, 185, 187, 192, 197, 202, 209, 214, 219, 224, 229, 236, 243, 250, 254, 260, 266, 272, 279, 288, 295, 304, 311, 319, 319};#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", "K_OPTIONS", "K_DEVICE", "K_AUTOINIT", "K_SECURITY", "K_PAIRING", "K_OFFMODE", "K_DEVICEID", "K_PTYPE", "K_NAME", "K_CLASS", "K_VOICE", "K_PAGETO", "K_LM", "K_LP", "K_ISCAN", "K_PSCAN", "K_DISCOVTO", "K_PASSKEY", "K_YES", "K_NO", "WORD", "PATH", "STRING", "LIST", "HCI", "BDADDR", "ID", "NUM", "'{'", "'}'", "';'", "$accept", "config", "statement", "device", "hcid_options", "hcid_opts", "hcid_opt", "sec_mode", "pair_mode", "off_mode", "dev_id", "device_options", "device_opts", "device_opt", "dev_name", "hci", "bdaddr", "pkt_type", "link_mode", "link_policy", "bool", 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, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 123, 125, 59};# endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const yytype_uint8 yyr1[] ={ 0, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 38, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 41, 41, 42, 43, 44, 45, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 49, 50, 51, 51, 52, 52, 53, 53, 54, 54};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const yytype_uint8 yyr2[] ={ 0, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 3, 0, 2, 2, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, 0, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 yytype_uint8 yydefact[] ={ 0, 7, 0, 8, 6, 0, 2, 0, 0, 4, 46, 47, 9, 10, 1, 3, 0, 5, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 14, 54, 55, 16, 24, 23, 17, 25, 18, 26, 19, 27, 20, 21, 11, 0, 13, 31, 48, 49, 33, 44, 45, 36, 37, 38, 39, 50, 51, 34, 52, 53, 35, 41, 42, 40, 28, 0, 30, 15, 32};/* YYDEFGOTO[NTERM-NUM]. */static const yytype_int8 yydefgoto[] ={ -1, 5, 6, 7, 9, 26, 27, 48, 50, 52, 54, 17, 40, 41, 65, 12, 13, 62, 71, 74, 45};/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */#define YYPACT_NINF -23static const yytype_int8 yypact[] ={ 51, -23, -2, -7, -23, 39, -23, 1, 18, -23, -23, -23, -23, -23, -23, -23, -1, -23, 16, -14, 22, 30, 33, 29, 32, -23, 28, 26, 40, -22, 5, 31, 45, 47, -21, -20, -14, -14, 48, -23, 53, 46, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 49, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, 50, -23, -23, -23};/* YYPGOTO[NTERM-NUM]. */static const yytype_int8 yypgoto[] ={ -23, -23, 75, -23, -23, -23, 55, -23, -23, -23, -23, -23, -23, 44, -23, -23, -23, -23, -23, -23, 10};/* 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 -30static const yytype_int8 yytable[] ={ 28, 60, 69, 72, 61, 70, 73, 43, 44, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 18, 10, 11, 39, 19, 20, 21, 22, 23, 63, 8, 64, -29, 16, 19, 20, 21, 22, 23, 24, 14, 1, 25, 2, 3, 46, 47, 75, 76, 24, 42, -12, 25, 1, 49, 2, 3, 51, 55, 53, 58, 56, 66, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 59, 4, 67, 39, 68, 77, 80, 15, 57, 81, 82, 79, 78};static const yytype_uint8 yycheck[] ={ 1, 23, 23, 23, 26, 26, 26, 21, 22, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1, 27, 28, 23, 5, 6, 7, 8, 9, 23, 31, 25, 32, 31, 5, 6, 7, 8, 9, 20, 0, 1, 23, 3, 4, 22, 23, 36, 37, 20, 33, 32, 23, 1, 23, 3, 4, 23, 25, 29, 33, 32, 30, 23, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 33, 23, 30, 23, 30, 30, 33, 5, 26, 33, 33, 40, 32};/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */static const yytype_uint8 yystos[] ={ 0, 1, 3, 4, 23, 35, 36, 37, 31, 38, 27, 28, 49, 50, 0, 36, 31, 45, 1, 5, 6, 7, 8, 9, 20, 23, 39, 40, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 23, 46, 47, 33, 21, 22, 54, 22, 23, 41, 23, 42, 23, 43, 29, 44, 25, 32, 40, 33, 33, 23, 26, 51, 23, 25, 48, 30, 30, 30, 23, 26, 52, 23, 26, 53, 54, 54, 30, 32, 47, 33, 33, 33};#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; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1;}# endif# endif# ifndef yytnamerr/* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */static YYSIZE_Tyytnamerr (char *yyres, const char *yystr){ if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -