about me
my project

week one
week two
week three
week four & five
week six
week seven
week eight & nine
week ten
final report

random pictures
hiperspace people

the drive up
dave matthew's

Week Three: June 18 - 22

Getting a program to work the way you want it to is hard work! I have been struggling with my second perl program all week. I need to read in lines of a program and place curly brackets in the correct places, if they aren't already there. For example, an "if()" statement doesn't require curly brackets if you only have one statement to execute after the "if()":
 if(count == 1) test=false;
However, TATOO will need print statements to show where the def-use pairs exist. Therefore, I need to add brackets... But then, where do I put the closing curly bracket??? I can't just put it after the next line because a programmer could use nested "if()" statements of some kind:
if(count == 1)
  if (color == yellow){
    count = 3;
    color = red;

Hopefully you're not too confused...and you understand that the answer is "count the curly brackets between the next semi-colon". Then I have to match brackets, etc.

Anyway, now it's the weekend, and I'll probably look back over this and be confused on Monday, but now I will rest and work with this mess Monday! :)