Re: Revisiting RFC 2822 grammar (obs-utext and unstructured)
Charles Lindsey <chl <at> clerew.man.ac.uk>
2004-02-04 12:44:19 GMT
In <402042BC.2050204 <at> verizon.net> Bruce Lilly <blilly <at> verizon.net> writes:
>unstructured = *(text [FWS])
> assuming unstructured fields are defined as in my revised grammar, e.g.
> comments = "Comments" ":" [FWS] unstructured CRLF
> (see discussion below)
> optionally one could define
> utext = *(text [FWS])
> and then define unstructured as utext, but what would be the point...
>obs-utext either as defined in 2822 or as above, i.e. empty, can start
> or end with obs-char, CR, or LF, but can't have CRLF pair
Yes, but that is getting a long way from what seems to be the established
convention that *text things consist of just a single character (or
perhaps a single character with some naked CF or LF attached).
>obs-unstructured = *(obs-utext FWS) [obs-utext]
> i.e. cannot have two adjacent instances of obs-utext strings (must
> have FWS separator), may have multiple adjacent FWS instances (since
> obs-utext may be empty, and in order to comply with the section 4
> normative text regarding parsing of WS-only continuation lines), may
> be empty, may begin or end with any obs-utext string or with FWS,
> any CRLF pair is followed by WS (as part of FWS)
And I don't think we want two adjacent FWS. Your revised grammar went to
much trouble to avoid adjacent CFWS (or FWS in some cases), and that was
seen as a great improvement. Now they seem to have come back in.
(Continue reading)