This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: inherited idlist.type := type.spectype vardcl ::= idlist : type Problem 2. (ii) Decorated tree for A, B, C : real. Red lines are inherited. Blues line are synthesized. vardcl idlist type: REAL type spectype: REAL : stype spectype: REAL real idlist type: REAL ID type: REAL , ID type: REAL , idlist type: REAL ID type: REAL Problem 2. (iii) The solution neither S-attributed nor L-attributed. S-attributed grammars have no inherited attributes at all. The solution has inherited attributes. L-attributed grammars have left-to-right dataow. The solution has right-to-left dataow. Notice if the top level production rule was vardcl::= type : idlist then the dataow would be left to right, and could be implemented using a L-attributed grammar....
View Full Document
This note was uploaded on 10/29/2010 for the course CS 198:415 taught by Professor Kremer,u. during the Spring '10 term at Rutgers.
- Spring '10