BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
587 stars 165 forks source link

Java/ANTLR: example C fails to build with Java 20 due to case mismatch #455

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago

ANTLR/Java does not deal well with a parser name cParser because with Java 20 cParserListerner becomes an unbound symbol. The lower case c is due to the package name sanitization introduced in:

So this problem exists since 2.8.4, but many only surfaced with recent Java versions that are more strict with case.

A solution is to use a capitial CamelCase for the prefix of Parser and Lexer, but keep the snake_case for the package name.