47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 63 #define yyparse pktloc_parse 64 #define yylex pktloc_lex 65 #define yyerror pktloc_error 66 #define yydebug pktloc_debug 67 #define yynerrs pktloc_nerrs 71 #line 1 "route/pktloc_syntax.y" 73 #include <netlink-private/netlink.h> 74 #include <netlink-private/tc.h> 75 #include <netlink/netlink.h> 76 #include <netlink/utils.h> 77 #include <netlink/route/pktloc.h> 79 #line 80 "route/pktloc_syntax.c" 82 # if defined __cplusplus && 201103L <= __cplusplus 83 # define YY_NULLPTR nullptr 90 #ifdef YYERROR_VERBOSE 91 # undef YYERROR_VERBOSE 92 # define YYERROR_VERBOSE 1 94 # define YYERROR_VERBOSE 1 99 #ifndef YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED 100 # define YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED 106 extern int pktloc_debug;
129 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 133 #line 18 "route/pktloc_syntax.y" 139 #line 140 "route/pktloc_syntax.c" 143 # define YYSTYPE_IS_TRIVIAL 1 144 # define YYSTYPE_IS_DECLARED 1 148 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 157 # define YYLTYPE_IS_DECLARED 1 158 # define YYLTYPE_IS_TRIVIAL 1 163 int pktloc_parse (
void *scanner);
168 #line 24 "route/pktloc_syntax.y" 172 static void yyerror(
YYLTYPE *locp,
void *scanner,
const char *msg)
174 NL_DBG(1,
"Error while parsing packet location file: %s\n", msg);
177 #line 178 "route/pktloc_syntax.c" 184 typedef YYTYPE_UINT8 yytype_uint8;
186 typedef unsigned char yytype_uint8;
190 typedef YYTYPE_INT8 yytype_int8;
192 typedef signed char yytype_int8;
196 typedef YYTYPE_UINT16 yytype_uint16;
198 typedef unsigned short int yytype_uint16;
202 typedef YYTYPE_INT16 yytype_int16;
204 typedef short int yytype_int16;
208 # ifdef __SIZE_TYPE__ 209 # define YYSIZE_T __SIZE_TYPE__ 210 # elif defined size_t 211 # define YYSIZE_T size_t 212 # elif ! defined YYSIZE_T 214 # define YYSIZE_T size_t 216 # define YYSIZE_T unsigned int 220 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 223 # if defined YYENABLE_NLS && YYENABLE_NLS 225 # include <libintl.h> 226 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 230 # define YY_(Msgid) Msgid 235 # if (defined __GNUC__ \ 236 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 237 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 238 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 240 # define YY_ATTRIBUTE(Spec) 244 #ifndef YY_ATTRIBUTE_PURE 245 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 248 #ifndef YY_ATTRIBUTE_UNUSED 249 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 252 #if !defined _Noreturn \ 253 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 254 # if defined _MSC_VER && 1200 <= _MSC_VER 255 # define _Noreturn __declspec (noreturn) 257 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 262 #if ! defined lint || defined __GNUC__ 263 # define YYUSE(E) ((void) (E)) 268 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 270 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 271 _Pragma ("GCC diagnostic push") \ 272 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 273 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 274 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 275 _Pragma ("GCC diagnostic pop") 277 # define YY_INITIAL_VALUE(Value) Value 279 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 280 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 281 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 283 #ifndef YY_INITIAL_VALUE 284 # define YY_INITIAL_VALUE(Value) 288 #if ! defined yyoverflow || YYERROR_VERBOSE 292 # ifdef YYSTACK_USE_ALLOCA 293 # if YYSTACK_USE_ALLOCA 295 # define YYSTACK_ALLOC __builtin_alloca 296 # elif defined __BUILTIN_VA_ARG_INCR 299 # define YYSTACK_ALLOC __alloca 300 # elif defined _MSC_VER 302 # define alloca _alloca 304 # define YYSTACK_ALLOC alloca 305 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 308 # ifndef EXIT_SUCCESS 309 # define EXIT_SUCCESS 0 316 # ifdef YYSTACK_ALLOC 318 # define YYSTACK_FREE(Ptr) do { ; } while (0) 319 # ifndef YYSTACK_ALLOC_MAXIMUM 324 # define YYSTACK_ALLOC_MAXIMUM 4032 327 # define YYSTACK_ALLOC YYMALLOC 328 # define YYSTACK_FREE YYFREE 329 # ifndef YYSTACK_ALLOC_MAXIMUM 330 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 332 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 333 && ! ((defined YYMALLOC || defined malloc) \ 334 && (defined YYFREE || defined free))) 336 # ifndef EXIT_SUCCESS 337 # define EXIT_SUCCESS 0 341 # define YYMALLOC malloc 342 # if ! defined malloc && ! defined EXIT_SUCCESS 343 void *malloc (YYSIZE_T);
348 # if ! defined free && ! defined EXIT_SUCCESS 356 #if (! defined yyoverflow \ 357 && (! defined __cplusplus \ 358 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ 359 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 364 yytype_int16 yyss_alloc;
370 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 374 # define YYSTACK_BYTES(N) \ 375 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 376 + 2 * YYSTACK_GAP_MAXIMUM) 378 # define YYCOPY_NEEDED 1 385 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 388 YYSIZE_T yynewbytes; \ 389 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 390 Stack = &yyptr->Stack_alloc; \ 391 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 392 yyptr += yynewbytes / sizeof (*yyptr); \ 398 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 402 # if defined __GNUC__ && 1 < __GNUC__ 403 # define YYCOPY(Dst, Src, Count) \ 404 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 406 # define YYCOPY(Dst, Src, Count) \ 410 for (yyi = 0; yyi < (Count); yyi++) \ 411 (Dst)[yyi] = (Src)[yyi]; \ 435 #define YYMAXUTOK 262 437 #define YYTRANSLATE(YYX) \ 438 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 442 static const yytype_uint8 yytranslate[] =
444 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
475 static const yytype_uint8 yyrline[] =
477 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
482 #if YYDEBUG || YYERROR_VERBOSE || 1 485 static const char *
const yytname[] =
487 "$end",
"error",
"$undefined",
"ERROR",
"NUMBER",
"LAYER",
"ALIGN",
488 "NAME",
"'+'",
"$accept",
"input",
"location",
"align",
"layer",
"mask",
496 static const yytype_uint16 yytoknum[] =
498 0, 256, 257, 258, 259, 260, 261, 262, 43
502 #define YYPACT_NINF -7 504 #define yypact_value_is_default(Yystate) \ 505 (!!((Yystate) == (-7))) 507 #define YYTABLE_NINF -1 509 #define yytable_value_is_error(Yytable_value) \ 514 static const yytype_int8 yypact[] =
516 -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
517 2, -7, 4, -7, 5, -7, -7
523 static const yytype_uint8 yydefact[] =
525 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
526 0, 8, 9, 10, 11, 12, 4
530 static const yytype_int8 yypgoto[] =
532 -7, 7, -7, -7, -7, -7, -7
536 static const yytype_int8 yydefgoto[] =
538 -1, 2, 3, 6, 10, 14, 16
544 static const yytype_uint8 yytable[] =
546 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
550 static const yytype_int8 yycheck[] =
552 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
558 static const yytype_uint8 yystos[] =
560 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
561 13, 8, 4, 4, 14, 4, 15
565 static const yytype_uint8 yyr1[] =
567 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
572 static const yytype_uint8 yyr2[] =
574 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
579 #define yyerrok (yyerrstatus = 0) 580 #define yyclearin (yychar = YYEMPTY) 584 #define YYACCEPT goto yyacceptlab 585 #define YYABORT goto yyabortlab 586 #define YYERROR goto yyerrorlab 589 #define YYRECOVERING() (!!yyerrstatus) 591 #define YYBACKUP(Token, Value) \ 593 if (yychar == YYEMPTY) \ 597 YYPOPSTACK (yylen); \ 603 yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \ 610 #define YYERRCODE 256 617 #ifndef YYLLOC_DEFAULT 618 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 622 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 623 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 624 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 625 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 629 (Current).first_line = (Current).last_line = \ 630 YYRHSLOC (Rhs, 0).last_line; \ 631 (Current).first_column = (Current).last_column = \ 632 YYRHSLOC (Rhs, 0).last_column; \ 637 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 645 # define YYFPRINTF fprintf 648 # define YYDPRINTF(Args) \ 659 #ifndef YY_LOCATION_PRINT 660 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 666 yy_location_print_ (FILE *yyo,
YYLTYPE const *
const yylocp)
669 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
670 if (0 <= yylocp->first_line)
672 res += YYFPRINTF (yyo,
"%d", yylocp->first_line);
673 if (0 <= yylocp->first_column)
674 res += YYFPRINTF (yyo,
".%d", yylocp->first_column);
676 if (0 <= yylocp->last_line)
678 if (yylocp->first_line < yylocp->last_line)
680 res += YYFPRINTF (yyo,
"-%d", yylocp->last_line);
682 res += YYFPRINTF (yyo,
".%d", end_col);
684 else if (0 <= end_col && yylocp->first_column < end_col)
685 res += YYFPRINTF (yyo,
"-%d", end_col);
690 # define YY_LOCATION_PRINT(File, Loc) \ 691 yy_location_print_ (File, &(Loc)) 694 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 699 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 703 YYFPRINTF (stderr, "%s ", Title); \ 704 yy_symbol_print (stderr, \ 705 Type, Value, Location, scanner); \ 706 YYFPRINTF (stderr, "\n"); \ 716 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
718 FILE *yyo = yyoutput;
725 if (yytype < YYNTOKENS)
726 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
737 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
739 YYFPRINTF (yyoutput,
"%s %s (",
740 yytype < YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
742 YY_LOCATION_PRINT (yyoutput, *yylocationp);
743 YYFPRINTF (yyoutput,
": ");
744 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
745 YYFPRINTF (yyoutput,
")");
754 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
756 YYFPRINTF (stderr,
"Stack now");
757 for (; yybottom <= yytop; yybottom++)
759 int yybot = *yybottom;
760 YYFPRINTF (stderr,
" %d", yybot);
762 YYFPRINTF (stderr,
"\n");
765 # define YY_STACK_PRINT(Bottom, Top) \ 768 yy_stack_print ((Bottom), (Top)); \ 777 yy_reduce_print (yytype_int16 *yyssp,
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
779 unsigned long int yylno = yyrline[yyrule];
780 int yynrhs = yyr2[yyrule];
782 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
785 for (yyi = 0; yyi < yynrhs; yyi++)
787 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
788 yy_symbol_print (stderr,
789 yystos[yyssp[yyi + 1 - yynrhs]],
790 &(yyvsp[(yyi + 1) - (yynrhs)])
791 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
792 YYFPRINTF (stderr,
"\n");
796 # define YY_REDUCE_PRINT(Rule) \ 799 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner); \ 806 # define YYDPRINTF(Args) 807 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 808 # define YY_STACK_PRINT(Bottom, Top) 809 # define YY_REDUCE_PRINT(Rule) 815 # define YYINITDEPTH 200 826 # define YYMAXDEPTH 10000 833 # if defined __GLIBC__ && defined _STRING_H 834 # define yystrlen strlen 838 yystrlen (
const char *yystr)
841 for (yylen = 0; yystr[yylen]; yylen++)
849 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 850 # define yystpcpy stpcpy 855 yystpcpy (
char *yydest,
const char *yysrc)
858 const char *yys = yysrc;
860 while ((*yyd++ = *yys++) !=
'\0')
877 yytnamerr (
char *yyres,
const char *yystr)
882 char const *yyp = yystr;
889 goto do_not_strip_quotes;
893 goto do_not_strip_quotes;
906 do_not_strip_quotes: ;
910 return yystrlen (yystr);
912 return yystpcpy (yyres, yystr) - yyres;
925 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
926 yytype_int16 *yyssp,
int yytoken)
928 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
929 YYSIZE_T yysize = yysize0;
930 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
932 const char *yyformat = YY_NULLPTR;
934 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
962 if (yytoken != YYEMPTY)
964 int yyn = yypact[*yyssp];
965 yyarg[yycount++] = yytname[yytoken];
966 if (!yypact_value_is_default (yyn))
971 int yyxbegin = yyn < 0 ? -yyn : 0;
973 int yychecklim = YYLAST - yyn + 1;
974 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
977 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
978 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
979 && !yytable_value_is_error (yytable[yyx + yyn]))
981 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
987 yyarg[yycount++] = yytname[yyx];
989 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
990 if (! (yysize <= yysize1
991 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1001 # define YYCASE_(N, S) \ 1005 YYCASE_(0, YY_(
"syntax error"));
1006 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1007 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1008 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1009 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1010 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1015 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1016 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1021 if (*yymsg_alloc < yysize)
1023 *yymsg_alloc = 2 * yysize;
1024 if (! (yysize <= *yymsg_alloc
1025 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1026 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1036 while ((*yyp = *yyformat) !=
'\0')
1037 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1039 yyp += yytnamerr (yyp, yyarg[yyi++]);
1057 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1060 YYUSE (yylocationp);
1064 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1066 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1070 #line 39 "route/pktloc_syntax.y" 1071 { free(((*yyvaluep).s)); }
1072 #line 1073 "route/pktloc_syntax.c" 1079 YY_IGNORE_MAYBE_UNINITIALIZED_END
1090 yyparse (
void *scanner)
1099 YY_INITIAL_VALUE (
static YYSTYPE yyval_default;)
1100 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1104 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1108 YYLTYPE yylloc = yyloc_default;
1126 yytype_int16 yyssa[YYINITDEPTH];
1128 yytype_int16 *yyssp;
1143 YYSIZE_T yystacksize;
1157 char *yymsg = yymsgbuf;
1158 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1161 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 1167 yyssp = yyss = yyssa;
1168 yyvsp = yyvs = yyvsa;
1169 yylsp = yyls = yylsa;
1170 yystacksize = YYINITDEPTH;
1172 YYDPRINTF ((stderr,
"Starting parse\n"));
1192 if (yyss + yystacksize - 1 <= yyssp)
1195 YYSIZE_T yysize = yyssp - yyss + 1;
1203 yytype_int16 *yyss1 = yyss;
1210 yyoverflow (YY_(
"memory exhausted"),
1211 &yyss1, yysize *
sizeof (*yyssp),
1212 &yyvs1, yysize *
sizeof (*yyvsp),
1213 &yyls1, yysize *
sizeof (*yylsp),
1221 # ifndef YYSTACK_RELOCATE 1222 goto yyexhaustedlab;
1225 if (YYMAXDEPTH <= yystacksize)
1226 goto yyexhaustedlab;
1228 if (YYMAXDEPTH < yystacksize)
1229 yystacksize = YYMAXDEPTH;
1232 yytype_int16 *yyss1 = yyss;
1234 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1236 goto yyexhaustedlab;
1237 YYSTACK_RELOCATE (yyss_alloc, yyss);
1238 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1239 YYSTACK_RELOCATE (yyls_alloc, yyls);
1240 # undef YYSTACK_RELOCATE 1242 YYSTACK_FREE (yyss1);
1247 yyssp = yyss + yysize - 1;
1248 yyvsp = yyvs + yysize - 1;
1249 yylsp = yyls + yysize - 1;
1251 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1252 (
unsigned long int) yystacksize));
1254 if (yyss + yystacksize - 1 <= yyssp)
1258 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1260 if (yystate == YYFINAL)
1274 yyn = yypact[yystate];
1275 if (yypact_value_is_default (yyn))
1281 if (yychar == YYEMPTY)
1283 YYDPRINTF ((stderr,
"Reading a token: "));
1284 yychar = yylex (&yylval, &yylloc, scanner);
1287 if (yychar <= YYEOF)
1289 yychar = yytoken = YYEOF;
1290 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1294 yytoken = YYTRANSLATE (yychar);
1295 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1301 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1306 if (yytable_value_is_error (yyn))
1318 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1324 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1326 YY_IGNORE_MAYBE_UNINITIALIZED_END
1335 yyn = yydefact[yystate];
1356 yyval = yyvsp[1-yylen];
1359 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1360 YY_REDUCE_PRINT (yyn);
1364 #line 52 "route/pktloc_syntax.y" 1369 NL_DBG(1,
"Allocating a packet location " 1370 "object failed.\n");
1374 loc->name = (yyvsp[-5].s);
1375 loc->align = (yyvsp[-4].i);
1376 loc->layer = (yyvsp[-3].i);
1377 loc->offset = (yyvsp[-2].i);
1378 loc->mask = (yyvsp[-1].i);
1379 loc->shift = (yyvsp[0].i);
1382 NL_DBG(1,
"Duplicate packet location entry " 1383 "\"%s\"\n", (yyvsp[-5].s));
1388 #line 1389 "route/pktloc_syntax.c" 1392 #line 79 "route/pktloc_syntax.y" 1393 { (yyval.i) = (yyvsp[0].i); }
1394 #line 1395 "route/pktloc_syntax.c" 1398 #line 81 "route/pktloc_syntax.y" 1399 { (yyval.i) = (yyvsp[0].i); }
1400 #line 1401 "route/pktloc_syntax.c" 1404 #line 86 "route/pktloc_syntax.y" 1405 { (yyval.i) = TCF_LAYER_NETWORK; }
1406 #line 1407 "route/pktloc_syntax.c" 1410 #line 88 "route/pktloc_syntax.y" 1411 { (yyval.i) = (yyvsp[-1].i); }
1412 #line 1413 "route/pktloc_syntax.c" 1416 #line 93 "route/pktloc_syntax.y" 1418 #line 1419 "route/pktloc_syntax.c" 1422 #line 95 "route/pktloc_syntax.y" 1423 { (yyval.i) = (yyvsp[0].i); }
1424 #line 1425 "route/pktloc_syntax.c" 1428 #line 100 "route/pktloc_syntax.y" 1430 #line 1431 "route/pktloc_syntax.c" 1434 #line 102 "route/pktloc_syntax.y" 1435 { (yyval.i) = (yyvsp[0].i); }
1436 #line 1437 "route/pktloc_syntax.c" 1440 #line 1441 "route/pktloc_syntax.c" 1454 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1458 YY_STACK_PRINT (yyss, yyssp);
1469 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1470 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1471 yystate = yytable[yystate];
1473 yystate = yydefgoto[yyn - YYNTOKENS];
1484 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1490 #if ! YYERROR_VERBOSE 1491 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1493 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1496 char const *yymsgp = YY_(
"syntax error");
1497 int yysyntax_error_status;
1498 yysyntax_error_status = YYSYNTAX_ERROR;
1499 if (yysyntax_error_status == 0)
1501 else if (yysyntax_error_status == 1)
1503 if (yymsg != yymsgbuf)
1504 YYSTACK_FREE (yymsg);
1505 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1509 yymsg_alloc =
sizeof yymsgbuf;
1510 yysyntax_error_status = 2;
1514 yysyntax_error_status = YYSYNTAX_ERROR;
1518 yyerror (&yylloc, scanner, yymsgp);
1519 if (yysyntax_error_status == 2)
1520 goto yyexhaustedlab;
1522 # undef YYSYNTAX_ERROR 1526 yyerror_range[1] = yylloc;
1528 if (yyerrstatus == 3)
1533 if (yychar <= YYEOF)
1536 if (yychar == YYEOF)
1541 yydestruct (
"Error: discarding",
1542 yytoken, &yylval, &yylloc, scanner);
1563 yyerror_range[1] = yylsp[1-yylen];
1568 YY_STACK_PRINT (yyss, yyssp);
1581 yyn = yypact[yystate];
1582 if (!yypact_value_is_default (yyn))
1585 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1597 yyerror_range[1] = *yylsp;
1598 yydestruct (
"Error: popping",
1599 yystos[yystate], yyvsp, yylsp, scanner);
1602 YY_STACK_PRINT (yyss, yyssp);
1605 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1607 YY_IGNORE_MAYBE_UNINITIALIZED_END
1609 yyerror_range[2] = yylloc;
1612 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1616 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1636 #if !defined yyoverflow || YYERROR_VERBOSE 1641 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1647 if (yychar != YYEMPTY)
1651 yytoken = YYTRANSLATE (yychar);
1652 yydestruct (
"Cleanup: discarding lookahead",
1653 yytoken, &yylval, &yylloc, scanner);
1658 YY_STACK_PRINT (yyss, yyssp);
1659 while (yyssp != yyss)
1661 yydestruct (
"Cleanup: popping",
1662 yystos[*yyssp], yyvsp, yylsp, scanner);
1667 YYSTACK_FREE (yyss);
1670 if (yymsg != yymsgbuf)
1671 YYSTACK_FREE (yymsg);
struct rtnl_pktloc * rtnl_pktloc_alloc(void)
Allocate packet location object.
int rtnl_pktloc_add(struct rtnl_pktloc *loc)
Add a packet location to the hash table.