1 2 3 4 5 6
#!/usr/bin/perl -w while(<>) { chomp; print "#define $1 0x$2\n" while(/(OFFSET_\w+):?\s+([0-9a-f]+)/g); }