47 #define YYBISON_VERSION "3.0.5" 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 "lib/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 "lib/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_LIB_ROUTE_PKTLOC_SYNTAX_H_INCLUDED 100 # define YY_PKTLOC_LIB_ROUTE_PKTLOC_SYNTAX_H_INCLUDED 106 extern int pktloc_debug;
129 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 133 #line 18 "lib/route/pktloc_syntax.y" 139 #line 140 "lib/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 "lib/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 "lib/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) \ 1006 YYCASE_(0, YY_(
"syntax error"));
1007 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1008 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1009 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1010 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1011 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1016 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1017 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1022 if (*yymsg_alloc < yysize)
1024 *yymsg_alloc = 2 * yysize;
1025 if (! (yysize <= *yymsg_alloc
1026 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1027 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1037 while ((*yyp = *yyformat) !=
'\0')
1038 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1040 yyp += yytnamerr (yyp, yyarg[yyi++]);
1058 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1061 YYUSE (yylocationp);
1065 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1067 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1071 #line 39 "lib/route/pktloc_syntax.y" 1072 { free(((*yyvaluep).s)); }
1073 #line 1074 "lib/route/pktloc_syntax.c" 1080 YY_IGNORE_MAYBE_UNINITIALIZED_END
1091 yyparse (
void *scanner)
1100 YY_INITIAL_VALUE (
static YYSTYPE yyval_default;)
1101 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1105 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1109 YYLTYPE yylloc = yyloc_default;
1127 yytype_int16 yyssa[YYINITDEPTH];
1129 yytype_int16 *yyssp;
1144 YYSIZE_T yystacksize;
1158 char *yymsg = yymsgbuf;
1159 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1162 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 1168 yyssp = yyss = yyssa;
1169 yyvsp = yyvs = yyvsa;
1170 yylsp = yyls = yylsa;
1171 yystacksize = YYINITDEPTH;
1173 YYDPRINTF ((stderr,
"Starting parse\n"));
1193 if (yyss + yystacksize - 1 <= yyssp)
1196 YYSIZE_T yysize = yyssp - yyss + 1;
1204 yytype_int16 *yyss1 = yyss;
1211 yyoverflow (YY_(
"memory exhausted"),
1212 &yyss1, yysize *
sizeof (*yyssp),
1213 &yyvs1, yysize *
sizeof (*yyvsp),
1214 &yyls1, yysize *
sizeof (*yylsp),
1222 # ifndef YYSTACK_RELOCATE 1223 goto yyexhaustedlab;
1226 if (YYMAXDEPTH <= yystacksize)
1227 goto yyexhaustedlab;
1229 if (YYMAXDEPTH < yystacksize)
1230 yystacksize = YYMAXDEPTH;
1233 yytype_int16 *yyss1 = yyss;
1235 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1237 goto yyexhaustedlab;
1238 YYSTACK_RELOCATE (yyss_alloc, yyss);
1239 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1240 YYSTACK_RELOCATE (yyls_alloc, yyls);
1241 # undef YYSTACK_RELOCATE 1243 YYSTACK_FREE (yyss1);
1248 yyssp = yyss + yysize - 1;
1249 yyvsp = yyvs + yysize - 1;
1250 yylsp = yyls + yysize - 1;
1252 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1253 (
unsigned long int) yystacksize));
1255 if (yyss + yystacksize - 1 <= yyssp)
1259 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1261 if (yystate == YYFINAL)
1275 yyn = yypact[yystate];
1276 if (yypact_value_is_default (yyn))
1282 if (yychar == YYEMPTY)
1284 YYDPRINTF ((stderr,
"Reading a token: "));
1285 yychar = yylex (&yylval, &yylloc, scanner);
1288 if (yychar <= YYEOF)
1290 yychar = yytoken = YYEOF;
1291 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1295 yytoken = YYTRANSLATE (yychar);
1296 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1302 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1307 if (yytable_value_is_error (yyn))
1319 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1325 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1327 YY_IGNORE_MAYBE_UNINITIALIZED_END
1336 yyn = yydefact[yystate];
1357 yyval = yyvsp[1-yylen];
1360 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1361 yyerror_range[1] = yyloc;
1362 YY_REDUCE_PRINT (yyn);
1366 #line 52 "lib/route/pktloc_syntax.y" 1371 NL_DBG(1,
"Allocating a packet location " 1372 "object failed.\n");
1376 loc->name = (yyvsp[-5].s);
1377 loc->align = (yyvsp[-4].i);
1378 loc->layer = (yyvsp[-3].i);
1379 loc->offset = (yyvsp[-2].i);
1380 loc->mask = (yyvsp[-1].i);
1381 loc->shift = (yyvsp[0].i);
1384 NL_DBG(1,
"Duplicate packet location entry " 1385 "\"%s\"\n", (yyvsp[-5].s));
1390 #line 1391 "lib/route/pktloc_syntax.c" 1394 #line 79 "lib/route/pktloc_syntax.y" 1395 { (yyval.i) = (yyvsp[0].i); }
1396 #line 1397 "lib/route/pktloc_syntax.c" 1400 #line 81 "lib/route/pktloc_syntax.y" 1401 { (yyval.i) = (yyvsp[0].i); }
1402 #line 1403 "lib/route/pktloc_syntax.c" 1406 #line 86 "lib/route/pktloc_syntax.y" 1407 { (yyval.i) = TCF_LAYER_NETWORK; }
1408 #line 1409 "lib/route/pktloc_syntax.c" 1412 #line 88 "lib/route/pktloc_syntax.y" 1413 { (yyval.i) = (yyvsp[-1].i); }
1414 #line 1415 "lib/route/pktloc_syntax.c" 1418 #line 93 "lib/route/pktloc_syntax.y" 1420 #line 1421 "lib/route/pktloc_syntax.c" 1424 #line 95 "lib/route/pktloc_syntax.y" 1425 { (yyval.i) = (yyvsp[0].i); }
1426 #line 1427 "lib/route/pktloc_syntax.c" 1430 #line 100 "lib/route/pktloc_syntax.y" 1432 #line 1433 "lib/route/pktloc_syntax.c" 1436 #line 102 "lib/route/pktloc_syntax.y" 1437 { (yyval.i) = (yyvsp[0].i); }
1438 #line 1439 "lib/route/pktloc_syntax.c" 1442 #line 1443 "lib/route/pktloc_syntax.c" 1456 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1460 YY_STACK_PRINT (yyss, yyssp);
1471 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1472 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1473 yystate = yytable[yystate];
1475 yystate = yydefgoto[yyn - YYNTOKENS];
1486 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1492 #if ! YYERROR_VERBOSE 1493 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1495 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1498 char const *yymsgp = YY_(
"syntax error");
1499 int yysyntax_error_status;
1500 yysyntax_error_status = YYSYNTAX_ERROR;
1501 if (yysyntax_error_status == 0)
1503 else if (yysyntax_error_status == 1)
1505 if (yymsg != yymsgbuf)
1506 YYSTACK_FREE (yymsg);
1507 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1511 yymsg_alloc =
sizeof yymsgbuf;
1512 yysyntax_error_status = 2;
1516 yysyntax_error_status = YYSYNTAX_ERROR;
1520 yyerror (&yylloc, scanner, yymsgp);
1521 if (yysyntax_error_status == 2)
1522 goto yyexhaustedlab;
1524 # undef YYSYNTAX_ERROR 1528 yyerror_range[1] = yylloc;
1530 if (yyerrstatus == 3)
1535 if (yychar <= YYEOF)
1538 if (yychar == YYEOF)
1543 yydestruct (
"Error: discarding",
1544 yytoken, &yylval, &yylloc, scanner);
1569 YY_STACK_PRINT (yyss, yyssp);
1582 yyn = yypact[yystate];
1583 if (!yypact_value_is_default (yyn))
1586 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1598 yyerror_range[1] = *yylsp;
1599 yydestruct (
"Error: popping",
1600 yystos[yystate], yyvsp, yylsp, scanner);
1603 YY_STACK_PRINT (yyss, yyssp);
1606 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1608 YY_IGNORE_MAYBE_UNINITIALIZED_END
1610 yyerror_range[2] = yylloc;
1613 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1617 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1637 #if !defined yyoverflow || YYERROR_VERBOSE 1642 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1648 if (yychar != YYEMPTY)
1652 yytoken = YYTRANSLATE (yychar);
1653 yydestruct (
"Cleanup: discarding lookahead",
1654 yytoken, &yylval, &yylloc, scanner);
1659 YY_STACK_PRINT (yyss, yyssp);
1660 while (yyssp != yyss)
1662 yydestruct (
"Cleanup: popping",
1663 yystos[*yyssp], yyvsp, yylsp, scanner);
1668 YYSTACK_FREE (yyss);
1671 if (yymsg != yymsgbuf)
1672 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.