47 #define YYBISON_VERSION "2.5.1"
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"
90 # if defined __cplusplus && 201103L <= __cplusplus
91 # define YY_NULL nullptr
103 #ifdef YYERROR_VERBOSE
104 # undef YYERROR_VERBOSE
105 # define YYERROR_VERBOSE 1
107 # define YYERROR_VERBOSE 1
111 #ifndef YYTOKEN_TABLE
112 # define YYTOKEN_TABLE 0
139 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
144 #line 18 "route/pktloc_syntax.y"
153 #line 154 "route/pktloc_syntax.c"
155 # define YYSTYPE_IS_TRIVIAL 1
156 # define yystype YYSTYPE
157 # define YYSTYPE_IS_DECLARED 1
160 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
168 # define yyltype YYLTYPE
169 # define YYLTYPE_IS_DECLARED 1
170 # define YYLTYPE_IS_TRIVIAL 1
177 #line 24 "route/pktloc_syntax.y"
181 static void yyerror(
YYLTYPE *locp,
void *scanner,
const char *msg)
183 NL_DBG(1,
"Error while parsing packet location file: %s\n", msg);
188 #line 189 "route/pktloc_syntax.c"
195 typedef YYTYPE_UINT8 yytype_uint8;
197 typedef unsigned char yytype_uint8;
201 typedef YYTYPE_INT8 yytype_int8;
202 #elif (defined __STDC__ || defined __C99__FUNC__ \
203 || defined __cplusplus || defined _MSC_VER)
204 typedef signed char yytype_int8;
206 typedef short int yytype_int8;
210 typedef YYTYPE_UINT16 yytype_uint16;
212 typedef unsigned short int yytype_uint16;
216 typedef YYTYPE_INT16 yytype_int16;
218 typedef short int yytype_int16;
222 # ifdef __SIZE_TYPE__
223 # define YYSIZE_T __SIZE_TYPE__
224 # elif defined size_t
225 # define YYSIZE_T size_t
226 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
227 || defined __cplusplus || defined _MSC_VER)
229 # define YYSIZE_T size_t
231 # define YYSIZE_T unsigned int
235 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
238 # if defined YYENABLE_NLS && YYENABLE_NLS
240 # include <libintl.h>
241 # define YY_(msgid) dgettext ("bison-runtime", msgid)
245 # define YY_(msgid) msgid
250 #if ! defined lint || defined __GNUC__
251 # define YYUSE(e) ((void) (e))
260 #if (defined __STDC__ || defined __C99__FUNC__ \
261 || defined __cplusplus || defined _MSC_VER)
274 #if ! defined yyoverflow || YYERROR_VERBOSE
278 # ifdef YYSTACK_USE_ALLOCA
279 # if YYSTACK_USE_ALLOCA
281 # define YYSTACK_ALLOC __builtin_alloca
282 # elif defined __BUILTIN_VA_ARG_INCR
285 # define YYSTACK_ALLOC __alloca
286 # elif defined _MSC_VER
288 # define alloca _alloca
290 # define YYSTACK_ALLOC alloca
291 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
292 || defined __cplusplus || defined _MSC_VER)
295 # ifndef EXIT_SUCCESS
296 # define EXIT_SUCCESS 0
303 # ifdef YYSTACK_ALLOC
305 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
306 # ifndef YYSTACK_ALLOC_MAXIMUM
311 # define YYSTACK_ALLOC_MAXIMUM 4032
314 # define YYSTACK_ALLOC YYMALLOC
315 # define YYSTACK_FREE YYFREE
316 # ifndef YYSTACK_ALLOC_MAXIMUM
317 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
319 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
320 && ! ((defined YYMALLOC || defined malloc) \
321 && (defined YYFREE || defined free)))
323 # ifndef EXIT_SUCCESS
324 # define EXIT_SUCCESS 0
328 # define YYMALLOC malloc
329 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
330 || defined __cplusplus || defined _MSC_VER)
331 void *malloc (YYSIZE_T);
336 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
337 || defined __cplusplus || defined _MSC_VER)
345 #if (! defined yyoverflow \
346 && (! defined __cplusplus \
347 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
348 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
353 yytype_int16 yyss_alloc;
359 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
363 # define YYSTACK_BYTES(N) \
364 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
365 + 2 * YYSTACK_GAP_MAXIMUM)
367 # define YYCOPY_NEEDED 1
374 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
377 YYSIZE_T yynewbytes; \
378 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
379 Stack = &yyptr->Stack_alloc; \
380 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
381 yyptr += yynewbytes / sizeof (*yyptr); \
387 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
391 # if defined __GNUC__ && 1 < __GNUC__
392 # define YYCOPY(Dst, Src, Count) \
393 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
395 # define YYCOPY(Dst, Src, Count) \
399 for (yyi = 0; yyi < (Count); yyi++) \
400 (Dst)[yyi] = (Src)[yyi]; \
423 #define YYMAXUTOK 262
425 #define YYTRANSLATE(YYX) \
426 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
429 static const yytype_uint8 yytranslate[] =
431 0, 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, 8, 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, 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, 1, 2, 3, 4,
463 static const yytype_uint8 yyprhs[] =
465 0, 0, 3, 4, 7, 14, 16, 18, 19, 22,
470 static const yytype_int8 yyrhs[] =
472 10, 0, -1, -1, 11, 10, -1, 7, 12, 13,
473 4, 14, 15, -1, 6, -1, 4, -1, -1, 5,
474 8, -1, -1, 4, -1, -1, 4, -1
478 static const yytype_uint8 yyrline[] =
480 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
485 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
488 static const char *
const yytname[] =
490 "$end",
"error",
"$undefined",
"ERROR",
"NUMBER",
"LAYER",
"ALIGN",
491 "NAME",
"'+'",
"$accept",
"input",
"location",
"align",
"layer",
"mask",
499 static const yytype_uint16 yytoknum[] =
501 0, 256, 257, 258, 259, 260, 261, 262, 43
506 static const yytype_uint8 yyr1[] =
508 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
513 static const yytype_uint8 yyr2[] =
515 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
522 static const yytype_uint8 yydefact[] =
524 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
525 0, 8, 9, 10, 11, 12, 4
529 static const yytype_int8 yydefgoto[] =
531 -1, 2, 3, 6, 10, 14, 16
536 #define YYPACT_NINF -7
537 static const yytype_int8 yypact[] =
539 -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
540 2, -7, 4, -7, 5, -7, -7
544 static const yytype_int8 yypgoto[] =
546 -7, 7, -7, -7, -7, -7, -7
552 #define YYTABLE_NINF -1
553 static const yytype_uint8 yytable[] =
555 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
559 #define yypact_value_is_default(yystate) \
562 #define yytable_value_is_error(yytable_value) \
565 static const yytype_int8 yycheck[] =
567 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
573 static const yytype_uint8 yystos[] =
575 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
576 13, 8, 4, 4, 14, 4, 15
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
596 #define YYFAIL goto yyerrlab
604 #define YYRECOVERING() (!!yyerrstatus)
606 #define YYBACKUP(Token, Value) \
608 if (yychar == YYEMPTY) \
612 YYPOPSTACK (yylen); \
618 yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
625 #define YYERRCODE 256
632 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
633 #ifndef YYLLOC_DEFAULT
634 # define YYLLOC_DEFAULT(Current, Rhs, N) \
638 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
639 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
640 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
641 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
645 (Current).first_line = (Current).last_line = \
646 YYRHSLOC (Rhs, 0).last_line; \
647 (Current).first_column = (Current).last_column = \
648 YYRHSLOC (Rhs, 0).last_column; \
658 #ifndef YY_LOCATION_PRINT
659 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
660 # define YY_LOCATION_PRINT(File, Loc) \
661 fprintf (File, "%d.%d-%d.%d", \
662 (Loc).first_line, (Loc).first_column, \
663 (Loc).last_line, (Loc).last_column)
665 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
673 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
675 # define YYLEX yylex (&yylval, &yylloc, scanner)
683 # define YYFPRINTF fprintf
686 # define YYDPRINTF(Args) \
692 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
696 YYFPRINTF (stderr, "%s ", Title); \
697 yy_symbol_print (stderr, \
698 Type, Value, Location, scanner); \
699 YYFPRINTF (stderr, "\n"); \
709 #if (defined __STDC__ || defined __C99__FUNC__ \
710 || defined __cplusplus || defined _MSC_VER)
712 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
715 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
718 YYSTYPE const * const yyvaluep;
719 YYLTYPE const * const yylocationp;
723 FILE *yyo = yyoutput;
730 if (yytype < YYNTOKENS)
731 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
747 #if (defined __STDC__ || defined __C99__FUNC__ \
748 || defined __cplusplus || defined _MSC_VER)
750 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
753 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
756 YYSTYPE const * const yyvaluep;
757 YYLTYPE const * const yylocationp;
761 if (yytype < YYNTOKENS)
762 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
764 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
766 YY_LOCATION_PRINT (yyoutput, *yylocationp);
767 YYFPRINTF (yyoutput,
": ");
768 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
769 YYFPRINTF (yyoutput,
")");
777 #if (defined __STDC__ || defined __C99__FUNC__ \
778 || defined __cplusplus || defined _MSC_VER)
780 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
783 yy_stack_print (yybottom, yytop)
784 yytype_int16 *yybottom;
788 YYFPRINTF (stderr,
"Stack now");
789 for (; yybottom <= yytop; yybottom++)
791 int yybot = *yybottom;
792 YYFPRINTF (stderr,
" %d", yybot);
794 YYFPRINTF (stderr,
"\n");
797 # define YY_STACK_PRINT(Bottom, Top) \
800 yy_stack_print ((Bottom), (Top)); \
808 #if (defined __STDC__ || defined __C99__FUNC__ \
809 || defined __cplusplus || defined _MSC_VER)
811 yy_reduce_print (
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
814 yy_reduce_print (yyvsp, yylsp, yyrule, scanner)
821 int yynrhs = yyr2[yyrule];
823 unsigned long int yylno = yyrline[yyrule];
824 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
827 for (yyi = 0; yyi < yynrhs; yyi++)
829 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
830 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
831 &(yyvsp[(yyi + 1) - (yynrhs)])
832 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
833 YYFPRINTF (stderr,
"\n");
837 # define YY_REDUCE_PRINT(Rule) \
840 yy_reduce_print (yyvsp, yylsp, Rule, scanner); \
847 # define YYDPRINTF(Args)
848 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
849 # define YY_STACK_PRINT(Bottom, Top)
850 # define YY_REDUCE_PRINT(Rule)
856 # define YYINITDEPTH 200
867 # define YYMAXDEPTH 10000
874 # if defined __GLIBC__ && defined _STRING_H
875 # define yystrlen strlen
878 #if (defined __STDC__ || defined __C99__FUNC__ \
879 || defined __cplusplus || defined _MSC_VER)
881 yystrlen (
const char *yystr)
889 for (yylen = 0; yystr[yylen]; yylen++)
897 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
898 # define yystpcpy stpcpy
902 #if (defined __STDC__ || defined __C99__FUNC__ \
903 || defined __cplusplus || defined _MSC_VER)
905 yystpcpy (
char *yydest,
const char *yysrc)
908 yystpcpy (yydest, yysrc)
914 const char *yys = yysrc;
916 while ((*yyd++ = *yys++) !=
'\0')
933 yytnamerr (
char *yyres,
const char *yystr)
938 char const *yyp = yystr;
945 goto do_not_strip_quotes;
949 goto do_not_strip_quotes;
962 do_not_strip_quotes: ;
966 return yystrlen (yystr);
968 return yystpcpy (yyres, yystr) - yyres;
981 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
982 yytype_int16 *yyssp,
int yytoken)
984 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
985 YYSIZE_T yysize = yysize0;
987 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
989 const char *yyformat = YY_NULL;
991 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1023 if (yytoken != YYEMPTY)
1025 int yyn = yypact[*yyssp];
1026 yyarg[yycount++] = yytname[yytoken];
1027 if (!yypact_value_is_default (yyn))
1032 int yyxbegin = yyn < 0 ? -yyn : 0;
1034 int yychecklim = YYLAST - yyn + 1;
1035 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1038 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1039 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1040 && !yytable_value_is_error (yytable[yyx + yyn]))
1042 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1048 yyarg[yycount++] = yytname[yyx];
1049 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1050 if (! (yysize <= yysize1
1051 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1060 # define YYCASE_(N, S) \
1064 YYCASE_(0, YY_(
"syntax error"));
1065 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1066 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1067 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1068 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1069 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1073 yysize1 = yysize + yystrlen (yyformat);
1074 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1078 if (*yymsg_alloc < yysize)
1080 *yymsg_alloc = 2 * yysize;
1081 if (! (yysize <= *yymsg_alloc
1082 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1083 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1093 while ((*yyp = *yyformat) !=
'\0')
1094 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1096 yyp += yytnamerr (yyp, yyarg[yyi++]);
1114 #if (defined __STDC__ || defined __C99__FUNC__ \
1115 || defined __cplusplus || defined _MSC_VER)
1117 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1120 yydestruct (yymsg, yytype, yyvaluep, yylocationp, scanner)
1129 YYUSE (yylocationp);
1134 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1141 #line 39 "route/pktloc_syntax.y"
1142 { free((yyvaluep->s)); };
1145 #line 1146 "route/pktloc_syntax.c"
1155 #ifdef YYPARSE_PARAM
1156 #if defined __STDC__ || defined __cplusplus
1157 int yyparse (
void *YYPARSE_PARAM);
1162 #if defined __STDC__ || defined __cplusplus
1163 int yyparse (
void *scanner);
1174 #ifdef YYPARSE_PARAM
1175 #if (defined __STDC__ || defined __C99__FUNC__ \
1176 || defined __cplusplus || defined _MSC_VER)
1178 yyparse (
void *YYPARSE_PARAM)
1181 yyparse (YYPARSE_PARAM)
1182 void *YYPARSE_PARAM;
1185 #if (defined __STDC__ || defined __C99__FUNC__ \
1186 || defined __cplusplus || defined _MSC_VER)
1188 yyparse (
void *scanner)
1221 yytype_int16 yyssa[YYINITDEPTH];
1223 yytype_int16 *yyssp;
1238 YYSIZE_T yystacksize;
1252 char *yymsg = yymsgbuf;
1253 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1256 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1266 yystacksize = YYINITDEPTH;
1268 YYDPRINTF ((stderr,
"Starting parse\n"));
1283 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1285 yylloc.first_line = yylloc.last_line = 1;
1286 yylloc.first_column = yylloc.last_column = 1;
1302 if (yyss + yystacksize - 1 <= yyssp)
1305 YYSIZE_T yysize = yyssp - yyss + 1;
1313 yytype_int16 *yyss1 = yyss;
1320 yyoverflow (YY_(
"memory exhausted"),
1321 &yyss1, yysize *
sizeof (*yyssp),
1322 &yyvs1, yysize *
sizeof (*yyvsp),
1323 &yyls1, yysize *
sizeof (*yylsp),
1331 # ifndef YYSTACK_RELOCATE
1332 goto yyexhaustedlab;
1335 if (YYMAXDEPTH <= yystacksize)
1336 goto yyexhaustedlab;
1338 if (YYMAXDEPTH < yystacksize)
1339 yystacksize = YYMAXDEPTH;
1342 yytype_int16 *yyss1 = yyss;
1344 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1346 goto yyexhaustedlab;
1347 YYSTACK_RELOCATE (yyss_alloc, yyss);
1348 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1349 YYSTACK_RELOCATE (yyls_alloc, yyls);
1350 # undef YYSTACK_RELOCATE
1352 YYSTACK_FREE (yyss1);
1357 yyssp = yyss + yysize - 1;
1358 yyvsp = yyvs + yysize - 1;
1359 yylsp = yyls + yysize - 1;
1361 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1362 (
unsigned long int) yystacksize));
1364 if (yyss + yystacksize - 1 <= yyssp)
1368 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1370 if (yystate == YYFINAL)
1384 yyn = yypact[yystate];
1385 if (yypact_value_is_default (yyn))
1391 if (yychar == YYEMPTY)
1393 YYDPRINTF ((stderr,
"Reading a token: "));
1397 if (yychar <= YYEOF)
1399 yychar = yytoken = YYEOF;
1400 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1404 yytoken = YYTRANSLATE (yychar);
1405 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1411 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1416 if (yytable_value_is_error (yyn))
1428 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1443 yyn = yydefact[yystate];
1464 yyval = yyvsp[1-yylen];
1467 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1468 YY_REDUCE_PRINT (yyn);
1474 #line 52 "route/pktloc_syntax.y"
1479 NL_DBG(1,
"Allocating a packet location "
1480 "object failed.\n");
1484 loc->name = (yyvsp[(1) - (6)].s);
1485 loc->align = (yyvsp[(2) - (6)].i);
1486 loc->layer = (yyvsp[(3) - (6)].i);
1487 loc->offset = (yyvsp[(4) - (6)].i);
1488 loc->mask = (yyvsp[(5) - (6)].i);
1489 loc->shift = (yyvsp[(6) - (6)].i);
1492 NL_DBG(1,
"Duplicate packet location entry "
1493 "\"%s\"\n", (yyvsp[(1) - (6)].s));
1503 #line 79 "route/pktloc_syntax.y"
1504 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1510 #line 81 "route/pktloc_syntax.y"
1511 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1517 #line 86 "route/pktloc_syntax.y"
1518 { (yyval.i) = TCF_LAYER_NETWORK; }
1524 #line 88 "route/pktloc_syntax.y"
1525 { (yyval.i) = (yyvsp[(1) - (2)].i); }
1531 #line 93 "route/pktloc_syntax.y"
1538 #line 95 "route/pktloc_syntax.y"
1539 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1545 #line 100 "route/pktloc_syntax.y"
1552 #line 102 "route/pktloc_syntax.y"
1553 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1559 #line 1560 "route/pktloc_syntax.c"
1573 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1577 YY_STACK_PRINT (yyss, yyssp);
1588 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1589 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1590 yystate = yytable[yystate];
1592 yystate = yydefgoto[yyn - YYNTOKENS];
1603 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1609 #if ! YYERROR_VERBOSE
1610 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1612 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1615 char const *yymsgp = YY_(
"syntax error");
1616 int yysyntax_error_status;
1617 yysyntax_error_status = YYSYNTAX_ERROR;
1618 if (yysyntax_error_status == 0)
1620 else if (yysyntax_error_status == 1)
1622 if (yymsg != yymsgbuf)
1623 YYSTACK_FREE (yymsg);
1624 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1628 yymsg_alloc =
sizeof yymsgbuf;
1629 yysyntax_error_status = 2;
1633 yysyntax_error_status = YYSYNTAX_ERROR;
1637 yyerror (&yylloc, scanner, yymsgp);
1638 if (yysyntax_error_status == 2)
1639 goto yyexhaustedlab;
1641 # undef YYSYNTAX_ERROR
1645 yyerror_range[1] = yylloc;
1647 if (yyerrstatus == 3)
1652 if (yychar <= YYEOF)
1655 if (yychar == YYEOF)
1660 yydestruct (
"Error: discarding",
1661 yytoken, &yylval, &yylloc, scanner);
1682 yyerror_range[1] = yylsp[1-yylen];
1687 YY_STACK_PRINT (yyss, yyssp);
1700 yyn = yypact[yystate];
1701 if (!yypact_value_is_default (yyn))
1704 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1716 yyerror_range[1] = *yylsp;
1717 yydestruct (
"Error: popping",
1718 yystos[yystate], yyvsp, yylsp, scanner);
1721 YY_STACK_PRINT (yyss, yyssp);
1726 yyerror_range[2] = yylloc;
1729 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1733 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1753 #if !defined yyoverflow || YYERROR_VERBOSE
1758 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1764 if (yychar != YYEMPTY)
1768 yytoken = YYTRANSLATE (yychar);
1769 yydestruct (
"Cleanup: discarding lookahead",
1770 yytoken, &yylval, &yylloc, scanner);
1775 YY_STACK_PRINT (yyss, yyssp);
1776 while (yyssp != yyss)
1778 yydestruct (
"Cleanup: popping",
1779 yystos[*yyssp], yyvsp, yylsp, scanner);
1784 YYSTACK_FREE (yyss);
1787 if (yymsg != yymsgbuf)
1788 YYSTACK_FREE (yymsg);
1791 return YYID (yyresult);