Syntax Analysis7

Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the start symbol and the following set of production rules
S → bAS → aB
A → aB → b
A → aSB → bS
A → bAAB → aBB

0. Which of the following strings is generated by the grammar?

  • Option : C
  • Explanation :
    S → aB
    → aaBB
    → aabB
    → aabbS
    → aabbaB
    → aabbab
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *