🔹 UNIT 3 – Syntax Directed Translation (PYQs)
1. Define syntax-directed translation. Explain S- and L-attributed definitions.
2. Construct syntax tree for arithmetic expression: a + b * c.
3. Generate three address code for: if (a > b) then x = y + z else x = x - y.
4. Define quadruples and triples with example.
5. Draw DAG for expression: a + a * (b - c) + (b - c) * d.
6. Write TAC for a for-loop statement.
7. Represent boolean expressions using control flow code.