Login  Register

Re: Asciidoc syntax definition

Posted by asotobu on Apr 01, 2015; 6:35pm
URL: https://discuss.asciidoctor.org/Asciidoc-syntax-definition-tp1920p2920.html

Yes there is one tool

https://github.com/sirthias/parboiled/wiki/Java-Parser but I think antlr will help us to maintain a clear division between grammar and implementation


El dc., 1 d’abr., 2015 a les 19.30 mojavelinux [via Asciidoctor :: Discussion]
[hidden email]> va escriure:

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.

-Dan


--
Dan Allen | http://google.com/profiles/dan.j.allen
If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoc-syntax-definition-tp1920p2918.html
To unsubscribe from Asciidoc syntax definition, click here.
NAML