Re: Asciidoc syntax definition
Posted by
mojavelinux on
Sep 13, 2014; 6:53am
URL: https://discuss.asciidoctor.org/Asciidoc-syntax-definition-tp1920p2193.html
Andres,
There isn't an official one (in fact, AsciiDoc Python never defined one). As Alex points out, there is an attempt to start one, but it's very, very, very early on.
I think that a core goal of an AsciiDoc (or UniDoc) standard will be to define a grammar. I don't think it will be as hard as it seems, if we agree that some sacrifices/changes will have to be made. In fact, it's already very possible to define a grammar at the block level. It's the inline stuff that's going to be a bit trickier.
I have plans to start working on a Treetop-based grammar because we need it to fix some of the inline parsing inconsistencies today. Treetop is a PEG grammar parser. I think PEG is the right way to go because it keeps the grammar simple and makes implementations easy to write. However, I would also welcome an attempt to define the grammar in ANTLR.
-Dan