/* A Bison parser, made by GNU Bison 1.875b.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Using locations.  */
#define YYLSP_NEEDED 0

/* If NAME_PREFIX is specified substitute the variables and functions
   names.  */
#define yyparse pcap_parse
#define yylex   pcap_lex
#define yyerror pcap_error
#define yylval  pcap_lval
#define yychar  pcap_char
#define yydebug pcap_debug
#define yynerrs pcap_nerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     DST = 258,
     SRC = 259,
     HOST = 260,
     GATEWAY = 261,
     NET = 262,
     NETMASK = 263,
     PORT = 264,
     LESS = 265,
     GREATER = 266,
     PROTO = 267,
     PROTOCHAIN = 268,
     CBYTE = 269,
     ARP = 270,
     RARP = 271,
     IP = 272,
     SCTP = 273,
     TCP = 274,
     UDP = 275,
     ICMP = 276,
     IGMP = 277,
     IGRP = 278,
     PIM = 279,
     VRRP = 280,
     ATALK = 281,
     AARP = 282,
     DECNET = 283,
     LAT = 284,
     SCA = 285,
     MOPRC = 286,
     MOPDL = 287,
     TK_BROADCAST = 288,
     TK_MULTICAST = 289,
     NUM = 290,
     INBOUND = 291,
     OUTBOUND = 292,
     PF_IFNAME = 293,
     PF_RSET = 294,
     PF_RNR = 295,
     PF_SRNR = 296,
     PF_REASON = 297,
     PF_ACTION = 298,
     LINK = 299,
     GEQ = 300,
     LEQ = 301,
     NEQ = 302,
     ID = 303,
     EID = 304,
     HID = 305,
     HID6 = 306,
     AID = 307,
     LSH = 308,
     RSH = 309,
     LEN = 310,
     IPV6 = 311,
     ICMPV6 = 312,
     AH = 313,
     ESP = 314,
     VLAN = 315,
     ISO = 316,
     ESIS = 317,
     CLNP = 318,
     ISIS = 319,
     L1 = 320,
     L2 = 321,
     IIH = 322,
     LSP = 323,
     SNP = 324,
     CSNP = 325,
     PSNP = 326,
     STP = 327,
     IPX = 328,
     NETBEUI = 329,
     LANE = 330,
     LLC = 331,
     METAC = 332,
     BCC = 333,
     SC = 334,
     ILMIC = 335,
     OAMF4EC = 336,
     OAMF4SC = 337,
     OAM = 338,
     OAMF4 = 339,
     CONNECTMSG = 340,
     METACONNECT = 341,
     VPI = 342,
     VCI = 343,
     AND = 344,
     OR = 345,
     UMINUS = 346
   };
#endif
#define DST 258
#define SRC 259
#define HOST 260
#define GATEWAY 261
#define NET 262
#define NETMASK 263
#define PORT 264
#define LESS 265
#define GREATER 266
#define PROTO 267
#define PROTOCHAIN 268
#define CBYTE 269
#define ARP 270
#define RARP 271
#define IP 272
#define SCTP 273
#define TCP 274
#define UDP 275
#define ICMP 276
#define IGMP 277
#define IGRP 278
#define PIM 279
#define VRRP 280
#define ATALK 281
#define AARP 282
#define DECNET 283
#define LAT 284
#define SCA 285
#define MOPRC 286
#define MOPDL 287
#define TK_BROADCAST 288
#define TK_MULTICAST 289
#define NUM 290
#define INBOUND 291
#define OUTBOUND 292
#define PF_IFNAME 293
#define PF_RSET 294
#define PF_RNR 295
#define PF_SRNR 296
#define PF_REASON 297
#define PF_ACTION 298
#define LINK 299
#define GEQ 300
#define LEQ 301
#define NEQ 302
#define ID 303
#define EID 304
#define HID 305
#define HID6 306
#define AID 307
#define LSH 308
#define RSH 309
#define LEN 310
#define IPV6 311
#define ICMPV6 312
#define AH 313
#define ESP 314
#define VLAN 315
#define ISO 316
#define ESIS 317
#define CLNP 318
#define ISIS 319
#define L1 320
#define L2 321
#define IIH 322
#define LSP 323
#define SNP 324
#define CSNP 325
#define PSNP 326
#define STP 327
#define IPX 328
#define NETBEUI 329
#define LANE 330
#define LLC 331
#define METAC 332
#define BCC 333
#define SC 334
#define ILMIC 335
#define OAMF4EC 336
#define OAMF4SC 337
#define OAM 338
#define OAMF4 339
#define CONNECTMSG 340
#define METACONNECT 341
#define VPI 342
#define VCI 343
#define AND 344
#define OR 345
#define UMINUS 346




/* Copy the first part of user declarations.  */
#line 1 "../libpcap/grammar.y"

/*
 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that: (1) source code distributions
 * retain the above copyright notice and this paragraph in its entirety, (2)
 * distributions including binary code include the above copyright notice and
 * this paragraph in its entirety in the documentation or other materials
 * provided with the distribution, and (3) all advertising materials mentioning
 * features or use of this software display the following acknowledgement:
 * ``This product includes software developed by the University of California,
 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
 * the University nor the names of its contributors may be used to endorse
 * or promote products derived from this software without specific prior
 * written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 */
#ifndef lint
static const char rcsid[] _U_ =
    "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.79.2.4 2004/10/07 09:01:23 risso Exp $ (LBL)";
#endif

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef WIN32
#include <pcap-stdinc.h>
#else /* WIN32 */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#endif /* WIN32 */

#include <stdlib.h>

#ifndef WIN32
#if __STDC__
struct mbuf;
struct rtentry;
#endif

#include <netinet/in.h>
#endif /* WIN32 */

#include <stdio.h>
#ifndef WIN32
#include <strings.h>
#endif
#include "pcap-int.h"

#include "gencode.h"
#include "pf.h"
#include <pcap-namedb.h>

#ifdef HAVE_OS_PROTO_H
#include "os-proto.h"
#endif

#define QSET(q, p, d, a) (q).proto = (p),\
			 (q).dir = (d),\
			 (q).addr = (a)

int n_errors = 0;

static struct qual qerr = { Q_UNDEF, Q_UNDEF, Q_UNDEF, Q_UNDEF };

static void
yyerror(char *msg)
{
	++n_errors;
	bpf_error("%s", msg);
	/* NOTREACHED */
}

#ifndef YYBISON
int yyparse(void);

int
pcap_parse()
{
	return (yyparse());
}
#endif



/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 93 "../libpcap/grammar.y"
typedef union YYSTYPE {
	int i;
	bpf_u_int32 h;
	u_char *e;
	char *s;
	struct stmt *stmt;
	struct arth *a;
	struct {
		struct qual q;
		int atmfieldtype;
		struct block *b;
	} blk;
	struct block *rblk;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 374 "y.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */


/* Line 214 of yacc.c.  */
#line 386 "y.tab.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
	 || (YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  register YYSIZE_T yyi;		\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  3
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   568

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  107
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  36
/* YYNRULES -- Number of rules. */
#define YYNRULES  164
/* YYNRULES -- Number of states. */
#define YYNSTATES  226

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   346

#define YYTRANSLATE(YYX) 						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    91,     2,     2,     2,     2,    93,     2,
     100,    99,    96,    94,     2,    95,     2,    97,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,   106,     2,
     103,   102,   101,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,   104,     2,   105,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,    92,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    98
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short yyprhs[] =
{
       0,     0,     3,     6,     8,     9,    11,    15,    19,    23,
      27,    29,    31,    33,    35,    39,    41,    45,    49,    51,
      55,    57,    59,    61,    64,    66,    68,    70,    74,    78,
      80,    82,    84,    87,    91,    94,    97,   100,   103,   106,
     109,   113,   115,   119,   123,   125,   127,   129,   132,   134,
     135,   137,   139,   143,   147,   151,   155,   157,   159,   161,
     163,   165,   167,   169,   171,   173,   175,   177,   179,   181,
     183,   185,   187,   189,   191,   193,   195,   197,   199,   201,
     203,   205,   207,   209,   211,   213,   215,   217,   219,   221,
     223,   225,   227,   229,   231,   233,   235,   237,   240,   243,
     246,   249,   254,   256,   258,   261,   263,   265,   268,   271,
     274,   277,   280,   283,   285,   287,   289,   291,   293,   295,
     297,   299,   301,   303,   305,   310,   317,   321,   325,   329,
     333,   337,   341,   345,   349,   352,   356,   358,   360,   362,
     364,   366,   368,   370,   374,   376,   378,   380,   382,   384,
     386,   388,   390,   392,   394,   396,   398,   400,   402,   404,
     407,   410,   414,   416,   418
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
     108,     0,    -1,   109,   110,    -1,   109,    -1,    -1,   119,
      -1,   110,   111,   119,    -1,   110,   111,   113,    -1,   110,
     112,   119,    -1,   110,   112,   113,    -1,    89,    -1,    90,
      -1,   114,    -1,   136,    -1,   116,   117,    99,    -1,    48,
      -1,    50,    97,    35,    -1,    50,     8,    50,    -1,    50,
      -1,    51,    97,    35,    -1,    51,    -1,    49,    -1,    52,
      -1,   115,   113,    -1,    91,    -1,   100,    -1,   114,    -1,
     118,   111,   113,    -1,   118,   112,   113,    -1,   136,    -1,
     117,    -1,   121,    -1,   115,   119,    -1,   122,   123,   124,
      -1,   122,   123,    -1,   122,   124,    -1,   122,    12,    -1,
     122,    13,    -1,   122,   125,    -1,   120,   113,    -1,   116,
     110,    99,    -1,   126,    -1,   133,   131,   133,    -1,   133,
     132,   133,    -1,   127,    -1,   137,    -1,   138,    -1,   139,
     140,    -1,   126,    -1,    -1,     4,    -1,     3,    -1,     4,
      90,     3,    -1,     3,    90,     4,    -1,     4,    89,     3,
      -1,     3,    89,     4,    -1,     5,    -1,     7,    -1,     9,
      -1,     6,    -1,    44,    -1,    17,    -1,    15,    -1,    16,
      -1,    18,    -1,    19,    -1,    20,    -1,    21,    -1,    22,
      -1,    23,    -1,    24,    -1,    25,    -1,    26,    -1,    27,
      -1,    28,    -1,    29,    -1,    30,    -1,    32,    -1,    31,
      -1,    56,    -1,    57,    -1,    58,    -1,    59,    -1,    61,
      -1,    62,    -1,    64,    -1,    65,    -1,    66,    -1,    67,
      -1,    68,    -1,    69,    -1,    71,    -1,    70,    -1,    63,
      -1,    72,    -1,    73,    -1,    74,    -1,   122,    33,    -1,
     122,    34,    -1,    10,    35,    -1,    11,    35,    -1,    14,
      35,   135,    35,    -1,    36,    -1,    37,    -1,    60,   136,
      -1,    60,    -1,   128,    -1,    38,    48,    -1,    39,    48,
      -1,    40,    35,    -1,    41,    35,    -1,    42,   129,    -1,
      43,   130,    -1,    35,    -1,    48,    -1,    48,    -1,   101,
      -1,    45,    -1,   102,    -1,    46,    -1,   103,    -1,    47,
      -1,   136,    -1,   134,    -1,   126,   104,   133,   105,    -1,
     126,   104,   133,   106,    35,   105,    -1,   133,    94,   133,
      -1,   133,    95,   133,    -1,   133,    96,   133,    -1,   133,
      97,   133,    -1,   133,    93,   133,    -1,   133,    92,   133,
      -1,   133,    53,   133,    -1,   133,    54,   133,    -1,    95,
     133,    -1,   116,   134,    99,    -1,    55,    -1,    93,    -1,
      92,    -1,   103,    -1,   101,    -1,   102,    -1,    35,    -1,
     116,   136,    99,    -1,    75,    -1,    76,    -1,    77,    -1,
      78,    -1,    81,    -1,    82,    -1,    79,    -1,    80,    -1,
      83,    -1,    84,    -1,    85,    -1,    86,    -1,    87,    -1,
      88,    -1,   141,    -1,   131,    35,    -1,   132,    35,    -1,
     116,   142,    99,    -1,    35,    -1,   141,    -1,   142,   112,
     141,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,   156,   156,   160,   162,   164,   165,   166,   167,   168,
     170,   172,   174,   175,   177,   179,   180,   182,   184,   189,
     198,   207,   216,   225,   227,   229,   231,   232,   233,   235,
     237,   239,   240,   242,   243,   244,   245,   246,   247,   249,
     250,   251,   252,   254,   256,   257,   258,   259,   262,   263,
     266,   267,   268,   269,   270,   271,   274,   275,   276,   279,
     281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
     291,   292,   293,   294,   295,   296,   297,   298,   299,   300,
     301,   302,   303,   304,   305,   306,   307,   308,   309,   310,
     311,   312,   313,   314,   315,   316,   317,   319,   320,   321,
     322,   323,   324,   325,   326,   327,   328,   331,   332,   333,
     334,   335,   336,   339,   340,   353,   364,   365,   366,   368,
     369,   370,   372,   373,   375,   376,   377,   378,   379,   380,
     381,   382,   383,   384,   385,   386,   387,   389,   390,   391,
     392,   393,   395,   396,   398,   399,   400,   401,   402,   403,
     404,   405,   407,   408,   409,   410,   413,   414,   416,   417,
     418,   419,   421,   428,   429
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "DST", "SRC", "HOST", "GATEWAY", "NET", 
  "NETMASK", "PORT", "LESS", "GREATER", "PROTO", "PROTOCHAIN", "CBYTE", 
  "ARP", "RARP", "IP", "SCTP", "TCP", "UDP", "ICMP", "IGMP", "IGRP", 
  "PIM", "VRRP", "ATALK", "AARP", "DECNET", "LAT", "SCA", "MOPRC", 
  "MOPDL", "TK_BROADCAST", "TK_MULTICAST", "NUM", "INBOUND", "OUTBOUND", 
  "PF_IFNAME", "PF_RSET", "PF_RNR", "PF_SRNR", "PF_REASON", "PF_ACTION", 
  "LINK", "GEQ", "LEQ", "NEQ", "ID", "EID", "HID", "HID6", "AID", "LSH", 
  "RSH", "LEN", "IPV6", "ICMPV6", "AH", "ESP", "VLAN", "ISO", "ESIS", 
  "CLNP", "ISIS", "L1", "L2", "IIH", "LSP", "SNP", "CSNP", "PSNP", "STP", 
  "IPX", "NETBEUI", "LANE", "LLC", "METAC", "BCC", "SC", "ILMIC", 
  "OAMF4EC", "OAMF4SC", "OAM", "OAMF4", "CONNECTMSG", "METACONNECT", 
  "VPI", "VCI", "AND", "OR", "'!'", "'|'", "'&'", "'+'", "'-'", "'*'", 
  "'/'", "UMINUS", "')'", "'('", "'>'", "'='", "'<'", "'['", "']'", "':'", 
  "$accept", "prog", "null", "expr", "and", "or", "id", "nid", "not", 
  "paren", "pid", "qid", "term", "head", "rterm", "pqual", "dqual", 
  "aqual", "ndaqual", "pname", "other", "pfvar", "reason", "action", 
  "relop", "irelop", "arth", "narth", "byteop", "pnum", "atmtype", 
  "atmmultitype", "atmfield", "atmvalue", "atmfieldvalue", "atmlistvalue", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,    33,   124,    38,    43,    45,    42,    47,   346,    41,
      40,    62,    61,    60,    91,    93,    58
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,   107,   108,   108,   109,   110,   110,   110,   110,   110,
     111,   112,   113,   113,   113,   114,   114,   114,   114,   114,
     114,   114,   114,   114,   115,   116,   117,   117,   117,   118,
     118,   119,   119,   120,   120,   120,   120,   120,   120,   121,
     121,   121,   121,   121,   121,   121,   121,   121,   122,   122,
     123,   123,   123,   123,   123,   123,   124,   124,   124,   125,
     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
     126,   126,   126,   126,   126,   126,   126,   127,   127,   127,
     127,   127,   127,   127,   127,   127,   127,   128,   128,   128,
     128,   128,   128,   129,   129,   130,   131,   131,   131,   132,
     132,   132,   133,   133,   134,   134,   134,   134,   134,   134,
     134,   134,   134,   134,   134,   134,   134,   135,   135,   135,
     135,   135,   136,   136,   137,   137,   137,   137,   137,   137,
     137,   137,   138,   138,   138,   138,   139,   139,   140,   140,
     140,   140,   141,   142,   142
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     2,     1,     0,     1,     3,     3,     3,     3,
       1,     1,     1,     1,     3,     1,     3,     3,     1,     3,
       1,     1,     1,     2,     1,     1,     1,     3,     3,     1,
       1,     1,     2,     3,     2,     2,     2,     2,     2,     2,
       3,     1,     3,     3,     1,     1,     1,     2,     1,     0,
       1,     1,     3,     3,     3,     3,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     2,     2,     2,
       2,     4,     1,     1,     2,     1,     1,     2,     2,     2,
       2,     2,     2,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     4,     6,     3,     3,     3,     3,
       3,     3,     3,     3,     2,     3,     1,     1,     1,     1,
       1,     1,     1,     3,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
       2,     3,     1,     1,     3
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       4,     0,    49,     1,     0,     0,     0,    62,    63,    61,
      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
      74,    75,    76,    78,    77,   142,   102,   103,     0,     0,
       0,     0,     0,     0,    60,   136,    79,    80,    81,    82,
     105,    83,    84,    93,    85,    86,    87,    88,    89,    90,
      92,    91,    94,    95,    96,   144,   145,   146,   147,   150,
     151,   148,   149,   152,   153,   154,   155,   156,   157,    24,
       0,    25,     2,    49,    49,     5,     0,    31,     0,    48,
      44,   106,     0,   123,   122,    45,    46,     0,    99,   100,
       0,   107,   108,   109,   110,   113,   114,   111,   115,   112,
       0,   104,     0,     0,   134,    10,    11,    49,    49,    32,
       0,   123,   122,    15,    21,    18,    20,    22,    39,    12,
       0,     0,    13,    51,    50,    56,    59,    57,    58,    36,
      37,    97,    98,    34,    35,    38,     0,   117,   119,   121,
       0,     0,     0,     0,     0,     0,     0,     0,   116,   118,
     120,     0,     0,   162,     0,     0,     0,    47,   158,   138,
     137,   140,   141,   139,     0,     0,     0,     7,    49,    49,
       6,   122,     9,     8,    40,   135,   143,     0,     0,     0,
      23,    26,    30,     0,    29,     0,     0,     0,     0,    33,
       0,   132,   133,   131,   130,   126,   127,   128,   129,    42,
      43,   163,     0,   159,   160,   101,   122,    17,    16,    19,
      14,     0,     0,    55,    53,    54,    52,   124,     0,   161,
       0,    27,    28,     0,   164,   125
};

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,     1,     2,   110,   107,   108,   180,   119,   120,   102,
     182,   183,    75,    76,    77,    78,   133,   134,   135,   103,
      80,    81,    97,    99,   151,   152,    82,    83,   164,    84,
      85,    86,    87,   157,   158,   202
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -175
static const short yypact[] =
{
    -175,    15,   176,  -175,   -18,   -17,   -13,  -175,  -175,  -175,
    -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,
    -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,   -23,    -9,
      -3,     7,   -22,    22,  -175,  -175,  -175,  -175,  -175,  -175,
     -16,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,
    -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,
    -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,
     436,  -175,   -79,   350,   350,  -175,     8,  -175,   534,     3,
    -175,  -175,   431,  -175,  -175,  -175,  -175,    42,  -175,  -175,
     -72,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,  -175,
     -16,  -175,   436,   -57,  -175,  -175,  -175,   263,   263,  -175,
     -44,   -50,   -26,  -175,  -175,    -1,   -11,  -175,  -175,  -175,
       8,     8,  -175,   -36,    45,  -175,  -175,  -175,  -175,  -175,
    -175,  -175,  -175,    43,  -175,  -175,   436,  -175,  -175,  -175,
     436,   436,   436,   436,   436,   436,   436,   436,  -175,  -175,
    -175,   436,   436,  -175,    68,    77,    85,  -175,  -175,  -175,
    -175,  -175,  -175,  -175,    96,   -26,    62,  -175,   263,   263,
    -175,     5,  -175,  -175,  -175,  -175,  -175,    47,   101,   106,
    -175,  -175,    53,   -79,   -26,   149,   156,   158,   159,  -175,
     458,    52,    52,    86,   -30,    54,    54,  -175,  -175,    62,
      62,  -175,   -63,  -175,  -175,  -175,     1,  -175,  -175,  -175,
    -175,     8,     8,  -175,  -175,  -175,  -175,  -175,   128,  -175,
      68,  -175,  -175,    59,  -175,  -175
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -175,  -175,  -175,   163,   -15,  -174,   -74,  -107,     2,    -2,
    -175,  -175,   -67,  -175,  -175,  -175,  -175,    36,  -175,     6,
    -175,  -175,  -175,  -175,    90,    91,   -19,   -58,  -175,   -39,
    -175,  -175,  -175,  -175,  -142,  -175
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -42
static const short yytable[] =
{
      74,   101,   118,   -41,    73,   -13,   109,   177,    79,   212,
     105,   106,   201,    95,   181,     3,   111,    88,    89,    25,
     159,   160,    90,   140,   141,    91,    96,   106,   220,   161,
     162,   163,    93,   167,   172,   112,   219,   122,   100,    92,
     170,   173,    94,    25,   111,   105,   106,   136,   125,   175,
     127,   104,   128,   185,   186,   174,   113,   114,   115,   116,
     117,   165,   181,   112,   144,   145,   146,   147,   171,   171,
      98,    74,    74,   176,   121,    73,    73,   153,   224,    79,
      79,   122,   184,   166,    71,   154,   179,   137,   138,   139,
     -29,   -29,   -41,   -41,   -13,   -13,   178,   207,   100,    69,
     176,   109,   -41,   153,   -13,   169,   169,   136,    71,   168,
     168,   111,   203,    79,    79,   140,   141,   190,   121,   100,
     204,   191,   192,   193,   194,   195,   196,   197,   198,   171,
     206,   205,   199,   200,   187,   188,   208,   221,   222,   140,
     141,   209,    71,   148,   149,   150,   144,   145,   146,   147,
     146,   147,   210,   213,   142,   143,   144,   145,   146,   147,
     214,   215,   216,   223,   225,    72,   169,    74,   211,   189,
     168,   168,   122,   122,    79,    79,    -3,   155,   156,   143,
     144,   145,   146,   147,     0,     0,     4,     5,     0,     0,
       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,   121,
     121,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    35,    36,    37,    38,    39,    40,    41,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,     0,     0,    69,     0,     0,
       0,    70,     0,     4,     5,     0,    71,     6,     7,     8,
       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
      19,    20,    21,    22,    23,    24,     0,     0,    25,    26,
      27,    28,    29,    30,    31,    32,    33,    34,     0,     0,
       0,   113,   114,   115,   116,   117,     0,     0,    35,    36,
      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
      67,    68,     0,     0,    69,     0,     0,     0,    70,     0,
       4,     5,     0,    71,     6,     7,     8,     9,    10,    11,
      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,     0,     0,    25,    26,    27,    28,    29,
      30,    31,    32,    33,    34,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,    35,    36,    37,    38,    39,
      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
      60,    61,    62,    63,    64,    65,    66,    67,    68,     0,
       0,    69,     0,     0,     0,    70,     0,     0,     0,     0,
      71,     7,     8,     9,    10,    11,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,     0,
       0,    25,     0,     0,     0,     0,   137,   138,   139,     0,
      34,     0,     0,     0,   140,   141,     0,     0,     0,     0,
       0,    35,    36,    37,    38,    39,     0,    41,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,   140,   141,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   142,   143,   144,   145,   146,   147,     0,
       0,    70,   148,   149,   150,     0,    71,   123,   124,   125,
     126,   127,     0,   128,     0,     0,   129,   130,     0,     0,
     142,   143,   144,   145,   146,   147,     0,     0,     0,     0,
       0,     0,     0,   217,   218,     0,     0,   131,   132
};

static const short yycheck[] =
{
       2,    40,    76,     0,     2,     0,    73,     8,     2,   183,
      89,    90,   154,    35,   121,     0,    74,    35,    35,    35,
      92,    93,    35,    53,    54,    48,    48,    90,   202,   101,
     102,   103,    35,   107,   108,    74,    99,    76,    40,    48,
     107,   108,    35,    35,   102,    89,    90,   104,     5,    99,
       7,    70,     9,    89,    90,    99,    48,    49,    50,    51,
      52,   100,   169,   102,    94,    95,    96,    97,   107,   108,
      48,    73,    74,    99,    76,    73,    74,    35,   220,    73,
      74,   120,   121,   102,   100,    87,    97,    45,    46,    47,
      89,    90,    89,    90,    89,    90,    97,    50,   100,    91,
      99,   168,    99,    35,    99,   107,   108,   104,   100,   107,
     108,   169,    35,   107,   108,    53,    54,   136,   120,   121,
      35,   140,   141,   142,   143,   144,   145,   146,   147,   168,
     169,    35,   151,   152,    89,    90,    35,   211,   212,    53,
      54,    35,   100,   101,   102,   103,    94,    95,    96,    97,
      96,    97,    99,     4,    92,    93,    94,    95,    96,    97,
       4,     3,     3,    35,   105,     2,   168,   169,   183,   133,
     168,   169,   211,   212,   168,   169,     0,    87,    87,    93,
      94,    95,    96,    97,    -1,    -1,    10,    11,    -1,    -1,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    29,    30,    31,    32,   211,
     212,    35,    36,    37,    38,    39,    40,    41,    42,    43,
      44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    55,    56,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
      84,    85,    86,    87,    88,    -1,    -1,    91,    -1,    -1,
      -1,    95,    -1,    10,    11,    -1,   100,    14,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
      27,    28,    29,    30,    31,    32,    -1,    -1,    35,    36,
      37,    38,    39,    40,    41,    42,    43,    44,    -1,    -1,
      -1,    48,    49,    50,    51,    52,    -1,    -1,    55,    56,
      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
      87,    88,    -1,    -1,    91,    -1,    -1,    -1,    95,    -1,
      10,    11,    -1,   100,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
      30,    31,    32,    -1,    -1,    35,    36,    37,    38,    39,
      40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    55,    56,    57,    58,    59,
      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
      80,    81,    82,    83,    84,    85,    86,    87,    88,    -1,
      -1,    91,    -1,    -1,    -1,    95,    -1,    -1,    -1,    -1,
     100,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    29,    30,    31,    32,    -1,
      -1,    35,    -1,    -1,    -1,    -1,    45,    46,    47,    -1,
      44,    -1,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,
      -1,    55,    56,    57,    58,    59,    -1,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
      74,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    92,    93,    94,    95,    96,    97,    -1,
      -1,    95,   101,   102,   103,    -1,   100,     3,     4,     5,
       6,     7,    -1,     9,    -1,    -1,    12,    13,    -1,    -1,
      92,    93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   105,   106,    -1,    -1,    33,    34
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,   108,   109,     0,    10,    11,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
      28,    29,    30,    31,    32,    35,    36,    37,    38,    39,
      40,    41,    42,    43,    44,    55,    56,    57,    58,    59,
      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
      80,    81,    82,    83,    84,    85,    86,    87,    88,    91,
      95,   100,   110,   115,   116,   119,   120,   121,   122,   126,
     127,   128,   133,   134,   136,   137,   138,   139,    35,    35,
      35,    48,    48,    35,    35,    35,    48,   129,    48,   130,
     116,   136,   116,   126,   133,    89,    90,   111,   112,   119,
     110,   134,   136,    48,    49,    50,    51,    52,   113,   114,
     115,   116,   136,     3,     4,     5,     6,     7,     9,    12,
      13,    33,    34,   123,   124,   125,   104,    45,    46,    47,
      53,    54,    92,    93,    94,    95,    96,    97,   101,   102,
     103,   131,   132,    35,   116,   131,   132,   140,   141,    92,
      93,   101,   102,   103,   135,   136,   133,   113,   115,   116,
     119,   136,   113,   119,    99,    99,    99,     8,    97,    97,
     113,   114,   117,   118,   136,    89,    90,    89,    90,   124,
     133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
     133,   141,   142,    35,    35,    35,   136,    50,    35,    35,
      99,   111,   112,     4,     4,     3,     3,   105,   106,    99,
     112,   113,   113,    35,   141,   105
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrlab1


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL		goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { 								\
      yyerror ("syntax error: cannot back up");\
      YYERROR;							\
    }								\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)         \
  Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
# define YYLEX yylex ()
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)

# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint Args;				\
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Token, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (cinluded).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (Rule);		\
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */



/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  
  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack. Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	short *yyss1 = yyss;


	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;


  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:
#line 157 "../libpcap/grammar.y"
    {
	finish_parse(yyvsp[0].blk.b);
}
    break;

  case 4:
#line 162 "../libpcap/grammar.y"
    { yyval.blk.q = qerr; }
    break;

  case 6:
#line 165 "../libpcap/grammar.y"
    { gen_and(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 7:
#line 166 "../libpcap/grammar.y"
    { gen_and(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 8:
#line 167 "../libpcap/grammar.y"
    { gen_or(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 9:
#line 168 "../libpcap/grammar.y"
    { gen_or(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 10:
#line 170 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[-1].blk; }
    break;

  case 11:
#line 172 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[-1].blk; }
    break;

  case 13:
#line 175 "../libpcap/grammar.y"
    { yyval.blk.b = gen_ncode(NULL, (bpf_u_int32)yyvsp[0].i,
						   yyval.blk.q = yyvsp[-1].blk.q); }
    break;

  case 14:
#line 177 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[-1].blk; }
    break;

  case 15:
#line 179 "../libpcap/grammar.y"
    { yyval.blk.b = gen_scode(yyvsp[0].s, yyval.blk.q = yyvsp[-1].blk.q); }
    break;

  case 16:
#line 180 "../libpcap/grammar.y"
    { yyval.blk.b = gen_mcode(yyvsp[-2].s, NULL, yyvsp[0].i,
				    yyval.blk.q = yyvsp[-3].blk.q); }
    break;

  case 17:
#line 182 "../libpcap/grammar.y"
    { yyval.blk.b = gen_mcode(yyvsp[-2].s, yyvsp[0].s, 0,
				    yyval.blk.q = yyvsp[-3].blk.q); }
    break;

  case 18:
#line 184 "../libpcap/grammar.y"
    {
				  /* Decide how to parse HID based on proto */
				  yyval.blk.q = yyvsp[-1].blk.q;
				  yyval.blk.b = gen_ncode(yyvsp[0].s, 0, yyval.blk.q);
				}
    break;

  case 19:
#line 189 "../libpcap/grammar.y"
    {
#ifdef INET6
				  yyval.blk.b = gen_mcode6(yyvsp[-2].s, NULL, yyvsp[0].i,
				    yyval.blk.q = yyvsp[-3].blk.q);
#else
				  bpf_error("'ip6addr/prefixlen' not supported "
					"in this configuration");
#endif /*INET6*/
				}
    break;

  case 20:
#line 198 "../libpcap/grammar.y"
    {
#ifdef INET6
				  yyval.blk.b = gen_mcode6(yyvsp[0].s, 0, 128,
				    yyval.blk.q = yyvsp[-1].blk.q);
#else
				  bpf_error("'ip6addr' not supported "
					"in this configuration");
#endif /*INET6*/
				}
    break;

  case 21:
#line 207 "../libpcap/grammar.y"
    { 
				  yyval.blk.b = gen_ecode(yyvsp[0].e, yyval.blk.q = yyvsp[-1].blk.q);
				  /*
				   * $1 was allocated by "pcap_ether_aton()",
				   * so we must free it now that we're done
				   * with it.
				   */
				  free(yyvsp[0].e);
				}
    break;

  case 22:
#line 216 "../libpcap/grammar.y"
    {
				  yyval.blk.b = gen_acode(yyvsp[0].e, yyval.blk.q = yyvsp[-1].blk.q);
				  /*
				   * $1 was allocated by "pcap_ether_aton()",
				   * so we must free it now that we're done
				   * with it.
				   */
				  free(yyvsp[0].e);
				}
    break;

  case 23:
#line 225 "../libpcap/grammar.y"
    { gen_not(yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 24:
#line 227 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[-1].blk; }
    break;

  case 25:
#line 229 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[-1].blk; }
    break;

  case 27:
#line 232 "../libpcap/grammar.y"
    { gen_and(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 28:
#line 233 "../libpcap/grammar.y"
    { gen_or(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 29:
#line 235 "../libpcap/grammar.y"
    { yyval.blk.b = gen_ncode(NULL, (bpf_u_int32)yyvsp[0].i,
						   yyval.blk.q = yyvsp[-1].blk.q); }
    break;

  case 32:
#line 240 "../libpcap/grammar.y"
    { gen_not(yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;

  case 33:
#line 242 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-2].i, yyvsp[-1].i, yyvsp[0].i); }
    break;

  case 34:
#line 243 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-1].i, yyvsp[0].i, Q_DEFAULT); }
    break;

  case 35:
#line 244 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-1].i, Q_DEFAULT, yyvsp[0].i); }
    break;

  case 36:
#line 245 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-1].i, Q_DEFAULT, Q_PROTO); }
    break;

  case 37:
#line 246 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-1].i, Q_DEFAULT, Q_PROTOCHAIN); }
    break;

  case 38:
#line 247 "../libpcap/grammar.y"
    { QSET(yyval.blk.q, yyvsp[-1].i, Q_DEFAULT, yyvsp[0].i); }
    break;

  case 39:
#line 249 "../libpcap/grammar.y"
    { yyval.blk = yyvsp[0].blk; }
    break;

  case 40:
#line 250 "../libpcap/grammar.y"
    { yyval.blk.b = yyvsp[-1].blk.b; yyval.blk.q = yyvsp[-2].blk.q; }
    break;

  case 41:
#line 251 "../libpcap/grammar.y"
    { yyval.blk.b = gen_proto_abbrev(yyvsp[0].i); yyval.blk.q = qerr; }
    break;

  case 42:
#line 252 "../libpcap/grammar.y"
    { yyval.blk.b = gen_relation(yyvsp[-1].i, yyvsp[-2].a, yyvsp[0].a, 0);
				  yyval.blk.q = qerr; }
    break;

  case 43:
#line 254 "../libpcap/grammar.y"
    { yyval.blk.b = gen_relation(yyvsp[-1].i, yyvsp[-2].a, yyvsp[0].a, 1);
				  yyval.blk.q = qerr; }
    break;

  case 44:
#line 256 "../libpcap/grammar.y"
    { yyval.blk.b = yyvsp[0].rblk; yyval.blk.q = qerr; }
    break;

  case 45:
#line 257 "../libpcap/grammar.y"
    { yyval.blk.b = gen_atmtype_abbrev(yyvsp[0].i); yyval.blk.q = qerr; }
    break;

  case 46:
#line 258 "../libpcap/grammar.y"
    { yyval.blk.b = gen_atmmulti_abbrev(yyvsp[0].i); yyval.blk.q = qerr; }
    break;

  case 47:
#line 259 "../libpcap/grammar.y"
    { yyval.blk.b = yyvsp[0].blk.b; yyval.blk.q = qerr; }
    break;

  case 49:
#line 263 "../libpcap/grammar.y"
    { yyval.i = Q_DEFAULT; }
    break;

  case 50:
#line 266 "../libpcap/grammar.y"
    { yyval.i = Q_SRC; }
    break;

  case 51:
#line 267 "../libpcap/grammar.y"
    { yyval.i = Q_DST; }
    break;

  case 52:
#line 268 "../libpcap/grammar.y"
    { yyval.i = Q_OR; }
    break;

  case 53:
#line 269 "../libpcap/grammar.y"
    { yyval.i = Q_OR; }
    break;

  case 54:
#line 270 "../libpcap/grammar.y"
    { yyval.i = Q_AND; }
    break;

  case 55:
#line 271 "../libpcap/grammar.y"
    { yyval.i = Q_AND; }
    break;

  case 56:
#line 274 "../libpcap/grammar.y"
    { yyval.i = Q_HOST; }
    break;

  case 57:
#line 275 "../libpcap/grammar.y"
    { yyval.i = Q_NET; }
    break;

  case 58:
#line 276 "../libpcap/grammar.y"
    { yyval.i = Q_PORT; }
    break;

  case 59:
#line 279 "../libpcap/grammar.y"
    { yyval.i = Q_GATEWAY; }
    break;

  case 60:
#line 281 "../libpcap/grammar.y"
    { yyval.i = Q_LINK; }
    break;

  case 61:
#line 282 "../libpcap/grammar.y"
    { yyval.i = Q_IP; }
    break;

  case 62:
#line 283 "../libpcap/grammar.y"
    { yyval.i = Q_ARP; }
    break;

  case 63:
#line 284 "../libpcap/grammar.y"
    { yyval.i = Q_RARP; }
    break;

  case 64:
#line 285 "../libpcap/grammar.y"
    { yyval.i = Q_SCTP; }
    break;

  case 65:
#line 286 "../libpcap/grammar.y"
    { yyval.i = Q_TCP; }
    break;

  case 66:
#line 287 "../libpcap/grammar.y"
    { yyval.i = Q_UDP; }
    break;

  case 67:
#line 288 "../libpcap/grammar.y"
    { yyval.i = Q_ICMP; }
    break;

  case 68:
#line 289 "../libpcap/grammar.y"
    { yyval.i = Q_IGMP; }
    break;

  case 69:
#line 290 "../libpcap/grammar.y"
    { yyval.i = Q_IGRP; }
    break;

  case 70:
#line 291 "../libpcap/grammar.y"
    { yyval.i = Q_PIM; }
    break;

  case 71:
#line 292 "../libpcap/grammar.y"
    { yyval.i = Q_VRRP; }
    break;

  case 72:
#line 293 "../libpcap/grammar.y"
    { yyval.i = Q_ATALK; }
    break;

  case 73:
#line 294 "../libpcap/grammar.y"
    { yyval.i = Q_AARP; }
    break;

  case 74:
#line 295 "../libpcap/grammar.y"
    { yyval.i = Q_DECNET; }
    break;

  case 75:
#line 296 "../libpcap/grammar.y"
    { yyval.i = Q_LAT; }
    break;

  case 76:
#line 297 "../libpcap/grammar.y"
    { yyval.i = Q_SCA; }
    break;

  case 77:
#line 298 "../libpcap/grammar.y"
    { yyval.i = Q_MOPDL; }
    break;

  case 78:
#line 299 "../libpcap/grammar.y"
    { yyval.i = Q_MOPRC; }
    break;

  case 79:
#line 300 "../libpcap/grammar.y"
    { yyval.i = Q_IPV6; }
    break;

  case 80:
#line 301 "../libpcap/grammar.y"
    { yyval.i = Q_ICMPV6; }
    break;

  case 81:
#line 302 "../libpcap/grammar.y"
    { yyval.i = Q_AH; }
    break;

  case 82:
#line 303 "../libpcap/grammar.y"
    { yyval.i = Q_ESP; }
    break;

  case 83:
#line 304 "../libpcap/grammar.y"
    { yyval.i = Q_ISO; }
    break;

  case 84:
#line 305 "../libpcap/grammar.y"
    { yyval.i = Q_ESIS; }
    break;

  case 85:
#line 306 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS; }
    break;

  case 86:
#line 307 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_L1; }
    break;

  case 87:
#line 308 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_L2; }
    break;

  case 88:
#line 309 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_IIH; }
    break;

  case 89:
#line 310 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_LSP; }
    break;

  case 90:
#line 311 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_SNP; }
    break;

  case 91:
#line 312 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_PSNP; }
    break;

  case 92:
#line 313 "../libpcap/grammar.y"
    { yyval.i = Q_ISIS_CSNP; }
    break;

  case 93:
#line 314 "../libpcap/grammar.y"
    { yyval.i = Q_CLNP; }
    break;

  case 94:
#line 315 "../libpcap/grammar.y"
    { yyval.i = Q_STP; }
    break;

  case 95:
#line 316 "../libpcap/grammar.y"
    { yyval.i = Q_IPX; }
    break;

  case 96:
#line 317 "../libpcap/grammar.y"
    { yyval.i = Q_NETBEUI; }
    break;

  case 97:
#line 319 "../libpcap/grammar.y"
    { yyval.rblk = gen_broadcast(yyvsp[-1].i); }
    break;

  case 98:
#line 320 "../libpcap/grammar.y"
    { yyval.rblk = gen_multicast(yyvsp[-1].i); }
    break;

  case 99:
#line 321 "../libpcap/grammar.y"
    { yyval.rblk = gen_less(yyvsp[0].i); }
    break;

  case 100:
#line 322 "../libpcap/grammar.y"
    { yyval.rblk = gen_greater(yyvsp[0].i); }
    break;

  case 101:
#line 323 "../libpcap/grammar.y"
    { yyval.rblk = gen_byteop(yyvsp[-1].i, yyvsp[-2].i, yyvsp[0].i); }
    break;

  case 102:
#line 324 "../libpcap/grammar.y"
    { yyval.rblk = gen_inbound(0); }
    break;

  case 103:
#line 325 "../libpcap/grammar.y"
    { yyval.rblk = gen_inbound(1); }
    break;

  case 104:
#line 326 "../libpcap/grammar.y"
    { yyval.rblk = gen_vlan(yyvsp[0].i); }
    break;

  case 105:
#line 327 "../libpcap/grammar.y"
    { yyval.rblk = gen_vlan(-1); }
    break;

  case 106:
#line 328 "../libpcap/grammar.y"
    { yyval.rblk = yyvsp[0].rblk; }
    break;

  case 107:
#line 331 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_ifname(yyvsp[0].s); }
    break;

  case 108:
#line 332 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_ruleset(yyvsp[0].s); }
    break;

  case 109:
#line 333 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_rnr(yyvsp[0].i); }
    break;

  case 110:
#line 334 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_srnr(yyvsp[0].i); }
    break;

  case 111:
#line 335 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_reason(yyvsp[0].i); }
    break;

  case 112:
#line 336 "../libpcap/grammar.y"
    { yyval.rblk = gen_pf_action(yyvsp[0].i); }
    break;

  case 113:
#line 339 "../libpcap/grammar.y"
    { yyval.i = yyvsp[0].i; }
    break;

  case 114:
#line 340 "../libpcap/grammar.y"
    { const char *reasons[] = PFRES_NAMES;
				  int i;
				  for (i = 0; reasons[i]; i++) {
					  if (pcap_strcasecmp(yyvsp[0].s, reasons[i]) == 0) {
						  yyval.i = i;
						  break;
					  }
				  }
				  if (reasons[i] == NULL)
					  bpf_error("unknown PF reason");
				}
    break;

  case 115:
#line 353 "../libpcap/grammar.y"
    { if (pcap_strcasecmp(yyvsp[0].s, "pass") == 0 ||
				      pcap_strcasecmp(yyvsp[0].s, "accept") == 0)
					yyval.i = PF_PASS;
				  else if (pcap_strcasecmp(yyvsp[0].s, "drop") == 0 ||
				      pcap_strcasecmp(yyvsp[0].s, "block") == 0)
					yyval.i = PF_DROP;
				  else
					  bpf_error("unknown PF action");
				}
    break;

  case 116:
#line 364 "../libpcap/grammar.y"
    { yyval.i = BPF_JGT; }
    break;

  case 117:
#line 365 "../libpcap/grammar.y"
    { yyval.i = BPF_JGE; }
    break;

  case 118:
#line 366 "../libpcap/grammar.y"
    { yyval.i = BPF_JEQ; }
    break;

  case 119:
#line 368 "../libpcap/grammar.y"
    { yyval.i = BPF_JGT; }
    break;

  case 120:
#line 369 "../libpcap/grammar.y"
    { yyval.i = BPF_JGE; }
    break;

  case 121:
#line 370 "../libpcap/grammar.y"
    { yyval.i = BPF_JEQ; }
    break;

  case 122:
#line 372 "../libpcap/grammar.y"
    { yyval.a = gen_loadi(yyvsp[0].i); }
    break;

  case 124:
#line 375 "../libpcap/grammar.y"
    { yyval.a = gen_load(yyvsp[-3].i, yyvsp[-1].a, 1); }
    break;

  case 125:
#line 376 "../libpcap/grammar.y"
    { yyval.a = gen_load(yyvsp[-5].i, yyvsp[-3].a, yyvsp[-1].i); }
    break;

  case 126:
#line 377 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_ADD, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 127:
#line 378 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_SUB, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 128:
#line 379 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_MUL, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 129:
#line 380 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_DIV, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 130:
#line 381 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_AND, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 131:
#line 382 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_OR, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 132:
#line 383 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_LSH, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 133:
#line 384 "../libpcap/grammar.y"
    { yyval.a = gen_arth(BPF_RSH, yyvsp[-2].a, yyvsp[0].a); }
    break;

  case 134:
#line 385 "../libpcap/grammar.y"
    { yyval.a = gen_neg(yyvsp[0].a); }
    break;

  case 135:
#line 386 "../libpcap/grammar.y"
    { yyval.a = yyvsp[-1].a; }
    break;

  case 136:
#line 387 "../libpcap/grammar.y"
    { yyval.a = gen_loadlen(); }
    break;

  case 137:
#line 389 "../libpcap/grammar.y"
    { yyval.i = '&'; }
    break;

  case 138:
#line 390 "../libpcap/grammar.y"
    { yyval.i = '|'; }
    break;

  case 139:
#line 391 "../libpcap/grammar.y"
    { yyval.i = '<'; }
    break;

  case 140:
#line 392 "../libpcap/grammar.y"
    { yyval.i = '>'; }
    break;

  case 141:
#line 393 "../libpcap/grammar.y"
    { yyval.i = '='; }
    break;

  case 143:
#line 396 "../libpcap/grammar.y"
    { yyval.i = yyvsp[-1].i; }
    break;

  case 144:
#line 398 "../libpcap/grammar.y"
    { yyval.i = A_LANE; }
    break;

  case 145:
#line 399 "../libpcap/grammar.y"
    { yyval.i = A_LLC; }
    break;

  case 146:
#line 400 "../libpcap/grammar.y"
    { yyval.i = A_METAC;	}
    break;

  case 147:
#line 401 "../libpcap/grammar.y"
    { yyval.i = A_BCC; }
    break;

  case 148:
#line 402 "../libpcap/grammar.y"
    { yyval.i = A_OAMF4EC; }
    break;

  case 149:
#line 403 "../libpcap/grammar.y"
    { yyval.i = A_OAMF4SC; }
    break;

  case 150:
#line 404 "../libpcap/grammar.y"
    { yyval.i = A_SC; }
    break;

  case 151:
#line 405 "../libpcap/grammar.y"
    { yyval.i = A_ILMIC; }
    break;

  case 152:
#line 407 "../libpcap/grammar.y"
    { yyval.i = A_OAM; }
    break;

  case 153:
#line 408 "../libpcap/grammar.y"
    { yyval.i = A_OAMF4; }
    break;

  case 154:
#line 409 "../libpcap/grammar.y"
    { yyval.i = A_CONNECTMSG; }
    break;

  case 155:
#line 410 "../libpcap/grammar.y"
    { yyval.i = A_METACONNECT; }
    break;

  case 156:
#line 413 "../libpcap/grammar.y"
    { yyval.blk.atmfieldtype = A_VPI; }
    break;

  case 157:
#line 414 "../libpcap/grammar.y"
    { yyval.blk.atmfieldtype = A_VCI; }
    break;

  case 159:
#line 417 "../libpcap/grammar.y"
    { yyval.blk.b = gen_atmfield_code(yyvsp[-2].blk.atmfieldtype, (u_int)yyvsp[0].i, (u_int)yyvsp[-1].i, 0); }
    break;

  case 160:
#line 418 "../libpcap/grammar.y"
    { yyval.blk.b = gen_atmfield_code(yyvsp[-2].blk.atmfieldtype, (u_int)yyvsp[0].i, (u_int)yyvsp[-1].i, 1); }
    break;

  case 161:
#line 419 "../libpcap/grammar.y"
    { yyval.blk.b = yyvsp[-1].blk.b; yyval.blk.q = qerr; }
    break;

  case 162:
#line 421 "../libpcap/grammar.y"
    {
	yyval.blk.atmfieldtype = yyvsp[-1].blk.atmfieldtype;
	if (yyval.blk.atmfieldtype == A_VPI ||
	    yyval.blk.atmfieldtype == A_VCI)
		yyval.blk.b = gen_atmfield_code(yyval.blk.atmfieldtype, (u_int) yyvsp[0].i, BPF_JEQ, 0);
	}
    break;

  case 164:
#line 429 "../libpcap/grammar.y"
    { gen_or(yyvsp[-2].blk.b, yyvsp[0].blk.b); yyval.blk = yyvsp[0].blk; }
    break;


    }

/* Line 999 of yacc.c.  */
#line 2399 "y.tab.c"

  yyvsp -= yylen;
  yyssp -= yylen;


  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  int yytype = YYTRANSLATE (yychar);
	  const char* yyprefix;
	  char *yymsg;
	  int yyx;

	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  int yyxbegin = yyn < 0 ? -yyn : 0;

	  /* Stay within bounds of both yycheck and yytname.  */
	  int yychecklim = YYLAST - yyn;
	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
	  int yycount = 0;

	  yyprefix = ", expecting ";
	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	      {
		yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
		yycount += 1;
		if (yycount == 5)
		  {
		    yysize = 0;
		    break;
		  }
	      }
	  yysize += (sizeof ("syntax error, unexpected ")
		     + yystrlen (yytname[yytype]));
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[yytype]);

	      if (yycount < 5)
		{
		  yyprefix = ", expecting ";
		  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			yyp = yystpcpy (yyp, yyprefix);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yyprefix = " or ";
		      }
		}
	      yyerror (yymsg);
	      YYSTACK_FREE (yymsg);
	    }
	  else
	    yyerror ("syntax error; also virtual memory exhausted");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror ("syntax error");
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
	 error, discard it.  */

      /* Return failure if at end of input.  */
      if (yychar == YYEOF)
        {
	  /* Pop the error token.  */
          YYPOPSTACK;
	  /* Pop the rest of the stack.  */
	  while (yyss < yyssp)
	    {
	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
	      yydestruct (yystos[*yyssp], yyvsp);
	      YYPOPSTACK;
	    }
	  YYABORT;
        }

      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
      yydestruct (yytoken, &yylval);
      yychar = YYEMPTY;

    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      yyvsp--;
      yystate = *--yyssp;

      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}


#line 431 "../libpcap/grammar.y"


