blob: 3a2e82e1e02cae8bc22d78541385c815de7f63e2 [file] [log] [blame]
Andrew Lenharth9b3114d2005-04-27 02:13:20 +00001#!/usr/bin/perl
2# a first attempt to parse the nightly tester pages into something
3# one can reason about, namely import into a database
4# USE: perl parseNLT.pl <2005-03-31.html
5# for example
6
7while(<>)
8 {
9 if (/LLVM Test Results for (\w+) (\d+), (\d+)</)
10 {
11 $mon = $1;
12 $day = $2;
13 $year = $3;
14 }
15 if (/<td>([^<]+)<\/td>/)
16 {
17 if ($prefix)
18 { $output .= "$1 "; }
19 }
20 if (/<tr/)
21 {
22 if ($output)
23 { print "\n$day $mon $year $prefix/$output"; $output = ""; }
24 }
25 if (/<h2>(Programs.+)<\/h2>/)
26 {
27 $prefix = $1;
28 }
29 }
30
31if ($output)
32 { print "\n$day $mon $year $prefix/$output"; $output = ""; }