Generalized LR Parsing Algorithm for Grammars with One-Sided Contexts

被引:0
|
作者
Mikhail Barash
Alexander Okhotin
机构
[1] University of Turku,Department of Mathematics and Statistics
[2] Turku Centre for Computer Science (TUCS),undefined
来源
关键词
Formal grammars; Contexts; Conjunctive grammars; LR parsing; GLR parsing;
D O I
暂无
中图分类号
学科分类号
摘要
The Generalized LR parsing algorithm for context-free grammars is notable for having a decent worst-case running time (cubic in the length of the input string, if implemented efficiently), as well as much better performance on “good” grammars. This paper extends the Generalized LR algorithm to the case of “grammars with left contexts” (M. Barash, A. Okhotin, “An extension of context-free grammars with one-sided context specifications”, Inform. Comput., 2014), which augment the context-free grammars with special operators for referring to the left context of the current substring, along with a conjunction operator (as in conjunctive grammars) for combining syntactical conditions. All usual components of the LR algorithm, such as the parsing table, shift and reduce actions, etc., are extended to handle the context operators. The resulting algorithm is applicable to any grammar with left contexts and has the same worst-case cubic-time performance as in the case of context-free grammars.
引用
收藏
页码:581 / 605
页数:24
相关论文
共 50 条
  • [41] Generalized multiplicative bases for one-sided bimodule problems
    Babych, Vyacheslav
    Golovashchuk, Nataliya
    Ovsienko, Sergiy
    ALGEBRA & DISCRETE MATHEMATICS, 2011, 12 (02): : 1 - 24
  • [42] 'ONE-SIDED'
    HOFFMAN, B
    MINNESOTA REVIEW, 1991, (36) : 29 - 29
  • [43] Generalized derivations with engel conditions on one-sided ideals
    Albas, Einine
    Argac, Nurcan
    De Filippis, Vincenzo
    COMMUNICATIONS IN ALGEBRA, 2008, 36 (06) : 2063 - 2071
  • [44] Faster generalized LR parsing
    Aycock, J
    Horspool, N
    COMPILER CONSTRUCTION, 1999, 1575 : 32 - 46
  • [45] One-Sided
    Alexander, Edward
    COMMENTARY, 2009, 127 (06) : 12 - 12
  • [46] Grammars with two-sided contexts
    Barash, Mikhail
    Okhotin, Alexander
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (151): : 94 - 108
  • [47] LR-PARSING OF EXTENDED CONTEXT FREE GRAMMARS
    MADSEN, OL
    KRISTENSEN, BB
    ACTA INFORMATICA, 1976, 7 (01) : 61 - 73
  • [48] Lookahead LR parsing with regular right part grammars
    Univ of California, Santa Cruz, United States
    Int J Comput Math, 1-2 (1-15):
  • [49] Lookahead LR parsing with regular right part grammars
    Colby, JE
    Bermudez, ME
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 1997, 64 (1-2) : 1 - 15
  • [50] Parsing non-LR(k) grammars with yacc
    Merrill, Gary H.
    Software - Practice and Experience, 1993, 23 (08) : 829 - 850