ietf-822
[Top] [All Lists]

Re: obs-commas

2008-01-29 06:06:34

Pete Resnick wrote:

Here's all of the syntax in question:
group           =   display-name ":" [group-list] ";" [CFWS]
.......................................^..........^
ACK, I missed that the complete group-list is already optional.

Now, here's my new obs-mailbox syntax:
obs-mbox-list   =   *([CFWS] ",") mailbox *("," [mailbox / CFWS])

Looks good, unnecessary [CFWS] omitted using the leading and
trailing [CFWS] in <mailbox>, and at least one <mailbox> as
you wanted it...

The only thing not described by the above is a mailbox list
with no mailboxes at all (i.e., simply commas with optional
surrounding CFWS).

...or maybe not.  If no <mailbox> at all is okay, how about:

  obs-mbox-list   =   [mailbox] *("," [mailbox / CFWS])

But in -05 with <obs-commas> it was "at least one <mailbox>",
either in <mailbox-list> or in <obs-mbox-kist>.  The former
with one comma per <mailbox> pair, and the latter allowing
unnecessary commas.  

Parsing left to right it's no problem if each <mailbox-list>
also matches <obs-mbox-list>.

That's:
obs-group-list  =   1*([CFWS] ",") [CFWS]

I'm happy to simplify if possible. But so far, that's the
best I can do.

Maybe I now see what you are talking about:  If you drop the
"at least one" from <obs-mbox-list> you could eliminate the
complete <obs-group-list>.

Except from the one case covered by "1" in <obs-group-list>,
which still gives you "if nothing else at least one comma".

But you don't need "at least one comma", because "nothing"
and "only CFWS" are already covered (and not obsolete):

1: "nothing" is "no <group-list>" in [group-list] of <group>.
2: "only CFWS" is the explicit CFWS in <group-list>
3: "one <mailbox>, no comma" is covered by <mailbox-list>
4: "more than one <mailbox>, good commas" is <mailbox-list>
5: "more than one <mailbox>, ugly commas" is <obs-mbox-list>
6: "no <mailbox>, but commas" does not need "at least one".

Putting it all together I get:

| group           =   display-name ":" [group-list] ";" [CFWS]
: group-list      =   mailbox-list / CFWS
| mailbox-list    =   (mailbox *("," mailbox)) / obs-mbox-list
: obs-mbox-list   =   [mailbox] *("," [mailbox / CFWS])

No more <obs-group-list>, and if that's really okay you could
also get rid of <group-list>:

: group           =   display-name ":" [mailbox-list] ";" [CFWS]
: mailbox-list    =   (mailbox *("," mailbox)) / CFWS / obs-mbox-list
: obs-mbox-list   =   [mailbox] *("," [mailbox / CFWS])

 Frank