use of org.vcell.model.bngl.ASTMolecularTypePattern in project vcell by virtualcell.
the class RbmUtils method parseMolecularType.
public static MolecularType parseMolecularType(String inputString) throws ParseException {
try {
BNGLParser parser = new BNGLParser(new StringReader(inputString));
ASTMolecularTypePattern astMolecularPattern = parser.MolecularTypePattern();
BnglObjectConstructionVisitor constructionVisitor = new BnglObjectConstructionVisitor();
MolecularType molecularType = (MolecularType) astMolecularPattern.jjtAccept(constructionVisitor, null);
return molecularType;
} catch (Throwable ex) {
ex.printStackTrace();
throw new ParseException(ex.getMessage());
}
}
Aggregations