my $package = 'SchemaParser'; my $grammar = "$package.y"; my $module = "$package.pm"; my $output = 'y.tab.pl';
print "Generating $package\n";
die "Couldn't compile grammer in $grammar" if ( system("byacc -P $grammar") != 0 );
die "Error copying $output to $module" if ( system("tail +2 $output > $module") != 0 );
unlink $output || die "Couldn't unlink $output: $!";