chiark / gitweb /
i18n: i18n-diff-auditor: improve debug output
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 22:35:31 +0000 (23:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 23:54:38 +0000 (00:54 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
i18n-diff-auditor

index b4fc5968ad66bde2bae169b9457c9dc831b4b3bb..6f9dab51a53c1c9c189ad5cafe19b02c1a21ac5c 100755 (executable)
@@ -248,8 +248,8 @@ sub analyse_chunk_core () {
                my ($lit, $what) = @_;
                my $xl = substr($xs, 0, length($lit));
                if ($xl ne $lit) {
                my ($lit, $what) = @_;
                my $xl = substr($xs, 0, length($lit));
                if ($xl ne $lit) {
-                   debug $ichunkstart, "not exactly x: $xs";
-                   debug $ichunkstart, "not exactly y: $lit";
+                   debug $ichunkstart, "not exactly x: ..\"$xs\"";
+                   debug $ichunkstart, "not exactly y:    $lit";
                    my $next = @ys ? $ys[0]{P} : '(end)';
                    die "string contents mismatch near $what before $next\n";
                }
                    my $next = @ys ? $ys[0]{P} : '(end)';
                    die "string contents mismatch near $what before $next\n";
                }
@@ -289,6 +289,7 @@ sub analyse_chunk_core () {
                        # lookahead shows close of containing scope
                        # or lower precedence operator
                        unshift @ys, $y;
                        # lookahead shows close of containing scope
                        # or lower precedence operator
                        unshift @ys, $y;
+                       pop @analysed_y;
                        last;
                    }
                    $xs =~ s{^\s+}{};
                        last;
                    }
                    $xs =~ s{^\s+}{};