vera@portia.Stanford.EDU (James Vera) (08/15/89)
Could someone please clear up my confusion on the following ASN. My compiler tells me that X ::= SEQUENCE { SEQUENCE OF SEQUENCE {INTEGER}, SEQUENCE OF SEQUENCE {INTEGER}} is bad. But, X ::= SEQUENCE { SEQUENCE OF SET {INTEGER}, SEQUENCE OF SEQUENCE {INTEGER}} is good. But, X ::= SEQUENCE { [1] SEQUENCE OF SEQUENCE {INTEGER}, [2] SEQUENCE OF SEQUENCE {INTEGER}} is bad. But, X ::= SEQUENCE { a SEQUENCE OF SEQUENCE {INTEGER}, b SEQUENCE OF SEQUENCE {INTEGER}} is good. Is my compiler confused or does this make sense to someone? -- James S. Vera | Internet |Standard Disclaimers Stanford University| vera@portia.stanford.edu |Blah Blah Blah Blah Bellcore |vera2@rigel.cc.bellcore.com|vvv My Cutesy Quote vvv "When I was young it seemed that life was so wonderful..." - Supertramp
khiem@hpindda.HP.COM (Khiem Ho) (08/17/89)
> >X ::= SEQUENCE { > SEQUENCE OF SEQUENCE {INTEGER}, > SEQUENCE OF SEQUENCE {INTEGER}} >is bad. >......... >But, >X ::= SEQUENCE { > a SEQUENCE OF SEQUENCE {INTEGER}, > b SEQUENCE OF SEQUENCE {INTEGER}} >is good. > At the first glance, there seems to be something wrong with your compiler: those two above should be the same. a, b are just optional identifiers, and it shouldn't make any difference whether they are present or not. Khiem khiem@hpinddm.HP.COM
vera@portia.Stanford.EDU (James Vera) (08/18/89)
In article <5560033@hpindda.HP.COM> khiem@hpindda.HP.COM (Khiem Ho) writes: >At the first glance, there seems to be something wrong with >your compiler: those two above should be the same. a, b are >just optional identifiers, and it shouldn't make any difference >whether they are present or not. Well, actually identifiers are sometimes necessary in order to avoid ambiguity in the value syntax. For instance, in X ::= SET { a [0] INTEGER, b [1] INTEGER} the identifiers are necessary in order to distinguish {a 5, b 4} from {b 5, a 4} [I think that's value syntax]. Still, in my case it appears to me that the compiler is alternately trying to distinguish the value syntax or the presentation syntax which makes no sense to me. -- James S. Vera | Internet |Standard Disclaimers Stanford University| vera@portia.stanford.edu |Blah Blah Blah Blah Bellcore |vera2@rigel.cc.bellcore.com|vvv My Cutesy Quote vvv "When I was young it seemed that life was so wonderful..." - Supertramp
lubich@ethz.UUCP (Hannes Lubich) (08/18/89)
James, at least the ISODE-5.0 ASN.1 Compiler does not complain about it. What compiler have you been using anyway? Regards --HaL -- ~ UUCP/Usenet : {known world}!mcvax!cernvax!ethz!lubich ~ or : lubich@ethz.uucp ~ CSNET/ARPA/BITNET : lubich@inf.ethz.ch / lubich%inf.ethz.ch@relay.cs.net ~ The usual disclaimer : No, it wasn't me, somebody must have used my account.
iso@NIC.DDN.MIL (08/20/89)
>Organization: ETH Zuerich, Switzerland
James, at least the ISODE-5.0 ASN.1 Compiler does not complain about it.
What compiler have you been using anyway?
Regards
--HaL
--
~ UUCP/Usenet : {known world}!mcvax!cernvax!ethz!lubich
~ or : lubich@ethz.uucp
~ CSNET/ARPA/BITNET : lubich@inf.ethz.ch / lubich%inf.ethz.ch@relay.cs.net
~ The usual disclaimer : No, it wasn't me, somebody must have used my account.