antlr4 -Dlanguage=JavaScript Java8.g4 -visitor
const input = JavaExampleFile.code
const chars = new antlr4.InputStream(input)
const lexer = new Java8Lexer.Java8Lexer(chars)
const tokens = new antlr4.CommonTokenStream(lexer)
const parser = new Java8Parser.Java8Parser(tokens)
parser.buildParseTrees = true
const tree = parser.compilationUnit()
compilationUnit
: packageDeclaration? importDeclaration* typeDeclaration* EOF
;
It seems that typeDeclaration
is causing the issue. The interesting thing is that everything works fine with Java but not with Java8.
Has anyone else dealt with this issue? Any help would be appreciated.
Hey Burt,that actually sounds pretty cool yeah, not too far away from what I am looking for I think. The times look great! The one thing I am wondering however, is whether you support Java8?