]> mj.ucw.cz Git - leo.git/blob - build/gen-dict
Adapted to changes in development version of libucw-xml
[leo.git] / build / gen-dict
1 #!/usr/bin/perl
2 # Generate dict-*.h from dict-*.t
3
4 use strict;
5 use warnings;
6
7 print "// Auto-generated by gen-dict\n";
8 while (<STDIN>) {
9         chomp;
10         next if /^$/ or /^#/;
11         my $prop = $_;
12         my $sym = $_;
13         $sym =~ s{[^A-Za-z0-9_]}{_}g;
14         $sym =~ tr{a-z}{A-Z};
15         print "P($sym, \"$prop\")\n";
16 }