open OUTPUT, ">$ARGV[1]" || die "Can not create $ARGV[1] file: $!";
my $parser = new XML::Parser (Handlers => {Start => \&handle_opcode});
+print_header();
$parser->parsefile($ARGV[0]);
print_trailer();
close(OUTPUT) || die "Can not close file: $!";
}
+sub print_header {
+print OUTPUT<<EOF;
+/* GENERATED FILE, DO NOT EDIT */
+EOF
+}
+
sub print_trailer {
print OUTPUT<<EOF;
#ifndef OPALIAS