47 #define YYBISON_VERSION "3.0.2"
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"
141 # define YYSTYPE_IS_TRIVIAL 1
142 # define YYSTYPE_IS_DECLARED 1
146 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
155 # define YYLTYPE_IS_DECLARED 1
156 # define YYLTYPE_IS_TRIVIAL 1
161 int pktloc_parse (
void *scanner);
166 #line 24 "route/pktloc_syntax.y"
170 static void yyerror(
YYLTYPE *locp,
void *scanner,
const char *msg)
172 NL_DBG(1,
"Error while parsing packet location file: %s\n", msg);
175 #line 176 "route/pktloc_syntax.c"
182 typedef YYTYPE_UINT8 yytype_uint8;
184 typedef unsigned char yytype_uint8;
188 typedef YYTYPE_INT8 yytype_int8;
190 typedef signed char yytype_int8;
194 typedef YYTYPE_UINT16 yytype_uint16;
196 typedef unsigned short int yytype_uint16;
200 typedef YYTYPE_INT16 yytype_int16;
202 typedef short int yytype_int16;
206 # ifdef __SIZE_TYPE__
207 # define YYSIZE_T __SIZE_TYPE__
208 # elif defined size_t
209 # define YYSIZE_T size_t
210 # elif ! defined YYSIZE_T
212 # define YYSIZE_T size_t
214 # define YYSIZE_T unsigned int
218 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
221 # if defined YYENABLE_NLS && YYENABLE_NLS
223 # include <libintl.h>
224 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
228 # define YY_(Msgid) Msgid
233 # if (defined __GNUC__ \
234 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
235 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
236 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
238 # define YY_ATTRIBUTE(Spec)
242 #ifndef YY_ATTRIBUTE_PURE
243 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
246 #ifndef YY_ATTRIBUTE_UNUSED
247 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
250 #if !defined _Noreturn \
251 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
252 # if defined _MSC_VER && 1200 <= _MSC_VER
253 # define _Noreturn __declspec (noreturn)
255 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
260 #if ! defined lint || defined __GNUC__
261 # define YYUSE(E) ((void) (E))
266 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
268 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
269 _Pragma ("GCC diagnostic push") \
270 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
271 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
272 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
273 _Pragma ("GCC diagnostic pop")
275 # define YY_INITIAL_VALUE(Value) Value
277 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
278 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
279 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
281 #ifndef YY_INITIAL_VALUE
282 # define YY_INITIAL_VALUE(Value)
286 #if ! defined yyoverflow || YYERROR_VERBOSE
290 # ifdef YYSTACK_USE_ALLOCA
291 # if YYSTACK_USE_ALLOCA
293 # define YYSTACK_ALLOC __builtin_alloca
294 # elif defined __BUILTIN_VA_ARG_INCR
297 # define YYSTACK_ALLOC __alloca
298 # elif defined _MSC_VER
300 # define alloca _alloca
302 # define YYSTACK_ALLOC alloca
303 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
306 # ifndef EXIT_SUCCESS
307 # define EXIT_SUCCESS 0
314 # ifdef YYSTACK_ALLOC
316 # define YYSTACK_FREE(Ptr) do { ; } while (0)
317 # ifndef YYSTACK_ALLOC_MAXIMUM
322 # define YYSTACK_ALLOC_MAXIMUM 4032
325 # define YYSTACK_ALLOC YYMALLOC
326 # define YYSTACK_FREE YYFREE
327 # ifndef YYSTACK_ALLOC_MAXIMUM
328 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
330 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
331 && ! ((defined YYMALLOC || defined malloc) \
332 && (defined YYFREE || defined free)))
334 # ifndef EXIT_SUCCESS
335 # define EXIT_SUCCESS 0
339 # define YYMALLOC malloc
340 # if ! defined malloc && ! defined EXIT_SUCCESS
341 void *malloc (YYSIZE_T);
346 # if ! defined free && ! defined EXIT_SUCCESS
354 #if (! defined yyoverflow \
355 && (! defined __cplusplus \
356 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
357 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
362 yytype_int16 yyss_alloc;
368 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
372 # define YYSTACK_BYTES(N) \
373 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
374 + 2 * YYSTACK_GAP_MAXIMUM)
376 # define YYCOPY_NEEDED 1
383 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
386 YYSIZE_T yynewbytes; \
387 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
388 Stack = &yyptr->Stack_alloc; \
389 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
390 yyptr += yynewbytes / sizeof (*yyptr); \
396 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
400 # if defined __GNUC__ && 1 < __GNUC__
401 # define YYCOPY(Dst, Src, Count) \
402 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
404 # define YYCOPY(Dst, Src, Count) \
408 for (yyi = 0; yyi < (Count); yyi++) \
409 (Dst)[yyi] = (Src)[yyi]; \
433 #define YYMAXUTOK 262
435 #define YYTRANSLATE(YYX) \
436 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
440 static const yytype_uint8 yytranslate[] =
442 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 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, 1, 2, 3, 4,
473 static const yytype_uint8 yyrline[] =
475 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
480 #if YYDEBUG || YYERROR_VERBOSE || 1
483 static const char *
const yytname[] =
485 "$end",
"error",
"$undefined",
"ERROR",
"NUMBER",
"LAYER",
"ALIGN",
486 "NAME",
"'+'",
"$accept",
"input",
"location",
"align",
"layer",
"mask",
494 static const yytype_uint16 yytoknum[] =
496 0, 256, 257, 258, 259, 260, 261, 262, 43
500 #define YYPACT_NINF -7
502 #define yypact_value_is_default(Yystate) \
503 (!!((Yystate) == (-7)))
505 #define YYTABLE_NINF -1
507 #define yytable_value_is_error(Yytable_value) \
512 static const yytype_int8 yypact[] =
514 -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
515 2, -7, 4, -7, 5, -7, -7
521 static const yytype_uint8 yydefact[] =
523 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
524 0, 8, 9, 10, 11, 12, 4
528 static const yytype_int8 yypgoto[] =
530 -7, 7, -7, -7, -7, -7, -7
534 static const yytype_int8 yydefgoto[] =
536 -1, 2, 3, 6, 10, 14, 16
542 static const yytype_uint8 yytable[] =
544 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
548 static const yytype_int8 yycheck[] =
550 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
556 static const yytype_uint8 yystos[] =
558 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
559 13, 8, 4, 4, 14, 4, 15
563 static const yytype_uint8 yyr1[] =
565 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
570 static const yytype_uint8 yyr2[] =
572 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
577 #define yyerrok (yyerrstatus = 0)
578 #define yyclearin (yychar = YYEMPTY)
582 #define YYACCEPT goto yyacceptlab
583 #define YYABORT goto yyabortlab
584 #define YYERROR goto yyerrorlab
587 #define YYRECOVERING() (!!yyerrstatus)
589 #define YYBACKUP(Token, Value) \
591 if (yychar == YYEMPTY) \
595 YYPOPSTACK (yylen); \
601 yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
608 #define YYERRCODE 256
615 #ifndef YYLLOC_DEFAULT
616 # define YYLLOC_DEFAULT(Current, Rhs, N) \
620 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
621 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
622 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
623 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
627 (Current).first_line = (Current).last_line = \
628 YYRHSLOC (Rhs, 0).last_line; \
629 (Current).first_column = (Current).last_column = \
630 YYRHSLOC (Rhs, 0).last_column; \
635 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
643 # define YYFPRINTF fprintf
646 # define YYDPRINTF(Args) \
657 #ifndef YY_LOCATION_PRINT
658 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
664 yy_location_print_ (FILE *yyo,
YYLTYPE const *
const yylocp)
667 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
668 if (0 <= yylocp->first_line)
670 res += YYFPRINTF (yyo,
"%d", yylocp->first_line);
671 if (0 <= yylocp->first_column)
672 res += YYFPRINTF (yyo,
".%d", yylocp->first_column);
674 if (0 <= yylocp->last_line)
676 if (yylocp->first_line < yylocp->last_line)
678 res += YYFPRINTF (yyo,
"-%d", yylocp->last_line);
680 res += YYFPRINTF (yyo,
".%d", end_col);
682 else if (0 <= end_col && yylocp->first_column < end_col)
683 res += YYFPRINTF (yyo,
"-%d", end_col);
688 # define YY_LOCATION_PRINT(File, Loc) \
689 yy_location_print_ (File, &(Loc))
692 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
697 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
701 YYFPRINTF (stderr, "%s ", Title); \
702 yy_symbol_print (stderr, \
703 Type, Value, Location, scanner); \
704 YYFPRINTF (stderr, "\n"); \
714 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
716 FILE *yyo = yyoutput;
723 if (yytype < YYNTOKENS)
724 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
735 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
737 YYFPRINTF (yyoutput,
"%s %s (",
738 yytype < YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
740 YY_LOCATION_PRINT (yyoutput, *yylocationp);
741 YYFPRINTF (yyoutput,
": ");
742 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
743 YYFPRINTF (yyoutput,
")");
752 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
754 YYFPRINTF (stderr,
"Stack now");
755 for (; yybottom <= yytop; yybottom++)
757 int yybot = *yybottom;
758 YYFPRINTF (stderr,
" %d", yybot);
760 YYFPRINTF (stderr,
"\n");
763 # define YY_STACK_PRINT(Bottom, Top) \
766 yy_stack_print ((Bottom), (Top)); \
775 yy_reduce_print (yytype_int16 *yyssp,
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
777 unsigned long int yylno = yyrline[yyrule];
778 int yynrhs = yyr2[yyrule];
780 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
783 for (yyi = 0; yyi < yynrhs; yyi++)
785 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
786 yy_symbol_print (stderr,
787 yystos[yyssp[yyi + 1 - yynrhs]],
788 &(yyvsp[(yyi + 1) - (yynrhs)])
789 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
790 YYFPRINTF (stderr,
"\n");
794 # define YY_REDUCE_PRINT(Rule) \
797 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner); \
804 # define YYDPRINTF(Args)
805 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
806 # define YY_STACK_PRINT(Bottom, Top)
807 # define YY_REDUCE_PRINT(Rule)
813 # define YYINITDEPTH 200
824 # define YYMAXDEPTH 10000
831 # if defined __GLIBC__ && defined _STRING_H
832 # define yystrlen strlen
836 yystrlen (
const char *yystr)
839 for (yylen = 0; yystr[yylen]; yylen++)
847 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
848 # define yystpcpy stpcpy
853 yystpcpy (
char *yydest,
const char *yysrc)
856 const char *yys = yysrc;
858 while ((*yyd++ = *yys++) !=
'\0')
875 yytnamerr (
char *yyres,
const char *yystr)
880 char const *yyp = yystr;
887 goto do_not_strip_quotes;
891 goto do_not_strip_quotes;
904 do_not_strip_quotes: ;
908 return yystrlen (yystr);
910 return yystpcpy (yyres, yystr) - yyres;
923 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
924 yytype_int16 *yyssp,
int yytoken)
926 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
927 YYSIZE_T yysize = yysize0;
928 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
930 const char *yyformat = YY_NULLPTR;
932 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
960 if (yytoken != YYEMPTY)
962 int yyn = yypact[*yyssp];
963 yyarg[yycount++] = yytname[yytoken];
964 if (!yypact_value_is_default (yyn))
969 int yyxbegin = yyn < 0 ? -yyn : 0;
971 int yychecklim = YYLAST - yyn + 1;
972 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
975 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
976 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
977 && !yytable_value_is_error (yytable[yyx + yyn]))
979 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
985 yyarg[yycount++] = yytname[yyx];
987 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
988 if (! (yysize <= yysize1
989 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
999 # define YYCASE_(N, S) \
1003 YYCASE_(0, YY_(
"syntax error"));
1004 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1005 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1006 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1007 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1008 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1013 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1014 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1019 if (*yymsg_alloc < yysize)
1021 *yymsg_alloc = 2 * yysize;
1022 if (! (yysize <= *yymsg_alloc
1023 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1024 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1034 while ((*yyp = *yyformat) !=
'\0')
1035 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1037 yyp += yytnamerr (yyp, yyarg[yyi++]);
1055 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1058 YYUSE (yylocationp);
1062 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1064 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1068 #line 39 "route/pktloc_syntax.y"
1069 { free(((*yyvaluep).s)); }
1070 #line 1071 "route/pktloc_syntax.c"
1077 YY_IGNORE_MAYBE_UNINITIALIZED_END
1088 yyparse (
void *scanner)
1097 YY_INITIAL_VALUE (
static YYSTYPE yyval_default;)
1098 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1102 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1106 YYLTYPE yylloc = yyloc_default;
1124 yytype_int16 yyssa[YYINITDEPTH];
1126 yytype_int16 *yyssp;
1141 YYSIZE_T yystacksize;
1155 char *yymsg = yymsgbuf;
1156 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1159 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1165 yyssp = yyss = yyssa;
1166 yyvsp = yyvs = yyvsa;
1167 yylsp = yyls = yylsa;
1168 yystacksize = YYINITDEPTH;
1170 YYDPRINTF ((stderr,
"Starting parse\n"));
1190 if (yyss + yystacksize - 1 <= yyssp)
1193 YYSIZE_T yysize = yyssp - yyss + 1;
1201 yytype_int16 *yyss1 = yyss;
1208 yyoverflow (YY_(
"memory exhausted"),
1209 &yyss1, yysize *
sizeof (*yyssp),
1210 &yyvs1, yysize *
sizeof (*yyvsp),
1211 &yyls1, yysize *
sizeof (*yylsp),
1219 # ifndef YYSTACK_RELOCATE
1220 goto yyexhaustedlab;
1223 if (YYMAXDEPTH <= yystacksize)
1224 goto yyexhaustedlab;
1226 if (YYMAXDEPTH < yystacksize)
1227 yystacksize = YYMAXDEPTH;
1230 yytype_int16 *yyss1 = yyss;
1232 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1234 goto yyexhaustedlab;
1235 YYSTACK_RELOCATE (yyss_alloc, yyss);
1236 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1237 YYSTACK_RELOCATE (yyls_alloc, yyls);
1238 # undef YYSTACK_RELOCATE
1240 YYSTACK_FREE (yyss1);
1245 yyssp = yyss + yysize - 1;
1246 yyvsp = yyvs + yysize - 1;
1247 yylsp = yyls + yysize - 1;
1249 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1250 (
unsigned long int) yystacksize));
1252 if (yyss + yystacksize - 1 <= yyssp)
1256 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1258 if (yystate == YYFINAL)
1272 yyn = yypact[yystate];
1273 if (yypact_value_is_default (yyn))
1279 if (yychar == YYEMPTY)
1281 YYDPRINTF ((stderr,
"Reading a token: "));
1282 yychar = yylex (&yylval, &yylloc, scanner);
1285 if (yychar <= YYEOF)
1287 yychar = yytoken = YYEOF;
1288 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1292 yytoken = YYTRANSLATE (yychar);
1293 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1299 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1304 if (yytable_value_is_error (yyn))
1316 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1322 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1324 YY_IGNORE_MAYBE_UNINITIALIZED_END
1333 yyn = yydefact[yystate];
1354 yyval = yyvsp[1-yylen];
1357 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1358 YY_REDUCE_PRINT (yyn);
1362 #line 52 "route/pktloc_syntax.y"
1367 NL_DBG(1,
"Allocating a packet location "
1368 "object failed.\n");
1372 loc->name = (yyvsp[-5].s);
1373 loc->align = (yyvsp[-4].i);
1374 loc->layer = (yyvsp[-3].i);
1375 loc->offset = (yyvsp[-2].i);
1376 loc->mask = (yyvsp[-1].i);
1377 loc->shift = (yyvsp[0].i);
1380 NL_DBG(1,
"Duplicate packet location entry "
1381 "\"%s\"\n", (yyvsp[-5].s));
1386 #line 1387 "route/pktloc_syntax.c"
1390 #line 79 "route/pktloc_syntax.y"
1391 { (yyval.i) = (yyvsp[0].i); }
1392 #line 1393 "route/pktloc_syntax.c"
1396 #line 81 "route/pktloc_syntax.y"
1397 { (yyval.i) = (yyvsp[0].i); }
1398 #line 1399 "route/pktloc_syntax.c"
1402 #line 86 "route/pktloc_syntax.y"
1403 { (yyval.i) = TCF_LAYER_NETWORK; }
1404 #line 1405 "route/pktloc_syntax.c"
1408 #line 88 "route/pktloc_syntax.y"
1409 { (yyval.i) = (yyvsp[-1].i); }
1410 #line 1411 "route/pktloc_syntax.c"
1414 #line 93 "route/pktloc_syntax.y"
1416 #line 1417 "route/pktloc_syntax.c"
1420 #line 95 "route/pktloc_syntax.y"
1421 { (yyval.i) = (yyvsp[0].i); }
1422 #line 1423 "route/pktloc_syntax.c"
1426 #line 100 "route/pktloc_syntax.y"
1428 #line 1429 "route/pktloc_syntax.c"
1432 #line 102 "route/pktloc_syntax.y"
1433 { (yyval.i) = (yyvsp[0].i); }
1434 #line 1435 "route/pktloc_syntax.c"
1438 #line 1439 "route/pktloc_syntax.c"
1452 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1456 YY_STACK_PRINT (yyss, yyssp);
1467 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1468 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1469 yystate = yytable[yystate];
1471 yystate = yydefgoto[yyn - YYNTOKENS];
1482 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1488 #if ! YYERROR_VERBOSE
1489 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1491 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1494 char const *yymsgp = YY_(
"syntax error");
1495 int yysyntax_error_status;
1496 yysyntax_error_status = YYSYNTAX_ERROR;
1497 if (yysyntax_error_status == 0)
1499 else if (yysyntax_error_status == 1)
1501 if (yymsg != yymsgbuf)
1502 YYSTACK_FREE (yymsg);
1503 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1507 yymsg_alloc =
sizeof yymsgbuf;
1508 yysyntax_error_status = 2;
1512 yysyntax_error_status = YYSYNTAX_ERROR;
1516 yyerror (&yylloc, scanner, yymsgp);
1517 if (yysyntax_error_status == 2)
1518 goto yyexhaustedlab;
1520 # undef YYSYNTAX_ERROR
1524 yyerror_range[1] = yylloc;
1526 if (yyerrstatus == 3)
1531 if (yychar <= YYEOF)
1534 if (yychar == YYEOF)
1539 yydestruct (
"Error: discarding",
1540 yytoken, &yylval, &yylloc, scanner);
1561 yyerror_range[1] = yylsp[1-yylen];
1566 YY_STACK_PRINT (yyss, yyssp);
1579 yyn = yypact[yystate];
1580 if (!yypact_value_is_default (yyn))
1583 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1595 yyerror_range[1] = *yylsp;
1596 yydestruct (
"Error: popping",
1597 yystos[yystate], yyvsp, yylsp, scanner);
1600 YY_STACK_PRINT (yyss, yyssp);
1603 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1605 YY_IGNORE_MAYBE_UNINITIALIZED_END
1607 yyerror_range[2] = yylloc;
1610 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1614 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1634 #if !defined yyoverflow || YYERROR_VERBOSE
1639 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1645 if (yychar != YYEMPTY)
1649 yytoken = YYTRANSLATE (yychar);
1650 yydestruct (
"Cleanup: discarding lookahead",
1651 yytoken, &yylval, &yylloc, scanner);
1656 YY_STACK_PRINT (yyss, yyssp);
1657 while (yyssp != yyss)
1659 yydestruct (
"Cleanup: popping",
1660 yystos[*yyssp], yyvsp, yylsp, scanner);
1665 YYSTACK_FREE (yyss);
1668 if (yymsg != yymsgbuf)
1669 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.