@@ -724,8 +724,10 @@ pub(crate) fn sequence_expr(s: Span) -> IResult<Span, SequenceExpr> {
724724#[ tracable_parser]
725725#[ packrat_parser]
726726pub ( crate ) fn sequence_expr_cycle_delay_expr ( s : Span ) -> IResult < Span , SequenceExpr > {
727- let ( s, a) = cycle_delay_range ( s) ?;
728- let ( s, b) = sequence_expr ( s) ?;
727+ let ( s, ( a, b) ) = alt ( (
728+ pair ( cycle_delay_range, sequence_expr) ,
729+ pair ( cycle_delay_range_2, sequence_expr) ,
730+ ) ) ( s) ?;
729731 let ( s, c) = many0 ( pair ( cycle_delay_range, sequence_expr) ) ( s) ?;
730732 Ok ( (
731733 s,
@@ -738,8 +740,10 @@ pub(crate) fn sequence_expr_cycle_delay_expr(s: Span) -> IResult<Span, SequenceE
738740#[ packrat_parser]
739741pub ( crate ) fn sequence_expr_expr_cycle_delay_expr ( s : Span ) -> IResult < Span , SequenceExpr > {
740742 let ( s, a) = sequence_expr ( s) ?;
741- let ( s, b) = cycle_delay_range ( s) ?;
742- let ( s, c) = sequence_expr ( s) ?;
743+ let ( s, ( b, c) ) = alt ( (
744+ pair ( cycle_delay_range, sequence_expr) ,
745+ pair ( cycle_delay_range_2, sequence_expr) ,
746+ ) ) ( s) ?;
743747 let ( s, d) = many0 ( pair ( cycle_delay_range, sequence_expr) ) ( s) ?;
744748 Ok ( (
745749 s,
@@ -853,6 +857,17 @@ pub(crate) fn cycle_delay_range(s: Span) -> IResult<Span, CycleDelayRange> {
853857 ) ) ( s)
854858}
855859
860+ #[ tracable_parser]
861+ #[ packrat_parser]
862+ pub ( crate ) fn cycle_delay_range_2 ( s : Span ) -> IResult < Span , CycleDelayRange > {
863+ alt ( (
864+ cycle_delay_range_primary_no_function,
865+ cycle_delay_range_expression,
866+ cycle_delay_range_asterisk,
867+ cycle_delay_range_plus,
868+ ) ) ( s)
869+ }
870+
856871#[ tracable_parser]
857872#[ packrat_parser]
858873pub ( crate ) fn cycle_delay_range_primary ( s : Span ) -> IResult < Span , CycleDelayRange > {
@@ -864,6 +879,17 @@ pub(crate) fn cycle_delay_range_primary(s: Span) -> IResult<Span, CycleDelayRang
864879 ) )
865880}
866881
882+ #[ tracable_parser]
883+ #[ packrat_parser]
884+ pub ( crate ) fn cycle_delay_range_primary_no_function ( s : Span ) -> IResult < Span , CycleDelayRange > {
885+ let ( s, a) = symbol ( "##" ) ( s) ?;
886+ let ( s, b) = constant_primary_no_function ( s) ?;
887+ Ok ( (
888+ s,
889+ CycleDelayRange :: Primary ( Box :: new ( CycleDelayRangePrimary { nodes : ( a, b) } ) ) ,
890+ ) )
891+ }
892+
867893#[ tracable_parser]
868894#[ packrat_parser]
869895pub ( crate ) fn cycle_delay_range_expression ( s : Span ) -> IResult < Span , CycleDelayRange > {
0 commit comments