~tapaal-ltl/verifypn/scc-optimise

« back to all changes in this revision

Viewing changes to PetriEngine/PQL/PQLQueryParser.parser.cpp

  • Committer: srba.jiri at gmail
  • Date: 2020-09-11 14:23:39 UTC
  • mfrom: (213.1.151 interval_tar)
  • Revision ID: srba.jiri@gmail.com-20200911142339-bq9328s1gppw24uj
merged in lp:~verifypn-maintainers/verifypn/interval_tar doing 
- Implements TAR w/o z3, but using a simple integer inference engine for Hoare logic.
 - Replaces LP-Solve with GLPK, reduces computation-time and memory overhead
 - Implements new global properties, translated into CTL formulae.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A Bison parser, made by GNU Bison 3.0.4.  */
2
 
 
3
 
/* Bison implementation for Yacc-like parsers in C
4
 
 
5
 
   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
 
 
7
 
   This program is free software: you can redistribute it and/or modify
8
 
   it under the terms of the GNU General Public License as published by
9
 
   the Free Software Foundation, either version 3 of the License, or
10
 
   (at your option) any later version.
11
 
 
12
 
   This program is distributed in the hope that it will be useful,
13
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
   GNU General Public License for more details.
16
 
 
17
 
   You should have received a copy of the GNU General Public License
18
 
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
 
 
20
 
/* As a special exception, you may create a larger work that contains
21
 
   part or all of the Bison parser skeleton and distribute that work
22
 
   under terms of your choice, so long as that work isn't itself a
23
 
   parser generator using the skeleton or a modified version thereof
24
 
   as a parser skeleton.  Alternatively, if you modify or redistribute
25
 
   the parser skeleton itself, you may (at your option) remove this
26
 
   special exception, which will cause the skeleton and the resulting
27
 
   Bison output files to be licensed under the GNU General Public
28
 
   License without this special exception.
29
 
 
30
 
   This special exception was added by the Free Software Foundation in
31
 
   version 2.2 of Bison.  */
32
 
 
33
 
/* C LALR(1) parser skeleton written by Richard Stallman, by
34
 
   simplifying the original so-called "semantic" parser.  */
35
 
 
36
 
/* All symbols defined below should begin with yy or YY, to avoid
37
 
   infringing on user name space.  This should be done even for local
38
 
   variables, as they might otherwise be expanded by user macros.
39
 
   There are some unavoidable exceptions within include files to
40
 
   define necessary library symbols; they are noted "INFRINGES ON
41
 
   USER NAME SPACE" below.  */
42
 
 
43
 
/* Identify Bison output.  */
44
 
#define YYBISON 1
45
 
 
46
 
/* Bison version.  */
47
 
#define YYBISON_VERSION "3.0.4"
48
 
 
49
 
/* Skeleton name.  */
50
 
#define YYSKELETON_NAME "yacc.c"
51
 
 
52
 
/* Pure parsers.  */
53
 
#define YYPURE 0
54
 
 
55
 
/* Push parsers.  */
56
 
#define YYPUSH 0
57
 
 
58
 
/* Pull parsers.  */
59
 
#define YYPULL 1
60
 
 
61
 
 
62
 
/* Substitute the variable and function names.  */
63
 
#define yyparse         pqlqparse
64
 
#define yylex           pqlqlex
65
 
#define yyerror         pqlqerror
66
 
#define yydebug         pqlqdebug
67
 
#define yynerrs         pqlqnerrs
68
 
 
69
 
#define yylval          pqlqlval
70
 
#define yychar          pqlqchar
71
 
 
72
 
/* Copy the first part of user declarations.  */
73
 
#line 1 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:339  */
74
 
 
75
 
#include <stdio.h>
76
 
#include <memory>
77
 
 
78
 
#include "PQL.h"
79
 
#include "Expressions.h"
80
 
 
81
 
using namespace PetriEngine::PQL;
82
 
 
83
 
std::shared_ptr<PetriEngine::PQL::Condition> query;
84
 
extern int pqlqlex();
85
 
void pqlqerror(const char *s) {printf("ERROR: %s\n", s);}
86
 
 
87
 
#line 88 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:339  */
88
 
 
89
 
# ifndef YY_NULLPTR
90
 
#  if defined __cplusplus && 201103L <= __cplusplus
91
 
#   define YY_NULLPTR nullptr
92
 
#  else
93
 
#   define YY_NULLPTR 0
94
 
#  endif
95
 
# endif
96
 
 
97
 
/* Enabling verbose error messages.  */
98
 
#ifdef YYERROR_VERBOSE
99
 
# undef YYERROR_VERBOSE
100
 
# define YYERROR_VERBOSE 1
101
 
#else
102
 
# define YYERROR_VERBOSE 0
103
 
#endif
104
 
 
105
 
/* In a future release of Bison, this section will be replaced
106
 
   by #include "PQLQueryParser.parser.hpp".  */
107
 
#ifndef YY_PQLQ_PETRIENGINE_PQL_PQLQUERYPARSER_PARSER_HPP_INCLUDED
108
 
# define YY_PQLQ_PETRIENGINE_PQL_PQLQUERYPARSER_PARSER_HPP_INCLUDED
109
 
/* Debug traces.  */
110
 
#ifndef YYDEBUG
111
 
# define YYDEBUG 0
112
 
#endif
113
 
#if YYDEBUG
114
 
extern int pqlqdebug;
115
 
#endif
116
 
 
117
 
/* Token type.  */
118
 
#ifndef YYTOKENTYPE
119
 
# define YYTOKENTYPE
120
 
  enum yytokentype
121
 
  {
122
 
    ID = 258,
123
 
    INT = 259,
124
 
    DEADLOCK = 260,
125
 
    TRUE = 261,
126
 
    FALSE = 262,
127
 
    LPAREN = 263,
128
 
    RPAREN = 264,
129
 
    AND = 265,
130
 
    OR = 266,
131
 
    NOT = 267,
132
 
    EQUAL = 268,
133
 
    NEQUAL = 269,
134
 
    LESS = 270,
135
 
    LESSEQUAL = 271,
136
 
    GREATER = 272,
137
 
    GREATEREQUAL = 273,
138
 
    PLUS = 274,
139
 
    MINUS = 275,
140
 
    MULTIPLY = 276
141
 
  };
142
 
#endif
143
 
 
144
 
/* Value type.  */
145
 
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
146
 
 
147
 
union YYSTYPE
148
 
{
149
 
#line 19 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:355  */
150
 
 
151
 
        PetriEngine::PQL::Expr* expr;
152
 
        PetriEngine::PQL::Condition* cond;
153
 
        std::string *string;
154
 
        int token;
155
 
 
156
 
#line 157 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:355  */
157
 
};
158
 
 
159
 
typedef union YYSTYPE YYSTYPE;
160
 
# define YYSTYPE_IS_TRIVIAL 1
161
 
# define YYSTYPE_IS_DECLARED 1
162
 
#endif
163
 
 
164
 
 
165
 
extern YYSTYPE pqlqlval;
166
 
 
167
 
int pqlqparse (void);
168
 
 
169
 
#endif /* !YY_PQLQ_PETRIENGINE_PQL_PQLQUERYPARSER_PARSER_HPP_INCLUDED  */
170
 
 
171
 
/* Copy the second part of user declarations.  */
172
 
 
173
 
#line 174 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:358  */
174
 
 
175
 
#ifdef short
176
 
# undef short
177
 
#endif
178
 
 
179
 
#ifdef YYTYPE_UINT8
180
 
typedef YYTYPE_UINT8 yytype_uint8;
181
 
#else
182
 
typedef unsigned char yytype_uint8;
183
 
#endif
184
 
 
185
 
#ifdef YYTYPE_INT8
186
 
typedef YYTYPE_INT8 yytype_int8;
187
 
#else
188
 
typedef signed char yytype_int8;
189
 
#endif
190
 
 
191
 
#ifdef YYTYPE_UINT16
192
 
typedef YYTYPE_UINT16 yytype_uint16;
193
 
#else
194
 
typedef unsigned short int yytype_uint16;
195
 
#endif
196
 
 
197
 
#ifdef YYTYPE_INT16
198
 
typedef YYTYPE_INT16 yytype_int16;
199
 
#else
200
 
typedef short int yytype_int16;
201
 
#endif
202
 
 
203
 
#ifndef YYSIZE_T
204
 
# ifdef __SIZE_TYPE__
205
 
#  define YYSIZE_T __SIZE_TYPE__
206
 
# elif defined size_t
207
 
#  define YYSIZE_T size_t
208
 
# elif ! defined YYSIZE_T
209
 
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
210
 
#  define YYSIZE_T size_t
211
 
# else
212
 
#  define YYSIZE_T unsigned int
213
 
# endif
214
 
#endif
215
 
 
216
 
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
217
 
 
218
 
#ifndef YY_
219
 
# if defined YYENABLE_NLS && YYENABLE_NLS
220
 
#  if ENABLE_NLS
221
 
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
222
 
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
223
 
#  endif
224
 
# endif
225
 
# ifndef YY_
226
 
#  define YY_(Msgid) Msgid
227
 
# endif
228
 
#endif
229
 
 
230
 
#ifndef YY_ATTRIBUTE
231
 
# if (defined __GNUC__                                               \
232
 
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
233
 
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
234
 
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
235
 
# else
236
 
#  define YY_ATTRIBUTE(Spec) /* empty */
237
 
# endif
238
 
#endif
239
 
 
240
 
#ifndef YY_ATTRIBUTE_PURE
241
 
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
242
 
#endif
243
 
 
244
 
#ifndef YY_ATTRIBUTE_UNUSED
245
 
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
246
 
#endif
247
 
 
248
 
#if !defined _Noreturn \
249
 
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
250
 
# if defined _MSC_VER && 1200 <= _MSC_VER
251
 
#  define _Noreturn __declspec (noreturn)
252
 
# else
253
 
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
254
 
# endif
255
 
#endif
256
 
 
257
 
/* Suppress unused-variable warnings by "using" E.  */
258
 
#if ! defined lint || defined __GNUC__
259
 
# define YYUSE(E) ((void) (E))
260
 
#else
261
 
# define YYUSE(E) /* empty */
262
 
#endif
263
 
 
264
 
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
265
 
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
266
 
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
267
 
    _Pragma ("GCC diagnostic push") \
268
 
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
269
 
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
270
 
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
271
 
    _Pragma ("GCC diagnostic pop")
272
 
#else
273
 
# define YY_INITIAL_VALUE(Value) Value
274
 
#endif
275
 
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
276
 
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
277
 
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
278
 
#endif
279
 
#ifndef YY_INITIAL_VALUE
280
 
# define YY_INITIAL_VALUE(Value) /* Nothing. */
281
 
#endif
282
 
 
283
 
 
284
 
#if ! defined yyoverflow || YYERROR_VERBOSE
285
 
 
286
 
/* The parser invokes alloca or malloc; define the necessary symbols.  */
287
 
 
288
 
# ifdef YYSTACK_USE_ALLOCA
289
 
#  if YYSTACK_USE_ALLOCA
290
 
#   ifdef __GNUC__
291
 
#    define YYSTACK_ALLOC __builtin_alloca
292
 
#   elif defined __BUILTIN_VA_ARG_INCR
293
 
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
294
 
#   elif defined _AIX
295
 
#    define YYSTACK_ALLOC __alloca
296
 
#   elif defined _MSC_VER
297
 
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
298
 
#    define alloca _alloca
299
 
#   else
300
 
#    define YYSTACK_ALLOC alloca
301
 
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
302
 
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
303
 
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
304
 
#     ifndef EXIT_SUCCESS
305
 
#      define EXIT_SUCCESS 0
306
 
#     endif
307
 
#    endif
308
 
#   endif
309
 
#  endif
310
 
# endif
311
 
 
312
 
# ifdef YYSTACK_ALLOC
313
 
   /* Pacify GCC's 'empty if-body' warning.  */
314
 
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
315
 
#  ifndef YYSTACK_ALLOC_MAXIMUM
316
 
    /* The OS might guarantee only one guard page at the bottom of the stack,
317
 
       and a page size can be as small as 4096 bytes.  So we cannot safely
318
 
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
319
 
       to allow for a few compiler-allocated temporary stack slots.  */
320
 
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
321
 
#  endif
322
 
# else
323
 
#  define YYSTACK_ALLOC YYMALLOC
324
 
#  define YYSTACK_FREE YYFREE
325
 
#  ifndef YYSTACK_ALLOC_MAXIMUM
326
 
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
327
 
#  endif
328
 
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
329
 
       && ! ((defined YYMALLOC || defined malloc) \
330
 
             && (defined YYFREE || defined free)))
331
 
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
332
 
#   ifndef EXIT_SUCCESS
333
 
#    define EXIT_SUCCESS 0
334
 
#   endif
335
 
#  endif
336
 
#  ifndef YYMALLOC
337
 
#   define YYMALLOC malloc
338
 
#   if ! defined malloc && ! defined EXIT_SUCCESS
339
 
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
340
 
#   endif
341
 
#  endif
342
 
#  ifndef YYFREE
343
 
#   define YYFREE free
344
 
#   if ! defined free && ! defined EXIT_SUCCESS
345
 
void free (void *); /* INFRINGES ON USER NAME SPACE */
346
 
#   endif
347
 
#  endif
348
 
# endif
349
 
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
350
 
 
351
 
 
352
 
#if (! defined yyoverflow \
353
 
     && (! defined __cplusplus \
354
 
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
355
 
 
356
 
/* A type that is properly aligned for any stack member.  */
357
 
union yyalloc
358
 
{
359
 
  yytype_int16 yyss_alloc;
360
 
  YYSTYPE yyvs_alloc;
361
 
};
362
 
 
363
 
/* The size of the maximum gap between one aligned stack and the next.  */
364
 
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
365
 
 
366
 
/* The size of an array large to enough to hold all stacks, each with
367
 
   N elements.  */
368
 
# define YYSTACK_BYTES(N) \
369
 
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
370
 
      + YYSTACK_GAP_MAXIMUM)
371
 
 
372
 
# define YYCOPY_NEEDED 1
373
 
 
374
 
/* Relocate STACK from its old location to the new one.  The
375
 
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
376
 
   elements in the stack, and YYPTR gives the new location of the
377
 
   stack.  Advance YYPTR to a properly aligned location for the next
378
 
   stack.  */
379
 
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
380
 
    do                                                                  \
381
 
      {                                                                 \
382
 
        YYSIZE_T yynewbytes;                                            \
383
 
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
384
 
        Stack = &yyptr->Stack_alloc;                                    \
385
 
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
386
 
        yyptr += yynewbytes / sizeof (*yyptr);                          \
387
 
      }                                                                 \
388
 
    while (0)
389
 
 
390
 
#endif
391
 
 
392
 
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
393
 
/* Copy COUNT objects from SRC to DST.  The source and destination do
394
 
   not overlap.  */
395
 
# ifndef YYCOPY
396
 
#  if defined __GNUC__ && 1 < __GNUC__
397
 
#   define YYCOPY(Dst, Src, Count) \
398
 
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
399
 
#  else
400
 
#   define YYCOPY(Dst, Src, Count)              \
401
 
      do                                        \
402
 
        {                                       \
403
 
          YYSIZE_T yyi;                         \
404
 
          for (yyi = 0; yyi < (Count); yyi++)   \
405
 
            (Dst)[yyi] = (Src)[yyi];            \
406
 
        }                                       \
407
 
      while (0)
408
 
#  endif
409
 
# endif
410
 
#endif /* !YYCOPY_NEEDED */
411
 
 
412
 
/* YYFINAL -- State number of the termination state.  */
413
 
#define YYFINAL  21
414
 
/* YYLAST -- Last index in YYTABLE.  */
415
 
#define YYLAST   75
416
 
 
417
 
/* YYNTOKENS -- Number of terminals.  */
418
 
#define YYNTOKENS  22
419
 
/* YYNNTS -- Number of nonterminals.  */
420
 
#define YYNNTS  7
421
 
/* YYNRULES -- Number of rules.  */
422
 
#define YYNRULES  26
423
 
/* YYNSTATES -- Number of states.  */
424
 
#define YYNSTATES  47
425
 
 
426
 
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
427
 
   by yylex, with out-of-bounds checking.  */
428
 
#define YYUNDEFTOK  2
429
 
#define YYMAXUTOK   276
430
 
 
431
 
#define YYTRANSLATE(YYX)                                                \
432
 
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
433
 
 
434
 
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
435
 
   as returned by yylex, without out-of-bounds checking.  */
436
 
static const yytype_uint8 yytranslate[] =
437
 
{
438
 
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
443
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
444
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
445
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
446
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
447
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
448
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
449
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
450
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
451
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
452
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
453
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
454
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
455
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
456
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
457
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
458
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
460
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
461
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
463
 
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
464
 
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
465
 
      15,    16,    17,    18,    19,    20,    21
466
 
};
467
 
 
468
 
#if YYDEBUG
469
 
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
470
 
static const yytype_uint8 yyrline[] =
471
 
{
472
 
       0,    48,    48,    49,    52,    53,    54,    55,    56,    57,
473
 
      58,    59,    62,    63,    64,    65,    66,    67,    70,    71,
474
 
      72,    73,    76,    77,    80,    81,    82
475
 
};
476
 
#endif
477
 
 
478
 
#if YYDEBUG || YYERROR_VERBOSE || 0
479
 
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
480
 
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
481
 
static const char *const yytname[] =
482
 
{
483
 
  "$end", "error", "$undefined", "ID", "INT", "DEADLOCK", "TRUE", "FALSE",
484
 
  "LPAREN", "RPAREN", "AND", "OR", "NOT", "EQUAL", "NEQUAL", "LESS",
485
 
  "LESSEQUAL", "GREATER", "GREATEREQUAL", "PLUS", "MINUS", "MULTIPLY",
486
 
  "$accept", "query", "logic", "compare", "expr", "term", "factor", YY_NULLPTR
487
 
};
488
 
#endif
489
 
 
490
 
# ifdef YYPRINT
491
 
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
492
 
   (internal) symbol number NUM (which must be that of a token).  */
493
 
static const yytype_uint16 yytoknum[] =
494
 
{
495
 
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
496
 
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
497
 
     275,   276
498
 
};
499
 
# endif
500
 
 
501
 
#define YYPACT_NINF -17
502
 
 
503
 
#define yypact_value_is_default(Yystate) \
504
 
  (!!((Yystate) == (-17)))
505
 
 
506
 
#define YYTABLE_NINF -1
507
 
 
508
 
#define yytable_value_is_error(Yytable_value) \
509
 
  0
510
 
 
511
 
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
512
 
     STATE-NUM.  */
513
 
static const yytype_int8 yypact[] =
514
 
{
515
 
       3,   -17,   -17,   -17,   -17,   -17,   -17,    21,    21,    27,
516
 
       1,    34,   -17,    48,   -16,   -17,    60,    40,   -17,    27,
517
 
      53,   -17,    21,    21,    27,    27,    27,    27,    27,    27,
518
 
      35,    35,    35,   -17,   -17,    -6,   -17,   -17,    53,    53,
519
 
      53,    53,    53,    53,   -16,   -16,   -17
520
 
};
521
 
 
522
 
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
523
 
     Performed when YYTABLE does not specify something else to do.  Zero
524
 
     means the default is an error.  */
525
 
static const yytype_uint8 yydefact[] =
526
 
{
527
 
       0,     3,    26,    25,    11,     9,    10,     0,     0,     0,
528
 
       0,     2,     8,     0,    21,    23,     0,     0,     6,     0,
529
 
      20,     1,     0,     0,     0,     0,     0,     0,     0,     0,
530
 
       0,     0,     0,     7,    24,     0,     4,     5,    12,    13,
531
 
      14,    15,    16,    17,    18,    19,    22
532
 
};
533
 
 
534
 
  /* YYPGOTO[NTERM-NUM].  */
535
 
static const yytype_int8 yypgoto[] =
536
 
{
537
 
     -17,   -17,    29,   -17,    -7,    44,     0
538
 
};
539
 
 
540
 
  /* YYDEFGOTO[NTERM-NUM].  */
541
 
static const yytype_int8 yydefgoto[] =
542
 
{
543
 
      -1,    10,    11,    12,    13,    14,    15
544
 
};
545
 
 
546
 
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
547
 
     positive, shift that token.  If negative, reduce the rule whose
548
 
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
549
 
static const yytype_uint8 yytable[] =
550
 
{
551
 
      17,    21,    20,    34,     1,    32,     2,     3,     4,     5,
552
 
       6,     7,    35,    30,    31,     8,     0,    38,    39,    40,
553
 
      41,    42,    43,     9,     2,     3,     4,     5,     6,     7,
554
 
       2,     3,    46,     8,     0,    19,    16,    18,     2,     3,
555
 
       0,     9,     0,    19,    22,    23,     0,     9,     0,    34,
556
 
       0,    36,    37,    24,    25,    26,    27,    28,    29,    30,
557
 
      31,    24,    25,    26,    27,    28,    29,    30,    31,    33,
558
 
      22,    23,    30,    31,    44,    45
559
 
};
560
 
 
561
 
static const yytype_int8 yycheck[] =
562
 
{
563
 
       7,     0,     9,     9,     1,    21,     3,     4,     5,     6,
564
 
       7,     8,    19,    19,    20,    12,    -1,    24,    25,    26,
565
 
      27,    28,    29,    20,     3,     4,     5,     6,     7,     8,
566
 
       3,     4,    32,    12,    -1,     8,     7,     8,     3,     4,
567
 
      -1,    20,    -1,     8,    10,    11,    -1,    20,    -1,     9,
568
 
      -1,    22,    23,    13,    14,    15,    16,    17,    18,    19,
569
 
      20,    13,    14,    15,    16,    17,    18,    19,    20,     9,
570
 
      10,    11,    19,    20,    30,    31
571
 
};
572
 
 
573
 
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
574
 
     symbol of state STATE-NUM.  */
575
 
static const yytype_uint8 yystos[] =
576
 
{
577
 
       0,     1,     3,     4,     5,     6,     7,     8,    12,    20,
578
 
      23,    24,    25,    26,    27,    28,    24,    26,    24,     8,
579
 
      26,     0,    10,    11,    13,    14,    15,    16,    17,    18,
580
 
      19,    20,    21,     9,     9,    26,    24,    24,    26,    26,
581
 
      26,    26,    26,    26,    27,    27,    28
582
 
};
583
 
 
584
 
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
585
 
static const yytype_uint8 yyr1[] =
586
 
{
587
 
       0,    22,    23,    23,    24,    24,    24,    24,    24,    24,
588
 
      24,    24,    25,    25,    25,    25,    25,    25,    26,    26,
589
 
      26,    26,    27,    27,    28,    28,    28
590
 
};
591
 
 
592
 
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
593
 
static const yytype_uint8 yyr2[] =
594
 
{
595
 
       0,     2,     1,     1,     3,     3,     2,     3,     1,     1,
596
 
       1,     1,     3,     3,     3,     3,     3,     3,     3,     3,
597
 
       2,     1,     3,     1,     3,     1,     1
598
 
};
599
 
 
600
 
 
601
 
#define yyerrok         (yyerrstatus = 0)
602
 
#define yyclearin       (yychar = YYEMPTY)
603
 
#define YYEMPTY         (-2)
604
 
#define YYEOF           0
605
 
 
606
 
#define YYACCEPT        goto yyacceptlab
607
 
#define YYABORT         goto yyabortlab
608
 
#define YYERROR         goto yyerrorlab
609
 
 
610
 
 
611
 
#define YYRECOVERING()  (!!yyerrstatus)
612
 
 
613
 
#define YYBACKUP(Token, Value)                                  \
614
 
do                                                              \
615
 
  if (yychar == YYEMPTY)                                        \
616
 
    {                                                           \
617
 
      yychar = (Token);                                         \
618
 
      yylval = (Value);                                         \
619
 
      YYPOPSTACK (yylen);                                       \
620
 
      yystate = *yyssp;                                         \
621
 
      goto yybackup;                                            \
622
 
    }                                                           \
623
 
  else                                                          \
624
 
    {                                                           \
625
 
      yyerror (YY_("syntax error: cannot back up")); \
626
 
      YYERROR;                                                  \
627
 
    }                                                           \
628
 
while (0)
629
 
 
630
 
/* Error token number */
631
 
#define YYTERROR        1
632
 
#define YYERRCODE       256
633
 
 
634
 
 
635
 
 
636
 
/* Enable debugging if requested.  */
637
 
#if YYDEBUG
638
 
 
639
 
# ifndef YYFPRINTF
640
 
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
641
 
#  define YYFPRINTF fprintf
642
 
# endif
643
 
 
644
 
# define YYDPRINTF(Args)                        \
645
 
do {                                            \
646
 
  if (yydebug)                                  \
647
 
    YYFPRINTF Args;                             \
648
 
} while (0)
649
 
 
650
 
/* This macro is provided for backward compatibility. */
651
 
#ifndef YY_LOCATION_PRINT
652
 
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
653
 
#endif
654
 
 
655
 
 
656
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
657
 
do {                                                                      \
658
 
  if (yydebug)                                                            \
659
 
    {                                                                     \
660
 
      YYFPRINTF (stderr, "%s ", Title);                                   \
661
 
      yy_symbol_print (stderr,                                            \
662
 
                  Type, Value); \
663
 
      YYFPRINTF (stderr, "\n");                                           \
664
 
    }                                                                     \
665
 
} while (0)
666
 
 
667
 
 
668
 
/*----------------------------------------.
669
 
| Print this symbol's value on YYOUTPUT.  |
670
 
`----------------------------------------*/
671
 
 
672
 
static void
673
 
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
674
 
{
675
 
  FILE *yyo = yyoutput;
676
 
  YYUSE (yyo);
677
 
  if (!yyvaluep)
678
 
    return;
679
 
# ifdef YYPRINT
680
 
  if (yytype < YYNTOKENS)
681
 
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
682
 
# endif
683
 
  YYUSE (yytype);
684
 
}
685
 
 
686
 
 
687
 
/*--------------------------------.
688
 
| Print this symbol on YYOUTPUT.  |
689
 
`--------------------------------*/
690
 
 
691
 
static void
692
 
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
693
 
{
694
 
  YYFPRINTF (yyoutput, "%s %s (",
695
 
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
696
 
 
697
 
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
698
 
  YYFPRINTF (yyoutput, ")");
699
 
}
700
 
 
701
 
/*------------------------------------------------------------------.
702
 
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
703
 
| TOP (included).                                                   |
704
 
`------------------------------------------------------------------*/
705
 
 
706
 
static void
707
 
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
708
 
{
709
 
  YYFPRINTF (stderr, "Stack now");
710
 
  for (; yybottom <= yytop; yybottom++)
711
 
    {
712
 
      int yybot = *yybottom;
713
 
      YYFPRINTF (stderr, " %d", yybot);
714
 
    }
715
 
  YYFPRINTF (stderr, "\n");
716
 
}
717
 
 
718
 
# define YY_STACK_PRINT(Bottom, Top)                            \
719
 
do {                                                            \
720
 
  if (yydebug)                                                  \
721
 
    yy_stack_print ((Bottom), (Top));                           \
722
 
} while (0)
723
 
 
724
 
 
725
 
/*------------------------------------------------.
726
 
| Report that the YYRULE is going to be reduced.  |
727
 
`------------------------------------------------*/
728
 
 
729
 
static void
730
 
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
731
 
{
732
 
  unsigned long int yylno = yyrline[yyrule];
733
 
  int yynrhs = yyr2[yyrule];
734
 
  int yyi;
735
 
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
736
 
             yyrule - 1, yylno);
737
 
  /* The symbols being reduced.  */
738
 
  for (yyi = 0; yyi < yynrhs; yyi++)
739
 
    {
740
 
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
741
 
      yy_symbol_print (stderr,
742
 
                       yystos[yyssp[yyi + 1 - yynrhs]],
743
 
                       &(yyvsp[(yyi + 1) - (yynrhs)])
744
 
                                              );
745
 
      YYFPRINTF (stderr, "\n");
746
 
    }
747
 
}
748
 
 
749
 
# define YY_REDUCE_PRINT(Rule)          \
750
 
do {                                    \
751
 
  if (yydebug)                          \
752
 
    yy_reduce_print (yyssp, yyvsp, Rule); \
753
 
} while (0)
754
 
 
755
 
/* Nonzero means print parse trace.  It is left uninitialized so that
756
 
   multiple parsers can coexist.  */
757
 
int yydebug;
758
 
#else /* !YYDEBUG */
759
 
# define YYDPRINTF(Args)
760
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
761
 
# define YY_STACK_PRINT(Bottom, Top)
762
 
# define YY_REDUCE_PRINT(Rule)
763
 
#endif /* !YYDEBUG */
764
 
 
765
 
 
766
 
/* YYINITDEPTH -- initial size of the parser's stacks.  */
767
 
#ifndef YYINITDEPTH
768
 
# define YYINITDEPTH 200
769
 
#endif
770
 
 
771
 
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
772
 
   if the built-in stack extension method is used).
773
 
 
774
 
   Do not make this value too large; the results are undefined if
775
 
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
776
 
   evaluated with infinite-precision integer arithmetic.  */
777
 
 
778
 
#ifndef YYMAXDEPTH
779
 
# define YYMAXDEPTH 10000
780
 
#endif
781
 
 
782
 
 
783
 
#if YYERROR_VERBOSE
784
 
 
785
 
# ifndef yystrlen
786
 
#  if defined __GLIBC__ && defined _STRING_H
787
 
#   define yystrlen strlen
788
 
#  else
789
 
/* Return the length of YYSTR.  */
790
 
static YYSIZE_T
791
 
yystrlen (const char *yystr)
792
 
{
793
 
  YYSIZE_T yylen;
794
 
  for (yylen = 0; yystr[yylen]; yylen++)
795
 
    continue;
796
 
  return yylen;
797
 
}
798
 
#  endif
799
 
# endif
800
 
 
801
 
# ifndef yystpcpy
802
 
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
803
 
#   define yystpcpy stpcpy
804
 
#  else
805
 
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
806
 
   YYDEST.  */
807
 
static char *
808
 
yystpcpy (char *yydest, const char *yysrc)
809
 
{
810
 
  char *yyd = yydest;
811
 
  const char *yys = yysrc;
812
 
 
813
 
  while ((*yyd++ = *yys++) != '\0')
814
 
    continue;
815
 
 
816
 
  return yyd - 1;
817
 
}
818
 
#  endif
819
 
# endif
820
 
 
821
 
# ifndef yytnamerr
822
 
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
823
 
   quotes and backslashes, so that it's suitable for yyerror.  The
824
 
   heuristic is that double-quoting is unnecessary unless the string
825
 
   contains an apostrophe, a comma, or backslash (other than
826
 
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
827
 
   null, do not copy; instead, return the length of what the result
828
 
   would have been.  */
829
 
static YYSIZE_T
830
 
yytnamerr (char *yyres, const char *yystr)
831
 
{
832
 
  if (*yystr == '"')
833
 
    {
834
 
      YYSIZE_T yyn = 0;
835
 
      char const *yyp = yystr;
836
 
 
837
 
      for (;;)
838
 
        switch (*++yyp)
839
 
          {
840
 
          case '\'':
841
 
          case ',':
842
 
            goto do_not_strip_quotes;
843
 
 
844
 
          case '\\':
845
 
            if (*++yyp != '\\')
846
 
              goto do_not_strip_quotes;
847
 
            /* Fall through.  */
848
 
          default:
849
 
            if (yyres)
850
 
              yyres[yyn] = *yyp;
851
 
            yyn++;
852
 
            break;
853
 
 
854
 
          case '"':
855
 
            if (yyres)
856
 
              yyres[yyn] = '\0';
857
 
            return yyn;
858
 
          }
859
 
    do_not_strip_quotes: ;
860
 
    }
861
 
 
862
 
  if (! yyres)
863
 
    return yystrlen (yystr);
864
 
 
865
 
  return yystpcpy (yyres, yystr) - yyres;
866
 
}
867
 
# endif
868
 
 
869
 
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
870
 
   about the unexpected token YYTOKEN for the state stack whose top is
871
 
   YYSSP.
872
 
 
873
 
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
874
 
   not large enough to hold the message.  In that case, also set
875
 
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
876
 
   required number of bytes is too large to store.  */
877
 
static int
878
 
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
879
 
                yytype_int16 *yyssp, int yytoken)
880
 
{
881
 
  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
882
 
  YYSIZE_T yysize = yysize0;
883
 
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
884
 
  /* Internationalized format string. */
885
 
  const char *yyformat = YY_NULLPTR;
886
 
  /* Arguments of yyformat. */
887
 
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
888
 
  /* Number of reported tokens (one for the "unexpected", one per
889
 
     "expected"). */
890
 
  int yycount = 0;
891
 
 
892
 
  /* There are many possibilities here to consider:
893
 
     - If this state is a consistent state with a default action, then
894
 
       the only way this function was invoked is if the default action
895
 
       is an error action.  In that case, don't check for expected
896
 
       tokens because there are none.
897
 
     - The only way there can be no lookahead present (in yychar) is if
898
 
       this state is a consistent state with a default action.  Thus,
899
 
       detecting the absence of a lookahead is sufficient to determine
900
 
       that there is no unexpected or expected token to report.  In that
901
 
       case, just report a simple "syntax error".
902
 
     - Don't assume there isn't a lookahead just because this state is a
903
 
       consistent state with a default action.  There might have been a
904
 
       previous inconsistent state, consistent state with a non-default
905
 
       action, or user semantic action that manipulated yychar.
906
 
     - Of course, the expected token list depends on states to have
907
 
       correct lookahead information, and it depends on the parser not
908
 
       to perform extra reductions after fetching a lookahead from the
909
 
       scanner and before detecting a syntax error.  Thus, state merging
910
 
       (from LALR or IELR) and default reductions corrupt the expected
911
 
       token list.  However, the list is correct for canonical LR with
912
 
       one exception: it will still contain any token that will not be
913
 
       accepted due to an error action in a later state.
914
 
  */
915
 
  if (yytoken != YYEMPTY)
916
 
    {
917
 
      int yyn = yypact[*yyssp];
918
 
      yyarg[yycount++] = yytname[yytoken];
919
 
      if (!yypact_value_is_default (yyn))
920
 
        {
921
 
          /* Start YYX at -YYN if negative to avoid negative indexes in
922
 
             YYCHECK.  In other words, skip the first -YYN actions for
923
 
             this state because they are default actions.  */
924
 
          int yyxbegin = yyn < 0 ? -yyn : 0;
925
 
          /* Stay within bounds of both yycheck and yytname.  */
926
 
          int yychecklim = YYLAST - yyn + 1;
927
 
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
928
 
          int yyx;
929
 
 
930
 
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
931
 
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
932
 
                && !yytable_value_is_error (yytable[yyx + yyn]))
933
 
              {
934
 
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
935
 
                  {
936
 
                    yycount = 1;
937
 
                    yysize = yysize0;
938
 
                    break;
939
 
                  }
940
 
                yyarg[yycount++] = yytname[yyx];
941
 
                {
942
 
                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
943
 
                  if (! (yysize <= yysize1
944
 
                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
945
 
                    return 2;
946
 
                  yysize = yysize1;
947
 
                }
948
 
              }
949
 
        }
950
 
    }
951
 
 
952
 
  switch (yycount)
953
 
    {
954
 
# define YYCASE_(N, S)                      \
955
 
      case N:                               \
956
 
        yyformat = S;                       \
957
 
      break
958
 
      YYCASE_(0, YY_("syntax error"));
959
 
      YYCASE_(1, YY_("syntax error, unexpected %s"));
960
 
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
961
 
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
962
 
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
963
 
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
964
 
# undef YYCASE_
965
 
    }
966
 
 
967
 
  {
968
 
    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
969
 
    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
970
 
      return 2;
971
 
    yysize = yysize1;
972
 
  }
973
 
 
974
 
  if (*yymsg_alloc < yysize)
975
 
    {
976
 
      *yymsg_alloc = 2 * yysize;
977
 
      if (! (yysize <= *yymsg_alloc
978
 
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
979
 
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
980
 
      return 1;
981
 
    }
982
 
 
983
 
  /* Avoid sprintf, as that infringes on the user's name space.
984
 
     Don't have undefined behavior even if the translation
985
 
     produced a string with the wrong number of "%s"s.  */
986
 
  {
987
 
    char *yyp = *yymsg;
988
 
    int yyi = 0;
989
 
    while ((*yyp = *yyformat) != '\0')
990
 
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
991
 
        {
992
 
          yyp += yytnamerr (yyp, yyarg[yyi++]);
993
 
          yyformat += 2;
994
 
        }
995
 
      else
996
 
        {
997
 
          yyp++;
998
 
          yyformat++;
999
 
        }
1000
 
  }
1001
 
  return 0;
1002
 
}
1003
 
#endif /* YYERROR_VERBOSE */
1004
 
 
1005
 
/*-----------------------------------------------.
1006
 
| Release the memory associated to this symbol.  |
1007
 
`-----------------------------------------------*/
1008
 
 
1009
 
static void
1010
 
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1011
 
{
1012
 
  YYUSE (yyvaluep);
1013
 
  if (!yymsg)
1014
 
    yymsg = "Deleting";
1015
 
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1016
 
 
1017
 
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1018
 
  YYUSE (yytype);
1019
 
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1020
 
}
1021
 
 
1022
 
 
1023
 
 
1024
 
 
1025
 
/* The lookahead symbol.  */
1026
 
int yychar;
1027
 
 
1028
 
/* The semantic value of the lookahead symbol.  */
1029
 
YYSTYPE yylval;
1030
 
/* Number of syntax errors so far.  */
1031
 
int yynerrs;
1032
 
 
1033
 
 
1034
 
/*----------.
1035
 
| yyparse.  |
1036
 
`----------*/
1037
 
 
1038
 
int
1039
 
yyparse (void)
1040
 
{
1041
 
    int yystate;
1042
 
    /* Number of tokens to shift before error messages enabled.  */
1043
 
    int yyerrstatus;
1044
 
 
1045
 
    /* The stacks and their tools:
1046
 
       'yyss': related to states.
1047
 
       'yyvs': related to semantic values.
1048
 
 
1049
 
       Refer to the stacks through separate pointers, to allow yyoverflow
1050
 
       to reallocate them elsewhere.  */
1051
 
 
1052
 
    /* The state stack.  */
1053
 
    yytype_int16 yyssa[YYINITDEPTH];
1054
 
    yytype_int16 *yyss;
1055
 
    yytype_int16 *yyssp;
1056
 
 
1057
 
    /* The semantic value stack.  */
1058
 
    YYSTYPE yyvsa[YYINITDEPTH];
1059
 
    YYSTYPE *yyvs;
1060
 
    YYSTYPE *yyvsp;
1061
 
 
1062
 
    YYSIZE_T yystacksize;
1063
 
 
1064
 
  int yyn;
1065
 
  int yyresult;
1066
 
  /* Lookahead token as an internal (translated) token number.  */
1067
 
  int yytoken = 0;
1068
 
  /* The variables used to return semantic value and location from the
1069
 
     action routines.  */
1070
 
  YYSTYPE yyval;
1071
 
 
1072
 
#if YYERROR_VERBOSE
1073
 
  /* Buffer for error messages, and its allocated size.  */
1074
 
  char yymsgbuf[128];
1075
 
  char *yymsg = yymsgbuf;
1076
 
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1077
 
#endif
1078
 
 
1079
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1080
 
 
1081
 
  /* The number of symbols on the RHS of the reduced rule.
1082
 
     Keep to zero when no symbol should be popped.  */
1083
 
  int yylen = 0;
1084
 
 
1085
 
  yyssp = yyss = yyssa;
1086
 
  yyvsp = yyvs = yyvsa;
1087
 
  yystacksize = YYINITDEPTH;
1088
 
 
1089
 
  YYDPRINTF ((stderr, "Starting parse\n"));
1090
 
 
1091
 
  yystate = 0;
1092
 
  yyerrstatus = 0;
1093
 
  yynerrs = 0;
1094
 
  yychar = YYEMPTY; /* Cause a token to be read.  */
1095
 
  goto yysetstate;
1096
 
 
1097
 
/*------------------------------------------------------------.
1098
 
| yynewstate -- Push a new state, which is found in yystate.  |
1099
 
`------------------------------------------------------------*/
1100
 
 yynewstate:
1101
 
  /* In all cases, when you get here, the value and location stacks
1102
 
     have just been pushed.  So pushing a state here evens the stacks.  */
1103
 
  yyssp++;
1104
 
 
1105
 
 yysetstate:
1106
 
  *yyssp = yystate;
1107
 
 
1108
 
  if (yyss + yystacksize - 1 <= yyssp)
1109
 
    {
1110
 
      /* Get the current used size of the three stacks, in elements.  */
1111
 
      YYSIZE_T yysize = yyssp - yyss + 1;
1112
 
 
1113
 
#ifdef yyoverflow
1114
 
      {
1115
 
        /* Give user a chance to reallocate the stack.  Use copies of
1116
 
           these so that the &'s don't force the real ones into
1117
 
           memory.  */
1118
 
        YYSTYPE *yyvs1 = yyvs;
1119
 
        yytype_int16 *yyss1 = yyss;
1120
 
 
1121
 
        /* Each stack pointer address is followed by the size of the
1122
 
           data in use in that stack, in bytes.  This used to be a
1123
 
           conditional around just the two extra args, but that might
1124
 
           be undefined if yyoverflow is a macro.  */
1125
 
        yyoverflow (YY_("memory exhausted"),
1126
 
                    &yyss1, yysize * sizeof (*yyssp),
1127
 
                    &yyvs1, yysize * sizeof (*yyvsp),
1128
 
                    &yystacksize);
1129
 
 
1130
 
        yyss = yyss1;
1131
 
        yyvs = yyvs1;
1132
 
      }
1133
 
#else /* no yyoverflow */
1134
 
# ifndef YYSTACK_RELOCATE
1135
 
      goto yyexhaustedlab;
1136
 
# else
1137
 
      /* Extend the stack our own way.  */
1138
 
      if (YYMAXDEPTH <= yystacksize)
1139
 
        goto yyexhaustedlab;
1140
 
      yystacksize *= 2;
1141
 
      if (YYMAXDEPTH < yystacksize)
1142
 
        yystacksize = YYMAXDEPTH;
1143
 
 
1144
 
      {
1145
 
        yytype_int16 *yyss1 = yyss;
1146
 
        union yyalloc *yyptr =
1147
 
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1148
 
        if (! yyptr)
1149
 
          goto yyexhaustedlab;
1150
 
        YYSTACK_RELOCATE (yyss_alloc, yyss);
1151
 
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1152
 
#  undef YYSTACK_RELOCATE
1153
 
        if (yyss1 != yyssa)
1154
 
          YYSTACK_FREE (yyss1);
1155
 
      }
1156
 
# endif
1157
 
#endif /* no yyoverflow */
1158
 
 
1159
 
      yyssp = yyss + yysize - 1;
1160
 
      yyvsp = yyvs + yysize - 1;
1161
 
 
1162
 
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1163
 
                  (unsigned long int) yystacksize));
1164
 
 
1165
 
      if (yyss + yystacksize - 1 <= yyssp)
1166
 
        YYABORT;
1167
 
    }
1168
 
 
1169
 
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1170
 
 
1171
 
  if (yystate == YYFINAL)
1172
 
    YYACCEPT;
1173
 
 
1174
 
  goto yybackup;
1175
 
 
1176
 
/*-----------.
1177
 
| yybackup.  |
1178
 
`-----------*/
1179
 
yybackup:
1180
 
 
1181
 
  /* Do appropriate processing given the current state.  Read a
1182
 
     lookahead token if we need one and don't already have one.  */
1183
 
 
1184
 
  /* First try to decide what to do without reference to lookahead token.  */
1185
 
  yyn = yypact[yystate];
1186
 
  if (yypact_value_is_default (yyn))
1187
 
    goto yydefault;
1188
 
 
1189
 
  /* Not known => get a lookahead token if don't already have one.  */
1190
 
 
1191
 
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1192
 
  if (yychar == YYEMPTY)
1193
 
    {
1194
 
      YYDPRINTF ((stderr, "Reading a token: "));
1195
 
      yychar = yylex ();
1196
 
    }
1197
 
 
1198
 
  if (yychar <= YYEOF)
1199
 
    {
1200
 
      yychar = yytoken = YYEOF;
1201
 
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1202
 
    }
1203
 
  else
1204
 
    {
1205
 
      yytoken = YYTRANSLATE (yychar);
1206
 
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1207
 
    }
1208
 
 
1209
 
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1210
 
     detect an error, take that action.  */
1211
 
  yyn += yytoken;
1212
 
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1213
 
    goto yydefault;
1214
 
  yyn = yytable[yyn];
1215
 
  if (yyn <= 0)
1216
 
    {
1217
 
      if (yytable_value_is_error (yyn))
1218
 
        goto yyerrlab;
1219
 
      yyn = -yyn;
1220
 
      goto yyreduce;
1221
 
    }
1222
 
 
1223
 
  /* Count tokens shifted since error; after three, turn off error
1224
 
     status.  */
1225
 
  if (yyerrstatus)
1226
 
    yyerrstatus--;
1227
 
 
1228
 
  /* Shift the lookahead token.  */
1229
 
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1230
 
 
1231
 
  /* Discard the shifted token.  */
1232
 
  yychar = YYEMPTY;
1233
 
 
1234
 
  yystate = yyn;
1235
 
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1236
 
  *++yyvsp = yylval;
1237
 
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1238
 
 
1239
 
  goto yynewstate;
1240
 
 
1241
 
 
1242
 
/*-----------------------------------------------------------.
1243
 
| yydefault -- do the default action for the current state.  |
1244
 
`-----------------------------------------------------------*/
1245
 
yydefault:
1246
 
  yyn = yydefact[yystate];
1247
 
  if (yyn == 0)
1248
 
    goto yyerrlab;
1249
 
  goto yyreduce;
1250
 
 
1251
 
 
1252
 
/*-----------------------------.
1253
 
| yyreduce -- Do a reduction.  |
1254
 
`-----------------------------*/
1255
 
yyreduce:
1256
 
  /* yyn is the number of a rule to reduce with.  */
1257
 
  yylen = yyr2[yyn];
1258
 
 
1259
 
  /* If YYLEN is nonzero, implement the default value of the action:
1260
 
     '$$ = $1'.
1261
 
 
1262
 
     Otherwise, the following line sets YYVAL to garbage.
1263
 
     This behavior is undocumented and Bison
1264
 
     users should not rely upon it.  Assigning to YYVAL
1265
 
     unconditionally makes the parser a bit smaller, and it avoids a
1266
 
     GCC warning that YYVAL may be used uninitialized.  */
1267
 
  yyval = yyvsp[1-yylen];
1268
 
 
1269
 
 
1270
 
  YY_REDUCE_PRINT (yyn);
1271
 
  switch (yyn)
1272
 
    {
1273
 
        case 2:
1274
 
#line 48 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1275
 
    { query = Condition_ptr((yyvsp[0].cond)); }
1276
 
#line 1277 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1277
 
    break;
1278
 
 
1279
 
  case 3:
1280
 
#line 49 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1281
 
    { yyerrok; }
1282
 
#line 1283 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1283
 
    break;
1284
 
 
1285
 
  case 4:
1286
 
#line 52 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1287
 
    { (yyval.cond) = new AndCondition(Condition_ptr((yyvsp[-2].cond)), Condition_ptr((yyvsp[0].cond))); }
1288
 
#line 1289 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1289
 
    break;
1290
 
 
1291
 
  case 5:
1292
 
#line 53 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1293
 
    { (yyval.cond) = new OrCondition(Condition_ptr((yyvsp[-2].cond)), Condition_ptr((yyvsp[0].cond))); }
1294
 
#line 1295 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1295
 
    break;
1296
 
 
1297
 
  case 6:
1298
 
#line 54 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1299
 
    { (yyval.cond) = new NotCondition(Condition_ptr((yyvsp[0].cond))); }
1300
 
#line 1301 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1301
 
    break;
1302
 
 
1303
 
  case 7:
1304
 
#line 55 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1305
 
    { (yyval.cond) = (yyvsp[-1].cond); }
1306
 
#line 1307 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1307
 
    break;
1308
 
 
1309
 
  case 8:
1310
 
#line 56 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1311
 
    { (yyval.cond) = (yyvsp[0].cond); }
1312
 
#line 1313 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1313
 
    break;
1314
 
 
1315
 
  case 9:
1316
 
#line 57 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1317
 
    { (yyval.cond) = new BooleanCondition(true);}
1318
 
#line 1319 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1319
 
    break;
1320
 
 
1321
 
  case 10:
1322
 
#line 58 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1323
 
    { (yyval.cond) = new BooleanCondition(false);}
1324
 
#line 1325 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1325
 
    break;
1326
 
 
1327
 
  case 11:
1328
 
#line 59 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1329
 
    { (yyval.cond) = new DeadlockCondition();}
1330
 
#line 1331 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1331
 
    break;
1332
 
 
1333
 
  case 12:
1334
 
#line 62 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1335
 
    { (yyval.cond) = new EqualCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1336
 
#line 1337 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1337
 
    break;
1338
 
 
1339
 
  case 13:
1340
 
#line 63 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1341
 
    { (yyval.cond) = new NotEqualCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1342
 
#line 1343 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1343
 
    break;
1344
 
 
1345
 
  case 14:
1346
 
#line 64 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1347
 
    { (yyval.cond) = new LessThanCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1348
 
#line 1349 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1349
 
    break;
1350
 
 
1351
 
  case 15:
1352
 
#line 65 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1353
 
    { (yyval.cond) = new LessThanOrEqualCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1354
 
#line 1355 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1355
 
    break;
1356
 
 
1357
 
  case 16:
1358
 
#line 66 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1359
 
    { (yyval.cond) = new GreaterThanCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1360
 
#line 1361 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1361
 
    break;
1362
 
 
1363
 
  case 17:
1364
 
#line 67 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1365
 
    { (yyval.cond) = new GreaterThanOrEqualCondition(Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))); }
1366
 
#line 1367 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1367
 
    break;
1368
 
 
1369
 
  case 18:
1370
 
#line 70 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1371
 
    { (yyval.expr) = new PlusExpr(std::vector<Expr_ptr>({Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))})); }
1372
 
#line 1373 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1373
 
    break;
1374
 
 
1375
 
  case 19:
1376
 
#line 71 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1377
 
    { (yyval.expr) = new SubtractExpr(std::vector<Expr_ptr>({Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))})); }
1378
 
#line 1379 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1379
 
    break;
1380
 
 
1381
 
  case 20:
1382
 
#line 72 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1383
 
    { (yyval.expr) = new MinusExpr(Expr_ptr((yyvsp[0].expr))); }
1384
 
#line 1385 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1385
 
    break;
1386
 
 
1387
 
  case 21:
1388
 
#line 73 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1389
 
    { (yyval.expr) = (yyvsp[0].expr); }
1390
 
#line 1391 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1391
 
    break;
1392
 
 
1393
 
  case 22:
1394
 
#line 76 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1395
 
    { (yyval.expr) = new MultiplyExpr(std::vector<Expr_ptr>({Expr_ptr((yyvsp[-2].expr)), Expr_ptr((yyvsp[0].expr))})); }
1396
 
#line 1397 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1397
 
    break;
1398
 
 
1399
 
  case 23:
1400
 
#line 77 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1401
 
    { (yyval.expr) = (yyvsp[0].expr); }
1402
 
#line 1403 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1403
 
    break;
1404
 
 
1405
 
  case 24:
1406
 
#line 80 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1407
 
    { (yyval.expr) = (yyvsp[-1].expr); }
1408
 
#line 1409 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1409
 
    break;
1410
 
 
1411
 
  case 25:
1412
 
#line 81 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1413
 
    { (yyval.expr) = new LiteralExpr(atol((yyvsp[0].string)->c_str())); delete (yyvsp[0].string); }
1414
 
#line 1415 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1415
 
    break;
1416
 
 
1417
 
  case 26:
1418
 
#line 82 "PetriEngine/PQL/PQLQueryParser.y" /* yacc.c:1646  */
1419
 
    { (yyval.expr) = new IdentifierExpr(*(yyvsp[0].string)); delete (yyvsp[0].string); }
1420
 
#line 1421 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1421
 
    break;
1422
 
 
1423
 
 
1424
 
#line 1425 "PetriEngine/PQL/PQLQueryParser.parser.cpp" /* yacc.c:1646  */
1425
 
      default: break;
1426
 
    }
1427
 
  /* User semantic actions sometimes alter yychar, and that requires
1428
 
     that yytoken be updated with the new translation.  We take the
1429
 
     approach of translating immediately before every use of yytoken.
1430
 
     One alternative is translating here after every semantic action,
1431
 
     but that translation would be missed if the semantic action invokes
1432
 
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1433
 
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1434
 
     incorrect destructor might then be invoked immediately.  In the
1435
 
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
1436
 
     to an incorrect destructor call or verbose syntax error message
1437
 
     before the lookahead is translated.  */
1438
 
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1439
 
 
1440
 
  YYPOPSTACK (yylen);
1441
 
  yylen = 0;
1442
 
  YY_STACK_PRINT (yyss, yyssp);
1443
 
 
1444
 
  *++yyvsp = yyval;
1445
 
 
1446
 
  /* Now 'shift' the result of the reduction.  Determine what state
1447
 
     that goes to, based on the state we popped back to and the rule
1448
 
     number reduced by.  */
1449
 
 
1450
 
  yyn = yyr1[yyn];
1451
 
 
1452
 
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1453
 
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1454
 
    yystate = yytable[yystate];
1455
 
  else
1456
 
    yystate = yydefgoto[yyn - YYNTOKENS];
1457
 
 
1458
 
  goto yynewstate;
1459
 
 
1460
 
 
1461
 
/*--------------------------------------.
1462
 
| yyerrlab -- here on detecting error.  |
1463
 
`--------------------------------------*/
1464
 
yyerrlab:
1465
 
  /* Make sure we have latest lookahead translation.  See comments at
1466
 
     user semantic actions for why this is necessary.  */
1467
 
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1468
 
 
1469
 
  /* If not already recovering from an error, report this error.  */
1470
 
  if (!yyerrstatus)
1471
 
    {
1472
 
      ++yynerrs;
1473
 
#if ! YYERROR_VERBOSE
1474
 
      yyerror (YY_("syntax error"));
1475
 
#else
1476
 
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1477
 
                                        yyssp, yytoken)
1478
 
      {
1479
 
        char const *yymsgp = YY_("syntax error");
1480
 
        int yysyntax_error_status;
1481
 
        yysyntax_error_status = YYSYNTAX_ERROR;
1482
 
        if (yysyntax_error_status == 0)
1483
 
          yymsgp = yymsg;
1484
 
        else if (yysyntax_error_status == 1)
1485
 
          {
1486
 
            if (yymsg != yymsgbuf)
1487
 
              YYSTACK_FREE (yymsg);
1488
 
            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1489
 
            if (!yymsg)
1490
 
              {
1491
 
                yymsg = yymsgbuf;
1492
 
                yymsg_alloc = sizeof yymsgbuf;
1493
 
                yysyntax_error_status = 2;
1494
 
              }
1495
 
            else
1496
 
              {
1497
 
                yysyntax_error_status = YYSYNTAX_ERROR;
1498
 
                yymsgp = yymsg;
1499
 
              }
1500
 
          }
1501
 
        yyerror (yymsgp);
1502
 
        if (yysyntax_error_status == 2)
1503
 
          goto yyexhaustedlab;
1504
 
      }
1505
 
# undef YYSYNTAX_ERROR
1506
 
#endif
1507
 
    }
1508
 
 
1509
 
 
1510
 
 
1511
 
  if (yyerrstatus == 3)
1512
 
    {
1513
 
      /* If just tried and failed to reuse lookahead token after an
1514
 
         error, discard it.  */
1515
 
 
1516
 
      if (yychar <= YYEOF)
1517
 
        {
1518
 
          /* Return failure if at end of input.  */
1519
 
          if (yychar == YYEOF)
1520
 
            YYABORT;
1521
 
        }
1522
 
      else
1523
 
        {
1524
 
          yydestruct ("Error: discarding",
1525
 
                      yytoken, &yylval);
1526
 
          yychar = YYEMPTY;
1527
 
        }
1528
 
    }
1529
 
 
1530
 
  /* Else will try to reuse lookahead token after shifting the error
1531
 
     token.  */
1532
 
  goto yyerrlab1;
1533
 
 
1534
 
 
1535
 
/*---------------------------------------------------.
1536
 
| yyerrorlab -- error raised explicitly by YYERROR.  |
1537
 
`---------------------------------------------------*/
1538
 
yyerrorlab:
1539
 
 
1540
 
  /* Pacify compilers like GCC when the user code never invokes
1541
 
     YYERROR and the label yyerrorlab therefore never appears in user
1542
 
     code.  */
1543
 
  if (/*CONSTCOND*/ 0)
1544
 
     goto yyerrorlab;
1545
 
 
1546
 
  /* Do not reclaim the symbols of the rule whose action triggered
1547
 
     this YYERROR.  */
1548
 
  YYPOPSTACK (yylen);
1549
 
  yylen = 0;
1550
 
  YY_STACK_PRINT (yyss, yyssp);
1551
 
  yystate = *yyssp;
1552
 
  goto yyerrlab1;
1553
 
 
1554
 
 
1555
 
/*-------------------------------------------------------------.
1556
 
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1557
 
`-------------------------------------------------------------*/
1558
 
yyerrlab1:
1559
 
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1560
 
 
1561
 
  for (;;)
1562
 
    {
1563
 
      yyn = yypact[yystate];
1564
 
      if (!yypact_value_is_default (yyn))
1565
 
        {
1566
 
          yyn += YYTERROR;
1567
 
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1568
 
            {
1569
 
              yyn = yytable[yyn];
1570
 
              if (0 < yyn)
1571
 
                break;
1572
 
            }
1573
 
        }
1574
 
 
1575
 
      /* Pop the current state because it cannot handle the error token.  */
1576
 
      if (yyssp == yyss)
1577
 
        YYABORT;
1578
 
 
1579
 
 
1580
 
      yydestruct ("Error: popping",
1581
 
                  yystos[yystate], yyvsp);
1582
 
      YYPOPSTACK (1);
1583
 
      yystate = *yyssp;
1584
 
      YY_STACK_PRINT (yyss, yyssp);
1585
 
    }
1586
 
 
1587
 
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1588
 
  *++yyvsp = yylval;
1589
 
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1590
 
 
1591
 
 
1592
 
  /* Shift the error token.  */
1593
 
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1594
 
 
1595
 
  yystate = yyn;
1596
 
  goto yynewstate;
1597
 
 
1598
 
 
1599
 
/*-------------------------------------.
1600
 
| yyacceptlab -- YYACCEPT comes here.  |
1601
 
`-------------------------------------*/
1602
 
yyacceptlab:
1603
 
  yyresult = 0;
1604
 
  goto yyreturn;
1605
 
 
1606
 
/*-----------------------------------.
1607
 
| yyabortlab -- YYABORT comes here.  |
1608
 
`-----------------------------------*/
1609
 
yyabortlab:
1610
 
  yyresult = 1;
1611
 
  goto yyreturn;
1612
 
 
1613
 
#if !defined yyoverflow || YYERROR_VERBOSE
1614
 
/*-------------------------------------------------.
1615
 
| yyexhaustedlab -- memory exhaustion comes here.  |
1616
 
`-------------------------------------------------*/
1617
 
yyexhaustedlab:
1618
 
  yyerror (YY_("memory exhausted"));
1619
 
  yyresult = 2;
1620
 
  /* Fall through.  */
1621
 
#endif
1622
 
 
1623
 
yyreturn:
1624
 
  if (yychar != YYEMPTY)
1625
 
    {
1626
 
      /* Make sure we have latest lookahead translation.  See comments at
1627
 
         user semantic actions for why this is necessary.  */
1628
 
      yytoken = YYTRANSLATE (yychar);
1629
 
      yydestruct ("Cleanup: discarding lookahead",
1630
 
                  yytoken, &yylval);
1631
 
    }
1632
 
  /* Do not reclaim the symbols of the rule whose action triggered
1633
 
     this YYABORT or YYACCEPT.  */
1634
 
  YYPOPSTACK (yylen);
1635
 
  YY_STACK_PRINT (yyss, yyssp);
1636
 
  while (yyssp != yyss)
1637
 
    {
1638
 
      yydestruct ("Cleanup: popping",
1639
 
                  yystos[*yyssp], yyvsp);
1640
 
      YYPOPSTACK (1);
1641
 
    }
1642
 
#ifndef yyoverflow
1643
 
  if (yyss != yyssa)
1644
 
    YYSTACK_FREE (yyss);
1645
 
#endif
1646
 
#if YYERROR_VERBOSE
1647
 
  if (yymsg != yymsgbuf)
1648
 
    YYSTACK_FREE (yymsg);
1649
 
#endif
1650
 
  return yyresult;
1651
 
}