Subject: [Sip] Two more bis-07.9 BNF nits

From: Jonathan Lennox <[email-masked]>
Date: Tue, 19 Feb 2002 17:02:22 -0500

Two more bis-07.9 BNF nits; I think this is the last of them.

1.  The BNF for Accept requires that the 'q' parameter appear before any
    other parameter.  Even though RFC 2616 does this, it's inconsistent with
    the way things work anywhere else in SIP, and so should probably be fixed.

    Suggested BNF:

    Accept       = "Accept" HCOLON
                   ( accept-range *(COMMA accept-range) )
    accept-range = media-range *( SEMI accept-param)
    accept-param = ( "q" EQUAL qvalue ) / generic-param

    qvalue and generic-param should also probably move up to be defined near
    their first reference.

    The same syntax forms can be used for the generic parameters for
    Accept-Encoding and Accept-Language, which I mentioned in my earlier
    mail.

2.  User-Agent and Server seem to have been overlooked in the
    explicit-whitespace conversion -- there's nothing specifying LWS between
    consecutive 'product' values.

    One possible BNF representation would be

    Server          = "Server" HCOLON *( product LWS / comment )
                      ( product / comment )

    (and similarly for User-Agent)

    but this isn't quite right, I don't think; you need LWS between
    consecutive product tokens, but you don't need them between product and
    comment or vice-versa, as comment's inherent SWS is sufficient.  I'm not
    sure how exactly to specify this.

With these changes, my BNF parser is happy parsing the sample SIP messages
I've thrown at it.  I haven't tested complete coverage, but I'm pretty sure
all the high points have been hit.

-- 
Jonathan Lennox
[email-masked]

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 21 Feb 2002 04:34:09 -0500

>     Accept-Encoding and Accept-Language, which I mentioned in my earlier

Agreed. All fixed.

>     sure how exactly to specify this.

I think its reasonable here to say that there needs to be a mandatory
LWS between the product and comment, even if its not strictly necessary.
This would mean

Server = "Server" HCOLON server-value *(LWS server-value)
server-value = product / comment

Thanks,
Jonathan R.
-- 
Jonathan D. Rosenberg, Ph.D.            72 Eagle Rock Avenue
Chief Scientist                         First Floor
dynamicsoft                             East Hanover, NJ 07936
[email-masked]                 FAX: (973) 952-5050
http://www.jdrosen.net                  PH:  (973) 952-5000
http://www.dynamicsoft.com