In formal language theory, a Context Free Language is a language generated by some Context Free Grammar.
The set of all CFL is indentical to the set of language accepted by Pushdown Automata(PDAs)
Context Free Language
Context Free Grammar is defined by 4 tuples as:
Where:
- - set of Variables or non-terminal symbols
- - set of terminal symbols
- - start symbol
- - production rule
Important
Context Free Grammar has Production Rule of the form
where, and
Example
Example
For generating a language that generates equal number of ‘s and ‘s in the form , the Context Free Grammar will be defined as: