Correct! I just drawing attention that while implementing the whois server, we've also checked some rpsl parsers, and most of them failed the sanity checks, even for parsing.

As for interpreting the mp-export/import lines, those have a grammar that is also included in the rpsl parser in whois server, although only used for evaluating syntactic correctness. I think they also could form the basis of a more complex software.

By the way, at this point a generic solution becomes impossible as everyone wants to use the resulting expression tree differently, so it's always a custom work from the grammar upwards.

Cheers,
Agoston

On Mon, Aug 17, 2020 at 12:58 AM Nick Hilliard <nick@foobar.org> wrote:
Horváth Ágoston János wrote on 16/08/2020 19:57:> The ripe whois
database (https://github.com/RIPE-NCC/whois) has an
> excellent (=clean, performant and heavily tested) RPSL parser in it for
> java. It's minimal work to copy the package, or, since this is BSD
> licence, you could release a copy of it for others to use too.

yip but do I understand it correctly that this is a syntactic parser
only?  I.e. there is no semantic expression evaluator.  If this is the
case, you'd need a lot of glue to be able to convert rpsl expressions
into structures suitable for injection into templating engines.  This is
the hard bit in irrtoolset that wrecked everyones' heads.

Nick