Assignment 4 (4%)
Note: Your solution should be written in C!
- Write a program that parses a PL program and prints it back in
- Correct PL syntax
- Prefix abstract syntax
Example Output
PL-Syntax:
X1<=0;
loop X2;
goto l12;
endloop;
l12: X1++;
Abstract Syntax:
(<program> (<assign0> NoLabel X1)
(<program> (<loop> NoLabel (<program> (<goto> NoLabel l12)
(<program> )
)
)
(<program> (<inc> l12 X1)
(<program> )
)
)
)
Please pack your source code (not including any binaries or object
files!) using gtar czvf ASSIGNMENT4.tgz [files or
directories] and send the resulting archive as an attachment
to yi_82@yahoo.com (if you
somehow end up with a very large archive, send only a short note and
send the main file to yigao@mail.cs.miami.edu.
Stephan
Schulz,schulz@cs.miami.edu, Thu Aug 22 13:35:31 EDT 2002