summaryrefslogtreecommitdiff
path: root/tools/pdl/test/struct.pdl
blob: d8ed439a2e11b330ec534efc36ea80dcb4c798d4 (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
little_endian_packets

custom_field custom: 1 "custom"
checksum checksum: 1 "checksum"

enum Enum : 1 {
    tag = 0,
}

struct Struct {
    a: 4,
    b: Enum,
    c: custom,
    d: checksum,
}

packet Packet {
    a: 4,
}

struct RecursiveStruct_0 : RecursiveStruct_1 {
}

struct RecursiveStruct_1 : RecursiveStruct_0 {
}

struct InvalidParent : Packet {
}

struct UndeclaredParent : FooBar {
}

struct UnnecessaryConstraints (a=1) {
}

struct Undeclared : Struct (c=1) {
}

struct Redeclared : Struct (a=1, a=2) {
}

struct TypeMismatch : Struct (a=tag, b=1, c=1, d=1) {
}

struct InvalidLiteral : Struct (a=42) {
}

struct UndeclaredTag : Struct (b=undeclared_tag) {
}

struct Correct : Struct (a=1, b=tag) {
}