47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYLSP_NEEDED 1
65 #define yyparse pktloc_parse
66 #define yylex pktloc_lex
67 #define yyerror pktloc_error
68 #define yylval pktloc_lval
69 #define yychar pktloc_char
70 #define yydebug pktloc_debug
71 #define yynerrs pktloc_nerrs
72 #define yylloc pktloc_lloc
77 #line 1 "route/pktloc_syntax.y"
79 #include <netlink-local.h>
80 #include <netlink-tc.h>
81 #include <netlink/netlink.h>
82 #include <netlink/utils.h>
83 #include <netlink/route/pktloc.h>
87 #line 88 "route/pktloc_syntax.c"
95 #ifdef YYERROR_VERBOSE
96 # undef YYERROR_VERBOSE
97 # define YYERROR_VERBOSE 1
99 # define YYERROR_VERBOSE 1
103 #ifndef YYTOKEN_TABLE
104 # define YYTOKEN_TABLE 0
131 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
136 #line 18 "route/pktloc_syntax.y"
145 #line 146 "route/pktloc_syntax.c"
147 # define YYSTYPE_IS_TRIVIAL 1
148 # define yystype YYSTYPE
149 # define YYSTYPE_IS_DECLARED 1
152 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
160 # define yyltype YYLTYPE
161 # define YYLTYPE_IS_DECLARED 1
162 # define YYLTYPE_IS_TRIVIAL 1
169 #line 24 "route/pktloc_syntax.y"
173 static void yyerror(
YYLTYPE *locp,
void *scanner,
const char *msg)
175 NL_DBG(1,
"Error while parsing packet location file: %s\n", msg);
180 #line 181 "route/pktloc_syntax.c"
187 typedef YYTYPE_UINT8 yytype_uint8;
189 typedef unsigned char yytype_uint8;
193 typedef YYTYPE_INT8 yytype_int8;
194 #elif (defined __STDC__ || defined __C99__FUNC__ \
195 || defined __cplusplus || defined _MSC_VER)
196 typedef signed char yytype_int8;
198 typedef short int yytype_int8;
202 typedef YYTYPE_UINT16 yytype_uint16;
204 typedef unsigned short int yytype_uint16;
208 typedef YYTYPE_INT16 yytype_int16;
210 typedef short int yytype_int16;
214 # ifdef __SIZE_TYPE__
215 # define YYSIZE_T __SIZE_TYPE__
216 # elif defined size_t
217 # define YYSIZE_T size_t
218 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
219 || defined __cplusplus || defined _MSC_VER)
221 # define YYSIZE_T size_t
223 # define YYSIZE_T unsigned int
227 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
230 # if defined YYENABLE_NLS && YYENABLE_NLS
232 # include <libintl.h>
233 # define YY_(msgid) dgettext ("bison-runtime", msgid)
237 # define YY_(msgid) msgid
242 #if ! defined lint || defined __GNUC__
243 # define YYUSE(e) ((void) (e))
252 #if (defined __STDC__ || defined __C99__FUNC__ \
253 || defined __cplusplus || defined _MSC_VER)
266 #if ! defined yyoverflow || YYERROR_VERBOSE
270 # ifdef YYSTACK_USE_ALLOCA
271 # if YYSTACK_USE_ALLOCA
273 # define YYSTACK_ALLOC __builtin_alloca
274 # elif defined __BUILTIN_VA_ARG_INCR
277 # define YYSTACK_ALLOC __alloca
278 # elif defined _MSC_VER
280 # define alloca _alloca
282 # define YYSTACK_ALLOC alloca
283 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
284 || defined __cplusplus || defined _MSC_VER)
286 # ifndef EXIT_SUCCESS
287 # define EXIT_SUCCESS 0
294 # ifdef YYSTACK_ALLOC
296 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
297 # ifndef YYSTACK_ALLOC_MAXIMUM
302 # define YYSTACK_ALLOC_MAXIMUM 4032
305 # define YYSTACK_ALLOC YYMALLOC
306 # define YYSTACK_FREE YYFREE
307 # ifndef YYSTACK_ALLOC_MAXIMUM
308 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
310 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
311 && ! ((defined YYMALLOC || defined malloc) \
312 && (defined YYFREE || defined free)))
314 # ifndef EXIT_SUCCESS
315 # define EXIT_SUCCESS 0
319 # define YYMALLOC malloc
320 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
321 || defined __cplusplus || defined _MSC_VER)
322 void *malloc (YYSIZE_T);
327 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
328 || defined __cplusplus || defined _MSC_VER)
336 #if (! defined yyoverflow \
337 && (! defined __cplusplus \
338 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
339 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
344 yytype_int16 yyss_alloc;
350 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
354 # define YYSTACK_BYTES(N) \
355 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
356 + 2 * YYSTACK_GAP_MAXIMUM)
358 # define YYCOPY_NEEDED 1
365 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
368 YYSIZE_T yynewbytes; \
369 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
370 Stack = &yyptr->Stack_alloc; \
371 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
372 yyptr += yynewbytes / sizeof (*yyptr); \
378 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
382 # if defined __GNUC__ && 1 < __GNUC__
383 # define YYCOPY(To, From, Count) \
384 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
386 # define YYCOPY(To, From, Count) \
390 for (yyi = 0; yyi < (Count); yyi++) \
391 (To)[yyi] = (From)[yyi]; \
414 #define YYMAXUTOK 262
416 #define YYTRANSLATE(YYX) \
417 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
420 static const yytype_uint8 yytranslate[] =
422 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 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, 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, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
454 static const yytype_uint8 yyprhs[] =
456 0, 0, 3, 4, 7, 14, 16, 18, 19, 22,
461 static const yytype_int8 yyrhs[] =
463 10, 0, -1, -1, 11, 10, -1, 7, 12, 13,
464 4, 14, 15, -1, 6, -1, 4, -1, -1, 5,
465 8, -1, -1, 4, -1, -1, 4, -1
469 static const yytype_uint8 yyrline[] =
471 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
476 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
479 static const char *
const yytname[] =
481 "$end",
"error",
"$undefined",
"ERROR",
"NUMBER",
"LAYER",
"ALIGN",
482 "NAME",
"'+'",
"$accept",
"input",
"location",
"align",
"layer",
"mask",
490 static const yytype_uint16 yytoknum[] =
492 0, 256, 257, 258, 259, 260, 261, 262, 43
497 static const yytype_uint8 yyr1[] =
499 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
504 static const yytype_uint8 yyr2[] =
506 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
513 static const yytype_uint8 yydefact[] =
515 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
516 0, 8, 9, 10, 11, 12, 4
520 static const yytype_int8 yydefgoto[] =
522 -1, 2, 3, 6, 10, 14, 16
527 #define YYPACT_NINF -7
528 static const yytype_int8 yypact[] =
530 -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
531 2, -7, 4, -7, 5, -7, -7
535 static const yytype_int8 yypgoto[] =
537 -7, 7, -7, -7, -7, -7, -7
543 #define YYTABLE_NINF -1
544 static const yytype_uint8 yytable[] =
546 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
550 #define yypact_value_is_default(yystate) \
553 #define yytable_value_is_error(yytable_value) \
556 static const yytype_int8 yycheck[] =
558 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
564 static const yytype_uint8 yystos[] =
566 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
567 13, 8, 4, 4, 14, 4, 15
570 #define yyerrok (yyerrstatus = 0)
571 #define yyclearin (yychar = YYEMPTY)
575 #define YYACCEPT goto yyacceptlab
576 #define YYABORT goto yyabortlab
577 #define YYERROR goto yyerrorlab
587 #define YYFAIL goto yyerrlab
595 #define YYRECOVERING() (!!yyerrstatus)
597 #define YYBACKUP(Token, Value) \
599 if (yychar == YYEMPTY && yylen == 1) \
608 yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
615 #define YYERRCODE 256
622 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
623 #ifndef YYLLOC_DEFAULT
624 # define YYLLOC_DEFAULT(Current, Rhs, N) \
628 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
629 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
630 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
631 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
635 (Current).first_line = (Current).last_line = \
636 YYRHSLOC (Rhs, 0).last_line; \
637 (Current).first_column = (Current).last_column = \
638 YYRHSLOC (Rhs, 0).last_column; \
648 #ifndef YY_LOCATION_PRINT
649 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
650 # define YY_LOCATION_PRINT(File, Loc) \
651 fprintf (File, "%d.%d-%d.%d", \
652 (Loc).first_line, (Loc).first_column, \
653 (Loc).last_line, (Loc).last_column)
655 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
663 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
665 # define YYLEX yylex (&yylval, &yylloc, scanner)
673 # define YYFPRINTF fprintf
676 # define YYDPRINTF(Args) \
682 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
686 YYFPRINTF (stderr, "%s ", Title); \
687 yy_symbol_print (stderr, \
688 Type, Value, Location, scanner); \
689 YYFPRINTF (stderr, "\n"); \
699 #if (defined __STDC__ || defined __C99__FUNC__ \
700 || defined __cplusplus || defined _MSC_VER)
702 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
705 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
708 YYSTYPE const * const yyvaluep;
709 YYLTYPE const * const yylocationp;
718 if (yytype < YYNTOKENS)
719 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
735 #if (defined __STDC__ || defined __C99__FUNC__ \
736 || defined __cplusplus || defined _MSC_VER)
738 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
741 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
744 YYSTYPE const * const yyvaluep;
745 YYLTYPE const * const yylocationp;
749 if (yytype < YYNTOKENS)
750 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
752 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
754 YY_LOCATION_PRINT (yyoutput, *yylocationp);
755 YYFPRINTF (yyoutput,
": ");
756 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
757 YYFPRINTF (yyoutput,
")");
765 #if (defined __STDC__ || defined __C99__FUNC__ \
766 || defined __cplusplus || defined _MSC_VER)
768 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
771 yy_stack_print (yybottom, yytop)
772 yytype_int16 *yybottom;
776 YYFPRINTF (stderr,
"Stack now");
777 for (; yybottom <= yytop; yybottom++)
779 int yybot = *yybottom;
780 YYFPRINTF (stderr,
" %d", yybot);
782 YYFPRINTF (stderr,
"\n");
785 # define YY_STACK_PRINT(Bottom, Top) \
788 yy_stack_print ((Bottom), (Top)); \
796 #if (defined __STDC__ || defined __C99__FUNC__ \
797 || defined __cplusplus || defined _MSC_VER)
799 yy_reduce_print (
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
802 yy_reduce_print (yyvsp, yylsp, yyrule, scanner)
809 int yynrhs = yyr2[yyrule];
811 unsigned long int yylno = yyrline[yyrule];
812 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
815 for (yyi = 0; yyi < yynrhs; yyi++)
817 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
818 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
819 &(yyvsp[(yyi + 1) - (yynrhs)])
820 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
821 YYFPRINTF (stderr,
"\n");
825 # define YY_REDUCE_PRINT(Rule) \
828 yy_reduce_print (yyvsp, yylsp, Rule, scanner); \
835 # define YYDPRINTF(Args)
836 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
837 # define YY_STACK_PRINT(Bottom, Top)
838 # define YY_REDUCE_PRINT(Rule)
844 # define YYINITDEPTH 200
855 # define YYMAXDEPTH 10000
862 # if defined __GLIBC__ && defined _STRING_H
863 # define yystrlen strlen
866 #if (defined __STDC__ || defined __C99__FUNC__ \
867 || defined __cplusplus || defined _MSC_VER)
869 yystrlen (
const char *yystr)
877 for (yylen = 0; yystr[yylen]; yylen++)
885 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
886 # define yystpcpy stpcpy
890 #if (defined __STDC__ || defined __C99__FUNC__ \
891 || defined __cplusplus || defined _MSC_VER)
893 yystpcpy (
char *yydest,
const char *yysrc)
896 yystpcpy (yydest, yysrc)
902 const char *yys = yysrc;
904 while ((*yyd++ = *yys++) !=
'\0')
921 yytnamerr (
char *yyres,
const char *yystr)
926 char const *yyp = yystr;
933 goto do_not_strip_quotes;
937 goto do_not_strip_quotes;
950 do_not_strip_quotes: ;
954 return yystrlen (yystr);
956 return yystpcpy (yyres, yystr) - yyres;
969 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
970 yytype_int16 *yyssp,
int yytoken)
972 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
973 YYSIZE_T yysize = yysize0;
975 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
977 const char *yyformat = 0;
979 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1011 if (yytoken != YYEMPTY)
1013 int yyn = yypact[*yyssp];
1014 yyarg[yycount++] = yytname[yytoken];
1015 if (!yypact_value_is_default (yyn))
1020 int yyxbegin = yyn < 0 ? -yyn : 0;
1022 int yychecklim = YYLAST - yyn + 1;
1023 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1026 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1027 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1028 && !yytable_value_is_error (yytable[yyx + yyn]))
1030 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1036 yyarg[yycount++] = yytname[yyx];
1037 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1038 if (! (yysize <= yysize1
1039 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1048 # define YYCASE_(N, S) \
1052 YYCASE_(0, YY_(
"syntax error"));
1053 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1054 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1055 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1056 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1057 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1061 yysize1 = yysize + yystrlen (yyformat);
1062 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1066 if (*yymsg_alloc < yysize)
1068 *yymsg_alloc = 2 * yysize;
1069 if (! (yysize <= *yymsg_alloc
1070 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1071 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1081 while ((*yyp = *yyformat) !=
'\0')
1082 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1084 yyp += yytnamerr (yyp, yyarg[yyi++]);
1102 #if (defined __STDC__ || defined __C99__FUNC__ \
1103 || defined __cplusplus || defined _MSC_VER)
1105 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1108 yydestruct (yymsg, yytype, yyvaluep, yylocationp, scanner)
1117 YYUSE (yylocationp);
1122 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1129 #line 39 "route/pktloc_syntax.y"
1130 { free((yyvaluep->s)); };
1133 #line 1134 "route/pktloc_syntax.c"
1143 #ifdef YYPARSE_PARAM
1144 #if defined __STDC__ || defined __cplusplus
1145 int yyparse (
void *YYPARSE_PARAM);
1150 #if defined __STDC__ || defined __cplusplus
1151 int yyparse (
void *scanner);
1162 #ifdef YYPARSE_PARAM
1163 #if (defined __STDC__ || defined __C99__FUNC__ \
1164 || defined __cplusplus || defined _MSC_VER)
1166 yyparse (
void *YYPARSE_PARAM)
1169 yyparse (YYPARSE_PARAM)
1170 void *YYPARSE_PARAM;
1173 #if (defined __STDC__ || defined __C99__FUNC__ \
1174 || defined __cplusplus || defined _MSC_VER)
1176 yyparse (
void *scanner)
1209 yytype_int16 yyssa[YYINITDEPTH];
1211 yytype_int16 *yyssp;
1226 YYSIZE_T yystacksize;
1240 char *yymsg = yymsgbuf;
1241 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1244 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1254 yystacksize = YYINITDEPTH;
1256 YYDPRINTF ((stderr,
"Starting parse\n"));
1271 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1273 yylloc.first_line = yylloc.last_line = 1;
1274 yylloc.first_column = yylloc.last_column = 1;
1290 if (yyss + yystacksize - 1 <= yyssp)
1293 YYSIZE_T yysize = yyssp - yyss + 1;
1301 yytype_int16 *yyss1 = yyss;
1308 yyoverflow (YY_(
"memory exhausted"),
1309 &yyss1, yysize *
sizeof (*yyssp),
1310 &yyvs1, yysize *
sizeof (*yyvsp),
1311 &yyls1, yysize *
sizeof (*yylsp),
1319 # ifndef YYSTACK_RELOCATE
1320 goto yyexhaustedlab;
1323 if (YYMAXDEPTH <= yystacksize)
1324 goto yyexhaustedlab;
1326 if (YYMAXDEPTH < yystacksize)
1327 yystacksize = YYMAXDEPTH;
1330 yytype_int16 *yyss1 = yyss;
1332 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1334 goto yyexhaustedlab;
1335 YYSTACK_RELOCATE (yyss_alloc, yyss);
1336 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1337 YYSTACK_RELOCATE (yyls_alloc, yyls);
1338 # undef YYSTACK_RELOCATE
1340 YYSTACK_FREE (yyss1);
1345 yyssp = yyss + yysize - 1;
1346 yyvsp = yyvs + yysize - 1;
1347 yylsp = yyls + yysize - 1;
1349 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1350 (
unsigned long int) yystacksize));
1352 if (yyss + yystacksize - 1 <= yyssp)
1356 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1358 if (yystate == YYFINAL)
1372 yyn = yypact[yystate];
1373 if (yypact_value_is_default (yyn))
1379 if (yychar == YYEMPTY)
1381 YYDPRINTF ((stderr,
"Reading a token: "));
1385 if (yychar <= YYEOF)
1387 yychar = yytoken = YYEOF;
1388 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1392 yytoken = YYTRANSLATE (yychar);
1393 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1399 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1404 if (yytable_value_is_error (yyn))
1416 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1431 yyn = yydefact[yystate];
1452 yyval = yyvsp[1-yylen];
1455 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1456 YY_REDUCE_PRINT (yyn);
1462 #line 52 "route/pktloc_syntax.y"
1467 NL_DBG(1,
"Allocating a packet location "
1468 "object failed.\n");
1472 loc->name = (yyvsp[(1) - (6)].s);
1473 loc->align = (yyvsp[(2) - (6)].i);
1474 loc->layer = (yyvsp[(3) - (6)].i);
1475 loc->offset = (yyvsp[(4) - (6)].i);
1476 loc->mask = (yyvsp[(5) - (6)].i);
1477 loc->shift = (yyvsp[(6) - (6)].i);
1480 NL_DBG(1,
"Duplicate packet location entry "
1481 "\"%s\"\n", (yyvsp[(1) - (6)].s));
1491 #line 79 "route/pktloc_syntax.y"
1492 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1498 #line 81 "route/pktloc_syntax.y"
1499 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1505 #line 86 "route/pktloc_syntax.y"
1506 { (yyval.i) = TCF_LAYER_NETWORK; }
1512 #line 88 "route/pktloc_syntax.y"
1513 { (yyval.i) = (yyvsp[(1) - (2)].i); }
1519 #line 93 "route/pktloc_syntax.y"
1526 #line 95 "route/pktloc_syntax.y"
1527 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1533 #line 100 "route/pktloc_syntax.y"
1540 #line 102 "route/pktloc_syntax.y"
1541 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1547 #line 1548 "route/pktloc_syntax.c"
1561 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1565 YY_STACK_PRINT (yyss, yyssp);
1576 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1577 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1578 yystate = yytable[yystate];
1580 yystate = yydefgoto[yyn - YYNTOKENS];
1591 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1597 #if ! YYERROR_VERBOSE
1598 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1600 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1603 char const *yymsgp = YY_(
"syntax error");
1604 int yysyntax_error_status;
1605 yysyntax_error_status = YYSYNTAX_ERROR;
1606 if (yysyntax_error_status == 0)
1608 else if (yysyntax_error_status == 1)
1610 if (yymsg != yymsgbuf)
1611 YYSTACK_FREE (yymsg);
1612 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1616 yymsg_alloc =
sizeof yymsgbuf;
1617 yysyntax_error_status = 2;
1621 yysyntax_error_status = YYSYNTAX_ERROR;
1625 yyerror (&yylloc, scanner, yymsgp);
1626 if (yysyntax_error_status == 2)
1627 goto yyexhaustedlab;
1629 # undef YYSYNTAX_ERROR
1633 yyerror_range[1] = yylloc;
1635 if (yyerrstatus == 3)
1640 if (yychar <= YYEOF)
1643 if (yychar == YYEOF)
1648 yydestruct (
"Error: discarding",
1649 yytoken, &yylval, &yylloc, scanner);
1670 yyerror_range[1] = yylsp[1-yylen];
1675 YY_STACK_PRINT (yyss, yyssp);
1688 yyn = yypact[yystate];
1689 if (!yypact_value_is_default (yyn))
1692 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1704 yyerror_range[1] = *yylsp;
1705 yydestruct (
"Error: popping",
1706 yystos[yystate], yyvsp, yylsp, scanner);
1709 YY_STACK_PRINT (yyss, yyssp);
1714 yyerror_range[2] = yylloc;
1717 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1721 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1741 #if !defined(yyoverflow) || YYERROR_VERBOSE
1746 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1752 if (yychar != YYEMPTY)
1756 yytoken = YYTRANSLATE (yychar);
1757 yydestruct (
"Cleanup: discarding lookahead",
1758 yytoken, &yylval, &yylloc, scanner);
1763 YY_STACK_PRINT (yyss, yyssp);
1764 while (yyssp != yyss)
1766 yydestruct (
"Cleanup: popping",
1767 yystos[*yyssp], yyvsp, yylsp, scanner);
1772 YYSTACK_FREE (yyss);
1775 if (yymsg != yymsgbuf)
1776 YYSTACK_FREE (yymsg);
1779 return YYID (yyresult);