## Normal Form Algorithms for Extended Context-Free Grammars (2000)

Venue: | Theoretical Computer Science |

Citations: | 18 - 2 self |

### BibTeX

@ARTICLE{Albert00normalform,

author = {Jürgen Albert and Dora Giammarresi and Derick Wood},

title = {Normal Form Algorithms for Extended Context-Free Grammars},

journal = {Theoretical Computer Science},

year = {2000},

volume = {267},

pages = {2001}

}

### Years of Citing Articles

### OpenURL

### Abstract

We investigate the complexity of a variety of normal-form transformations for extended context-free grammars, where by extended we mean that the set of right-hand sides for each nonterminal in such a grammar is a regular set. The study is motivated by the implementation project GraMa which will provide a C++ toolkit for the symbolic manipulation of context-free objects just as Grail does for regular objects. Our results generalize known complexity bounds for context-free grammars but do so in nontrivial ways. Specifically, we introduce a new representation scheme for extended context-free grammars (the symbol-threaded expression forest), a new normal form for these grammars (dot normal form) and new regular expression algorithms. 1 Introduction In the 1960's, extended context-free grammars were introduced, based on Backus--Naur form, as a useful abbreviatory notation that made context-free grammars easier to write. More recently, the Standardized General Markup Language (SGML...

### Citations

487 | Regular Languages
- Yu
(Show Context)
Citation Context ...d to an infinite number of ordinary context-free productions, it is known that extended and standard context-free grammars 2 describe exactly the same languages; for example, see the texts of Salomaa =-=[23]-=- and of Wood [25]. We denote the size of a regular expression E by jEj and define it as the number of symbols and operators in E. We denote the size of a set A also by jAj. To measure the complexity o... |

320 |
Introduction to Formal Language Theory
- Harrison
- 1978
(Show Context)
Citation Context ...tions of grammars and machines that admit efficient transformation algorithms (as well as other algorithms of interest). Earlier results on context-free grammars were obtained by Harrison and Yehudai =-=[12, 13, 26]-=- and by Hunt et al. [15] among others. Harrison's chapter on normal form transformations [12] provides an excellent survey of early results. Cohen and Gotlieb [5] suggested a specific representation f... |

210 | Derivatives of regular expressions
- Brzozowski
(Show Context)
Citation Context ...ive dE dX of a regular expression E by a symbol X to give a new expression F such that L(F ) = fy : Xy 2 L(E)g and fXgL(F ) ` L(E). The derivative of a regular expression was introduced by Brzozowski =-=[3]-=- who defined it inductively. Now, given a schema EA , we obtain its derivatives for each symbol X 2 N [ \Sigma. When we catenate X with its derivative we obtain one of the terms in the first normal fo... |

203 |
The Theory of Parsing
- Aho, Ullman
- 1972
(Show Context)
Citation Context ...mars as context-free grammars in which the right-hand sides of productions are regular expressions. Let V be an alphabet. Then, we define a regular expression over V and its language in the usual way =-=[1, 25]-=- with the Kleene plus as an additional operator. The symbolsdenotes the null string. An extended context-free grammar G is specified by a tuple (N; \Sigma; P; S), where N and \Sigma are disjoint finit... |

73 |
Theory of Computation
- Wood
- 1987
(Show Context)
Citation Context ...minals and the currently detected reachable symbols, and so on until no newly useful symbols are identified. We can formalize this inductive process with a marking algorithm such as described by Wood =-=[24]-=- for context-free grammars. The major difference between previous work and the approach taken here is that we want to obtain an efficient algorithm. Yehudai [26] designed an efficient algorithm for de... |

35 |
On the equivalence, containment, and covering problems for the regular and context-free languages
- Hunt, Rosenkrantz, et al.
- 1976
(Show Context)
Citation Context ...hat admit efficient transformation algorithms (as well as other algorithms of interest). Earlier results on context-free grammars were obtained by Harrison and Yehudai [12, 13, 26] and by Hunt et al. =-=[15]-=- among others. Harrison's chapter on normal form transformations [12] provides an excellent survey of early results. Cohen and Gotlieb [5] suggested a specific representation for context-free grammars... |

24 |
A new normal-form theorem for contextfree phrase structure grammars
- Greibach
- 1965
(Show Context)
Citation Context ...t subtree. This approach takes O(jN j 2 ) time and adds O(jN j 2 ) extra space to the grammar G. 3.4 Greibach form This normal form result for context-free grammars was established by Sheila Greibach =-=[10]-=- in the 1960's; it was a key result in the use of the multiple-path syntactic analyzer developed at Harvard University at that time. An extended context-free grammar is in Greibach normal form if its ... |

21 | Grail: a C++ library for automata and expressions
- Raymond, Wood
- 1994
(Show Context)
Citation Context ...ntext-free grammars [17]. We are currently designing a manipulation system toolkit GraMa for extended contextfree grammars, pushdown machines and context-free expressions. It is an extension of Grail =-=[20, 19]-=-, a similar toolkit for regular expressions and finite-state machines. As a result, we need to choose appropriate representations of grammars and machines that admit efficient transformation algorithm... |

19 | DAGWOOD: A system for manipulating polynomials given by straight-line programs - Freeman, Imirzian, et al. - 1986 |

12 | Greibach normal form transformation revisited
- Blum, Koch
- 1999
(Show Context)
Citation Context ...This technique gives a blowup of only jGj+jN j 2 at most; thus, it reduces the complete conversion time and size to O(jN j 3 jGj) in the worst case. We may also apply the technique that Koch and Blum =-=[18]-=- suggested; namely, leave unitproduction removal until after we have obtained a Greibach-like normal form. Moreover, 10 transforming an extended context-free grammar into dot normal form appears to be... |

8 |
W3C web page on XML
- Connolly
- 1997
(Show Context)
Citation Context ...recently, the Standardized General Markup Language (SGML) [16] used a similar abbreviatory notation to define extended context-free grammars for documents. Currently, Extensible Markup Language (XML) =-=[6]-=-, which is a simplified version of SGML, is being promoted as the markup language for the web, instead of HTML (a specific grammar or document type definition (DTD) specified using SGML). These develo... |

8 | SGML and Exceptions
- Kilpeläinen, Wood
- 1996
(Show Context)
Citation Context ...see the proof of decidability of structural equivalence for extended context-free grammars [4] and the demonstration that SGML exceptions do not add expressive power to extended context-free grammars =-=[17]-=-. We are currently designing a manipulation system toolkit GraMa for extended contextfree grammars, pushdown machines and context-free expressions. It is an extension of Grail [20, 19], a similar tool... |

6 |
Normal-form transformations of context-free grammars
- HOTZ
- 1978
(Show Context)
Citation Context ...lta E i;k with E 0 k . If the grammar is left recursive, we first need to make it non-left recursive. We use a technique introduced by Greibach [11], investigated in detail by Hotz and his co-workers =-=[14, 21, 22]-=- and rediscovered by others [7]. It involves producing, for each nonterminal, a distinct subgrammar of G that is left linear; hence, it can be converted into an equivalent right linear grammar. This c... |

5 |
Structural equivalence of extended context-free and extended E0L grammars
- Cameron, Wood
- 1995
(Show Context)
Citation Context ...ormal-form transformations. There has been some related work that is more directly motivated by SGML issues; see the proof of decidability of structural equivalence for extended context-free grammars =-=[4]-=- and the demonstration that SGML exceptions do not add expressive power to extended context-free grammars [17]. We are currently designing a manipulation system toolkit GraMa for extended contextfree ... |

5 |
A.: Eliminating Null Rules in Linear Time
- Harrison, Yehudai
- 1981
(Show Context)
Citation Context ...tions of grammars and machines that admit efficient transformation algorithms (as well as other algorithms of interest). Earlier results on context-free grammars were obtained by Harrison and Yehudai =-=[12, 13, 26]-=- and by Hunt et al. [15] among others. Harrison's chapter on normal form transformations [12] provides an excellent survey of early results. Cohen and Gotlieb [5] suggested a specific representation f... |

4 |
An easy proof of Greibach normal form
- Ehrenfeucht, Rozenberg
- 1984
(Show Context)
Citation Context ... left recursive, we first need to make it non-left recursive. We use a technique introduced by Greibach [11], investigated in detail by Hotz and his co-workers [14, 21, 22] and rediscovered by others =-=[7]-=-. It involves producing, for each nonterminal, a distinct subgrammar of G that is left linear; hence, it can be converted into an equivalent right linear grammar. This conversion changes left recursio... |

4 |
Grail: Engineering automata in C++, version 2.5
- Raymond, Wood
- 1996
(Show Context)
Citation Context ...ntext-free grammars [17]. We are currently designing a manipulation system toolkit GraMa for extended contextfree grammars, pushdown machines and context-free expressions. It is an extension of Grail =-=[20, 19]-=-, a similar toolkit for regular expressions and finite-state machines. As a result, we need to choose appropriate representations of grammars and machines that admit efficient transformation algorithm... |

4 |
A general Greibach normal form transformation
- Ross, Hotz, et al.
- 1978
(Show Context)
Citation Context ...lta E i;k with E 0 k . If the grammar is left recursive, we first need to make it non-left recursive. We use a technique introduced by Greibach [11], investigated in detail by Hotz and his co-workers =-=[14, 21, 22]-=- and rediscovered by others [7]. It involves producing, for each nonterminal, a distinct subgrammar of G that is left linear; hence, it can be converted into an equivalent right linear grammar. This c... |

3 |
Exploratory steps towards a grammatical manipulation package (GRAMPA
- Barnes
- 1972
(Show Context)
Citation Context ...r context-free grammars and extended context-free grammars. We believe that this representation is new. The only previously documented representations are those of Cohen and Gotlieb [5] and of Barnes =-=[2]-=- and they are more simplistic. Second, we have demonstrated how indirection using referencing can save time and space in the null-production removal and back left substitution algorithms. Although the... |

3 |
A list structure form of grammars for syntactic analysis
- Cohen, Gotlieb
- 1970
(Show Context)
Citation Context ...ined by Harrison and Yehudai [12, 13, 26] and by Hunt et al. [15] among others. Harrison's chapter on normal form transformations [12] provides an excellent survey of early results. Cohen and Gotlieb =-=[5]-=- suggested a specific representation for context-free grammars and demonstrated how it aided the programming of various operations on them. We first define extended context-free grammars using the not... |

3 |
A simple proof of the standard-form theorem for context-free grammars
- Greibach
- 1967
(Show Context)
Citation Context ... we need only replace the first A k of each term A k \Delta E i;k with E 0 k . If the grammar is left recursive, we first need to make it non-left recursive. We use a technique introduced by Greibach =-=[11]-=-, investigated in detail by Hotz and his co-workers [14, 21, 22] and rediscovered by others [7]. It involves producing, for each nonterminal, a distinct subgrammar of G that is left linear; hence, it ... |

3 |
Grammar Transformations Based on Regular Decompositions of ContextFree Derivations
- Ross
- 1978
(Show Context)
Citation Context ...lta E i;k with E 0 k . If the grammar is left recursive, we first need to make it non-left recursive. We use a technique introduced by Greibach [11], investigated in detail by Hotz and his co-workers =-=[14, 21, 22]-=- and rediscovered by others [7]. It involves producing, for each nonterminal, a distinct subgrammar of G that is left linear; hence, it can be converted into an equivalent right linear grammar. This c... |

3 |
On the Complexity of Grammar and Language Problems
- Yehudai
- 1977
(Show Context)
Citation Context ...tions of grammars and machines that admit efficient transformation algorithms (as well as other algorithms of interest). Earlier results on context-free grammars were obtained by Harrison and Yehudai =-=[12, 13, 26]-=- and by Hunt et al. [15] among others. Harrison's chapter on normal form transformations [12] provides an excellent survey of early results. Cohen and Gotlieb [5] suggested a specific representation f... |

1 | Transition diagram systems and normal form transformations
- Giammarresi, Wood
- 1998
(Show Context)
Citation Context ...t aided the programming of various operations on them. We first define extended context-free grammars using the notion of production schemas that are based on regular expressions. In a separate paper =-=[9]-=-, we discuss the algorithmic impact of basing the schemas on finite-state machines. Since finite-state machines and regular expressions are both first-class objects in Grail, they can be used intercha... |