summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-24 23:39:12 +0000
committerTim Potter <tpot@samba.org>2001-11-24 23:39:12 +0000
commitde5f7da321d8e808c4d0e2646488de5f0d443837 (patch)
treecafbfb22e233a94551052fdc90e13b0218b1a3db /source4/build
parente581569a87aa76d6068bfd5238ab320e159c5456 (diff)
downloadsamba-de5f7da321d8e808c4d0e2646488de5f0d443837.tar.gz
samba-de5f7da321d8e808c4d0e2646488de5f0d443837.tar.bz2
samba-de5f7da321d8e808c4d0e2646488de5f0d443837.zip
Renamed functions from Dump* to Parse*
(This used to be commit 952b47dc23ee648daf065d08d35fab839e4afd04)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/parser.pm64
1 files changed, 32 insertions, 32 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index cad4d10d42..03bc5f3aff 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -10,8 +10,8 @@ use Data::Dumper;
my($res);
#####################################################################
-# dump a properties list
-sub DumpProperties($)
+# parse a properties list
+sub ParseProperties($)
{
my($props) = shift;
foreach my $d (@{$props}) {
@@ -26,12 +26,12 @@ sub DumpProperties($)
}
#####################################################################
-# dump a structure element
-sub DumpElement($)
+# parse a structure element
+sub ParseElement($)
{
my($element) = shift;
- (defined $element->{PROPERTIES}) && DumpProperties($element->{PROPERTIES});
- DumpType($element->{TYPE});
+ (defined $element->{PROPERTIES}) && ParseProperties($element->{PROPERTIES});
+ ParseType($element->{TYPE});
$res .= " ";
if ($element->{POINTERS}) {
for (my($i)=0; $i < $element->{POINTERS}; $i++) {
@@ -43,14 +43,14 @@ sub DumpElement($)
}
#####################################################################
-# dump a struct
-sub DumpStruct($)
+# parse a struct
+sub ParseStruct($)
{
my($struct) = shift;
$res .= "struct {\n";
if (defined $struct->{ELEMENTS}) {
foreach my $e (@{$struct->{ELEMENTS}}) {
- DumpElement($e);
+ ParseElement($e);
$res .= ";\n";
}
}
@@ -59,85 +59,85 @@ sub DumpStruct($)
#####################################################################
-# dump a union element
-sub DumpUnionElement($)
+# parse a union element
+sub ParseUnionElement($)
{
my($element) = shift;
$res .= "[case($element->{CASE})] ";
- DumpElement($element->{DATA});
+ ParseElement($element->{DATA});
$res .= ";\n";
}
#####################################################################
-# dump a union
-sub DumpUnion($)
+# parse a union
+sub ParseUnion($)
{
my($union) = shift;
- (defined $union->{PROPERTIES}) && DumpProperties($union->{PROPERTIES});
+ (defined $union->{PROPERTIES}) && ParseProperties($union->{PROPERTIES});
$res .= "union {\n";
foreach my $e (@{$union->{DATA}}) {
- DumpUnionElement($e);
+ ParseUnionElement($e);
}
$res .= "}";
}
#####################################################################
-# dump a type
-sub DumpType($)
+# parse a type
+sub ParseType($)
{
my($data) = shift;
if (ref($data) eq "HASH") {
($data->{TYPE} eq "STRUCT") &&
- DumpStruct($data);
+ ParseStruct($data);
($data->{TYPE} eq "UNION") &&
- DumpUnion($data);
+ ParseUnion($data);
} else {
$res .= "$data";
}
}
#####################################################################
-# dump a typedef
-sub DumpTypedef($)
+# parse a typedef
+sub ParseTypedef($)
{
my($typedef) = shift;
$res .= "typedef ";
- DumpType($typedef->{DATA});
+ ParseType($typedef->{DATA});
$res .= " $typedef->{NAME};\n\n";
}
#####################################################################
-# dump a function
-sub DumpFunction($)
+# parse a function
+sub ParseFunction($)
{
my($function) = shift;
$res .= "/* ignoring function $function->{NAME} */\n";
}
#####################################################################
-# dump the interface definitions
-sub DumpInterface($)
+# parse the interface definitions
+sub ParseInterface($)
{
my($interface) = shift;
my($data) = $interface->{DATA};
foreach my $d (@{$data}) {
($d->{TYPE} eq "TYPEDEF") &&
- DumpTypedef($d);
+ ParseTypedef($d);
($d->{TYPE} eq "FUNCTION") &&
- DumpFunction($d);
+ ParseFunction($d);
}
}
#####################################################################
-# dump a parsed IDL structure back into an IDL file
-sub Dump($)
+# parse a parsed IDL structure back into an IDL file
+sub Parse($)
{
my($idl) = shift;
$res = "/* parser auto-generated by pidl */\n\n";
foreach my $x (@{$idl}) {
($x->{TYPE} eq "INTERFACE") &&
- DumpInterface($x);
+ ParseInterface($x);
}
return $res;
}