486cbc097fb15fef213333e8809c0c4ec48631a8
[com/asn1c.git] / tests / tests-asn1c-compiler / 138-oer-constraints-OK.asn1
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 -- .138
7
8 ModuleOERConstraints
9         { iso org(3) dod(6) internet (1) private(4) enterprise(1)
10                 spelio(9363) software(1) asn1c(5) test(1) 138 }
11         DEFINITIONS IMPLICIT TAGS ::=
12 BEGIN
13
14     A-noc ::= INTEGER                           -- No constraints
15     B-0-0 ::= INTEGER (0)                       -- Value constraint
16     C-1-2 ::= INTEGER (1..2)                    -- Value range constraint
17     D-inv ::= INTEGER (0..10,...)               -- Extensible, not OER-visible
18     E-2-5 ::= INTEGER (0..10,...)(2..5)         -- OER-visible constraint 2..5
19     F-inv ::= INTEGER (0..10,...)(2..5,...)     -- Not OER-visible
20     G-3-3 ::= INTEGER (0..10,...)(2..5,...)(3)  -- OER-visible constraint 3
21     -- X.696 #8.2.4 Not OER-visible parts of INTERSECTION are ignored
22     H-4-5 ::= INTEGER ((0..5) ^ (4..9))         -- OER-visible constraint 4..5
23     I-1-5 ::= INTEGER ((0..5) ^ (EConstr))      -- OER-visible constraint 1..5
24     J-4-5 ::= INTEGER ((EConstr) ^ (4..9))      -- OER-visible constraint 4..5
25     K-1-4 ::= INTEGER ((FConstr) ^ (EConstr))   -- OER-visible constraint 1..4
26     -- X.696 #8.2.5 UNION with exeptions are ignored
27     L-0-5 ::= INTEGER ((0) | (5))               -- OER-visible constraint 0..5
28     M-inv ::= INTEGER ((0) | (EConstr),...)     -- Not OER-visible
29     N-0-5 ::= INTEGER ((FConstr) | (5))         -- OER-visible constraint 0..5
30     O-inv ::= INTEGER ((FConstr) | (5), ...)    -- Not OER-visible
31
32     EConstr ::= INTEGER (1..5,...)
33     FConstr ::= INTEGER (0..4)
34
35 END