Abstract
Conjunctive grammars (Okhotin, 2001) are an extension of the standard context-free grammars with a conjunction operation, which maintains most of their practical properties, including many parsing algorithms. This paper introduces a further extension to the model, which is equipped with quantifiers for referring to the left context, in which the substring being defined does occur. For example, a rule \(A \rightarrow a \& \triangleleft{B}\) defines a string a, as long as it is preceded by any string defined by B. The paper gives two equivalent definitions of the model—by logical deduction and by language equations—and establishes its basic properties, including a transformation to a normal form, a cubic-time parsing algorithm, and another recognition algorithm working in linear space.
Supported by the Academy of Finland under grant 134860.
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
Aizikowitz, T., Kaminski, M.: LR(0) Conjunctive Grammars and Deterministic Synchronized Alternating Pushdown Automata. In: Kulikov, A., Vereshchagin, N. (eds.) CSR 2011. LNCS, vol. 6651, pp. 345–358. Springer, Heidelberg (2011), http://dx.doi.org/10.1007/978-3-642-20712-9_27
Chomsky, N.: On certain formal properties of grammars. Information and Control 2(2), 137–167 (1959), http://dx.doi.org/10.1016/S0019-9958(59)90362-6
Čulík II, K., Cohen, R.: LR-regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7(1), 66–96 (1973), http://dx.doi.org/10.1016/S0022-0000(73)80050-9
Ésik, Z., Kuich, W.: Boolean fuzzy sets. International Journal of Foundations of Computer Science 18(6), 1197–1207 (2007), http://dx.doi.org/10.1142/S0129054107005248
Ford, B.: Parsing expression grammars: a recognition-based syntactic foundation. In: Proceedings of POPL 2004, Venice, Italy, January 14-16, pp. 111–122 (2004), http://doi.acm.org/10.1145/964001.964011
Ginsburg, S., Rice, H.G.: Two families of languages related to ALGOL. Journal of the ACM 9, 350–371 (1962), http://dx.doi.org/10.1145/321127.321132
Jeż, A.: Conjunctive grammars can generate non-regular unary languages. International Journal of Foundations of Computer Science 19(3), 597–615 (2008), http://dx.doi.org/10.1142/S012905410800584X
Jeż, A., Okhotin, A.: Conjunctive grammars over a unary alphabet: undecidability and unbounded growth. Theory of Computing Systems 46(1), 27–58 (2010), http://dx.doi.org/10.1007/s00224-008-9139-5
Jarzabek, S., Krawczyk, T.: LL-regular grammars. Information Processing Letters 4, 31–37 (1975), http://dx.doi.org/10.1016/0020-0190(75)90009-5
Kountouriotis, V., Nomikos, C., Rondogiannis, P.: Well-founded semantics for Boolean grammars. Information and Computation 207(9), 945–967 (2009), http://dx.doi.org/10.1016/j.ic.2009.05.002
Okhotin, A.: Conjunctive grammars. Journal of Automata, Languages and Combinatorics 6(4), 519–535 (2001)
Okhotin, A.: Conjunctive grammars and systems of language equations. Programming and Computer Science 28(5), 243–249 (2002), http://dx.doi.org/10.1023/A:1020213411126
Okhotin, A.: Boolean grammars. Information and Computation 194(1), 19–48 (2004), http://dx.doi.org/10.1016/j.ic.2004.03.006
Okhotin, A.: The dual of concatenation. Theoretical Computer Science 345(2-3), 425–447 (2005), http://dx.doi.org/10.1016/j.tcs.2005.07.019
Okhotin, A.: Generalized LR parsing algorithm for Boolean grammars. International Journal of Foundations of Computer Science 17(3), 629–664 (2006), http://dx.doi.org/10.1142/S0129054106004029
Okhotin, A.: Recursive descent parsing for Boolean grammars. Acta Informatica 44(3-4), 167–189 (2007), http://dx.doi.org/10.1007/s00236-007-0045-0
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), http://dx.doi.org/10.1007/978-3-642-14455-4_31
Okhotin, A., Reitwießner, C.: Conjunctive grammars with restricted disjunction. Theoretical Computer Science 411(26-28), 2559–2571 (2010), http://dx.doi.org/10.1016/j.tcs.2010.03.015
Parr, T., Fisher, K.: LL(*): the foundation of the ANTLR parser generator. In: Programming Language Design and Implementation, PLDI 2011, San Jose, USA, June 4-8, pp. 425–436 (2011), http://dx.doi.org/10.1145/1993316.1993548
Sikkel, K.: Parsing Schemata. Springer, Heidelberg (1997)
Valiant, L.G.: General context-free recognition in less than cubic time. Journal of Computer and System Sciences 10(2), 308–314 (1975), http://dx.doi.org/10.1016/S0022-0000(75)80046-8
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Barash, M., Okhotin, A. (2012). Defining Contexts in Context-Free Grammars. In: Dediu, AH., Martín-Vide, C. (eds) Language and Automata Theory and Applications. LATA 2012. Lecture Notes in Computer Science, vol 7183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28332-1_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-28332-1_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28331-4
Online ISBN: 978-3-642-28332-1
eBook Packages: Computer ScienceComputer Science (R0)