



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Past Questions on Compiler design from basics to advanced
Typology: Exercises
1 / 6
This page cannot be seen from the preview
Don't miss anything!
S -> aB|bA
A -> a|aS|bAA
B -> b|bS|aBB
Drive the string aaabbabbba using the above grammar (using Left Most Derivation and Right most Derivation).
1. Explain the parsing techniques with a hierarchical diagram. 2. What are the problems associated with Top Down Parsing? 3. Write the production rules to eliminate the left recursion and left factoring problems. 4. Consider the following Grammar:
A-> ABd|Aa|a
B-> Be|b
Remove left recursion.
A-> aAB|aA|a
B-> bB|b
E-> E+T|T
T-> T*F|F
F-> (E)|id
S-> CC
C-> aC
C->d
S->Aa|bAc|Bc|bBa
A->d
B->d
Is LR(1) but not LALR(1).
(ab)+(c-d)(a*b)+b
(a+(b*c)^d-e/(f+g)
-(a*b)+(c+d)-(a+b+c+d)