Commit a149913a authored by Daan Vreeken's avatar Daan Vreeken
Browse files

Go even one step further: Allow empty module(input/output)lists.

With this, we can create e.g. an oscillator module that only has an output,
but no inputs.

	modified:   controller/controller_load_parser.y
parent f6fb5d2a
......@@ -224,8 +224,8 @@ block : BRACEOPENSYM
module : MODULESYM
PARENTHESESOPENSYM stringvar PARENTHESESCLOSESYM
BRACEOPENSYM
BRACEOPENSYM moduleinputlist BRACECLOSESYM
BRACEOPENSYM moduleoutputlist BRACECLOSESYM
BRACEOPENSYM maybemoduleinputlist BRACECLOSESYM
BRACEOPENSYM maybemoduleoutputlist BRACECLOSESYM
BRACECLOSESYM
{
if (controller_module_create($3)) {
......@@ -236,8 +236,8 @@ module : MODULESYM
| MODULESYM
PARENTHESESOPENSYM PARENTHESESCLOSESYM
BRACEOPENSYM
BRACEOPENSYM moduleinputlist BRACECLOSESYM
BRACEOPENSYM moduleoutputlist BRACECLOSESYM
BRACEOPENSYM maybemoduleinputlist BRACECLOSESYM
BRACEOPENSYM maybemoduleoutputlist BRACECLOSESYM
BRACECLOSESYM
{
if (controller_module_create(NULL)) {
......@@ -247,6 +247,10 @@ module : MODULESYM
}
;
maybemoduleinputlist : moduleinputlist
|
;
moduleinputlist : moduleinput
| moduleinput moduleinputlist
;
......@@ -261,6 +265,10 @@ moduleinput : BRACEOPENSYM
}
BRACECLOSESYM
maybemoduleoutputlist : moduleoutputlist
|
;
moduleoutputlist : moduleoutput
| moduleoutput moduleoutputlist
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment