1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

pidl: parse idl 'pipe' typedefs, but print out a not supported message for now

metze
This commit is contained in:
Stefan Metzmacher 2009-08-05 13:40:38 +02:00
parent 20a6fb5cdb
commit 558ff911df
3 changed files with 1196 additions and 1117 deletions

View File

@ -189,6 +189,8 @@ usertype:
enum
|
bitmap
|
pipe
;
typedecl:
@ -379,6 +381,17 @@ pointers:
pointers '*' { $_[1]+1 }
;
pipe:
property_list 'pipe' type
{{
"TYPE" => "PIPE",
"PROPERTIES" => $_[1],
"DATA" => $_[3],
"FILE" => $_[0]->YYData->{FILE},
"LINE" => $_[0]->YYData->{LINE},
}}
;
element_list1:
#empty
{ [] }
@ -603,7 +616,7 @@ again:
if ($1 =~
/^(coclass|interface|import|importlib
|include|cpp_quote|typedef
|union|struct|enum|bitmap
|union|struct|enum|bitmap|pipe
|void|const|unsigned|signed)$/x) {
return $1;
}

File diff suppressed because it is too large Load Diff

View File

@ -928,7 +928,7 @@ my %property_list = (
"bitmap64bit" => ["BITMAP"],
# array
"range" => ["ELEMENT"],
"range" => ["ELEMENT", "PIPE"],
"size_is" => ["ELEMENT"],
"string" => ["ELEMENT"],
"noheader" => ["ELEMENT"],
@ -1119,6 +1119,18 @@ sub ValidUnion($)
}
}
#####################################################################
# validate a pipe
sub ValidPipe($)
{
my ($pipe) = @_;
my $data = $pipe->{DATA};
ValidProperties($pipe, "PIPE");
fatal($pipe, $pipe->{NAME} . ": 'pipe' is not yet supported by pidl");
}
#####################################################################
# parse a typedef
sub ValidTypedef($)
@ -1164,7 +1176,8 @@ sub ValidType($)
STRUCT => \&ValidStruct,
UNION => \&ValidUnion,
ENUM => \&ValidEnum,
BITMAP => \&ValidBitmap
BITMAP => \&ValidBitmap,
PIPE => \&ValidPipe
}->{$t->{TYPE}}->($t);
}
@ -1206,7 +1219,8 @@ sub ValidInterface($)
$d->{TYPE} eq "STRUCT" or
$d->{TYPE} eq "UNION" or
$d->{TYPE} eq "ENUM" or
$d->{TYPE} eq "BITMAP") && ValidType($d);
$d->{TYPE} eq "BITMAP" or
$d->{TYPE} eq "PIPE") && ValidType($d);
}
}