diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-01-06 06:32:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:26 -0500 |
commit | e3fd8743417a655a478f49dd76f7cae6245f150b (patch) | |
tree | 192a02a7bf9e5b7330c6f20592e29a6074547eea /source4/build/pidl/idl.yp | |
parent | e159e42d8472f36f51e400e351fc43f2a7dc44f5 (diff) | |
download | samba-e3fd8743417a655a478f49dd76f7cae6245f150b.tar.gz samba-e3fd8743417a655a478f49dd76f7cae6245f150b.tar.bz2 samba-e3fd8743417a655a478f49dd76f7cae6245f150b.zip |
r4551: add support for a pidl extensions
'declare bitmap foo1;'
'declare enum foo2;'
and also allow
typedef [public] bitmap ...
typedef [public] enum ...
you need to a forward declaration of bitmaps and enums
when you want to use them in another idl file,
and you need to make the real declaration to be public
see the next commit to samr.idl and netlogon.idl
metze
(This used to be commit a8d61aa47388b82595ee02b9cfd35f15afb93c2a)
Diffstat (limited to 'source4/build/pidl/idl.yp')
-rw-r--r-- | source4/build/pidl/idl.yp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp index f77062adf6..73b9a44b3f 100644 --- a/source4/build/pidl/idl.yp +++ b/source4/build/pidl/idl.yp @@ -55,7 +55,7 @@ definitions: ; -definition: function | const | typedef +definition: function | const | typedef | declare ; const: 'const' identifier identifier '=' anytext ';' @@ -86,6 +86,30 @@ function: property_list type identifier '(' element_list2 ')' ';' }} ; +declare: 'declare' property_list decl_type identifier';' + {{ + "TYPE" => "DECLARE", + "PROPERTIES" => $_[2], + "NAME" => $_[4], + "DATA" => $_[3], + }} +; + +decl_type: decl_enum | decl_bitmap +; + +decl_enum: 'enum' + {{ + "TYPE" => "ENUM" + }} +; + +decl_bitmap: 'bitmap' + {{ + "TYPE" => "BITMAP" + }} +; + typedef: 'typedef' property_list type identifier array_len ';' {{ "TYPE" => "TYPEDEF", @@ -327,7 +351,7 @@ again: if (s/^([\w_]+)//) { $parser->YYData->{LAST_TOKEN} = $1; if ($1 =~ - /^(coclass|interface|const|typedef|union + /^(coclass|interface|const|typedef|declare|union |struct|enum|bitmap|void|case|default)$/x) { return $1; } |