Subject: ABNF for alternativeValue

From: Jo Friedman <[email-masked]>
Date: Fri, 17 Mar 2000 08:01:13 -0700

In the MEGACO text-encoding production

alternativeValue     = ( VALUE / LSBRKT VALUE *(COMMA VALUE)
RSBRKT  /
                       LSBRKT VALUE DOT DOT VALUE RSBRKT )

The following is a legal VALUE
1..2

because a VALUE can contain dots (the final SafeChar is '.').

So unfortunately, there are two ways to parse
[1..2]

it could be one VALUE (the first required VALUE) in
LSBRKT VALUE *(COMMA VALUE) RSBRKT

or it could be two values separated by two dots as in
LSBRKT VALUE DOT DOT VALUE RSBRKT

Any thoughts on how to resolve this?
Jo

---

From: Abdallah Rayhan <[email-masked]>
Date: Mon, 20 Mar 2000 10:19:51 -0500

Jo,

You are right. I hate to exclude DOT from VALUE as it might
have a negative effect on packages or some intended use
of VALUE.  Something else you brought up in which 1..2 is a
legal VALUE, hence things like 1..2..3..4 is parsable as a legal
alternativeValue. I would say that is oversight from my part
when I crafted those roles. An easy way out of this miss is to
change the horizontal DOT DOT to vertical one ":" -), e.g.,
1:2 instead of 1..2. Range is expressed by ":" and ".." is
a valid VALUE but package dependent.

While this would still allow things like 1..2:3..4, semantics
should play a role here not just the syntax, e.g. if the package
does not allow this value then it should be rejected as an error.

Proposal:
alternativeValue     = ( VALUE / LSBRKT VALUE *(COMMA VALUE)
     RSBRKT  / LSBRKT VALUE COLON VALUE RSBRKT )

Abdallah