Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

  1. Consider the following grammar G
    S → F | H
    F → p | c
    H → d | c
    Where S, F, and H are non – terminal symbols, p, d, and c are terminal symbols. Which of the following statements (s) is/ are correct?
    S1 : LL(1) can parse all strings that are generated using grammar G
    S2 : LR(1) can parse all strings that are generated using grammar G
    1. Only S1
    2. Only S2
    3. Both S1 and S2
    4. Neither S1 nor S2
Correct Option: D

NA



Your comments will be displayed only after manual approval.