What does the symbol table store for each name?
- Its favourite colour and font
- Nothing, it only counts names
- Its kind, type, scope, and parameters
Which error parses fine but fails semantic analysis?
- Calling paint with one argument when it takes three
- A missing closing bracket
- A completely empty file
Code that parses is guaranteed to be meaningful.
Circle one: True False
When is the symbol table written, and when is it read?
- Written at uses, read at declarations
- Written once per year, never read
- Written at declarations, read at every use
The compiler rejects paint(red) though it parses. What did it consult to catch this?
- The file's creation date
- The symbol table entry for paint with three parameters
- The programmer's intentions
Why is lowering to an intermediate form worth the extra pass?
- One front end can serve many targets through it
- It makes compilation slower on purpose
- It deletes all type errors automatically
A teammate says undeclared-variable errors should be caught by the parser. What is wrong with that?
- Nothing, parsers know every name
- Parsers run after semantic analysis
- Names live across the whole program, beyond one local structure
A new language targets three machines. Without a middle form that means three full translators, with one it means one front end plus three small ones. What principle is this?
- Parsing three times for safety
- Lowering once to serve many targets
- Deleting the symbol table