source: XIOS/dev/branch_openmp/src/parse_expr/yacc_parser.cpp @ 1642

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

dev on ADA. add flag switch _usingEP/_usingMPI

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