grammars-v4
grammars-v4 copied to clipboard
error generate lexer and parser in java8 grammars
trafficstars
I copy lexer and parser in https://github.com/antlr/grammars-v4/tree/master/java/java8 to my idea,but idea tip some error in parser, my antlr4 plugin version is 1.16.
This is not an error in the grammar. trgen generates a working parser for targets Java and CSharp. The problem is an error in setting up the IDE: if you look way, way up at the top of the screenshot, options { tokenVocab=Java8Lexer; } has an error. The IDE (Antlr4 generator) cannot find the Java8Lexer.g4 grammar. That's why it says below in the tip that you are trying to define a string literal in a parser grammar.