#!/usr/bin/perl # Generate dict-*.h from dict-*.t use strict; use warnings; print "// Auto-generated by gen-dict\n"; while () { chomp; next if /^$/ or /^#/; my $prop = $_; my $sym = $_; $sym =~ s{[^A-Za-z0-9_]}{_}g; $sym =~ tr{a-z}{A-Z}; print "P($sym, \"$prop\")\n"; }