svn commit: samba r4533 - in branches/SAMBA_4_0/source/build/pidl: .

metze at samba.org metze at samba.org
Wed Jan 5 15:26:48 GMT 2005


Author: metze
Date: 2005-01-05 15:26:48 +0000 (Wed, 05 Jan 2005)
New Revision: 4533

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4533

Log:
parsing support for:

typedef [bitmap16bit] bitmap {
	FLAG1 = 0x0001,
	FLAG2 = 0x8000
} fooflags;

metze

Modified:
   branches/SAMBA_4_0/source/build/pidl/idl.yp


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/idl.yp
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/idl.yp	2005-01-05 15:24:20 UTC (rev 4532)
+++ branches/SAMBA_4_0/source/build/pidl/idl.yp	2005-01-05 15:26:48 UTC (rev 4533)
@@ -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 @@
         }}
 ;
 
-type:   struct | union | enum | identifier 
+type:   struct | union | enum | bitmap | identifier 
 	| void { "void" }
 ;
 
@@ -117,6 +117,21 @@
 	      | 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 @@
 			$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);



More information about the samba-cvs mailing list