Re: Syntax notation for the spec

On Wed, Sep 12, 2012 at 9:08 AM, James Clark <jjc@jclark.com> wrote:
> At the moment, the spec uses the same notation as the XML Rec to describe
> the syntax.  Since we don't want to depend on the XML Rec, and the XML Rec's
> notation is not standardized anywhere, this means we need to have a
> substantial section of the spec that specifies this notation.
>
> Another possibility would be to use the standard IETF syntax notation, ABNF,
> which is described in its own RFC, RFC 5234.  This would have the advantage
> that we could eliminate the notation section in favour of a reference to RFC
> 5234. The JSON RFC, for example, uses ABNF.  However, ABNF has a couple of
> limitations that would make it a bit inconvenient. Most importantly, it
> doesn't have the difference operator (- in our notation), which we rely on
> quite heavily. Also literal strings in ABNF are case-insensitive; if you
> want a case-sensitive string, then you have to spell out it out in hex.
>
> Any opinions?

I am a fan of making the spec concise (and short), but conversely it
does not make sense choosing ABNF for the issues you have aptly
highlighted.

I always thought one of the challenges of generating a spec is
ensuring all consumers are comfortable with reading it.

In this case, I would stump for pushing all normative references and
definitions to the end of the document as a 'normative' appendix;
those who are not interested in such things are not forced to wade
through 'legalise' in the body of the spec.

J

Received on Wednesday, 12 September 2012 07:45:08 UTC