summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-08-02 16:06:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:57 -0500
commit172a0c7858dc23932dfa414acb35ec89eeba2e41 (patch)
tree31f39fcd829ad96f50655b055fabeea1274c1d8e
parent4f677289b478ac4adf9afffff0517dfa5337d13d (diff)
downloadsamba-172a0c7858dc23932dfa414acb35ec89eeba2e41.tar.gz
samba-172a0c7858dc23932dfa414acb35ec89eeba2e41.tar.bz2
samba-172a0c7858dc23932dfa414acb35ec89eeba2e41.zip
r8919: Return references to structs and unions in parse tree. Fill in type
names for structs and unions also. (This used to be commit c31be383461d8a2784aa85619b38f81a389024f2)
-rw-r--r--source4/build/pidl/smb_interfaces.yp23
1 files changed, 17 insertions, 6 deletions
diff --git a/source4/build/pidl/smb_interfaces.yp b/source4/build/pidl/smb_interfaces.yp
index 0281fad4c6..b84ed1c1c1 100644
--- a/source4/build/pidl/smb_interfaces.yp
+++ b/source4/build/pidl/smb_interfaces.yp
@@ -27,7 +27,7 @@ struct: STRUCT optional_identifier '{' elements '}' pointers optional_identifier
my $name = defined($_[2]) ? $_[2] : $_[7];
{
"NAME" => $name,
- "TYPE" => "STRUCT",
+ "TYPE" => "struct",
"DATA" => $_[4],
}
}
@@ -39,7 +39,7 @@ union:
my $name = defined($_[2]) ? $_[2] : $_[7];
{
"NAME" => $name,
- "TYPE" => "UNION",
+ "TYPE" => "union",
"DATA" => $_[4],
}
}
@@ -69,19 +69,29 @@ element:
| struct
| union
| STRUCT IDENTIFIER pointers IDENTIFIER ';'
+ {{
+ "NAME" => $_[2],
+ "POINTERS" => $_[3],
+ "TYPE" => "struct $_[2]",
+ }}
| UNION IDENTIFIER pointers IDENTIFIER ';'
+ {{
+ "NAME" => $_[2],
+ "POINTERS" => $_[3],
+ "TYPE" => "union $_[2]",
+ }}
| CONST type pointers IDENTIFIER array ';'
- {{
+ {{
"NAME" => $_[4],
"TYPE" => $_[2],
"POINTERS" => $_[3],
- }}
+ }}
| type pointers IDENTIFIER array ';'
- {{
+ {{
"NAME" => $_[3],
"TYPE" => $_[1],
"POINTERS" => $_[2],
- }}
+ }}
;
array: #empty
@@ -90,6 +100,7 @@ array: #empty
type: IDENTIFIER
| ENUM IDENTIFIER
+ { "enum $_[2]" }
;
pointers: