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,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.8 2001/07/04 06:00:12 gawthrop +## Fixed a funny with tr - changed SEPS and REPS - something to do with ^ +## ## Revision 1.7 2001/04/13 07:14:12 geraint ## Implemented lower level lbl.txt recognition of #NOT[V|P]AR ## ## Revision 1.6 2001/04/10 12:54:50 gawthrop ## Minor fixes for sensitivity versions @@ -92,5 +95,27 @@ comma=","; } printf("\n") }' < mtt_sympar.txt >$filename + +reserved_words=`\ + cat ${MTT_LIB}/reduce/reserved_words.txt |\ + awk '{printf "%s ", $0}' |\ + tr [a-z] [A-Z]` +sympar_words=`\ + cat ${filename} |\ + cut -f1 |\ + awk '{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 "*** MTT Error: ${sympar_word} is reserved (Reduce)" + flag=1 + fi + done +done +if [ ${flag} -eq 1 ]; then + exit 1; +fi ADDED mttroot/mtt/lib/reduce/reserved_words.make Index: mttroot/mtt/lib/reduce/reserved_words.make ================================================================== --- /dev/null +++ mttroot/mtt/lib/reduce/reserved_words.make @@ -0,0 +1,15 @@ +#! /bin/sh + +reduce_reserved_word_manual_page=${1:-"/usr/local/reduce/doc/manual/appenda.tex"} +output="reserved_words.txt" + +cat $reduce_reserved_word_manual_page |\ + tr "\n" " " |\ + sed 's/\\\_/_/g' |\ + sed 's/\\tt\ \([A-Za-z0-9_]*\)/\"\1\"/g' |\ + tr " " "\n" |\ + sed 's/\{//g' |\ + sed 's/\}//g' |\ + awk -F\" '(NF==3) { printf "%s\n",$2 }' |\ + sort -u \ +> $output ADDED mttroot/mtt/lib/reduce/reserved_words.txt Index: mttroot/mtt/lib/reduce/reserved_words.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/reduce/reserved_words.txt @@ -0,0 +1,279 @@ +ABS +ACOS +ACOSH +ACOT +ACOTH +ACSC +ACSCH +ADJPREC +ALGEBRAIC +ALGINT +ALLBRANCH +ALLFAC +AND +ANTISYMMETRIC +APPEND +ARGLENGTH +ARRAY +ASEC +ASECH +ASIN +ASINH +ATAN +ATAN2 +ATANH +BEGIN +BFSPACE +BYE +CARD_NO +CEILING +CLEAR +CLEARRULES +COEFF +COEFFN +COFACTOR +COMBINEEXPT +COMBINELOGS +COMMENT +COMP +COMPLEX +CONJ +CONS +CONT +COS +COSH +COT +COTH +CRAMER +CREF +CSC +CSCH +DECOMPOSE +DEFINE +DEFN +DEG +DEMO +DEN +DEPEND +DET +DF +DIFFERENCE +DILOG +DISPLAY +DIV +DO +E +ECHO +ED +EDITDEF +EI +END +EPS +EQ +EQUAL +ERF +ERRCONT +EVALLHSEQP +EVAL_MODE +EVEN +EVENP +EXP +EXPANDLOGS +EXPR +EXPT +EZGCD +FACTOR +FACTORIAL +FACTORIZE +FEXPR +FIRST +FIX +FIXP +FLOOR +FOR +FORALL +FOREACH +FORT +FORT_WIDTH +FREEOF +FULLROOTS +G +GCD +GEQ +GO +GOTO +GREATERP +HIGH_POW +HYPOT +I +IF +IFACTOR +IMPART +IN +INDEX +INFINITY +INFIX +INPUT +INT +INTEGER +INTERPOL +INTSTR +K +KORDER +LAMBDA +LCM +LCOF +LENGTH +LEQ +LESSP +LET +LHS +LINEAR +LINELENGTH +LISP +LIST +LISTARGP +LISTARGS +LN +LOAD +LOAD_PACKAGE +LOG +LOG10 +LOGB +LOW_POW +LTERM +MACRO +MAINVAR +MASS +MAT +MATCH +MATEIGEN +MATRIX +MAX +MCD +MEMBER +MEMQ +MIN +MINUS +MKID +MODULAR +MSG +MSHELL +MULTIPLICITIES +NAT +NEQ +NERO +NEXTPRIME +NIL +NODEPEND +NONCOM +NONZERO +NOSPLIT +NOSPUR +NULLSPACE +NUM +NUMBERP +ODD +OFF +ON +OPERATOR +OR +ORDER +ORDP +OUT +OUTPUT +PART +PAUSE +PERIOD +PF +PI +PLUS +PRECEDENCE +PRECISE +PRECISION +PRET +PRI +PRIMEP +PRINT_PRECISION +PROCEDURE +PRODUCT +QUIT +QUOTIENT +RANDOM +RANDOM_NEW_SEED +RANK +RAT +RATARG +RATIONAL +RATIONALIZE +RATPRI +REAL +REDERR +REDUCT +REMAINDER +REMFAC +REMIND +REPART +REPEAT +REST +RESULTANT +RETRY +RETURN +REVERSE +REVPRI +RHS +RLISP88 +ROOT_MULTIPLICITY +ROUND +ROUNDALL +ROUNDBF +ROUNDED +SAVEAS +SAVESTRUCTR +SCALAR +SEC +SECH +SECOND +SET +SETMOD +SETQ +SHARE +SHOWRULES +SHOWTIME +SHUT +SIGN +SIN +SINH +SMACRO +SOLVE +SOLVESINGULAR +SPUR +SQRT +STRUCTR +SUB +SUM +SYMBOLIC +SYMMETRIC +T +TAN +TANH +THIRD +TIME +TIMES +TP +TRA +TRACE +TRFAC +TRIGFORM +TRINT +UNTIL +VARNAME +VECDIM +VECTOR +WEIGHT +WHEN +WHERE +WHILE +WRITE +WS +WTLEVEL