TOPICS
Search

Context-Free Grammar


A context-free grammar is a quadruple (V,Sigma,R,S) in which V is a finite set of nonterminal symbols, Sigma is a finite set of terminal symbols disjoint from V, S in V is the start symbol, and R is a finite set of production rules of the form

 A->alpha,

where A in V and alpha is a string of symbols from V union Sigma. Repeatedly applying the rules beginning with S and retaining strings containing only terminal symbols generates a formal language, called a context-free language.


See also

Formal Language, String

Explore with Wolfram|Alpha

References

Chomsky, N. "Three Models for the Description of Language." IRE Trans. Inform. Th. 2, 113-124, 1956. https://doi.org/10.1109/TIT.1956.1056813.

Cite this as:

Weisstein, Eric W. "Context-Free Grammar." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Context-FreeGrammar.html

Subject classifications