mif-doc.prl
748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/local/bin/perl5 -w
#
# Copyright (C) 1996-1998 by the Board of Trustees
# of Leland Stanford Junior University.
#
# This file is part of the SimOS distribution.
# See LICENSE file for terms of the license.
#
print STDOUT "<MIFFile 4.0>\n";
print STDOUT "<Para\n";
while (<>) {
if (/^#include/) {
$file = $';
chop($file);
print STDOUT ">\n";
open(INFILE, $file);
while (<INFILE>) {
print STDOUT;
}
close(INFILE);
print STDOUT "<Para\n";
} elsif (!/\S/) {
print STDOUT ">\n";
print STDOUT "<Para\n";
} else {
chop;
print STDOUT " <ParaLine <String `$_ '>>\n";
}
}
print STDOUT ">\n";