Abstract
Formal grammars equipped with operators for specifying the form of the context of a substring were recently studied by Barash and Okhotin (“Defining contexts in context-free grammars”, LATA 2012), further extending the author’s (“Conjunctive grammars”, DCAGRS 2000) earlier work on propositional connectives in grammars. These grammars allow two types of context specifications: for a substring w of a string uwv, a left context operator ⊲ D states that u is of the form described by D, while the extended left context operator states that uw is described by E. This paper establishes a normal form for these grammars, in which extended left contexts are never used, while left contexts may be applied only for individual symbols, so that all rules are of the form \(A \to B_1 C_1 \mathop{\&} \ldots \mathop{\&} B_n C_n\) or \(A \to a \mathop{\&} {\lhd}D\). This eliminates circular dependencies in the grammar and allows simplifying the known parsing algorithm. Some further improvements to the algorithm accelerate it from time O(n 3) to time \(O(\frac{n^3}{\log n})\).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Arlazarov, V.L., Dinic, E.A., Kronrod, M.A., Faradzhev, I.A.: On economical construction of the transitive closure of an oriented graph. Soviet Mathematics Doklady 11, 1209–1210 (1970)
Barash, M.: Recursive descent parsing for grammars with contexts. SOFSEM 2013 student research forum (2013)
Barash, M., Okhotin, A.: Defining contexts in context-free grammars. In: Dediu, A.-H., Martín-Vide, C. (eds.) LATA 2012. LNCS, vol. 7183, pp. 106–118. Springer, Heidelberg (2012)
Barash, M., Okhotin, A.: An extension of context-free grammars with one-sided context specifications, manuscript submitted for publication
Chomsky, N.: On certain formal properties of grammars. Information and Control 2(2), 137–167 (1959)
Earley, J.: An efficient context-free parsing algorithm. Communications of the ACM 13(2), 94–102 (1970)
Graham, S.L., Harrison, M.A., Ruzzo, W.L.: An improved context-free recognizer. ACM Transactions of Programming Languages and Systems 2(3), 415–462 (1980)
Okhotin, A.: Conjunctive grammars. Journal of Automata, Languages and Combinatorics 6(4), 519–535 (2001)
Okhotin, A.: Boolean grammars. Information and Computation 194(1), 19–48 (2004)
Okhotin, A.: Fast parsing for Boolean grammars: A generalization of Valiant’s algorithm. In: Gao, Y., Lu, H., Seki, S., Yu, S. (eds.) DLT 2010. LNCS, vol. 6224, pp. 340–351. Springer, Heidelberg (2010)
Rounds, W.C.: LFP: A logic for linguistic descriptions and an analysis of its complexity. Computational Linguistics 14(4), 1–9 (1988)
Valiant, L.G.: General context-free recognition in less than cubic time. Journal of Computer and System Sciences 10(2), 308–314 (1975)
Williams, R.: Matrix-vector multiplication in sub-quadratic time (some preprocessing required). In: 18th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, New Orleans, USA, January 7-9, pp. 995–1001 (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Okhotin, A. (2013). Improved Normal Form for Grammars with One-Sided Contexts. In: Jurgensen, H., Reis, R. (eds) Descriptional Complexity of Formal Systems. DCFS 2013. Lecture Notes in Computer Science, vol 8031. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39310-5_20
Download citation
DOI: https://doi.org/10.1007/978-3-642-39310-5_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39309-9
Online ISBN: 978-3-642-39310-5
eBook Packages: Computer ScienceComputer Science (R0)