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

how to identify nested '>' correctly in antlr4?

Open 1014661165 opened this issue 3 years ago • 1 comments

for example, in java: Map<List<String>> will be parsed incorrectly because antlr4 greedy match '>' in word segmentation process. there are a lot of circumstance like this. is there any solutions to solve this problem?

1014661165 avatar Sep 02 '22 09:09 1014661165

for example, in java: Map<List> will be parsed incorrectly

Please provide details on the problem.

  • Which grammar from grammars-v4/java/. There are three grammars there.
  • Please give the exact input used to reproduce the problem.

kaby76 avatar Sep 02 '22 09:09 kaby76