Script started on Fri 15 Mar 2002 02:06:13 PM PST sh-2.03$ sh-2.03$ sh-2.03$ sh-2.03$ make g++ -g2 -c main.cpp g++ -g2 -c scan.cpp g++ -g2 -c parse.cpp g++ -g2 -c analyze.cpp g++ -g2 -c symtab.cpp g++ -g2 main.o scan.o parse.o analyze.o symtab.o -o cminus sh-2.03$ sh-2.03$ sh-2.03$ sh-2.03$ cminus -trace_analyze quick.mns CMINUS COMPILATION: quick.mns TRACE ANALYZE Building Symbol Table... Symbol table: Type Declar Name DType Loc Block ScopeName Line Numbers ---- ----------- ----- --- ----- --------- ------------ int flag var 18 318000 quicksort 54 58 63 84 int pivot var 17 318000 quicksort 53 59 67 73 int hb var 9 317520 quicksort 49 int lb var 8 317520 quicksort 48 int part var 7 317520 quicksort 47 void quicksort func -6 0 global 45 90 92 int median var 9 313224 partition 18 int mid var 8 313224 partition 17 22 25 27 34 36 40 int mid var 18 323352 quicksort 97 98 100 102 108 110 int sz var 7 313224 partition 16 21 int hi var 5 312984 partition 14 21 22 30 32 34 36 40 41 int hi var 5 317280 quicksort 45 51 59 61 88 92 98 104 106 108 110 int lo var 4 312984 partition 14 21 22 22 25 27 30 32 int lo var 4 317280 quicksort 45 51 59 60 90 98 100 102 104 106 int partition func -5 0 global 14 59 int temp var 7 310672 swap 6 7 9 int temp var 10 313224 partition 19 int j var 5 310432 swap 4 8 9 int j var 20 318000 quicksort 56 61 72 72 73 75 75 78 80 int i var 4 310432 swap 4 7 8 int i var 19 318000 quicksort 55 60 66 66 67 69 69 78 80 88 90 92 int[] arr var 2 310432 swap 4 7 8 8 9 int[] arr var 2 317280 quicksort 45 59 67 73 80 88 90 92 100 100 102 104 104 106 108 108 110 int[] arr var 2 312984 partition 14 25 25 27 30 30 32 34 34 36 40 41 void swap func -4 0 global 4 27 32 36 40 80 88 102 106 110 int input func -3 0 global -1 void output func -2 0 global -2 Checking Types... Type Checking Finished sh-2.03$ sh-2.03$ sh-2.03$ cminus -trace_parse -trace_aa nalyze nfact.mns CMINUS COMPILATION: nfact.mns TRACE PARSE TRACE ANALYZE Syntax tree: Function Declaration: Integer nfact Variable Declaration: Integer n Compound Stmt if Op: EQ == Id: n Const: 0 Compound Stmt return Const: 1 Compound Stmt return Op: TIMES * Id: n Call: nfact Op: MINUS - Id: n Const: 1 return Const: 0 Function Declaration: Void main Compound Stmt Variable Declaration: Integer n Op: ASSIGN = Id: n Call: input Op: ASSIGN = Id: n Call: nfact Id: n Call: output Id: n Building Symbol Table... Symbol table: Type Declar Name DType Loc Block ScopeName Line Numbers ---- ----------- ----- --- ----- --------- ------------ void main func -5 0 global 24 int n var 2 310432 nfact 10 12 18 18 int n var 3 311440 main 26 27 28 28 29 int nfact func -4 0 global 10 18 28 int input func -3 0 global -1 27 void output func -2 0 global -2 29 Checking Types... Type Checking Finished sh-2.03$ sh-2.03$ sh-2.03$ sh-2.03$ exit exit script done on Fri 15 Mar 2002 02:07:43 PM PST