Due on September 24th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
Due on September 24th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
Draw the SLR parser table corresponding to the following grammar
X ::= a X b X ::= X c Y Y ::= d Y ::= k X
Is the above grammar parseable by an SLR parser? What evidence do you have of that?
Draw the AST for the following Levi program, using the recommended AST node types suggested in the P3 inheritance diagram.
a:int; func(b:bool) int{ if (b){ return 1; } return 3; } main : () int{ a = 7; return a * func(false); }
List the FIRST and FOLLOW sets for the following grammar (do not transform the grammar):
L ::= v m L L ::= ε L ::= C L ::= D C ::= ε C ::= C k D ::= C C ::= m L