use of abs.frontend.antlr.parser.ABSParserWrapper in project abstools by abstools.
the class ParserTest method entry_deltadecl.
@Test
public void entry_deltadecl() throws Exception {
CompilationUnit u = new ABSParserWrapper().parse(new StringReader("delta Mon;"));
DeltaDecl d = (DeltaDecl) u.getDeltaDecl(0);
Assert.assertNotNull(d);
}
use of abs.frontend.antlr.parser.ABSParserWrapper in project abstools by abstools.
the class ParserTest method testIllegalCharacter.
@Test(expected = ParseException.class)
public void testIllegalCharacter() throws Exception {
String functionDecl = "module LexicalTest; def Bool æåëßfë() = True;";
new ABSParserWrapper(null, true, false).parse(new StringReader(functionDecl));
}
use of abs.frontend.antlr.parser.ABSParserWrapper in project abstools by abstools.
the class PrettyPrinterTests method prettyPrinterAddDataTypeModifierTest.
@Test
public void prettyPrinterAddDataTypeModifierTest() throws Exception {
String deltaDecl = "delta Foo;adds data States=F|B|I|M;";
DeltaDecl d = (DeltaDecl) new ABSParserWrapper(null, true, false).parse(new StringReader(deltaDecl)).getDeltaDecl(0);
assertEquals("deltaFoo;addsdataStates=F|B|I|M;", replaceWhitespaceChars(prettyPrint(d)));
}
use of abs.frontend.antlr.parser.ABSParserWrapper in project abstools by abstools.
the class ParserTest method deltaNameLowerCaseTest.
@Test(expected = ParseException.class)
public void deltaNameLowerCaseTest() throws Exception {
String deltaDecl = "delta foo;";
new ABSParserWrapper(null, true, false).parse(new StringReader(deltaDecl));
}
Aggregations