Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[asciidoc-wg] Start on formal grammar?

Has anyone taken a stab at starting a draft formal grammar for Asciidoc yet?

 

Libasciidoc has a PEG grammar, but it’s not complete, and probably is more focused on trying to be compatible with existing asciidoctor than being consistent.

 

I’m starting to enhance Libasciidoc (which is Go not Java of course), and I’d love to see us move to start working on an actual specification, as a common compatibility target.

 

If nobody else is working on a draft yet, I might be willing to try writing up some kind of first draft just we can have a starting point for discussion.

 

I might start with the PEG grammar used in Libasciidoc (with alterations to encompass parts that Libasciidoc is missing, as well as to tighten up a few areas that I think are probably a bit too loose).  Having said that, I’m not sure what kind of specification language folks prefer.  I’m old and so have experience with lex and yacc grammars, but these days I think folks prefer other forms (EBNF anyone – see https://www.w3.org/TR/REC-xml/#sec-notation)?

 

(Btw, my interest here mostly lies in being a user of this technology for my own documentation for unrelated technical documents.  But as a consequence of those needs, I’ve been drawn into implementation.)

 

Thoughts?


Back to the top