Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4aa05894e627fc5f9b90b49947db8c46 |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-14 09:26:48 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-14
| ||
09:32:50 | struc version only does state and input check-in: 601a2483fb user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:26:48 | Initial revision check-in: 4aa05894e6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:14:24 | *** empty log message *** check-in: f7efa7b0bc user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/mtt_txt2declare version [b98e85f918].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: sympar_txt2declare # Symbolic parameters to variable declaration # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.1 2000/10/11 09:08:20 peterg ## Initial revision ## ############################################################### sys=$1 what=$2 language=$3 case $language in p) first="VAR"; delim=", "; last=': REAL;'; ;; *) echo Language $language not supported - sorry; exit 1 esac case $what in struc) strip_comments < $sys"_"$what".txt" | awk '{print $4}' >mtt_names ;; sympar) strip_comments < $sys"_"$what".txt" | awk '{print $1}' >mtt_names ;; *) echo Argument 2 must be struc or sympar esac # Start cat<<EOF $first EOF #Write out the variables awk '{ i++; var[i] = tolower($1); } END{ n = i; for (i=1; i<n; i++){ printf("%s%s",var[i], delim); j++; if (j>4){ printf("\n"); j=0; } } printf("%s%s\n",var[n], last); }' "delim=$delim" "last=$last" mtt_names |