From 172a0c7858dc23932dfa414acb35ec89eeba2e41 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 2 Aug 2005 16:06:35 +0000 Subject: [PATCH] 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) --- source4/build/pidl/smb_interfaces.yp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/source4/build/pidl/smb_interfaces.yp b/source4/build/pidl/smb_interfaces.yp index 0281fad4c60..b84ed1c1c15 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: -- 2.34.1