mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-15 00:08:07 -04:00
24 lines
287 B
Perl
Executable File
24 lines
287 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
while (<>)
|
|
{
|
|
chop;
|
|
if (/procedure/ || /function/)
|
|
{
|
|
$print = 1;
|
|
}
|
|
if (/begin/ || /\s+as/)
|
|
{
|
|
if ($print)
|
|
{
|
|
$print = 0;
|
|
print ";\n";
|
|
}
|
|
}
|
|
s/\t/ /;
|
|
s/(\s)\s+/$1/g;
|
|
s/\(\s+/\(/g;
|
|
s/\s+\)/\)/g;
|
|
print if ($print)
|
|
}
|