Define a context-free grammar (CFG)
A context-free grammar (CFG) is a set of production rules used to generate strings in a formal language. It consists of a set of variables (non-terminals), terminals, a start symbol, and production rules that replace variables with combinations of variables and terminals, allowing the generation of all strings in the language.