Overview
Comment:Does not issue warnings about Reduce reserved words if the
second argument (use_reduce) is "no".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 7b01550a38ddd630c247070e449b623a82407d9d649249b71eeeab1c928daccf
User & Date: geraint@users.sourceforge.net on 2004-09-02 22:06:09
Other Links: branch diff | manifest | tags
Context
2004-09-03
08:34:26
Moved standard CR packages into the mtt:: workspace. check-in: d2afdadec0 user: geraint@users.sourceforge.net tags: origin/master, trunk
2004-09-02
22:06:09
Does not issue warnings about Reduce reserved words if the
second argument (use_reduce) is "no".
check-in: 7b01550a38 user: geraint@users.sourceforge.net tags: origin/master, trunk
22:04:06
Passes ${use_reduce} to mtt_make_sympar so that it can decide
if to issue warnings about Reduce reserved words
check-in: 1bcb3ff391 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_make_sympar from [7c246fcfb8] to [fb9ff055b0].

9
10
11
12
13
14
15




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







+
+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.11  2002/04/28 18:41:27  geraint
## Fixed [ 549658 ] awk should be gawk.
## Replaced calls to awk with call to gawk.
##
## Revision 1.10  2001/07/28 21:10:18  geraint
## Generate warning instead of error if reserved word used.
##
## Revision 1.9  2001/07/23 05:16:39  geraint
## Simple filter for Reduce reserved words in sympar.
##
## Revision 1.8  2001/07/04 06:00:12  gawthrop
45
46
47
48
49
50
51



52
53
54
55
56
57
58
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65







+
+
+







##
##
###############################################################


sys=$1 # System name
filename=$1_sympar.txt

use_reduce=$2

# Inform user
echo Creating $filename

# Create list of all sympars including those that are aliased
sh $1_type.sh 'echo ' ' ' ' ' |\
gawk '{printf("abg2sympar_m2txt %s %s\n ", $1, $2)}' |\
sh | sort -u > mtt_all_sympar.txt
100
101
102
103
104
105
106

107

108
109
110
111

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126












107
108
109
110
111
112
113
114

115
116
117
118

119
120
121
122
123











124
125
126
127
128
129
130
131
132
133
134
135







+
-
+



-
+




-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
          printf("%s%s", comma, sysname[j]);
          comma=",";
        }
        printf("\n")

}' < mtt_sympar.txt >$filename

if [ ! "${use_reduce}" == "no" ]; then
reserved_words=`\
    reserved_words=`\
    cat ${MTT_LIB}/reduce/reserved_words.txt	|\
    gawk '{printf "%s ", $0}'			|\
    tr [a-z] [A-Z]`
sympar_words=`\
    sympar_words=`\
    cat ${filename}				|\
    cut -f1					|\
    gawk '{printf "%s ", $0}'			|\
    tr [a-z] [A-Z]`
flag=0
for reserved_word in ${reserved_words}; do
    for sympar_word in ${sympar_words}; do
	if [ ${sympar_word} = ${reserved_word} ]; then
	    echo ""
	    echo "*** MTT Warning:"
	    echo "    ${sympar_word} is reserved (Reduce)"
	    echo ""
	fi
    done
done
    flag=0
    for reserved_word in ${reserved_words}; do
	for sympar_word in ${sympar_words}; do
	    if [ ${sympar_word} = ${reserved_word} ]; then
		echo ""
		echo "*** MTT Warning:"
		echo "    ${sympar_word} is reserved (Reduce)"
		echo ""
	    fi
	done
    done
fi


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