Context-free grammar - Wikipedia, the free encyclopedia

In formal language theory, a context-free grammar (CFG) is a formal grammar in which every production rule is of the form<br />
V → w<br />
where V is a single nonterminal symbol, and w is a string of terminals and/or nonterminals (w can be empty).