Last change
on this file since 31634 was 29943, checked in by stoecker, 11 years ago |
remove obsolete comments to empty string
|
File size:
764 bytes
|
Rev | Line | |
---|
[12484] | 1 | #! /usr/bin/perl -w
|
---|
| 2 |
|
---|
| 3 | # Written by Dirk Stöcker <openstreetmap@dstoecker.de>
|
---|
| 4 | # Public domain, no rights reserved.
|
---|
| 5 |
|
---|
| 6 | use strict;
|
---|
| 7 |
|
---|
| 8 | my $item;
|
---|
| 9 | my $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 |
|
---|
[13392] | 14 | # Print a header to write valid Java code. No line break,
|
---|
| 15 | # so that the input and output line numbers will match.
|
---|
| 16 | print "class trans_surveyor { void tr(String s){} void f() {";
|
---|
| 17 |
|
---|
[12484] | 18 | while(my $line = <>)
|
---|
| 19 | {
|
---|
| 20 | chomp($line);
|
---|
[29943] | 21 | print "tr(\"\"); ";
|
---|
[12484] | 22 | if($line =~ /^#(.*)$/)
|
---|
| 23 | {
|
---|
[23091] | 24 | print "/* $1 */\n";
|
---|
[12484] | 25 | }
|
---|
| 26 | elsif($line =~ /^$/)
|
---|
| 27 | {
|
---|
| 28 | print "\n";
|
---|
| 29 | }
|
---|
| 30 | elsif($line =~ /<button label=\"(.*?)\"/)
|
---|
| 31 | {
|
---|
[23091] | 32 | print "/* $line*/ tr(\"$1\");\n";
|
---|
[12484] | 33 | }
|
---|
| 34 | else
|
---|
| 35 | {
|
---|
| 36 | print "/* $line */\n";
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
[13392] | 39 |
|
---|
| 40 | print "}}\n";
|
---|
Note:
See
TracBrowser
for help on using the repository browser.