Defining Contexts in Context-Free Grammars

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 → a & ◺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.

[1]  Notes on top-down languages , 1969 .

[2]  Sheng Yu A property of real-time trellis automata , 1986, Discret. Appl. Math..

[3]  Alexander Okhotin,et al.  The dual of concatenation , 2005, Theor. Comput. Sci..

[4]  Oscar H. Ibarra,et al.  Sequential Machine Characterizations of Trellis and Cellular Automata and Applications , 1985, SIAM J. Comput..

[5]  Noam Chomsky,et al.  On Certain Formal Properties of Grammars , 1959, Inf. Control..

[6]  Wojciech Fraczak,et al.  A characterization of s-languages , 2004, Inf. Process. Lett..

[7]  Stephan Heilbrunner,et al.  On the definition of ELR(k) and ELL(k) grammars , 1979, Acta Informatica.

[8]  Roman R. Redziejowski Parsing Expression Grammar as a Primitive Recursive-Descent Parser with Backtracking , 2007, Fundam. Informaticae.

[9]  Alexander Okhotin Fast Parsing for Boolean Grammars: A Generalization of Valiant's Algorithm , 2010, Developments in Language Theory.

[10]  Alexander Okhotin,et al.  A Boolean grammar for a simple programming language , 2004 .

[11]  Alexander Okhotin,et al.  Generalized Lr Parsing Algorithm for Boolean Grammars , 2006, Int. J. Found. Comput. Sci..

[12]  Robert W. Sebesta,et al.  Concepts of programming languages , 1973 .

[13]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[14]  Ivan Hal Sudborough,et al.  A Note on Tape-Bounded Complexity Classes and Linear Context-Free languages , 1975, JACM.

[15]  William C. Rounds,et al.  LFP A Logic for Linguistic Descriptions and an Analysis of its Complexity , 1988, Comput. Linguistics.

[16]  Aravind K. Joshi,et al.  Tree Adjunct Grammars , 1975, J. Comput. Syst. Sci..

[17]  Giorgio Satta,et al.  Theory of Parsing , 2010 .

[18]  Jean Berstel,et al.  Context-Free Languages and Pushdown Automata , 1997, Handbook of Formal Languages.

[19]  Alfred V. Aho Indexed Grammars-An Extension of Context Free Grammars , 1967, SWAT.

[20]  Artur Jez Conjunctive Grammars Can Generate Non-regular Unary Languages , 2007, Developments in Language Theory.

[21]  Alexander Okhotin,et al.  On the equivalence of linear conjunctive grammars and trellis automata , 2004, RAIRO Theor. Informatics Appl..

[22]  Alexander Okhotin,et al.  On the expressive power of univariate equations over sets of natural numbers , 2012, Inf. Comput..

[23]  Artur Jez,et al.  Complexity of Equations over Sets of Natural Numbers , 2009, Theory of Computing Systems.

[24]  Alexander Okhotin Unambiguous Boolean grammars , 2007, Inf. Comput..

[25]  Alexander Okhotin A recognition and parsing algorithm for arbitrary conjunctive grammars , 2003, Theor. Comput. Sci..

[26]  Stan Jarzabek,et al.  LL-Regular Grammars , 1975, Inf. Process. Lett..

[27]  Steven M. Kearns,et al.  Extending regular expressions with context operators and parse extraction , 1991, Softw. Pract. Exp..

[28]  Richard Edwin Stearns,et al.  Syntax-Directed Transduction , 1966, JACM.

[29]  R. Hausser Foundations of Computational Linguistics , 1999, Springer Berlin Heidelberg.

[30]  Panos Rondogiannis,et al.  Well-founded semantics for Boolean grammars , 2009, Inf. Comput..

[31]  Karl M. Schimpf,et al.  Practical Arbitrary Lookahead LR Parsing , 1990, J. Comput. Syst. Sci..

[32]  Michael Kaminski,et al.  LR(0) conjunctive grammars and deterministic synchronized alternating pushdown automata , 2011, J. Comput. Syst. Sci..

[33]  Alexander Okhotin,et al.  Recursive descent parsing for Boolean grammars , 2007, Acta Informatica.

[34]  J. C. Cleaveland,et al.  Grammars for programming languages , 1977 .

[35]  Masaru Tomita,et al.  An Efficient Augmented-Context-Free Parsing Algorithm , 1987, Comput. Linguistics.

[36]  Artur Jez,et al.  One-Nonterminal Conjunctive Grammars over a Unary Alphabet , 2009, CSR.

[37]  Alexander Okhotin Conjunctive Grammars and Systems of Language Equations , 2004, Programming and Computer Software.

[38]  Alexander Okhotin LR Parsing for Conjunctive Grammars , 2002, Grammars.

[39]  Artur Jez,et al.  Conjunctive Grammars over a Unary Alphabet: Undecidability and Unbounded Growth , 2008, Theory of Computing Systems.

[40]  Oscar H. Ibarra,et al.  Characterizations and Computational Complexity of Systolic Trellis Automata , 1984, Theor. Comput. Sci..

[41]  Alexander Okhotin Expressive power of LL(k) Boolean grammars , 2011, Theor. Comput. Sci..

[42]  B. J. Mailloux,et al.  Revised Report on the Algorithmic Language ALGOL 68 , 1976, SIGP.

[43]  Jeffrey D. Ullman,et al.  Parsing Algorithms with Backtrack , 1970, SWAT.

[44]  Robert W. Floyd,et al.  On the nonexistence of a phrase structure grammar for ALGOL 60 , 1962, CACM.

[45]  John E. Hopcroft,et al.  Simple Deterministic Languages , 1966, SWAT.

[46]  Reinhold Heckmann An efficient ELL(1)-parser generator , 2004, Acta Informatica.

[47]  Charles R. Dyer,et al.  One-Way Bounded Cellular Automata , 1980, Inf. Control..

[48]  Alexander Okhotin Boolean grammars , 2004, Inf. Comput..

[49]  Donald E. Knuth,et al.  The Genesis of Attribute Grammars , 1990, WAGA.

[50]  Detlef Wotschke,et al.  The Boolean Closures of the Deterministic and Nondeterministic Context-Free Languages , 1973, GI Jahrestagung.

[51]  Alexander Okhotin,et al.  Conjunctive Grammars , 2001, J. Autom. Lang. Comb..

[52]  Donald E. Knuth,et al.  On the Translation of Languages from Left to Right , 1965, Inf. Control..

[53]  Alexander Okhotin,et al.  On the closure properties of linear conjunctive languages , 2003, Theor. Comput. Sci..

[54]  Lothar Schmitz,et al.  An Efficient Recognizer for the Boolean Closure of Context-Free Languages , 1991, Theor. Comput. Sci..

[55]  Karel Culik,et al.  LR-Regular Grammars - an Extension of LR(k) Grammars , 1973, J. Comput. Syst. Sci..

[56]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[57]  Derick Wood,et al.  On predictive parsing and extended context-free grammars , 2002, CIAA'02.

[58]  James R. Kipps,et al.  GLR Parsing in Time O( n 3 ) , 1991 .

[59]  Jean H. Gallier,et al.  Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae , 1984, J. Log. Program..

[60]  Zoltán Ésik,et al.  Boolean Fuzzy Sets , 2007, Int. J. Found. Comput. Sci..

[61]  Leslie G. Valiant,et al.  General Context-Free Recognition in Less than Cubic Time , 1975, J. Comput. Syst. Sci..

[62]  H. Shyr Free monoids and languages , 1979 .

[63]  Alexander Okhotin,et al.  Conjunctive grammars with restricted disjunction , 2010, Theor. Comput. Sci..

[64]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[65]  Klaas Sikkel,et al.  Parsing Schemata , 1997, Texts in Theoretical Computer Science An EATCS Series.

[66]  Donald E. Knuth,et al.  Top-down syntax analysis , 1971, Acta Informatica.

[67]  Grzegorz Rozenberg,et al.  Developments in Language Theory II , 2002 .

[68]  Alexander Okhotin Homomorphisms Preserving Linear Conjunctive Languages , 2008, J. Autom. Lang. Comb..

[69]  Yves Schabes,et al.  Applying a Finite-State Intersection Grammar , 1997 .

[70]  Seymour Ginsburg,et al.  Two Families of Languages Related to ALGOL , 1962, JACM.

[71]  David J. Weir,et al.  The convergence of mildly context-sensitive grammar formalisms , 1990 .

[72]  Alexander Okhotin A simple P-complete problem and its language-theoretic representations , 2011, Theor. Comput. Sci..

[73]  Tadao Kasami,et al.  A Syntax-Analysis Procedure for Unambiguous Context-Free Grammars , 1969, J. ACM.

[74]  John B. Shoven,et al.  I , Edinburgh Medical and Surgical Journal.

[75]  Bryan Ford,et al.  Parsing expression grammars: a recognition-based syntactic foundation , 2004, POPL '04.

[76]  Max Rabkin,et al.  Recognizing Two-Sided Contexts in Cubic Time , 2014, CSR.

[77]  Terence Parr,et al.  LL(*): the foundation of the ANTLR parser generator , 2011, PLDI '11.

[78]  Alexander Okhotin Parsing by matrix multiplication generalized to Boolean grammars , 2014, Theor. Comput. Sci..

[79]  Juhani Karhumäki,et al.  Computer Science - Theory and Applications , 2014, Lecture Notes in Computer Science.

[80]  Daniel J. Rosenkrantz,et al.  Properties of deterministic top down grammars , 1969, STOC.

[81]  Professor Seppo Sippu,et al.  Parsing Theory , 1988, EATCS Monographs on Theoretical Computer Science.

[82]  David J. Weir,et al.  Characterizing Structural Descriptions Produced by Various Grammatical Formalisms , 1987, ACL.

[83]  Derick Wood A Further Note on Top-Down Deterministic Languages , 1971, Comput. J..

[84]  Véronique Terrier,et al.  On Real Time One-Way Cellular Array , 1995, Theor. Comput. Sci..

[85]  Niklaus Wirth,et al.  Pascal user manual and report - ISO Pascal standard, 4th Edition , 1991 .

[86]  Alexander Okhotin Improved Normal Form for Grammars with One-Sided Contexts , 2013, DCFS.

[87]  Alexander Okhotin,et al.  Conjunctive and Boolean grammars: The true general case of the context-free grammars , 2013, Comput. Sci. Rev..

[88]  Arto Salomaa,et al.  Systolic trellis automatat , 1984 .

[89]  Tadao Kasami,et al.  On Multiple Context-Free Grammars , 1991, Theor. Comput. Sci..

[90]  Sanguthevar Rajasekaran,et al.  TAL Recognition in O(M(n»)) Time , 1998, J. Comput. Syst. Sci..

[91]  Masaru Tomita,et al.  Efficient parsing for natural language , 1985 .

[92]  Russell W. Quong,et al.  ANTLR: A predicated‐LL(k) parser generator , 1995, Softw. Pract. Exp..