vlm | ffa901e | 2004-08-18 04:54:10 +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 | -- .50 |
| 7 | |
| 8 | ModuleNestedConstraintsCheck |
| 9 | { iso org(3) dod(6) internet (1) private(4) enterprise(1) |
| 10 | spelio(9363) software(1) asn1c(5) test(1) 50 } |
| 11 | DEFINITIONS ::= |
| 12 | BEGIN |
| 13 | |
| 14 | Int1 ::= INTEGER |
| 15 | Int2 ::= Int1 (0..MAX) -- X.680-0207::41.4.4 |
| 16 | Int3 ::= Int2 (MIN..ten) -- Means (0..10) |
| 17 | Int4 ::= Int3 (5..MAX,...,1..4) -- Means (5..10,...,1..4) |
| 18 | Int5 ::= Int4 (MIN..5) -- Means (5) |
| 19 | |
| 20 | ten Int1 ::= other-ten |
| 21 | other-ten Int2 ::= 10 |
| 22 | |
| 23 | -- G.4.3.4 |
| 24 | ExtensibleExtensions ::= INTEGER ((1..256,...) INTERSECTION (1..256)) |
| 25 | |
| 26 | Str1 ::= IA5String |
| 27 | Str2 ::= Str1 (SIZE(MIN..20 | 25..30)) |
| 28 | -- Means (SIZE(0..20 | 25..30)) |
| 29 | Str3 ::= Str2 (SIZE(10..27))(FROM("ABC"|"def")) |
| 30 | -- (SIZE(10..20,25..27))(FROM("ABCdef")) |
| 31 | |
| 32 | PER-Visible ::= IA5String (FROM("A".."F")) |
| 33 | PER-Visible-2 ::= PER-Visible (FROM("E".."F")) -- Means (FROM("EF")) |
| 34 | -- The following maintain parent permitted alphabet constraint |
| 35 | Not-PER-Visible-1 ::= PER-Visible (FROM("AB") | SIZE(1..2)) |
| 36 | Not-PER-Visible-2 ::= PER-Visible (FROM("AB",...)) |
| 37 | Not-PER-Visible-3 ::= PER-Visible (FROM("AB"),...) |
vlm | 26afd20 | 2004-08-25 02:08:08 +0000 | [diff] [blame^] | 38 | |
vlm | ffa901e | 2004-08-18 04:54:10 +0000 | [diff] [blame] | 39 | SIZE-but-not-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD",...)) |
| 40 | SIZE-and-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD")) |
| 41 | Neither-SIZE-nor-FROM ::= PER-Visible (SIZE(1..4) | FROM("ABCD",...)) |
| 42 | |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 43 | Utf8-3 ::= Utf8-2 (FROM("A".."Z"|"a".."z")) |
| 44 | Utf8-2 ::= Utf8-1 (SIZE(1..2)) |
| 45 | Utf8-1 ::= UTF8String |
| 46 | |
vlm | ffa901e | 2004-08-18 04:54:10 +0000 | [diff] [blame] | 47 | END |