in Compiler Design
179 views
0 votes
0 votes

Hi, there my question is while constructing DFA for LL(1) or LR(0), or SLR (1). parsing I'm seeing different variants of DFA for the same problem set, and I'm not able to determine which is correct and which is not
please help I’m providing a question and an image also 

Question is
S->dA/aB
A->bA/c
B->bB/c

so first is this

second is this

which one is correct and why please ex

in Compiler Design
179 views

1 Answer

0 votes
0 votes
The second one is correct.

U are doing mistake in creating Canonical items for production A,B even before reaching by augmentation S’ → S,

so only need to expand S production rule then follow the steps, u will get correct answer

Related questions