summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhans-christoph <hans-christoph@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-07-13 10:59:35 +0000
committerhans-christoph <hans-christoph@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-07-13 10:59:35 +0000
commitb367e7bd88517d657981f72d6d0a7d5dc80ef70e (patch)
treeec9f4e3c2dee7f39f3119518450ba6410db4467e
parentbef5512ae4dac1ce86039c8b43aae2d7e0e2d5ff (diff)
downloadneo-layout-b367e7bd88517d657981f72d6d0a7d5dc80ef70e.tar.gz
neo-layout-b367e7bd88517d657981f72d6d0a7d5dc80ef70e.tar.bz2
neo-layout-b367e7bd88517d657981f72d6d0a7d5dc80ef70e.zip
Check Compose: Perlskript zur Überprüfung der Präfixeigenschaft
git-svn-id: https://svn.neo-layout.org@1926 b9310e46-f624-0410-8ea1-cfbb3a30dc96
-rwxr-xr-xCompose/check-compose.pl41
1 files changed, 41 insertions, 0 deletions
diff --git a/Compose/check-compose.pl b/Compose/check-compose.pl
new file mode 100755
index 0000000..8e3b139
--- /dev/null
+++ b/Compose/check-compose.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+# Dieses Skript prüft übergebene Compose-Dateien auf Präfix-Eigenschaft
+# Beispiel-Aufruf:
+#
+# ./check-compose.pl *.neo
+
+use strict;
+
+my %prefix;
+my %code;
+
+while (my $line = <>) {
+ chomp $line;
+ next unless ($line =~ /^([^#]+):/);
+
+ my @codes = split (/\s+/, $1);
+
+ for my $i (0..$#codes-1) {
+ $prefix{"@codes[0..$i]"} = $line;
+
+ if ($code{"@codes[0..$i]"}) {
+ print <<EOF;
+
+* @codes[0..$i] Präfix bereits terminal verwendet
+ $line
+ $code{"@codes[0..$i]"}
+EOF
+ }
+ }
+
+ $code{"@codes"} = $line;
+ if ($prefix{"@codes"}) {
+ print <<EOF;
+
+* @codes Sequenz bereits als Präfix verwendet
+ $line
+ $prefix{"@codes"}
+EOF
+ }
+}