Overview
Comment:Added a header line to avoid empty file and to trigger
switch_txt2m to write initial stuff.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 267315d4806692198e5474ff51eecdf1e185bbae947c5f718fc5359c8c15691e
User & Date: gawthrop@users.sourceforge.net on 1998-07-26 10:28:30
Other Links: branch diff | manifest | tags
Context
1998-07-26
10:30:32
Now uses the header # ... line to trigger initial code. check-in: 54e30bcfda user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:28:30
Added a header line to avoid empty file and to trigger
switch_txt2m to write initial stuff.
check-in: 267315d480 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:50:12
More forgiving of txt sytax.

-- can use () or ()
-- can use mttx() or x()
-- can use mttu() or u() check-in: 33db0d0c43 user: gawthrop@users.sourceforge.net tags: origin/master, trunk

Changes

Modified mttroot/mtt/bin/trans/struc2switch_txt from [86424fbdd0] to [596d30c900].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


34
35
36
37
38
39
40
# Copyright (c) P.J.Gawthrop, 1997.

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



## Revision 1.2  1997/06/03 15:17:09  peterg
## Changed label to MTT_SWITCH
##
# Revision 1.1  1997/05/13  16:58:59  peterg
# Initial revision
#
###############################################################




echo Creating  $1_switch.txt

rm -f $1_switch.txt
# This is the main transformation using gawk
gawk '


{ 
   if ($1=="state") {i++; if ($3=="MTT_SWITCH")  print tolower($4) "\t" i};
}
END{
}
' < $1_struc.txt| sort >> $1_switch.txt








>
>
>















|
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1998/07/25 18:50:53  peterg
## Lower case names
##
## Revision 1.2  1997/06/03 15:17:09  peterg
## Changed label to MTT_SWITCH
##
# Revision 1.1  1997/05/13  16:58:59  peterg
# Initial revision
#
###############################################################




echo Creating  $1_switch.txt

rm -f $1_switch.txt
# This is the main transformation using gawk
awk 'BEGIN{
printf("# These are the switches deduced from ISW and CSW components\n");
}
{ 
   if ($1=="state") {i++; if ($3=="MTT_SWITCH")  print tolower($4) "\t" i};
}
END{
}
' < $1_struc.txt| sort >> $1_switch.txt


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