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