Skip to content
Snippets Groups Projects
Commit 2d94635f authored by Alberto Massari's avatar Alberto Massari
Browse files

Retrieve base class and static methods; added missing final </div>; closing...

Retrieve base class and static methods; added missing final </div>; closing brace for enum values was not indented properly

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@387852 13f79535-47bb-0310-9956-ffa450edef68
parent 53193077
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,14 @@ my $filename = $ARGV[0];
open(IN,"< $filename") || die("Couldn't open input file: $filename");
while (<IN>) {
if ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)/) {
if ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)\s*[:]\s*public\s([^\s]+)/) {
$classname = $1;
$baseclass = $2;
last;
}
elsif ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)/) {
$classname = $1;
$baseclass = "";
last;
}
}
......@@ -32,9 +38,17 @@ print OUT <<"END1";
<font color="#000000">$filename:</font></h3>
<div id="$classname"><font face="Courier New,Courier"><font size=-1>class
$classname</font></font>
<table>
$classname
END1
if ($baseclass ne "") {
print OUT <<"END2";
: public $baseclass
END2
}
print OUT <<"END3";
</font></font>
<table>
END3
while (<IN>) {
if ($_=~/^\s*public\s*:/) {
......@@ -83,6 +97,25 @@ while (<IN>) {
<td><font face="Courier New,Courier"><font size=-1>$b</font></font></td>
<td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
</tr>
END
} elsif ($_=~/^\s*(static)\s+([^\s\(][^\(]*[^\s\(])\s+([^\s\(]+\(.*)/) {
$a=$1;
$b=$2;
$c=$3;
while ($c!~/\)/) {
$c.=<IN>;
}
print OUT <<"END";
<tr ALIGN=LEFT VALIGN=TOP>
<td></td>
<td><font face="Courier New,Courier"><font size=-1>$a</font></font></td>
<td><font face="Courier New,Courier"><font size=-1>$b</font></font></td>
<td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
</tr>
END
......@@ -117,10 +150,10 @@ END3
if ($_=~/}\s*;/) {
print OUT <<"END4";
<tr ALIGN=LEFT VALIGN=TOP>
<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
<td></td>
<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
<td></td>
<td></td>
......@@ -148,6 +181,7 @@ print OUT <<"END6";
<td></td>
</tr>
</table>
</div>
END6
close(OUT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment