libnl 3.2.7
/builddir/build/BUILD/libnl-3.2.7/lib/route/cls/ematch_syntax.c
00001 /* A Bison parser, made by GNU Bison 2.4.3.  */
00002 
00003 /* Skeleton implementation for Bison's Yacc-like parsers in C
00004    
00005       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
00006    2009, 2010 Free Software Foundation, Inc.
00007    
00008    This program is free software: you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation, either version 3 of the License, or
00011    (at your option) any later version.
00012    
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017    
00018    You should have received a copy of the GNU General Public License
00019    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00020 
00021 /* As a special exception, you may create a larger work that contains
00022    part or all of the Bison parser skeleton and distribute that work
00023    under terms of your choice, so long as that work isn't itself a
00024    parser generator using the skeleton or a modified version thereof
00025    as a parser skeleton.  Alternatively, if you modify or redistribute
00026    the parser skeleton itself, you may (at your option) remove this
00027    special exception, which will cause the skeleton and the resulting
00028    Bison output files to be licensed under the GNU General Public
00029    License without this special exception.
00030    
00031    This special exception was added by the Free Software Foundation in
00032    version 2.2 of Bison.  */
00033 
00034 /* C LALR(1) parser skeleton written by Richard Stallman, by
00035    simplifying the original so-called "semantic" parser.  */
00036 
00037 /* All symbols defined below should begin with yy or YY, to avoid
00038    infringing on user name space.  This should be done even for local
00039    variables, as they might otherwise be expanded by user macros.
00040    There are some unavoidable exceptions within include files to
00041    define necessary library symbols; they are noted "INFRINGES ON
00042    USER NAME SPACE" below.  */
00043 
00044 /* Identify Bison output.  */
00045 #define YYBISON 1
00046 
00047 /* Bison version.  */
00048 #define YYBISON_VERSION "2.4.3"
00049 
00050 /* Skeleton name.  */
00051 #define YYSKELETON_NAME "yacc.c"
00052 
00053 /* Pure parsers.  */
00054 #define YYPURE 1
00055 
00056 /* Push parsers.  */
00057 #define YYPUSH 0
00058 
00059 /* Pull parsers.  */
00060 #define YYPULL 1
00061 
00062 /* Using locations.  */
00063 #define YYLSP_NEEDED 0
00064 
00065 /* Substitute the variable and function names.  */
00066 #define yyparse         ematch_parse
00067 #define yylex           ematch_lex
00068 #define yyerror         ematch_error
00069 #define yylval          ematch_lval
00070 #define yychar          ematch_char
00071 #define yydebug         ematch_debug
00072 #define yynerrs         ematch_nerrs
00073 
00074 
00075 /* Copy the first part of user declarations.  */
00076 
00077 /* Line 189 of yacc.c  */
00078 #line 12 "route/cls/ematch_syntax.y"
00079 
00080 #include <netlink-local.h>
00081 #include <netlink-tc.h>
00082 #include <netlink/netlink.h>
00083 #include <netlink/utils.h>
00084 #include <netlink/route/pktloc.h>
00085 #include <netlink/route/cls/ematch.h>
00086 #include <netlink/route/cls/ematch/cmp.h>
00087 #include <netlink/route/cls/ematch/nbyte.h>
00088 #include <netlink/route/cls/ematch/text.h>
00089 #include <netlink/route/cls/ematch/meta.h>
00090 
00091 #define META_ALLOC rtnl_meta_value_alloc_id
00092 #define META_ID(name) TCF_META_ID_##name
00093 #define META_INT TCF_META_TYPE_INT
00094 #define META_VAR TCF_META_TYPE_VAR
00095 
00096 
00097 /* Line 189 of yacc.c  */
00098 #line 99 "route/cls/ematch_syntax.c"
00099 
00100 /* Enabling traces.  */
00101 #ifndef YYDEBUG
00102 # define YYDEBUG 0
00103 #endif
00104 
00105 /* Enabling verbose error messages.  */
00106 #ifdef YYERROR_VERBOSE
00107 # undef YYERROR_VERBOSE
00108 # define YYERROR_VERBOSE 1
00109 #else
00110 # define YYERROR_VERBOSE 1
00111 #endif
00112 
00113 /* Enabling the token table.  */
00114 #ifndef YYTOKEN_TABLE
00115 # define YYTOKEN_TABLE 0
00116 #endif
00117 
00118 
00119 /* Tokens.  */
00120 #ifndef YYTOKENTYPE
00121 # define YYTOKENTYPE
00122    /* Put the tokens into the symbol table, so that GDB and other debuggers
00123       know about them.  */
00124    enum yytokentype {
00125      ERROR = 258,
00126      LOGIC = 259,
00127      NOT = 260,
00128      OPERAND = 261,
00129      NUMBER = 262,
00130      ALIGN = 263,
00131      LAYER = 264,
00132      KW_OPEN = 265,
00133      KW_CLOSE = 266,
00134      KW_PLUS = 267,
00135      KW_MASK = 268,
00136      KW_SHIFT = 269,
00137      KW_AT = 270,
00138      EMATCH_CMP = 271,
00139      EMATCH_NBYTE = 272,
00140      EMATCH_TEXT = 273,
00141      EMATCH_META = 274,
00142      KW_EQ = 275,
00143      KW_GT = 276,
00144      KW_LT = 277,
00145      KW_FROM = 278,
00146      KW_TO = 279,
00147      META_RANDOM = 280,
00148      META_LOADAVG_0 = 281,
00149      META_LOADAVG_1 = 282,
00150      META_LOADAVG_2 = 283,
00151      META_DEV = 284,
00152      META_PRIO = 285,
00153      META_PROTO = 286,
00154      META_PKTTYPE = 287,
00155      META_PKTLEN = 288,
00156      META_DATALEN = 289,
00157      META_MACLEN = 290,
00158      META_MARK = 291,
00159      META_TCINDEX = 292,
00160      META_RTCLASSID = 293,
00161      META_RTIIF = 294,
00162      META_SK_FAMILY = 295,
00163      META_SK_STATE = 296,
00164      META_SK_REUSE = 297,
00165      META_SK_REFCNT = 298,
00166      META_SK_RCVBUF = 299,
00167      META_SK_SNDBUF = 300,
00168      META_SK_SHUTDOWN = 301,
00169      META_SK_PROTO = 302,
00170      META_SK_TYPE = 303,
00171      META_SK_RMEM_ALLOC = 304,
00172      META_SK_WMEM_ALLOC = 305,
00173      META_SK_WMEM_QUEUED = 306,
00174      META_SK_RCV_QLEN = 307,
00175      META_SK_SND_QLEN = 308,
00176      META_SK_ERR_QLEN = 309,
00177      META_SK_FORWARD_ALLOCS = 310,
00178      META_SK_ALLOCS = 311,
00179      META_SK_ROUTE_CAPS = 312,
00180      META_SK_HASH = 313,
00181      META_SK_LINGERTIME = 314,
00182      META_SK_ACK_BACKLOG = 315,
00183      META_SK_MAX_ACK_BACKLOG = 316,
00184      META_SK_PRIO = 317,
00185      META_SK_RCVLOWAT = 318,
00186      META_SK_RCVTIMEO = 319,
00187      META_SK_SNDTIMEO = 320,
00188      META_SK_SENDMSG_OFF = 321,
00189      META_SK_WRITE_PENDING = 322,
00190      META_VLAN = 323,
00191      META_RXHASH = 324,
00192      META_DEVNAME = 325,
00193      META_SK_BOUND_IF = 326,
00194      STR = 327,
00195      QUOTED = 328
00196    };
00197 #endif
00198 /* Tokens.  */
00199 #define ERROR 258
00200 #define LOGIC 259
00201 #define NOT 260
00202 #define OPERAND 261
00203 #define NUMBER 262
00204 #define ALIGN 263
00205 #define LAYER 264
00206 #define KW_OPEN 265
00207 #define KW_CLOSE 266
00208 #define KW_PLUS 267
00209 #define KW_MASK 268
00210 #define KW_SHIFT 269
00211 #define KW_AT 270
00212 #define EMATCH_CMP 271
00213 #define EMATCH_NBYTE 272
00214 #define EMATCH_TEXT 273
00215 #define EMATCH_META 274
00216 #define KW_EQ 275
00217 #define KW_GT 276
00218 #define KW_LT 277
00219 #define KW_FROM 278
00220 #define KW_TO 279
00221 #define META_RANDOM 280
00222 #define META_LOADAVG_0 281
00223 #define META_LOADAVG_1 282
00224 #define META_LOADAVG_2 283
00225 #define META_DEV 284
00226 #define META_PRIO 285
00227 #define META_PROTO 286
00228 #define META_PKTTYPE 287
00229 #define META_PKTLEN 288
00230 #define META_DATALEN 289
00231 #define META_MACLEN 290
00232 #define META_MARK 291
00233 #define META_TCINDEX 292
00234 #define META_RTCLASSID 293
00235 #define META_RTIIF 294
00236 #define META_SK_FAMILY 295
00237 #define META_SK_STATE 296
00238 #define META_SK_REUSE 297
00239 #define META_SK_REFCNT 298
00240 #define META_SK_RCVBUF 299
00241 #define META_SK_SNDBUF 300
00242 #define META_SK_SHUTDOWN 301
00243 #define META_SK_PROTO 302
00244 #define META_SK_TYPE 303
00245 #define META_SK_RMEM_ALLOC 304
00246 #define META_SK_WMEM_ALLOC 305
00247 #define META_SK_WMEM_QUEUED 306
00248 #define META_SK_RCV_QLEN 307
00249 #define META_SK_SND_QLEN 308
00250 #define META_SK_ERR_QLEN 309
00251 #define META_SK_FORWARD_ALLOCS 310
00252 #define META_SK_ALLOCS 311
00253 #define META_SK_ROUTE_CAPS 312
00254 #define META_SK_HASH 313
00255 #define META_SK_LINGERTIME 314
00256 #define META_SK_ACK_BACKLOG 315
00257 #define META_SK_MAX_ACK_BACKLOG 316
00258 #define META_SK_PRIO 317
00259 #define META_SK_RCVLOWAT 318
00260 #define META_SK_RCVTIMEO 319
00261 #define META_SK_SNDTIMEO 320
00262 #define META_SK_SENDMSG_OFF 321
00263 #define META_SK_WRITE_PENDING 322
00264 #define META_VLAN 323
00265 #define META_RXHASH 324
00266 #define META_DEVNAME 325
00267 #define META_SK_BOUND_IF 326
00268 #define STR 327
00269 #define QUOTED 328
00270 
00271 
00272 
00273 
00274 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00275 typedef union YYSTYPE
00276 {
00277 
00278 /* Line 214 of yacc.c  */
00279 #line 39 "route/cls/ematch_syntax.y"
00280 
00281         struct tcf_em_cmp       cmp;
00282         struct ematch_quoted    q;
00283         struct rtnl_ematch *    e;
00284         struct rtnl_pktloc *    loc;
00285         struct rtnl_meta_value *mv;
00286         uint32_t                i;
00287         uint64_t                i64;
00288         char *                  s;
00289 
00290 
00291 
00292 /* Line 214 of yacc.c  */
00293 #line 294 "route/cls/ematch_syntax.c"
00294 } YYSTYPE;
00295 # define YYSTYPE_IS_TRIVIAL 1
00296 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00297 # define YYSTYPE_IS_DECLARED 1
00298 #endif
00299 
00300 
00301 /* Copy the second part of user declarations.  */
00302 
00303 /* Line 264 of yacc.c  */
00304 #line 50 "route/cls/ematch_syntax.y"
00305 
00306 extern int ematch_lex(YYSTYPE *, void *);
00307 
00308 static void yyerror(void *scanner, char **errp, struct nl_list_head *root, const char *msg)
00309 {
00310         if (msg)
00311                 asprintf(errp, "%s", msg);
00312 }
00313 
00314 
00315 /* Line 264 of yacc.c  */
00316 #line 317 "route/cls/ematch_syntax.c"
00317 
00318 #ifdef short
00319 # undef short
00320 #endif
00321 
00322 #ifdef YYTYPE_UINT8
00323 typedef YYTYPE_UINT8 yytype_uint8;
00324 #else
00325 typedef unsigned char yytype_uint8;
00326 #endif
00327 
00328 #ifdef YYTYPE_INT8
00329 typedef YYTYPE_INT8 yytype_int8;
00330 #elif (defined __STDC__ || defined __C99__FUNC__ \
00331      || defined __cplusplus || defined _MSC_VER)
00332 typedef signed char yytype_int8;
00333 #else
00334 typedef short int yytype_int8;
00335 #endif
00336 
00337 #ifdef YYTYPE_UINT16
00338 typedef YYTYPE_UINT16 yytype_uint16;
00339 #else
00340 typedef unsigned short int yytype_uint16;
00341 #endif
00342 
00343 #ifdef YYTYPE_INT16
00344 typedef YYTYPE_INT16 yytype_int16;
00345 #else
00346 typedef short int yytype_int16;
00347 #endif
00348 
00349 #ifndef YYSIZE_T
00350 # ifdef __SIZE_TYPE__
00351 #  define YYSIZE_T __SIZE_TYPE__
00352 # elif defined size_t
00353 #  define YYSIZE_T size_t
00354 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00355      || defined __cplusplus || defined _MSC_VER)
00356 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00357 #  define YYSIZE_T size_t
00358 # else
00359 #  define YYSIZE_T unsigned int
00360 # endif
00361 #endif
00362 
00363 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00364 
00365 #ifndef YY_
00366 # if defined YYENABLE_NLS && YYENABLE_NLS
00367 #  if ENABLE_NLS
00368 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
00369 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
00370 #  endif
00371 # endif
00372 # ifndef YY_
00373 #  define YY_(msgid) msgid
00374 # endif
00375 #endif
00376 
00377 /* Suppress unused-variable warnings by "using" E.  */
00378 #if ! defined lint || defined __GNUC__
00379 # define YYUSE(e) ((void) (e))
00380 #else
00381 # define YYUSE(e) /* empty */
00382 #endif
00383 
00384 /* Identity function, used to suppress warnings about constant conditions.  */
00385 #ifndef lint
00386 # define YYID(n) (n)
00387 #else
00388 #if (defined __STDC__ || defined __C99__FUNC__ \
00389      || defined __cplusplus || defined _MSC_VER)
00390 static int
00391 YYID (int yyi)
00392 #else
00393 static int
00394 YYID (yyi)
00395     int yyi;
00396 #endif
00397 {
00398   return yyi;
00399 }
00400 #endif
00401 
00402 #if ! defined yyoverflow || YYERROR_VERBOSE
00403 
00404 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00405 
00406 # ifdef YYSTACK_USE_ALLOCA
00407 #  if YYSTACK_USE_ALLOCA
00408 #   ifdef __GNUC__
00409 #    define YYSTACK_ALLOC __builtin_alloca
00410 #   elif defined __BUILTIN_VA_ARG_INCR
00411 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
00412 #   elif defined _AIX
00413 #    define YYSTACK_ALLOC __alloca
00414 #   elif defined _MSC_VER
00415 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
00416 #    define alloca _alloca
00417 #   else
00418 #    define YYSTACK_ALLOC alloca
00419 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00420      || defined __cplusplus || defined _MSC_VER)
00421 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00422 #     ifndef _STDLIB_H
00423 #      define _STDLIB_H 1
00424 #     endif
00425 #    endif
00426 #   endif
00427 #  endif
00428 # endif
00429 
00430 # ifdef YYSTACK_ALLOC
00431    /* Pacify GCC's `empty if-body' warning.  */
00432 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
00433 #  ifndef YYSTACK_ALLOC_MAXIMUM
00434     /* The OS might guarantee only one guard page at the bottom of the stack,
00435        and a page size can be as small as 4096 bytes.  So we cannot safely
00436        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
00437        to allow for a few compiler-allocated temporary stack slots.  */
00438 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
00439 #  endif
00440 # else
00441 #  define YYSTACK_ALLOC YYMALLOC
00442 #  define YYSTACK_FREE YYFREE
00443 #  ifndef YYSTACK_ALLOC_MAXIMUM
00444 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00445 #  endif
00446 #  if (defined __cplusplus && ! defined _STDLIB_H \
00447        && ! ((defined YYMALLOC || defined malloc) \
00448              && (defined YYFREE || defined free)))
00449 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00450 #   ifndef _STDLIB_H
00451 #    define _STDLIB_H 1
00452 #   endif
00453 #  endif
00454 #  ifndef YYMALLOC
00455 #   define YYMALLOC malloc
00456 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00457      || defined __cplusplus || defined _MSC_VER)
00458 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
00459 #   endif
00460 #  endif
00461 #  ifndef YYFREE
00462 #   define YYFREE free
00463 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00464      || defined __cplusplus || defined _MSC_VER)
00465 void free (void *); /* INFRINGES ON USER NAME SPACE */
00466 #   endif
00467 #  endif
00468 # endif
00469 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
00470 
00471 
00472 #if (! defined yyoverflow \
00473      && (! defined __cplusplus \
00474          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00475 
00476 /* A type that is properly aligned for any stack member.  */
00477 union yyalloc
00478 {
00479   yytype_int16 yyss_alloc;
00480   YYSTYPE yyvs_alloc;
00481 };
00482 
00483 /* The size of the maximum gap between one aligned stack and the next.  */
00484 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00485 
00486 /* The size of an array large to enough to hold all stacks, each with
00487    N elements.  */
00488 # define YYSTACK_BYTES(N) \
00489      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
00490       + YYSTACK_GAP_MAXIMUM)
00491 
00492 /* Copy COUNT objects from FROM to TO.  The source and destination do
00493    not overlap.  */
00494 # ifndef YYCOPY
00495 #  if defined __GNUC__ && 1 < __GNUC__
00496 #   define YYCOPY(To, From, Count) \
00497       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00498 #  else
00499 #   define YYCOPY(To, From, Count)              \
00500       do                                        \
00501         {                                       \
00502           YYSIZE_T yyi;                         \
00503           for (yyi = 0; yyi < (Count); yyi++)   \
00504             (To)[yyi] = (From)[yyi];            \
00505         }                                       \
00506       while (YYID (0))
00507 #  endif
00508 # endif
00509 
00510 /* Relocate STACK from its old location to the new one.  The
00511    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00512    elements in the stack, and YYPTR gives the new location of the
00513    stack.  Advance YYPTR to a properly aligned location for the next
00514    stack.  */
00515 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
00516     do                                                                  \
00517       {                                                                 \
00518         YYSIZE_T yynewbytes;                                            \
00519         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
00520         Stack = &yyptr->Stack_alloc;                                    \
00521         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00522         yyptr += yynewbytes / sizeof (*yyptr);                          \
00523       }                                                                 \
00524     while (YYID (0))
00525 
00526 #endif
00527 
00528 /* YYFINAL -- State number of the termination state.  */
00529 #define YYFINAL  26
00530 /* YYLAST -- Last index in YYTABLE.  */
00531 #define YYLAST   138
00532 
00533 /* YYNTOKENS -- Number of terminals.  */
00534 #define YYNTOKENS  74
00535 /* YYNNTS -- Number of nonterminals.  */
00536 #define YYNNTS  18
00537 /* YYNRULES -- Number of rules.  */
00538 #define YYNRULES  84
00539 /* YYNRULES -- Number of states.  */
00540 #define YYNSTATES  118
00541 
00542 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00543 #define YYUNDEFTOK  2
00544 #define YYMAXUTOK   328
00545 
00546 #define YYTRANSLATE(YYX)                                                \
00547   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00548 
00549 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00550 static const yytype_uint8 yytranslate[] =
00551 {
00552        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00553        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00554        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00555        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00556        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00557        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00558        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00559        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00560        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00561        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00562        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00563        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00564        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00565        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00566        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00567        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00568        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00569        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00570        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00571        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00572        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00573        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00574        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00575        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00576        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00577        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00578        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
00579       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
00580       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
00581       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
00582       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
00583       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
00584       65,    66,    67,    68,    69,    70,    71,    72,    73
00585 };
00586 
00587 #if YYDEBUG
00588 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00589    YYRHS.  */
00590 static const yytype_uint8 yyprhs[] =
00591 {
00592        0,     0,     3,     4,     6,     8,    12,    15,    17,    19,
00593       26,    34,    41,    45,    50,    52,    56,    57,    60,    61,
00594       64,    66,    68,    72,    75,    77,    79,    81,    83,    85,
00595       87,    89,    91,    93,    95,    97,    99,   101,   103,   105,
00596      107,   109,   111,   113,   115,   117,   119,   121,   123,   125,
00597      127,   129,   131,   133,   135,   137,   139,   141,   143,   145,
00598      147,   149,   151,   153,   155,   157,   159,   161,   163,   165,
00599      167,   169,   171,   173,   175,   181,   182,   185,   188,   189,
00600      192,   193,   196,   198,   200
00601 };
00602 
00603 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
00604 static const yytype_int8 yyrhs[] =
00605 {
00606       75,     0,    -1,    -1,    76,    -1,    77,    -1,    77,     4,
00607       76,    -1,     5,    78,    -1,    78,    -1,    79,    -1,    17,
00608       10,    87,    20,    86,    11,    -1,    18,    10,    72,    73,
00609       81,    82,    11,    -1,    19,    10,    83,    91,    83,    11,
00610       -1,    10,    76,    11,    -1,    16,    10,    80,    11,    -1,
00611       80,    -1,    87,    91,     7,    -1,    -1,    23,    87,    -1,
00612       -1,    24,    87,    -1,    73,    -1,     7,    -1,    84,    90,
00613       89,    -1,    85,    90,    -1,    25,    -1,    26,    -1,    27,
00614       -1,    28,    -1,    29,    -1,    30,    -1,    31,    -1,    32,
00615       -1,    33,    -1,    34,    -1,    35,    -1,    36,    -1,    37,
00616       -1,    38,    -1,    39,    -1,    40,    -1,    41,    -1,    42,
00617       -1,    43,    -1,    44,    -1,    45,    -1,    46,    -1,    47,
00618       -1,    48,    -1,    49,    -1,    50,    -1,    51,    -1,    52,
00619       -1,    53,    -1,    54,    -1,    55,    -1,    56,    -1,    57,
00620       -1,    58,    -1,    59,    -1,    60,    -1,    61,    -1,    62,
00621       -1,    63,    -1,    64,    -1,    65,    -1,    66,    -1,    67,
00622       -1,    68,    -1,    69,    -1,    70,    -1,    71,    -1,    73,
00623       -1,    72,    -1,    72,    -1,    88,     9,    12,     7,    89,
00624       -1,    -1,     8,    15,    -1,     7,    15,    -1,    -1,    13,
00625        7,    -1,    -1,    14,     7,    -1,    20,    -1,    21,    -1,
00626       22,    -1
00627 };
00628 
00629 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00630 static const yytype_uint16 yyrline[] =
00631 {
00632        0,   146,   146,   148,   155,   159,   171,   176,   184,   199,
00633      217,   244,   263,   291,   293,   298,   319,   320,   326,   327,
00634      332,   334,   336,   338,   343,   344,   345,   346,   347,   348,
00635      349,   350,   351,   352,   353,   354,   355,   356,   357,   358,
00636      359,   360,   361,   362,   363,   364,   365,   366,   367,   368,
00637      369,   370,   371,   372,   373,   374,   375,   376,   377,   378,
00638      379,   380,   381,   382,   383,   384,   385,   386,   387,   391,
00639      392,   399,   403,   431,   443,   469,   470,   472,   478,   479,
00640      485,   486,   491,   493,   495
00641 };
00642 #endif
00643 
00644 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00645 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00646    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
00647 static const char *const yytname[] =
00648 {
00649   "$end", "error", "$undefined", "ERROR", "LOGIC", "NOT", "OPERAND",
00650   "NUMBER", "ALIGN", "LAYER", "\"(\"", "\")\"", "\"+\"", "\"mask\"",
00651   "\">>\"", "\"at\"", "\"cmp\"", "\"pattern\"", "\"text\"", "\"meta\"",
00652   "\"=\"", "\">\"", "\"<\"", "\"from\"", "\"to\"", "\"random\"",
00653   "\"loadavg_0\"", "\"loadavg_1\"", "\"loadavg_2\"", "\"dev\"", "\"prio\"",
00654   "\"proto\"", "\"pkttype\"", "\"pktlen\"", "\"datalen\"", "\"maclen\"",
00655   "\"mark\"", "\"tcindex\"", "\"rtclassid\"", "\"rtiif\"", "\"sk_family\"",
00656   "\"sk_state\"", "\"sk_reuse\"", "\"sk_refcnt\"", "\"sk_rcvbuf\"",
00657   "\"sk_sndbuf\"", "\"sk_shutdown\"", "\"sk_proto\"", "\"sk_type\"",
00658   "\"sk_rmem_alloc\"", "\"sk_wmem_alloc\"", "\"sk_wmem_queued\"",
00659   "\"sk_rcv_qlen\"", "\"sk_snd_qlen\"", "\"sk_err_qlen\"",
00660   "\"sk_forward_allocs\"", "\"sk_allocs\"", "\"sk_route_caps\"",
00661   "\"sk_hash\"", "\"sk_lingertime\"", "\"sk_ack_backlog\"",
00662   "\"sk_max_ack_backlog\"", "\"sk_prio\"", "\"sk_rcvlowat\"",
00663   "\"sk_rcvtimeo\"", "\"sk_sndtimeo\"", "\"sk_sendmsg_off\"",
00664   "\"sk_write_pending\"", "\"vlan\"", "\"rxhash\"", "\"devname\"",
00665   "\"sk_bound_if\"", "STR", "QUOTED", "$accept", "input", "expr", "match",
00666   "ematch", "cmp_match", "cmp_expr", "text_from", "text_to", "meta_value",
00667   "meta_int_id", "meta_var_id", "pattern", "pktloc", "align", "mask",
00668   "shift", "operand", 0
00669 };
00670 #endif
00671 
00672 # ifdef YYPRINT
00673 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00674    token YYLEX-NUM.  */
00675 static const yytype_uint16 yytoknum[] =
00676 {
00677        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
00678      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
00679      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
00680      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
00681      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
00682      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
00683      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
00684      325,   326,   327,   328
00685 };
00686 # endif
00687 
00688 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00689 static const yytype_uint8 yyr1[] =
00690 {
00691        0,    74,    75,    75,    76,    76,    77,    77,    78,    78,
00692       78,    78,    78,    79,    79,    80,    81,    81,    82,    82,
00693       83,    83,    83,    83,    84,    84,    84,    84,    84,    84,
00694       84,    84,    84,    84,    84,    84,    84,    84,    84,    84,
00695       84,    84,    84,    84,    84,    84,    84,    84,    84,    84,
00696       84,    84,    84,    84,    84,    84,    84,    84,    84,    84,
00697       84,    84,    84,    84,    84,    84,    84,    84,    84,    85,
00698       85,    86,    86,    87,    87,    88,    88,    88,    89,    89,
00699       90,    90,    91,    91,    91
00700 };
00701 
00702 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00703 static const yytype_uint8 yyr2[] =
00704 {
00705        0,     2,     0,     1,     1,     3,     2,     1,     1,     6,
00706        7,     6,     3,     4,     1,     3,     0,     2,     0,     2,
00707        1,     1,     3,     2,     1,     1,     1,     1,     1,     1,
00708        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
00709        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
00710        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
00711        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
00712        1,     1,     1,     1,     5,     0,     2,     2,     0,     2,
00713        0,     2,     1,     1,     1
00714 };
00715 
00716 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00717    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00718    means the default is an error.  */
00719 static const yytype_uint8 yydefact[] =
00720 {
00721        2,    75,     0,     0,    75,     0,     0,     0,     0,    73,
00722        0,     3,     4,     7,     8,    14,     0,     0,     6,    77,
00723       76,     0,    75,    75,     0,     0,     1,    75,    82,    83,
00724       84,     0,     0,    12,     0,     0,     0,    21,    24,    25,
00725       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
00726       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
00727       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
00728       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
00729       66,    67,    68,    69,    70,    20,     0,    80,    80,     5,
00730       15,     0,    13,     0,    16,     0,     0,    78,    23,    78,
00731       72,    71,     0,    75,    18,     0,    81,     0,    22,    74,
00732        9,    17,    75,     0,    11,    79,    19,    10
00733 };
00734 
00735 /* YYDEFGOTO[NTERM-NUM].  */
00736 static const yytype_int8 yydefgoto[] =
00737 {
00738       -1,    10,    11,    12,    13,    14,    15,   104,   113,    86,
00739       87,    88,   102,    16,    17,   108,    97,    31
00740 };
00741 
00742 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00743    STATE-NUM.  */
00744 #define YYPACT_NINF -63
00745 static const yytype_int8 yypact[] =
00746 {
00747       -4,    15,   -13,    -8,    11,    10,    14,    25,    29,   -63,
00748       26,   -63,    37,   -63,   -63,   -63,    16,    33,   -63,   -63,
00749      -63,    32,     1,     1,   -28,    65,   -63,    11,   -63,   -63,
00750      -63,    38,    34,   -63,    36,    28,   -24,   -63,   -63,   -63,
00751      -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,
00752      -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,
00753      -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,
00754      -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,   -63,
00755      -63,   -63,   -63,   -63,   -63,   -63,    16,    39,    39,   -63,
00756      -63,    43,   -63,   -62,    31,    65,    44,    42,   -63,    42,
00757      -63,   -63,    41,     1,    35,    45,   -63,    50,   -63,   -63,
00758      -63,   -63,     1,    47,   -63,   -63,   -63,   -63
00759 };
00760 
00761 /* YYPGOTO[NTERM-NUM].  */
00762 static const yytype_int8 yypgoto[] =
00763 {
00764      -63,   -63,    13,   -63,    59,   -63,    40,   -63,   -63,   -34,
00765      -63,   -63,   -63,   -23,   -63,   -36,   -22,   -21
00766 };
00767 
00768 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00769    positive, shift that token.  If negative, reduce the rule which
00770    number is the opposite.  If zero, do what YYDEFACT says.
00771    If YYTABLE_NINF, syntax error.  */
00772 #define YYTABLE_NINF -76
00773 static const yytype_int8 yytable[] =
00774 {
00775       35,     1,    19,     2,     3,   -75,     4,    20,     2,     3,
00776      100,   101,     5,     6,     7,     8,     1,    21,     2,     3,
00777       22,     4,     2,     3,    23,     4,    26,     5,     6,     7,
00778        8,     5,     6,     7,     8,    24,    28,    29,    30,    25,
00779       89,    27,    32,    33,    36,    90,    91,    92,    93,    94,
00780       99,   106,   110,    96,   103,   107,   114,   115,   117,   112,
00781       18,   105,    34,   109,     0,    95,    98,     0,     9,     0,
00782        0,     0,    37,     9,     0,     0,     0,     0,     0,     0,
00783      111,     0,     0,     9,     0,     0,     0,     9,     0,   116,
00784       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
00785       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
00786       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
00787       68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
00788       78,    79,    80,    81,    82,    83,    84,     0,    85
00789 };
00790 
00791 static const yytype_int8 yycheck[] =
00792 {
00793       23,     5,    15,     7,     8,     9,    10,    15,     7,     8,
00794       72,    73,    16,    17,    18,    19,     5,     4,     7,     8,
00795       10,    10,     7,     8,    10,    10,     0,    16,    17,    18,
00796       19,    16,    17,    18,    19,    10,    20,    21,    22,    10,
00797       27,     4,     9,    11,    72,     7,    12,    11,    20,    73,
00798        7,     7,    11,    14,    23,    13,    11,     7,    11,    24,
00799        1,    95,    22,    99,    -1,    86,    88,    -1,    72,    -1,
00800       -1,    -1,     7,    72,    -1,    -1,    -1,    -1,    -1,    -1,
00801      103,    -1,    -1,    72,    -1,    -1,    -1,    72,    -1,   112,
00802       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
00803       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
00804       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
00805       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
00806       65,    66,    67,    68,    69,    70,    71,    -1,    73
00807 };
00808 
00809 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
00810    symbol of state STATE-NUM.  */
00811 static const yytype_uint8 yystos[] =
00812 {
00813        0,     5,     7,     8,    10,    16,    17,    18,    19,    72,
00814       75,    76,    77,    78,    79,    80,    87,    88,    78,    15,
00815       15,    76,    10,    10,    10,    10,     0,     4,    20,    21,
00816       22,    91,     9,    11,    80,    87,    72,     7,    25,    26,
00817       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
00818       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
00819       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
00820       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
00821       67,    68,    69,    70,    71,    73,    83,    84,    85,    76,
00822        7,    12,    11,    20,    73,    91,    14,    90,    90,     7,
00823       72,    73,    86,    23,    81,    83,     7,    13,    89,    89,
00824       11,    87,    24,    82,    11,     7,    87,    11
00825 };
00826 
00827 #define yyerrok         (yyerrstatus = 0)
00828 #define yyclearin       (yychar = YYEMPTY)
00829 #define YYEMPTY         (-2)
00830 #define YYEOF           0
00831 
00832 #define YYACCEPT        goto yyacceptlab
00833 #define YYABORT         goto yyabortlab
00834 #define YYERROR         goto yyerrorlab
00835 
00836 
00837 /* Like YYERROR except do call yyerror.  This remains here temporarily
00838    to ease the transition to the new meaning of YYERROR, for GCC.
00839    Once GCC version 2 has supplanted version 1, this can go.  However,
00840    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
00841    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
00842    discussed.  */
00843 
00844 #define YYFAIL          goto yyerrlab
00845 #if defined YYFAIL
00846   /* This is here to suppress warnings from the GCC cpp's
00847      -Wunused-macros.  Normally we don't worry about that warning, but
00848      some users do, and we want to make it easy for users to remove
00849      YYFAIL uses, which will produce warnings from Bison 2.5.  */
00850 #endif
00851 
00852 #define YYRECOVERING()  (!!yyerrstatus)
00853 
00854 #define YYBACKUP(Token, Value)                                  \
00855 do                                                              \
00856   if (yychar == YYEMPTY && yylen == 1)                          \
00857     {                                                           \
00858       yychar = (Token);                                         \
00859       yylval = (Value);                                         \
00860       yytoken = YYTRANSLATE (yychar);                           \
00861       YYPOPSTACK (1);                                           \
00862       goto yybackup;                                            \
00863     }                                                           \
00864   else                                                          \
00865     {                                                           \
00866       yyerror (scanner, errp, root, YY_("syntax error: cannot back up")); \
00867       YYERROR;                                                  \
00868     }                                                           \
00869 while (YYID (0))
00870 
00871 
00872 #define YYTERROR        1
00873 #define YYERRCODE       256
00874 
00875 
00876 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
00877    If N is 0, then set CURRENT to the empty location which ends
00878    the previous symbol: RHS[0] (always defined).  */
00879 
00880 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00881 #ifndef YYLLOC_DEFAULT
00882 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
00883     do                                                                  \
00884       if (YYID (N))                                                    \
00885         {                                                               \
00886           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
00887           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
00888           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
00889           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
00890         }                                                               \
00891       else                                                              \
00892         {                                                               \
00893           (Current).first_line   = (Current).last_line   =              \
00894             YYRHSLOC (Rhs, 0).last_line;                                \
00895           (Current).first_column = (Current).last_column =              \
00896             YYRHSLOC (Rhs, 0).last_column;                              \
00897         }                                                               \
00898     while (YYID (0))
00899 #endif
00900 
00901 
00902 /* YY_LOCATION_PRINT -- Print the location on the stream.
00903    This macro was not mandated originally: define only if we know
00904    we won't break user code: when these are the locations we know.  */
00905 
00906 #ifndef YY_LOCATION_PRINT
00907 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
00908 #  define YY_LOCATION_PRINT(File, Loc)                  \
00909      fprintf (File, "%d.%d-%d.%d",                      \
00910               (Loc).first_line, (Loc).first_column,     \
00911               (Loc).last_line,  (Loc).last_column)
00912 # else
00913 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00914 # endif
00915 #endif
00916 
00917 
00918 /* YYLEX -- calling `yylex' with the right arguments.  */
00919 
00920 #ifdef YYLEX_PARAM
00921 # define YYLEX yylex (&yylval, YYLEX_PARAM)
00922 #else
00923 # define YYLEX yylex (&yylval, scanner)
00924 #endif
00925 
00926 /* Enable debugging if requested.  */
00927 #if YYDEBUG
00928 
00929 # ifndef YYFPRINTF
00930 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00931 #  define YYFPRINTF fprintf
00932 # endif
00933 
00934 # define YYDPRINTF(Args)                        \
00935 do {                                            \
00936   if (yydebug)                                  \
00937     YYFPRINTF Args;                             \
00938 } while (YYID (0))
00939 
00940 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
00941 do {                                                                      \
00942   if (yydebug)                                                            \
00943     {                                                                     \
00944       YYFPRINTF (stderr, "%s ", Title);                                   \
00945       yy_symbol_print (stderr,                                            \
00946                   Type, Value, scanner, errp, root); \
00947       YYFPRINTF (stderr, "\n");                                           \
00948     }                                                                     \
00949 } while (YYID (0))
00950 
00951 
00952 /*--------------------------------.
00953 | Print this symbol on YYOUTPUT.  |
00954 `--------------------------------*/
00955 
00956 /*ARGSUSED*/
00957 #if (defined __STDC__ || defined __C99__FUNC__ \
00958      || defined __cplusplus || defined _MSC_VER)
00959 static void
00960 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, char **errp, struct nl_list_head *root)
00961 #else
00962 static void
00963 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, errp, root)
00964     FILE *yyoutput;
00965     int yytype;
00966     YYSTYPE const * const yyvaluep;
00967     void *scanner;
00968     char **errp;
00969     struct nl_list_head *root;
00970 #endif
00971 {
00972   if (!yyvaluep)
00973     return;
00974   YYUSE (scanner);
00975   YYUSE (errp);
00976   YYUSE (root);
00977 # ifdef YYPRINT
00978   if (yytype < YYNTOKENS)
00979     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00980 # else
00981   YYUSE (yyoutput);
00982 # endif
00983   switch (yytype)
00984     {
00985       default:
00986         break;
00987     }
00988 }
00989 
00990 
00991 /*--------------------------------.
00992 | Print this symbol on YYOUTPUT.  |
00993 `--------------------------------*/
00994 
00995 #if (defined __STDC__ || defined __C99__FUNC__ \
00996      || defined __cplusplus || defined _MSC_VER)
00997 static void
00998 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner, char **errp, struct nl_list_head *root)
00999 #else
01000 static void
01001 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, errp, root)
01002     FILE *yyoutput;
01003     int yytype;
01004     YYSTYPE const * const yyvaluep;
01005     void *scanner;
01006     char **errp;
01007     struct nl_list_head *root;
01008 #endif
01009 {
01010   if (yytype < YYNTOKENS)
01011     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
01012   else
01013     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
01014 
01015   yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, errp, root);
01016   YYFPRINTF (yyoutput, ")");
01017 }
01018 
01019 /*------------------------------------------------------------------.
01020 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
01021 | TOP (included).                                                   |
01022 `------------------------------------------------------------------*/
01023 
01024 #if (defined __STDC__ || defined __C99__FUNC__ \
01025      || defined __cplusplus || defined _MSC_VER)
01026 static void
01027 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
01028 #else
01029 static void
01030 yy_stack_print (yybottom, yytop)
01031     yytype_int16 *yybottom;
01032     yytype_int16 *yytop;
01033 #endif
01034 {
01035   YYFPRINTF (stderr, "Stack now");
01036   for (; yybottom <= yytop; yybottom++)
01037     {
01038       int yybot = *yybottom;
01039       YYFPRINTF (stderr, " %d", yybot);
01040     }
01041   YYFPRINTF (stderr, "\n");
01042 }
01043 
01044 # define YY_STACK_PRINT(Bottom, Top)                            \
01045 do {                                                            \
01046   if (yydebug)                                                  \
01047     yy_stack_print ((Bottom), (Top));                           \
01048 } while (YYID (0))
01049 
01050 
01051 /*------------------------------------------------.
01052 | Report that the YYRULE is going to be reduced.  |
01053 `------------------------------------------------*/
01054 
01055 #if (defined __STDC__ || defined __C99__FUNC__ \
01056      || defined __cplusplus || defined _MSC_VER)
01057 static void
01058 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner, char **errp, struct nl_list_head *root)
01059 #else
01060 static void
01061 yy_reduce_print (yyvsp, yyrule, scanner, errp, root)
01062     YYSTYPE *yyvsp;
01063     int yyrule;
01064     void *scanner;
01065     char **errp;
01066     struct nl_list_head *root;
01067 #endif
01068 {
01069   int yynrhs = yyr2[yyrule];
01070   int yyi;
01071   unsigned long int yylno = yyrline[yyrule];
01072   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
01073              yyrule - 1, yylno);
01074   /* The symbols being reduced.  */
01075   for (yyi = 0; yyi < yynrhs; yyi++)
01076     {
01077       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
01078       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
01079                        &(yyvsp[(yyi + 1) - (yynrhs)])
01080                                        , scanner, errp, root);
01081       YYFPRINTF (stderr, "\n");
01082     }
01083 }
01084 
01085 # define YY_REDUCE_PRINT(Rule)          \
01086 do {                                    \
01087   if (yydebug)                          \
01088     yy_reduce_print (yyvsp, Rule, scanner, errp, root); \
01089 } while (YYID (0))
01090 
01091 /* Nonzero means print parse trace.  It is left uninitialized so that
01092    multiple parsers can coexist.  */
01093 int yydebug;
01094 #else /* !YYDEBUG */
01095 # define YYDPRINTF(Args)
01096 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
01097 # define YY_STACK_PRINT(Bottom, Top)
01098 # define YY_REDUCE_PRINT(Rule)
01099 #endif /* !YYDEBUG */
01100 
01101 
01102 /* YYINITDEPTH -- initial size of the parser's stacks.  */
01103 #ifndef YYINITDEPTH
01104 # define YYINITDEPTH 200
01105 #endif
01106 
01107 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
01108    if the built-in stack extension method is used).
01109 
01110    Do not make this value too large; the results are undefined if
01111    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
01112    evaluated with infinite-precision integer arithmetic.  */
01113 
01114 #ifndef YYMAXDEPTH
01115 # define YYMAXDEPTH 10000
01116 #endif
01117 
01118 
01119 
01120 #if YYERROR_VERBOSE
01121 
01122 # ifndef yystrlen
01123 #  if defined __GLIBC__ && defined _STRING_H
01124 #   define yystrlen strlen
01125 #  else
01126 /* Return the length of YYSTR.  */
01127 #if (defined __STDC__ || defined __C99__FUNC__ \
01128      || defined __cplusplus || defined _MSC_VER)
01129 static YYSIZE_T
01130 yystrlen (const char *yystr)
01131 #else
01132 static YYSIZE_T
01133 yystrlen (yystr)
01134     const char *yystr;
01135 #endif
01136 {
01137   YYSIZE_T yylen;
01138   for (yylen = 0; yystr[yylen]; yylen++)
01139     continue;
01140   return yylen;
01141 }
01142 #  endif
01143 # endif
01144 
01145 # ifndef yystpcpy
01146 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
01147 #   define yystpcpy stpcpy
01148 #  else
01149 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
01150    YYDEST.  */
01151 #if (defined __STDC__ || defined __C99__FUNC__ \
01152      || defined __cplusplus || defined _MSC_VER)
01153 static char *
01154 yystpcpy (char *yydest, const char *yysrc)
01155 #else
01156 static char *
01157 yystpcpy (yydest, yysrc)
01158     char *yydest;
01159     const char *yysrc;
01160 #endif
01161 {
01162   char *yyd = yydest;
01163   const char *yys = yysrc;
01164 
01165   while ((*yyd++ = *yys++) != '\0')
01166     continue;
01167 
01168   return yyd - 1;
01169 }
01170 #  endif
01171 # endif
01172 
01173 # ifndef yytnamerr
01174 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
01175    quotes and backslashes, so that it's suitable for yyerror.  The
01176    heuristic is that double-quoting is unnecessary unless the string
01177    contains an apostrophe, a comma, or backslash (other than
01178    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
01179    null, do not copy; instead, return the length of what the result
01180    would have been.  */
01181 static YYSIZE_T
01182 yytnamerr (char *yyres, const char *yystr)
01183 {
01184   if (*yystr == '"')
01185     {
01186       YYSIZE_T yyn = 0;
01187       char const *yyp = yystr;
01188 
01189       for (;;)
01190         switch (*++yyp)
01191           {
01192           case '\'':
01193           case ',':
01194             goto do_not_strip_quotes;
01195 
01196           case '\\':
01197             if (*++yyp != '\\')
01198               goto do_not_strip_quotes;
01199             /* Fall through.  */
01200           default:
01201             if (yyres)
01202               yyres[yyn] = *yyp;
01203             yyn++;
01204             break;
01205 
01206           case '"':
01207             if (yyres)
01208               yyres[yyn] = '\0';
01209             return yyn;
01210           }
01211     do_not_strip_quotes: ;
01212     }
01213 
01214   if (! yyres)
01215     return yystrlen (yystr);
01216 
01217   return yystpcpy (yyres, yystr) - yyres;
01218 }
01219 # endif
01220 
01221 /* Copy into YYRESULT an error message about the unexpected token
01222    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
01223    including the terminating null byte.  If YYRESULT is null, do not
01224    copy anything; just return the number of bytes that would be
01225    copied.  As a special case, return 0 if an ordinary "syntax error"
01226    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
01227    size calculation.  */
01228 static YYSIZE_T
01229 yysyntax_error (char *yyresult, int yystate, int yychar)
01230 {
01231   int yyn = yypact[yystate];
01232 
01233   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
01234     return 0;
01235   else
01236     {
01237       int yytype = YYTRANSLATE (yychar);
01238       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
01239       YYSIZE_T yysize = yysize0;
01240       YYSIZE_T yysize1;
01241       int yysize_overflow = 0;
01242       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
01243       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
01244       int yyx;
01245 
01246 # if 0
01247       /* This is so xgettext sees the translatable formats that are
01248          constructed on the fly.  */
01249       YY_("syntax error, unexpected %s");
01250       YY_("syntax error, unexpected %s, expecting %s");
01251       YY_("syntax error, unexpected %s, expecting %s or %s");
01252       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
01253       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
01254 # endif
01255       char *yyfmt;
01256       char const *yyf;
01257       static char const yyunexpected[] = "syntax error, unexpected %s";
01258       static char const yyexpecting[] = ", expecting %s";
01259       static char const yyor[] = " or %s";
01260       char yyformat[sizeof yyunexpected
01261                     + sizeof yyexpecting - 1
01262                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
01263                        * (sizeof yyor - 1))];
01264       char const *yyprefix = yyexpecting;
01265 
01266       /* Start YYX at -YYN if negative to avoid negative indexes in
01267          YYCHECK.  */
01268       int yyxbegin = yyn < 0 ? -yyn : 0;
01269 
01270       /* Stay within bounds of both yycheck and yytname.  */
01271       int yychecklim = YYLAST - yyn + 1;
01272       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
01273       int yycount = 1;
01274 
01275       yyarg[0] = yytname[yytype];
01276       yyfmt = yystpcpy (yyformat, yyunexpected);
01277 
01278       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01279         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01280           {
01281             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01282               {
01283                 yycount = 1;
01284                 yysize = yysize0;
01285                 yyformat[sizeof yyunexpected - 1] = '\0';
01286                 break;
01287               }
01288             yyarg[yycount++] = yytname[yyx];
01289             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01290             yysize_overflow |= (yysize1 < yysize);
01291             yysize = yysize1;
01292             yyfmt = yystpcpy (yyfmt, yyprefix);
01293             yyprefix = yyor;
01294           }
01295 
01296       yyf = YY_(yyformat);
01297       yysize1 = yysize + yystrlen (yyf);
01298       yysize_overflow |= (yysize1 < yysize);
01299       yysize = yysize1;
01300 
01301       if (yysize_overflow)
01302         return YYSIZE_MAXIMUM;
01303 
01304       if (yyresult)
01305         {
01306           /* Avoid sprintf, as that infringes on the user's name space.
01307              Don't have undefined behavior even if the translation
01308              produced a string with the wrong number of "%s"s.  */
01309           char *yyp = yyresult;
01310           int yyi = 0;
01311           while ((*yyp = *yyf) != '\0')
01312             {
01313               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01314                 {
01315                   yyp += yytnamerr (yyp, yyarg[yyi++]);
01316                   yyf += 2;
01317                 }
01318               else
01319                 {
01320                   yyp++;
01321                   yyf++;
01322                 }
01323             }
01324         }
01325       return yysize;
01326     }
01327 }
01328 #endif /* YYERROR_VERBOSE */
01329 
01330 
01331 /*-----------------------------------------------.
01332 | Release the memory associated to this symbol.  |
01333 `-----------------------------------------------*/
01334 
01335 /*ARGSUSED*/
01336 #if (defined __STDC__ || defined __C99__FUNC__ \
01337      || defined __cplusplus || defined _MSC_VER)
01338 static void
01339 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner, char **errp, struct nl_list_head *root)
01340 #else
01341 static void
01342 yydestruct (yymsg, yytype, yyvaluep, scanner, errp, root)
01343     const char *yymsg;
01344     int yytype;
01345     YYSTYPE *yyvaluep;
01346     void *scanner;
01347     char **errp;
01348     struct nl_list_head *root;
01349 #endif
01350 {
01351   YYUSE (yyvaluep);
01352   YYUSE (scanner);
01353   YYUSE (errp);
01354   YYUSE (root);
01355 
01356   if (!yymsg)
01357     yymsg = "Deleting";
01358   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01359 
01360   switch (yytype)
01361     {
01362       case 72: /* "STR" */
01363 
01364 /* Line 1009 of yacc.c  */
01365 #line 137 "route/cls/ematch_syntax.y"
01366         { free((yyvaluep->s)); NL_DBG(2, "string destructor\n"); };
01367 
01368 /* Line 1009 of yacc.c  */
01369 #line 1370 "route/cls/ematch_syntax.c"
01370         break;
01371       case 73: /* "QUOTED" */
01372 
01373 /* Line 1009 of yacc.c  */
01374 #line 139 "route/cls/ematch_syntax.y"
01375         { free((yyvaluep->q).data); NL_DBG(2, "quoted destructor\n"); };
01376 
01377 /* Line 1009 of yacc.c  */
01378 #line 1379 "route/cls/ematch_syntax.c"
01379         break;
01380       case 81: /* "text_from" */
01381 
01382 /* Line 1009 of yacc.c  */
01383 #line 138 "route/cls/ematch_syntax.y"
01384         { rtnl_pktloc_put((yyvaluep->loc)); NL_DBG(2, "pktloc destructor\n"); };
01385 
01386 /* Line 1009 of yacc.c  */
01387 #line 1388 "route/cls/ematch_syntax.c"
01388         break;
01389       case 82: /* "text_to" */
01390 
01391 /* Line 1009 of yacc.c  */
01392 #line 138 "route/cls/ematch_syntax.y"
01393         { rtnl_pktloc_put((yyvaluep->loc)); NL_DBG(2, "pktloc destructor\n"); };
01394 
01395 /* Line 1009 of yacc.c  */
01396 #line 1397 "route/cls/ematch_syntax.c"
01397         break;
01398       case 83: /* "meta_value" */
01399 
01400 /* Line 1009 of yacc.c  */
01401 #line 140 "route/cls/ematch_syntax.y"
01402         { rtnl_meta_value_put((yyvaluep->mv)); NL_DBG(2, "meta value destructor\n"); };
01403 
01404 /* Line 1009 of yacc.c  */
01405 #line 1406 "route/cls/ematch_syntax.c"
01406         break;
01407       case 86: /* "pattern" */
01408 
01409 /* Line 1009 of yacc.c  */
01410 #line 139 "route/cls/ematch_syntax.y"
01411         { free((yyvaluep->q).data); NL_DBG(2, "quoted destructor\n"); };
01412 
01413 /* Line 1009 of yacc.c  */
01414 #line 1415 "route/cls/ematch_syntax.c"
01415         break;
01416       case 87: /* "pktloc" */
01417 
01418 /* Line 1009 of yacc.c  */
01419 #line 138 "route/cls/ematch_syntax.y"
01420         { rtnl_pktloc_put((yyvaluep->loc)); NL_DBG(2, "pktloc destructor\n"); };
01421 
01422 /* Line 1009 of yacc.c  */
01423 #line 1424 "route/cls/ematch_syntax.c"
01424         break;
01425 
01426       default:
01427         break;
01428     }
01429 }
01430 
01431 /* Prevent warnings from -Wmissing-prototypes.  */
01432 #ifdef YYPARSE_PARAM
01433 #if defined __STDC__ || defined __cplusplus
01434 int yyparse (void *YYPARSE_PARAM);
01435 #else
01436 int yyparse ();
01437 #endif
01438 #else /* ! YYPARSE_PARAM */
01439 #if defined __STDC__ || defined __cplusplus
01440 int yyparse (void *scanner, char **errp, struct nl_list_head *root);
01441 #else
01442 int yyparse ();
01443 #endif
01444 #endif /* ! YYPARSE_PARAM */
01445 
01446 
01447 
01448 
01449 
01450 /*-------------------------.
01451 | yyparse or yypush_parse.  |
01452 `-------------------------*/
01453 
01454 #ifdef YYPARSE_PARAM
01455 #if (defined __STDC__ || defined __C99__FUNC__ \
01456      || defined __cplusplus || defined _MSC_VER)
01457 int
01458 yyparse (void *YYPARSE_PARAM)
01459 #else
01460 int
01461 yyparse (YYPARSE_PARAM)
01462     void *YYPARSE_PARAM;
01463 #endif
01464 #else /* ! YYPARSE_PARAM */
01465 #if (defined __STDC__ || defined __C99__FUNC__ \
01466      || defined __cplusplus || defined _MSC_VER)
01467 int
01468 yyparse (void *scanner, char **errp, struct nl_list_head *root)
01469 #else
01470 int
01471 yyparse (scanner, errp, root)
01472     void *scanner;
01473     char **errp;
01474     struct nl_list_head *root;
01475 #endif
01476 #endif
01477 {
01478 /* The lookahead symbol.  */
01479 int yychar;
01480 
01481 /* The semantic value of the lookahead symbol.  */
01482 YYSTYPE yylval;
01483 
01484     /* Number of syntax errors so far.  */
01485     int yynerrs;
01486 
01487     int yystate;
01488     /* Number of tokens to shift before error messages enabled.  */
01489     int yyerrstatus;
01490 
01491     /* The stacks and their tools:
01492        `yyss': related to states.
01493        `yyvs': related to semantic values.
01494 
01495        Refer to the stacks thru separate pointers, to allow yyoverflow
01496        to reallocate them elsewhere.  */
01497 
01498     /* The state stack.  */
01499     yytype_int16 yyssa[YYINITDEPTH];
01500     yytype_int16 *yyss;
01501     yytype_int16 *yyssp;
01502 
01503     /* The semantic value stack.  */
01504     YYSTYPE yyvsa[YYINITDEPTH];
01505     YYSTYPE *yyvs;
01506     YYSTYPE *yyvsp;
01507 
01508     YYSIZE_T yystacksize;
01509 
01510   int yyn;
01511   int yyresult;
01512   /* Lookahead token as an internal (translated) token number.  */
01513   int yytoken;
01514   /* The variables used to return semantic value and location from the
01515      action routines.  */
01516   YYSTYPE yyval;
01517 
01518 #if YYERROR_VERBOSE
01519   /* Buffer for error messages, and its allocated size.  */
01520   char yymsgbuf[128];
01521   char *yymsg = yymsgbuf;
01522   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01523 #endif
01524 
01525 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
01526 
01527   /* The number of symbols on the RHS of the reduced rule.
01528      Keep to zero when no symbol should be popped.  */
01529   int yylen = 0;
01530 
01531   yytoken = 0;
01532   yyss = yyssa;
01533   yyvs = yyvsa;
01534   yystacksize = YYINITDEPTH;
01535 
01536   YYDPRINTF ((stderr, "Starting parse\n"));
01537 
01538   yystate = 0;
01539   yyerrstatus = 0;
01540   yynerrs = 0;
01541   yychar = YYEMPTY; /* Cause a token to be read.  */
01542 
01543   /* Initialize stack pointers.
01544      Waste one element of value and location stack
01545      so that they stay on the same level as the state stack.
01546      The wasted elements are never initialized.  */
01547   yyssp = yyss;
01548   yyvsp = yyvs;
01549 
01550   goto yysetstate;
01551 
01552 /*------------------------------------------------------------.
01553 | yynewstate -- Push a new state, which is found in yystate.  |
01554 `------------------------------------------------------------*/
01555  yynewstate:
01556   /* In all cases, when you get here, the value and location stacks
01557      have just been pushed.  So pushing a state here evens the stacks.  */
01558   yyssp++;
01559 
01560  yysetstate:
01561   *yyssp = yystate;
01562 
01563   if (yyss + yystacksize - 1 <= yyssp)
01564     {
01565       /* Get the current used size of the three stacks, in elements.  */
01566       YYSIZE_T yysize = yyssp - yyss + 1;
01567 
01568 #ifdef yyoverflow
01569       {
01570         /* Give user a chance to reallocate the stack.  Use copies of
01571            these so that the &'s don't force the real ones into
01572            memory.  */
01573         YYSTYPE *yyvs1 = yyvs;
01574         yytype_int16 *yyss1 = yyss;
01575 
01576         /* Each stack pointer address is followed by the size of the
01577            data in use in that stack, in bytes.  This used to be a
01578            conditional around just the two extra args, but that might
01579            be undefined if yyoverflow is a macro.  */
01580         yyoverflow (YY_("memory exhausted"),
01581                     &yyss1, yysize * sizeof (*yyssp),
01582                     &yyvs1, yysize * sizeof (*yyvsp),
01583                     &yystacksize);
01584 
01585         yyss = yyss1;
01586         yyvs = yyvs1;
01587       }
01588 #else /* no yyoverflow */
01589 # ifndef YYSTACK_RELOCATE
01590       goto yyexhaustedlab;
01591 # else
01592       /* Extend the stack our own way.  */
01593       if (YYMAXDEPTH <= yystacksize)
01594         goto yyexhaustedlab;
01595       yystacksize *= 2;
01596       if (YYMAXDEPTH < yystacksize)
01597         yystacksize = YYMAXDEPTH;
01598 
01599       {
01600         yytype_int16 *yyss1 = yyss;
01601         union yyalloc *yyptr =
01602           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01603         if (! yyptr)
01604           goto yyexhaustedlab;
01605         YYSTACK_RELOCATE (yyss_alloc, yyss);
01606         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
01607 #  undef YYSTACK_RELOCATE
01608         if (yyss1 != yyssa)
01609           YYSTACK_FREE (yyss1);
01610       }
01611 # endif
01612 #endif /* no yyoverflow */
01613 
01614       yyssp = yyss + yysize - 1;
01615       yyvsp = yyvs + yysize - 1;
01616 
01617       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01618                   (unsigned long int) yystacksize));
01619 
01620       if (yyss + yystacksize - 1 <= yyssp)
01621         YYABORT;
01622     }
01623 
01624   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01625 
01626   if (yystate == YYFINAL)
01627     YYACCEPT;
01628 
01629   goto yybackup;
01630 
01631 /*-----------.
01632 | yybackup.  |
01633 `-----------*/
01634 yybackup:
01635 
01636   /* Do appropriate processing given the current state.  Read a
01637      lookahead token if we need one and don't already have one.  */
01638 
01639   /* First try to decide what to do without reference to lookahead token.  */
01640   yyn = yypact[yystate];
01641   if (yyn == YYPACT_NINF)
01642     goto yydefault;
01643 
01644   /* Not known => get a lookahead token if don't already have one.  */
01645 
01646   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
01647   if (yychar == YYEMPTY)
01648     {
01649       YYDPRINTF ((stderr, "Reading a token: "));
01650       yychar = YYLEX;
01651     }
01652 
01653   if (yychar <= YYEOF)
01654     {
01655       yychar = yytoken = YYEOF;
01656       YYDPRINTF ((stderr, "Now at end of input.\n"));
01657     }
01658   else
01659     {
01660       yytoken = YYTRANSLATE (yychar);
01661       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01662     }
01663 
01664   /* If the proper action on seeing token YYTOKEN is to reduce or to
01665      detect an error, take that action.  */
01666   yyn += yytoken;
01667   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01668     goto yydefault;
01669   yyn = yytable[yyn];
01670   if (yyn <= 0)
01671     {
01672       if (yyn == 0 || yyn == YYTABLE_NINF)
01673         goto yyerrlab;
01674       yyn = -yyn;
01675       goto yyreduce;
01676     }
01677 
01678   /* Count tokens shifted since error; after three, turn off error
01679      status.  */
01680   if (yyerrstatus)
01681     yyerrstatus--;
01682 
01683   /* Shift the lookahead token.  */
01684   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01685 
01686   /* Discard the shifted token.  */
01687   yychar = YYEMPTY;
01688 
01689   yystate = yyn;
01690   *++yyvsp = yylval;
01691 
01692   goto yynewstate;
01693 
01694 
01695 /*-----------------------------------------------------------.
01696 | yydefault -- do the default action for the current state.  |
01697 `-----------------------------------------------------------*/
01698 yydefault:
01699   yyn = yydefact[yystate];
01700   if (yyn == 0)
01701     goto yyerrlab;
01702   goto yyreduce;
01703 
01704 
01705 /*-----------------------------.
01706 | yyreduce -- Do a reduction.  |
01707 `-----------------------------*/
01708 yyreduce:
01709   /* yyn is the number of a rule to reduce with.  */
01710   yylen = yyr2[yyn];
01711 
01712   /* If YYLEN is nonzero, implement the default value of the action:
01713      `$$ = $1'.
01714 
01715      Otherwise, the following line sets YYVAL to garbage.
01716      This behavior is undocumented and Bison
01717      users should not rely upon it.  Assigning to YYVAL
01718      unconditionally makes the parser a bit smaller, and it avoids a
01719      GCC warning that YYVAL may be used uninitialized.  */
01720   yyval = yyvsp[1-yylen];
01721 
01722 
01723   YY_REDUCE_PRINT (yyn);
01724   switch (yyn)
01725     {
01726         case 3:
01727 
01728 /* Line 1464 of yacc.c  */
01729 #line 149 "route/cls/ematch_syntax.y"
01730     {
01731                         nl_list_add_tail(root, &(yyvsp[(1) - (1)].e)->e_list);
01732                 }
01733     break;
01734 
01735   case 4:
01736 
01737 /* Line 1464 of yacc.c  */
01738 #line 156 "route/cls/ematch_syntax.y"
01739     {
01740                         (yyval.e) = (yyvsp[(1) - (1)].e);
01741                 }
01742     break;
01743 
01744   case 5:
01745 
01746 /* Line 1464 of yacc.c  */
01747 #line 160 "route/cls/ematch_syntax.y"
01748     {
01749                         rtnl_ematch_set_flags((yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].i));
01750 
01751                         /* make ematch new head */
01752                         nl_list_add_tail(&(yyvsp[(1) - (3)].e)->e_list, &(yyvsp[(3) - (3)].e)->e_list);
01753 
01754                         (yyval.e) = (yyvsp[(1) - (3)].e);
01755                 }
01756     break;
01757 
01758   case 6:
01759 
01760 /* Line 1464 of yacc.c  */
01761 #line 172 "route/cls/ematch_syntax.y"
01762     {
01763                         rtnl_ematch_set_flags((yyvsp[(2) - (2)].e), TCF_EM_INVERT);
01764                         (yyval.e) = (yyvsp[(2) - (2)].e);
01765                 }
01766     break;
01767 
01768   case 7:
01769 
01770 /* Line 1464 of yacc.c  */
01771 #line 177 "route/cls/ematch_syntax.y"
01772     {
01773                         (yyval.e) = (yyvsp[(1) - (1)].e);
01774                 }
01775     break;
01776 
01777   case 8:
01778 
01779 /* Line 1464 of yacc.c  */
01780 #line 185 "route/cls/ematch_syntax.y"
01781     {
01782                         struct rtnl_ematch *e;
01783 
01784                         if (!(e = rtnl_ematch_alloc())) {
01785                                 asprintf(errp, "Unable to allocate ematch object");
01786                                 YYABORT;
01787                         }
01788 
01789                         if (rtnl_ematch_set_kind(e, TCF_EM_CMP) < 0)
01790                                 BUG();
01791 
01792                         rtnl_ematch_cmp_set(e, &(yyvsp[(1) - (1)].cmp));
01793                         (yyval.e) = e;
01794                 }
01795     break;
01796 
01797   case 9:
01798 
01799 /* Line 1464 of yacc.c  */
01800 #line 200 "route/cls/ematch_syntax.y"
01801     {
01802                         struct rtnl_ematch *e;
01803 
01804                         if (!(e = rtnl_ematch_alloc())) {
01805                                 asprintf(errp, "Unable to allocate ematch object");
01806                                 YYABORT;
01807                         }
01808 
01809                         if (rtnl_ematch_set_kind(e, TCF_EM_NBYTE) < 0)
01810                                 BUG();
01811 
01812                         rtnl_ematch_nbyte_set_offset(e, (yyvsp[(3) - (6)].loc)->layer, (yyvsp[(3) - (6)].loc)->offset);
01813                         rtnl_pktloc_put((yyvsp[(3) - (6)].loc));
01814                         rtnl_ematch_nbyte_set_pattern(e, (uint8_t *) (yyvsp[(5) - (6)].q).data, (yyvsp[(5) - (6)].q).index);
01815 
01816                         (yyval.e) = e;
01817                 }
01818     break;
01819 
01820   case 10:
01821 
01822 /* Line 1464 of yacc.c  */
01823 #line 218 "route/cls/ematch_syntax.y"
01824     {
01825                         struct rtnl_ematch *e;
01826 
01827                         if (!(e = rtnl_ematch_alloc())) {
01828                                 asprintf(errp, "Unable to allocate ematch object");
01829                                 YYABORT;
01830                         }
01831 
01832                         if (rtnl_ematch_set_kind(e, TCF_EM_TEXT) < 0)
01833                                 BUG();
01834 
01835                         rtnl_ematch_text_set_algo(e, (yyvsp[(3) - (7)].s));
01836                         rtnl_ematch_text_set_pattern(e, (yyvsp[(4) - (7)].q).data, (yyvsp[(4) - (7)].q).index);
01837 
01838                         if ((yyvsp[(5) - (7)].loc)) {
01839                                 rtnl_ematch_text_set_from(e, (yyvsp[(5) - (7)].loc)->layer, (yyvsp[(5) - (7)].loc)->offset);
01840                                 rtnl_pktloc_put((yyvsp[(5) - (7)].loc));
01841                         }
01842 
01843                         if ((yyvsp[(6) - (7)].loc)) {
01844                                 rtnl_ematch_text_set_to(e, (yyvsp[(6) - (7)].loc)->layer, (yyvsp[(6) - (7)].loc)->offset);
01845                                 rtnl_pktloc_put((yyvsp[(6) - (7)].loc));
01846                         }
01847 
01848                         (yyval.e) = e;
01849                 }
01850     break;
01851 
01852   case 11:
01853 
01854 /* Line 1464 of yacc.c  */
01855 #line 245 "route/cls/ematch_syntax.y"
01856     {
01857                         struct rtnl_ematch *e;
01858 
01859                         if (!(e = rtnl_ematch_alloc())) {
01860                                 asprintf(errp, "Unable to allocate ematch object");
01861                                 YYABORT;
01862                         }
01863 
01864                         if (rtnl_ematch_set_kind(e, TCF_EM_META) < 0)
01865                                 BUG();
01866 
01867                         rtnl_ematch_meta_set_lvalue(e, (yyvsp[(3) - (6)].mv));
01868                         rtnl_ematch_meta_set_rvalue(e, (yyvsp[(5) - (6)].mv));
01869                         rtnl_ematch_meta_set_operand(e, (yyvsp[(4) - (6)].i));
01870 
01871                         (yyval.e) = e;
01872                 }
01873     break;
01874 
01875   case 12:
01876 
01877 /* Line 1464 of yacc.c  */
01878 #line 264 "route/cls/ematch_syntax.y"
01879     {
01880                         struct rtnl_ematch *e;
01881 
01882                         if (!(e = rtnl_ematch_alloc())) {
01883                                 asprintf(errp, "Unable to allocate ematch object");
01884                                 YYABORT;
01885                         }
01886 
01887                         if (rtnl_ematch_set_kind(e, TCF_EM_CONTAINER) < 0)
01888                                 BUG();
01889 
01890                         /* Make e->childs the list head of a the ematch sequence */
01891                         nl_list_add_tail(&e->e_childs, &(yyvsp[(2) - (3)].e)->e_list);
01892 
01893                         (yyval.e) = e;
01894                 }
01895     break;
01896 
01897   case 13:
01898 
01899 /* Line 1464 of yacc.c  */
01900 #line 292 "route/cls/ematch_syntax.y"
01901     { (yyval.cmp) = (yyvsp[(3) - (4)].cmp); }
01902     break;
01903 
01904   case 14:
01905 
01906 /* Line 1464 of yacc.c  */
01907 #line 294 "route/cls/ematch_syntax.y"
01908     { (yyval.cmp) = (yyvsp[(1) - (1)].cmp); }
01909     break;
01910 
01911   case 15:
01912 
01913 /* Line 1464 of yacc.c  */
01914 #line 299 "route/cls/ematch_syntax.y"
01915     {
01916                         if ((yyvsp[(1) - (3)].loc)->align == TCF_EM_ALIGN_U16 ||
01917                             (yyvsp[(1) - (3)].loc)->align == TCF_EM_ALIGN_U32)
01918                                 (yyval.cmp).flags = TCF_EM_CMP_TRANS;
01919 
01920                         memset(&(yyval.cmp), 0, sizeof((yyval.cmp)));
01921 
01922                         (yyval.cmp).mask = (yyvsp[(1) - (3)].loc)->mask;
01923                         (yyval.cmp).off = (yyvsp[(1) - (3)].loc)->offset;
01924                         (yyval.cmp).align = (yyvsp[(1) - (3)].loc)->align;
01925                         (yyval.cmp).layer = (yyvsp[(1) - (3)].loc)->layer;
01926                         (yyval.cmp).opnd = (yyvsp[(2) - (3)].i);
01927                         (yyval.cmp).val = (yyvsp[(3) - (3)].i);
01928 
01929                         rtnl_pktloc_put((yyvsp[(1) - (3)].loc));
01930                 }
01931     break;
01932 
01933   case 16:
01934 
01935 /* Line 1464 of yacc.c  */
01936 #line 319 "route/cls/ematch_syntax.y"
01937     { (yyval.loc) = NULL; }
01938     break;
01939 
01940   case 17:
01941 
01942 /* Line 1464 of yacc.c  */
01943 #line 321 "route/cls/ematch_syntax.y"
01944     { (yyval.loc) = (yyvsp[(2) - (2)].loc); }
01945     break;
01946 
01947   case 18:
01948 
01949 /* Line 1464 of yacc.c  */
01950 #line 326 "route/cls/ematch_syntax.y"
01951     { (yyval.loc) = NULL; }
01952     break;
01953 
01954   case 19:
01955 
01956 /* Line 1464 of yacc.c  */
01957 #line 328 "route/cls/ematch_syntax.y"
01958     { (yyval.loc) = (yyvsp[(2) - (2)].loc); }
01959     break;
01960 
01961   case 20:
01962 
01963 /* Line 1464 of yacc.c  */
01964 #line 333 "route/cls/ematch_syntax.y"
01965     { (yyval.mv) = rtnl_meta_value_alloc_var((yyvsp[(1) - (1)].q).data, (yyvsp[(1) - (1)].q).len); }
01966     break;
01967 
01968   case 21:
01969 
01970 /* Line 1464 of yacc.c  */
01971 #line 335 "route/cls/ematch_syntax.y"
01972     { (yyval.mv) = rtnl_meta_value_alloc_int((yyvsp[(1) - (1)].i)); }
01973     break;
01974 
01975   case 22:
01976 
01977 /* Line 1464 of yacc.c  */
01978 #line 337 "route/cls/ematch_syntax.y"
01979     { (yyval.mv) = META_ALLOC(META_INT, (yyvsp[(1) - (3)].i), (yyvsp[(2) - (3)].i), (yyvsp[(3) - (3)].i64)); }
01980     break;
01981 
01982   case 23:
01983 
01984 /* Line 1464 of yacc.c  */
01985 #line 339 "route/cls/ematch_syntax.y"
01986     { (yyval.mv) = META_ALLOC(META_VAR, (yyvsp[(1) - (2)].i), (yyvsp[(2) - (2)].i), 0); }
01987     break;
01988 
01989   case 24:
01990 
01991 /* Line 1464 of yacc.c  */
01992 #line 343 "route/cls/ematch_syntax.y"
01993     { (yyval.i) = META_ID(RANDOM); }
01994     break;
01995 
01996   case 25:
01997 
01998 /* Line 1464 of yacc.c  */
01999 #line 344 "route/cls/ematch_syntax.y"
02000     { (yyval.i) = META_ID(LOADAVG_0); }
02001     break;
02002 
02003   case 26:
02004 
02005 /* Line 1464 of yacc.c  */
02006 #line 345 "route/cls/ematch_syntax.y"
02007     { (yyval.i) = META_ID(LOADAVG_1); }
02008     break;
02009 
02010   case 27:
02011 
02012 /* Line 1464 of yacc.c  */
02013 #line 346 "route/cls/ematch_syntax.y"
02014     { (yyval.i) = META_ID(LOADAVG_2); }
02015     break;
02016 
02017   case 28:
02018 
02019 /* Line 1464 of yacc.c  */
02020 #line 347 "route/cls/ematch_syntax.y"
02021     { (yyval.i) = META_ID(DEV); }
02022     break;
02023 
02024   case 29:
02025 
02026 /* Line 1464 of yacc.c  */
02027 #line 348 "route/cls/ematch_syntax.y"
02028     { (yyval.i) = META_ID(PRIORITY); }
02029     break;
02030 
02031   case 30:
02032 
02033 /* Line 1464 of yacc.c  */
02034 #line 349 "route/cls/ematch_syntax.y"
02035     { (yyval.i) = META_ID(PROTOCOL); }
02036     break;
02037 
02038   case 31:
02039 
02040 /* Line 1464 of yacc.c  */
02041 #line 350 "route/cls/ematch_syntax.y"
02042     { (yyval.i) = META_ID(PKTTYPE); }
02043     break;
02044 
02045   case 32:
02046 
02047 /* Line 1464 of yacc.c  */
02048 #line 351 "route/cls/ematch_syntax.y"
02049     { (yyval.i) = META_ID(PKTLEN); }
02050     break;
02051 
02052   case 33:
02053 
02054 /* Line 1464 of yacc.c  */
02055 #line 352 "route/cls/ematch_syntax.y"
02056     { (yyval.i) = META_ID(DATALEN); }
02057     break;
02058 
02059   case 34:
02060 
02061 /* Line 1464 of yacc.c  */
02062 #line 353 "route/cls/ematch_syntax.y"
02063     { (yyval.i) = META_ID(MACLEN); }
02064     break;
02065 
02066   case 35:
02067 
02068 /* Line 1464 of yacc.c  */
02069 #line 354 "route/cls/ematch_syntax.y"
02070     { (yyval.i) = META_ID(NFMARK); }
02071     break;
02072 
02073   case 36:
02074 
02075 /* Line 1464 of yacc.c  */
02076 #line 355 "route/cls/ematch_syntax.y"
02077     { (yyval.i) = META_ID(TCINDEX); }
02078     break;
02079 
02080   case 37:
02081 
02082 /* Line 1464 of yacc.c  */
02083 #line 356 "route/cls/ematch_syntax.y"
02084     { (yyval.i) = META_ID(RTCLASSID); }
02085     break;
02086 
02087   case 38:
02088 
02089 /* Line 1464 of yacc.c  */
02090 #line 357 "route/cls/ematch_syntax.y"
02091     { (yyval.i) = META_ID(RTIIF); }
02092     break;
02093 
02094   case 39:
02095 
02096 /* Line 1464 of yacc.c  */
02097 #line 358 "route/cls/ematch_syntax.y"
02098     { (yyval.i) = META_ID(SK_FAMILY); }
02099     break;
02100 
02101   case 40:
02102 
02103 /* Line 1464 of yacc.c  */
02104 #line 359 "route/cls/ematch_syntax.y"
02105     { (yyval.i) = META_ID(SK_STATE); }
02106     break;
02107 
02108   case 41:
02109 
02110 /* Line 1464 of yacc.c  */
02111 #line 360 "route/cls/ematch_syntax.y"
02112     { (yyval.i) = META_ID(SK_REUSE); }
02113     break;
02114 
02115   case 42:
02116 
02117 /* Line 1464 of yacc.c  */
02118 #line 361 "route/cls/ematch_syntax.y"
02119     { (yyval.i) = META_ID(SK_REFCNT); }
02120     break;
02121 
02122   case 43:
02123 
02124 /* Line 1464 of yacc.c  */
02125 #line 362 "route/cls/ematch_syntax.y"
02126     { (yyval.i) = META_ID(SK_RCVBUF); }
02127     break;
02128 
02129   case 44:
02130 
02131 /* Line 1464 of yacc.c  */
02132 #line 363 "route/cls/ematch_syntax.y"
02133     { (yyval.i) = META_ID(SK_SNDBUF); }
02134     break;
02135 
02136   case 45:
02137 
02138 /* Line 1464 of yacc.c  */
02139 #line 364 "route/cls/ematch_syntax.y"
02140     { (yyval.i) = META_ID(SK_SHUTDOWN); }
02141     break;
02142 
02143   case 46:
02144 
02145 /* Line 1464 of yacc.c  */
02146 #line 365 "route/cls/ematch_syntax.y"
02147     { (yyval.i) = META_ID(SK_PROTO); }
02148     break;
02149 
02150   case 47:
02151 
02152 /* Line 1464 of yacc.c  */
02153 #line 366 "route/cls/ematch_syntax.y"
02154     { (yyval.i) = META_ID(SK_TYPE); }
02155     break;
02156 
02157   case 48:
02158 
02159 /* Line 1464 of yacc.c  */
02160 #line 367 "route/cls/ematch_syntax.y"
02161     { (yyval.i) = META_ID(SK_RMEM_ALLOC); }
02162     break;
02163 
02164   case 49:
02165 
02166 /* Line 1464 of yacc.c  */
02167 #line 368 "route/cls/ematch_syntax.y"
02168     { (yyval.i) = META_ID(SK_WMEM_ALLOC); }
02169     break;
02170 
02171   case 50:
02172 
02173 /* Line 1464 of yacc.c  */
02174 #line 369 "route/cls/ematch_syntax.y"
02175     { (yyval.i) = META_ID(SK_WMEM_QUEUED); }
02176     break;
02177 
02178   case 51:
02179 
02180 /* Line 1464 of yacc.c  */
02181 #line 370 "route/cls/ematch_syntax.y"
02182     { (yyval.i) = META_ID(SK_RCV_QLEN); }
02183     break;
02184 
02185   case 52:
02186 
02187 /* Line 1464 of yacc.c  */
02188 #line 371 "route/cls/ematch_syntax.y"
02189     { (yyval.i) = META_ID(SK_SND_QLEN); }
02190     break;
02191 
02192   case 53:
02193 
02194 /* Line 1464 of yacc.c  */
02195 #line 372 "route/cls/ematch_syntax.y"
02196     { (yyval.i) = META_ID(SK_ERR_QLEN); }
02197     break;
02198 
02199   case 54:
02200 
02201 /* Line 1464 of yacc.c  */
02202 #line 373 "route/cls/ematch_syntax.y"
02203     { (yyval.i) = META_ID(SK_FORWARD_ALLOCS); }
02204     break;
02205 
02206   case 55:
02207 
02208 /* Line 1464 of yacc.c  */
02209 #line 374 "route/cls/ematch_syntax.y"
02210     { (yyval.i) = META_ID(SK_ALLOCS); }
02211     break;
02212 
02213   case 56:
02214 
02215 /* Line 1464 of yacc.c  */
02216 #line 375 "route/cls/ematch_syntax.y"
02217     { (yyval.i) = META_ID(SK_ROUTE_CAPS); }
02218     break;
02219 
02220   case 57:
02221 
02222 /* Line 1464 of yacc.c  */
02223 #line 376 "route/cls/ematch_syntax.y"
02224     { (yyval.i) = META_ID(SK_HASH); }
02225     break;
02226 
02227   case 58:
02228 
02229 /* Line 1464 of yacc.c  */
02230 #line 377 "route/cls/ematch_syntax.y"
02231     { (yyval.i) = META_ID(SK_LINGERTIME); }
02232     break;
02233 
02234   case 59:
02235 
02236 /* Line 1464 of yacc.c  */
02237 #line 378 "route/cls/ematch_syntax.y"
02238     { (yyval.i) = META_ID(SK_ACK_BACKLOG); }
02239     break;
02240 
02241   case 60:
02242 
02243 /* Line 1464 of yacc.c  */
02244 #line 379 "route/cls/ematch_syntax.y"
02245     { (yyval.i) = META_ID(SK_MAX_ACK_BACKLOG); }
02246     break;
02247 
02248   case 61:
02249 
02250 /* Line 1464 of yacc.c  */
02251 #line 380 "route/cls/ematch_syntax.y"
02252     { (yyval.i) = META_ID(SK_PRIO); }
02253     break;
02254 
02255   case 62:
02256 
02257 /* Line 1464 of yacc.c  */
02258 #line 381 "route/cls/ematch_syntax.y"
02259     { (yyval.i) = META_ID(SK_RCVLOWAT); }
02260     break;
02261 
02262   case 63:
02263 
02264 /* Line 1464 of yacc.c  */
02265 #line 382 "route/cls/ematch_syntax.y"
02266     { (yyval.i) = META_ID(SK_RCVTIMEO); }
02267     break;
02268 
02269   case 64:
02270 
02271 /* Line 1464 of yacc.c  */
02272 #line 383 "route/cls/ematch_syntax.y"
02273     { (yyval.i) = META_ID(SK_SNDTIMEO); }
02274     break;
02275 
02276   case 65:
02277 
02278 /* Line 1464 of yacc.c  */
02279 #line 384 "route/cls/ematch_syntax.y"
02280     { (yyval.i) = META_ID(SK_SENDMSG_OFF); }
02281     break;
02282 
02283   case 66:
02284 
02285 /* Line 1464 of yacc.c  */
02286 #line 385 "route/cls/ematch_syntax.y"
02287     { (yyval.i) = META_ID(SK_WRITE_PENDING); }
02288     break;
02289 
02290   case 67:
02291 
02292 /* Line 1464 of yacc.c  */
02293 #line 386 "route/cls/ematch_syntax.y"
02294     { (yyval.i) = META_ID(VLAN_TAG); }
02295     break;
02296 
02297   case 68:
02298 
02299 /* Line 1464 of yacc.c  */
02300 #line 387 "route/cls/ematch_syntax.y"
02301     { (yyval.i) = META_ID(RXHASH); }
02302     break;
02303 
02304   case 69:
02305 
02306 /* Line 1464 of yacc.c  */
02307 #line 391 "route/cls/ematch_syntax.y"
02308     { (yyval.i) = META_ID(DEV); }
02309     break;
02310 
02311   case 70:
02312 
02313 /* Line 1464 of yacc.c  */
02314 #line 392 "route/cls/ematch_syntax.y"
02315     { (yyval.i) = META_ID(SK_BOUND_IF); }
02316     break;
02317 
02318   case 71:
02319 
02320 /* Line 1464 of yacc.c  */
02321 #line 400 "route/cls/ematch_syntax.y"
02322     {
02323                         (yyval.q) = (yyvsp[(1) - (1)].q);
02324                 }
02325     break;
02326 
02327   case 72:
02328 
02329 /* Line 1464 of yacc.c  */
02330 #line 404 "route/cls/ematch_syntax.y"
02331     {
02332                         struct nl_addr *addr;
02333 
02334                         if (nl_addr_parse((yyvsp[(1) - (1)].s), AF_UNSPEC, &addr) == 0) {
02335                                 (yyval.q).len = nl_addr_get_len(addr);
02336 
02337                                 (yyval.q).index = min_t(int, (yyval.q).len, nl_addr_get_prefixlen(addr)/8);
02338 
02339                                 if (!((yyval.q).data = calloc(1, (yyval.q).len))) {
02340                                         nl_addr_put(addr);
02341                                         YYABORT;
02342                                 }
02343 
02344                                 memcpy((yyval.q).data, nl_addr_get_binary_addr(addr), (yyval.q).len);
02345                                 nl_addr_put(addr);
02346                         } else {
02347                                 asprintf(errp, "invalid pattern \"%s\"", (yyvsp[(1) - (1)].s));
02348                                 YYABORT;
02349                         }
02350                 }
02351     break;
02352 
02353   case 73:
02354 
02355 /* Line 1464 of yacc.c  */
02356 #line 432 "route/cls/ematch_syntax.y"
02357     {
02358                         struct rtnl_pktloc *loc;
02359 
02360                         if (rtnl_pktloc_lookup((yyvsp[(1) - (1)].s), &loc) < 0) {
02361                                 asprintf(errp, "Packet location \"%s\" not found", (yyvsp[(1) - (1)].s));
02362                                 YYABORT;
02363                         }
02364 
02365                         (yyval.loc) = loc;
02366                 }
02367     break;
02368 
02369   case 74:
02370 
02371 /* Line 1464 of yacc.c  */
02372 #line 444 "route/cls/ematch_syntax.y"
02373     {
02374                         struct rtnl_pktloc *loc;
02375 
02376                         if ((yyvsp[(5) - (5)].i64) && (!(yyvsp[(1) - (5)].i) || (yyvsp[(1) - (5)].i) > TCF_EM_ALIGN_U32)) {
02377                                 asprintf(errp, "mask only allowed for alignments u8|u16|u32");
02378                                 YYABORT;
02379                         }
02380 
02381                         if (!(loc = rtnl_pktloc_alloc())) {
02382                                 asprintf(errp, "Unable to allocate packet location object");
02383                                 YYABORT;
02384                         }
02385 
02386                         loc->name = strdup("<USER-DEFINED>");
02387                         loc->align = (yyvsp[(1) - (5)].i);
02388                         loc->layer = (yyvsp[(2) - (5)].i);
02389                         loc->offset = (yyvsp[(4) - (5)].i);
02390                         loc->mask = (yyvsp[(5) - (5)].i64);
02391 
02392                         (yyval.loc) = loc;
02393                 }
02394     break;
02395 
02396   case 75:
02397 
02398 /* Line 1464 of yacc.c  */
02399 #line 469 "route/cls/ematch_syntax.y"
02400     { (yyval.i) = 0; }
02401     break;
02402 
02403   case 76:
02404 
02405 /* Line 1464 of yacc.c  */
02406 #line 471 "route/cls/ematch_syntax.y"
02407     { (yyval.i) = (yyvsp[(1) - (2)].i); }
02408     break;
02409 
02410   case 77:
02411 
02412 /* Line 1464 of yacc.c  */
02413 #line 473 "route/cls/ematch_syntax.y"
02414     { (yyval.i) = (yyvsp[(1) - (2)].i); }
02415     break;
02416 
02417   case 78:
02418 
02419 /* Line 1464 of yacc.c  */
02420 #line 478 "route/cls/ematch_syntax.y"
02421     { (yyval.i64) = 0; }
02422     break;
02423 
02424   case 79:
02425 
02426 /* Line 1464 of yacc.c  */
02427 #line 480 "route/cls/ematch_syntax.y"
02428     { (yyval.i64) = (yyvsp[(2) - (2)].i); }
02429     break;
02430 
02431   case 80:
02432 
02433 /* Line 1464 of yacc.c  */
02434 #line 485 "route/cls/ematch_syntax.y"
02435     { (yyval.i) = 0; }
02436     break;
02437 
02438   case 81:
02439 
02440 /* Line 1464 of yacc.c  */
02441 #line 487 "route/cls/ematch_syntax.y"
02442     { (yyval.i) = (yyvsp[(2) - (2)].i); }
02443     break;
02444 
02445   case 82:
02446 
02447 /* Line 1464 of yacc.c  */
02448 #line 492 "route/cls/ematch_syntax.y"
02449     { (yyval.i) = TCF_EM_OPND_EQ; }
02450     break;
02451 
02452   case 83:
02453 
02454 /* Line 1464 of yacc.c  */
02455 #line 494 "route/cls/ematch_syntax.y"
02456     { (yyval.i) = TCF_EM_OPND_GT; }
02457     break;
02458 
02459   case 84:
02460 
02461 /* Line 1464 of yacc.c  */
02462 #line 496 "route/cls/ematch_syntax.y"
02463     { (yyval.i) = TCF_EM_OPND_LT; }
02464     break;
02465 
02466 
02467 
02468 /* Line 1464 of yacc.c  */
02469 #line 2470 "route/cls/ematch_syntax.c"
02470       default: break;
02471     }
02472   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
02473 
02474   YYPOPSTACK (yylen);
02475   yylen = 0;
02476   YY_STACK_PRINT (yyss, yyssp);
02477 
02478   *++yyvsp = yyval;
02479 
02480   /* Now `shift' the result of the reduction.  Determine what state
02481      that goes to, based on the state we popped back to and the rule
02482      number reduced by.  */
02483 
02484   yyn = yyr1[yyn];
02485 
02486   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
02487   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
02488     yystate = yytable[yystate];
02489   else
02490     yystate = yydefgoto[yyn - YYNTOKENS];
02491 
02492   goto yynewstate;
02493 
02494 
02495 /*------------------------------------.
02496 | yyerrlab -- here on detecting error |
02497 `------------------------------------*/
02498 yyerrlab:
02499   /* If not already recovering from an error, report this error.  */
02500   if (!yyerrstatus)
02501     {
02502       ++yynerrs;
02503 #if ! YYERROR_VERBOSE
02504       yyerror (scanner, errp, root, YY_("syntax error"));
02505 #else
02506       {
02507         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
02508         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
02509           {
02510             YYSIZE_T yyalloc = 2 * yysize;
02511             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
02512               yyalloc = YYSTACK_ALLOC_MAXIMUM;
02513             if (yymsg != yymsgbuf)
02514               YYSTACK_FREE (yymsg);
02515             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
02516             if (yymsg)
02517               yymsg_alloc = yyalloc;
02518             else
02519               {
02520                 yymsg = yymsgbuf;
02521                 yymsg_alloc = sizeof yymsgbuf;
02522               }
02523           }
02524 
02525         if (0 < yysize && yysize <= yymsg_alloc)
02526           {
02527             (void) yysyntax_error (yymsg, yystate, yychar);
02528             yyerror (scanner, errp, root, yymsg);
02529           }
02530         else
02531           {
02532             yyerror (scanner, errp, root, YY_("syntax error"));
02533             if (yysize != 0)
02534               goto yyexhaustedlab;
02535           }
02536       }
02537 #endif
02538     }
02539 
02540 
02541 
02542   if (yyerrstatus == 3)
02543     {
02544       /* If just tried and failed to reuse lookahead token after an
02545          error, discard it.  */
02546 
02547       if (yychar <= YYEOF)
02548         {
02549           /* Return failure if at end of input.  */
02550           if (yychar == YYEOF)
02551             YYABORT;
02552         }
02553       else
02554         {
02555           yydestruct ("Error: discarding",
02556                       yytoken, &yylval, scanner, errp, root);
02557           yychar = YYEMPTY;
02558         }
02559     }
02560 
02561   /* Else will try to reuse lookahead token after shifting the error
02562      token.  */
02563   goto yyerrlab1;
02564 
02565 
02566 /*---------------------------------------------------.
02567 | yyerrorlab -- error raised explicitly by YYERROR.  |
02568 `---------------------------------------------------*/
02569 yyerrorlab:
02570 
02571   /* Pacify compilers like GCC when the user code never invokes
02572      YYERROR and the label yyerrorlab therefore never appears in user
02573      code.  */
02574   if (/*CONSTCOND*/ 0)
02575      goto yyerrorlab;
02576 
02577   /* Do not reclaim the symbols of the rule which action triggered
02578      this YYERROR.  */
02579   YYPOPSTACK (yylen);
02580   yylen = 0;
02581   YY_STACK_PRINT (yyss, yyssp);
02582   yystate = *yyssp;
02583   goto yyerrlab1;
02584 
02585 
02586 /*-------------------------------------------------------------.
02587 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
02588 `-------------------------------------------------------------*/
02589 yyerrlab1:
02590   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
02591 
02592   for (;;)
02593     {
02594       yyn = yypact[yystate];
02595       if (yyn != YYPACT_NINF)
02596         {
02597           yyn += YYTERROR;
02598           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02599             {
02600               yyn = yytable[yyn];
02601               if (0 < yyn)
02602                 break;
02603             }
02604         }
02605 
02606       /* Pop the current state because it cannot handle the error token.  */
02607       if (yyssp == yyss)
02608         YYABORT;
02609 
02610 
02611       yydestruct ("Error: popping",
02612                   yystos[yystate], yyvsp, scanner, errp, root);
02613       YYPOPSTACK (1);
02614       yystate = *yyssp;
02615       YY_STACK_PRINT (yyss, yyssp);
02616     }
02617 
02618   *++yyvsp = yylval;
02619 
02620 
02621   /* Shift the error token.  */
02622   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
02623 
02624   yystate = yyn;
02625   goto yynewstate;
02626 
02627 
02628 /*-------------------------------------.
02629 | yyacceptlab -- YYACCEPT comes here.  |
02630 `-------------------------------------*/
02631 yyacceptlab:
02632   yyresult = 0;
02633   goto yyreturn;
02634 
02635 /*-----------------------------------.
02636 | yyabortlab -- YYABORT comes here.  |
02637 `-----------------------------------*/
02638 yyabortlab:
02639   yyresult = 1;
02640   goto yyreturn;
02641 
02642 #if !defined(yyoverflow) || YYERROR_VERBOSE
02643 /*-------------------------------------------------.
02644 | yyexhaustedlab -- memory exhaustion comes here.  |
02645 `-------------------------------------------------*/
02646 yyexhaustedlab:
02647   yyerror (scanner, errp, root, YY_("memory exhausted"));
02648   yyresult = 2;
02649   /* Fall through.  */
02650 #endif
02651 
02652 yyreturn:
02653   if (yychar != YYEMPTY)
02654      yydestruct ("Cleanup: discarding lookahead",
02655                  yytoken, &yylval, scanner, errp, root);
02656   /* Do not reclaim the symbols of the rule which action triggered
02657      this YYABORT or YYACCEPT.  */
02658   YYPOPSTACK (yylen);
02659   YY_STACK_PRINT (yyss, yyssp);
02660   while (yyssp != yyss)
02661     {
02662       yydestruct ("Cleanup: popping",
02663                   yystos[*yyssp], yyvsp, scanner, errp, root);
02664       YYPOPSTACK (1);
02665     }
02666 #ifndef yyoverflow
02667   if (yyss != yyssa)
02668     YYSTACK_FREE (yyss);
02669 #endif
02670 #if YYERROR_VERBOSE
02671   if (yymsg != yymsgbuf)
02672     YYSTACK_FREE (yymsg);
02673 #endif
02674   /* Make sure YYID is used.  */
02675   return YYID (yyresult);
02676 }
02677 
02678 
02679