This is perhaps more canonical:
param_list
: /* nothing */ { $$ = new ParamListNode(); }
| param_item_list{ $$ = $1; }
;
param_item_list
: param { $$ = new ParamListNode($1); }
| param_item_list ',' param { $$ = $1->addChild($3); }
On 5 Jun 2014, at 02:46, Grant McKenzie wrote:
> newbie alert...
This is the list for Bison [1], which supports C++ - see the manual.
1. https://gnu.org/software/bison/
___
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison
Hi,
newbie alert - this is my first grammar so bare with me!
opt_parameter_list:
/* EMPTY */ { $$ = new IdentifierListNode(
NULL, NULL ); }
| parameter_list { $$ = $1; }
parameter_list:
IDENTIFIER {