source: subversion/applications/editors/josm/plugins/lang/convvalidator.pl @ 10585

Last change on this file since 10585 was 9732, checked in by Dirk Stoecker, 12 years ago

updated

  • Property svn:executable set to *
File size: 531 bytes
Line 
1#! /usr/bin/perl -w
2
3# Written by Dirk Stöcker <openstreetmap@dstoecker.de>
4# Public domain, no rights reserved.
5
6use strict;
7
8my $item;
9my $comment = 0;
10
11# This is a simple conversion and in no way a complete XML parser
12# but it works with a default Perl installation
13
14while(my $line = <>)
15{
16  chomp($line);
17  if($line =~ /^#(.*)$/)
18  {
19    print "//$1\n";
20  }
21  elsif($line =~ /^$/)
22  {
23    print "\n";
24  }
25  elsif($line =~ /(.*) *# *(.*) *$/)
26  {
27    print "tr(\"$2\") // $1\n";
28  }
29  else
30  {
31    print "/* $line */\n";
32  }
33}
Note: See TracBrowser for help on using the repository browser.