aboutsummaryrefslogtreecommitdiffstats
path: root/tests/92-circular-loops-OK.asn1
blob: e57312de49ff27150611cb0abce53f4db5558ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
-- OK: Everything is fine

-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .92

ModuleCircularReferences
	{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
		spelio(9363) software(1) asn1c(5) test(1) 92 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

	Everything ::= SEQUENCE {
		ch1	Choice1,
		ch2	Choice2,
		ch3	Choice3,
		set	Set,
		a	Alpha,
		b	Beta,
		g	Gamma,
		ot	OneTwo,
		tt	TwoThree,
		to	ThreeOne
	}

	-- This type refers to the type directly containing itself.
	Choice1 ::= CHOICE {
		something Everything,
		...,
		some2	Everything
	}

	Choice2 ::= CHOICE {
		typeref	TypeRef,
		...,
		some3	Everything
	}

	Choice3 ::= CHOICE {
			a SEQUENCE {
				aa Everything
			},
			b  Everything,
			c SEQUENCE OF Choice3
		}

	Set ::= SET OF SEQUENCE {
			int	INTEGER,
			set	Set,
			seq	Sequence,
			set2	Set OPTIONAL,
			...,
			set3	Set
		}

	Sequence ::= SEQUENCE {
			a	INTEGER,
			seq	Sequence OPTIONAL,
			...,
			b	INTEGER,
			set	Set OPTIONAL
		}

	TypeRef ::= Sequence

	Alpha ::= SEQUENCE {
			a Beta,
			b SEQUENCE {
				b Beta OPTIONAL
			}
		}

	Beta ::= SEQUENCE {
			b Alpha OPTIONAL,
			g Gamma OPTIONAL
		}

	Gamma ::= SEQUENCE {
			o TwoThree,
			a Alpha,	-- expected inline
			b Beta		-- expected inline
		}

	-- This is a true superdependency.
	OneTwo ::= SET { m12 TwoThree }
	TwoThree ::= SET { m23 ThreeOne }
	ThreeOne ::= SET { m31 OneTwo, g Gamma }

END