On Fri, 10 Oct 2003, Martin Stecher wrote:
you defined
structure = "{" [anonym-parameters] [CRLF named-parameters CRLF] "}"
but in OCP-Core you did now type
structure = "{" [anonym-parameters] [CRLF named-parameters] "}"
Typo, or did you change your mind?
Oof. The change was not intentional, but I am now not sure what the
"right" syntax is. No trailing CRLF above is consistent with the
named-parameters syntax of the message itself because there a
named-parameter may be terminated by a ';' rather than CRLF:
message = name [SP anonym-parameters]
[CRLF named-parameters]
[CRLF CRLF payload]
";" CRLF
Adding a CRLF trailer to named-parameters would make it easier to
optimize parsing of named-parameters and would make the {structure}
look more consistent. A trailing CRLF is what our current examples use
as well. If we go down this path, we should change the above message
definition (again) to make CRLF named-parameter trailer mandatory
everywhere:
message = name [SP anonym-parameters]
( [CRLF named-parameters CRLF CRLF payload] | [CRLF CRLF payload] )
";" CRLF
Is there a more elegant/consistent way of doing this while keeping
one-liners and CRLF CRLF as a body indication? Or should we accept
some inconsistency and stick with a simpler:
message = name [SP anonym-parameters]
[CRLF named-parameters]
[CRLF CRLF payload]
";" CRLF
structure = "{" [anonym-parameters] [CRLF named-parameters CRLF] "}"
What's your preference?
Thanks,
Alex.