In formal language theory, a context-free language is a language generated by some context-free grammar. The set of all context-free languages is identical to the set of languages accepted by pushdown automata.
[edit] ExamplesAn archetypical context-free language is δ(q0,a,z) = (q0,a) δ(state1,read,pop) = (state2,push) Context-free languages have many applications in programming languages; for example, the language of all properly matched parentheses is generated by the grammar [edit] Closure propertiesContext-free languages are closed under the following operations. That is, if L and P are context-free languages and D is a regular language, the following languages are context-free as well:
Context-free languages are not closed under complement, intersection, or difference. [edit] Nonclosure under intersectionThe context-free languages are not closed under intersection. This can be seen by taking the languages [edit] Decidability propertiesThe following problems are undecidable for arbitrary context-free grammars A and B:
The following problems are decidable for arbitrary context-free languages:
[edit] Properties of context-free languages
[edit] References
offerte voli | hoteles | precios | voli | die verzeichnis | annuarie web | stop smoking london | |||||||||||||||||||||