oct 10
chapter 4 : semantic analysis
- 'decorating' the parse tree with attributes and code fragments
- the interesting question is : what are the inputs, and where do they come from in the tree?
- "attribute grammar" - definition
- define "S-attributed" grammar (pg 168) - paired with bottom-up (if one pass)
- "L-attributed" - paired with top-down (if one pass)
- To make this concrete, look at exercises :
- 4.1
- 4.9
- 4.10 (S-attributed answer is required)
- 4.12 (be clear about what each node needs to know, and where the info comes from)
Be clear about the qualitative difference in answers for 4.10 and 4.12.
Parse::RecDescent as a tool for looking at this stuff? Hmmm.