On Mon, Aug 22, 2022 at 07:42:39PM +0200, Martin Honnen scripsit:
On 22.08.2022 19:07, Graydon Saunders wrote:
I'm trying to test if some extracted sentences validate as productions of a particular context-free grammar expressed in a BNF dialect.
Is there an available implementation of a parser in XQuery that can do this?
In the context of Invisible XML https://invisiblexml.org/ I have heard that term "Earley" parser a lot but I am not familiar enough with the various implementations to tell whether all are "Earley" parsers, https://github.com/cmsmcq/Aparecium is an XQuery implementation of Invisible XML.
And thus interesting, but alas too slow for the application I have.
I think the various NineML tools by Norman Walsh use an Earley parser and are written in Java, there is an XPath/XQuery/XSLT extension for Saxon, so it should be possible to integrate that in BaseX, perhaps, too.
It would require someone who better understands Java than I don't, as it were. But the command line version of Coffeepot has some potential for the problem I've got.
Thank you!