[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: simple ?= 1-line multiline, redux



> should a single-line multiline argument be considered
> equivalent to a simple argument?  for example:
> 
>   #$#x-foo 12345 bar: quux
> 
>   #$#x-foo 12345 bar*: "" _data-tag: 5
>   #$#* 5 bar: quux
>   #$#END
> 
There is currently nothing in the spec to suggest that these have anything
to do with each other (my comment at the time, I believe, was that if we
*wanted* them to have anything to do with each other, including forbidding
protocols from interpreting them differently, that would need to be made
explicit).

> another approach is to insist that bar: and bar*: do not specify the
> same argument with different _types_, but that they are actually
> separate arguments.  if this is true, then a message could
> theoretically have both a bar and a bar* argument with separate
> meanings.
> 
In fact, I think this is the only reasonable interpretation given the
following verbiage at the beginning of 2.2.1:

  Each argument to a message is named by a keyword.
  The keyword consists of an identifier (a string matching
  the <ident> nonterminal), optionally followed by an asterisk;

  if the asterisk is present, the value to follow is a multiline value.
  If no asterisk is present, the value is simple. 
  Messages may contain a mixture of simple and multiline values.

That is, the asterisk is part of the keyword, hence it is part of the
argument name.  bar and bar* are thus distinct keywords and therefore name
different arguments.  

Likewise, nothing forbids bar and bar* from appearing in the same message,
however in order for this to be a valid message for a given protocol, the
corresponding protocol specification will need to explicitly say that both
bar and bar* are valid arguments for that message.  

It may be confusing and it may not be quite what we want, but I don't think
it's ambiguous.