chiark / gitweb /
auditor wip semiparse seems to work ish
[dgit-junk.git] / i18n-diff-auditor
index 8252c3f1ba4d6f9b5517c2b8c08c8a74a25f98be..d1ae6f1818826d5b1528776ef83debdf2fb66d18 100755 (executable)
@@ -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 () {