Due on October 2nd @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
Due on October 2nd @ 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 A program, using the recommended AST node types suggested in the P3 inheritance diagram.
int a; int func(bool b){ if (b){ return 1; } return 3; } int main(){ a = 7; return a * func(false); }