We wrote something quite similar for Bouygues Telecom and based it on an ANTLR grammar [2].

It offers nested filtering out of the box. All feature-packed in a lightweight package.

[1]: https://github.com/bouyguestelecom/spl [2]: https://github.com/BouyguesTelecom/SPL/blob/main/src/antlr/S...

This looks excellent. It’s just missing some documentation on usage, otherwise, I’d actually have an immediate use case for it!