Context-free Grammar

In formal language theory, a context-free grammar (CFG) is a formal grammar in which every production rule is of the form

Vw

where V is a single nonterminal symbol, and w is a string of terminals and/or nonterminals (w can be empty).

The languages generated by context-free grammars are known as the context-free languages.

A formal grammar is considered "context free" when its production rules can be applied regardless of the context of a nonterminal.

Context-free grammars are important in linguistics for describing the structure of sentences and words in natural language, and in computer science for describing the structure of programming languages and other formal languages.

In linguistics, some authors use the term phrase structure grammar to refer to context-free grammars, whereby phrase structure grammars are distinct from dependency grammars. In computer science, a popular notation for context-free grammars is Backus–Naur Form, or BNF.

Read more about Context-free GrammarBackground, Formal Definitions, Normal Forms, Undecidable Problems, Extensions, Subclasses, Linguistic Applications

Other articles related to "grammar":

Context-free Grammar - Linguistic Applications
... Chomsky initially hoped to overcome the limitations of context-free grammars by adding transformation rules ... Much of generative grammar has been devoted to finding ways of refining the descriptive mechanisms of phrase-structure grammar and transformation rules such that exactly the kinds of things can be expressed ... transformations that introduce and then rewrite symbols in a context-free fashion) ...

Famous quotes containing the word grammar:

    The old saying of Buffon’s that style is the man himself is as near the truth as we can get—but then most men mistake grammar for style, as they mistake correct spelling for words or schooling for education.
    Samuel Butler (1835–1902)