Apply derive(Node) to all
This commit is contained in:
parent
8354be14a1
commit
d839a4a47b
@ -115,6 +115,26 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, T: 'a, U: 'a, V: 'a, W: 'a, S: 'a> From<&'a (T, U, V, W, S)> for AnyNodes<'a>
|
||||||
|
where
|
||||||
|
&'a T: Into<AnyNodes<'a>>,
|
||||||
|
&'a U: Into<AnyNodes<'a>>,
|
||||||
|
&'a V: Into<AnyNodes<'a>>,
|
||||||
|
&'a W: Into<AnyNodes<'a>>,
|
||||||
|
&'a S: Into<AnyNodes<'a>>,
|
||||||
|
{
|
||||||
|
fn from(x: &'a (T, U, V, W, S)) -> Self {
|
||||||
|
let mut ret = Vec::new();
|
||||||
|
let (t, u, v, w, s) = x;
|
||||||
|
ret.append(&mut t.into().0);
|
||||||
|
ret.append(&mut u.into().0);
|
||||||
|
ret.append(&mut v.into().0);
|
||||||
|
ret.append(&mut w.into().0);
|
||||||
|
ret.append(&mut s.into().0);
|
||||||
|
ret.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, T> From<&'a Paren<'a, T>> for AnyNodes<'a>
|
impl<'a, T> From<&'a Paren<'a, T>> for AnyNodes<'a>
|
||||||
where
|
where
|
||||||
&'a T: Into<AnyNodes<'a>>,
|
&'a T: Into<AnyNodes<'a>>,
|
||||||
@ -193,3 +213,15 @@ where
|
|||||||
ret.into()
|
ret.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, T: 'a> From<&'a Box<T>> for AnyNodes<'a>
|
||||||
|
where
|
||||||
|
&'a T: Into<AnyNodes<'a>>,
|
||||||
|
{
|
||||||
|
fn from(x: &'a Box<T>) -> Self {
|
||||||
|
let mut ret = Vec::new();
|
||||||
|
let mut x: AnyNodes<'a> = x.into();
|
||||||
|
ret.append(&mut x.0);
|
||||||
|
ret.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -7,13 +7,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssertionItem<'a> {
|
pub enum AssertionItem<'a> {
|
||||||
Concurrent(ConcurrentAssertionItem<'a>),
|
Concurrent(ConcurrentAssertionItem<'a>),
|
||||||
Immediate(DeferredImmediateAssetionItem<'a>),
|
Immediate(DeferredImmediateAssetionItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DeferredImmediateAssetionItem<'a> {
|
pub struct DeferredImmediateAssetionItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(BlockIdentifier<'a>, Symbol<'a>)>,
|
Option<(BlockIdentifier<'a>, Symbol<'a>)>,
|
||||||
@ -21,49 +21,49 @@ pub struct DeferredImmediateAssetionItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProceduralAssertionStatement<'a> {
|
pub enum ProceduralAssertionStatement<'a> {
|
||||||
Concurrent(ConcurrentAssertionStatement<'a>),
|
Concurrent(ConcurrentAssertionStatement<'a>),
|
||||||
Immediate(ImmediateAssetionStatement<'a>),
|
Immediate(ImmediateAssetionStatement<'a>),
|
||||||
Checker(CheckerInstantiation<'a>),
|
Checker(CheckerInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ImmediateAssetionStatement<'a> {
|
pub enum ImmediateAssetionStatement<'a> {
|
||||||
Simple(SimpleImmediateAssertionStatement<'a>),
|
Simple(SimpleImmediateAssertionStatement<'a>),
|
||||||
Deferred(DeferredImmediateAssertionStatement<'a>),
|
Deferred(DeferredImmediateAssertionStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SimpleImmediateAssertionStatement<'a> {
|
pub enum SimpleImmediateAssertionStatement<'a> {
|
||||||
Assert(SimpleImmediateAssertStatement<'a>),
|
Assert(SimpleImmediateAssertStatement<'a>),
|
||||||
Assume(SimpleImmediateAssumeStatement<'a>),
|
Assume(SimpleImmediateAssumeStatement<'a>),
|
||||||
Cover(SimpleImmediateCoverStatement<'a>),
|
Cover(SimpleImmediateCoverStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SimpleImmediateAssertStatement<'a> {
|
pub struct SimpleImmediateAssertStatement<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SimpleImmediateAssumeStatement<'a> {
|
pub struct SimpleImmediateAssumeStatement<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SimpleImmediateCoverStatement<'a> {
|
pub struct SimpleImmediateCoverStatement<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DeferredImmediateAssertionStatement<'a> {
|
pub enum DeferredImmediateAssertionStatement<'a> {
|
||||||
Assert(DeferredImmediateAssertStatement<'a>),
|
Assert(DeferredImmediateAssertStatement<'a>),
|
||||||
Assume(DeferredImmediateAssumeStatement<'a>),
|
Assume(DeferredImmediateAssumeStatement<'a>),
|
||||||
Cover(DeferredImmediateCoverStatement<'a>),
|
Cover(DeferredImmediateCoverStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DeferredImmediateAssertStatement<'a> {
|
pub struct DeferredImmediateAssertStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -73,7 +73,7 @@ pub struct DeferredImmediateAssertStatement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DeferredImmediateAssumeStatement<'a> {
|
pub struct DeferredImmediateAssumeStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -83,7 +83,7 @@ pub struct DeferredImmediateAssumeStatement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DeferredImmediateCoverStatement<'a> {
|
pub struct DeferredImmediateCoverStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -8,14 +8,14 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CaseStatement<'a> {
|
pub enum CaseStatement<'a> {
|
||||||
Normal(CaseStatementNormal<'a>),
|
Normal(CaseStatementNormal<'a>),
|
||||||
Matches(CaseStatementMatches<'a>),
|
Matches(CaseStatementMatches<'a>),
|
||||||
Inside(CaseStatementInside<'a>),
|
Inside(CaseStatementInside<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseStatementNormal<'a> {
|
pub struct CaseStatementNormal<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<UniquePriority<'a>>,
|
Option<UniquePriority<'a>>,
|
||||||
@ -27,7 +27,7 @@ pub struct CaseStatementNormal<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseStatementMatches<'a> {
|
pub struct CaseStatementMatches<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<UniquePriority<'a>>,
|
Option<UniquePriority<'a>>,
|
||||||
@ -40,7 +40,7 @@ pub struct CaseStatementMatches<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseStatementInside<'a> {
|
pub struct CaseStatementInside<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<UniquePriority<'a>>,
|
Option<UniquePriority<'a>>,
|
||||||
@ -60,18 +60,18 @@ pub enum CaseKeyword<'a> {
|
|||||||
Casex(Symbol<'a>),
|
Casex(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseExpression<'a> {
|
pub struct CaseExpression<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CaseItem<'a> {
|
pub enum CaseItem<'a> {
|
||||||
NonDefault(CaseItemNondefault<'a>),
|
NonDefault(CaseItemNondefault<'a>),
|
||||||
Default(CaseItemDefault<'a>),
|
Default(CaseItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseItemNondefault<'a> {
|
pub struct CaseItemNondefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
List<Symbol<'a>, CaseItemExpression<'a>>,
|
List<Symbol<'a>, CaseItemExpression<'a>>,
|
||||||
@ -80,18 +80,18 @@ pub struct CaseItemNondefault<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseItemDefault<'a> {
|
pub struct CaseItemDefault<'a> {
|
||||||
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CasePatternItem<'a> {
|
pub enum CasePatternItem<'a> {
|
||||||
NonDefault(CasePatternItemNondefault<'a>),
|
NonDefault(CasePatternItemNondefault<'a>),
|
||||||
Default(CaseItemDefault<'a>),
|
Default(CaseItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CasePatternItemNondefault<'a> {
|
pub struct CasePatternItemNondefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Pattern<'a>,
|
Pattern<'a>,
|
||||||
@ -101,23 +101,23 @@ pub struct CasePatternItemNondefault<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CaseInsideItem<'a> {
|
pub enum CaseInsideItem<'a> {
|
||||||
NonDefault(CaseInsideItemNondefault<'a>),
|
NonDefault(CaseInsideItemNondefault<'a>),
|
||||||
Default(CaseItemDefault<'a>),
|
Default(CaseItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseInsideItemNondefault<'a> {
|
pub struct CaseInsideItemNondefault<'a> {
|
||||||
pub nodes: (OpenRangeList<'a>, Symbol<'a>, StatementOrNull<'a>),
|
pub nodes: (OpenRangeList<'a>, Symbol<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseItemExpression<'a> {
|
pub struct CaseItemExpression<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RandcaseStatement<'a> {
|
pub struct RandcaseStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -127,17 +127,17 @@ pub struct RandcaseStatement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RandcaseItem<'a> {
|
pub struct RandcaseItem<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, StatementOrNull<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OpenRangeList<'a> {
|
pub struct OpenRangeList<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, OpenValueRange<'a>>,),
|
pub nodes: (List<Symbol<'a>, OpenValueRange<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OpenValueRange<'a> {
|
pub struct OpenValueRange<'a> {
|
||||||
pub nodes: (ValueRange<'a>,),
|
pub nodes: (ValueRange<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClockingDeclaration<'a> {
|
pub enum ClockingDeclaration<'a> {
|
||||||
Local(ClockingDeclarationLocal<'a>),
|
Local(ClockingDeclarationLocal<'a>),
|
||||||
Global(ClockingDeclarationGlobal<'a>),
|
Global(ClockingDeclarationGlobal<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDeclarationLocal<'a> {
|
pub struct ClockingDeclarationLocal<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Default<'a>>,
|
Option<Default<'a>>,
|
||||||
@ -33,7 +33,7 @@ pub struct Default<'a> {
|
|||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDeclarationGlobal<'a> {
|
pub struct ClockingDeclarationGlobal<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -46,7 +46,7 @@ pub struct ClockingDeclarationGlobal<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClockingEvent<'a> {
|
pub enum ClockingEvent<'a> {
|
||||||
Identifier(ClockingEventIdentifier<'a>),
|
Identifier(ClockingEventIdentifier<'a>),
|
||||||
Expression(ClockingEventExpression<'a>),
|
Expression(ClockingEventExpression<'a>),
|
||||||
@ -57,24 +57,24 @@ pub struct ClockingEventIdentifier<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Identifier<'a>),
|
pub nodes: (Symbol<'a>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingEventExpression<'a> {
|
pub struct ClockingEventExpression<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, EventExpression<'a>>),
|
pub nodes: (Symbol<'a>, Paren<'a, EventExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClockingItem<'a> {
|
pub enum ClockingItem<'a> {
|
||||||
Default(ClockingItemDefault<'a>),
|
Default(ClockingItemDefault<'a>),
|
||||||
Direction(ClockingItemDirection<'a>),
|
Direction(ClockingItemDirection<'a>),
|
||||||
Assertion(ClockingItemAssertion<'a>),
|
Assertion(ClockingItemAssertion<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingItemDefault<'a> {
|
pub struct ClockingItemDefault<'a> {
|
||||||
pub nodes: (Symbol<'a>, DefaultSkew<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, DefaultSkew<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingItemDirection<'a> {
|
pub struct ClockingItemDirection<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ClockingDirection<'a>,
|
ClockingDirection<'a>,
|
||||||
@ -83,34 +83,34 @@ pub struct ClockingItemDirection<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingItemAssertion<'a> {
|
pub struct ClockingItemAssertion<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, AssertionItemDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, AssertionItemDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DefaultSkew<'a> {
|
pub enum DefaultSkew<'a> {
|
||||||
Input(DefaultSkewInput<'a>),
|
Input(DefaultSkewInput<'a>),
|
||||||
Output(DefaultSkewOutput<'a>),
|
Output(DefaultSkewOutput<'a>),
|
||||||
InputOutput(DefaultSkewInputOutput<'a>),
|
InputOutput(DefaultSkewInputOutput<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DefaultSkewInput<'a> {
|
pub struct DefaultSkewInput<'a> {
|
||||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DefaultSkewOutput<'a> {
|
pub struct DefaultSkewOutput<'a> {
|
||||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DefaultSkewInputOutput<'a> {
|
pub struct DefaultSkewInputOutput<'a> {
|
||||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>, Symbol<'a>, ClockingSkew<'a>),
|
pub nodes: (Symbol<'a>, ClockingSkew<'a>, Symbol<'a>, ClockingSkew<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClockingDirection<'a> {
|
pub enum ClockingDirection<'a> {
|
||||||
Input(ClockingDirectionInput<'a>),
|
Input(ClockingDirectionInput<'a>),
|
||||||
Output(ClockingDirectionOutput<'a>),
|
Output(ClockingDirectionOutput<'a>),
|
||||||
@ -118,17 +118,17 @@ pub enum ClockingDirection<'a> {
|
|||||||
Inout(Symbol<'a>),
|
Inout(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDirectionInput<'a> {
|
pub struct ClockingDirectionInput<'a> {
|
||||||
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDirectionOutput<'a> {
|
pub struct ClockingDirectionOutput<'a> {
|
||||||
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDirectionInputOutput<'a> {
|
pub struct ClockingDirectionInputOutput<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -138,28 +138,28 @@ pub struct ClockingDirectionInputOutput<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfClockingDeclAssign<'a> {
|
pub struct ListOfClockingDeclAssign<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, ClockingDeclAssign<'a>>,),
|
pub nodes: (List<Symbol<'a>, ClockingDeclAssign<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDeclAssign<'a> {
|
pub struct ClockingDeclAssign<'a> {
|
||||||
pub nodes: (SignalIdentifier<'a>, Option<(Symbol<'a>, Expression<'a>)>),
|
pub nodes: (SignalIdentifier<'a>, Option<(Symbol<'a>, Expression<'a>)>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClockingSkew<'a> {
|
pub enum ClockingSkew<'a> {
|
||||||
Edge(ClockingSkewEdge<'a>),
|
Edge(ClockingSkewEdge<'a>),
|
||||||
DelayControl(DelayControl<'a>),
|
DelayControl(DelayControl<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingSkewEdge<'a> {
|
pub struct ClockingSkewEdge<'a> {
|
||||||
pub nodes: (EdgeIdentifier<'a>, Option<DelayControl<'a>>),
|
pub nodes: (EdgeIdentifier<'a>, Option<DelayControl<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockingDrive<'a> {
|
pub struct ClockingDrive<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ClockvarExpression<'a>,
|
ClockvarExpression<'a>,
|
||||||
@ -169,7 +169,7 @@ pub struct ClockingDrive<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CycleDelay<'a> {
|
pub enum CycleDelay<'a> {
|
||||||
Integral(CycleDelayIntegral<'a>),
|
Integral(CycleDelayIntegral<'a>),
|
||||||
Identifier(CycleDelayIdentifier<'a>),
|
Identifier(CycleDelayIdentifier<'a>),
|
||||||
@ -186,17 +186,17 @@ pub struct CycleDelayIdentifier<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Identifier<'a>),
|
pub nodes: (Symbol<'a>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CycleDelayExpression<'a> {
|
pub struct CycleDelayExpression<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Clockvar<'a> {
|
pub struct Clockvar<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClockvarExpression<'a> {
|
pub struct ClockvarExpression<'a> {
|
||||||
pub nodes: (Clockvar<'a>, Select<'a>),
|
pub nodes: (Clockvar<'a>, Select<'a>),
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConditionalStatement<'a> {
|
pub struct ConditionalStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<UniquePriority<'a>>,
|
Option<UniquePriority<'a>>,
|
||||||
@ -32,18 +32,18 @@ pub enum UniquePriority<'a> {
|
|||||||
Priority(Symbol<'a>),
|
Priority(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CondPredicate<'a> {
|
pub struct CondPredicate<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, ExpressionOrCondPattern<'a>>,),
|
pub nodes: (List<Symbol<'a>, ExpressionOrCondPattern<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ExpressionOrCondPattern<'a> {
|
pub enum ExpressionOrCondPattern<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
CondPattern(CondPattern<'a>),
|
CondPattern(CondPattern<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CondPattern<'a> {
|
pub struct CondPattern<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, Pattern<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, Pattern<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -5,13 +6,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ContinuousAssign<'a> {
|
pub enum ContinuousAssign<'a> {
|
||||||
Net(ContinuousAssignNet<'a>),
|
Net(ContinuousAssignNet<'a>),
|
||||||
Variable(ContinuousAssignVariable<'a>),
|
Variable(ContinuousAssignVariable<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ContinuousAssignNet<'a> {
|
pub struct ContinuousAssignNet<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -22,7 +23,7 @@ pub struct ContinuousAssignNet<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ContinuousAssignVariable<'a> {
|
pub struct ContinuousAssignVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -32,17 +33,17 @@ pub struct ContinuousAssignVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfNetAssignments<'a> {
|
pub struct ListOfNetAssignments<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, NetAssignment<'a>>,),
|
pub nodes: (List<Symbol<'a>, NetAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfVariableAssignments<'a> {
|
pub struct ListOfVariableAssignments<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, VariableAssignment<'a>>,),
|
pub nodes: (List<Symbol<'a>, VariableAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetAlias<'a> {
|
pub struct NetAlias<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -53,7 +54,7 @@ pub struct NetAlias<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetAssignment<'a> {
|
pub struct NetAssignment<'a> {
|
||||||
pub nodes: (NetLvalue<'a>, Symbol<'a>, Expression<'a>),
|
pub nodes: (NetLvalue<'a>, Symbol<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LoopStatement<'a> {
|
pub enum LoopStatement<'a> {
|
||||||
Forever(LoopStatementForever<'a>),
|
Forever(LoopStatementForever<'a>),
|
||||||
Repeat(LoopStatementRepeat<'a>),
|
Repeat(LoopStatementRepeat<'a>),
|
||||||
@ -17,22 +17,22 @@ pub enum LoopStatement<'a> {
|
|||||||
Foreach(LoopStatementForeach<'a>),
|
Foreach(LoopStatementForeach<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementForever<'a> {
|
pub struct LoopStatementForever<'a> {
|
||||||
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementRepeat<'a> {
|
pub struct LoopStatementRepeat<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementWhile<'a> {
|
pub struct LoopStatementWhile<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementFor<'a> {
|
pub struct LoopStatementFor<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -50,7 +50,7 @@ pub struct LoopStatementFor<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementDoWhile<'a> {
|
pub struct LoopStatementDoWhile<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -61,7 +61,7 @@ pub struct LoopStatementDoWhile<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopStatementForeach<'a> {
|
pub struct LoopStatementForeach<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -76,18 +76,18 @@ pub struct LoopStatementForeach<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ForInitialization<'a> {
|
pub enum ForInitialization<'a> {
|
||||||
ListOfVariableAssignments(ListOfVariableAssignments<'a>),
|
ListOfVariableAssignments(ListOfVariableAssignments<'a>),
|
||||||
Declaration(ForInitializationDeclaration<'a>),
|
Declaration(ForInitializationDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ForInitializationDeclaration<'a> {
|
pub struct ForInitializationDeclaration<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, ForVariableDeclaration<'a>>,),
|
pub nodes: (List<Symbol<'a>, ForVariableDeclaration<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ForVariableDeclaration<'a> {
|
pub struct ForVariableDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Var<'a>>,
|
Option<Var<'a>>,
|
||||||
@ -101,19 +101,19 @@ pub struct Var<'a> {
|
|||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ForStep<'a> {
|
pub struct ForStep<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, ForStepAssignment<'a>>,),
|
pub nodes: (List<Symbol<'a>, ForStepAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ForStepAssignment<'a> {
|
pub enum ForStepAssignment<'a> {
|
||||||
OperatorAssignment(OperatorAssignment<'a>),
|
OperatorAssignment(OperatorAssignment<'a>),
|
||||||
IncOrDecExpression(IncOrDecExpression<'a>),
|
IncOrDecExpression(IncOrDecExpression<'a>),
|
||||||
FunctionSubroutineCall(FunctionSubroutineCall<'a>),
|
FunctionSubroutineCall(FunctionSubroutineCall<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopVariables<'a> {
|
pub struct LoopVariables<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, Option<IndexVariableIdentifier<'a>>>,),
|
pub nodes: (List<Symbol<'a>, Option<IndexVariableIdentifier<'a>>>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,18 +8,18 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ActionBlock<'a> {
|
pub enum ActionBlock<'a> {
|
||||||
StatementOrNull(StatementOrNull<'a>),
|
StatementOrNull(StatementOrNull<'a>),
|
||||||
Else(ActionBlockElse<'a>),
|
Else(ActionBlockElse<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ActionBlockElse<'a> {
|
pub struct ActionBlockElse<'a> {
|
||||||
pub nodes: (Option<Statement<'a>>, Symbol<'a>, StatementOrNull<'a>),
|
pub nodes: (Option<Statement<'a>>, Symbol<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SeqBlock<'a> {
|
pub struct SeqBlock<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -30,7 +31,7 @@ pub struct SeqBlock<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParBlock<'a> {
|
pub struct ParBlock<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -42,7 +43,7 @@ pub struct ParBlock<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum JoinKeyword<'a> {
|
pub enum JoinKeyword<'a> {
|
||||||
Join(Symbol<'a>),
|
Join(Symbol<'a>),
|
||||||
JoinAny(Symbol<'a>),
|
JoinAny(Symbol<'a>),
|
||||||
|
@ -7,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Pattern<'a> {
|
pub enum Pattern<'a> {
|
||||||
Variable(Box<PatternVariable<'a>>),
|
Variable(Box<PatternVariable<'a>>),
|
||||||
Asterisk(Symbol<'a>),
|
Asterisk(Symbol<'a>),
|
||||||
@ -22,23 +22,23 @@ pub struct PatternVariable<'a> {
|
|||||||
pub nodes: (Symbol<'a>, VariableIdentifier<'a>),
|
pub nodes: (Symbol<'a>, VariableIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PatternTagged<'a> {
|
pub struct PatternTagged<'a> {
|
||||||
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Pattern<'a>>),
|
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Pattern<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PatternList<'a> {
|
pub struct PatternList<'a> {
|
||||||
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, Pattern<'a>>>,),
|
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, Pattern<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PatternIdentifierList<'a> {
|
pub struct PatternIdentifierList<'a> {
|
||||||
pub nodes:
|
pub nodes:
|
||||||
(ApostropheBrace<'a, List<Symbol<'a>, (MemberIdentifier<'a>, Symbol<'a>, Pattern<'a>)>>,),
|
(ApostropheBrace<'a, List<Symbol<'a>, (MemberIdentifier<'a>, Symbol<'a>, Pattern<'a>)>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssignmentPattern<'a> {
|
pub enum AssignmentPattern<'a> {
|
||||||
List(AssignmentPatternList<'a>),
|
List(AssignmentPatternList<'a>),
|
||||||
Structure(AssignmentPatternStructure<'a>),
|
Structure(AssignmentPatternStructure<'a>),
|
||||||
@ -46,12 +46,12 @@ pub enum AssignmentPattern<'a> {
|
|||||||
Repeat(AssignmentPatternRepeat<'a>),
|
Repeat(AssignmentPatternRepeat<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternList<'a> {
|
pub struct AssignmentPatternList<'a> {
|
||||||
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, Expression<'a>>>,),
|
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, Expression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternStructure<'a> {
|
pub struct AssignmentPatternStructure<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ApostropheBrace<
|
ApostropheBrace<
|
||||||
@ -61,14 +61,14 @@ pub struct AssignmentPatternStructure<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternArray<'a> {
|
pub struct AssignmentPatternArray<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ApostropheBrace<'a, List<Symbol<'a>, (ArrayPatternKey<'a>, Symbol<'a>, Expression<'a>)>>,
|
ApostropheBrace<'a, List<Symbol<'a>, (ArrayPatternKey<'a>, Symbol<'a>, Expression<'a>)>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternRepeat<'a> {
|
pub struct AssignmentPatternRepeat<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ApostropheBrace<
|
ApostropheBrace<
|
||||||
@ -81,25 +81,25 @@ pub struct AssignmentPatternRepeat<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum StructurePatternKey<'a> {
|
pub enum StructurePatternKey<'a> {
|
||||||
MemberIdentifier(MemberIdentifier<'a>),
|
MemberIdentifier(MemberIdentifier<'a>),
|
||||||
AssignmentPatternKey(AssignmentPatternKey<'a>),
|
AssignmentPatternKey(AssignmentPatternKey<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ArrayPatternKey<'a> {
|
pub enum ArrayPatternKey<'a> {
|
||||||
ConstantExpression(ConstantExpression<'a>),
|
ConstantExpression(ConstantExpression<'a>),
|
||||||
AssignmentPatternKey(AssignmentPatternKey<'a>),
|
AssignmentPatternKey(AssignmentPatternKey<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssignmentPatternKey<'a> {
|
pub enum AssignmentPatternKey<'a> {
|
||||||
SimpleType(SimpleType<'a>),
|
SimpleType(SimpleType<'a>),
|
||||||
Default(Symbol<'a>),
|
Default(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternExpression<'a> {
|
pub struct AssignmentPatternExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<AssignmentPatternExpressionType<'a>>,
|
Option<AssignmentPatternExpressionType<'a>>,
|
||||||
@ -107,25 +107,25 @@ pub struct AssignmentPatternExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssignmentPatternExpressionType<'a> {
|
pub enum AssignmentPatternExpressionType<'a> {
|
||||||
PsTypeIdentifier(PsTypeIdentifier<'a>),
|
PsTypeIdentifier(PsTypeIdentifier<'a>),
|
||||||
PsParameterIdentifier(PsParameterIdentifier<'a>),
|
PsParameterIdentifier(PsParameterIdentifier<'a>),
|
||||||
IntegerAtomType(IntegerAtomType),
|
IntegerAtomType(IntegerAtomType<'a>),
|
||||||
TypeReference(TypeReference<'a>),
|
TypeReference(TypeReference<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantAssignmentPatternExpression<'a> {
|
pub struct ConstantAssignmentPatternExpression<'a> {
|
||||||
pub nodes: (AssignmentPatternExpression<'a>,),
|
pub nodes: (AssignmentPatternExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternNetLvalue<'a> {
|
pub struct AssignmentPatternNetLvalue<'a> {
|
||||||
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, NetLvalue<'a>>>,),
|
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, NetLvalue<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentPatternVariableLvalue<'a> {
|
pub struct AssignmentPatternVariableLvalue<'a> {
|
||||||
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, VariableLvalue<'a>>>,),
|
pub nodes: (ApostropheBrace<'a, List<Symbol<'a>, VariableLvalue<'a>>>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -5,17 +6,17 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InitialConstruct<'a> {
|
pub struct InitialConstruct<'a> {
|
||||||
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AlwaysConstruct<'a> {
|
pub struct AlwaysConstruct<'a> {
|
||||||
pub nodes: (AlwaysKeyword<'a>, Statement<'a>),
|
pub nodes: (AlwaysKeyword<'a>, Statement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AlwaysKeyword<'a> {
|
pub enum AlwaysKeyword<'a> {
|
||||||
Always(Symbol<'a>),
|
Always(Symbol<'a>),
|
||||||
AlwaysComb(Symbol<'a>),
|
AlwaysComb(Symbol<'a>),
|
||||||
@ -23,12 +24,12 @@ pub enum AlwaysKeyword<'a> {
|
|||||||
AlwaysFf(Symbol<'a>),
|
AlwaysFf(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FinalConstruct<'a> {
|
pub struct FinalConstruct<'a> {
|
||||||
pub nodes: (Symbol<'a>, FunctionStatement<'a>),
|
pub nodes: (Symbol<'a>, FunctionStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BlockingAssignment<'a> {
|
pub enum BlockingAssignment<'a> {
|
||||||
Variable(BlockingAssignmentVariable<'a>),
|
Variable(BlockingAssignmentVariable<'a>),
|
||||||
NonrangeVariable(BlockingAssignmentNonrangeVariable<'a>),
|
NonrangeVariable(BlockingAssignmentNonrangeVariable<'a>),
|
||||||
@ -36,7 +37,7 @@ pub enum BlockingAssignment<'a> {
|
|||||||
OperatorAssignment(OperatorAssignment<'a>),
|
OperatorAssignment(OperatorAssignment<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockingAssignmentVariable<'a> {
|
pub struct BlockingAssignmentVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
VariableLvalue<'a>,
|
VariableLvalue<'a>,
|
||||||
@ -46,12 +47,12 @@ pub struct BlockingAssignmentVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockingAssignmentNonrangeVariable<'a> {
|
pub struct BlockingAssignmentNonrangeVariable<'a> {
|
||||||
pub nodes: (NonrangeVariableLvalue<'a>, Symbol<'a>, DynamicArrayNew<'a>),
|
pub nodes: (NonrangeVariableLvalue<'a>, Symbol<'a>, DynamicArrayNew<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockingAssignmentHierarchicalVariable<'a> {
|
pub struct BlockingAssignmentHierarchicalVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ImplicitClassHandleOrClassScopeOrPackageScope<'a>>,
|
Option<ImplicitClassHandleOrClassScopeOrPackageScope<'a>>,
|
||||||
@ -62,17 +63,17 @@ pub struct BlockingAssignmentHierarchicalVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OperatorAssignment<'a> {
|
pub struct OperatorAssignment<'a> {
|
||||||
pub nodes: (VariableLvalue<'a>, AssignmentOperator<'a>, Expression<'a>),
|
pub nodes: (VariableLvalue<'a>, AssignmentOperator<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssignmentOperator<'a> {
|
pub struct AssignmentOperator<'a> {
|
||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonblockingAssignment<'a> {
|
pub struct NonblockingAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
VariableLvalue<'a>,
|
VariableLvalue<'a>,
|
||||||
@ -82,7 +83,7 @@ pub struct NonblockingAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProceduralContinuousAssignment<'a> {
|
pub enum ProceduralContinuousAssignment<'a> {
|
||||||
Assign(ProceduralContinuousAssignmentAssign<'a>),
|
Assign(ProceduralContinuousAssignmentAssign<'a>),
|
||||||
Deassign(ProceduralContinuousAssignmentDeassign<'a>),
|
Deassign(ProceduralContinuousAssignmentDeassign<'a>),
|
||||||
@ -92,37 +93,37 @@ pub enum ProceduralContinuousAssignment<'a> {
|
|||||||
ReleaseNet(ProceduralContinuousAssignmentReleaseNet<'a>),
|
ReleaseNet(ProceduralContinuousAssignmentReleaseNet<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentAssign<'a> {
|
pub struct ProceduralContinuousAssignmentAssign<'a> {
|
||||||
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentDeassign<'a> {
|
pub struct ProceduralContinuousAssignmentDeassign<'a> {
|
||||||
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentForceVariable<'a> {
|
pub struct ProceduralContinuousAssignmentForceVariable<'a> {
|
||||||
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentForceNet<'a> {
|
pub struct ProceduralContinuousAssignmentForceNet<'a> {
|
||||||
pub nodes: (Symbol<'a>, NetAssignment<'a>),
|
pub nodes: (Symbol<'a>, NetAssignment<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentReleaseVariable<'a> {
|
pub struct ProceduralContinuousAssignmentReleaseVariable<'a> {
|
||||||
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralContinuousAssignmentReleaseNet<'a> {
|
pub struct ProceduralContinuousAssignmentReleaseNet<'a> {
|
||||||
pub nodes: (Symbol<'a>, NetLvalue<'a>),
|
pub nodes: (Symbol<'a>, NetLvalue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableAssignment<'a> {
|
pub struct VariableAssignment<'a> {
|
||||||
pub nodes: (VariableLvalue<'a>, Symbol<'a>, Expression<'a>),
|
pub nodes: (VariableLvalue<'a>, Symbol<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,7 +8,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RandsequenceStatement<'a> {
|
pub struct RandsequenceStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -18,7 +19,7 @@ pub struct RandsequenceStatement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Production<'a> {
|
pub struct Production<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<DataTypeOrVoid<'a>>,
|
Option<DataTypeOrVoid<'a>>,
|
||||||
@ -30,7 +31,7 @@ pub struct Production<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsRule<'a> {
|
pub struct RsRule<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
RsProductionList<'a>,
|
RsProductionList<'a>,
|
||||||
@ -38,18 +39,18 @@ pub struct RsRule<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RsProductionList<'a> {
|
pub enum RsProductionList<'a> {
|
||||||
Prod(RsProductionListProd<'a>),
|
Prod(RsProductionListProd<'a>),
|
||||||
Join(RsProductionListJoin<'a>),
|
Join(RsProductionListJoin<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsProductionListProd<'a> {
|
pub struct RsProductionListProd<'a> {
|
||||||
pub nodes: (RsProd<'a>, Vec<RsProd<'a>>),
|
pub nodes: (RsProd<'a>, Vec<RsProd<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsProductionListJoin<'a> {
|
pub struct RsProductionListJoin<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -61,24 +62,24 @@ pub struct RsProductionListJoin<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum WeightSpecification<'a> {
|
pub enum WeightSpecification<'a> {
|
||||||
IntegralNumber(IntegralNumber<'a>),
|
IntegralNumber(IntegralNumber<'a>),
|
||||||
PsIdentifier(PsIdentifier<'a>),
|
PsIdentifier(PsIdentifier<'a>),
|
||||||
Expression(WeightSpecificationExpression<'a>),
|
Expression(WeightSpecificationExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct WeightSpecificationExpression<'a> {
|
pub struct WeightSpecificationExpression<'a> {
|
||||||
pub nodes: (Paren<'a, Expression<'a>>,),
|
pub nodes: (Paren<'a, Expression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsCodeBlock<'a> {
|
pub struct RsCodeBlock<'a> {
|
||||||
pub nodes: (Brace<'a, (Vec<DataDeclaration<'a>>, Vec<StatementOrNull<'a>>)>,),
|
pub nodes: (Brace<'a, (Vec<DataDeclaration<'a>>, Vec<StatementOrNull<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RsProd<'a> {
|
pub enum RsProd<'a> {
|
||||||
ProductionItem(ProductionItem<'a>),
|
ProductionItem(ProductionItem<'a>),
|
||||||
RsCodeBlock(RsCodeBlock<'a>),
|
RsCodeBlock(RsCodeBlock<'a>),
|
||||||
@ -87,7 +88,7 @@ pub enum RsProd<'a> {
|
|||||||
RsCase(RsCase<'a>),
|
RsCase(RsCase<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProductionItem<'a> {
|
pub struct ProductionItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ProductionIdentifier<'a>,
|
ProductionIdentifier<'a>,
|
||||||
@ -95,7 +96,7 @@ pub struct ProductionItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsIfElse<'a> {
|
pub struct RsIfElse<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -105,12 +106,12 @@ pub struct RsIfElse<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsRepeat<'a> {
|
pub struct RsRepeat<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ProductionItem<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ProductionItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsCase<'a> {
|
pub struct RsCase<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -121,13 +122,13 @@ pub struct RsCase<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RsCaseItem<'a> {
|
pub enum RsCaseItem<'a> {
|
||||||
NonDefault(RsCaseItemNondefault<'a>),
|
NonDefault(RsCaseItemNondefault<'a>),
|
||||||
Default(RsCaseItemDefault<'a>),
|
Default(RsCaseItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsCaseItemNondefault<'a> {
|
pub struct RsCaseItemNondefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
List<Symbol<'a>, CaseItemExpression<'a>>,
|
List<Symbol<'a>, CaseItemExpression<'a>>,
|
||||||
@ -137,7 +138,7 @@ pub struct RsCaseItemNondefault<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RsCaseItemDefault<'a> {
|
pub struct RsCaseItemDefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,18 +8,18 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum StatementOrNull<'a> {
|
pub enum StatementOrNull<'a> {
|
||||||
Statement(Statement<'a>),
|
Statement(Statement<'a>),
|
||||||
Attribute(StatementOrNullAttribute<'a>),
|
Attribute(StatementOrNullAttribute<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StatementOrNullAttribute<'a> {
|
pub struct StatementOrNullAttribute<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Statement<'a> {
|
pub struct Statement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(BlockIdentifier<'a>, Symbol<'a>)>,
|
Option<(BlockIdentifier<'a>, Symbol<'a>)>,
|
||||||
@ -27,7 +28,7 @@ pub struct Statement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum StatementItem<'a> {
|
pub enum StatementItem<'a> {
|
||||||
BlockingAssignment(Box<(BlockingAssignment<'a>, Symbol<'a>)>),
|
BlockingAssignment(Box<(BlockingAssignment<'a>, Symbol<'a>)>),
|
||||||
NonblockingAssignment(Box<(NonblockingAssignment<'a>, Symbol<'a>)>),
|
NonblockingAssignment(Box<(NonblockingAssignment<'a>, Symbol<'a>)>),
|
||||||
@ -51,23 +52,23 @@ pub enum StatementItem<'a> {
|
|||||||
ExpectPropertyStatement(Box<ExpectPropertyStatement<'a>>),
|
ExpectPropertyStatement(Box<ExpectPropertyStatement<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionStatement<'a> {
|
pub struct FunctionStatement<'a> {
|
||||||
pub nodes: (Statement<'a>,),
|
pub nodes: (Statement<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum FunctionStatementOrNull<'a> {
|
pub enum FunctionStatementOrNull<'a> {
|
||||||
Statement(FunctionStatement<'a>),
|
Statement(FunctionStatement<'a>),
|
||||||
Attribute(FunctionStatementOrNullAttribute<'a>),
|
Attribute(FunctionStatementOrNullAttribute<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionStatementOrNullAttribute<'a> {
|
pub struct FunctionStatementOrNullAttribute<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableIdentifierList<'a> {
|
pub struct VariableIdentifierList<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, VariableIdentifier<'a>>,),
|
pub nodes: (List<Symbol<'a>, VariableIdentifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,13 +7,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SubroutineCallStatement<'a> {
|
pub enum SubroutineCallStatement<'a> {
|
||||||
SubroutineCall((SubroutineCall<'a>, Symbol<'a>)),
|
SubroutineCall((SubroutineCall<'a>, Symbol<'a>)),
|
||||||
Function(SubroutineCallStatementFunction<'a>),
|
Function(SubroutineCallStatementFunction<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SubroutineCallStatementFunction<'a> {
|
pub struct SubroutineCallStatementFunction<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -7,24 +7,24 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProceduralTimingControlStatement<'a> {
|
pub struct ProceduralTimingControlStatement<'a> {
|
||||||
pub nodes: (ProceduralTimingControl<'a>, StatementOrNull<'a>),
|
pub nodes: (ProceduralTimingControl<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DelayOrEventControl<'a> {
|
pub enum DelayOrEventControl<'a> {
|
||||||
Delay(DelayControl<'a>),
|
Delay(DelayControl<'a>),
|
||||||
Event(EventControl<'a>),
|
Event(EventControl<'a>),
|
||||||
Repeat(DelayOrEventControlRepeat<'a>),
|
Repeat(DelayOrEventControlRepeat<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DelayOrEventControlRepeat<'a> {
|
pub struct DelayOrEventControlRepeat<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, EventControl<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, EventControl<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DelayControl<'a> {
|
pub enum DelayControl<'a> {
|
||||||
Delay(DelayControlDelay<'a>),
|
Delay(DelayControlDelay<'a>),
|
||||||
Mintypmax(DelayControlMintypmax<'a>),
|
Mintypmax(DelayControlMintypmax<'a>),
|
||||||
@ -35,12 +35,12 @@ pub struct DelayControlDelay<'a> {
|
|||||||
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DelayControlMintypmax<'a> {
|
pub struct DelayControlMintypmax<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, MintypmaxExpression<'a>>),
|
pub nodes: (Symbol<'a>, Paren<'a, MintypmaxExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum EventControl<'a> {
|
pub enum EventControl<'a> {
|
||||||
EventIdentifier(EventControlEventIdentifier<'a>),
|
EventIdentifier(EventControlEventIdentifier<'a>),
|
||||||
EventExpression(EventControlEventExpression<'a>),
|
EventExpression(EventControlEventExpression<'a>),
|
||||||
@ -49,12 +49,12 @@ pub enum EventControl<'a> {
|
|||||||
SequenceIdentifier(EventControlSequenceIdentifier<'a>),
|
SequenceIdentifier(EventControlSequenceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventControlEventIdentifier<'a> {
|
pub struct EventControlEventIdentifier<'a> {
|
||||||
pub nodes: (Symbol<'a>, HierarchicalEventIdentifier<'a>),
|
pub nodes: (Symbol<'a>, HierarchicalEventIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventControlEventExpression<'a> {
|
pub struct EventControlEventExpression<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, EventExpression<'a>>),
|
pub nodes: (Symbol<'a>, Paren<'a, EventExpression<'a>>),
|
||||||
}
|
}
|
||||||
@ -69,12 +69,12 @@ pub struct EventControlParenAsterisk<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Paren<'a, Symbol<'a>>),
|
pub nodes: (Symbol<'a>, Paren<'a, Symbol<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventControlSequenceIdentifier<'a> {
|
pub struct EventControlSequenceIdentifier<'a> {
|
||||||
pub nodes: (Symbol<'a>, PsOrHierarchicalSequenceIdentifier<'a>),
|
pub nodes: (Symbol<'a>, PsOrHierarchicalSequenceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum EventExpression<'a> {
|
pub enum EventExpression<'a> {
|
||||||
Expression(Box<EventExpressionExpression<'a>>),
|
Expression(Box<EventExpressionExpression<'a>>),
|
||||||
Sequence(Box<EventExpressionSequence<'a>>),
|
Sequence(Box<EventExpressionSequence<'a>>),
|
||||||
@ -83,7 +83,7 @@ pub enum EventExpression<'a> {
|
|||||||
Paren(Box<EventExpressionParen<'a>>),
|
Paren(Box<EventExpressionParen<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventExpressionExpression<'a> {
|
pub struct EventExpressionExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<EdgeIdentifier<'a>>,
|
Option<EdgeIdentifier<'a>>,
|
||||||
@ -92,41 +92,41 @@ pub struct EventExpressionExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventExpressionSequence<'a> {
|
pub struct EventExpressionSequence<'a> {
|
||||||
pub nodes: (SequenceInstance<'a>, Option<(Symbol<'a>, Expression<'a>)>),
|
pub nodes: (SequenceInstance<'a>, Option<(Symbol<'a>, Expression<'a>)>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventExpressionOr<'a> {
|
pub struct EventExpressionOr<'a> {
|
||||||
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>),
|
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventExpressionComma<'a> {
|
pub struct EventExpressionComma<'a> {
|
||||||
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>),
|
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventExpressionParen<'a> {
|
pub struct EventExpressionParen<'a> {
|
||||||
pub nodes: (Paren<'a, EventExpression<'a>>,),
|
pub nodes: (Paren<'a, EventExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProceduralTimingControl<'a> {
|
pub enum ProceduralTimingControl<'a> {
|
||||||
DelayControl(DelayControl<'a>),
|
DelayControl(DelayControl<'a>),
|
||||||
EventControl(EventControl<'a>),
|
EventControl(EventControl<'a>),
|
||||||
CycleDelay(CycleDelay<'a>),
|
CycleDelay(CycleDelay<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum JumpStatement<'a> {
|
pub enum JumpStatement<'a> {
|
||||||
Return(JumpStatementReturn<'a>),
|
Return(JumpStatementReturn<'a>),
|
||||||
Break(JumpStatementBreak<'a>),
|
Break(JumpStatementBreak<'a>),
|
||||||
Continue(JumpStatementContinue<'a>),
|
Continue(JumpStatementContinue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct JumpStatementReturn<'a> {
|
pub struct JumpStatementReturn<'a> {
|
||||||
pub nodes: (Symbol<'a>, Option<Expression<'a>>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Option<Expression<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
@ -141,14 +141,14 @@ pub struct JumpStatementContinue<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum WaitStatement<'a> {
|
pub enum WaitStatement<'a> {
|
||||||
Wait(WaitStatementWait<'a>),
|
Wait(WaitStatementWait<'a>),
|
||||||
Fork(WaitStatementFork<'a>),
|
Fork(WaitStatementFork<'a>),
|
||||||
Order(WaitStatementOrder<'a>),
|
Order(WaitStatementOrder<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct WaitStatementWait<'a> {
|
pub struct WaitStatementWait<'a> {
|
||||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ pub struct WaitStatementFork<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct WaitStatementOrder<'a> {
|
pub struct WaitStatementOrder<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -167,18 +167,18 @@ pub struct WaitStatementOrder<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum EventTrigger<'a> {
|
pub enum EventTrigger<'a> {
|
||||||
Named(EventTriggerNamed<'a>),
|
Named(EventTriggerNamed<'a>),
|
||||||
Nonblocking(EventTriggerNonblocking<'a>),
|
Nonblocking(EventTriggerNonblocking<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventTriggerNamed<'a> {
|
pub struct EventTriggerNamed<'a> {
|
||||||
pub nodes: (Symbol<'a>, HierarchicalEventIdentifier<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, HierarchicalEventIdentifier<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EventTriggerNonblocking<'a> {
|
pub struct EventTriggerNonblocking<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -188,19 +188,19 @@ pub struct EventTriggerNonblocking<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DisableStatement<'a> {
|
pub enum DisableStatement<'a> {
|
||||||
Task(DisableStatementTask<'a>),
|
Task(DisableStatementTask<'a>),
|
||||||
Block(DisableStatementBlock<'a>),
|
Block(DisableStatementBlock<'a>),
|
||||||
Fork(DisableStatementFork<'a>),
|
Fork(DisableStatementFork<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DisableStatementTask<'a> {
|
pub struct DisableStatementTask<'a> {
|
||||||
pub nodes: (Symbol<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DisableStatementBlock<'a> {
|
pub struct DisableStatementBlock<'a> {
|
||||||
pub nodes: (Symbol<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,18 +7,18 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConcurrentAssertionItem<'a> {
|
pub enum ConcurrentAssertionItem<'a> {
|
||||||
Statement(ConcurrentAssertionItemStatement<'a>),
|
Statement(ConcurrentAssertionItemStatement<'a>),
|
||||||
CheckerInstantiation(CheckerInstantiation<'a>),
|
CheckerInstantiation(CheckerInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConcurrentAssertionItemStatement<'a> {
|
pub struct ConcurrentAssertionItemStatement<'a> {
|
||||||
pub nodes: (Identifier<'a>, ConcurrentAssertionStatement<'a>),
|
pub nodes: (Identifier<'a>, ConcurrentAssertionStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConcurrentAssertionStatement<'a> {
|
pub enum ConcurrentAssertionStatement<'a> {
|
||||||
AssertProperty(AssertPropertyStatement<'a>),
|
AssertProperty(AssertPropertyStatement<'a>),
|
||||||
AssumeProperty(AssumePropertyStatement<'a>),
|
AssumeProperty(AssumePropertyStatement<'a>),
|
||||||
@ -26,27 +27,27 @@ pub enum ConcurrentAssertionStatement<'a> {
|
|||||||
RestrictProperty(RestrictPropertyStatement<'a>),
|
RestrictProperty(RestrictPropertyStatement<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssertPropertyStatement<'a> {
|
pub struct AssertPropertyStatement<'a> {
|
||||||
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssumePropertyStatement<'a> {
|
pub struct AssumePropertyStatement<'a> {
|
||||||
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverPropertyStatement<'a> {
|
pub struct CoverPropertyStatement<'a> {
|
||||||
pub nodes: (PropertySpec<'a>, StatementOrNull<'a>),
|
pub nodes: (PropertySpec<'a>, StatementOrNull<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExpectPropertyStatement<'a> {
|
pub struct ExpectPropertyStatement<'a> {
|
||||||
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
pub nodes: (PropertySpec<'a>, ActionBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverSequenceStatement<'a> {
|
pub struct CoverSequenceStatement<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ClockingEvent<'a>>,
|
Option<ClockingEvent<'a>>,
|
||||||
@ -56,23 +57,23 @@ pub struct CoverSequenceStatement<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RestrictPropertyStatement<'a> {
|
pub struct RestrictPropertyStatement<'a> {
|
||||||
pub nodes: (PropertySpec<'a>),
|
pub nodes: (PropertySpec<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyInstance<'a> {
|
pub struct PropertyInstance<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<PropertyListOfArguments<'a>>),
|
pub nodes: (Identifier<'a>, Option<PropertyListOfArguments<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyListOfArguments<'a> {
|
pub enum PropertyListOfArguments<'a> {
|
||||||
Ordered(PropertyListOfArgumentsOrdered<'a>),
|
Ordered(PropertyListOfArgumentsOrdered<'a>),
|
||||||
Named(PropertyListOfArgumentsNamed<'a>),
|
Named(PropertyListOfArgumentsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyListOfArgumentsOrdered<'a> {
|
pub struct PropertyListOfArgumentsOrdered<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<PropertyActualArg<'a>>,
|
Vec<PropertyActualArg<'a>>,
|
||||||
@ -80,25 +81,25 @@ pub struct PropertyListOfArgumentsOrdered<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyListOfArgumentsNamed<'a> {
|
pub struct PropertyListOfArgumentsNamed<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, Option<PropertyActualArg<'a>>)>,),
|
pub nodes: (Vec<(Identifier<'a>, Option<PropertyActualArg<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyActualArg<'a> {
|
pub enum PropertyActualArg<'a> {
|
||||||
PropertyExpr(PropertyExpr<'a>),
|
PropertyExpr(PropertyExpr<'a>),
|
||||||
SequenceActualArg(SequenceActualArg<'a>),
|
SequenceActualArg(SequenceActualArg<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssertionItemDeclaration<'a> {
|
pub enum AssertionItemDeclaration<'a> {
|
||||||
PropertyDeclaration(PropertyDeclaration<'a>),
|
PropertyDeclaration(PropertyDeclaration<'a>),
|
||||||
SequenceDeclaration(SequenceDeclaration<'a>),
|
SequenceDeclaration(SequenceDeclaration<'a>),
|
||||||
LetDeclaration(LetDeclaration<'a>),
|
LetDeclaration(LetDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyDeclaration<'a> {
|
pub struct PropertyDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -108,16 +109,16 @@ pub struct PropertyDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyPortList<'a> {
|
pub struct PropertyPortList<'a> {
|
||||||
pub nodes: (Vec<PropertyPortItem<'a>>,),
|
pub nodes: (Vec<PropertyPortItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyPortItem<'a> {
|
pub struct PropertyPortItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
Option<PropertyLvarPortDirection>,
|
Option<PropertyLvarPortDirection<'a>>,
|
||||||
PropertyFormalType<'a>,
|
PropertyFormalType<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Vec<VariableDimension<'a>>,
|
Vec<VariableDimension<'a>>,
|
||||||
@ -125,18 +126,18 @@ pub struct PropertyPortItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyLvarPortDirection {
|
pub enum PropertyLvarPortDirection<'a> {
|
||||||
Input,
|
Input(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyFormalType<'a> {
|
pub enum PropertyFormalType<'a> {
|
||||||
SequenceFormalType(SequenceFormalType<'a>),
|
SequenceFormalType(SequenceFormalType<'a>),
|
||||||
Property,
|
Property(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertySpec<'a> {
|
pub struct PropertySpec<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ClockingEvent<'a>>,
|
Option<ClockingEvent<'a>>,
|
||||||
@ -145,7 +146,7 @@ pub struct PropertySpec<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyExpr<'a> {
|
pub enum PropertyExpr<'a> {
|
||||||
SequenceExpr(SequenceExpr<'a>),
|
SequenceExpr(SequenceExpr<'a>),
|
||||||
Strong(PropertyExprStrong<'a>),
|
Strong(PropertyExprStrong<'a>),
|
||||||
@ -180,47 +181,47 @@ pub enum PropertyExpr<'a> {
|
|||||||
ClockingEvent(Box<PropertyExprClockingEvent<'a>>),
|
ClockingEvent(Box<PropertyExprClockingEvent<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprStrong<'a> {
|
pub struct PropertyExprStrong<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>,),
|
pub nodes: (SequenceExpr<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprWeak<'a> {
|
pub struct PropertyExprWeak<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>,),
|
pub nodes: (SequenceExpr<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprParen<'a> {
|
pub struct PropertyExprParen<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>,),
|
pub nodes: (PropertyExpr<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprNot<'a> {
|
pub struct PropertyExprNot<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>,),
|
pub nodes: (PropertyExpr<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprOr<'a> {
|
pub struct PropertyExprOr<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprAnd<'a> {
|
pub struct PropertyExprAnd<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprImplicationOverlapped<'a> {
|
pub struct PropertyExprImplicationOverlapped<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprImplicationNonoverlapped<'a> {
|
pub struct PropertyExprImplicationNonoverlapped<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprIf<'a> {
|
pub struct PropertyExprIf<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ExpressionOrDist<'a>,
|
ExpressionOrDist<'a>,
|
||||||
@ -229,123 +230,123 @@ pub struct PropertyExprIf<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprCase<'a> {
|
pub struct PropertyExprCase<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, Vec<PropertyCaseItem<'a>>),
|
pub nodes: (ExpressionOrDist<'a>, Vec<PropertyCaseItem<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprFollowedByOverlapped<'a> {
|
pub struct PropertyExprFollowedByOverlapped<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprFollowedByNonoverlapped<'a> {
|
pub struct PropertyExprFollowedByNonoverlapped<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprNexttime<'a> {
|
pub struct PropertyExprNexttime<'a> {
|
||||||
pub nodes: (Option<ConstantExpression<'a>>, PropertyExpr<'a>),
|
pub nodes: (Option<ConstantExpression<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSNexttime<'a> {
|
pub struct PropertyExprSNexttime<'a> {
|
||||||
pub nodes: (Option<ConstantExpression<'a>>, PropertyExpr<'a>),
|
pub nodes: (Option<ConstantExpression<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprAlways<'a> {
|
pub struct PropertyExprAlways<'a> {
|
||||||
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSAlways<'a> {
|
pub struct PropertyExprSAlways<'a> {
|
||||||
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprEventually<'a> {
|
pub struct PropertyExprEventually<'a> {
|
||||||
pub nodes: (ConstantRange<'a>, PropertyExpr<'a>),
|
pub nodes: (ConstantRange<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSEventually<'a> {
|
pub struct PropertyExprSEventually<'a> {
|
||||||
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
pub nodes: (Option<CycleDelayConstRangeExpression<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprUntil<'a> {
|
pub struct PropertyExprUntil<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSUntil<'a> {
|
pub struct PropertyExprSUntil<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprUntilWith<'a> {
|
pub struct PropertyExprUntilWith<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSUntilWith<'a> {
|
pub struct PropertyExprSUntilWith<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprImplies<'a> {
|
pub struct PropertyExprImplies<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprIff<'a> {
|
pub struct PropertyExprIff<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
pub nodes: (PropertyExpr<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprAcceptOn<'a> {
|
pub struct PropertyExprAcceptOn<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprRejectOn<'a> {
|
pub struct PropertyExprRejectOn<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSyncAcceptOn<'a> {
|
pub struct PropertyExprSyncAcceptOn<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprSyncRejectOn<'a> {
|
pub struct PropertyExprSyncRejectOn<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
pub nodes: (ExpressionOrDist<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyExprClockingEvent<'a> {
|
pub struct PropertyExprClockingEvent<'a> {
|
||||||
pub nodes: (ClockingEvent<'a>, PropertyExpr<'a>),
|
pub nodes: (ClockingEvent<'a>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyCaseItem<'a> {
|
pub enum PropertyCaseItem<'a> {
|
||||||
Nondefault(PropertyCaseItemNondefault<'a>),
|
Nondefault(PropertyCaseItemNondefault<'a>),
|
||||||
Default(PropertyCaseItemDefault<'a>),
|
Default(PropertyCaseItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyCaseItemNondefault<'a> {
|
pub struct PropertyCaseItemNondefault<'a> {
|
||||||
pub nodes: (Vec<ExpressionOrDist<'a>>, PropertyExpr<'a>),
|
pub nodes: (Vec<ExpressionOrDist<'a>>, PropertyExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PropertyCaseItemDefault<'a> {
|
pub struct PropertyCaseItemDefault<'a> {
|
||||||
pub nodes: (PropertyExpr<'a>,),
|
pub nodes: (PropertyExpr<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceDeclaration<'a> {
|
pub struct SequenceDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -356,16 +357,16 @@ pub struct SequenceDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequencePortList<'a> {
|
pub struct SequencePortList<'a> {
|
||||||
pub nodes: (Vec<SequencePortItem<'a>>,),
|
pub nodes: (Vec<SequencePortItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequencePortItem<'a> {
|
pub struct SequencePortItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
Option<SequenceLvarPortDirection>,
|
Option<SequenceLvarPortDirection<'a>>,
|
||||||
SequenceFormalType<'a>,
|
SequenceFormalType<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Vec<VariableDimension<'a>>,
|
Vec<VariableDimension<'a>>,
|
||||||
@ -373,21 +374,21 @@ pub struct SequencePortItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceLvarPortDirection {
|
pub enum SequenceLvarPortDirection<'a> {
|
||||||
Input,
|
Input(Symbol<'a>),
|
||||||
Inout,
|
Inout(Symbol<'a>),
|
||||||
Output,
|
Output(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceFormalType<'a> {
|
pub enum SequenceFormalType<'a> {
|
||||||
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
||||||
Sequence,
|
Sequence(Symbol<'a>),
|
||||||
Untyped,
|
Untyped(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceExpr<'a> {
|
pub enum SequenceExpr<'a> {
|
||||||
CycleDelayExpr(SequenceExprCycleDelayExpr<'a>),
|
CycleDelayExpr(SequenceExprCycleDelayExpr<'a>),
|
||||||
ExprCycleDelayExpr(Box<SequenceExprExprCycleDelayExpr<'a>>),
|
ExprCycleDelayExpr(Box<SequenceExprExprCycleDelayExpr<'a>>),
|
||||||
@ -403,12 +404,12 @@ pub enum SequenceExpr<'a> {
|
|||||||
ClockingEvent(Box<SequenceExprClockingEvent<'a>>),
|
ClockingEvent(Box<SequenceExprClockingEvent<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprCycleDelayExpr<'a> {
|
pub struct SequenceExprCycleDelayExpr<'a> {
|
||||||
pub nodes: (Vec<(CycleDelayRange<'a>, SequenceExpr<'a>)>,),
|
pub nodes: (Vec<(CycleDelayRange<'a>, SequenceExpr<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprExprCycleDelayExpr<'a> {
|
pub struct SequenceExprExprCycleDelayExpr<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SequenceExpr<'a>,
|
SequenceExpr<'a>,
|
||||||
@ -416,17 +417,17 @@ pub struct SequenceExprExprCycleDelayExpr<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprExpression<'a> {
|
pub struct SequenceExprExpression<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, Option<BooleanAbbrev<'a>>),
|
pub nodes: (ExpressionOrDist<'a>, Option<BooleanAbbrev<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprInstance<'a> {
|
pub struct SequenceExprInstance<'a> {
|
||||||
pub nodes: (SequenceInstance<'a>, Option<SequenceAbbrev<'a>>),
|
pub nodes: (SequenceInstance<'a>, Option<SequenceAbbrev<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprParen<'a> {
|
pub struct SequenceExprParen<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SequenceExpr<'a>,
|
SequenceExpr<'a>,
|
||||||
@ -435,73 +436,73 @@ pub struct SequenceExprParen<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprAnd<'a> {
|
pub struct SequenceExprAnd<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprIntersect<'a> {
|
pub struct SequenceExprIntersect<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprOr<'a> {
|
pub struct SequenceExprOr<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprFirstMatch<'a> {
|
pub struct SequenceExprFirstMatch<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, Vec<SequenceMatchItem<'a>>),
|
pub nodes: (SequenceExpr<'a>, Vec<SequenceMatchItem<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprThroughout<'a> {
|
pub struct SequenceExprThroughout<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>, SequenceExpr<'a>),
|
pub nodes: (ExpressionOrDist<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprWithin<'a> {
|
pub struct SequenceExprWithin<'a> {
|
||||||
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
pub nodes: (SequenceExpr<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceExprClockingEvent<'a> {
|
pub struct SequenceExprClockingEvent<'a> {
|
||||||
pub nodes: (ClockingEvent<'a>, SequenceExpr<'a>),
|
pub nodes: (ClockingEvent<'a>, SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CycleDelayRange<'a> {
|
pub enum CycleDelayRange<'a> {
|
||||||
ConstantPrimary(ConstantPrimary<'a>),
|
ConstantPrimary(ConstantPrimary<'a>),
|
||||||
CycleDelayConstRangeExpression(CycleDelayConstRangeExpression<'a>),
|
CycleDelayConstRangeExpression(CycleDelayConstRangeExpression<'a>),
|
||||||
Asterisk,
|
Asterisk(Symbol<'a>),
|
||||||
Plus,
|
Plus(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceMethodCall<'a> {
|
pub struct SequenceMethodCall<'a> {
|
||||||
pub nodes: (SequenceInstance<'a>, Identifier<'a>),
|
pub nodes: (SequenceInstance<'a>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceMatchItem<'a> {
|
pub enum SequenceMatchItem<'a> {
|
||||||
OperatorAssignment(OperatorAssignment<'a>),
|
OperatorAssignment(OperatorAssignment<'a>),
|
||||||
IncOrDecExpression(IncOrDecExpression<'a>),
|
IncOrDecExpression(IncOrDecExpression<'a>),
|
||||||
SubroutineCall(SubroutineCall<'a>),
|
SubroutineCall(SubroutineCall<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceInstance<'a> {
|
pub struct SequenceInstance<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<SequenceListOfArguments<'a>>),
|
pub nodes: (Identifier<'a>, Option<SequenceListOfArguments<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceListOfArguments<'a> {
|
pub enum SequenceListOfArguments<'a> {
|
||||||
Ordered(SequenceListOfArgumentsOrdered<'a>),
|
Ordered(SequenceListOfArgumentsOrdered<'a>),
|
||||||
Named(SequenceListOfArgumentsNamed<'a>),
|
Named(SequenceListOfArgumentsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceListOfArgumentsOrdered<'a> {
|
pub struct SequenceListOfArgumentsOrdered<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<SequenceActualArg<'a>>,
|
Vec<SequenceActualArg<'a>>,
|
||||||
@ -509,74 +510,74 @@ pub struct SequenceListOfArgumentsOrdered<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceListOfArgumentsNamed<'a> {
|
pub struct SequenceListOfArgumentsNamed<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, Option<SequenceActualArg<'a>>)>,),
|
pub nodes: (Vec<(Identifier<'a>, Option<SequenceActualArg<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SequenceActualArg<'a> {
|
pub enum SequenceActualArg<'a> {
|
||||||
EventExpression(EventExpression<'a>),
|
EventExpression(EventExpression<'a>),
|
||||||
SequenceExpr(SequenceExpr<'a>),
|
SequenceExpr(SequenceExpr<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BooleanAbbrev<'a> {
|
pub enum BooleanAbbrev<'a> {
|
||||||
ConsecutiveRepetition(ConsecutiveRepetition<'a>),
|
ConsecutiveRepetition(ConsecutiveRepetition<'a>),
|
||||||
NonConsecutiveRepetition(NonConsecutiveRepetition<'a>),
|
NonConsecutiveRepetition(NonConsecutiveRepetition<'a>),
|
||||||
GotoRepetition(GotoRepetition<'a>),
|
GotoRepetition(GotoRepetition<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SequenceAbbrev<'a> {
|
pub struct SequenceAbbrev<'a> {
|
||||||
pub nodes: (ConsecutiveRepetition<'a>,),
|
pub nodes: (ConsecutiveRepetition<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConsecutiveRepetition<'a> {
|
pub enum ConsecutiveRepetition<'a> {
|
||||||
ConstOrRangeExpression(ConstOrRangeExpression<'a>),
|
ConstOrRangeExpression(ConstOrRangeExpression<'a>),
|
||||||
Asterisk,
|
Asterisk(Symbol<'a>),
|
||||||
Plus,
|
Plus(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonConsecutiveRepetition<'a> {
|
pub struct NonConsecutiveRepetition<'a> {
|
||||||
pub nodes: (ConstOrRangeExpression<'a>,),
|
pub nodes: (ConstOrRangeExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GotoRepetition<'a> {
|
pub struct GotoRepetition<'a> {
|
||||||
pub nodes: (ConstOrRangeExpression<'a>,),
|
pub nodes: (ConstOrRangeExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstOrRangeExpression<'a> {
|
pub enum ConstOrRangeExpression<'a> {
|
||||||
ConstantExpression(ConstantExpression<'a>),
|
ConstantExpression(ConstantExpression<'a>),
|
||||||
CycleDelayConstRangeExpression(CycleDelayConstRangeExpression<'a>),
|
CycleDelayConstRangeExpression(CycleDelayConstRangeExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CycleDelayConstRangeExpression<'a> {
|
pub enum CycleDelayConstRangeExpression<'a> {
|
||||||
Binary(CycleDelayConstRangeExpressionBinary<'a>),
|
Binary(CycleDelayConstRangeExpressionBinary<'a>),
|
||||||
Dollar(CycleDelayConstRangeExpressionDollar<'a>),
|
Dollar(CycleDelayConstRangeExpressionDollar<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CycleDelayConstRangeExpressionBinary<'a> {
|
pub struct CycleDelayConstRangeExpressionBinary<'a> {
|
||||||
pub nodes: (ConstantExpression<'a>, ConstantExpression<'a>),
|
pub nodes: (ConstantExpression<'a>, ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CycleDelayConstRangeExpressionDollar<'a> {
|
pub struct CycleDelayConstRangeExpressionDollar<'a> {
|
||||||
pub nodes: (ConstantExpression<'a>,),
|
pub nodes: (ConstantExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExpressionOrDist<'a> {
|
pub struct ExpressionOrDist<'a> {
|
||||||
pub nodes: (Expression<'a>, Option<DistList<'a>>),
|
pub nodes: (Expression<'a>, Option<DistList<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AssertionVariableDeclaration<'a> {
|
pub struct AssertionVariableDeclaration<'a> {
|
||||||
pub nodes: (VarDataType<'a>, ListOfVariableDeclAssignments<'a>),
|
pub nodes: (VarDataType<'a>, ListOfVariableDeclAssignments<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::multi::*;
|
use nom::multi::*;
|
||||||
@ -5,7 +6,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BlockItemDeclaration<'a> {
|
pub enum BlockItemDeclaration<'a> {
|
||||||
Data(BlockItemDeclarationData<'a>),
|
Data(BlockItemDeclarationData<'a>),
|
||||||
LocalParameter(BlockItemDeclarationLocalParameter<'a>),
|
LocalParameter(BlockItemDeclarationLocalParameter<'a>),
|
||||||
@ -13,12 +14,12 @@ pub enum BlockItemDeclaration<'a> {
|
|||||||
Let(BlockItemDeclarationLet<'a>),
|
Let(BlockItemDeclarationLet<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockItemDeclarationData<'a> {
|
pub struct BlockItemDeclarationData<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, DataDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, DataDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockItemDeclarationLocalParameter<'a> {
|
pub struct BlockItemDeclarationLocalParameter<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -27,7 +28,7 @@ pub struct BlockItemDeclarationLocalParameter<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockItemDeclarationParameter<'a> {
|
pub struct BlockItemDeclarationParameter<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -36,7 +37,7 @@ pub struct BlockItemDeclarationParameter<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockItemDeclarationLet<'a> {
|
pub struct BlockItemDeclarationLet<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, LetDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, LetDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CovergroupDeclaration<'a> {
|
pub struct CovergroupDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -17,91 +18,91 @@ pub struct CovergroupDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CoverageSpecOrOption<'a> {
|
pub enum CoverageSpecOrOption<'a> {
|
||||||
Spec(CoverageSpecOrOptionSpec<'a>),
|
Spec(CoverageSpecOrOptionSpec<'a>),
|
||||||
Option(CoverageSpecOrOptionOption<'a>),
|
Option(CoverageSpecOrOptionOption<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageSpecOrOptionSpec<'a> {
|
pub struct CoverageSpecOrOptionSpec<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, CoverageSpec<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, CoverageSpec<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageSpecOrOptionOption<'a> {
|
pub struct CoverageSpecOrOptionOption<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, CoverageOption<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, CoverageOption<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CoverageOption<'a> {
|
pub enum CoverageOption<'a> {
|
||||||
Option(CoverageOptionOption<'a>),
|
Option(CoverageOptionOption<'a>),
|
||||||
TypeOption(CoverageOptionTypeOption<'a>),
|
TypeOption(CoverageOptionTypeOption<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageOptionOption<'a> {
|
pub struct CoverageOptionOption<'a> {
|
||||||
pub nodes: (Identifier<'a>, Expression<'a>),
|
pub nodes: (Identifier<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageOptionTypeOption<'a> {
|
pub struct CoverageOptionTypeOption<'a> {
|
||||||
pub nodes: (Identifier<'a>, ConstantExpression<'a>),
|
pub nodes: (Identifier<'a>, ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CoverageSpec<'a> {
|
pub enum CoverageSpec<'a> {
|
||||||
CoverPoint(CoverPoint<'a>),
|
CoverPoint(CoverPoint<'a>),
|
||||||
CoverCross(CoverCross<'a>),
|
CoverCross(CoverCross<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CoverageEvent<'a> {
|
pub enum CoverageEvent<'a> {
|
||||||
ClockingEvent(ClockingEvent<'a>),
|
ClockingEvent(ClockingEvent<'a>),
|
||||||
Sample(CoverageEventSample<'a>),
|
Sample(CoverageEventSample<'a>),
|
||||||
At(CoverageEventAt<'a>),
|
At(CoverageEventAt<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageEventSample<'a> {
|
pub struct CoverageEventSample<'a> {
|
||||||
pub nodes: (Option<TfPortList<'a>>,),
|
pub nodes: (Option<TfPortList<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverageEventAt<'a> {
|
pub struct CoverageEventAt<'a> {
|
||||||
pub nodes: (BlockEventExpression<'a>,),
|
pub nodes: (BlockEventExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BlockEventExpression<'a> {
|
pub enum BlockEventExpression<'a> {
|
||||||
Or(Box<BlockEventExpressionOr<'a>>),
|
Or(Box<BlockEventExpressionOr<'a>>),
|
||||||
Begin(BlockEventExpressionBegin<'a>),
|
Begin(BlockEventExpressionBegin<'a>),
|
||||||
End(BlockEventExpressionEnd<'a>),
|
End(BlockEventExpressionEnd<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockEventExpressionOr<'a> {
|
pub struct BlockEventExpressionOr<'a> {
|
||||||
pub nodes: (BlockEventExpression<'a>, BlockEventExpression<'a>),
|
pub nodes: (BlockEventExpression<'a>, BlockEventExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockEventExpressionBegin<'a> {
|
pub struct BlockEventExpressionBegin<'a> {
|
||||||
pub nodes: (HierarchicalBtfIdentifier<'a>,),
|
pub nodes: (HierarchicalBtfIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BlockEventExpressionEnd<'a> {
|
pub struct BlockEventExpressionEnd<'a> {
|
||||||
pub nodes: (HierarchicalBtfIdentifier<'a>,),
|
pub nodes: (HierarchicalBtfIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum HierarchicalBtfIdentifier<'a> {
|
pub enum HierarchicalBtfIdentifier<'a> {
|
||||||
Tf(Identifier<'a>),
|
Tf(Identifier<'a>),
|
||||||
Block(Identifier<'a>),
|
Block(Identifier<'a>),
|
||||||
Method(HierarchicalBtfIdentifierMethod<'a>),
|
Method(HierarchicalBtfIdentifierMethod<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalBtfIdentifierMethod<'a> {
|
pub struct HierarchicalBtfIdentifierMethod<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<HierarchicalIdentifierOrClassScope<'a>>,
|
Option<HierarchicalIdentifierOrClassScope<'a>>,
|
||||||
@ -109,13 +110,13 @@ pub struct HierarchicalBtfIdentifierMethod<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum HierarchicalIdentifierOrClassScope<'a> {
|
pub enum HierarchicalIdentifierOrClassScope<'a> {
|
||||||
HierarchicalIdentifier(HierarchicalIdentifier<'a>),
|
HierarchicalIdentifier(HierarchicalIdentifier<'a>),
|
||||||
ClassScope(ClassScope<'a>),
|
ClassScope(ClassScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverPoint<'a> {
|
pub struct CoverPoint<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(Option<DataTypeOrImplicit<'a>>, Identifier<'a>)>,
|
Option<(Option<DataTypeOrImplicit<'a>>, Identifier<'a>)>,
|
||||||
@ -125,18 +126,18 @@ pub struct CoverPoint<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BinsOrEmpty<'a> {
|
pub enum BinsOrEmpty<'a> {
|
||||||
NonEmpty(BinsOrEmptyNonEmpty<'a>),
|
NonEmpty(BinsOrEmptyNonEmpty<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrEmptyNonEmpty<'a> {
|
pub struct BinsOrEmptyNonEmpty<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Vec<BinsOrOptions<'a>>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Vec<BinsOrOptions<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BinsOrOptions<'a> {
|
pub enum BinsOrOptions<'a> {
|
||||||
Option(CoverageOption<'a>),
|
Option(CoverageOption<'a>),
|
||||||
Covergroup(BinsOrOptionsCovergroup<'a>),
|
Covergroup(BinsOrOptionsCovergroup<'a>),
|
||||||
@ -147,11 +148,11 @@ pub enum BinsOrOptions<'a> {
|
|||||||
DefaultSequence(BinsOrOptionsDefaultSequence<'a>),
|
DefaultSequence(BinsOrOptionsDefaultSequence<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsCovergroup<'a> {
|
pub struct BinsOrOptionsCovergroup<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Wildcard>,
|
Option<Wildcard<'a>>,
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Option<CovergroupExpression<'a>>,
|
Option<CovergroupExpression<'a>>,
|
||||||
CovergroupRangeList<'a>,
|
CovergroupRangeList<'a>,
|
||||||
@ -160,14 +161,16 @@ pub struct BinsOrOptionsCovergroup<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Wildcard {}
|
pub struct Wildcard<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsCoverPoint<'a> {
|
pub struct BinsOrOptionsCoverPoint<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Wildcard>,
|
Option<Wildcard<'a>>,
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Option<CovergroupExpression<'a>>,
|
Option<CovergroupExpression<'a>>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -176,11 +179,11 @@ pub struct BinsOrOptionsCoverPoint<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsSetCovergroup<'a> {
|
pub struct BinsOrOptionsSetCovergroup<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Wildcard>,
|
Option<Wildcard<'a>>,
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Option<CovergroupExpression<'a>>,
|
Option<CovergroupExpression<'a>>,
|
||||||
SetCovergroupExpression<'a>,
|
SetCovergroupExpression<'a>,
|
||||||
@ -188,50 +191,50 @@ pub struct BinsOrOptionsSetCovergroup<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsTransList<'a> {
|
pub struct BinsOrOptionsTransList<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Wildcard>,
|
Option<Wildcard<'a>>,
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
TransList<'a>,
|
TransList<'a>,
|
||||||
Option<Expression<'a>>,
|
Option<Expression<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsDefault<'a> {
|
pub struct BinsOrOptionsDefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
Option<CovergroupExpression<'a>>,
|
Option<CovergroupExpression<'a>>,
|
||||||
Option<Expression<'a>>,
|
Option<Expression<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsOrOptionsDefaultSequence<'a> {
|
pub struct BinsOrOptionsDefaultSequence<'a> {
|
||||||
pub nodes: (BinsKeyword, Identifier<'a>, Option<Expression<'a>>),
|
pub nodes: (BinsKeyword<'a>, Identifier<'a>, Option<Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BinsKeyword {
|
pub enum BinsKeyword<'a> {
|
||||||
Bins,
|
Bins(Symbol<'a>),
|
||||||
IllegalBins,
|
IllegalBins(Symbol<'a>),
|
||||||
IgnoreBins,
|
IgnoreBins(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransList<'a> {
|
pub struct TransList<'a> {
|
||||||
pub nodes: (Vec<TransSet<'a>>,),
|
pub nodes: (Vec<TransSet<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransSet<'a> {
|
pub struct TransSet<'a> {
|
||||||
pub nodes: (TransRangeList<'a>, Vec<TransRangeList<'a>>),
|
pub nodes: (TransRangeList<'a>, Vec<TransRangeList<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TransRangeList<'a> {
|
pub enum TransRangeList<'a> {
|
||||||
Single(TransItem<'a>),
|
Single(TransItem<'a>),
|
||||||
Asterisk(TransRangeListAsterisk<'a>),
|
Asterisk(TransRangeListAsterisk<'a>),
|
||||||
@ -239,38 +242,38 @@ pub enum TransRangeList<'a> {
|
|||||||
Equal(TransRangeListEqual<'a>),
|
Equal(TransRangeListEqual<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransRangeListAsterisk<'a> {
|
pub struct TransRangeListAsterisk<'a> {
|
||||||
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransRangeListRight<'a> {
|
pub struct TransRangeListRight<'a> {
|
||||||
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransRangeListEqual<'a> {
|
pub struct TransRangeListEqual<'a> {
|
||||||
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
pub nodes: (TransItem<'a>, RepeatRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TransItem<'a> {
|
pub struct TransItem<'a> {
|
||||||
pub nodes: (CovergroupRangeList<'a>,),
|
pub nodes: (CovergroupRangeList<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RepeatRange<'a> {
|
pub enum RepeatRange<'a> {
|
||||||
Single(CovergroupExpression<'a>),
|
Single(CovergroupExpression<'a>),
|
||||||
Binary(RepeatRangeBinary<'a>),
|
Binary(RepeatRangeBinary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RepeatRangeBinary<'a> {
|
pub struct RepeatRangeBinary<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>, CovergroupExpression<'a>),
|
pub nodes: (CovergroupExpression<'a>, CovergroupExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CoverCross<'a> {
|
pub struct CoverCross<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Identifier<'a>>,
|
Option<Identifier<'a>>,
|
||||||
@ -280,61 +283,61 @@ pub struct CoverCross<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfCrossItems<'a> {
|
pub struct ListOfCrossItems<'a> {
|
||||||
pub nodes: (CrossItem<'a>, CrossItem<'a>, Option<CrossItem<'a>>),
|
pub nodes: (CrossItem<'a>, CrossItem<'a>, Option<CrossItem<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CrossItem<'a> {
|
pub enum CrossItem<'a> {
|
||||||
CoverPointIdentifier(Identifier<'a>),
|
CoverPointIdentifier(Identifier<'a>),
|
||||||
VariableIdentifier(Identifier<'a>),
|
VariableIdentifier(Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CrossBody<'a> {
|
pub enum CrossBody<'a> {
|
||||||
NonEmpty(CrossBodyNonEmpty<'a>),
|
NonEmpty(CrossBodyNonEmpty<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CrossBodyNonEmpty<'a> {
|
pub struct CrossBodyNonEmpty<'a> {
|
||||||
pub nodes: (Vec<CrossBodyItem<'a>>),
|
pub nodes: (Vec<CrossBodyItem<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CrossBodyItem<'a> {
|
pub enum CrossBodyItem<'a> {
|
||||||
FunctionDeclaration(FunctionDeclaration<'a>),
|
FunctionDeclaration(FunctionDeclaration<'a>),
|
||||||
BinsSelectionOrOption(BinsSelectionOrOption<'a>),
|
BinsSelectionOrOption(BinsSelectionOrOption<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BinsSelectionOrOption<'a> {
|
pub enum BinsSelectionOrOption<'a> {
|
||||||
Coverage(BinsSelectionOrOptionCoverage<'a>),
|
Coverage(BinsSelectionOrOptionCoverage<'a>),
|
||||||
Bins(BinsSelectionOrOptionBins<'a>),
|
Bins(BinsSelectionOrOptionBins<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsSelectionOrOptionCoverage<'a> {
|
pub struct BinsSelectionOrOptionCoverage<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, CoverageOption<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, CoverageOption<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsSelectionOrOptionBins<'a> {
|
pub struct BinsSelectionOrOptionBins<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, BinsSelection<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, BinsSelection<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsSelection<'a> {
|
pub struct BinsSelection<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
BinsKeyword,
|
BinsKeyword<'a>,
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
SelectExpression<'a>,
|
SelectExpression<'a>,
|
||||||
Option<Expression<'a>>,
|
Option<Expression<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SelectExpression<'a> {
|
pub enum SelectExpression<'a> {
|
||||||
SelectCondition(SelectCondition<'a>),
|
SelectCondition(SelectCondition<'a>),
|
||||||
Not(SelectExpressionNot<'a>),
|
Not(SelectExpressionNot<'a>),
|
||||||
@ -346,27 +349,27 @@ pub enum SelectExpression<'a> {
|
|||||||
CrossSet(SelectExpressionCrossSet<'a>),
|
CrossSet(SelectExpressionCrossSet<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionNot<'a> {
|
pub struct SelectExpressionNot<'a> {
|
||||||
pub nodes: (SelectCondition<'a>,),
|
pub nodes: (SelectCondition<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionAnd<'a> {
|
pub struct SelectExpressionAnd<'a> {
|
||||||
pub nodes: (SelectExpression<'a>, SelectExpression<'a>),
|
pub nodes: (SelectExpression<'a>, SelectExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionOr<'a> {
|
pub struct SelectExpressionOr<'a> {
|
||||||
pub nodes: (SelectExpression<'a>, SelectExpression<'a>),
|
pub nodes: (SelectExpression<'a>, SelectExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionParen<'a> {
|
pub struct SelectExpressionParen<'a> {
|
||||||
pub nodes: (SelectExpression<'a>,),
|
pub nodes: (SelectExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionWith<'a> {
|
pub struct SelectExpressionWith<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SelectExpression<'a>,
|
SelectExpression<'a>,
|
||||||
@ -375,7 +378,7 @@ pub struct SelectExpressionWith<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectExpressionCrossSet<'a> {
|
pub struct SelectExpressionCrossSet<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
CrossSetExpression<'a>,
|
CrossSetExpression<'a>,
|
||||||
@ -383,59 +386,59 @@ pub struct SelectExpressionCrossSet<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SelectCondition<'a> {
|
pub struct SelectCondition<'a> {
|
||||||
pub nodes: (BinsExpression<'a>, Option<CovergroupRangeList<'a>>),
|
pub nodes: (BinsExpression<'a>, Option<CovergroupRangeList<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BinsExpression<'a> {
|
pub enum BinsExpression<'a> {
|
||||||
VariableIdentifier(Identifier<'a>),
|
VariableIdentifier(Identifier<'a>),
|
||||||
CoverPoint(BinsExpressionCoverPoint<'a>),
|
CoverPoint(BinsExpressionCoverPoint<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BinsExpressionCoverPoint<'a> {
|
pub struct BinsExpressionCoverPoint<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<Identifier<'a>>),
|
pub nodes: (Identifier<'a>, Option<Identifier<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CovergroupRangeList<'a> {
|
pub struct CovergroupRangeList<'a> {
|
||||||
pub nodes: (Vec<CovergroupValueRange<'a>>,),
|
pub nodes: (Vec<CovergroupValueRange<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CovergroupValueRange<'a> {
|
pub enum CovergroupValueRange<'a> {
|
||||||
Single(CovergroupExpression<'a>),
|
Single(CovergroupExpression<'a>),
|
||||||
Binary(CovergroupValueRangeBinary<'a>),
|
Binary(CovergroupValueRangeBinary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CovergroupValueRangeBinary<'a> {
|
pub struct CovergroupValueRangeBinary<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>, CovergroupExpression<'a>),
|
pub nodes: (CovergroupExpression<'a>, CovergroupExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct WithCovergroupExpression<'a> {
|
pub struct WithCovergroupExpression<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>,),
|
pub nodes: (CovergroupExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SetCovergroupExpression<'a> {
|
pub struct SetCovergroupExpression<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>,),
|
pub nodes: (CovergroupExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IntegerCovergroupExpression<'a> {
|
pub struct IntegerCovergroupExpression<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>,),
|
pub nodes: (CovergroupExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CrossSetExpression<'a> {
|
pub struct CrossSetExpression<'a> {
|
||||||
pub nodes: (CovergroupExpression<'a>,),
|
pub nodes: (CovergroupExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CovergroupExpression<'a> {
|
pub struct CovergroupExpression<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,17 +7,17 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DefparamAssignment<'a> {
|
pub struct DefparamAssignment<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>, ConstantMintypmaxExpression<'a>),
|
pub nodes: (HierarchicalIdentifier<'a>, ConstantMintypmaxExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetDeclAssignment<'a> {
|
pub struct NetDeclAssignment<'a> {
|
||||||
pub nodes: (Identifier<'a>, Vec<UnpackedDimension<'a>>, Expression<'a>),
|
pub nodes: (Identifier<'a>, Vec<UnpackedDimension<'a>>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParamAssignment<'a> {
|
pub struct ParamAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -25,23 +26,23 @@ pub struct ParamAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SpecparamAssignment<'a> {
|
pub enum SpecparamAssignment<'a> {
|
||||||
Mintypmax(SpecparamAssignmentMintypmax<'a>),
|
Mintypmax(SpecparamAssignmentMintypmax<'a>),
|
||||||
PulseControl(PulseControlSpecparam<'a>),
|
PulseControl(PulseControlSpecparam<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SpecparamAssignmentMintypmax<'a> {
|
pub struct SpecparamAssignmentMintypmax<'a> {
|
||||||
pub nodes: (Identifier<'a>, ConstantMintypmaxExpression<'a>),
|
pub nodes: (Identifier<'a>, ConstantMintypmaxExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TypeAssignment<'a> {
|
pub struct TypeAssignment<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<DataType<'a>>),
|
pub nodes: (Identifier<'a>, Option<DataType<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PulseControlSpecparam<'a> {
|
pub struct PulseControlSpecparam<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(
|
Option<(
|
||||||
@ -53,29 +54,29 @@ pub struct PulseControlSpecparam<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ErrorLimitValue<'a> {
|
pub struct ErrorLimitValue<'a> {
|
||||||
pub nodes: (LimitValue<'a>,),
|
pub nodes: (LimitValue<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RejectLimitValue<'a> {
|
pub struct RejectLimitValue<'a> {
|
||||||
pub nodes: (LimitValue<'a>,),
|
pub nodes: (LimitValue<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LimitValue<'a> {
|
pub struct LimitValue<'a> {
|
||||||
pub nodes: (ConstantMintypmaxExpression<'a>,),
|
pub nodes: (ConstantMintypmaxExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum VariableDeclAssignment<'a> {
|
pub enum VariableDeclAssignment<'a> {
|
||||||
Variable(VariableDeclAssignmentVariable<'a>),
|
Variable(VariableDeclAssignmentVariable<'a>),
|
||||||
DynamicArray(VariableDeclAssignmentDynamicArray<'a>),
|
DynamicArray(VariableDeclAssignmentDynamicArray<'a>),
|
||||||
Class(VariableDeclAssignmentClass<'a>),
|
Class(VariableDeclAssignmentClass<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableDeclAssignmentVariable<'a> {
|
pub struct VariableDeclAssignmentVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -84,33 +85,33 @@ pub struct VariableDeclAssignmentVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableDeclAssignmentDynamicArray<'a> {
|
pub struct VariableDeclAssignmentDynamicArray<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
UnsizedDimension,
|
UnsizedDimension<'a>,
|
||||||
Vec<VariableDimension<'a>>,
|
Vec<VariableDimension<'a>>,
|
||||||
Option<DynamicArrayNew<'a>>,
|
Option<DynamicArrayNew<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableDeclAssignmentClass<'a> {
|
pub struct VariableDeclAssignmentClass<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<ClassNew<'a>>),
|
pub nodes: (Identifier<'a>, Option<ClassNew<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassNew<'a> {
|
pub enum ClassNew<'a> {
|
||||||
Argument(ClassNewArgument<'a>),
|
Argument(ClassNewArgument<'a>),
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassNewArgument<'a> {
|
pub struct ClassNewArgument<'a> {
|
||||||
pub nodes: (Option<ClassScope<'a>>, Option<ListOfArguments<'a>>),
|
pub nodes: (Option<ClassScope<'a>>, Option<ListOfArguments<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DynamicArrayNew<'a> {
|
pub struct DynamicArrayNew<'a> {
|
||||||
pub nodes: (Expression<'a>, Option<Expression<'a>>),
|
pub nodes: (Expression<'a>, Option<Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,47 +7,47 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfDefparamAssignments<'a> {
|
pub struct ListOfDefparamAssignments<'a> {
|
||||||
pub nodes: (Vec<DefparamAssignment<'a>>,),
|
pub nodes: (Vec<DefparamAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfGenvarIdentifiers<'a> {
|
pub struct ListOfGenvarIdentifiers<'a> {
|
||||||
pub nodes: (Vec<Identifier<'a>>,),
|
pub nodes: (Vec<Identifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfInterfaceIdentifiers<'a> {
|
pub struct ListOfInterfaceIdentifiers<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, Vec<UnpackedDimension<'a>>)>,),
|
pub nodes: (Vec<(Identifier<'a>, Vec<UnpackedDimension<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfNetDeclAssignments<'a> {
|
pub struct ListOfNetDeclAssignments<'a> {
|
||||||
pub nodes: (Vec<NetDeclAssignment<'a>>,),
|
pub nodes: (Vec<NetDeclAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfParamAssignments<'a> {
|
pub struct ListOfParamAssignments<'a> {
|
||||||
pub nodes: (Vec<ParamAssignment<'a>>,),
|
pub nodes: (Vec<ParamAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfPortIdentifiers<'a> {
|
pub struct ListOfPortIdentifiers<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, Vec<UnpackedDimension<'a>>)>,),
|
pub nodes: (Vec<(Identifier<'a>, Vec<UnpackedDimension<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfUdpPortIdentifiers<'a> {
|
pub struct ListOfUdpPortIdentifiers<'a> {
|
||||||
pub nodes: (Vec<Identifier<'a>>,),
|
pub nodes: (Vec<Identifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfSpecparamAssignments<'a> {
|
pub struct ListOfSpecparamAssignments<'a> {
|
||||||
pub nodes: (Vec<SpecparamAssignment<'a>>,),
|
pub nodes: (Vec<SpecparamAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfTfVariableIdentifiers<'a> {
|
pub struct ListOfTfVariableIdentifiers<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<(
|
Vec<(
|
||||||
@ -57,22 +58,22 @@ pub struct ListOfTfVariableIdentifiers<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfTypeAssignments<'a> {
|
pub struct ListOfTypeAssignments<'a> {
|
||||||
pub nodes: (Vec<TypeAssignment<'a>>,),
|
pub nodes: (Vec<TypeAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfVariableDeclAssignments<'a> {
|
pub struct ListOfVariableDeclAssignments<'a> {
|
||||||
pub nodes: (Vec<VariableDeclAssignment<'a>>,),
|
pub nodes: (Vec<VariableDeclAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfVariableIdentifiers<'a> {
|
pub struct ListOfVariableIdentifiers<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, Vec<VariableDimension<'a>>)>,),
|
pub nodes: (Vec<(Identifier<'a>, Vec<VariableDimension<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfVariablePortIdentifiers<'a> {
|
pub struct ListOfVariablePortIdentifiers<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<(
|
Vec<(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,40 +7,40 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum UnpackedDimension<'a> {
|
pub enum UnpackedDimension<'a> {
|
||||||
Range(ConstantRange<'a>),
|
Range(ConstantRange<'a>),
|
||||||
Expression(ConstantExpression<'a>),
|
Expression(ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PackedDimension<'a> {
|
pub enum PackedDimension<'a> {
|
||||||
Range(ConstantRange<'a>),
|
Range(ConstantRange<'a>),
|
||||||
Unsized(UnsizedDimension),
|
Unsized(UnsizedDimension<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AssociativeDimension<'a> {
|
pub enum AssociativeDimension<'a> {
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
Asterisk,
|
Asterisk(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum VariableDimension<'a> {
|
pub enum VariableDimension<'a> {
|
||||||
Unsized(UnsizedDimension),
|
Unsized(UnsizedDimension<'a>),
|
||||||
Unpacked(UnpackedDimension<'a>),
|
Unpacked(UnpackedDimension<'a>),
|
||||||
Associative(AssociativeDimension<'a>),
|
Associative(AssociativeDimension<'a>),
|
||||||
Queue(QueueDimension<'a>),
|
Queue(QueueDimension<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct QueueDimension<'a> {
|
pub struct QueueDimension<'a> {
|
||||||
pub nodes: (Option<ConstantExpression<'a>>,),
|
pub nodes: (Option<ConstantExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct UnsizedDimension {
|
pub struct UnsizedDimension<'a> {
|
||||||
pub nodes: (),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -7,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Delay3<'a> {
|
pub enum Delay3<'a> {
|
||||||
Single(Delay3Single<'a>),
|
Single(Delay3Single<'a>),
|
||||||
Mintypmax(Delay3Mintypmax<'a>),
|
Mintypmax(Delay3Mintypmax<'a>),
|
||||||
@ -18,7 +18,7 @@ pub struct Delay3Single<'a> {
|
|||||||
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Delay3Mintypmax<'a> {
|
pub struct Delay3Mintypmax<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -36,7 +36,7 @@ pub struct Delay3Mintypmax<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Delay2<'a> {
|
pub enum Delay2<'a> {
|
||||||
Single(Delay2Single<'a>),
|
Single(Delay2Single<'a>),
|
||||||
Mintypmax(Delay2Mintypmax<'a>),
|
Mintypmax(Delay2Mintypmax<'a>),
|
||||||
@ -47,7 +47,7 @@ pub struct Delay2Single<'a> {
|
|||||||
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
pub nodes: (Symbol<'a>, DelayValue<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Delay2Mintypmax<'a> {
|
pub struct Delay2Mintypmax<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,24 +7,24 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum FunctionDataTypeOrImplicit<'a> {
|
pub enum FunctionDataTypeOrImplicit<'a> {
|
||||||
DataType(DataTypeOrVoid<'a>),
|
DataType(DataTypeOrVoid<'a>),
|
||||||
Implicit(ImplicitDataType<'a>),
|
Implicit(ImplicitDataType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionDeclaration<'a> {
|
pub struct FunctionDeclaration<'a> {
|
||||||
pub nodes: (Option<Lifetime<'a>>, FunctionBodyDeclaration<'a>),
|
pub nodes: (Option<Lifetime<'a>>, FunctionBodyDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum FunctionBodyDeclaration<'a> {
|
pub enum FunctionBodyDeclaration<'a> {
|
||||||
WithoutPort(FunctionBodyDeclarationWithoutPort<'a>),
|
WithoutPort(FunctionBodyDeclarationWithoutPort<'a>),
|
||||||
WithPort(FunctionBodyDeclarationWithPort<'a>),
|
WithPort(FunctionBodyDeclarationWithPort<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionBodyDeclarationWithoutPort<'a> {
|
pub struct FunctionBodyDeclarationWithoutPort<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
FunctionDataTypeOrImplicit<'a>,
|
FunctionDataTypeOrImplicit<'a>,
|
||||||
@ -35,7 +36,7 @@ pub struct FunctionBodyDeclarationWithoutPort<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionBodyDeclarationWithPort<'a> {
|
pub struct FunctionBodyDeclarationWithPort<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
FunctionDataTypeOrImplicit<'a>,
|
FunctionDataTypeOrImplicit<'a>,
|
||||||
@ -48,12 +49,12 @@ pub struct FunctionBodyDeclarationWithPort<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionPrototype<'a> {
|
pub struct FunctionPrototype<'a> {
|
||||||
pub nodes: (DataTypeOrVoid<'a>, Identifier<'a>, Option<TfPortList<'a>>),
|
pub nodes: (DataTypeOrVoid<'a>, Identifier<'a>, Option<TfPortList<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DpiImportExport<'a> {
|
pub enum DpiImportExport<'a> {
|
||||||
ImportFunction(DpiImportExportImportFunction<'a>),
|
ImportFunction(DpiImportExportImportFunction<'a>),
|
||||||
ImportTask(DpiImportExportImportTask<'a>),
|
ImportTask(DpiImportExportImportTask<'a>),
|
||||||
@ -61,59 +62,59 @@ pub enum DpiImportExport<'a> {
|
|||||||
ExportTask(DpiImportExportExportTask<'a>),
|
ExportTask(DpiImportExportExportTask<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiImportExportImportFunction<'a> {
|
pub struct DpiImportExportImportFunction<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
DpiSpecString,
|
DpiSpecString<'a>,
|
||||||
Option<DpiFunctionImportProperty>,
|
Option<DpiFunctionImportProperty<'a>>,
|
||||||
Option<Identifier<'a>>,
|
Option<Identifier<'a>>,
|
||||||
DpiFunctionProto<'a>,
|
DpiFunctionProto<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiImportExportImportTask<'a> {
|
pub struct DpiImportExportImportTask<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
DpiSpecString,
|
DpiSpecString<'a>,
|
||||||
Option<DpiTaskImportProperty>,
|
Option<DpiTaskImportProperty<'a>>,
|
||||||
Option<Identifier<'a>>,
|
Option<Identifier<'a>>,
|
||||||
DpiTaskProto<'a>,
|
DpiTaskProto<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiImportExportExportFunction<'a> {
|
pub struct DpiImportExportExportFunction<'a> {
|
||||||
pub nodes: (DpiSpecString, Option<Identifier<'a>>, Identifier<'a>),
|
pub nodes: (DpiSpecString<'a>, Option<Identifier<'a>>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiImportExportExportTask<'a> {
|
pub struct DpiImportExportExportTask<'a> {
|
||||||
pub nodes: (DpiSpecString, Option<Identifier<'a>>, Identifier<'a>),
|
pub nodes: (DpiSpecString<'a>, Option<Identifier<'a>>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DpiSpecString {
|
pub enum DpiSpecString<'a> {
|
||||||
DpiC,
|
DpiC(Symbol<'a>),
|
||||||
Dpi,
|
Dpi(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DpiFunctionImportProperty {
|
pub enum DpiFunctionImportProperty<'a> {
|
||||||
Context,
|
Context(Symbol<'a>),
|
||||||
Pure,
|
Pure(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DpiTaskImportProperty {
|
pub enum DpiTaskImportProperty<'a> {
|
||||||
Context,
|
Context(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiFunctionProto<'a> {
|
pub struct DpiFunctionProto<'a> {
|
||||||
pub nodes: (FunctionPrototype<'a>,),
|
pub nodes: (FunctionPrototype<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DpiTaskProto<'a> {
|
pub struct DpiTaskProto<'a> {
|
||||||
pub nodes: (TaskPrototype<'a>,),
|
pub nodes: (TaskPrototype<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,24 +7,24 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportDeclaration<'a> {
|
pub struct ModportDeclaration<'a> {
|
||||||
pub nodes: (Vec<ModportItem<'a>>,),
|
pub nodes: (Vec<ModportItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportItem<'a> {
|
pub struct ModportItem<'a> {
|
||||||
pub nodes: (Identifier<'a>, Vec<ModportPortsDeclaraton<'a>>),
|
pub nodes: (Identifier<'a>, Vec<ModportPortsDeclaraton<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModportPortsDeclaraton<'a> {
|
pub enum ModportPortsDeclaraton<'a> {
|
||||||
Simple(ModportPortsDeclaratonSimple<'a>),
|
Simple(ModportPortsDeclaratonSimple<'a>),
|
||||||
Tf(ModportPortsDeclaratonTf<'a>),
|
Tf(ModportPortsDeclaratonTf<'a>),
|
||||||
Clocing(ModportPortsDeclaratonClocking<'a>),
|
Clocing(ModportPortsDeclaratonClocking<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportPortsDeclaratonSimple<'a> {
|
pub struct ModportPortsDeclaratonSimple<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -31,57 +32,57 @@ pub struct ModportPortsDeclaratonSimple<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportPortsDeclaratonTf<'a> {
|
pub struct ModportPortsDeclaratonTf<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ModportTfPortsDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ModportTfPortsDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportPortsDeclaratonClocking<'a> {
|
pub struct ModportPortsDeclaratonClocking<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ModportClockingDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ModportClockingDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportClockingDeclaration<'a> {
|
pub struct ModportClockingDeclaration<'a> {
|
||||||
pub nodes: (Identifier<'a>),
|
pub nodes: (Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportSimplePortsDeclaration<'a> {
|
pub struct ModportSimplePortsDeclaration<'a> {
|
||||||
pub nodes: (PortDirection, Vec<ModportSimplePort<'a>>),
|
pub nodes: (PortDirection<'a>, Vec<ModportSimplePort<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModportSimplePort<'a> {
|
pub enum ModportSimplePort<'a> {
|
||||||
Ordered(ModportSimplePortOrdered<'a>),
|
Ordered(ModportSimplePortOrdered<'a>),
|
||||||
Named(ModportSimplePortNamed<'a>),
|
Named(ModportSimplePortNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportSimplePortOrdered<'a> {
|
pub struct ModportSimplePortOrdered<'a> {
|
||||||
pub nodes: (Identifier<'a>,),
|
pub nodes: (Identifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportSimplePortNamed<'a> {
|
pub struct ModportSimplePortNamed<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<Expression<'a>>),
|
pub nodes: (Identifier<'a>, Option<Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModportTfPortsDeclaration<'a> {
|
pub struct ModportTfPortsDeclaration<'a> {
|
||||||
pub nodes: (ImportExport, Vec<ModportTfPort<'a>>),
|
pub nodes: (ImportExport<'a>, Vec<ModportTfPort<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModportTfPort<'a> {
|
pub enum ModportTfPort<'a> {
|
||||||
Prototype(MethodPrototype<'a>),
|
Prototype(MethodPrototype<'a>),
|
||||||
Identifier(Identifier<'a>),
|
Identifier(Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ImportExport {
|
pub enum ImportExport<'a> {
|
||||||
Import,
|
Import(Symbol<'a>),
|
||||||
Export,
|
Export(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,22 +7,22 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetDeclaration<'a> {
|
pub struct LetDeclaration<'a> {
|
||||||
pub nodes: (LetIdentifier<'a>, Option<LetPortList<'a>>, Expression<'a>),
|
pub nodes: (LetIdentifier<'a>, Option<LetPortList<'a>>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetIdentifier<'a> {
|
pub struct LetIdentifier<'a> {
|
||||||
pub nodes: (Identifier<'a>,),
|
pub nodes: (Identifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetPortList<'a> {
|
pub struct LetPortList<'a> {
|
||||||
pub nodes: (Vec<LetPortItem<'a>>,),
|
pub nodes: (Vec<LetPortItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetPortItem<'a> {
|
pub struct LetPortItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -32,13 +33,13 @@ pub struct LetPortItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LetFormalType<'a> {
|
pub enum LetFormalType<'a> {
|
||||||
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
||||||
Untyped,
|
Untyped(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetExpression<'a> {
|
pub struct LetExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<PackageScope<'a>>,
|
Option<PackageScope<'a>>,
|
||||||
@ -47,13 +48,13 @@ pub struct LetExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LetListOfArguments<'a> {
|
pub enum LetListOfArguments<'a> {
|
||||||
Ordered(LetListOfArgumentsOrdered<'a>),
|
Ordered(LetListOfArgumentsOrdered<'a>),
|
||||||
Named(LetListOfArgumentsNamed<'a>),
|
Named(LetListOfArgumentsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetListOfArgumentsOrdered<'a> {
|
pub struct LetListOfArgumentsOrdered<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<LetActualArg<'a>>,
|
Vec<LetActualArg<'a>>,
|
||||||
@ -61,12 +62,12 @@ pub struct LetListOfArgumentsOrdered<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetListOfArgumentsNamed<'a> {
|
pub struct LetListOfArgumentsNamed<'a> {
|
||||||
pub nodes: (Vec<(Identifier<'a>, LetActualArg<'a>)>,),
|
pub nodes: (Vec<(Identifier<'a>, LetActualArg<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LetActualArg<'a> {
|
pub struct LetActualArg<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -5,13 +6,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LocalParameterDeclaration<'a> {
|
pub enum LocalParameterDeclaration<'a> {
|
||||||
Param(LocalParameterDeclarationParam<'a>),
|
Param(LocalParameterDeclarationParam<'a>),
|
||||||
Type(LocalParameterDeclarationType<'a>),
|
Type(LocalParameterDeclarationType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LocalParameterDeclarationParam<'a> {
|
pub struct LocalParameterDeclarationParam<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -20,18 +21,18 @@ pub struct LocalParameterDeclarationParam<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LocalParameterDeclarationType<'a> {
|
pub struct LocalParameterDeclarationType<'a> {
|
||||||
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ParameterDeclaration<'a> {
|
pub enum ParameterDeclaration<'a> {
|
||||||
Param(ParameterDeclarationParam<'a>),
|
Param(ParameterDeclarationParam<'a>),
|
||||||
Type(ParameterDeclarationType<'a>),
|
Type(ParameterDeclarationType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterDeclarationParam<'a> {
|
pub struct ParameterDeclarationParam<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -40,12 +41,12 @@ pub struct ParameterDeclarationParam<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterDeclarationType<'a> {
|
pub struct ParameterDeclarationType<'a> {
|
||||||
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SpecparamDeclaration<'a> {
|
pub struct SpecparamDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,55 +7,61 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CastingType<'a> {
|
pub enum CastingType<'a> {
|
||||||
SimpleType(Box<SimpleType<'a>>),
|
SimpleType(Box<SimpleType<'a>>),
|
||||||
ConstantPrimary(Box<ConstantPrimary<'a>>),
|
ConstantPrimary(Box<ConstantPrimary<'a>>),
|
||||||
Signing(Box<Signing>),
|
Signing(Box<Signing<'a>>),
|
||||||
String,
|
String(Symbol<'a>),
|
||||||
Const,
|
Const(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DataType<'a> {
|
pub enum DataType<'a> {
|
||||||
Vector(DataTypeVector<'a>),
|
Vector(DataTypeVector<'a>),
|
||||||
Atom(DataTypeAtom),
|
Atom(DataTypeAtom<'a>),
|
||||||
NonIntegerType(NonIntegerType),
|
NonIntegerType(NonIntegerType<'a>),
|
||||||
Union(DataTypeUnion<'a>),
|
Union(DataTypeUnion<'a>),
|
||||||
Enum(DataTypeEnum<'a>),
|
Enum(DataTypeEnum<'a>),
|
||||||
String,
|
String(Symbol<'a>),
|
||||||
Chandle,
|
Chandle(Symbol<'a>),
|
||||||
Virtual(DataTypeVirtual<'a>),
|
Virtual(DataTypeVirtual<'a>),
|
||||||
Type(DataTypeType<'a>),
|
Type(DataTypeType<'a>),
|
||||||
ClassType(ClassType<'a>),
|
ClassType(ClassType<'a>),
|
||||||
Event,
|
Event(Symbol<'a>),
|
||||||
PsCovergroupIdentifier(PsCovergroupIdentifier<'a>),
|
PsCovergroupIdentifier(PsCovergroupIdentifier<'a>),
|
||||||
TypeReference(Box<TypeReference<'a>>),
|
TypeReference(Box<TypeReference<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeVector<'a> {
|
pub struct DataTypeVector<'a> {
|
||||||
pub nodes: (IntegerVectorType, Option<Signing>, Vec<PackedDimension<'a>>),
|
pub nodes: (
|
||||||
|
IntegerVectorType<'a>,
|
||||||
|
Option<Signing<'a>>,
|
||||||
|
Vec<PackedDimension<'a>>,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeAtom {
|
pub struct DataTypeAtom<'a> {
|
||||||
pub nodes: (IntegerAtomType, Option<Signing>),
|
pub nodes: (IntegerAtomType<'a>, Option<Signing<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeUnion<'a> {
|
pub struct DataTypeUnion<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
StructUnion,
|
StructUnion<'a>,
|
||||||
Option<(Packed, Option<Signing>)>,
|
Option<(Packed<'a>, Option<Signing<'a>>)>,
|
||||||
Vec<StructUnionMember<'a>>,
|
Vec<StructUnionMember<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Packed {}
|
pub struct Packed<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeEnum<'a> {
|
pub struct DataTypeEnum<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<EnumBaseType<'a>>,
|
Option<EnumBaseType<'a>>,
|
||||||
@ -63,20 +70,22 @@ pub struct DataTypeEnum<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeVirtual<'a> {
|
pub struct DataTypeVirtual<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Interface>,
|
Option<Interface<'a>>,
|
||||||
InterfaceIdentifier<'a>,
|
InterfaceIdentifier<'a>,
|
||||||
Option<ParameterValueAssignment<'a>>,
|
Option<ParameterValueAssignment<'a>>,
|
||||||
Option<ModportIdentifier<'a>>,
|
Option<ModportIdentifier<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Interface {}
|
pub struct Interface<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataTypeType<'a> {
|
pub struct DataTypeType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<PackageScopeOrClassScope<'a>>,
|
Option<PackageScopeOrClassScope<'a>>,
|
||||||
@ -85,44 +94,44 @@ pub struct DataTypeType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DataTypeOrImplicit<'a> {
|
pub enum DataTypeOrImplicit<'a> {
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
ImplicitDataType(ImplicitDataType<'a>),
|
ImplicitDataType(ImplicitDataType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ImplicitDataType<'a> {
|
pub struct ImplicitDataType<'a> {
|
||||||
pub nodes: (Option<Signing>, Vec<PackedDimension<'a>>),
|
pub nodes: (Option<Signing<'a>>, Vec<PackedDimension<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum EnumBaseType<'a> {
|
pub enum EnumBaseType<'a> {
|
||||||
Atom(EnumBaseTypeAtom),
|
Atom(EnumBaseTypeAtom<'a>),
|
||||||
Vector(EnumBaseTypeVector<'a>),
|
Vector(EnumBaseTypeVector<'a>),
|
||||||
Type(EnumBaseTypeType<'a>),
|
Type(EnumBaseTypeType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EnumBaseTypeAtom {
|
pub struct EnumBaseTypeAtom<'a> {
|
||||||
pub nodes: (IntegerAtomType, Option<Signing>),
|
pub nodes: (IntegerAtomType<'a>, Option<Signing<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EnumBaseTypeVector<'a> {
|
pub struct EnumBaseTypeVector<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
IntegerVectorType,
|
IntegerVectorType<'a>,
|
||||||
Option<Signing>,
|
Option<Signing<'a>>,
|
||||||
Option<PackedDimension<'a>>,
|
Option<PackedDimension<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EnumBaseTypeType<'a> {
|
pub struct EnumBaseTypeType<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<PackedDimension<'a>>),
|
pub nodes: (Identifier<'a>, Option<PackedDimension<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EnumNameDeclaration<'a> {
|
pub struct EnumNameDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -131,12 +140,12 @@ pub struct EnumNameDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassScope<'a> {
|
pub struct ClassScope<'a> {
|
||||||
pub nodes: (ClassType<'a>,),
|
pub nodes: (ClassType<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassType<'a> {
|
pub struct ClassType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Identifier<'a>,
|
Identifier<'a>,
|
||||||
@ -145,37 +154,37 @@ pub struct ClassType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum IntegerType {
|
pub enum IntegerType<'a> {
|
||||||
Vector(IntegerVectorType),
|
Vector(IntegerVectorType<'a>),
|
||||||
Atom(IntegerAtomType),
|
Atom(IntegerAtomType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum IntegerAtomType {
|
pub enum IntegerAtomType<'a> {
|
||||||
Byte,
|
Byte(Symbol<'a>),
|
||||||
Shortint,
|
Shortint(Symbol<'a>),
|
||||||
Int,
|
Int(Symbol<'a>),
|
||||||
Longint,
|
Longint(Symbol<'a>),
|
||||||
Integer,
|
Integer(Symbol<'a>),
|
||||||
Time,
|
Time(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum IntegerVectorType {
|
pub enum IntegerVectorType<'a> {
|
||||||
Bit,
|
Bit(Symbol<'a>),
|
||||||
Logic,
|
Logic(Symbol<'a>),
|
||||||
Reg,
|
Reg(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NonIntegerType {
|
pub enum NonIntegerType<'a> {
|
||||||
Shortreal,
|
Shortreal(Symbol<'a>),
|
||||||
Real,
|
Real(Symbol<'a>),
|
||||||
Realtime,
|
Realtime(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetType<'a> {
|
pub enum NetType<'a> {
|
||||||
Supply0(Symbol<'a>),
|
Supply0(Symbol<'a>),
|
||||||
Supply1(Symbol<'a>),
|
Supply1(Symbol<'a>),
|
||||||
@ -191,67 +200,67 @@ pub enum NetType<'a> {
|
|||||||
Wor(Symbol<'a>),
|
Wor(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetPortType<'a> {
|
pub enum NetPortType<'a> {
|
||||||
DataType(NetPortTypeDataType<'a>),
|
DataType(NetPortTypeDataType<'a>),
|
||||||
NetType(Identifier<'a>),
|
NetType(Identifier<'a>),
|
||||||
Interconnect(ImplicitDataType<'a>),
|
Interconnect(ImplicitDataType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetPortTypeDataType<'a> {
|
pub struct NetPortTypeDataType<'a> {
|
||||||
pub nodes: (Option<NetType<'a>>, DataTypeOrImplicit<'a>),
|
pub nodes: (Option<NetType<'a>>, DataTypeOrImplicit<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariablePortType<'a> {
|
pub struct VariablePortType<'a> {
|
||||||
pub nodes: (VarDataType<'a>,),
|
pub nodes: (VarDataType<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum VarDataType<'a> {
|
pub enum VarDataType<'a> {
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Signing {
|
pub enum Signing<'a> {
|
||||||
Signed,
|
Signed(Symbol<'a>),
|
||||||
Unsigned,
|
Unsigned(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SimpleType<'a> {
|
pub enum SimpleType<'a> {
|
||||||
IntegerType(IntegerType),
|
IntegerType(IntegerType<'a>),
|
||||||
NonNonIntegerType(IntegerType),
|
NonNonIntegerType(IntegerType<'a>),
|
||||||
TypeIdentifier(Identifier<'a>),
|
TypeIdentifier(Identifier<'a>),
|
||||||
ParameterIdentifier(Identifier<'a>),
|
ParameterIdentifier(Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StructUnionMember<'a> {
|
pub struct StructUnionMember<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
Option<RandomQualifier>,
|
Option<RandomQualifier<'a>>,
|
||||||
DataTypeOrVoid<'a>,
|
DataTypeOrVoid<'a>,
|
||||||
ListOfVariableDeclAssignments<'a>,
|
ListOfVariableDeclAssignments<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DataTypeOrVoid<'a> {
|
pub enum DataTypeOrVoid<'a> {
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
Void,
|
Void(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum StructUnion {
|
pub enum StructUnion<'a> {
|
||||||
Struct,
|
Struct(Symbol<'a>),
|
||||||
Union,
|
Union(Symbol<'a>),
|
||||||
UnionTagged,
|
UnionTagged(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TypeReference<'a> {
|
pub enum TypeReference<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,23 +7,23 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InoutDeclaration<'a> {
|
pub struct InoutDeclaration<'a> {
|
||||||
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InputDeclaration<'a> {
|
pub enum InputDeclaration<'a> {
|
||||||
Net(InputDeclarationNet<'a>),
|
Net(InputDeclarationNet<'a>),
|
||||||
Variable(InputDeclarationVariable<'a>),
|
Variable(InputDeclarationVariable<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InputDeclarationNet<'a> {
|
pub struct InputDeclarationNet<'a> {
|
||||||
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InputDeclarationVariable<'a> {
|
pub struct InputDeclarationVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -31,18 +32,18 @@ pub struct InputDeclarationVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum OutputDeclaration<'a> {
|
pub enum OutputDeclaration<'a> {
|
||||||
Net(OutputDeclarationNet<'a>),
|
Net(OutputDeclarationNet<'a>),
|
||||||
Variable(OutputDeclarationVariable<'a>),
|
Variable(OutputDeclarationVariable<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OutputDeclarationNet<'a> {
|
pub struct OutputDeclarationNet<'a> {
|
||||||
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
pub nodes: (Symbol<'a>, NetPortType<'a>, ListOfPortIdentifiers<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OutputDeclarationVariable<'a> {
|
pub struct OutputDeclarationVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -51,7 +52,7 @@ pub struct OutputDeclarationVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfacePortDeclaration<'a> {
|
pub struct InterfacePortDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
InterfaceIdentifier<'a>,
|
InterfaceIdentifier<'a>,
|
||||||
@ -60,7 +61,7 @@ pub struct InterfacePortDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RefDeclaration<'a> {
|
pub struct RefDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,18 +7,18 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TaskDeclaration<'a> {
|
pub struct TaskDeclaration<'a> {
|
||||||
pub nodes: (Option<Lifetime<'a>>, TaskBodyDeclaration<'a>),
|
pub nodes: (Option<Lifetime<'a>>, TaskBodyDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TaskBodyDeclaration<'a> {
|
pub enum TaskBodyDeclaration<'a> {
|
||||||
WithoutPort(TaskBodyDeclarationWithoutPort<'a>),
|
WithoutPort(TaskBodyDeclarationWithoutPort<'a>),
|
||||||
WithPort(TaskBodyDeclarationWithPort<'a>),
|
WithPort(TaskBodyDeclarationWithPort<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TaskBodyDeclarationWithoutPort<'a> {
|
pub struct TaskBodyDeclarationWithoutPort<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<InterfaceIdentifierOrClassScope<'a>>,
|
Option<InterfaceIdentifierOrClassScope<'a>>,
|
||||||
@ -28,7 +29,7 @@ pub struct TaskBodyDeclarationWithoutPort<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TaskBodyDeclarationWithPort<'a> {
|
pub struct TaskBodyDeclarationWithPort<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<InterfaceIdentifierOrClassScope<'a>>,
|
Option<InterfaceIdentifierOrClassScope<'a>>,
|
||||||
@ -40,28 +41,28 @@ pub struct TaskBodyDeclarationWithPort<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfaceIdentifierOrClassScope<'a> {
|
pub enum InterfaceIdentifierOrClassScope<'a> {
|
||||||
InterfaceIdentifier(InterfaceIdentifier<'a>),
|
InterfaceIdentifier(InterfaceIdentifier<'a>),
|
||||||
ClassScope(ClassScope<'a>),
|
ClassScope(ClassScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TfItemDeclaration<'a> {
|
pub enum TfItemDeclaration<'a> {
|
||||||
Block(BlockItemDeclaration<'a>),
|
Block(BlockItemDeclaration<'a>),
|
||||||
Port(TfPortDeclaration<'a>),
|
Port(TfPortDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TfPortList<'a> {
|
pub struct TfPortList<'a> {
|
||||||
pub nodes: (Vec<TfPortItem<'a>>,),
|
pub nodes: (Vec<TfPortItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TfPortItem<'a> {
|
pub struct TfPortItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
Option<TfPortDirection>,
|
Option<TfPortDirection<'a>>,
|
||||||
Option<Var<'a>>,
|
Option<Var<'a>>,
|
||||||
DataTypeOrImplicit<'a>,
|
DataTypeOrImplicit<'a>,
|
||||||
Option<(
|
Option<(
|
||||||
@ -72,24 +73,24 @@ pub struct TfPortItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TfPortDirection {
|
pub enum TfPortDirection<'a> {
|
||||||
PortDirection(PortDirection),
|
PortDirection(PortDirection<'a>),
|
||||||
ConstRef,
|
ConstRef(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TfPortDeclaration<'a> {
|
pub struct TfPortDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
TfPortDirection,
|
TfPortDirection<'a>,
|
||||||
Option<Var<'a>>,
|
Option<Var<'a>>,
|
||||||
DataTypeOrImplicit<'a>,
|
DataTypeOrImplicit<'a>,
|
||||||
ListOfTfVariableIdentifiers<'a>,
|
ListOfTfVariableIdentifiers<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TaskPrototype<'a> {
|
pub struct TaskPrototype<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<TfPortList<'a>>),
|
pub nodes: (Identifier<'a>, Option<TfPortList<'a>>),
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DataDeclaration<'a> {
|
pub enum DataDeclaration<'a> {
|
||||||
Variable(DataDeclarationVariable<'a>),
|
Variable(DataDeclarationVariable<'a>),
|
||||||
TypeDeclaration(TypeDeclaration<'a>),
|
TypeDeclaration(TypeDeclaration<'a>),
|
||||||
@ -16,7 +16,7 @@ pub enum DataDeclaration<'a> {
|
|||||||
NetTypeDeclaration(NetTypeDeclaration<'a>),
|
NetTypeDeclaration(NetTypeDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DataDeclarationVariable<'a> {
|
pub struct DataDeclarationVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Const<'a>>,
|
Option<Const<'a>>,
|
||||||
@ -33,7 +33,7 @@ pub struct Const<'a> {
|
|||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PackageImportDeclaration<'a> {
|
pub struct PackageImportDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -78,19 +78,19 @@ pub struct PackageExportDeclarationItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarDeclaration<'a> {
|
pub struct GenvarDeclaration<'a> {
|
||||||
pub nodes: (Symbol<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetDeclaration<'a> {
|
pub enum NetDeclaration<'a> {
|
||||||
NetType(NetDeclarationNetType<'a>),
|
NetType(NetDeclarationNetType<'a>),
|
||||||
NetTypeIdentifier(NetDeclarationNetTypeIdentifier<'a>),
|
NetTypeIdentifier(NetDeclarationNetTypeIdentifier<'a>),
|
||||||
Interconnect(NetDeclarationInterconnect<'a>),
|
Interconnect(NetDeclarationInterconnect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetDeclarationNetType<'a> {
|
pub struct NetDeclarationNetType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
NetType<'a>,
|
NetType<'a>,
|
||||||
@ -103,7 +103,7 @@ pub struct NetDeclarationNetType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Strength<'a> {
|
pub enum Strength<'a> {
|
||||||
Drive(DriveStrength<'a>),
|
Drive(DriveStrength<'a>),
|
||||||
Charge(ChargeStrength<'a>),
|
Charge(ChargeStrength<'a>),
|
||||||
@ -115,7 +115,7 @@ pub enum VectorScalar<'a> {
|
|||||||
Scalared(Symbol<'a>),
|
Scalared(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetDeclarationNetTypeIdentifier<'a> {
|
pub struct NetDeclarationNetTypeIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
NetTypeIdentifier<'a>,
|
NetTypeIdentifier<'a>,
|
||||||
@ -125,7 +125,7 @@ pub struct NetDeclarationNetTypeIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetDeclarationInterconnect<'a> {
|
pub struct NetDeclarationInterconnect<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -138,14 +138,14 @@ pub struct NetDeclarationInterconnect<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TypeDeclaration<'a> {
|
pub enum TypeDeclaration<'a> {
|
||||||
DataType(TypeDeclarationDataType<'a>),
|
DataType(TypeDeclarationDataType<'a>),
|
||||||
Interface(TypeDeclarationInterface<'a>),
|
Interface(TypeDeclarationInterface<'a>),
|
||||||
Reserved(TypeDeclarationReserved<'a>),
|
Reserved(TypeDeclarationReserved<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TypeDeclarationDataType<'a> {
|
pub struct TypeDeclarationDataType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -156,7 +156,7 @@ pub struct TypeDeclarationDataType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TypeDeclarationInterface<'a> {
|
pub struct TypeDeclarationInterface<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -169,7 +169,7 @@ pub struct TypeDeclarationInterface<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TypeDeclarationReserved<'a> {
|
pub struct TypeDeclarationReserved<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -188,13 +188,13 @@ pub enum TypeDeclarationKeyword<'a> {
|
|||||||
InterfaceClass((Symbol<'a>, Symbol<'a>)),
|
InterfaceClass((Symbol<'a>, Symbol<'a>)),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetTypeDeclaration<'a> {
|
pub enum NetTypeDeclaration<'a> {
|
||||||
DataType(NetTypeDeclarationDataType<'a>),
|
DataType(NetTypeDeclarationDataType<'a>),
|
||||||
NetType(NetTypeDeclarationNetType<'a>),
|
NetType(NetTypeDeclarationNetType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetTypeDeclarationDataType<'a> {
|
pub struct NetTypeDeclarationDataType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -209,7 +209,7 @@ pub struct NetTypeDeclarationDataType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetTypeDeclarationNetType<'a> {
|
pub struct NetTypeDeclarationNetType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,37 +7,37 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Concatenation<'a> {
|
pub struct Concatenation<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, Expression<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, Expression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantConcatenation<'a> {
|
pub struct ConstantConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, ConstantExpression<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, ConstantExpression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantMultipleConcatenation<'a> {
|
pub struct ConstantMultipleConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, (ConstantExpression<'a>, ConstantConcatenation<'a>)>,),
|
pub nodes: (Brace<'a, (ConstantExpression<'a>, ConstantConcatenation<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathConcatenation<'a> {
|
pub struct ModulePathConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, ModulePathExpression<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, ModulePathExpression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathMultipleConcatenation<'a> {
|
pub struct ModulePathMultipleConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, (ConstantExpression<'a>, ModulePathConcatenation<'a>)>,),
|
pub nodes: (Brace<'a, (ConstantExpression<'a>, ModulePathConcatenation<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct MultipleConcatenation<'a> {
|
pub struct MultipleConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, (Expression<'a>, Concatenation<'a>)>,),
|
pub nodes: (Brace<'a, (Expression<'a>, Concatenation<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StreamingConcatenation<'a> {
|
pub struct StreamingConcatenation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Brace<
|
Brace<
|
||||||
@ -50,23 +51,23 @@ pub struct StreamingConcatenation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StreamOperator<'a> {
|
pub struct StreamOperator<'a> {
|
||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SliceSize<'a> {
|
pub enum SliceSize<'a> {
|
||||||
SimpleType(SimpleType<'a>),
|
SimpleType(SimpleType<'a>),
|
||||||
ConstantExpression(ConstantExpression<'a>),
|
ConstantExpression(ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StreamConcatenation<'a> {
|
pub struct StreamConcatenation<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, StreamExpression<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, StreamExpression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct StreamExpression<'a> {
|
pub struct StreamExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Expression<'a>,
|
Expression<'a>,
|
||||||
@ -74,7 +75,7 @@ pub struct StreamExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ArrayRangeExpression<'a> {
|
pub enum ArrayRangeExpression<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
Colon(ArrayRangeExpressionColon<'a>),
|
Colon(ArrayRangeExpressionColon<'a>),
|
||||||
@ -82,22 +83,22 @@ pub enum ArrayRangeExpression<'a> {
|
|||||||
MinusColon(ArrayRangeExpressionMinusColon<'a>),
|
MinusColon(ArrayRangeExpressionMinusColon<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ArrayRangeExpressionColon<'a> {
|
pub struct ArrayRangeExpressionColon<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ArrayRangeExpressionPlusColon<'a> {
|
pub struct ArrayRangeExpressionPlusColon<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ArrayRangeExpressionMinusColon<'a> {
|
pub struct ArrayRangeExpressionMinusColon<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, Expression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct EmptyUnpackedArrayConcatenation<'a> {
|
pub struct EmptyUnpackedArrayConcatenation<'a> {
|
||||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -5,24 +6,24 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetLvalue<'a> {
|
pub enum NetLvalue<'a> {
|
||||||
Identifier(NetLvalueIdentifier<'a>),
|
Identifier(NetLvalueIdentifier<'a>),
|
||||||
Lvalue(Box<NetLvalueLvalue<'a>>),
|
Lvalue(Box<NetLvalueLvalue<'a>>),
|
||||||
Pattern(Box<NetLvaluePattern<'a>>),
|
Pattern(Box<NetLvaluePattern<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetLvalueIdentifier<'a> {
|
pub struct NetLvalueIdentifier<'a> {
|
||||||
pub nodes: (PsOrHierarchicalNetIdentifier<'a>, ConstantSelect<'a>),
|
pub nodes: (PsOrHierarchicalNetIdentifier<'a>, ConstantSelect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetLvalueLvalue<'a> {
|
pub struct NetLvalueLvalue<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, NetLvalue<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, NetLvalue<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetLvaluePattern<'a> {
|
pub struct NetLvaluePattern<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<AssignmentPatternExpressionType<'a>>,
|
Option<AssignmentPatternExpressionType<'a>>,
|
||||||
@ -30,7 +31,7 @@ pub struct NetLvaluePattern<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum VariableLvalue<'a> {
|
pub enum VariableLvalue<'a> {
|
||||||
Identifier(VariableLvalueIdentifier<'a>),
|
Identifier(VariableLvalueIdentifier<'a>),
|
||||||
Lvalue(Box<VariableLvalueLvalue<'a>>),
|
Lvalue(Box<VariableLvalueLvalue<'a>>),
|
||||||
@ -38,7 +39,7 @@ pub enum VariableLvalue<'a> {
|
|||||||
StreamingConcatenation(StreamingConcatenation<'a>),
|
StreamingConcatenation(StreamingConcatenation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableLvalueIdentifier<'a> {
|
pub struct VariableLvalueIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ImplicitClassHandleOrPackageScope<'a>>,
|
Option<ImplicitClassHandleOrPackageScope<'a>>,
|
||||||
@ -47,12 +48,12 @@ pub struct VariableLvalueIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableLvalueLvalue<'a> {
|
pub struct VariableLvalueLvalue<'a> {
|
||||||
pub nodes: (Brace<'a, List<Symbol<'a>, VariableLvalue<'a>>>,),
|
pub nodes: (Brace<'a, List<Symbol<'a>, VariableLvalue<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariableLvaluePattern<'a> {
|
pub struct VariableLvaluePattern<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<AssignmentPatternExpressionType<'a>>,
|
Option<AssignmentPatternExpressionType<'a>>,
|
||||||
@ -60,7 +61,7 @@ pub struct VariableLvaluePattern<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonrangeVariableLvalue<'a> {
|
pub struct NonrangeVariableLvalue<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ImplicitClassHandleOrPackageScope<'a>>,
|
Option<ImplicitClassHandleOrPackageScope<'a>>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,13 +7,13 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum IncOrDecExpression<'a> {
|
pub enum IncOrDecExpression<'a> {
|
||||||
Prefix(IncOrDecExpressionPrefix<'a>),
|
Prefix(IncOrDecExpressionPrefix<'a>),
|
||||||
Suffix(IncOrDecExpressionSuffix<'a>),
|
Suffix(IncOrDecExpressionSuffix<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IncOrDecExpressionPrefix<'a> {
|
pub struct IncOrDecExpressionPrefix<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
IncOrDecOperator<'a>,
|
IncOrDecOperator<'a>,
|
||||||
@ -21,7 +22,7 @@ pub struct IncOrDecExpressionPrefix<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IncOrDecExpressionSuffix<'a> {
|
pub struct IncOrDecExpressionSuffix<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
VariableLvalue<'a>,
|
VariableLvalue<'a>,
|
||||||
@ -30,7 +31,7 @@ pub struct IncOrDecExpressionSuffix<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConditionalExpression<'a> {
|
pub struct ConditionalExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
CondPredicate<'a>,
|
CondPredicate<'a>,
|
||||||
@ -42,7 +43,7 @@ pub struct ConditionalExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantExpression<'a> {
|
pub enum ConstantExpression<'a> {
|
||||||
ConstantPrimary(Box<ConstantPrimary<'a>>),
|
ConstantPrimary(Box<ConstantPrimary<'a>>),
|
||||||
Unary(Box<ConstantExpressionUnary<'a>>),
|
Unary(Box<ConstantExpressionUnary<'a>>),
|
||||||
@ -50,7 +51,7 @@ pub enum ConstantExpression<'a> {
|
|||||||
Ternary(Box<ConstantExpressionTernary<'a>>),
|
Ternary(Box<ConstantExpressionTernary<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantExpressionUnary<'a> {
|
pub struct ConstantExpressionUnary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
UnaryOperator<'a>,
|
UnaryOperator<'a>,
|
||||||
@ -59,7 +60,7 @@ pub struct ConstantExpressionUnary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantExpressionBinary<'a> {
|
pub struct ConstantExpressionBinary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConstantExpression<'a>,
|
ConstantExpression<'a>,
|
||||||
@ -69,7 +70,7 @@ pub struct ConstantExpressionBinary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantExpressionTernary<'a> {
|
pub struct ConstantExpressionTernary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConstantExpression<'a>,
|
ConstantExpression<'a>,
|
||||||
@ -81,13 +82,13 @@ pub struct ConstantExpressionTernary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantMintypmaxExpression<'a> {
|
pub enum ConstantMintypmaxExpression<'a> {
|
||||||
Unary(ConstantExpression<'a>),
|
Unary(ConstantExpression<'a>),
|
||||||
Ternary(ConstantMintypmaxExpressionTernary<'a>),
|
Ternary(ConstantMintypmaxExpressionTernary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantMintypmaxExpressionTernary<'a> {
|
pub struct ConstantMintypmaxExpressionTernary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConstantExpression<'a>,
|
ConstantExpression<'a>,
|
||||||
@ -98,43 +99,43 @@ pub struct ConstantMintypmaxExpressionTernary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantParamExpression<'a> {
|
pub enum ConstantParamExpression<'a> {
|
||||||
ConstantMintypmaxExpression(ConstantMintypmaxExpression<'a>),
|
ConstantMintypmaxExpression(ConstantMintypmaxExpression<'a>),
|
||||||
DataType(DataType<'a>),
|
DataType(DataType<'a>),
|
||||||
Dollar(Symbol<'a>),
|
Dollar(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ParamExpression<'a> {
|
pub enum ParamExpression<'a> {
|
||||||
MintypmaxExpression(MintypmaxExpression<'a>),
|
MintypmaxExpression(MintypmaxExpression<'a>),
|
||||||
DataType(Box<DataType<'a>>),
|
DataType(Box<DataType<'a>>),
|
||||||
Dollar(Symbol<'a>),
|
Dollar(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantRangeExpression<'a> {
|
pub enum ConstantRangeExpression<'a> {
|
||||||
ConstantExpression(ConstantExpression<'a>),
|
ConstantExpression(ConstantExpression<'a>),
|
||||||
ConstantPartSelectRange(ConstantPartSelectRange<'a>),
|
ConstantPartSelectRange(ConstantPartSelectRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantPartSelectRange<'a> {
|
pub enum ConstantPartSelectRange<'a> {
|
||||||
ConstantRange(ConstantRange<'a>),
|
ConstantRange(ConstantRange<'a>),
|
||||||
ConstantIndexedRange(ConstantIndexedRange<'a>),
|
ConstantIndexedRange(ConstantIndexedRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantRange<'a> {
|
pub struct ConstantRange<'a> {
|
||||||
pub nodes: (ConstantExpression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
pub nodes: (ConstantExpression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantIndexedRange<'a> {
|
pub struct ConstantIndexedRange<'a> {
|
||||||
pub nodes: (ConstantExpression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
pub nodes: (ConstantExpression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Expression<'a> {
|
pub enum Expression<'a> {
|
||||||
Primary(Box<Primary<'a>>),
|
Primary(Box<Primary<'a>>),
|
||||||
Unary(Box<ExpressionUnary<'a>>),
|
Unary(Box<ExpressionUnary<'a>>),
|
||||||
@ -146,17 +147,17 @@ pub enum Expression<'a> {
|
|||||||
TaggedUnionExpression(Box<TaggedUnionExpression<'a>>),
|
TaggedUnionExpression(Box<TaggedUnionExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExpressionUnary<'a> {
|
pub struct ExpressionUnary<'a> {
|
||||||
pub nodes: (UnaryOperator<'a>, Vec<AttributeInstance<'a>>, Primary<'a>),
|
pub nodes: (UnaryOperator<'a>, Vec<AttributeInstance<'a>>, Primary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExpressionOperatorAssignment<'a> {
|
pub struct ExpressionOperatorAssignment<'a> {
|
||||||
pub nodes: (Paren<'a, OperatorAssignment<'a>>,),
|
pub nodes: (Paren<'a, OperatorAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExpressionBinary<'a> {
|
pub struct ExpressionBinary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Expression<'a>,
|
Expression<'a>,
|
||||||
@ -166,34 +167,34 @@ pub struct ExpressionBinary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TaggedUnionExpression<'a> {
|
pub struct TaggedUnionExpression<'a> {
|
||||||
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Expression<'a>>),
|
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InsideExpression<'a> {
|
pub struct InsideExpression<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, Brace<'a, OpenRangeList<'a>>),
|
pub nodes: (Expression<'a>, Symbol<'a>, Brace<'a, OpenRangeList<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ValueRange<'a> {
|
pub enum ValueRange<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
Binary(ValueRangeBinary<'a>),
|
Binary(ValueRangeBinary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ValueRangeBinary<'a> {
|
pub struct ValueRangeBinary<'a> {
|
||||||
pub nodes: (Bracket<'a, (Expression<'a>, Symbol<'a>, Expression<'a>)>,),
|
pub nodes: (Bracket<'a, (Expression<'a>, Symbol<'a>, Expression<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum MintypmaxExpression<'a> {
|
pub enum MintypmaxExpression<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
Ternary(MintypmaxExpressionTernary<'a>),
|
Ternary(MintypmaxExpressionTernary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct MintypmaxExpressionTernary<'a> {
|
pub struct MintypmaxExpressionTernary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Expression<'a>,
|
Expression<'a>,
|
||||||
@ -204,7 +205,7 @@ pub struct MintypmaxExpressionTernary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathConditionalExpression<'a> {
|
pub struct ModulePathConditionalExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModulePathExpression<'a>,
|
ModulePathExpression<'a>,
|
||||||
@ -216,7 +217,7 @@ pub struct ModulePathConditionalExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModulePathExpression<'a> {
|
pub enum ModulePathExpression<'a> {
|
||||||
ModulePathPrimary(Box<ModulePathPrimary<'a>>),
|
ModulePathPrimary(Box<ModulePathPrimary<'a>>),
|
||||||
Unary(Box<ModulePathExpressionUnary<'a>>),
|
Unary(Box<ModulePathExpressionUnary<'a>>),
|
||||||
@ -224,7 +225,7 @@ pub enum ModulePathExpression<'a> {
|
|||||||
ModulePathConditionalExpression(Box<ModulePathConditionalExpression<'a>>),
|
ModulePathConditionalExpression(Box<ModulePathConditionalExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathExpressionUnary<'a> {
|
pub struct ModulePathExpressionUnary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
UnaryModulePathOperator<'a>,
|
UnaryModulePathOperator<'a>,
|
||||||
@ -233,7 +234,7 @@ pub struct ModulePathExpressionUnary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathExpressionBinary<'a> {
|
pub struct ModulePathExpressionBinary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModulePathExpression<'a>,
|
ModulePathExpression<'a>,
|
||||||
@ -243,13 +244,13 @@ pub struct ModulePathExpressionBinary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModulePathMintypmaxExpression<'a> {
|
pub enum ModulePathMintypmaxExpression<'a> {
|
||||||
ModulePathExpression(ModulePathExpression<'a>),
|
ModulePathExpression(ModulePathExpression<'a>),
|
||||||
Ternary(ModulePathMintypmaxExpressionTernary<'a>),
|
Ternary(ModulePathMintypmaxExpressionTernary<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathMintypmaxExpressionTernary<'a> {
|
pub struct ModulePathMintypmaxExpressionTernary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModulePathExpression<'a>,
|
ModulePathExpression<'a>,
|
||||||
@ -260,18 +261,18 @@ pub struct ModulePathMintypmaxExpressionTernary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PartSelectRange<'a> {
|
pub enum PartSelectRange<'a> {
|
||||||
ConstantRange(ConstantRange<'a>),
|
ConstantRange(ConstantRange<'a>),
|
||||||
IndexedRange(IndexedRange<'a>),
|
IndexedRange(IndexedRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IndexedRange<'a> {
|
pub struct IndexedRange<'a> {
|
||||||
pub nodes: (Expression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
pub nodes: (Expression<'a>, Symbol<'a>, ConstantExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarExpression<'a> {
|
pub struct GenvarExpression<'a> {
|
||||||
pub nodes: (ConstantExpression<'a>,),
|
pub nodes: (ConstantExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstantPrimary<'a> {
|
pub enum ConstantPrimary<'a> {
|
||||||
PrimaryLiteral(PrimaryLiteral<'a>),
|
PrimaryLiteral(PrimaryLiteral<'a>),
|
||||||
PsParameter(ConstantPrimaryPsParameter<'a>),
|
PsParameter(ConstantPrimaryPsParameter<'a>),
|
||||||
@ -26,12 +26,12 @@ pub enum ConstantPrimary<'a> {
|
|||||||
Null(Symbol<'a>),
|
Null(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryPsParameter<'a> {
|
pub struct ConstantPrimaryPsParameter<'a> {
|
||||||
pub nodes: (PsParameterIdentifier<'a>, ConstantSelect<'a>),
|
pub nodes: (PsParameterIdentifier<'a>, ConstantSelect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimarySpecparam<'a> {
|
pub struct ConstantPrimarySpecparam<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SpecparamIdentifier<'a>,
|
SpecparamIdentifier<'a>,
|
||||||
@ -39,17 +39,17 @@ pub struct ConstantPrimarySpecparam<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryFormalPort<'a> {
|
pub struct ConstantPrimaryFormalPort<'a> {
|
||||||
pub nodes: (FormalPortIdentifier<'a>, ConstantSelect<'a>),
|
pub nodes: (FormalPortIdentifier<'a>, ConstantSelect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryEnum<'a> {
|
pub struct ConstantPrimaryEnum<'a> {
|
||||||
pub nodes: (PackageScopeOrClassScope<'a>, EnumIdentifier<'a>),
|
pub nodes: (PackageScopeOrClassScope<'a>, EnumIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryConcatenation<'a> {
|
pub struct ConstantPrimaryConcatenation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConstantConcatenation<'a>,
|
ConstantConcatenation<'a>,
|
||||||
@ -57,7 +57,7 @@ pub struct ConstantPrimaryConcatenation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryMultipleConcatenation<'a> {
|
pub struct ConstantPrimaryMultipleConcatenation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConstantMultipleConcatenation<'a>,
|
ConstantMultipleConcatenation<'a>,
|
||||||
@ -65,12 +65,12 @@ pub struct ConstantPrimaryMultipleConcatenation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantPrimaryMintypmaxExpression<'a> {
|
pub struct ConstantPrimaryMintypmaxExpression<'a> {
|
||||||
pub nodes: (Paren<'a, ConstantMintypmaxExpression<'a>>,),
|
pub nodes: (Paren<'a, ConstantMintypmaxExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModulePathPrimary<'a> {
|
pub enum ModulePathPrimary<'a> {
|
||||||
Number(Number<'a>),
|
Number(Number<'a>),
|
||||||
Identifier(Identifier<'a>),
|
Identifier(Identifier<'a>),
|
||||||
@ -80,12 +80,12 @@ pub enum ModulePathPrimary<'a> {
|
|||||||
Mintypmax(ModulePathPrimaryMintypmax<'a>),
|
Mintypmax(ModulePathPrimaryMintypmax<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModulePathPrimaryMintypmax<'a> {
|
pub struct ModulePathPrimaryMintypmax<'a> {
|
||||||
pub nodes: (Paren<'a, ModulePathMintypmaxExpression<'a>>,),
|
pub nodes: (Paren<'a, ModulePathMintypmaxExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Primary<'a> {
|
pub enum Primary<'a> {
|
||||||
PrimaryLiteral(PrimaryLiteral<'a>),
|
PrimaryLiteral(PrimaryLiteral<'a>),
|
||||||
Hierarchical(PrimaryHierarchical<'a>),
|
Hierarchical(PrimaryHierarchical<'a>),
|
||||||
@ -104,7 +104,7 @@ pub enum Primary<'a> {
|
|||||||
Null(Symbol<'a>),
|
Null(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PrimaryHierarchical<'a> {
|
pub struct PrimaryHierarchical<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ClassQualifierOrPackageScope<'a>>,
|
Option<ClassQualifierOrPackageScope<'a>>,
|
||||||
@ -113,12 +113,12 @@ pub struct PrimaryHierarchical<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PrimaryConcatenation<'a> {
|
pub struct PrimaryConcatenation<'a> {
|
||||||
pub nodes: (Concatenation<'a>, Option<Bracket<'a, RangeExpression<'a>>>),
|
pub nodes: (Concatenation<'a>, Option<Bracket<'a, RangeExpression<'a>>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PrimaryMultipleConcatenation<'a> {
|
pub struct PrimaryMultipleConcatenation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
MultipleConcatenation<'a>,
|
MultipleConcatenation<'a>,
|
||||||
@ -126,18 +126,18 @@ pub struct PrimaryMultipleConcatenation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PrimaryMintypmaxExpression<'a> {
|
pub struct PrimaryMintypmaxExpression<'a> {
|
||||||
pub nodes: (Paren<'a, MintypmaxExpression<'a>>,),
|
pub nodes: (Paren<'a, MintypmaxExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassQualifierOrPackageScope<'a> {
|
pub enum ClassQualifierOrPackageScope<'a> {
|
||||||
ClassQualifier(ClassQualifier<'a>),
|
ClassQualifier(ClassQualifier<'a>),
|
||||||
PackageScope(PackageScope<'a>),
|
PackageScope(PackageScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassQualifier<'a> {
|
pub struct ClassQualifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Local<'a>>,
|
Option<Local<'a>>,
|
||||||
@ -145,13 +145,13 @@ pub struct ClassQualifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RangeExpression<'a> {
|
pub enum RangeExpression<'a> {
|
||||||
Expression(Expression<'a>),
|
Expression(Expression<'a>),
|
||||||
PartSelectRange(PartSelectRange<'a>),
|
PartSelectRange(PartSelectRange<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PrimaryLiteral<'a> {
|
pub enum PrimaryLiteral<'a> {
|
||||||
Number(Number<'a>),
|
Number(Number<'a>),
|
||||||
TimeLiteral(TimeLiteral<'a>),
|
TimeLiteral(TimeLiteral<'a>),
|
||||||
@ -192,12 +192,12 @@ pub enum ImplicitClassHandle<'a> {
|
|||||||
ThisSuper((Symbol<'a>, Symbol<'a>, Symbol<'a>)),
|
ThisSuper((Symbol<'a>, Symbol<'a>, Symbol<'a>)),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BitSelect<'a> {
|
pub struct BitSelect<'a> {
|
||||||
nodes: (Vec<Bracket<'a, Expression<'a>>>,),
|
nodes: (Vec<Bracket<'a, Expression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Select<'a> {
|
pub struct Select<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(
|
Option<(
|
||||||
@ -210,7 +210,7 @@ pub struct Select<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonrangeSelect<'a> {
|
pub struct NonrangeSelect<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(
|
Option<(
|
||||||
@ -222,12 +222,12 @@ pub struct NonrangeSelect<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantBitSelect<'a> {
|
pub struct ConstantBitSelect<'a> {
|
||||||
nodes: (Vec<Bracket<'a, ConstantExpression<'a>>>,),
|
nodes: (Vec<Bracket<'a, ConstantExpression<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantSelect<'a> {
|
pub struct ConstantSelect<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(
|
Option<(
|
||||||
@ -240,7 +240,7 @@ pub struct ConstantSelect<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantCast<'a> {
|
pub struct ConstantCast<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
CastingType<'a>,
|
CastingType<'a>,
|
||||||
@ -249,12 +249,12 @@ pub struct ConstantCast<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantLetExpression<'a> {
|
pub struct ConstantLetExpression<'a> {
|
||||||
pub nodes: (LetExpression<'a>,),
|
pub nodes: (LetExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Cast<'a> {
|
pub struct Cast<'a> {
|
||||||
pub nodes: (CastingType<'a>, Symbol<'a>, Paren<'a, Expression<'a>>),
|
pub nodes: (CastingType<'a>, Symbol<'a>, Paren<'a, Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,12 +8,12 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstantFunctionCall<'a> {
|
pub struct ConstantFunctionCall<'a> {
|
||||||
pub nodes: (FunctionSubroutineCall<'a>,),
|
pub nodes: (FunctionSubroutineCall<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TfCall<'a> {
|
pub struct TfCall<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
PsOrHierarchicalTfIdentifier<'a>,
|
PsOrHierarchicalTfIdentifier<'a>,
|
||||||
@ -21,14 +22,14 @@ pub struct TfCall<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SystemTfCall<'a> {
|
pub enum SystemTfCall<'a> {
|
||||||
ArgOptionl(SystemTfCallArgOptional<'a>),
|
ArgOptionl(SystemTfCallArgOptional<'a>),
|
||||||
ArgDataType(SystemTfCallArgDataType<'a>),
|
ArgDataType(SystemTfCallArgDataType<'a>),
|
||||||
ArgExpression(SystemTfCallArgExpression<'a>),
|
ArgExpression(SystemTfCallArgExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SystemTfCallArgOptional<'a> {
|
pub struct SystemTfCallArgOptional<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SystemTfIdentifier<'a>,
|
SystemTfIdentifier<'a>,
|
||||||
@ -36,7 +37,7 @@ pub struct SystemTfCallArgOptional<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SystemTfCallArgDataType<'a> {
|
pub struct SystemTfCallArgDataType<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SystemTfIdentifier<'a>,
|
SystemTfIdentifier<'a>,
|
||||||
@ -44,7 +45,7 @@ pub struct SystemTfCallArgDataType<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SystemTfCallArgExpression<'a> {
|
pub struct SystemTfCallArgExpression<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
SystemTfIdentifier<'a>,
|
SystemTfIdentifier<'a>,
|
||||||
@ -58,7 +59,7 @@ pub struct SystemTfCallArgExpression<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum SubroutineCall<'a> {
|
pub enum SubroutineCall<'a> {
|
||||||
TfCall(Box<TfCall<'a>>),
|
TfCall(Box<TfCall<'a>>),
|
||||||
SystemTfCall(Box<SystemTfCall<'a>>),
|
SystemTfCall(Box<SystemTfCall<'a>>),
|
||||||
@ -66,23 +67,23 @@ pub enum SubroutineCall<'a> {
|
|||||||
Randomize(Box<SubroutineCallRandomize<'a>>),
|
Randomize(Box<SubroutineCallRandomize<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SubroutineCallRandomize<'a> {
|
pub struct SubroutineCallRandomize<'a> {
|
||||||
pub nodes: (Option<(Symbol<'a>, Symbol<'a>)>, RandomizeCall<'a>),
|
pub nodes: (Option<(Symbol<'a>, Symbol<'a>)>, RandomizeCall<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FunctionSubroutineCall<'a> {
|
pub struct FunctionSubroutineCall<'a> {
|
||||||
pub nodes: (SubroutineCall<'a>,),
|
pub nodes: (SubroutineCall<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ListOfArguments<'a> {
|
pub enum ListOfArguments<'a> {
|
||||||
Ordered(ListOfArgumentsOrdered<'a>),
|
Ordered(ListOfArgumentsOrdered<'a>),
|
||||||
Named(ListOfArgumentsNamed<'a>),
|
Named(ListOfArgumentsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfArgumentsOrdered<'a> {
|
pub struct ListOfArgumentsOrdered<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
List<Symbol<'a>, Option<Expression<'a>>>,
|
List<Symbol<'a>, Option<Expression<'a>>>,
|
||||||
@ -95,7 +96,7 @@ pub struct ListOfArgumentsOrdered<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfArgumentsNamed<'a> {
|
pub struct ListOfArgumentsNamed<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -110,18 +111,18 @@ pub struct ListOfArgumentsNamed<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct MethodCall<'a> {
|
pub struct MethodCall<'a> {
|
||||||
pub nodes: (MethodCallRoot<'a>, Symbol<'a>, MethodCallBody<'a>),
|
pub nodes: (MethodCallRoot<'a>, Symbol<'a>, MethodCallBody<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum MethodCallBody<'a> {
|
pub enum MethodCallBody<'a> {
|
||||||
User(MethodCallBodyUser<'a>),
|
User(MethodCallBodyUser<'a>),
|
||||||
BuiltInMethodCall(BuiltInMethodCall<'a>),
|
BuiltInMethodCall(BuiltInMethodCall<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct MethodCallBodyUser<'a> {
|
pub struct MethodCallBodyUser<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
MethodIdentifier<'a>,
|
MethodIdentifier<'a>,
|
||||||
@ -130,13 +131,13 @@ pub struct MethodCallBodyUser<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BuiltInMethodCall<'a> {
|
pub enum BuiltInMethodCall<'a> {
|
||||||
ArrayManipulationCall(ArrayManipulationCall<'a>),
|
ArrayManipulationCall(ArrayManipulationCall<'a>),
|
||||||
RandomizeCall(RandomizeCall<'a>),
|
RandomizeCall(RandomizeCall<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ArrayManipulationCall<'a> {
|
pub struct ArrayManipulationCall<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ArrayMethodName<'a>,
|
ArrayMethodName<'a>,
|
||||||
@ -146,7 +147,7 @@ pub struct ArrayManipulationCall<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct RandomizeCall<'a> {
|
pub struct RandomizeCall<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -160,19 +161,19 @@ pub struct RandomizeCall<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum VariableIdentifierListOrNull<'a> {
|
pub enum VariableIdentifierListOrNull<'a> {
|
||||||
VariableIdentifierList(VariableIdentifierList<'a>),
|
VariableIdentifierList(VariableIdentifierList<'a>),
|
||||||
Null(Symbol<'a>),
|
Null(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum MethodCallRoot<'a> {
|
pub enum MethodCallRoot<'a> {
|
||||||
Primary(Primary<'a>),
|
Primary(Primary<'a>),
|
||||||
ImplicitClassHandle(ImplicitClassHandle<'a>),
|
ImplicitClassHandle(ImplicitClassHandle<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ArrayMethodName<'a> {
|
pub enum ArrayMethodName<'a> {
|
||||||
MethodIdentifier(MethodIdentifier<'a>),
|
MethodIdentifier(MethodIdentifier<'a>),
|
||||||
Unique(Symbol<'a>),
|
Unique(Symbol<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
use nom::sequence::*;
|
use nom::sequence::*;
|
||||||
@ -5,12 +6,12 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AttributeInstance<'a> {
|
pub struct AttributeInstance<'a> {
|
||||||
pub nodes: (Symbol<'a>, List<Symbol<'a>, AttrSpec<'a>>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, List<Symbol<'a>, AttrSpec<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AttrSpec<'a> {
|
pub struct AttrSpec<'a> {
|
||||||
pub nodes: (Identifier<'a>, Option<(Symbol<'a>, ConstantExpression<'a>)>),
|
pub nodes: (Identifier<'a>, Option<(Symbol<'a>, ConstantExpression<'a>)>),
|
||||||
}
|
}
|
||||||
|
@ -133,22 +133,22 @@ pub struct GenvarIdentifier<'a> {
|
|||||||
pub nodes: (Identifier<'a>,),
|
pub nodes: (Identifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalArrayIdentifier<'a> {
|
pub struct HierarchicalArrayIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalBlockIdentifier<'a> {
|
pub struct HierarchicalBlockIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalEventIdentifier<'a> {
|
pub struct HierarchicalEventIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalIdentifier<'a> {
|
pub struct HierarchicalIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Root<'a>>,
|
Option<Root<'a>>,
|
||||||
@ -162,37 +162,37 @@ pub struct Root<'a> {
|
|||||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalNetIdentifier<'a> {
|
pub struct HierarchicalNetIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalParameterIdentifier<'a> {
|
pub struct HierarchicalParameterIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalPropertyIdentifier<'a> {
|
pub struct HierarchicalPropertyIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalSequenceIdentifier<'a> {
|
pub struct HierarchicalSequenceIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalTaskIdentifier<'a> {
|
pub struct HierarchicalTaskIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalTfIdentifier<'a> {
|
pub struct HierarchicalTfIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalVariableIdentifier<'a> {
|
pub struct HierarchicalVariableIdentifier<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>,),
|
pub nodes: (HierarchicalIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ pub struct PsIdentifier<'a> {
|
|||||||
pub nodes: (Option<PackageScope<'a>>, Identifier<'a>),
|
pub nodes: (Option<PackageScope<'a>>, Identifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalArrayIdentifier<'a> {
|
pub struct PsOrHierarchicalArrayIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ImplicitClassHandleOrClassScopeOrPackageScope<'a>>,
|
Option<ImplicitClassHandleOrClassScopeOrPackageScope<'a>>,
|
||||||
@ -347,7 +347,7 @@ pub struct PsOrHierarchicalArrayIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PsOrHierarchicalNetIdentifier<'a> {
|
pub enum PsOrHierarchicalNetIdentifier<'a> {
|
||||||
PackageScope(PsOrHierarchicalNetIdentifierPackageScope<'a>),
|
PackageScope(PsOrHierarchicalNetIdentifierPackageScope<'a>),
|
||||||
HierarchicalNetIdentifier(HierarchicalNetIdentifier<'a>),
|
HierarchicalNetIdentifier(HierarchicalNetIdentifier<'a>),
|
||||||
@ -358,66 +358,66 @@ pub struct PsOrHierarchicalNetIdentifierPackageScope<'a> {
|
|||||||
pub nodes: (Option<PackageScope<'a>>, NetIdentifier<'a>),
|
pub nodes: (Option<PackageScope<'a>>, NetIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalNetIdentifierHierarchical<'a> {
|
pub struct PsOrHierarchicalNetIdentifierHierarchical<'a> {
|
||||||
pub nodes: (HierarchicalNetIdentifier<'a>),
|
pub nodes: (HierarchicalNetIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PsOrHierarchicalPropertyIdentifier<'a> {
|
pub enum PsOrHierarchicalPropertyIdentifier<'a> {
|
||||||
PackageScope(PsOrHierarchicalPropertyIdentifierPackageScope<'a>),
|
PackageScope(PsOrHierarchicalPropertyIdentifierPackageScope<'a>),
|
||||||
HierarchicalPropertyIdentifier(HierarchicalPropertyIdentifier<'a>),
|
HierarchicalPropertyIdentifier(HierarchicalPropertyIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalPropertyIdentifierPackageScope<'a> {
|
pub struct PsOrHierarchicalPropertyIdentifierPackageScope<'a> {
|
||||||
pub nodes: (Option<PackageScope<'a>>, PropertyIdentifier<'a>),
|
pub nodes: (Option<PackageScope<'a>>, PropertyIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalPropertyIdentifierHierarchical<'a> {
|
pub struct PsOrHierarchicalPropertyIdentifierHierarchical<'a> {
|
||||||
pub nodes: (HierarchicalPropertyIdentifier<'a>),
|
pub nodes: (HierarchicalPropertyIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PsOrHierarchicalSequenceIdentifier<'a> {
|
pub enum PsOrHierarchicalSequenceIdentifier<'a> {
|
||||||
PackageScope(PsOrHierarchicalSequenceIdentifierPackageScope<'a>),
|
PackageScope(PsOrHierarchicalSequenceIdentifierPackageScope<'a>),
|
||||||
HierarchicalSequenceIdentifier(HierarchicalSequenceIdentifier<'a>),
|
HierarchicalSequenceIdentifier(HierarchicalSequenceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalSequenceIdentifierPackageScope<'a> {
|
pub struct PsOrHierarchicalSequenceIdentifierPackageScope<'a> {
|
||||||
pub nodes: (Option<PackageScope<'a>>, SequenceIdentifier<'a>),
|
pub nodes: (Option<PackageScope<'a>>, SequenceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalSequenceIdentifierHierarchical<'a> {
|
pub struct PsOrHierarchicalSequenceIdentifierHierarchical<'a> {
|
||||||
pub nodes: (HierarchicalSequenceIdentifier<'a>),
|
pub nodes: (HierarchicalSequenceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PsOrHierarchicalTfIdentifier<'a> {
|
pub enum PsOrHierarchicalTfIdentifier<'a> {
|
||||||
PackageScope(PsOrHierarchicalTfIdentifierPackageScope<'a>),
|
PackageScope(PsOrHierarchicalTfIdentifierPackageScope<'a>),
|
||||||
HierarchicalTfIdentifier(HierarchicalTfIdentifier<'a>),
|
HierarchicalTfIdentifier(HierarchicalTfIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalTfIdentifierPackageScope<'a> {
|
pub struct PsOrHierarchicalTfIdentifierPackageScope<'a> {
|
||||||
pub nodes: (Option<PackageScope<'a>>, TfIdentifier<'a>),
|
pub nodes: (Option<PackageScope<'a>>, TfIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsOrHierarchicalTfIdentifierHierarchical<'a> {
|
pub struct PsOrHierarchicalTfIdentifierHierarchical<'a> {
|
||||||
pub nodes: (HierarchicalTfIdentifier<'a>),
|
pub nodes: (HierarchicalTfIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PsParameterIdentifier<'a> {
|
pub enum PsParameterIdentifier<'a> {
|
||||||
Scope(PsParameterIdentifierScope<'a>),
|
Scope(PsParameterIdentifierScope<'a>),
|
||||||
Generate(PsParameterIdentifierGenerate<'a>),
|
Generate(PsParameterIdentifierGenerate<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsParameterIdentifierScope<'a> {
|
pub struct PsParameterIdentifierScope<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<PackageScopeOrClassScope<'a>>,
|
Option<PackageScopeOrClassScope<'a>>,
|
||||||
@ -425,7 +425,7 @@ pub struct PsParameterIdentifierScope<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsParameterIdentifierGenerate<'a> {
|
pub struct PsParameterIdentifierGenerate<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<(
|
Vec<(
|
||||||
@ -437,7 +437,7 @@ pub struct PsParameterIdentifierGenerate<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PsTypeIdentifier<'a> {
|
pub struct PsTypeIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<LocalOrPackageScopeOrClassScope<'a>>,
|
Option<LocalOrPackageScopeOrClassScope<'a>>,
|
||||||
@ -445,7 +445,7 @@ pub struct PsTypeIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LocalOrPackageScopeOrClassScope<'a> {
|
pub enum LocalOrPackageScopeOrClassScope<'a> {
|
||||||
Local(Local<'a>),
|
Local(Local<'a>),
|
||||||
PackageScope(PackageScope<'a>),
|
PackageScope(PackageScope<'a>),
|
||||||
@ -517,26 +517,26 @@ pub struct VariableIdentifier<'a> {
|
|||||||
pub nodes: (Identifier<'a>,),
|
pub nodes: (Identifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ImplicitClassHandleOrClassScopeOrPackageScope<'a> {
|
pub enum ImplicitClassHandleOrClassScopeOrPackageScope<'a> {
|
||||||
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
||||||
ClassScope(ClassScope<'a>),
|
ClassScope(ClassScope<'a>),
|
||||||
PackageScope(PackageScope<'a>),
|
PackageScope(PackageScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ImplicitClassHandleOrPackageScope<'a> {
|
pub enum ImplicitClassHandleOrPackageScope<'a> {
|
||||||
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
||||||
PackageScope(PackageScope<'a>),
|
PackageScope(PackageScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ImplicitClassHandleOrClassScope<'a> {
|
pub enum ImplicitClassHandleOrClassScope<'a> {
|
||||||
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
ImplicitClassHandle((ImplicitClassHandle<'a>, Symbol<'a>)),
|
||||||
ClassScope(ClassScope<'a>),
|
ClassScope(ClassScope<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PackageScopeOrClassScope<'a> {
|
pub enum PackageScopeOrClassScope<'a> {
|
||||||
PackageScope(PackageScope<'a>),
|
PackageScope(PackageScope<'a>),
|
||||||
ClassScope(ClassScope<'a>),
|
ClassScope(ClassScope<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerInstantiation<'a> {
|
pub struct CheckerInstantiation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
PsCheckerIdentifier<'a>,
|
PsCheckerIdentifier<'a>,
|
||||||
@ -16,34 +17,34 @@ pub struct CheckerInstantiation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ListOfCheckerPortConnections<'a> {
|
pub enum ListOfCheckerPortConnections<'a> {
|
||||||
Ordered(ListOfCheckerPortConnectionsOrdered<'a>),
|
Ordered(ListOfCheckerPortConnectionsOrdered<'a>),
|
||||||
Named(ListOfCheckerPortConnectionsNamed<'a>),
|
Named(ListOfCheckerPortConnectionsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfCheckerPortConnectionsOrdered<'a> {
|
pub struct ListOfCheckerPortConnectionsOrdered<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, OrderedCheckerPortConnection<'a>>,),
|
pub nodes: (List<Symbol<'a>, OrderedCheckerPortConnection<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfCheckerPortConnectionsNamed<'a> {
|
pub struct ListOfCheckerPortConnectionsNamed<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, NamedCheckerPortConnection<'a>>,),
|
pub nodes: (List<Symbol<'a>, NamedCheckerPortConnection<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OrderedCheckerPortConnection<'a> {
|
pub struct OrderedCheckerPortConnection<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Option<PropertyActualArg<'a>>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Option<PropertyActualArg<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NamedCheckerPortConnection<'a> {
|
pub enum NamedCheckerPortConnection<'a> {
|
||||||
Identifier(NamedCheckerPortConnectionIdentifier<'a>),
|
Identifier(NamedCheckerPortConnectionIdentifier<'a>),
|
||||||
Asterisk(NamedCheckerPortConnectionAsterisk<'a>),
|
Asterisk(NamedCheckerPortConnectionAsterisk<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NamedCheckerPortConnectionIdentifier<'a> {
|
pub struct NamedCheckerPortConnectionIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -53,7 +54,7 @@ pub struct NamedCheckerPortConnectionIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NamedCheckerPortConnectionAsterisk<'a> {
|
pub struct NamedCheckerPortConnectionAsterisk<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,12 +8,12 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenerateRegion<'a> {
|
pub struct GenerateRegion<'a> {
|
||||||
pub nodes: (Symbol<'a>, Vec<GenerateItem<'a>>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Vec<GenerateItem<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LoopGenerateConstruct<'a> {
|
pub struct LoopGenerateConstruct<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -30,7 +31,7 @@ pub struct LoopGenerateConstruct<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarInitialization<'a> {
|
pub struct GenvarInitialization<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Genvar<'a>>,
|
Option<Genvar<'a>>,
|
||||||
@ -40,19 +41,19 @@ pub struct GenvarInitialization<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Genvar<'a> {
|
pub struct Genvar<'a> {
|
||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum GenvarIteration<'a> {
|
pub enum GenvarIteration<'a> {
|
||||||
Assignment(GenvarIterationAssignment<'a>),
|
Assignment(GenvarIterationAssignment<'a>),
|
||||||
Prefix(GenvarIterationPrefix<'a>),
|
Prefix(GenvarIterationPrefix<'a>),
|
||||||
Suffix(GenvarIterationSuffix<'a>),
|
Suffix(GenvarIterationSuffix<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarIterationAssignment<'a> {
|
pub struct GenvarIterationAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
GenvarIdentifier<'a>,
|
GenvarIdentifier<'a>,
|
||||||
@ -61,23 +62,23 @@ pub struct GenvarIterationAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarIterationPrefix<'a> {
|
pub struct GenvarIterationPrefix<'a> {
|
||||||
pub nodes: (IncOrDecOperator<'a>, GenvarIdentifier<'a>),
|
pub nodes: (IncOrDecOperator<'a>, GenvarIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenvarIterationSuffix<'a> {
|
pub struct GenvarIterationSuffix<'a> {
|
||||||
pub nodes: (GenvarIdentifier<'a>, IncOrDecOperator<'a>),
|
pub nodes: (GenvarIdentifier<'a>, IncOrDecOperator<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConditionalGenerateConstruct<'a> {
|
pub enum ConditionalGenerateConstruct<'a> {
|
||||||
If(IfGenerateConstruct<'a>),
|
If(IfGenerateConstruct<'a>),
|
||||||
Case(CaseGenerateConstruct<'a>),
|
Case(CaseGenerateConstruct<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IfGenerateConstruct<'a> {
|
pub struct IfGenerateConstruct<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -87,7 +88,7 @@ pub struct IfGenerateConstruct<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseGenerateConstruct<'a> {
|
pub struct CaseGenerateConstruct<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -97,13 +98,13 @@ pub struct CaseGenerateConstruct<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CaseGenerateItem<'a> {
|
pub enum CaseGenerateItem<'a> {
|
||||||
Nondefault(CaseGenerateItemNondefault<'a>),
|
Nondefault(CaseGenerateItemNondefault<'a>),
|
||||||
Default(CaseGenerateItemDefault<'a>),
|
Default(CaseGenerateItemDefault<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseGenerateItemNondefault<'a> {
|
pub struct CaseGenerateItemNondefault<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
List<Symbol<'a>, ConstantExpression<'a>>,
|
List<Symbol<'a>, ConstantExpression<'a>>,
|
||||||
@ -112,18 +113,18 @@ pub struct CaseGenerateItemNondefault<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CaseGenerateItemDefault<'a> {
|
pub struct CaseGenerateItemDefault<'a> {
|
||||||
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, GenerateBlock<'a>),
|
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, GenerateBlock<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum GenerateBlock<'a> {
|
pub enum GenerateBlock<'a> {
|
||||||
GenerateItem(GenerateItem<'a>),
|
GenerateItem(GenerateItem<'a>),
|
||||||
Multiple(GenerateBlockMultiple<'a>),
|
Multiple(GenerateBlockMultiple<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct GenerateBlockMultiple<'a> {
|
pub struct GenerateBlockMultiple<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<(GenerateBlockIdentifier<'a>, Symbol<'a>)>,
|
Option<(GenerateBlockIdentifier<'a>, Symbol<'a>)>,
|
||||||
@ -135,7 +136,7 @@ pub struct GenerateBlockMultiple<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum GenerateItem<'a> {
|
pub enum GenerateItem<'a> {
|
||||||
ModuleOrGenerateItem(ModuleOrGenerateItem<'a>),
|
ModuleOrGenerateItem(ModuleOrGenerateItem<'a>),
|
||||||
InterfaceOrGenerateItem(InterfaceOrGenerateItem<'a>),
|
InterfaceOrGenerateItem(InterfaceOrGenerateItem<'a>),
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
use nom::IResult;
|
use nom::IResult;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceInstantiation<'a> {
|
pub struct InterfaceInstantiation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
InterfaceIdentifier<'a>,
|
InterfaceIdentifier<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleInstantiation<'a> {
|
pub struct ModuleInstantiation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModuleIdentifier<'a>,
|
ModuleIdentifier<'a>,
|
||||||
@ -16,7 +17,7 @@ pub struct ModuleInstantiation<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterValueAssignment<'a> {
|
pub struct ParameterValueAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -24,28 +25,28 @@ pub struct ParameterValueAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ListOfParameterAssignments<'a> {
|
pub enum ListOfParameterAssignments<'a> {
|
||||||
Ordered(ListOfParameterAssignmentsOrdered<'a>),
|
Ordered(ListOfParameterAssignmentsOrdered<'a>),
|
||||||
Named(ListOfParameterAssignmentsNamed<'a>),
|
Named(ListOfParameterAssignmentsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfParameterAssignmentsOrdered<'a> {
|
pub struct ListOfParameterAssignmentsOrdered<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, OrderedParameterAssignment<'a>>,),
|
pub nodes: (List<Symbol<'a>, OrderedParameterAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfParameterAssignmentsNamed<'a> {
|
pub struct ListOfParameterAssignmentsNamed<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, NamedParameterAssignment<'a>>,),
|
pub nodes: (List<Symbol<'a>, NamedParameterAssignment<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OrderedParameterAssignment<'a> {
|
pub struct OrderedParameterAssignment<'a> {
|
||||||
pub nodes: (ParamExpression<'a>,),
|
pub nodes: (ParamExpression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NamedParameterAssignment<'a> {
|
pub struct NamedParameterAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -54,7 +55,7 @@ pub struct NamedParameterAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct HierarchicalInstance<'a> {
|
pub struct HierarchicalInstance<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
NameOfInstance<'a>,
|
NameOfInstance<'a>,
|
||||||
@ -62,39 +63,39 @@ pub struct HierarchicalInstance<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NameOfInstance<'a> {
|
pub struct NameOfInstance<'a> {
|
||||||
pub nodes: (InstanceIdentifier<'a>, Vec<UnpackedDimension<'a>>),
|
pub nodes: (InstanceIdentifier<'a>, Vec<UnpackedDimension<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ListOfPortConnections<'a> {
|
pub enum ListOfPortConnections<'a> {
|
||||||
Ordered(ListOfPortConnectionsOrdered<'a>),
|
Ordered(ListOfPortConnectionsOrdered<'a>),
|
||||||
Named(ListOfPortConnectionsNamed<'a>),
|
Named(ListOfPortConnectionsNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfPortConnectionsOrdered<'a> {
|
pub struct ListOfPortConnectionsOrdered<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, OrderedPortConnection<'a>>,),
|
pub nodes: (List<Symbol<'a>, OrderedPortConnection<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfPortConnectionsNamed<'a> {
|
pub struct ListOfPortConnectionsNamed<'a> {
|
||||||
pub nodes: (List<Symbol<'a>, NamedPortConnection<'a>>,),
|
pub nodes: (List<Symbol<'a>, NamedPortConnection<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct OrderedPortConnection<'a> {
|
pub struct OrderedPortConnection<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Option<Expression<'a>>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Option<Expression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NamedPortConnection<'a> {
|
pub enum NamedPortConnection<'a> {
|
||||||
Identifier(NamedPortConnectionIdentifier<'a>),
|
Identifier(NamedPortConnectionIdentifier<'a>),
|
||||||
Asterisk(NamedPortConnectionAsterisk<'a>),
|
Asterisk(NamedPortConnectionAsterisk<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NamedPortConnectionIdentifier<'a> {
|
pub struct NamedPortConnectionIdentifier<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -104,7 +105,7 @@ pub struct NamedPortConnectionIdentifier<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NamedPortConnectionAsterisk<'a> {
|
pub struct NamedPortConnectionAsterisk<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
use nom::IResult;
|
use nom::IResult;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramInstantiation<'a> {
|
pub struct ProgramInstantiation<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ProgramIdentifier<'a>,
|
ProgramIdentifier<'a>,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,16 +7,16 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerPortList<'a> {
|
pub struct CheckerPortList<'a> {
|
||||||
pub nodes: (Vec<CheckerPortItem<'a>>,),
|
pub nodes: (Vec<CheckerPortItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerPortItem<'a> {
|
pub struct CheckerPortItem<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
Option<CheckerPortDirection>,
|
Option<CheckerPortDirection<'a>>,
|
||||||
PropertyFormalType<'a>,
|
PropertyFormalType<'a>,
|
||||||
FormalPortIdentifier<'a>,
|
FormalPortIdentifier<'a>,
|
||||||
Vec<VariableDimension<'a>>,
|
Vec<VariableDimension<'a>>,
|
||||||
@ -23,13 +24,13 @@ pub struct CheckerPortItem<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CheckerPortDirection {
|
pub enum CheckerPortDirection<'a> {
|
||||||
Input,
|
Input(Symbol<'a>),
|
||||||
Output,
|
Output(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CheckerOrGenerateItem<'a> {
|
pub enum CheckerOrGenerateItem<'a> {
|
||||||
CheckerOrGenerateItemDeclaration(CheckerOrGenerateItemDeclaration<'a>),
|
CheckerOrGenerateItemDeclaration(CheckerOrGenerateItemDeclaration<'a>),
|
||||||
InitialConstruct(InitialConstruct<'a>),
|
InitialConstruct(InitialConstruct<'a>),
|
||||||
@ -40,7 +41,7 @@ pub enum CheckerOrGenerateItem<'a> {
|
|||||||
CheckerGenerateItem(CheckerGenerateItem<'a>),
|
CheckerGenerateItem(CheckerGenerateItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CheckerOrGenerateItemDeclaration<'a> {
|
pub enum CheckerOrGenerateItemDeclaration<'a> {
|
||||||
Data(CheckerOrGenerateItemDeclarationData<'a>),
|
Data(CheckerOrGenerateItemDeclarationData<'a>),
|
||||||
FunctionDeclaration(FunctionDeclaration<'a>),
|
FunctionDeclaration(FunctionDeclaration<'a>),
|
||||||
@ -51,28 +52,30 @@ pub enum CheckerOrGenerateItemDeclaration<'a> {
|
|||||||
ClockingDeclaration(ClockingDeclaration<'a>),
|
ClockingDeclaration(ClockingDeclaration<'a>),
|
||||||
Clocking(CheckerOrGenerateItemDeclarationClocking<'a>),
|
Clocking(CheckerOrGenerateItemDeclarationClocking<'a>),
|
||||||
Expression(CheckerOrGenerateItemDeclarationExpression<'a>),
|
Expression(CheckerOrGenerateItemDeclarationExpression<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerOrGenerateItemDeclarationData<'a> {
|
pub struct CheckerOrGenerateItemDeclarationData<'a> {
|
||||||
pub nodes: (Option<Rand>, DataDeclaration<'a>),
|
pub nodes: (Option<Rand<'a>>, DataDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Rand {}
|
pub struct Rand<'a> {
|
||||||
|
pub nodes: (Symbol<'a>),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerOrGenerateItemDeclarationClocking<'a> {
|
pub struct CheckerOrGenerateItemDeclarationClocking<'a> {
|
||||||
pub nodes: (ClockingIdentifier<'a>,),
|
pub nodes: (ClockingIdentifier<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerOrGenerateItemDeclarationExpression<'a> {
|
pub struct CheckerOrGenerateItemDeclarationExpression<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>,),
|
pub nodes: (ExpressionOrDist<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum CheckerGenerateItem<'a> {
|
pub enum CheckerGenerateItem<'a> {
|
||||||
LoopGenerateConstruct(Box<LoopGenerateConstruct<'a>>),
|
LoopGenerateConstruct(Box<LoopGenerateConstruct<'a>>),
|
||||||
ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct<'a>>),
|
ConditionalGenerateConstruct(Box<ConditionalGenerateConstruct<'a>>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassItem<'a> {
|
pub enum ClassItem<'a> {
|
||||||
Property(ClassItemProperty<'a>),
|
Property(ClassItemProperty<'a>),
|
||||||
Method(ClassItemMethod<'a>),
|
Method(ClassItemMethod<'a>),
|
||||||
@ -15,56 +16,56 @@ pub enum ClassItem<'a> {
|
|||||||
Covergroup(ClassItemCovergroup<'a>),
|
Covergroup(ClassItemCovergroup<'a>),
|
||||||
LocalParameterDeclaration(LocalParameterDeclaration<'a>),
|
LocalParameterDeclaration(LocalParameterDeclaration<'a>),
|
||||||
ParameterDeclaration(ParameterDeclaration<'a>),
|
ParameterDeclaration(ParameterDeclaration<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassItemProperty<'a> {
|
pub struct ClassItemProperty<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ClassProperty<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ClassProperty<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassItemMethod<'a> {
|
pub struct ClassItemMethod<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ClassMethod<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ClassMethod<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassItemConstraint<'a> {
|
pub struct ClassItemConstraint<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ClassConstraint<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ClassConstraint<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassItemDeclaration<'a> {
|
pub struct ClassItemDeclaration<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ClassDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ClassDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassItemCovergroup<'a> {
|
pub struct ClassItemCovergroup<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, CovergroupDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, CovergroupDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassProperty<'a> {
|
pub enum ClassProperty<'a> {
|
||||||
NonConst(ClassPropertyNonConst<'a>),
|
NonConst(ClassPropertyNonConst<'a>),
|
||||||
Const(ClassPropertyConst<'a>),
|
Const(ClassPropertyConst<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassPropertyNonConst<'a> {
|
pub struct ClassPropertyNonConst<'a> {
|
||||||
pub nodes: (Vec<PropertyQualifier>, DataDeclaration<'a>),
|
pub nodes: (Vec<PropertyQualifier<'a>>, DataDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassPropertyConst<'a> {
|
pub struct ClassPropertyConst<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<ClassItemQualifier>,
|
Vec<ClassItemQualifier<'a>>,
|
||||||
DataType<'a>,
|
DataType<'a>,
|
||||||
ConstIdentifier<'a>,
|
ConstIdentifier<'a>,
|
||||||
Option<ConstantExpression<'a>>,
|
Option<ConstantExpression<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassMethod<'a> {
|
pub enum ClassMethod<'a> {
|
||||||
Task(ClassMethodTask<'a>),
|
Task(ClassMethodTask<'a>),
|
||||||
Function(ClassMethodFunction<'a>),
|
Function(ClassMethodFunction<'a>),
|
||||||
@ -74,80 +75,80 @@ pub enum ClassMethod<'a> {
|
|||||||
ExternConstructor(ClassMethodExternConstructor<'a>),
|
ExternConstructor(ClassMethodExternConstructor<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodTask<'a> {
|
pub struct ClassMethodTask<'a> {
|
||||||
pub nodes: (Vec<MethodQualifier>, TaskDeclaration<'a>),
|
pub nodes: (Vec<MethodQualifier<'a>>, TaskDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodFunction<'a> {
|
pub struct ClassMethodFunction<'a> {
|
||||||
pub nodes: (Vec<MethodQualifier>, FunctionDeclaration<'a>),
|
pub nodes: (Vec<MethodQualifier<'a>>, FunctionDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodPureVirtual<'a> {
|
pub struct ClassMethodPureVirtual<'a> {
|
||||||
pub nodes: (Vec<ClassItemQualifier>, MethodPrototype<'a>),
|
pub nodes: (Vec<ClassItemQualifier<'a>>, MethodPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodExternMethod<'a> {
|
pub struct ClassMethodExternMethod<'a> {
|
||||||
pub nodes: (Vec<MethodQualifier>, MethodPrototype<'a>),
|
pub nodes: (Vec<MethodQualifier<'a>>, MethodPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodConstructor<'a> {
|
pub struct ClassMethodConstructor<'a> {
|
||||||
pub nodes: (Vec<MethodQualifier>, ClassConstructorPrototype<'a>),
|
pub nodes: (Vec<MethodQualifier<'a>>, ClassConstructorPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassMethodExternConstructor<'a> {
|
pub struct ClassMethodExternConstructor<'a> {
|
||||||
pub nodes: (Vec<MethodQualifier>, ClassConstructorPrototype<'a>),
|
pub nodes: (Vec<MethodQualifier<'a>>, ClassConstructorPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassConstructorPrototype<'a> {
|
pub struct ClassConstructorPrototype<'a> {
|
||||||
pub nodes: (Option<TfPortList<'a>>,),
|
pub nodes: (Option<TfPortList<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassConstraint<'a> {
|
pub enum ClassConstraint<'a> {
|
||||||
ConstraintPrototype(ConstraintPrototype<'a>),
|
ConstraintPrototype(ConstraintPrototype<'a>),
|
||||||
ConstraintDeclaration(ConstraintDeclaration<'a>),
|
ConstraintDeclaration(ConstraintDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ClassItemQualifier {
|
pub enum ClassItemQualifier<'a> {
|
||||||
Static,
|
Static(Symbol<'a>),
|
||||||
Protected,
|
Protected(Symbol<'a>),
|
||||||
Local,
|
Local(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PropertyQualifier {
|
pub enum PropertyQualifier<'a> {
|
||||||
RandomQualifier(RandomQualifier),
|
RandomQualifier(RandomQualifier<'a>),
|
||||||
ClassItemQualifier(ClassItemQualifier),
|
ClassItemQualifier(ClassItemQualifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum RandomQualifier {
|
pub enum RandomQualifier<'a> {
|
||||||
Rand,
|
Rand(Symbol<'a>),
|
||||||
Randc,
|
Randc(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum MethodQualifier {
|
pub enum MethodQualifier<'a> {
|
||||||
Virtual,
|
Virtual(Symbol<'a>),
|
||||||
PureVirtual,
|
PureVirtual(Symbol<'a>),
|
||||||
ClassItemQualifier(ClassItemQualifier),
|
ClassItemQualifier(ClassItemQualifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum MethodPrototype<'a> {
|
pub enum MethodPrototype<'a> {
|
||||||
TaskPrototype(TaskPrototype<'a>),
|
TaskPrototype(TaskPrototype<'a>),
|
||||||
FunctionPrototype(FunctionPrototype<'a>),
|
FunctionPrototype(FunctionPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassConstructorDeclaration<'a> {
|
pub struct ClassConstructorDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ClassScope<'a>>,
|
Option<ClassScope<'a>>,
|
||||||
@ -155,12 +156,14 @@ pub struct ClassConstructorDeclaration<'a> {
|
|||||||
Vec<BlockItemDeclaration<'a>>,
|
Vec<BlockItemDeclaration<'a>>,
|
||||||
Option<Option<ListOfArguments<'a>>>,
|
Option<Option<ListOfArguments<'a>>>,
|
||||||
Vec<FunctionStatementOrNull<'a>>,
|
Vec<FunctionStatementOrNull<'a>>,
|
||||||
Option<New>,
|
Option<New<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct New {}
|
pub struct New<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigDeclaration<'a> {
|
pub struct ConfigDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ConfigIdentifier<'a>,
|
ConfigIdentifier<'a>,
|
||||||
@ -17,12 +18,12 @@ pub struct ConfigDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DesignStatement<'a> {
|
pub struct DesignStatement<'a> {
|
||||||
pub nodes: (Vec<(Option<LibraryIdentifier<'a>>, CellIdentifier<'a>)>,),
|
pub nodes: (Vec<(Option<LibraryIdentifier<'a>>, CellIdentifier<'a>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConfigRuleStatement<'a> {
|
pub enum ConfigRuleStatement<'a> {
|
||||||
Default(ConfigRuleStatementDefault<'a>),
|
Default(ConfigRuleStatementDefault<'a>),
|
||||||
InstLib(ConfigRuleStatementInstLib<'a>),
|
InstLib(ConfigRuleStatementInstLib<'a>),
|
||||||
@ -31,87 +32,91 @@ pub enum ConfigRuleStatement<'a> {
|
|||||||
CellUse(ConfigRuleStatementCellUse<'a>),
|
CellUse(ConfigRuleStatementCellUse<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigRuleStatementDefault<'a> {
|
pub struct ConfigRuleStatementDefault<'a> {
|
||||||
pub nodes: (DefaultClause, LiblistClause<'a>),
|
pub nodes: (DefaultClause<'a>, LiblistClause<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigRuleStatementInstLib<'a> {
|
pub struct ConfigRuleStatementInstLib<'a> {
|
||||||
pub nodes: (InstClause<'a>, LiblistClause<'a>),
|
pub nodes: (InstClause<'a>, LiblistClause<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigRuleStatementInstUse<'a> {
|
pub struct ConfigRuleStatementInstUse<'a> {
|
||||||
pub nodes: (InstClause<'a>, UseClause<'a>),
|
pub nodes: (InstClause<'a>, UseClause<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigRuleStatementCellLib<'a> {
|
pub struct ConfigRuleStatementCellLib<'a> {
|
||||||
pub nodes: (CellClause<'a>, LiblistClause<'a>),
|
pub nodes: (CellClause<'a>, LiblistClause<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConfigRuleStatementCellUse<'a> {
|
pub struct ConfigRuleStatementCellUse<'a> {
|
||||||
pub nodes: (CellClause<'a>, UseClause<'a>),
|
pub nodes: (CellClause<'a>, UseClause<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DefaultClause {}
|
pub struct DefaultClause<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InstClause<'a> {
|
pub struct InstClause<'a> {
|
||||||
pub nodes: (InstName<'a>,),
|
pub nodes: (InstName<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InstName<'a> {
|
pub struct InstName<'a> {
|
||||||
pub nodes: (TopmoduleIdentifier<'a>, Vec<InstanceIdentifier<'a>>),
|
pub nodes: (TopmoduleIdentifier<'a>, Vec<InstanceIdentifier<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CellClause<'a> {
|
pub struct CellClause<'a> {
|
||||||
pub nodes: (Option<LibraryIdentifier<'a>>, CellIdentifier<'a>),
|
pub nodes: (Option<LibraryIdentifier<'a>>, CellIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LiblistClause<'a> {
|
pub struct LiblistClause<'a> {
|
||||||
pub nodes: (Vec<LibraryIdentifier<'a>>,),
|
pub nodes: (Vec<LibraryIdentifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum UseClause<'a> {
|
pub enum UseClause<'a> {
|
||||||
Cell(UseClauseCell<'a>),
|
Cell(UseClauseCell<'a>),
|
||||||
Named(UseClauseNamed<'a>),
|
Named(UseClauseNamed<'a>),
|
||||||
CellNamed(UseClauseCellNamed<'a>),
|
CellNamed(UseClauseCellNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct UseClauseCell<'a> {
|
pub struct UseClauseCell<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<LibraryIdentifier<'a>>,
|
Option<LibraryIdentifier<'a>>,
|
||||||
CellIdentifier<'a>,
|
CellIdentifier<'a>,
|
||||||
Option<Config>,
|
Option<Config<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct UseClauseNamed<'a> {
|
pub struct UseClauseNamed<'a> {
|
||||||
pub nodes: (Vec<NamedParameterAssignment<'a>>, Option<Config>),
|
pub nodes: (Vec<NamedParameterAssignment<'a>>, Option<Config<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct UseClauseCellNamed<'a> {
|
pub struct UseClauseCellNamed<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<LibraryIdentifier<'a>>,
|
Option<LibraryIdentifier<'a>>,
|
||||||
CellIdentifier<'a>,
|
CellIdentifier<'a>,
|
||||||
Vec<NamedParameterAssignment<'a>>,
|
Vec<NamedParameterAssignment<'a>>,
|
||||||
Option<Config>,
|
Option<Config<'a>>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Config {}
|
pub struct Config<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,40 +7,42 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintDeclaration<'a> {
|
pub struct ConstraintDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Static>,
|
Option<Static<'a>>,
|
||||||
ConstraintIdentifier<'a>,
|
ConstraintIdentifier<'a>,
|
||||||
ConstraintBlock<'a>,
|
ConstraintBlock<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Static {}
|
pub struct Static<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintBlock<'a> {
|
pub struct ConstraintBlock<'a> {
|
||||||
pub nodes: (Vec<ConstraintBlockItem<'a>>,),
|
pub nodes: (Vec<ConstraintBlockItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstraintBlockItem<'a> {
|
pub enum ConstraintBlockItem<'a> {
|
||||||
Solve(ConstraintBlockItemSolve<'a>),
|
Solve(ConstraintBlockItemSolve<'a>),
|
||||||
ConstraintExpression(ConstraintExpression<'a>),
|
ConstraintExpression(ConstraintExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintBlockItemSolve<'a> {
|
pub struct ConstraintBlockItemSolve<'a> {
|
||||||
pub nodes: (SolveBeforeList<'a>, SolveBeforeList<'a>),
|
pub nodes: (SolveBeforeList<'a>, SolveBeforeList<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SolveBeforeList<'a> {
|
pub struct SolveBeforeList<'a> {
|
||||||
pub nodes: (Vec<ConstraintPrimary<'a>>,),
|
pub nodes: (Vec<ConstraintPrimary<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintPrimary<'a> {
|
pub struct ConstraintPrimary<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ImplicitClassHandleOrClassScope<'a>>,
|
Option<ImplicitClassHandleOrClassScope<'a>>,
|
||||||
@ -48,7 +51,7 @@ pub struct ConstraintPrimary<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstraintExpression<'a> {
|
pub enum ConstraintExpression<'a> {
|
||||||
Expression(ConstraintExpressionExpression<'a>),
|
Expression(ConstraintExpressionExpression<'a>),
|
||||||
UniquenessConstraint(UniquenessConstraint<'a>),
|
UniquenessConstraint(UniquenessConstraint<'a>),
|
||||||
@ -58,25 +61,27 @@ pub enum ConstraintExpression<'a> {
|
|||||||
Disable(ConstraintExpressionDisable<'a>),
|
Disable(ConstraintExpressionDisable<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintExpressionExpression<'a> {
|
pub struct ConstraintExpressionExpression<'a> {
|
||||||
pub nodes: (Option<Soft>, ExpressionOrDist<'a>),
|
pub nodes: (Option<Soft<'a>>, ExpressionOrDist<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Soft {}
|
pub struct Soft<'a> {
|
||||||
|
pub nodes: (Symbol<'a>,),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintExpressionArrow<'a> {
|
pub struct ConstraintExpressionArrow<'a> {
|
||||||
pub nodes: (Expression<'a>, ConstraintSet<'a>),
|
pub nodes: (Expression<'a>, ConstraintSet<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintExpressionIf<'a> {
|
pub struct ConstraintExpressionIf<'a> {
|
||||||
pub nodes: (Expression<'a>, ConstraintSet<'a>, Option<ConstraintSet<'a>>),
|
pub nodes: (Expression<'a>, ConstraintSet<'a>, Option<ConstraintSet<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintExpressionForeach<'a> {
|
pub struct ConstraintExpressionForeach<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
PsOrHierarchicalArrayIdentifier<'a>,
|
PsOrHierarchicalArrayIdentifier<'a>,
|
||||||
@ -85,79 +90,79 @@ pub struct ConstraintExpressionForeach<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintExpressionDisable<'a> {
|
pub struct ConstraintExpressionDisable<'a> {
|
||||||
pub nodes: (ConstraintPrimary<'a>,),
|
pub nodes: (ConstraintPrimary<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct UniquenessConstraint<'a> {
|
pub struct UniquenessConstraint<'a> {
|
||||||
pub nodes: (OpenRangeList<'a>,),
|
pub nodes: (OpenRangeList<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstraintSet<'a> {
|
pub enum ConstraintSet<'a> {
|
||||||
ConstraintExpression(Box<ConstraintExpression<'a>>),
|
ConstraintExpression(Box<ConstraintExpression<'a>>),
|
||||||
Bracket(ConstraintSetBracket<'a>),
|
Bracket(ConstraintSetBracket<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintSetBracket<'a> {
|
pub struct ConstraintSetBracket<'a> {
|
||||||
pub nodes: (Vec<ConstraintExpression<'a>>,),
|
pub nodes: (Vec<ConstraintExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DistList<'a> {
|
pub struct DistList<'a> {
|
||||||
pub nodes: (Vec<DistItem<'a>>,),
|
pub nodes: (Vec<DistItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DistItem<'a> {
|
pub struct DistItem<'a> {
|
||||||
pub nodes: (ValueRange<'a>, Option<DistWeight<'a>>),
|
pub nodes: (ValueRange<'a>, Option<DistWeight<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum DistWeight<'a> {
|
pub enum DistWeight<'a> {
|
||||||
Equal(DistWeightEqual<'a>),
|
Equal(DistWeightEqual<'a>),
|
||||||
Divide(DistWeightDivide<'a>),
|
Divide(DistWeightDivide<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DistWeightEqual<'a> {
|
pub struct DistWeightEqual<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DistWeightDivide<'a> {
|
pub struct DistWeightDivide<'a> {
|
||||||
pub nodes: (Expression<'a>,),
|
pub nodes: (Expression<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ConstraintPrototype<'a> {
|
pub struct ConstraintPrototype<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<ConstraintPrototypeQualifier>,
|
Option<ConstraintPrototypeQualifier<'a>>,
|
||||||
Option<Static>,
|
Option<Static<'a>>,
|
||||||
ConstraintIdentifier<'a>,
|
ConstraintIdentifier<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ConstraintPrototypeQualifier {
|
pub enum ConstraintPrototypeQualifier<'a> {
|
||||||
Extern,
|
Extern(Symbol<'a>),
|
||||||
Pure,
|
Pure(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExternConstraintDeclaration<'a> {
|
pub struct ExternConstraintDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Static>,
|
Option<Static<'a>>,
|
||||||
ClassScope<'a>,
|
ClassScope<'a>,
|
||||||
ConstraintIdentifier<'a>,
|
ConstraintIdentifier<'a>,
|
||||||
ConstraintBlock<'a>,
|
ConstraintBlock<'a>,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IdentifierList<'a> {
|
pub struct IdentifierList<'a> {
|
||||||
pub nodes: (Vec<Identifier<'a>>,),
|
pub nodes: (Vec<Identifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,45 +7,45 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfaceOrGenerateItem<'a> {
|
pub enum InterfaceOrGenerateItem<'a> {
|
||||||
Module(InterfaceOrGenerateItemModule<'a>),
|
Module(InterfaceOrGenerateItemModule<'a>),
|
||||||
Extern(InterfaceOrGenerateItemExtern<'a>),
|
Extern(InterfaceOrGenerateItemExtern<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceOrGenerateItemModule<'a> {
|
pub struct InterfaceOrGenerateItemModule<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ModuleCommonItem<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ModuleCommonItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceOrGenerateItemExtern<'a> {
|
pub struct InterfaceOrGenerateItemExtern<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ExternTfDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ExternTfDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ExternTfDeclaration<'a> {
|
pub enum ExternTfDeclaration<'a> {
|
||||||
Method(ExternTfDeclarationMethod<'a>),
|
Method(ExternTfDeclarationMethod<'a>),
|
||||||
Task(ExternTfDeclarationTask<'a>),
|
Task(ExternTfDeclarationTask<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExternTfDeclarationMethod<'a> {
|
pub struct ExternTfDeclarationMethod<'a> {
|
||||||
pub nodes: (MethodPrototype<'a>),
|
pub nodes: (MethodPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ExternTfDeclarationTask<'a> {
|
pub struct ExternTfDeclarationTask<'a> {
|
||||||
pub nodes: (TaskPrototype<'a>),
|
pub nodes: (TaskPrototype<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfaceItem<'a> {
|
pub enum InterfaceItem<'a> {
|
||||||
PortDeclaration(PortDeclaration<'a>),
|
PortDeclaration(PortDeclaration<'a>),
|
||||||
NonPortInterfaceItem(NonPortInterfaceItem<'a>),
|
NonPortInterfaceItem(NonPortInterfaceItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NonPortInterfaceItem<'a> {
|
pub enum NonPortInterfaceItem<'a> {
|
||||||
GenerateRegion(GenerateRegion<'a>),
|
GenerateRegion(GenerateRegion<'a>),
|
||||||
InterfaceOrGenerateItem(InterfaceOrGenerateItem<'a>),
|
InterfaceOrGenerateItem(InterfaceOrGenerateItem<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,12 +8,12 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LibraryText<'a> {
|
pub struct LibraryText<'a> {
|
||||||
pub nodes: (Vec<LibraryDescription<'a>>,),
|
pub nodes: (Vec<LibraryDescription<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum LibraryDescription<'a> {
|
pub enum LibraryDescription<'a> {
|
||||||
LibraryDeclaration(LibraryDeclaration<'a>),
|
LibraryDeclaration(LibraryDeclaration<'a>),
|
||||||
IncludeStatement(IncludeStatement<'a>),
|
IncludeStatement(IncludeStatement<'a>),
|
||||||
@ -20,7 +21,7 @@ pub enum LibraryDescription<'a> {
|
|||||||
Null(Symbol<'a>),
|
Null(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct LibraryDeclaration<'a> {
|
pub struct LibraryDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -31,12 +32,12 @@ pub struct LibraryDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct IncludeStatement<'a> {
|
pub struct IncludeStatement<'a> {
|
||||||
pub nodes: (Symbol<'a>, FilePathSpec<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, FilePathSpec<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct FilePathSpec<'a> {
|
pub struct FilePathSpec<'a> {
|
||||||
pub nodes: (StringLiteral<'a>,),
|
pub nodes: (StringLiteral<'a>,),
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ElaborationSystemTask<'a> {
|
pub enum ElaborationSystemTask<'a> {
|
||||||
Fatal(ElaborationSystemTaskFatal<'a>),
|
Fatal(ElaborationSystemTaskFatal<'a>),
|
||||||
Error(ElaborationSystemTaskError<'a>),
|
Error(ElaborationSystemTaskError<'a>),
|
||||||
@ -14,34 +15,34 @@ pub enum ElaborationSystemTask<'a> {
|
|||||||
Info(ElaborationSystemTaskInfo<'a>),
|
Info(ElaborationSystemTaskInfo<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ElaborationSystemTaskFatal<'a> {
|
pub struct ElaborationSystemTaskFatal<'a> {
|
||||||
pub nodes: (Option<(FinishNumber, Option<ListOfArguments<'a>>)>,),
|
pub nodes: (Option<(FinishNumber<'a>, Option<ListOfArguments<'a>>)>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ElaborationSystemTaskError<'a> {
|
pub struct ElaborationSystemTaskError<'a> {
|
||||||
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ElaborationSystemTaskWarning<'a> {
|
pub struct ElaborationSystemTaskWarning<'a> {
|
||||||
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ElaborationSystemTaskInfo<'a> {
|
pub struct ElaborationSystemTaskInfo<'a> {
|
||||||
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
pub nodes: (Option<Option<ListOfArguments<'a>>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum FinishNumber {
|
pub enum FinishNumber<'a> {
|
||||||
Zero,
|
Zero(Symbol<'a>),
|
||||||
One,
|
One(Symbol<'a>),
|
||||||
Two,
|
Two(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleCommonItem<'a> {
|
pub enum ModuleCommonItem<'a> {
|
||||||
ModuleOrGenerateItemDeclaration(ModuleOrGenerateItemDeclaration<'a>),
|
ModuleOrGenerateItemDeclaration(ModuleOrGenerateItemDeclaration<'a>),
|
||||||
InterfaceInstantiation(InterfaceInstantiation<'a>),
|
InterfaceInstantiation(InterfaceInstantiation<'a>),
|
||||||
@ -58,13 +59,13 @@ pub enum ModuleCommonItem<'a> {
|
|||||||
ElaborationSystemTask(ElaborationSystemTask<'a>),
|
ElaborationSystemTask(ElaborationSystemTask<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleItem<'a> {
|
pub enum ModuleItem<'a> {
|
||||||
PortDeclaratoin(PortDeclaration<'a>),
|
PortDeclaratoin(PortDeclaration<'a>),
|
||||||
NonPortModuleItem(NonPortModuleItem<'a>),
|
NonPortModuleItem(NonPortModuleItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleOrGenerateItem<'a> {
|
pub enum ModuleOrGenerateItem<'a> {
|
||||||
Parameter(ModuleOrGenerateItemParameter<'a>),
|
Parameter(ModuleOrGenerateItemParameter<'a>),
|
||||||
Gate(ModuleOrGenerateItemGate<'a>),
|
Gate(ModuleOrGenerateItemGate<'a>),
|
||||||
@ -73,32 +74,32 @@ pub enum ModuleOrGenerateItem<'a> {
|
|||||||
ModuleItem(Box<ModuleOrGenerateItemModuleItem<'a>>),
|
ModuleItem(Box<ModuleOrGenerateItemModuleItem<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemParameter<'a> {
|
pub struct ModuleOrGenerateItemParameter<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ParameterOverride<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ParameterOverride<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemGate<'a> {
|
pub struct ModuleOrGenerateItemGate<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, GateInstantiation<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, GateInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemUdp<'a> {
|
pub struct ModuleOrGenerateItemUdp<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, UdpInstantiation<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, UdpInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemModule<'a> {
|
pub struct ModuleOrGenerateItemModule<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ModuleInstantiation<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ModuleInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemModuleItem<'a> {
|
pub struct ModuleOrGenerateItemModuleItem<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ModuleCommonItem<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ModuleCommonItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleOrGenerateItemDeclaration<'a> {
|
pub enum ModuleOrGenerateItemDeclaration<'a> {
|
||||||
PackageOrGenerateItemDeclaration(PackageOrGenerateItemDeclaration<'a>),
|
PackageOrGenerateItemDeclaration(PackageOrGenerateItemDeclaration<'a>),
|
||||||
GenvarDeclaration(GenvarDeclaration<'a>),
|
GenvarDeclaration(GenvarDeclaration<'a>),
|
||||||
@ -107,17 +108,17 @@ pub enum ModuleOrGenerateItemDeclaration<'a> {
|
|||||||
Expression(ModuleOrGenerateItemDeclarationExpression<'a>),
|
Expression(ModuleOrGenerateItemDeclarationExpression<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemDeclarationClocking<'a> {
|
pub struct ModuleOrGenerateItemDeclarationClocking<'a> {
|
||||||
pub nodes: (ClockingIdentifier<'a>),
|
pub nodes: (ClockingIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleOrGenerateItemDeclarationExpression<'a> {
|
pub struct ModuleOrGenerateItemDeclarationExpression<'a> {
|
||||||
pub nodes: (ExpressionOrDist<'a>),
|
pub nodes: (ExpressionOrDist<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NonPortModuleItem<'a> {
|
pub enum NonPortModuleItem<'a> {
|
||||||
GenerateRegion(GenerateRegion<'a>),
|
GenerateRegion(GenerateRegion<'a>),
|
||||||
ModuleOrGenerateItem(ModuleOrGenerateItem<'a>),
|
ModuleOrGenerateItem(ModuleOrGenerateItem<'a>),
|
||||||
@ -129,23 +130,23 @@ pub enum NonPortModuleItem<'a> {
|
|||||||
TimeunitsDeclaration(TimeunitsDeclaration<'a>),
|
TimeunitsDeclaration(TimeunitsDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortModuleItemSpecparam<'a> {
|
pub struct NonPortModuleItemSpecparam<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, SpecparamDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, SpecparamDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterOverride<'a> {
|
pub struct ParameterOverride<'a> {
|
||||||
pub nodes: (ListOfDefparamAssignments<'a>,),
|
pub nodes: (ListOfDefparamAssignments<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BindDirective<'a> {
|
pub enum BindDirective<'a> {
|
||||||
Scope(BindDirectiveScope<'a>),
|
Scope(BindDirectiveScope<'a>),
|
||||||
Instance(BindDirectiveInstance<'a>),
|
Instance(BindDirectiveInstance<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BindDirectiveScope<'a> {
|
pub struct BindDirectiveScope<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
BindTargetScope<'a>,
|
BindTargetScope<'a>,
|
||||||
@ -154,28 +155,28 @@ pub struct BindDirectiveScope<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BindDirectiveInstance<'a> {
|
pub struct BindDirectiveInstance<'a> {
|
||||||
pub nodes: (BindTargetInstanceList<'a>, BindInstantiation<'a>),
|
pub nodes: (BindTargetInstanceList<'a>, BindInstantiation<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BindTargetScope<'a> {
|
pub enum BindTargetScope<'a> {
|
||||||
ModuleIdentifier(ModuleIdentifier<'a>),
|
ModuleIdentifier(ModuleIdentifier<'a>),
|
||||||
InterfaceIdentifier(InterfaceIdentifier<'a>),
|
InterfaceIdentifier(InterfaceIdentifier<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BindTargetInstance<'a> {
|
pub struct BindTargetInstance<'a> {
|
||||||
pub nodes: (HierarchicalIdentifier<'a>, ConstantBitSelect<'a>),
|
pub nodes: (HierarchicalIdentifier<'a>, ConstantBitSelect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct BindTargetInstanceList<'a> {
|
pub struct BindTargetInstanceList<'a> {
|
||||||
pub nodes: (Vec<BindTargetInstance<'a>>,),
|
pub nodes: (Vec<BindTargetInstance<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum BindInstantiation<'a> {
|
pub enum BindInstantiation<'a> {
|
||||||
ProgramInstantiation(ProgramInstantiation<'a>),
|
ProgramInstantiation(ProgramInstantiation<'a>),
|
||||||
ModuleInstantiation(ModuleInstantiation<'a>),
|
ModuleInstantiation(ModuleInstantiation<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,14 +7,14 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ParameterPortList<'a> {
|
pub enum ParameterPortList<'a> {
|
||||||
Assignment(ParameterPortListAssignment<'a>),
|
Assignment(ParameterPortListAssignment<'a>),
|
||||||
Declaration(ParameterPortListDeclaration<'a>),
|
Declaration(ParameterPortListDeclaration<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterPortListAssignment<'a> {
|
pub struct ParameterPortListAssignment<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ListOfParamAssignments<'a>,
|
ListOfParamAssignments<'a>,
|
||||||
@ -21,12 +22,12 @@ pub struct ParameterPortListAssignment<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterPortListDeclaration<'a> {
|
pub struct ParameterPortListDeclaration<'a> {
|
||||||
pub nodes: (Vec<ParameterPortDeclaration<'a>>,),
|
pub nodes: (Vec<ParameterPortDeclaration<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ParameterPortDeclaration<'a> {
|
pub enum ParameterPortDeclaration<'a> {
|
||||||
ParameterDeclaration(ParameterDeclaration<'a>),
|
ParameterDeclaration(ParameterDeclaration<'a>),
|
||||||
LocalParameterDeclaration(LocalParameterDeclaration<'a>),
|
LocalParameterDeclaration(LocalParameterDeclaration<'a>),
|
||||||
@ -34,27 +35,27 @@ pub enum ParameterPortDeclaration<'a> {
|
|||||||
TypeList(ParameterPortDeclarationTypeList<'a>),
|
TypeList(ParameterPortDeclarationTypeList<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterPortDeclarationParamList<'a> {
|
pub struct ParameterPortDeclarationParamList<'a> {
|
||||||
pub nodes: (DataType<'a>, ListOfParamAssignments<'a>),
|
pub nodes: (DataType<'a>, ListOfParamAssignments<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ParameterPortDeclarationTypeList<'a> {
|
pub struct ParameterPortDeclarationTypeList<'a> {
|
||||||
pub nodes: (ListOfTypeAssignments<'a>,),
|
pub nodes: (ListOfTypeAssignments<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfPorts<'a> {
|
pub struct ListOfPorts<'a> {
|
||||||
pub nodes: (Vec<Port<'a>>,),
|
pub nodes: (Vec<Port<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ListOfPortDeclarations<'a> {
|
pub struct ListOfPortDeclarations<'a> {
|
||||||
pub nodes: (Option<Vec<(Vec<AttributeInstance<'a>>, AnsiPortDeclaration<'a>)>>,),
|
pub nodes: (Option<Vec<(Vec<AttributeInstance<'a>>, AnsiPortDeclaration<'a>)>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PortDeclaration<'a> {
|
pub enum PortDeclaration<'a> {
|
||||||
Inout(PortDeclarationInout<'a>),
|
Inout(PortDeclarationInout<'a>),
|
||||||
Input(PortDeclarationInput<'a>),
|
Input(PortDeclarationInput<'a>),
|
||||||
@ -63,110 +64,110 @@ pub enum PortDeclaration<'a> {
|
|||||||
Interface(PortDeclarationInterface<'a>),
|
Interface(PortDeclarationInterface<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortDeclarationInout<'a> {
|
pub struct PortDeclarationInout<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, InoutDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, InoutDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortDeclarationInput<'a> {
|
pub struct PortDeclarationInput<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, InputDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, InputDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortDeclarationOutput<'a> {
|
pub struct PortDeclarationOutput<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, OutputDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, OutputDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortDeclarationRef<'a> {
|
pub struct PortDeclarationRef<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, RefDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, RefDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortDeclarationInterface<'a> {
|
pub struct PortDeclarationInterface<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, InterfacePortDeclaration<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, InterfacePortDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Port<'a> {
|
pub enum Port<'a> {
|
||||||
NonNamed(PortNonNamed<'a>),
|
NonNamed(PortNonNamed<'a>),
|
||||||
Named(PortNamed<'a>),
|
Named(PortNamed<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortNonNamed<'a> {
|
pub struct PortNonNamed<'a> {
|
||||||
pub nodes: (Option<PortExpression<'a>>,),
|
pub nodes: (Option<PortExpression<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortNamed<'a> {
|
pub struct PortNamed<'a> {
|
||||||
pub nodes: (PortIdentifier<'a>, Option<PortExpression<'a>>),
|
pub nodes: (PortIdentifier<'a>, Option<PortExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PortExpression<'a> {
|
pub enum PortExpression<'a> {
|
||||||
PortReference(PortReference<'a>),
|
PortReference(PortReference<'a>),
|
||||||
Bracket(PortExpressionBracket<'a>),
|
Bracket(PortExpressionBracket<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortExpressionBracket<'a> {
|
pub struct PortExpressionBracket<'a> {
|
||||||
pub nodes: (Vec<PortReference<'a>>,),
|
pub nodes: (Vec<PortReference<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PortReference<'a> {
|
pub struct PortReference<'a> {
|
||||||
pub nodes: (PortIdentifier<'a>, ConstantSelect<'a>),
|
pub nodes: (PortIdentifier<'a>, ConstantSelect<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PortDirection {
|
pub enum PortDirection<'a> {
|
||||||
Input,
|
Input(Symbol<'a>),
|
||||||
Output,
|
Output(Symbol<'a>),
|
||||||
Inout,
|
Inout(Symbol<'a>),
|
||||||
Ref,
|
Ref(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NetPortHeader<'a> {
|
pub struct NetPortHeader<'a> {
|
||||||
pub nodes: (Option<PortDirection>, NetPortType<'a>),
|
pub nodes: (Option<PortDirection<'a>>, NetPortType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct VariablePortHeader<'a> {
|
pub struct VariablePortHeader<'a> {
|
||||||
pub nodes: (Option<PortDirection>, VariablePortType<'a>),
|
pub nodes: (Option<PortDirection<'a>>, VariablePortType<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfacePortHeader<'a> {
|
pub enum InterfacePortHeader<'a> {
|
||||||
Identifier(InterfacePortHeaderIdentifier<'a>),
|
Identifier(InterfacePortHeaderIdentifier<'a>),
|
||||||
Interface(InterfacePortHeaderInterface<'a>),
|
Interface(InterfacePortHeaderInterface<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfacePortHeaderIdentifier<'a> {
|
pub struct InterfacePortHeaderIdentifier<'a> {
|
||||||
pub nodes: (InterfaceIdentifier<'a>, Option<ModportIdentifier<'a>>),
|
pub nodes: (InterfaceIdentifier<'a>, Option<ModportIdentifier<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfacePortHeaderInterface<'a> {
|
pub struct InterfacePortHeaderInterface<'a> {
|
||||||
pub nodes: (Option<ModportIdentifier<'a>>,),
|
pub nodes: (Option<ModportIdentifier<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NetPortHeaderOrInterfacePortHeader<'a> {
|
pub enum NetPortHeaderOrInterfacePortHeader<'a> {
|
||||||
NetPortHeader(NetPortHeader<'a>),
|
NetPortHeader(NetPortHeader<'a>),
|
||||||
InterfacePortHeader(InterfacePortHeader<'a>),
|
InterfacePortHeader(InterfacePortHeader<'a>),
|
||||||
}
|
}
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AnsiPortDeclaration<'a> {
|
pub enum AnsiPortDeclaration<'a> {
|
||||||
Net(AnsiPortDeclarationNet<'a>),
|
Net(AnsiPortDeclarationNet<'a>),
|
||||||
Variable(AnsiPortDeclarationVariable<'a>),
|
Variable(AnsiPortDeclarationVariable<'a>),
|
||||||
Paren(AnsiPortDeclarationParen<'a>),
|
Paren(AnsiPortDeclarationParen<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AnsiPortDeclarationNet<'a> {
|
pub struct AnsiPortDeclarationNet<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<NetPortHeaderOrInterfacePortHeader<'a>>,
|
Option<NetPortHeaderOrInterfacePortHeader<'a>>,
|
||||||
@ -176,7 +177,7 @@ pub struct AnsiPortDeclarationNet<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AnsiPortDeclarationVariable<'a> {
|
pub struct AnsiPortDeclarationVariable<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<VariablePortHeader<'a>>,
|
Option<VariablePortHeader<'a>>,
|
||||||
@ -186,10 +187,10 @@ pub struct AnsiPortDeclarationVariable<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AnsiPortDeclarationParen<'a> {
|
pub struct AnsiPortDeclarationParen<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<PortDirection>,
|
Option<PortDirection<'a>>,
|
||||||
PortIdentifier<'a>,
|
PortIdentifier<'a>,
|
||||||
Option<Expression<'a>>,
|
Option<Expression<'a>>,
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,7 +7,7 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PackageItem<'a> {
|
pub enum PackageItem<'a> {
|
||||||
PackageOrGenerateItemDeclaration(PackageOrGenerateItemDeclaration<'a>),
|
PackageOrGenerateItemDeclaration(PackageOrGenerateItemDeclaration<'a>),
|
||||||
AnonymousProgram(AnonymousProgram<'a>),
|
AnonymousProgram(AnonymousProgram<'a>),
|
||||||
@ -14,7 +15,7 @@ pub enum PackageItem<'a> {
|
|||||||
TimeunitsDeclaration(TimeunitsDeclaration<'a>),
|
TimeunitsDeclaration(TimeunitsDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum PackageOrGenerateItemDeclaration<'a> {
|
pub enum PackageOrGenerateItemDeclaration<'a> {
|
||||||
NetDeclaration(NetDeclaration<'a>),
|
NetDeclaration(NetDeclaration<'a>),
|
||||||
DataDeclaration(DataDeclaration<'a>),
|
DataDeclaration(DataDeclaration<'a>),
|
||||||
@ -29,22 +30,22 @@ pub enum PackageOrGenerateItemDeclaration<'a> {
|
|||||||
ParameterDeclaration(ParameterDeclaration<'a>),
|
ParameterDeclaration(ParameterDeclaration<'a>),
|
||||||
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
||||||
AssertionItemDeclaration(AssertionItemDeclaration<'a>),
|
AssertionItemDeclaration(AssertionItemDeclaration<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct AnonymousProgram<'a> {
|
pub struct AnonymousProgram<'a> {
|
||||||
pub nodes: (Vec<AnonymousProgramItem<'a>>,),
|
pub nodes: (Vec<AnonymousProgramItem<'a>>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum AnonymousProgramItem<'a> {
|
pub enum AnonymousProgramItem<'a> {
|
||||||
TaskDeclaration(TaskDeclaration<'a>),
|
TaskDeclaration(TaskDeclaration<'a>),
|
||||||
FunctionDeclaration(FunctionDeclaration<'a>),
|
FunctionDeclaration(FunctionDeclaration<'a>),
|
||||||
ClassDeclaration(ClassDeclaration<'a>),
|
ClassDeclaration(ClassDeclaration<'a>),
|
||||||
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
CovergroupDeclaration(CovergroupDeclaration<'a>),
|
||||||
ClassConstructorDeclaration(ClassConstructorDeclaration<'a>),
|
ClassConstructorDeclaration(ClassConstructorDeclaration<'a>),
|
||||||
Empty,
|
Empty(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
//use nom::branch::*;
|
//use nom::branch::*;
|
||||||
//use nom::combinator::*;
|
//use nom::combinator::*;
|
||||||
@ -6,13 +7,13 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProgramItem<'a> {
|
pub enum ProgramItem<'a> {
|
||||||
PortDeclaration(PortDeclaration<'a>),
|
PortDeclaration(PortDeclaration<'a>),
|
||||||
NonPortProgramItem(NonPortProgramItem<'a>),
|
NonPortProgramItem(NonPortProgramItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum NonPortProgramItem<'a> {
|
pub enum NonPortProgramItem<'a> {
|
||||||
Assign(NonPortProgramItemAssign<'a>),
|
Assign(NonPortProgramItemAssign<'a>),
|
||||||
Module(NonPortProgramItemModule<'a>),
|
Module(NonPortProgramItemModule<'a>),
|
||||||
@ -23,12 +24,12 @@ pub enum NonPortProgramItem<'a> {
|
|||||||
ProgramGenerateItem(ProgramGenerateItem<'a>),
|
ProgramGenerateItem(ProgramGenerateItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortProgramItemAssign<'a> {
|
pub struct NonPortProgramItemAssign<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ContinuousAssign<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ContinuousAssign<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortProgramItemModule<'a> {
|
pub struct NonPortProgramItemModule<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -36,22 +37,22 @@ pub struct NonPortProgramItemModule<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortProgramItemInitial<'a> {
|
pub struct NonPortProgramItemInitial<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, InitialConstruct<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, InitialConstruct<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortProgramItemFinal<'a> {
|
pub struct NonPortProgramItemFinal<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, FinalConstruct<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, FinalConstruct<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct NonPortProgramItemAssertion<'a> {
|
pub struct NonPortProgramItemAssertion<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, ConcurrentAssertionItem<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, ConcurrentAssertionItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProgramGenerateItem<'a> {
|
pub enum ProgramGenerateItem<'a> {
|
||||||
LoopGenerateConstuct(LoopGenerateConstruct<'a>),
|
LoopGenerateConstuct(LoopGenerateConstruct<'a>),
|
||||||
ConditionalGenerateConstruct(ConditionalGenerateConstruct<'a>),
|
ConditionalGenerateConstruct(ConditionalGenerateConstruct<'a>),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use crate::ast::*;
|
||||||
use crate::parser::*;
|
use crate::parser::*;
|
||||||
use nom::branch::*;
|
use nom::branch::*;
|
||||||
use nom::combinator::*;
|
use nom::combinator::*;
|
||||||
@ -7,12 +8,12 @@ use nom::IResult;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SourceText<'a> {
|
pub struct SourceText<'a> {
|
||||||
pub nodes: (Option<TimeunitsDeclaration<'a>>, Vec<Description<'a>>),
|
pub nodes: (Option<TimeunitsDeclaration<'a>>, Vec<Description<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum Description<'a> {
|
pub enum Description<'a> {
|
||||||
ModuleDeclaration(ModuleDeclaration<'a>),
|
ModuleDeclaration(ModuleDeclaration<'a>),
|
||||||
UdpDeclaration(UdpDeclaration<'a>),
|
UdpDeclaration(UdpDeclaration<'a>),
|
||||||
@ -24,17 +25,17 @@ pub enum Description<'a> {
|
|||||||
ConfigDeclaration(ConfigDeclaration<'a>),
|
ConfigDeclaration(ConfigDeclaration<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DescriptionPackageItem<'a> {
|
pub struct DescriptionPackageItem<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, PackageItem<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, PackageItem<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct DescriptionBindDirective<'a> {
|
pub struct DescriptionBindDirective<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, BindDirective<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, BindDirective<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleNonansiHeader<'a> {
|
pub struct ModuleNonansiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -48,7 +49,7 @@ pub struct ModuleNonansiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleAnsiHeader<'a> {
|
pub struct ModuleAnsiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -62,7 +63,7 @@ pub struct ModuleAnsiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleDeclaration<'a> {
|
pub enum ModuleDeclaration<'a> {
|
||||||
Nonansi(ModuleDeclarationNonansi<'a>),
|
Nonansi(ModuleDeclarationNonansi<'a>),
|
||||||
Ansi(ModuleDeclarationAnsi<'a>),
|
Ansi(ModuleDeclarationAnsi<'a>),
|
||||||
@ -71,7 +72,7 @@ pub enum ModuleDeclaration<'a> {
|
|||||||
ExternAnsi(ModuleDeclarationExternAnsi<'a>),
|
ExternAnsi(ModuleDeclarationExternAnsi<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleDeclarationNonansi<'a> {
|
pub struct ModuleDeclarationNonansi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModuleNonansiHeader<'a>,
|
ModuleNonansiHeader<'a>,
|
||||||
@ -82,7 +83,7 @@ pub struct ModuleDeclarationNonansi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleDeclarationAnsi<'a> {
|
pub struct ModuleDeclarationAnsi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ModuleAnsiHeader<'a>,
|
ModuleAnsiHeader<'a>,
|
||||||
@ -93,7 +94,7 @@ pub struct ModuleDeclarationAnsi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleDeclarationWildcard<'a> {
|
pub struct ModuleDeclarationWildcard<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -109,23 +110,23 @@ pub struct ModuleDeclarationWildcard<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleDeclarationExternNonansi<'a> {
|
pub struct ModuleDeclarationExternNonansi<'a> {
|
||||||
pub nodes: (Symbol<'a>, ModuleNonansiHeader<'a>),
|
pub nodes: (Symbol<'a>, ModuleNonansiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ModuleDeclarationExternAnsi<'a> {
|
pub struct ModuleDeclarationExternAnsi<'a> {
|
||||||
pub nodes: (Symbol<'a>, ModuleAnsiHeader<'a>),
|
pub nodes: (Symbol<'a>, ModuleAnsiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ModuleKeyword<'a> {
|
pub enum ModuleKeyword<'a> {
|
||||||
Module(Symbol<'a>),
|
Module(Symbol<'a>),
|
||||||
Macromodule(Symbol<'a>),
|
Macromodule(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfaceDeclaration<'a> {
|
pub enum InterfaceDeclaration<'a> {
|
||||||
Nonansi(InterfaceDeclarationNonansi<'a>),
|
Nonansi(InterfaceDeclarationNonansi<'a>),
|
||||||
Ansi(InterfaceDeclarationAnsi<'a>),
|
Ansi(InterfaceDeclarationAnsi<'a>),
|
||||||
@ -134,7 +135,7 @@ pub enum InterfaceDeclaration<'a> {
|
|||||||
ExternAnsi(InterfaceDeclarationExternAnsi<'a>),
|
ExternAnsi(InterfaceDeclarationExternAnsi<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceDeclarationNonansi<'a> {
|
pub struct InterfaceDeclarationNonansi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
InterfaceNonansiHeader<'a>,
|
InterfaceNonansiHeader<'a>,
|
||||||
@ -145,7 +146,7 @@ pub struct InterfaceDeclarationNonansi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceDeclarationAnsi<'a> {
|
pub struct InterfaceDeclarationAnsi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
InterfaceAnsiHeader<'a>,
|
InterfaceAnsiHeader<'a>,
|
||||||
@ -156,7 +157,7 @@ pub struct InterfaceDeclarationAnsi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceDeclarationWildcard<'a> {
|
pub struct InterfaceDeclarationWildcard<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -172,17 +173,17 @@ pub struct InterfaceDeclarationWildcard<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceDeclarationExternNonansi<'a> {
|
pub struct InterfaceDeclarationExternNonansi<'a> {
|
||||||
pub nodes: (Symbol<'a>, InterfaceNonansiHeader<'a>),
|
pub nodes: (Symbol<'a>, InterfaceNonansiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceDeclarationExternAnsi<'a> {
|
pub struct InterfaceDeclarationExternAnsi<'a> {
|
||||||
pub nodes: (Symbol<'a>, InterfaceAnsiHeader<'a>),
|
pub nodes: (Symbol<'a>, InterfaceAnsiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceNonansiHeader<'a> {
|
pub struct InterfaceNonansiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -196,7 +197,7 @@ pub struct InterfaceNonansiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceAnsiHeader<'a> {
|
pub struct InterfaceAnsiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -210,7 +211,7 @@ pub struct InterfaceAnsiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum ProgramDeclaration<'a> {
|
pub enum ProgramDeclaration<'a> {
|
||||||
Nonansi(ProgramDeclarationNonansi<'a>),
|
Nonansi(ProgramDeclarationNonansi<'a>),
|
||||||
Ansi(ProgramDeclarationAnsi<'a>),
|
Ansi(ProgramDeclarationAnsi<'a>),
|
||||||
@ -219,7 +220,7 @@ pub enum ProgramDeclaration<'a> {
|
|||||||
ExternAnsi(ProgramDeclarationExternAnsi<'a>),
|
ExternAnsi(ProgramDeclarationExternAnsi<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramDeclarationNonansi<'a> {
|
pub struct ProgramDeclarationNonansi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ProgramNonansiHeader<'a>,
|
ProgramNonansiHeader<'a>,
|
||||||
@ -230,7 +231,7 @@ pub struct ProgramDeclarationNonansi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramDeclarationAnsi<'a> {
|
pub struct ProgramDeclarationAnsi<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
ProgramAnsiHeader<'a>,
|
ProgramAnsiHeader<'a>,
|
||||||
@ -241,7 +242,7 @@ pub struct ProgramDeclarationAnsi<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramDeclarationWildcard<'a> {
|
pub struct ProgramDeclarationWildcard<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -256,17 +257,17 @@ pub struct ProgramDeclarationWildcard<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramDeclarationExternNonansi<'a> {
|
pub struct ProgramDeclarationExternNonansi<'a> {
|
||||||
pub nodes: (Symbol<'a>, ProgramNonansiHeader<'a>),
|
pub nodes: (Symbol<'a>, ProgramNonansiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramDeclarationExternAnsi<'a> {
|
pub struct ProgramDeclarationExternAnsi<'a> {
|
||||||
pub nodes: (Symbol<'a>, ProgramAnsiHeader<'a>),
|
pub nodes: (Symbol<'a>, ProgramAnsiHeader<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramNonansiHeader<'a> {
|
pub struct ProgramNonansiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -280,7 +281,7 @@ pub struct ProgramNonansiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ProgramAnsiHeader<'a> {
|
pub struct ProgramAnsiHeader<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -294,7 +295,7 @@ pub struct ProgramAnsiHeader<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct CheckerDeclaration<'a> {
|
pub struct CheckerDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -307,7 +308,7 @@ pub struct CheckerDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct ClassDeclaration<'a> {
|
pub struct ClassDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Option<Virtual<'a>>,
|
Option<Virtual<'a>>,
|
||||||
@ -328,17 +329,17 @@ pub struct ClassDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct Virtual<'a> {
|
pub struct Virtual<'a> {
|
||||||
pub nodes: (Symbol<'a>,),
|
pub nodes: (Symbol<'a>,),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceClassType<'a> {
|
pub struct InterfaceClassType<'a> {
|
||||||
pub nodes: (PsClassIdentifier<'a>, Option<ParameterValueAssignment<'a>>),
|
pub nodes: (PsClassIdentifier<'a>, Option<ParameterValueAssignment<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceClassDeclaration<'a> {
|
pub struct InterfaceClassDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -353,7 +354,7 @@ pub struct InterfaceClassDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum InterfaceClassItem<'a> {
|
pub enum InterfaceClassItem<'a> {
|
||||||
TypeDeclaration(TypeDeclaration<'a>),
|
TypeDeclaration(TypeDeclaration<'a>),
|
||||||
Method(InterfaceClassItemMethod<'a>),
|
Method(InterfaceClassItemMethod<'a>),
|
||||||
@ -362,17 +363,17 @@ pub enum InterfaceClassItem<'a> {
|
|||||||
Null(Symbol<'a>),
|
Null(Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceClassItemMethod<'a> {
|
pub struct InterfaceClassItemMethod<'a> {
|
||||||
pub nodes: (Vec<AttributeInstance<'a>>, InterfaceClassMethod<'a>),
|
pub nodes: (Vec<AttributeInstance<'a>>, InterfaceClassMethod<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct InterfaceClassMethod<'a> {
|
pub struct InterfaceClassMethod<'a> {
|
||||||
pub nodes: (Symbol<'a>, Symbol<'a>, MethodPrototype<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, Symbol<'a>, MethodPrototype<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct PackageDeclaration<'a> {
|
pub struct PackageDeclaration<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Vec<AttributeInstance<'a>>,
|
Vec<AttributeInstance<'a>>,
|
||||||
@ -387,7 +388,7 @@ pub struct PackageDeclaration<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub enum TimeunitsDeclaration<'a> {
|
pub enum TimeunitsDeclaration<'a> {
|
||||||
Timeunit(TimeunitsDeclarationTimeunit<'a>),
|
Timeunit(TimeunitsDeclarationTimeunit<'a>),
|
||||||
Timeprecision(TimeunitsDeclarationTimeprecision<'a>),
|
Timeprecision(TimeunitsDeclarationTimeprecision<'a>),
|
||||||
@ -395,7 +396,7 @@ pub enum TimeunitsDeclaration<'a> {
|
|||||||
TimeprecisionTimeunit(TimeunitsDeclarationTimeprecisionTimeunit<'a>),
|
TimeprecisionTimeunit(TimeunitsDeclarationTimeprecisionTimeunit<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TimeunitsDeclarationTimeunit<'a> {
|
pub struct TimeunitsDeclarationTimeunit<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -405,12 +406,12 @@ pub struct TimeunitsDeclarationTimeunit<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TimeunitsDeclarationTimeprecision<'a> {
|
pub struct TimeunitsDeclarationTimeprecision<'a> {
|
||||||
pub nodes: (Symbol<'a>, TimeLiteral<'a>, Symbol<'a>),
|
pub nodes: (Symbol<'a>, TimeLiteral<'a>, Symbol<'a>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
|
pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
@ -422,7 +423,7 @@ pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct TimeunitsDeclarationTimeprecisionTimeunit<'a> {
|
pub struct TimeunitsDeclarationTimeprecisionTimeunit<'a> {
|
||||||
pub nodes: (
|
pub nodes: (
|
||||||
Symbol<'a>,
|
Symbol<'a>,
|
||||||
|
@ -7,12 +7,12 @@ use nom::{Err, IResult};
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SpecifyInputTerminalDescriptor<'a> {
|
pub struct SpecifyInputTerminalDescriptor<'a> {
|
||||||
pub nodes: (InputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
pub nodes: (InputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Node)]
|
||||||
pub struct SpecifyOutputTerminalDescriptor<'a> {
|
pub struct SpecifyOutputTerminalDescriptor<'a> {
|
||||||
pub nodes: (OutputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
pub nodes: (OutputIdentifier<'a>, Option<ConstantRangeExpression<'a>>),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user