Skip to content

Commit f32990a

Browse files
committed
Verilog: move rules into Section A.6.2
This moves six rules into Section A.6.2, according to System Verilog 1800-2017.
1 parent 2d26bc6 commit f32990a

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

src/verilog/parser.y

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,40 @@ always_construct: TOK_ALWAYS statement
20742074
{ init($$, ID_always); mto($$, $2); }
20752075
;
20762076

2077+
blocking_assignment:
2078+
variable_lvalue '=' delay_or_event_control expression
2079+
{ init($$, ID_blocking_assign); mto($$, $1); mto($$, $4); }
2080+
| operator_assignment
2081+
;
2082+
2083+
operator_assignment:
2084+
variable_lvalue assignment_operator expression
2085+
{ init($$, ID_blocking_assign); mto($$, $1); mto($$, $3); }
2086+
;
2087+
2088+
assignment_operator:
2089+
'='
2090+
| TOK_PLUSEQUAL
2091+
| TOK_MINUSEQUAL
2092+
| TOK_ASTERICEQUAL
2093+
| TOK_SLASHEQUAL
2094+
| TOK_PERCENTEQUAL
2095+
| TOK_AMPEREQUAL
2096+
| TOK_VERTBAREQUAL
2097+
| TOK_CARETEQUAL
2098+
| TOK_LESSLESSEQUAL
2099+
| TOK_GREATERGREATEREQUAL
2100+
| TOK_LESSLESSLESSEQUAL
2101+
| TOK_GREATERGREATERGREATEREQUAL
2102+
;
2103+
2104+
nonblocking_assignment:
2105+
variable_lvalue TOK_LESSEQUAL expression
2106+
{ init($$, ID_non_blocking_assign); mto($$, $1); mto($$, $3); }
2107+
| variable_lvalue TOK_LESSEQUAL delay_or_event_control expression
2108+
{ init($$, ID_non_blocking_assign); mto($$, $1); mto($$, $4); }
2109+
;
2110+
20772111
// The extra rule to allow block_item_declaration is to avoid an ambiguity
20782112
// caused by the attribute_instance_brace.
20792113
statement:
@@ -2354,40 +2388,6 @@ procedural_continuous_assignments:
23542388
/* | TOK_RELEASE net_lvalue */
23552389
;
23562390

2357-
blocking_assignment:
2358-
variable_lvalue '=' delay_or_event_control expression
2359-
{ init($$, ID_blocking_assign); mto($$, $1); mto($$, $4); }
2360-
| operator_assignment
2361-
;
2362-
2363-
operator_assignment:
2364-
variable_lvalue assignment_operator expression
2365-
{ init($$, ID_blocking_assign); mto($$, $1); mto($$, $3); }
2366-
;
2367-
2368-
assignment_operator:
2369-
'='
2370-
| TOK_PLUSEQUAL
2371-
| TOK_MINUSEQUAL
2372-
| TOK_ASTERICEQUAL
2373-
| TOK_SLASHEQUAL
2374-
| TOK_PERCENTEQUAL
2375-
| TOK_AMPEREQUAL
2376-
| TOK_VERTBAREQUAL
2377-
| TOK_CARETEQUAL
2378-
| TOK_LESSLESSEQUAL
2379-
| TOK_GREATERGREATEREQUAL
2380-
| TOK_LESSLESSLESSEQUAL
2381-
| TOK_GREATERGREATERGREATEREQUAL
2382-
;
2383-
2384-
nonblocking_assignment:
2385-
variable_lvalue TOK_LESSEQUAL expression
2386-
{ init($$, ID_non_blocking_assign); mto($$, $1); mto($$, $3); }
2387-
| variable_lvalue TOK_LESSEQUAL delay_or_event_control expression
2388-
{ init($$, ID_non_blocking_assign); mto($$, $1); mto($$, $4); }
2389-
;
2390-
23912391
procedural_timing_control_statement:
23922392
procedural_timing_control statement_or_null
23932393
{ $$=$1; mto($$, $2); }

0 commit comments

Comments
 (0)