Pdfs
Pdfs
Pdfs
___________
MARKS
Q.3 (a) What is lexical analysis? Which are the tasks performed by lexical 03
analyzer.
(b) Give the rule to remove left recursive grammar. And Eliminate left 04
recursion from following grammar.
S → Aa | b
A → Ac | Sd | f
(c) Show the following grammar is LR(1) but not LALR(1). 07
S->Aa │bAc │Bc│bBa
A->d
B->d
OR
Q.3 (a) Write RE the following language.. 03
1. All string of 0’s and 1’s that do not contain 11.
2. All string of 0’s and 1’s that every 1 is followed by 00
(b) What is left factoring in CFG? Perform the Left factoring of following 04
Grammar.
S → iEtS / iEtSaS / a
E→b
1
(c) Construct SLR parsing table for the following grammar : 07
S → (L) | a
L→ L,S | S
*************