Index: mttroot/mtt/bin/trans/mtt_make_sympar ================================================================== --- mttroot/mtt/bin/trans/mtt_make_sympar +++ mttroot/mtt/bin/trans/mtt_make_sympar @@ -11,10 +11,14 @@ ############################################################### ## 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. @@ -47,10 +51,13 @@ ############################################################### 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 ' ' ' ' ' |\ @@ -102,25 +109,27 @@ } printf("\n") }' < mtt_sympar.txt >$filename -reserved_words=`\ +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=`\ + 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