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. The results are that all transformations of interest take time linear in the size of the given grammar giving resulting grammars that are larger by a constant factor than the original grammar. Our results generalize known 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]
Udi Manber,et al.
GLIMPSE: A Tool to Search Through Entire File Systems
,
1994,
USENIX Winter.
[2]
Dominique Revuz,et al.
Minimisation of Acyclic Deterministic Automata in Linear Time
,
1992,
Theor. Comput. Sci..
[3]
Daniel S. Hirschberg,et al.
A linear space algorithm for computing maximal common subsequences
,
1975,
Commun. ACM.
[4]
Wojciech Rytter,et al.
Text Algorithms
,
1994
.
[5]
Eugene W. Myers,et al.
Optimal alignments in linear space
,
1988,
Comput. Appl. Biosci..
[6]
Shane S. Sturrock,et al.
Time Warps, String Edits, and Macromolecules – The Theory and Practice of Sequence Comparison . David Sankoff and Joseph Kruskal. ISBN 1-57586-217-4. Price £13.95 (US$22·95).
,
2000
.