summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-05 15:26:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:19 -0500
commitaca94b5ff20067472482f64c8ee9d3f0962bf054 (patch)
tree144bd59347df3069960a4cc488874f97266ffadd
parenta4fc93023506bcc41f869e75d895c5273a2a5cf4 (diff)
downloadsamba-aca94b5ff20067472482f64c8ee9d3f0962bf054.tar.gz
samba-aca94b5ff20067472482f64c8ee9d3f0962bf054.tar.bz2
samba-aca94b5ff20067472482f64c8ee9d3f0962bf054.zip
r4533: parsing support for:
typedef [bitmap16bit] bitmap { FLAG1 = 0x0001, FLAG2 = 0x8000 } fooflags; metze (This used to be commit 192f2495468d5d0c5889d94ca791aa8f371514e8)
-rw-r--r--source4/build/pidl/idl.yp21
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp
index be152c5475..f77062adf6 100644
--- a/source4/build/pidl/idl.yp
+++ b/source4/build/pidl/idl.yp
@@ -16,7 +16,7 @@
%%
idl:
#empty { {} }
- | idl interface { push(@{$_[1]}, $_[2]); $_[1] }
+ | idl interface { push(@{$_[1]}, $_[2]); $_[1] }
| idl coclass { push(@{$_[1]}, $_[2]); $_[1] }
;
@@ -96,7 +96,7 @@ typedef: 'typedef' property_list type identifier array_len ';'
}}
;
-type: struct | union | enum | identifier
+type: struct | union | enum | bitmap | identifier
| void { "void" }
;
@@ -117,6 +117,21 @@ enum_element: identifier
| 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",
@@ -313,7 +328,7 @@ again:
$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);