Index: mttroot/mtt/bin/trans/abg2sympar_m2txt ================================================================== --- mttroot/mtt/bin/trans/abg2sympar_m2txt +++ mttroot/mtt/bin/trans/abg2sympar_m2txt @@ -11,19 +11,20 @@ # Inform user #echo "Creating $1_sympar.txt" # Separation characters -SEPS='=*;+/()-' +SEPS='=*;+/()-^' # Replace by , -REPS=',,,,,,,,' +REPS=',,,,,,,,,' SystemName=$2 UseLabelFile=$3 if [ -n "$UseLabelFile" ]; then ## Take input from lbl.txt - strip_comments < $1_lbl.txt | awk '{printf("%s %s \"%s\",\n",$1,$2,$3)}' > mtt_stripped_file + strip_comments < $1_lbl.txt | tr $SEPS $REPS |\ + awk '{printf("%s %s \"%s\",\n",$1,$2,$3)}' > mtt_stripped_file else ## Take input from _abg.m cat $1_abg.m | grep "arg =" | tr $SEPS $REPS > mtt_stripped_file fi rm -f mtt_error # This is the main transformation using gawk Index: mttroot/mtt/bin/trans/m/alias_args.m ================================================================== --- mttroot/mtt/bin/trans/m/alias_args.m +++ mttroot/mtt/bin/trans/m/alias_args.m @@ -3,10 +3,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.6 2001/04/23 16:23:30 gawthrop +## Now stips ; from bottlom level argument list - allows aliasing of +## parts of a,b,c (eg a,b by using a,b;c +## ## Revision 1.5 2000/10/12 19:27:20 peterg ## Now writes out the aliased args ... ## ## Revision 1.4 2000/09/14 13:35:43 peterg ## appended '(' and ')' to SEPS @@ -23,11 +27,10 @@ ## Revision 1.1 1998/07/03 18:29:40 peterg ## Initial revision ## ############################################################### - if is_struct(alias) if !isempty(args) Args = split(args,delim); args=""; [N,M]= size(Args); for i=1:N @@ -38,20 +41,25 @@ mtt_info(["Replacing ", arg, "\t by ",\ new_arg, message],FileID); mtt_save_alias(arg,sys_name); arg = new_arg; - else - mtt_info(["NOT replacing ", arg, message],FileID); +# else +# mtt_info(["NOT replacing ", arg, message],FileID); end - SEPS = ",+-*/()"; + SEPS = ",+-*/()^"; for j = 1:length(SEPS) - if length(findstr(arg,SEPS(j)))>0 + if (length(arg)>0)&&(length(findstr(arg,SEPS(j)))>0) arg = alias_args(arg,alias,SEPS(j),message,FileID,sys_name); end end; args = sprintf("%s%s%s", args, delim, arg); end - args = substr(args,2); % loose leading ; + if (length(args)>1) + if (substr(args,1,1)==delim) + args = substr(args,2); # loose leading delimiter + endif + endif + end end; endfunction; Index: mttroot/mtt/bin/trans/mtt_strip_args ================================================================== --- mttroot/mtt/bin/trans/mtt_strip_args +++ mttroot/mtt/bin/trans/mtt_strip_args @@ -9,10 +9,13 @@ # Label file to symbolic parameters conversion # Copyright (C) 2000 by Peter J. Gawthrop ## $Id$ ## ## $Log$ +## Revision 1.4 2001/05/08 15:18:10 gawthrop +## Added trig and hyperbolic functions to argument exclusion list +## ## Revision 1.3 2000/10/17 12:33:13 peterg ## Added mtt_mod to the zapped list ## ## Revision 1.2 2000/10/16 09:06:26 peterg ## Write out the system as a second columns as well @@ -22,13 +25,13 @@ ## ## # Inform user #echo "Creating $1_sympar.txt" # Separation characters -SEPS='=*;+/()-' +SEPS='=*;+/()-^' # Replace by , -REPS=',,,,,,,,' +REPS=',,,,,,,,,' # This is the main transformation using gawk tr $SEPS $REPS | \ awk ' function exact_match(name1, name2) {