Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

  1. Consider the following grammar:
    S → FR
    R → *S|ε
    F → id
    In the predictive parser table, M, of the grammar the entries M [S, id] and M[R, $] respectively.
    1. {S → FR} and {R → ε ]
    2. {S → FR} and { }
    3. {S → FR} and {R → *S}
    4. {F → id} and {R → ε }
Correct Option: A

The predictive parser table is given as.

So at M [S, id] = {S " FR}
M [R,$] = {R"!}



Your comments will be displayed only after manual approval.