Docsity

Compiler Design Question Solve, Exams of Compiler Design

Partial preview of the text

Download Compiler Design Question Solve and more Exams Compiler Design in PDF only on Docsity!

  • SPRING
    • Group:

1 _ A FIRST() & FOLLOW()

,j

B) Left Factoring

2 _ B

1, CFG3 is left recursive.5, CFG3 is left recursive.9, CFG3 is left recursive.13 is left recursive., CFG3 is left recursive.14, CFG3 is left recursive.23 is left recursive. n of grammar is said to have left recursion if the leftmost variable of umber lin of grammar is said to have left recursion if the leftmost variable of e of code is Leader in of grammar is said to have left recursion if the leftmost variable of st recursive.ruct recursive.ion of grammar is said to have left recursion if the leftmost variable of.

There are six(6) basic blocks in that code. basic blocks in of grammar is said to have left recursion if the leftmost variable of t recursive.hat recursive. code.

Flow Graph

Intermediate Code for Quadruples

and Triples

T1 = p+q

T2= p-q

T3= t1*t

T4= t1-t

T5= t4+t

4.a.1 Quadruples

4.b Canonical Table

LR(0) Table