Compiler Design Unit 3 Notes AKTU (BCS602)

AKTU · BTECH · Semester 6 · Compiler Design · Unit 3 · Notes

AKTU Compiler Design (BCS602) Unit 3 notes for B.Tech Semester 6 – Syntax-Directed Translation and Intermediate Code. Topics: Syntax-Directed Translation…

Open the interactive reader to study this resource on AcademicArk.

Unit 3: Syntax-Directed Translation and Intermediate Code – AKTU syllabus topics

  • Syntax-Directed Translation Schemes
  • Implementation of Syntax-Directed Translators
  • Intermediate Code
  • Postfix Notation
  • Parse Trees and Syntax Trees: Parse Trees, Syntax Trees
  • Three-Address Code
  • Quadruples and Triples: Quadruples, Triples
  • Translation of Assignment Statements
  • Translation of Boolean Expressions
  • Translation of Statements That Alter the Flow of Control
  • Postfix Translation
  • Translation with a Top-Down Parser
  • Array References in Arithmetic Expressions
  • Procedure Calls
  • Declarations
  • Case Statements

Most asked AKTU PYQ questions from Unit 3

  1. Q5b. Determine the quadruples, triples, and indirect triples for the following expression: (x+y) * (y+z) + (x+y+z) (10 marks, 2023-24)
  2. Q2c. Write the quadruple, triple, indirect triple for the following expression (x + y)*(y + z) + (x + y + z) (10 marks, 2021-22)
  3. Q2a. Write the quadruples ,triple and indirect triple for the following expression: (x+y)*(y+z)+(x+y+z) (7 marks, 2018-19)
  4. Q5a. Write syntax directed definition for a given assignment statement: S → id=E E → E+E E →E*E E→-E E → (E) E→id (10 marks, 2023-24)
  5. Q5a. Consider the following grammar and give the syntax directed definition to construct parse tree for the input expression 4*7+3*9. E -> E+T | T T -> T*F | F F -> num. Also construct an annotated parse tree according to your syntax directed definition. (10 marks, 2023-24)
  6. Q1e. Why are quadruples preferred over triples in an optimizing compiler? (2 marks, 2025-26)
  7. Q1d. Differentiate Parse tree and Syntax tree with an example. (2 marks, 2023-24)
  8. Q1e. Define syntax-directed translation schemes. (2 marks, 2023-24)
  9. Q1i. Define a syntax-directed translation. (2 marks, 2022-23)
  10. Q4. How would you convert the following into intermediate code? Give a suitable example. i) Assignment Statements. ii) Case Statements (15 marks, 2016-17)

AKTU paper codes: BCS602

Other Compiler Design units

Compiler Design previous year papers

Browse all notes · Semester 6 notes · Compiler Design notes