Overview
Comment:put = at the beginnig of SEPS list - at the end causes an error ???
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 630ffc5d2b4829cbf951d0a9a3bb5d924d1cc0ffb1c57483664143b6d206d551
User & Date: gawthrop@users.sourceforge.net on 2000-10-10 10:25:23
Other Links: branch diff | manifest | tags
Context
2000-10-10
21:00:27
More changes for new code gneration check-in: 6d3dc326a1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:25:23
put = at the beginnig of SEPS list - at the end causes an error ??? check-in: 630ffc5d2b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:07:32
Initial revision check-in: 7f06c77943 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/abg2sympar_m2txt from [a2c46667a8] to [dd60e999cd].

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


# Inform user
echo "Creating $1_sympar.txt"

rm -f mtt_error
# Separation characters
SEPS=';+*/()-='
# Replace by ,
REPS=',,,,,,,,'

# This is the main transformation using gawk
tr $SEPS $REPS <  $1_abg.m | \
awk '
function exact_match(name1, name2) {
  return ((match(name1,name2)>0)&&(length(name1)==length(name2)))
}








|


<







11
12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27


# Inform user
echo "Creating $1_sympar.txt"

rm -f mtt_error
# Separation characters
SEPS='=*;+/()-'
# Replace by ,
REPS=',,,,,,,,'

# This is the main transformation using gawk
tr $SEPS $REPS <  $1_abg.m | \
awk '
function exact_match(name1, name2) {
  return ((match(name1,name2)>0)&&(length(name1)==length(name2)))
}

46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
}
{
  ## Explicit VAR declarations
  if (match($1,var)>0) print $2 "\t" system_name;

   ## Implicit declarations from the arg list
  if (match($1,"arg")>0) {
    args=substr($3,2,length($3)-3);
    N=split(args, arg, ",");
    for (i=1;i<=N;i++){

      if ( (length(arg[i])>0)&&(matches(not_an_arg,arg[i])==0)&&(match(arg[i],"^[0-9]+[.]*")==0) ){
        print arg[i] "\t" system_name;
      }
    }
  }
}' system_name=$1 |\
grep -v '^\$' |\
sort -u > $1_sympar.txt 2>mtt_error.txt

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










|


>





|








45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
}
{
  ## Explicit VAR declarations
  if (match($1,var)>0) print $2 "\t" system_name;

   ## Implicit declarations from the arg list
  if (match($1,"arg")>0) {
    args=substr($3,2,length($3)-3); print $3, args
    N=split(args, arg, ",");
    for (i=1;i<=N;i++){
      print arg[i];
      if ( (length(arg[i])>0)&&(matches(not_an_arg,arg[i])==0)&&(match(arg[i],"^[0-9]+[.]*")==0) ){
        print arg[i] "\t" system_name;
      }
    }
  }
}' system_name=$1  |\
grep -v '^\$' |\
sort -u > $1_sympar.txt 2>mtt_error.txt

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




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