From: Ian Jackson Date: Sun, 30 Sep 2018 12:51:06 +0000 (+0100) Subject: auditor wip semiparse seems to work ish X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=36d9d13a20e44076e35d08a103004dd0f5e61401;p=dgit-junk.git auditor wip semiparse seems to work ish --- diff --git a/i18n-diff-auditor b/i18n-diff-auditor index 8252c3f..d1ae6f1 100755 --- a/i18n-diff-auditor +++ b/i18n-diff-auditor @@ -98,7 +98,7 @@ sub semiparse ($) { my @o; for (;;) { s{^\s+}{}; - if (s{^[\$\@\%][_0-9a-zA-Z]+}{}) { + if (s{^[\$\@\%]?[_0-9a-zA-Z]+}{}) { push @o, { T => 'ident', L => $& }; } elsif (s{^\<\<('?)([A-Z_]+)\1}{}) { my ($q,$d) = ($1,$2); @@ -124,6 +124,7 @@ sub semiparse ($) { die "cannot tokenise \`$&'"; } } + return @o; } sub analyse_chunk () {