Search in sources :

Example 1 with LtlStartContext

use of de.bmoth.antlr.BMoThParser.LtlStartContext in project bmoth by hhu-stups.

the class Parser method getLTLFormulaAsSemanticAst.

public static LTLFormula getLTLFormulaAsSemanticAst(String inputString) throws ParserException {
    Parser parser = new Parser();
    try {
        LtlStartContext context;
        context = parser.parseLTLFormula(inputString);
        LTLFormula ltlFormulaAst = parser.getLTLFormulaAst(context);
        TypeChecker.typecheckLTLFormulaNode(ltlFormulaAst);
        return ltlFormulaAst;
    } catch (ParseErrorException | ScopeException | TypeErrorException e) {
        throw new ParserException(e);
    }
}
Also used : LTLFormula(de.bmoth.parser.ast.nodes.ltl.LTLFormula) TypeErrorException(de.bmoth.parser.ast.TypeErrorException) LtlStartContext(de.bmoth.antlr.BMoThParser.LtlStartContext) BMoThParser(de.bmoth.antlr.BMoThParser)

Aggregations

BMoThParser (de.bmoth.antlr.BMoThParser)1 LtlStartContext (de.bmoth.antlr.BMoThParser.LtlStartContext)1 TypeErrorException (de.bmoth.parser.ast.TypeErrorException)1 LTLFormula (de.bmoth.parser.ast.nodes.ltl.LTLFormula)1