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