From bb245c9d4adcd8702a860d658f236c865e31abce Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 11 Feb 2001 07:11:47 +0000 Subject: [PATCH] =?UTF-8?q?-=20Syntax-Pr=C3=BCfung=20f=C3=BCr=20messages.t?= =?UTF-8?q?xt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/syntax-test-messages.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 src/tools/syntax-test-messages.pl diff --git a/src/tools/syntax-test-messages.pl b/src/tools/syntax-test-messages.pl new file mode 100755 index 000000000..fa7c7aa00 --- /dev/null +++ b/src/tools/syntax-test-messages.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl +# vi:set ts=2: + +$errorcount = 0; +$linecount = 0; + +while(<>) { + $line = $_; + + $linecount++; + + if($line !~ /^\s*#/ && $line !~ /^\s*$/ && $line !~ /^\w+;(events|magic|errors|study|economy|battle|movement|production):[012345];(de|en);.+/) { + print "syntax error in line $linecount: $line\n"; + $errorcount++; + } +} + +if($errorcount > 0) { + print "$errorcount errors found.\n"; +} else { + print "No errors found.\n"; +} +