9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Copyright (C) 2000 by Peter J. Gawthrop
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## 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
|
>
>
>
>
|
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
|
##
##
###############################################################
sys=$1 # System name
filename=$1_sympar.txt
# 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
|
>
>
>
|
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
|
printf("%s%s", comma, sysname[j]);
comma=",";
}
printf("\n")
}' < mtt_sympar.txt >$filename
reserved_words=`\
cat ${MTT_LIB}/reduce/reserved_words.txt |\
gawk '{printf "%s ", $0}' |\
tr [a-z] [A-Z]`
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
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
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=`\
cat ${MTT_LIB}/reduce/reserved_words.txt |\
gawk '{printf "%s ", $0}' |\
tr [a-z] [A-Z]`
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
fi
|