I am learning about attribute grammars, and I have a couple of questions I have not found good answers to using online resources.$<stmt>$ $->$ $<var>$ $=$ $<expression>$$<expr>$$.$expected_type $<-$ $<var>$$.$actual_type$<expression>$ $->$ $<var>$ $+$ $<var>$$<var>[2].$actual_type $== <var>[3].$actual_type$<expression>.$actual_type $== <var>[2].$actual_typeThe above was written with the criteria that the data types of an expression cannot be mixed, but assignment statements do not need the same types on both side of the operator. For syntax rule #1, are there predicates I could add? For syntax rule #2, how would I add expected_type for the $<var>$ non-terminals? 
How do I create predicates for an attribute grammar?
formal grammars;attribute grammars