[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ABNF or example error in RFC 5228
Magnus Westerlund wrote:
I am looking at the ABNF and not seeing anything wrong. Maybe I was
looking for too long at this.
When reviewing the ihave document I stumbled on what I believe to be a
bug in RFC 5228 regarding string list:
18.104.22.168. String Lists
When matching patterns, it is frequently convenient to match against
groups of strings instead of single strings. For this reason, a list
of strings is allowed in many tests, implying that if the test is
true using any one of the strings, then the test is true.
For instance, the test 'header :contains ["To", "Cc"]
["me@xxxxxxxxxxx", "me00@xxxxxxxxxxxxxxxxxx"]' is true if either a To
header or Cc header of the input message contains either of the email
addresses "me@xxxxxxxxxxx" or "me00@xxxxxxxxxxxxxxxxxx".
Conversely, in any case where a list of strings is appropriate, a
single string is allowed without being a member of a list: it is
equivalent to a list with a single member. This means that the test
'exists "To"' is equivalent to the test 'exists ["To"]'.
Section 3.2 for example contains the following example:
Example: require ["fileinto", "reject"];
However if one looks at the ABNF for string-list it says:
string-list = "[" string *("," string) "]" / string
; if there is only a single string, the brackets
; are optional
string = quoted-string / multi-line
quoted-string = DQUOTE quoted-text DQUOTE
multi-line = "text:" *(SP / HTAB) (hash-comment / CRLF)
*(multiline-literal / multiline-dotstart)
So can you elaborate on what you think is wrong?
So it seems that the description, the examples of string lists doesn't
match the ABNF syntax for string lists. If I am correct, I think the WG
needs to address this somehow.