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