use of de.bmoth.antlr.BMoThParser.FormulaContext in project bmoth by hhu-stups.
the class Parser method getFormulaAsSemanticAst.
public static FormulaNode getFormulaAsSemanticAst(String inputString) throws ParserException {
Parser parser = new Parser();
try {
FormulaContext formulaContext;
formulaContext = parser.parseFormula(inputString);
List<String> warnings = CSTAnalyser.analyseConcreteSyntaxTree(formulaContext);
FormulaNode formulaNode = parser.getFormulaAst(formulaContext);
formulaNode.setWarnings(warnings);
TypeChecker.typecheckFormulaNode(formulaNode);
return formulaNode;
} catch (ParseErrorException | TypeErrorException | ScopeException e) {
throw new ParserException(e);
}
}
Aggregations