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

On 28 November 2012 17:17, David J. Weller-Fahy
<dave-lists-public-markdown@weller-fahy.com> wrote:

> Definition follows (including a definition for a line break).
>
> SP ::= #x0020
>
> HT ::= #x0009
>
> WS ::= (SP | HT)
>
> CR ::= #x000D
>
> LF ::= #x000A
>
> EOL ::= (CR | LF | CR LF)

Omits the LF CR option which is in the wiki markup I posted?



>
> 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.


>
> TEXT ::= [^CR LF]  /* Is that syntactically correct? */
I think so, using W3C syntax

(expression)
[char options]

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


>
> 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?

>
> BLANKLINE ::= (WS* EOL)
>
> PARAGRAPH ::= (PARAPRE TEXT PARAPOST EOL BLANKLINE)

Need to include 'inlines' with text. optional.


>
> 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 []

I'll find a parser.

regards




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

Received on Wednesday, 28 November 2012 17:50:13 UTC