- 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