blob: b8812bc84e92a50618f84eb5e14da3737de2ba69 [file] [log] [blame]
Lev Walkinb2664662004-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)
Lev Walkine4ca5ce2004-09-15 11:44:13 +00006-- .50 1
7-- .50 2
Lev Walkinb2664662004-08-18 04:54:10 +00008
9ModuleNestedConstraintsCheck
10 { iso org(3) dod(6) internet (1) private(4) enterprise(1)
Lev Walkine4ca5ce2004-09-15 11:44:13 +000011 spelio(9363) software(1) asn1c(5) test(1) 50 1 }
Lev Walkinb2664662004-08-18 04:54:10 +000012 DEFINITIONS ::=
13BEGIN
Lev Walkine4ca5ce2004-09-15 11:44:13 +000014 IMPORTS Identifier FROM IdentifierModule;
Lev Walkinb2664662004-08-18 04:54:10 +000015
16 Int1 ::= INTEGER
17 Int2 ::= Int1 (0..MAX) -- X.680-0207::41.4.4
18 Int3 ::= Int2 (MIN..ten) -- Means (0..10)
19 Int4 ::= Int3 (5..MAX,...,1..4) -- Means (5..10,...,1..4)
20 Int5 ::= Int4 (MIN..5) -- Means (5)
Lev Walkin8a99bf72004-09-10 06:07:39 +000021 -- Int6 ::= INTEGER (Int5) -- -- Not yet supported
Lev Walkinb2664662004-08-18 04:54:10 +000022
23 ten Int1 ::= other-ten
24 other-ten Int2 ::= 10
25
26 -- G.4.3.4
27 ExtensibleExtensions ::= INTEGER ((1..256,...) INTERSECTION (1..256))
28
29 Str1 ::= IA5String
30 Str2 ::= Str1 (SIZE(MIN..20 | 25..30))
31 -- Means (SIZE(0..20 | 25..30))
32 Str3 ::= Str2 (SIZE(10..27))(FROM("ABC"|"def"))
33 -- (SIZE(10..20,25..27))(FROM("ABCdef"))
Lev Walkin8a99bf72004-09-10 06:07:39 +000034 Str4 ::= IA5String ("ABCD"|SIZE(4))
35 -- Not PER-visible
Lev Walkinb2664662004-08-18 04:54:10 +000036
37 PER-Visible ::= IA5String (FROM("A".."F"))
38 PER-Visible-2 ::= PER-Visible (FROM("E".."F")) -- Means (FROM("EF"))
39 -- The following maintain parent permitted alphabet constraint
40 Not-PER-Visible-1 ::= PER-Visible (FROM("AB") | SIZE(1..2))
41 Not-PER-Visible-2 ::= PER-Visible (FROM("AB",...))
42 Not-PER-Visible-3 ::= PER-Visible (FROM("AB"),...)
Lev Walkind35c8b52004-08-25 02:08:08 +000043
Lev Walkinb2664662004-08-18 04:54:10 +000044 SIZE-but-not-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD",...))
45 SIZE-and-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD"))
46 Neither-SIZE-nor-FROM ::= PER-Visible (SIZE(1..4) | FROM("ABCD",...))
47
Lev Walkin2e3055d2004-08-20 13:36:32 +000048 Utf8-3 ::= Utf8-2 (FROM("A".."Z"|"a".."z"))
49 Utf8-2 ::= Utf8-1 (SIZE(1..2))
50 Utf8-1 ::= UTF8String
51
Lev Walkine4ca5ce2004-09-15 11:44:13 +000052 VisibleIdentifier ::= Identifier
53
54END
55
56
57IdentifierModule
58 { iso org(3) dod(6) internet (1) private(4) enterprise(1)
59 spelio(9363) software(1) asn1c(5) test(1) 50 2 }
60 DEFINITIONS ::=
61BEGIN
62 EXPORTS Identifier;
63
64 maxIdentifier INTEGER ::= 32
65
66 Identifier ::=
67 VisibleString ( FROM
68 ("A"|"a"|"B"|"b"|"C"|"c"|"D"|"d"|"E"|"e"|"F"|"f"|
69 "G"|"g"|"H"|"h"|"I"|"i"|"J"|"j"|"K"|"k"|"L"|"l"|
70 "M"|"m"|"N"|"n"|"O"|"o"|"P"|"p"|"Q"|"q"|"R"|"r"|
71 "S"|"s"|"T"|"t"|"U"|"u"|"V"|"v"|"W"|"w"|"X"|"x"|
72 "Y"|"y"|"Z"|"z"|"$"|"_"|"0"|"1"|"2"|"3"|"4"|"5"|
73 "6"|"7"|"8"|"9") ) (SIZE(1..maxIdentifier))
74
Lev Walkinb2664662004-08-18 04:54:10 +000075END