17 print "$0: ERROR: $msg\n";
24 my ($expat, $el, %attr) = @_;
26 if ($el eq "template")
28 $curTemplate = $attr{name};
29 if (!defined $curTemplate)
31 error("<template> element without a 'name' attribute");
47 my ($expat, $str) = @_;
49 if (defined $curInflection)
51 $curInflection .= $str;
58 my ($expat, $el) = @_;
62 die unless defined $curInflection;
63 if (defined $personTable{$curInflection})
65 error("person in template $curTemplate has duplicate inflections ($curInflection)");
67 $personTable{$curInflection} = 1;
68 $curInflection = undef;
73 ###############################################################################
76 chdir($workDir) if defined $workDir;
78 my $parser = new XML::Parser(Handlers => {
79 Start => \&handleStart,
83 $parser->parsefile("conjugation-fr.xml");