47 #define YYBISON_VERSION "2.6.4"
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
639 #ifndef YYLLOC_DEFAULT
640 # define YYLLOC_DEFAULT(Current, Rhs, N) \
644 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
645 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
646 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
647 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
651 (Current).first_line = (Current).last_line = \
652 YYRHSLOC (Rhs, 0).last_line; \
653 (Current).first_column = (Current).last_column = \
654 YYRHSLOC (Rhs, 0).last_column; \
659 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
667 #ifndef YY_LOCATION_PRINT
668 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
669 # define YY_LOCATION_PRINT(File, Loc) \
670 fprintf (File, "%d.%d-%d.%d", \
671 (Loc).first_line, (Loc).first_column, \
672 (Loc).last_line, (Loc).last_column)
674 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
682 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
684 # define YYLEX yylex (&yylval, &yylloc, scanner)
692 # define YYFPRINTF fprintf
695 # define YYDPRINTF(Args) \
701 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
705 YYFPRINTF (stderr, "%s ", Title); \
706 yy_symbol_print (stderr, \
707 Type, Value, Location, scanner); \
708 YYFPRINTF (stderr, "\n"); \
718 #if (defined __STDC__ || defined __C99__FUNC__ \
719 || defined __cplusplus || defined _MSC_VER)
721 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
724 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
727 YYSTYPE const * const yyvaluep;
728 YYLTYPE const * const yylocationp;
732 FILE *yyo = yyoutput;
739 if (yytype < YYNTOKENS)
740 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
756 #if (defined __STDC__ || defined __C99__FUNC__ \
757 || defined __cplusplus || defined _MSC_VER)
759 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
void *scanner)
762 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
765 YYSTYPE const * const yyvaluep;
766 YYLTYPE const * const yylocationp;
770 if (yytype < YYNTOKENS)
771 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
773 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
775 YY_LOCATION_PRINT (yyoutput, *yylocationp);
776 YYFPRINTF (yyoutput,
": ");
777 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
778 YYFPRINTF (yyoutput,
")");
786 #if (defined __STDC__ || defined __C99__FUNC__ \
787 || defined __cplusplus || defined _MSC_VER)
789 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
792 yy_stack_print (yybottom, yytop)
793 yytype_int16 *yybottom;
797 YYFPRINTF (stderr,
"Stack now");
798 for (; yybottom <= yytop; yybottom++)
800 int yybot = *yybottom;
801 YYFPRINTF (stderr,
" %d", yybot);
803 YYFPRINTF (stderr,
"\n");
806 # define YY_STACK_PRINT(Bottom, Top) \
809 yy_stack_print ((Bottom), (Top)); \
817 #if (defined __STDC__ || defined __C99__FUNC__ \
818 || defined __cplusplus || defined _MSC_VER)
820 yy_reduce_print (
YYSTYPE *yyvsp,
YYLTYPE *yylsp,
int yyrule,
void *scanner)
823 yy_reduce_print (yyvsp, yylsp, yyrule, scanner)
830 int yynrhs = yyr2[yyrule];
832 unsigned long int yylno = yyrline[yyrule];
833 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
836 for (yyi = 0; yyi < yynrhs; yyi++)
838 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
839 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
840 &(yyvsp[(yyi + 1) - (yynrhs)])
841 , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
842 YYFPRINTF (stderr,
"\n");
846 # define YY_REDUCE_PRINT(Rule) \
849 yy_reduce_print (yyvsp, yylsp, Rule, scanner); \
856 # define YYDPRINTF(Args)
857 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
858 # define YY_STACK_PRINT(Bottom, Top)
859 # define YY_REDUCE_PRINT(Rule)
865 # define YYINITDEPTH 200
876 # define YYMAXDEPTH 10000
883 # if defined __GLIBC__ && defined _STRING_H
884 # define yystrlen strlen
887 #if (defined __STDC__ || defined __C99__FUNC__ \
888 || defined __cplusplus || defined _MSC_VER)
890 yystrlen (
const char *yystr)
898 for (yylen = 0; yystr[yylen]; yylen++)
906 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
907 # define yystpcpy stpcpy
911 #if (defined __STDC__ || defined __C99__FUNC__ \
912 || defined __cplusplus || defined _MSC_VER)
914 yystpcpy (
char *yydest,
const char *yysrc)
917 yystpcpy (yydest, yysrc)
923 const char *yys = yysrc;
925 while ((*yyd++ = *yys++) !=
'\0')
942 yytnamerr (
char *yyres,
const char *yystr)
947 char const *yyp = yystr;
954 goto do_not_strip_quotes;
958 goto do_not_strip_quotes;
971 do_not_strip_quotes: ;
975 return yystrlen (yystr);
977 return yystpcpy (yyres, yystr) - yyres;
990 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
991 yytype_int16 *yyssp,
int yytoken)
993 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
994 YYSIZE_T yysize = yysize0;
996 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
998 const char *yyformat = YY_NULL;
1000 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1032 if (yytoken != YYEMPTY)
1034 int yyn = yypact[*yyssp];
1035 yyarg[yycount++] = yytname[yytoken];
1036 if (!yypact_value_is_default (yyn))
1041 int yyxbegin = yyn < 0 ? -yyn : 0;
1043 int yychecklim = YYLAST - yyn + 1;
1044 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1047 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1048 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1049 && !yytable_value_is_error (yytable[yyx + yyn]))
1051 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1057 yyarg[yycount++] = yytname[yyx];
1058 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1059 if (! (yysize <= yysize1
1060 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1069 # define YYCASE_(N, S) \
1073 YYCASE_(0, YY_(
"syntax error"));
1074 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1075 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1076 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1077 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1078 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1082 yysize1 = yysize + yystrlen (yyformat);
1083 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1087 if (*yymsg_alloc < yysize)
1089 *yymsg_alloc = 2 * yysize;
1090 if (! (yysize <= *yymsg_alloc
1091 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1092 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1102 while ((*yyp = *yyformat) !=
'\0')
1103 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1105 yyp += yytnamerr (yyp, yyarg[yyi++]);
1123 #if (defined __STDC__ || defined __C99__FUNC__ \
1124 || defined __cplusplus || defined _MSC_VER)
1126 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
YYLTYPE *yylocationp,
void *scanner)
1129 yydestruct (yymsg, yytype, yyvaluep, yylocationp, scanner)
1138 YYUSE (yylocationp);
1143 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1149 #line 39 "route/pktloc_syntax.y"
1150 { free(((*yyvaluep).s)); };
1152 #line 1153 "route/pktloc_syntax.c"
1167 #ifdef YYPARSE_PARAM
1168 #if (defined __STDC__ || defined __C99__FUNC__ \
1169 || defined __cplusplus || defined _MSC_VER)
1171 yyparse (
void *YYPARSE_PARAM)
1174 yyparse (YYPARSE_PARAM)
1175 void *YYPARSE_PARAM;
1178 #if (defined __STDC__ || defined __C99__FUNC__ \
1179 || defined __cplusplus || defined _MSC_VER)
1181 yyparse (
void *scanner)
1193 #if defined __GNUC__ && (4 < __GNUC__ + (6 <= __GNUC_MINOR__))
1195 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1196 _Pragma ("GCC diagnostic push") \
1197 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1198 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1199 _Pragma ("GCC diagnostic pop")
1204 # define YYLVAL_INITIALIZE() (yylval = yyval_default)
1206 #ifndef YYLVAL_INITIALIZE
1207 # define YYLVAL_INITIALIZE()
1209 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1210 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1211 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1236 yytype_int16 yyssa[YYINITDEPTH];
1238 yytype_int16 *yyssp;
1253 YYSIZE_T yystacksize;
1267 char *yymsg = yymsgbuf;
1268 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1271 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1280 yystacksize = YYINITDEPTH;
1282 YYDPRINTF ((stderr,
"Starting parse\n"));
1297 YYLVAL_INITIALIZE ();
1298 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1300 yylloc.first_line = yylloc.last_line = 1;
1301 yylloc.first_column = yylloc.last_column = 1;
1316 if (yyss + yystacksize - 1 <= yyssp)
1319 YYSIZE_T yysize = yyssp - yyss + 1;
1327 yytype_int16 *yyss1 = yyss;
1334 yyoverflow (YY_(
"memory exhausted"),
1335 &yyss1, yysize *
sizeof (*yyssp),
1336 &yyvs1, yysize *
sizeof (*yyvsp),
1337 &yyls1, yysize *
sizeof (*yylsp),
1345 # ifndef YYSTACK_RELOCATE
1346 goto yyexhaustedlab;
1349 if (YYMAXDEPTH <= yystacksize)
1350 goto yyexhaustedlab;
1352 if (YYMAXDEPTH < yystacksize)
1353 yystacksize = YYMAXDEPTH;
1356 yytype_int16 *yyss1 = yyss;
1358 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1360 goto yyexhaustedlab;
1361 YYSTACK_RELOCATE (yyss_alloc, yyss);
1362 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1363 YYSTACK_RELOCATE (yyls_alloc, yyls);
1364 # undef YYSTACK_RELOCATE
1366 YYSTACK_FREE (yyss1);
1371 yyssp = yyss + yysize - 1;
1372 yyvsp = yyvs + yysize - 1;
1373 yylsp = yyls + yysize - 1;
1375 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1376 (
unsigned long int) yystacksize));
1378 if (yyss + yystacksize - 1 <= yyssp)
1382 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1384 if (yystate == YYFINAL)
1398 yyn = yypact[yystate];
1399 if (yypact_value_is_default (yyn))
1405 if (yychar == YYEMPTY)
1407 YYDPRINTF ((stderr,
"Reading a token: "));
1411 if (yychar <= YYEOF)
1413 yychar = yytoken = YYEOF;
1414 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1418 yytoken = YYTRANSLATE (yychar);
1419 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1425 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1430 if (yytable_value_is_error (yyn))
1442 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1448 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1450 YY_IGNORE_MAYBE_UNINITIALIZED_END
1459 yyn = yydefact[yystate];
1480 yyval = yyvsp[1-yylen];
1483 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1484 YY_REDUCE_PRINT (yyn);
1489 #line 52 "route/pktloc_syntax.y"
1494 NL_DBG(1,
"Allocating a packet location "
1495 "object failed.\n");
1499 loc->name = (yyvsp[(1) - (6)].s);
1500 loc->align = (yyvsp[(2) - (6)].i);
1501 loc->layer = (yyvsp[(3) - (6)].i);
1502 loc->offset = (yyvsp[(4) - (6)].i);
1503 loc->mask = (yyvsp[(5) - (6)].i);
1504 loc->shift = (yyvsp[(6) - (6)].i);
1507 NL_DBG(1,
"Duplicate packet location entry "
1508 "\"%s\"\n", (yyvsp[(1) - (6)].s));
1517 #line 79 "route/pktloc_syntax.y"
1518 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1523 #line 81 "route/pktloc_syntax.y"
1524 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1529 #line 86 "route/pktloc_syntax.y"
1530 { (yyval.i) = TCF_LAYER_NETWORK; }
1535 #line 88 "route/pktloc_syntax.y"
1536 { (yyval.i) = (yyvsp[(1) - (2)].i); }
1541 #line 93 "route/pktloc_syntax.y"
1547 #line 95 "route/pktloc_syntax.y"
1548 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1553 #line 100 "route/pktloc_syntax.y"
1559 #line 102 "route/pktloc_syntax.y"
1560 { (yyval.i) = (yyvsp[(1) - (1)].i); }
1565 #line 1566 "route/pktloc_syntax.c"
1579 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1583 YY_STACK_PRINT (yyss, yyssp);
1594 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1595 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1596 yystate = yytable[yystate];
1598 yystate = yydefgoto[yyn - YYNTOKENS];
1609 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1615 #if ! YYERROR_VERBOSE
1616 yyerror (&yylloc, scanner, YY_(
"syntax error"));
1618 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1621 char const *yymsgp = YY_(
"syntax error");
1622 int yysyntax_error_status;
1623 yysyntax_error_status = YYSYNTAX_ERROR;
1624 if (yysyntax_error_status == 0)
1626 else if (yysyntax_error_status == 1)
1628 if (yymsg != yymsgbuf)
1629 YYSTACK_FREE (yymsg);
1630 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1634 yymsg_alloc =
sizeof yymsgbuf;
1635 yysyntax_error_status = 2;
1639 yysyntax_error_status = YYSYNTAX_ERROR;
1643 yyerror (&yylloc, scanner, yymsgp);
1644 if (yysyntax_error_status == 2)
1645 goto yyexhaustedlab;
1647 # undef YYSYNTAX_ERROR
1651 yyerror_range[1] = yylloc;
1653 if (yyerrstatus == 3)
1658 if (yychar <= YYEOF)
1661 if (yychar == YYEOF)
1666 yydestruct (
"Error: discarding",
1667 yytoken, &yylval, &yylloc, scanner);
1688 yyerror_range[1] = yylsp[1-yylen];
1693 YY_STACK_PRINT (yyss, yyssp);
1706 yyn = yypact[yystate];
1707 if (!yypact_value_is_default (yyn))
1710 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1722 yyerror_range[1] = *yylsp;
1723 yydestruct (
"Error: popping",
1724 yystos[yystate], yyvsp, yylsp, scanner);
1727 YY_STACK_PRINT (yyss, yyssp);
1730 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1732 YY_IGNORE_MAYBE_UNINITIALIZED_END
1734 yyerror_range[2] = yylloc;
1737 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
1741 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1761 #if !defined yyoverflow || YYERROR_VERBOSE
1766 yyerror (&yylloc, scanner, YY_(
"memory exhausted"));
1772 if (yychar != YYEMPTY)
1776 yytoken = YYTRANSLATE (yychar);
1777 yydestruct (
"Cleanup: discarding lookahead",
1778 yytoken, &yylval, &yylloc, scanner);
1783 YY_STACK_PRINT (yyss, yyssp);
1784 while (yyssp != yyss)
1786 yydestruct (
"Cleanup: popping",
1787 yystos[*yyssp], yyvsp, yylsp, scanner);
1792 YYSTACK_FREE (yyss);
1795 if (yymsg != yymsgbuf)
1796 YYSTACK_FREE (yymsg);
1799 return YYID (yyresult);