Login  Register

Re: Asciidoc syntax definition

Posted by mojavelinux on Apr 01, 2015; 5:29pm
URL: https://discuss.asciidoctor.org/Asciidoc-syntax-definition-tp1920p2918.html


On Wed, Apr 1, 2015 at 7:23 PM, jirutka [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I think that PEG or parser combinators would be more sufficient for Asciidoc syntax than classic parser generator like ANTLR.

I was kind of thinking that too. In fact, even with an ANTLR grammar, we probably need to be able to parse it in a PEG style too.

What ANTLR gives us is a clear declaration of the grammer, though. PEG tends to mix the grammar and parser together, which makes it harder to see the choices. So perhaps we need to do both?

What's the tool of choice in the Java ecosystem for a PEG parser? I'm looking for something equivalent to Treetop from the Ruby ecosystem.