grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

error generate lexer and parser in java8 grammars

Open Lson-L opened this issue 3 years ago • 1 comments
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.

a

Lson-L avatar Dec 02 '21 06:12 Lson-L

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.

kaby76 avatar Dec 02 '21 12:12 kaby76