63 #define YYBISON_VERSION "2.3"
66 #define YYSKELETON_NAME "yacc.c"
72 #define YYLSP_NEEDED 0
75 #define yyparse yyparse
76 #define yyerror CChemEqParsererror
77 #define yylval CChemEqParserlval
78 #define yychar CChemEqParserchar
79 #define yydebug CChemEqParserdebug
80 #define yynerrs CChemEqParsernerrs
101 #define TOKEN_NUMBER 258
102 #define TOKEN_MULTIPLY 259
103 #define TOKEN_PLUS 260
104 #define TOKEN_NAME 261
105 #define TOKEN_BEGIN_PRODUCTS 262
106 #define TOKEN_BEGIN_MODIFIERS 263
107 #define TOKEN_BEGIN_COMPARTMENT 264
108 #define TOKEN_END_COMPARTMENT 265
114 #line 4 "CChemEqParser.ypp"
117 #define YYSTYPE CChemEqParserBase::Data *
122 #define yylval mpData
127 #define yyerror(__str) \
128 if (yychar != YYERRCODE) correctErrorPosition(); \
129 CCopasiMessage(CCopasiMessage::ERROR, MCFunction + 1, mPosition)
138 #define yyparse CChemEqParserBase::yyparse
147 #ifdef YYERROR_VERBOSE
148 # undef YYERROR_VERBOSE
149 # define YYERROR_VERBOSE 1
151 # define YYERROR_VERBOSE 0
155 #ifndef YYTOKEN_TABLE
156 # define YYTOKEN_TABLE 0
159 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
161 # define yystype YYSTYPE
162 # define YYSTYPE_IS_DECLARED 1
163 # define YYSTYPE_IS_TRIVIAL 1
172 #line 160 "CChemEqParser_yacc.cpp"
186 #elif (defined __STDC__ || defined __C99__FUNC__ \
187 || defined __cplusplus || defined _MSC_VER)
206 # ifdef __SIZE_TYPE__
207 # define YYSIZE_T __SIZE_TYPE__
208 # elif defined size_t
209 # define YYSIZE_T size_t
210 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
211 || defined __cplusplus || defined _MSC_VER)
213 # define YYSIZE_T size_t
215 # define YYSIZE_T unsigned int
219 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
222 # if defined YYENABLE_NLS && YYENABLE_NLS
224 # include <libintl.h>
225 # define YY_(msgid) dgettext ("bison-runtime", msgid)
229 # define YY_(msgid) msgid
234 #if ! defined lint || defined __GNUC__
235 # define YYUSE(e) ((void) (e))
244 #if (defined __STDC__ || defined __C99__FUNC__ \
245 || defined __cplusplus || defined _MSC_VER)
258 #if ! defined yyoverflow || YYERROR_VERBOSE
262 # ifdef YYSTACK_USE_ALLOCA
263 # if YYSTACK_USE_ALLOCA
265 # define YYSTACK_ALLOC __builtin_alloca
266 # elif defined __BUILTIN_VA_ARG_INCR
269 # define YYSTACK_ALLOC __alloca
270 # elif defined _MSC_VER
272 # define alloca _alloca
274 # define YYSTACK_ALLOC alloca
275 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
276 || defined __cplusplus || defined _MSC_VER)
286 # ifdef YYSTACK_ALLOC
288 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
289 # ifndef YYSTACK_ALLOC_MAXIMUM
294 # define YYSTACK_ALLOC_MAXIMUM 4032
297 # define YYSTACK_ALLOC YYMALLOC
298 # define YYSTACK_FREE YYFREE
299 # ifndef YYSTACK_ALLOC_MAXIMUM
300 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
302 # if (defined __cplusplus && ! defined _STDLIB_H \
303 && ! ((defined YYMALLOC || defined malloc) \
304 && (defined YYFREE || defined free)))
311 # define YYMALLOC malloc
312 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
313 || defined __cplusplus || defined _MSC_VER)
319 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
320 || defined __cplusplus || defined _MSC_VER)
328 #if (! defined yyoverflow \
329 && (! defined __cplusplus \
330 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
340 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
344 # define YYSTACK_BYTES(N) \
345 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
346 + YYSTACK_GAP_MAXIMUM)
351 # if defined __GNUC__ && 1 < __GNUC__
352 # define YYCOPY(To, From, Count) \
353 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
355 # define YYCOPY(To, From, Count) \
359 for (yyi = 0; yyi < (Count); yyi++) \
360 (To)[yyi] = (From)[yyi]; \
371 # define YYSTACK_RELOCATE(Stack) \
374 YYSIZE_T yynewbytes; \
375 YYCOPY (&yyptr->Stack, Stack, yysize); \
376 Stack = &yyptr->Stack; \
377 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
378 yyptr += yynewbytes / sizeof (*yyptr); \
400 #define YYMAXUTOK 265
402 #define YYTRANSLATE(YYX) \
403 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
406 static const yytype_uint8 yytranslate[] =
408 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
440 static const yytype_uint8 yyprhs[] =
442 0, 0, 3, 7, 11, 14, 17, 20, 22, 24,
443 28, 31, 35, 38, 41, 43, 46, 48, 51, 55
447 static const yytype_int8 yyrhs[] =
449 12, 0, -1, 13, 14, 15, -1, 13, 7, 15,
450 -1, 13, 14, -1, 13, 7, -1, 14, 15, -1,
451 14, -1, 16, -1, 13, 5, 16, -1, 7, 16,
452 -1, 14, 5, 16, -1, 8, 16, -1, 15, 16,
453 -1, 17, -1, 17, 18, -1, 6, -1, 3, 6,
454 -1, 3, 4, 6, -1, 9, 6, 10, -1
458 static const yytype_uint8 yyrline[] =
460 0, 47, 47, 50, 55, 58, 63, 67, 71, 78,
461 87, 97, 106, 114, 122, 127, 135, 140, 146, 154
465 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
468 static const char *
const yytname[] =
470 "$end",
"error",
"$undefined",
"TOKEN_NUMBER",
"TOKEN_MULTIPLY",
471 "TOKEN_PLUS",
"TOKEN_NAME",
"TOKEN_BEGIN_PRODUCTS",
472 "TOKEN_BEGIN_MODIFIERS",
"TOKEN_BEGIN_COMPARTMENT",
473 "TOKEN_END_COMPARTMENT",
"$accept",
"reaction",
"substrates",
"products",
474 "modifiers",
"reactant",
"prereactant",
"compartment", 0
481 static const yytype_uint16 yytoknum[] =
483 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
489 static const yytype_uint8 yyr1[] =
491 0, 11, 12, 12, 12, 12, 12, 12, 13, 13,
492 14, 14, 15, 15, 16, 16, 17, 17, 17, 18
496 static const yytype_uint8 yyr2[] =
498 0, 2, 3, 3, 2, 2, 2, 1, 1, 3,
499 2, 3, 2, 2, 1, 2, 1, 2, 3, 3
505 static const yytype_uint8 yydefact[] =
507 0, 0, 16, 0, 0, 0, 7, 8, 14, 0,
508 17, 10, 1, 0, 5, 4, 0, 0, 6, 0,
509 15, 18, 9, 3, 2, 11, 12, 13, 0, 19
513 static const yytype_int8 yydefgoto[] =
515 -1, 4, 5, 6, 18, 27, 8, 20
520 #define YYPACT_NINF -8
521 static const yytype_int8 yypact[] =
523 2, 14, -8, 4, 11, 16, 7, -8, -7, 13,
524 -8, -8, -8, 4, -2, 7, 4, 4, 4, 20,
525 -8, -8, -8, 4, 4, -8, -8, -8, 12, -8
529 static const yytype_int8 yypgoto[] =
531 -8, -8, -8, 22, 10, 0, -8, -8
538 #define YYTABLE_NINF -1
539 static const yytype_uint8 yytable[] =
541 7, 1, 19, 11, 2, 1, 17, 1, 2, 3,
542 2, 12, 16, 22, 11, 17, 25, 26, 9, 21,
543 10, 13, 29, 14, 23, 24, 28, 15
546 static const yytype_uint8 yycheck[] =
548 0, 3, 9, 3, 6, 3, 8, 3, 6, 7,
549 6, 0, 5, 13, 14, 8, 16, 17, 4, 6,
550 6, 5, 10, 7, 14, 15, 6, 5
555 static const yytype_uint8 yystos[] =
557 0, 3, 6, 7, 12, 13, 14, 16, 17, 4,
558 6, 16, 0, 5, 7, 14, 5, 8, 15, 9,
559 18, 6, 16, 15, 15, 16, 16, 16, 6, 10
562 #define yyerrok (yyerrstatus = 0)
563 #define yyclearin (yychar = YYEMPTY)
567 #define YYACCEPT goto yyacceptlab
568 #define YYABORT goto yyabortlab
569 #define YYERROR goto yyerrorlab
576 #define YYFAIL goto yyerrlab
578 #define YYRECOVERING() (!!yyerrstatus)
580 #define YYBACKUP(Token, Value) \
582 if (yychar == YYEMPTY && yylen == 1) \
586 yytoken = YYTRANSLATE (yychar); \
592 yyerror (YY_("syntax error: cannot back up")); \
599 #define YYERRCODE 256
606 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
607 #ifndef YYLLOC_DEFAULT
608 # define YYLLOC_DEFAULT(Current, Rhs, N) \
612 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
613 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
614 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
615 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
619 (Current).first_line = (Current).last_line = \
620 YYRHSLOC (Rhs, 0).last_line; \
621 (Current).first_column = (Current).last_column = \
622 YYRHSLOC (Rhs, 0).last_column; \
632 #ifndef YY_LOCATION_PRINT
633 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
634 # define YY_LOCATION_PRINT(File, Loc) \
635 fprintf (File, "%d.%d-%d.%d", \
636 (Loc).first_line, (Loc).first_column, \
637 (Loc).last_line, (Loc).last_column)
639 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
647 # define YYLEX yylex (YYLEX_PARAM)
649 # define YYLEX yylex ()
657 # define YYFPRINTF fprintf
660 # define YYDPRINTF(Args) \
666 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
670 YYFPRINTF (stderr, "%s ", Title); \
671 yy_symbol_print (stderr, \
673 YYFPRINTF (stderr, "\n"); \
683 #if (defined __STDC__ || defined __C99__FUNC__ \
684 || defined __cplusplus || defined _MSC_VER)
686 yy_symbol_value_print(FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep)
689 yy_symbol_value_print(yyoutput, yytype, yyvaluep)
692 YYSTYPE const * const yyvaluep;
702 YYPRINT(yyoutput, yytoknum[yytype], *yyvaluep);
720 #if (defined __STDC__ || defined __C99__FUNC__ \
721 || defined __cplusplus || defined _MSC_VER)
723 yy_symbol_print(FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep)
726 yy_symbol_print(yyoutput, yytype, yyvaluep)
729 YYSTYPE const * const yyvaluep;
734 YYFPRINTF(yyoutput,
"token %s (", yytname[yytype]);
736 YYFPRINTF(yyoutput,
"nterm %s (", yytname[yytype]);
738 yy_symbol_value_print(yyoutput, yytype, yyvaluep);
739 YYFPRINTF(yyoutput,
")");
747 #if (defined __STDC__ || defined __C99__FUNC__ \
748 || defined __cplusplus || defined _MSC_VER)
750 yy_stack_print(yytype_int16 *bottom, yytype_int16 *top)
753 yy_stack_print(bottom, top)
754 yytype_int16 *bottom;
758 YYFPRINTF(stderr,
"Stack now");
760 for (; bottom <= top; ++bottom)
761 YYFPRINTF(stderr,
" %d", *bottom);
763 YYFPRINTF(stderr,
"\n");
766 # define YY_STACK_PRINT(Bottom, Top) \
769 yy_stack_print ((Bottom), (Top)); \
777 #if (defined __STDC__ || defined __C99__FUNC__ \
778 || defined __cplusplus || defined _MSC_VER)
780 yy_reduce_print(YYSTYPE *yyvsp,
int yyrule)
783 yy_reduce_print(yyvsp, yyrule)
788 int yynrhs = yyr2[yyrule];
790 unsigned long int yylno = yyrline[yyrule];
791 YYFPRINTF(stderr,
"Reducing stack by rule %d (line %lu):\n",
795 for (yyi = 0; yyi < yynrhs; yyi++)
797 fprintf(stderr,
" $%d = ", yyi + 1);
798 yy_symbol_print(stderr, yyrhs[yyprhs[yyrule] + yyi],
799 &(yyvsp[(yyi + 1) - (yynrhs)])
801 fprintf(stderr,
"\n");
805 # define YY_REDUCE_PRINT(Rule) \
808 yy_reduce_print (yyvsp, Rule); \
815 # define YYDPRINTF(Args)
816 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
817 # define YY_STACK_PRINT(Bottom, Top)
818 # define YY_REDUCE_PRINT(Rule)
824 # define YYINITDEPTH 200
835 # define YYMAXDEPTH 10000
843 # if defined __GLIBC__ && defined _STRING_H
844 # define yystrlen strlen
847 #if (defined __STDC__ || defined __C99__FUNC__ \
848 || defined __cplusplus || defined _MSC_VER)
850 yystrlen(
const char *yystr)
859 for (yylen = 0; yystr[yylen]; yylen++)
868 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
869 # define yystpcpy stpcpy
873 #if (defined __STDC__ || defined __C99__FUNC__ \
874 || defined __cplusplus || defined _MSC_VER)
876 yystpcpy(
char *yydest,
const char *yysrc)
879 yystpcpy(yydest, yysrc)
885 const char *yys = yysrc;
887 while ((*yyd++ = *yys++) !=
'\0')
904 yytnamerr(
char *yyres,
const char *yystr)
909 char const *yyp = yystr;
916 goto do_not_strip_quotes;
921 goto do_not_strip_quotes;
940 do_not_strip_quotes: ;
944 return yystrlen(yystr);
946 return yystpcpy(yyres, yystr) - yyres;
958 yysyntax_error(
char *yyresult,
int yystate,
int yychar)
960 int yyn = yypact[yystate];
967 YYSIZE_T yysize0 = yytnamerr(0, yytname[yytype]);
970 int yysize_overflow = 0;
971 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
972 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
978 YY_(
"syntax error, unexpected %s");
979 YY_(
"syntax error, unexpected %s, expecting %s");
980 YY_(
"syntax error, unexpected %s, expecting %s or %s");
981 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s");
982 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s");
986 static char const yyunexpected[] =
"syntax error, unexpected %s";
987 static char const yyexpecting[] =
", expecting %s";
988 static char const yyor[] =
" or %s";
989 char yyformat[
sizeof yyunexpected
990 +
sizeof yyexpecting - 1
991 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
992 *(
sizeof yyor - 1))];
993 char const *yyprefix = yyexpecting;
997 int yyxbegin = yyn < 0 ? -yyn : 0;
1000 int yychecklim =
YYLAST - yyn + 1;
1004 yyarg[0] = yytname[
yytype];
1005 yyfmt = yystpcpy(yyformat, yyunexpected);
1007 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1008 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR)
1010 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1014 yyformat[
sizeof yyunexpected - 1] =
'\0';
1018 yyarg[yycount++] = yytname[yyx];
1019 yysize1 = yysize + yytnamerr(0, yytname[yyx]);
1020 yysize_overflow |= (yysize1 < yysize);
1022 yyfmt = yystpcpy(yyfmt, yyprefix);
1026 yyf =
YY_(yyformat);
1027 yysize1 = yysize + yystrlen(yyf);
1028 yysize_overflow |= (yysize1 < yysize);
1031 if (yysize_overflow)
1039 char *yyp = yyresult;
1042 while ((*yyp = *yyf) !=
'\0')
1044 if (*yyp ==
'%' && yyf[1] ==
's' && yyi < yycount)
1046 yyp += yytnamerr(yyp, yyarg[yyi++]);
1068 #if (defined __STDC__ || defined __C99__FUNC__ \
1069 || defined __cplusplus || defined _MSC_VER)
1071 yydestruct(
const char *yymsg,
int yytype, YYSTYPE *yyvaluep)
1098 #ifdef YYPARSE_PARAM
1099 #if defined __STDC__ || defined __cplusplus
1103 #if defined __STDC__ || defined __cplusplus
1125 #ifdef YYPARSE_PARAM
1126 #if (defined __STDC__ || defined __C99__FUNC__ \
1127 || defined __cplusplus || defined _MSC_VER)
1133 void *YYPARSE_PARAM;
1136 #if (defined __STDC__ || defined __C99__FUNC__ \
1137 || defined __cplusplus || defined _MSC_VER)
1158 char *yymsg = yymsgbuf;
1159 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1172 yytype_int16 *yyss = yyssa;
1173 yytype_int16 *yyssp;
1177 YYSTYPE *yyvs = yyvsa;
1182 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1195 YYDPRINTF((stderr,
"Starting parse\n"));
1223 if (yyss + yystacksize - 1 <= yyssp)
1226 YYSIZE_T yysize = yyssp - yyss + 1;
1233 YYSTYPE *yyvs1 = yyvs;
1234 yytype_int16 *yyss1 = yyss;
1241 yyoverflow(
YY_(
"memory exhausted"),
1242 &yyss1, yysize *
sizeof(*yyssp),
1243 &yyvs1, yysize *
sizeof(*yyvsp),
1251 # ifndef YYSTACK_RELOCATE
1252 goto yyexhaustedlab;
1257 goto yyexhaustedlab;
1265 yytype_int16 *yyss1 = yyss;
1270 goto yyexhaustedlab;
1275 # undef YYSTACK_RELOCATE
1283 yyssp = yyss + yysize - 1;
1284 yyvsp = yyvs + yysize - 1;
1287 YYDPRINTF((stderr,
"Stack size increased to %lu\n",
1288 (
unsigned long int) yystacksize));
1290 if (yyss + yystacksize - 1 <= yyssp)
1294 YYDPRINTF((stderr,
"Entering state %d\n", yystate));
1307 yyn = yypact[yystate];
1317 YYDPRINTF((stderr,
"Reading a token: "));
1321 if (yychar <=
YYEOF)
1323 yychar = yytoken =
YYEOF;
1324 YYDPRINTF((stderr,
"Now at end of input.\n"));
1336 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1362 if (yychar !=
YYEOF)
1375 yyn = yydefact[yystate];
1398 yyval = yyvsp[1-yylen];
1406 #line 48 "CChemEqParser.ypp"
1412 #line 51 "CChemEqParser.ypp"
1414 mReversibility = ((yyvsp[(2) - (3)])->name ==
"=") ?
true :
false;
1420 #line 56 "CChemEqParser.ypp"
1426 #line 59 "CChemEqParser.ypp"
1428 mReversibility = ((yyvsp[(2) - (2)])->name ==
"=") ?
true :
false;
1434 #line 64 "CChemEqParser.ypp"
1440 #line 68 "CChemEqParser.ypp"
1446 #line 72 "CChemEqParser.ypp"
1448 mSubstrateNames.push_back((yyvsp[(1) - (1)])->name);
1449 mSubstrateMult.push_back((yyvsp[(1) - (1)])->multiplicity);
1450 mSubstrateCompartments.push_back((yyvsp[(1) - (1)])->compartment);
1456 #line 79 "CChemEqParser.ypp"
1458 mSubstrateNames.push_back((yyvsp[(3) - (3)])->name);
1459 mSubstrateMult.push_back((yyvsp[(3) - (3)])->multiplicity);
1460 mSubstrateCompartments.push_back((yyvsp[(3) - (3)])->compartment);
1467 #line 88 "CChemEqParser.ypp"
1469 mReversibility = ((yyvsp[(1) - (2)])->name ==
"=") ?
true :
false;
1471 mProductNames.push_back((yyvsp[(2) - (2)])->name);
1472 mProductMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1473 mProductCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1480 #line 98 "CChemEqParser.ypp"
1482 mProductNames.push_back((yyvsp[(3) - (3)])->name);
1483 mProductMult.push_back((yyvsp[(3) - (3)])->multiplicity);
1484 mProductCompartments.push_back((yyvsp[(3) - (3)])->compartment);
1491 #line 107 "CChemEqParser.ypp"
1493 mModifierNames.push_back((yyvsp[(2) - (2)])->name);
1494 mModifierMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1495 mModifierCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1502 #line 115 "CChemEqParser.ypp"
1504 mModifierNames.push_back((yyvsp[(2) - (2)])->name);
1505 mModifierMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1506 mModifierCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1512 #line 123 "CChemEqParser.ypp"
1514 (yyval) = (yyvsp[(1) - (1)]);
1515 (yyval)->compartment =
"";
1520 #line 128 "CChemEqParser.ypp"
1522 (yyval) = (yyvsp[(1) - (2)]);
1523 (yyval)->compartment = (yyvsp[(2) - (2)])->name;
1529 #line 136 "CChemEqParser.ypp"
1531 (yyval) = (yyvsp[(1) - (1)]);
1532 (yyval)->multiplicity = 1.0;
1537 #line 141 "CChemEqParser.ypp"
1539 (yyval) = (yyvsp[(2) - (2)]);
1540 (yyval)->multiplicity =
strToDouble((yyvsp[(1) - (2)])->name.c_str(), NULL);
1546 #line 147 "CChemEqParser.ypp"
1548 (yyval) = (yyvsp[(3) - (3)]);
1549 (yyval)->multiplicity =
strToDouble((yyvsp[(1) - (3)])->name.c_str(), NULL);
1556 #line 155 "CChemEqParser.ypp"
1558 (yyval) = (yyvsp[(2) - (3)]);
1566 #line 1522 "CChemEqParser_yacc.cpp"
1585 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
1587 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1588 yystate = yytable[yystate];
1604 #if ! YYERROR_VERBOSE
1608 YYSIZE_T yysize = yysyntax_error(0, yystate, yychar);
1617 if (yymsg != yymsgbuf)
1623 yymsg_alloc = yyalloc;
1627 yymsg_alloc =
sizeof yymsgbuf;
1631 if (0 < yysize && yysize <= yymsg_alloc)
1633 (
void) yysyntax_error(yymsg, yystate, yychar);
1641 goto yyexhaustedlab;
1649 if (yyerrstatus == 3)
1654 if (yychar <=
YYEOF)
1657 if (yychar ==
YYEOF)
1701 yyn = yypact[yystate];
1722 yystos[yystate], yyvsp);
1776 while (yyssp != yyss)
1779 yystos[*yyssp], yyvsp);
1791 if (yymsg != yymsgbuf)
1796 return YYID(yyresult);
1800 #line 162 "CChemEqParser.ypp"
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
unsigned short int yytype_uint16
#define YY_REDUCE_PRINT(Rule)
static void yydestruct(yymsg, yytype, yyvaluep) const char *yymsg
#define TOKEN_BEGIN_COMPARTMENT
CChemEqParserBase::Data * yyvs
#define TOKEN_END_COMPARTMENT
#define TOKEN_BEGIN_PRODUCTS
double strToDouble(const char *str, char const **pTail)
#define YYSTACK_ALLOC_MAXIMUM
#define TOKEN_BEGIN_MODIFIERS
unsigned char yytype_uint8
#define YYSTACK_RELOCATE(Stack)
#define YY_STACK_PRINT(Bottom, Top)