• Review: – Chapter 5: Syntax directed translation

advertisement
• Review:
– Chapter 5: Syntax directed translation
• Syntax directed translation and definition
• Synthesized/inherited attributes.
• S-attributed definitions and L-attributed definitions.
• Syntax directed definitions for implementing a
calculator, building a tree.
– Chapter 6: Type checking
• Syntax directed definition for simple type checking
system
• Type equivalence: name or structure
• Type conversion and polymorphic functions
• Chapter 7: Runtime Environment
– Run time memory organization.
– Activation record, fields in an activation record
– Memory allocation strategies: static, stack and
heap, advantages and limitations.
– Calling sequence/return sequence
– Access non-local variables:
• sp, access link and display
– Parameter passing:
• Call by value, call by reference and copy-restore
• Chapter 8: intermediate code generation
– Assignment statement
• Array and record
– Boolean expression
• Jumping code
– Flow of control statements (if, while)
– Declaration
• Building symbol table
– Backpatching
– Syntax directed definition  code
generation
– Final:
• Thursday 12:30-2:30
• Scope
– Before midterm 25%
– After midterm 75%
• Tuesday Final week (April 22)
Download