1991-12-18 09:47:19 +00:00
|
|
|
BEGIN { print "#include \"pop_push.h\""
|
1990-07-18 16:31:32 +00:00
|
|
|
print
|
|
|
|
print "char *pop_push[] = {"
|
|
|
|
print "\"\","
|
2010-08-01 10:35:04 +00:00
|
|
|
s = 0
|
1990-07-18 16:31:32 +00:00
|
|
|
}
|
2010-08-01 10:35:04 +00:00
|
|
|
/aar/ { s = NR }
|
|
|
|
{ if (s) {
|
1993-01-12 15:48:39 +00:00
|
|
|
if ($1 == "cal" || $1 == "cai") $3 = "-?"
|
1990-07-26 15:08:49 +00:00
|
|
|
printf("/* %s */ \"%s\",\n",$1,$3)
|
2010-08-01 10:35:04 +00:00
|
|
|
col_2[NR-s] = $2
|
|
|
|
comment[NR-s] = $1
|
1990-07-18 16:31:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
END { print "};"
|
|
|
|
print
|
|
|
|
print "char flow_tab[]= {"
|
2006-07-18 17:20:05 +00:00
|
|
|
print "'\\000',"
|
2010-08-01 10:35:04 +00:00
|
|
|
for(i=0; i < NR-s; i++) {
|
1990-07-18 16:31:32 +00:00
|
|
|
inf = col_2[i]
|
1990-07-26 15:08:49 +00:00
|
|
|
f_out = "/* " comment[i] " */ "
|
|
|
|
if (substr(inf,1,1)=="b") f_out = f_out "HASLABEL|"
|
1990-07-18 16:31:32 +00:00
|
|
|
if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA"
|
|
|
|
else if (substr(inf,2,1)=="t") f_out = f_out "JUMP"
|
2006-07-18 17:20:05 +00:00
|
|
|
else f_out = f_out "'\\000'"
|
1990-07-18 16:31:32 +00:00
|
|
|
print f_out","
|
|
|
|
}
|
|
|
|
print "};"
|
|
|
|
}
|