summaryrefslogtreecommitdiff
path: root/source4/pidl/idl.yp
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-18 16:21:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:32 -0500
commit8cf122c2d2a0913fd9a7c55032c549598844111c (patch)
treef2e5612d40c043d0c3a2a755fecac9ee8af16d48 /source4/pidl/idl.yp
parent069f0cc15bfe6ba38950d8b5a0b2befb74aa397e (diff)
downloadsamba-8cf122c2d2a0913fd9a7c55032c549598844111c.tar.gz
samba-8cf122c2d2a0913fd9a7c55032c549598844111c.tar.bz2
samba-8cf122c2d2a0913fd9a7c55032c549598844111c.zip
r21430: Support tagged types without typedef. This means:
struct foo { ... }; in IDL will now work. This is the first step towards nested types and using typedefs for partial types (such as "typedef int *bar;"), a requirement for complex uses of represent_as(). (This used to be commit a716aa70f0c90898e6fcf57d63a2cf4c40e7d4df)
Diffstat (limited to 'source4/pidl/idl.yp')
-rw-r--r--source4/pidl/idl.yp32
1 files changed, 18 insertions, 14 deletions
diff --git a/source4/pidl/idl.yp b/source4/pidl/idl.yp
index 5ef4dca379..3ca02c3872 100644
--- a/source4/pidl/idl.yp
+++ b/source4/pidl/idl.yp
@@ -160,10 +160,10 @@ decl_union: 'union'
}}
;
-typedef: 'typedef' property_list type identifier array_len ';'
+typedef: property_list 'typedef' type identifier array_len ';'
{{
"TYPE" => "TYPEDEF",
- "PROPERTIES" => $_[2],
+ "PROPERTIES" => $_[1],
"NAME" => $_[4],
"DATA" => $_[3],
"ARRAY_LEN" => $_[5],
@@ -187,11 +187,12 @@ type: usertype | existingtype | void { "void" } ;
enum_body: '{' enum_elements '}' { $_[2] };
opt_enum_body: | enum_body;
-enum: 'enum' optional_identifier opt_enum_body
+enum: property_list 'enum' optional_identifier opt_enum_body
{{
"TYPE" => "ENUM",
- "NAME" => $_[2],
- "ELEMENTS" => $_[3]
+ "PROPERTIES" => $_[1],
+ "NAME" => $_[3],
+ "ELEMENTS" => $_[4]
}}
;
@@ -206,11 +207,12 @@ enum_element: identifier
bitmap_body: '{' opt_bitmap_elements '}' { $_[2] };
opt_bitmap_body: | bitmap_body;
-bitmap: 'bitmap' optional_identifier opt_bitmap_body
+bitmap: property_list 'bitmap' optional_identifier opt_bitmap_body
{{
"TYPE" => "BITMAP",
- "NAME" => $_[2],
- "ELEMENTS" => $_[3]
+ "PROPERTIES" => $_[1],
+ "NAME" => $_[3],
+ "ELEMENTS" => $_[4]
}}
;
@@ -227,11 +229,12 @@ bitmap_element: identifier '=' anytext { "$_[1] ( $_[3] )" }
struct_body: '{' element_list1 '}' { $_[2] };
opt_struct_body: | struct_body;
-struct: 'struct' optional_identifier opt_struct_body
+struct: property_list 'struct' optional_identifier opt_struct_body
{{
"TYPE" => "STRUCT",
- "NAME" => $_[2],
- "ELEMENTS" => $_[3]
+ "PROPERTIES" => $_[1],
+ "NAME" => $_[3],
+ "ELEMENTS" => $_[4]
}}
;
@@ -261,11 +264,12 @@ union_elements:
union_body: '{' union_elements '}' { $_[2] };
opt_union_body: | union_body;
-union: 'union' optional_identifier opt_union_body
+union: property_list 'union' optional_identifier opt_union_body
{{
"TYPE" => "UNION",
- "NAME" => $_[2],
- "ELEMENTS" => $_[3]
+ "PROPERTIES" => $_[1],
+ "NAME" => $_[3],
+ "ELEMENTS" => $_[4]
}}
;