[Top] [All Lists]

Re: Why the 822bis grammar is so painful

1999-02-09 16:41:47
I wrote my own message-header-format reference manual for the benefit of
future implementors, after I realized that 822bis had a different goal:

The feedback from other implementors has been overwhelmingly positive.
So I don't think that Newman's pessimism is justified.

Chris Newman writes:
The parsing details of RFC 822 were widely misimplemented in numerous ways
in the field.  The only reasonable conclusion was that the grammar model
in 822 was inadequate for real world needs.

No. Your conclusion doesn't explain the fact that most broken parsers
are unable to handle the _examples_ in RFC 822.

My conclusion, after several case studies, is that most message-format
interoperability problems are caused by implementors who don't know what
RFC 822 says. (Exception: Mark Crispin has read RFC 822 but insists that
DCA prohibited all the formats that Pine fails to recognize.)

Will 822bis be more inviting to implementors than 822? I doubt it. There
aren't enough examples; reading the grammar is an exercise in masochism;
the organization doesn't match the structure of common implementations.

the current grammar sufficies to determine if headers are valid or invalid;

No, it doesn't---the 822bis grammar still has bugs!

In December 1996, after Pete Resnick said that the point of his grammar
was automated verification, I suggested using C instead of ABNF. C code
can actually be tested and used. How many people have ABNF compilers?

I actually figured out the 822bis grammar changes necessary to resolve the
one-atom-vs-two parsing distinction for fun.

Great! Now show us the grammar changes necessary to prohibit fields such
as "To: anything I want".