use of de.bmoth.antlr.BMoThParser.StartContext in project bmoth by hhu-stups.
the class Parser method getMachineAsSemanticAst.
public static MachineNode getMachineAsSemanticAst(String inputString) throws ParserException {
Parser parser = new Parser();
try {
StartContext start = parser.parseMachine(inputString);
List<String> warnings = CSTAnalyser.analyseConcreteSyntaxTree(start);
MachineNode machineNode = parser.getMachineAst(start);
machineNode.setWarnings(warnings);
TypeChecker.typecheckMachineNode(machineNode);
return machineNode;
} catch (ParseErrorException | TypeErrorException | ScopeException e) {
throw new ParserException(e);
}
}
Aggregations