2004-08-18 04:54:10 +00:00
|
|
|
|
|
|
|
-- OK: Everything is fine
|
|
|
|
|
|
|
|
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
|
|
|
|
-- .spelio.software.asn1c.test (9363.1.5.1)
|
2004-09-15 11:44:13 +00:00
|
|
|
-- .50 1
|
|
|
|
-- .50 2
|
2004-08-18 04:54:10 +00:00
|
|
|
|
|
|
|
ModuleNestedConstraintsCheck
|
|
|
|
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
|
2004-09-15 11:44:13 +00:00
|
|
|
spelio(9363) software(1) asn1c(5) test(1) 50 1 }
|
2004-08-18 04:54:10 +00:00
|
|
|
DEFINITIONS ::=
|
|
|
|
BEGIN
|
2004-09-15 11:44:13 +00:00
|
|
|
IMPORTS Identifier FROM IdentifierModule;
|
2004-08-18 04:54:10 +00:00
|
|
|
|
|
|
|
Int1 ::= INTEGER
|
|
|
|
Int2 ::= Int1 (0..MAX) -- X.680-0207::41.4.4
|
|
|
|
Int3 ::= Int2 (MIN..ten) -- Means (0..10)
|
2005-11-26 11:25:14 +00:00
|
|
|
Int4 ::= Int3 (5..MAX,...,1..4) -- Means (1..10,...)
|
2004-08-18 04:54:10 +00:00
|
|
|
Int5 ::= Int4 (MIN..5) -- Means (5)
|
2004-09-10 06:07:39 +00:00
|
|
|
-- Int6 ::= INTEGER (Int5) -- -- Not yet supported
|
2004-08-18 04:54:10 +00:00
|
|
|
|
|
|
|
ten Int1 ::= other-ten
|
|
|
|
other-ten Int2 ::= 10
|
|
|
|
|
|
|
|
-- G.4.3.4
|
|
|
|
ExtensibleExtensions ::= INTEGER ((1..256,...) INTERSECTION (1..256))
|
|
|
|
|
|
|
|
Str1 ::= IA5String
|
|
|
|
Str2 ::= Str1 (SIZE(MIN..20 | 25..30))
|
|
|
|
-- Means (SIZE(0..20 | 25..30))
|
|
|
|
Str3 ::= Str2 (SIZE(10..27))(FROM("ABC"|"def"))
|
|
|
|
-- (SIZE(10..20,25..27))(FROM("ABCdef"))
|
2004-09-10 06:07:39 +00:00
|
|
|
Str4 ::= IA5String ("ABCD"|SIZE(4))
|
|
|
|
-- Not PER-visible
|
2004-08-18 04:54:10 +00:00
|
|
|
|
|
|
|
PER-Visible ::= IA5String (FROM("A".."F"))
|
|
|
|
PER-Visible-2 ::= PER-Visible (FROM("E".."F")) -- Means (FROM("EF"))
|
|
|
|
-- The following maintain parent permitted alphabet constraint
|
|
|
|
Not-PER-Visible-1 ::= PER-Visible (FROM("AB") | SIZE(1..2))
|
|
|
|
Not-PER-Visible-2 ::= PER-Visible (FROM("AB",...))
|
|
|
|
Not-PER-Visible-3 ::= PER-Visible (FROM("AB"),...)
|
2004-08-25 02:08:08 +00:00
|
|
|
|
2004-08-18 04:54:10 +00:00
|
|
|
SIZE-but-not-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD",...))
|
|
|
|
SIZE-and-FROM ::= PER-Visible (SIZE(1..4) ^ FROM("ABCD"))
|
|
|
|
Neither-SIZE-nor-FROM ::= PER-Visible (SIZE(1..4) | FROM("ABCD",...))
|
|
|
|
|
2004-10-02 16:44:30 +00:00
|
|
|
Utf8-4 ::= UTF8String (FROM("A".."Z")) -- Alphabet
|
2004-10-02 16:33:46 +00:00
|
|
|
Utf8-3 ::= Utf8-2 (FROM("A".."Z"|"a".."z")) -- Alphabet and size
|
|
|
|
Utf8-2 ::= Utf8-1 (SIZE(1..2)) -- Size
|
2004-08-20 13:36:32 +00:00
|
|
|
Utf8-1 ::= UTF8String
|
|
|
|
|
2004-09-15 11:44:13 +00:00
|
|
|
VisibleIdentifier ::= Identifier
|
|
|
|
|
2005-11-26 11:25:14 +00:00
|
|
|
Sequence ::= SEQUENCE {
|
|
|
|
int1-c Int1 (-2..MAX) DEFAULT 3,
|
|
|
|
int4 [2] Int4,
|
|
|
|
int4-c Int4 (MIN..7),
|
|
|
|
bool BOOLEAN DEFAULT 1,
|
|
|
|
enum-c ENUMERATED { one(1), two(2), ..., three(3) },
|
|
|
|
...,
|
|
|
|
int5-c Int5 (5) OPTIONAL,
|
|
|
|
...,
|
|
|
|
null NULL OPTIONAL
|
|
|
|
}
|
|
|
|
|
|
|
|
SequenceOf ::= SEQUENCE (SIZE(1..2)) OF Sequence
|
|
|
|
|
|
|
|
Enum0 ::= ENUMERATED { one, two }
|
|
|
|
Enum1 ::= ENUMERATED { one, two } (one)
|
|
|
|
|
2004-09-15 11:44:13 +00:00
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
|
IdentifierModule
|
|
|
|
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
|
|
|
|
spelio(9363) software(1) asn1c(5) test(1) 50 2 }
|
|
|
|
DEFINITIONS ::=
|
|
|
|
BEGIN
|
|
|
|
EXPORTS Identifier;
|
|
|
|
|
|
|
|
maxIdentifier INTEGER ::= 32
|
|
|
|
|
|
|
|
Identifier ::=
|
|
|
|
VisibleString ( FROM
|
|
|
|
("A"|"a"|"B"|"b"|"C"|"c"|"D"|"d"|"E"|"e"|"F"|"f"|
|
|
|
|
"G"|"g"|"H"|"h"|"I"|"i"|"J"|"j"|"K"|"k"|"L"|"l"|
|
|
|
|
"M"|"m"|"N"|"n"|"O"|"o"|"P"|"p"|"Q"|"q"|"R"|"r"|
|
|
|
|
"S"|"s"|"T"|"t"|"U"|"u"|"V"|"v"|"W"|"w"|"X"|"x"|
|
|
|
|
"Y"|"y"|"Z"|"z"|"$"|"_"|"0"|"1"|"2"|"3"|"4"|"5"|
|
|
|
|
"6"|"7"|"8"|"9") ) (SIZE(1..maxIdentifier))
|
|
|
|
|
2004-08-18 04:54:10 +00:00
|
|
|
END
|