[RFC/RFT] Paragraph EBNF

For those unfamiliar, RFC means request for comments and RFT means
request for testing.

---

So, after a weekend of hard slogging through EBNF grammars, and other
arcane languages, along with a last-minute IRC meet with Dave P... we've
finally come up with an EBNF grammar which successfully captures most of
the requirements for Markdown paragraphs.

The one thing it doesn't capture (that I'm aware of) is the requirement
that the last paragraph in a document be considered complete if it ends
with any of the following.

- EOL followed by one or more blank lines (that is, any amount of spaces
  and tabs followed by an EOL).
- EOL followed by the EOF
- EOF

It was the uncertainty of that combination we were unable to capture, so
in this version *all* of the paragraphs (including the last one in the
Markdown file) must finish with EOL followed by one or more blank lines.

The version we devised is on the Wiki on the Core Profile page [1].

[1]: http://www.w3.org/community/markdown/wiki/EbnfGrammar

To try this grammar out, you can either use the online yacker where I've
saved the version on the wiki page [2], or download and install it
locally to play with it on the command line following the instructions
provided [3].

[2]: http://www.w3.org/2005/01/yacker/uploads/MdPARA?lang=perl
[3]: http://www.w3.org/1999/02/26-modules/User/Yacker

At this point I'm not sure how to get it to be a complete solution, and
am not even sure Markdown is definable in EBNF, so I'll take any
comments, critiques, and suggestions I can get.  Also tests, please. ;)

If this grows bigger I may see if Karl wants to include it in his github
repository, but until then I figure the Wiki will suffice.

Regards,
-- 
dave [ please don't CC me ]

Received on Wednesday, 5 December 2012 01:58:19 UTC