A context-free grammar G (henceforth abbreviated to “grammar”) is a 4-tuple (N,V, P, S) consisting of the following components: a finite set N of non-terminal variables, a finite set V of terminal variables that is disjoint from N , a finite set P of production rules, mapping non-terminal variables to a series of non-terminals and terminals, and a distinguished symbol S ∈ N that is the start sy...