sv_parser_syntaxtree/udp_declaration_and_instantiation/
udp_body.rs1use crate::*;
2
3#[derive(Clone, Debug, PartialEq, Node)]
6pub enum UdpBody {
7 CombinationalBody(Box<CombinationalBody>),
8 SequentialBody(Box<SequentialBody>),
9}
10
11#[derive(Clone, Debug, PartialEq, Node)]
12pub struct CombinationalBody {
13 pub nodes: (
14 Keyword,
15 CombinationalEntry,
16 Vec<CombinationalEntry>,
17 Keyword,
18 ),
19}
20
21#[derive(Clone, Debug, PartialEq, Node)]
22pub struct CombinationalEntry {
23 pub nodes: (LevelInputList, Symbol, OutputSymbol, Symbol),
24}
25
26#[derive(Clone, Debug, PartialEq, Node)]
27pub struct SequentialBody {
28 pub nodes: (
29 Option<UdpInitialStatement>,
30 Keyword,
31 SequentialEntry,
32 Vec<SequentialEntry>,
33 Keyword,
34 ),
35}
36
37#[derive(Clone, Debug, PartialEq, Node)]
38pub struct UdpInitialStatement {
39 pub nodes: (Keyword, OutputPortIdentifier, Symbol, InitVal, Symbol),
40}
41
42#[derive(Clone, Debug, PartialEq, Node)]
43pub struct InitVal {
44 pub nodes: (Keyword,),
45}
46
47#[derive(Clone, Debug, PartialEq, Node)]
48pub struct SequentialEntry {
49 pub nodes: (
50 SeqInputList,
51 Symbol,
52 CurrentState,
53 Symbol,
54 NextState,
55 Symbol,
56 ),
57}
58
59#[derive(Clone, Debug, PartialEq, Node)]
60pub enum SeqInputList {
61 LevelInputList(Box<LevelInputList>),
62 EdgeInputList(Box<EdgeInputList>),
63}
64
65#[derive(Clone, Debug, PartialEq, Node)]
66pub struct LevelInputList {
67 pub nodes: (LevelSymbol, Vec<LevelSymbol>),
68}
69
70#[derive(Clone, Debug, PartialEq, Node)]
71pub struct EdgeInputList {
72 pub nodes: (Vec<LevelSymbol>, EdgeIndicator, Vec<LevelSymbol>),
73}
74
75#[derive(Clone, Debug, PartialEq, Node)]
76pub enum EdgeIndicator {
77 Paren(Box<EdgeIndicatorParen>),
78 EdgeSymbol(Box<EdgeSymbol>),
79}
80
81#[derive(Clone, Debug, PartialEq, Node)]
82pub struct EdgeIndicatorParen {
83 pub nodes: (Paren<(LevelSymbol, LevelSymbol)>,),
84}
85
86#[derive(Clone, Debug, PartialEq, Node)]
87pub struct CurrentState {
88 pub nodes: (LevelSymbol,),
89}
90
91#[derive(Clone, Debug, PartialEq, Node)]
92pub enum NextState {
93 OutputSymbol(Box<OutputSymbol>),
94 Minus(Box<Symbol>),
95}
96
97#[derive(Clone, Debug, PartialEq, Node)]
98pub struct OutputSymbol {
99 pub nodes: (Symbol,),
100}
101
102#[derive(Clone, Debug, PartialEq, Node)]
103pub struct LevelSymbol {
104 pub nodes: (Symbol,),
105}
106
107#[derive(Clone, Debug, PartialEq, Node)]
108pub struct EdgeSymbol {
109 pub nodes: (Symbol,),
110}