G'day,

Ramaswamy wrote:
Hi, I have some more clarifications needed w.r.t. clause b) of Sec
10.12 X.681. Pls observe the following ASN.1 spec snippet -

--------------------------------------------------------------------------------


ACLASS ::= CLASS { &Type OPTIONAL, &valu NULL OPTIONAL } WITH SYNTAX { [&Type] [&valu] }

aobj ACLASS ::= { NULL --NULL-- }

--------------------------------------------------------------------------------



In the above e.g. Setting for the 2 OptionalGroup's of the
SyntaxList could be misinterpreted if the object is defined as
above. In fact the '&valu' could also be a variable type field. In
fact if the commented part were removed then the object could be
considered unambiguous (though not in context of the above
mentioned clause). But the above clearly violates the clause on
plausible misinterpretation. In the event of the above being
correct, could we come to the conclusion that excepting for the
<Type , ValueSet/ObjectSet> and <value, ValueSet/ObjectSet> any
other combination of fields that appear from the SyntaxList are
invalid.

Perhaps Section 10.10 of X.681 provides an answer here:


====================================================================
10.10 When, in the parse process, an "OptionalGroup" is encountered, and the following lexical item is syntactically acceptable as the first lexical item in the optional group, then that group is assumed to be present. If it is not syntactically acceptable as the first lexical item in the optional group, then that group is assumed to be absent.


NOTE – In order to avoid unexpected effects, designers should normally make the first lexical item in an optional group a "Literal".
====================================================================


This would imply that, when a "NULL" token, is parsed, it is assumed to be an instance of the [&Type] setting, even if it also satisfies the [&valu] setting.

Basically, if the current token T belongs to the first set of groups G1, .., Gn which may be chosen at that point in the parse, then the first such group is chosen.

Cheers,
Geoff






Reply via email to