An extension of context-free grammars with one-sided context specifications

被引:14
|
作者
Barash, Mikhail [1 ,2 ]
Okhotin, Alexander [1 ]
机构
[1] Univ Turku, Dept Math & Stat, FI-20014 Turku, Finland
[2] Turku Ctr Comp Sci, FI-20520 Turku, Finland
基金
芬兰科学院;
关键词
Context-free grammars; Conjunctive grammars; Contexts; Context-sensitive grammars; Parsing; CONJUNCTIVE GRAMMARS; RECOGNITION;
D O I
10.1016/j.ic.2014.03.003
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
The paper introduces an extension of context-free grammars equipped with an operator for referring to the left context of the substring being defined. For example, a rule A -> alpha & (sic)B defines a symbol a, as long as it is preceded by a string defined by B. The conjunction operator in this example is taken from conjunctive grammars (Okhotin, 2001), which are an extension of ordinary context-free grammars that maintains most of their practical properties, including many parsing algorithms. This paper gives two equivalent definitions of grammars with left contexts by logical deduction and by language equations and establishes their basic properties, including a transformation to a normal form and a cubictime parsing algorithm, with a square-time version for unambiguous grammars. (C) 2014 Elsevier Inc. All rights reserved.
引用
收藏
页码:268 / 293
页数:26
相关论文
共 50 条
  • [1] INDEXED GRAMMARS - AN EXTENSION OF CONTEXT-FREE GRAMMARS
    AHO, AV
    JOURNAL OF THE ACM, 1968, 15 (04) : 647 - &
  • [2] One-sided random context grammars
    Meduna, Alexander
    Zemek, Petr
    ACTA INFORMATICA, 2011, 48 (03) : 149 - 163
  • [3] One-sided random context grammars
    Alexander Meduna
    Petr Zemek
    Acta Informatica, 2011, 48 : 149 - 163
  • [4] Generalized context-free grammars and multiple context-free grammars
    Kasami, Tadao
    Seki, Hiroyuki
    Fujii, Mamoru
    Systems and Computers in Japan, 1989, 20 (07): : 43 - 52
  • [5] Context-Free Tree Grammars are as Powerful as Context-Free Jungle Grammars
    Drewes, Frank
    Engelfriett, Joost
    ACTA CYBERNETICA, 2015, 22 (02): : 373 - 392
  • [6] ONE-SIDED AND 2-SIDED CONTEXT IN FORMAL GRAMMARS
    PENTTONEN, M
    INFORMATION AND CONTROL, 1974, 25 (04): : 371 - 392
  • [7] Nonterminal complexity of one-sided random context grammars
    Alexander Meduna
    Petr Zemek
    Acta Informatica, 2012, 49 : 55 - 68
  • [8] Nonterminal complexity of one-sided random context grammars
    Meduna, Alexander
    Zemek, Petr
    ACTA INFORMATICA, 2012, 49 (02) : 55 - 68
  • [9] On translating Lambek grammars with one division into context-free grammars
    S. L. Kuznetsov
    Proceedings of the Steklov Institute of Mathematics, 2016, 294 : 129 - 138
  • [10] On Translating Lambek Grammars with One Division into Context-Free Grammars
    Kuznetsov, S. L.
    PROCEEDINGS OF THE STEKLOV INSTITUTE OF MATHEMATICS, 2016, 294 (01) : 129 - 138