in Compiler Design retagged by
366 views
0 votes
0 votes

in Compiler Design retagged by
366 views

2 Comments

no the grammer is  not ll(1);

as for production of A->c/epsilon;

A will have two production for c as follow(A) and first(A) is not null
0
0

@Deepesh Pai,

Please add question source in title.

0
0

1 Answer

2 votes
2 votes
Best answer

For production S-->aSA/e

first(S)={a} , follow(S)={c,$} this production is fine.

For production A-->c/e

First(A)={c}, follow(A)=follow (S)= {c,$} here is conflict, A-->c and A-->e  wants to get into same cell of terminal c.

that's why this is not LL(1).

selected by