Article View: comp.protocols.iso
Article #14Re: ASN1 specification - clarification
From: Christian Huitema
Date: Thu, 29 Oct 1992 09:47
Date: Thu, 29 Oct 1992 09:47
38 lines
1778 bytes
1778 bytes
In article <86010005@hpcndaw.CND.HP.COM>, mds@hpcndaw.CND.HP.COM (Mark Smith) writes:
> Whoops. Ignore my previous posting. I misunderstood what you were trying
> to accomplish. You want a string which is limited to "A" or "B" characters
> AND is restricted to a size of 10 characters.
>
> Therefore, you would need to specify it as:
>
> Str1 ::= IA5String (FROM("A"|"B")) (SIZE(10))
>
>
> Sorry for the confusion,
The confusion is caused by one problem -- the lack of an AND operator in the
language. I mentioned in a previous posting that the construction:
IA5String (FROM("A"|"B")) (SIZE(10))
was "incorrect". Well, nonbody is perfect. I was wrong. If one reads carefully
the BNF of ASN.1, one finds that:
<type> ::= <type-declaration> |
<type> <subtype-declaration>
which means that one can list a string of space separated subtype
declarations. This BNF construct, however, is not explicited in the ASN.1 text
itself -- which let me wrongly conclude, following the text, that only one
subtype should be allowed.
May I suggest that we introduce an explicit AND operator in the constraint
notation? After all, are we absolutely sure that we will never have to enter a
constraint like:
IA5String (((FROM("A"|"B"))&(SIZE(10))|
((FROM("C"|"D"))&(SIZE(20))))
Christian Huitema
Technical Details
Message-ID:
<32707@sophia.inria.fr>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!sophia!mitsou.inria.fr!huitemaReferences:
<578@vercors.frec.bull.fr> <86010005@hpcndaw.CND.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!sophia!mitsou.inria.fr!huitema From: huitema@mitsou.inria.fr (Christian Huitema) Newsgroups: comp.protocols.iso Subject: Re: ASN1 specification - clarification Message-ID: <32707@sophia.inria.fr> Date: 29 Oct 92 09:47:45 GMT References: <578@vercors.frec.bull.fr> <86010005@hpcndaw.CND.HP.COM> Sender: news@sophia.inria.fr Organization: INRIA Sophia Antipolis, France Lines: 38