CMPSC 311, Spring 2013, Project 5, Grading info

The grades are based on 25 points, calculated as follows:
Testing was done on Linux, compiled by
    gcc -std=c99 -D_XOPEN_SOURCE=700 -Wall -Wextra -o pr5 *.c

We repaired a few of the source files, when there was some minor error, but then points were deducted.

The test runs used pr5, if the program compiled successfully.

The test case was run with two instances of the -v option, two input files

# test-1
A1 = B1
A2 = B2 B2
A3 =   B3 
A1 : A2
        R1 .${A1}.
        R2 .${A2}.
        R3 .${A3}.
        R4 .${A4}.
        R5 .${A1}.${A2}.${A3}.${A4}.


# test-2
A1=B1
A2=B2 B2
A3=  B3 
A1 : A2
        R1 .${A1}.
        R2 .${A2}.
        R3 .${A3}.
        R4 .${A4}.
        R5 .${A1}.${A2}.${A3}.${A4}.


and the commands
cp test-1 hakefile ; cp hakefile Hakefile
cp test-2 testfile
pr5 -v -v | grep R5
pr5 -v -v -f testfile | grep R5
The correct output should look like
pr5: hakefile: line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: hakefile: line 10:         R5 .B1.B2 B2.B3..

----------

pr5: testfile: line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: testfile: line 10:         R5 .B1.B2 B2.B3..
Here are some samples of the output after macro expansion.  Only one of these is right (the last one in the third and fourth groups).
   diagnosis: recipie: .R5 ......
Expanded:       R5 .B1.B2 B2.B3  ..
Macro Expansion:        R5 . B1. B2 B2.   B3  .A4.
pr5: A1: line 10:       R5 .${A1}.${A2}.${A3}.${A4}.

pr5: Hakefile: Line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: Hakefile: Line 10:         R5 .B1.B2 B2.B3  ..  diagnosis: recipe line 5
pr5: Hakefile: line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: Hakefile: line 10:         R5 .....
pr5: Hakefile: line 10:         R5 .B1.B2 B2.B3  ..
pr5: Hakefile: line 10:         R5 .B1.B2 B2.B3..

pr5: hakefile: Line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: hakefile: Line 10:         R5 .B1.B2 B2.B3  ..  diagnosis: recipe line 5
pr5: hakefile: line 10:         R5 .  diagnosis: recipe line 5
pr5: hakefile: line 10:         R5 . B1. B2 B2.   B3..
pr5: hakefile: line 10:         R5 . B1....
pr5: hakefile: line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: hakefile: line 10:         R5 .....
pr5: hakefile: line 10:         R5 ...A3 =   ..
pr5: hakefile: line 10:         R5 ...list head..
pr5: hakefile: line 10:         R5 .A1}.A2}.A3}.A4}.
pr5: hakefile: line 10:         R5 .B1  B2 B2    B3  ${A4}.
pr5: hakefile: line 10:         R5 .B1....
pr5: hakefile: line 10:         R5 .B1.B2 B2.  B3..
pr5: hakefile: line 10:         R5 .B1.B2 B2.  B32..
pr5: hakefile: line 10:         R5 .B1.B2 B2. B3B2..
pr5: hakefile: line 10:         R5 .B1.B2 B2.B3  ..
pr5: hakefile: line 10:         R5 .B1.B2 B2.B3  2..
pr5: hakefile: line 10:         R5 .B1.B2 B2.B3 B2..
pr5: hakefile: line 10:         R5 .B1.B2 B2.B3..

pr5: testfile: Line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: testfile: Line 10:         R5 .B1.B2 B2.B3  ..  diagnosis: recipe line 5
pr5: testfile: line 10:         R5 .  diagnosis: recipe line 5
pr5: testfile: line 10:         R5 .${A1}.${A2}.${A3}.${A4}.
pr5: testfile: line 10:         R5 ....  diagnosis: recipe line 5
pr5: testfile: line 10:         R5 .....
pr5: testfile: line 10:         R5 ...A3=  ..
pr5: testfile: line 10:         R5 ...B3..
pr5: testfile: line 10:         R5 .1.2 B2.B3..
pr5: testfile: line 10:         R5 .A1}.A2}.A3}.A4}.
pr5: testfile: line 10:         R5 .B1....
pr5: testfile: line 10:         R5 .B1.B2 B2.  B3..
pr5: testfile: line 10:         R5 .B1.B2 B2. B3..
pr5: testfile: line 10:         R5 .B1.B2 B2. B3B2..
pr5: testfile: line 10:         R5 .B1.B2 B2.B3  ..
pr5: testfile: line 10:         R5 .B1.B2 B2.B3  2..
pr5: testfile: line 10:         R5 .B1.B2 B2.B3 B2..
pr5: testfile: line 10:         R5 .B1.B2 B2.B3..



The correct spelling is "recipe", not "recipie".