Subject: [MMUSIC] draft-ietf-mmusic-image-attributes-04 ABNF

From: Ingemar Johansson S <[email-masked]>
Date: Wed, 28 Apr 2010 13:48:58 +0200

Hi

and thanks for the comments on the ABNF, I have now tried to fix this for the next update of the draft. I would however be very grateful for some extra sanity check before I submit a new draft. 

Below is what I've come up with.

I have limited the values for the x and y range between 1 and 999999
The values for sar and par are limited to between 0.2000 and 4.9999 (min 1 and max 4 decimal places)
The q-value is limited to between 0.00 and 1.00 (min 1 and max 2 decimal places)

Does the ABNF look reasonable ?, I find it unlikely that I got everything right (its easier to say "eyjafjallajökull" :-)

/Ingemar

       image-attr = "imageattr:" PT 1*2( 1*WSP ( "send" / "recv" )
                                         1*WSP attr-list )

       PT = 1*DIGIT / "*"
       attr-list = ( set *(1*WSP set) ) / "*"

       set= "[" "x=" xyrange "," "y=" xyrange [ ",sar=" sprange ]
             [ ",par=" sprange ] [ ",q=" qvalue ] "]"

       xyrange = ( "[" xyvalue ":" [ xyvalue ":" ] xyvalue "]" )
                  ; range between a lower and an upper value 
                  ; with an optional step, default step = 1			
               / ( "[" xyvalue 1*( "," xyvalue ) "]" ) 
			; discrete values separated by ','
       xyvalue = ( %x31-39 )
                  ; values between 1 and 9
               / ( "1" 1*5DIGIT )
                  ; values between 10 and 999999

       sprange = ( "[" spvalue 1*( "," spvalue ) "]" ) 
                  ; discrete values separated by ','
               / ( "[" spvalue "-" spvalue "]" )
                  ; range between a lower and an upper level (inclusive)
       spvalue = ( %x31-34 "." 1*4DIGIT )
                  ; values between 1.0000 and 4.9999
               / ( "0" "." ( %x32-39 ) *3DIGIT
                  ; values between 0.2000 and 0.9999
	
       qvalue  = ( "0" "." 1*2DIGIT )
               / ( "1" "." 1*2("0") )
                  ; values between 0.00 and 1.00

=================================
INGEMAR JOHANSSON  M.Sc. 
Senior Research Engineer 

Ericsson AB
Multimedia Technologies
Labratoriegränd 11
971 28, Luleå, Sweden
Phone +46-1071 43042
SMS/MMS +46-73 078 3289
[email-masked]
www.ericsson.com 
Visit http://labs.ericsson.com !
=================================

---

From: "Dan Wing" <[email-masked]>
Date: Wed, 28 Apr 2010 08:43:52 -0700

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Ingemar Johansson S
> Sent: Wednesday, April 28, 2010 4:49 AM
> To: [email-masked]; Dan Wing
> Cc: Cullen Jennings
> Subject: [MMUSIC] draft-ietf-mmusic-image-attributes-04 ABNF
> 
> Hi
> 
> and thanks for the comments on the ABNF, I have now tried to 
> fix this for the next update of the draft. I would however be 
> very grateful for some extra sanity check before I submit a 
> new draft. 
> 
> Does the ABNF look reasonable ?, I find it unlikely that I 
> got everything right (its easier to say "eyjafjallajökull" :-)
> 
> 
> /Ingemar
> 
> 

which one of those three "xyvalue" fields is the optional "step", 
the middle one?

draft-ietf-mmusic-image-attributes-04 said:

         2) range= "[" value1 ":" [ step ":" ] value2 "]"
              values between value1 and value2 inclusive,
              if step is omitted a stepsize of 1 is implied

which was clearer.

You can have a rule that simply does:

   step = xyrange

which would allow you to write:

        xyrange = ( "[" xyvalue ":" [ step ":" ] xyvalue "]" )
......................................^^^^

> 			; discrete values separated by ','

that allows the single digits 1, 2, 3, 4, 5, 6, 7, 8, and 9.  That's fine.

>                   ; values between 10 and 999999

That requires the first digit to be "1", which prohibits 999999.

I would use:

        xyvalue = %x31-39 *5DIGIT
                   ; digit between 1 and 9 which is 
                   ; followed by 0 to 5 other digits

even better would be to create a new "onetonine" rule instead of 
awkward hex representation; see below for that suggestion.

>                   ; range between a lower and an upper level 

Are there rules for the values in "sprange", such that they appear in a
certain order (e.g., can they be all the same value?  Does each value need to
be larger than the previous value?).  If so, add a comment in the ABNF
expaining that requirement (e.g., "each occurrence of spvalue must be greater
than or equal to the previous occurrence").

>                / ( "0" "." ( %x32-39 ) *3DIGIT 
.................................................^
                                         missing ")" here

>        qvalue  = ( "0" "." 1*2DIGIT )

To make it easier to read, instead of using hex values, you might
consider avoiding the hex representation and defining other
rules.  For example of one place this occurs, instead of:

OLD:
       spvalue = ( %x31-34 "." 1*4DIGIT )
                  ; values between 1.0000 and 4.9999
               / ( "0" "." ( %x32-39 ) *3DIGIT )
                  ; values between 0.2000 and 0.9999
NEW:
       onetofour = "1" / "2" / "3" /"4"
       twotonine = "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
       spvalue = ( "0" "." twotonine *3DIGIT )
                  ; values between 0.2000 and 0.9999
               / ( onetofour "." 1*4DIGIT )
                  ; values between 1.0000 and 4.9999

I also swapped the two permitted values for "spvalue", so
the rules are in numeric order (as it was, .2 is permitted
after 1.0, which is somewhat counter-intuitive).

-d

> _______________________________________________
> mmusic mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/mmusic

---

From: Cullen Jennings <[email-masked]>
Date: Wed, 28 Apr 2010 10:29:05 -0600

> The q-value is limited to between 0.00 and 1.00 (min 1 and max 2 decimal places)

I did not look at the ABNF but these seems like fine set of limitations. Thanks.