Correct me if I am wrong...
As I understand from your description format Accept field is as follows
Accept:*/*<m-type>/*<m-type>/<m-subtype>;<token1>=<token2>;q=<qvalue>,
q=<qvalue>accept-param of the accept-range should start with q=<value> whereas m-parameter's token EQUAL token should be qualified against media-range format -- i.e., parser needs to remember in which field "token EQUAL token" was discovered. Atleast I use this qualifier.
Benoit Thiery wrote:
Hello,
I would like to write a SIP parser. When analyzing RFC3261 grammar, I see one problem.
For the rules : Accept = "Accept" HCOLON [ accept-range *(COMMA accept-range) ] accept-range = media-range *(SEMI accept-param) media-range = ( "*/*" / ( m-type SLASH "*" ) / ( m-type SLASH m-subtype ) ) *( SEMI m-parameter ) accept-param = ("q" EQUAL qvalue) / generic-param
m-parameter = m-attribute EQUAL m-value m-attribute = token m-value = token / quoted-string
How can I distinguish an accept-param of the accept-range and an m-parameter of the media-range as they can both be any "token EQUAL token" and they are both separated by SEMI ?
Kind regards,
Benoit
_______________________________________________ Sip-implementors mailing list [EMAIL PROTECTED] http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
_______________________________________________ Sip-implementors mailing list [EMAIL PROTECTED] http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
