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
91
92
93
94
95
96
use crate::*;

// -----------------------------------------------------------------------------

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ModuleInstantiation {
    pub nodes: (
        ModuleIdentifier,
        Option<ParameterValueAssignment>,
        List<Symbol, HierarchicalInstance>,
        Symbol,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ParameterValueAssignment {
    pub nodes: (Symbol, Paren<Option<ListOfParameterAssignments>>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfParameterAssignments {
    Ordered(Box<ListOfParameterAssignmentsOrdered>),
    Named(Box<ListOfParameterAssignmentsNamed>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfParameterAssignmentsOrdered {
    pub nodes: (List<Symbol, OrderedParameterAssignment>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfParameterAssignmentsNamed {
    pub nodes: (List<Symbol, NamedParameterAssignment>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct OrderedParameterAssignment {
    pub nodes: (ParamExpression,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedParameterAssignment {
    pub nodes: (Symbol, ParameterIdentifier, Paren<Option<ParamExpression>>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct HierarchicalInstance {
    pub nodes: (NameOfInstance, Paren<Option<ListOfPortConnections>>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct NameOfInstance {
    pub nodes: (InstanceIdentifier, Vec<UnpackedDimension>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum ListOfPortConnections {
    Ordered(Box<ListOfPortConnectionsOrdered>),
    Named(Box<ListOfPortConnectionsNamed>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortConnectionsOrdered {
    pub nodes: (List<Symbol, OrderedPortConnection>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ListOfPortConnectionsNamed {
    pub nodes: (List<Symbol, NamedPortConnection>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct OrderedPortConnection {
    pub nodes: (Vec<AttributeInstance>, Option<Expression>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum NamedPortConnection {
    Identifier(Box<NamedPortConnectionIdentifier>),
    Asterisk(Box<NamedPortConnectionAsterisk>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedPortConnectionIdentifier {
    pub nodes: (
        Vec<AttributeInstance>,
        Symbol,
        PortIdentifier,
        Option<Paren<Option<Expression>>>,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct NamedPortConnectionAsterisk {
    pub nodes: (Vec<AttributeInstance>, Symbol),
}