Skip to content

Commit c020ea7

Browse files
committed
Allow empty STL network list
The grammar supports blocks without any content.
1 parent e890c18 commit c020ea7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/statement-list/parser.y

+5-6
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ FB_Static_Decl:
431431
;
432432

433433
FB_Body:
434-
TOK_BEGIN Oom_IL_Network
434+
TOK_BEGIN Zom_IL_Network
435435
{
436436
$$ = $2;
437437
}
@@ -617,24 +617,23 @@ Constant_Decl:
617617
;
618618

619619
Func_Body:
620-
TOK_BEGIN Oom_IL_Network
620+
TOK_BEGIN Zom_IL_Network
621621
{
622622
$$ = $2;
623623
}
624624
;
625625

626626
// Network declaration
627-
Oom_IL_Network:
628-
Oom_IL_Network IL_Network
627+
Zom_IL_Network:
628+
Zom_IL_Network IL_Network
629629
{
630630
$$ = $1;
631631
parser_stack($$).add_to_operands(std::move(parser_stack($2)));
632632
}
633-
| IL_Network
633+
| /* nothing */
634634
{
635635
newstack($$);
636636
parser_stack($$).id(ID_statement_list_networks);
637-
parser_stack($$).add_to_operands(std::move(parser_stack($1)));
638637
}
639638
;
640639

0 commit comments

Comments
 (0)