Commit 3b3632a1 authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

widl: Allow trailing commas in attribute lists.

parent 328298b6
......@@ -343,16 +343,23 @@ m_attributes: { $$ = NULL; }
;
attributes:
'[' attrib_list ']' { $$ = $2; }
'[' attrib_list ']' { $$ = $2;
if (!$$)
yyerror("empty attribute lists unsupported");
}
;
attrib_list: attribute
| attrib_list ',' attribute { LINK($3, $1); $$ = $3; }
| attrib_list ']' '[' attribute { LINK($4, $1); $$ = $4; }
| attrib_list ',' attribute { if ($3) { LINK($3, $1); $$ = $3; }
else { $$ = $1; }
}
| attrib_list ']' '[' attribute { if ($4) { LINK($4, $1); $$ = $4; }
else { $$ = $1; }
}
;
attribute:
tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
attribute: { $$ = NULL; }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); }
| tASYNC { $$ = make_attr(ATTR_ASYNC); }
| tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); }
......
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