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 Wednesday, 16 May, 2007 13:58 +0100 Tony Finch
<dot@xxxxxxxx> wrote:

>...
> I'm surprised you say ABNF has become too complex. It's hardly
> changed apart from removal of the # rule, and if you took
> anything else out it would lead to rather less readable
> grammars.

Tony,

First, my apologies in advance to everyone who doesn't care
about this subject (the change of subject line is a deliberate
clue).  From my point of view, the IETF made its decision around
ten years ago and it is questionable whether the decision then
could sensibly have departed significantly from the definition
is RFC 822.  While I didn't like the decision then and don't
like it now (perhaps the comments below will explain that), I
think it would be a serious mistake to open the question up
again.

This is a matter of taste, and perhaps generational.  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.     All things being equal, I like the
ability to construct a two-stage grammar (W-grammar) when that
seems to be justified by circumstances: ABNF does not permit
that, and the omission is one reason we keep having little
messes about comments in protocols whose syntax is defined in
ABNF.  Similarly, I prefer grammars that can be written as a
data stream without depending on line-ending (and indented
continuation) as important indicators.  It is worth noting that
ABNF's line-oriented structure makes ABNF much harder to
construct in xml2rfc than is really reasonable.

I've also got a second problem, which is that I'm more
comfortable with either informal descriptions that use formal
grammars for clarification or explanation for with fully-formal
grammatical descriptions (including semantics) than I am with
the in-between points.  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.   This is definitely
a personal idiosyncrasy: YMMD and probably does.

For those of you who are interested in what a syntax-only
metalanguage would look like that would better meet my personal
criteria, I'd encourage taking a look at ISO/IEC ISO/IEC
14977:1996 "Information technology -- Syntactic metalanguage --
Extended BNF".  It is a bit earlier than, but roughly
contemporary with, RFC 2234 and similar in enough ways that one
of them should probably be referencing the other (if one can
guess from timing, the ISO/BSI document should be acknowledging
RFC 822).   Unlike the ISO (and ISO/IEC JTC1) norms, this one is
actually freely available, see the link from
http://isotc.iso.org/livelink/livelink/fetch/2000/2489/Ittf_Home/ITTF.htm
For comparison purposes, while the introductory material is
interesting and helpful, the specification itself is only ten
pages long (although one needs to adjust for smaller type and
more page layout), including examples, and defines the
metalanguage three different ways.

But, again, this is all a matter of theorizing: I think it would
be a terrible idea to try to redesign or replace ABNF at this
point.

     john


_______________________________________________

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]