Overview
Comment:lines are joined before fixing integers - required to prevent vector indices becoming floating point.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/global-optimisation | trunk
Files: files | file ages | folders
SHA3-256: 85aae2b1e620645ad212ae7e39d35e1ca41ad20cb8ef9eb571906e7d1a941e26
User & Date: geraint@users.sourceforge.net on 2002-09-04 07:12:19
Other Links: branch diff | manifest | tags
Context
2002-09-04
10:44:59
Added option to specify number of tmp variables declared (-ntmpvar <N>). check-in: 8d8523b35b user: geraint@users.sourceforge.net tags: origin/global-optimisation, trunk
07:12:19
lines are joined before fixing integers - required to prevent vector indices becoming floating point. check-in: 85aae2b1e6 user: geraint@users.sourceforge.net tags: origin/global-optimisation, trunk
2002-09-03
23:44:43
adding global optimisation (-optg). check-in: a3bcf662f1 user: geraint@users.sourceforge.net tags: origin/global-optimisation, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_fix_integers from [370a813d90] to [511eb60f9c].

1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh

mttmatrix='\(mtt[A-Za-z][A-Za-z]*\)'
integer='\([0-9][0-9]*\)'

exec gawk -v RS=${1:-"$"} -v ORS=${2:-"$\n"} ' {
str = $0;
str1 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str );
str2 = gensub ( /([^e]\+)([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str1 );
str3 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)e([0-9]+).0([^\.0-9])/ , "\\1\\2\\3\\4" , "g" , str2)
printf "%s$\n", str3 ;
}' | sed -e "s/$mttmatrix($integer\.0,/\1(\2,/g"





|






1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh

mttmatrix='\(mtt[A-Za-z][A-Za-z]*\)'
integer='\([0-9][0-9]*\)'

mtt_join_lines | gawk -v RS=${1:-"$"} -v ORS=${2:-"$\n"} ' {
str = $0;
str1 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str );
str2 = gensub ( /([^e]\+)([0-9]+)([^\.0-9])/ , "\\1\\2.0\\3" , "g", str1 );
str3 = gensub ( /([^A-Za-z_0-9\.\+])([0-9]+)e([0-9]+).0([^\.0-9])/ , "\\1\\2\\3\\4" , "g" , str2)
printf "%s$\n", str3 ;
}' | sed -e "s/$mttmatrix($integer\.0,/\1(\2,/g"

Added mttroot/mtt/bin/trans/mtt_join_lines version [95d87c9e44].











>
>
>
>
>
1
2
3
4
5
#! /bin/sh

gawk '{ printf ( "%s" , $0 ) }'		|\
    gawk -v RS="$" '{ printf "%s$\n", $0 }'	|\
    gawk -v RS=";" '{ printf "%s;\n", $0 }'


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