blob: 27af95d19c57d5775e0ddf6092f5e5febc803a20 [file] [log] [blame]
vlmffa901e2004-08-18 04:54:10 +00001
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
8ModuleNestedConstraintsCheck
9 { iso org(3) dod(6) internet (1) private(4) enterprise(1)
10 spelio(9363) software(1) asn1c(5) test(1) 50 }
11 DEFINITIONS ::=
12BEGIN
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"),...)
38 SIZE-but-not-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD",...))
39 SIZE-and-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD"))
40 Neither-SIZE-nor-FROM ::= PER-Visible (SIZE(1..4) | FROM("ABCD",...))
41
42END