25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-matrix)
matrix='yes';
;;
-optimise)
optimise='LOAD SCOPE; ON GENTRANOPT;';
iname='INAME mtt_o;';
;;
*)
echo $1 is an unknown option
exit;;
esac
shift
done
|
>
>
>
>
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-matrix)
matrix='yes';
;;
-optimise)
optimise='LOAD SCOPE; ON GENTRANOPT;';
iname='INAME mtt_o;';
;;
-fixcc )
include=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'`
blurb2='fixing c and cc code';
;;
*)
echo $1 is an unknown option
exit;;
esac
shift
done
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# Inform user
if [ -n "$optimise" ]; then
blurbopt=' using code optimisation'
fi
echo Creating $1_$rep.$lang $blurb $blurbopt
#echo Creating $1_smxx.$lang
#echo Creating $1_smxtx.$lang
# Remove the old log file
rm -f cse2smx_r.log
rm -f $1_smx.$lang
rm -f $1_smxx.$lang
rm -f $1_smxtx.$lang
rm -f $1_$rep.body
# Use reduce to accomplish the transformation
$SYMBOLIC << EOF >cse2smx_lang.log
lang := $lang;
in "$1_subs.r";
in "$1_def.r";
in "$1_cse.r";
in "$1_cr.r";
clear mttx; % Dont need this now - use mkid instead
|
|
>
>
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# Inform user
if [ -n "$optimise" ]; then
blurbopt=' using code optimisation'
fi
echo Creating $1_$rep.$lang $blurb $blurbopt $blurb2
#echo Creating $1_smxx.$lang
#echo Creating $1_smxtx.$lang
# Remove the old log file
rm -f cse2smx_r.log
rm -f $1_smx.$lang
rm -f $1_smxx.$lang
rm -f $1_smxtx.$lang
rm -f $1_$rep.body
# Use reduce to accomplish the transformation
$SYMBOLIC << EOF >cse2smx_lang.log
lang := $lang;
%% Fixes for c and cc (if needed)
$include;
in "$1_subs.r";
in "$1_def.r";
in "$1_cse.r";
in "$1_cr.r";
clear mttx; % Dont need this now - use mkid instead
|