summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-01 20:00:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:11 -0500
commitdde06904576dfe01e9710721209650dcff228593 (patch)
treea625c2c36d1d7dcba666e7772917808b97f54d3f /source4/build
parentb206afaf00ab9fd16a6e62fc9ff07078bd03b989 (diff)
downloadsamba-dde06904576dfe01e9710721209650dcff228593.tar.gz
samba-dde06904576dfe01e9710721209650dcff228593.tar.bz2
samba-dde06904576dfe01e9710721209650dcff228593.zip
r3440: Add support for "coclass" to the pidl parser - the idl keyword that
describes a COM class. A coclass is the implementation of one or more interfaces. It has a UUID referred to as it's CLSID (Class ID). Also adding an example coclass called "CoffeeMachine". You can give it a string (or a cup, whatever you like ;-) and it will fill it with "COFFEE" (kind of the like the echo pipe is for regular RPC). CoffeeMachine's Windows implementation already works, a torture test for Samba will follow soon. (This used to be commit 05dd840b6ffba0d38d98e2e80d856e2f2b5d877c)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/idl.yp21
1 files changed, 17 insertions, 4 deletions
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp
index a98dbd9104..f512985ea0 100644
--- a/source4/build/pidl/idl.yp
+++ b/source4/build/pidl/idl.yp
@@ -16,9 +16,22 @@
%%
idl:
#empty { {} }
- | idl interface {
- push(@{$_[1]}, $_[2]); $_[1]
- }
+ | idl interface { push(@{$_[1]}, $_[2]); $_[1] }
+ | idl coclass { push(@{$_[1]}, $_[2]); $_[1] }
+;
+
+coclass: property_list 'coclass' identifier '{' interfaces '}' optional_semicolon
+ {$_[3] => {
+ "TYPE" => "COCLASS",
+ "PROPERTIES" => $_[1],
+ "NAME" => $_[3],
+ "DATA" => $_[5],
+ }}
+;
+
+interfaces:
+ #empty { {} }
+ | interfaces interface { push(@{$_[1]}, $_[2]); $_[1] }
;
interface: property_list 'interface' identifier base_interface '{' definitions '}' optional_semicolon
@@ -291,7 +304,7 @@ again:
if (s/^([\w_]+)//) {
$parser->YYData->{LAST_TOKEN} = $1;
if ($1 =~
- /^(interface|const|typedef|union
+ /^(coclass|interface|const|typedef|union
|struct|enum|void|case|default)$/x) {
return $1;
}