chiark
/
gitweb
/
~ianmdlvl
/
dgit-junk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81019d4
)
auditor wip semiparse seems to work ish
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 12:51:06 +0000
(13:51 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 12:51:06 +0000
(13:51 +0100)
i18n-diff-auditor
patch
|
blob
|
history
diff --git
a/i18n-diff-auditor
b/i18n-diff-auditor
index 8252c3f1ba4d6f9b5517c2b8c08c8a74a25f98be..d1ae6f1818826d5b1528776ef83debdf2fb66d18 100755
(executable)
--- 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 () {