4 # not completed, possibly not needed
13 my %data = read_input
;
14 my($n, $sv, $g) = gen_perfect_hash
(%data);
16 use Data
::Dump
'dump';
18 say STDERR
dump \
%data;
19 say STDERR
dump $n,$sv,$g;
22 print "static int HASHNAME_fg1[$n] =\n{\n";
24 for( my $i = 0; $i < $n; $i++ ){
25 no warnings
'uninitialized';
26 my $h = ${$g}[$i*2+0] || 'UNUSED';
28 #print "\t", ${$g}[${$f1}[$i]], "\n";
35 print "static int HASHNAME_fg2[$n] =\n{\n";
37 for( my $i = 0; $i < $n; $i++ ){
38 no warnings
'uninitialized';
39 no warnings
'uninitialized';
40 my $h = ${$g}[$i*2+1] || 'UNUSED';
42 #print "\t", ${$g}[${$f2}[$i]], "\n";
49 struct p_hash HASHNAME =