use of de.be4.classicalb.core.parser.BParser in project probparsers by bendisposto.
the class LTLFormulaVisitor method parseBPredicate.
private de.be4.classicalb.core.parser.node.Start parseBPredicate(String text) {
String bPredicate = "#PREDICATE " + text;
BParser parser = new BParser("Testing");
de.be4.classicalb.core.parser.node.Start start = null;
try {
start = parser.parse(bPredicate, false);
} catch (BCompoundException e) {
throw new LTLParseException(e.getMessage());
}
return start;
}
use of de.be4.classicalb.core.parser.BParser in project probparsers by bendisposto.
the class ASTPrologTest method checkProlog.
private void checkProlog(final int counter, final String bspec, final String expected) throws BCompoundException {
final BParser parser = new BParser("testcase");
if (remove_restrictions) {
parser.getOptions().setRestrictProverExpressions(false);
}
final Start startNode = parser.parse(bspec, false, new NoContentProvider());
checkAST(counter, expected, startNode);
}
use of de.be4.classicalb.core.parser.BParser in project probparsers by bendisposto.
the class ParseableButProblematicOnWindows method testParsable.
@Test
public void testParsable() throws Exception {
final BParser parser = new BParser(machine.getName());
Start start = parser.parseFile(machine, false);
start.apply(new PositionTester());
assertNotNull(start);
}
use of de.be4.classicalb.core.parser.BParser in project probparsers by bendisposto.
the class ParseableButProblematicOnWindowsWindowsLF method testParsable.
@Test
public void testParsable() throws Exception {
final BParser parser = new BParser(machine.getName());
Start start = parser.parseFile(machine, false);
start.apply(new PositionTester());
assertNotNull(start);
}
use of de.be4.classicalb.core.parser.BParser in project probparsers by bendisposto.
the class StructuralTest method testConstantsClause.
@Test
public void testConstantsClause() throws Exception {
final String testMachine = "MACHINE SimplyStructure\nCONSTANTS dd, e, Ff\nPROPERTIES dd : BOOL\nEND";
// System.out.println("Parsing: \"" + testMachine + "\":");
final BParser parser = new BParser("testcase");
final Start startNode = parser.parse(testMachine, false);
assertNotNull(startNode);
// TODO more tests
}
Aggregations