pktloc_syntax.c

00001 
00002 /* A Bison parser, made by GNU Bison 2.4.1.  */
00003 
00004 /* Skeleton implementation for Bison's Yacc-like parsers in C
00005    
00006       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
00007    Free Software Foundation, Inc.
00008    
00009    This program is free software: you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation, either version 3 of the License, or
00012    (at your option) any later version.
00013    
00014    This program is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018    
00019    You should have received a copy of the GNU General Public License
00020    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00021 
00022 /* As a special exception, you may create a larger work that contains
00023    part or all of the Bison parser skeleton and distribute that work
00024    under terms of your choice, so long as that work isn't itself a
00025    parser generator using the skeleton or a modified version thereof
00026    as a parser skeleton.  Alternatively, if you modify or redistribute
00027    the parser skeleton itself, you may (at your option) remove this
00028    special exception, which will cause the skeleton and the resulting
00029    Bison output files to be licensed under the GNU General Public
00030    License without this special exception.
00031    
00032    This special exception was added by the Free Software Foundation in
00033    version 2.2 of Bison.  */
00034 
00035 /* C LALR(1) parser skeleton written by Richard Stallman, by
00036    simplifying the original so-called "semantic" parser.  */
00037 
00038 /* All symbols defined below should begin with yy or YY, to avoid
00039    infringing on user name space.  This should be done even for local
00040    variables, as they might otherwise be expanded by user macros.
00041    There are some unavoidable exceptions within include files to
00042    define necessary library symbols; they are noted "INFRINGES ON
00043    USER NAME SPACE" below.  */
00044 
00045 /* Identify Bison output.  */
00046 #define YYBISON 1
00047 
00048 /* Bison version.  */
00049 #define YYBISON_VERSION "2.4.1"
00050 
00051 /* Skeleton name.  */
00052 #define YYSKELETON_NAME "yacc.c"
00053 
00054 /* Pure parsers.  */
00055 #define YYPURE 1
00056 
00057 /* Push parsers.  */
00058 #define YYPUSH 0
00059 
00060 /* Pull parsers.  */
00061 #define YYPULL 1
00062 
00063 /* Using locations.  */
00064 #define YYLSP_NEEDED 1
00065 
00066 /* Substitute the variable and function names.  */
00067 #define yyparse         pktloc_parse
00068 #define yylex           pktloc_lex
00069 #define yyerror         pktloc_error
00070 #define yylval          pktloc_lval
00071 #define yychar          pktloc_char
00072 #define yydebug         pktloc_debug
00073 #define yynerrs         pktloc_nerrs
00074 #define yylloc          pktloc_lloc
00075 
00076 /* Copy the first part of user declarations.  */
00077 
00078 /* Line 189 of yacc.c  */
00079 #line 1 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
00080 
00081 #include <netlink-local.h>
00082 #include <netlink-tc.h>
00083 #include <netlink/netlink.h>
00084 #include <netlink/utils.h>
00085 #include <netlink/route/pktloc.h>
00086 
00087 
00088 /* Line 189 of yacc.c  */
00089 #line 90 "route/pktloc_syntax.c"
00090 
00091 /* Enabling traces.  */
00092 #ifndef YYDEBUG
00093 # define YYDEBUG 0
00094 #endif
00095 
00096 /* Enabling verbose error messages.  */
00097 #ifdef YYERROR_VERBOSE
00098 # undef YYERROR_VERBOSE
00099 # define YYERROR_VERBOSE 1
00100 #else
00101 # define YYERROR_VERBOSE 1
00102 #endif
00103 
00104 /* Enabling the token table.  */
00105 #ifndef YYTOKEN_TABLE
00106 # define YYTOKEN_TABLE 0
00107 #endif
00108 
00109 
00110 /* Tokens.  */
00111 #ifndef YYTOKENTYPE
00112 # define YYTOKENTYPE
00113    /* Put the tokens into the symbol table, so that GDB and other debuggers
00114       know about them.  */
00115    enum yytokentype {
00116      ERROR = 258,
00117      NUMBER = 259,
00118      LAYER = 260,
00119      ALIGN = 261,
00120      NAME = 262
00121    };
00122 #endif
00123 /* Tokens.  */
00124 #define ERROR 258
00125 #define NUMBER 259
00126 #define LAYER 260
00127 #define ALIGN 261
00128 #define NAME 262
00129 
00130 
00131 
00132 
00133 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00134 typedef union YYSTYPE
00135 {
00136 
00137 /* Line 214 of yacc.c  */
00138 #line 18 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
00139 
00140         struct rtnl_pktloc *l;
00141         uint32_t i;
00142         char *s;
00143 
00144 
00145 
00146 /* Line 214 of yacc.c  */
00147 #line 148 "route/pktloc_syntax.c"
00148 } YYSTYPE;
00149 # define YYSTYPE_IS_TRIVIAL 1
00150 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00151 # define YYSTYPE_IS_DECLARED 1
00152 #endif
00153 
00154 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
00155 typedef struct YYLTYPE
00156 {
00157   int first_line;
00158   int first_column;
00159   int last_line;
00160   int last_column;
00161 } YYLTYPE;
00162 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
00163 # define YYLTYPE_IS_DECLARED 1
00164 # define YYLTYPE_IS_TRIVIAL 1
00165 #endif
00166 
00167 
00168 /* Copy the second part of user declarations.  */
00169 
00170 /* Line 264 of yacc.c  */
00171 #line 24 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
00172 
00173 extern int pktloc_lex(YYSTYPE *, YYLTYPE *, void *);
00174 
00175 static void yyerror(YYLTYPE *locp, void *scanner, const char *msg)
00176 {
00177         NL_DBG(1, "Error while parsing packet location file: %s\n", msg);
00178 }
00179 
00180 
00181 /* Line 264 of yacc.c  */
00182 #line 183 "route/pktloc_syntax.c"
00183 
00184 #ifdef short
00185 # undef short
00186 #endif
00187 
00188 #ifdef YYTYPE_UINT8
00189 typedef YYTYPE_UINT8 yytype_uint8;
00190 #else
00191 typedef unsigned char yytype_uint8;
00192 #endif
00193 
00194 #ifdef YYTYPE_INT8
00195 typedef YYTYPE_INT8 yytype_int8;
00196 #elif (defined __STDC__ || defined __C99__FUNC__ \
00197      || defined __cplusplus || defined _MSC_VER)
00198 typedef signed char yytype_int8;
00199 #else
00200 typedef short int yytype_int8;
00201 #endif
00202 
00203 #ifdef YYTYPE_UINT16
00204 typedef YYTYPE_UINT16 yytype_uint16;
00205 #else
00206 typedef unsigned short int yytype_uint16;
00207 #endif
00208 
00209 #ifdef YYTYPE_INT16
00210 typedef YYTYPE_INT16 yytype_int16;
00211 #else
00212 typedef short int yytype_int16;
00213 #endif
00214 
00215 #ifndef YYSIZE_T
00216 # ifdef __SIZE_TYPE__
00217 #  define YYSIZE_T __SIZE_TYPE__
00218 # elif defined size_t
00219 #  define YYSIZE_T size_t
00220 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00221      || defined __cplusplus || defined _MSC_VER)
00222 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00223 #  define YYSIZE_T size_t
00224 # else
00225 #  define YYSIZE_T unsigned int
00226 # endif
00227 #endif
00228 
00229 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00230 
00231 #ifndef YY_
00232 # if YYENABLE_NLS
00233 #  if ENABLE_NLS
00234 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
00235 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
00236 #  endif
00237 # endif
00238 # ifndef YY_
00239 #  define YY_(msgid) msgid
00240 # endif
00241 #endif
00242 
00243 /* Suppress unused-variable warnings by "using" E.  */
00244 #if ! defined lint || defined __GNUC__
00245 # define YYUSE(e) ((void) (e))
00246 #else
00247 # define YYUSE(e) /* empty */
00248 #endif
00249 
00250 /* Identity function, used to suppress warnings about constant conditions.  */
00251 #ifndef lint
00252 # define YYID(n) (n)
00253 #else
00254 #if (defined __STDC__ || defined __C99__FUNC__ \
00255      || defined __cplusplus || defined _MSC_VER)
00256 static int
00257 YYID (int yyi)
00258 #else
00259 static int
00260 YYID (yyi)
00261     int yyi;
00262 #endif
00263 {
00264   return yyi;
00265 }
00266 #endif
00267 
00268 #if ! defined yyoverflow || YYERROR_VERBOSE
00269 
00270 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00271 
00272 # ifdef YYSTACK_USE_ALLOCA
00273 #  if YYSTACK_USE_ALLOCA
00274 #   ifdef __GNUC__
00275 #    define YYSTACK_ALLOC __builtin_alloca
00276 #   elif defined __BUILTIN_VA_ARG_INCR
00277 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
00278 #   elif defined _AIX
00279 #    define YYSTACK_ALLOC __alloca
00280 #   elif defined _MSC_VER
00281 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
00282 #    define alloca _alloca
00283 #   else
00284 #    define YYSTACK_ALLOC alloca
00285 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00286      || defined __cplusplus || defined _MSC_VER)
00287 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00288 #     ifndef _STDLIB_H
00289 #      define _STDLIB_H 1
00290 #     endif
00291 #    endif
00292 #   endif
00293 #  endif
00294 # endif
00295 
00296 # ifdef YYSTACK_ALLOC
00297    /* Pacify GCC's `empty if-body' warning.  */
00298 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
00299 #  ifndef YYSTACK_ALLOC_MAXIMUM
00300     /* The OS might guarantee only one guard page at the bottom of the stack,
00301        and a page size can be as small as 4096 bytes.  So we cannot safely
00302        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
00303        to allow for a few compiler-allocated temporary stack slots.  */
00304 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
00305 #  endif
00306 # else
00307 #  define YYSTACK_ALLOC YYMALLOC
00308 #  define YYSTACK_FREE YYFREE
00309 #  ifndef YYSTACK_ALLOC_MAXIMUM
00310 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00311 #  endif
00312 #  if (defined __cplusplus && ! defined _STDLIB_H \
00313        && ! ((defined YYMALLOC || defined malloc) \
00314              && (defined YYFREE || defined free)))
00315 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00316 #   ifndef _STDLIB_H
00317 #    define _STDLIB_H 1
00318 #   endif
00319 #  endif
00320 #  ifndef YYMALLOC
00321 #   define YYMALLOC malloc
00322 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00323      || defined __cplusplus || defined _MSC_VER)
00324 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
00325 #   endif
00326 #  endif
00327 #  ifndef YYFREE
00328 #   define YYFREE free
00329 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00330      || defined __cplusplus || defined _MSC_VER)
00331 void free (void *); /* INFRINGES ON USER NAME SPACE */
00332 #   endif
00333 #  endif
00334 # endif
00335 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
00336 
00337 
00338 #if (! defined yyoverflow \
00339      && (! defined __cplusplus \
00340          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
00341              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00342 
00343 /* A type that is properly aligned for any stack member.  */
00344 union yyalloc
00345 {
00346   yytype_int16 yyss_alloc;
00347   YYSTYPE yyvs_alloc;
00348   YYLTYPE yyls_alloc;
00349 };
00350 
00351 /* The size of the maximum gap between one aligned stack and the next.  */
00352 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00353 
00354 /* The size of an array large to enough to hold all stacks, each with
00355    N elements.  */
00356 # define YYSTACK_BYTES(N) \
00357      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
00358       + 2 * YYSTACK_GAP_MAXIMUM)
00359 
00360 /* Copy COUNT objects from FROM to TO.  The source and destination do
00361    not overlap.  */
00362 # ifndef YYCOPY
00363 #  if defined __GNUC__ && 1 < __GNUC__
00364 #   define YYCOPY(To, From, Count) \
00365       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00366 #  else
00367 #   define YYCOPY(To, From, Count)              \
00368       do                                        \
00369         {                                       \
00370           YYSIZE_T yyi;                         \
00371           for (yyi = 0; yyi < (Count); yyi++)   \
00372             (To)[yyi] = (From)[yyi];            \
00373         }                                       \
00374       while (YYID (0))
00375 #  endif
00376 # endif
00377 
00378 /* Relocate STACK from its old location to the new one.  The
00379    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00380    elements in the stack, and YYPTR gives the new location of the
00381    stack.  Advance YYPTR to a properly aligned location for the next
00382    stack.  */
00383 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
00384     do                                                                  \
00385       {                                                                 \
00386         YYSIZE_T yynewbytes;                                            \
00387         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
00388         Stack = &yyptr->Stack_alloc;                                    \
00389         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00390         yyptr += yynewbytes / sizeof (*yyptr);                          \
00391       }                                                                 \
00392     while (YYID (0))
00393 
00394 #endif
00395 
00396 /* YYFINAL -- State number of the termination state.  */
00397 #define YYFINAL  7
00398 /* YYLAST -- Last index in YYTABLE.  */
00399 #define YYLAST   10
00400 
00401 /* YYNTOKENS -- Number of terminals.  */
00402 #define YYNTOKENS  9
00403 /* YYNNTS -- Number of nonterminals.  */
00404 #define YYNNTS  7
00405 /* YYNRULES -- Number of rules.  */
00406 #define YYNRULES  12
00407 /* YYNRULES -- Number of states.  */
00408 #define YYNSTATES  17
00409 
00410 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00411 #define YYUNDEFTOK  2
00412 #define YYMAXUTOK   262
00413 
00414 #define YYTRANSLATE(YYX)                                                \
00415   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00416 
00417 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00418 static const yytype_uint8 yytranslate[] =
00419 {
00420        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00421        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00422        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00423        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00424        2,     2,     2,     8,     2,     2,     2,     2,     2,     2,
00425        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00426        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00427        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00428        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00429        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00430        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00431        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00432        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00433        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00434        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00435        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00436        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00437        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00438        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00439        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00440        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00441        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00442        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00443        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00444        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00445        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00446        5,     6,     7
00447 };
00448 
00449 #if YYDEBUG
00450 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00451    YYRHS.  */
00452 static const yytype_uint8 yyprhs[] =
00453 {
00454        0,     0,     3,     4,     7,    14,    16,    18,    19,    22,
00455       23,    25,    26
00456 };
00457 
00458 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
00459 static const yytype_int8 yyrhs[] =
00460 {
00461       10,     0,    -1,    -1,    11,    10,    -1,     7,    12,    13,
00462        4,    14,    15,    -1,     6,    -1,     4,    -1,    -1,     5,
00463        8,    -1,    -1,     4,    -1,    -1,     4,    -1
00464 };
00465 
00466 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00467 static const yytype_uint8 yyrline[] =
00468 {
00469        0,    45,    45,    47,    51,    78,    80,    86,    87,    93,
00470       94,   100,   101
00471 };
00472 #endif
00473 
00474 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00475 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00476    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
00477 static const char *const yytname[] =
00478 {
00479   "$end", "error", "$undefined", "ERROR", "NUMBER", "LAYER", "ALIGN",
00480   "NAME", "'+'", "$accept", "input", "location", "align", "layer", "mask",
00481   "shift", 0
00482 };
00483 #endif
00484 
00485 # ifdef YYPRINT
00486 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00487    token YYLEX-NUM.  */
00488 static const yytype_uint16 yytoknum[] =
00489 {
00490        0,   256,   257,   258,   259,   260,   261,   262,    43
00491 };
00492 # endif
00493 
00494 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00495 static const yytype_uint8 yyr1[] =
00496 {
00497        0,     9,    10,    10,    11,    12,    12,    13,    13,    14,
00498       14,    15,    15
00499 };
00500 
00501 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00502 static const yytype_uint8 yyr2[] =
00503 {
00504        0,     2,     0,     2,     6,     1,     1,     0,     2,     0,
00505        1,     0,     1
00506 };
00507 
00508 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00509    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00510    means the default is an error.  */
00511 static const yytype_uint8 yydefact[] =
00512 {
00513        2,     0,     0,     2,     6,     5,     7,     1,     3,     0,
00514        0,     8,     9,    10,    11,    12,     4
00515 };
00516 
00517 /* YYDEFGOTO[NTERM-NUM].  */
00518 static const yytype_int8 yydefgoto[] =
00519 {
00520       -1,     2,     3,     6,    10,    14,    16
00521 };
00522 
00523 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00524    STATE-NUM.  */
00525 #define YYPACT_NINF -7
00526 static const yytype_int8 yypact[] =
00527 {
00528       -6,    -4,     3,    -6,    -7,    -7,    -1,    -7,    -7,    -3,
00529        2,    -7,     4,    -7,     5,    -7,    -7
00530 };
00531 
00532 /* YYPGOTO[NTERM-NUM].  */
00533 static const yytype_int8 yypgoto[] =
00534 {
00535       -7,     7,    -7,    -7,    -7,    -7,    -7
00536 };
00537 
00538 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00539    positive, shift that token.  If negative, reduce the rule which
00540    number is the opposite.  If zero, do what YYDEFACT says.
00541    If YYTABLE_NINF, syntax error.  */
00542 #define YYTABLE_NINF -1
00543 static const yytype_uint8 yytable[] =
00544 {
00545        4,     1,     5,     7,     9,    11,    12,     0,    13,    15,
00546        8
00547 };
00548 
00549 static const yytype_int8 yycheck[] =
00550 {
00551        4,     7,     6,     0,     5,     8,     4,    -1,     4,     4,
00552        3
00553 };
00554 
00555 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
00556    symbol of state STATE-NUM.  */
00557 static const yytype_uint8 yystos[] =
00558 {
00559        0,     7,    10,    11,     4,     6,    12,     0,    10,     5,
00560       13,     8,     4,     4,    14,     4,    15
00561 };
00562 
00563 #define yyerrok         (yyerrstatus = 0)
00564 #define yyclearin       (yychar = YYEMPTY)
00565 #define YYEMPTY         (-2)
00566 #define YYEOF           0
00567 
00568 #define YYACCEPT        goto yyacceptlab
00569 #define YYABORT         goto yyabortlab
00570 #define YYERROR         goto yyerrorlab
00571 
00572 
00573 /* Like YYERROR except do call yyerror.  This remains here temporarily
00574    to ease the transition to the new meaning of YYERROR, for GCC.
00575    Once GCC version 2 has supplanted version 1, this can go.  */
00576 
00577 #define YYFAIL          goto yyerrlab
00578 
00579 #define YYRECOVERING()  (!!yyerrstatus)
00580 
00581 #define YYBACKUP(Token, Value)                                  \
00582 do                                                              \
00583   if (yychar == YYEMPTY && yylen == 1)                          \
00584     {                                                           \
00585       yychar = (Token);                                         \
00586       yylval = (Value);                                         \
00587       yytoken = YYTRANSLATE (yychar);                           \
00588       YYPOPSTACK (1);                                           \
00589       goto yybackup;                                            \
00590     }                                                           \
00591   else                                                          \
00592     {                                                           \
00593       yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
00594       YYERROR;                                                  \
00595     }                                                           \
00596 while (YYID (0))
00597 
00598 
00599 #define YYTERROR        1
00600 #define YYERRCODE       256
00601 
00602 
00603 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
00604    If N is 0, then set CURRENT to the empty location which ends
00605    the previous symbol: RHS[0] (always defined).  */
00606 
00607 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00608 #ifndef YYLLOC_DEFAULT
00609 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
00610     do                                                                  \
00611       if (YYID (N))                                                    \
00612         {                                                               \
00613           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
00614           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
00615           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
00616           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
00617         }                                                               \
00618       else                                                              \
00619         {                                                               \
00620           (Current).first_line   = (Current).last_line   =              \
00621             YYRHSLOC (Rhs, 0).last_line;                                \
00622           (Current).first_column = (Current).last_column =              \
00623             YYRHSLOC (Rhs, 0).last_column;                              \
00624         }                                                               \
00625     while (YYID (0))
00626 #endif
00627 
00628 
00629 /* YY_LOCATION_PRINT -- Print the location on the stream.
00630    This macro was not mandated originally: define only if we know
00631    we won't break user code: when these are the locations we know.  */
00632 
00633 #ifndef YY_LOCATION_PRINT
00634 # if YYLTYPE_IS_TRIVIAL
00635 #  define YY_LOCATION_PRINT(File, Loc)                  \
00636      fprintf (File, "%d.%d-%d.%d",                      \
00637               (Loc).first_line, (Loc).first_column,     \
00638               (Loc).last_line,  (Loc).last_column)
00639 # else
00640 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00641 # endif
00642 #endif
00643 
00644 
00645 /* YYLEX -- calling `yylex' with the right arguments.  */
00646 
00647 #ifdef YYLEX_PARAM
00648 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
00649 #else
00650 # define YYLEX yylex (&yylval, &yylloc, scanner)
00651 #endif
00652 
00653 /* Enable debugging if requested.  */
00654 #if YYDEBUG
00655 
00656 # ifndef YYFPRINTF
00657 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00658 #  define YYFPRINTF fprintf
00659 # endif
00660 
00661 # define YYDPRINTF(Args)                        \
00662 do {                                            \
00663   if (yydebug)                                  \
00664     YYFPRINTF Args;                             \
00665 } while (YYID (0))
00666 
00667 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
00668 do {                                                                      \
00669   if (yydebug)                                                            \
00670     {                                                                     \
00671       YYFPRINTF (stderr, "%s ", Title);                                   \
00672       yy_symbol_print (stderr,                                            \
00673                   Type, Value, Location, scanner); \
00674       YYFPRINTF (stderr, "\n");                                           \
00675     }                                                                     \
00676 } while (YYID (0))
00677 
00678 
00679 /*--------------------------------.
00680 | Print this symbol on YYOUTPUT.  |
00681 `--------------------------------*/
00682 
00683 /*ARGSUSED*/
00684 #if (defined __STDC__ || defined __C99__FUNC__ \
00685      || defined __cplusplus || defined _MSC_VER)
00686 static void
00687 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *scanner)
00688 #else
00689 static void
00690 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
00691     FILE *yyoutput;
00692     int yytype;
00693     YYSTYPE const * const yyvaluep;
00694     YYLTYPE const * const yylocationp;
00695     void *scanner;
00696 #endif
00697 {
00698   if (!yyvaluep)
00699     return;
00700   YYUSE (yylocationp);
00701   YYUSE (scanner);
00702 # ifdef YYPRINT
00703   if (yytype < YYNTOKENS)
00704     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00705 # else
00706   YYUSE (yyoutput);
00707 # endif
00708   switch (yytype)
00709     {
00710       default:
00711         break;
00712     }
00713 }
00714 
00715 
00716 /*--------------------------------.
00717 | Print this symbol on YYOUTPUT.  |
00718 `--------------------------------*/
00719 
00720 #if (defined __STDC__ || defined __C99__FUNC__ \
00721      || defined __cplusplus || defined _MSC_VER)
00722 static void
00723 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *scanner)
00724 #else
00725 static void
00726 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, scanner)
00727     FILE *yyoutput;
00728     int yytype;
00729     YYSTYPE const * const yyvaluep;
00730     YYLTYPE const * const yylocationp;
00731     void *scanner;
00732 #endif
00733 {
00734   if (yytype < YYNTOKENS)
00735     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00736   else
00737     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00738 
00739   YY_LOCATION_PRINT (yyoutput, *yylocationp);
00740   YYFPRINTF (yyoutput, ": ");
00741   yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner);
00742   YYFPRINTF (yyoutput, ")");
00743 }
00744 
00745 /*------------------------------------------------------------------.
00746 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
00747 | TOP (included).                                                   |
00748 `------------------------------------------------------------------*/
00749 
00750 #if (defined __STDC__ || defined __C99__FUNC__ \
00751      || defined __cplusplus || defined _MSC_VER)
00752 static void
00753 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
00754 #else
00755 static void
00756 yy_stack_print (yybottom, yytop)
00757     yytype_int16 *yybottom;
00758     yytype_int16 *yytop;
00759 #endif
00760 {
00761   YYFPRINTF (stderr, "Stack now");
00762   for (; yybottom <= yytop; yybottom++)
00763     {
00764       int yybot = *yybottom;
00765       YYFPRINTF (stderr, " %d", yybot);
00766     }
00767   YYFPRINTF (stderr, "\n");
00768 }
00769 
00770 # define YY_STACK_PRINT(Bottom, Top)                            \
00771 do {                                                            \
00772   if (yydebug)                                                  \
00773     yy_stack_print ((Bottom), (Top));                           \
00774 } while (YYID (0))
00775 
00776 
00777 /*------------------------------------------------.
00778 | Report that the YYRULE is going to be reduced.  |
00779 `------------------------------------------------*/
00780 
00781 #if (defined __STDC__ || defined __C99__FUNC__ \
00782      || defined __cplusplus || defined _MSC_VER)
00783 static void
00784 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *scanner)
00785 #else
00786 static void
00787 yy_reduce_print (yyvsp, yylsp, yyrule, scanner)
00788     YYSTYPE *yyvsp;
00789     YYLTYPE *yylsp;
00790     int yyrule;
00791     void *scanner;
00792 #endif
00793 {
00794   int yynrhs = yyr2[yyrule];
00795   int yyi;
00796   unsigned long int yylno = yyrline[yyrule];
00797   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
00798              yyrule - 1, yylno);
00799   /* The symbols being reduced.  */
00800   for (yyi = 0; yyi < yynrhs; yyi++)
00801     {
00802       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
00803       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
00804                        &(yyvsp[(yyi + 1) - (yynrhs)])
00805                        , &(yylsp[(yyi + 1) - (yynrhs)])                , scanner);
00806       YYFPRINTF (stderr, "\n");
00807     }
00808 }
00809 
00810 # define YY_REDUCE_PRINT(Rule)          \
00811 do {                                    \
00812   if (yydebug)                          \
00813     yy_reduce_print (yyvsp, yylsp, Rule, scanner); \
00814 } while (YYID (0))
00815 
00816 /* Nonzero means print parse trace.  It is left uninitialized so that
00817    multiple parsers can coexist.  */
00818 int yydebug;
00819 #else /* !YYDEBUG */
00820 # define YYDPRINTF(Args)
00821 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
00822 # define YY_STACK_PRINT(Bottom, Top)
00823 # define YY_REDUCE_PRINT(Rule)
00824 #endif /* !YYDEBUG */
00825 
00826 
00827 /* YYINITDEPTH -- initial size of the parser's stacks.  */
00828 #ifndef YYINITDEPTH
00829 # define YYINITDEPTH 200
00830 #endif
00831 
00832 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
00833    if the built-in stack extension method is used).
00834 
00835    Do not make this value too large; the results are undefined if
00836    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
00837    evaluated with infinite-precision integer arithmetic.  */
00838 
00839 #ifndef YYMAXDEPTH
00840 # define YYMAXDEPTH 10000
00841 #endif
00842 
00843 
00844 
00845 #if YYERROR_VERBOSE
00846 
00847 # ifndef yystrlen
00848 #  if defined __GLIBC__ && defined _STRING_H
00849 #   define yystrlen strlen
00850 #  else
00851 /* Return the length of YYSTR.  */
00852 #if (defined __STDC__ || defined __C99__FUNC__ \
00853      || defined __cplusplus || defined _MSC_VER)
00854 static YYSIZE_T
00855 yystrlen (const char *yystr)
00856 #else
00857 static YYSIZE_T
00858 yystrlen (yystr)
00859     const char *yystr;
00860 #endif
00861 {
00862   YYSIZE_T yylen;
00863   for (yylen = 0; yystr[yylen]; yylen++)
00864     continue;
00865   return yylen;
00866 }
00867 #  endif
00868 # endif
00869 
00870 # ifndef yystpcpy
00871 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
00872 #   define yystpcpy stpcpy
00873 #  else
00874 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
00875    YYDEST.  */
00876 #if (defined __STDC__ || defined __C99__FUNC__ \
00877      || defined __cplusplus || defined _MSC_VER)
00878 static char *
00879 yystpcpy (char *yydest, const char *yysrc)
00880 #else
00881 static char *
00882 yystpcpy (yydest, yysrc)
00883     char *yydest;
00884     const char *yysrc;
00885 #endif
00886 {
00887   char *yyd = yydest;
00888   const char *yys = yysrc;
00889 
00890   while ((*yyd++ = *yys++) != '\0')
00891     continue;
00892 
00893   return yyd - 1;
00894 }
00895 #  endif
00896 # endif
00897 
00898 # ifndef yytnamerr
00899 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
00900    quotes and backslashes, so that it's suitable for yyerror.  The
00901    heuristic is that double-quoting is unnecessary unless the string
00902    contains an apostrophe, a comma, or backslash (other than
00903    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
00904    null, do not copy; instead, return the length of what the result
00905    would have been.  */
00906 static YYSIZE_T
00907 yytnamerr (char *yyres, const char *yystr)
00908 {
00909   if (*yystr == '"')
00910     {
00911       YYSIZE_T yyn = 0;
00912       char const *yyp = yystr;
00913 
00914       for (;;)
00915         switch (*++yyp)
00916           {
00917           case '\'':
00918           case ',':
00919             goto do_not_strip_quotes;
00920 
00921           case '\\':
00922             if (*++yyp != '\\')
00923               goto do_not_strip_quotes;
00924             /* Fall through.  */
00925           default:
00926             if (yyres)
00927               yyres[yyn] = *yyp;
00928             yyn++;
00929             break;
00930 
00931           case '"':
00932             if (yyres)
00933               yyres[yyn] = '\0';
00934             return yyn;
00935           }
00936     do_not_strip_quotes: ;
00937     }
00938 
00939   if (! yyres)
00940     return yystrlen (yystr);
00941 
00942   return yystpcpy (yyres, yystr) - yyres;
00943 }
00944 # endif
00945 
00946 /* Copy into YYRESULT an error message about the unexpected token
00947    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
00948    including the terminating null byte.  If YYRESULT is null, do not
00949    copy anything; just return the number of bytes that would be
00950    copied.  As a special case, return 0 if an ordinary "syntax error"
00951    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
00952    size calculation.  */
00953 static YYSIZE_T
00954 yysyntax_error (char *yyresult, int yystate, int yychar)
00955 {
00956   int yyn = yypact[yystate];
00957 
00958   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
00959     return 0;
00960   else
00961     {
00962       int yytype = YYTRANSLATE (yychar);
00963       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
00964       YYSIZE_T yysize = yysize0;
00965       YYSIZE_T yysize1;
00966       int yysize_overflow = 0;
00967       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
00968       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
00969       int yyx;
00970 
00971 # if 0
00972       /* This is so xgettext sees the translatable formats that are
00973          constructed on the fly.  */
00974       YY_("syntax error, unexpected %s");
00975       YY_("syntax error, unexpected %s, expecting %s");
00976       YY_("syntax error, unexpected %s, expecting %s or %s");
00977       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
00978       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
00979 # endif
00980       char *yyfmt;
00981       char const *yyf;
00982       static char const yyunexpected[] = "syntax error, unexpected %s";
00983       static char const yyexpecting[] = ", expecting %s";
00984       static char const yyor[] = " or %s";
00985       char yyformat[sizeof yyunexpected
00986                     + sizeof yyexpecting - 1
00987                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
00988                        * (sizeof yyor - 1))];
00989       char const *yyprefix = yyexpecting;
00990 
00991       /* Start YYX at -YYN if negative to avoid negative indexes in
00992          YYCHECK.  */
00993       int yyxbegin = yyn < 0 ? -yyn : 0;
00994 
00995       /* Stay within bounds of both yycheck and yytname.  */
00996       int yychecklim = YYLAST - yyn + 1;
00997       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
00998       int yycount = 1;
00999 
01000       yyarg[0] = yytname[yytype];
01001       yyfmt = yystpcpy (yyformat, yyunexpected);
01002 
01003       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01004         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01005           {
01006             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01007               {
01008                 yycount = 1;
01009                 yysize = yysize0;
01010                 yyformat[sizeof yyunexpected - 1] = '\0';
01011                 break;
01012               }
01013             yyarg[yycount++] = yytname[yyx];
01014             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01015             yysize_overflow |= (yysize1 < yysize);
01016             yysize = yysize1;
01017             yyfmt = yystpcpy (yyfmt, yyprefix);
01018             yyprefix = yyor;
01019           }
01020 
01021       yyf = YY_(yyformat);
01022       yysize1 = yysize + yystrlen (yyf);
01023       yysize_overflow |= (yysize1 < yysize);
01024       yysize = yysize1;
01025 
01026       if (yysize_overflow)
01027         return YYSIZE_MAXIMUM;
01028 
01029       if (yyresult)
01030         {
01031           /* Avoid sprintf, as that infringes on the user's name space.
01032              Don't have undefined behavior even if the translation
01033              produced a string with the wrong number of "%s"s.  */
01034           char *yyp = yyresult;
01035           int yyi = 0;
01036           while ((*yyp = *yyf) != '\0')
01037             {
01038               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01039                 {
01040                   yyp += yytnamerr (yyp, yyarg[yyi++]);
01041                   yyf += 2;
01042                 }
01043               else
01044                 {
01045                   yyp++;
01046                   yyf++;
01047                 }
01048             }
01049         }
01050       return yysize;
01051     }
01052 }
01053 #endif /* YYERROR_VERBOSE */
01054 
01055 
01056 /*-----------------------------------------------.
01057 | Release the memory associated to this symbol.  |
01058 `-----------------------------------------------*/
01059 
01060 /*ARGSUSED*/
01061 #if (defined __STDC__ || defined __C99__FUNC__ \
01062      || defined __cplusplus || defined _MSC_VER)
01063 static void
01064 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *scanner)
01065 #else
01066 static void
01067 yydestruct (yymsg, yytype, yyvaluep, yylocationp, scanner)
01068     const char *yymsg;
01069     int yytype;
01070     YYSTYPE *yyvaluep;
01071     YYLTYPE *yylocationp;
01072     void *scanner;
01073 #endif
01074 {
01075   YYUSE (yyvaluep);
01076   YYUSE (yylocationp);
01077   YYUSE (scanner);
01078 
01079   if (!yymsg)
01080     yymsg = "Deleting";
01081   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01082 
01083   switch (yytype)
01084     {
01085       case 7: /* "NAME" */
01086 
01087 /* Line 1000 of yacc.c  */
01088 #line 39 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01089         { free((yyvaluep->s)); };
01090 
01091 /* Line 1000 of yacc.c  */
01092 #line 1093 "route/pktloc_syntax.c"
01093         break;
01094 
01095       default:
01096         break;
01097     }
01098 }
01099 
01100 /* Prevent warnings from -Wmissing-prototypes.  */
01101 #ifdef YYPARSE_PARAM
01102 #if defined __STDC__ || defined __cplusplus
01103 int yyparse (void *YYPARSE_PARAM);
01104 #else
01105 int yyparse ();
01106 #endif
01107 #else /* ! YYPARSE_PARAM */
01108 #if defined __STDC__ || defined __cplusplus
01109 int yyparse (void *scanner);
01110 #else
01111 int yyparse ();
01112 #endif
01113 #endif /* ! YYPARSE_PARAM */
01114 
01115 
01116 
01117 
01118 
01119 /*-------------------------.
01120 | yyparse or yypush_parse.  |
01121 `-------------------------*/
01122 
01123 #ifdef YYPARSE_PARAM
01124 #if (defined __STDC__ || defined __C99__FUNC__ \
01125      || defined __cplusplus || defined _MSC_VER)
01126 int
01127 yyparse (void *YYPARSE_PARAM)
01128 #else
01129 int
01130 yyparse (YYPARSE_PARAM)
01131     void *YYPARSE_PARAM;
01132 #endif
01133 #else /* ! YYPARSE_PARAM */
01134 #if (defined __STDC__ || defined __C99__FUNC__ \
01135      || defined __cplusplus || defined _MSC_VER)
01136 int
01137 yyparse (void *scanner)
01138 #else
01139 int
01140 yyparse (scanner)
01141     void *scanner;
01142 #endif
01143 #endif
01144 {
01145 /* The lookahead symbol.  */
01146 int yychar;
01147 
01148 /* The semantic value of the lookahead symbol.  */
01149 YYSTYPE yylval;
01150 
01151 /* Location data for the lookahead symbol.  */
01152 YYLTYPE yylloc;
01153 
01154     /* Number of syntax errors so far.  */
01155     int yynerrs;
01156 
01157     int yystate;
01158     /* Number of tokens to shift before error messages enabled.  */
01159     int yyerrstatus;
01160 
01161     /* The stacks and their tools:
01162        `yyss': related to states.
01163        `yyvs': related to semantic values.
01164        `yyls': related to locations.
01165 
01166        Refer to the stacks thru separate pointers, to allow yyoverflow
01167        to reallocate them elsewhere.  */
01168 
01169     /* The state stack.  */
01170     yytype_int16 yyssa[YYINITDEPTH];
01171     yytype_int16 *yyss;
01172     yytype_int16 *yyssp;
01173 
01174     /* The semantic value stack.  */
01175     YYSTYPE yyvsa[YYINITDEPTH];
01176     YYSTYPE *yyvs;
01177     YYSTYPE *yyvsp;
01178 
01179     /* The location stack.  */
01180     YYLTYPE yylsa[YYINITDEPTH];
01181     YYLTYPE *yyls;
01182     YYLTYPE *yylsp;
01183 
01184     /* The locations where the error started and ended.  */
01185     YYLTYPE yyerror_range[2];
01186 
01187     YYSIZE_T yystacksize;
01188 
01189   int yyn;
01190   int yyresult;
01191   /* Lookahead token as an internal (translated) token number.  */
01192   int yytoken;
01193   /* The variables used to return semantic value and location from the
01194      action routines.  */
01195   YYSTYPE yyval;
01196   YYLTYPE yyloc;
01197 
01198 #if YYERROR_VERBOSE
01199   /* Buffer for error messages, and its allocated size.  */
01200   char yymsgbuf[128];
01201   char *yymsg = yymsgbuf;
01202   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01203 #endif
01204 
01205 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
01206 
01207   /* The number of symbols on the RHS of the reduced rule.
01208      Keep to zero when no symbol should be popped.  */
01209   int yylen = 0;
01210 
01211   yytoken = 0;
01212   yyss = yyssa;
01213   yyvs = yyvsa;
01214   yyls = yylsa;
01215   yystacksize = YYINITDEPTH;
01216 
01217   YYDPRINTF ((stderr, "Starting parse\n"));
01218 
01219   yystate = 0;
01220   yyerrstatus = 0;
01221   yynerrs = 0;
01222   yychar = YYEMPTY; /* Cause a token to be read.  */
01223 
01224   /* Initialize stack pointers.
01225      Waste one element of value and location stack
01226      so that they stay on the same level as the state stack.
01227      The wasted elements are never initialized.  */
01228   yyssp = yyss;
01229   yyvsp = yyvs;
01230   yylsp = yyls;
01231 
01232 #if YYLTYPE_IS_TRIVIAL
01233   /* Initialize the default location before parsing starts.  */
01234   yylloc.first_line   = yylloc.last_line   = 1;
01235   yylloc.first_column = yylloc.last_column = 1;
01236 #endif
01237 
01238   goto yysetstate;
01239 
01240 /*------------------------------------------------------------.
01241 | yynewstate -- Push a new state, which is found in yystate.  |
01242 `------------------------------------------------------------*/
01243  yynewstate:
01244   /* In all cases, when you get here, the value and location stacks
01245      have just been pushed.  So pushing a state here evens the stacks.  */
01246   yyssp++;
01247 
01248  yysetstate:
01249   *yyssp = yystate;
01250 
01251   if (yyss + yystacksize - 1 <= yyssp)
01252     {
01253       /* Get the current used size of the three stacks, in elements.  */
01254       YYSIZE_T yysize = yyssp - yyss + 1;
01255 
01256 #ifdef yyoverflow
01257       {
01258         /* Give user a chance to reallocate the stack.  Use copies of
01259            these so that the &'s don't force the real ones into
01260            memory.  */
01261         YYSTYPE *yyvs1 = yyvs;
01262         yytype_int16 *yyss1 = yyss;
01263         YYLTYPE *yyls1 = yyls;
01264 
01265         /* Each stack pointer address is followed by the size of the
01266            data in use in that stack, in bytes.  This used to be a
01267            conditional around just the two extra args, but that might
01268            be undefined if yyoverflow is a macro.  */
01269         yyoverflow (YY_("memory exhausted"),
01270                     &yyss1, yysize * sizeof (*yyssp),
01271                     &yyvs1, yysize * sizeof (*yyvsp),
01272                     &yyls1, yysize * sizeof (*yylsp),
01273                     &yystacksize);
01274 
01275         yyls = yyls1;
01276         yyss = yyss1;
01277         yyvs = yyvs1;
01278       }
01279 #else /* no yyoverflow */
01280 # ifndef YYSTACK_RELOCATE
01281       goto yyexhaustedlab;
01282 # else
01283       /* Extend the stack our own way.  */
01284       if (YYMAXDEPTH <= yystacksize)
01285         goto yyexhaustedlab;
01286       yystacksize *= 2;
01287       if (YYMAXDEPTH < yystacksize)
01288         yystacksize = YYMAXDEPTH;
01289 
01290       {
01291         yytype_int16 *yyss1 = yyss;
01292         union yyalloc *yyptr =
01293           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01294         if (! yyptr)
01295           goto yyexhaustedlab;
01296         YYSTACK_RELOCATE (yyss_alloc, yyss);
01297         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
01298         YYSTACK_RELOCATE (yyls_alloc, yyls);
01299 #  undef YYSTACK_RELOCATE
01300         if (yyss1 != yyssa)
01301           YYSTACK_FREE (yyss1);
01302       }
01303 # endif
01304 #endif /* no yyoverflow */
01305 
01306       yyssp = yyss + yysize - 1;
01307       yyvsp = yyvs + yysize - 1;
01308       yylsp = yyls + yysize - 1;
01309 
01310       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01311                   (unsigned long int) yystacksize));
01312 
01313       if (yyss + yystacksize - 1 <= yyssp)
01314         YYABORT;
01315     }
01316 
01317   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01318 
01319   if (yystate == YYFINAL)
01320     YYACCEPT;
01321 
01322   goto yybackup;
01323 
01324 /*-----------.
01325 | yybackup.  |
01326 `-----------*/
01327 yybackup:
01328 
01329   /* Do appropriate processing given the current state.  Read a
01330      lookahead token if we need one and don't already have one.  */
01331 
01332   /* First try to decide what to do without reference to lookahead token.  */
01333   yyn = yypact[yystate];
01334   if (yyn == YYPACT_NINF)
01335     goto yydefault;
01336 
01337   /* Not known => get a lookahead token if don't already have one.  */
01338 
01339   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
01340   if (yychar == YYEMPTY)
01341     {
01342       YYDPRINTF ((stderr, "Reading a token: "));
01343       yychar = YYLEX;
01344     }
01345 
01346   if (yychar <= YYEOF)
01347     {
01348       yychar = yytoken = YYEOF;
01349       YYDPRINTF ((stderr, "Now at end of input.\n"));
01350     }
01351   else
01352     {
01353       yytoken = YYTRANSLATE (yychar);
01354       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01355     }
01356 
01357   /* If the proper action on seeing token YYTOKEN is to reduce or to
01358      detect an error, take that action.  */
01359   yyn += yytoken;
01360   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01361     goto yydefault;
01362   yyn = yytable[yyn];
01363   if (yyn <= 0)
01364     {
01365       if (yyn == 0 || yyn == YYTABLE_NINF)
01366         goto yyerrlab;
01367       yyn = -yyn;
01368       goto yyreduce;
01369     }
01370 
01371   /* Count tokens shifted since error; after three, turn off error
01372      status.  */
01373   if (yyerrstatus)
01374     yyerrstatus--;
01375 
01376   /* Shift the lookahead token.  */
01377   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01378 
01379   /* Discard the shifted token.  */
01380   yychar = YYEMPTY;
01381 
01382   yystate = yyn;
01383   *++yyvsp = yylval;
01384   *++yylsp = yylloc;
01385   goto yynewstate;
01386 
01387 
01388 /*-----------------------------------------------------------.
01389 | yydefault -- do the default action for the current state.  |
01390 `-----------------------------------------------------------*/
01391 yydefault:
01392   yyn = yydefact[yystate];
01393   if (yyn == 0)
01394     goto yyerrlab;
01395   goto yyreduce;
01396 
01397 
01398 /*-----------------------------.
01399 | yyreduce -- Do a reduction.  |
01400 `-----------------------------*/
01401 yyreduce:
01402   /* yyn is the number of a rule to reduce with.  */
01403   yylen = yyr2[yyn];
01404 
01405   /* If YYLEN is nonzero, implement the default value of the action:
01406      `$$ = $1'.
01407 
01408      Otherwise, the following line sets YYVAL to garbage.
01409      This behavior is undocumented and Bison
01410      users should not rely upon it.  Assigning to YYVAL
01411      unconditionally makes the parser a bit smaller, and it avoids a
01412      GCC warning that YYVAL may be used uninitialized.  */
01413   yyval = yyvsp[1-yylen];
01414 
01415   /* Default location.  */
01416   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01417   YY_REDUCE_PRINT (yyn);
01418   switch (yyn)
01419     {
01420         case 4:
01421 
01422 /* Line 1455 of yacc.c  */
01423 #line 52 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01424     {
01425                         struct rtnl_pktloc *loc;
01426 
01427                         if (!(loc = rtnl_pktloc_alloc())) {
01428                                 NL_DBG(1, "Allocating a packet location "
01429                                           "object failed.\n");
01430                                 YYABORT;
01431                         }
01432 
01433                         loc->name = (yyvsp[(1) - (6)].s);
01434                         loc->align = (yyvsp[(2) - (6)].i);
01435                         loc->layer = (yyvsp[(3) - (6)].i);
01436                         loc->offset = (yyvsp[(4) - (6)].i);
01437                         loc->mask = (yyvsp[(5) - (6)].i);
01438                         loc->shift = (yyvsp[(6) - (6)].i);
01439 
01440                         if (rtnl_pktloc_add(loc) < 0) {
01441                                 NL_DBG(1, "Duplicate packet location entry "
01442                                           "\"%s\"\n", (yyvsp[(1) - (6)].s));
01443                         }
01444 
01445                         (yyval.l) = loc;
01446                 }
01447     break;
01448 
01449   case 5:
01450 
01451 /* Line 1455 of yacc.c  */
01452 #line 79 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01453     { (yyval.i) = (yyvsp[(1) - (1)].i); }
01454     break;
01455 
01456   case 6:
01457 
01458 /* Line 1455 of yacc.c  */
01459 #line 81 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01460     { (yyval.i) = (yyvsp[(1) - (1)].i); }
01461     break;
01462 
01463   case 7:
01464 
01465 /* Line 1455 of yacc.c  */
01466 #line 86 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01467     { (yyval.i) = TCF_LAYER_NETWORK; }
01468     break;
01469 
01470   case 8:
01471 
01472 /* Line 1455 of yacc.c  */
01473 #line 88 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01474     { (yyval.i) = (yyvsp[(1) - (2)].i); }
01475     break;
01476 
01477   case 9:
01478 
01479 /* Line 1455 of yacc.c  */
01480 #line 93 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01481     { (yyval.i) = 0; }
01482     break;
01483 
01484   case 10:
01485 
01486 /* Line 1455 of yacc.c  */
01487 #line 95 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01488     { (yyval.i) = (yyvsp[(1) - (1)].i); }
01489     break;
01490 
01491   case 11:
01492 
01493 /* Line 1455 of yacc.c  */
01494 #line 100 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01495     { (yyval.i) = 0; }
01496     break;
01497 
01498   case 12:
01499 
01500 /* Line 1455 of yacc.c  */
01501 #line 102 "/root/build/iw/libnl3/libnl3-3.0/./lib/route/pktloc_syntax.y"
01502     { (yyval.i) = (yyvsp[(1) - (1)].i); }
01503     break;
01504 
01505 
01506 
01507 /* Line 1455 of yacc.c  */
01508 #line 1509 "route/pktloc_syntax.c"
01509       default: break;
01510     }
01511   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01512 
01513   YYPOPSTACK (yylen);
01514   yylen = 0;
01515   YY_STACK_PRINT (yyss, yyssp);
01516 
01517   *++yyvsp = yyval;
01518   *++yylsp = yyloc;
01519 
01520   /* Now `shift' the result of the reduction.  Determine what state
01521      that goes to, based on the state we popped back to and the rule
01522      number reduced by.  */
01523 
01524   yyn = yyr1[yyn];
01525 
01526   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01527   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01528     yystate = yytable[yystate];
01529   else
01530     yystate = yydefgoto[yyn - YYNTOKENS];
01531 
01532   goto yynewstate;
01533 
01534 
01535 /*------------------------------------.
01536 | yyerrlab -- here on detecting error |
01537 `------------------------------------*/
01538 yyerrlab:
01539   /* If not already recovering from an error, report this error.  */
01540   if (!yyerrstatus)
01541     {
01542       ++yynerrs;
01543 #if ! YYERROR_VERBOSE
01544       yyerror (&yylloc, scanner, YY_("syntax error"));
01545 #else
01546       {
01547         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
01548         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
01549           {
01550             YYSIZE_T yyalloc = 2 * yysize;
01551             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
01552               yyalloc = YYSTACK_ALLOC_MAXIMUM;
01553             if (yymsg != yymsgbuf)
01554               YYSTACK_FREE (yymsg);
01555             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
01556             if (yymsg)
01557               yymsg_alloc = yyalloc;
01558             else
01559               {
01560                 yymsg = yymsgbuf;
01561                 yymsg_alloc = sizeof yymsgbuf;
01562               }
01563           }
01564 
01565         if (0 < yysize && yysize <= yymsg_alloc)
01566           {
01567             (void) yysyntax_error (yymsg, yystate, yychar);
01568             yyerror (&yylloc, scanner, yymsg);
01569           }
01570         else
01571           {
01572             yyerror (&yylloc, scanner, YY_("syntax error"));
01573             if (yysize != 0)
01574               goto yyexhaustedlab;
01575           }
01576       }
01577 #endif
01578     }
01579 
01580   yyerror_range[0] = yylloc;
01581 
01582   if (yyerrstatus == 3)
01583     {
01584       /* If just tried and failed to reuse lookahead token after an
01585          error, discard it.  */
01586 
01587       if (yychar <= YYEOF)
01588         {
01589           /* Return failure if at end of input.  */
01590           if (yychar == YYEOF)
01591             YYABORT;
01592         }
01593       else
01594         {
01595           yydestruct ("Error: discarding",
01596                       yytoken, &yylval, &yylloc, scanner);
01597           yychar = YYEMPTY;
01598         }
01599     }
01600 
01601   /* Else will try to reuse lookahead token after shifting the error
01602      token.  */
01603   goto yyerrlab1;
01604 
01605 
01606 /*---------------------------------------------------.
01607 | yyerrorlab -- error raised explicitly by YYERROR.  |
01608 `---------------------------------------------------*/
01609 yyerrorlab:
01610 
01611   /* Pacify compilers like GCC when the user code never invokes
01612      YYERROR and the label yyerrorlab therefore never appears in user
01613      code.  */
01614   if (/*CONSTCOND*/ 0)
01615      goto yyerrorlab;
01616 
01617   yyerror_range[0] = yylsp[1-yylen];
01618   /* Do not reclaim the symbols of the rule which action triggered
01619      this YYERROR.  */
01620   YYPOPSTACK (yylen);
01621   yylen = 0;
01622   YY_STACK_PRINT (yyss, yyssp);
01623   yystate = *yyssp;
01624   goto yyerrlab1;
01625 
01626 
01627 /*-------------------------------------------------------------.
01628 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
01629 `-------------------------------------------------------------*/
01630 yyerrlab1:
01631   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
01632 
01633   for (;;)
01634     {
01635       yyn = yypact[yystate];
01636       if (yyn != YYPACT_NINF)
01637         {
01638           yyn += YYTERROR;
01639           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
01640             {
01641               yyn = yytable[yyn];
01642               if (0 < yyn)
01643                 break;
01644             }
01645         }
01646 
01647       /* Pop the current state because it cannot handle the error token.  */
01648       if (yyssp == yyss)
01649         YYABORT;
01650 
01651       yyerror_range[0] = *yylsp;
01652       yydestruct ("Error: popping",
01653                   yystos[yystate], yyvsp, yylsp, scanner);
01654       YYPOPSTACK (1);
01655       yystate = *yyssp;
01656       YY_STACK_PRINT (yyss, yyssp);
01657     }
01658 
01659   *++yyvsp = yylval;
01660 
01661   yyerror_range[1] = yylloc;
01662   /* Using YYLLOC is tempting, but would change the location of
01663      the lookahead.  YYLOC is available though.  */
01664   YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
01665   *++yylsp = yyloc;
01666 
01667   /* Shift the error token.  */
01668   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
01669 
01670   yystate = yyn;
01671   goto yynewstate;
01672 
01673 
01674 /*-------------------------------------.
01675 | yyacceptlab -- YYACCEPT comes here.  |
01676 `-------------------------------------*/
01677 yyacceptlab:
01678   yyresult = 0;
01679   goto yyreturn;
01680 
01681 /*-----------------------------------.
01682 | yyabortlab -- YYABORT comes here.  |
01683 `-----------------------------------*/
01684 yyabortlab:
01685   yyresult = 1;
01686   goto yyreturn;
01687 
01688 #if !defined(yyoverflow) || YYERROR_VERBOSE
01689 /*-------------------------------------------------.
01690 | yyexhaustedlab -- memory exhaustion comes here.  |
01691 `-------------------------------------------------*/
01692 yyexhaustedlab:
01693   yyerror (&yylloc, scanner, YY_("memory exhausted"));
01694   yyresult = 2;
01695   /* Fall through.  */
01696 #endif
01697 
01698 yyreturn:
01699   if (yychar != YYEMPTY)
01700      yydestruct ("Cleanup: discarding lookahead",
01701                  yytoken, &yylval, &yylloc, scanner);
01702   /* Do not reclaim the symbols of the rule which action triggered
01703      this YYABORT or YYACCEPT.  */
01704   YYPOPSTACK (yylen);
01705   YY_STACK_PRINT (yyss, yyssp);
01706   while (yyssp != yyss)
01707     {
01708       yydestruct ("Cleanup: popping",
01709                   yystos[*yyssp], yyvsp, yylsp, scanner);
01710       YYPOPSTACK (1);
01711     }
01712 #ifndef yyoverflow
01713   if (yyss != yyssa)
01714     YYSTACK_FREE (yyss);
01715 #endif
01716 #if YYERROR_VERBOSE
01717   if (yymsg != yymsgbuf)
01718     YYSTACK_FREE (yymsg);
01719 #endif
01720   /* Make sure YYID is used.  */
01721   return YYID (yyresult);
01722 }
01723 
01724 
01725