1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
64 /* Substitute the variable and function names. */
65 #define yyparse pcap_parse
66 #define yylex pcap_lex
67 #define yyerror pcap_error
68 #define yylval pcap_lval
69 #define yychar pcap_char
70 #define yydebug pcap_debug
71 #define yynerrs pcap_nerrs
74 /* Copy the first part of user declarations. */
76 /* Line 268 of yacc.c */
80 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
81 * The Regents of the University of California. All rights reserved.
83 * Redistribution and use in source and binary forms, with or without
84 * modification, are permitted provided that: (1) source code distributions
85 * retain the above copyright notice and this paragraph in its entirety, (2)
86 * distributions including binary code include the above copyright notice and
87 * this paragraph in its entirety in the documentation or other materials
88 * provided with the distribution, and (3) all advertising materials mentioning
89 * features or use of this software display the following acknowledgement:
90 * ``This product includes software developed by the University of California,
91 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
92 * the University nor the names of its contributors may be used to endorse
93 * or promote products derived from this software without specific prior
95 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
96 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
97 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
101 static const char rcsid
[] _U_
=
102 "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.101 2007-11-18 02:03:52 guy Exp $ (LBL)";
110 #include <pcap-stdinc.h>
112 #include <sys/types.h>
113 #include <sys/socket.h>
124 #include <netinet/in.h>
125 #include <arpa/inet.h>
130 #include "pcap-int.h"
133 #ifdef HAVE_NET_PFVAR_H
135 #include <net/pfvar.h>
136 #include <net/if_pflog.h>
138 #include "ieee80211.h"
139 #include <pcap/namedb.h>
141 #ifdef HAVE_OS_PROTO_H
142 #include "os-proto.h"
145 #define QSET(q, p, d, a) (q).proto = (p),\
151 const char *s
; /* string */
154 static const struct tok ieee80211_types
[] = {
155 { IEEE80211_FC0_TYPE_DATA
, "data" },
156 { IEEE80211_FC0_TYPE_MGT
, "mgt" },
157 { IEEE80211_FC0_TYPE_MGT
, "management" },
158 { IEEE80211_FC0_TYPE_CTL
, "ctl" },
159 { IEEE80211_FC0_TYPE_CTL
, "control" },
162 static const struct tok ieee80211_mgt_subtypes
[] = {
163 { IEEE80211_FC0_SUBTYPE_ASSOC_REQ
, "assocreq" },
164 { IEEE80211_FC0_SUBTYPE_ASSOC_REQ
, "assoc-req" },
165 { IEEE80211_FC0_SUBTYPE_ASSOC_RESP
, "assocresp" },
166 { IEEE80211_FC0_SUBTYPE_ASSOC_RESP
, "assoc-resp" },
167 { IEEE80211_FC0_SUBTYPE_REASSOC_REQ
, "reassocreq" },
168 { IEEE80211_FC0_SUBTYPE_REASSOC_REQ
, "reassoc-req" },
169 { IEEE80211_FC0_SUBTYPE_REASSOC_RESP
, "reassocresp" },
170 { IEEE80211_FC0_SUBTYPE_REASSOC_RESP
, "reassoc-resp" },
171 { IEEE80211_FC0_SUBTYPE_PROBE_REQ
, "probereq" },
172 { IEEE80211_FC0_SUBTYPE_PROBE_REQ
, "probe-req" },
173 { IEEE80211_FC0_SUBTYPE_PROBE_RESP
, "proberesp" },
174 { IEEE80211_FC0_SUBTYPE_PROBE_RESP
, "probe-resp" },
175 { IEEE80211_FC0_SUBTYPE_BEACON
, "beacon" },
176 { IEEE80211_FC0_SUBTYPE_ATIM
, "atim" },
177 { IEEE80211_FC0_SUBTYPE_DISASSOC
, "disassoc" },
178 { IEEE80211_FC0_SUBTYPE_DISASSOC
, "disassociation" },
179 { IEEE80211_FC0_SUBTYPE_AUTH
, "auth" },
180 { IEEE80211_FC0_SUBTYPE_AUTH
, "authentication" },
181 { IEEE80211_FC0_SUBTYPE_DEAUTH
, "deauth" },
182 { IEEE80211_FC0_SUBTYPE_DEAUTH
, "deauthentication" },
185 static const struct tok ieee80211_ctl_subtypes
[] = {
186 { IEEE80211_FC0_SUBTYPE_PS_POLL
, "ps-poll" },
187 { IEEE80211_FC0_SUBTYPE_RTS
, "rts" },
188 { IEEE80211_FC0_SUBTYPE_CTS
, "cts" },
189 { IEEE80211_FC0_SUBTYPE_ACK
, "ack" },
190 { IEEE80211_FC0_SUBTYPE_CF_END
, "cf-end" },
191 { IEEE80211_FC0_SUBTYPE_CF_END_ACK
, "cf-end-ack" },
194 static const struct tok ieee80211_data_subtypes
[] = {
195 { IEEE80211_FC0_SUBTYPE_DATA
, "data" },
196 { IEEE80211_FC0_SUBTYPE_CF_ACK
, "data-cf-ack" },
197 { IEEE80211_FC0_SUBTYPE_CF_POLL
, "data-cf-poll" },
198 { IEEE80211_FC0_SUBTYPE_CF_ACPL
, "data-cf-ack-poll" },
199 { IEEE80211_FC0_SUBTYPE_NODATA
, "null" },
200 { IEEE80211_FC0_SUBTYPE_NODATA_CF_ACK
, "cf-ack" },
201 { IEEE80211_FC0_SUBTYPE_NODATA_CF_POLL
, "cf-poll" },
202 { IEEE80211_FC0_SUBTYPE_NODATA_CF_ACPL
, "cf-ack-poll" },
203 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_DATA
, "qos-data" },
204 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_CF_ACK
, "qos-data-cf-ack" },
205 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_CF_POLL
, "qos-data-cf-poll" },
206 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_CF_ACPL
, "qos-data-cf-ack-poll" },
207 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_NODATA
, "qos" },
208 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_NODATA_CF_POLL
, "qos-cf-poll" },
209 { IEEE80211_FC0_SUBTYPE_QOS
|IEEE80211_FC0_SUBTYPE_NODATA_CF_ACPL
, "qos-cf-ack-poll" },
214 const struct tok
*tok
;
216 static const struct type2tok ieee80211_type_subtypes
[] = {
217 { IEEE80211_FC0_TYPE_MGT
, ieee80211_mgt_subtypes
},
218 { IEEE80211_FC0_TYPE_CTL
, ieee80211_ctl_subtypes
},
219 { IEEE80211_FC0_TYPE_DATA
, ieee80211_data_subtypes
},
224 str2tok(const char *str
, const struct tok
*toks
)
228 for (i
= 0; toks
[i
].s
!= NULL
; i
++) {
229 if (pcap_strcasecmp(toks
[i
].s
, str
) == 0)
237 static struct qual qerr
= { Q_UNDEF
, Q_UNDEF
, Q_UNDEF
, Q_UNDEF
};
240 yyerror(const char *msg
)
243 bpf_error("%s", msg
);
257 #ifdef HAVE_NET_PFVAR_H
259 pfreason_to_num(const char *reason
)
261 const char *reasons
[] = PFRES_NAMES
;
264 for (i
= 0; reasons
[i
]; i
++) {
265 if (pcap_strcasecmp(reason
, reasons
[i
]) == 0)
268 bpf_error("unknown PF reason");
273 pfaction_to_num(const char *action
)
275 if (pcap_strcasecmp(action
, "pass") == 0 ||
276 pcap_strcasecmp(action
, "accept") == 0)
278 else if (pcap_strcasecmp(action
, "drop") == 0 ||
279 pcap_strcasecmp(action
, "block") == 0)
281 #if HAVE_PF_NAT_THROUGH_PF_NORDR
282 else if (pcap_strcasecmp(action
, "rdr") == 0)
284 else if (pcap_strcasecmp(action
, "nat") == 0)
286 else if (pcap_strcasecmp(action
, "binat") == 0)
288 else if (pcap_strcasecmp(action
, "nordr") == 0)
292 bpf_error("unknown PF action");
296 #else /* !HAVE_NET_PFVAR_H */
298 pfreason_to_num(const char *reason
)
300 bpf_error("libpcap was compiled on a machine without pf support");
303 /* this is to make the VC compiler happy */
308 pfaction_to_num(const char *action
)
310 bpf_error("libpcap was compiled on a machine without pf support");
313 /* this is to make the VC compiler happy */
316 #endif /* HAVE_NET_PFVAR_H */
319 /* Line 268 of yacc.c */
322 /* Enabling traces. */
327 /* Enabling verbose error messages. */
328 #ifdef YYERROR_VERBOSE
329 # undef YYERROR_VERBOSE
330 # define YYERROR_VERBOSE 1
332 # define YYERROR_VERBOSE 0
335 /* Enabling the token table. */
336 #ifndef YYTOKEN_TABLE
337 # define YYTOKEN_TABLE 0
344 /* Put the tokens into the symbol table, so that GDB and other debuggers
468 #define PORTRANGE 265
472 #define PROTOCHAIN 269
493 #define TK_BROADCAST 290
494 #define TK_MULTICAST 291
498 #define PF_IFNAME 295
502 #define PF_REASON 299
503 #define PF_ACTION 300
557 #define CONNECTMSG 354
558 #define METACONNECT 355
576 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
577 typedef union YYSTYPE
580 /* Line 293 of yacc.c */
581 #line 242 "grammar.y"
599 /* Line 293 of yacc.c */
602 # define YYSTYPE_IS_TRIVIAL 1
603 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
604 # define YYSTYPE_IS_DECLARED 1
608 /* Copy the second part of user declarations. */
611 /* Line 343 of yacc.c */
619 typedef YYTYPE_UINT8 yytype_uint8
;
621 typedef unsigned char yytype_uint8
;
625 typedef YYTYPE_INT8 yytype_int8
;
626 #elif (defined __STDC__ || defined __C99__FUNC__ \
627 || defined __cplusplus || defined _MSC_VER)
628 typedef signed char yytype_int8
;
630 typedef short int yytype_int8
;
634 typedef YYTYPE_UINT16 yytype_uint16
;
636 typedef unsigned short int yytype_uint16
;
640 typedef YYTYPE_INT16 yytype_int16
;
642 typedef short int yytype_int16
;
646 # ifdef __SIZE_TYPE__
647 # define YYSIZE_T __SIZE_TYPE__
648 # elif defined size_t
649 # define YYSIZE_T size_t
650 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
651 || defined __cplusplus || defined _MSC_VER)
652 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
653 # define YYSIZE_T size_t
655 # define YYSIZE_T unsigned int
659 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
662 # if defined YYENABLE_NLS && YYENABLE_NLS
664 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
665 # define YY_(msgid) dgettext ("bison-runtime", msgid)
669 # define YY_(msgid) msgid
673 /* Suppress unused-variable warnings by "using" E. */
674 #if ! defined lint || defined __GNUC__
675 # define YYUSE(e) ((void) (e))
677 # define YYUSE(e) /* empty */
680 /* Identity function, used to suppress warnings about constant conditions. */
684 #if (defined __STDC__ || defined __C99__FUNC__ \
685 || defined __cplusplus || defined _MSC_VER)
698 #if ! defined yyoverflow || YYERROR_VERBOSE
700 /* The parser invokes alloca or malloc; define the necessary symbols. */
702 # ifdef YYSTACK_USE_ALLOCA
703 # if YYSTACK_USE_ALLOCA
705 # define YYSTACK_ALLOC __builtin_alloca
706 # elif defined __BUILTIN_VA_ARG_INCR
707 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
709 # define YYSTACK_ALLOC __alloca
710 # elif defined _MSC_VER
711 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
712 # define alloca _alloca
714 # define YYSTACK_ALLOC alloca
715 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
716 || defined __cplusplus || defined _MSC_VER)
717 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
718 # ifndef EXIT_SUCCESS
719 # define EXIT_SUCCESS 0
726 # ifdef YYSTACK_ALLOC
727 /* Pacify GCC's `empty if-body' warning. */
728 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
729 # ifndef YYSTACK_ALLOC_MAXIMUM
730 /* The OS might guarantee only one guard page at the bottom of the stack,
731 and a page size can be as small as 4096 bytes. So we cannot safely
732 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
733 to allow for a few compiler-allocated temporary stack slots. */
734 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
737 # define YYSTACK_ALLOC YYMALLOC
738 # define YYSTACK_FREE YYFREE
739 # ifndef YYSTACK_ALLOC_MAXIMUM
740 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
742 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
743 && ! ((defined YYMALLOC || defined malloc) \
744 && (defined YYFREE || defined free)))
745 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
746 # ifndef EXIT_SUCCESS
747 # define EXIT_SUCCESS 0
751 # define YYMALLOC malloc
752 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
753 || defined __cplusplus || defined _MSC_VER)
754 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
759 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
760 || defined __cplusplus || defined _MSC_VER)
761 void free (void *); /* INFRINGES ON USER NAME SPACE */
765 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
768 #if (! defined yyoverflow \
769 && (! defined __cplusplus \
770 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
772 /* A type that is properly aligned for any stack member. */
775 yytype_int16 yyss_alloc
;
779 /* The size of the maximum gap between one aligned stack and the next. */
780 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
782 /* The size of an array large to enough to hold all stacks, each with
784 # define YYSTACK_BYTES(N) \
785 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
786 + YYSTACK_GAP_MAXIMUM)
788 # define YYCOPY_NEEDED 1
790 /* Relocate STACK from its old location to the new one. The
791 local variables YYSIZE and YYSTACKSIZE give the old and new number of
792 elements in the stack, and YYPTR gives the new location of the
793 stack. Advance YYPTR to a properly aligned location for the next
795 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
798 YYSIZE_T yynewbytes; \
799 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
800 Stack = &yyptr->Stack_alloc; \
801 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
802 yyptr += yynewbytes / sizeof (*yyptr); \
808 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
809 /* Copy COUNT objects from FROM to TO. The source and destination do
812 # if defined __GNUC__ && 1 < __GNUC__
813 # define YYCOPY(To, From, Count) \
814 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
816 # define YYCOPY(To, From, Count) \
820 for (yyi = 0; yyi < (Count); yyi++) \
821 (To)[yyi] = (From)[yyi]; \
826 #endif /* !YYCOPY_NEEDED */
828 /* YYFINAL -- State number of the termination state. */
830 /* YYLAST -- Last index in YYTABLE. */
833 /* YYNTOKENS -- Number of terminals. */
834 #define YYNTOKENS 129
835 /* YYNNTS -- Number of nonterminals. */
837 /* YYNRULES -- Number of rules. */
839 /* YYNRULES -- Number of states. */
840 #define YYNSTATES 277
842 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
844 #define YYMAXUTOK 368
846 #define YYTRANSLATE(YYX) \
847 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
849 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
850 static const yytype_uint8 yytranslate
[] =
852 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 113, 2, 2, 2, 2, 115, 2,
856 122, 121, 118, 116, 2, 117, 2, 119, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 128, 2,
858 125, 124, 123, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 126, 2, 127, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
864 2, 2, 2, 2, 114, 2, 2, 2, 2, 2,
865 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
870 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
871 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
872 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
873 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
874 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
875 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
876 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
877 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
878 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
879 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
880 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
881 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
882 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
883 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
884 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
885 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
886 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
887 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
888 105, 106, 107, 108, 109, 110, 111, 112, 120
892 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
894 static const yytype_uint16 yyprhs
[] =
896 0, 0, 3, 6, 8, 9, 11, 15, 19, 23,
897 27, 29, 31, 33, 35, 39, 41, 45, 49, 51,
898 55, 57, 59, 61, 64, 66, 68, 70, 74, 78,
899 80, 82, 84, 87, 91, 94, 97, 100, 103, 106,
900 109, 113, 115, 119, 123, 125, 127, 129, 132, 134,
901 137, 139, 140, 142, 144, 148, 152, 156, 160, 162,
902 164, 166, 168, 170, 172, 174, 176, 178, 180, 182,
903 184, 186, 188, 190, 192, 194, 196, 198, 200, 202,
904 204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
905 224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
906 244, 246, 248, 250, 252, 254, 256, 258, 260, 263,
907 266, 269, 272, 277, 279, 281, 284, 286, 289, 291,
908 293, 295, 297, 300, 303, 306, 309, 312, 315, 318,
909 323, 326, 329, 332, 334, 336, 338, 340, 342, 344,
910 346, 348, 350, 352, 354, 356, 358, 360, 362, 364,
911 366, 368, 373, 380, 384, 388, 392, 396, 400, 404,
912 408, 412, 415, 419, 421, 423, 425, 427, 429, 431,
913 433, 437, 439, 441, 443, 445, 447, 449, 451, 453,
914 455, 457, 459, 461, 463, 465, 467, 470, 473, 477,
915 479, 481, 485, 487, 489, 491, 493, 495, 497, 499,
916 501, 504, 507, 511, 513, 515
919 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
920 static const yytype_int16 yyrhs
[] =
922 130, 0, -1, 131, 132, -1, 131, -1, -1, 141,
923 -1, 132, 133, 141, -1, 132, 133, 135, -1, 132,
924 134, 141, -1, 132, 134, 135, -1, 111, -1, 112,
925 -1, 136, -1, 163, -1, 138, 139, 121, -1, 59,
926 -1, 61, 119, 37, -1, 61, 8, 61, -1, 61,
927 -1, 62, 119, 37, -1, 62, -1, 60, -1, 63,
928 -1, 137, 135, -1, 113, -1, 122, -1, 136, -1,
929 140, 133, 135, -1, 140, 134, 135, -1, 163, -1,
930 139, -1, 143, -1, 137, 141, -1, 144, 145, 146,
931 -1, 144, 145, -1, 144, 146, -1, 144, 13, -1,
932 144, 14, -1, 144, 147, -1, 142, 135, -1, 138,
933 132, 121, -1, 148, -1, 160, 158, 160, -1, 160,
934 159, 160, -1, 149, -1, 164, -1, 165, -1, 166,
935 167, -1, 170, -1, 171, 172, -1, 148, -1, -1,
936 4, -1, 3, -1, 4, 112, 3, -1, 3, 112,
937 4, -1, 4, 111, 3, -1, 3, 111, 4, -1,
938 49, -1, 50, -1, 51, -1, 52, -1, 53, -1,
939 54, -1, 5, -1, 7, -1, 9, -1, 10, -1,
940 6, -1, 55, -1, 18, -1, 16, -1, 17, -1,
941 19, -1, 20, -1, 21, -1, 22, -1, 23, -1,
942 24, -1, 25, -1, 26, -1, 27, -1, 28, -1,
943 29, -1, 30, -1, 31, -1, 32, -1, 34, -1,
944 33, -1, 67, -1, 68, -1, 69, -1, 70, -1,
945 75, -1, 76, -1, 78, -1, 79, -1, 80, -1,
946 81, -1, 82, -1, 83, -1, 85, -1, 84, -1,
947 77, -1, 86, -1, 87, -1, 88, -1, 103, -1,
948 144, 35, -1, 144, 36, -1, 11, 37, -1, 12,
949 37, -1, 15, 37, 162, 37, -1, 38, -1, 39,
950 -1, 71, 163, -1, 71, -1, 72, 163, -1, 72,
951 -1, 73, -1, 74, -1, 150, -1, 144, 151, -1,
952 40, 59, -1, 41, 59, -1, 42, 37, -1, 43,
953 37, -1, 44, 156, -1, 45, 157, -1, 46, 152,
954 47, 153, -1, 46, 152, -1, 47, 154, -1, 48,
955 155, -1, 37, -1, 59, -1, 37, -1, 59, -1,
956 59, -1, 37, -1, 59, -1, 37, -1, 59, -1,
957 59, -1, 123, -1, 56, -1, 124, -1, 57, -1,
958 125, -1, 58, -1, 163, -1, 161, -1, 148, 126,
959 160, 127, -1, 148, 126, 160, 128, 37, 127, -1,
960 160, 116, 160, -1, 160, 117, 160, -1, 160, 118,
961 160, -1, 160, 119, 160, -1, 160, 115, 160, -1,
962 160, 114, 160, -1, 160, 64, 160, -1, 160, 65,
963 160, -1, 117, 160, -1, 138, 161, 121, -1, 66,
964 -1, 115, -1, 114, -1, 125, -1, 123, -1, 124,
965 -1, 37, -1, 138, 163, 121, -1, 89, -1, 90,
966 -1, 91, -1, 92, -1, 95, -1, 96, -1, 93,
967 -1, 94, -1, 97, -1, 98, -1, 99, -1, 100,
968 -1, 101, -1, 102, -1, 168, -1, 158, 37, -1,
969 159, 37, -1, 138, 169, 121, -1, 37, -1, 168,
970 -1, 169, 134, 168, -1, 104, -1, 105, -1, 106,
971 -1, 107, -1, 108, -1, 109, -1, 110, -1, 173,
972 -1, 158, 37, -1, 159, 37, -1, 138, 174, 121,
973 -1, 37, -1, 173, -1, 174, 134, 173, -1
976 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
977 static const yytype_uint16 yyrline
[] =
979 0, 315, 315, 319, 321, 323, 324, 325, 326, 327,
980 329, 331, 333, 334, 336, 338, 339, 341, 343, 356,
981 365, 374, 383, 392, 394, 396, 398, 399, 400, 402,
982 404, 406, 407, 409, 410, 411, 412, 413, 414, 416,
983 417, 418, 419, 421, 423, 424, 425, 426, 427, 428,
984 431, 432, 435, 436, 437, 438, 439, 440, 441, 442,
985 443, 444, 445, 446, 449, 450, 451, 452, 455, 457,
986 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
987 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
988 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
989 488, 489, 490, 491, 492, 493, 494, 495, 497, 498,
990 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
991 509, 510, 511, 514, 515, 516, 517, 518, 519, 522,
992 527, 530, 534, 537, 538, 544, 545, 565, 581, 582,
993 595, 596, 599, 602, 603, 604, 606, 607, 608, 610,
994 611, 613, 614, 615, 616, 617, 618, 619, 620, 621,
995 622, 623, 624, 625, 627, 628, 629, 630, 631, 633,
996 634, 636, 637, 638, 639, 640, 641, 642, 643, 645,
997 646, 647, 648, 651, 652, 654, 655, 656, 657, 659,
998 666, 667, 670, 671, 672, 675, 676, 677, 678, 680,
999 681, 682, 683, 685, 694, 695
1003 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1004 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1005 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1006 static const char *const yytname
[] =
1008 "$end", "error", "$undefined", "DST", "SRC", "HOST", "GATEWAY", "NET",
1009 "NETMASK", "PORT", "PORTRANGE", "LESS", "GREATER", "PROTO", "PROTOCHAIN",
1010 "CBYTE", "ARP", "RARP", "IP", "SCTP", "TCP", "UDP", "ICMP", "IGMP",
1011 "IGRP", "PIM", "VRRP", "CARP", "ATALK", "AARP", "DECNET", "LAT", "SCA",
1012 "MOPRC", "MOPDL", "TK_BROADCAST", "TK_MULTICAST", "NUM", "INBOUND",
1013 "OUTBOUND", "PF_IFNAME", "PF_RSET", "PF_RNR", "PF_SRNR", "PF_REASON",
1014 "PF_ACTION", "TYPE", "SUBTYPE", "DIR", "ADDR1", "ADDR2", "ADDR3",
1015 "ADDR4", "RA", "TA", "LINK", "GEQ", "LEQ", "NEQ", "ID", "EID", "HID",
1016 "HID6", "AID", "LSH", "RSH", "LEN", "IPV6", "ICMPV6", "AH", "ESP",
1017 "VLAN", "MPLS", "PPPOED", "PPPOES", "ISO", "ESIS", "CLNP", "ISIS", "L1",
1018 "L2", "IIH", "LSP", "SNP", "CSNP", "PSNP", "STP", "IPX", "NETBEUI",
1019 "LANE", "LLC", "METAC", "BCC", "SC", "ILMIC", "OAMF4EC", "OAMF4SC",
1020 "OAM", "OAMF4", "CONNECTMSG", "METACONNECT", "VPI", "VCI", "RADIO",
1021 "FISU", "LSSU", "MSU", "SIO", "OPC", "DPC", "SLS", "AND", "OR", "'!'",
1022 "'|'", "'&'", "'+'", "'-'", "'*'", "'/'", "UMINUS", "')'", "'('", "'>'",
1023 "'='", "'<'", "'['", "']'", "':'", "$accept", "prog", "null", "expr",
1024 "and", "or", "id", "nid", "not", "paren", "pid", "qid", "term", "head",
1025 "rterm", "pqual", "dqual", "aqual", "ndaqual", "pname", "other", "pfvar",
1026 "p80211", "type", "subtype", "type_subtype", "dir", "reason", "action",
1027 "relop", "irelop", "arth", "narth", "byteop", "pnum", "atmtype",
1028 "atmmultitype", "atmfield", "atmvalue", "atmfieldvalue", "atmlistvalue",
1029 "mtp2type", "mtp3field", "mtp3value", "mtp3fieldvalue", "mtp3listvalue", 0
1034 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1036 static const yytype_uint16 yytoknum
[] =
1038 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1039 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1040 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1041 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1042 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1043 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1044 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1045 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1046 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1047 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1048 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1049 365, 366, 367, 33, 124, 38, 43, 45, 42, 47,
1050 368, 41, 40, 62, 61, 60, 91, 93, 58
1054 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1055 static const yytype_uint8 yyr1
[] =
1057 0, 129, 130, 130, 131, 132, 132, 132, 132, 132,
1058 133, 134, 135, 135, 135, 136, 136, 136, 136, 136,
1059 136, 136, 136, 136, 137, 138, 139, 139, 139, 140,
1060 140, 141, 141, 142, 142, 142, 142, 142, 142, 143,
1061 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
1062 144, 144, 145, 145, 145, 145, 145, 145, 145, 145,
1063 145, 145, 145, 145, 146, 146, 146, 146, 147, 148,
1064 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1065 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1066 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1067 148, 148, 148, 148, 148, 148, 148, 148, 149, 149,
1068 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1069 149, 149, 149, 150, 150, 150, 150, 150, 150, 151,
1070 151, 151, 151, 152, 152, 153, 153, 154, 155, 155,
1071 156, 156, 157, 158, 158, 158, 159, 159, 159, 160,
1072 160, 161, 161, 161, 161, 161, 161, 161, 161, 161,
1073 161, 161, 161, 161, 162, 162, 162, 162, 162, 163,
1074 163, 164, 164, 164, 164, 164, 164, 164, 164, 165,
1075 165, 165, 165, 166, 166, 167, 167, 167, 167, 168,
1076 169, 169, 170, 170, 170, 171, 171, 171, 171, 172,
1077 172, 172, 172, 173, 174, 174
1080 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1081 static const yytype_uint8 yyr2
[] =
1083 0, 2, 2, 1, 0, 1, 3, 3, 3, 3,
1084 1, 1, 1, 1, 3, 1, 3, 3, 1, 3,
1085 1, 1, 1, 2, 1, 1, 1, 3, 3, 1,
1086 1, 1, 2, 3, 2, 2, 2, 2, 2, 2,
1087 3, 1, 3, 3, 1, 1, 1, 2, 1, 2,
1088 1, 0, 1, 1, 3, 3, 3, 3, 1, 1,
1089 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1090 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1091 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1092 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1093 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1094 2, 2, 4, 1, 1, 2, 1, 2, 1, 1,
1095 1, 1, 2, 2, 2, 2, 2, 2, 2, 4,
1096 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1097 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1098 1, 4, 6, 3, 3, 3, 3, 3, 3, 3,
1099 3, 2, 3, 1, 1, 1, 1, 1, 1, 1,
1100 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1101 1, 1, 1, 1, 1, 1, 2, 2, 3, 1,
1102 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1106 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1107 Performed when YYTABLE doesn't specify something else to do. Zero
1108 means the default is an error. */
1109 static const yytype_uint8 yydefact
[] =
1111 4, 0, 51, 1, 0, 0, 0, 71, 72, 70,
1112 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1113 83, 84, 85, 86, 88, 87, 169, 113, 114, 0,
1114 0, 0, 0, 0, 0, 69, 163, 89, 90, 91,
1115 92, 116, 118, 119, 120, 93, 94, 103, 95, 96,
1116 97, 98, 99, 100, 102, 101, 104, 105, 106, 171,
1117 172, 173, 174, 177, 178, 175, 176, 179, 180, 181,
1118 182, 183, 184, 107, 192, 193, 194, 195, 196, 197,
1119 198, 24, 0, 25, 2, 51, 51, 5, 0, 31,
1120 0, 50, 44, 121, 0, 150, 149, 45, 46, 0,
1121 48, 0, 110, 111, 0, 123, 124, 125, 126, 140,
1122 141, 127, 142, 128, 0, 115, 117, 0, 0, 161,
1123 10, 11, 51, 51, 32, 0, 150, 149, 15, 21,
1124 18, 20, 22, 39, 12, 0, 0, 13, 53, 52,
1125 64, 68, 65, 66, 67, 36, 37, 108, 109, 0,
1126 0, 0, 58, 59, 60, 61, 62, 63, 34, 35,
1127 38, 122, 0, 144, 146, 148, 0, 0, 0, 0,
1128 0, 0, 0, 0, 143, 145, 147, 0, 0, 189,
1129 0, 0, 0, 47, 185, 203, 0, 0, 0, 49,
1130 199, 165, 164, 167, 168, 166, 0, 0, 0, 7,
1131 51, 51, 6, 149, 9, 8, 40, 162, 170, 0,
1132 0, 0, 23, 26, 30, 0, 29, 0, 0, 0,
1133 0, 133, 134, 130, 137, 131, 138, 139, 132, 33,
1134 0, 159, 160, 158, 157, 153, 154, 155, 156, 42,
1135 43, 190, 0, 186, 187, 204, 0, 200, 201, 112,
1136 149, 17, 16, 19, 14, 0, 0, 57, 55, 56,
1137 54, 0, 151, 0, 188, 0, 202, 0, 27, 28,
1138 135, 136, 129, 0, 191, 205, 152
1141 /* YYDEFGOTO[NTERM-NUM]. */
1142 static const yytype_int16 yydefgoto
[] =
1144 -1, 1, 2, 125, 122, 123, 212, 134, 135, 117,
1145 214, 215, 87, 88, 89, 90, 158, 159, 160, 118,
1146 92, 93, 161, 223, 272, 225, 228, 111, 113, 177,
1147 178, 94, 95, 196, 96, 97, 98, 99, 183, 184,
1148 242, 100, 101, 189, 190, 246
1151 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1153 #define YYPACT_NINF -193
1154 static const yytype_int16 yypact
[] =
1156 -193, 25, 218, -193, -6, 15, 44, -193, -193, -193,
1157 -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
1158 -193, -193, -193, -193, -193, -193, -193, -193, -193, 18,
1159 37, 74, 76, -22, 59, -193, -193, -193, -193, -193,
1160 -193, -20, -20, -193, -193, -193, -193, -193, -193, -193,
1161 -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
1162 -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
1163 -193, -193, -193, -193, -193, -193, -193, -193, -193, -193,
1164 -193, -193, 541, -193, -55, 434, 434, -193, -15, -193,
1165 646, 11, -193, -193, 523, -193, -193, -193, -193, 48,
1166 -193, 52, -193, -193, -95, -193, -193, -193, -193, -193,
1167 -193, -193, -193, -193, -20, -193, -193, 541, -1, -193,
1168 -193, -193, 326, 326, -193, -53, 17, 28, -193, -193,
1169 -3, 34, -193, -193, -193, -15, -15, -193, -39, 36,
1170 -193, -193, -193, -193, -193, -193, -193, -193, -193, -21,
1171 77, -16, -193, -193, -193, -193, -193, -193, 147, -193,
1172 -193, -193, 541, -193, -193, -193, 541, 541, 541, 541,
1173 541, 541, 541, 541, -193, -193, -193, 541, 541, -193,
1174 118, 125, 126, -193, -193, -193, 127, 130, 149, -193,
1175 -193, -193, -193, -193, -193, -193, 150, 28, 96, -193,
1176 326, 326, -193, 3, -193, -193, -193, -193, -193, 128,
1177 151, 153, -193, -193, 70, -55, 28, 188, 189, 191,
1178 192, -193, -193, 154, -193, -193, -193, -193, -193, -193,
1179 -52, 66, 66, 152, 62, 40, 40, -193, -193, 96,
1180 96, -193, -43, -193, -193, -193, -41, -193, -193, -193,
1181 -51, -193, -193, -193, -193, -15, -15, -193, -193, -193,
1182 -193, -10, -193, 159, -193, 118, -193, 127, -193, -193,
1183 -193, -193, -193, 73, -193, -193, -193
1186 /* YYPGOTO[NTERM-NUM]. */
1187 static const yytype_int16 yypgoto
[] =
1189 -193, -193, -193, 195, -13, -192, -87, -127, 6, -2,
1190 -193, -193, -81, -193, -193, -193, -193, 45, -193, 8,
1191 -193, -193, -193, -193, -193, -193, -193, -193, -193, -75,
1192 -67, -27, -84, -193, -35, -193, -193, -193, -193, -162,
1193 -193, -193, -193, -193, -172, -193
1196 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1197 positive, shift that token. If negative, reduce the rule which
1198 number is the opposite. If YYTABLE_NINF, syntax error. */
1199 #define YYTABLE_NINF -42
1200 static const yytype_int16 yytable
[] =
1202 86, 133, 126, -13, 124, 209, 115, 116, 85, 213,
1203 91, -41, 166, 167, 245, 109, 221, 26, 241, 191,
1204 192, 226, 26, 256, 181, 3, 187, 270, 193, 194,
1205 195, 102, 182, 126, 188, 199, 204, 110, 222, 114,
1206 114, 202, 205, 227, 128, 129, 130, 131, 132, 271,
1207 265, 127, 103, 137, 267, 119, 120, 121, 120, 121,
1208 -29, -29, 168, 169, 170, 171, 172, 173, 206, 121,
1209 208, 121, 217, 218, 213, 262, 263, 105, 264, 197,
1210 266, 104, 127, 86, 86, 179, 136, 203, 203, 185,
1211 198, 85, 85, 91, 91, 275, 106, 180, 81, 186,
1212 137, 216, 83, 274, 163, 164, 165, 83, 163, 164,
1213 165, 107, 114, 108, -13, -13, 210, 126, 112, 124,
1214 201, 201, -41, -41, -13, 162, 166, 167, 200, 200,
1215 91, 91, -41, 136, 114, 230, 224, 162, 207, 231,
1216 232, 233, 234, 235, 236, 237, 238, 219, 220, 208,
1217 239, 240, 140, 211, 142, 179, 143, 144, 172, 173,
1218 166, 167, 243, 244, 185, 203, 250, 247, 268, 269,
1219 83, 174, 175, 176, 83, 174, 175, 176, 170, 171,
1220 172, 173, 170, 171, 172, 173, 248, 249, 252, 251,
1221 253, 254, 257, 258, 259, 260, 273, 84, 201, 86,
1222 276, 261, 255, 229, 0, 0, 200, 200, 91, 91,
1223 168, 169, 170, 171, 172, 173, 166, 167, -3, 0,
1224 137, 137, 0, 0, 0, 0, 0, 0, 0, 4,
1225 5, 0, 0, 6, 7, 8, 9, 10, 11, 12,
1226 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1227 23, 24, 25, 136, 136, 26, 27, 28, 29, 30,
1228 31, 32, 33, 34, 0, 0, 0, 169, 170, 171,
1229 172, 173, 0, 35, 0, 0, 0, 0, 0, 0,
1230 0, 0, 0, 0, 36, 37, 38, 39, 40, 41,
1231 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1232 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1233 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1234 72, 73, 74, 75, 76, 77, 78, 79, 80, 0,
1235 0, 81, 0, 0, 0, 82, 0, 4, 5, 0,
1236 83, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1237 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1238 25, 0, 0, 26, 27, 28, 29, 30, 31, 32,
1239 33, 34, 0, 0, 0, 0, 0, 0, 0, 0,
1240 0, 35, 0, 0, 0, 128, 129, 130, 131, 132,
1241 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
1242 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1243 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1244 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1245 74, 75, 76, 77, 78, 79, 80, 0, 0, 81,
1246 0, 0, 0, 82, 0, 4, 5, 0, 83, 6,
1247 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1248 17, 18, 19, 20, 21, 22, 23, 24, 25, 0,
1249 0, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1250 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
1251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1252 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1253 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1254 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1255 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1256 76, 77, 78, 79, 80, 0, 0, 81, 0, 0,
1257 0, 82, 0, 0, 0, 0, 83, 7, 8, 9,
1258 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1259 20, 21, 22, 23, 24, 25, 0, 0, 26, 163,
1260 164, 165, 0, 0, 0, 0, 0, 166, 167, 0,
1261 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
1262 0, 0, 0, 0, 0, 0, 0, 36, 37, 38,
1263 39, 40, 0, 0, 0, 0, 45, 46, 47, 48,
1264 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
1265 0, 0, 0, 0, 0, 0, 0, 168, 169, 170,
1266 171, 172, 173, 0, 73, 0, 174, 175, 176, 138,
1267 139, 140, 141, 142, 0, 143, 144, 0, 82, 145,
1268 146, 0, 0, 83, 0, 0, 0, 0, 0, 0,
1269 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1270 0, 147, 148, 0, 0, 0, 0, 0, 0, 0,
1271 0, 0, 149, 150, 151, 152, 153, 154, 155, 156,
1275 #define yypact_value_is_default(yystate) \
1276 ((yystate) == (-193))
1278 #define yytable_value_is_error(yytable_value) \
1281 static const yytype_int16 yycheck
[] =
1283 2, 88, 86, 0, 85, 8, 41, 42, 2, 136,
1284 2, 0, 64, 65, 186, 37, 37, 37, 180, 114,
1285 115, 37, 37, 215, 99, 0, 101, 37, 123, 124,
1286 125, 37, 99, 117, 101, 122, 123, 59, 59, 41,
1287 42, 122, 123, 59, 59, 60, 61, 62, 63, 59,
1288 242, 86, 37, 88, 246, 82, 111, 112, 111, 112,
1289 111, 112, 114, 115, 116, 117, 118, 119, 121, 112,
1290 121, 112, 111, 112, 201, 127, 128, 59, 121, 114,
1291 121, 37, 117, 85, 86, 37, 88, 122, 123, 37,
1292 117, 85, 86, 85, 86, 267, 59, 99, 113, 101,
1293 135, 136, 122, 265, 56, 57, 58, 122, 56, 57,
1294 58, 37, 114, 37, 111, 112, 119, 201, 59, 200,
1295 122, 123, 111, 112, 121, 126, 64, 65, 122, 123,
1296 122, 123, 121, 135, 136, 162, 59, 126, 121, 166,
1297 167, 168, 169, 170, 171, 172, 173, 111, 112, 121,
1298 177, 178, 5, 119, 7, 37, 9, 10, 118, 119,
1299 64, 65, 37, 37, 37, 200, 201, 37, 255, 256,
1300 122, 123, 124, 125, 122, 123, 124, 125, 116, 117,
1301 118, 119, 116, 117, 118, 119, 37, 37, 37, 61,
1302 37, 121, 4, 4, 3, 3, 37, 2, 200, 201,
1303 127, 47, 215, 158, -1, -1, 200, 201, 200, 201,
1304 114, 115, 116, 117, 118, 119, 64, 65, 0, -1,
1305 255, 256, -1, -1, -1, -1, -1, -1, -1, 11,
1306 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
1307 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1308 32, 33, 34, 255, 256, 37, 38, 39, 40, 41,
1309 42, 43, 44, 45, -1, -1, -1, 115, 116, 117,
1310 118, 119, -1, 55, -1, -1, -1, -1, -1, -1,
1311 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
1312 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1313 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1314 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
1315 102, 103, 104, 105, 106, 107, 108, 109, 110, -1,
1316 -1, 113, -1, -1, -1, 117, -1, 11, 12, -1,
1317 122, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1318 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1319 34, -1, -1, 37, 38, 39, 40, 41, 42, 43,
1320 44, 45, -1, -1, -1, -1, -1, -1, -1, -1,
1321 -1, 55, -1, -1, -1, 59, 60, 61, 62, 63,
1322 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
1323 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1324 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1325 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
1326 104, 105, 106, 107, 108, 109, 110, -1, -1, 113,
1327 -1, -1, -1, 117, -1, 11, 12, -1, 122, 15,
1328 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1329 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
1330 -1, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1331 -1, -1, -1, -1, -1, -1, -1, -1, -1, 55,
1332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1333 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1334 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1335 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1336 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1337 106, 107, 108, 109, 110, -1, -1, 113, -1, -1,
1338 -1, 117, -1, -1, -1, -1, 122, 16, 17, 18,
1339 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1340 29, 30, 31, 32, 33, 34, -1, -1, 37, 56,
1341 57, 58, -1, -1, -1, -1, -1, 64, 65, -1,
1342 -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
1343 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68,
1344 69, 70, -1, -1, -1, -1, 75, 76, 77, 78,
1345 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1346 -1, -1, -1, -1, -1, -1, -1, 114, 115, 116,
1347 117, 118, 119, -1, 103, -1, 123, 124, 125, 3,
1348 4, 5, 6, 7, -1, 9, 10, -1, 117, 13,
1349 14, -1, -1, 122, -1, -1, -1, -1, -1, -1,
1350 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1351 -1, 35, 36, -1, -1, -1, -1, -1, -1, -1,
1352 -1, -1, 46, 47, 48, 49, 50, 51, 52, 53,
1356 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1357 symbol of state STATE-NUM. */
1358 static const yytype_uint8 yystos
[] =
1360 0, 130, 131, 0, 11, 12, 15, 16, 17, 18,
1361 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1362 29, 30, 31, 32, 33, 34, 37, 38, 39, 40,
1363 41, 42, 43, 44, 45, 55, 66, 67, 68, 69,
1364 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1365 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1366 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1367 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
1368 110, 113, 117, 122, 132, 137, 138, 141, 142, 143,
1369 144, 148, 149, 150, 160, 161, 163, 164, 165, 166,
1370 170, 171, 37, 37, 37, 59, 59, 37, 37, 37,
1371 59, 156, 59, 157, 138, 163, 163, 138, 148, 160,
1372 111, 112, 133, 134, 141, 132, 161, 163, 59, 60,
1373 61, 62, 63, 135, 136, 137, 138, 163, 3, 4,
1374 5, 6, 7, 9, 10, 13, 14, 35, 36, 46,
1375 47, 48, 49, 50, 51, 52, 53, 54, 145, 146,
1376 147, 151, 126, 56, 57, 58, 64, 65, 114, 115,
1377 116, 117, 118, 119, 123, 124, 125, 158, 159, 37,
1378 138, 158, 159, 167, 168, 37, 138, 158, 159, 172,
1379 173, 114, 115, 123, 124, 125, 162, 163, 160, 135,
1380 137, 138, 141, 163, 135, 141, 121, 121, 121, 8,
1381 119, 119, 135, 136, 139, 140, 163, 111, 112, 111,
1382 112, 37, 59, 152, 59, 154, 37, 59, 155, 146,
1383 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
1384 160, 168, 169, 37, 37, 173, 174, 37, 37, 37,
1385 163, 61, 37, 37, 121, 133, 134, 4, 4, 3,
1386 3, 47, 127, 128, 121, 134, 121, 134, 135, 135,
1387 37, 59, 153, 37, 168, 173, 127
1390 #define yyerrok (yyerrstatus = 0)
1391 #define yyclearin (yychar = YYEMPTY)
1392 #define YYEMPTY (-2)
1395 #define YYACCEPT goto yyacceptlab
1396 #define YYABORT goto yyabortlab
1397 #define YYERROR goto yyerrorlab
1400 /* Like YYERROR except do call yyerror. This remains here temporarily
1401 to ease the transition to the new meaning of YYERROR, for GCC.
1402 Once GCC version 2 has supplanted version 1, this can go. However,
1403 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1404 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1407 #define YYFAIL goto yyerrlab
1409 /* This is here to suppress warnings from the GCC cpp's
1410 -Wunused-macros. Normally we don't worry about that warning, but
1411 some users do, and we want to make it easy for users to remove
1412 YYFAIL uses, which will produce warnings from Bison 2.5. */
1415 #define YYRECOVERING() (!!yyerrstatus)
1417 #define YYBACKUP(Token, Value) \
1419 if (yychar == YYEMPTY && yylen == 1) \
1428 yyerror (YY_("syntax error: cannot back up")); \
1435 #define YYERRCODE 256
1438 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1439 If N is 0, then set CURRENT to the empty location which ends
1440 the previous symbol: RHS[0] (always defined). */
1442 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1443 #ifndef YYLLOC_DEFAULT
1444 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1448 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1449 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1450 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1451 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1455 (Current).first_line = (Current).last_line = \
1456 YYRHSLOC (Rhs, 0).last_line; \
1457 (Current).first_column = (Current).last_column = \
1458 YYRHSLOC (Rhs, 0).last_column; \
1464 /* This macro is provided for backward compatibility. */
1466 #ifndef YY_LOCATION_PRINT
1467 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1471 /* YYLEX -- calling `yylex' with the right arguments. */
1474 # define YYLEX yylex (YYLEX_PARAM)
1476 # define YYLEX yylex ()
1479 /* Enable debugging if requested. */
1483 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1484 # define YYFPRINTF fprintf
1487 # define YYDPRINTF(Args) \
1493 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1497 YYFPRINTF (stderr, "%s ", Title); \
1498 yy_symbol_print (stderr, \
1500 YYFPRINTF (stderr, "\n"); \
1505 /*--------------------------------.
1506 | Print this symbol on YYOUTPUT. |
1507 `--------------------------------*/
1510 #if (defined __STDC__ || defined __C99__FUNC__ \
1511 || defined __cplusplus || defined _MSC_VER)
1513 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1516 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
1519 YYSTYPE
const * const yyvaluep
;
1525 if (yytype
< YYNTOKENS
)
1526 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1538 /*--------------------------------.
1539 | Print this symbol on YYOUTPUT. |
1540 `--------------------------------*/
1542 #if (defined __STDC__ || defined __C99__FUNC__ \
1543 || defined __cplusplus || defined _MSC_VER)
1545 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1548 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
1551 YYSTYPE
const * const yyvaluep
;
1554 if (yytype
< YYNTOKENS
)
1555 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1557 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1559 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
1560 YYFPRINTF (yyoutput
, ")");
1563 /*------------------------------------------------------------------.
1564 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1566 `------------------------------------------------------------------*/
1568 #if (defined __STDC__ || defined __C99__FUNC__ \
1569 || defined __cplusplus || defined _MSC_VER)
1571 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1574 yy_stack_print (yybottom
, yytop
)
1575 yytype_int16
*yybottom
;
1576 yytype_int16
*yytop
;
1579 YYFPRINTF (stderr
, "Stack now");
1580 for (; yybottom
<= yytop
; yybottom
++)
1582 int yybot
= *yybottom
;
1583 YYFPRINTF (stderr
, " %d", yybot
);
1585 YYFPRINTF (stderr
, "\n");
1588 # define YY_STACK_PRINT(Bottom, Top) \
1591 yy_stack_print ((Bottom), (Top)); \
1595 /*------------------------------------------------.
1596 | Report that the YYRULE is going to be reduced. |
1597 `------------------------------------------------*/
1599 #if (defined __STDC__ || defined __C99__FUNC__ \
1600 || defined __cplusplus || defined _MSC_VER)
1602 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
1605 yy_reduce_print (yyvsp
, yyrule
)
1610 int yynrhs
= yyr2
[yyrule
];
1612 unsigned long int yylno
= yyrline
[yyrule
];
1613 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1615 /* The symbols being reduced. */
1616 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1618 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1619 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1620 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1622 YYFPRINTF (stderr
, "\n");
1626 # define YY_REDUCE_PRINT(Rule) \
1629 yy_reduce_print (yyvsp, Rule); \
1632 /* Nonzero means print parse trace. It is left uninitialized so that
1633 multiple parsers can coexist. */
1635 #else /* !YYDEBUG */
1636 # define YYDPRINTF(Args)
1637 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1638 # define YY_STACK_PRINT(Bottom, Top)
1639 # define YY_REDUCE_PRINT(Rule)
1640 #endif /* !YYDEBUG */
1643 /* YYINITDEPTH -- initial size of the parser's stacks. */
1645 # define YYINITDEPTH 200
1648 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1649 if the built-in stack extension method is used).
1651 Do not make this value too large; the results are undefined if
1652 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1653 evaluated with infinite-precision integer arithmetic. */
1656 # define YYMAXDEPTH 10000
1663 # if defined __GLIBC__ && defined _STRING_H
1664 # define yystrlen strlen
1666 /* Return the length of YYSTR. */
1667 #if (defined __STDC__ || defined __C99__FUNC__ \
1668 || defined __cplusplus || defined _MSC_VER)
1670 yystrlen (const char *yystr
)
1678 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1686 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1687 # define yystpcpy stpcpy
1689 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1691 #if (defined __STDC__ || defined __C99__FUNC__ \
1692 || defined __cplusplus || defined _MSC_VER)
1694 yystpcpy (char *yydest
, const char *yysrc
)
1697 yystpcpy (yydest
, yysrc
)
1703 const char *yys
= yysrc
;
1705 while ((*yyd
++ = *yys
++) != '\0')
1714 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1715 quotes and backslashes, so that it's suitable for yyerror. The
1716 heuristic is that double-quoting is unnecessary unless the string
1717 contains an apostrophe, a comma, or backslash (other than
1718 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1719 null, do not copy; instead, return the length of what the result
1722 yytnamerr (char *yyres
, const char *yystr
)
1727 char const *yyp
= yystr
;
1734 goto do_not_strip_quotes
;
1738 goto do_not_strip_quotes
;
1751 do_not_strip_quotes
: ;
1755 return yystrlen (yystr
);
1757 return yystpcpy (yyres
, yystr
) - yyres
;
1761 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1762 about the unexpected token YYTOKEN for the state stack whose top is
1765 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1766 not large enough to hold the message. In that case, also set
1767 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1768 required number of bytes is too large to store. */
1770 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1771 yytype_int16
*yyssp
, int yytoken
)
1773 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1774 YYSIZE_T yysize
= yysize0
;
1776 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1777 /* Internationalized format string. */
1778 const char *yyformat
= 0;
1779 /* Arguments of yyformat. */
1780 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1781 /* Number of reported tokens (one for the "unexpected", one per
1785 /* There are many possibilities here to consider:
1786 - Assume YYFAIL is not used. It's too flawed to consider. See
1787 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1788 for details. YYERROR is fine as it does not invoke this
1790 - If this state is a consistent state with a default action, then
1791 the only way this function was invoked is if the default action
1792 is an error action. In that case, don't check for expected
1793 tokens because there are none.
1794 - The only way there can be no lookahead present (in yychar) is if
1795 this state is a consistent state with a default action. Thus,
1796 detecting the absence of a lookahead is sufficient to determine
1797 that there is no unexpected or expected token to report. In that
1798 case, just report a simple "syntax error".
1799 - Don't assume there isn't a lookahead just because this state is a
1800 consistent state with a default action. There might have been a
1801 previous inconsistent state, consistent state with a non-default
1802 action, or user semantic action that manipulated yychar.
1803 - Of course, the expected token list depends on states to have
1804 correct lookahead information, and it depends on the parser not
1805 to perform extra reductions after fetching a lookahead from the
1806 scanner and before detecting a syntax error. Thus, state merging
1807 (from LALR or IELR) and default reductions corrupt the expected
1808 token list. However, the list is correct for canonical LR with
1809 one exception: it will still contain any token that will not be
1810 accepted due to an error action in a later state.
1812 if (yytoken
!= YYEMPTY
)
1814 int yyn
= yypact
[*yyssp
];
1815 yyarg
[yycount
++] = yytname
[yytoken
];
1816 if (!yypact_value_is_default (yyn
))
1818 /* Start YYX at -YYN if negative to avoid negative indexes in
1819 YYCHECK. In other words, skip the first -YYN actions for
1820 this state because they are default actions. */
1821 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1822 /* Stay within bounds of both yycheck and yytname. */
1823 int yychecklim
= YYLAST
- yyn
+ 1;
1824 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1827 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1828 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1829 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1831 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1837 yyarg
[yycount
++] = yytname
[yyx
];
1838 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1839 if (! (yysize
<= yysize1
1840 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1849 # define YYCASE_(N, S) \
1853 YYCASE_(0, YY_("syntax error"));
1854 YYCASE_(1, YY_("syntax error, unexpected %s"));
1855 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1856 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1857 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1858 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1862 yysize1
= yysize
+ yystrlen (yyformat
);
1863 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1867 if (*yymsg_alloc
< yysize
)
1869 *yymsg_alloc
= 2 * yysize
;
1870 if (! (yysize
<= *yymsg_alloc
1871 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1872 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1876 /* Avoid sprintf, as that infringes on the user's name space.
1877 Don't have undefined behavior even if the translation
1878 produced a string with the wrong number of "%s"s. */
1882 while ((*yyp
= *yyformat
) != '\0')
1883 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1885 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1896 #endif /* YYERROR_VERBOSE */
1898 /*-----------------------------------------------.
1899 | Release the memory associated to this symbol. |
1900 `-----------------------------------------------*/
1903 #if (defined __STDC__ || defined __C99__FUNC__ \
1904 || defined __cplusplus || defined _MSC_VER)
1906 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1909 yydestruct (yymsg
, yytype
, yyvaluep
)
1919 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1930 /* Prevent warnings from -Wmissing-prototypes. */
1931 #ifdef YYPARSE_PARAM
1932 #if defined __STDC__ || defined __cplusplus
1933 int yyparse (void *YYPARSE_PARAM
);
1937 #else /* ! YYPARSE_PARAM */
1938 #if defined __STDC__ || defined __cplusplus
1943 #endif /* ! YYPARSE_PARAM */
1946 /* The lookahead symbol. */
1949 /* The semantic value of the lookahead symbol. */
1952 /* Number of syntax errors so far. */
1960 #ifdef YYPARSE_PARAM
1961 #if (defined __STDC__ || defined __C99__FUNC__ \
1962 || defined __cplusplus || defined _MSC_VER)
1964 yyparse (void *YYPARSE_PARAM
)
1967 yyparse (YYPARSE_PARAM
)
1968 void *YYPARSE_PARAM
;
1970 #else /* ! YYPARSE_PARAM */
1971 #if (defined __STDC__ || defined __C99__FUNC__ \
1972 || defined __cplusplus || defined _MSC_VER)
1983 /* Number of tokens to shift before error messages enabled. */
1986 /* The stacks and their tools:
1987 `yyss': related to states.
1988 `yyvs': related to semantic values.
1990 Refer to the stacks thru separate pointers, to allow yyoverflow
1991 to reallocate them elsewhere. */
1993 /* The state stack. */
1994 yytype_int16 yyssa
[YYINITDEPTH
];
1996 yytype_int16
*yyssp
;
1998 /* The semantic value stack. */
1999 YYSTYPE yyvsa
[YYINITDEPTH
];
2003 YYSIZE_T yystacksize
;
2007 /* Lookahead token as an internal (translated) token number. */
2009 /* The variables used to return semantic value and location from the
2014 /* Buffer for error messages, and its allocated size. */
2016 char *yymsg
= yymsgbuf
;
2017 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
2020 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2022 /* The number of symbols on the RHS of the reduced rule.
2023 Keep to zero when no symbol should be popped. */
2029 yystacksize
= YYINITDEPTH
;
2031 YYDPRINTF ((stderr
, "Starting parse\n"));
2036 yychar
= YYEMPTY
; /* Cause a token to be read. */
2038 /* Initialize stack pointers.
2039 Waste one element of value and location stack
2040 so that they stay on the same level as the state stack.
2041 The wasted elements are never initialized. */
2047 /*------------------------------------------------------------.
2048 | yynewstate -- Push a new state, which is found in yystate. |
2049 `------------------------------------------------------------*/
2051 /* In all cases, when you get here, the value and location stacks
2052 have just been pushed. So pushing a state here evens the stacks. */
2058 if (yyss
+ yystacksize
- 1 <= yyssp
)
2060 /* Get the current used size of the three stacks, in elements. */
2061 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
2065 /* Give user a chance to reallocate the stack. Use copies of
2066 these so that the &'s don't force the real ones into
2068 YYSTYPE
*yyvs1
= yyvs
;
2069 yytype_int16
*yyss1
= yyss
;
2071 /* Each stack pointer address is followed by the size of the
2072 data in use in that stack, in bytes. This used to be a
2073 conditional around just the two extra args, but that might
2074 be undefined if yyoverflow is a macro. */
2075 yyoverflow (YY_("memory exhausted"),
2076 &yyss1
, yysize
* sizeof (*yyssp
),
2077 &yyvs1
, yysize
* sizeof (*yyvsp
),
2083 #else /* no yyoverflow */
2084 # ifndef YYSTACK_RELOCATE
2085 goto yyexhaustedlab
;
2087 /* Extend the stack our own way. */
2088 if (YYMAXDEPTH
<= yystacksize
)
2089 goto yyexhaustedlab
;
2091 if (YYMAXDEPTH
< yystacksize
)
2092 yystacksize
= YYMAXDEPTH
;
2095 yytype_int16
*yyss1
= yyss
;
2096 union yyalloc
*yyptr
=
2097 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2099 goto yyexhaustedlab
;
2100 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
2101 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
2102 # undef YYSTACK_RELOCATE
2104 YYSTACK_FREE (yyss1
);
2107 #endif /* no yyoverflow */
2109 yyssp
= yyss
+ yysize
- 1;
2110 yyvsp
= yyvs
+ yysize
- 1;
2112 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2113 (unsigned long int) yystacksize
));
2115 if (yyss
+ yystacksize
- 1 <= yyssp
)
2119 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2121 if (yystate
== YYFINAL
)
2131 /* Do appropriate processing given the current state. Read a
2132 lookahead token if we need one and don't already have one. */
2134 /* First try to decide what to do without reference to lookahead token. */
2135 yyn
= yypact
[yystate
];
2136 if (yypact_value_is_default (yyn
))
2139 /* Not known => get a lookahead token if don't already have one. */
2141 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2142 if (yychar
== YYEMPTY
)
2144 YYDPRINTF ((stderr
, "Reading a token: "));
2148 if (yychar
<= YYEOF
)
2150 yychar
= yytoken
= YYEOF
;
2151 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2155 yytoken
= YYTRANSLATE (yychar
);
2156 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2159 /* If the proper action on seeing token YYTOKEN is to reduce or to
2160 detect an error, take that action. */
2162 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2167 if (yytable_value_is_error (yyn
))
2173 /* Count tokens shifted since error; after three, turn off error
2178 /* Shift the lookahead token. */
2179 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2181 /* Discard the shifted token. */
2190 /*-----------------------------------------------------------.
2191 | yydefault -- do the default action for the current state. |
2192 `-----------------------------------------------------------*/
2194 yyn
= yydefact
[yystate
];
2200 /*-----------------------------.
2201 | yyreduce -- Do a reduction. |
2202 `-----------------------------*/
2204 /* yyn is the number of a rule to reduce with. */
2207 /* If YYLEN is nonzero, implement the default value of the action:
2210 Otherwise, the following line sets YYVAL to garbage.
2211 This behavior is undocumented and Bison
2212 users should not rely upon it. Assigning to YYVAL
2213 unconditionally makes the parser a bit smaller, and it avoids a
2214 GCC warning that YYVAL may be used uninitialized. */
2215 yyval
= yyvsp
[1-yylen
];
2218 YY_REDUCE_PRINT (yyn
);
2223 /* Line 1806 of yacc.c */
2224 #line 316 "grammar.y"
2226 finish_parse((yyvsp
[(2) - (2)].blk
).b
);
2232 /* Line 1806 of yacc.c */
2233 #line 321 "grammar.y"
2234 { (yyval
.blk
).q
= qerr
; }
2239 /* Line 1806 of yacc.c */
2240 #line 324 "grammar.y"
2241 { gen_and((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2246 /* Line 1806 of yacc.c */
2247 #line 325 "grammar.y"
2248 { gen_and((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2253 /* Line 1806 of yacc.c */
2254 #line 326 "grammar.y"
2255 { gen_or((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2260 /* Line 1806 of yacc.c */
2261 #line 327 "grammar.y"
2262 { gen_or((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2267 /* Line 1806 of yacc.c */
2268 #line 329 "grammar.y"
2269 { (yyval
.blk
) = (yyvsp
[(0) - (1)].blk
); }
2274 /* Line 1806 of yacc.c */
2275 #line 331 "grammar.y"
2276 { (yyval
.blk
) = (yyvsp
[(0) - (1)].blk
); }
2281 /* Line 1806 of yacc.c */
2282 #line 334 "grammar.y"
2283 { (yyval
.blk
).b
= gen_ncode(NULL
, (bpf_u_int32
)(yyvsp
[(1) - (1)].i
),
2284 (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
); }
2289 /* Line 1806 of yacc.c */
2290 #line 336 "grammar.y"
2291 { (yyval
.blk
) = (yyvsp
[(2) - (3)].blk
); }
2296 /* Line 1806 of yacc.c */
2297 #line 338 "grammar.y"
2298 { (yyval
.blk
).b
= gen_scode((yyvsp
[(1) - (1)].s
), (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
); }
2303 /* Line 1806 of yacc.c */
2304 #line 339 "grammar.y"
2305 { (yyval
.blk
).b
= gen_mcode((yyvsp
[(1) - (3)].s
), NULL
, (yyvsp
[(3) - (3)].i
),
2306 (yyval
.blk
).q
= (yyvsp
[(0) - (3)].blk
).q
); }
2311 /* Line 1806 of yacc.c */
2312 #line 341 "grammar.y"
2313 { (yyval
.blk
).b
= gen_mcode((yyvsp
[(1) - (3)].s
), (yyvsp
[(3) - (3)].s
), 0,
2314 (yyval
.blk
).q
= (yyvsp
[(0) - (3)].blk
).q
); }
2319 /* Line 1806 of yacc.c */
2320 #line 343 "grammar.y"
2322 /* Decide how to parse HID based on proto */
2323 (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
;
2324 if ((yyval
.blk
).q
.addr
== Q_PORT
)
2325 bpf_error("'port' modifier applied to ip host");
2326 else if ((yyval
.blk
).q
.addr
== Q_PORTRANGE
)
2327 bpf_error("'portrange' modifier applied to ip host");
2328 else if ((yyval
.blk
).q
.addr
== Q_PROTO
)
2329 bpf_error("'proto' modifier applied to ip host");
2330 else if ((yyval
.blk
).q
.addr
== Q_PROTOCHAIN
)
2331 bpf_error("'protochain' modifier applied to ip host");
2332 (yyval
.blk
).b
= gen_ncode((yyvsp
[(1) - (1)].s
), 0, (yyval
.blk
).q
);
2338 /* Line 1806 of yacc.c */
2339 #line 356 "grammar.y"
2342 (yyval
.blk
).b
= gen_mcode6((yyvsp
[(1) - (3)].s
), NULL
, (yyvsp
[(3) - (3)].i
),
2343 (yyval
.blk
).q
= (yyvsp
[(0) - (3)].blk
).q
);
2345 bpf_error("'ip6addr/prefixlen' not supported "
2346 "in this configuration");
2353 /* Line 1806 of yacc.c */
2354 #line 365 "grammar.y"
2357 (yyval
.blk
).b
= gen_mcode6((yyvsp
[(1) - (1)].s
), 0, 128,
2358 (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
);
2360 bpf_error("'ip6addr' not supported "
2361 "in this configuration");
2368 /* Line 1806 of yacc.c */
2369 #line 374 "grammar.y"
2371 (yyval
.blk
).b
= gen_ecode((yyvsp
[(1) - (1)].e
), (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
);
2373 * $1 was allocated by "pcap_ether_aton()",
2374 * so we must free it now that we're done
2377 free((yyvsp
[(1) - (1)].e
));
2383 /* Line 1806 of yacc.c */
2384 #line 383 "grammar.y"
2386 (yyval
.blk
).b
= gen_acode((yyvsp
[(1) - (1)].e
), (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
);
2388 * $1 was allocated by "pcap_ether_aton()",
2389 * so we must free it now that we're done
2392 free((yyvsp
[(1) - (1)].e
));
2398 /* Line 1806 of yacc.c */
2399 #line 392 "grammar.y"
2400 { gen_not((yyvsp
[(2) - (2)].blk
).b
); (yyval
.blk
) = (yyvsp
[(2) - (2)].blk
); }
2405 /* Line 1806 of yacc.c */
2406 #line 394 "grammar.y"
2407 { (yyval
.blk
) = (yyvsp
[(0) - (1)].blk
); }
2412 /* Line 1806 of yacc.c */
2413 #line 396 "grammar.y"
2414 { (yyval
.blk
) = (yyvsp
[(0) - (1)].blk
); }
2419 /* Line 1806 of yacc.c */
2420 #line 399 "grammar.y"
2421 { gen_and((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2426 /* Line 1806 of yacc.c */
2427 #line 400 "grammar.y"
2428 { gen_or((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
2433 /* Line 1806 of yacc.c */
2434 #line 402 "grammar.y"
2435 { (yyval
.blk
).b
= gen_ncode(NULL
, (bpf_u_int32
)(yyvsp
[(1) - (1)].i
),
2436 (yyval
.blk
).q
= (yyvsp
[(0) - (1)].blk
).q
); }
2441 /* Line 1806 of yacc.c */
2442 #line 407 "grammar.y"
2443 { gen_not((yyvsp
[(2) - (2)].blk
).b
); (yyval
.blk
) = (yyvsp
[(2) - (2)].blk
); }
2448 /* Line 1806 of yacc.c */
2449 #line 409 "grammar.y"
2450 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (3)].i
), (yyvsp
[(2) - (3)].i
), (yyvsp
[(3) - (3)].i
)); }
2455 /* Line 1806 of yacc.c */
2456 #line 410 "grammar.y"
2457 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (2)].i
), (yyvsp
[(2) - (2)].i
), Q_DEFAULT
); }
2462 /* Line 1806 of yacc.c */
2463 #line 411 "grammar.y"
2464 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (2)].i
), Q_DEFAULT
, (yyvsp
[(2) - (2)].i
)); }
2469 /* Line 1806 of yacc.c */
2470 #line 412 "grammar.y"
2471 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (2)].i
), Q_DEFAULT
, Q_PROTO
); }
2476 /* Line 1806 of yacc.c */
2477 #line 413 "grammar.y"
2478 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (2)].i
), Q_DEFAULT
, Q_PROTOCHAIN
); }
2483 /* Line 1806 of yacc.c */
2484 #line 414 "grammar.y"
2485 { QSET((yyval
.blk
).q
, (yyvsp
[(1) - (2)].i
), Q_DEFAULT
, (yyvsp
[(2) - (2)].i
)); }
2490 /* Line 1806 of yacc.c */
2491 #line 416 "grammar.y"
2492 { (yyval
.blk
) = (yyvsp
[(2) - (2)].blk
); }
2497 /* Line 1806 of yacc.c */
2498 #line 417 "grammar.y"
2499 { (yyval
.blk
).b
= (yyvsp
[(2) - (3)].blk
).b
; (yyval
.blk
).q
= (yyvsp
[(1) - (3)].blk
).q
; }
2504 /* Line 1806 of yacc.c */
2505 #line 418 "grammar.y"
2506 { (yyval
.blk
).b
= gen_proto_abbrev((yyvsp
[(1) - (1)].i
)); (yyval
.blk
).q
= qerr
; }
2511 /* Line 1806 of yacc.c */
2512 #line 419 "grammar.y"
2513 { (yyval
.blk
).b
= gen_relation((yyvsp
[(2) - (3)].i
), (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
), 0);
2514 (yyval
.blk
).q
= qerr
; }
2519 /* Line 1806 of yacc.c */
2520 #line 421 "grammar.y"
2521 { (yyval
.blk
).b
= gen_relation((yyvsp
[(2) - (3)].i
), (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
), 1);
2522 (yyval
.blk
).q
= qerr
; }
2527 /* Line 1806 of yacc.c */
2528 #line 423 "grammar.y"
2529 { (yyval
.blk
).b
= (yyvsp
[(1) - (1)].rblk
); (yyval
.blk
).q
= qerr
; }
2534 /* Line 1806 of yacc.c */
2535 #line 424 "grammar.y"
2536 { (yyval
.blk
).b
= gen_atmtype_abbrev((yyvsp
[(1) - (1)].i
)); (yyval
.blk
).q
= qerr
; }
2541 /* Line 1806 of yacc.c */
2542 #line 425 "grammar.y"
2543 { (yyval
.blk
).b
= gen_atmmulti_abbrev((yyvsp
[(1) - (1)].i
)); (yyval
.blk
).q
= qerr
; }
2548 /* Line 1806 of yacc.c */
2549 #line 426 "grammar.y"
2550 { (yyval
.blk
).b
= (yyvsp
[(2) - (2)].blk
).b
; (yyval
.blk
).q
= qerr
; }
2555 /* Line 1806 of yacc.c */
2556 #line 427 "grammar.y"
2557 { (yyval
.blk
).b
= gen_mtp2type_abbrev((yyvsp
[(1) - (1)].i
)); (yyval
.blk
).q
= qerr
; }
2562 /* Line 1806 of yacc.c */
2563 #line 428 "grammar.y"
2564 { (yyval
.blk
).b
= (yyvsp
[(2) - (2)].blk
).b
; (yyval
.blk
).q
= qerr
; }
2569 /* Line 1806 of yacc.c */
2570 #line 432 "grammar.y"
2571 { (yyval
.i
) = Q_DEFAULT
; }
2576 /* Line 1806 of yacc.c */
2577 #line 435 "grammar.y"
2578 { (yyval
.i
) = Q_SRC
; }
2583 /* Line 1806 of yacc.c */
2584 #line 436 "grammar.y"
2585 { (yyval
.i
) = Q_DST
; }
2590 /* Line 1806 of yacc.c */
2591 #line 437 "grammar.y"
2592 { (yyval
.i
) = Q_OR
; }
2597 /* Line 1806 of yacc.c */
2598 #line 438 "grammar.y"
2599 { (yyval
.i
) = Q_OR
; }
2604 /* Line 1806 of yacc.c */
2605 #line 439 "grammar.y"
2606 { (yyval
.i
) = Q_AND
; }
2611 /* Line 1806 of yacc.c */
2612 #line 440 "grammar.y"
2613 { (yyval
.i
) = Q_AND
; }
2618 /* Line 1806 of yacc.c */
2619 #line 441 "grammar.y"
2620 { (yyval
.i
) = Q_ADDR1
; }
2625 /* Line 1806 of yacc.c */
2626 #line 442 "grammar.y"
2627 { (yyval
.i
) = Q_ADDR2
; }
2632 /* Line 1806 of yacc.c */
2633 #line 443 "grammar.y"
2634 { (yyval
.i
) = Q_ADDR3
; }
2639 /* Line 1806 of yacc.c */
2640 #line 444 "grammar.y"
2641 { (yyval
.i
) = Q_ADDR4
; }
2646 /* Line 1806 of yacc.c */
2647 #line 445 "grammar.y"
2648 { (yyval
.i
) = Q_RA
; }
2653 /* Line 1806 of yacc.c */
2654 #line 446 "grammar.y"
2655 { (yyval
.i
) = Q_TA
; }
2660 /* Line 1806 of yacc.c */
2661 #line 449 "grammar.y"
2662 { (yyval
.i
) = Q_HOST
; }
2667 /* Line 1806 of yacc.c */
2668 #line 450 "grammar.y"
2669 { (yyval
.i
) = Q_NET
; }
2674 /* Line 1806 of yacc.c */
2675 #line 451 "grammar.y"
2676 { (yyval
.i
) = Q_PORT
; }
2681 /* Line 1806 of yacc.c */
2682 #line 452 "grammar.y"
2683 { (yyval
.i
) = Q_PORTRANGE
; }
2688 /* Line 1806 of yacc.c */
2689 #line 455 "grammar.y"
2690 { (yyval
.i
) = Q_GATEWAY
; }
2695 /* Line 1806 of yacc.c */
2696 #line 457 "grammar.y"
2697 { (yyval
.i
) = Q_LINK
; }
2702 /* Line 1806 of yacc.c */
2703 #line 458 "grammar.y"
2704 { (yyval
.i
) = Q_IP
; }
2709 /* Line 1806 of yacc.c */
2710 #line 459 "grammar.y"
2711 { (yyval
.i
) = Q_ARP
; }
2716 /* Line 1806 of yacc.c */
2717 #line 460 "grammar.y"
2718 { (yyval
.i
) = Q_RARP
; }
2723 /* Line 1806 of yacc.c */
2724 #line 461 "grammar.y"
2725 { (yyval
.i
) = Q_SCTP
; }
2730 /* Line 1806 of yacc.c */
2731 #line 462 "grammar.y"
2732 { (yyval
.i
) = Q_TCP
; }
2737 /* Line 1806 of yacc.c */
2738 #line 463 "grammar.y"
2739 { (yyval
.i
) = Q_UDP
; }
2744 /* Line 1806 of yacc.c */
2745 #line 464 "grammar.y"
2746 { (yyval
.i
) = Q_ICMP
; }
2751 /* Line 1806 of yacc.c */
2752 #line 465 "grammar.y"
2753 { (yyval
.i
) = Q_IGMP
; }
2758 /* Line 1806 of yacc.c */
2759 #line 466 "grammar.y"
2760 { (yyval
.i
) = Q_IGRP
; }
2765 /* Line 1806 of yacc.c */
2766 #line 467 "grammar.y"
2767 { (yyval
.i
) = Q_PIM
; }
2772 /* Line 1806 of yacc.c */
2773 #line 468 "grammar.y"
2774 { (yyval
.i
) = Q_VRRP
; }
2779 /* Line 1806 of yacc.c */
2780 #line 469 "grammar.y"
2781 { (yyval
.i
) = Q_CARP
; }
2786 /* Line 1806 of yacc.c */
2787 #line 470 "grammar.y"
2788 { (yyval
.i
) = Q_ATALK
; }
2793 /* Line 1806 of yacc.c */
2794 #line 471 "grammar.y"
2795 { (yyval
.i
) = Q_AARP
; }
2800 /* Line 1806 of yacc.c */
2801 #line 472 "grammar.y"
2802 { (yyval
.i
) = Q_DECNET
; }
2807 /* Line 1806 of yacc.c */
2808 #line 473 "grammar.y"
2809 { (yyval
.i
) = Q_LAT
; }
2814 /* Line 1806 of yacc.c */
2815 #line 474 "grammar.y"
2816 { (yyval
.i
) = Q_SCA
; }
2821 /* Line 1806 of yacc.c */
2822 #line 475 "grammar.y"
2823 { (yyval
.i
) = Q_MOPDL
; }
2828 /* Line 1806 of yacc.c */
2829 #line 476 "grammar.y"
2830 { (yyval
.i
) = Q_MOPRC
; }
2835 /* Line 1806 of yacc.c */
2836 #line 477 "grammar.y"
2837 { (yyval
.i
) = Q_IPV6
; }
2842 /* Line 1806 of yacc.c */
2843 #line 478 "grammar.y"
2844 { (yyval
.i
) = Q_ICMPV6
; }
2849 /* Line 1806 of yacc.c */
2850 #line 479 "grammar.y"
2851 { (yyval
.i
) = Q_AH
; }
2856 /* Line 1806 of yacc.c */
2857 #line 480 "grammar.y"
2858 { (yyval
.i
) = Q_ESP
; }
2863 /* Line 1806 of yacc.c */
2864 #line 481 "grammar.y"
2865 { (yyval
.i
) = Q_ISO
; }
2870 /* Line 1806 of yacc.c */
2871 #line 482 "grammar.y"
2872 { (yyval
.i
) = Q_ESIS
; }
2877 /* Line 1806 of yacc.c */
2878 #line 483 "grammar.y"
2879 { (yyval
.i
) = Q_ISIS
; }
2884 /* Line 1806 of yacc.c */
2885 #line 484 "grammar.y"
2886 { (yyval
.i
) = Q_ISIS_L1
; }
2891 /* Line 1806 of yacc.c */
2892 #line 485 "grammar.y"
2893 { (yyval
.i
) = Q_ISIS_L2
; }
2898 /* Line 1806 of yacc.c */
2899 #line 486 "grammar.y"
2900 { (yyval
.i
) = Q_ISIS_IIH
; }
2905 /* Line 1806 of yacc.c */
2906 #line 487 "grammar.y"
2907 { (yyval
.i
) = Q_ISIS_LSP
; }
2912 /* Line 1806 of yacc.c */
2913 #line 488 "grammar.y"
2914 { (yyval
.i
) = Q_ISIS_SNP
; }
2919 /* Line 1806 of yacc.c */
2920 #line 489 "grammar.y"
2921 { (yyval
.i
) = Q_ISIS_PSNP
; }
2926 /* Line 1806 of yacc.c */
2927 #line 490 "grammar.y"
2928 { (yyval
.i
) = Q_ISIS_CSNP
; }
2933 /* Line 1806 of yacc.c */
2934 #line 491 "grammar.y"
2935 { (yyval
.i
) = Q_CLNP
; }
2940 /* Line 1806 of yacc.c */
2941 #line 492 "grammar.y"
2942 { (yyval
.i
) = Q_STP
; }
2947 /* Line 1806 of yacc.c */
2948 #line 493 "grammar.y"
2949 { (yyval
.i
) = Q_IPX
; }
2954 /* Line 1806 of yacc.c */
2955 #line 494 "grammar.y"
2956 { (yyval
.i
) = Q_NETBEUI
; }
2961 /* Line 1806 of yacc.c */
2962 #line 495 "grammar.y"
2963 { (yyval
.i
) = Q_RADIO
; }
2968 /* Line 1806 of yacc.c */
2969 #line 497 "grammar.y"
2970 { (yyval
.rblk
) = gen_broadcast((yyvsp
[(1) - (2)].i
)); }
2975 /* Line 1806 of yacc.c */
2976 #line 498 "grammar.y"
2977 { (yyval
.rblk
) = gen_multicast((yyvsp
[(1) - (2)].i
)); }
2982 /* Line 1806 of yacc.c */
2983 #line 499 "grammar.y"
2984 { (yyval
.rblk
) = gen_less((yyvsp
[(2) - (2)].i
)); }
2989 /* Line 1806 of yacc.c */
2990 #line 500 "grammar.y"
2991 { (yyval
.rblk
) = gen_greater((yyvsp
[(2) - (2)].i
)); }
2996 /* Line 1806 of yacc.c */
2997 #line 501 "grammar.y"
2998 { (yyval
.rblk
) = gen_byteop((yyvsp
[(3) - (4)].i
), (yyvsp
[(2) - (4)].i
), (yyvsp
[(4) - (4)].i
)); }
3003 /* Line 1806 of yacc.c */
3004 #line 502 "grammar.y"
3005 { (yyval
.rblk
) = gen_inbound(0); }
3010 /* Line 1806 of yacc.c */
3011 #line 503 "grammar.y"
3012 { (yyval
.rblk
) = gen_inbound(1); }
3017 /* Line 1806 of yacc.c */
3018 #line 504 "grammar.y"
3019 { (yyval
.rblk
) = gen_vlan((yyvsp
[(2) - (2)].i
)); }
3024 /* Line 1806 of yacc.c */
3025 #line 505 "grammar.y"
3026 { (yyval
.rblk
) = gen_vlan(-1); }
3031 /* Line 1806 of yacc.c */
3032 #line 506 "grammar.y"
3033 { (yyval
.rblk
) = gen_mpls((yyvsp
[(2) - (2)].i
)); }
3038 /* Line 1806 of yacc.c */
3039 #line 507 "grammar.y"
3040 { (yyval
.rblk
) = gen_mpls(-1); }
3045 /* Line 1806 of yacc.c */
3046 #line 508 "grammar.y"
3047 { (yyval
.rblk
) = gen_pppoed(); }
3052 /* Line 1806 of yacc.c */
3053 #line 509 "grammar.y"
3054 { (yyval
.rblk
) = gen_pppoes(); }
3059 /* Line 1806 of yacc.c */
3060 #line 510 "grammar.y"
3061 { (yyval
.rblk
) = (yyvsp
[(1) - (1)].rblk
); }
3066 /* Line 1806 of yacc.c */
3067 #line 511 "grammar.y"
3068 { (yyval
.rblk
) = (yyvsp
[(2) - (2)].rblk
); }
3073 /* Line 1806 of yacc.c */
3074 #line 514 "grammar.y"
3075 { (yyval
.rblk
) = gen_pf_ifname((yyvsp
[(2) - (2)].s
)); }
3080 /* Line 1806 of yacc.c */
3081 #line 515 "grammar.y"
3082 { (yyval
.rblk
) = gen_pf_ruleset((yyvsp
[(2) - (2)].s
)); }
3087 /* Line 1806 of yacc.c */
3088 #line 516 "grammar.y"
3089 { (yyval
.rblk
) = gen_pf_rnr((yyvsp
[(2) - (2)].i
)); }
3094 /* Line 1806 of yacc.c */
3095 #line 517 "grammar.y"
3096 { (yyval
.rblk
) = gen_pf_srnr((yyvsp
[(2) - (2)].i
)); }
3101 /* Line 1806 of yacc.c */
3102 #line 518 "grammar.y"
3103 { (yyval
.rblk
) = gen_pf_reason((yyvsp
[(2) - (2)].i
)); }
3108 /* Line 1806 of yacc.c */
3109 #line 519 "grammar.y"
3110 { (yyval
.rblk
) = gen_pf_action((yyvsp
[(2) - (2)].i
)); }
3115 /* Line 1806 of yacc.c */
3116 #line 523 "grammar.y"
3117 { (yyval
.rblk
) = gen_p80211_type((yyvsp
[(2) - (4)].i
) | (yyvsp
[(4) - (4)].i
),
3118 IEEE80211_FC0_TYPE_MASK
|
3119 IEEE80211_FC0_SUBTYPE_MASK
);
3125 /* Line 1806 of yacc.c */
3126 #line 527 "grammar.y"
3127 { (yyval
.rblk
) = gen_p80211_type((yyvsp
[(2) - (2)].i
),
3128 IEEE80211_FC0_TYPE_MASK
);
3134 /* Line 1806 of yacc.c */
3135 #line 530 "grammar.y"
3136 { (yyval
.rblk
) = gen_p80211_type((yyvsp
[(2) - (2)].i
),
3137 IEEE80211_FC0_TYPE_MASK
|
3138 IEEE80211_FC0_SUBTYPE_MASK
);
3144 /* Line 1806 of yacc.c */
3145 #line 534 "grammar.y"
3146 { (yyval
.rblk
) = gen_p80211_fcdir((yyvsp
[(2) - (2)].i
)); }
3151 /* Line 1806 of yacc.c */
3152 #line 538 "grammar.y"
3153 { (yyval
.i
) = str2tok((yyvsp
[(1) - (1)].s
), ieee80211_types
);
3154 if ((yyval
.i
) == -1)
3155 bpf_error("unknown 802.11 type name");
3161 /* Line 1806 of yacc.c */
3162 #line 545 "grammar.y"
3163 { const struct tok
*types
= NULL
;
3166 if (ieee80211_type_subtypes
[i
].tok
== NULL
) {
3167 /* Ran out of types */
3168 bpf_error("unknown 802.11 type");
3171 if ((yyvsp
[(-1) - (1)].i
) == ieee80211_type_subtypes
[i
].type
) {
3172 types
= ieee80211_type_subtypes
[i
].tok
;
3177 (yyval
.i
) = str2tok((yyvsp
[(1) - (1)].s
), types
);
3178 if ((yyval
.i
) == -1)
3179 bpf_error("unknown 802.11 subtype name");
3185 /* Line 1806 of yacc.c */
3186 #line 565 "grammar.y"
3189 if (ieee80211_type_subtypes
[i
].tok
== NULL
) {
3190 /* Ran out of types */
3191 bpf_error("unknown 802.11 type name");
3194 (yyval
.i
) = str2tok((yyvsp
[(1) - (1)].s
), ieee80211_type_subtypes
[i
].tok
);
3195 if ((yyval
.i
) != -1) {
3196 (yyval
.i
) |= ieee80211_type_subtypes
[i
].type
;
3205 /* Line 1806 of yacc.c */
3206 #line 582 "grammar.y"
3207 { if (pcap_strcasecmp((yyvsp
[(1) - (1)].s
), "nods") == 0)
3208 (yyval
.i
) = IEEE80211_FC1_DIR_NODS
;
3209 else if (pcap_strcasecmp((yyvsp
[(1) - (1)].s
), "tods") == 0)
3210 (yyval
.i
) = IEEE80211_FC1_DIR_TODS
;
3211 else if (pcap_strcasecmp((yyvsp
[(1) - (1)].s
), "fromds") == 0)
3212 (yyval
.i
) = IEEE80211_FC1_DIR_FROMDS
;
3213 else if (pcap_strcasecmp((yyvsp
[(1) - (1)].s
), "dstods") == 0)
3214 (yyval
.i
) = IEEE80211_FC1_DIR_DSTODS
;
3216 bpf_error("unknown 802.11 direction");
3222 /* Line 1806 of yacc.c */
3223 #line 595 "grammar.y"
3224 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
3229 /* Line 1806 of yacc.c */
3230 #line 596 "grammar.y"
3231 { (yyval
.i
) = pfreason_to_num((yyvsp
[(1) - (1)].s
)); }
3236 /* Line 1806 of yacc.c */
3237 #line 599 "grammar.y"
3238 { (yyval
.i
) = pfaction_to_num((yyvsp
[(1) - (1)].s
)); }
3243 /* Line 1806 of yacc.c */
3244 #line 602 "grammar.y"
3245 { (yyval
.i
) = BPF_JGT
; }
3250 /* Line 1806 of yacc.c */
3251 #line 603 "grammar.y"
3252 { (yyval
.i
) = BPF_JGE
; }
3257 /* Line 1806 of yacc.c */
3258 #line 604 "grammar.y"
3259 { (yyval
.i
) = BPF_JEQ
; }
3264 /* Line 1806 of yacc.c */
3265 #line 606 "grammar.y"
3266 { (yyval
.i
) = BPF_JGT
; }
3271 /* Line 1806 of yacc.c */
3272 #line 607 "grammar.y"
3273 { (yyval
.i
) = BPF_JGE
; }
3278 /* Line 1806 of yacc.c */
3279 #line 608 "grammar.y"
3280 { (yyval
.i
) = BPF_JEQ
; }
3285 /* Line 1806 of yacc.c */
3286 #line 610 "grammar.y"
3287 { (yyval
.a
) = gen_loadi((yyvsp
[(1) - (1)].i
)); }
3292 /* Line 1806 of yacc.c */
3293 #line 613 "grammar.y"
3294 { (yyval
.a
) = gen_load((yyvsp
[(1) - (4)].i
), (yyvsp
[(3) - (4)].a
), 1); }
3299 /* Line 1806 of yacc.c */
3300 #line 614 "grammar.y"
3301 { (yyval
.a
) = gen_load((yyvsp
[(1) - (6)].i
), (yyvsp
[(3) - (6)].a
), (yyvsp
[(5) - (6)].i
)); }
3306 /* Line 1806 of yacc.c */
3307 #line 615 "grammar.y"
3308 { (yyval
.a
) = gen_arth(BPF_ADD
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3313 /* Line 1806 of yacc.c */
3314 #line 616 "grammar.y"
3315 { (yyval
.a
) = gen_arth(BPF_SUB
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3320 /* Line 1806 of yacc.c */
3321 #line 617 "grammar.y"
3322 { (yyval
.a
) = gen_arth(BPF_MUL
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3327 /* Line 1806 of yacc.c */
3328 #line 618 "grammar.y"
3329 { (yyval
.a
) = gen_arth(BPF_DIV
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3334 /* Line 1806 of yacc.c */
3335 #line 619 "grammar.y"
3336 { (yyval
.a
) = gen_arth(BPF_AND
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3341 /* Line 1806 of yacc.c */
3342 #line 620 "grammar.y"
3343 { (yyval
.a
) = gen_arth(BPF_OR
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3348 /* Line 1806 of yacc.c */
3349 #line 621 "grammar.y"
3350 { (yyval
.a
) = gen_arth(BPF_LSH
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3355 /* Line 1806 of yacc.c */
3356 #line 622 "grammar.y"
3357 { (yyval
.a
) = gen_arth(BPF_RSH
, (yyvsp
[(1) - (3)].a
), (yyvsp
[(3) - (3)].a
)); }
3362 /* Line 1806 of yacc.c */
3363 #line 623 "grammar.y"
3364 { (yyval
.a
) = gen_neg((yyvsp
[(2) - (2)].a
)); }
3369 /* Line 1806 of yacc.c */
3370 #line 624 "grammar.y"
3371 { (yyval
.a
) = (yyvsp
[(2) - (3)].a
); }
3376 /* Line 1806 of yacc.c */
3377 #line 625 "grammar.y"
3378 { (yyval
.a
) = gen_loadlen(); }
3383 /* Line 1806 of yacc.c */
3384 #line 627 "grammar.y"
3385 { (yyval
.i
) = '&'; }
3390 /* Line 1806 of yacc.c */
3391 #line 628 "grammar.y"
3392 { (yyval
.i
) = '|'; }
3397 /* Line 1806 of yacc.c */
3398 #line 629 "grammar.y"
3399 { (yyval
.i
) = '<'; }
3404 /* Line 1806 of yacc.c */
3405 #line 630 "grammar.y"
3406 { (yyval
.i
) = '>'; }
3411 /* Line 1806 of yacc.c */
3412 #line 631 "grammar.y"
3413 { (yyval
.i
) = '='; }
3418 /* Line 1806 of yacc.c */
3419 #line 634 "grammar.y"
3420 { (yyval
.i
) = (yyvsp
[(2) - (3)].i
); }
3425 /* Line 1806 of yacc.c */
3426 #line 636 "grammar.y"
3427 { (yyval
.i
) = A_LANE
; }
3432 /* Line 1806 of yacc.c */
3433 #line 637 "grammar.y"
3434 { (yyval
.i
) = A_LLC
; }
3439 /* Line 1806 of yacc.c */
3440 #line 638 "grammar.y"
3441 { (yyval
.i
) = A_METAC
; }
3446 /* Line 1806 of yacc.c */
3447 #line 639 "grammar.y"
3448 { (yyval
.i
) = A_BCC
; }
3453 /* Line 1806 of yacc.c */
3454 #line 640 "grammar.y"
3455 { (yyval
.i
) = A_OAMF4EC
; }
3460 /* Line 1806 of yacc.c */
3461 #line 641 "grammar.y"
3462 { (yyval
.i
) = A_OAMF4SC
; }
3467 /* Line 1806 of yacc.c */
3468 #line 642 "grammar.y"
3469 { (yyval
.i
) = A_SC
; }
3474 /* Line 1806 of yacc.c */
3475 #line 643 "grammar.y"
3476 { (yyval
.i
) = A_ILMIC
; }
3481 /* Line 1806 of yacc.c */
3482 #line 645 "grammar.y"
3483 { (yyval
.i
) = A_OAM
; }
3488 /* Line 1806 of yacc.c */
3489 #line 646 "grammar.y"
3490 { (yyval
.i
) = A_OAMF4
; }
3495 /* Line 1806 of yacc.c */
3496 #line 647 "grammar.y"
3497 { (yyval
.i
) = A_CONNECTMSG
; }
3502 /* Line 1806 of yacc.c */
3503 #line 648 "grammar.y"
3504 { (yyval
.i
) = A_METACONNECT
; }
3509 /* Line 1806 of yacc.c */
3510 #line 651 "grammar.y"
3511 { (yyval
.blk
).atmfieldtype
= A_VPI
; }
3516 /* Line 1806 of yacc.c */
3517 #line 652 "grammar.y"
3518 { (yyval
.blk
).atmfieldtype
= A_VCI
; }
3523 /* Line 1806 of yacc.c */
3524 #line 655 "grammar.y"
3525 { (yyval
.blk
).b
= gen_atmfield_code((yyvsp
[(0) - (2)].blk
).atmfieldtype
, (bpf_int32
)(yyvsp
[(2) - (2)].i
), (bpf_u_int32
)(yyvsp
[(1) - (2)].i
), 0); }
3530 /* Line 1806 of yacc.c */
3531 #line 656 "grammar.y"
3532 { (yyval
.blk
).b
= gen_atmfield_code((yyvsp
[(0) - (2)].blk
).atmfieldtype
, (bpf_int32
)(yyvsp
[(2) - (2)].i
), (bpf_u_int32
)(yyvsp
[(1) - (2)].i
), 1); }
3537 /* Line 1806 of yacc.c */
3538 #line 657 "grammar.y"
3539 { (yyval
.blk
).b
= (yyvsp
[(2) - (3)].blk
).b
; (yyval
.blk
).q
= qerr
; }
3544 /* Line 1806 of yacc.c */
3545 #line 659 "grammar.y"
3547 (yyval
.blk
).atmfieldtype
= (yyvsp
[(0) - (1)].blk
).atmfieldtype
;
3548 if ((yyval
.blk
).atmfieldtype
== A_VPI
||
3549 (yyval
.blk
).atmfieldtype
== A_VCI
)
3550 (yyval
.blk
).b
= gen_atmfield_code((yyval
.blk
).atmfieldtype
, (bpf_int32
) (yyvsp
[(1) - (1)].i
), BPF_JEQ
, 0);
3556 /* Line 1806 of yacc.c */
3557 #line 667 "grammar.y"
3558 { gen_or((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
3563 /* Line 1806 of yacc.c */
3564 #line 670 "grammar.y"
3565 { (yyval
.i
) = M_FISU
; }
3570 /* Line 1806 of yacc.c */
3571 #line 671 "grammar.y"
3572 { (yyval
.i
) = M_LSSU
; }
3577 /* Line 1806 of yacc.c */
3578 #line 672 "grammar.y"
3579 { (yyval
.i
) = M_MSU
; }
3584 /* Line 1806 of yacc.c */
3585 #line 675 "grammar.y"
3586 { (yyval
.blk
).mtp3fieldtype
= M_SIO
; }
3591 /* Line 1806 of yacc.c */
3592 #line 676 "grammar.y"
3593 { (yyval
.blk
).mtp3fieldtype
= M_OPC
; }
3598 /* Line 1806 of yacc.c */
3599 #line 677 "grammar.y"
3600 { (yyval
.blk
).mtp3fieldtype
= M_DPC
; }
3605 /* Line 1806 of yacc.c */
3606 #line 678 "grammar.y"
3607 { (yyval
.blk
).mtp3fieldtype
= M_SLS
; }
3612 /* Line 1806 of yacc.c */
3613 #line 681 "grammar.y"
3614 { (yyval
.blk
).b
= gen_mtp3field_code((yyvsp
[(0) - (2)].blk
).mtp3fieldtype
, (u_int
)(yyvsp
[(2) - (2)].i
), (u_int
)(yyvsp
[(1) - (2)].i
), 0); }
3619 /* Line 1806 of yacc.c */
3620 #line 682 "grammar.y"
3621 { (yyval
.blk
).b
= gen_mtp3field_code((yyvsp
[(0) - (2)].blk
).mtp3fieldtype
, (u_int
)(yyvsp
[(2) - (2)].i
), (u_int
)(yyvsp
[(1) - (2)].i
), 1); }
3626 /* Line 1806 of yacc.c */
3627 #line 683 "grammar.y"
3628 { (yyval
.blk
).b
= (yyvsp
[(2) - (3)].blk
).b
; (yyval
.blk
).q
= qerr
; }
3633 /* Line 1806 of yacc.c */
3634 #line 685 "grammar.y"
3636 (yyval
.blk
).mtp3fieldtype
= (yyvsp
[(0) - (1)].blk
).mtp3fieldtype
;
3637 if ((yyval
.blk
).mtp3fieldtype
== M_SIO
||
3638 (yyval
.blk
).mtp3fieldtype
== M_OPC
||
3639 (yyval
.blk
).mtp3fieldtype
== M_DPC
||
3640 (yyval
.blk
).mtp3fieldtype
== M_SLS
)
3641 (yyval
.blk
).b
= gen_mtp3field_code((yyval
.blk
).mtp3fieldtype
, (u_int
) (yyvsp
[(1) - (1)].i
), BPF_JEQ
, 0);
3647 /* Line 1806 of yacc.c */
3648 #line 695 "grammar.y"
3649 { gen_or((yyvsp
[(1) - (3)].blk
).b
, (yyvsp
[(3) - (3)].blk
).b
); (yyval
.blk
) = (yyvsp
[(3) - (3)].blk
); }
3654 /* Line 1806 of yacc.c */
3655 #line 3656 "y.tab.c"
3658 /* User semantic actions sometimes alter yychar, and that requires
3659 that yytoken be updated with the new translation. We take the
3660 approach of translating immediately before every use of yytoken.
3661 One alternative is translating here after every semantic action,
3662 but that translation would be missed if the semantic action invokes
3663 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3664 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3665 incorrect destructor might then be invoked immediately. In the
3666 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3667 to an incorrect destructor call or verbose syntax error message
3668 before the lookahead is translated. */
3669 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
3673 YY_STACK_PRINT (yyss
, yyssp
);
3677 /* Now `shift' the result of the reduction. Determine what state
3678 that goes to, based on the state we popped back to and the rule
3679 number reduced by. */
3683 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
3684 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3685 yystate
= yytable
[yystate
];
3687 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
3692 /*------------------------------------.
3693 | yyerrlab -- here on detecting error |
3694 `------------------------------------*/
3696 /* Make sure we have latest lookahead translation. See comments at
3697 user semantic actions for why this is necessary. */
3698 yytoken
= yychar
== YYEMPTY
? YYEMPTY
: YYTRANSLATE (yychar
);
3700 /* If not already recovering from an error, report this error. */
3704 #if ! YYERROR_VERBOSE
3705 yyerror (YY_("syntax error"));
3707 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3710 char const *yymsgp
= YY_("syntax error");
3711 int yysyntax_error_status
;
3712 yysyntax_error_status
= YYSYNTAX_ERROR
;
3713 if (yysyntax_error_status
== 0)
3715 else if (yysyntax_error_status
== 1)
3717 if (yymsg
!= yymsgbuf
)
3718 YYSTACK_FREE (yymsg
);
3719 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
3723 yymsg_alloc
= sizeof yymsgbuf
;
3724 yysyntax_error_status
= 2;
3728 yysyntax_error_status
= YYSYNTAX_ERROR
;
3733 if (yysyntax_error_status
== 2)
3734 goto yyexhaustedlab
;
3736 # undef YYSYNTAX_ERROR
3742 if (yyerrstatus
== 3)
3744 /* If just tried and failed to reuse lookahead token after an
3745 error, discard it. */
3747 if (yychar
<= YYEOF
)
3749 /* Return failure if at end of input. */
3750 if (yychar
== YYEOF
)
3755 yydestruct ("Error: discarding",
3761 /* Else will try to reuse lookahead token after shifting the error
3766 /*---------------------------------------------------.
3767 | yyerrorlab -- error raised explicitly by YYERROR. |
3768 `---------------------------------------------------*/
3771 /* Pacify compilers like GCC when the user code never invokes
3772 YYERROR and the label yyerrorlab therefore never appears in user
3774 if (/*CONSTCOND*/ 0)
3777 /* Do not reclaim the symbols of the rule which action triggered
3781 YY_STACK_PRINT (yyss
, yyssp
);
3786 /*-------------------------------------------------------------.
3787 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3788 `-------------------------------------------------------------*/
3790 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3794 yyn
= yypact
[yystate
];
3795 if (!yypact_value_is_default (yyn
))
3798 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3806 /* Pop the current state because it cannot handle the error token. */
3811 yydestruct ("Error: popping",
3812 yystos
[yystate
], yyvsp
);
3815 YY_STACK_PRINT (yyss
, yyssp
);
3821 /* Shift the error token. */
3822 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3828 /*-------------------------------------.
3829 | yyacceptlab -- YYACCEPT comes here. |
3830 `-------------------------------------*/
3835 /*-----------------------------------.
3836 | yyabortlab -- YYABORT comes here. |
3837 `-----------------------------------*/
3842 #if !defined(yyoverflow) || YYERROR_VERBOSE
3843 /*-------------------------------------------------.
3844 | yyexhaustedlab -- memory exhaustion comes here. |
3845 `-------------------------------------------------*/
3847 yyerror (YY_("memory exhausted"));
3853 if (yychar
!= YYEMPTY
)
3855 /* Make sure we have latest lookahead translation. See comments at
3856 user semantic actions for why this is necessary. */
3857 yytoken
= YYTRANSLATE (yychar
);
3858 yydestruct ("Cleanup: discarding lookahead",
3861 /* Do not reclaim the symbols of the rule which action triggered
3862 this YYABORT or YYACCEPT. */
3864 YY_STACK_PRINT (yyss
, yyssp
);
3865 while (yyssp
!= yyss
)
3867 yydestruct ("Cleanup: popping",
3868 yystos
[*yyssp
], yyvsp
);
3873 YYSTACK_FREE (yyss
);
3876 if (yymsg
!= yymsgbuf
)
3877 YYSTACK_FREE (yymsg
);
3879 /* Make sure YYID is used. */
3880 return YYID (yyresult
);
3885 /* Line 2067 of yacc.c */
3886 #line 697 "grammar.y"