903 views
0 votes
0 votes
Let G be any grammar with the following productions:

X → X+Y | Y
Y→ Y*Z | Z
Z → (X)
Z → id

If LR(1) parser is used to parse the above grammar, then total how many look-a-heads are present for the item “X→.Y” and “Z →.id” in the initial state?

1 Answer

0 votes
0 votes

Answer: 

 

Here (i) is X→ .Y 

and (ii) is Z→ .id

edited by

Related questions

1 votes
1 votes
4 answers
1
Rahul_Rathod_ asked Jan 21, 2019
3,660 views
grammar is CLR(1) or not?if yes then how?
0 votes
0 votes
0 answers
2
0 votes
0 votes
0 answers
3
Aibi asked Sep 22, 2017
445 views
Let G be a grammar with the following productions.If LR(1) Parser is used to construct the DFA using the above productions, then how many look-a-heads are present for an ...
1 votes
1 votes
0 answers
4