ietf-822
[Top] [All Lists]

Re: Format=Flowed/RFC 2646 Bis (-03)

2003-11-19 16:07:07

At 9:43 AM +0000 11/19/03, Adam M. Costello wrote:

  > Note that the idea was to allow signature separator lines to be
  > quoted, but not stuffed unless also quoted.

 I failed to notice that subtlety.  Hmmm, are you sure that's what you
 want?  That would be the only place where quoting and stuffing are not
 orthogonal.

True, but then signature separator lines are a weird anomaly anyway. The RFC 2646 ABNF rules are clear that signature separator lines can't be stuffed unless they are also quoted, so I just carried that forward in the update.

 It looks like it might be asking for trouble.  Consider
 this format=flowed message body:

 Foo
  --
 bar.

 The first two lines end with a space, and the third does not.  According
 to your definition of separator lines, this is a single paragraph,
 because the middle line is a flowed line, not a separator line.  But
 what happens if I try to quote that paragraph by inserting a quote
 indicator before each line:

Foo
 --
bar.

 According to your definition of separator lines, this is now an invalid
 format=flowed message body, because it contains a flowed line followed
 by a separator line.

True, but it would be rather foolish for a client to generate such a thing. Why would it choose to wrap immediately before and after a SPACE DASH DASH SPACE sequence?


  > The suggested definitions for flowed lines attempt to eliminate the
 ambiguity between a flowed line and a signature separator but I don't
 think they allow for all cases of flowed lines.

 I wouldn't be surprised if I made a mistake in that tricky part of the
 grammar, but can you produce a concrete example of a line that ought to
 be flowed and doesn't match my suggested flowed-line production?  That
 would be the surest way to expose the problem.

 It's also possible that the grammar is correct, but structured in a
 confusing way.  If that's the case, I welcome suggestions for less
 confusing ways of expressing the same syntax.

 For convenience, here's another copy of the relevant parts of the
 grammar that I suggested:

 flowed-line       = quote (stuff stuffed-flowed / unstuffed-flowed) flow CRLF
 stuffed-flowed    = [non-dash *text-char] /
                     "-" [non-dash *text-char / "-" 1*text-char]
                     ; Is not "--".
 unstuffed-flowed  = non-sp-quote-dash *text-char /
                     "-" [non-dash *text-char / "-" 1*text-char]
                     ; Not empty, not "--", does not begin with SP or ">".
 quote             = *">"
 stuff             = SP
 flow              = SP

I think it's a good idea to use parentheses to explicitly group the ABNF constructs, to avoid confusion. RFC 2234 recommends this as well.

So, taking your suggested 'unstuffed-flowed' to be

    unstuffed-flowed  = ( non-sp-quote-dash *text-char ) /
                    ( "-" [non-dash *text-char ) /
                    ( "-" 1*text-char] )

I think DASH DASH would match the third alternative for this 'unstuffed-flowed', since the first DASH matches the "-" and the second DASH matches text-char, and only one text-char is required. So a line of DASH DASH SPACE would match 'flowed-line'.

--
Randall Gellens
Opinions are personal;    facts are suspect;    I speak for myself only
-------------- Randomly-selected tag: ---------------
The well-bred contradict other people.  The wise contradict themselves.
                                                        --Oscar Wilde