1 /* A Bison parser, made by GNU Bison 2.5. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6
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.
11
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.
16
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/>. */
19
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.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
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. */
42
43 /* Identify Bison output. */
44 #define YYBISON 1
45
46 /* Bison version. */
47 #define YYBISON_VERSION "2.5"
48
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers. */
53 #define YYPURE 0
54
55 /* Push parsers. */
56 #define YYPUSH 0
57
58 /* Pull parsers. */
59 #define YYPULL 1
60
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
63
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
72
73
74 /* Copy the first part of user declarations. */
75
76 /* Line 268 of yacc.c */
77 #line 1 "grammar.y"
78
79 /*
80 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
81 * The Regents of the University of California. All rights reserved.
82 *
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
94 * written permission.
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.
98 *
99 */
100 #ifndef lint
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)";
103 #endif
104
105 #ifdef HAVE_CONFIG_H
106 #include "config.h"
107 #endif
108
109 #ifdef WIN32
110 #include <pcap-stdinc.h>
111 #else /* WIN32 */
112 #include <sys/types.h>
113 #include <sys/socket.h>
114 #endif /* WIN32 */
115
116 #include <stdlib.h>
117
118 #ifndef WIN32
119 #if __STDC__
120 struct mbuf;
121 struct rtentry;
122 #endif
123
124 #include <netinet/in.h>
125 #include <arpa/inet.h>
126 #endif /* WIN32 */
127
128 #include <stdio.h>
129
130 #include "pcap-int.h"
131
132 #include "gencode.h"
133 #ifdef HAVE_NET_PFVAR_H
134 #include <net/if.h>
135 #include <net/pfvar.h>
136 #include <net/if_pflog.h>
137 #endif
138 #include "ieee80211.h"
139 #include <pcap/namedb.h>
140
141 #ifdef HAVE_OS_PROTO_H
142 #include "os-proto.h"
143 #endif
144
145 #define QSET(q, p, d, a) (q).proto = (p),\
146 (q).dir = (d),\
147 (q).addr = (a)
148
149 struct tok {
150 int v; /* value */
151 const char *s; /* string */
152 };
153
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" },
160 { 0, NULL }
161 };
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" },
183 { 0, NULL }
184 };
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" },
192 { 0, NULL }
193 };
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" },
210 { 0, NULL }
211 };
212 struct type2tok {
213 int type;
214 const struct tok *tok;
215 };
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 },
220 { 0, NULL }
221 };
222
223 static int
str2tok(const char * str,const struct tok * toks)224 str2tok(const char *str, const struct tok *toks)
225 {
226 int i;
227
228 for (i = 0; toks[i].s != NULL; i++) {
229 if (pcap_strcasecmp(toks[i].s, str) == 0)
230 return (toks[i].v);
231 }
232 return (-1);
233 }
234
235 int n_errors = 0;
236
237 static struct qual qerr = { Q_UNDEF, Q_UNDEF, Q_UNDEF, Q_UNDEF };
238
239 static void
yyerror(const char * msg)240 yyerror(const char *msg)
241 {
242 ++n_errors;
243 bpf_error("%s", msg);
244 /* NOTREACHED */
245 }
246
247 #ifdef NEED_YYPARSE_WRAPPER
248 int yyparse(void);
249
250 int
pcap_parse()251 pcap_parse()
252 {
253 return (yyparse());
254 }
255 #endif
256
257 #ifdef HAVE_NET_PFVAR_H
258 static int
pfreason_to_num(const char * reason)259 pfreason_to_num(const char *reason)
260 {
261 const char *reasons[] = PFRES_NAMES;
262 int i;
263
264 for (i = 0; reasons[i]; i++) {
265 if (pcap_strcasecmp(reason, reasons[i]) == 0)
266 return (i);
267 }
268 bpf_error("unknown PF reason");
269 /*NOTREACHED*/
270 }
271
272 static int
pfaction_to_num(const char * action)273 pfaction_to_num(const char *action)
274 {
275 if (pcap_strcasecmp(action, "pass") == 0 ||
276 pcap_strcasecmp(action, "accept") == 0)
277 return (PF_PASS);
278 else if (pcap_strcasecmp(action, "drop") == 0 ||
279 pcap_strcasecmp(action, "block") == 0)
280 return (PF_DROP);
281 #if HAVE_PF_NAT_THROUGH_PF_NORDR
282 else if (pcap_strcasecmp(action, "rdr") == 0)
283 return (PF_RDR);
284 else if (pcap_strcasecmp(action, "nat") == 0)
285 return (PF_NAT);
286 else if (pcap_strcasecmp(action, "binat") == 0)
287 return (PF_BINAT);
288 else if (pcap_strcasecmp(action, "nordr") == 0)
289 return (PF_NORDR);
290 #endif
291 else {
292 bpf_error("unknown PF action");
293 /*NOTREACHED*/
294 }
295 }
296 #else /* !HAVE_NET_PFVAR_H */
297 static int
pfreason_to_num(const char * reason)298 pfreason_to_num(const char *reason)
299 {
300 bpf_error("libpcap was compiled on a machine without pf support");
301 /*NOTREACHED*/
302
303 /* this is to make the VC compiler happy */
304 return -1;
305 }
306
307 static int
pfaction_to_num(const char * action)308 pfaction_to_num(const char *action)
309 {
310 bpf_error("libpcap was compiled on a machine without pf support");
311 /*NOTREACHED*/
312
313 /* this is to make the VC compiler happy */
314 return -1;
315 }
316 #endif /* HAVE_NET_PFVAR_H */
317
318
319 /* Line 268 of yacc.c */
320 #line 321 "y.tab.c"
321
322 /* Enabling traces. */
323 #ifndef YYDEBUG
324 # define YYDEBUG 0
325 #endif
326
327 /* Enabling verbose error messages. */
328 #ifdef YYERROR_VERBOSE
329 # undef YYERROR_VERBOSE
330 # define YYERROR_VERBOSE 1
331 #else
332 # define YYERROR_VERBOSE 0
333 #endif
334
335 /* Enabling the token table. */
336 #ifndef YYTOKEN_TABLE
337 # define YYTOKEN_TABLE 0
338 #endif
339
340
341 /* Tokens. */
342 #ifndef YYTOKENTYPE
343 # define YYTOKENTYPE
344 /* Put the tokens into the symbol table, so that GDB and other debuggers
345 know about them. */
346 enum yytokentype {
347 DST = 258,
348 SRC = 259,
349 HOST = 260,
350 GATEWAY = 261,
351 NET = 262,
352 NETMASK = 263,
353 PORT = 264,
354 PORTRANGE = 265,
355 LESS = 266,
356 GREATER = 267,
357 PROTO = 268,
358 PROTOCHAIN = 269,
359 CBYTE = 270,
360 ARP = 271,
361 RARP = 272,
362 IP = 273,
363 SCTP = 274,
364 TCP = 275,
365 UDP = 276,
366 ICMP = 277,
367 IGMP = 278,
368 IGRP = 279,
369 PIM = 280,
370 VRRP = 281,
371 CARP = 282,
372 ATALK = 283,
373 AARP = 284,
374 DECNET = 285,
375 LAT = 286,
376 SCA = 287,
377 MOPRC = 288,
378 MOPDL = 289,
379 TK_BROADCAST = 290,
380 TK_MULTICAST = 291,
381 NUM = 292,
382 INBOUND = 293,
383 OUTBOUND = 294,
384 PF_IFNAME = 295,
385 PF_RSET = 296,
386 PF_RNR = 297,
387 PF_SRNR = 298,
388 PF_REASON = 299,
389 PF_ACTION = 300,
390 TYPE = 301,
391 SUBTYPE = 302,
392 DIR = 303,
393 ADDR1 = 304,
394 ADDR2 = 305,
395 ADDR3 = 306,
396 ADDR4 = 307,
397 RA = 308,
398 TA = 309,
399 LINK = 310,
400 GEQ = 311,
401 LEQ = 312,
402 NEQ = 313,
403 ID = 314,
404 EID = 315,
405 HID = 316,
406 HID6 = 317,
407 AID = 318,
408 LSH = 319,
409 RSH = 320,
410 LEN = 321,
411 IPV6 = 322,
412 ICMPV6 = 323,
413 AH = 324,
414 ESP = 325,
415 VLAN = 326,
416 MPLS = 327,
417 PPPOED = 328,
418 PPPOES = 329,
419 ISO = 330,
420 ESIS = 331,
421 CLNP = 332,
422 ISIS = 333,
423 L1 = 334,
424 L2 = 335,
425 IIH = 336,
426 LSP = 337,
427 SNP = 338,
428 CSNP = 339,
429 PSNP = 340,
430 STP = 341,
431 IPX = 342,
432 NETBEUI = 343,
433 LANE = 344,
434 LLC = 345,
435 METAC = 346,
436 BCC = 347,
437 SC = 348,
438 ILMIC = 349,
439 OAMF4EC = 350,
440 OAMF4SC = 351,
441 OAM = 352,
442 OAMF4 = 353,
443 CONNECTMSG = 354,
444 METACONNECT = 355,
445 VPI = 356,
446 VCI = 357,
447 RADIO = 358,
448 FISU = 359,
449 LSSU = 360,
450 MSU = 361,
451 HFISU = 362,
452 HLSSU = 363,
453 HMSU = 364,
454 SIO = 365,
455 OPC = 366,
456 DPC = 367,
457 SLS = 368,
458 HSIO = 369,
459 HOPC = 370,
460 HDPC = 371,
461 HSLS = 372,
462 AND = 373,
463 OR = 374,
464 UMINUS = 375
465 };
466 #endif
467 /* Tokens. */
468 #define DST 258
469 #define SRC 259
470 #define HOST 260
471 #define GATEWAY 261
472 #define NET 262
473 #define NETMASK 263
474 #define PORT 264
475 #define PORTRANGE 265
476 #define LESS 266
477 #define GREATER 267
478 #define PROTO 268
479 #define PROTOCHAIN 269
480 #define CBYTE 270
481 #define ARP 271
482 #define RARP 272
483 #define IP 273
484 #define SCTP 274
485 #define TCP 275
486 #define UDP 276
487 #define ICMP 277
488 #define IGMP 278
489 #define IGRP 279
490 #define PIM 280
491 #define VRRP 281
492 #define CARP 282
493 #define ATALK 283
494 #define AARP 284
495 #define DECNET 285
496 #define LAT 286
497 #define SCA 287
498 #define MOPRC 288
499 #define MOPDL 289
500 #define TK_BROADCAST 290
501 #define TK_MULTICAST 291
502 #define NUM 292
503 #define INBOUND 293
504 #define OUTBOUND 294
505 #define PF_IFNAME 295
506 #define PF_RSET 296
507 #define PF_RNR 297
508 #define PF_SRNR 298
509 #define PF_REASON 299
510 #define PF_ACTION 300
511 #define TYPE 301
512 #define SUBTYPE 302
513 #define DIR 303
514 #define ADDR1 304
515 #define ADDR2 305
516 #define ADDR3 306
517 #define ADDR4 307
518 #define RA 308
519 #define TA 309
520 #define LINK 310
521 #define GEQ 311
522 #define LEQ 312
523 #define NEQ 313
524 #define ID 314
525 #define EID 315
526 #define HID 316
527 #define HID6 317
528 #define AID 318
529 #define LSH 319
530 #define RSH 320
531 #define LEN 321
532 #define IPV6 322
533 #define ICMPV6 323
534 #define AH 324
535 #define ESP 325
536 #define VLAN 326
537 #define MPLS 327
538 #define PPPOED 328
539 #define PPPOES 329
540 #define ISO 330
541 #define ESIS 331
542 #define CLNP 332
543 #define ISIS 333
544 #define L1 334
545 #define L2 335
546 #define IIH 336
547 #define LSP 337
548 #define SNP 338
549 #define CSNP 339
550 #define PSNP 340
551 #define STP 341
552 #define IPX 342
553 #define NETBEUI 343
554 #define LANE 344
555 #define LLC 345
556 #define METAC 346
557 #define BCC 347
558 #define SC 348
559 #define ILMIC 349
560 #define OAMF4EC 350
561 #define OAMF4SC 351
562 #define OAM 352
563 #define OAMF4 353
564 #define CONNECTMSG 354
565 #define METACONNECT 355
566 #define VPI 356
567 #define VCI 357
568 #define RADIO 358
569 #define FISU 359
570 #define LSSU 360
571 #define MSU 361
572 #define HFISU 362
573 #define HLSSU 363
574 #define HMSU 364
575 #define SIO 365
576 #define OPC 366
577 #define DPC 367
578 #define SLS 368
579 #define HSIO 369
580 #define HOPC 370
581 #define HDPC 371
582 #define HSLS 372
583 #define AND 373
584 #define OR 374
585 #define UMINUS 375
586
587
588
589
590 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
591 typedef union YYSTYPE
592 {
593
594 /* Line 293 of yacc.c */
595 #line 242 "grammar.y"
596
597 int i;
598 bpf_u_int32 h;
599 u_char *e;
600 char *s;
601 struct stmt *stmt;
602 struct arth *a;
603 struct {
604 struct qual q;
605 int atmfieldtype;
606 int mtp3fieldtype;
607 struct block *b;
608 } blk;
609 struct block *rblk;
610
611
612
613 /* Line 293 of yacc.c */
614 #line 615 "y.tab.c"
615 } YYSTYPE;
616 # define YYSTYPE_IS_TRIVIAL 1
617 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
618 # define YYSTYPE_IS_DECLARED 1
619 #endif
620
621
622 /* Copy the second part of user declarations. */
623
624
625 /* Line 343 of yacc.c */
626 #line 627 "y.tab.c"
627
628 #ifdef short
629 # undef short
630 #endif
631
632 #ifdef YYTYPE_UINT8
633 typedef YYTYPE_UINT8 yytype_uint8;
634 #else
635 typedef unsigned char yytype_uint8;
636 #endif
637
638 #ifdef YYTYPE_INT8
639 typedef YYTYPE_INT8 yytype_int8;
640 #elif (defined __STDC__ || defined __C99__FUNC__ \
641 || defined __cplusplus || defined _MSC_VER)
642 typedef signed char yytype_int8;
643 #else
644 typedef short int yytype_int8;
645 #endif
646
647 #ifdef YYTYPE_UINT16
648 typedef YYTYPE_UINT16 yytype_uint16;
649 #else
650 typedef unsigned short int yytype_uint16;
651 #endif
652
653 #ifdef YYTYPE_INT16
654 typedef YYTYPE_INT16 yytype_int16;
655 #else
656 typedef short int yytype_int16;
657 #endif
658
659 #ifndef YYSIZE_T
660 # ifdef __SIZE_TYPE__
661 # define YYSIZE_T __SIZE_TYPE__
662 # elif defined size_t
663 # define YYSIZE_T size_t
664 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
665 || defined __cplusplus || defined _MSC_VER)
666 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
667 # define YYSIZE_T size_t
668 # else
669 # define YYSIZE_T unsigned int
670 # endif
671 #endif
672
673 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
674
675 #ifndef YY_
676 # if defined YYENABLE_NLS && YYENABLE_NLS
677 # if ENABLE_NLS
678 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
679 # define YY_(msgid) dgettext ("bison-runtime", msgid)
680 # endif
681 # endif
682 # ifndef YY_
683 # define YY_(msgid) msgid
684 # endif
685 #endif
686
687 /* Suppress unused-variable warnings by "using" E. */
688 #if ! defined lint || defined __GNUC__
689 # define YYUSE(e) ((void) (e))
690 #else
691 # define YYUSE(e) /* empty */
692 #endif
693
694 /* Identity function, used to suppress warnings about constant conditions. */
695 #ifndef lint
696 # define YYID(n) (n)
697 #else
698 #if (defined __STDC__ || defined __C99__FUNC__ \
699 || defined __cplusplus || defined _MSC_VER)
700 static int
YYID(int yyi)701 YYID (int yyi)
702 #else
703 static int
704 YYID (yyi)
705 int yyi;
706 #endif
707 {
708 return yyi;
709 }
710 #endif
711
712 #if ! defined yyoverflow || YYERROR_VERBOSE
713
714 /* The parser invokes alloca or malloc; define the necessary symbols. */
715
716 # ifdef YYSTACK_USE_ALLOCA
717 # if YYSTACK_USE_ALLOCA
718 # ifdef __GNUC__
719 # define YYSTACK_ALLOC __builtin_alloca
720 # elif defined __BUILTIN_VA_ARG_INCR
721 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
722 # elif defined _AIX
723 # define YYSTACK_ALLOC __alloca
724 # elif defined _MSC_VER
725 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
726 # define alloca _alloca
727 # else
728 # define YYSTACK_ALLOC alloca
729 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
730 || defined __cplusplus || defined _MSC_VER)
731 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
732 # ifndef EXIT_SUCCESS
733 # define EXIT_SUCCESS 0
734 # endif
735 # endif
736 # endif
737 # endif
738 # endif
739
740 # ifdef YYSTACK_ALLOC
741 /* Pacify GCC's `empty if-body' warning. */
742 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
743 # ifndef YYSTACK_ALLOC_MAXIMUM
744 /* The OS might guarantee only one guard page at the bottom of the stack,
745 and a page size can be as small as 4096 bytes. So we cannot safely
746 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
747 to allow for a few compiler-allocated temporary stack slots. */
748 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
749 # endif
750 # else
751 # define YYSTACK_ALLOC YYMALLOC
752 # define YYSTACK_FREE YYFREE
753 # ifndef YYSTACK_ALLOC_MAXIMUM
754 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
755 # endif
756 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
757 && ! ((defined YYMALLOC || defined malloc) \
758 && (defined YYFREE || defined free)))
759 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
760 # ifndef EXIT_SUCCESS
761 # define EXIT_SUCCESS 0
762 # endif
763 # endif
764 # ifndef YYMALLOC
765 # define YYMALLOC malloc
766 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
767 || defined __cplusplus || defined _MSC_VER)
768 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
769 # endif
770 # endif
771 # ifndef YYFREE
772 # define YYFREE free
773 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
774 || defined __cplusplus || defined _MSC_VER)
775 void free (void *); /* INFRINGES ON USER NAME SPACE */
776 # endif
777 # endif
778 # endif
779 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
780
781
782 #if (! defined yyoverflow \
783 && (! defined __cplusplus \
784 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
785
786 /* A type that is properly aligned for any stack member. */
787 union yyalloc
788 {
789 yytype_int16 yyss_alloc;
790 YYSTYPE yyvs_alloc;
791 };
792
793 /* The size of the maximum gap between one aligned stack and the next. */
794 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
795
796 /* The size of an array large to enough to hold all stacks, each with
797 N elements. */
798 # define YYSTACK_BYTES(N) \
799 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
800 + YYSTACK_GAP_MAXIMUM)
801
802 # define YYCOPY_NEEDED 1
803
804 /* Relocate STACK from its old location to the new one. The
805 local variables YYSIZE and YYSTACKSIZE give the old and new number of
806 elements in the stack, and YYPTR gives the new location of the
807 stack. Advance YYPTR to a properly aligned location for the next
808 stack. */
809 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
810 do \
811 { \
812 YYSIZE_T yynewbytes; \
813 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
814 Stack = &yyptr->Stack_alloc; \
815 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
816 yyptr += yynewbytes / sizeof (*yyptr); \
817 } \
818 while (YYID (0))
819
820 #endif
821
822 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
823 /* Copy COUNT objects from FROM to TO. The source and destination do
824 not overlap. */
825 # ifndef YYCOPY
826 # if defined __GNUC__ && 1 < __GNUC__
827 # define YYCOPY(To, From, Count) \
828 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
829 # else
830 # define YYCOPY(To, From, Count) \
831 do \
832 { \
833 YYSIZE_T yyi; \
834 for (yyi = 0; yyi < (Count); yyi++) \
835 (To)[yyi] = (From)[yyi]; \
836 } \
837 while (YYID (0))
838 # endif
839 # endif
840 #endif /* !YYCOPY_NEEDED */
841
842 /* YYFINAL -- State number of the termination state. */
843 #define YYFINAL 3
844 /* YYLAST -- Last index in YYTABLE. */
845 #define YYLAST 710
846
847 /* YYNTOKENS -- Number of terminals. */
848 #define YYNTOKENS 136
849 /* YYNNTS -- Number of nonterminals. */
850 #define YYNNTS 46
851 /* YYNRULES -- Number of rules. */
852 #define YYNRULES 213
853 /* YYNRULES -- Number of states. */
854 #define YYNSTATES 285
855
856 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
857 #define YYUNDEFTOK 2
858 #define YYMAXUTOK 375
859
860 #define YYTRANSLATE(YYX) \
861 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
862
863 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
864 static const yytype_uint8 yytranslate[] =
865 {
866 0, 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, 120, 2, 2, 2, 2, 122, 2,
870 129, 128, 125, 123, 2, 124, 2, 126, 2, 2,
871 2, 2, 2, 2, 2, 2, 2, 2, 135, 2,
872 132, 131, 130, 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, 133, 2, 134, 2, 2, 2, 2, 2, 2,
876 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
877 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
878 2, 2, 2, 2, 121, 2, 2, 2, 2, 2,
879 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
880 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
881 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
882 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
883 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
884 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
885 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
886 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
887 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
888 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
889 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
890 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
891 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
892 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
893 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
894 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
895 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
896 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
897 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
898 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
899 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
900 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
901 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
902 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
903 115, 116, 117, 118, 119, 127
904 };
905
906 #if YYDEBUG
907 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
908 YYRHS. */
909 static const yytype_uint16 yyprhs[] =
910 {
911 0, 0, 3, 6, 8, 9, 11, 15, 19, 23,
912 27, 29, 31, 33, 35, 39, 41, 45, 49, 51,
913 55, 57, 59, 61, 64, 66, 68, 70, 74, 78,
914 80, 82, 84, 87, 91, 94, 97, 100, 103, 106,
915 109, 113, 115, 119, 123, 125, 127, 129, 132, 134,
916 137, 139, 140, 142, 144, 148, 152, 156, 160, 162,
917 164, 166, 168, 170, 172, 174, 176, 178, 180, 182,
918 184, 186, 188, 190, 192, 194, 196, 198, 200, 202,
919 204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
920 224, 226, 228, 230, 232, 234, 236, 238, 240, 242,
921 244, 246, 248, 250, 252, 254, 256, 258, 260, 263,
922 266, 269, 272, 277, 279, 281, 284, 286, 289, 291,
923 293, 296, 298, 300, 303, 306, 309, 312, 315, 318,
924 321, 326, 329, 332, 335, 337, 339, 341, 343, 345,
925 347, 349, 351, 353, 355, 357, 359, 361, 363, 365,
926 367, 369, 371, 376, 383, 387, 391, 395, 399, 403,
927 407, 411, 415, 418, 422, 424, 426, 428, 430, 432,
928 434, 436, 440, 442, 444, 446, 448, 450, 452, 454,
929 456, 458, 460, 462, 464, 466, 468, 470, 473, 476,
930 480, 482, 484, 488, 490, 492, 494, 496, 498, 500,
931 502, 504, 506, 508, 510, 512, 514, 516, 518, 521,
932 524, 528, 530, 532
933 };
934
935 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
936 static const yytype_int16 yyrhs[] =
937 {
938 137, 0, -1, 138, 139, -1, 138, -1, -1, 148,
939 -1, 139, 140, 148, -1, 139, 140, 142, -1, 139,
940 141, 148, -1, 139, 141, 142, -1, 118, -1, 119,
941 -1, 143, -1, 170, -1, 145, 146, 128, -1, 59,
942 -1, 61, 126, 37, -1, 61, 8, 61, -1, 61,
943 -1, 62, 126, 37, -1, 62, -1, 60, -1, 63,
944 -1, 144, 142, -1, 120, -1, 129, -1, 143, -1,
945 147, 140, 142, -1, 147, 141, 142, -1, 170, -1,
946 146, -1, 150, -1, 144, 148, -1, 151, 152, 153,
947 -1, 151, 152, -1, 151, 153, -1, 151, 13, -1,
948 151, 14, -1, 151, 154, -1, 149, 142, -1, 145,
949 139, 128, -1, 155, -1, 167, 165, 167, -1, 167,
950 166, 167, -1, 156, -1, 171, -1, 172, -1, 173,
951 174, -1, 177, -1, 178, 179, -1, 155, -1, -1,
952 4, -1, 3, -1, 4, 119, 3, -1, 3, 119,
953 4, -1, 4, 118, 3, -1, 3, 118, 4, -1,
954 49, -1, 50, -1, 51, -1, 52, -1, 53, -1,
955 54, -1, 5, -1, 7, -1, 9, -1, 10, -1,
956 6, -1, 55, -1, 18, -1, 16, -1, 17, -1,
957 19, -1, 20, -1, 21, -1, 22, -1, 23, -1,
958 24, -1, 25, -1, 26, -1, 27, -1, 28, -1,
959 29, -1, 30, -1, 31, -1, 32, -1, 34, -1,
960 33, -1, 67, -1, 68, -1, 69, -1, 70, -1,
961 75, -1, 76, -1, 78, -1, 79, -1, 80, -1,
962 81, -1, 82, -1, 83, -1, 85, -1, 84, -1,
963 77, -1, 86, -1, 87, -1, 88, -1, 103, -1,
964 151, 35, -1, 151, 36, -1, 11, 37, -1, 12,
965 37, -1, 15, 37, 169, 37, -1, 38, -1, 39,
966 -1, 71, 170, -1, 71, -1, 72, 170, -1, 72,
967 -1, 73, -1, 74, 170, -1, 74, -1, 157, -1,
968 151, 158, -1, 40, 59, -1, 41, 59, -1, 42,
969 37, -1, 43, 37, -1, 44, 163, -1, 45, 164,
970 -1, 46, 159, 47, 160, -1, 46, 159, -1, 47,
971 161, -1, 48, 162, -1, 37, -1, 59, -1, 37,
972 -1, 59, -1, 59, -1, 37, -1, 59, -1, 37,
973 -1, 59, -1, 59, -1, 130, -1, 56, -1, 131,
974 -1, 57, -1, 132, -1, 58, -1, 170, -1, 168,
975 -1, 155, 133, 167, 134, -1, 155, 133, 167, 135,
976 37, 134, -1, 167, 123, 167, -1, 167, 124, 167,
977 -1, 167, 125, 167, -1, 167, 126, 167, -1, 167,
978 122, 167, -1, 167, 121, 167, -1, 167, 64, 167,
979 -1, 167, 65, 167, -1, 124, 167, -1, 145, 168,
980 128, -1, 66, -1, 122, -1, 121, -1, 132, -1,
981 130, -1, 131, -1, 37, -1, 145, 170, 128, -1,
982 89, -1, 90, -1, 91, -1, 92, -1, 95, -1,
983 96, -1, 93, -1, 94, -1, 97, -1, 98, -1,
984 99, -1, 100, -1, 101, -1, 102, -1, 175, -1,
985 165, 37, -1, 166, 37, -1, 145, 176, 128, -1,
986 37, -1, 175, -1, 176, 141, 175, -1, 104, -1,
987 105, -1, 106, -1, 107, -1, 108, -1, 109, -1,
988 110, -1, 111, -1, 112, -1, 113, -1, 114, -1,
989 115, -1, 116, -1, 117, -1, 180, -1, 165, 37,
990 -1, 166, 37, -1, 145, 181, 128, -1, 37, -1,
991 180, -1, 181, 141, 180, -1
992 };
993
994 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
995 static const yytype_uint16 yyrline[] =
996 {
997 0, 316, 316, 320, 322, 324, 325, 326, 327, 328,
998 330, 332, 334, 335, 337, 339, 340, 342, 344, 357,
999 366, 375, 384, 393, 395, 397, 399, 400, 401, 403,
1000 405, 407, 408, 410, 411, 412, 413, 414, 415, 417,
1001 418, 419, 420, 422, 424, 425, 426, 427, 428, 429,
1002 432, 433, 436, 437, 438, 439, 440, 441, 442, 443,
1003 444, 445, 446, 447, 450, 451, 452, 453, 456, 458,
1004 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
1005 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
1006 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
1007 489, 490, 491, 492, 493, 494, 495, 496, 498, 499,
1008 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
1009 510, 511, 512, 513, 516, 517, 518, 519, 520, 521,
1010 524, 529, 532, 536, 539, 540, 546, 547, 567, 583,
1011 584, 597, 598, 601, 604, 605, 606, 608, 609, 610,
1012 612, 613, 615, 616, 617, 618, 619, 620, 621, 622,
1013 623, 624, 625, 626, 627, 629, 630, 631, 632, 633,
1014 635, 636, 638, 639, 640, 641, 642, 643, 644, 645,
1015 647, 648, 649, 650, 653, 654, 656, 657, 658, 659,
1016 661, 668, 669, 672, 673, 674, 675, 676, 677, 680,
1017 681, 682, 683, 684, 685, 686, 687, 689, 690, 691,
1018 692, 694, 707, 708
1019 };
1020 #endif
1021
1022 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1023 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1024 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1025 static const char *const yytname[] =
1026 {
1027 "$end", "error", "$undefined", "DST", "SRC", "HOST", "GATEWAY", "NET",
1028 "NETMASK", "PORT", "PORTRANGE", "LESS", "GREATER", "PROTO", "PROTOCHAIN",
1029 "CBYTE", "ARP", "RARP", "IP", "SCTP", "TCP", "UDP", "ICMP", "IGMP",
1030 "IGRP", "PIM", "VRRP", "CARP", "ATALK", "AARP", "DECNET", "LAT", "SCA",
1031 "MOPRC", "MOPDL", "TK_BROADCAST", "TK_MULTICAST", "NUM", "INBOUND",
1032 "OUTBOUND", "PF_IFNAME", "PF_RSET", "PF_RNR", "PF_SRNR", "PF_REASON",
1033 "PF_ACTION", "TYPE", "SUBTYPE", "DIR", "ADDR1", "ADDR2", "ADDR3",
1034 "ADDR4", "RA", "TA", "LINK", "GEQ", "LEQ", "NEQ", "ID", "EID", "HID",
1035 "HID6", "AID", "LSH", "RSH", "LEN", "IPV6", "ICMPV6", "AH", "ESP",
1036 "VLAN", "MPLS", "PPPOED", "PPPOES", "ISO", "ESIS", "CLNP", "ISIS", "L1",
1037 "L2", "IIH", "LSP", "SNP", "CSNP", "PSNP", "STP", "IPX", "NETBEUI",
1038 "LANE", "LLC", "METAC", "BCC", "SC", "ILMIC", "OAMF4EC", "OAMF4SC",
1039 "OAM", "OAMF4", "CONNECTMSG", "METACONNECT", "VPI", "VCI", "RADIO",
1040 "FISU", "LSSU", "MSU", "HFISU", "HLSSU", "HMSU", "SIO", "OPC", "DPC",
1041 "SLS", "HSIO", "HOPC", "HDPC", "HSLS", "AND", "OR", "'!'", "'|'", "'&'",
1042 "'+'", "'-'", "'*'", "'/'", "UMINUS", "')'", "'('", "'>'", "'='", "'<'",
1043 "'['", "']'", "':'", "$accept", "prog", "null", "expr", "and", "or",
1044 "id", "nid", "not", "paren", "pid", "qid", "term", "head", "rterm",
1045 "pqual", "dqual", "aqual", "ndaqual", "pname", "other", "pfvar",
1046 "p80211", "type", "subtype", "type_subtype", "dir", "reason", "action",
1047 "relop", "irelop", "arth", "narth", "byteop", "pnum", "atmtype",
1048 "atmmultitype", "atmfield", "atmvalue", "atmfieldvalue", "atmlistvalue",
1049 "mtp2type", "mtp3field", "mtp3value", "mtp3fieldvalue", "mtp3listvalue", 0
1050 };
1051 #endif
1052
1053 # ifdef YYPRINT
1054 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1055 token YYLEX-NUM. */
1056 static const yytype_uint16 yytoknum[] =
1057 {
1058 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1059 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1060 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1061 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1062 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1063 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1064 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1065 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1066 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1067 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1068 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1069 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1070 33, 124, 38, 43, 45, 42, 47, 375, 41, 40,
1071 62, 61, 60, 91, 93, 58
1072 };
1073 # endif
1074
1075 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1076 static const yytype_uint8 yyr1[] =
1077 {
1078 0, 136, 137, 137, 138, 139, 139, 139, 139, 139,
1079 140, 141, 142, 142, 142, 143, 143, 143, 143, 143,
1080 143, 143, 143, 143, 144, 145, 146, 146, 146, 147,
1081 147, 148, 148, 149, 149, 149, 149, 149, 149, 150,
1082 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1083 151, 151, 152, 152, 152, 152, 152, 152, 152, 152,
1084 152, 152, 152, 152, 153, 153, 153, 153, 154, 155,
1085 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1086 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1087 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1088 155, 155, 155, 155, 155, 155, 155, 155, 156, 156,
1089 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1090 156, 156, 156, 156, 157, 157, 157, 157, 157, 157,
1091 158, 158, 158, 158, 159, 159, 160, 160, 161, 162,
1092 162, 163, 163, 164, 165, 165, 165, 166, 166, 166,
1093 167, 167, 168, 168, 168, 168, 168, 168, 168, 168,
1094 168, 168, 168, 168, 168, 169, 169, 169, 169, 169,
1095 170, 170, 171, 171, 171, 171, 171, 171, 171, 171,
1096 172, 172, 172, 172, 173, 173, 174, 174, 174, 174,
1097 175, 176, 176, 177, 177, 177, 177, 177, 177, 178,
1098 178, 178, 178, 178, 178, 178, 178, 179, 179, 179,
1099 179, 180, 181, 181
1100 };
1101
1102 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1103 static const yytype_uint8 yyr2[] =
1104 {
1105 0, 2, 2, 1, 0, 1, 3, 3, 3, 3,
1106 1, 1, 1, 1, 3, 1, 3, 3, 1, 3,
1107 1, 1, 1, 2, 1, 1, 1, 3, 3, 1,
1108 1, 1, 2, 3, 2, 2, 2, 2, 2, 2,
1109 3, 1, 3, 3, 1, 1, 1, 2, 1, 2,
1110 1, 0, 1, 1, 3, 3, 3, 3, 1, 1,
1111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1112 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1113 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1114 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1115 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1116 2, 2, 4, 1, 1, 2, 1, 2, 1, 1,
1117 2, 1, 1, 2, 2, 2, 2, 2, 2, 2,
1118 4, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1119 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1120 1, 1, 4, 6, 3, 3, 3, 3, 3, 3,
1121 3, 3, 2, 3, 1, 1, 1, 1, 1, 1,
1122 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1123 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
1124 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1125 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1126 3, 1, 1, 3
1127 };
1128
1129 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1130 Performed when YYTABLE doesn't specify something else to do. Zero
1131 means the default is an error. */
1132 static const yytype_uint8 yydefact[] =
1133 {
1134 4, 0, 51, 1, 0, 0, 0, 71, 72, 70,
1135 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1136 83, 84, 85, 86, 88, 87, 170, 113, 114, 0,
1137 0, 0, 0, 0, 0, 69, 164, 89, 90, 91,
1138 92, 116, 118, 119, 121, 93, 94, 103, 95, 96,
1139 97, 98, 99, 100, 102, 101, 104, 105, 106, 172,
1140 173, 174, 175, 178, 179, 176, 177, 180, 181, 182,
1141 183, 184, 185, 107, 193, 194, 195, 196, 197, 198,
1142 199, 200, 201, 202, 203, 204, 205, 206, 24, 0,
1143 25, 2, 51, 51, 5, 0, 31, 0, 50, 44,
1144 122, 0, 151, 150, 45, 46, 0, 48, 0, 110,
1145 111, 0, 124, 125, 126, 127, 141, 142, 128, 143,
1146 129, 0, 115, 117, 120, 0, 0, 162, 10, 11,
1147 51, 51, 32, 0, 151, 150, 15, 21, 18, 20,
1148 22, 39, 12, 0, 0, 13, 53, 52, 64, 68,
1149 65, 66, 67, 36, 37, 108, 109, 0, 0, 0,
1150 58, 59, 60, 61, 62, 63, 34, 35, 38, 123,
1151 0, 145, 147, 149, 0, 0, 0, 0, 0, 0,
1152 0, 0, 144, 146, 148, 0, 0, 190, 0, 0,
1153 0, 47, 186, 211, 0, 0, 0, 49, 207, 166,
1154 165, 168, 169, 167, 0, 0, 0, 7, 51, 51,
1155 6, 150, 9, 8, 40, 163, 171, 0, 0, 0,
1156 23, 26, 30, 0, 29, 0, 0, 0, 0, 134,
1157 135, 131, 138, 132, 139, 140, 133, 33, 0, 160,
1158 161, 159, 158, 154, 155, 156, 157, 42, 43, 191,
1159 0, 187, 188, 212, 0, 208, 209, 112, 150, 17,
1160 16, 19, 14, 0, 0, 57, 55, 56, 54, 0,
1161 152, 0, 189, 0, 210, 0, 27, 28, 136, 137,
1162 130, 0, 192, 213, 153
1163 };
1164
1165 /* YYDEFGOTO[NTERM-NUM]. */
1166 static const yytype_int16 yydefgoto[] =
1167 {
1168 -1, 1, 2, 133, 130, 131, 220, 142, 143, 125,
1169 222, 223, 94, 95, 96, 97, 166, 167, 168, 126,
1170 99, 100, 169, 231, 280, 233, 236, 118, 120, 185,
1171 186, 101, 102, 204, 103, 104, 105, 106, 191, 192,
1172 250, 107, 108, 197, 198, 254
1173 };
1174
1175 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1176 STATE-NUM. */
1177 #define YYPACT_NINF -208
1178 static const yytype_int16 yypact[] =
1179 {
1180 -208, 20, 226, -208, -10, -3, 1, -208, -208, -208,
1181 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
1182 -208, -208, -208, -208, -208, -208, -208, -208, -208, -28,
1183 -15, 49, 68, -18, 62, -208, -208, -208, -208, -208,
1184 -208, -26, -26, -208, -26, -208, -208, -208, -208, -208,
1185 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
1186 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
1187 -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
1188 -208, -208, -208, -208, -208, -208, -208, -208, -208, 570,
1189 -208, -42, 456, 456, -208, 19, -208, 656, 12, -208,
1190 -208, 153, -208, -208, -208, -208, 55, -208, 59, -208,
1191 -208, -69, -208, -208, -208, -208, -208, -208, -208, -208,
1192 -208, -26, -208, -208, -208, 570, -19, -208, -208, -208,
1193 341, 341, -208, -93, -1, 21, -208, -208, -6, 34,
1194 -208, -208, -208, 19, 19, -208, -9, 6, -208, -208,
1195 -208, -208, -208, -208, -208, -208, -208, -14, 74, -13,
1196 -208, -208, -208, -208, -208, -208, 23, -208, -208, -208,
1197 570, -208, -208, -208, 570, 570, 570, 570, 570, 570,
1198 570, 570, -208, -208, -208, 570, 570, -208, 81, 134,
1199 139, -208, -208, -208, 140, 141, 142, -208, -208, -208,
1200 -208, -208, -208, -208, 143, 21, 79, -208, 341, 341,
1201 -208, 4, -208, -208, -208, -208, -208, 86, 144, 145,
1202 -208, -208, 64, -42, 21, 179, 189, 191, 192, -208,
1203 -208, 149, -208, -208, -208, -208, -208, -208, -51, 42,
1204 42, 99, 110, 33, 33, -208, -208, 79, 79, -208,
1205 -61, -208, -208, -208, -59, -208, -208, -208, -64, -208,
1206 -208, -208, -208, 19, 19, -208, -208, -208, -208, -8,
1207 -208, 160, -208, 81, -208, 140, -208, -208, -208, -208,
1208 -208, 65, -208, -208, -208
1209 };
1210
1211 /* YYPGOTO[NTERM-NUM]. */
1212 static const yytype_int16 yypgoto[] =
1213 {
1214 -208, -208, -208, 196, -11, -207, -94, -122, 5, -2,
1215 -208, -208, -82, -208, -208, -208, -208, 53, -208, 7,
1216 -208, -208, -208, -208, -208, -208, -208, -208, -208, -91,
1217 -40, -24, -75, -208, -36, -208, -208, -208, -208, -185,
1218 -208, -208, -208, -208, -173, -208
1219 };
1220
1221 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1222 positive, shift that token. If negative, reduce the rule which
1223 number is the opposite. If YYTABLE_NINF, syntax error. */
1224 #define YYTABLE_NINF -42
1225 static const yytype_int16 yytable[] =
1226 {
1227 93, 141, 217, 249, -13, 122, 123, 92, 124, 98,
1228 132, 26, -41, 174, 175, 189, 264, 195, 134, 116,
1229 3, 253, 221, 229, 234, 128, 129, 109, 148, 278,
1230 150, 112, 151, 152, 110, 214, 207, 212, 111, 121,
1231 121, 117, 121, 273, 113, 230, 235, 275, 210, 213,
1232 134, 279, 199, 200, -29, -29, 26, 135, 129, 145,
1233 129, 201, 202, 203, 216, 127, 190, 272, 196, 274,
1234 176, 177, 178, 179, 180, 181, 128, 129, 136, 137,
1235 138, 139, 140, 270, 271, 205, 114, 221, 282, 135,
1236 93, 93, 187, 144, 211, 211, 193, 92, 92, 98,
1237 98, 206, 283, 90, 188, 115, 194, 145, 224, 225,
1238 226, 171, 172, 173, 170, 171, 172, 173, 187, 121,
1239 218, 119, -13, -13, 227, 228, 132, 215, 209, 209,
1240 -41, -41, -13, 232, 134, 208, 208, 98, 98, 88,
1241 -41, 144, 121, 174, 175, 170, 238, 259, 90, 216,
1242 239, 240, 241, 242, 243, 244, 245, 246, 180, 181,
1243 219, 247, 248, 174, 175, 178, 179, 180, 181, 276,
1244 277, 251, 211, 258, 174, 175, 252, 193, 255, 256,
1245 257, 260, 261, 265, 90, 182, 183, 184, 90, 182,
1246 183, 184, 262, 266, 267, 268, 269, 281, 91, 284,
1247 176, 177, 178, 179, 180, 181, 209, 93, 0, 171,
1248 172, 173, 263, 208, 208, 98, 98, 174, 175, 237,
1249 0, 177, 178, 179, 180, 181, -3, 145, 145, 0,
1250 0, 0, 0, 178, 179, 180, 181, 4, 5, 0,
1251 0, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1252 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1253 25, 144, 144, 26, 27, 28, 29, 30, 31, 32,
1254 33, 34, 0, 0, 176, 177, 178, 179, 180, 181,
1255 0, 35, 0, 182, 183, 184, 0, 0, 0, 0,
1256 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
1257 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1258 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1259 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1260 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1261 84, 85, 86, 87, 0, 0, 88, 0, 0, 0,
1262 89, 0, 4, 5, 0, 90, 6, 7, 8, 9,
1263 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1264 20, 21, 22, 23, 24, 25, 0, 0, 26, 27,
1265 28, 29, 30, 31, 32, 33, 34, 0, 0, 0,
1266 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
1267 136, 137, 138, 139, 140, 0, 0, 36, 37, 38,
1268 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1269 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
1270 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1271 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
1272 79, 80, 81, 82, 83, 84, 85, 86, 87, 0,
1273 0, 88, 0, 0, 0, 89, 0, 4, 5, 0,
1274 90, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1275 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1276 25, 0, 0, 26, 27, 28, 29, 30, 31, 32,
1277 33, 34, 0, 0, 0, 0, 0, 0, 0, 0,
1278 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
1279 0, 0, 36, 37, 38, 39, 40, 41, 42, 43,
1280 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1281 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1282 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1283 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1284 84, 85, 86, 87, 0, 0, 88, 0, 0, 0,
1285 89, 0, 0, 0, 0, 90, 7, 8, 9, 10,
1286 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1287 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
1288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1289 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
1290 0, 0, 0, 0, 0, 0, 36, 37, 38, 39,
1291 40, 0, 0, 0, 0, 45, 46, 47, 48, 49,
1292 50, 51, 52, 53, 54, 55, 56, 57, 58, 146,
1293 147, 148, 149, 150, 0, 151, 152, 0, 0, 153,
1294 154, 0, 0, 73, 0, 0, 0, 0, 0, 0,
1295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1296 0, 155, 156, 0, 89, 0, 0, 0, 0, 90,
1297 0, 0, 157, 158, 159, 160, 161, 162, 163, 164,
1298 165
1299 };
1300
1301 #define yypact_value_is_default(yystate) \
1302 ((yystate) == (-208))
1303
1304 #define yytable_value_is_error(yytable_value) \
1305 YYID (0)
1306
1307 static const yytype_int16 yycheck[] =
1308 {
1309 2, 95, 8, 188, 0, 41, 42, 2, 44, 2,
1310 92, 37, 0, 64, 65, 106, 223, 108, 93, 37,
1311 0, 194, 144, 37, 37, 118, 119, 37, 5, 37,
1312 7, 59, 9, 10, 37, 128, 130, 131, 37, 41,
1313 42, 59, 44, 250, 59, 59, 59, 254, 130, 131,
1314 125, 59, 121, 122, 118, 119, 37, 93, 119, 95,
1315 119, 130, 131, 132, 128, 89, 106, 128, 108, 128,
1316 121, 122, 123, 124, 125, 126, 118, 119, 59, 60,
1317 61, 62, 63, 134, 135, 121, 37, 209, 273, 125,
1318 92, 93, 37, 95, 130, 131, 37, 92, 93, 92,
1319 93, 125, 275, 129, 106, 37, 108, 143, 144, 118,
1320 119, 56, 57, 58, 133, 56, 57, 58, 37, 121,
1321 126, 59, 118, 119, 118, 119, 208, 128, 130, 131,
1322 118, 119, 128, 59, 209, 130, 131, 130, 131, 120,
1323 128, 143, 144, 64, 65, 133, 170, 61, 129, 128,
1324 174, 175, 176, 177, 178, 179, 180, 181, 125, 126,
1325 126, 185, 186, 64, 65, 123, 124, 125, 126, 263,
1326 264, 37, 208, 209, 64, 65, 37, 37, 37, 37,
1327 37, 37, 37, 4, 129, 130, 131, 132, 129, 130,
1328 131, 132, 128, 4, 3, 3, 47, 37, 2, 134,
1329 121, 122, 123, 124, 125, 126, 208, 209, -1, 56,
1330 57, 58, 223, 208, 209, 208, 209, 64, 65, 166,
1331 -1, 122, 123, 124, 125, 126, 0, 263, 264, -1,
1332 -1, -1, -1, 123, 124, 125, 126, 11, 12, -1,
1333 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1334 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1335 34, 263, 264, 37, 38, 39, 40, 41, 42, 43,
1336 44, 45, -1, -1, 121, 122, 123, 124, 125, 126,
1337 -1, 55, -1, 130, 131, 132, -1, -1, -1, -1,
1338 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
1339 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1340 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1341 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
1342 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1343 114, 115, 116, 117, -1, -1, 120, -1, -1, -1,
1344 124, -1, 11, 12, -1, 129, 15, 16, 17, 18,
1345 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1346 29, 30, 31, 32, 33, 34, -1, -1, 37, 38,
1347 39, 40, 41, 42, 43, 44, 45, -1, -1, -1,
1348 -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
1349 59, 60, 61, 62, 63, -1, -1, 66, 67, 68,
1350 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
1351 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1352 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1353 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1354 109, 110, 111, 112, 113, 114, 115, 116, 117, -1,
1355 -1, 120, -1, -1, -1, 124, -1, 11, 12, -1,
1356 129, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1357 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1358 34, -1, -1, 37, 38, 39, 40, 41, 42, 43,
1359 44, 45, -1, -1, -1, -1, -1, -1, -1, -1,
1360 -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
1361 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
1362 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1363 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1364 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
1365 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1366 114, 115, 116, 117, -1, -1, 120, -1, -1, -1,
1367 124, -1, -1, -1, -1, 129, 16, 17, 18, 19,
1368 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1369 30, 31, 32, 33, 34, -1, -1, 37, -1, -1,
1370 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1371 -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
1372 -1, -1, -1, -1, -1, -1, 66, 67, 68, 69,
1373 70, -1, -1, -1, -1, 75, 76, 77, 78, 79,
1374 80, 81, 82, 83, 84, 85, 86, 87, 88, 3,
1375 4, 5, 6, 7, -1, 9, 10, -1, -1, 13,
1376 14, -1, -1, 103, -1, -1, -1, -1, -1, -1,
1377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1378 -1, 35, 36, -1, 124, -1, -1, -1, -1, 129,
1379 -1, -1, 46, 47, 48, 49, 50, 51, 52, 53,
1380 54
1381 };
1382
1383 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1384 symbol of state STATE-NUM. */
1385 static const yytype_uint8 yystos[] =
1386 {
1387 0, 137, 138, 0, 11, 12, 15, 16, 17, 18,
1388 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1389 29, 30, 31, 32, 33, 34, 37, 38, 39, 40,
1390 41, 42, 43, 44, 45, 55, 66, 67, 68, 69,
1391 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1392 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1393 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1394 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
1395 110, 111, 112, 113, 114, 115, 116, 117, 120, 124,
1396 129, 139, 144, 145, 148, 149, 150, 151, 155, 156,
1397 157, 167, 168, 170, 171, 172, 173, 177, 178, 37,
1398 37, 37, 59, 59, 37, 37, 37, 59, 163, 59,
1399 164, 145, 170, 170, 170, 145, 155, 167, 118, 119,
1400 140, 141, 148, 139, 168, 170, 59, 60, 61, 62,
1401 63, 142, 143, 144, 145, 170, 3, 4, 5, 6,
1402 7, 9, 10, 13, 14, 35, 36, 46, 47, 48,
1403 49, 50, 51, 52, 53, 54, 152, 153, 154, 158,
1404 133, 56, 57, 58, 64, 65, 121, 122, 123, 124,
1405 125, 126, 130, 131, 132, 165, 166, 37, 145, 165,
1406 166, 174, 175, 37, 145, 165, 166, 179, 180, 121,
1407 122, 130, 131, 132, 169, 170, 167, 142, 144, 145,
1408 148, 170, 142, 148, 128, 128, 128, 8, 126, 126,
1409 142, 143, 146, 147, 170, 118, 119, 118, 119, 37,
1410 59, 159, 59, 161, 37, 59, 162, 153, 167, 167,
1411 167, 167, 167, 167, 167, 167, 167, 167, 167, 175,
1412 176, 37, 37, 180, 181, 37, 37, 37, 170, 61,
1413 37, 37, 128, 140, 141, 4, 4, 3, 3, 47,
1414 134, 135, 128, 141, 128, 141, 142, 142, 37, 59,
1415 160, 37, 175, 180, 134
1416 };
1417
1418 #define yyerrok (yyerrstatus = 0)
1419 #define yyclearin (yychar = YYEMPTY)
1420 #define YYEMPTY (-2)
1421 #define YYEOF 0
1422
1423 #define YYACCEPT goto yyacceptlab
1424 #define YYABORT goto yyabortlab
1425 #define YYERROR goto yyerrorlab
1426
1427
1428 /* Like YYERROR except do call yyerror. This remains here temporarily
1429 to ease the transition to the new meaning of YYERROR, for GCC.
1430 Once GCC version 2 has supplanted version 1, this can go. However,
1431 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1432 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1433 discussed. */
1434
1435 #define YYFAIL goto yyerrlab
1436 #if defined YYFAIL
1437 /* This is here to suppress warnings from the GCC cpp's
1438 -Wunused-macros. Normally we don't worry about that warning, but
1439 some users do, and we want to make it easy for users to remove
1440 YYFAIL uses, which will produce warnings from Bison 2.5. */
1441 #endif
1442
1443 #define YYRECOVERING() (!!yyerrstatus)
1444
1445 #define YYBACKUP(Token, Value) \
1446 do \
1447 if (yychar == YYEMPTY && yylen == 1) \
1448 { \
1449 yychar = (Token); \
1450 yylval = (Value); \
1451 YYPOPSTACK (1); \
1452 goto yybackup; \
1453 } \
1454 else \
1455 { \
1456 yyerror (YY_("syntax error: cannot back up")); \
1457 YYERROR; \
1458 } \
1459 while (YYID (0))
1460
1461
1462 #define YYTERROR 1
1463 #define YYERRCODE 256
1464
1465
1466 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1467 If N is 0, then set CURRENT to the empty location which ends
1468 the previous symbol: RHS[0] (always defined). */
1469
1470 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1471 #ifndef YYLLOC_DEFAULT
1472 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1473 do \
1474 if (YYID (N)) \
1475 { \
1476 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1477 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1478 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1479 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1480 } \
1481 else \
1482 { \
1483 (Current).first_line = (Current).last_line = \
1484 YYRHSLOC (Rhs, 0).last_line; \
1485 (Current).first_column = (Current).last_column = \
1486 YYRHSLOC (Rhs, 0).last_column; \
1487 } \
1488 while (YYID (0))
1489 #endif
1490
1491
1492 /* This macro is provided for backward compatibility. */
1493
1494 #ifndef YY_LOCATION_PRINT
1495 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1496 #endif
1497
1498
1499 /* YYLEX -- calling `yylex' with the right arguments. */
1500
1501 #ifdef YYLEX_PARAM
1502 # define YYLEX yylex (YYLEX_PARAM)
1503 #else
1504 # define YYLEX yylex ()
1505 #endif
1506
1507 /* Enable debugging if requested. */
1508 #if YYDEBUG
1509
1510 # ifndef YYFPRINTF
1511 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1512 # define YYFPRINTF fprintf
1513 # endif
1514
1515 # define YYDPRINTF(Args) \
1516 do { \
1517 if (yydebug) \
1518 YYFPRINTF Args; \
1519 } while (YYID (0))
1520
1521 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1522 do { \
1523 if (yydebug) \
1524 { \
1525 YYFPRINTF (stderr, "%s ", Title); \
1526 yy_symbol_print (stderr, \
1527 Type, Value); \
1528 YYFPRINTF (stderr, "\n"); \
1529 } \
1530 } while (YYID (0))
1531
1532
1533 /*--------------------------------.
1534 | Print this symbol on YYOUTPUT. |
1535 `--------------------------------*/
1536
1537 /*ARGSUSED*/
1538 #if (defined __STDC__ || defined __C99__FUNC__ \
1539 || defined __cplusplus || defined _MSC_VER)
1540 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1541 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1542 #else
1543 static void
1544 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1545 FILE *yyoutput;
1546 int yytype;
1547 YYSTYPE const * const yyvaluep;
1548 #endif
1549 {
1550 if (!yyvaluep)
1551 return;
1552 # ifdef YYPRINT
1553 if (yytype < YYNTOKENS)
1554 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1555 # else
1556 YYUSE (yyoutput);
1557 # endif
1558 switch (yytype)
1559 {
1560 default:
1561 break;
1562 }
1563 }
1564
1565
1566 /*--------------------------------.
1567 | Print this symbol on YYOUTPUT. |
1568 `--------------------------------*/
1569
1570 #if (defined __STDC__ || defined __C99__FUNC__ \
1571 || defined __cplusplus || defined _MSC_VER)
1572 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1573 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1574 #else
1575 static void
1576 yy_symbol_print (yyoutput, yytype, yyvaluep)
1577 FILE *yyoutput;
1578 int yytype;
1579 YYSTYPE const * const yyvaluep;
1580 #endif
1581 {
1582 if (yytype < YYNTOKENS)
1583 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1584 else
1585 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1586
1587 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1588 YYFPRINTF (yyoutput, ")");
1589 }
1590
1591 /*------------------------------------------------------------------.
1592 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1593 | TOP (included). |
1594 `------------------------------------------------------------------*/
1595
1596 #if (defined __STDC__ || defined __C99__FUNC__ \
1597 || defined __cplusplus || defined _MSC_VER)
1598 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1599 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1600 #else
1601 static void
1602 yy_stack_print (yybottom, yytop)
1603 yytype_int16 *yybottom;
1604 yytype_int16 *yytop;
1605 #endif
1606 {
1607 YYFPRINTF (stderr, "Stack now");
1608 for (; yybottom <= yytop; yybottom++)
1609 {
1610 int yybot = *yybottom;
1611 YYFPRINTF (stderr, " %d", yybot);
1612 }
1613 YYFPRINTF (stderr, "\n");
1614 }
1615
1616 # define YY_STACK_PRINT(Bottom, Top) \
1617 do { \
1618 if (yydebug) \
1619 yy_stack_print ((Bottom), (Top)); \
1620 } while (YYID (0))
1621
1622
1623 /*------------------------------------------------.
1624 | Report that the YYRULE is going to be reduced. |
1625 `------------------------------------------------*/
1626
1627 #if (defined __STDC__ || defined __C99__FUNC__ \
1628 || defined __cplusplus || defined _MSC_VER)
1629 static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule)1630 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1631 #else
1632 static void
1633 yy_reduce_print (yyvsp, yyrule)
1634 YYSTYPE *yyvsp;
1635 int yyrule;
1636 #endif
1637 {
1638 int yynrhs = yyr2[yyrule];
1639 int yyi;
1640 unsigned long int yylno = yyrline[yyrule];
1641 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1642 yyrule - 1, yylno);
1643 /* The symbols being reduced. */
1644 for (yyi = 0; yyi < yynrhs; yyi++)
1645 {
1646 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1647 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1648 &(yyvsp[(yyi + 1) - (yynrhs)])
1649 );
1650 YYFPRINTF (stderr, "\n");
1651 }
1652 }
1653
1654 # define YY_REDUCE_PRINT(Rule) \
1655 do { \
1656 if (yydebug) \
1657 yy_reduce_print (yyvsp, Rule); \
1658 } while (YYID (0))
1659
1660 /* Nonzero means print parse trace. It is left uninitialized so that
1661 multiple parsers can coexist. */
1662 int yydebug;
1663 #else /* !YYDEBUG */
1664 # define YYDPRINTF(Args)
1665 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1666 # define YY_STACK_PRINT(Bottom, Top)
1667 # define YY_REDUCE_PRINT(Rule)
1668 #endif /* !YYDEBUG */
1669
1670
1671 /* YYINITDEPTH -- initial size of the parser's stacks. */
1672 #ifndef YYINITDEPTH
1673 # define YYINITDEPTH 200
1674 #endif
1675
1676 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1677 if the built-in stack extension method is used).
1678
1679 Do not make this value too large; the results are undefined if
1680 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1681 evaluated with infinite-precision integer arithmetic. */
1682
1683 #ifndef YYMAXDEPTH
1684 # define YYMAXDEPTH 10000
1685 #endif
1686
1687
1688 #if YYERROR_VERBOSE
1689
1690 # ifndef yystrlen
1691 # if defined __GLIBC__ && defined _STRING_H
1692 # define yystrlen strlen
1693 # else
1694 /* Return the length of YYSTR. */
1695 #if (defined __STDC__ || defined __C99__FUNC__ \
1696 || defined __cplusplus || defined _MSC_VER)
1697 static YYSIZE_T
yystrlen(const char * yystr)1698 yystrlen (const char *yystr)
1699 #else
1700 static YYSIZE_T
1701 yystrlen (yystr)
1702 const char *yystr;
1703 #endif
1704 {
1705 YYSIZE_T yylen;
1706 for (yylen = 0; yystr[yylen]; yylen++)
1707 continue;
1708 return yylen;
1709 }
1710 # endif
1711 # endif
1712
1713 # ifndef yystpcpy
1714 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1715 # define yystpcpy stpcpy
1716 # else
1717 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1718 YYDEST. */
1719 #if (defined __STDC__ || defined __C99__FUNC__ \
1720 || defined __cplusplus || defined _MSC_VER)
1721 static char *
yystpcpy(char * yydest,const char * yysrc)1722 yystpcpy (char *yydest, const char *yysrc)
1723 #else
1724 static char *
1725 yystpcpy (yydest, yysrc)
1726 char *yydest;
1727 const char *yysrc;
1728 #endif
1729 {
1730 char *yyd = yydest;
1731 const char *yys = yysrc;
1732
1733 while ((*yyd++ = *yys++) != '\0')
1734 continue;
1735
1736 return yyd - 1;
1737 }
1738 # endif
1739 # endif
1740
1741 # ifndef yytnamerr
1742 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1743 quotes and backslashes, so that it's suitable for yyerror. The
1744 heuristic is that double-quoting is unnecessary unless the string
1745 contains an apostrophe, a comma, or backslash (other than
1746 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1747 null, do not copy; instead, return the length of what the result
1748 would have been. */
1749 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1750 yytnamerr (char *yyres, const char *yystr)
1751 {
1752 if (*yystr == '"')
1753 {
1754 YYSIZE_T yyn = 0;
1755 char const *yyp = yystr;
1756
1757 for (;;)
1758 switch (*++yyp)
1759 {
1760 case '\'':
1761 case ',':
1762 goto do_not_strip_quotes;
1763
1764 case '\\':
1765 if (*++yyp != '\\')
1766 goto do_not_strip_quotes;
1767 /* Fall through. */
1768 default:
1769 if (yyres)
1770 yyres[yyn] = *yyp;
1771 yyn++;
1772 break;
1773
1774 case '"':
1775 if (yyres)
1776 yyres[yyn] = '\0';
1777 return yyn;
1778 }
1779 do_not_strip_quotes: ;
1780 }
1781
1782 if (! yyres)
1783 return yystrlen (yystr);
1784
1785 return yystpcpy (yyres, yystr) - yyres;
1786 }
1787 # endif
1788
1789 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1790 about the unexpected token YYTOKEN for the state stack whose top is
1791 YYSSP.
1792
1793 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1794 not large enough to hold the message. In that case, also set
1795 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1796 required number of bytes is too large to store. */
1797 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)1798 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1799 yytype_int16 *yyssp, int yytoken)
1800 {
1801 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1802 YYSIZE_T yysize = yysize0;
1803 YYSIZE_T yysize1;
1804 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1805 /* Internationalized format string. */
1806 const char *yyformat = 0;
1807 /* Arguments of yyformat. */
1808 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1809 /* Number of reported tokens (one for the "unexpected", one per
1810 "expected"). */
1811 int yycount = 0;
1812
1813 /* There are many possibilities here to consider:
1814 - Assume YYFAIL is not used. It's too flawed to consider. See
1815 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1816 for details. YYERROR is fine as it does not invoke this
1817 function.
1818 - If this state is a consistent state with a default action, then
1819 the only way this function was invoked is if the default action
1820 is an error action. In that case, don't check for expected
1821 tokens because there are none.
1822 - The only way there can be no lookahead present (in yychar) is if
1823 this state is a consistent state with a default action. Thus,
1824 detecting the absence of a lookahead is sufficient to determine
1825 that there is no unexpected or expected token to report. In that
1826 case, just report a simple "syntax error".
1827 - Don't assume there isn't a lookahead just because this state is a
1828 consistent state with a default action. There might have been a
1829 previous inconsistent state, consistent state with a non-default
1830 action, or user semantic action that manipulated yychar.
1831 - Of course, the expected token list depends on states to have
1832 correct lookahead information, and it depends on the parser not
1833 to perform extra reductions after fetching a lookahead from the
1834 scanner and before detecting a syntax error. Thus, state merging
1835 (from LALR or IELR) and default reductions corrupt the expected
1836 token list. However, the list is correct for canonical LR with
1837 one exception: it will still contain any token that will not be
1838 accepted due to an error action in a later state.
1839 */
1840 if (yytoken != YYEMPTY)
1841 {
1842 int yyn = yypact[*yyssp];
1843 yyarg[yycount++] = yytname[yytoken];
1844 if (!yypact_value_is_default (yyn))
1845 {
1846 /* Start YYX at -YYN if negative to avoid negative indexes in
1847 YYCHECK. In other words, skip the first -YYN actions for
1848 this state because they are default actions. */
1849 int yyxbegin = yyn < 0 ? -yyn : 0;
1850 /* Stay within bounds of both yycheck and yytname. */
1851 int yychecklim = YYLAST - yyn + 1;
1852 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1853 int yyx;
1854
1855 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1856 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1857 && !yytable_value_is_error (yytable[yyx + yyn]))
1858 {
1859 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1860 {
1861 yycount = 1;
1862 yysize = yysize0;
1863 break;
1864 }
1865 yyarg[yycount++] = yytname[yyx];
1866 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1867 if (! (yysize <= yysize1
1868 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1869 return 2;
1870 yysize = yysize1;
1871 }
1872 }
1873 }
1874
1875 switch (yycount)
1876 {
1877 # define YYCASE_(N, S) \
1878 case N: \
1879 yyformat = S; \
1880 break
1881 YYCASE_(0, YY_("syntax error"));
1882 YYCASE_(1, YY_("syntax error, unexpected %s"));
1883 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1884 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1885 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1886 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1887 # undef YYCASE_
1888 }
1889
1890 yysize1 = yysize + yystrlen (yyformat);
1891 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1892 return 2;
1893 yysize = yysize1;
1894
1895 if (*yymsg_alloc < yysize)
1896 {
1897 *yymsg_alloc = 2 * yysize;
1898 if (! (yysize <= *yymsg_alloc
1899 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1900 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1901 return 1;
1902 }
1903
1904 /* Avoid sprintf, as that infringes on the user's name space.
1905 Don't have undefined behavior even if the translation
1906 produced a string with the wrong number of "%s"s. */
1907 {
1908 char *yyp = *yymsg;
1909 int yyi = 0;
1910 while ((*yyp = *yyformat) != '\0')
1911 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1912 {
1913 yyp += yytnamerr (yyp, yyarg[yyi++]);
1914 yyformat += 2;
1915 }
1916 else
1917 {
1918 yyp++;
1919 yyformat++;
1920 }
1921 }
1922 return 0;
1923 }
1924 #endif /* YYERROR_VERBOSE */
1925
1926 /*-----------------------------------------------.
1927 | Release the memory associated to this symbol. |
1928 `-----------------------------------------------*/
1929
1930 /*ARGSUSED*/
1931 #if (defined __STDC__ || defined __C99__FUNC__ \
1932 || defined __cplusplus || defined _MSC_VER)
1933 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1934 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1935 #else
1936 static void
1937 yydestruct (yymsg, yytype, yyvaluep)
1938 const char *yymsg;
1939 int yytype;
1940 YYSTYPE *yyvaluep;
1941 #endif
1942 {
1943 YYUSE (yyvaluep);
1944
1945 if (!yymsg)
1946 yymsg = "Deleting";
1947 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1948
1949 switch (yytype)
1950 {
1951
1952 default:
1953 break;
1954 }
1955 }
1956
1957
1958 /* Prevent warnings from -Wmissing-prototypes. */
1959 #ifdef YYPARSE_PARAM
1960 #if defined __STDC__ || defined __cplusplus
1961 int yyparse (void *YYPARSE_PARAM);
1962 #else
1963 int yyparse ();
1964 #endif
1965 #else /* ! YYPARSE_PARAM */
1966 #if defined __STDC__ || defined __cplusplus
1967 int yyparse (void);
1968 #else
1969 int yyparse ();
1970 #endif
1971 #endif /* ! YYPARSE_PARAM */
1972
1973
1974 /* The lookahead symbol. */
1975 int yychar;
1976
1977 /* The semantic value of the lookahead symbol. */
1978 YYSTYPE yylval;
1979
1980 /* Number of syntax errors so far. */
1981 int yynerrs;
1982
1983
1984 /*----------.
1985 | yyparse. |
1986 `----------*/
1987
1988 #ifdef YYPARSE_PARAM
1989 #if (defined __STDC__ || defined __C99__FUNC__ \
1990 || defined __cplusplus || defined _MSC_VER)
1991 int
yyparse(void * YYPARSE_PARAM)1992 yyparse (void *YYPARSE_PARAM)
1993 #else
1994 int
1995 yyparse (YYPARSE_PARAM)
1996 void *YYPARSE_PARAM;
1997 #endif
1998 #else /* ! YYPARSE_PARAM */
1999 #if (defined __STDC__ || defined __C99__FUNC__ \
2000 || defined __cplusplus || defined _MSC_VER)
2001 int
2002 yyparse (void)
2003 #else
2004 int
2005 yyparse ()
2006
2007 #endif
2008 #endif
2009 {
2010 int yystate;
2011 /* Number of tokens to shift before error messages enabled. */
2012 int yyerrstatus;
2013
2014 /* The stacks and their tools:
2015 `yyss': related to states.
2016 `yyvs': related to semantic values.
2017
2018 Refer to the stacks thru separate pointers, to allow yyoverflow
2019 to reallocate them elsewhere. */
2020
2021 /* The state stack. */
2022 yytype_int16 yyssa[YYINITDEPTH];
2023 yytype_int16 *yyss;
2024 yytype_int16 *yyssp;
2025
2026 /* The semantic value stack. */
2027 YYSTYPE yyvsa[YYINITDEPTH];
2028 YYSTYPE *yyvs;
2029 YYSTYPE *yyvsp;
2030
2031 YYSIZE_T yystacksize;
2032
2033 int yyn;
2034 int yyresult;
2035 /* Lookahead token as an internal (translated) token number. */
2036 int yytoken;
2037 /* The variables used to return semantic value and location from the
2038 action routines. */
2039 YYSTYPE yyval;
2040
2041 #if YYERROR_VERBOSE
2042 /* Buffer for error messages, and its allocated size. */
2043 char yymsgbuf[128];
2044 char *yymsg = yymsgbuf;
2045 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2046 #endif
2047
2048 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2049
2050 /* The number of symbols on the RHS of the reduced rule.
2051 Keep to zero when no symbol should be popped. */
2052 int yylen = 0;
2053
2054 yytoken = 0;
2055 yyss = yyssa;
2056 yyvs = yyvsa;
2057 yystacksize = YYINITDEPTH;
2058
2059 YYDPRINTF ((stderr, "Starting parse\n"));
2060
2061 yystate = 0;
2062 yyerrstatus = 0;
2063 yynerrs = 0;
2064 yychar = YYEMPTY; /* Cause a token to be read. */
2065
2066 /* Initialize stack pointers.
2067 Waste one element of value and location stack
2068 so that they stay on the same level as the state stack.
2069 The wasted elements are never initialized. */
2070 yyssp = yyss;
2071 yyvsp = yyvs;
2072
2073 goto yysetstate;
2074
2075 /*------------------------------------------------------------.
2076 | yynewstate -- Push a new state, which is found in yystate. |
2077 `------------------------------------------------------------*/
2078 yynewstate:
2079 /* In all cases, when you get here, the value and location stacks
2080 have just been pushed. So pushing a state here evens the stacks. */
2081 yyssp++;
2082
2083 yysetstate:
2084 *yyssp = yystate;
2085
2086 if (yyss + yystacksize - 1 <= yyssp)
2087 {
2088 /* Get the current used size of the three stacks, in elements. */
2089 YYSIZE_T yysize = yyssp - yyss + 1;
2090
2091 #ifdef yyoverflow
2092 {
2093 /* Give user a chance to reallocate the stack. Use copies of
2094 these so that the &'s don't force the real ones into
2095 memory. */
2096 YYSTYPE *yyvs1 = yyvs;
2097 yytype_int16 *yyss1 = yyss;
2098
2099 /* Each stack pointer address is followed by the size of the
2100 data in use in that stack, in bytes. This used to be a
2101 conditional around just the two extra args, but that might
2102 be undefined if yyoverflow is a macro. */
2103 yyoverflow (YY_("memory exhausted"),
2104 &yyss1, yysize * sizeof (*yyssp),
2105 &yyvs1, yysize * sizeof (*yyvsp),
2106 &yystacksize);
2107
2108 yyss = yyss1;
2109 yyvs = yyvs1;
2110 }
2111 #else /* no yyoverflow */
2112 # ifndef YYSTACK_RELOCATE
2113 goto yyexhaustedlab;
2114 # else
2115 /* Extend the stack our own way. */
2116 if (YYMAXDEPTH <= yystacksize)
2117 goto yyexhaustedlab;
2118 yystacksize *= 2;
2119 if (YYMAXDEPTH < yystacksize)
2120 yystacksize = YYMAXDEPTH;
2121
2122 {
2123 yytype_int16 *yyss1 = yyss;
2124 union yyalloc *yyptr =
2125 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2126 if (! yyptr)
2127 goto yyexhaustedlab;
2128 YYSTACK_RELOCATE (yyss_alloc, yyss);
2129 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2130 # undef YYSTACK_RELOCATE
2131 if (yyss1 != yyssa)
2132 YYSTACK_FREE (yyss1);
2133 }
2134 # endif
2135 #endif /* no yyoverflow */
2136
2137 yyssp = yyss + yysize - 1;
2138 yyvsp = yyvs + yysize - 1;
2139
2140 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2141 (unsigned long int) yystacksize));
2142
2143 if (yyss + yystacksize - 1 <= yyssp)
2144 YYABORT;
2145 }
2146
2147 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2148
2149 if (yystate == YYFINAL)
2150 YYACCEPT;
2151
2152 goto yybackup;
2153
2154 /*-----------.
2155 | yybackup. |
2156 `-----------*/
2157 yybackup:
2158
2159 /* Do appropriate processing given the current state. Read a
2160 lookahead token if we need one and don't already have one. */
2161
2162 /* First try to decide what to do without reference to lookahead token. */
2163 yyn = yypact[yystate];
2164 if (yypact_value_is_default (yyn))
2165 goto yydefault;
2166
2167 /* Not known => get a lookahead token if don't already have one. */
2168
2169 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2170 if (yychar == YYEMPTY)
2171 {
2172 YYDPRINTF ((stderr, "Reading a token: "));
2173 yychar = YYLEX;
2174 }
2175
2176 if (yychar <= YYEOF)
2177 {
2178 yychar = yytoken = YYEOF;
2179 YYDPRINTF ((stderr, "Now at end of input.\n"));
2180 }
2181 else
2182 {
2183 yytoken = YYTRANSLATE (yychar);
2184 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2185 }
2186
2187 /* If the proper action on seeing token YYTOKEN is to reduce or to
2188 detect an error, take that action. */
2189 yyn += yytoken;
2190 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2191 goto yydefault;
2192 yyn = yytable[yyn];
2193 if (yyn <= 0)
2194 {
2195 if (yytable_value_is_error (yyn))
2196 goto yyerrlab;
2197 yyn = -yyn;
2198 goto yyreduce;
2199 }
2200
2201 /* Count tokens shifted since error; after three, turn off error
2202 status. */
2203 if (yyerrstatus)
2204 yyerrstatus--;
2205
2206 /* Shift the lookahead token. */
2207 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2208
2209 /* Discard the shifted token. */
2210 yychar = YYEMPTY;
2211
2212 yystate = yyn;
2213 *++yyvsp = yylval;
2214
2215 goto yynewstate;
2216
2217
2218 /*-----------------------------------------------------------.
2219 | yydefault -- do the default action for the current state. |
2220 `-----------------------------------------------------------*/
2221 yydefault:
2222 yyn = yydefact[yystate];
2223 if (yyn == 0)
2224 goto yyerrlab;
2225 goto yyreduce;
2226
2227
2228 /*-----------------------------.
2229 | yyreduce -- Do a reduction. |
2230 `-----------------------------*/
2231 yyreduce:
2232 /* yyn is the number of a rule to reduce with. */
2233 yylen = yyr2[yyn];
2234
2235 /* If YYLEN is nonzero, implement the default value of the action:
2236 `$$ = $1'.
2237
2238 Otherwise, the following line sets YYVAL to garbage.
2239 This behavior is undocumented and Bison
2240 users should not rely upon it. Assigning to YYVAL
2241 unconditionally makes the parser a bit smaller, and it avoids a
2242 GCC warning that YYVAL may be used uninitialized. */
2243 yyval = yyvsp[1-yylen];
2244
2245
2246 YY_REDUCE_PRINT (yyn);
2247 switch (yyn)
2248 {
2249 case 2:
2250
2251 /* Line 1806 of yacc.c */
2252 #line 317 "grammar.y"
2253 {
2254 finish_parse((yyvsp[(2) - (2)].blk).b);
2255 }
2256 break;
2257
2258 case 4:
2259
2260 /* Line 1806 of yacc.c */
2261 #line 322 "grammar.y"
2262 { (yyval.blk).q = qerr; }
2263 break;
2264
2265 case 6:
2266
2267 /* Line 1806 of yacc.c */
2268 #line 325 "grammar.y"
2269 { gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2270 break;
2271
2272 case 7:
2273
2274 /* Line 1806 of yacc.c */
2275 #line 326 "grammar.y"
2276 { gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2277 break;
2278
2279 case 8:
2280
2281 /* Line 1806 of yacc.c */
2282 #line 327 "grammar.y"
2283 { gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2284 break;
2285
2286 case 9:
2287
2288 /* Line 1806 of yacc.c */
2289 #line 328 "grammar.y"
2290 { gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2291 break;
2292
2293 case 10:
2294
2295 /* Line 1806 of yacc.c */
2296 #line 330 "grammar.y"
2297 { (yyval.blk) = (yyvsp[(0) - (1)].blk); }
2298 break;
2299
2300 case 11:
2301
2302 /* Line 1806 of yacc.c */
2303 #line 332 "grammar.y"
2304 { (yyval.blk) = (yyvsp[(0) - (1)].blk); }
2305 break;
2306
2307 case 13:
2308
2309 /* Line 1806 of yacc.c */
2310 #line 335 "grammar.y"
2311 { (yyval.blk).b = gen_ncode(NULL, (bpf_u_int32)(yyvsp[(1) - (1)].i),
2312 (yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
2313 break;
2314
2315 case 14:
2316
2317 /* Line 1806 of yacc.c */
2318 #line 337 "grammar.y"
2319 { (yyval.blk) = (yyvsp[(2) - (3)].blk); }
2320 break;
2321
2322 case 15:
2323
2324 /* Line 1806 of yacc.c */
2325 #line 339 "grammar.y"
2326 { (yyval.blk).b = gen_scode((yyvsp[(1) - (1)].s), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
2327 break;
2328
2329 case 16:
2330
2331 /* Line 1806 of yacc.c */
2332 #line 340 "grammar.y"
2333 { (yyval.blk).b = gen_mcode((yyvsp[(1) - (3)].s), NULL, (yyvsp[(3) - (3)].i),
2334 (yyval.blk).q = (yyvsp[(0) - (3)].blk).q); }
2335 break;
2336
2337 case 17:
2338
2339 /* Line 1806 of yacc.c */
2340 #line 342 "grammar.y"
2341 { (yyval.blk).b = gen_mcode((yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].s), 0,
2342 (yyval.blk).q = (yyvsp[(0) - (3)].blk).q); }
2343 break;
2344
2345 case 18:
2346
2347 /* Line 1806 of yacc.c */
2348 #line 344 "grammar.y"
2349 {
2350 /* Decide how to parse HID based on proto */
2351 (yyval.blk).q = (yyvsp[(0) - (1)].blk).q;
2352 if ((yyval.blk).q.addr == Q_PORT)
2353 bpf_error("'port' modifier applied to ip host");
2354 else if ((yyval.blk).q.addr == Q_PORTRANGE)
2355 bpf_error("'portrange' modifier applied to ip host");
2356 else if ((yyval.blk).q.addr == Q_PROTO)
2357 bpf_error("'proto' modifier applied to ip host");
2358 else if ((yyval.blk).q.addr == Q_PROTOCHAIN)
2359 bpf_error("'protochain' modifier applied to ip host");
2360 (yyval.blk).b = gen_ncode((yyvsp[(1) - (1)].s), 0, (yyval.blk).q);
2361 }
2362 break;
2363
2364 case 19:
2365
2366 /* Line 1806 of yacc.c */
2367 #line 357 "grammar.y"
2368 {
2369 #ifdef INET6
2370 (yyval.blk).b = gen_mcode6((yyvsp[(1) - (3)].s), NULL, (yyvsp[(3) - (3)].i),
2371 (yyval.blk).q = (yyvsp[(0) - (3)].blk).q);
2372 #else
2373 bpf_error("'ip6addr/prefixlen' not supported "
2374 "in this configuration");
2375 #endif /*INET6*/
2376 }
2377 break;
2378
2379 case 20:
2380
2381 /* Line 1806 of yacc.c */
2382 #line 366 "grammar.y"
2383 {
2384 #ifdef INET6
2385 (yyval.blk).b = gen_mcode6((yyvsp[(1) - (1)].s), 0, 128,
2386 (yyval.blk).q = (yyvsp[(0) - (1)].blk).q);
2387 #else
2388 bpf_error("'ip6addr' not supported "
2389 "in this configuration");
2390 #endif /*INET6*/
2391 }
2392 break;
2393
2394 case 21:
2395
2396 /* Line 1806 of yacc.c */
2397 #line 375 "grammar.y"
2398 {
2399 (yyval.blk).b = gen_ecode((yyvsp[(1) - (1)].e), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q);
2400 /*
2401 * $1 was allocated by "pcap_ether_aton()",
2402 * so we must free it now that we're done
2403 * with it.
2404 */
2405 free((yyvsp[(1) - (1)].e));
2406 }
2407 break;
2408
2409 case 22:
2410
2411 /* Line 1806 of yacc.c */
2412 #line 384 "grammar.y"
2413 {
2414 (yyval.blk).b = gen_acode((yyvsp[(1) - (1)].e), (yyval.blk).q = (yyvsp[(0) - (1)].blk).q);
2415 /*
2416 * $1 was allocated by "pcap_ether_aton()",
2417 * so we must free it now that we're done
2418 * with it.
2419 */
2420 free((yyvsp[(1) - (1)].e));
2421 }
2422 break;
2423
2424 case 23:
2425
2426 /* Line 1806 of yacc.c */
2427 #line 393 "grammar.y"
2428 { gen_not((yyvsp[(2) - (2)].blk).b); (yyval.blk) = (yyvsp[(2) - (2)].blk); }
2429 break;
2430
2431 case 24:
2432
2433 /* Line 1806 of yacc.c */
2434 #line 395 "grammar.y"
2435 { (yyval.blk) = (yyvsp[(0) - (1)].blk); }
2436 break;
2437
2438 case 25:
2439
2440 /* Line 1806 of yacc.c */
2441 #line 397 "grammar.y"
2442 { (yyval.blk) = (yyvsp[(0) - (1)].blk); }
2443 break;
2444
2445 case 27:
2446
2447 /* Line 1806 of yacc.c */
2448 #line 400 "grammar.y"
2449 { gen_and((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2450 break;
2451
2452 case 28:
2453
2454 /* Line 1806 of yacc.c */
2455 #line 401 "grammar.y"
2456 { gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
2457 break;
2458
2459 case 29:
2460
2461 /* Line 1806 of yacc.c */
2462 #line 403 "grammar.y"
2463 { (yyval.blk).b = gen_ncode(NULL, (bpf_u_int32)(yyvsp[(1) - (1)].i),
2464 (yyval.blk).q = (yyvsp[(0) - (1)].blk).q); }
2465 break;
2466
2467 case 32:
2468
2469 /* Line 1806 of yacc.c */
2470 #line 408 "grammar.y"
2471 { gen_not((yyvsp[(2) - (2)].blk).b); (yyval.blk) = (yyvsp[(2) - (2)].blk); }
2472 break;
2473
2474 case 33:
2475
2476 /* Line 1806 of yacc.c */
2477 #line 410 "grammar.y"
2478 { QSET((yyval.blk).q, (yyvsp[(1) - (3)].i), (yyvsp[(2) - (3)].i), (yyvsp[(3) - (3)].i)); }
2479 break;
2480
2481 case 34:
2482
2483 /* Line 1806 of yacc.c */
2484 #line 411 "grammar.y"
2485 { QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), (yyvsp[(2) - (2)].i), Q_DEFAULT); }
2486 break;
2487
2488 case 35:
2489
2490 /* Line 1806 of yacc.c */
2491 #line 412 "grammar.y"
2492 { QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, (yyvsp[(2) - (2)].i)); }
2493 break;
2494
2495 case 36:
2496
2497 /* Line 1806 of yacc.c */
2498 #line 413 "grammar.y"
2499 { QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, Q_PROTO); }
2500 break;
2501
2502 case 37:
2503
2504 /* Line 1806 of yacc.c */
2505 #line 414 "grammar.y"
2506 { QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, Q_PROTOCHAIN); }
2507 break;
2508
2509 case 38:
2510
2511 /* Line 1806 of yacc.c */
2512 #line 415 "grammar.y"
2513 { QSET((yyval.blk).q, (yyvsp[(1) - (2)].i), Q_DEFAULT, (yyvsp[(2) - (2)].i)); }
2514 break;
2515
2516 case 39:
2517
2518 /* Line 1806 of yacc.c */
2519 #line 417 "grammar.y"
2520 { (yyval.blk) = (yyvsp[(2) - (2)].blk); }
2521 break;
2522
2523 case 40:
2524
2525 /* Line 1806 of yacc.c */
2526 #line 418 "grammar.y"
2527 { (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = (yyvsp[(1) - (3)].blk).q; }
2528 break;
2529
2530 case 41:
2531
2532 /* Line 1806 of yacc.c */
2533 #line 419 "grammar.y"
2534 { (yyval.blk).b = gen_proto_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
2535 break;
2536
2537 case 42:
2538
2539 /* Line 1806 of yacc.c */
2540 #line 420 "grammar.y"
2541 { (yyval.blk).b = gen_relation((yyvsp[(2) - (3)].i), (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a), 0);
2542 (yyval.blk).q = qerr; }
2543 break;
2544
2545 case 43:
2546
2547 /* Line 1806 of yacc.c */
2548 #line 422 "grammar.y"
2549 { (yyval.blk).b = gen_relation((yyvsp[(2) - (3)].i), (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a), 1);
2550 (yyval.blk).q = qerr; }
2551 break;
2552
2553 case 44:
2554
2555 /* Line 1806 of yacc.c */
2556 #line 424 "grammar.y"
2557 { (yyval.blk).b = (yyvsp[(1) - (1)].rblk); (yyval.blk).q = qerr; }
2558 break;
2559
2560 case 45:
2561
2562 /* Line 1806 of yacc.c */
2563 #line 425 "grammar.y"
2564 { (yyval.blk).b = gen_atmtype_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
2565 break;
2566
2567 case 46:
2568
2569 /* Line 1806 of yacc.c */
2570 #line 426 "grammar.y"
2571 { (yyval.blk).b = gen_atmmulti_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
2572 break;
2573
2574 case 47:
2575
2576 /* Line 1806 of yacc.c */
2577 #line 427 "grammar.y"
2578 { (yyval.blk).b = (yyvsp[(2) - (2)].blk).b; (yyval.blk).q = qerr; }
2579 break;
2580
2581 case 48:
2582
2583 /* Line 1806 of yacc.c */
2584 #line 428 "grammar.y"
2585 { (yyval.blk).b = gen_mtp2type_abbrev((yyvsp[(1) - (1)].i)); (yyval.blk).q = qerr; }
2586 break;
2587
2588 case 49:
2589
2590 /* Line 1806 of yacc.c */
2591 #line 429 "grammar.y"
2592 { (yyval.blk).b = (yyvsp[(2) - (2)].blk).b; (yyval.blk).q = qerr; }
2593 break;
2594
2595 case 51:
2596
2597 /* Line 1806 of yacc.c */
2598 #line 433 "grammar.y"
2599 { (yyval.i) = Q_DEFAULT; }
2600 break;
2601
2602 case 52:
2603
2604 /* Line 1806 of yacc.c */
2605 #line 436 "grammar.y"
2606 { (yyval.i) = Q_SRC; }
2607 break;
2608
2609 case 53:
2610
2611 /* Line 1806 of yacc.c */
2612 #line 437 "grammar.y"
2613 { (yyval.i) = Q_DST; }
2614 break;
2615
2616 case 54:
2617
2618 /* Line 1806 of yacc.c */
2619 #line 438 "grammar.y"
2620 { (yyval.i) = Q_OR; }
2621 break;
2622
2623 case 55:
2624
2625 /* Line 1806 of yacc.c */
2626 #line 439 "grammar.y"
2627 { (yyval.i) = Q_OR; }
2628 break;
2629
2630 case 56:
2631
2632 /* Line 1806 of yacc.c */
2633 #line 440 "grammar.y"
2634 { (yyval.i) = Q_AND; }
2635 break;
2636
2637 case 57:
2638
2639 /* Line 1806 of yacc.c */
2640 #line 441 "grammar.y"
2641 { (yyval.i) = Q_AND; }
2642 break;
2643
2644 case 58:
2645
2646 /* Line 1806 of yacc.c */
2647 #line 442 "grammar.y"
2648 { (yyval.i) = Q_ADDR1; }
2649 break;
2650
2651 case 59:
2652
2653 /* Line 1806 of yacc.c */
2654 #line 443 "grammar.y"
2655 { (yyval.i) = Q_ADDR2; }
2656 break;
2657
2658 case 60:
2659
2660 /* Line 1806 of yacc.c */
2661 #line 444 "grammar.y"
2662 { (yyval.i) = Q_ADDR3; }
2663 break;
2664
2665 case 61:
2666
2667 /* Line 1806 of yacc.c */
2668 #line 445 "grammar.y"
2669 { (yyval.i) = Q_ADDR4; }
2670 break;
2671
2672 case 62:
2673
2674 /* Line 1806 of yacc.c */
2675 #line 446 "grammar.y"
2676 { (yyval.i) = Q_RA; }
2677 break;
2678
2679 case 63:
2680
2681 /* Line 1806 of yacc.c */
2682 #line 447 "grammar.y"
2683 { (yyval.i) = Q_TA; }
2684 break;
2685
2686 case 64:
2687
2688 /* Line 1806 of yacc.c */
2689 #line 450 "grammar.y"
2690 { (yyval.i) = Q_HOST; }
2691 break;
2692
2693 case 65:
2694
2695 /* Line 1806 of yacc.c */
2696 #line 451 "grammar.y"
2697 { (yyval.i) = Q_NET; }
2698 break;
2699
2700 case 66:
2701
2702 /* Line 1806 of yacc.c */
2703 #line 452 "grammar.y"
2704 { (yyval.i) = Q_PORT; }
2705 break;
2706
2707 case 67:
2708
2709 /* Line 1806 of yacc.c */
2710 #line 453 "grammar.y"
2711 { (yyval.i) = Q_PORTRANGE; }
2712 break;
2713
2714 case 68:
2715
2716 /* Line 1806 of yacc.c */
2717 #line 456 "grammar.y"
2718 { (yyval.i) = Q_GATEWAY; }
2719 break;
2720
2721 case 69:
2722
2723 /* Line 1806 of yacc.c */
2724 #line 458 "grammar.y"
2725 { (yyval.i) = Q_LINK; }
2726 break;
2727
2728 case 70:
2729
2730 /* Line 1806 of yacc.c */
2731 #line 459 "grammar.y"
2732 { (yyval.i) = Q_IP; }
2733 break;
2734
2735 case 71:
2736
2737 /* Line 1806 of yacc.c */
2738 #line 460 "grammar.y"
2739 { (yyval.i) = Q_ARP; }
2740 break;
2741
2742 case 72:
2743
2744 /* Line 1806 of yacc.c */
2745 #line 461 "grammar.y"
2746 { (yyval.i) = Q_RARP; }
2747 break;
2748
2749 case 73:
2750
2751 /* Line 1806 of yacc.c */
2752 #line 462 "grammar.y"
2753 { (yyval.i) = Q_SCTP; }
2754 break;
2755
2756 case 74:
2757
2758 /* Line 1806 of yacc.c */
2759 #line 463 "grammar.y"
2760 { (yyval.i) = Q_TCP; }
2761 break;
2762
2763 case 75:
2764
2765 /* Line 1806 of yacc.c */
2766 #line 464 "grammar.y"
2767 { (yyval.i) = Q_UDP; }
2768 break;
2769
2770 case 76:
2771
2772 /* Line 1806 of yacc.c */
2773 #line 465 "grammar.y"
2774 { (yyval.i) = Q_ICMP; }
2775 break;
2776
2777 case 77:
2778
2779 /* Line 1806 of yacc.c */
2780 #line 466 "grammar.y"
2781 { (yyval.i) = Q_IGMP; }
2782 break;
2783
2784 case 78:
2785
2786 /* Line 1806 of yacc.c */
2787 #line 467 "grammar.y"
2788 { (yyval.i) = Q_IGRP; }
2789 break;
2790
2791 case 79:
2792
2793 /* Line 1806 of yacc.c */
2794 #line 468 "grammar.y"
2795 { (yyval.i) = Q_PIM; }
2796 break;
2797
2798 case 80:
2799
2800 /* Line 1806 of yacc.c */
2801 #line 469 "grammar.y"
2802 { (yyval.i) = Q_VRRP; }
2803 break;
2804
2805 case 81:
2806
2807 /* Line 1806 of yacc.c */
2808 #line 470 "grammar.y"
2809 { (yyval.i) = Q_CARP; }
2810 break;
2811
2812 case 82:
2813
2814 /* Line 1806 of yacc.c */
2815 #line 471 "grammar.y"
2816 { (yyval.i) = Q_ATALK; }
2817 break;
2818
2819 case 83:
2820
2821 /* Line 1806 of yacc.c */
2822 #line 472 "grammar.y"
2823 { (yyval.i) = Q_AARP; }
2824 break;
2825
2826 case 84:
2827
2828 /* Line 1806 of yacc.c */
2829 #line 473 "grammar.y"
2830 { (yyval.i) = Q_DECNET; }
2831 break;
2832
2833 case 85:
2834
2835 /* Line 1806 of yacc.c */
2836 #line 474 "grammar.y"
2837 { (yyval.i) = Q_LAT; }
2838 break;
2839
2840 case 86:
2841
2842 /* Line 1806 of yacc.c */
2843 #line 475 "grammar.y"
2844 { (yyval.i) = Q_SCA; }
2845 break;
2846
2847 case 87:
2848
2849 /* Line 1806 of yacc.c */
2850 #line 476 "grammar.y"
2851 { (yyval.i) = Q_MOPDL; }
2852 break;
2853
2854 case 88:
2855
2856 /* Line 1806 of yacc.c */
2857 #line 477 "grammar.y"
2858 { (yyval.i) = Q_MOPRC; }
2859 break;
2860
2861 case 89:
2862
2863 /* Line 1806 of yacc.c */
2864 #line 478 "grammar.y"
2865 { (yyval.i) = Q_IPV6; }
2866 break;
2867
2868 case 90:
2869
2870 /* Line 1806 of yacc.c */
2871 #line 479 "grammar.y"
2872 { (yyval.i) = Q_ICMPV6; }
2873 break;
2874
2875 case 91:
2876
2877 /* Line 1806 of yacc.c */
2878 #line 480 "grammar.y"
2879 { (yyval.i) = Q_AH; }
2880 break;
2881
2882 case 92:
2883
2884 /* Line 1806 of yacc.c */
2885 #line 481 "grammar.y"
2886 { (yyval.i) = Q_ESP; }
2887 break;
2888
2889 case 93:
2890
2891 /* Line 1806 of yacc.c */
2892 #line 482 "grammar.y"
2893 { (yyval.i) = Q_ISO; }
2894 break;
2895
2896 case 94:
2897
2898 /* Line 1806 of yacc.c */
2899 #line 483 "grammar.y"
2900 { (yyval.i) = Q_ESIS; }
2901 break;
2902
2903 case 95:
2904
2905 /* Line 1806 of yacc.c */
2906 #line 484 "grammar.y"
2907 { (yyval.i) = Q_ISIS; }
2908 break;
2909
2910 case 96:
2911
2912 /* Line 1806 of yacc.c */
2913 #line 485 "grammar.y"
2914 { (yyval.i) = Q_ISIS_L1; }
2915 break;
2916
2917 case 97:
2918
2919 /* Line 1806 of yacc.c */
2920 #line 486 "grammar.y"
2921 { (yyval.i) = Q_ISIS_L2; }
2922 break;
2923
2924 case 98:
2925
2926 /* Line 1806 of yacc.c */
2927 #line 487 "grammar.y"
2928 { (yyval.i) = Q_ISIS_IIH; }
2929 break;
2930
2931 case 99:
2932
2933 /* Line 1806 of yacc.c */
2934 #line 488 "grammar.y"
2935 { (yyval.i) = Q_ISIS_LSP; }
2936 break;
2937
2938 case 100:
2939
2940 /* Line 1806 of yacc.c */
2941 #line 489 "grammar.y"
2942 { (yyval.i) = Q_ISIS_SNP; }
2943 break;
2944
2945 case 101:
2946
2947 /* Line 1806 of yacc.c */
2948 #line 490 "grammar.y"
2949 { (yyval.i) = Q_ISIS_PSNP; }
2950 break;
2951
2952 case 102:
2953
2954 /* Line 1806 of yacc.c */
2955 #line 491 "grammar.y"
2956 { (yyval.i) = Q_ISIS_CSNP; }
2957 break;
2958
2959 case 103:
2960
2961 /* Line 1806 of yacc.c */
2962 #line 492 "grammar.y"
2963 { (yyval.i) = Q_CLNP; }
2964 break;
2965
2966 case 104:
2967
2968 /* Line 1806 of yacc.c */
2969 #line 493 "grammar.y"
2970 { (yyval.i) = Q_STP; }
2971 break;
2972
2973 case 105:
2974
2975 /* Line 1806 of yacc.c */
2976 #line 494 "grammar.y"
2977 { (yyval.i) = Q_IPX; }
2978 break;
2979
2980 case 106:
2981
2982 /* Line 1806 of yacc.c */
2983 #line 495 "grammar.y"
2984 { (yyval.i) = Q_NETBEUI; }
2985 break;
2986
2987 case 107:
2988
2989 /* Line 1806 of yacc.c */
2990 #line 496 "grammar.y"
2991 { (yyval.i) = Q_RADIO; }
2992 break;
2993
2994 case 108:
2995
2996 /* Line 1806 of yacc.c */
2997 #line 498 "grammar.y"
2998 { (yyval.rblk) = gen_broadcast((yyvsp[(1) - (2)].i)); }
2999 break;
3000
3001 case 109:
3002
3003 /* Line 1806 of yacc.c */
3004 #line 499 "grammar.y"
3005 { (yyval.rblk) = gen_multicast((yyvsp[(1) - (2)].i)); }
3006 break;
3007
3008 case 110:
3009
3010 /* Line 1806 of yacc.c */
3011 #line 500 "grammar.y"
3012 { (yyval.rblk) = gen_less((yyvsp[(2) - (2)].i)); }
3013 break;
3014
3015 case 111:
3016
3017 /* Line 1806 of yacc.c */
3018 #line 501 "grammar.y"
3019 { (yyval.rblk) = gen_greater((yyvsp[(2) - (2)].i)); }
3020 break;
3021
3022 case 112:
3023
3024 /* Line 1806 of yacc.c */
3025 #line 502 "grammar.y"
3026 { (yyval.rblk) = gen_byteop((yyvsp[(3) - (4)].i), (yyvsp[(2) - (4)].i), (yyvsp[(4) - (4)].i)); }
3027 break;
3028
3029 case 113:
3030
3031 /* Line 1806 of yacc.c */
3032 #line 503 "grammar.y"
3033 { (yyval.rblk) = gen_inbound(0); }
3034 break;
3035
3036 case 114:
3037
3038 /* Line 1806 of yacc.c */
3039 #line 504 "grammar.y"
3040 { (yyval.rblk) = gen_inbound(1); }
3041 break;
3042
3043 case 115:
3044
3045 /* Line 1806 of yacc.c */
3046 #line 505 "grammar.y"
3047 { (yyval.rblk) = gen_vlan((yyvsp[(2) - (2)].i)); }
3048 break;
3049
3050 case 116:
3051
3052 /* Line 1806 of yacc.c */
3053 #line 506 "grammar.y"
3054 { (yyval.rblk) = gen_vlan(-1); }
3055 break;
3056
3057 case 117:
3058
3059 /* Line 1806 of yacc.c */
3060 #line 507 "grammar.y"
3061 { (yyval.rblk) = gen_mpls((yyvsp[(2) - (2)].i)); }
3062 break;
3063
3064 case 118:
3065
3066 /* Line 1806 of yacc.c */
3067 #line 508 "grammar.y"
3068 { (yyval.rblk) = gen_mpls(-1); }
3069 break;
3070
3071 case 119:
3072
3073 /* Line 1806 of yacc.c */
3074 #line 509 "grammar.y"
3075 { (yyval.rblk) = gen_pppoed(); }
3076 break;
3077
3078 case 120:
3079
3080 /* Line 1806 of yacc.c */
3081 #line 510 "grammar.y"
3082 { (yyval.rblk) = gen_pppoes((yyvsp[(2) - (2)].i)); }
3083 break;
3084
3085 case 121:
3086
3087 /* Line 1806 of yacc.c */
3088 #line 511 "grammar.y"
3089 { (yyval.rblk) = gen_pppoes(-1); }
3090 break;
3091
3092 case 122:
3093
3094 /* Line 1806 of yacc.c */
3095 #line 512 "grammar.y"
3096 { (yyval.rblk) = (yyvsp[(1) - (1)].rblk); }
3097 break;
3098
3099 case 123:
3100
3101 /* Line 1806 of yacc.c */
3102 #line 513 "grammar.y"
3103 { (yyval.rblk) = (yyvsp[(2) - (2)].rblk); }
3104 break;
3105
3106 case 124:
3107
3108 /* Line 1806 of yacc.c */
3109 #line 516 "grammar.y"
3110 { (yyval.rblk) = gen_pf_ifname((yyvsp[(2) - (2)].s)); }
3111 break;
3112
3113 case 125:
3114
3115 /* Line 1806 of yacc.c */
3116 #line 517 "grammar.y"
3117 { (yyval.rblk) = gen_pf_ruleset((yyvsp[(2) - (2)].s)); }
3118 break;
3119
3120 case 126:
3121
3122 /* Line 1806 of yacc.c */
3123 #line 518 "grammar.y"
3124 { (yyval.rblk) = gen_pf_rnr((yyvsp[(2) - (2)].i)); }
3125 break;
3126
3127 case 127:
3128
3129 /* Line 1806 of yacc.c */
3130 #line 519 "grammar.y"
3131 { (yyval.rblk) = gen_pf_srnr((yyvsp[(2) - (2)].i)); }
3132 break;
3133
3134 case 128:
3135
3136 /* Line 1806 of yacc.c */
3137 #line 520 "grammar.y"
3138 { (yyval.rblk) = gen_pf_reason((yyvsp[(2) - (2)].i)); }
3139 break;
3140
3141 case 129:
3142
3143 /* Line 1806 of yacc.c */
3144 #line 521 "grammar.y"
3145 { (yyval.rblk) = gen_pf_action((yyvsp[(2) - (2)].i)); }
3146 break;
3147
3148 case 130:
3149
3150 /* Line 1806 of yacc.c */
3151 #line 525 "grammar.y"
3152 { (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (4)].i) | (yyvsp[(4) - (4)].i),
3153 IEEE80211_FC0_TYPE_MASK |
3154 IEEE80211_FC0_SUBTYPE_MASK);
3155 }
3156 break;
3157
3158 case 131:
3159
3160 /* Line 1806 of yacc.c */
3161 #line 529 "grammar.y"
3162 { (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (2)].i),
3163 IEEE80211_FC0_TYPE_MASK);
3164 }
3165 break;
3166
3167 case 132:
3168
3169 /* Line 1806 of yacc.c */
3170 #line 532 "grammar.y"
3171 { (yyval.rblk) = gen_p80211_type((yyvsp[(2) - (2)].i),
3172 IEEE80211_FC0_TYPE_MASK |
3173 IEEE80211_FC0_SUBTYPE_MASK);
3174 }
3175 break;
3176
3177 case 133:
3178
3179 /* Line 1806 of yacc.c */
3180 #line 536 "grammar.y"
3181 { (yyval.rblk) = gen_p80211_fcdir((yyvsp[(2) - (2)].i)); }
3182 break;
3183
3184 case 135:
3185
3186 /* Line 1806 of yacc.c */
3187 #line 540 "grammar.y"
3188 { (yyval.i) = str2tok((yyvsp[(1) - (1)].s), ieee80211_types);
3189 if ((yyval.i) == -1)
3190 bpf_error("unknown 802.11 type name");
3191 }
3192 break;
3193
3194 case 137:
3195
3196 /* Line 1806 of yacc.c */
3197 #line 547 "grammar.y"
3198 { const struct tok *types = NULL;
3199 int i;
3200 for (i = 0;; i++) {
3201 if (ieee80211_type_subtypes[i].tok == NULL) {
3202 /* Ran out of types */
3203 bpf_error("unknown 802.11 type");
3204 break;
3205 }
3206 if ((yyvsp[(-1) - (1)].i) == ieee80211_type_subtypes[i].type) {
3207 types = ieee80211_type_subtypes[i].tok;
3208 break;
3209 }
3210 }
3211
3212 (yyval.i) = str2tok((yyvsp[(1) - (1)].s), types);
3213 if ((yyval.i) == -1)
3214 bpf_error("unknown 802.11 subtype name");
3215 }
3216 break;
3217
3218 case 138:
3219
3220 /* Line 1806 of yacc.c */
3221 #line 567 "grammar.y"
3222 { int i;
3223 for (i = 0;; i++) {
3224 if (ieee80211_type_subtypes[i].tok == NULL) {
3225 /* Ran out of types */
3226 bpf_error("unknown 802.11 type name");
3227 break;
3228 }
3229 (yyval.i) = str2tok((yyvsp[(1) - (1)].s), ieee80211_type_subtypes[i].tok);
3230 if ((yyval.i) != -1) {
3231 (yyval.i) |= ieee80211_type_subtypes[i].type;
3232 break;
3233 }
3234 }
3235 }
3236 break;
3237
3238 case 140:
3239
3240 /* Line 1806 of yacc.c */
3241 #line 584 "grammar.y"
3242 { if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "nods") == 0)
3243 (yyval.i) = IEEE80211_FC1_DIR_NODS;
3244 else if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "tods") == 0)
3245 (yyval.i) = IEEE80211_FC1_DIR_TODS;
3246 else if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "fromds") == 0)
3247 (yyval.i) = IEEE80211_FC1_DIR_FROMDS;
3248 else if (pcap_strcasecmp((yyvsp[(1) - (1)].s), "dstods") == 0)
3249 (yyval.i) = IEEE80211_FC1_DIR_DSTODS;
3250 else
3251 bpf_error("unknown 802.11 direction");
3252 }
3253 break;
3254
3255 case 141:
3256
3257 /* Line 1806 of yacc.c */
3258 #line 597 "grammar.y"
3259 { (yyval.i) = (yyvsp[(1) - (1)].i); }
3260 break;
3261
3262 case 142:
3263
3264 /* Line 1806 of yacc.c */
3265 #line 598 "grammar.y"
3266 { (yyval.i) = pfreason_to_num((yyvsp[(1) - (1)].s)); }
3267 break;
3268
3269 case 143:
3270
3271 /* Line 1806 of yacc.c */
3272 #line 601 "grammar.y"
3273 { (yyval.i) = pfaction_to_num((yyvsp[(1) - (1)].s)); }
3274 break;
3275
3276 case 144:
3277
3278 /* Line 1806 of yacc.c */
3279 #line 604 "grammar.y"
3280 { (yyval.i) = BPF_JGT; }
3281 break;
3282
3283 case 145:
3284
3285 /* Line 1806 of yacc.c */
3286 #line 605 "grammar.y"
3287 { (yyval.i) = BPF_JGE; }
3288 break;
3289
3290 case 146:
3291
3292 /* Line 1806 of yacc.c */
3293 #line 606 "grammar.y"
3294 { (yyval.i) = BPF_JEQ; }
3295 break;
3296
3297 case 147:
3298
3299 /* Line 1806 of yacc.c */
3300 #line 608 "grammar.y"
3301 { (yyval.i) = BPF_JGT; }
3302 break;
3303
3304 case 148:
3305
3306 /* Line 1806 of yacc.c */
3307 #line 609 "grammar.y"
3308 { (yyval.i) = BPF_JGE; }
3309 break;
3310
3311 case 149:
3312
3313 /* Line 1806 of yacc.c */
3314 #line 610 "grammar.y"
3315 { (yyval.i) = BPF_JEQ; }
3316 break;
3317
3318 case 150:
3319
3320 /* Line 1806 of yacc.c */
3321 #line 612 "grammar.y"
3322 { (yyval.a) = gen_loadi((yyvsp[(1) - (1)].i)); }
3323 break;
3324
3325 case 152:
3326
3327 /* Line 1806 of yacc.c */
3328 #line 615 "grammar.y"
3329 { (yyval.a) = gen_load((yyvsp[(1) - (4)].i), (yyvsp[(3) - (4)].a), 1); }
3330 break;
3331
3332 case 153:
3333
3334 /* Line 1806 of yacc.c */
3335 #line 616 "grammar.y"
3336 { (yyval.a) = gen_load((yyvsp[(1) - (6)].i), (yyvsp[(3) - (6)].a), (yyvsp[(5) - (6)].i)); }
3337 break;
3338
3339 case 154:
3340
3341 /* Line 1806 of yacc.c */
3342 #line 617 "grammar.y"
3343 { (yyval.a) = gen_arth(BPF_ADD, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3344 break;
3345
3346 case 155:
3347
3348 /* Line 1806 of yacc.c */
3349 #line 618 "grammar.y"
3350 { (yyval.a) = gen_arth(BPF_SUB, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3351 break;
3352
3353 case 156:
3354
3355 /* Line 1806 of yacc.c */
3356 #line 619 "grammar.y"
3357 { (yyval.a) = gen_arth(BPF_MUL, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3358 break;
3359
3360 case 157:
3361
3362 /* Line 1806 of yacc.c */
3363 #line 620 "grammar.y"
3364 { (yyval.a) = gen_arth(BPF_DIV, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3365 break;
3366
3367 case 158:
3368
3369 /* Line 1806 of yacc.c */
3370 #line 621 "grammar.y"
3371 { (yyval.a) = gen_arth(BPF_AND, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3372 break;
3373
3374 case 159:
3375
3376 /* Line 1806 of yacc.c */
3377 #line 622 "grammar.y"
3378 { (yyval.a) = gen_arth(BPF_OR, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3379 break;
3380
3381 case 160:
3382
3383 /* Line 1806 of yacc.c */
3384 #line 623 "grammar.y"
3385 { (yyval.a) = gen_arth(BPF_LSH, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3386 break;
3387
3388 case 161:
3389
3390 /* Line 1806 of yacc.c */
3391 #line 624 "grammar.y"
3392 { (yyval.a) = gen_arth(BPF_RSH, (yyvsp[(1) - (3)].a), (yyvsp[(3) - (3)].a)); }
3393 break;
3394
3395 case 162:
3396
3397 /* Line 1806 of yacc.c */
3398 #line 625 "grammar.y"
3399 { (yyval.a) = gen_neg((yyvsp[(2) - (2)].a)); }
3400 break;
3401
3402 case 163:
3403
3404 /* Line 1806 of yacc.c */
3405 #line 626 "grammar.y"
3406 { (yyval.a) = (yyvsp[(2) - (3)].a); }
3407 break;
3408
3409 case 164:
3410
3411 /* Line 1806 of yacc.c */
3412 #line 627 "grammar.y"
3413 { (yyval.a) = gen_loadlen(); }
3414 break;
3415
3416 case 165:
3417
3418 /* Line 1806 of yacc.c */
3419 #line 629 "grammar.y"
3420 { (yyval.i) = '&'; }
3421 break;
3422
3423 case 166:
3424
3425 /* Line 1806 of yacc.c */
3426 #line 630 "grammar.y"
3427 { (yyval.i) = '|'; }
3428 break;
3429
3430 case 167:
3431
3432 /* Line 1806 of yacc.c */
3433 #line 631 "grammar.y"
3434 { (yyval.i) = '<'; }
3435 break;
3436
3437 case 168:
3438
3439 /* Line 1806 of yacc.c */
3440 #line 632 "grammar.y"
3441 { (yyval.i) = '>'; }
3442 break;
3443
3444 case 169:
3445
3446 /* Line 1806 of yacc.c */
3447 #line 633 "grammar.y"
3448 { (yyval.i) = '='; }
3449 break;
3450
3451 case 171:
3452
3453 /* Line 1806 of yacc.c */
3454 #line 636 "grammar.y"
3455 { (yyval.i) = (yyvsp[(2) - (3)].i); }
3456 break;
3457
3458 case 172:
3459
3460 /* Line 1806 of yacc.c */
3461 #line 638 "grammar.y"
3462 { (yyval.i) = A_LANE; }
3463 break;
3464
3465 case 173:
3466
3467 /* Line 1806 of yacc.c */
3468 #line 639 "grammar.y"
3469 { (yyval.i) = A_LLC; }
3470 break;
3471
3472 case 174:
3473
3474 /* Line 1806 of yacc.c */
3475 #line 640 "grammar.y"
3476 { (yyval.i) = A_METAC; }
3477 break;
3478
3479 case 175:
3480
3481 /* Line 1806 of yacc.c */
3482 #line 641 "grammar.y"
3483 { (yyval.i) = A_BCC; }
3484 break;
3485
3486 case 176:
3487
3488 /* Line 1806 of yacc.c */
3489 #line 642 "grammar.y"
3490 { (yyval.i) = A_OAMF4EC; }
3491 break;
3492
3493 case 177:
3494
3495 /* Line 1806 of yacc.c */
3496 #line 643 "grammar.y"
3497 { (yyval.i) = A_OAMF4SC; }
3498 break;
3499
3500 case 178:
3501
3502 /* Line 1806 of yacc.c */
3503 #line 644 "grammar.y"
3504 { (yyval.i) = A_SC; }
3505 break;
3506
3507 case 179:
3508
3509 /* Line 1806 of yacc.c */
3510 #line 645 "grammar.y"
3511 { (yyval.i) = A_ILMIC; }
3512 break;
3513
3514 case 180:
3515
3516 /* Line 1806 of yacc.c */
3517 #line 647 "grammar.y"
3518 { (yyval.i) = A_OAM; }
3519 break;
3520
3521 case 181:
3522
3523 /* Line 1806 of yacc.c */
3524 #line 648 "grammar.y"
3525 { (yyval.i) = A_OAMF4; }
3526 break;
3527
3528 case 182:
3529
3530 /* Line 1806 of yacc.c */
3531 #line 649 "grammar.y"
3532 { (yyval.i) = A_CONNECTMSG; }
3533 break;
3534
3535 case 183:
3536
3537 /* Line 1806 of yacc.c */
3538 #line 650 "grammar.y"
3539 { (yyval.i) = A_METACONNECT; }
3540 break;
3541
3542 case 184:
3543
3544 /* Line 1806 of yacc.c */
3545 #line 653 "grammar.y"
3546 { (yyval.blk).atmfieldtype = A_VPI; }
3547 break;
3548
3549 case 185:
3550
3551 /* Line 1806 of yacc.c */
3552 #line 654 "grammar.y"
3553 { (yyval.blk).atmfieldtype = A_VCI; }
3554 break;
3555
3556 case 187:
3557
3558 /* Line 1806 of yacc.c */
3559 #line 657 "grammar.y"
3560 { (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); }
3561 break;
3562
3563 case 188:
3564
3565 /* Line 1806 of yacc.c */
3566 #line 658 "grammar.y"
3567 { (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); }
3568 break;
3569
3570 case 189:
3571
3572 /* Line 1806 of yacc.c */
3573 #line 659 "grammar.y"
3574 { (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = qerr; }
3575 break;
3576
3577 case 190:
3578
3579 /* Line 1806 of yacc.c */
3580 #line 661 "grammar.y"
3581 {
3582 (yyval.blk).atmfieldtype = (yyvsp[(0) - (1)].blk).atmfieldtype;
3583 if ((yyval.blk).atmfieldtype == A_VPI ||
3584 (yyval.blk).atmfieldtype == A_VCI)
3585 (yyval.blk).b = gen_atmfield_code((yyval.blk).atmfieldtype, (bpf_int32) (yyvsp[(1) - (1)].i), BPF_JEQ, 0);
3586 }
3587 break;
3588
3589 case 192:
3590
3591 /* Line 1806 of yacc.c */
3592 #line 669 "grammar.y"
3593 { gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
3594 break;
3595
3596 case 193:
3597
3598 /* Line 1806 of yacc.c */
3599 #line 672 "grammar.y"
3600 { (yyval.i) = M_FISU; }
3601 break;
3602
3603 case 194:
3604
3605 /* Line 1806 of yacc.c */
3606 #line 673 "grammar.y"
3607 { (yyval.i) = M_LSSU; }
3608 break;
3609
3610 case 195:
3611
3612 /* Line 1806 of yacc.c */
3613 #line 674 "grammar.y"
3614 { (yyval.i) = M_MSU; }
3615 break;
3616
3617 case 196:
3618
3619 /* Line 1806 of yacc.c */
3620 #line 675 "grammar.y"
3621 { (yyval.i) = MH_FISU; }
3622 break;
3623
3624 case 197:
3625
3626 /* Line 1806 of yacc.c */
3627 #line 676 "grammar.y"
3628 { (yyval.i) = MH_LSSU; }
3629 break;
3630
3631 case 198:
3632
3633 /* Line 1806 of yacc.c */
3634 #line 677 "grammar.y"
3635 { (yyval.i) = MH_MSU; }
3636 break;
3637
3638 case 199:
3639
3640 /* Line 1806 of yacc.c */
3641 #line 680 "grammar.y"
3642 { (yyval.blk).mtp3fieldtype = M_SIO; }
3643 break;
3644
3645 case 200:
3646
3647 /* Line 1806 of yacc.c */
3648 #line 681 "grammar.y"
3649 { (yyval.blk).mtp3fieldtype = M_OPC; }
3650 break;
3651
3652 case 201:
3653
3654 /* Line 1806 of yacc.c */
3655 #line 682 "grammar.y"
3656 { (yyval.blk).mtp3fieldtype = M_DPC; }
3657 break;
3658
3659 case 202:
3660
3661 /* Line 1806 of yacc.c */
3662 #line 683 "grammar.y"
3663 { (yyval.blk).mtp3fieldtype = M_SLS; }
3664 break;
3665
3666 case 203:
3667
3668 /* Line 1806 of yacc.c */
3669 #line 684 "grammar.y"
3670 { (yyval.blk).mtp3fieldtype = MH_SIO; }
3671 break;
3672
3673 case 204:
3674
3675 /* Line 1806 of yacc.c */
3676 #line 685 "grammar.y"
3677 { (yyval.blk).mtp3fieldtype = MH_OPC; }
3678 break;
3679
3680 case 205:
3681
3682 /* Line 1806 of yacc.c */
3683 #line 686 "grammar.y"
3684 { (yyval.blk).mtp3fieldtype = MH_DPC; }
3685 break;
3686
3687 case 206:
3688
3689 /* Line 1806 of yacc.c */
3690 #line 687 "grammar.y"
3691 { (yyval.blk).mtp3fieldtype = MH_SLS; }
3692 break;
3693
3694 case 208:
3695
3696 /* Line 1806 of yacc.c */
3697 #line 690 "grammar.y"
3698 { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 0); }
3699 break;
3700
3701 case 209:
3702
3703 /* Line 1806 of yacc.c */
3704 #line 691 "grammar.y"
3705 { (yyval.blk).b = gen_mtp3field_code((yyvsp[(0) - (2)].blk).mtp3fieldtype, (u_int)(yyvsp[(2) - (2)].i), (u_int)(yyvsp[(1) - (2)].i), 1); }
3706 break;
3707
3708 case 210:
3709
3710 /* Line 1806 of yacc.c */
3711 #line 692 "grammar.y"
3712 { (yyval.blk).b = (yyvsp[(2) - (3)].blk).b; (yyval.blk).q = qerr; }
3713 break;
3714
3715 case 211:
3716
3717 /* Line 1806 of yacc.c */
3718 #line 694 "grammar.y"
3719 {
3720 (yyval.blk).mtp3fieldtype = (yyvsp[(0) - (1)].blk).mtp3fieldtype;
3721 if ((yyval.blk).mtp3fieldtype == M_SIO ||
3722 (yyval.blk).mtp3fieldtype == M_OPC ||
3723 (yyval.blk).mtp3fieldtype == M_DPC ||
3724 (yyval.blk).mtp3fieldtype == M_SLS ||
3725 (yyval.blk).mtp3fieldtype == MH_SIO ||
3726 (yyval.blk).mtp3fieldtype == MH_OPC ||
3727 (yyval.blk).mtp3fieldtype == MH_DPC ||
3728 (yyval.blk).mtp3fieldtype == MH_SLS)
3729 (yyval.blk).b = gen_mtp3field_code((yyval.blk).mtp3fieldtype, (u_int) (yyvsp[(1) - (1)].i), BPF_JEQ, 0);
3730 }
3731 break;
3732
3733 case 213:
3734
3735 /* Line 1806 of yacc.c */
3736 #line 708 "grammar.y"
3737 { gen_or((yyvsp[(1) - (3)].blk).b, (yyvsp[(3) - (3)].blk).b); (yyval.blk) = (yyvsp[(3) - (3)].blk); }
3738 break;
3739
3740
3741
3742 /* Line 1806 of yacc.c */
3743 #line 3744 "y.tab.c"
3744 default: break;
3745 }
3746 /* User semantic actions sometimes alter yychar, and that requires
3747 that yytoken be updated with the new translation. We take the
3748 approach of translating immediately before every use of yytoken.
3749 One alternative is translating here after every semantic action,
3750 but that translation would be missed if the semantic action invokes
3751 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3752 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3753 incorrect destructor might then be invoked immediately. In the
3754 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3755 to an incorrect destructor call or verbose syntax error message
3756 before the lookahead is translated. */
3757 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3758
3759 YYPOPSTACK (yylen);
3760 yylen = 0;
3761 YY_STACK_PRINT (yyss, yyssp);
3762
3763 *++yyvsp = yyval;
3764
3765 /* Now `shift' the result of the reduction. Determine what state
3766 that goes to, based on the state we popped back to and the rule
3767 number reduced by. */
3768
3769 yyn = yyr1[yyn];
3770
3771 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3772 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3773 yystate = yytable[yystate];
3774 else
3775 yystate = yydefgoto[yyn - YYNTOKENS];
3776
3777 goto yynewstate;
3778
3779
3780 /*------------------------------------.
3781 | yyerrlab -- here on detecting error |
3782 `------------------------------------*/
3783 yyerrlab:
3784 /* Make sure we have latest lookahead translation. See comments at
3785 user semantic actions for why this is necessary. */
3786 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3787
3788 /* If not already recovering from an error, report this error. */
3789 if (!yyerrstatus)
3790 {
3791 ++yynerrs;
3792 #if ! YYERROR_VERBOSE
3793 yyerror (YY_("syntax error"));
3794 #else
3795 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3796 yyssp, yytoken)
3797 {
3798 char const *yymsgp = YY_("syntax error");
3799 int yysyntax_error_status;
3800 yysyntax_error_status = YYSYNTAX_ERROR;
3801 if (yysyntax_error_status == 0)
3802 yymsgp = yymsg;
3803 else if (yysyntax_error_status == 1)
3804 {
3805 if (yymsg != yymsgbuf)
3806 YYSTACK_FREE (yymsg);
3807 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3808 if (!yymsg)
3809 {
3810 yymsg = yymsgbuf;
3811 yymsg_alloc = sizeof yymsgbuf;
3812 yysyntax_error_status = 2;
3813 }
3814 else
3815 {
3816 yysyntax_error_status = YYSYNTAX_ERROR;
3817 yymsgp = yymsg;
3818 }
3819 }
3820 yyerror (yymsgp);
3821 if (yysyntax_error_status == 2)
3822 goto yyexhaustedlab;
3823 }
3824 # undef YYSYNTAX_ERROR
3825 #endif
3826 }
3827
3828
3829
3830 if (yyerrstatus == 3)
3831 {
3832 /* If just tried and failed to reuse lookahead token after an
3833 error, discard it. */
3834
3835 if (yychar <= YYEOF)
3836 {
3837 /* Return failure if at end of input. */
3838 if (yychar == YYEOF)
3839 YYABORT;
3840 }
3841 else
3842 {
3843 yydestruct ("Error: discarding",
3844 yytoken, &yylval);
3845 yychar = YYEMPTY;
3846 }
3847 }
3848
3849 /* Else will try to reuse lookahead token after shifting the error
3850 token. */
3851 goto yyerrlab1;
3852
3853
3854 /*---------------------------------------------------.
3855 | yyerrorlab -- error raised explicitly by YYERROR. |
3856 `---------------------------------------------------*/
3857 yyerrorlab:
3858
3859 /* Pacify compilers like GCC when the user code never invokes
3860 YYERROR and the label yyerrorlab therefore never appears in user
3861 code. */
3862 if (/*CONSTCOND*/ 0)
3863 goto yyerrorlab;
3864
3865 /* Do not reclaim the symbols of the rule which action triggered
3866 this YYERROR. */
3867 YYPOPSTACK (yylen);
3868 yylen = 0;
3869 YY_STACK_PRINT (yyss, yyssp);
3870 yystate = *yyssp;
3871 goto yyerrlab1;
3872
3873
3874 /*-------------------------------------------------------------.
3875 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3876 `-------------------------------------------------------------*/
3877 yyerrlab1:
3878 yyerrstatus = 3; /* Each real token shifted decrements this. */
3879
3880 for (;;)
3881 {
3882 yyn = yypact[yystate];
3883 if (!yypact_value_is_default (yyn))
3884 {
3885 yyn += YYTERROR;
3886 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3887 {
3888 yyn = yytable[yyn];
3889 if (0 < yyn)
3890 break;
3891 }
3892 }
3893
3894 /* Pop the current state because it cannot handle the error token. */
3895 if (yyssp == yyss)
3896 YYABORT;
3897
3898
3899 yydestruct ("Error: popping",
3900 yystos[yystate], yyvsp);
3901 YYPOPSTACK (1);
3902 yystate = *yyssp;
3903 YY_STACK_PRINT (yyss, yyssp);
3904 }
3905
3906 *++yyvsp = yylval;
3907
3908
3909 /* Shift the error token. */
3910 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3911
3912 yystate = yyn;
3913 goto yynewstate;
3914
3915
3916 /*-------------------------------------.
3917 | yyacceptlab -- YYACCEPT comes here. |
3918 `-------------------------------------*/
3919 yyacceptlab:
3920 yyresult = 0;
3921 goto yyreturn;
3922
3923 /*-----------------------------------.
3924 | yyabortlab -- YYABORT comes here. |
3925 `-----------------------------------*/
3926 yyabortlab:
3927 yyresult = 1;
3928 goto yyreturn;
3929
3930 #if !defined(yyoverflow) || YYERROR_VERBOSE
3931 /*-------------------------------------------------.
3932 | yyexhaustedlab -- memory exhaustion comes here. |
3933 `-------------------------------------------------*/
3934 yyexhaustedlab:
3935 yyerror (YY_("memory exhausted"));
3936 yyresult = 2;
3937 /* Fall through. */
3938 #endif
3939
3940 yyreturn:
3941 if (yychar != YYEMPTY)
3942 {
3943 /* Make sure we have latest lookahead translation. See comments at
3944 user semantic actions for why this is necessary. */
3945 yytoken = YYTRANSLATE (yychar);
3946 yydestruct ("Cleanup: discarding lookahead",
3947 yytoken, &yylval);
3948 }
3949 /* Do not reclaim the symbols of the rule which action triggered
3950 this YYABORT or YYACCEPT. */
3951 YYPOPSTACK (yylen);
3952 YY_STACK_PRINT (yyss, yyssp);
3953 while (yyssp != yyss)
3954 {
3955 yydestruct ("Cleanup: popping",
3956 yystos[*yyssp], yyvsp);
3957 YYPOPSTACK (1);
3958 }
3959 #ifndef yyoverflow
3960 if (yyss != yyssa)
3961 YYSTACK_FREE (yyss);
3962 #endif
3963 #if YYERROR_VERBOSE
3964 if (yymsg != yymsgbuf)
3965 YYSTACK_FREE (yymsg);
3966 #endif
3967 /* Make sure YYID is used. */
3968 return YYID (yyresult);
3969 }
3970
3971
3972
3973 /* Line 2067 of yacc.c */
3974 #line 710 "grammar.y"
3975
3976
3977