Differences From Artifact [dde7b80ddb]:

To Artifact [4c22c539fe]:


14
15
16
17
18
19
20



21
22
23
24
25
26
27
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.24  2000/10/11 09:07:53  peterg
## Vectorisation
## csex rep.
##
## Revision 1.23  2000/10/10 21:00:43  peterg
## More reps added
##







>
>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.25  2000/10/14 08:50:07  peterg
## Use new mtt_header
##
## Revision 1.24  2000/10/11 09:07:53  peterg
## Vectorisation
## csex rep.
##
## Revision 1.23  2000/10/10 21:00:43  peterg
## More reps added
##
135
136
137
138
139
140
141
142




143
144
145
146
147
148
149
150
151


152
153
154
155
156
157
158
159
160
161
162
163
esac

    mtt_header  $1 $rep $ext  > mtt_junk

#Convert from the (optimised) r file
echo >> mtt_junk
echo '## Code' >> mtt_junk
grep 'mtt'  $1_$2.r |\




sed \
    -e "s/^mtt/  mtt/" \
    -e "s/:=/=/" \
    -e "s/\\$/;/" \
 >> mtt_junk


echo endfunction >> mtt_junk



# Vectorise (n,1) arrays when appropriate
if [ -n "$vectorise" ]; then
     mtt_vectorise <mtt_junk >$out
else
     mv mtt_junk $out
fi

# Now invoke the standard error handling.
#mtt_error_r mtt_r2m.log










|
>
>
>
>





|
<


>
>


|

|







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
esac

    mtt_header  $1 $rep $ext  > mtt_junk

#Convert from the (optimised) r file
echo >> mtt_junk
echo '## Code' >> mtt_junk
strip_comments<$1_$2.r | tr [A-Z] [a-z] |\
grep -vi 'MATRIX ' |\
grep -vi 'END;' |\
grep -v '^off' |\
grep -v '^in' |\
sed \
    -e "s/^mtt/  mtt/" \
    -e "s/:=/=/" \
    -e "s/\\$/;/" \
 >> mtt_junk
echo '## END Code' >> mtt_junk

echo endfunction >> mtt_junk

# Mend broken lines
mtt_mend_lines < mtt_junk > mtt_junk_mended
# Vectorise (n,1) arrays when appropriate
if [ -n "$vectorise" ]; then
     mtt_vectorise <mtt_junk_mended >$out
else
     mv mtt_junk_mended $out
fi

# Now invoke the standard error handling.
#mtt_error_r mtt_r2m.log




MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]