Open paranoid1996 opened 3 years ago
I used IDEA plugin to compile Java8Parser.g4 and Java8Lexer.g4 in go target. I want to parse jave in go,and my code like this:
lexer := parser.NewJava8Lexer(antlr.NewInputStream(content)) tokens := antlr.NewCommonTokenStream(lexer,0) java8Parser := parser.NewJava8Parser(tokens) tree := java8Parser.CompilationUnit() typeListener := listener.NewJavaFileTypeListener() walker := antlr.ParseTreeWalker{} walker.Walk(typeListener, tree)
but this line tree := java8Parser.CompilationUnit() runs too slow, I dont know why
tree := java8Parser.CompilationUnit()
Duplicate. See https://github.com/antlr/antlr4/pull/3243, https://github.com/antlr/antlr4/issues/2152, and other related issues.
I used IDEA plugin to compile Java8Parser.g4 and Java8Lexer.g4 in go target. I want to parse jave in go,and my code like this:
lexer := parser.NewJava8Lexer(antlr.NewInputStream(content)) tokens := antlr.NewCommonTokenStream(lexer,0) java8Parser := parser.NewJava8Parser(tokens) tree := java8Parser.CompilationUnit() typeListener := listener.NewJavaFileTypeListener() walker := antlr.ParseTreeWalker{} walker.Walk(typeListener, tree)
but this line
tree := java8Parser.CompilationUnit()
runs too slow, I dont know why