Bnf Grammar B C Acb Derived Grammar B Aac Derived Grammar C Aabc Derived Grammar D Abac D Q37119298

  1. Here is a BNF grammar:

A ::= a A | A b | c

a. Can “acb” be derived from this grammar?

b. Can “aac” be derived from the same grammar?

c. Can “aabc” be derived from the same grammar?

d. Can “abac” be derived from the same grammar?


Answer


a. Can “acb” be derived from this grammar?A -> aA -> aAb -> acbSo, answer is YES. b. Can “aac” be derived from the same grammar?A -> aA -> aaA -> aacSo, answer is YES.c. Can “aabc” be derived from the same grammar?Nod. Can “abac” be derived from

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.