(DPDA) and DCFLs
Print this page
First   |   Last   |   Prev   |   Next

 

Consider the language for some symbol which is not a terminal symbol of M. Since L' has the prefix property. It is accepted by a DPDAM' that accepts by empty stock and, thus, there exists an unambiguous CFG G' with L=L(G')(by the above theorem). We construct a CFG G from G' such that L=L(G) as follows.

G and G' are exactly same except that we introduce a new nonterminal $ and a new production in G. Now, if , then G derives the string following exactly the same sequence of steps except at the last step, when G uses the production to get rid of the symbol $. Since G' is unambiguous, G must also be unambiguous.

Parsing and DPDA s

The context-free languages are of great practical importance, especially, in defining programming languages. For example, we can use CFGs to model the syntax of arithmetic expressions, block structures in programming languages, etc. A compiler for such a programming language must then embody a parser to carry out the process of analyzing a given input string in order to determine its grammatical structure with respect to the given grammar. That is, a parser is an algorithm to determine whether a given string is in the language generated by a given CFG and, if so, to construct a purse tree for the string(for further use at a later stage).

First   |   Last   |   Prev   |   Next