Citizendia

In computer science, to say that a context-free grammar is in Greibach normal form (GNF) means that all production rules are of the form:

A \to \alpha X

or

S \to \lambda

where A is a nonterminal symbol, α is a terminal symbol, X is a (possibly empty) sequence of nonterminal symbols not including the start symbol, S is the start symbol, and λ is the null string. Computer science (or computing science) is the study and the Science of the theoretical foundations of Information and Computation and their In Formal language theory, a context-free grammar ( CFG) is a grammar in which every production rule is of the form V &rarr In Computer science, terminal and nonterminal symbols are those symbols that are used to construct production rules in a Formal grammar. In Computer science, terminal and nonterminal symbols are those symbols that are used to construct production rules in a Formal grammar.

Observe that the grammar must be without left recursions.

Every context-free grammar can be transformed into an equivalent grammar in Greibach normal form. (Some definitions do not consider the second form of rule to be permitted, in which case a context-free grammar that can generate the null string cannot be so transformed. ) This can be used to prove that every context-free language can be accepted by a non-deterministic pushdown automaton. In Formal language theory, a context-free language is a language generated by some Context-free grammar. In Automata theory, a pushdown automaton (PDA is a finite automaton that can make use of a stack containing data

Given a grammar in GNF and a derivable string in the grammar with length n, any top-down parser will halt at depth n. Top-down parsing is a strategy of analyzing unknown data relationships by hypothesizing general Parse tree structures and then considering whether the known fundamental structures

Greibach normal form is named after Sheila Greibach. Sheila Greibach (1939- is a researcher in Formal languages Automata, Compiler theory in particular and Computer science in general

See also

References


© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org