source: XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp @ 1745

Last change on this file since 1745 was 1745, checked in by yushan, 5 years ago

Generic_testcase: build flag --omp to enable EP with intelmpi. --omp2 to enable EP with openmpi. tested on Irene with compiler=intel17, mpi=intelmpi&openmpi, with and without EP

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