Hi Oscar, Have you noticed https://github.com/javacc/ ? It looks like a fork of the old JavaCC but with updates for Java 8. https://search.maven.org/artifact/org.javacc.generator/java/8.0.1/jar and https://search.maven.org/artifact/org.javacc.plugin/javacc-maven-plugin/3.0.3/maven-plugin have been released last April.
On Thu, Jan 6, 2022 at 12:13 AM Oscar Westra van Holthe - Kind < os...@westravanholthe.nl> wrote: > Hi everyone, > > One of the avro components in Java is the IDL parser. It is generated from > a grammar using JavaCC. This is an old library, that enforces Java 1.5 > syntax for the IDL class. What's worse, it is not really upgraded anymore. > > For now it works, but it's not suitable for maintaining a high quality > component. As a result, I've been looking for a replacement. > > Some alternatives to JavaCC are: > * JavaCC 21; written by a brilliant mind, but who has been out of > programming for a decade and returned a few years ago. JavaCC 21 lacks > maven support, and I cannot find it in Maven Central. > * CookCC; has a YACC-like syntax (quite archaic), and is at version > 0.something > * CUP (a Java based “Constructor of Useful Parsers”) generates more > powerful LALR parsers, which allows for grammars that are easier to read. > However, it was last released in Oktober 2015. > * ANTLR is actively developed (9 releases since 2017, last one November > 2021) and thus the most obvious choice, but requires ANTLR artifacts at > runtime (i.e. a 328kB extra runtime dependency for the IDL parser) > > Going forward, I suggest switching to ANTLR. > My reasons: > 1. It's actively maintained > 2. There is a Maven plugin, to generate the parser during the build > 3. I know where to find working examples > > Does anyone have a better/easier suggestion? > > Or should I continue with ANTLR? > > > Kind regards, > Oscar > > > -- > Oscar Westra van Holthe - Kind <os...@westravanholthe.nl> >