ack/lib/descr/fe.src
1991-06-26 17:36:59 +00:00

226 lines
5.1 KiB
Plaintext

# (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
# $Header$
#
# Don't generate line updating code by default (i.e.: -L flag provided to cem).
# To put it on again: use -NL
var LFLAG=-L
var C_INCLUDES=-I{EM}/include/_tail_cc
var ANSI_C_INCLUDES=-I{EM}/include/tail_ac
callname ack
name cpp
# no from, this is a preprocessor
to .i
program {EM}/lib/cpp{ANSI_C?}
mapflag -I* CPP_F={CPP_F?} -I*
mapflag -U* CPP_F={CPP_F?} -U*
mapflag -D* CPP_F={CPP_F?} -D*
mapflag -P CPP_F={CPP_F?} -P
mapflag -C CPP_F={CPP_F?} -C
mapflag -wo CPP_F={CPP_F?} -o
mapflag -ansi ANSI_C=.ansi
args {CPP_F?} ({SUFFIX?}:.ocm=-I{EM}/include/occam) \
({ANSI_C?}:.ansi={SYSINCLUDES?} {ANSI_C_INCLUDES} {INCLUDES?}) \
({ANSI_C?.c}:{SUFFIX}={SYSINCLUDES?} {C_INCLUDES} {INCLUDES?}) \
-D{NAME} \
({ANSI_C?.xx}:.xx=-DEM_WSIZE={w} -DEM_PSIZE={p} \
-DEM_SSIZE={s} -DEM_LSIZE={l} -DEM_FSIZE={f} -DEM_DSIZE={d}) \
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
<
stdout
prep is
end
name cem
from .c
to .k
program {EM}/lib/em_cemcom{ANSI_C?}
mapflag -ansi ANSI=ansi
# mapflag -I* CPP_F={CPP_F?} -I*
# mapflag -U* CPP_F={CPP_F?} -U*
# mapflag -D* CPP_F={CPP_F?} -D*
mapflag -M* CEM_F={CEM_F?} -M*
mapflag -L CEM_F={CEM_F?} -L
mapflag -A CEM_F={CEM_F?} -A
mapflag -NL LFLAG=
mapflag -KR CEM_F={CEM_F?} -R
mapflag -w CEM_F={CEM_F?} -w
mapflag -wa CEM_F={CEM_F?} -a
mapflag -wo CEM_F={CEM_F?} -o
mapflag -ws CEM_F={CEM_F?} -s
mapflag -g CEM_F={CEM_F?} -g
mapflag -p CEM_F={CEM_F?} -p
mapflag -V* CEM_F={CEM_F?} -V*
rts .c
need .c
args \
{CPP_F?} \
{SYSINCLUDES?} \
({ANSI_C?}:.ansi={ANSI_C_INCLUDES}) \
({ANSI_C?.c}:.c={C_INCLUDES}) \
{INCLUDES?} \
-D{NAME} \
-D_EM_WSIZE={w} -D_EM_PSIZE={p} \
-D_EM_SSIZE={s} -D_EM_LSIZE={l} -D_EM_FSIZE={f} -D_EM_DSIZE={d} \
-Vw{w}.{w}i{w}.{w}p{p}.{w}f{f}.{w}s{s}.{s}l{l}.{w}d{d}.{w} \
{CC_ALIGN?} \
{CEM_F?} {LFLAG?} < >
callname acc
callname cc
end
name pc
from .p
to .k
program {EM}/lib/em_pc
mapflag -L PC_F={PC_F?} -L
# mapflag -s PC_F={PC_F?} -s
mapflag -_ PC_F={PC_F?} -U
mapflag -w PC_F={PC_F?} -w
mapflag -V* PC_F={PC_F?} -V*
mapflag -M* PC_F={PC_F?} -M*
# mapflag -i* PC_F={PC_F?} -i*
mapflag -A PC_F={PC_F?} -A
# mapflag -R PC_F={PC_F?} -R
mapflag --* PC_F={PC_F?} -*
#range checks can only be disabled through comments
args \
-Vw{w}.{w}i{w}.{w}l{l}.{w}p{p}.{w}f{d}.{w}S{w}.{w} \
{PC_F?} < > {SOURCE}
prep cond
rts .p
need .p
callname apc
callname pc
end
name m2
from .mod.def
to .k
program {EM}/lib/em_m2
mapflag -I* M2_INCL={M2_INCL?} -I*
mapflag -L M2_F={M2_F?} -L
mapflag -g M2_F={M2_F?} -g
mapflag -w* M2_F={M2_F?} -w*
mapflag -W* M2_F={M2_F?} -W*
mapflag -_ M2_F={M2_F?} -U
mapflag -M* M2_F={M2_F?} -M*
mapflag -x M2_F={M2_F?} -x
mapflag -Xs M2_F={M2_F?} -s
mapflag -V* M2_F={M2_F?} -V*
mapflag --* M2_F={M2_F?} -*
args \
{M2_INCL?} -I{EM}/lib/m2 {M2SYSLIB?} \
-Vw{w}.{w}i{w}.{w}p{p}.{w}l{l}.{w}f{f}.{w}d{d}.{w} \
{M2_ALIGN?} {M2_F?} < >
prep cond
rts .mod
need .mod
callname m2
end
name ocm
from .ocm
to .k
program {EM}/lib/em_occam
mapflag -L OCM_F={OCM_F?} -L
mapflag -V* OCM_F={OCM_F?} -V*
args -Vw{w}p{p}l{l} {OCM_F?}
stdin
stdout
rts .ocm
need .ocm
prep cond
callname ocm
end
name abc
from .b
to .k
program {EM}/lib/em_bem
mapflag -h ABC_F={ABC_F?} -h
mapflag -w ABC_F={ABC_F?} -w
mapflag -L ABC_F={ABC_F?} -L
mapflag -E ABC_F={ABC_F?} -E
# mapflag -d ABC_F={ABC_F?} -d
args -Vw{w}p{p}f{d} {ABC_F?} < > {SOURCE}
prep cond
rts .b
need .b
callname abc
end
var A68INIT={EM}/lib/em_a68s_init
name a68s
from .8.a68
to .k
program {EM}/lib/em_a68s{w}{p}
mapflag -PA* A68INIT=*
args < > {SOURCE}.lst {A68INIT}{w}{p} /dev/null
prep cond
rts .8
need .8
callname a68s
end
name encode
from .e
to .k
program {EM}/lib/em_encode
args <
prep cond
stdout
end
name opt
from .k
to .m
program {EM}/lib/em_opt
mapflag -LIB OPT_F={OPT_F?} -L
args {OPT_F?} <
stdout
optimizer
end
name ego
from .m.ma
to .gk
program {EM}/lib/em_ego
mapflag -EGO-* EGO_F={EGO_F?} -*
# The following lines are obsolete, but here for backwards compatibility.
# They should be removed some day.
mapflag -IL* EGO_F={EGO_F?} -IL*
mapflag -CS* EGO_F={EGO_F?} -CS*
mapflag -SR* EGO_F={EGO_F?} -SR*
mapflag -UD* EGO_F={EGO_F?} -UD*
mapflag -LV* EGO_F={EGO_F?} -LV*
mapflag -SA* EGO_F={EGO_F?} -RA*
mapflag -SP* EGO_F={EGO_F?} -SP*
mapflag -BO* EGO_F={EGO_F?} -BO*
mapflag -CJ* EGO_F={EGO_F?} -CJ*
mapflag -EV EGO_F={EGO_F?} -V
# End of obsolete lines
mapflag -Q* EGO_F={EGO_F?} -Q*
mapflag -T* EGO_F={EGO_F?} -T*
mapflag -S* EGO_F={EGO_F?} -S*
mapflag -s* EGO_F={EGO_F?} -s*
mapflag -a EGO_F={EGO_F?} -a
mapflag -O* EGO_F={EGO_F?} -O*
args \
{EGO_F?} -P {EM}/lib/ego \
-M{EM}/lib/ego/{M}descr <
optimizer 2
stdout
combiner
end
name opt2
# output of the global optimizer is processed by a stripped version
# of the em peephole optimizer
from .gk
to .g
program {EM}/lib/em_opt2
# mapflag -LIB OPT_F={OPT_F?} -L
args {OPT_F?} <
optimizer
stdout
end
name decode
from .k.m.g.gk
to .e
program {EM}/lib/em_decode
args <
stdout
end