Written work 4
Due on September 27th @ 3:00 PM (in class, to Drew, or at Engineering front office)
Not accepted late
Question 1

Draw the SLR parser table corresponding to the following grammar

	X ::= a X b
	X ::= X c Y
	Y ::= d
	Y ::= k X

Question 2

Is the above grammar parseable by an SLR parser? What evidence do you have of that?

Question 3

Draw the AST for the following Drewno Mars 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);