Extract Keyword from Symbol

This commit is contained in:
dalance 2019-07-19 17:16:02 +09:00
parent d25b5ad733
commit c896f64f48
51 changed files with 568 additions and 554 deletions

View File

@ -43,17 +43,17 @@ pub enum SimpleImmediateAssertionStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SimpleImmediateAssertStatement<'a> { 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)] #[derive(Debug, Node)]
pub struct SimpleImmediateAssumeStatement<'a> { 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)] #[derive(Debug, Node)]
pub struct SimpleImmediateCoverStatement<'a> { 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)] #[derive(Debug, Node)]
@ -66,7 +66,7 @@ pub enum DeferredImmediateAssertionStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DeferredImmediateAssertStatement<'a> { pub struct DeferredImmediateAssertStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
AssertTiming<'a>, AssertTiming<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
ActionBlock<'a>, ActionBlock<'a>,
@ -76,7 +76,7 @@ pub struct DeferredImmediateAssertStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DeferredImmediateAssumeStatement<'a> { pub struct DeferredImmediateAssumeStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
AssertTiming<'a>, AssertTiming<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
ActionBlock<'a>, ActionBlock<'a>,
@ -86,7 +86,7 @@ pub struct DeferredImmediateAssumeStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DeferredImmediateCoverStatement<'a> { pub struct DeferredImmediateCoverStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
AssertTiming<'a>, AssertTiming<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
StatementOrNull<'a>, StatementOrNull<'a>,
@ -96,7 +96,7 @@ pub struct DeferredImmediateCoverStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum AssertTiming<'a> { pub enum AssertTiming<'a> {
Zero(Symbol<'a>), Zero(Symbol<'a>),
Final(Symbol<'a>), Final(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -23,7 +23,7 @@ pub struct CaseStatementNormal<'a> {
Paren<'a, CaseExpression<'a>>, Paren<'a, CaseExpression<'a>>,
CaseItem<'a>, CaseItem<'a>,
Vec<CaseItem<'a>>, Vec<CaseItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -33,10 +33,10 @@ pub struct CaseStatementMatches<'a> {
Option<UniquePriority<'a>>, Option<UniquePriority<'a>>,
CaseKeyword<'a>, CaseKeyword<'a>,
Paren<'a, CaseExpression<'a>>, Paren<'a, CaseExpression<'a>>,
Symbol<'a>, Keyword<'a>,
CasePatternItem<'a>, CasePatternItem<'a>,
Vec<CasePatternItem<'a>>, Vec<CasePatternItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -44,20 +44,20 @@ pub struct CaseStatementMatches<'a> {
pub struct CaseStatementInside<'a> { pub struct CaseStatementInside<'a> {
pub nodes: ( pub nodes: (
Option<UniquePriority<'a>>, Option<UniquePriority<'a>>,
Symbol<'a>, Keyword<'a>,
Paren<'a, CaseExpression<'a>>, Paren<'a, CaseExpression<'a>>,
Symbol<'a>, Keyword<'a>,
CaseInsideItem<'a>, CaseInsideItem<'a>,
Vec<CaseInsideItem<'a>>, Vec<CaseInsideItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum CaseKeyword<'a> { pub enum CaseKeyword<'a> {
Case(Symbol<'a>), Case(Keyword<'a>),
Casez(Symbol<'a>), Casez(Keyword<'a>),
Casex(Symbol<'a>), Casex(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -82,7 +82,7 @@ pub struct CaseItemNondefault<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CaseItemDefault<'a> { 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)] #[derive(Debug, Node)]
@ -120,10 +120,10 @@ pub struct CaseItemExpression<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RandcaseStatement<'a> { pub struct RandcaseStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
RandcaseItem<'a>, RandcaseItem<'a>,
Vec<RandcaseItem<'a>>, Vec<RandcaseItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }

View File

@ -18,30 +18,30 @@ pub enum ClockingDeclaration<'a> {
pub struct ClockingDeclarationLocal<'a> { pub struct ClockingDeclarationLocal<'a> {
pub nodes: ( pub nodes: (
Option<Default<'a>>, Option<Default<'a>>,
Symbol<'a>, Keyword<'a>,
Option<ClockingIdentifier<'a>>, Option<ClockingIdentifier<'a>>,
ClockingEvent<'a>, ClockingEvent<'a>,
Symbol<'a>, Symbol<'a>,
Vec<ClockingItem<'a>>, Vec<ClockingItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ClockingIdentifier<'a>)>, Option<(Symbol<'a>, ClockingIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Default<'a> { pub struct Default<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClockingDeclarationGlobal<'a> { pub struct ClockingDeclarationGlobal<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Option<ClockingIdentifier<'a>>, Option<ClockingIdentifier<'a>>,
ClockingEvent<'a>, ClockingEvent<'a>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ClockingIdentifier<'a>)>, Option<(Symbol<'a>, ClockingIdentifier<'a>)>,
), ),
} }
@ -71,7 +71,7 @@ pub enum ClockingItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClockingItemDefault<'a> { pub struct ClockingItemDefault<'a> {
pub nodes: (Symbol<'a>, DefaultSkew<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, DefaultSkew<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -97,17 +97,17 @@ pub enum DefaultSkew<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DefaultSkewInput<'a> { pub struct DefaultSkewInput<'a> {
pub nodes: (Symbol<'a>, ClockingSkew<'a>), pub nodes: (Keyword<'a>, ClockingSkew<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DefaultSkewOutput<'a> { pub struct DefaultSkewOutput<'a> {
pub nodes: (Symbol<'a>, ClockingSkew<'a>), pub nodes: (Keyword<'a>, ClockingSkew<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DefaultSkewInputOutput<'a> { 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)] #[derive(Debug, Node)]
@ -115,25 +115,25 @@ pub enum ClockingDirection<'a> {
Input(ClockingDirectionInput<'a>), Input(ClockingDirectionInput<'a>),
Output(ClockingDirectionOutput<'a>), Output(ClockingDirectionOutput<'a>),
InputOutput(ClockingDirectionInputOutput<'a>), InputOutput(ClockingDirectionInputOutput<'a>),
Inout(Symbol<'a>), Inout(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClockingDirectionInput<'a> { pub struct ClockingDirectionInput<'a> {
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>), pub nodes: (Keyword<'a>, Option<ClockingSkew<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClockingDirectionOutput<'a> { pub struct ClockingDirectionOutput<'a> {
pub nodes: (Symbol<'a>, Option<ClockingSkew<'a>>), pub nodes: (Keyword<'a>, Option<ClockingSkew<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClockingDirectionInputOutput<'a> { pub struct ClockingDirectionInputOutput<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<ClockingSkew<'a>>, Option<ClockingSkew<'a>>,
Symbol<'a>, Keyword<'a>,
Option<ClockingSkew<'a>>, Option<ClockingSkew<'a>>,
), ),
} }

View File

@ -12,24 +12,24 @@ use nom::IResult;
pub struct ConditionalStatement<'a> { pub struct ConditionalStatement<'a> {
pub nodes: ( pub nodes: (
Option<UniquePriority<'a>>, Option<UniquePriority<'a>>,
Symbol<'a>, Keyword<'a>,
Paren<'a, CondPredicate<'a>>, Paren<'a, CondPredicate<'a>>,
StatementOrNull<'a>, StatementOrNull<'a>,
Vec<( Vec<(
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, CondPredicate<'a>>, Paren<'a, CondPredicate<'a>>,
StatementOrNull<'a>, StatementOrNull<'a>,
)>, )>,
Option<(Symbol<'a>, StatementOrNull<'a>)>, Option<(Keyword<'a>, StatementOrNull<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum UniquePriority<'a> { pub enum UniquePriority<'a> {
Unique(Symbol<'a>), Unique(Keyword<'a>),
Unique0(Symbol<'a>), Unique0(Keyword<'a>),
Priority(Symbol<'a>), Priority(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -45,7 +45,7 @@ pub enum ExpressionOrCondPattern<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CondPattern<'a> { pub struct CondPattern<'a> {
pub nodes: (Expression<'a>, Symbol<'a>, Pattern<'a>), pub nodes: (Expression<'a>, Keyword<'a>, Pattern<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@ pub enum ContinuousAssign<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ContinuousAssignNet<'a> { pub struct ContinuousAssignNet<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<DriveStrength<'a>>, Option<DriveStrength<'a>>,
Option<Delay3<'a>>, Option<Delay3<'a>>,
ListOfNetAssignments<'a>, ListOfNetAssignments<'a>,
@ -26,7 +26,7 @@ pub struct ContinuousAssignNet<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ContinuousAssignVariable<'a> { pub struct ContinuousAssignVariable<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<DelayControl<'a>>, Option<DelayControl<'a>>,
ListOfVariableAssignments<'a>, ListOfVariableAssignments<'a>,
Symbol<'a>, Symbol<'a>,
@ -46,7 +46,7 @@ pub struct ListOfVariableAssignments<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NetAlias<'a> { pub struct NetAlias<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
NetLvalue<'a>, NetLvalue<'a>,
Symbol<'a>, Symbol<'a>,
List<Symbol<'a>, NetLvalue<'a>>, List<Symbol<'a>, NetLvalue<'a>>,

View File

@ -19,23 +19,23 @@ pub enum LoopStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LoopStatementForever<'a> { pub struct LoopStatementForever<'a> {
pub nodes: (Symbol<'a>, StatementOrNull<'a>), pub nodes: (Keyword<'a>, StatementOrNull<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LoopStatementRepeat<'a> { 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)] #[derive(Debug, Node)]
pub struct LoopStatementWhile<'a> { 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)] #[derive(Debug, Node)]
pub struct LoopStatementFor<'a> { pub struct LoopStatementFor<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -53,9 +53,9 @@ pub struct LoopStatementFor<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LoopStatementDoWhile<'a> { pub struct LoopStatementDoWhile<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
StatementOrNull<'a>, StatementOrNull<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -64,7 +64,7 @@ pub struct LoopStatementDoWhile<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LoopStatementForeach<'a> { pub struct LoopStatementForeach<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -98,7 +98,7 @@ pub struct ForVariableDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Var<'a> { pub struct Var<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -16,17 +16,17 @@ pub enum ActionBlock<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ActionBlockElse<'a> { pub struct ActionBlockElse<'a> {
pub nodes: (Option<Statement<'a>>, Symbol<'a>, StatementOrNull<'a>), pub nodes: (Option<Statement<'a>>, Keyword<'a>, StatementOrNull<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SeqBlock<'a> { pub struct SeqBlock<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, BlockIdentifier<'a>)>, Option<(Symbol<'a>, BlockIdentifier<'a>)>,
Vec<BlockItemDeclaration<'a>>, Vec<BlockItemDeclaration<'a>>,
Vec<StatementOrNull<'a>>, Vec<StatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, BlockIdentifier<'a>)>, Option<(Symbol<'a>, BlockIdentifier<'a>)>,
), ),
} }
@ -34,7 +34,7 @@ pub struct SeqBlock<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ParBlock<'a> { pub struct ParBlock<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, BlockIdentifier<'a>)>, Option<(Symbol<'a>, BlockIdentifier<'a>)>,
Vec<BlockItemDeclaration<'a>>, Vec<BlockItemDeclaration<'a>>,
Vec<StatementOrNull<'a>>, Vec<StatementOrNull<'a>>,
@ -45,9 +45,9 @@ pub struct ParBlock<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum JoinKeyword<'a> { pub enum JoinKeyword<'a> {
Join(Symbol<'a>), Join(Keyword<'a>),
JoinAny(Symbol<'a>), JoinAny(Keyword<'a>),
JoinNone(Symbol<'a>), JoinNone(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@ pub struct PatternVariable<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PatternTagged<'a> { 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)] #[derive(Debug, Node)]
@ -96,7 +96,7 @@ pub enum ArrayPatternKey<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum AssignmentPatternKey<'a> { pub enum AssignmentPatternKey<'a> {
SimpleType(SimpleType<'a>), SimpleType(SimpleType<'a>),
Default(Symbol<'a>), Default(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -8,7 +8,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InitialConstruct<'a> { pub struct InitialConstruct<'a> {
pub nodes: (Symbol<'a>, StatementOrNull<'a>), pub nodes: (Keyword<'a>, StatementOrNull<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -18,15 +18,15 @@ pub struct AlwaysConstruct<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum AlwaysKeyword<'a> { pub enum AlwaysKeyword<'a> {
Always(Symbol<'a>), Always(Keyword<'a>),
AlwaysComb(Symbol<'a>), AlwaysComb(Keyword<'a>),
AlwaysLatch(Symbol<'a>), AlwaysLatch(Keyword<'a>),
AlwaysFf(Symbol<'a>), AlwaysFf(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct FinalConstruct<'a> { pub struct FinalConstruct<'a> {
pub nodes: (Symbol<'a>, FunctionStatement<'a>), pub nodes: (Keyword<'a>, FunctionStatement<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -95,32 +95,32 @@ pub enum ProceduralContinuousAssignment<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentAssign<'a> { pub struct ProceduralContinuousAssignmentAssign<'a> {
pub nodes: (Symbol<'a>, VariableAssignment<'a>), pub nodes: (Keyword<'a>, VariableAssignment<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentDeassign<'a> { pub struct ProceduralContinuousAssignmentDeassign<'a> {
pub nodes: (Symbol<'a>, VariableLvalue<'a>), pub nodes: (Keyword<'a>, VariableLvalue<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentForceVariable<'a> { pub struct ProceduralContinuousAssignmentForceVariable<'a> {
pub nodes: (Symbol<'a>, VariableAssignment<'a>), pub nodes: (Keyword<'a>, VariableAssignment<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentForceNet<'a> { pub struct ProceduralContinuousAssignmentForceNet<'a> {
pub nodes: (Symbol<'a>, NetAssignment<'a>), pub nodes: (Keyword<'a>, NetAssignment<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentReleaseVariable<'a> { pub struct ProceduralContinuousAssignmentReleaseVariable<'a> {
pub nodes: (Symbol<'a>, VariableLvalue<'a>), pub nodes: (Keyword<'a>, VariableLvalue<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProceduralContinuousAssignmentReleaseNet<'a> { pub struct ProceduralContinuousAssignmentReleaseNet<'a> {
pub nodes: (Symbol<'a>, NetLvalue<'a>), pub nodes: (Keyword<'a>, NetLvalue<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -11,11 +11,11 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RandsequenceStatement<'a> { pub struct RandsequenceStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, Option<ProductionIdentifier<'a>>>, Paren<'a, Option<ProductionIdentifier<'a>>>,
Production<'a>, Production<'a>,
Vec<Production<'a>>, Vec<Production<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -53,8 +53,8 @@ pub struct RsProductionListProd<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RsProductionListJoin<'a> { pub struct RsProductionListJoin<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Expression<'a>>>, Option<Paren<'a, Expression<'a>>>,
ProductionItem<'a>, ProductionItem<'a>,
ProductionItem<'a>, ProductionItem<'a>,
@ -99,26 +99,26 @@ pub struct ProductionItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RsIfElse<'a> { pub struct RsIfElse<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
ProductionItem<'a>, ProductionItem<'a>,
Option<(Symbol<'a>, ProductionItem<'a>)>, Option<(Keyword<'a>, ProductionItem<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RsRepeat<'a> { 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)] #[derive(Debug, Node)]
pub struct RsCase<'a> { pub struct RsCase<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, CaseExpression<'a>>, Paren<'a, CaseExpression<'a>>,
RsCaseItem<'a>, RsCaseItem<'a>,
Vec<RsCaseItem<'a>>, Vec<RsCaseItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -141,7 +141,7 @@ pub struct RsCaseItemNondefault<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RsCaseItemDefault<'a> { pub struct RsCaseItemDefault<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Symbol<'a>>, Option<Symbol<'a>>,
ProductionItem<'a>, ProductionItem<'a>,
Symbol<'a>, Symbol<'a>,

View File

@ -16,7 +16,7 @@ pub enum SubroutineCallStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SubroutineCallStatementFunction<'a> { pub struct SubroutineCallStatementFunction<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Symbol<'a>,
Paren<'a, FunctionSubroutineCall<'a>>, Paren<'a, FunctionSubroutineCall<'a>>,
Symbol<'a>, Symbol<'a>,

View File

@ -21,7 +21,7 @@ pub enum DelayOrEventControl<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DelayOrEventControlRepeat<'a> { 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)] #[derive(Debug, Node)]
@ -88,18 +88,18 @@ pub struct EventExpressionExpression<'a> {
pub nodes: ( pub nodes: (
Option<EdgeIdentifier<'a>>, Option<EdgeIdentifier<'a>>,
Expression<'a>, Expression<'a>,
Option<(Symbol<'a>, Expression<'a>)>, Option<(Keyword<'a>, Expression<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EventExpressionSequence<'a> { pub struct EventExpressionSequence<'a> {
pub nodes: (SequenceInstance<'a>, Option<(Symbol<'a>, Expression<'a>)>), pub nodes: (SequenceInstance<'a>, Option<(Keyword<'a>, Expression<'a>)>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EventExpressionOr<'a> { pub struct EventExpressionOr<'a> {
pub nodes: (EventExpression<'a>, Symbol<'a>, EventExpression<'a>), pub nodes: (EventExpression<'a>, Keyword<'a>, EventExpression<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -128,17 +128,17 @@ pub enum JumpStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct JumpStatementReturn<'a> { 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)] #[derive(Debug, Node)]
pub struct JumpStatementBreak<'a> { pub struct JumpStatementBreak<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct JumpStatementContinue<'a> { pub struct JumpStatementContinue<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -150,18 +150,18 @@ pub enum WaitStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct WaitStatementWait<'a> { 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)] #[derive(Debug, Node)]
pub struct WaitStatementFork<'a> { pub struct WaitStatementFork<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct WaitStatementOrder<'a> { pub struct WaitStatementOrder<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, List<Symbol<'a>, HierarchicalIdentifier<'a>>>, Paren<'a, List<Symbol<'a>, HierarchicalIdentifier<'a>>>,
ActionBlock<'a>, ActionBlock<'a>,
), ),
@ -197,17 +197,17 @@ pub enum DisableStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DisableStatementTask<'a> { pub struct DisableStatementTask<'a> {
pub nodes: (Symbol<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, HierarchicalTaskIdentifier<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DisableStatementBlock<'a> { pub struct DisableStatementBlock<'a> {
pub nodes: (Symbol<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, HierarchicalBlockIdentifier<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DisableStatementFork<'a> { pub struct DisableStatementFork<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Keyword<'a>, Symbol<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -34,8 +34,8 @@ pub enum ConcurrentAssertionStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct AssertPropertyStatement<'a> { pub struct AssertPropertyStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, PropertySpec<'a>>, Paren<'a, PropertySpec<'a>>,
ActionBlock<'a>, ActionBlock<'a>,
), ),
@ -44,8 +44,8 @@ pub struct AssertPropertyStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct AssumePropertyStatement<'a> { pub struct AssumePropertyStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, PropertySpec<'a>>, Paren<'a, PropertySpec<'a>>,
ActionBlock<'a>, ActionBlock<'a>,
), ),
@ -54,8 +54,8 @@ pub struct AssumePropertyStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CoverPropertyStatement<'a> { pub struct CoverPropertyStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, PropertySpec<'a>>, Paren<'a, PropertySpec<'a>>,
StatementOrNull<'a>, StatementOrNull<'a>,
), ),
@ -63,19 +63,19 @@ pub struct CoverPropertyStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ExpectPropertyStatement<'a> { 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)] #[derive(Debug, Node)]
pub struct CoverSequenceStatement<'a> { pub struct CoverSequenceStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
Option<ClockingEvent<'a>>, Option<ClockingEvent<'a>>,
Option<(Symbol<'a>, Symbol<'a>, Paren<'a, ExpressionOrDist<'a>>)>, Option<(Keyword<'a>, Keyword<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
SequenceExpr<'a>, SequenceExpr<'a>,
), ),
>, >,
@ -86,8 +86,8 @@ pub struct CoverSequenceStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RestrictPropertyStatement<'a> { pub struct RestrictPropertyStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, PropertySpec<'a>>, Paren<'a, PropertySpec<'a>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -150,14 +150,14 @@ pub enum AssertionItemDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyDeclaration<'a> { pub struct PropertyDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
PropertyIdentifier<'a>, PropertyIdentifier<'a>,
Option<Paren<'a, Option<PropertyPortList<'a>>>>, Option<Paren<'a, Option<PropertyPortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
Vec<AssertionVariableDeclaration<'a>>, Vec<AssertionVariableDeclaration<'a>>,
PropertySpec<'a>, PropertySpec<'a>,
Option<Symbol<'a>>, Option<Symbol<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, PropertyIdentifier<'a>)>, Option<(Symbol<'a>, PropertyIdentifier<'a>)>,
), ),
} }
@ -181,20 +181,20 @@ pub struct PropertyPortItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum PropertyLvarPortDirection<'a> { pub enum PropertyLvarPortDirection<'a> {
Input(Symbol<'a>), Input(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum PropertyFormalType<'a> { pub enum PropertyFormalType<'a> {
SequenceFormalType(SequenceFormalType<'a>), SequenceFormalType(SequenceFormalType<'a>),
Property(Symbol<'a>), Property(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertySpec<'a> { pub struct PropertySpec<'a> {
pub nodes: ( pub nodes: (
Option<ClockingEvent<'a>>, Option<ClockingEvent<'a>>,
Option<(Symbol<'a>, Symbol<'a>, Paren<'a, ExpressionOrDist<'a>>)>, Option<(Keyword<'a>, Keyword<'a>, Paren<'a, ExpressionOrDist<'a>>)>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
} }
@ -236,12 +236,12 @@ pub enum PropertyExpr<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprStrong<'a> { pub struct PropertyExprStrong<'a> {
pub nodes: (Symbol<'a>, Paren<'a, SequenceExpr<'a>>), pub nodes: (Keyword<'a>, Paren<'a, SequenceExpr<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprWeak<'a> { pub struct PropertyExprWeak<'a> {
pub nodes: (Symbol<'a>, Paren<'a, SequenceExpr<'a>>), pub nodes: (Keyword<'a>, Paren<'a, SequenceExpr<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -251,17 +251,17 @@ pub struct PropertyExprParen<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprNot<'a> { pub struct PropertyExprNot<'a> {
pub nodes: (Symbol<'a>, PropertyExpr<'a>), pub nodes: (Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprOr<'a> { pub struct PropertyExprOr<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprAnd<'a> { pub struct PropertyExprAnd<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -277,21 +277,21 @@ pub struct PropertyExprImplicationNonoverlapped<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprIf<'a> { pub struct PropertyExprIf<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
Option<(Symbol<'a>, PropertyExpr<'a>)>, Option<(Keyword<'a>, PropertyExpr<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprCase<'a> { pub struct PropertyExprCase<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyCaseItem<'a>, PropertyCaseItem<'a>,
Vec<PropertyCaseItem<'a>>, Vec<PropertyCaseItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -308,7 +308,7 @@ pub struct PropertyExprFollowedByNonoverlapped<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprNexttime<'a> { pub struct PropertyExprNexttime<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Bracket<'a, ConstantExpression<'a>>>, Option<Bracket<'a, ConstantExpression<'a>>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -317,7 +317,7 @@ pub struct PropertyExprNexttime<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSNexttime<'a> { pub struct PropertyExprSNexttime<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Bracket<'a, ConstantExpression<'a>>>, Option<Bracket<'a, ConstantExpression<'a>>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -326,7 +326,7 @@ pub struct PropertyExprSNexttime<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprAlways<'a> { pub struct PropertyExprAlways<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>, Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -335,7 +335,7 @@ pub struct PropertyExprAlways<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSAlways<'a> { pub struct PropertyExprSAlways<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Bracket<'a, CycleDelayConstRangeExpression<'a>>, Bracket<'a, CycleDelayConstRangeExpression<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -343,13 +343,17 @@ pub struct PropertyExprSAlways<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprEventually<'a> { 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)] #[derive(Debug, Node)]
pub struct PropertyExprSEventually<'a> { pub struct PropertyExprSEventually<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>, Option<Bracket<'a, CycleDelayConstRangeExpression<'a>>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -357,38 +361,38 @@ pub struct PropertyExprSEventually<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprUntil<'a> { pub struct PropertyExprUntil<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSUntil<'a> { pub struct PropertyExprSUntil<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprUntilWith<'a> { pub struct PropertyExprUntilWith<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSUntilWith<'a> { pub struct PropertyExprSUntilWith<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprImplies<'a> { pub struct PropertyExprImplies<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprIff<'a> { pub struct PropertyExprIff<'a> {
pub nodes: (PropertyExpr<'a>, Symbol<'a>, PropertyExpr<'a>), pub nodes: (PropertyExpr<'a>, Keyword<'a>, PropertyExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprAcceptOn<'a> { pub struct PropertyExprAcceptOn<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -397,7 +401,7 @@ pub struct PropertyExprAcceptOn<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprRejectOn<'a> { pub struct PropertyExprRejectOn<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -406,7 +410,7 @@ pub struct PropertyExprRejectOn<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSyncAcceptOn<'a> { pub struct PropertyExprSyncAcceptOn<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -415,7 +419,7 @@ pub struct PropertyExprSyncAcceptOn<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyExprSyncRejectOn<'a> { pub struct PropertyExprSyncRejectOn<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ExpressionOrDist<'a>>, Paren<'a, ExpressionOrDist<'a>>,
PropertyExpr<'a>, PropertyExpr<'a>,
), ),
@ -444,20 +448,25 @@ pub struct PropertyCaseItemNondefault<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PropertyCaseItemDefault<'a> { 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)] #[derive(Debug, Node)]
pub struct SequenceDeclaration<'a> { pub struct SequenceDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
SequenceIdentifier<'a>, SequenceIdentifier<'a>,
Option<Paren<'a, Option<SequencePortList<'a>>>>, Option<Paren<'a, Option<SequencePortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
Vec<AssertionVariableDeclaration<'a>>, Vec<AssertionVariableDeclaration<'a>>,
SequenceExpr<'a>, SequenceExpr<'a>,
Option<Symbol<'a>>, Option<Symbol<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, SequenceIdentifier<'a>)>, Option<(Symbol<'a>, SequenceIdentifier<'a>)>,
), ),
} }
@ -481,16 +490,16 @@ pub struct SequencePortItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum SequenceLvarPortDirection<'a> { pub enum SequenceLvarPortDirection<'a> {
Input(Symbol<'a>), Input(Keyword<'a>),
Inout(Symbol<'a>), Inout(Keyword<'a>),
Output(Symbol<'a>), Output(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum SequenceFormalType<'a> { pub enum SequenceFormalType<'a> {
DataTypeOrImplicit(DataTypeOrImplicit<'a>), DataTypeOrImplicit(DataTypeOrImplicit<'a>),
Sequence(Symbol<'a>), Sequence(Keyword<'a>),
Untyped(Symbol<'a>), Untyped(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -548,35 +557,35 @@ pub struct SequenceExprParen<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprAnd<'a> { pub struct SequenceExprAnd<'a> {
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>), pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprIntersect<'a> { pub struct SequenceExprIntersect<'a> {
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>), pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprOr<'a> { pub struct SequenceExprOr<'a> {
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>), pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprFirstMatch<'a> { pub struct SequenceExprFirstMatch<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, (SequenceExpr<'a>, Vec<(Symbol<'a>, SequenceMatchItem<'a>)>)>, Paren<'a, (SequenceExpr<'a>, Vec<(Symbol<'a>, SequenceMatchItem<'a>)>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprThroughout<'a> { pub struct SequenceExprThroughout<'a> {
pub nodes: (ExpressionOrDist<'a>, Symbol<'a>, SequenceExpr<'a>), pub nodes: (ExpressionOrDist<'a>, Keyword<'a>, SequenceExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SequenceExprWithin<'a> { pub struct SequenceExprWithin<'a> {
pub nodes: (SequenceExpr<'a>, Symbol<'a>, SequenceExpr<'a>), pub nodes: (SequenceExpr<'a>, Keyword<'a>, SequenceExpr<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -741,7 +750,7 @@ pub struct CycleDelayConstRangeExpressionDollar<'a> {
pub struct ExpressionOrDist<'a> { pub struct ExpressionOrDist<'a> {
pub nodes: ( pub nodes: (
Expression<'a>, Expression<'a>,
Option<(Symbol<'a>, Brace<'a, DistList<'a>>)>, Option<(Keyword<'a>, Brace<'a, DistList<'a>>)>,
), ),
} }

View File

@ -11,13 +11,13 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CovergroupDeclaration<'a> { pub struct CovergroupDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
CovergroupIdentifier<'a>, CovergroupIdentifier<'a>,
Option<Paren<'a, Option<TfPortList<'a>>>>, Option<Paren<'a, Option<TfPortList<'a>>>>,
Option<CoverageEvent<'a>>, Option<CoverageEvent<'a>>,
Symbol<'a>, Symbol<'a>,
Vec<CoverageSpecOrOption<'a>>, Vec<CoverageSpecOrOption<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, CovergroupIdentifier<'a>)>, Option<(Symbol<'a>, CovergroupIdentifier<'a>)>,
), ),
} }
@ -47,7 +47,7 @@ pub enum CoverageOption<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CoverageOptionOption<'a> { pub struct CoverageOptionOption<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Symbol<'a>,
MemberIdentifier<'a>, MemberIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
@ -58,7 +58,7 @@ pub struct CoverageOptionOption<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CoverageOptionTypeOption<'a> { pub struct CoverageOptionTypeOption<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Symbol<'a>,
MemberIdentifier<'a>, MemberIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
@ -82,9 +82,9 @@ pub enum CoverageEvent<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CoverageEventSample<'a> { pub struct CoverageEventSample<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, Option<TfPortList<'a>>>, Paren<'a, Option<TfPortList<'a>>>,
), ),
} }
@ -105,19 +105,19 @@ pub enum BlockEventExpression<'a> {
pub struct BlockEventExpressionOr<'a> { pub struct BlockEventExpressionOr<'a> {
pub nodes: ( pub nodes: (
BlockEventExpression<'a>, BlockEventExpression<'a>,
Symbol<'a>, Keyword<'a>,
BlockEventExpression<'a>, BlockEventExpression<'a>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct BlockEventExpressionBegin<'a> { pub struct BlockEventExpressionBegin<'a> {
pub nodes: (Symbol<'a>, HierarchicalBtfIdentifier<'a>), pub nodes: (Keyword<'a>, HierarchicalBtfIdentifier<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct BlockEventExpressionEnd<'a> { pub struct BlockEventExpressionEnd<'a> {
pub nodes: (Symbol<'a>, HierarchicalBtfIdentifier<'a>), pub nodes: (Keyword<'a>, HierarchicalBtfIdentifier<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -149,9 +149,9 @@ pub struct CoverPoint<'a> {
CoverPointIdentifier<'a>, CoverPointIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
)>, )>,
Symbol<'a>, Keyword<'a>,
Expression<'a>, Expression<'a>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
BinsOrEmpty<'a>, BinsOrEmpty<'a>,
), ),
} }
@ -195,14 +195,14 @@ pub struct BinsOrOptionsCovergroup<'a> {
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>, Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
Symbol<'a>, Symbol<'a>,
Brace<'a, CovergroupRangeList<'a>>, Brace<'a, CovergroupRangeList<'a>>,
Option<(Symbol<'a>, Paren<'a, WithCovergroupExpression<'a>>)>, Option<(Keyword<'a>, Paren<'a, WithCovergroupExpression<'a>>)>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Wildcard<'a> { pub struct Wildcard<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -214,9 +214,9 @@ pub struct BinsOrOptionsCoverPoint<'a> {
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>, Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
Symbol<'a>, Symbol<'a>,
CoverPointIdentifier<'a>, CoverPointIdentifier<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, WithCovergroupExpression<'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>>>>, Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
Symbol<'a>, Symbol<'a>,
SetCovergroupExpression<'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>)>, Option<(Symbol<'a>, Symbol<'a>)>,
Symbol<'a>, Symbol<'a>,
TransList<'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>, BinIdentifier<'a>,
Option<Bracket<'a, Option<CovergroupExpression<'a>>>>, Option<Bracket<'a, Option<CovergroupExpression<'a>>>>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
), ),
} }
@ -264,17 +264,17 @@ pub struct BinsOrOptionsDefaultSequence<'a> {
BinsKeyword<'a>, BinsKeyword<'a>,
BinIdentifier<'a>, BinIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum BinsKeyword<'a> { pub enum BinsKeyword<'a> {
Bins(Symbol<'a>), Bins(Keyword<'a>),
IllegalBins(Symbol<'a>), IllegalBins(Keyword<'a>),
IgnoreBins(Symbol<'a>), IgnoreBins(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -334,9 +334,9 @@ pub struct RepeatRangeBinary<'a> {
pub struct CoverCross<'a> { pub struct CoverCross<'a> {
pub nodes: ( pub nodes: (
Option<(CrossIdentifier<'a>, Symbol<'a>)>, Option<(CrossIdentifier<'a>, Symbol<'a>)>,
Symbol<'a>, Keyword<'a>,
ListOfCrossItems<'a>, ListOfCrossItems<'a>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
CrossBody<'a>, CrossBody<'a>,
), ),
} }
@ -392,7 +392,7 @@ pub struct BinsSelection<'a> {
BinIdentifier<'a>, BinIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
SelectExpression<'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 struct SelectExpressionWith<'a> {
pub nodes: ( pub nodes: (
SelectExpression<'a>, SelectExpression<'a>,
Symbol<'a>, Keyword<'a>,
Paren<'a, WithCovergroupExpression<'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 struct SelectExpressionCrossSet<'a> {
pub nodes: ( pub nodes: (
CrossSetExpression<'a>, CrossSetExpression<'a>,
Option<(Symbol<'a>, IntegerCovergroupExpression<'a>)>, Option<(Keyword<'a>, IntegerCovergroupExpression<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SelectCondition<'a> { pub struct SelectCondition<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, BinsExpression<'a>>, Paren<'a, BinsExpression<'a>>,
Option<(Symbol<'a>, Brace<'a, CovergroupRangeList<'a>>)>, Option<(Keyword<'a>, Brace<'a, CovergroupRangeList<'a>>)>,
), ),
} }

View File

@ -153,20 +153,20 @@ pub enum ClassNew<'a> {
pub struct ClassNewArgument<'a> { pub struct ClassNewArgument<'a> {
pub nodes: ( pub nodes: (
Option<ClassScope<'a>>, Option<ClassScope<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, ListOfArguments<'a>>>, Option<Paren<'a, ListOfArguments<'a>>>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassNewExpression<'a> { pub struct ClassNewExpression<'a> {
pub nodes: (Symbol<'a>, Expression<'a>), pub nodes: (Keyword<'a>, Expression<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DynamicArrayNew<'a> { pub struct DynamicArrayNew<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Bracket<'a, Expression<'a>>, Bracket<'a, Expression<'a>>,
Option<Paren<'a, Expression<'a>>>, Option<Paren<'a, Expression<'a>>>,
), ),

View File

@ -67,7 +67,7 @@ pub enum DelayValue<'a> {
RealNumber(RealNumber<'a>), RealNumber(RealNumber<'a>),
PsIdentifier(PsIdentifier<'a>), PsIdentifier(PsIdentifier<'a>),
TimeLiteral(TimeLiteral<'a>), TimeLiteral(TimeLiteral<'a>),
Step1(Symbol<'a>), Step1(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -17,7 +17,7 @@ pub enum FunctionDataTypeOrImplicit<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct FunctionDeclaration<'a> { pub struct FunctionDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
FunctionBodyDeclaration<'a>, FunctionBodyDeclaration<'a>,
), ),
@ -38,7 +38,7 @@ pub struct FunctionBodyDeclarationWithoutPort<'a> {
Symbol<'a>, Symbol<'a>,
Vec<TfItemDeclaration<'a>>, Vec<TfItemDeclaration<'a>>,
Vec<FunctionStatementOrNull<'a>>, Vec<FunctionStatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, FunctionIdentifier<'a>)>, Option<(Symbol<'a>, FunctionIdentifier<'a>)>,
), ),
} }
@ -53,7 +53,7 @@ pub struct FunctionBodyDeclarationWithPort<'a> {
Symbol<'a>, Symbol<'a>,
Vec<BlockItemDeclaration<'a>>, Vec<BlockItemDeclaration<'a>>,
Vec<FunctionStatementOrNull<'a>>, Vec<FunctionStatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, FunctionIdentifier<'a>)>, Option<(Symbol<'a>, FunctionIdentifier<'a>)>,
), ),
} }
@ -67,7 +67,7 @@ pub enum InterfaceIdentifierOrClassScope<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct FunctionPrototype<'a> { pub struct FunctionPrototype<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DataTypeOrVoid<'a>, DataTypeOrVoid<'a>,
FunctionIdentifier<'a>, FunctionIdentifier<'a>,
Option<Paren<'a, Option<TfPortList<'a>>>>, Option<Paren<'a, Option<TfPortList<'a>>>>,
@ -85,7 +85,7 @@ pub enum DpiImportExport<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DpiImportExportImportFunction<'a> { pub struct DpiImportExportImportFunction<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DpiSpecString<'a>, DpiSpecString<'a>,
Option<DpiFunctionImportProperty<'a>>, Option<DpiFunctionImportProperty<'a>>,
Option<(CIdentifier<'a>, Symbol<'a>)>, Option<(CIdentifier<'a>, Symbol<'a>)>,
@ -97,7 +97,7 @@ pub struct DpiImportExportImportFunction<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DpiImportExportImportTask<'a> { pub struct DpiImportExportImportTask<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DpiSpecString<'a>, DpiSpecString<'a>,
Option<DpiTaskImportProperty<'a>>, Option<DpiTaskImportProperty<'a>>,
Option<(CIdentifier<'a>, Symbol<'a>)>, Option<(CIdentifier<'a>, Symbol<'a>)>,
@ -109,10 +109,10 @@ pub struct DpiImportExportImportTask<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DpiImportExportExportFunction<'a> { pub struct DpiImportExportExportFunction<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DpiSpecString<'a>, DpiSpecString<'a>,
Option<(CIdentifier<'a>, Symbol<'a>)>, Option<(CIdentifier<'a>, Symbol<'a>)>,
Symbol<'a>, Keyword<'a>,
FunctionIdentifier<'a>, FunctionIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -121,10 +121,10 @@ pub struct DpiImportExportExportFunction<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DpiImportExportExportTask<'a> { pub struct DpiImportExportExportTask<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DpiSpecString<'a>, DpiSpecString<'a>,
Option<(CIdentifier<'a>, Symbol<'a>)>, Option<(CIdentifier<'a>, Symbol<'a>)>,
Symbol<'a>, Keyword<'a>,
TaskIdentifier<'a>, TaskIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -132,19 +132,19 @@ pub struct DpiImportExportExportTask<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum DpiSpecString<'a> { pub enum DpiSpecString<'a> {
DpiC(Symbol<'a>), DpiC(Keyword<'a>),
Dpi(Symbol<'a>), Dpi(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum DpiFunctionImportProperty<'a> { pub enum DpiFunctionImportProperty<'a> {
Context(Symbol<'a>), Context(Keyword<'a>),
Pure(Symbol<'a>), Pure(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum DpiTaskImportProperty<'a> { pub enum DpiTaskImportProperty<'a> {
Context(Symbol<'a>), Context(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -9,7 +9,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ModportDeclaration<'a> { 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)] #[derive(Debug, Node)]
@ -47,7 +47,7 @@ pub struct ModportPortsDeclaratonClocking<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ModportClockingDeclaration<'a> { pub struct ModportClockingDeclaration<'a> {
pub nodes: (Symbol<'a>, ClockingIdentifier<'a>), pub nodes: (Keyword<'a>, ClockingIdentifier<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -88,8 +88,8 @@ pub enum ModportTfPort<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ImportExport<'a> { pub enum ImportExport<'a> {
Import(Symbol<'a>), Import(Keyword<'a>),
Export(Symbol<'a>), Export(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LetDeclaration<'a> { pub struct LetDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
LetIdentifier<'a>, LetIdentifier<'a>,
Option<Paren<'a, Option<LetPortList<'a>>>>, Option<Paren<'a, Option<LetPortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
@ -44,7 +44,7 @@ pub struct LetPortItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum LetFormalType<'a> { pub enum LetFormalType<'a> {
DataTypeOrImplicit(DataTypeOrImplicit<'a>), DataTypeOrImplicit(DataTypeOrImplicit<'a>),
Untyped(Symbol<'a>), Untyped(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -15,7 +15,7 @@ pub enum LocalParameterDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LocalParameterDeclarationParam<'a> { pub struct LocalParameterDeclarationParam<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<DataTypeOrImplicit<'a>>, Option<DataTypeOrImplicit<'a>>,
ListOfParamAssignments<'a>, ListOfParamAssignments<'a>,
), ),
@ -23,7 +23,7 @@ pub struct LocalParameterDeclarationParam<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LocalParameterDeclarationType<'a> { pub struct LocalParameterDeclarationType<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>), pub nodes: (Keyword<'a>, Keyword<'a>, ListOfTypeAssignments<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -35,7 +35,7 @@ pub enum ParameterDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ParameterDeclarationParam<'a> { pub struct ParameterDeclarationParam<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<DataTypeOrImplicit<'a>>, Option<DataTypeOrImplicit<'a>>,
ListOfParamAssignments<'a>, ListOfParamAssignments<'a>,
), ),
@ -43,13 +43,13 @@ pub struct ParameterDeclarationParam<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ParameterDeclarationType<'a> { pub struct ParameterDeclarationType<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>, ListOfTypeAssignments<'a>), pub nodes: (Keyword<'a>, Keyword<'a>, ListOfTypeAssignments<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SpecparamDeclaration<'a> { pub struct SpecparamDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<PackedDimension<'a>>, Option<PackedDimension<'a>>,
ListOfSpecparamAssignments<'a>, ListOfSpecparamAssignments<'a>,
Symbol<'a>, Symbol<'a>,

View File

@ -13,8 +13,8 @@ pub enum CastingType<'a> {
SimpleType(Box<SimpleType<'a>>), SimpleType(Box<SimpleType<'a>>),
ConstantPrimary(Box<ConstantPrimary<'a>>), ConstantPrimary(Box<ConstantPrimary<'a>>),
Signing(Box<Signing<'a>>), Signing(Box<Signing<'a>>),
String(Symbol<'a>), String(Keyword<'a>),
Const(Symbol<'a>), Const(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -24,12 +24,12 @@ pub enum DataType<'a> {
NonIntegerType(NonIntegerType<'a>), NonIntegerType(NonIntegerType<'a>),
Union(Box<DataTypeUnion<'a>>), Union(Box<DataTypeUnion<'a>>),
Enum(DataTypeEnum<'a>), Enum(DataTypeEnum<'a>),
String(Symbol<'a>), String(Keyword<'a>),
Chandle(Symbol<'a>), Chandle(Keyword<'a>),
Virtual(DataTypeVirtual<'a>), Virtual(DataTypeVirtual<'a>),
Type(DataTypeType<'a>), Type(DataTypeType<'a>),
ClassType(ClassType<'a>), ClassType(ClassType<'a>),
Event(Symbol<'a>), Event(Keyword<'a>),
PsCovergroupIdentifier(PsCovergroupIdentifier<'a>), PsCovergroupIdentifier(PsCovergroupIdentifier<'a>),
TypeReference(Box<TypeReference<'a>>), TypeReference(Box<TypeReference<'a>>),
} }
@ -60,13 +60,13 @@ pub struct DataTypeUnion<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Packed<'a> { pub struct Packed<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DataTypeEnum<'a> { pub struct DataTypeEnum<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<EnumBaseType<'a>>, Option<EnumBaseType<'a>>,
Brace<'a, List<Symbol<'a>, EnumNameDeclaration<'a>>>, Brace<'a, List<Symbol<'a>, EnumNameDeclaration<'a>>>,
Vec<PackedDimension<'a>>, Vec<PackedDimension<'a>>,
@ -76,7 +76,7 @@ pub struct DataTypeEnum<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DataTypeVirtual<'a> { pub struct DataTypeVirtual<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Interface<'a>>, Option<Interface<'a>>,
InterfaceIdentifier<'a>, InterfaceIdentifier<'a>,
Option<ParameterValueAssignment<'a>>, Option<ParameterValueAssignment<'a>>,
@ -86,7 +86,7 @@ pub struct DataTypeVirtual<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Interface<'a> { pub struct Interface<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -170,42 +170,42 @@ pub enum IntegerType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum IntegerAtomType<'a> { pub enum IntegerAtomType<'a> {
Byte(Symbol<'a>), Byte(Keyword<'a>),
Shortint(Symbol<'a>), Shortint(Keyword<'a>),
Int(Symbol<'a>), Int(Keyword<'a>),
Longint(Symbol<'a>), Longint(Keyword<'a>),
Integer(Symbol<'a>), Integer(Keyword<'a>),
Time(Symbol<'a>), Time(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum IntegerVectorType<'a> { pub enum IntegerVectorType<'a> {
Bit(Symbol<'a>), Bit(Keyword<'a>),
Logic(Symbol<'a>), Logic(Keyword<'a>),
Reg(Symbol<'a>), Reg(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum NonIntegerType<'a> { pub enum NonIntegerType<'a> {
Shortreal(Symbol<'a>), Shortreal(Keyword<'a>),
Real(Symbol<'a>), Real(Keyword<'a>),
Realtime(Symbol<'a>), Realtime(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum NetType<'a> { pub enum NetType<'a> {
Supply0(Symbol<'a>), Supply0(Keyword<'a>),
Supply1(Symbol<'a>), Supply1(Keyword<'a>),
Tri(Symbol<'a>), Tri(Keyword<'a>),
Triand(Symbol<'a>), Triand(Keyword<'a>),
Trior(Symbol<'a>), Trior(Keyword<'a>),
Trireg(Symbol<'a>), Trireg(Keyword<'a>),
Tri0(Symbol<'a>), Tri0(Keyword<'a>),
Tri1(Symbol<'a>), Tri1(Keyword<'a>),
Uwire(Symbol<'a>), Uwire(Keyword<'a>),
Wire(Symbol<'a>), Wire(Keyword<'a>),
Wand(Symbol<'a>), Wand(Keyword<'a>),
Wor(Symbol<'a>), Wor(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -222,7 +222,7 @@ pub struct NetPortTypeDataType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NetPortTypeInterconnect<'a> { pub struct NetPortTypeInterconnect<'a> {
pub nodes: (Symbol<'a>, ImplicitDataType<'a>), pub nodes: (Keyword<'a>, ImplicitDataType<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -238,13 +238,13 @@ pub enum VarDataType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct VarDataTypeVar<'a> { pub struct VarDataTypeVar<'a> {
pub nodes: (Symbol<'a>, DataTypeOrImplicit<'a>), pub nodes: (Keyword<'a>, DataTypeOrImplicit<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum Signing<'a> { pub enum Signing<'a> {
Signed(Symbol<'a>), Signed(Keyword<'a>),
Unsigned(Symbol<'a>), Unsigned(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -269,14 +269,14 @@ pub struct StructUnionMember<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum DataTypeOrVoid<'a> { pub enum DataTypeOrVoid<'a> {
DataType(DataType<'a>), DataType(DataType<'a>),
Void(Symbol<'a>), Void(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum StructUnion<'a> { pub enum StructUnion<'a> {
Struct(Symbol<'a>), Struct(Keyword<'a>),
Union(Symbol<'a>), Union(Keyword<'a>),
UnionTagged((Symbol<'a>, Symbol<'a>)), UnionTagged((Keyword<'a>, Keyword<'a>)),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -287,12 +287,12 @@ pub enum TypeReference<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TypeReferenceExpression<'a> { pub struct TypeReferenceExpression<'a> {
pub nodes: (Symbol<'a>, Paren<'a, Expression<'a>>), pub nodes: (Keyword<'a>, Paren<'a, Expression<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TypeReferenceDataType<'a> { pub struct TypeReferenceDataType<'a> {
pub nodes: (Symbol<'a>, Paren<'a, DataType<'a>>), pub nodes: (Keyword<'a>, Paren<'a, DataType<'a>>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -10,7 +10,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InoutDeclaration<'a> { pub struct InoutDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<NetPortType<'a>>, Option<NetPortType<'a>>,
ListOfPortIdentifiers<'a>, ListOfPortIdentifiers<'a>,
), ),
@ -25,7 +25,7 @@ pub enum InputDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InputDeclarationNet<'a> { pub struct InputDeclarationNet<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<NetPortType<'a>>, Option<NetPortType<'a>>,
ListOfPortIdentifiers<'a>, ListOfPortIdentifiers<'a>,
), ),
@ -34,7 +34,7 @@ pub struct InputDeclarationNet<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InputDeclarationVariable<'a> { pub struct InputDeclarationVariable<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
VariablePortType<'a>, VariablePortType<'a>,
ListOfVariableIdentifiers<'a>, ListOfVariableIdentifiers<'a>,
), ),
@ -49,7 +49,7 @@ pub enum OutputDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct OutputDeclarationNet<'a> { pub struct OutputDeclarationNet<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<NetPortType<'a>>, Option<NetPortType<'a>>,
ListOfPortIdentifiers<'a>, ListOfPortIdentifiers<'a>,
), ),
@ -58,7 +58,7 @@ pub struct OutputDeclarationNet<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct OutputDeclarationVariable<'a> { pub struct OutputDeclarationVariable<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
VariablePortType<'a>, VariablePortType<'a>,
ListOfVariableIdentifiers<'a>, ListOfVariableIdentifiers<'a>,
), ),
@ -76,7 +76,7 @@ pub struct InterfacePortDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RefDeclaration<'a> { pub struct RefDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
VariablePortType<'a>, VariablePortType<'a>,
ListOfVariableIdentifiers<'a>, ListOfVariableIdentifiers<'a>,
), ),

View File

@ -28,38 +28,38 @@ pub struct DriveStrength10<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DriveStrength0z<'a> { 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)] #[derive(Debug, Node)]
pub struct DriveStrength1z<'a> { 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)] #[derive(Debug, Node)]
pub struct DriveStrengthz1<'a> { 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)] #[derive(Debug, Node)]
pub struct DriveStrengthz0<'a> { 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)] #[derive(Debug, Node)]
pub enum Strength0<'a> { pub enum Strength0<'a> {
Supply0(Symbol<'a>), Supply0(Keyword<'a>),
Strong0(Symbol<'a>), Strong0(Keyword<'a>),
Pull0(Symbol<'a>), Pull0(Keyword<'a>),
Weak0(Symbol<'a>), Weak0(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum Strength1<'a> { pub enum Strength1<'a> {
Supply1(Symbol<'a>), Supply1(Keyword<'a>),
Strong1(Symbol<'a>), Strong1(Keyword<'a>),
Pull1(Symbol<'a>), Pull1(Keyword<'a>),
Weak1(Symbol<'a>), Weak1(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -71,17 +71,17 @@ pub enum ChargeStrength<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ChargeStrengthSmall<'a> { pub struct ChargeStrengthSmall<'a> {
pub nodes: (Paren<'a, Symbol<'a>>,), pub nodes: (Paren<'a, Keyword<'a>>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ChargeStrengthMedium<'a> { pub struct ChargeStrengthMedium<'a> {
pub nodes: (Paren<'a, Symbol<'a>>,), pub nodes: (Paren<'a, Keyword<'a>>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ChargeStrengthLarge<'a> { pub struct ChargeStrengthLarge<'a> {
pub nodes: (Paren<'a, Symbol<'a>>,), pub nodes: (Paren<'a, Keyword<'a>>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -10,7 +10,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TaskDeclaration<'a> { 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)] #[derive(Debug, Node)]
@ -27,7 +27,7 @@ pub struct TaskBodyDeclarationWithoutPort<'a> {
Symbol<'a>, Symbol<'a>,
Vec<TfItemDeclaration<'a>>, Vec<TfItemDeclaration<'a>>,
Vec<StatementOrNull<'a>>, Vec<StatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, TaskIdentifier<'a>)>, Option<(Symbol<'a>, TaskIdentifier<'a>)>,
), ),
} }
@ -41,7 +41,7 @@ pub struct TaskBodyDeclarationWithPort<'a> {
Symbol<'a>, Symbol<'a>,
Vec<BlockItemDeclaration<'a>>, Vec<BlockItemDeclaration<'a>>,
Vec<StatementOrNull<'a>>, Vec<StatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, TaskIdentifier<'a>)>, Option<(Symbol<'a>, TaskIdentifier<'a>)>,
), ),
} }
@ -75,7 +75,7 @@ pub struct TfPortItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum TfPortDirection<'a> { pub enum TfPortDirection<'a> {
PortDirection(PortDirection<'a>), PortDirection(PortDirection<'a>),
ConstRef((Symbol<'a>, Symbol<'a>)), ConstRef((Keyword<'a>, Keyword<'a>)),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -93,7 +93,7 @@ pub struct TfPortDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TaskPrototype<'a> { pub struct TaskPrototype<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
TaskIdentifier<'a>, TaskIdentifier<'a>,
Option<Paren<'a, Option<TfPortList<'a>>>>, Option<Paren<'a, Option<TfPortList<'a>>>>,
), ),

View File

@ -30,13 +30,13 @@ pub struct DataDeclarationVariable<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Const<'a> { pub struct Const<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PackageImportDeclaration<'a> { pub struct PackageImportDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
List<Symbol<'a>, PackageImportItem<'a>>, List<Symbol<'a>, PackageImportItem<'a>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -66,13 +66,13 @@ pub enum PackageExportDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PackageExportDeclarationAsterisk<'a> { pub struct PackageExportDeclarationAsterisk<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PackageExportDeclarationItem<'a> { pub struct PackageExportDeclarationItem<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
List<Symbol<'a>, PackageImportItem<'a>>, List<Symbol<'a>, PackageImportItem<'a>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -80,7 +80,7 @@ pub struct PackageExportDeclarationItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct GenvarDeclaration<'a> { pub struct GenvarDeclaration<'a> {
pub nodes: (Symbol<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, ListOfGenvarIdentifiers<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -111,8 +111,8 @@ pub enum Strength<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum VectorScalar<'a> { pub enum VectorScalar<'a> {
Vectored(Symbol<'a>), Vectored(Keyword<'a>),
Scalared(Symbol<'a>), Scalared(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -128,7 +128,7 @@ pub struct NetDeclarationNetTypeIdentifier<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NetDeclarationInterconnect<'a> { pub struct NetDeclarationInterconnect<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
ImplicitDataType<'a>, ImplicitDataType<'a>,
Option<(Symbol<'a>, DelayValue<'a>)>, Option<(Symbol<'a>, DelayValue<'a>)>,
NetIdentifier<'a>, NetIdentifier<'a>,
@ -148,7 +148,7 @@ pub enum TypeDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TypeDeclarationDataType<'a> { pub struct TypeDeclarationDataType<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DataType<'a>, DataType<'a>,
TypeIdentifier<'a>, TypeIdentifier<'a>,
Vec<VariableDimension<'a>>, Vec<VariableDimension<'a>>,
@ -159,7 +159,7 @@ pub struct TypeDeclarationDataType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TypeDeclarationInterface<'a> { pub struct TypeDeclarationInterface<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
InterfaceInstanceIdentifier<'a>, InterfaceInstanceIdentifier<'a>,
ConstantBitSelect<'a>, ConstantBitSelect<'a>,
Symbol<'a>, Symbol<'a>,
@ -172,7 +172,7 @@ pub struct TypeDeclarationInterface<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TypeDeclarationReserved<'a> { pub struct TypeDeclarationReserved<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<TypeDeclarationKeyword<'a>>, Option<TypeDeclarationKeyword<'a>>,
TypeIdentifier<'a>, TypeIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
@ -181,11 +181,11 @@ pub struct TypeDeclarationReserved<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum TypeDeclarationKeyword<'a> { pub enum TypeDeclarationKeyword<'a> {
Enum(Symbol<'a>), Enum(Keyword<'a>),
Struct(Symbol<'a>), Struct(Keyword<'a>),
Union(Symbol<'a>), Union(Keyword<'a>),
Class(Symbol<'a>), Class(Keyword<'a>),
InterfaceClass((Symbol<'a>, Symbol<'a>)), InterfaceClass((Keyword<'a>, Keyword<'a>)),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -197,11 +197,11 @@ pub enum NetTypeDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NetTypeDeclarationDataType<'a> { pub struct NetTypeDeclarationDataType<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
DataType<'a>, DataType<'a>,
NetTypeIdentifier<'a>, NetTypeIdentifier<'a>,
Option<( Option<(
Symbol<'a>, Keyword<'a>,
Option<PackageScopeOrClassScope<'a>>, Option<PackageScopeOrClassScope<'a>>,
TfIdentifier<'a>, TfIdentifier<'a>,
)>, )>,
@ -212,7 +212,7 @@ pub struct NetTypeDeclarationDataType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NetTypeDeclarationNetType<'a> { pub struct NetTypeDeclarationNetType<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<PackageScopeOrClassScope<'a>>, Option<PackageScopeOrClassScope<'a>>,
NetTypeIdentifier<'a>, NetTypeIdentifier<'a>,
NetTypeIdentifier<'a>, NetTypeIdentifier<'a>,
@ -222,8 +222,8 @@ pub struct NetTypeDeclarationNetType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum Lifetime<'a> { pub enum Lifetime<'a> {
Static(Symbol<'a>), Static(Keyword<'a>),
Automatic(Symbol<'a>), Automatic(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -71,7 +71,7 @@ pub struct StreamConcatenation<'a> {
pub struct StreamExpression<'a> { pub struct StreamExpression<'a> {
pub nodes: ( pub nodes: (
Expression<'a>, Expression<'a>,
Option<(Symbol<'a>, Bracket<'a, ArrayRangeExpression<'a>>)>, Option<(Keyword<'a>, Bracket<'a, ArrayRangeExpression<'a>>)>,
), ),
} }

View File

@ -169,12 +169,12 @@ pub struct ExpressionBinary<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TaggedUnionExpression<'a> { 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)] #[derive(Debug, Node)]
pub struct InsideExpression<'a> { pub struct InsideExpression<'a> {
pub nodes: (Expression<'a>, Symbol<'a>, Brace<'a, OpenRangeList<'a>>), pub nodes: (Expression<'a>, Keyword<'a>, Brace<'a, OpenRangeList<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -23,7 +23,7 @@ pub enum ConstantPrimary<'a> {
ConstantCast(ConstantCast<'a>), ConstantCast(ConstantCast<'a>),
ConstantAssignmentPatternExpression(ConstantAssignmentPatternExpression<'a>), ConstantAssignmentPatternExpression(ConstantAssignmentPatternExpression<'a>),
TypeReference(TypeReference<'a>), TypeReference(TypeReference<'a>),
Null(Symbol<'a>), Null(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -99,9 +99,9 @@ pub enum Primary<'a> {
AssignmentPatternExpression(AssignmentPatternExpression<'a>), AssignmentPatternExpression(AssignmentPatternExpression<'a>),
StreamingConcatenation(StreamingConcatenation<'a>), StreamingConcatenation(StreamingConcatenation<'a>),
SequenceMethodCall(SequenceMethodCall<'a>), SequenceMethodCall(SequenceMethodCall<'a>),
This(Symbol<'a>), This(Keyword<'a>),
Dollar(Symbol<'a>), Dollar(Symbol<'a>),
Null(Symbol<'a>), Null(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -177,19 +177,19 @@ pub struct TimeLiteralFixedPoint<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum TimeUnit<'a> { pub enum TimeUnit<'a> {
S(Symbol<'a>), S(Keyword<'a>),
MS(Symbol<'a>), MS(Keyword<'a>),
US(Symbol<'a>), US(Keyword<'a>),
NS(Symbol<'a>), NS(Keyword<'a>),
PS(Symbol<'a>), PS(Keyword<'a>),
FS(Symbol<'a>), FS(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ImplicitClassHandle<'a> { pub enum ImplicitClassHandle<'a> {
This(Symbol<'a>), This(Keyword<'a>),
Super(Symbol<'a>), Super(Keyword<'a>),
ThisSuper((Symbol<'a>, Symbol<'a>, Symbol<'a>)), ThisSuper((Keyword<'a>, Symbol<'a>, Keyword<'a>)),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -621,12 +621,12 @@ mod tests {
fn test_primary() { fn test_primary() {
parser_test!( parser_test!(
primary, primary,
"2.1ns", "2.1ns ",
Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_)))) Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_))))
); );
parser_test!( parser_test!(
primary, primary,
"40 ps", "40 ps ",
Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_)))) Ok((_, Primary::PrimaryLiteral(PrimaryLiteral::TimeLiteral(_))))
); );
parser_test!( parser_test!(

View File

@ -69,7 +69,7 @@ pub enum SubroutineCall<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SubroutineCallRandomize<'a> { 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)] #[derive(Debug, Node)]
@ -143,18 +143,18 @@ pub struct ArrayManipulationCall<'a> {
ArrayMethodName<'a>, ArrayMethodName<'a>,
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Option<Paren<'a, ListOfArguments<'a>>>, Option<Paren<'a, ListOfArguments<'a>>>,
Option<(Symbol<'a>, Paren<'a, Expression<'a>>)>, Option<(Keyword<'a>, Paren<'a, Expression<'a>>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RandomizeCall<'a> { pub struct RandomizeCall<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Option<Paren<'a, Option<VariableIdentifierListOrNull<'a>>>>, Option<Paren<'a, Option<VariableIdentifierListOrNull<'a>>>>,
Option<( Option<(
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<IdentifierList<'a>>>>, Option<Paren<'a, Option<IdentifierList<'a>>>>,
ConstraintBlock<'a>, ConstraintBlock<'a>,
)>, )>,
@ -164,7 +164,7 @@ pub struct RandomizeCall<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum VariableIdentifierListOrNull<'a> { pub enum VariableIdentifierListOrNull<'a> {
VariableIdentifierList(VariableIdentifierList<'a>), VariableIdentifierList(VariableIdentifierList<'a>),
Null(Symbol<'a>), Null(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -176,10 +176,10 @@ pub enum MethodCallRoot<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ArrayMethodName<'a> { pub enum ArrayMethodName<'a> {
MethodIdentifier(MethodIdentifier<'a>), MethodIdentifier(MethodIdentifier<'a>),
Unique(Symbol<'a>), Unique(Keyword<'a>),
And(Symbol<'a>), And(Keyword<'a>),
Or(Symbol<'a>), Or(Keyword<'a>),
Xor(Symbol<'a>), Xor(Keyword<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -160,7 +160,7 @@ pub struct HierarchicalIdentifier<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Root<'a> { pub struct Root<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -292,7 +292,7 @@ pub struct PackageScopePackage<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Unit<'a> { pub struct Unit<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -455,7 +455,7 @@ pub enum LocalOrPackageScopeOrClassScope<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Local<'a> { pub struct Local<'a> {
pub nodes: (Symbol<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -10,13 +10,13 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct GenerateRegion<'a> { 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)] #[derive(Debug, Node)]
pub struct LoopGenerateConstruct<'a> { pub struct LoopGenerateConstruct<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -43,7 +43,7 @@ pub struct GenvarInitialization<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Genvar<'a> { pub struct Genvar<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -81,20 +81,20 @@ pub enum ConditionalGenerateConstruct<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct IfGenerateConstruct<'a> { pub struct IfGenerateConstruct<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ConstantExpression<'a>>, Paren<'a, ConstantExpression<'a>>,
GenerateBlock<'a>, GenerateBlock<'a>,
Option<(Symbol<'a>, GenerateBlock<'a>)>, Option<(Keyword<'a>, GenerateBlock<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CaseGenerateConstruct<'a> { pub struct CaseGenerateConstruct<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ConstantExpression<'a>>, Paren<'a, ConstantExpression<'a>>,
Vec<CaseGenerateItem<'a>>, Vec<CaseGenerateItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -115,7 +115,7 @@ pub struct CaseGenerateItemNondefault<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CaseGenerateItemDefault<'a> { 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)] #[derive(Debug, Node)]
@ -128,10 +128,10 @@ pub enum GenerateBlock<'a> {
pub struct GenerateBlockMultiple<'a> { pub struct GenerateBlockMultiple<'a> {
pub nodes: ( pub nodes: (
Option<(GenerateBlockIdentifier<'a>, Symbol<'a>)>, Option<(GenerateBlockIdentifier<'a>, Symbol<'a>)>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>, Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>,
Vec<GenerateItem<'a>>, Vec<GenerateItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>, Option<(Symbol<'a>, GenerateBlockIdentifier<'a>)>,
), ),
} }

View File

@ -7,37 +7,37 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CmosSwitchtype<'a> { pub struct CmosSwitchtype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EnableGatetype<'a> { pub struct EnableGatetype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct MosSwitchtype<'a> { pub struct MosSwitchtype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NInputGatetype<'a> { pub struct NInputGatetype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NOutputGatetype<'a> { pub struct NOutputGatetype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PassEnSwitchtype<'a> { pub struct PassEnSwitchtype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PassSwitchtype<'a> { pub struct PassSwitchtype<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -115,53 +115,53 @@ mod tests {
#[test] #[test]
fn test_cmos_switchtype() { fn test_cmos_switchtype() {
parser_test!(cmos_switchtype, "cmos", Ok((_, _))); parser_test!(cmos_switchtype, "cmos ", Ok((_, _)));
parser_test!(cmos_switchtype, "rcmos", Ok((_, _))); parser_test!(cmos_switchtype, "rcmos ", Ok((_, _)));
} }
#[test] #[test]
fn test_enable_gatetype() { fn test_enable_gatetype() {
parser_test!(enable_gatetype, "bufif0", Ok((_, _))); parser_test!(enable_gatetype, "bufif0 ", Ok((_, _)));
parser_test!(enable_gatetype, "bufif1", Ok((_, _))); parser_test!(enable_gatetype, "bufif1 ", Ok((_, _)));
parser_test!(enable_gatetype, "notif0", Ok((_, _))); parser_test!(enable_gatetype, "notif0 ", Ok((_, _)));
parser_test!(enable_gatetype, "notif1", Ok((_, _))); parser_test!(enable_gatetype, "notif1 ", Ok((_, _)));
} }
#[test] #[test]
fn test_mos_switchtype() { fn test_mos_switchtype() {
parser_test!(mos_switchtype, "nmos", Ok((_, _))); parser_test!(mos_switchtype, "nmos ", Ok((_, _)));
parser_test!(mos_switchtype, "pmos", Ok((_, _))); parser_test!(mos_switchtype, "pmos ", Ok((_, _)));
parser_test!(mos_switchtype, "rnmos", Ok((_, _))); parser_test!(mos_switchtype, "rnmos ", Ok((_, _)));
parser_test!(mos_switchtype, "rpmos", Ok((_, _))); parser_test!(mos_switchtype, "rpmos ", Ok((_, _)));
} }
#[test] #[test]
fn test_n_input_gatetype() { fn test_n_input_gatetype() {
parser_test!(n_input_gatetype, "and", Ok((_, _))); parser_test!(n_input_gatetype, "and ", Ok((_, _)));
parser_test!(n_input_gatetype, "nand", Ok((_, _))); parser_test!(n_input_gatetype, "nand ", Ok((_, _)));
parser_test!(n_input_gatetype, "or", Ok((_, _))); parser_test!(n_input_gatetype, "or ", Ok((_, _)));
parser_test!(n_input_gatetype, "nor", Ok((_, _))); parser_test!(n_input_gatetype, "nor ", Ok((_, _)));
parser_test!(n_input_gatetype, "xor", Ok((_, _))); parser_test!(n_input_gatetype, "xor ", Ok((_, _)));
parser_test!(n_input_gatetype, "xnor", Ok((_, _))); parser_test!(n_input_gatetype, "xnor ", Ok((_, _)));
} }
#[test] #[test]
fn test_n_output_gatetype() { fn test_n_output_gatetype() {
parser_test!(n_output_gatetype, "buf", Ok((_, _))); parser_test!(n_output_gatetype, "buf ", Ok((_, _)));
parser_test!(n_output_gatetype, "not", Ok((_, _))); parser_test!(n_output_gatetype, "not ", Ok((_, _)));
} }
#[test] #[test]
fn test_pass_en_switchtype() { fn test_pass_en_switchtype() {
parser_test!(pass_en_switchtype, "tranif0", Ok((_, _))); parser_test!(pass_en_switchtype, "tranif0 ", Ok((_, _)));
parser_test!(pass_en_switchtype, "tranif1", Ok((_, _))); parser_test!(pass_en_switchtype, "tranif1 ", Ok((_, _)));
parser_test!(pass_en_switchtype, "rtranif0", Ok((_, _))); parser_test!(pass_en_switchtype, "rtranif0 ", Ok((_, _)));
parser_test!(pass_en_switchtype, "rtranif1", Ok((_, _))); parser_test!(pass_en_switchtype, "rtranif1 ", Ok((_, _)));
} }
#[test] #[test]
fn test_pass_switchtype() { fn test_pass_switchtype() {
parser_test!(pass_switchtype, "tran", Ok((_, _))); parser_test!(pass_switchtype, "tran ", Ok((_, _)));
parser_test!(pass_switchtype, "rtran", Ok((_, _))); parser_test!(pass_switchtype, "rtran ", Ok((_, _)));
} }
} }

View File

@ -95,7 +95,7 @@ pub struct GateInstantiationPass<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct GateInstantiationPulldown<'a> { pub struct GateInstantiationPulldown<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<PulldownStrength<'a>>, Option<PulldownStrength<'a>>,
List<Symbol<'a>, PullGateInstance<'a>>, List<Symbol<'a>, PullGateInstance<'a>>,
Symbol<'a>, Symbol<'a>,
@ -105,7 +105,7 @@ pub struct GateInstantiationPulldown<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct GateInstantiationPullup<'a> { pub struct GateInstantiationPullup<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<PullupStrength<'a>>, Option<PullupStrength<'a>>,
List<Symbol<'a>, PullGateInstance<'a>>, List<Symbol<'a>, PullGateInstance<'a>>,
Symbol<'a>, Symbol<'a>,
@ -342,7 +342,7 @@ pub fn gate_instantiation_pass(s: Span) -> IResult<Span, GateInstantiation> {
#[parser] #[parser]
pub fn gate_instantiation_pulldown(s: Span) -> IResult<Span, GateInstantiation> { 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, b) = opt(pulldown_strength)(s)?;
let (s, c) = list(symbol(","), pull_gate_instance)(s)?; let (s, c) = list(symbol(","), pull_gate_instance)(s)?;
let (s, d) = symbol(";")(s)?; let (s, d) = symbol(";")(s)?;
@ -356,7 +356,7 @@ pub fn gate_instantiation_pulldown(s: Span) -> IResult<Span, GateInstantiation>
#[parser] #[parser]
pub fn gate_instantiation_pullup(s: Span) -> IResult<Span, GateInstantiation> { 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, b) = opt(pullup_strength)(s)?;
let (s, c) = list(symbol(","), pull_gate_instance)(s)?; let (s, c) = list(symbol(","), pull_gate_instance)(s)?;
let (s, d) = symbol(";")(s)?; let (s, d) = symbol(";")(s)?;

View File

@ -27,8 +27,8 @@ pub struct CheckerPortItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum CheckerPortDirection<'a> { pub enum CheckerPortDirection<'a> {
Input(Symbol<'a>), Input(Keyword<'a>),
Output(Symbol<'a>), Output(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -63,20 +63,20 @@ pub struct CheckerOrGenerateItemDeclarationData<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Rand<'a> { pub struct Rand<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CheckerOrGenerateItemDeclarationClocking<'a> { 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)] #[derive(Debug, Node)]
pub struct CheckerOrGenerateItemDeclarationDisable<'a> { pub struct CheckerOrGenerateItemDeclarationDisable<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
ExpressionOrDist<'a>, ExpressionOrDist<'a>,
Symbol<'a>, Symbol<'a>,
), ),

View File

@ -59,7 +59,7 @@ pub struct ClassPropertyNonConst<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassPropertyConst<'a> { pub struct ClassPropertyConst<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Vec<ClassItemQualifier<'a>>, Vec<ClassItemQualifier<'a>>,
DataType<'a>, DataType<'a>,
ConstIdentifier<'a>, ConstIdentifier<'a>,
@ -91,8 +91,8 @@ pub struct ClassMethodFunction<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassMethodPureVirtual<'a> { pub struct ClassMethodPureVirtual<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Vec<ClassItemQualifier<'a>>, Vec<ClassItemQualifier<'a>>,
MethodPrototype<'a>, MethodPrototype<'a>,
Symbol<'a>, Symbol<'a>,
@ -102,7 +102,7 @@ pub struct ClassMethodPureVirtual<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassMethodExternMethod<'a> { pub struct ClassMethodExternMethod<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Vec<MethodQualifier<'a>>, Vec<MethodQualifier<'a>>,
MethodPrototype<'a>, MethodPrototype<'a>,
Symbol<'a>, Symbol<'a>,
@ -117,7 +117,7 @@ pub struct ClassMethodConstructor<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassMethodExternConstructor<'a> { pub struct ClassMethodExternConstructor<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Vec<MethodQualifier<'a>>, Vec<MethodQualifier<'a>>,
ClassConstructorPrototype<'a>, ClassConstructorPrototype<'a>,
), ),
@ -126,8 +126,8 @@ pub struct ClassMethodExternConstructor<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassConstructorPrototype<'a> { pub struct ClassConstructorPrototype<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<TfPortList<'a>>>>, Option<Paren<'a, Option<TfPortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -141,9 +141,9 @@ pub enum ClassConstraint<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ClassItemQualifier<'a> { pub enum ClassItemQualifier<'a> {
Static(Symbol<'a>), Static(Keyword<'a>),
Protected(Symbol<'a>), Protected(Keyword<'a>),
Local(Symbol<'a>), Local(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -154,14 +154,14 @@ pub enum PropertyQualifier<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum RandomQualifier<'a> { pub enum RandomQualifier<'a> {
Rand(Symbol<'a>), Rand(Keyword<'a>),
Randc(Symbol<'a>), Randc(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum MethodQualifier<'a> { pub enum MethodQualifier<'a> {
Virtual(Symbol<'a>), Virtual(Keyword<'a>),
PureVirtual((Symbol<'a>, Symbol<'a>)), PureVirtual((Keyword<'a>, Keyword<'a>)),
ClassItemQualifier(ClassItemQualifier<'a>), ClassItemQualifier(ClassItemQualifier<'a>),
} }
@ -174,28 +174,28 @@ pub enum MethodPrototype<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ClassConstructorDeclaration<'a> { pub struct ClassConstructorDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<ClassScope<'a>>, Option<ClassScope<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<TfPortList<'a>>>>, Option<Paren<'a, Option<TfPortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
Vec<BlockItemDeclaration<'a>>, Vec<BlockItemDeclaration<'a>>,
Option<( Option<(
Keyword<'a>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>,
Option<Paren<'a, ListOfArguments<'a>>>, Option<Paren<'a, ListOfArguments<'a>>>,
Symbol<'a>, Symbol<'a>,
)>, )>,
Vec<FunctionStatementOrNull<'a>>, Vec<FunctionStatementOrNull<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, New<'a>)>, Option<(Symbol<'a>, New<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct New<'a> { pub struct New<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -11,13 +11,13 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ConfigDeclaration<'a> { pub struct ConfigDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
ConfigIdentifier<'a>, ConfigIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
Vec<(LocalParameterDeclaration<'a>, Symbol<'a>)>, Vec<(LocalParameterDeclaration<'a>, Symbol<'a>)>,
DesignStatement<'a>, DesignStatement<'a>,
Vec<ConfigRuleStatement<'a>>, Vec<ConfigRuleStatement<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ConfigIdentifier<'a>)>, Option<(Symbol<'a>, ConfigIdentifier<'a>)>,
), ),
} }
@ -25,7 +25,7 @@ pub struct ConfigDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DesignStatement<'a> { pub struct DesignStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Vec<( Vec<(
Option<(LibraryIdentifier<'a>, Symbol<'a>)>, Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
CellIdentifier<'a>, CellIdentifier<'a>,
@ -70,12 +70,12 @@ pub struct ConfigRuleStatementCellUse<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct DefaultClause<'a> { pub struct DefaultClause<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InstClause<'a> { pub struct InstClause<'a> {
pub nodes: (Symbol<'a>, InstName<'a>), pub nodes: (Keyword<'a>, InstName<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -89,7 +89,7 @@ pub struct InstName<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CellClause<'a> { pub struct CellClause<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<(LibraryIdentifier<'a>, Symbol<'a>)>, Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
CellIdentifier<'a>, CellIdentifier<'a>,
), ),
@ -97,7 +97,7 @@ pub struct CellClause<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LiblistClause<'a> { pub struct LiblistClause<'a> {
pub nodes: (Symbol<'a>, Vec<LibraryIdentifier<'a>>), pub nodes: (Keyword<'a>, Vec<LibraryIdentifier<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -110,7 +110,7 @@ pub enum UseClause<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UseClauseCell<'a> { pub struct UseClauseCell<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<(LibraryIdentifier<'a>, Symbol<'a>)>, Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
CellIdentifier<'a>, CellIdentifier<'a>,
Option<(Symbol<'a>, Config<'a>)>, Option<(Symbol<'a>, Config<'a>)>,
@ -120,7 +120,7 @@ pub struct UseClauseCell<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UseClauseNamed<'a> { pub struct UseClauseNamed<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
List<Symbol<'a>, NamedParameterAssignment<'a>>, List<Symbol<'a>, NamedParameterAssignment<'a>>,
Option<(Symbol<'a>, Config<'a>)>, Option<(Symbol<'a>, Config<'a>)>,
), ),
@ -129,7 +129,7 @@ pub struct UseClauseNamed<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UseClauseCellNamed<'a> { pub struct UseClauseCellNamed<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<(LibraryIdentifier<'a>, Symbol<'a>)>, Option<(LibraryIdentifier<'a>, Symbol<'a>)>,
CellIdentifier<'a>, CellIdentifier<'a>,
List<Symbol<'a>, NamedParameterAssignment<'a>>, List<Symbol<'a>, NamedParameterAssignment<'a>>,
@ -139,7 +139,7 @@ pub struct UseClauseCellNamed<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Config<'a> { pub struct Config<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@ use nom::IResult;
pub struct ConstraintDeclaration<'a> { pub struct ConstraintDeclaration<'a> {
pub nodes: ( pub nodes: (
Option<Static<'a>>, Option<Static<'a>>,
Symbol<'a>, Keyword<'a>,
ConstraintIdentifier<'a>, ConstraintIdentifier<'a>,
ConstraintBlock<'a>, ConstraintBlock<'a>,
), ),
@ -20,7 +20,7 @@ pub struct ConstraintDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Static<'a> { pub struct Static<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -37,9 +37,9 @@ pub enum ConstraintBlockItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ConstraintBlockItemSolve<'a> { pub struct ConstraintBlockItemSolve<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
SolveBeforeList<'a>, SolveBeforeList<'a>,
Symbol<'a>, Keyword<'a>,
SolveBeforeList<'a>, SolveBeforeList<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -76,7 +76,7 @@ pub struct ConstraintExpressionExpression<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Soft<'a> { pub struct Soft<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -87,17 +87,17 @@ pub struct ConstraintExpressionArrow<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ConstraintExpressionIf<'a> { pub struct ConstraintExpressionIf<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, Expression<'a>>, Paren<'a, Expression<'a>>,
ConstraintSet<'a>, ConstraintSet<'a>,
Option<(Symbol<'a>, ConstraintSet<'a>)>, Option<(Keyword<'a>, ConstraintSet<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ConstraintExpressionForeach<'a> { pub struct ConstraintExpressionForeach<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -111,12 +111,12 @@ pub struct ConstraintExpressionForeach<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ConstraintExpressionDisable<'a> { 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)] #[derive(Debug, Node)]
pub struct UniquenessConstraint<'a> { pub struct UniquenessConstraint<'a> {
pub nodes: (Symbol<'a>, Brace<'a, OpenRangeList<'a>>), pub nodes: (Keyword<'a>, Brace<'a, OpenRangeList<'a>>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -161,7 +161,7 @@ pub struct ConstraintPrototype<'a> {
pub nodes: ( pub nodes: (
Option<ConstraintPrototypeQualifier<'a>>, Option<ConstraintPrototypeQualifier<'a>>,
Option<Static<'a>>, Option<Static<'a>>,
Symbol<'a>, Keyword<'a>,
ConstraintIdentifier<'a>, ConstraintIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -169,15 +169,15 @@ pub struct ConstraintPrototype<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ConstraintPrototypeQualifier<'a> { pub enum ConstraintPrototypeQualifier<'a> {
Extern(Symbol<'a>), Extern(Keyword<'a>),
Pure(Symbol<'a>), Pure(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ExternConstraintDeclaration<'a> { pub struct ExternConstraintDeclaration<'a> {
pub nodes: ( pub nodes: (
Option<Static<'a>>, Option<Static<'a>>,
Symbol<'a>, Keyword<'a>,
ClassScope<'a>, ClassScope<'a>,
ConstraintIdentifier<'a>, ConstraintIdentifier<'a>,
ConstraintBlock<'a>, ConstraintBlock<'a>,

View File

@ -32,12 +32,12 @@ pub enum ExternTfDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ExternTfDeclarationMethod<'a> { pub struct ExternTfDeclarationMethod<'a> {
pub nodes: (Symbol<'a>, MethodPrototype<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, MethodPrototype<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ExternTfDeclarationTask<'a> { 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)] #[derive(Debug, Node)]

View File

@ -24,17 +24,17 @@ pub enum LibraryDescription<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LibraryDeclaration<'a> { pub struct LibraryDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
LibraryIdentifier<'a>, LibraryIdentifier<'a>,
List<Symbol<'a>, FilePathSpec<'a>>, List<Symbol<'a>, FilePathSpec<'a>>,
Option<(Symbol<'a>, List<Symbol<'a>, FilePathSpec<'a>>)>, Option<(Keyword<'a>, List<Symbol<'a>, FilePathSpec<'a>>)>,
Symbol<'a>, Symbol<'a>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct IncludeStatement<'a> { pub struct IncludeStatement<'a> {
pub nodes: (Symbol<'a>, FilePathSpec<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, FilePathSpec<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -19,7 +19,7 @@ pub enum ElaborationSystemTask<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ElaborationSystemTaskFatal<'a> { pub struct ElaborationSystemTaskFatal<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, (FinishNumber<'a>, Option<(Symbol<'a>, ListOfArguments<'a>)>)>>, Option<Paren<'a, (FinishNumber<'a>, Option<(Symbol<'a>, ListOfArguments<'a>)>)>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -28,7 +28,7 @@ pub struct ElaborationSystemTaskFatal<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ElaborationSystemTaskError<'a> { pub struct ElaborationSystemTaskError<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<ListOfArguments<'a>>>>, Option<Paren<'a, Option<ListOfArguments<'a>>>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -37,7 +37,7 @@ pub struct ElaborationSystemTaskError<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ElaborationSystemTaskWarning<'a> { pub struct ElaborationSystemTaskWarning<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<ListOfArguments<'a>>>>, Option<Paren<'a, Option<ListOfArguments<'a>>>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -46,7 +46,7 @@ pub struct ElaborationSystemTaskWarning<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ElaborationSystemTaskInfo<'a> { pub struct ElaborationSystemTaskInfo<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Option<Paren<'a, Option<ListOfArguments<'a>>>>, Option<Paren<'a, Option<ListOfArguments<'a>>>>,
Symbol<'a>, Symbol<'a>,
), ),
@ -127,15 +127,15 @@ pub enum ModuleOrGenerateItemDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ModuleOrGenerateItemDeclarationClocking<'a> { 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)] #[derive(Debug, Node)]
pub struct ModuleOrGenerateItemDeclarationDisable<'a> { pub struct ModuleOrGenerateItemDeclarationDisable<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
ExpressionOrDist<'a>, ExpressionOrDist<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -160,7 +160,7 @@ pub struct NonPortModuleItemSpecparam<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ParameterOverride<'a> { pub struct ParameterOverride<'a> {
pub nodes: (Symbol<'a>, ListOfDefparamAssignments<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, ListOfDefparamAssignments<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -172,7 +172,7 @@ pub enum BindDirective<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct BindDirectiveScope<'a> { pub struct BindDirectiveScope<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
BindTargetScope<'a>, BindTargetScope<'a>,
Option<(Symbol<'a>, BindTargetInstanceList<'a>)>, Option<(Symbol<'a>, BindTargetInstanceList<'a>)>,
BindInstantiation<'a>, BindInstantiation<'a>,
@ -183,7 +183,7 @@ pub struct BindDirectiveScope<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct BindDirectiveInstance<'a> { pub struct BindDirectiveInstance<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
BindTargetInstance<'a>, BindTargetInstance<'a>,
BindInstantiation<'a>, BindInstantiation<'a>,
Symbol<'a>, Symbol<'a>,

View File

@ -52,7 +52,7 @@ pub struct ParameterPortDeclarationParamList<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ParameterPortDeclarationTypeList<'a> { pub struct ParameterPortDeclarationTypeList<'a> {
pub nodes: (Symbol<'a>, ListOfTypeAssignments<'a>), pub nodes: (Keyword<'a>, ListOfTypeAssignments<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -139,10 +139,10 @@ pub struct PortReference<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum PortDirection<'a> { pub enum PortDirection<'a> {
Input(Symbol<'a>), Input(Keyword<'a>),
Output(Symbol<'a>), Output(Keyword<'a>),
Inout(Symbol<'a>), Inout(Keyword<'a>),
Ref(Symbol<'a>), Ref(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -171,7 +171,7 @@ pub struct InterfacePortHeaderIdentifier<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfacePortHeaderInterface<'a> { 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)] #[derive(Debug, Node)]

View File

@ -37,10 +37,10 @@ pub enum PackageOrGenerateItemDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct AnonymousProgram<'a> { pub struct AnonymousProgram<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Symbol<'a>,
Vec<AnonymousProgramItem<'a>>, Vec<AnonymousProgramItem<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }

View File

@ -78,7 +78,7 @@ pub struct ModuleDeclarationNonansi<'a> {
ModuleNonansiHeader<'a>, ModuleNonansiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<ModuleItem<'a>>, Vec<ModuleItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ModuleIdentifier<'a>)>, Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
), ),
} }
@ -89,7 +89,7 @@ pub struct ModuleDeclarationAnsi<'a> {
ModuleAnsiHeader<'a>, ModuleAnsiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<NonPortModuleItem<'a>>, Vec<NonPortModuleItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ModuleIdentifier<'a>)>, Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
), ),
} }
@ -105,25 +105,25 @@ pub struct ModuleDeclarationWildcard<'a> {
Symbol<'a>, Symbol<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<ModuleItem<'a>>, Vec<ModuleItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ModuleIdentifier<'a>)>, Option<(Symbol<'a>, ModuleIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ModuleDeclarationExternNonansi<'a> { pub struct ModuleDeclarationExternNonansi<'a> {
pub nodes: (Symbol<'a>, ModuleNonansiHeader<'a>), pub nodes: (Keyword<'a>, ModuleNonansiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ModuleDeclarationExternAnsi<'a> { pub struct ModuleDeclarationExternAnsi<'a> {
pub nodes: (Symbol<'a>, ModuleAnsiHeader<'a>), pub nodes: (Keyword<'a>, ModuleAnsiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum ModuleKeyword<'a> { pub enum ModuleKeyword<'a> {
Module(Symbol<'a>), Module(Keyword<'a>),
Macromodule(Symbol<'a>), Macromodule(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -141,7 +141,7 @@ pub struct InterfaceDeclarationNonansi<'a> {
InterfaceNonansiHeader<'a>, InterfaceNonansiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<InterfaceItem<'a>>, Vec<InterfaceItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>, Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
), ),
} }
@ -152,7 +152,7 @@ pub struct InterfaceDeclarationAnsi<'a> {
InterfaceAnsiHeader<'a>, InterfaceAnsiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<NonPortInterfaceItem<'a>>, Vec<NonPortInterfaceItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>, Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
), ),
} }
@ -161,33 +161,33 @@ pub struct InterfaceDeclarationAnsi<'a> {
pub struct InterfaceDeclarationWildcard<'a> { pub struct InterfaceDeclarationWildcard<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
InterfaceIdentifier<'a>, InterfaceIdentifier<'a>,
Paren<'a, Symbol<'a>>, Paren<'a, Symbol<'a>>,
Symbol<'a>, Symbol<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<InterfaceItem<'a>>, Vec<InterfaceItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, InterfaceIdentifier<'a>)>, Option<(Symbol<'a>, InterfaceIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfaceDeclarationExternNonansi<'a> { pub struct InterfaceDeclarationExternNonansi<'a> {
pub nodes: (Symbol<'a>, InterfaceNonansiHeader<'a>), pub nodes: (Keyword<'a>, InterfaceNonansiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfaceDeclarationExternAnsi<'a> { pub struct InterfaceDeclarationExternAnsi<'a> {
pub nodes: (Symbol<'a>, InterfaceAnsiHeader<'a>), pub nodes: (Keyword<'a>, InterfaceAnsiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfaceNonansiHeader<'a> { pub struct InterfaceNonansiHeader<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
InterfaceIdentifier<'a>, InterfaceIdentifier<'a>,
Vec<PackageImportDeclaration<'a>>, Vec<PackageImportDeclaration<'a>>,
@ -201,7 +201,7 @@ pub struct InterfaceNonansiHeader<'a> {
pub struct InterfaceAnsiHeader<'a> { pub struct InterfaceAnsiHeader<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
InterfaceIdentifier<'a>, InterfaceIdentifier<'a>,
Vec<PackageImportDeclaration<'a>>, Vec<PackageImportDeclaration<'a>>,
@ -226,7 +226,7 @@ pub struct ProgramDeclarationNonansi<'a> {
ProgramNonansiHeader<'a>, ProgramNonansiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<ProgramItem<'a>>, Vec<ProgramItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ProgramIdentifier<'a>)>, Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
), ),
} }
@ -237,7 +237,7 @@ pub struct ProgramDeclarationAnsi<'a> {
ProgramAnsiHeader<'a>, ProgramAnsiHeader<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<NonPortProgramItem<'a>>, Vec<NonPortProgramItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ProgramIdentifier<'a>)>, Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
), ),
} }
@ -246,32 +246,32 @@ pub struct ProgramDeclarationAnsi<'a> {
pub struct ProgramDeclarationWildcard<'a> { pub struct ProgramDeclarationWildcard<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
ProgramIdentifier<'a>, ProgramIdentifier<'a>,
Paren<'a, Symbol<'a>>, Paren<'a, Symbol<'a>>,
Symbol<'a>, Symbol<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<ProgramItem<'a>>, Vec<ProgramItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ProgramIdentifier<'a>)>, Option<(Symbol<'a>, ProgramIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProgramDeclarationExternNonansi<'a> { pub struct ProgramDeclarationExternNonansi<'a> {
pub nodes: (Symbol<'a>, ProgramNonansiHeader<'a>), pub nodes: (Keyword<'a>, ProgramNonansiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProgramDeclarationExternAnsi<'a> { pub struct ProgramDeclarationExternAnsi<'a> {
pub nodes: (Symbol<'a>, ProgramAnsiHeader<'a>), pub nodes: (Keyword<'a>, ProgramAnsiHeader<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ProgramNonansiHeader<'a> { pub struct ProgramNonansiHeader<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
ProgramIdentifier<'a>, ProgramIdentifier<'a>,
Vec<PackageImportDeclaration<'a>>, Vec<PackageImportDeclaration<'a>>,
@ -285,7 +285,7 @@ pub struct ProgramNonansiHeader<'a> {
pub struct ProgramAnsiHeader<'a> { pub struct ProgramAnsiHeader<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
ProgramIdentifier<'a>, ProgramIdentifier<'a>,
Vec<PackageImportDeclaration<'a>>, Vec<PackageImportDeclaration<'a>>,
@ -298,12 +298,12 @@ pub struct ProgramAnsiHeader<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CheckerDeclaration<'a> { pub struct CheckerDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
CheckerIdentifier<'a>, CheckerIdentifier<'a>,
Option<Paren<'a, Option<CheckerPortList<'a>>>>, Option<Paren<'a, Option<CheckerPortList<'a>>>>,
Symbol<'a>, Symbol<'a>,
Vec<(Vec<AttributeInstance<'a>>, CheckerOrGenerateItem<'a>)>, Vec<(Vec<AttributeInstance<'a>>, CheckerOrGenerateItem<'a>)>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, CheckerIdentifier<'a>)>, Option<(Symbol<'a>, CheckerIdentifier<'a>)>,
), ),
} }
@ -312,26 +312,26 @@ pub struct CheckerDeclaration<'a> {
pub struct ClassDeclaration<'a> { pub struct ClassDeclaration<'a> {
pub nodes: ( pub nodes: (
Option<Virtual<'a>>, Option<Virtual<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
ClassIdentifier<'a>, ClassIdentifier<'a>,
Option<ParameterPortList<'a>>, Option<ParameterPortList<'a>>,
Option<( Option<(
Symbol<'a>, Keyword<'a>,
ClassType<'a>, ClassType<'a>,
Option<Paren<'a, ListOfArguments<'a>>>, Option<Paren<'a, ListOfArguments<'a>>>,
)>, )>,
Option<(Symbol<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>, Option<(Keyword<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
Symbol<'a>, Symbol<'a>,
Vec<ClassItem<'a>>, Vec<ClassItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ClassIdentifier<'a>)>, Option<(Symbol<'a>, ClassIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct Virtual<'a> { pub struct Virtual<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -342,14 +342,14 @@ pub struct InterfaceClassType<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfaceClassDeclaration<'a> { pub struct InterfaceClassDeclaration<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
ClassIdentifier<'a>, ClassIdentifier<'a>,
Option<ParameterPortList<'a>>, Option<ParameterPortList<'a>>,
Option<(Symbol<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>, Option<(Keyword<'a>, List<Symbol<'a>, InterfaceClassType<'a>>)>,
Symbol<'a>, Symbol<'a>,
Vec<InterfaceClassItem<'a>>, Vec<InterfaceClassItem<'a>>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, ClassIdentifier<'a>)>, Option<(Symbol<'a>, ClassIdentifier<'a>)>,
), ),
} }
@ -370,20 +370,20 @@ pub struct InterfaceClassItemMethod<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InterfaceClassMethod<'a> { 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)] #[derive(Debug, Node)]
pub struct PackageDeclaration<'a> { pub struct PackageDeclaration<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Option<Lifetime<'a>>, Option<Lifetime<'a>>,
PackageIdentifier<'a>, PackageIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
Option<TimeunitsDeclaration<'a>>, Option<TimeunitsDeclaration<'a>>,
Vec<(Vec<AttributeInstance<'a>>, PackageItem<'a>)>, Vec<(Vec<AttributeInstance<'a>>, PackageItem<'a>)>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, PackageIdentifier<'a>)>, Option<(Symbol<'a>, PackageIdentifier<'a>)>,
), ),
} }
@ -399,7 +399,7 @@ pub enum TimeunitsDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TimeunitsDeclarationTimeunit<'a> { pub struct TimeunitsDeclarationTimeunit<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
TimeLiteral<'a>, TimeLiteral<'a>,
Option<(Symbol<'a>, TimeLiteral<'a>)>, Option<(Symbol<'a>, TimeLiteral<'a>)>,
Symbol<'a>, Symbol<'a>,
@ -408,16 +408,16 @@ pub struct TimeunitsDeclarationTimeunit<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TimeunitsDeclarationTimeprecision<'a> { pub struct TimeunitsDeclarationTimeprecision<'a> {
pub nodes: (Symbol<'a>, TimeLiteral<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, TimeLiteral<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> { pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
TimeLiteral<'a>, TimeLiteral<'a>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
TimeLiteral<'a>, TimeLiteral<'a>,
Symbol<'a>, Symbol<'a>,
), ),
@ -426,10 +426,10 @@ pub struct TimeunitsDeclarationTimeunitTimeprecision<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TimeunitsDeclarationTimeprecisionTimeunit<'a> { pub struct TimeunitsDeclarationTimeprecisionTimeunit<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
TimeLiteral<'a>, TimeLiteral<'a>,
Symbol<'a>, Symbol<'a>,
Symbol<'a>, Keyword<'a>,
TimeLiteral<'a>, TimeLiteral<'a>,
Symbol<'a>, Symbol<'a>,
), ),

View File

@ -9,7 +9,7 @@ use nom::IResult;
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SpecifyBlock<'a> { 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)] #[derive(Debug, Node)]
@ -23,12 +23,12 @@ pub enum SpecifyItem<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PulsestyleDeclaration<'a> { pub struct PulsestyleDeclaration<'a> {
pub nodes: (Symbol<'a>, ListOfPathOutputs<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ShowcancelledDeclaration<'a> { pub struct ShowcancelledDeclaration<'a> {
pub nodes: (Symbol<'a>, ListOfPathOutputs<'a>, Symbol<'a>), pub nodes: (Keyword<'a>, ListOfPathOutputs<'a>, Symbol<'a>),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -111,9 +111,9 @@ pub struct DataSourceExpression<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum EdgeIdentifier<'a> { pub enum EdgeIdentifier<'a> {
Posedge(Symbol<'a>), Posedge(Keyword<'a>),
Negedge(Symbol<'a>), Negedge(Keyword<'a>),
Edge(Symbol<'a>), Edge(Keyword<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -126,7 +126,7 @@ pub enum StateDependentPathDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct StateDependentPathDeclarationIfSimple<'a> { pub struct StateDependentPathDeclarationIfSimple<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ModulePathExpression<'a>>, Paren<'a, ModulePathExpression<'a>>,
SimplePathDeclaration<'a>, SimplePathDeclaration<'a>,
), ),
@ -135,7 +135,7 @@ pub struct StateDependentPathDeclarationIfSimple<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct StateDependentPathDeclarationIfEdgeSensitive<'a> { pub struct StateDependentPathDeclarationIfEdgeSensitive<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren<'a, ModulePathExpression<'a>>, Paren<'a, ModulePathExpression<'a>>,
EdgeSensitivePathDeclaration<'a>, EdgeSensitivePathDeclaration<'a>,
), ),
@ -143,7 +143,7 @@ pub struct StateDependentPathDeclarationIfEdgeSensitive<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct StateDependentPathDeclarationIfNone<'a> { pub struct StateDependentPathDeclarationIfNone<'a> {
pub nodes: (Symbol<'a>, SimplePathDeclaration<'a>), pub nodes: (Keyword<'a>, SimplePathDeclaration<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]

View File

@ -26,7 +26,7 @@ pub enum SystemTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SetupTimingCheck<'a> { pub struct SetupTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -45,7 +45,7 @@ pub struct SetupTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct HoldTimingCheck<'a> { pub struct HoldTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -64,7 +64,7 @@ pub struct HoldTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SetupholdTimingCheck<'a> { pub struct SetupholdTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -101,7 +101,7 @@ pub struct SetupholdTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RecoveryTimingCheck<'a> { pub struct RecoveryTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -120,7 +120,7 @@ pub struct RecoveryTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RemovalTimingCheck<'a> { pub struct RemovalTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -139,7 +139,7 @@ pub struct RemovalTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct RecremTimingCheck<'a> { pub struct RecremTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -176,7 +176,7 @@ pub struct RecremTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct SkewTimingCheck<'a> { pub struct SkewTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -195,7 +195,7 @@ pub struct SkewTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct TimeskewTimingCheck<'a> { pub struct TimeskewTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -222,7 +222,7 @@ pub struct TimeskewTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct FullskewTimingCheck<'a> { pub struct FullskewTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -251,7 +251,7 @@ pub struct FullskewTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct PeriodTimingCheck<'a> { pub struct PeriodTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -268,7 +268,7 @@ pub struct PeriodTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct WidthTimingCheck<'a> { pub struct WidthTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (
@ -287,7 +287,7 @@ pub struct WidthTimingCheck<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct NochargeTimingCheck<'a> { pub struct NochargeTimingCheck<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Paren< Paren<
'a, 'a,
( (

View File

@ -27,9 +27,9 @@ pub struct ControlledTimingCheckEvent<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub enum TimingCheckEventControl<'a> { pub enum TimingCheckEventControl<'a> {
Posedge(Symbol<'a>), Posedge(Keyword<'a>),
Negedge(Symbol<'a>), Negedge(Keyword<'a>),
Edge(Symbol<'a>), Edge(Keyword<'a>),
EdgeControlSpecifier(EdgeControlSpecifier<'a>), EdgeControlSpecifier(EdgeControlSpecifier<'a>),
} }
@ -42,14 +42,14 @@ pub enum SpecifyTerminalDescriptor<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EdgeControlSpecifier<'a> { pub struct EdgeControlSpecifier<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
Bracket<'a, List<Symbol<'a>, EdgeDescriptor<'a>>>, Bracket<'a, List<Symbol<'a>, EdgeDescriptor<'a>>>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EdgeDescriptor<'a> { pub struct EdgeDescriptor<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -82,7 +82,7 @@ pub struct ScalarTimingCheckConditionBinary<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct ScalarConstant<'a> { pub struct ScalarConstant<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -17,10 +17,10 @@ pub enum UdpBody<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct CombinationalBody<'a> { pub struct CombinationalBody<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
CombinationalEntry<'a>, CombinationalEntry<'a>,
Vec<CombinationalEntry<'a>>, Vec<CombinationalEntry<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
@ -33,17 +33,17 @@ pub struct CombinationalEntry<'a> {
pub struct SequentialBody<'a> { pub struct SequentialBody<'a> {
pub nodes: ( pub nodes: (
Option<UdpInitialStatement<'a>>, Option<UdpInitialStatement<'a>>,
Symbol<'a>, Keyword<'a>,
SequentialEntry<'a>, SequentialEntry<'a>,
Vec<SequentialEntry<'a>>, Vec<SequentialEntry<'a>>,
Symbol<'a>, Keyword<'a>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UdpInitialStatement<'a> { pub struct UdpInitialStatement<'a> {
pub nodes: ( pub nodes: (
Symbol<'a>, Keyword<'a>,
OutputPortIdentifier<'a>, OutputPortIdentifier<'a>,
Symbol<'a>, Symbol<'a>,
InitVal<'a>, InitVal<'a>,
@ -53,7 +53,7 @@ pub struct UdpInitialStatement<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct InitVal<'a> { pub struct InitVal<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
@ -112,17 +112,17 @@ pub enum NextState<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct OutputSymbol<'a> { pub struct OutputSymbol<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct LevelSymbol<'a> { pub struct LevelSymbol<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct EdgeSymbol<'a> { pub struct EdgeSymbol<'a> {
pub nodes: (Symbol<'a>,), pub nodes: (Keyword<'a>,),
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@ use nom::IResult;
pub struct UdpNonansiDeclaration<'a> { pub struct UdpNonansiDeclaration<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
UdpIdentifier<'a>, UdpIdentifier<'a>,
Paren<'a, UdpPortList<'a>>, Paren<'a, UdpPortList<'a>>,
Symbol<'a>, Symbol<'a>,
@ -23,7 +23,7 @@ pub struct UdpNonansiDeclaration<'a> {
pub struct UdpAnsiDeclaration<'a> { pub struct UdpAnsiDeclaration<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
UdpIdentifier<'a>, UdpIdentifier<'a>,
Paren<'a, UdpDeclarationPortList<'a>>, Paren<'a, UdpDeclarationPortList<'a>>,
Symbol<'a>, Symbol<'a>,
@ -46,7 +46,7 @@ pub struct UdpDeclarationNonansi<'a> {
UdpPortDeclaration<'a>, UdpPortDeclaration<'a>,
Vec<UdpPortDeclaration<'a>>, Vec<UdpPortDeclaration<'a>>,
UdpBody<'a>, UdpBody<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, UdpIdentifier<'a>)>, Option<(Symbol<'a>, UdpIdentifier<'a>)>,
), ),
} }
@ -56,32 +56,32 @@ pub struct UdpDeclarationAnsi<'a> {
pub nodes: ( pub nodes: (
UdpAnsiDeclaration<'a>, UdpAnsiDeclaration<'a>,
UdpBody<'a>, UdpBody<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, UdpIdentifier<'a>)>, Option<(Symbol<'a>, UdpIdentifier<'a>)>,
), ),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UdpDeclarationExternNonansi<'a> { pub struct UdpDeclarationExternNonansi<'a> {
pub nodes: (Symbol<'a>, UdpNonansiDeclaration<'a>), pub nodes: (Keyword<'a>, UdpNonansiDeclaration<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UdpDeclarationExternAnsi<'a> { pub struct UdpDeclarationExternAnsi<'a> {
pub nodes: (Symbol<'a>, UdpAnsiDeclaration<'a>), pub nodes: (Keyword<'a>, UdpAnsiDeclaration<'a>),
} }
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UdpDeclarationWildcard<'a> { pub struct UdpDeclarationWildcard<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
UdpIdentifier<'a>, UdpIdentifier<'a>,
Paren<'a, Symbol<'a>>, Paren<'a, Symbol<'a>>,
Symbol<'a>, Symbol<'a>,
Vec<UdpPortDeclaration<'a>>, Vec<UdpPortDeclaration<'a>>,
UdpBody<'a>, UdpBody<'a>,
Symbol<'a>, Keyword<'a>,
Option<(Symbol<'a>, UdpIdentifier<'a>)>, Option<(Symbol<'a>, UdpIdentifier<'a>)>,
), ),
} }

View File

@ -41,15 +41,15 @@ pub enum UdpOutputDeclaration<'a> {
#[derive(Debug, Node)] #[derive(Debug, Node)]
pub struct UdpOutputDeclarationNonreg<'a> { 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)] #[derive(Debug, Node)]
pub struct UdpOutputDeclarationReg<'a> { pub struct UdpOutputDeclarationReg<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
Symbol<'a>, Keyword<'a>,
PortIdentifier<'a>, PortIdentifier<'a>,
Option<(Symbol<'a>, ConstantExpression<'a>)>, Option<(Symbol<'a>, ConstantExpression<'a>)>,
), ),
@ -59,7 +59,7 @@ pub struct UdpOutputDeclarationReg<'a> {
pub struct UdpInputDeclaration<'a> { pub struct UdpInputDeclaration<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
ListOfUdpPortIdentifiers<'a>, ListOfUdpPortIdentifiers<'a>,
), ),
} }
@ -68,7 +68,7 @@ pub struct UdpInputDeclaration<'a> {
pub struct UdpRegDeclaration<'a> { pub struct UdpRegDeclaration<'a> {
pub nodes: ( pub nodes: (
Vec<AttributeInstance<'a>>, Vec<AttributeInstance<'a>>,
Symbol<'a>, Keyword<'a>,
VariableIdentifier<'a>, VariableIdentifier<'a>,
), ),
} }

View File

@ -266,6 +266,11 @@ pub struct Symbol<'a> {
pub nodes: (Span<'a>, Vec<WhiteSpace<'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)] #[derive(Debug, Node)]
pub enum WhiteSpace<'a> { pub enum WhiteSpace<'a> {
Space(Span<'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>| { move |s: Span<'a>| {
if cfg!(feature = "trace") { if cfg!(feature = "trace") {
println!( 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| { let (s, x) = map(ws(terminated(tag(t.clone()), peek(none_of(AZ09_)))), |x| {
Symbol { nodes: x } Keyword { nodes: x }
})(s)?; })(s)?;
Ok((clear_recursive_flags(s), x)) Ok((clear_recursive_flags(s), x))
} }