ack/mach/sparc/ce/cegpp

31 lines
526 B
Plaintext
Raw Normal View History

1991-09-20 18:14:05 +00:00
# dit sed script zet regels van het type "sll $a, $$, $44" om in
# fprint(codefile, "sll %s, $, $44\n", a);
# en meer....
# Usage: sed -f $0 < EM_table.x > EM_table
# remember to include special thingies in "mach.h"
#n
s/==>/&\
code_combiner(/
s/\.[ ]*$/)\
&/
/^[ ]*"/{
s/%/%%/g
i\
fprint ( codefile,
s/\$\$/__NEVER_USED__/g
s/\$\([0-9][0-9]*\)/__NEVER_USED__\1/g
s/\$\$/%a/g
:a
s/\([^\$]*\)\$\([^\$][A-Za-z0-9_]*\)\(.*\)/\1%s\3\
\2/
t a
s/\n/,/g
s/__NEVER_USED__/$/g
s/";/"/
s/\([^"]*"[^"]*\)"\(.*\)/\1\\n"\2/
p
i\
);
D
}