Search in sources :

Example 1 with ApexParser

use of apex.jorje.parser.impl.ApexParser in project pmd by pmd.

the class ApexLexerTest method testParser.

@Test
public void testParser() throws Exception {
    CharStream in = new ANTLRStringStream(CODE);
    ApexLexer lexer = new ApexLexer(in);
    ApexParser parser = new ApexParser(new CommonTokenStream(lexer));
    CompilationUnit compilationUnit = parser.compilationUnit();
    Assert.assertNotNull(compilationUnit);
}
Also used : ANTLRStringStream(org.antlr.runtime.ANTLRStringStream) CompilationUnit(apex.jorje.data.ast.CompilationUnit) CommonTokenStream(org.antlr.runtime.CommonTokenStream) ApexLexer(apex.jorje.parser.impl.ApexLexer) ApexParser(apex.jorje.parser.impl.ApexParser) CharStream(org.antlr.runtime.CharStream) Test(org.junit.Test)

Aggregations

CompilationUnit (apex.jorje.data.ast.CompilationUnit)1 ApexLexer (apex.jorje.parser.impl.ApexLexer)1 ApexParser (apex.jorje.parser.impl.ApexParser)1 ANTLRStringStream (org.antlr.runtime.ANTLRStringStream)1 CharStream (org.antlr.runtime.CharStream)1 CommonTokenStream (org.antlr.runtime.CommonTokenStream)1 Test (org.junit.Test)1