Minimal changes to get it to compile (a few taken from David Given ack-6.0pre5)
[Ack-5.5.git] / util / opt / pop_push.awk
1 BEGIN   { print "#include \"pop_push.h\""
2           print
3           print "char *pop_push[] = {"
4           print "\"\","
5           s = 0
6 }
7 /aar/   { s = NR }
8         { if (s) {
9               if ($1 == "cal" || $1 == "cai") $3 = "-?"
10               printf("/* %s */ \"%s\",\n",$1,$3) 
11               col_2[NR-s] = $2
12               comment[NR-s] = $1
13           }
14         }
15 END     { print "};"
16           print
17           print "char flow_tab[]= {"
18           print "'\\000',"
19           for(i=0; i < NR-s; i++) {
20                 inf = col_2[i]
21                 f_out = "/* " comment[i] " */ "
22                 if (substr(inf,1,1)=="b") f_out = f_out "HASLABEL|"
23                 if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA"
24                 else if (substr(inf,2,1)=="t") f_out = f_out "JUMP"
25                 else f_out = f_out "'\\000'"
26                 print f_out","
27           }
28           print "};"
29         }