47 #define YYBISON_VERSION "2.7"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse pktloc_parse
64 #define yylex pktloc_lex
65 #define yyerror pktloc_error
66 #define yylval pktloc_lval
67 #define yychar pktloc_char
68 #define yydebug pktloc_debug
69 #define yynerrs pktloc_nerrs
70 #define yylloc pktloc_lloc
74 #line 1 "route/pktloc_syntax.y"
76 #include <netlink-private/netlink.h>
77 #include <netlink-private/tc.h>
78 #include <netlink/netlink.h>
79 #include <netlink/utils.h>
80 #include <netlink/route/pktloc.h>
83 #line 84 "route/pktloc_syntax.c"
86 # if defined __cplusplus && 201103L <= __cplusplus
87 # define YY_NULL nullptr
94 #ifdef YYERROR_VERBOSE
95 # undef YYERROR_VERBOSE
96 # define YYERROR_VERBOSE 1
98 # define YYERROR_VERBOSE 1
103 #ifndef YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED
104 # define YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED
110 extern int pktloc_debug;
135 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
139 #line 18 "route/pktloc_syntax.y"
147 #line 148 "route/pktloc_syntax.c"
149 # define YYSTYPE_IS_TRIVIAL 1
150 # define yystype YYSTYPE
151 # define YYSTYPE_IS_DECLARED 1
154 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
162 # define yyltype YYLTYPE
163 # define YYLTYPE_IS_DECLARED 1
164 # define YYLTYPE_IS_TRIVIAL 1
169 #if defined __STDC__ || defined __cplusplus
170 int pktloc_parse (
void *YYPARSE_PARAM);
175 #if defined __STDC__ || defined __cplusplus
176 int pktloc_parse (
void *scanner);
186 #line 24 "route/pktloc_syntax.y"
190 static void yyerror(
YYLTYPE *locp,
void *scanner,
const char *msg)
192 NL_DBG(1,
"Error while parsing packet location file: %s\n", msg);
196 #line 197 "route/pktloc_syntax.c"
203 typedef YYTYPE_UINT8 yytype_uint8;
205 typedef unsigned char yytype_uint8;
209 typedef YYTYPE_INT8 yytype_int8;
210 #elif (defined __STDC__ || defined __C99__FUNC__ \
211 || defined __cplusplus || defined _MSC_VER)
212 typedef signed char yytype_int8;
214 typedef short int yytype_int8;
218 typedef YYTYPE_UINT16 yytype_uint16;
220 typedef unsigned short int yytype_uint16;
224 typedef YYTYPE_INT16 yytype_int16;
226 typedef short int yytype_int16;
230 # ifdef __SIZE_TYPE__
231 # define YYSIZE_T __SIZE_TYPE__
232 # elif defined size_t
233 # define YYSIZE_T size_t
234 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
235 || defined __cplusplus || defined _MSC_VER)
237 # define YYSIZE_T size_t
239 # define YYSIZE_T unsigned int
243 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
246 # if defined YYENABLE_NLS && YYENABLE_NLS
248 # include <libintl.h>
249 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
253 # define YY_(Msgid) Msgid
258 #if ! defined lint || defined __GNUC__
259 # define YYUSE(E) ((void) (E))
268 #if (defined __STDC__ || defined __C99__FUNC__ \
269 || defined __cplusplus || defined _MSC_VER)
282 #if ! defined yyoverflow || YYERROR_VERBOSE
286 # ifdef YYSTACK_USE_ALLOCA
287 # if YYSTACK_USE_ALLOCA
289 # define YYSTACK_ALLOC __builtin_alloca
290 # elif defined __BUILTIN_VA_ARG_INCR
293 # define YYSTACK_ALLOC __alloca
294 # elif defined _MSC_VER
296 # define alloca _alloca
298 # define YYSTACK_ALLOC alloca
299 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
300 || defined __cplusplus || defined _MSC_VER)
303 # ifndef EXIT_SUCCESS
304 # define EXIT_SUCCESS 0
311 # ifdef YYSTACK_ALLOC
313 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
314 # ifndef YYSTACK_ALLOC_MAXIMUM
319 # define YYSTACK_ALLOC_MAXIMUM 4032
322 # define YYSTACK_ALLOC YYMALLOC
323 # define YYSTACK_FREE YYFREE
324 # ifndef YYSTACK_ALLOC_MAXIMUM
325 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
327 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
328 && ! ((defined YYMALLOC || defined malloc) \
329 && (defined YYFREE || defined free)))
331 # ifndef EXIT_SUCCESS
332 # define EXIT_SUCCESS 0
336 # define YYMALLOC malloc
337 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
338 || defined __cplusplus || defined _MSC_VER)
339 void *malloc (YYSIZE_T);
344 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
345 || defined __cplusplus || defined _MSC_VER)
353 #if (! defined yyoverflow \
354 && (! defined __cplusplus \
355 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
356 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
361 yytype_int16 yyss_alloc;
367 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
371 # define YYSTACK_BYTES(N) \
372 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
373 + 2 * YYSTACK_GAP_MAXIMUM)
375 # define YYCOPY_NEEDED 1
382 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
385 YYSIZE_T yynewbytes; \
386 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
387 Stack = &yyptr->Stack_alloc; \
388 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
389 yyptr += yynewbytes / sizeof (*yyptr); \
395 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
399 # if defined __GNUC__ && 1 < __GNUC__
400 # define YYCOPY(Dst, Src, Count) \
401 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
403 # define YYCOPY(Dst, Src, Count) \
407 for (yyi = 0; yyi < (Count); yyi++) \
408 (Dst)[yyi] = (Src)[yyi]; \
431 #define YYMAXUTOK 262
433 #define YYTRANSLATE(YYX) \
434 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
437 static const yytype_uint8 yytranslate[] =
439 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 8, 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, 2, 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, 1, 2, 3, 4,
471 static const yytype_uint8 yyprhs[] =
473 0, 0, 3, 4, 7, 14, 16, 18, 19, 22,
478 static const yytype_int8 yyrhs[] =
480 10, 0, -1, -1, 11, 10, -1, 7, 12, 13,
481 4, 14, 15, -1, 6, -1, 4, -1, -1, 5,
482 8, -1, -1, 4, -1, -1, 4, -1
486 static const yytype_uint8 yyrline[] =
488 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
493 #if YYDEBUG || YYERROR_VERBOSE || 1
496 static const char *
const yytname[] =
498 "$end",
"error",
"$undefined",
"ERROR",
"NUMBER",
"LAYER",
"ALIGN",
499 "NAME",
"'+'",
"$accept",
"input",
"location",
"align",
"layer",
"mask",
507 static const yytype_uint16 yytoknum[] =
509 0, 256, 257, 258, 259, 260, 261, 262, 43
514 static const yytype_uint8 yyr1[] =
516 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
521 static const yytype_uint8 yyr2[] =
523 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
530 static const yytype_uint8 yydefact[] =
532 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
533 0, 8, 9, 10, 11, 12, 4
537 static const yytype_int8 yydefgoto[] =
539 -1, 2, 3, 6, 10, 14, 16
544 #define YYPACT_NINF -7
545 static const yytype_int8 yypact[] =
547 -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
548 2, -7, 4, -7, 5, -7, -7
552 static const yytype_int8 yypgoto[] =
554 -7, 7, -7, -7, -7, -7, -7
560 #define YYTABLE_NINF -1
561 static const yytype_uint8 yytable[] =
563 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
567 #define yypact_value_is_default(Yystate) \
568 (!!((Yystate) == (-7)))
570 #define yytable_value_is_error(Yytable_value) \
573 static const yytype_int8 yycheck[] =
575 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
581 static const yytype_uint8 yystos[] =
583 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
584 13, 8, 4, 4, 14, 4, 15
587 #define yyerrok (yyerrstatus = 0)
588 #define yyclearin (yychar = YYEMPTY)
592 #define YYACCEPT goto yyacceptlab
593 #define YYABORT goto yyabortlab
594 #define YYERROR goto yyerrorlab
604 #define YYFAIL goto yyerrlab
612 #define YYRECOVERING() (!!yyerrstatus)
614 #define YYBACKUP(Token, Value) \
616 if (yychar == YYEMPTY) \
620 YYPOPSTACK (yylen); \
626 yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
633 #define YYERRCODE 256
640 #ifndef YYLLOC_DEFAULT
641 # define YYLLOC_DEFAULT(Current, Rhs, N) \
645 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
646 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
647 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
648 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
652 (Current).first_line = (Current).last_line = \
653 YYRHSLOC (Rhs, 0).last_line; \
654 (Current).first_column = (Current).last_column = \
655 YYRHSLOC (Rhs, 0).last_column; \
660 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
667 #ifndef YY_LOCATION_PRINT
668 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
672 __attribute__((__unused__))
673 #if (defined __STDC__ || defined __C99__FUNC__ \
674 || defined __cplusplus || defined _MSC_VER)
676 yy_location_print_ (FILE *yyo,
YYLTYPE const *
const yylocp)
679 yy_location_print_ (yyo, yylocp)
685 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
686 if (0 <= yylocp->first_line)
688 res += fprintf (yyo,
"%d", yylocp->first_line);
689 if (0 <= yylocp->first_column)
690 res += fprintf (yyo,
".%d", yylocp->first_column);
692 if (0 <= yylocp->last_line)
694 if (yylocp->first_line < yylocp->last_line)
696 res += fprintf (yyo,
"-%d", yylocp->last_line);
698 res += fprintf (yyo,
".%d", end_col);
700 else if (0 <= end_col && yylocp->first_column < end_col)
701 res += fprintf (yyo,
"-%d", end_col);
706 # define YY_LOCATION_PRINT(File, Loc) \
707 yy_location_print_ (File, &(Loc))
710 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
717 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
719 # define YYLEX yylex (&yylval, &yylloc, scanner)
727 # define YYFPRINTF fprintf
730 # define YYDPRINTF(Args) \
736 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
740 YYFPRINTF (stderr, "%s ", Title); \
741 yy_symbol_print (stderr, \
742 Type, Value, Location, scanner); \
743 YYFPRINTF (stderr, "\n"); \
753 #if (defined __STDC__ || defined __C99__FUNC__ \
754 || defined __cplusplus || defined _MSC_VER)
756 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
759 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
762 YYSTYPE const * const yyvaluep;
763 YYLTYPE const * const yylocationp;
767 FILE *yyo = yyoutput;
774 if (yytype < YYNTOKENS)
775 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
791 #if (defined __STDC__ || defined __C99__FUNC__ \
792 || defined __cplusplus || defined _MSC_VER)
794 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
797 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
800 YYSTYPE const * const yyvaluep;
801 YYLTYPE const * const yylocationp;
805 if (yytype < YYNTOKENS)
806 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
808 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
810 YY_LOCATION_PRINT (yyoutput, *yylocationp);
811 YYFPRINTF (yyoutput,
": ");
812 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
813 YYFPRINTF (yyoutput,
")");
821 #if (defined __STDC__ || defined __C99__FUNC__ \
822 || defined __cplusplus || defined _MSC_VER)
824 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
827 yy_stack_print (yybottom, yytop)
828 yytype_int16 *yybottom;
832 YYFPRINTF (stderr,
"Stack now");
833 for (; yybottom <= yytop; yybottom++)
835 int yybot = *yybottom;
836 YYFPRINTF (stderr,
" %d", yybot);
838 YYFPRINTF (stderr,
"\n");
841 # define YY_STACK_PRINT(Bottom, Top) \
844 yy_stack_print ((Bottom), (Top)); \
852 #if (defined __STDC__ || defined __C99__FUNC__ \
853 || defined __cplusplus || defined _MSC_VER)
855 yy_reduce_print (
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
858 yy_reduce_print (yyvsp, yylsp, yyrule, scanner)
865 int yynrhs = yyr2[yyrule];
867 unsigned long int yylno = yyrline[yyrule];
868 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
871 for (yyi = 0; yyi < yynrhs; yyi++)
873 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
874 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
875 &(yyvsp[(yyi + 1) - (yynrhs)])
876 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
877 YYFPRINTF (stderr,
"\n");
881 # define YY_REDUCE_PRINT(Rule) \
884 yy_reduce_print (yyvsp, yylsp, Rule, scanner); \
891 # define YYDPRINTF(Args)
892 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
893 # define YY_STACK_PRINT(Bottom, Top)
894 # define YY_REDUCE_PRINT(Rule)
900 # define YYINITDEPTH 200
911 # define YYMAXDEPTH 10000
918 # if defined __GLIBC__ && defined _STRING_H
919 # define yystrlen strlen
922 #if (defined __STDC__ || defined __C99__FUNC__ \
923 || defined __cplusplus || defined _MSC_VER)
925 yystrlen (
const char *yystr)
933 for (yylen = 0; yystr[yylen]; yylen++)
941 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
942 # define yystpcpy stpcpy
946 #if (defined __STDC__ || defined __C99__FUNC__ \
947 || defined __cplusplus || defined _MSC_VER)
949 yystpcpy (
char *yydest,
const char *yysrc)
952 yystpcpy (yydest, yysrc)
958 const char *yys = yysrc;
960 while ((*yyd++ = *yys++) !=
'\0')
977 yytnamerr (
char *yyres,
const char *yystr)
982 char const *yyp = yystr;
989 goto do_not_strip_quotes;
993 goto do_not_strip_quotes;
1006 do_not_strip_quotes: ;
1010 return yystrlen (yystr);
1012 return yystpcpy (yyres, yystr) - yyres;
1025 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
1026 yytype_int16 *yyssp,
int yytoken)
1028 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1029 YYSIZE_T yysize = yysize0;
1030 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1032 const char *yyformat = YY_NULL;
1034 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1066 if (yytoken != YYEMPTY)
1068 int yyn = yypact[*yyssp];
1069 yyarg[yycount++] = yytname[yytoken];
1070 if (!yypact_value_is_default (yyn))
1075 int yyxbegin = yyn < 0 ? -yyn : 0;
1077 int yychecklim = YYLAST - yyn + 1;
1078 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1081 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1082 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1083 && !yytable_value_is_error (yytable[yyx + yyn]))
1085 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1091 yyarg[yycount++] = yytname[yyx];
1093 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1094 if (! (yysize <= yysize1
1095 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1105 # define YYCASE_(N, S) \
1109 YYCASE_(0, YY_(
"syntax error"));
1110 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1111 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1112 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1113 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1114 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1119 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1120 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1125 if (*yymsg_alloc < yysize)
1127 *yymsg_alloc = 2 * yysize;
1128 if (! (yysize <= *yymsg_alloc
1129 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1130 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1140 while ((*yyp = *yyformat) !=
'\0')
1141 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1143 yyp += yytnamerr (yyp, yyarg[yyi++]);
1161 #if (defined __STDC__ || defined __C99__FUNC__ \
1162 || defined __cplusplus || defined _MSC_VER)
1164 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1167 yydestruct (yymsg, yytype, yyvaluep, yylocationp, scanner)
1176 YYUSE (yylocationp);
1181 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1187 #line 39 "route/pktloc_syntax.y"
1188 { free(((*yyvaluep).s)); };
1190 #line 1191 "route/pktloc_syntax.c"
1205 #ifdef YYPARSE_PARAM
1206 #if (defined __STDC__ || defined __C99__FUNC__ \
1207 || defined __cplusplus || defined _MSC_VER)
1209 yyparse (
void *YYPARSE_PARAM)
1212 yyparse (YYPARSE_PARAM)
1213 void *YYPARSE_PARAM;
1216 #if (defined __STDC__ || defined __C99__FUNC__ \
1217 || defined __cplusplus || defined _MSC_VER)
1219 yyparse (
void *scanner)
1231 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1233 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1234 _Pragma ("GCC diagnostic push") \
1235 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1236 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1237 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1238 _Pragma ("GCC diagnostic pop")
1243 # define YY_INITIAL_VALUE(Value) = Value
1246 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1250 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1251 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1252 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1254 #ifndef YY_INITIAL_VALUE
1255 # define YY_INITIAL_VALUE(Value)
1259 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1262 YYLTYPE yylloc = yyloc_default;
1281 yytype_int16 yyssa[YYINITDEPTH];
1283 yytype_int16 *yyssp;
1298 YYSIZE_T yystacksize;
1312 char *yymsg = yymsgbuf;
1313 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1316 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1322 yyssp = yyss = yyssa;
1323 yyvsp = yyvs = yyvsa;
1324 yylsp = yyls = yylsa;
1325 yystacksize = YYINITDEPTH;
1327 YYDPRINTF ((stderr,
"Starting parse\n"));
1347 if (yyss + yystacksize - 1 <= yyssp)
1350 YYSIZE_T yysize = yyssp - yyss + 1;
1358 yytype_int16 *yyss1 = yyss;
1365 yyoverflow (YY_(
"memory exhausted"),
1366 &yyss1, yysize *
sizeof (*yyssp),
1367 &yyvs1, yysize *
sizeof (*yyvsp),
1368 &yyls1, yysize *
sizeof (*yylsp),
1376 # ifndef YYSTACK_RELOCATE
1377 goto yyexhaustedlab;
1380 if (YYMAXDEPTH <= yystacksize)
1381 goto yyexhaustedlab;
1383 if (YYMAXDEPTH < yystacksize)
1384 yystacksize = YYMAXDEPTH;
1387 yytype_int16 *yyss1 = yyss;
1389 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1391 goto yyexhaustedlab;
1392 YYSTACK_RELOCATE (yyss_alloc, yyss);
1393 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1394 YYSTACK_RELOCATE (yyls_alloc, yyls);
1395 # undef YYSTACK_RELOCATE
1397 YYSTACK_FREE (yyss1);
1402 yyssp = yyss + yysize - 1;
1403 yyvsp = yyvs + yysize - 1;
1404 yylsp = yyls + yysize - 1;
1406 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1407 (
unsigned long int) yystacksize));
1409 if (yyss + yystacksize - 1 <= yyssp)
1413 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1415 if (yystate == YYFINAL)
1429 yyn = yypact[yystate];
1430 if (yypact_value_is_default (yyn))
1436 if (yychar == YYEMPTY)
1438 YYDPRINTF ((stderr,
"Reading a token: "));
1442 if (yychar <= YYEOF)
1444 yychar = yytoken = YYEOF;
1445 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1449 yytoken = YYTRANSLATE (yychar);
1450 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1456 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1461 if (yytable_value_is_error (yyn))
1473 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1479 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1481 YY_IGNORE_MAYBE_UNINITIALIZED_END
1490 yyn = yydefact[yystate];
1511 yyval = yyvsp[1-yylen];
1514 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1515 YY_REDUCE_PRINT (yyn);
1520 #line 52 "route/pktloc_syntax.y"
1525 NL_DBG(1,
"Allocating a packet location "
1526 "object failed.\n");
1530 loc->name = (yyvsp[(1) - (6)].s);
1531 loc->align = (yyvsp[(2) - (6)].i);
1532 loc->layer = (yyvsp[(3) - (6)].i);
1533 loc->offset = (yyvsp[(4) - (6)].i);
1534 loc->mask = (yyvsp[(5) - (6)].i);
1535 loc->shift = (yyvsp[(6) - (6)].i);
1538 NL_DBG(1,
"Duplicate packet location entry "
1539 "\"%s\"\n", (yyvsp[(1) - (6)].s));
1548 #line 79 "route/pktloc_syntax.y"
1549 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1554 #line 81 "route/pktloc_syntax.y"
1555 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1560 #line 86 "route/pktloc_syntax.y"
1561 { (yyval.i) = TCF_LAYER_NETWORK; }
1566 #line 88 "route/pktloc_syntax.y"
1567 { (yyval.i) = (yyvsp[(1) - (2)].i); }
1572 #line 93 "route/pktloc_syntax.y"
1578 #line 95 "route/pktloc_syntax.y"
1579 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1584 #line 100 "route/pktloc_syntax.y"
1590 #line 102 "route/pktloc_syntax.y"
1591 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1596 #line 1597 "route/pktloc_syntax.c"
1610 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1614 YY_STACK_PRINT (yyss, yyssp);
1625 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1626 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1627 yystate = yytable[yystate];
1629 yystate = yydefgoto[yyn - YYNTOKENS];
1640 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1646 #if ! YYERROR_VERBOSE
1647 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1649 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1652 char const *yymsgp = YY_(
"syntax error");
1653 int yysyntax_error_status;
1654 yysyntax_error_status = YYSYNTAX_ERROR;
1655 if (yysyntax_error_status == 0)
1657 else if (yysyntax_error_status == 1)
1659 if (yymsg != yymsgbuf)
1660 YYSTACK_FREE (yymsg);
1661 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1665 yymsg_alloc =
sizeof yymsgbuf;
1666 yysyntax_error_status = 2;
1670 yysyntax_error_status = YYSYNTAX_ERROR;
1674 yyerror (&yylloc, scanner, yymsgp);
1675 if (yysyntax_error_status == 2)
1676 goto yyexhaustedlab;
1678 # undef YYSYNTAX_ERROR
1682 yyerror_range[1] = yylloc;
1684 if (yyerrstatus == 3)
1689 if (yychar <= YYEOF)
1692 if (yychar == YYEOF)
1697 yydestruct (
"Error: discarding",
1698 yytoken, &yylval, &yylloc, scanner);
1719 yyerror_range[1] = yylsp[1-yylen];
1724 YY_STACK_PRINT (yyss, yyssp);
1737 yyn = yypact[yystate];
1738 if (!yypact_value_is_default (yyn))
1741 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1753 yyerror_range[1] = *yylsp;
1754 yydestruct (
"Error: popping",
1755 yystos[yystate], yyvsp, yylsp, scanner);
1758 YY_STACK_PRINT (yyss, yyssp);
1761 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1763 YY_IGNORE_MAYBE_UNINITIALIZED_END
1765 yyerror_range[2] = yylloc;
1768 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1772 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1792 #if !defined yyoverflow || YYERROR_VERBOSE
1797 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1803 if (yychar != YYEMPTY)
1807 yytoken = YYTRANSLATE (yychar);
1808 yydestruct (
"Cleanup: discarding lookahead",
1809 yytoken, &yylval, &yylloc, scanner);
1814 YY_STACK_PRINT (yyss, yyssp);
1815 while (yyssp != yyss)
1817 yydestruct (
"Cleanup: popping",
1818 yystos[*yyssp], yyvsp, yylsp, scanner);
1823 YYSTACK_FREE (yyss);
1826 if (yymsg != yymsgbuf)
1827 YYSTACK_FREE (yymsg);
1830 return YYID (yyresult);
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.