Coverage Report

Created: 2021-11-03 07:11

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