From 42f09781a7f34653c8e81d10ac41f18d2d3c74a3 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Thu, 15 Jul 2010 18:44:14 +0200 Subject: [PATCH] Add comments about the cases in the if clause --- pae2xml.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pae2xml.pl b/pae2xml.pl index 7b54996..ea81b9e 100755 --- a/pae2xml.pl +++ b/pae2xml.pl @@ -186,16 +186,16 @@ sub parse_notes { $notes =~ s/\=(\d)/$1/gs; # replace multibar rests #n with just n while ($notes ne "") { - if ($notes =~ /^(\'+|\,+)(.*)$/) { + if ($notes =~ /^(\'+|\,+)(.*)$/) { # Octave marks ($oct, $notes) = ($1, $2); octave($oct); - } elsif ($notes =~ /^qq(.*)$/) { + } elsif ($notes =~ /^qq(.*)$/) { # Begin grace $notes = $1; $qq = 1; - } elsif ($notes =~ /^r(.*)$/) { + } elsif ($notes =~ /^r(.*)$/) { # End grace $notes = $1; $qq = 0; - } elsif ($notes =~ /^(\d+|\=)(\/.*)$/) { + } elsif ($notes =~ /^(\d+|\=)(\/.*)$/) { # normal and multi-measure rests $measrest = $1; $notes = $2; if ($measrest eq '=') { @@ -271,7 +271,7 @@ sub parse_notes { <actual-notes>'.$act_notes.'</actual-notes> <normal-notes>1</normal-notes> </time-modification>', $qq); - } elsif ($notes =~ /^(%\w-\d)(.*)$/) { + } elsif ($notes =~ /^(%\w-\d)(.*)$/) { # Clef change ($clef,$notes) = ($1,$2); $clef =~ /^%(\w)\-(\d)$/; ($clefsign, $clefline) = ($1, $2); @@ -282,14 +282,14 @@ sub parse_notes { </clef> </attributes> '; - } elsif ($notes =~ /^@(\d\/\d|c\/?)\s*(.*)$/) { + } elsif ($notes =~ /^@(\d\/\d|c\/?)\s*(.*)$/) { # time signatue change # print "$notes\n"; ($timesig,$notes) = ($1,$2); #print "-> $timesig / $notes\n"; exit; $timesig = timesignature($timesig); print OUT " <attributes>\n$timesig </attributes>\n"; - } elsif ($notes =~ /^(:?\/+:?)(.*)$/) { + } elsif ($notes =~ /^(:?\/+:?)(.*)$/) { # Barline (and repeats) $barline = $1; $notes = $2; if ($barline =~ /^:\/\/:/) { -- GitLab