|CSE Home||About Us||Search||Contact Info|
As usual, turn in only one solution per group.
Design and implement the necessary extensions to the PL/0 parser and AST class hierarchy to parse and represent the extended PL/0 language. Use the project description and extended BNF description (available after assignment #2 is submitted) as the language definition.
Thinking carefully about the AST extensions will pay off. One particular pitfall to avoid: an array of arrays is not a 2-D array; PL/0 only has 1-D arrays (whose elements can be of any type, including array). If you find yourself trying to write any code that is specialized for multidimensional arrays, you should re-think this, you're probably doing it the hard way...
As usual, extend the
print() methods as needed to
-p switch so you (and we) can conveniently
dump the AST for testing and debugging.