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

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

MARK: Dynamic workflow graph developement. Branch up to date with trunk @1676. Arithmetic filter unified

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