X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=i18n-diff-auditor;h=42ebe00d9dbc85f6c1937ad1df92ee89d29921cc;hp=8ec5e9f436ab3b5831d376096b76e49f6adccc8e;hb=3863dba15266045f598312bb14306f4b43a3ca13;hpb=df40de728a833cbba178e87c3df19329255c0f64 diff --git a/i18n-diff-auditor b/i18n-diff-auditor index 8ec5e9f4..42ebe00d 100755 --- a/i18n-diff-auditor +++ b/i18n-diff-auditor @@ -144,9 +144,9 @@ sub semiparse ($) { Q => $q, V => $v}; } elsif (s{^$perlop_re|^\;}{}) { push @o, { T => 'op', E => $&, P => $& }; - } elsif (s/[[{(]//) { + } elsif (s/^[[{(]//) { push @o, { T => 'bra', E => $&, P => $& }; - } elsif (s/[]})]//) { + } elsif (s/^[]})]//) { push @o, { T => 'ket', E => $&, P => $& }; } elsif (s/^( [\$\@\%] )( \{ )//x) { push @o, { T => 'deref', E => $1, P => $1 }, @@ -210,6 +210,8 @@ sub analyse_chunk_core () { $next_x->(); $next_y->(); next if $x->{E} eq $y->{E}; + next if $x->{E} eq 'sprintf' and $y->{E} eq 'f_'; + next if $x->{E} eq 'die' and $y->{E} eq 'confess'; if ($y->{E} eq '+' and @ys >= 3 and $ys[0]{E} eq '(' @@ -307,7 +309,7 @@ sub analyse_chunk_core () { pop @analysed_y; last; } - $xs =~ s{^\s+}{}; + $xs =~ s{^\s+}{} if $bras; $exactly->($y->{E}, $y->{P}); if ($y->{T} eq 'bra' or $y->{E} eq '?') { $bras++;