hidden pixel

Deterministic Context-free Grammar Information

In formal grammar theory, the deterministic context-free grammars (DCFGs) are a proper subset of the context-free grammars. The deterministic context-free grammars are those a deterministic pushdown automaton can recognize. A DCFG is the finite set of rules defining the set of well-formed expressions in some deterministic context-free language.

Contents

History

In the 1960s, theoretic research in computer science on regular expressions and finite automata led to the discovery that context-free grammars are equivalent to pushdown automata. These grammars were thought to capture the syntax of computer programming languages. The first computer programming languages were under development at the time (see History of programming languages) and writing compilers was difficult. But using context-free grammars to help automate the parsing part of the compiler simplified the task. Deterministic context-free grammars were particularly useful because they could be parsed sequentially, which was a requirement due to computer memory constraints.[1]

Uses

LALR parsers, which use a subset of DCFGs, have practical value as program code validators. Given the formal rules of a DCFG, these parsers efficiently ensure a program can be generated from those rules. In fact, this syntax validation is one of the operations a compiler performs.

Limitations

Since DCFGs are a proper subset of CFGs, they are of less descriptive power than some CFGs.

See also

References

  1. ^ A Salomaa & D Wood & S Yu, ed (2001). A Half-Century of Automata Theory. World Scientific Publishing Co. Pte. Ltd. pp. 38–39.
· · Automata theory: formal languages and formal grammars
Chomsky hierarchy
Type-0
Type-1
Type-2
Type-3
Grammars
Unrestricted
(no common name)
Context-sensitive
Indexed
Linear context-free rewriting systems etc.
Tree-adjoining etc.
Context-free
Deterministic context-free
Visibly pushdown
Regular
Languages
Recursively enumerable
Recursive
Context-sensitive
Indexed
Mildly context-sensitive
Tree-adjoining
Context-free
Deterministic context-free
Visibly pushdown
Regular
Star-free
Minimal automaton
Turing machine
Decider
Linear-bounded
Nested stack
Thread automata
Embedded pushdown
Nondeterministic pushdown
Deterministic pushdown
Visibly pushdown
Finite
Counter-free (with aperiodic finite monoid)
Each category of languages is a proper subset of the category directly above it. - Any automaton and any grammar in each category has an equivalent automaton or grammar in the category directly above it.

Categories: Formal languages

 

The above information uses material from Wikipedia and is licensed under the GNU Free Documentation License.
Some facts may not have been fully verified for accuracy. [Disclaimers]
This page was last archived by our server on Fri Sep 30 10:19:33 2011.
Displaying this page or its contents does not use any Wikimedia Foundation's resources.
The owners of this site proudly support the Wikimedia Foundation.