Hi,
There seems to be an ambiguity in the SIP ABNF
See grammar below:
----------------------------------------------------------------
accept-range = media-range *(SEMI accept-param)
media-range = ( "*/*
/ ( m-type SLASH "*" )
/ ( m-type SLASH m-subtype )
) *( SEMI m-parameter )
m-parameter = m-attribute EQUAL m-value
m-attribute = token
m-value = token / quoted-string
accept-param = ("q" EQUAL qvalue) / generic-param
qvalue = ( "0" [ "." 0*3DIGIT ] )
/ ( "1" [ "." 0*3("0") ] )
generic-param = token [ EQUAL gen-value ]
gen-value = token / host / quoted-string
----------------------------------------------------------------
An instance of ambiguity is when the accept-range construct has the
following structure -
*/*;abc=10;abc=10
In the above text string, "*/*" is the first part of media-range.
But what about the text which follows - ";abc=10" ? It conforms to the
grammar of m-parameter (by the rule "m-attribute EQUAL m-value" which can be
of the type "token EQUAL token"). BUT it also conforms to the grammar of
accept-param (by the rule "generic-param" which can be of the type "token
EQUAL token").
Since *(SEMI m-parameter) as well as *(SEMI accept-param) can be optional,
which grammar rules do the ";abc=10" texts belong to - the *(SEMI
m-parameter) OR the *(SEMI accept-param)???
One way to get around the ambiguity would be to change the rule for
media-range as follows -
media-range = ( "*/*
/ ( m-type SLASH "*" )
/ ( m-type SLASH m-subtype )
) *( HYPHEN m-parameter )
Has anyone else faced this issue? Any help on this would be appreciated.
Thanks,
pavitra
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors