I support your recommendation.  I've recently used ANTLR on a use-case
similar to this one and had a great experience.

  Raymie

On Wed, Jan 5, 2022 at 5:13 PM Oscar Westra van Holthe - Kind <
[email protected]> 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 <[email protected]>
>

Reply via email to