Compiler Foundations: Language, Tokens, Grammar Checkpoint

Predict fresh artifacts, diagnose a broken invariant, and test a version boundary. Select one answer per multiple-choice question; numeric responses use the stated integer format. Use review links to revisit the relevant representation, then attempt the independent transfer task.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. For 10-2*4, tokens are correct but the AST is Mul(Sub(10,2),4). Which stage should be corrected first?

Select one answer.

2. A v2 learner adds static number annotations and a module linker to solve compile-and-run. Which diagnosis matches the course route?

Select one answer.

3. In v2, which stage first rejects let x="s"-2; when its syntax and names are otherwise valid?

Select one answer.

4. A learner passes all compiler vocabulary questions but cannot draw a tree or explain a bad jump. What is the most useful next activity?

Select one answer.

5. Why retain a minimal token/AST/bytecode example when moving from v2 to v3?

Select one answer.

Join Discord