use of de.be4.classicalb.core.parser.node.Node in project probparsers by bendisposto.
the class StructuralTest method checkForInvalidSemicolonBeforeEnd.
@Test
public void checkForInvalidSemicolonBeforeEnd() throws Exception {
String s = "MACHINE MissingSemicolon\nOPERATIONS\n Foo=BEGIN skip\n; END\nEND";
try {
getTreeAsString(s);
fail("Invalid Semicolon was not detected");
} catch (BCompoundException e) {
final CheckException cause = (CheckException) e.getCause();
Node node = cause.getNodes()[0];
assertEquals(4, node.getStartPos().getLine());
assertEquals(1, node.getStartPos().getPos());
assertTrue(e.getMessage().contains("Invalid semicolon after last substitution"));
}
}
use of de.be4.classicalb.core.parser.node.Node in project probparsers by bendisposto.
the class PrologGenerator method caseAActionLtl.
@Override
public void caseAActionLtl(final AActionLtl node) {
final Token token = node.getOperation();
p.openTerm("action");
helper.parseTransitionPredicate(UniversalToken.createToken(token));
p.closeTerm();
}
use of de.be4.classicalb.core.parser.node.Node in project probparsers by bendisposto.
the class PrologGenerator method caseAUnparsedLtl.
@Override
public void caseAUnparsedLtl(final AUnparsedLtl node) {
final Token token = node.getPredicate();
helper.caseUnparsed(UniversalToken.createToken(token));
}
use of de.be4.classicalb.core.parser.node.Node in project probparsers by bendisposto.
the class PrologGenerator method caseAAndFair2Ltl.
@Override
public void caseAAndFair2Ltl(final AAndFair2Ltl node) {
final PLtl left_node = node.getLeft();
final PLtl right_node = node.getRight();
helper.and_fair2(left_node, right_node, this);
}
use of de.be4.classicalb.core.parser.node.Node in project probparsers by bendisposto.
the class PrologGenerator method caseAAndFair1Ltl.
@Override
public void caseAAndFair1Ltl(final AAndFair1Ltl node) {
final PLtl left_node = node.getLeft();
final PLtl right_node = node.getRight();
helper.and_fair1(left_node, right_node, this);
}
Aggregations