Handle log files without parser conflict messages
authorJoachim Breitner <mail@joachim-breitner.de>
Tue, 4 Aug 2015 20:13:25 +0000 (20:13 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 4 Aug 2015 20:14:28 +0000 (20:14 +0000)
This fixes #15.

ghc/log2csv

index ebca9c8..1714197 100755 (executable)
@@ -29,10 +29,16 @@ for my $filename (@ARGV) {
                printf "testsuite/unexpected failures;$1\n"
                        if (m/^ +(\d+) unexpected failures/);
 
+       }
+       if ($log =~ m!^shift/reduce conflicts:  (\d+)!m) {
                printf "parser/shift/reduce;$1\n"
-                       if (m!^shift/reduce conflicts:  (\d+)!);
+       } else {
+               printf "parser/shift/reduce;0\n"
+       }
+       if ($log =~ m!^reduce/reduce conflicts: (\d+)!m) {
                printf "parser/reduce/reduce;$1\n"
-                       if (m!^reduce/reduce conflicts: (\d+)!);
+       } else {
+               printf "parser/reduce/reduce;0\n"
        }
 
        printf "buildtime/make;%d\n", $1 *60 + $2