Overview
Comment:Put in exits-- this all needs a good clean
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 3d8f53654f88990c979f0ceaaf70b6033375ab69fa8f47b48bc8ce9b555eca59
User & Date: gawthrop@users.sourceforge.net on 1998-07-26 11:00:18
Other Links: branch diff | manifest | tags
Context
1998-07-26
11:02:20
Put mtt or MTT in front of variable names to avoid clashes with
globals
check-in: 8d8ebf28ff user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:00:18
Put in exits-- this all needs a good clean check-in: 3d8f53654f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:50:30
Corrected bug. check-in: 644a447095 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sympar2global_txt2lang from [4275d0ad09] to [ccb252fc74].

12
13
14
15
16
17
18



19
20
21
22
23
24
25


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



## Revision 1.3  1998/07/26 10:48:18  peterg
## Now strips comments
##
## Revision 1.2  1998/07/25 18:49:00  peterg
## Now uses extended sympars -- sympar + switches
##
## Revision 1.1  1998/06/15 15:24:33  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28


###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4  1998/07/26 10:50:30  peterg
## Corrected bug.
##
## Revision 1.3  1998/07/26 10:48:18  peterg
## Now strips comments
##
## Revision 1.2  1998/07/25 18:49:00  peterg
## Now uses extended sympars -- sympar + switches
##
## Revision 1.1  1998/06/15 15:24:33  peterg
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
cat <<EOF

$Lc====== Set up the global variables ======$Rc
EOF
# Matlab bit
#Write out the variables in matlab global format
if [ "$language" = "m" ]; then

strip_comments <$1_sympars.txt  |\
awk '
BEGIN{
  var = "foobar";
  print "global ..."
}
{i++; print tolower($1), "..."; var = $1}
END{
  print var ";" # Repeat the last variable to avoid the trailing ...
}'

fi

if [ "$language" = "c" ]; then
strip_comments <$1_sympars.txt  |\
    awk '{
      i++; print "extern double", tolower($1) ";";
    }'

 fi

if [ "$language" = "java" ]; then
cat <<EOF
  $1_numpar p;
  private p = new $1_numpar();
EOF 
strip_comments <$1_sympars.txt  |\
    awk '{
      i++; print "  float " tolower($1) " = p." tolower($1) ";";
    }'
fi


echo

# Now invoke the standard error handling.
# mtt_error mtt_error.txt









<
|
|
|
|
|
|
|
|

|
|



|



>
|



|
|

|
|
|
|

<







53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
cat <<EOF

$Lc====== Set up the global variables ======$Rc
EOF
# Matlab bit
#Write out the variables in matlab global format
if [ "$language" = "m" ]; then

 strip_comments <$1_sympars.txt  |\
  awk '
  BEGIN{
    var = "foobar";
    print "global ..."
  }
  {i++; print tolower($1), "..."; var = $1}
  END{
  print var ";" # Repeat the last variable to avoid the trailing ...
  }'
exit
fi

if [ "$language" = "c" ]; then
  strip_comments <$1_sympars.txt  |\
    awk '{
      i++; print "extern double", tolower($1) ";";
    }'
exit
fi

if [ "$language" = "java" ]; then
cat <<EOF
    $1_numpar p;
    private p = new $1_numpar();
EOF 
  strip_comments <$1_sympars.txt  |\
      awk '{
        i++; print "  float " tolower($1) " = p." tolower($1) ";";
      }'
fi


echo

# Now invoke the standard error handling.
# mtt_error mtt_error.txt



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