use of de.be4.ltl.core.parser.internal.UniversalToken in project probparsers by bendisposto.
the class CtlParser method parseFormula.
protected Start parseFormula(final String formula) throws LtlParseException, IOException {
StringReader reader = new StringReader(formula);
PushbackReader r = new PushbackReader(reader);
Lexer l = new CtlLexer(r);
Parser p = new Parser(l);
Start ast = null;
try {
ast = p.parse();
} catch (ParserException e) {
final UniversalToken token = UniversalToken.createToken(e.getToken());
throw new LtlParseException(token, e.getLocalizedMessage());
} catch (LexerException e) {
throw new LtlParseException(null, e.getLocalizedMessage());
}
return ast;
}
use of de.be4.ltl.core.parser.internal.UniversalToken in project probparsers by bendisposto.
the class LtlParser method parseFormula.
protected Start parseFormula(final String formula) throws LtlParseException, IOException {
StringReader reader = new StringReader(formula);
PushbackReader r = new PushbackReader(reader);
Lexer l = new LtlLexer(r);
Parser p = new Parser(l);
Start ast = null;
try {
ast = p.parse();
} catch (ParserException e) {
final UniversalToken token = UniversalToken.createToken(e.getToken());
throw new LtlParseException(token, e.getLocalizedMessage());
} catch (LexerException e) {
throw new LtlParseException(null, e.getLocalizedMessage());
}
return ast;
}
Aggregations