COSC 445			Quiz #5	2/18/10	Name:				

(a) Give the attributed tree for  a a a a

Grammar rule			Semantic Rule

G  S			S.x = 0

S0  a S1			a.x = S0.x + 1
				S1.x = a.x 

S  a			a.x = S.x + 1		// mistake to leave off + 1

(b) What is the attribute x representing? (e.g., provide a better name for x).