COPASI API  4.16.103
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CChemEqParserBase Class Referenceabstract

#include <CChemEqParser.h>

Inheritance diagram for CChemEqParserBase:
Inheritance graph
[legend]
Collaboration diagram for CChemEqParserBase:
Collaboration graph
[legend]

Classes

struct  Data
 

Public Member Functions

 CChemEqParserBase ()
 
const std::vector< std::string > & getModifierCompartments () const
 
const std::vector< C_FLOAT64 > & getModifierMulitplicities () const
 
const std::vector< std::string > & getModifierNames () const
 
const std::vector< std::string > & getProductCompartments () const
 
const std::vector< C_FLOAT64 > & getProductMulitplicities () const
 
const std::vector< std::string > & getProductNames () const
 
const std::vector< std::string > & getSubstrateCompartments () const
 
const std::vector< C_FLOAT64 > & getSubstrateMulitplicities () const
 
const std::vector< std::string > & getSubstrateNames () const
 
const bool & isReversible () const
 
virtual int yylex ()=0
 
virtual int yyparse ()
 
virtual ~CChemEqParserBase ()
 

Protected Member Functions

void correctErrorPosition ()
 

Protected Attributes

std::vector< std::string > mModifierCompartments
 
std::vector< C_FLOAT64mModifierMult
 
std::vector< std::string > mModifierNames
 
DatampData
 
unsigned C_INT32 mPosition
 
std::vector< std::string > mProductCompartments
 
std::vector< C_FLOAT64mProductMult
 
std::vector< std::string > mProductNames
 
bool mReversibility
 
std::vector< std::string > mSubstrateCompartments
 
std::vector< C_FLOAT64mSubstrateMult
 
std::vector< std::string > mSubstrateNames
 

Detailed Description

This is a base class for the CChemEqParser adding member attributes to enhance the internal functionality.

Definition at line 48 of file CChemEqParser.h.

Constructor & Destructor Documentation

CChemEqParserBase::CChemEqParserBase ( )

Default constructor

Definition at line 19 of file CChemEqParser.cpp.

20  : mpData(NULL)
21 {}
CChemEqParserBase::~CChemEqParserBase ( )
virtual

Destructor

Definition at line 23 of file CChemEqParser.cpp.

24 {}

Member Function Documentation

void CChemEqParserBase::correctErrorPosition ( )
protected

Definition at line 56 of file CChemEqParser.cpp.

57 {return;}
const std::vector< std::string > & CChemEqParserBase::getModifierCompartments ( ) const

Definition at line 53 of file CChemEqParser.cpp.

References mModifierCompartments.

Referenced by CChemEqInterface::setChemEqString().

54 {return mModifierCompartments;}
std::vector< std::string > mModifierCompartments
const std::vector< C_FLOAT64 > & CChemEqParserBase::getModifierMulitplicities ( ) const

Definition at line 50 of file CChemEqParser.cpp.

References mModifierMult.

Referenced by CChemEqInterface::setChemEqString().

51 {return mModifierMult;}
std::vector< C_FLOAT64 > mModifierMult
const std::vector< std::string > & CChemEqParserBase::getModifierNames ( ) const

Definition at line 47 of file CChemEqParser.cpp.

References mModifierNames.

Referenced by CChemEqInterface::setChemEqString().

48 {return mModifierNames;}
std::vector< std::string > mModifierNames
const std::vector< std::string > & CChemEqParserBase::getProductCompartments ( ) const

Definition at line 44 of file CChemEqParser.cpp.

References mProductCompartments.

Referenced by CChemEqInterface::setChemEqString().

45 {return mProductCompartments;}
std::vector< std::string > mProductCompartments
const std::vector< C_FLOAT64 > & CChemEqParserBase::getProductMulitplicities ( ) const

Definition at line 41 of file CChemEqParser.cpp.

References mProductMult.

Referenced by CChemEqInterface::setChemEqString().

42 {return mProductMult;}
std::vector< C_FLOAT64 > mProductMult
const std::vector< std::string > & CChemEqParserBase::getProductNames ( ) const

Definition at line 38 of file CChemEqParser.cpp.

References mProductNames.

Referenced by CChemEqInterface::setChemEqString().

39 {return mProductNames;}
std::vector< std::string > mProductNames
const std::vector< std::string > & CChemEqParserBase::getSubstrateCompartments ( ) const
const std::vector< C_FLOAT64 > & CChemEqParserBase::getSubstrateMulitplicities ( ) const

Definition at line 32 of file CChemEqParser.cpp.

References mSubstrateMult.

Referenced by CChemEqInterface::setChemEqString().

33 {return mSubstrateMult;}
std::vector< C_FLOAT64 > mSubstrateMult
Definition: CChemEqParser.h:98
const std::vector< std::string > & CChemEqParserBase::getSubstrateNames ( ) const

Definition at line 29 of file CChemEqParser.cpp.

References mSubstrateNames.

Referenced by CChemEqInterface::setChemEqString(), CMetabNameInterface::splitDisplayName(), and CMetabNameInterface::unQuote().

30 {return mSubstrateNames;}
std::vector< std::string > mSubstrateNames
Definition: CChemEqParser.h:97
const bool & CChemEqParserBase::isReversible ( ) const

Definition at line 26 of file CChemEqParser.cpp.

References mReversibility.

Referenced by CChemEqInterface::setChemEqString().

27 {return mReversibility;}
virtual int CChemEqParserBase::yylex ( )
pure virtual

Implemented in CChemEqParser.

int CChemEqParserBase::yyparse ( )
virtual

Definition at line 1142 of file CChemEqParser_yacc.cpp.

References pdelete, strToDouble(), void(), YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, YYPACT_NINF, YYPOPSTACK, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSTYPE, YYTABLE_NINF, YYTERROR, and YYTRANSLATE.

Referenced by CChemEqInterface::isValidEq(), CChemEqInterface::setChemEqString(), CMetabNameInterface::splitDisplayName(), and CMetabNameInterface::unQuote().

1146 {
1147 
1148  int yystate;
1149  int yyn;
1150  int yyresult;
1151  /* Number of tokens to shift before error messages enabled. */
1152  int yyerrstatus;
1153  /* Look-ahead token as an internal (translated) token number. */
1154  int yytoken = 0;
1155 #if YYERROR_VERBOSE
1156  /* Buffer for error messages, and its allocated size. */
1157  char yymsgbuf[128];
1158  char *yymsg = yymsgbuf;
1159  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1160 #endif
1161 
1162  /* Three stacks and their tools:
1163  `yyss': related to states,
1164  `yyvs': related to semantic values,
1165  `yyls': related to locations.
1166 
1167  Refer to the stacks thru separate pointers, to allow yyoverflow
1168  to reallocate them elsewhere. */
1169 
1170  /* The state stack. */
1171  yytype_int16 yyssa[YYINITDEPTH];
1172  yytype_int16 *yyss = yyssa;
1173  yytype_int16 *yyssp;
1174 
1175  /* The semantic value stack. */
1176  YYSTYPE yyvsa[YYINITDEPTH];
1177  YYSTYPE *yyvs = yyvsa;
1178  YYSTYPE *yyvsp;
1179 
1180 
1181 
1182 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1183 
1184  YYSIZE_T yystacksize = YYINITDEPTH;
1185 
1186  /* The variables used to return semantic value and location from the
1187  action routines. */
1188  YYSTYPE yyval;
1189 
1190 
1191  /* The number of symbols on the RHS of the reduced rule.
1192  Keep to zero when no symbol should be popped. */
1193  int yylen = 0;
1194 
1195  YYDPRINTF((stderr, "Starting parse\n"));
1196 
1197  yystate = 0;
1198  yyerrstatus = 0;
1199  yynerrs = 0;
1200  yychar = YYEMPTY; /* Cause a token to be read. */
1201 
1202  /* Initialize stack pointers.
1203  Waste one element of value and location stack
1204  so that they stay on the same level as the state stack.
1205  The wasted elements are never initialized. */
1206 
1207  yyssp = yyss;
1208  yyvsp = yyvs;
1209 
1210  goto yysetstate;
1211 
1212  /*------------------------------------------------------------.
1213  | yynewstate -- Push a new state, which is found in yystate. |
1214  `------------------------------------------------------------*/
1215 yynewstate:
1216  /* In all cases, when you get here, the value and location stacks
1217  have just been pushed. So pushing a state here evens the stacks. */
1218  yyssp++;
1219 
1220 yysetstate:
1221  *yyssp = yystate;
1222 
1223  if (yyss + yystacksize - 1 <= yyssp)
1224  {
1225  /* Get the current used size of the three stacks, in elements. */
1226  YYSIZE_T yysize = yyssp - yyss + 1;
1227 
1228 #ifdef yyoverflow
1229  {
1230  /* Give user a chance to reallocate the stack. Use copies of
1231  these so that the &'s don't force the real ones into
1232  memory. */
1233  YYSTYPE *yyvs1 = yyvs;
1234  yytype_int16 *yyss1 = yyss;
1235 
1236 
1237  /* Each stack pointer address is followed by the size of the
1238  data in use in that stack, in bytes. This used to be a
1239  conditional around just the two extra args, but that might
1240  be undefined if yyoverflow is a macro. */
1241  yyoverflow(YY_("memory exhausted"),
1242  &yyss1, yysize * sizeof(*yyssp),
1243  &yyvs1, yysize * sizeof(*yyvsp),
1244 
1245  &yystacksize);
1246 
1247  yyss = yyss1;
1248  yyvs = yyvs1;
1249  }
1250 #else /* no yyoverflow */
1251 # ifndef YYSTACK_RELOCATE
1252  goto yyexhaustedlab;
1253 # else
1254 
1255  /* Extend the stack our own way. */
1256  if (YYMAXDEPTH <= yystacksize)
1257  goto yyexhaustedlab;
1258 
1259  yystacksize *= 2;
1260 
1261  if (YYMAXDEPTH < yystacksize)
1262  yystacksize = YYMAXDEPTH;
1263 
1264  {
1265  yytype_int16 *yyss1 = yyss;
1266  union yyalloc *yyptr =
1267  (union yyalloc *) YYSTACK_ALLOC(YYSTACK_BYTES(yystacksize));
1268 
1269  if (! yyptr)
1270  goto yyexhaustedlab;
1271 
1272  YYSTACK_RELOCATE(yyss);
1273  YYSTACK_RELOCATE(yyvs);
1274 
1275 # undef YYSTACK_RELOCATE
1276 
1277  if (yyss1 != yyssa)
1278  YYSTACK_FREE(yyss1);
1279  }
1280 # endif
1281 #endif /* no yyoverflow */
1282 
1283  yyssp = yyss + yysize - 1;
1284  yyvsp = yyvs + yysize - 1;
1285 
1286 
1287  YYDPRINTF((stderr, "Stack size increased to %lu\n",
1288  (unsigned long int) yystacksize));
1289 
1290  if (yyss + yystacksize - 1 <= yyssp)
1291  YYABORT;
1292  }
1293 
1294  YYDPRINTF((stderr, "Entering state %d\n", yystate));
1295 
1296  goto yybackup;
1297 
1298  /*-----------.
1299  | yybackup. |
1300  `-----------*/
1301 yybackup:
1302 
1303  /* Do appropriate processing given the current state. Read a
1304  look-ahead token if we need one and don't already have one. */
1305 
1306  /* First try to decide what to do without reference to look-ahead token. */
1307  yyn = yypact[yystate];
1308 
1309  if (yyn == YYPACT_NINF)
1310  goto yydefault;
1311 
1312  /* Not known => get a look-ahead token if don't already have one. */
1313 
1314  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1315  if (yychar == YYEMPTY)
1316  {
1317  YYDPRINTF((stderr, "Reading a token: "));
1318  yychar = YYLEX;
1319  }
1320 
1321  if (yychar <= YYEOF)
1322  {
1323  yychar = yytoken = YYEOF;
1324  YYDPRINTF((stderr, "Now at end of input.\n"));
1325  }
1326  else
1327  {
1328  yytoken = YYTRANSLATE(yychar);
1329  YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc);
1330  }
1331 
1332  /* If the proper action on seeing token YYTOKEN is to reduce or to
1333  detect an error, take that action. */
1334  yyn += yytoken;
1335 
1336  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1337  goto yydefault;
1338 
1339  yyn = yytable[yyn];
1340 
1341  if (yyn <= 0)
1342  {
1343  if (yyn == 0 || yyn == YYTABLE_NINF)
1344  goto yyerrlab;
1345 
1346  yyn = -yyn;
1347  goto yyreduce;
1348  }
1349 
1350  if (yyn == YYFINAL)
1351  YYACCEPT;
1352 
1353  /* Count tokens shifted since error; after three, turn off error
1354  status. */
1355  if (yyerrstatus)
1356  yyerrstatus--;
1357 
1358  /* Shift the look-ahead token. */
1359  YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc);
1360 
1361  /* Discard the shifted token unless it is eof. */
1362  if (yychar != YYEOF)
1363  yychar = YYEMPTY;
1364 
1365  yystate = yyn;
1366  *++yyvsp = yylval;
1367 
1368  goto yynewstate;
1369 
1370 
1371  /*-----------------------------------------------------------.
1372  | yydefault -- do the default action for the current state. |
1373  `-----------------------------------------------------------*/
1374 yydefault:
1375  yyn = yydefact[yystate];
1376 
1377  if (yyn == 0)
1378  goto yyerrlab;
1379 
1380  goto yyreduce;
1381 
1382 
1383  /*-----------------------------.
1384  | yyreduce -- Do a reduction. |
1385  `-----------------------------*/
1386 yyreduce:
1387  /* yyn is the number of a rule to reduce with. */
1388  yylen = yyr2[yyn];
1389 
1390  /* If YYLEN is nonzero, implement the default value of the action:
1391  `$$ = $1'.
1392 
1393  Otherwise, the following line sets YYVAL to garbage.
1394  This behavior is undocumented and Bison
1395  users should not rely upon it. Assigning to YYVAL
1396  unconditionally makes the parser a bit smaller, and it avoids a
1397  GCC warning that YYVAL may be used uninitialized. */
1398  yyval = yyvsp[1-yylen];
1399 
1400 
1401  YY_REDUCE_PRINT(yyn);
1402 
1403  switch (yyn)
1404  {
1405  case 2:
1406 #line 48 "CChemEqParser.ypp"
1407  {
1408  }
1409  break;
1410 
1411  case 3:
1412 #line 51 "CChemEqParser.ypp"
1413  {
1414  mReversibility = ((yyvsp[(2) - (3)])->name == "=") ? true : false;
1415  pdelete((yyvsp[(2) - (3)]));
1416  }
1417  break;
1418 
1419  case 4:
1420 #line 56 "CChemEqParser.ypp"
1421  {
1422  }
1423  break;
1424 
1425  case 5:
1426 #line 59 "CChemEqParser.ypp"
1427  {
1428  mReversibility = ((yyvsp[(2) - (2)])->name == "=") ? true : false;
1429  pdelete((yyvsp[(2) - (2)]));
1430  }
1431  break;
1432 
1433  case 6:
1434 #line 64 "CChemEqParser.ypp"
1435  {
1436  }
1437  break;
1438 
1439  case 7:
1440 #line 68 "CChemEqParser.ypp"
1441  {
1442  }
1443  break;
1444 
1445  case 8:
1446 #line 72 "CChemEqParser.ypp"
1447  {
1448  mSubstrateNames.push_back((yyvsp[(1) - (1)])->name);
1449  mSubstrateMult.push_back((yyvsp[(1) - (1)])->multiplicity);
1450  mSubstrateCompartments.push_back((yyvsp[(1) - (1)])->compartment);
1451  pdelete((yyvsp[(1) - (1)]));
1452  }
1453  break;
1454 
1455  case 9:
1456 #line 79 "CChemEqParser.ypp"
1457  {
1458  mSubstrateNames.push_back((yyvsp[(3) - (3)])->name);
1459  mSubstrateMult.push_back((yyvsp[(3) - (3)])->multiplicity);
1460  mSubstrateCompartments.push_back((yyvsp[(3) - (3)])->compartment);
1461  pdelete((yyvsp[(2) - (3)]));
1462  pdelete((yyvsp[(3) - (3)]));
1463  }
1464  break;
1465 
1466  case 10:
1467 #line 88 "CChemEqParser.ypp"
1468  {
1469  mReversibility = ((yyvsp[(1) - (2)])->name == "=") ? true : false;
1470 
1471  mProductNames.push_back((yyvsp[(2) - (2)])->name);
1472  mProductMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1473  mProductCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1474  pdelete((yyvsp[(1) - (2)]));
1475  pdelete((yyvsp[(2) - (2)]));
1476  }
1477  break;
1478 
1479  case 11:
1480 #line 98 "CChemEqParser.ypp"
1481  {
1482  mProductNames.push_back((yyvsp[(3) - (3)])->name);
1483  mProductMult.push_back((yyvsp[(3) - (3)])->multiplicity);
1484  mProductCompartments.push_back((yyvsp[(3) - (3)])->compartment);
1485  pdelete((yyvsp[(2) - (3)]));
1486  pdelete((yyvsp[(3) - (3)]));
1487  }
1488  break;
1489 
1490  case 12:
1491 #line 107 "CChemEqParser.ypp"
1492  {
1493  mModifierNames.push_back((yyvsp[(2) - (2)])->name);
1494  mModifierMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1495  mModifierCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1496  pdelete((yyvsp[(1) - (2)]));
1497  pdelete((yyvsp[(2) - (2)]));
1498  }
1499  break;
1500 
1501  case 13:
1502 #line 115 "CChemEqParser.ypp"
1503  {
1504  mModifierNames.push_back((yyvsp[(2) - (2)])->name);
1505  mModifierMult.push_back((yyvsp[(2) - (2)])->multiplicity);
1506  mModifierCompartments.push_back((yyvsp[(2) - (2)])->compartment);
1507  pdelete((yyvsp[(2) - (2)]));
1508  }
1509  break;
1510 
1511  case 14:
1512 #line 123 "CChemEqParser.ypp"
1513  {
1514  (yyval) = (yyvsp[(1) - (1)]);
1515  (yyval)->compartment = "";
1516  }
1517  break;
1518 
1519  case 15:
1520 #line 128 "CChemEqParser.ypp"
1521  {
1522  (yyval) = (yyvsp[(1) - (2)]);
1523  (yyval)->compartment = (yyvsp[(2) - (2)])->name;
1524  pdelete((yyvsp[(2) - (2)]));
1525  }
1526  break;
1527 
1528  case 16:
1529 #line 136 "CChemEqParser.ypp"
1530  {
1531  (yyval) = (yyvsp[(1) - (1)]);
1532  (yyval)->multiplicity = 1.0;
1533  }
1534  break;
1535 
1536  case 17:
1537 #line 141 "CChemEqParser.ypp"
1538  {
1539  (yyval) = (yyvsp[(2) - (2)]);
1540  (yyval)->multiplicity = strToDouble((yyvsp[(1) - (2)])->name.c_str(), NULL);
1541  pdelete((yyvsp[(1) - (2)]));
1542  }
1543  break;
1544 
1545  case 18:
1546 #line 147 "CChemEqParser.ypp"
1547  {
1548  (yyval) = (yyvsp[(3) - (3)]);
1549  (yyval)->multiplicity = strToDouble((yyvsp[(1) - (3)])->name.c_str(), NULL);
1550  pdelete((yyvsp[(1) - (3)]));
1551  pdelete((yyvsp[(2) - (3)]));
1552  }
1553  break;
1554 
1555  case 19:
1556 #line 155 "CChemEqParser.ypp"
1557  {
1558  (yyval) = (yyvsp[(2) - (3)]);
1559  pdelete((yyvsp[(1) - (3)]));
1560  pdelete((yyvsp[(3) - (3)]));
1561  }
1562  break;
1563 
1564 
1565  /* Line 1267 of yacc.c. */
1566 #line 1522 "CChemEqParser_yacc.cpp"
1567  default: break;
1568  }
1569 
1570  YY_SYMBOL_PRINT("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1571 
1572  YYPOPSTACK(yylen);
1573  yylen = 0;
1574  YY_STACK_PRINT(yyss, yyssp);
1575 
1576  *++yyvsp = yyval;
1577 
1578 
1579  /* Now `shift' the result of the reduction. Determine what state
1580  that goes to, based on the state we popped back to and the rule
1581  number reduced by. */
1582 
1583  yyn = yyr1[yyn];
1584 
1585  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1586 
1587  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1588  yystate = yytable[yystate];
1589  else
1590  yystate = yydefgoto[yyn - YYNTOKENS];
1591 
1592  goto yynewstate;
1593 
1594 
1595  /*------------------------------------.
1596  | yyerrlab -- here on detecting error |
1597  `------------------------------------*/
1598 yyerrlab:
1599 
1600  /* If not already recovering from an error, report this error. */
1601  if (!yyerrstatus)
1602  {
1603  ++yynerrs;
1604 #if ! YYERROR_VERBOSE
1605  yyerror(YY_("syntax error"));
1606 #else
1607  {
1608  YYSIZE_T yysize = yysyntax_error(0, yystate, yychar);
1609 
1610  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1611  {
1612  YYSIZE_T yyalloc = 2 * yysize;
1613 
1614  if (!(yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1615  yyalloc = YYSTACK_ALLOC_MAXIMUM;
1616 
1617  if (yymsg != yymsgbuf)
1618  YYSTACK_FREE(yymsg);
1619 
1620  yymsg = (char *) YYSTACK_ALLOC(yyalloc);
1621 
1622  if (yymsg)
1623  yymsg_alloc = yyalloc;
1624  else
1625  {
1626  yymsg = yymsgbuf;
1627  yymsg_alloc = sizeof yymsgbuf;
1628  }
1629  }
1630 
1631  if (0 < yysize && yysize <= yymsg_alloc)
1632  {
1633  (void) yysyntax_error(yymsg, yystate, yychar);
1634  yyerror(yymsg);
1635  }
1636  else
1637  {
1638  yyerror(YY_("syntax error"));
1639 
1640  if (yysize != 0)
1641  goto yyexhaustedlab;
1642  }
1643  }
1644 #endif
1645  }
1646 
1647 
1648 
1649  if (yyerrstatus == 3)
1650  {
1651  /* If just tried and failed to reuse look-ahead token after an
1652  error, discard it. */
1653 
1654  if (yychar <= YYEOF)
1655  {
1656  /* Return failure if at end of input. */
1657  if (yychar == YYEOF)
1658  YYABORT;
1659  }
1660  else
1661  {
1662  yydestruct("Error: discarding",
1663  yytoken, &yylval);
1664  yychar = YYEMPTY;
1665  }
1666  }
1667 
1668  /* Else will try to reuse look-ahead token after shifting the error
1669  token. */
1670  goto yyerrlab1;
1671 
1672 
1673  /*---------------------------------------------------.
1674  | yyerrorlab -- error raised explicitly by YYERROR. |
1675  `---------------------------------------------------*/
1676 yyerrorlab:
1677 
1678  /* Pacify compilers like GCC when the user code never invokes
1679  YYERROR and the label yyerrorlab therefore never appears in user
1680  code. */
1681  if (/*CONSTCOND*/ 0)
1682  goto yyerrorlab;
1683 
1684  /* Do not reclaim the symbols of the rule which action triggered
1685  this YYERROR. */
1686  YYPOPSTACK(yylen);
1687  yylen = 0;
1688  YY_STACK_PRINT(yyss, yyssp);
1689  yystate = *yyssp;
1690  goto yyerrlab1;
1691 
1692 
1693  /*-------------------------------------------------------------.
1694  | yyerrlab1 -- common code for both syntax error and YYERROR. |
1695  `-------------------------------------------------------------*/
1696 yyerrlab1:
1697  yyerrstatus = 3; /* Each real token shifted decrements this. */
1698 
1699  for (;;)
1700  {
1701  yyn = yypact[yystate];
1702 
1703  if (yyn != YYPACT_NINF)
1704  {
1705  yyn += YYTERROR;
1706 
1707  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1708  {
1709  yyn = yytable[yyn];
1710 
1711  if (0 < yyn)
1712  break;
1713  }
1714  }
1715 
1716  /* Pop the current state because it cannot handle the error token. */
1717  if (yyssp == yyss)
1718  YYABORT;
1719 
1720 
1721  yydestruct("Error: popping",
1722  yystos[yystate], yyvsp);
1723  YYPOPSTACK(1);
1724  yystate = *yyssp;
1725  YY_STACK_PRINT(yyss, yyssp);
1726  }
1727 
1728  if (yyn == YYFINAL)
1729  YYACCEPT;
1730 
1731  *++yyvsp = yylval;
1732 
1733 
1734  /* Shift the error token. */
1735  YY_SYMBOL_PRINT("Shifting", yystos[yyn], yyvsp, yylsp);
1736 
1737  yystate = yyn;
1738  goto yynewstate;
1739 
1740 
1741  /*-------------------------------------.
1742  | yyacceptlab -- YYACCEPT comes here. |
1743  `-------------------------------------*/
1744 yyacceptlab:
1745  yyresult = 0;
1746  goto yyreturn;
1747 
1748  /*-----------------------------------.
1749  | yyabortlab -- YYABORT comes here. |
1750  `-----------------------------------*/
1751 yyabortlab:
1752  yyresult = 1;
1753  goto yyreturn;
1754 
1755 #ifndef yyoverflow
1756  /*-------------------------------------------------.
1757  | yyexhaustedlab -- memory exhaustion comes here. |
1758  `-------------------------------------------------*/
1759 yyexhaustedlab:
1760  yyerror(YY_("memory exhausted"));
1761  yyresult = 2;
1762  /* Fall through. */
1763 #endif
1764 
1765 yyreturn:
1766 
1767  if (yychar != YYEOF && yychar != YYEMPTY)
1768  yydestruct("Cleanup: discarding lookahead",
1769  yytoken, &yylval);
1770 
1771  /* Do not reclaim the symbols of the rule which action triggered
1772  this YYABORT or YYACCEPT. */
1773  YYPOPSTACK(yylen);
1774  YY_STACK_PRINT(yyss, yyssp);
1775 
1776  while (yyssp != yyss)
1777  {
1778  yydestruct("Cleanup: popping",
1779  yystos[*yyssp], yyvsp);
1780  YYPOPSTACK(1);
1781  }
1782 
1783 #ifndef yyoverflow
1784 
1785  if (yyss != yyssa)
1786  YYSTACK_FREE(yyss);
1787 
1788 #endif
1789 #if YYERROR_VERBOSE
1790 
1791  if (yymsg != yymsgbuf)
1792  YYSTACK_FREE(yymsg);
1793 
1794 #endif
1795  /* Make sure YYID is used. */
1796  return YYID(yyresult);
1797 }
#define YYMAXDEPTH
#define YYSTACK_BYTES(N)
#define pdelete(p)
Definition: copasi.h:215
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YYSIZE_T
static const yytype_uint8 yydefact[]
std::vector< std::string > mModifierCompartments
#define YYLEX
#define YYSTACK_ALLOC
#define YYINITDEPTH
#define YY_REDUCE_PRINT(Rule)
#define YYTERROR
#define yychar
#define YYFINAL
static void yydestruct(yymsg, yytype, yyvaluep) const char *yymsg
#define yyerror
static const yytype_uint8 yyr2[]
#define YYACCEPT
static const yytype_uint8 yytable[]
#define YYSTACK_FREE
#define yynerrs
static const yytype_uint8 yyr1[]
std::vector< std::string > mProductNames
std::vector< C_FLOAT64 > mModifierMult
#define YYSTYPE
static const yytype_int8 yypgoto[]
std::vector< C_FLOAT64 > mSubstrateMult
Definition: CChemEqParser.h:98
short int yytype_int16
() void(yyvaluep))
std::vector< std::string > mSubstrateNames
Definition: CChemEqParser.h:97
static const yytype_int8 yypact[]
std::vector< std::string > mSubstrateCompartments
Definition: CChemEqParser.h:99
#define YYEMPTY
static const yytype_int8 yydefgoto[]
std::vector< C_FLOAT64 > mProductMult
#define YYLAST
static const yytype_uint8 yystos[]
#define YYEOF
#define YYTABLE_NINF
double strToDouble(const char *str, char const **pTail)
Definition: utility.cpp:325
#define YYDPRINTF(Args)
#define YYPOPSTACK(N)
#define YYSTACK_ALLOC_MAXIMUM
std::vector< std::string > mModifierNames
#define YYPACT_NINF
#define YYABORT
#define YYID(n)
std::vector< std::string > mProductCompartments
static const yytype_uint8 yycheck[]
#define YYSTACK_RELOCATE(Stack)
#define YY_STACK_PRINT(Bottom, Top)
#define YYTRANSLATE(YYX)
#define YYNTOKENS
#define yylval
#define YY_(msgid)

Member Data Documentation

std::vector< std::string > CChemEqParserBase::mModifierCompartments
protected

Definition at line 107 of file CChemEqParser.h.

Referenced by getModifierCompartments().

std::vector< C_FLOAT64 > CChemEqParserBase::mModifierMult
protected

Definition at line 106 of file CChemEqParser.h.

Referenced by getModifierMulitplicities().

std::vector< std::string > CChemEqParserBase::mModifierNames
protected

Definition at line 105 of file CChemEqParser.h.

Referenced by getModifierNames().

Data* CChemEqParserBase::mpData
protected

Definition at line 92 of file CChemEqParser.h.

unsigned C_INT32 CChemEqParserBase::mPosition
protected

Definition at line 94 of file CChemEqParser.h.

std::vector< std::string > CChemEqParserBase::mProductCompartments
protected

Definition at line 103 of file CChemEqParser.h.

Referenced by getProductCompartments().

std::vector< C_FLOAT64 > CChemEqParserBase::mProductMult
protected

Definition at line 102 of file CChemEqParser.h.

Referenced by getProductMulitplicities().

std::vector< std::string > CChemEqParserBase::mProductNames
protected

Definition at line 101 of file CChemEqParser.h.

Referenced by getProductNames().

bool CChemEqParserBase::mReversibility
protected

Definition at line 95 of file CChemEqParser.h.

Referenced by isReversible().

std::vector< std::string > CChemEqParserBase::mSubstrateCompartments
protected

Definition at line 99 of file CChemEqParser.h.

Referenced by getSubstrateCompartments().

std::vector< C_FLOAT64 > CChemEqParserBase::mSubstrateMult
protected

Definition at line 98 of file CChemEqParser.h.

Referenced by getSubstrateMulitplicities().

std::vector< std::string > CChemEqParserBase::mSubstrateNames
protected

Definition at line 97 of file CChemEqParser.h.

Referenced by getSubstrateNames().


The documentation for this class was generated from the following files: