Re: EBNF was Re: [markdown-testsuite] Add End Of Line (EOL) definition/tests. (#1)

* Dave Pawson <dave.pawson@gmail.com> [2012-11-28 12:58 -0500]:
> On 28 November 2012 17:17, David J. Weller-Fahy
> <dave-lists-public-markdown@weller-fahy.com> wrote:
> > EOL ::= (CR | LF | CR LF)
> 
> Omits the LF CR option which is in the wiki markup I posted?

Fixed in Wiki, thanks.

> > LB ::= (SP SP EOL)
> 
> No, SP* EOL no max limit... Needs testing but I think WS may be valid
> too? Karl?  I would prefer meaningful symbols rather than two letter
> ones.... nit picking though.

Hrm... it was my understanding that a line break (HTML: <br />) would
replace two spaces at the end of a line.  Have to look that one up.

> > PARAPRE ::= (SP? SP? SP?)
> (sp){3}  ??? syntax? Where to find an ebnf checker for W3C syntax

0-3 spaces, and there is no (at the page I linked to) way to specify a
certain number of symbols, which is why I used the method I did.

> > PARAPOST ::= ([^#x0020] SP)
> 
> Whats this for? a para ends with para termination?  Initially lets
> ignore 'inlines' such as <br/> till we are sure of basics?

This means the last two characters of a paragraph can be either a
non-space and a space, or a non-space.  That covers the "paragraph
cannot end with more than one space", but it is not the paragraph
termination.  Although it could be elided with no damage to the rest,
we'd just ignor line breaks for now.

> > BLANKLINE ::= (WS* EOL)
> >
> > PARAGRAPH ::= (PARAPRE TEXT PARAPOST EOL BLANKLINE)
> 
> Need to include 'inlines' with text. optional.

I think those would be defined earlier in the spec, thus would be
replaced prior to getting to the paragraph section, although I may be
wrong.  Actually, the TEXT could include inlines... hrm.. have to think
on that.

> > How does that look?  I used the code-points inside brackets, because
> > [1] doesn't indicate that symbols may be used inside brackets.
> 
> I think it's expressions inside braces, code points / symbols inside
> []

Hrm... I'll have to get clarity on that point, as I usually take the
definition of EBNF to be: If it doesn't explicitly say it, you can't do
it.  I didn't see any use of symbols within square brackets, just
parentheses.

> I'll find a parser.

Excellent, I'll add an EBNF document to the github repository tonight.

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

Received on Wednesday, 28 November 2012 18:06:37 UTC