Review for Exam 1
- Read the book, think about the exercises. Work a few of
them for practice.
- Make sure you understand the written homework assignments.
- Look through the notes from class
- Practice on the exam from last semester.
(pdf,
ps)
- Chapter 1
- Why study languages
- Language evaluation criteria
- Readability
- Writeability
- Reliability
- Cost
- Language Categories
- Implementation methods - compilation, interpretation
- hardware vs. software computers
- Chapter 2
- Chapter 3 (Sections 1-3)
- syntax versus semantics
- grammars
- BNF and EBNF notation
- derivation and generation of valid syntax
- parse trees
- precedence and associativity
- ambiguity
- Semantics
- Attribute grammars
- Weakest precondition
- Regular Expressions
- Chapter 4 (Sections 1, 2 and 4)
- Lexical analysis
- Parsing
- Recursive descent parsing
- Left recursion
- Left factoring
- Chapter 5 Names, bindings, Type-checking and Scope
- Naming conventions - keyword versus reserved word
- Variable attributes
- name
- address
- aliases
- type
- value
- Binding times
- Type checking
- weak vs. strong typing
- static vs. dynamic type checking
- Scope and Lifetime
- Scope - the code in which a particular variable is visible
- Static scope - scope of a variable can be determined from the code
- Dynamic scope - scope of a variable is determined from the call stack
- Lifetime - the time during execution when a variable is bound to a
particular memory location