hackyacc.awk
387 Bytes
BEGIN {
print "/* this has had hackyacc run on it */"
found = 0;
printing = 1;
}
/typedef union/ {
if (!found) {
printing = 0;
}
found = 1;
}
{
if (printing) print $0
}
/LASTTOKEN/ {
printing = 1;
print "\n/* this is the start of hackyacc modifications */"
print "#include \"y.tab.h\""
print "/* this is the end of modifications */\n"
}