a956e01e686e224415b4b56a6dd1de6b06ae5bf6
[com/asn1c.git] / tests / tests-asn1c-compiler / 97-type-identifier-SW.asn1
1
2 -- OK: Everything is fine
3
4 -- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
5 -- .spelio.software.asn1c.test (9363.1.5.1)
6 -- .97
7
8 ModuleTypeIdentifier1
9         { iso org(3) dod(6) internet (1) private(4) enterprise(1)
10                 spelio(9363) software(1) asn1c(5) test(1) 97 1 }
11         DEFINITIONS ::=
12 BEGIN
13
14         /*
15          * TYPE-IDENTIFIER is resolved to a clause below.
16          */
17         T1 ::= SEQUENCE {
18                 id      TYPE-IDENTIFIER.&id2,
19                 type    TYPE-IDENTIFIER.&Type
20         }
21
22         TYPE-IDENTIFIER ::= CLASS {
23                 &id2    OBJECT IDENTIFIER UNIQUE,
24                 &Type
25         } WITH SYNTAX { [ &Type -- comment --] IDENTIFIED BY &id2 }
26
27 END
28
29 ModuleTypeIdentifier2
30         { iso org(3) dod(6) internet (1) private(4) enterprise(1)
31                 spelio(9363) software(1) asn1c(5) test(1) 97 2 }
32         DEFINITIONS ::=
33 BEGIN
34
35         /*
36          * TYPE-IDENTIFIER is resolved to a default TYPE-IDENTIFIER class.
37          */
38         T2 ::= SEQUENCE {
39                 id      TYPE-IDENTIFIER.&id,
40                 type    TYPE-IDENTIFIER.&Type
41         }
42
43 END