Differences From Artifact [83b192aee6]:

To Artifact [1ec895e0c4]:


11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop 1998

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



## Revision 1.15  1998/08/15 13:46:01  peterg
## Included new sparse update routines
##
## Revision 1.14  1998/08/12 15:21:12  peterg
## Added type definition for the SVD procedures
##
## Revision 1.13  1998/08/11 09:32:07  peterg







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.16  1998/08/19 08:46:00  peterg
## Now translates ; % to #
##
## Revision 1.15  1998/08/15 13:46:01  peterg
## Included new sparse update routines
##
## Revision 1.14  1998/08/12 15:21:12  peterg
## Added type definition for the SVD procedures
##
## Revision 1.13  1998/08/11 09:32:07  peterg
161
162
163
164
165
166
167

168
169
170
171
172
173
174
175
176
177
178
179
180

EOF

#Regexps
  name="[a-zA-Z0-9_]*"
  fun_name="$Sys\_$name"
  mttfun_name=$name

  space="[ \t]*"
  spaces="[ \t][ \t]*"
  non_space="[^ ]*"

# Body	
grep -v '^[ ]*function' < $Sys_rep.m  | sed "s/^$space%/#/" | sed "s/;$space%/#/" |\
awk -F# '{printf("%s",$1) 
          if (NF>1) printf("{* %s *}", $2)
          printf("\n") 
         }' |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($fun_name\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\(zeros\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\







>
|
|



|







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

EOF

#Regexps
  name="[a-zA-Z0-9_]*"
  fun_name="$Sys\_$name"
  mttfun_name=$name
  tab='	'
  space="[ $tab]*"
  spaces="[ $tab][ $tab]*"
  non_space="[^ ]*"

# Body	
grep -v '^[ ]*function' < $Sys_rep.m  | sed "s/^$space%/#/" | sed "s/\(;$space\)%/\1#/" |\
awk -F# '{printf("%s",$1) 
          if (NF>1) printf("{* %s *}", $2)
          printf("\n") 
         }' |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($fun_name\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\(zeros\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\

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