source: XIOS/trunk/src/parse_expr/yacc_parser.cpp @ 1019

Last change on this file since 1019 was 1019, checked in by mhnguyen, 7 years ago

Adding new operator for expression: Not Equal, NE, /=

Test
+) On Curie
+) Okie

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