Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 | -- .31 |
| 7 | |
| 8 | ModuleTestSetOfSimple |
| 9 | { iso org(3) dod(6) internet(1) private(4) enterprise(1) |
| 10 | spelio(9363) software(1) asn1c(5) test(1) 31 } |
| 11 | DEFINITIONS IMPLICIT TAGS ::= |
| 12 | BEGIN |
| 13 | |
| 14 | Forest ::= SET OF Tree |
| 15 | |
| 16 | Tree ::= SEQUENCE { |
| 17 | height INTEGER, |
| 18 | width INTEGER |
| 19 | } |
| 20 | |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 21 | -- The following clause tests OPTIONAL. |
| 22 | Stuff ::= SET { |
| 23 | trees [0] SET OF Forest OPTIONAL, |
| 24 | anything [1] SET OF |
| 25 | SEQUENCE { |
| 26 | cup-of-coffee BIT STRING, |
| 27 | ... |
| 28 | } OPTIONAL |
| 29 | -- The above OPTIONAL applies to the "anything" |
| 30 | -- member of the outer CHOICE, |
| 31 | -- not to the SET OF's embedded SEQUENCE! |
| 32 | } |
| 33 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 34 | END |