From 0e11b0929c67a59916d5cfa6b7e477d14659e0ec Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 9 Nov 2024 21:33:22 -0500 Subject: [PATCH] Internals: whitespace --- src/verilog.y | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/verilog.y b/src/verilog.y index acee2bb3b..87c964bc4 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -2080,10 +2080,14 @@ tf_port_declaration: // ==IEEE: tf_port_declaration // // Used inside function; followed by ';' // // SEE ALSO port_declaration, port, data_declarationVarFront // - port_directionReset data_type { VARDTYPE($2); } list_of_tf_variable_identifiers ';' { $$ = $4; } - | port_directionReset implicit_typeE { VARDTYPE_NDECL($2); } list_of_tf_variable_identifiers ';' { $$ = $4; } - | port_directionReset yVAR data_type { VARDTYPE($3); } list_of_tf_variable_identifiers ';' { $$ = $5; } - | port_directionReset yVAR implicit_typeE { VARDTYPE($3); } list_of_tf_variable_identifiers ';' { $$ = $5; } + port_directionReset data_type { VARDTYPE($2); } list_of_tf_variable_identifiers ';' + { $$ = $4; } + | port_directionReset implicit_typeE { VARDTYPE_NDECL($2); } list_of_tf_variable_identifiers ';' + { $$ = $4; } + | port_directionReset yVAR data_type { VARDTYPE($3); } list_of_tf_variable_identifiers ';' + { $$ = $5; } + | port_directionReset yVAR implicit_typeE { VARDTYPE($3); } list_of_tf_variable_identifiers ';' + { $$ = $5; } ; integer_atom_type: // ==IEEE: integer_atom_type @@ -2766,11 +2770,9 @@ always_construct: // IEEE: == always_construct continuous_assign: // IEEE: continuous_assign yASSIGN driveStrengthE delay_controlE assignList ';' - { - $$ = $4; - STRENGTH_LIST($4, $2, AssignW); - DELAY_LIST($3, $4); - } + { $$ = $4; + STRENGTH_LIST($4, $2, AssignW); + DELAY_LIST($3, $4); } ; initial_construct: // IEEE: initial_construct @@ -6039,11 +6041,11 @@ clocking_skew: // IEEE: clocking_skew cycle_delay: // IEEE: cycle_delay yP_POUNDPOUND yaINTNUM - { $$ = new AstDelay{$1, new AstConst{$2, *$2}, true}; } + { $$ = new AstDelay{$1, new AstConst{$2, *$2}, true}; } | yP_POUNDPOUND idAny - { $$ = new AstDelay{$1, new AstParseRef{$2, VParseRefExp::PX_TEXT, *$2, nullptr, nullptr}, true}; } + { $$ = new AstDelay{$1, new AstParseRef{$2, VParseRefExp::PX_TEXT, *$2, nullptr, nullptr}, true}; } | yP_POUNDPOUND '(' expr ')' - { $$ = new AstDelay{$1, $3, true}; } + { $$ = new AstDelay{$1, $3, true}; } ; //************************************************ @@ -6172,9 +6174,9 @@ property_declarationFront: // IEEE: part of property_declaration ; property_port_listE: // IEEE: [ ( [ property_port_list ] ) ] - /* empty */ { $$ = nullptr; } - | '(' ')' { $$ = nullptr; } - | '(' property_port_list ')' { $$ = $2; } + /* empty */ { $$ = nullptr; } + | '(' ')' { $$ = nullptr; } + | '(' property_port_list ')' { $$ = $2; } ; property_port_list: // ==IEEE: property_port_list @@ -6225,8 +6227,8 @@ property_declarationBody: // IEEE: part of property_declaration //UNSUP assertion_variable_declarationList property_statement_spec {} // // IEEE-2012: Incorrectly has yCOVER ySEQUENCE then property_spec here. // // Fixed in IEEE 1800-2017 - property_spec { $$ = $1; } - | property_spec ';' { $$ = $1; } + property_spec { $$ = $1; } + | property_spec ';' { $$ = $1; } ; assertion_variable_declarationList: // IEEE: part of assertion_variable_declaration @@ -6968,7 +6970,7 @@ rs_prodList: // IEEE: rs_prod+ ; rs_prod: // ==IEEE: rs_prod - rs_production_item { $$ = $1; } + rs_production_item { $$ = $1; } | rs_code_block { $$ = $1; } // // IEEE: rs_if_else | yIF '(' expr ')' rs_production_item %prec prLOWER_THAN_ELSE @@ -7162,17 +7164,17 @@ classImplementsE: // IEEE: part of class_declaration // // All 1800-2012 /* empty */ { $$ = nullptr; $$ = nullptr; } | yIMPLEMENTS - /*mid*/ { GRAMMARP->m_inImplements = true; $$ = nullptr; } + /*mid*/ { GRAMMARP->m_inImplements = true; $$ = nullptr; } /*cont*/ classImplementsList - { $$ = $3; $$ = $3; - GRAMMARP->m_inImplements = false; } + { $$ = $3; $$ = $3; + GRAMMARP->m_inImplements = false; } ; classImplementsList: // IEEE: part of class_declaration // // All 1800-2012 classExtendsOne { $$ = $1; $$ = $1; } | classImplementsList ',' classExtendsOne - { $$ = addNextNull($1, $3); $$ = $3; } + { $$ = addNextNull($1, $3); $$ = $3; } ; class_typeExtImpList: // IEEE: class_type: "[package_scope] id [ parameter_value_assignment ]"