Re: Design of metalanguages (was: Re: Use of LWSP in ABNF -- consensus call)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 May 2007, John C Klensin wrote:
>
> I find grammatical metalanguages more understandable (and readable) when
> there is exactly one way to write a given construction (for example, no
> implied terms in ranges), when the constructions are very precisely
> defined, and when the number of constructions is kept to a clear
> minimum.

However you then go on to say that you like W-grammars, which tend to be
highly arcane, and ISO 14977, which includes lots of alternate puctuation
symbols. In fact, ISO 14977 has other disadvantages compared to RFC 4234:
it has a more cluttered syntax and weaker repetition operators. It also
has an exception operator which is extremely tricky: it has to be limited
in a clever language-theoretical way that is necessary to keep grammars
context-free, and it's very difficult to implement in a parser (almost no
parser-generators have a similar operator). By contrast, all the operators
of RFC 4234 are easy to implement in a parser or to desugar into what your
favourite parser generator supports.

> It is worth noting that ABNF's line-oriented structure makes ABNF much
> harder to construct in xml2rfc than is really reasonable.

That's a strange thing to say. The only place ABNF has strong opinions
about whitespace is at the end of a rule or a comment, where it requires
a newline that any sensible person would include anyway.

> Viewed that way, ABNF, at least as the IETF tries to use it, tends to
> encourage those in-between definitions: harder to understand than an
> informal description that relies a little bit less on syntax and more on
> prose, but not nearly as precise as a formal semantic definition that
> largely eliminates the need for the prose.

I tend to agree that the semi-formal use of ABNF is unhelpful - e.g. the
treatment of LWS in HTTP, where some grammar productions have implied *LWS
between tokens and some do not, making the grammar useless as a complete
formal description of the syntax. However this does not imply that "ABNF
is broken and should not be on the standards track", and switching to a
different formal syntax would not fix this problem. (Especially one like
ISO 14977 which is essentially equivalent to ABNF.)

The problem that started this thread is that the LWSP rule inherited from
the old message header format is too liberal. This is a problem for
protocols that choose to use this syntax, independenly of whether they
describe the syntax in ABNF. It would help future users of ABNF if the
specification did not implicitly endorse syntax that we now know to be
unwise.

Tony.
-- 
f.a.n.finch  <dot@xxxxxxxx>  http://dotat.at/
TYNE DOGGER: VARIABLE 3 OR 4 BECOMING SOUTHWEST 5 OR 6. SLIGHT OR MODERATE.
OCCASIONAL RAIN. MODERATE OR GOOD.

_______________________________________________

Ietf@xxxxxxxx
https://www1.ietf.org/mailman/listinfo/ietf

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]