Extract Keyword from Symbol
This commit is contained in:
parent
d25b5ad733
commit
c896f64f48
@ -43,17 +43,17 @@ pub enum SimpleImmediateAssertionStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SimpleImmediateAssertStatement<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SimpleImmediateAssumeStatement<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, ActionBlock<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SimpleImmediateCoverStatement<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -66,7 +66,7 @@ pub enum DeferredImmediateAssertionStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DeferredImmediateAssertStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
AssertTiming<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
ActionBlock<'a>,
|
||||
@ -76,7 +76,7 @@ pub struct DeferredImmediateAssertStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DeferredImmediateAssumeStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
AssertTiming<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
ActionBlock<'a>,
|
||||
@ -86,7 +86,7 @@ pub struct DeferredImmediateAssumeStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DeferredImmediateCoverStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
AssertTiming<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
StatementOrNull<'a>,
|
||||
@ -96,7 +96,7 @@ pub struct DeferredImmediateCoverStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum AssertTiming<'a> {
|
||||
Zero(Symbol<'a>),
|
||||
Final(Symbol<'a>),
|
||||
Final(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -23,7 +23,7 @@ pub struct CaseStatementNormal<'a> {
|
||||
Paren<'a, CaseExpression<'a>>,
|
||||
CaseItem<'a>,
|
||||
Vec<CaseItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -33,10 +33,10 @@ pub struct CaseStatementMatches<'a> {
|
||||
Option<UniquePriority<'a>>,
|
||||
CaseKeyword<'a>,
|
||||
Paren<'a, CaseExpression<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
CasePatternItem<'a>,
|
||||
Vec<CasePatternItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -44,20 +44,20 @@ pub struct CaseStatementMatches<'a> {
|
||||
pub struct CaseStatementInside<'a> {
|
||||
pub nodes: (
|
||||
Option<UniquePriority<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, CaseExpression<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
CaseInsideItem<'a>,
|
||||
Vec<CaseInsideItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum CaseKeyword<'a> {
|
||||
Case(Symbol<'a>),
|
||||
Casez(Symbol<'a>),
|
||||
Casex(Symbol<'a>),
|
||||
Case(Keyword<'a>),
|
||||
Casez(Keyword<'a>),
|
||||
Casex(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -82,7 +82,7 @@ pub struct CaseItemNondefault<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CaseItemDefault<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, Option<Symbol<'a>>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -120,10 +120,10 @@ pub struct CaseItemExpression<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RandcaseStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
RandcaseItem<'a>,
|
||||
Vec<RandcaseItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -18,30 +18,30 @@ pub enum ClockingDeclaration<'a> {
|
||||
pub struct ClockingDeclarationLocal<'a> {
|
||||
pub nodes: (
|
||||
Option<Default<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<ClockingIdentifier<'a>>,
|
||||
ClockingEvent<'a>,
|
||||
Symbol<'a>,
|
||||
Vec<ClockingItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ClockingIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Default<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClockingDeclarationGlobal<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Option<ClockingIdentifier<'a>>,
|
||||
ClockingEvent<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ClockingIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -71,7 +71,7 @@ pub enum ClockingItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClockingItemDefault<'a> {
|
||||
pub nodes: (Symbol<'a>, DefaultSkew<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, DefaultSkew<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -97,17 +97,17 @@ pub enum DefaultSkew<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DefaultSkewInput<'a> {
|
||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
||||
pub nodes: (Keyword<'a>, ClockingSkew<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DefaultSkewOutput<'a> {
|
||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>),
|
||||
pub nodes: (Keyword<'a>, ClockingSkew<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DefaultSkewInputOutput<'a> {
|
||||
pub nodes: (Symbol<'a>, ClockingSkew<'a>, Symbol<'a>, ClockingSkew<'a>),
|
||||
pub nodes: (Keyword<'a>, ClockingSkew<'a>, Keyword<'a>, ClockingSkew<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -115,25 +115,25 @@ pub enum ClockingDirection<'a> {
|
||||
Input(ClockingDirectionInput<'a>),
|
||||
Output(ClockingDirectionOutput<'a>),
|
||||
InputOutput(ClockingDirectionInputOutput<'a>),
|
||||
Inout(Symbol<'a>),
|
||||
Inout(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClockingDirectionInput<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
||||
pub nodes: (Keyword<'a>, Option<ClockingSkew<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClockingDirectionOutput<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>),
|
||||
pub nodes: (Keyword<'a>, Option<ClockingSkew<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClockingDirectionInputOutput<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<ClockingSkew<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<ClockingSkew<'a>>,
|
||||
),
|
||||
}
|
||||
|
@ -12,24 +12,24 @@ use nom::IResult;
|
||||
pub struct ConditionalStatement<'a> {
|
||||
pub nodes: (
|
||||
Option<UniquePriority<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, CondPredicate<'a>>,
|
||||
StatementOrNull<'a>,
|
||||
Vec<(
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, CondPredicate<'a>>,
|
||||
StatementOrNull<'a>,
|
||||
)>,
|
||||
Option<(Symbol<'a>, StatementOrNull<'a>)>,
|
||||
Option<(Keyword<'a>, StatementOrNull<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum UniquePriority<'a> {
|
||||
Unique(Symbol<'a>),
|
||||
Unique0(Symbol<'a>),
|
||||
Priority(Symbol<'a>),
|
||||
Unique(Keyword<'a>),
|
||||
Unique0(Keyword<'a>),
|
||||
Priority(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -45,7 +45,7 @@ pub enum ExpressionOrCondPattern<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CondPattern<'a> {
|
||||
pub nodes: (Expression<'a>, Symbol<'a>, Pattern<'a>),
|
||||
pub nodes: (Expression<'a>, Keyword<'a>, Pattern<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -15,7 +15,7 @@ pub enum ContinuousAssign<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ContinuousAssignNet<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<DriveStrength<'a>>,
|
||||
Option<Delay3<'a>>,
|
||||
ListOfNetAssignments<'a>,
|
||||
@ -26,7 +26,7 @@ pub struct ContinuousAssignNet<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ContinuousAssignVariable<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<DelayControl<'a>>,
|
||||
ListOfVariableAssignments<'a>,
|
||||
Symbol<'a>,
|
||||
@ -46,7 +46,7 @@ pub struct ListOfVariableAssignments<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NetAlias<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
NetLvalue<'a>,
|
||||
Symbol<'a>,
|
||||
List<Symbol<'a>, NetLvalue<'a>>,
|
||||
|
@ -19,23 +19,23 @@ pub enum LoopStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementForever<'a> {
|
||||
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementRepeat<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementWhile<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementFor<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -53,9 +53,9 @@ pub struct LoopStatementFor<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementDoWhile<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
StatementOrNull<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -64,7 +64,7 @@ pub struct LoopStatementDoWhile<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopStatementForeach<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -98,7 +98,7 @@ pub struct ForVariableDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Var<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -16,17 +16,17 @@ pub enum ActionBlock<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ActionBlockElse<'a> {
|
||||
pub nodes: (Option<Statement<'a>>, Symbol<'a>, StatementOrNull<'a>),
|
||||
pub nodes: (Option<Statement<'a>>, Keyword<'a>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SeqBlock<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, BlockIdentifier<'a>)>,
|
||||
Vec<BlockItemDeclaration<'a>>,
|
||||
Vec<StatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, BlockIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -34,7 +34,7 @@ pub struct SeqBlock<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ParBlock<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, BlockIdentifier<'a>)>,
|
||||
Vec<BlockItemDeclaration<'a>>,
|
||||
Vec<StatementOrNull<'a>>,
|
||||
@ -45,9 +45,9 @@ pub struct ParBlock<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum JoinKeyword<'a> {
|
||||
Join(Symbol<'a>),
|
||||
JoinAny(Symbol<'a>),
|
||||
JoinNone(Symbol<'a>),
|
||||
Join(Keyword<'a>),
|
||||
JoinAny(Keyword<'a>),
|
||||
JoinNone(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -24,7 +24,7 @@ pub struct PatternVariable<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PatternTagged<'a> {
|
||||
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Pattern<'a>>),
|
||||
pub nodes: (Keyword<'a>, MemberIdentifier<'a>, Option<Pattern<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -96,7 +96,7 @@ pub enum ArrayPatternKey<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum AssignmentPatternKey<'a> {
|
||||
SimpleType(SimpleType<'a>),
|
||||
Default(Symbol<'a>),
|
||||
Default(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -8,7 +8,7 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InitialConstruct<'a> {
|
||||
pub nodes: (Symbol<'a>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -18,15 +18,15 @@ pub struct AlwaysConstruct<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum AlwaysKeyword<'a> {
|
||||
Always(Symbol<'a>),
|
||||
AlwaysComb(Symbol<'a>),
|
||||
AlwaysLatch(Symbol<'a>),
|
||||
AlwaysFf(Symbol<'a>),
|
||||
Always(Keyword<'a>),
|
||||
AlwaysComb(Keyword<'a>),
|
||||
AlwaysLatch(Keyword<'a>),
|
||||
AlwaysFf(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct FinalConstruct<'a> {
|
||||
pub nodes: (Symbol<'a>, FunctionStatement<'a>),
|
||||
pub nodes: (Keyword<'a>, FunctionStatement<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -95,32 +95,32 @@ pub enum ProceduralContinuousAssignment<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentAssign<'a> {
|
||||
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
||||
pub nodes: (Keyword<'a>, VariableAssignment<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentDeassign<'a> {
|
||||
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
||||
pub nodes: (Keyword<'a>, VariableLvalue<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentForceVariable<'a> {
|
||||
pub nodes: (Symbol<'a>, VariableAssignment<'a>),
|
||||
pub nodes: (Keyword<'a>, VariableAssignment<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentForceNet<'a> {
|
||||
pub nodes: (Symbol<'a>, NetAssignment<'a>),
|
||||
pub nodes: (Keyword<'a>, NetAssignment<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentReleaseVariable<'a> {
|
||||
pub nodes: (Symbol<'a>, VariableLvalue<'a>),
|
||||
pub nodes: (Keyword<'a>, VariableLvalue<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProceduralContinuousAssignmentReleaseNet<'a> {
|
||||
pub nodes: (Symbol<'a>, NetLvalue<'a>),
|
||||
pub nodes: (Keyword<'a>, NetLvalue<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -11,11 +11,11 @@ use nom::IResult;
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RandsequenceStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, Option<ProductionIdentifier<'a>>>,
|
||||
Production<'a>,
|
||||
Vec<Production<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ pub struct RsProductionListProd<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RsProductionListJoin<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Expression<'a>>>,
|
||||
ProductionItem<'a>,
|
||||
ProductionItem<'a>,
|
||||
@ -99,26 +99,26 @@ pub struct ProductionItem<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RsIfElse<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
ProductionItem<'a>,
|
||||
Option<(Symbol<'a>, ProductionItem<'a>)>,
|
||||
Option<(Keyword<'a>, ProductionItem<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RsRepeat<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, ProductionItem<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, ProductionItem<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RsCase<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, CaseExpression<'a>>,
|
||||
RsCaseItem<'a>,
|
||||
Vec<RsCaseItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ pub struct RsCaseItemNondefault<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RsCaseItemDefault<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Symbol<'a>>,
|
||||
ProductionItem<'a>,
|
||||
Symbol<'a>,
|
||||
|
@ -16,7 +16,7 @@ pub enum SubroutineCallStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SubroutineCallStatementFunction<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Symbol<'a>,
|
||||
Paren<'a, FunctionSubroutineCall<'a>>,
|
||||
Symbol<'a>,
|
||||
|
@ -21,7 +21,7 @@ pub enum DelayOrEventControl<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DelayOrEventControlRepeat<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, EventControl<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, EventControl<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -88,18 +88,18 @@ pub struct EventExpressionExpression<'a> {
|
||||
pub nodes: (
|
||||
Option<EdgeIdentifier<'a>>,
|
||||
Expression<'a>,
|
||||
Option<(Symbol<'a>, Expression<'a>)>,
|
||||
Option<(Keyword<'a>, Expression<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EventExpressionSequence<'a> {
|
||||
pub nodes: (SequenceInstance<'a>, Option<(Symbol<'a>, Expression<'a>)>),
|
||||
pub nodes: (SequenceInstance<'a>, Option<(Keyword<'a>, Expression<'a>)>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EventExpressionOr<'a> {
|
||||
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>),
|
||||
pub nodes: (EventExpression<'a>, Keyword<'a>, EventExpression<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -128,17 +128,17 @@ pub enum JumpStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct JumpStatementReturn<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<Expression<'a>>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Option<Expression<'a>>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct JumpStatementBreak<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct JumpStatementContinue<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -150,18 +150,18 @@ pub enum WaitStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct WaitStatementWait<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>, StatementOrNull<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct WaitStatementFork<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct WaitStatementOrder<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, List<Symbol<'a>, HierarchicalIdentifier<'a>>>,
|
||||
ActionBlock<'a>,
|
||||
),
|
||||
@ -197,17 +197,17 @@ pub enum DisableStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DisableStatementTask<'a> {
|
||||
pub nodes: (Symbol<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DisableStatementBlock<'a> {
|
||||
pub nodes: (Symbol<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DisableStatementFork<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -34,8 +34,8 @@ pub enum ConcurrentAssertionStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct AssertPropertyStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, PropertySpec<'a>>,
|
||||
ActionBlock<'a>,
|
||||
),
|
||||
@ -44,8 +44,8 @@ pub struct AssertPropertyStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct AssumePropertyStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, PropertySpec<'a>>,
|
||||
ActionBlock<'a>,
|
||||
),
|
||||
@ -54,8 +54,8 @@ pub struct AssumePropertyStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CoverPropertyStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, PropertySpec<'a>>,
|
||||
StatementOrNull<'a>,
|
||||
),
|
||||
@ -63,19 +63,19 @@ pub struct CoverPropertyStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ExpectPropertyStatement<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, PropertySpec<'a>>, ActionBlock<'a>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, PropertySpec<'a>>, ActionBlock<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CoverSequenceStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
Option<ClockingEvent<'a>>,
|
||||
Option<(Symbol<'a>, Symbol<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
|
||||
Option<(Keyword<'a>, Keyword<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
|
||||
SequenceExpr<'a>,
|
||||
),
|
||||
>,
|
||||
@ -86,8 +86,8 @@ pub struct CoverSequenceStatement<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RestrictPropertyStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, PropertySpec<'a>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -150,14 +150,14 @@ pub enum AssertionItemDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
PropertyIdentifier<'a>,
|
||||
Option<Paren<'a, Option<PropertyPortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Vec<AssertionVariableDeclaration<'a>>,
|
||||
PropertySpec<'a>,
|
||||
Option<Symbol<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, PropertyIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -181,20 +181,20 @@ pub struct PropertyPortItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum PropertyLvarPortDirection<'a> {
|
||||
Input(Symbol<'a>),
|
||||
Input(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum PropertyFormalType<'a> {
|
||||
SequenceFormalType(SequenceFormalType<'a>),
|
||||
Property(Symbol<'a>),
|
||||
Property(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertySpec<'a> {
|
||||
pub nodes: (
|
||||
Option<ClockingEvent<'a>>,
|
||||
Option<(Symbol<'a>, Symbol<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
|
||||
Option<(Keyword<'a>, Keyword<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
}
|
||||
@ -236,12 +236,12 @@ pub enum PropertyExpr<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprStrong<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, SequenceExpr<'a>>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, SequenceExpr<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprWeak<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, SequenceExpr<'a>>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, SequenceExpr<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -251,17 +251,17 @@ pub struct PropertyExprParen<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprNot<'a> {
|
||||
pub nodes: (Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprOr<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprAnd<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -277,21 +277,21 @@ pub struct PropertyExprImplicationNonoverlapped<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprIf<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
Option<(Symbol<'a>, PropertyExpr<'a>)>,
|
||||
Option<(Keyword<'a>, PropertyExpr<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprCase<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyCaseItem<'a>,
|
||||
Vec<PropertyCaseItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ pub struct PropertyExprFollowedByNonoverlapped<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprNexttime<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Bracket<'a, ConstantExpression<'a>>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -317,7 +317,7 @@ pub struct PropertyExprNexttime<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSNexttime<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Bracket<'a, ConstantExpression<'a>>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -326,7 +326,7 @@ pub struct PropertyExprSNexttime<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprAlways<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -335,7 +335,7 @@ pub struct PropertyExprAlways<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSAlways<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Bracket<'a, CycleDelayConstRangeExpression<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -343,13 +343,17 @@ pub struct PropertyExprSAlways<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprEventually<'a> {
|
||||
pub nodes: (Symbol<'a>, Bracket<'a, ConstantRange<'a>>, PropertyExpr<'a>),
|
||||
pub nodes: (
|
||||
Keyword<'a>,
|
||||
Bracket<'a, ConstantRange<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSEventually<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -357,38 +361,38 @@ pub struct PropertyExprSEventually<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprUntil<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSUntil<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprUntilWith<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSUntilWith<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprImplies<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprIff<'a> {
|
||||
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>),
|
||||
pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprAcceptOn<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -397,7 +401,7 @@ pub struct PropertyExprAcceptOn<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprRejectOn<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -406,7 +410,7 @@ pub struct PropertyExprRejectOn<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSyncAcceptOn<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -415,7 +419,7 @@ pub struct PropertyExprSyncAcceptOn<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyExprSyncRejectOn<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ExpressionOrDist<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
),
|
||||
@ -444,20 +448,25 @@ pub struct PropertyCaseItemNondefault<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PropertyCaseItemDefault<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, PropertyExpr<'a>, Symbol<'a>),
|
||||
pub nodes: (
|
||||
Keyword<'a>,
|
||||
Option<Symbol<'a>>,
|
||||
PropertyExpr<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
SequenceIdentifier<'a>,
|
||||
Option<Paren<'a, Option<SequencePortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Vec<AssertionVariableDeclaration<'a>>,
|
||||
SequenceExpr<'a>,
|
||||
Option<Symbol<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, SequenceIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -481,16 +490,16 @@ pub struct SequencePortItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum SequenceLvarPortDirection<'a> {
|
||||
Input(Symbol<'a>),
|
||||
Inout(Symbol<'a>),
|
||||
Output(Symbol<'a>),
|
||||
Input(Keyword<'a>),
|
||||
Inout(Keyword<'a>),
|
||||
Output(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum SequenceFormalType<'a> {
|
||||
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
||||
Sequence(Symbol<'a>),
|
||||
Untyped(Symbol<'a>),
|
||||
Sequence(Keyword<'a>),
|
||||
Untyped(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -548,35 +557,35 @@ pub struct SequenceExprParen<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprAnd<'a> {
|
||||
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>),
|
||||
pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprIntersect<'a> {
|
||||
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>),
|
||||
pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprOr<'a> {
|
||||
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>),
|
||||
pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprFirstMatch<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, (SequenceExpr<'a>, Vec<(Symbol<'a>, SequenceMatchItem<'a>)>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprThroughout<'a> {
|
||||
pub nodes: (ExpressionOrDist<'a>, Symbol<'a>, SequenceExpr<'a>),
|
||||
pub nodes: (ExpressionOrDist<'a>, Keyword<'a>, SequenceExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SequenceExprWithin<'a> {
|
||||
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>),
|
||||
pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -741,7 +750,7 @@ pub struct CycleDelayConstRangeExpressionDollar<'a> {
|
||||
pub struct ExpressionOrDist<'a> {
|
||||
pub nodes: (
|
||||
Expression<'a>,
|
||||
Option<(Symbol<'a>, Brace<'a, DistList<'a>>)>,
|
||||
Option<(Keyword<'a>, Brace<'a, DistList<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,13 @@ use nom::IResult;
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CovergroupDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
CovergroupIdentifier<'a>,
|
||||
Option<Paren<'a, Option<TfPortList<'a>>>>,
|
||||
Option<CoverageEvent<'a>>,
|
||||
Symbol<'a>,
|
||||
Vec<CoverageSpecOrOption<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, CovergroupIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -47,7 +47,7 @@ pub enum CoverageOption<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CoverageOptionOption<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Symbol<'a>,
|
||||
MemberIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
@ -58,7 +58,7 @@ pub struct CoverageOptionOption<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CoverageOptionTypeOption<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Symbol<'a>,
|
||||
MemberIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
@ -82,9 +82,9 @@ pub enum CoverageEvent<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CoverageEventSample<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, Option<TfPortList<'a>>>,
|
||||
),
|
||||
}
|
||||
@ -105,19 +105,19 @@ pub enum BlockEventExpression<'a> {
|
||||
pub struct BlockEventExpressionOr<'a> {
|
||||
pub nodes: (
|
||||
BlockEventExpression<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
BlockEventExpression<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct BlockEventExpressionBegin<'a> {
|
||||
pub nodes: (Symbol<'a>, HierarchicalBtfIdentifier<'a>),
|
||||
pub nodes: (Keyword<'a>, HierarchicalBtfIdentifier<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct BlockEventExpressionEnd<'a> {
|
||||
pub nodes: (Symbol<'a>, HierarchicalBtfIdentifier<'a>),
|
||||
pub nodes: (Keyword<'a>, HierarchicalBtfIdentifier<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -149,9 +149,9 @@ pub struct CoverPoint<'a> {
|
||||
CoverPointIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Expression<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
BinsOrEmpty<'a>,
|
||||
),
|
||||
}
|
||||
@ -195,14 +195,14 @@ pub struct BinsOrOptionsCovergroup<'a> {
|
||||
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Brace<'a, CovergroupRangeList<'a>>,
|
||||
Option<(Symbol<'a>, Paren<'a, WithCovergroupExpression<'a>>)>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, WithCovergroupExpression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Wildcard<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -214,9 +214,9 @@ pub struct BinsOrOptionsCoverPoint<'a> {
|
||||
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
|
||||
Symbol<'a>,
|
||||
CoverPointIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, WithCovergroupExpression<'a>>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ pub struct BinsOrOptionsSetCovergroup<'a> {
|
||||
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
|
||||
Symbol<'a>,
|
||||
SetCovergroupExpression<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ pub struct BinsOrOptionsTransList<'a> {
|
||||
Option<(Symbol<'a>, Symbol<'a>)>,
|
||||
Symbol<'a>,
|
||||
TransList<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -253,8 +253,8 @@ pub struct BinsOrOptionsDefault<'a> {
|
||||
BinIdentifier<'a>,
|
||||
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Keyword<'a>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -264,17 +264,17 @@ pub struct BinsOrOptionsDefaultSequence<'a> {
|
||||
BinsKeyword<'a>,
|
||||
BinIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum BinsKeyword<'a> {
|
||||
Bins(Symbol<'a>),
|
||||
IllegalBins(Symbol<'a>),
|
||||
IgnoreBins(Symbol<'a>),
|
||||
Bins(Keyword<'a>),
|
||||
IllegalBins(Keyword<'a>),
|
||||
IgnoreBins(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -334,9 +334,9 @@ pub struct RepeatRangeBinary<'a> {
|
||||
pub struct CoverCross<'a> {
|
||||
pub nodes: (
|
||||
Option<(CrossIdentifier<'a>, Symbol<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ListOfCrossItems<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
CrossBody<'a>,
|
||||
),
|
||||
}
|
||||
@ -392,7 +392,7 @@ pub struct BinsSelection<'a> {
|
||||
BinIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
SelectExpression<'a>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -432,9 +432,9 @@ pub struct SelectExpressionParen<'a> {
|
||||
pub struct SelectExpressionWith<'a> {
|
||||
pub nodes: (
|
||||
SelectExpression<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, WithCovergroupExpression<'a>>,
|
||||
Option<(Symbol<'a>, IntegerCovergroupExpression<'a>)>,
|
||||
Option<(Keyword<'a>, IntegerCovergroupExpression<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -442,16 +442,16 @@ pub struct SelectExpressionWith<'a> {
|
||||
pub struct SelectExpressionCrossSet<'a> {
|
||||
pub nodes: (
|
||||
CrossSetExpression<'a>,
|
||||
Option<(Symbol<'a>, IntegerCovergroupExpression<'a>)>,
|
||||
Option<(Keyword<'a>, IntegerCovergroupExpression<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SelectCondition<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, BinsExpression<'a>>,
|
||||
Option<(Symbol<'a>, Brace<'a, CovergroupRangeList<'a>>)>,
|
||||
Option<(Keyword<'a>, Brace<'a, CovergroupRangeList<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -153,20 +153,20 @@ pub enum ClassNew<'a> {
|
||||
pub struct ClassNewArgument<'a> {
|
||||
pub nodes: (
|
||||
Option<ClassScope<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, ListOfArguments<'a>>>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassNewExpression<'a> {
|
||||
pub nodes: (Symbol<'a>, Expression<'a>),
|
||||
pub nodes: (Keyword<'a>, Expression<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DynamicArrayNew<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Bracket<'a, Expression<'a>>,
|
||||
Option<Paren<'a, Expression<'a>>>,
|
||||
),
|
||||
|
@ -67,7 +67,7 @@ pub enum DelayValue<'a> {
|
||||
RealNumber(RealNumber<'a>),
|
||||
PsIdentifier(PsIdentifier<'a>),
|
||||
TimeLiteral(TimeLiteral<'a>),
|
||||
Step1(Symbol<'a>),
|
||||
Step1(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -17,7 +17,7 @@ pub enum FunctionDataTypeOrImplicit<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct FunctionDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
FunctionBodyDeclaration<'a>,
|
||||
),
|
||||
@ -38,7 +38,7 @@ pub struct FunctionBodyDeclarationWithoutPort<'a> {
|
||||
Symbol<'a>,
|
||||
Vec<TfItemDeclaration<'a>>,
|
||||
Vec<FunctionStatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, FunctionIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -53,7 +53,7 @@ pub struct FunctionBodyDeclarationWithPort<'a> {
|
||||
Symbol<'a>,
|
||||
Vec<BlockItemDeclaration<'a>>,
|
||||
Vec<FunctionStatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, FunctionIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -67,7 +67,7 @@ pub enum InterfaceIdentifierOrClassScope<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct FunctionPrototype<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DataTypeOrVoid<'a>,
|
||||
FunctionIdentifier<'a>,
|
||||
Option<Paren<'a, Option<TfPortList<'a>>>>,
|
||||
@ -85,7 +85,7 @@ pub enum DpiImportExport<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DpiImportExportImportFunction<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DpiSpecString<'a>,
|
||||
Option<DpiFunctionImportProperty<'a>>,
|
||||
Option<(CIdentifier<'a>, Symbol<'a>)>,
|
||||
@ -97,7 +97,7 @@ pub struct DpiImportExportImportFunction<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DpiImportExportImportTask<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DpiSpecString<'a>,
|
||||
Option<DpiTaskImportProperty<'a>>,
|
||||
Option<(CIdentifier<'a>, Symbol<'a>)>,
|
||||
@ -109,10 +109,10 @@ pub struct DpiImportExportImportTask<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DpiImportExportExportFunction<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DpiSpecString<'a>,
|
||||
Option<(CIdentifier<'a>, Symbol<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
FunctionIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -121,10 +121,10 @@ pub struct DpiImportExportExportFunction<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DpiImportExportExportTask<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DpiSpecString<'a>,
|
||||
Option<(CIdentifier<'a>, Symbol<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TaskIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -132,19 +132,19 @@ pub struct DpiImportExportExportTask<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum DpiSpecString<'a> {
|
||||
DpiC(Symbol<'a>),
|
||||
Dpi(Symbol<'a>),
|
||||
DpiC(Keyword<'a>),
|
||||
Dpi(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum DpiFunctionImportProperty<'a> {
|
||||
Context(Symbol<'a>),
|
||||
Pure(Symbol<'a>),
|
||||
Context(Keyword<'a>),
|
||||
Pure(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum DpiTaskImportProperty<'a> {
|
||||
Context(Symbol<'a>),
|
||||
Context(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -9,7 +9,7 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModportDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, List<Symbol<'a>, ModportItem<'a>>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, List<Symbol<'a>, ModportItem<'a>>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -47,7 +47,7 @@ pub struct ModportPortsDeclaratonClocking<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModportClockingDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, ClockingIdentifier<'a>),
|
||||
pub nodes: (Keyword<'a>, ClockingIdentifier<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -88,8 +88,8 @@ pub enum ModportTfPort<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ImportExport<'a> {
|
||||
Import(Symbol<'a>),
|
||||
Export(Symbol<'a>),
|
||||
Import(Keyword<'a>),
|
||||
Export(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -11,7 +11,7 @@ use nom::IResult;
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LetDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
LetIdentifier<'a>,
|
||||
Option<Paren<'a, Option<LetPortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
@ -44,7 +44,7 @@ pub struct LetPortItem<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum LetFormalType<'a> {
|
||||
DataTypeOrImplicit(DataTypeOrImplicit<'a>),
|
||||
Untyped(Symbol<'a>),
|
||||
Untyped(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -15,7 +15,7 @@ pub enum LocalParameterDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LocalParameterDeclarationParam<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<DataTypeOrImplicit<'a>>,
|
||||
ListOfParamAssignments<'a>,
|
||||
),
|
||||
@ -23,7 +23,7 @@ pub struct LocalParameterDeclarationParam<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LocalParameterDeclarationType<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, ListOfTypeAssignments<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -35,7 +35,7 @@ pub enum ParameterDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ParameterDeclarationParam<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<DataTypeOrImplicit<'a>>,
|
||||
ListOfParamAssignments<'a>,
|
||||
),
|
||||
@ -43,13 +43,13 @@ pub struct ParameterDeclarationParam<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ParameterDeclarationType<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, ListOfTypeAssignments<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SpecparamDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<PackedDimension<'a>>,
|
||||
ListOfSpecparamAssignments<'a>,
|
||||
Symbol<'a>,
|
||||
|
@ -13,8 +13,8 @@ pub enum CastingType<'a> {
|
||||
SimpleType(Box<SimpleType<'a>>),
|
||||
ConstantPrimary(Box<ConstantPrimary<'a>>),
|
||||
Signing(Box<Signing<'a>>),
|
||||
String(Symbol<'a>),
|
||||
Const(Symbol<'a>),
|
||||
String(Keyword<'a>),
|
||||
Const(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -24,12 +24,12 @@ pub enum DataType<'a> {
|
||||
NonIntegerType(NonIntegerType<'a>),
|
||||
Union(Box<DataTypeUnion<'a>>),
|
||||
Enum(DataTypeEnum<'a>),
|
||||
String(Symbol<'a>),
|
||||
Chandle(Symbol<'a>),
|
||||
String(Keyword<'a>),
|
||||
Chandle(Keyword<'a>),
|
||||
Virtual(DataTypeVirtual<'a>),
|
||||
Type(DataTypeType<'a>),
|
||||
ClassType(ClassType<'a>),
|
||||
Event(Symbol<'a>),
|
||||
Event(Keyword<'a>),
|
||||
PsCovergroupIdentifier(PsCovergroupIdentifier<'a>),
|
||||
TypeReference(Box<TypeReference<'a>>),
|
||||
}
|
||||
@ -60,13 +60,13 @@ pub struct DataTypeUnion<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Packed<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DataTypeEnum<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<EnumBaseType<'a>>,
|
||||
Brace<'a, List<Symbol<'a>, EnumNameDeclaration<'a>>>,
|
||||
Vec<PackedDimension<'a>>,
|
||||
@ -76,7 +76,7 @@ pub struct DataTypeEnum<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DataTypeVirtual<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Interface<'a>>,
|
||||
InterfaceIdentifier<'a>,
|
||||
Option<ParameterValueAssignment<'a>>,
|
||||
@ -86,7 +86,7 @@ pub struct DataTypeVirtual<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Interface<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -170,42 +170,42 @@ pub enum IntegerType<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum IntegerAtomType<'a> {
|
||||
Byte(Symbol<'a>),
|
||||
Shortint(Symbol<'a>),
|
||||
Int(Symbol<'a>),
|
||||
Longint(Symbol<'a>),
|
||||
Integer(Symbol<'a>),
|
||||
Time(Symbol<'a>),
|
||||
Byte(Keyword<'a>),
|
||||
Shortint(Keyword<'a>),
|
||||
Int(Keyword<'a>),
|
||||
Longint(Keyword<'a>),
|
||||
Integer(Keyword<'a>),
|
||||
Time(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum IntegerVectorType<'a> {
|
||||
Bit(Symbol<'a>),
|
||||
Logic(Symbol<'a>),
|
||||
Reg(Symbol<'a>),
|
||||
Bit(Keyword<'a>),
|
||||
Logic(Keyword<'a>),
|
||||
Reg(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum NonIntegerType<'a> {
|
||||
Shortreal(Symbol<'a>),
|
||||
Real(Symbol<'a>),
|
||||
Realtime(Symbol<'a>),
|
||||
Shortreal(Keyword<'a>),
|
||||
Real(Keyword<'a>),
|
||||
Realtime(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum NetType<'a> {
|
||||
Supply0(Symbol<'a>),
|
||||
Supply1(Symbol<'a>),
|
||||
Tri(Symbol<'a>),
|
||||
Triand(Symbol<'a>),
|
||||
Trior(Symbol<'a>),
|
||||
Trireg(Symbol<'a>),
|
||||
Tri0(Symbol<'a>),
|
||||
Tri1(Symbol<'a>),
|
||||
Uwire(Symbol<'a>),
|
||||
Wire(Symbol<'a>),
|
||||
Wand(Symbol<'a>),
|
||||
Wor(Symbol<'a>),
|
||||
Supply0(Keyword<'a>),
|
||||
Supply1(Keyword<'a>),
|
||||
Tri(Keyword<'a>),
|
||||
Triand(Keyword<'a>),
|
||||
Trior(Keyword<'a>),
|
||||
Trireg(Keyword<'a>),
|
||||
Tri0(Keyword<'a>),
|
||||
Tri1(Keyword<'a>),
|
||||
Uwire(Keyword<'a>),
|
||||
Wire(Keyword<'a>),
|
||||
Wand(Keyword<'a>),
|
||||
Wor(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -222,7 +222,7 @@ pub struct NetPortTypeDataType<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NetPortTypeInterconnect<'a> {
|
||||
pub nodes: (Symbol<'a>, ImplicitDataType<'a>),
|
||||
pub nodes: (Keyword<'a>, ImplicitDataType<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -238,13 +238,13 @@ pub enum VarDataType<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct VarDataTypeVar<'a> {
|
||||
pub nodes: (Symbol<'a>, DataTypeOrImplicit<'a>),
|
||||
pub nodes: (Keyword<'a>, DataTypeOrImplicit<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum Signing<'a> {
|
||||
Signed(Symbol<'a>),
|
||||
Unsigned(Symbol<'a>),
|
||||
Signed(Keyword<'a>),
|
||||
Unsigned(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -269,14 +269,14 @@ pub struct StructUnionMember<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum DataTypeOrVoid<'a> {
|
||||
DataType(DataType<'a>),
|
||||
Void(Symbol<'a>),
|
||||
Void(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum StructUnion<'a> {
|
||||
Struct(Symbol<'a>),
|
||||
Union(Symbol<'a>),
|
||||
UnionTagged((Symbol<'a>, Symbol<'a>)),
|
||||
Struct(Keyword<'a>),
|
||||
Union(Keyword<'a>),
|
||||
UnionTagged((Keyword<'a>, Keyword<'a>)),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -287,12 +287,12 @@ pub enum TypeReference<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TypeReferenceExpression<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TypeReferenceDataType<'a> {
|
||||
pub nodes: (Symbol<'a>, Paren<'a, DataType<'a>>),
|
||||
pub nodes: (Keyword<'a>, Paren<'a, DataType<'a>>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -10,7 +10,7 @@ use nom::IResult;
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InoutDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<NetPortType<'a>>,
|
||||
ListOfPortIdentifiers<'a>,
|
||||
),
|
||||
@ -25,7 +25,7 @@ pub enum InputDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InputDeclarationNet<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<NetPortType<'a>>,
|
||||
ListOfPortIdentifiers<'a>,
|
||||
),
|
||||
@ -34,7 +34,7 @@ pub struct InputDeclarationNet<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InputDeclarationVariable<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
VariablePortType<'a>,
|
||||
ListOfVariableIdentifiers<'a>,
|
||||
),
|
||||
@ -49,7 +49,7 @@ pub enum OutputDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct OutputDeclarationNet<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<NetPortType<'a>>,
|
||||
ListOfPortIdentifiers<'a>,
|
||||
),
|
||||
@ -58,7 +58,7 @@ pub struct OutputDeclarationNet<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct OutputDeclarationVariable<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
VariablePortType<'a>,
|
||||
ListOfVariableIdentifiers<'a>,
|
||||
),
|
||||
@ -76,7 +76,7 @@ pub struct InterfacePortDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RefDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
VariablePortType<'a>,
|
||||
ListOfVariableIdentifiers<'a>,
|
||||
),
|
||||
|
@ -28,38 +28,38 @@ pub struct DriveStrength10<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DriveStrength0z<'a> {
|
||||
pub nodes: (Paren<'a, (Strength0<'a>, Symbol<'a>, Symbol<'a>)>,),
|
||||
pub nodes: (Paren<'a, (Strength0<'a>, Symbol<'a>, Keyword<'a>)>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DriveStrength1z<'a> {
|
||||
pub nodes: (Paren<'a, (Strength1<'a>, Symbol<'a>, Symbol<'a>)>,),
|
||||
pub nodes: (Paren<'a, (Strength1<'a>, Symbol<'a>, Keyword<'a>)>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DriveStrengthz1<'a> {
|
||||
pub nodes: (Paren<'a, (Symbol<'a>, Symbol<'a>, Strength1<'a>)>,),
|
||||
pub nodes: (Paren<'a, (Keyword<'a>, Symbol<'a>, Strength1<'a>)>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DriveStrengthz0<'a> {
|
||||
pub nodes: (Paren<'a, (Symbol<'a>, Symbol<'a>, Strength0<'a>)>,),
|
||||
pub nodes: (Paren<'a, (Keyword<'a>, Symbol<'a>, Strength0<'a>)>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum Strength0<'a> {
|
||||
Supply0(Symbol<'a>),
|
||||
Strong0(Symbol<'a>),
|
||||
Pull0(Symbol<'a>),
|
||||
Weak0(Symbol<'a>),
|
||||
Supply0(Keyword<'a>),
|
||||
Strong0(Keyword<'a>),
|
||||
Pull0(Keyword<'a>),
|
||||
Weak0(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum Strength1<'a> {
|
||||
Supply1(Symbol<'a>),
|
||||
Strong1(Symbol<'a>),
|
||||
Pull1(Symbol<'a>),
|
||||
Weak1(Symbol<'a>),
|
||||
Supply1(Keyword<'a>),
|
||||
Strong1(Keyword<'a>),
|
||||
Pull1(Keyword<'a>),
|
||||
Weak1(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -71,17 +71,17 @@ pub enum ChargeStrength<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ChargeStrengthSmall<'a> {
|
||||
pub nodes: (Paren<'a, Symbol<'a>>,),
|
||||
pub nodes: (Paren<'a, Keyword<'a>>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ChargeStrengthMedium<'a> {
|
||||
pub nodes: (Paren<'a, Symbol<'a>>,),
|
||||
pub nodes: (Paren<'a, Keyword<'a>>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ChargeStrengthLarge<'a> {
|
||||
pub nodes: (Paren<'a, Symbol<'a>>,),
|
||||
pub nodes: (Paren<'a, Keyword<'a>>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -10,7 +10,7 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TaskDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<Lifetime<'a>>, TaskBodyDeclaration<'a>),
|
||||
pub nodes: (Keyword<'a>, Option<Lifetime<'a>>, TaskBodyDeclaration<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -27,7 +27,7 @@ pub struct TaskBodyDeclarationWithoutPort<'a> {
|
||||
Symbol<'a>,
|
||||
Vec<TfItemDeclaration<'a>>,
|
||||
Vec<StatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, TaskIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -41,7 +41,7 @@ pub struct TaskBodyDeclarationWithPort<'a> {
|
||||
Symbol<'a>,
|
||||
Vec<BlockItemDeclaration<'a>>,
|
||||
Vec<StatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, TaskIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -75,7 +75,7 @@ pub struct TfPortItem<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum TfPortDirection<'a> {
|
||||
PortDirection(PortDirection<'a>),
|
||||
ConstRef((Symbol<'a>, Symbol<'a>)),
|
||||
ConstRef((Keyword<'a>, Keyword<'a>)),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -93,7 +93,7 @@ pub struct TfPortDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TaskPrototype<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TaskIdentifier<'a>,
|
||||
Option<Paren<'a, Option<TfPortList<'a>>>>,
|
||||
),
|
||||
|
@ -30,13 +30,13 @@ pub struct DataDeclarationVariable<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Const<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PackageImportDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
List<Symbol<'a>, PackageImportItem<'a>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -66,13 +66,13 @@ pub enum PackageExportDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PackageExportDeclarationAsterisk<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PackageExportDeclarationItem<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
List<Symbol<'a>, PackageImportItem<'a>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -80,7 +80,7 @@ pub struct PackageExportDeclarationItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct GenvarDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -111,8 +111,8 @@ pub enum Strength<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum VectorScalar<'a> {
|
||||
Vectored(Symbol<'a>),
|
||||
Scalared(Symbol<'a>),
|
||||
Vectored(Keyword<'a>),
|
||||
Scalared(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -128,7 +128,7 @@ pub struct NetDeclarationNetTypeIdentifier<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NetDeclarationInterconnect<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ImplicitDataType<'a>,
|
||||
Option<(Symbol<'a>, DelayValue<'a>)>,
|
||||
NetIdentifier<'a>,
|
||||
@ -148,7 +148,7 @@ pub enum TypeDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TypeDeclarationDataType<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DataType<'a>,
|
||||
TypeIdentifier<'a>,
|
||||
Vec<VariableDimension<'a>>,
|
||||
@ -159,7 +159,7 @@ pub struct TypeDeclarationDataType<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TypeDeclarationInterface<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
InterfaceInstanceIdentifier<'a>,
|
||||
ConstantBitSelect<'a>,
|
||||
Symbol<'a>,
|
||||
@ -172,7 +172,7 @@ pub struct TypeDeclarationInterface<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TypeDeclarationReserved<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<TypeDeclarationKeyword<'a>>,
|
||||
TypeIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
@ -181,11 +181,11 @@ pub struct TypeDeclarationReserved<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum TypeDeclarationKeyword<'a> {
|
||||
Enum(Symbol<'a>),
|
||||
Struct(Symbol<'a>),
|
||||
Union(Symbol<'a>),
|
||||
Class(Symbol<'a>),
|
||||
InterfaceClass((Symbol<'a>, Symbol<'a>)),
|
||||
Enum(Keyword<'a>),
|
||||
Struct(Keyword<'a>),
|
||||
Union(Keyword<'a>),
|
||||
Class(Keyword<'a>),
|
||||
InterfaceClass((Keyword<'a>, Keyword<'a>)),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -197,11 +197,11 @@ pub enum NetTypeDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NetTypeDeclarationDataType<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
DataType<'a>,
|
||||
NetTypeIdentifier<'a>,
|
||||
Option<(
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<PackageScopeOrClassScope<'a>>,
|
||||
TfIdentifier<'a>,
|
||||
)>,
|
||||
@ -212,7 +212,7 @@ pub struct NetTypeDeclarationDataType<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NetTypeDeclarationNetType<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<PackageScopeOrClassScope<'a>>,
|
||||
NetTypeIdentifier<'a>,
|
||||
NetTypeIdentifier<'a>,
|
||||
@ -222,8 +222,8 @@ pub struct NetTypeDeclarationNetType<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum Lifetime<'a> {
|
||||
Static(Symbol<'a>),
|
||||
Automatic(Symbol<'a>),
|
||||
Static(Keyword<'a>),
|
||||
Automatic(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -71,7 +71,7 @@ pub struct StreamConcatenation<'a> {
|
||||
pub struct StreamExpression<'a> {
|
||||
pub nodes: (
|
||||
Expression<'a>,
|
||||
Option<(Symbol<'a>, Bracket<'a, ArrayRangeExpression<'a>>)>,
|
||||
Option<(Keyword<'a>, Bracket<'a, ArrayRangeExpression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -169,12 +169,12 @@ pub struct ExpressionBinary<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TaggedUnionExpression<'a> {
|
||||
pub nodes: (Symbol<'a>, MemberIdentifier<'a>, Option<Expression<'a>>),
|
||||
pub nodes: (Keyword<'a>, MemberIdentifier<'a>, Option<Expression<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InsideExpression<'a> {
|
||||
pub nodes: (Expression<'a>, Symbol<'a>, Brace<'a, OpenRangeList<'a>>),
|
||||
pub nodes: (Expression<'a>, Keyword<'a>, Brace<'a, OpenRangeList<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -23,7 +23,7 @@ pub enum ConstantPrimary<'a> {
|
||||
ConstantCast(ConstantCast<'a>),
|
||||
ConstantAssignmentPatternExpression(ConstantAssignmentPatternExpression<'a>),
|
||||
TypeReference(TypeReference<'a>),
|
||||
Null(Symbol<'a>),
|
||||
Null(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -99,9 +99,9 @@ pub enum Primary<'a> {
|
||||
AssignmentPatternExpression(AssignmentPatternExpression<'a>),
|
||||
StreamingConcatenation(StreamingConcatenation<'a>),
|
||||
SequenceMethodCall(SequenceMethodCall<'a>),
|
||||
This(Symbol<'a>),
|
||||
This(Keyword<'a>),
|
||||
Dollar(Symbol<'a>),
|
||||
Null(Symbol<'a>),
|
||||
Null(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -177,19 +177,19 @@ pub struct TimeLiteralFixedPoint<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum TimeUnit<'a> {
|
||||
S(Symbol<'a>),
|
||||
MS(Symbol<'a>),
|
||||
US(Symbol<'a>),
|
||||
NS(Symbol<'a>),
|
||||
PS(Symbol<'a>),
|
||||
FS(Symbol<'a>),
|
||||
S(Keyword<'a>),
|
||||
MS(Keyword<'a>),
|
||||
US(Keyword<'a>),
|
||||
NS(Keyword<'a>),
|
||||
PS(Keyword<'a>),
|
||||
FS(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ImplicitClassHandle<'a> {
|
||||
This(Symbol<'a>),
|
||||
Super(Symbol<'a>),
|
||||
ThisSuper((Symbol<'a>, Symbol<'a>, Symbol<'a>)),
|
||||
This(Keyword<'a>),
|
||||
Super(Keyword<'a>),
|
||||
ThisSuper((Keyword<'a>, Symbol<'a>, Keyword<'a>)),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -621,12 +621,12 @@ mod tests {
|
||||
fn test_primary() {
|
||||
parser_test!(
|
||||
primary,
|
||||
"2.1ns",
|
||||
"2.1ns ",
|
||||
Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_))))
|
||||
);
|
||||
parser_test!(
|
||||
primary,
|
||||
"40 ps",
|
||||
"40 ps ",
|
||||
Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_))))
|
||||
);
|
||||
parser_test!(
|
||||
|
@ -69,7 +69,7 @@ pub enum SubroutineCall<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SubroutineCallRandomize<'a> {
|
||||
pub nodes: (Option<(Symbol<'a>, Symbol<'a>)>, RandomizeCall<'a>),
|
||||
pub nodes: (Option<(Keyword<'a>, Symbol<'a>)>, RandomizeCall<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -143,18 +143,18 @@ pub struct ArrayManipulationCall<'a> {
|
||||
ArrayMethodName<'a>,
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Option<Paren<'a, ListOfArguments<'a>>>,
|
||||
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>,
|
||||
Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RandomizeCall<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Option<Paren<'a, Option<VariableIdentifierListOrNull<'a>>>>,
|
||||
Option<(
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<IdentifierList<'a>>>>,
|
||||
ConstraintBlock<'a>,
|
||||
)>,
|
||||
@ -164,7 +164,7 @@ pub struct RandomizeCall<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum VariableIdentifierListOrNull<'a> {
|
||||
VariableIdentifierList(VariableIdentifierList<'a>),
|
||||
Null(Symbol<'a>),
|
||||
Null(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -176,10 +176,10 @@ pub enum MethodCallRoot<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ArrayMethodName<'a> {
|
||||
MethodIdentifier(MethodIdentifier<'a>),
|
||||
Unique(Symbol<'a>),
|
||||
And(Symbol<'a>),
|
||||
Or(Symbol<'a>),
|
||||
Xor(Symbol<'a>),
|
||||
Unique(Keyword<'a>),
|
||||
And(Keyword<'a>),
|
||||
Or(Keyword<'a>),
|
||||
Xor(Keyword<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -160,7 +160,7 @@ pub struct HierarchicalIdentifier<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Root<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -292,7 +292,7 @@ pub struct PackageScopePackage<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Unit<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -455,7 +455,7 @@ pub enum LocalOrPackageScopeOrClassScope<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Local<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -10,13 +10,13 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct GenerateRegion<'a> {
|
||||
pub nodes: (Symbol<'a>, Vec<GenerateItem<'a>>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Vec<GenerateItem<'a>>, Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LoopGenerateConstruct<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -43,7 +43,7 @@ pub struct GenvarInitialization<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Genvar<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -81,20 +81,20 @@ pub enum ConditionalGenerateConstruct<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct IfGenerateConstruct<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ConstantExpression<'a>>,
|
||||
GenerateBlock<'a>,
|
||||
Option<(Symbol<'a>, GenerateBlock<'a>)>,
|
||||
Option<(Keyword<'a>, GenerateBlock<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CaseGenerateConstruct<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ConstantExpression<'a>>,
|
||||
Vec<CaseGenerateItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ pub struct CaseGenerateItemNondefault<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CaseGenerateItemDefault<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<Symbol<'a>>, GenerateBlock<'a>),
|
||||
pub nodes: (Keyword<'a>, Option<Symbol<'a>>, GenerateBlock<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -128,10 +128,10 @@ pub enum GenerateBlock<'a> {
|
||||
pub struct GenerateBlockMultiple<'a> {
|
||||
pub nodes: (
|
||||
Option<(GenerateBlockIdentifier<'a>, Symbol<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>,
|
||||
Vec<GenerateItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
@ -7,37 +7,37 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CmosSwitchtype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EnableGatetype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct MosSwitchtype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NInputGatetype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NOutputGatetype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PassEnSwitchtype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PassSwitchtype<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -115,53 +115,53 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_cmos_switchtype() {
|
||||
parser_test!(cmos_switchtype, "cmos", Ok((_, _)));
|
||||
parser_test!(cmos_switchtype, "rcmos", Ok((_, _)));
|
||||
parser_test!(cmos_switchtype, "cmos ", Ok((_, _)));
|
||||
parser_test!(cmos_switchtype, "rcmos ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_enable_gatetype() {
|
||||
parser_test!(enable_gatetype, "bufif0", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "bufif1", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "notif0", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "notif1", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "bufif0 ", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "bufif1 ", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "notif0 ", Ok((_, _)));
|
||||
parser_test!(enable_gatetype, "notif1 ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mos_switchtype() {
|
||||
parser_test!(mos_switchtype, "nmos", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "pmos", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "rnmos", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "rpmos", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "nmos ", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "pmos ", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "rnmos ", Ok((_, _)));
|
||||
parser_test!(mos_switchtype, "rpmos ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_n_input_gatetype() {
|
||||
parser_test!(n_input_gatetype, "and", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "nand", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "or", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "nor", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "xor", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "xnor", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "and ", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "nand ", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "or ", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "nor ", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "xor ", Ok((_, _)));
|
||||
parser_test!(n_input_gatetype, "xnor ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_n_output_gatetype() {
|
||||
parser_test!(n_output_gatetype, "buf", Ok((_, _)));
|
||||
parser_test!(n_output_gatetype, "not", Ok((_, _)));
|
||||
parser_test!(n_output_gatetype, "buf ", Ok((_, _)));
|
||||
parser_test!(n_output_gatetype, "not ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_pass_en_switchtype() {
|
||||
parser_test!(pass_en_switchtype, "tranif0", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "tranif1", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "rtranif0", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "rtranif1", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "tranif0 ", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "tranif1 ", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "rtranif0 ", Ok((_, _)));
|
||||
parser_test!(pass_en_switchtype, "rtranif1 ", Ok((_, _)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_pass_switchtype() {
|
||||
parser_test!(pass_switchtype, "tran", Ok((_, _)));
|
||||
parser_test!(pass_switchtype, "rtran", Ok((_, _)));
|
||||
parser_test!(pass_switchtype, "tran ", Ok((_, _)));
|
||||
parser_test!(pass_switchtype, "rtran ", Ok((_, _)));
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ pub struct GateInstantiationPass<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct GateInstantiationPulldown<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<PulldownStrength<'a>>,
|
||||
List<Symbol<'a>, PullGateInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
@ -105,7 +105,7 @@ pub struct GateInstantiationPulldown<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct GateInstantiationPullup<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<PullupStrength<'a>>,
|
||||
List<Symbol<'a>, PullGateInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
@ -342,7 +342,7 @@ pub fn gate_instantiation_pass(s: Span) -> IResult<Span, GateInstantiation> {
|
||||
|
||||
#[parser]
|
||||
pub fn gate_instantiation_pulldown(s: Span) -> IResult<Span, GateInstantiation> {
|
||||
let (s, a) = symbol("pulldown")(s)?;
|
||||
let (s, a) = keyword("pulldown")(s)?;
|
||||
let (s, b) = opt(pulldown_strength)(s)?;
|
||||
let (s, c) = list(symbol(","), pull_gate_instance)(s)?;
|
||||
let (s, d) = symbol(";")(s)?;
|
||||
@ -356,7 +356,7 @@ pub fn gate_instantiation_pulldown(s: Span) -> IResult<Span, GateInstantiation>
|
||||
|
||||
#[parser]
|
||||
pub fn gate_instantiation_pullup(s: Span) -> IResult<Span, GateInstantiation> {
|
||||
let (s, a) = symbol("pullup")(s)?;
|
||||
let (s, a) = keyword("pullup")(s)?;
|
||||
let (s, b) = opt(pullup_strength)(s)?;
|
||||
let (s, c) = list(symbol(","), pull_gate_instance)(s)?;
|
||||
let (s, d) = symbol(";")(s)?;
|
||||
|
@ -27,8 +27,8 @@ pub struct CheckerPortItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum CheckerPortDirection<'a> {
|
||||
Input(Symbol<'a>),
|
||||
Output(Symbol<'a>),
|
||||
Input(Keyword<'a>),
|
||||
Output(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -63,20 +63,20 @@ pub struct CheckerOrGenerateItemDeclarationData<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Rand<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CheckerOrGenerateItemDeclarationClocking<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, ClockingIdentifier<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, ClockingIdentifier<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CheckerOrGenerateItemDeclarationDisable<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
ExpressionOrDist<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
|
@ -59,7 +59,7 @@ pub struct ClassPropertyNonConst<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassPropertyConst<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<ClassItemQualifier<'a>>,
|
||||
DataType<'a>,
|
||||
ConstIdentifier<'a>,
|
||||
@ -91,8 +91,8 @@ pub struct ClassMethodFunction<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassMethodPureVirtual<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<ClassItemQualifier<'a>>,
|
||||
MethodPrototype<'a>,
|
||||
Symbol<'a>,
|
||||
@ -102,7 +102,7 @@ pub struct ClassMethodPureVirtual<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassMethodExternMethod<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<MethodQualifier<'a>>,
|
||||
MethodPrototype<'a>,
|
||||
Symbol<'a>,
|
||||
@ -117,7 +117,7 @@ pub struct ClassMethodConstructor<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassMethodExternConstructor<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<MethodQualifier<'a>>,
|
||||
ClassConstructorPrototype<'a>,
|
||||
),
|
||||
@ -126,8 +126,8 @@ pub struct ClassMethodExternConstructor<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassConstructorPrototype<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<TfPortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -141,9 +141,9 @@ pub enum ClassConstraint<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ClassItemQualifier<'a> {
|
||||
Static(Symbol<'a>),
|
||||
Protected(Symbol<'a>),
|
||||
Local(Symbol<'a>),
|
||||
Static(Keyword<'a>),
|
||||
Protected(Keyword<'a>),
|
||||
Local(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -154,14 +154,14 @@ pub enum PropertyQualifier<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum RandomQualifier<'a> {
|
||||
Rand(Symbol<'a>),
|
||||
Randc(Symbol<'a>),
|
||||
Rand(Keyword<'a>),
|
||||
Randc(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum MethodQualifier<'a> {
|
||||
Virtual(Symbol<'a>),
|
||||
PureVirtual((Symbol<'a>, Symbol<'a>)),
|
||||
Virtual(Keyword<'a>),
|
||||
PureVirtual((Keyword<'a>, Keyword<'a>)),
|
||||
ClassItemQualifier(ClassItemQualifier<'a>),
|
||||
}
|
||||
|
||||
@ -174,28 +174,28 @@ pub enum MethodPrototype<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ClassConstructorDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<ClassScope<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<TfPortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Vec<BlockItemDeclaration<'a>>,
|
||||
Option<(
|
||||
Keyword<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, ListOfArguments<'a>>>,
|
||||
Symbol<'a>,
|
||||
)>,
|
||||
Vec<FunctionStatementOrNull<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, New<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct New<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -11,13 +11,13 @@ use nom::IResult;
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ConfigDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ConfigIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
Vec<(LocalParameterDeclaration<'a>, Symbol<'a>)>,
|
||||
DesignStatement<'a>,
|
||||
Vec<ConfigRuleStatement<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ConfigIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -25,7 +25,7 @@ pub struct ConfigDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DesignStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Vec<(
|
||||
Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
|
||||
CellIdentifier<'a>,
|
||||
@ -70,12 +70,12 @@ pub struct ConfigRuleStatementCellUse<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct DefaultClause<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InstClause<'a> {
|
||||
pub nodes: (Symbol<'a>, InstName<'a>),
|
||||
pub nodes: (Keyword<'a>, InstName<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -89,7 +89,7 @@ pub struct InstName<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CellClause<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
|
||||
CellIdentifier<'a>,
|
||||
),
|
||||
@ -97,7 +97,7 @@ pub struct CellClause<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LiblistClause<'a> {
|
||||
pub nodes: (Symbol<'a>, Vec<LibraryIdentifier<'a>>),
|
||||
pub nodes: (Keyword<'a>, Vec<LibraryIdentifier<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -110,7 +110,7 @@ pub enum UseClause<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UseClauseCell<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
|
||||
CellIdentifier<'a>,
|
||||
Option<(Symbol<'a>, Config<'a>)>,
|
||||
@ -120,7 +120,7 @@ pub struct UseClauseCell<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UseClauseNamed<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
List<Symbol<'a>, NamedParameterAssignment<'a>>,
|
||||
Option<(Symbol<'a>, Config<'a>)>,
|
||||
),
|
||||
@ -129,7 +129,7 @@ pub struct UseClauseNamed<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UseClauseCellNamed<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
|
||||
CellIdentifier<'a>,
|
||||
List<Symbol<'a>, NamedParameterAssignment<'a>>,
|
||||
@ -139,7 +139,7 @@ pub struct UseClauseCellNamed<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Config<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -12,7 +12,7 @@ use nom::IResult;
|
||||
pub struct ConstraintDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Option<Static<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ConstraintIdentifier<'a>,
|
||||
ConstraintBlock<'a>,
|
||||
),
|
||||
@ -20,7 +20,7 @@ pub struct ConstraintDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Static<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -37,9 +37,9 @@ pub enum ConstraintBlockItem<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ConstraintBlockItemSolve<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
SolveBeforeList<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
SolveBeforeList<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -76,7 +76,7 @@ pub struct ConstraintExpressionExpression<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Soft<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -87,17 +87,17 @@ pub struct ConstraintExpressionArrow<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ConstraintExpressionIf<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, Expression<'a>>,
|
||||
ConstraintSet<'a>,
|
||||
Option<(Symbol<'a>, ConstraintSet<'a>)>,
|
||||
Option<(Keyword<'a>, ConstraintSet<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ConstraintExpressionForeach<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -111,12 +111,12 @@ pub struct ConstraintExpressionForeach<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ConstraintExpressionDisable<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, ConstraintPrimary<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, ConstraintPrimary<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UniquenessConstraint<'a> {
|
||||
pub nodes: (Symbol<'a>, Brace<'a, OpenRangeList<'a>>),
|
||||
pub nodes: (Keyword<'a>, Brace<'a, OpenRangeList<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -161,7 +161,7 @@ pub struct ConstraintPrototype<'a> {
|
||||
pub nodes: (
|
||||
Option<ConstraintPrototypeQualifier<'a>>,
|
||||
Option<Static<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ConstraintIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -169,15 +169,15 @@ pub struct ConstraintPrototype<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ConstraintPrototypeQualifier<'a> {
|
||||
Extern(Symbol<'a>),
|
||||
Pure(Symbol<'a>),
|
||||
Extern(Keyword<'a>),
|
||||
Pure(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ExternConstraintDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Option<Static<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ClassScope<'a>,
|
||||
ConstraintIdentifier<'a>,
|
||||
ConstraintBlock<'a>,
|
||||
|
@ -32,12 +32,12 @@ pub enum ExternTfDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ExternTfDeclarationMethod<'a> {
|
||||
pub nodes: (Symbol<'a>, MethodPrototype<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, MethodPrototype<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ExternTfDeclarationTask<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, TaskPrototype<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, TaskPrototype<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -24,17 +24,17 @@ pub enum LibraryDescription<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LibraryDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
LibraryIdentifier<'a>,
|
||||
List<Symbol<'a>, FilePathSpec<'a>>,
|
||||
Option<(Symbol<'a>, List<Symbol<'a>, FilePathSpec<'a>>)>,
|
||||
Option<(Keyword<'a>, List<Symbol<'a>, FilePathSpec<'a>>)>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct IncludeStatement<'a> {
|
||||
pub nodes: (Symbol<'a>, FilePathSpec<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, FilePathSpec<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -19,7 +19,7 @@ pub enum ElaborationSystemTask<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ElaborationSystemTaskFatal<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, (FinishNumber<'a>, Option<(Symbol<'a>, ListOfArguments<'a>)>)>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -28,7 +28,7 @@ pub struct ElaborationSystemTaskFatal<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ElaborationSystemTaskError<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<ListOfArguments<'a>>>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -37,7 +37,7 @@ pub struct ElaborationSystemTaskError<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ElaborationSystemTaskWarning<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<ListOfArguments<'a>>>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -46,7 +46,7 @@ pub struct ElaborationSystemTaskWarning<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ElaborationSystemTaskInfo<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Paren<'a, Option<ListOfArguments<'a>>>>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -127,15 +127,15 @@ pub enum ModuleOrGenerateItemDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModuleOrGenerateItemDeclarationClocking<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, ClockingIdentifier<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, ClockingIdentifier<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModuleOrGenerateItemDeclarationDisable<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
ExpressionOrDist<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -160,7 +160,7 @@ pub struct NonPortModuleItemSpecparam<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ParameterOverride<'a> {
|
||||
pub nodes: (Symbol<'a>, ListOfDefparamAssignments<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, ListOfDefparamAssignments<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -172,7 +172,7 @@ pub enum BindDirective<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct BindDirectiveScope<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
BindTargetScope<'a>,
|
||||
Option<(Symbol<'a>, BindTargetInstanceList<'a>)>,
|
||||
BindInstantiation<'a>,
|
||||
@ -183,7 +183,7 @@ pub struct BindDirectiveScope<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct BindDirectiveInstance<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
BindTargetInstance<'a>,
|
||||
BindInstantiation<'a>,
|
||||
Symbol<'a>,
|
||||
|
@ -52,7 +52,7 @@ pub struct ParameterPortDeclarationParamList<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ParameterPortDeclarationTypeList<'a> {
|
||||
pub nodes: (Symbol<'a>, ListOfTypeAssignments<'a>),
|
||||
pub nodes: (Keyword<'a>, ListOfTypeAssignments<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -139,10 +139,10 @@ pub struct PortReference<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum PortDirection<'a> {
|
||||
Input(Symbol<'a>),
|
||||
Output(Symbol<'a>),
|
||||
Inout(Symbol<'a>),
|
||||
Ref(Symbol<'a>),
|
||||
Input(Keyword<'a>),
|
||||
Output(Keyword<'a>),
|
||||
Inout(Keyword<'a>),
|
||||
Ref(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -171,7 +171,7 @@ pub struct InterfacePortHeaderIdentifier<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfacePortHeaderInterface<'a> {
|
||||
pub nodes: (Symbol<'a>, Option<(Symbol<'a>, ModportIdentifier<'a>)>),
|
||||
pub nodes: (Keyword<'a>, Option<(Symbol<'a>, ModportIdentifier<'a>)>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -37,10 +37,10 @@ pub enum PackageOrGenerateItemDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct AnonymousProgram<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Symbol<'a>,
|
||||
Vec<AnonymousProgramItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ pub struct ModuleDeclarationNonansi<'a> {
|
||||
ModuleNonansiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<ModuleItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -89,7 +89,7 @@ pub struct ModuleDeclarationAnsi<'a> {
|
||||
ModuleAnsiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<NonPortModuleItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -105,25 +105,25 @@ pub struct ModuleDeclarationWildcard<'a> {
|
||||
Symbol<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<ModuleItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModuleDeclarationExternNonansi<'a> {
|
||||
pub nodes: (Symbol<'a>, ModuleNonansiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, ModuleNonansiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ModuleDeclarationExternAnsi<'a> {
|
||||
pub nodes: (Symbol<'a>, ModuleAnsiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, ModuleAnsiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum ModuleKeyword<'a> {
|
||||
Module(Symbol<'a>),
|
||||
Macromodule(Symbol<'a>),
|
||||
Module(Keyword<'a>),
|
||||
Macromodule(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -141,7 +141,7 @@ pub struct InterfaceDeclarationNonansi<'a> {
|
||||
InterfaceNonansiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<InterfaceItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -152,7 +152,7 @@ pub struct InterfaceDeclarationAnsi<'a> {
|
||||
InterfaceAnsiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<NonPortInterfaceItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -161,33 +161,33 @@ pub struct InterfaceDeclarationAnsi<'a> {
|
||||
pub struct InterfaceDeclarationWildcard<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
InterfaceIdentifier<'a>,
|
||||
Paren<'a, Symbol<'a>>,
|
||||
Symbol<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<InterfaceItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfaceDeclarationExternNonansi<'a> {
|
||||
pub nodes: (Symbol<'a>, InterfaceNonansiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, InterfaceNonansiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfaceDeclarationExternAnsi<'a> {
|
||||
pub nodes: (Symbol<'a>, InterfaceAnsiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, InterfaceAnsiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfaceNonansiHeader<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
InterfaceIdentifier<'a>,
|
||||
Vec<PackageImportDeclaration<'a>>,
|
||||
@ -201,7 +201,7 @@ pub struct InterfaceNonansiHeader<'a> {
|
||||
pub struct InterfaceAnsiHeader<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
InterfaceIdentifier<'a>,
|
||||
Vec<PackageImportDeclaration<'a>>,
|
||||
@ -226,7 +226,7 @@ pub struct ProgramDeclarationNonansi<'a> {
|
||||
ProgramNonansiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<ProgramItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -237,7 +237,7 @@ pub struct ProgramDeclarationAnsi<'a> {
|
||||
ProgramAnsiHeader<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<NonPortProgramItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -246,32 +246,32 @@ pub struct ProgramDeclarationAnsi<'a> {
|
||||
pub struct ProgramDeclarationWildcard<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ProgramIdentifier<'a>,
|
||||
Paren<'a, Symbol<'a>>,
|
||||
Symbol<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<ProgramItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProgramDeclarationExternNonansi<'a> {
|
||||
pub nodes: (Symbol<'a>, ProgramNonansiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, ProgramNonansiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProgramDeclarationExternAnsi<'a> {
|
||||
pub nodes: (Symbol<'a>, ProgramAnsiHeader<'a>),
|
||||
pub nodes: (Keyword<'a>, ProgramAnsiHeader<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ProgramNonansiHeader<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
ProgramIdentifier<'a>,
|
||||
Vec<PackageImportDeclaration<'a>>,
|
||||
@ -285,7 +285,7 @@ pub struct ProgramNonansiHeader<'a> {
|
||||
pub struct ProgramAnsiHeader<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
ProgramIdentifier<'a>,
|
||||
Vec<PackageImportDeclaration<'a>>,
|
||||
@ -298,12 +298,12 @@ pub struct ProgramAnsiHeader<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CheckerDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
CheckerIdentifier<'a>,
|
||||
Option<Paren<'a, Option<CheckerPortList<'a>>>>,
|
||||
Symbol<'a>,
|
||||
Vec<(Vec<AttributeInstance<'a>>, CheckerOrGenerateItem<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, CheckerIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -312,26 +312,26 @@ pub struct CheckerDeclaration<'a> {
|
||||
pub struct ClassDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Option<Virtual<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
ClassIdentifier<'a>,
|
||||
Option<ParameterPortList<'a>>,
|
||||
Option<(
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ClassType<'a>,
|
||||
Option<Paren<'a, ListOfArguments<'a>>>,
|
||||
)>,
|
||||
Option<(Symbol<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
|
||||
Option<(Keyword<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
|
||||
Symbol<'a>,
|
||||
Vec<ClassItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ClassIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Virtual<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -342,14 +342,14 @@ pub struct InterfaceClassType<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfaceClassDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
ClassIdentifier<'a>,
|
||||
Option<ParameterPortList<'a>>,
|
||||
Option<(Symbol<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
|
||||
Option<(Keyword<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
|
||||
Symbol<'a>,
|
||||
Vec<InterfaceClassItem<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, ClassIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -370,20 +370,20 @@ pub struct InterfaceClassItemMethod<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InterfaceClassMethod<'a> {
|
||||
pub nodes: (Symbol<'a>, Symbol<'a>, MethodPrototype<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Keyword<'a>, MethodPrototype<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PackageDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<Lifetime<'a>>,
|
||||
PackageIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
Option<TimeunitsDeclaration<'a>>,
|
||||
Vec<(Vec<AttributeInstance<'a>>, PackageItem<'a>)>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, PackageIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -399,7 +399,7 @@ pub enum TimeunitsDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TimeunitsDeclarationTimeunit<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TimeLiteral<'a>,
|
||||
Option<(Symbol<'a>, TimeLiteral<'a>)>,
|
||||
Symbol<'a>,
|
||||
@ -408,16 +408,16 @@ pub struct TimeunitsDeclarationTimeunit<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TimeunitsDeclarationTimeprecision<'a> {
|
||||
pub nodes: (Symbol<'a>, TimeLiteral<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, TimeLiteral<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TimeLiteral<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TimeLiteral<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
@ -426,10 +426,10 @@ pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TimeunitsDeclarationTimeprecisionTimeunit<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TimeLiteral<'a>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
TimeLiteral<'a>,
|
||||
Symbol<'a>,
|
||||
),
|
||||
|
@ -9,7 +9,7 @@ use nom::IResult;
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SpecifyBlock<'a> {
|
||||
pub nodes: (Symbol<'a>, Vec<SpecifyItem<'a>>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, Vec<SpecifyItem<'a>>, Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -23,12 +23,12 @@ pub enum SpecifyItem<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PulsestyleDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ShowcancelledDeclaration<'a> {
|
||||
pub nodes: (Symbol<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
|
||||
pub nodes: (Keyword<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -111,9 +111,9 @@ pub struct DataSourceExpression<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum EdgeIdentifier<'a> {
|
||||
Posedge(Symbol<'a>),
|
||||
Negedge(Symbol<'a>),
|
||||
Edge(Symbol<'a>),
|
||||
Posedge(Keyword<'a>),
|
||||
Negedge(Keyword<'a>),
|
||||
Edge(Keyword<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -126,7 +126,7 @@ pub enum StateDependentPathDeclaration<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct StateDependentPathDeclarationIfSimple<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ModulePathExpression<'a>>,
|
||||
SimplePathDeclaration<'a>,
|
||||
),
|
||||
@ -135,7 +135,7 @@ pub struct StateDependentPathDeclarationIfSimple<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct StateDependentPathDeclarationIfEdgeSensitive<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<'a, ModulePathExpression<'a>>,
|
||||
EdgeSensitivePathDeclaration<'a>,
|
||||
),
|
||||
@ -143,7 +143,7 @@ pub struct StateDependentPathDeclarationIfEdgeSensitive<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct StateDependentPathDeclarationIfNone<'a> {
|
||||
pub nodes: (Symbol<'a>, SimplePathDeclaration<'a>),
|
||||
pub nodes: (Keyword<'a>, SimplePathDeclaration<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
|
@ -26,7 +26,7 @@ pub enum SystemTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SetupTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -45,7 +45,7 @@ pub struct SetupTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct HoldTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -64,7 +64,7 @@ pub struct HoldTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SetupholdTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -101,7 +101,7 @@ pub struct SetupholdTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RecoveryTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -120,7 +120,7 @@ pub struct RecoveryTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RemovalTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -139,7 +139,7 @@ pub struct RemovalTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct RecremTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -176,7 +176,7 @@ pub struct RecremTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct SkewTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -195,7 +195,7 @@ pub struct SkewTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct TimeskewTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -222,7 +222,7 @@ pub struct TimeskewTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct FullskewTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -251,7 +251,7 @@ pub struct FullskewTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct PeriodTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -268,7 +268,7 @@ pub struct PeriodTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct WidthTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
@ -287,7 +287,7 @@ pub struct WidthTimingCheck<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct NochargeTimingCheck<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Paren<
|
||||
'a,
|
||||
(
|
||||
|
@ -27,9 +27,9 @@ pub struct ControlledTimingCheckEvent<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum TimingCheckEventControl<'a> {
|
||||
Posedge(Symbol<'a>),
|
||||
Negedge(Symbol<'a>),
|
||||
Edge(Symbol<'a>),
|
||||
Posedge(Keyword<'a>),
|
||||
Negedge(Keyword<'a>),
|
||||
Edge(Keyword<'a>),
|
||||
EdgeControlSpecifier(EdgeControlSpecifier<'a>),
|
||||
}
|
||||
|
||||
@ -42,14 +42,14 @@ pub enum SpecifyTerminalDescriptor<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EdgeControlSpecifier<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Bracket<'a, List<Symbol<'a>, EdgeDescriptor<'a>>>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EdgeDescriptor<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -82,7 +82,7 @@ pub struct ScalarTimingCheckConditionBinary<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct ScalarConstant<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -17,10 +17,10 @@ pub enum UdpBody<'a> {
|
||||
#[derive(Debug, Node)]
|
||||
pub struct CombinationalBody<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
CombinationalEntry<'a>,
|
||||
Vec<CombinationalEntry<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
@ -33,17 +33,17 @@ pub struct CombinationalEntry<'a> {
|
||||
pub struct SequentialBody<'a> {
|
||||
pub nodes: (
|
||||
Option<UdpInitialStatement<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
SequentialEntry<'a>,
|
||||
Vec<SequentialEntry<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpInitialStatement<'a> {
|
||||
pub nodes: (
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
OutputPortIdentifier<'a>,
|
||||
Symbol<'a>,
|
||||
InitVal<'a>,
|
||||
@ -53,7 +53,7 @@ pub struct UdpInitialStatement<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct InitVal<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
@ -112,17 +112,17 @@ pub enum NextState<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct OutputSymbol<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct LevelSymbol<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct EdgeSymbol<'a> {
|
||||
pub nodes: (Symbol<'a>,),
|
||||
pub nodes: (Keyword<'a>,),
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -12,7 +12,7 @@ use nom::IResult;
|
||||
pub struct UdpNonansiDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
UdpIdentifier<'a>,
|
||||
Paren<'a, UdpPortList<'a>>,
|
||||
Symbol<'a>,
|
||||
@ -23,7 +23,7 @@ pub struct UdpNonansiDeclaration<'a> {
|
||||
pub struct UdpAnsiDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
UdpIdentifier<'a>,
|
||||
Paren<'a, UdpDeclarationPortList<'a>>,
|
||||
Symbol<'a>,
|
||||
@ -46,7 +46,7 @@ pub struct UdpDeclarationNonansi<'a> {
|
||||
UdpPortDeclaration<'a>,
|
||||
Vec<UdpPortDeclaration<'a>>,
|
||||
UdpBody<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, UdpIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
@ -56,32 +56,32 @@ pub struct UdpDeclarationAnsi<'a> {
|
||||
pub nodes: (
|
||||
UdpAnsiDeclaration<'a>,
|
||||
UdpBody<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, UdpIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpDeclarationExternNonansi<'a> {
|
||||
pub nodes: (Symbol<'a>, UdpNonansiDeclaration<'a>),
|
||||
pub nodes: (Keyword<'a>, UdpNonansiDeclaration<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpDeclarationExternAnsi<'a> {
|
||||
pub nodes: (Symbol<'a>, UdpAnsiDeclaration<'a>),
|
||||
pub nodes: (Keyword<'a>, UdpAnsiDeclaration<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpDeclarationWildcard<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
UdpIdentifier<'a>,
|
||||
Paren<'a, Symbol<'a>>,
|
||||
Symbol<'a>,
|
||||
Vec<UdpPortDeclaration<'a>>,
|
||||
UdpBody<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Option<(Symbol<'a>, UdpIdentifier<'a>)>,
|
||||
),
|
||||
}
|
||||
|
@ -41,15 +41,15 @@ pub enum UdpOutputDeclaration<'a> {
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpOutputDeclarationNonreg<'a> {
|
||||
pub nodes: (Vec<AttributeInstance<'a>>, Symbol<'a>, PortIdentifier<'a>),
|
||||
pub nodes: (Vec<AttributeInstance<'a>>, Keyword<'a>, PortIdentifier<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct UdpOutputDeclarationReg<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
Keyword<'a>,
|
||||
PortIdentifier<'a>,
|
||||
Option<(Symbol<'a>, ConstantExpression<'a>)>,
|
||||
),
|
||||
@ -59,7 +59,7 @@ pub struct UdpOutputDeclarationReg<'a> {
|
||||
pub struct UdpInputDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
ListOfUdpPortIdentifiers<'a>,
|
||||
),
|
||||
}
|
||||
@ -68,7 +68,7 @@ pub struct UdpInputDeclaration<'a> {
|
||||
pub struct UdpRegDeclaration<'a> {
|
||||
pub nodes: (
|
||||
Vec<AttributeInstance<'a>>,
|
||||
Symbol<'a>,
|
||||
Keyword<'a>,
|
||||
VariableIdentifier<'a>,
|
||||
),
|
||||
}
|
||||
|
@ -266,6 +266,11 @@ pub struct Symbol<'a> {
|
||||
pub nodes: (Span<'a>, Vec<WhiteSpace<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub struct Keyword<'a> {
|
||||
pub nodes: (Span<'a>, Vec<WhiteSpace<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Node)]
|
||||
pub enum WhiteSpace<'a> {
|
||||
Space(Span<'a>),
|
||||
@ -326,7 +331,7 @@ pub fn symbol<'a>(t: &'a str) -> impl Fn(Span<'a>) -> IResult<Span<'a>, Symbol<'
|
||||
}
|
||||
}
|
||||
|
||||
pub fn keyword<'a>(t: &'a str) -> impl Fn(Span<'a>) -> IResult<Span<'a>, Symbol<'a>> {
|
||||
pub fn keyword<'a>(t: &'a str) -> impl Fn(Span<'a>) -> IResult<Span<'a>, Keyword<'a>> {
|
||||
move |s: Span<'a>| {
|
||||
if cfg!(feature = "trace") {
|
||||
println!(
|
||||
@ -338,7 +343,7 @@ pub fn keyword<'a>(t: &'a str) -> impl Fn(Span<'a>) -> IResult<Span<'a>, Symbol<
|
||||
);
|
||||
}
|
||||
let (s, x) = map(ws(terminated(tag(t.clone()), peek(none_of(AZ09_)))), |x| {
|
||||
Symbol { nodes: x }
|
||||
Keyword { nodes: x }
|
||||
})(s)?;
|
||||
Ok((clear_recursive_flags(s), x))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user