%%
idl:
#empty { {} }
- | idl interface { push(@{$_[1]}, $_[2]); $_[1] }
+ | idl interface { push(@{$_[1]}, $_[2]); $_[1] }
| idl coclass { push(@{$_[1]}, $_[2]); $_[1] }
;
}}
;
-type: struct | union | enum | identifier
+type: struct | union | enum | bitmap | identifier
| void { "void" }
;
| identifier '=' anytext { "$_[1]$_[2]$_[3]" }
;
+bitmap: 'bitmap' '{' bitmap_elements '}'
+ {{
+ "TYPE" => "BITMAP",
+ "ELEMENTS" => $_[3]
+ }}
+;
+
+bitmap_elements:
+ bitmap_element { [ $_[1] ] }
+ | bitmap_elements ',' bitmap_element { push(@{$_[1]}, $_[3]); $_[1] }
+;
+
+bitmap_element: identifier '=' anytext { "$_[1] ( $_[3] )" }
+;
+
struct: 'struct' '{' element_list1 '}'
{{
"TYPE" => "STRUCT",
$parser->YYData->{LAST_TOKEN} = $1;
if ($1 =~
/^(coclass|interface|const|typedef|union
- |struct|enum|void|case|default)$/x) {
+ |struct|enum|bitmap|void|case|default)$/x) {
return $1;
}
return('IDENTIFIER',$1);