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
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
use crate::*;

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

#[derive(Clone, Debug, PartialEq, Node)]
pub enum UdpBody {
    CombinationalBody(Box<CombinationalBody>),
    SequentialBody(Box<SequentialBody>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct CombinationalBody {
    pub nodes: (
        Keyword,
        CombinationalEntry,
        Vec<CombinationalEntry>,
        Keyword,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct CombinationalEntry {
    pub nodes: (LevelInputList, Symbol, OutputSymbol, Symbol),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct SequentialBody {
    pub nodes: (
        Option<UdpInitialStatement>,
        Keyword,
        SequentialEntry,
        Vec<SequentialEntry>,
        Keyword,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct UdpInitialStatement {
    pub nodes: (Keyword, OutputPortIdentifier, Symbol, InitVal, Symbol),
}

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

#[derive(Clone, Debug, PartialEq, Node)]
pub struct SequentialEntry {
    pub nodes: (
        SeqInputList,
        Symbol,
        CurrentState,
        Symbol,
        NextState,
        Symbol,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum SeqInputList {
    LevelInputList(Box<LevelInputList>),
    EdgeInputList(Box<EdgeInputList>),
}

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

#[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeInputList {
    pub nodes: (Vec<LevelSymbol>, EdgeIndicator, Vec<LevelSymbol>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum EdgeIndicator {
    Paren(Box<EdgeIndicatorParen>),
    EdgeSymbol(Box<EdgeSymbol>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct EdgeIndicatorParen {
    pub nodes: (Paren<(LevelSymbol, LevelSymbol)>,),
}

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

#[derive(Clone, Debug, PartialEq, Node)]
pub enum NextState {
    OutputSymbol(Box<OutputSymbol>),
    Minus(Box<Symbol>),
}

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

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

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