Written work 4
Due on October 2nd @ 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 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);
}