diff --git a/src/V3AssertProperties.cpp b/src/V3AssertProperties.cpp index aff5c4dba..da1d4e416 100644 --- a/src/V3AssertProperties.cpp +++ b/src/V3AssertProperties.cpp @@ -108,9 +108,8 @@ class AssertPropertiesParser final : public VNVisitorConst { // STATE std::unique_ptr m_graphp = std::make_unique(); // Property tree DfaVertex* m_lastp = nullptr; // Last encountered vertex - bool m_underSExpr - = false; // Whether it is under sequence expression for creating a start node - size_t m_underLogNots = 0; // Number of not operators before sequence + bool m_underSExpr = false; // Is under sequence expression, for creating a start node + size_t m_underLogNots = 0; // Number of 'not' operators before sequence // VISITORS void visit(AstNodeCoverOrAssert* nodep) override { iterateChildrenConst(nodep); } diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 9914a5eea..8121d53b8 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -7015,7 +7015,7 @@ class WidthVisitor final : public VNVisitor { iterateCheckBool(nodep, "LHS", nodep->op1p(), BOTH); nodep->dtypeSetBit(); if (m_underSExpr) { - nodep->v3error("Unexpected not in sequence expression context"); + nodep->v3error("Unexpected 'not' in sequence expression context"); AstConst* const newp = new AstConst{nodep->fileline(), 0}; newp->dtypeFrom(nodep); nodep->replaceWith(newp); diff --git a/src/verilog.y b/src/verilog.y index b204d7b64..fd931d382 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -6534,7 +6534,8 @@ pexpr: // IEEE: property_expr (The name pexpr is important as regex // // IEEE: '(' pexpr ')' // // Expanded below // - yNOT pexpr { $$ = new AstLogNot{$1, $2}; } + yNOT pexpr + { $$ = new AstLogNot{$1, $2}; } | ySTRONG '(' sexpr ')' { $$ = $3; BBUNSUP($2, "Unsupported: strong (in property expression)"); } | yWEAK '(' sexpr ')' @@ -6622,15 +6623,13 @@ sexpr: // ==IEEE: sequence_expr (The name sexpr is important as reg // // IEEE: "sequence_expr cycle_delay_range sequence_expr { cycle_delay_range sequence_expr }" // // Both rules basically mean we can repeat sequences, so make it simpler: cycle_delay_range ~p~sexpr %prec yP_POUNDPOUND - { $$ = new AstSExpr{$1, $1, $2}; + { $$ = new AstSExpr{$1, $1, $2}; if (VN_IS($2, LogNot)) { BBUNSUP($2->fileline(), "Unexpected not in sequence expression context"); } } | ~p~sexpr cycle_delay_range sexpr %prec prPOUNDPOUND_MULTI - { - $$ = new AstSExpr{$2, $1, $2, $3}; - } + { $$ = new AstSExpr{$2, $1, $2, $3}; } // // // IEEE: expression_or_dist [ boolean_abbrev ] // // Note expression_or_dist includes "expr"!