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 条
  • [1] Generalized LR Parsing Algorithm for Grammars with One-Sided Contexts
    Barash, Mikhail
    Okhotin, Alexander
    THEORY OF COMPUTING SYSTEMS, 2017, 61 (02) : 581 - 605
  • [2] Generalized LR parsing algorithm for boolean grammars
    Okhotin, Alexander
    INTERNATIONAL JOURNAL OF FOUNDATIONS OF COMPUTER SCIENCE, 2006, 17 (03) : 629 - 664
  • [3] Generalized one-sided forbidding grammars
    Meduna, Alexander
    Zemek, Petr
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 2013, 90 (02) : 172 - 182
  • [4] Linear Grammars with One-Sided Contexts and Their Automaton Representation
    Barash, Mikhail
    Okhotin, Alexander
    LATIN 2014: THEORETICAL INFORMATICS, 2014, 8392 : 190 - 201
  • [5] Improved normal form for grammars with one-sided contexts
    Okhotin, Alexander
    THEORETICAL COMPUTER SCIENCE, 2015, 588 : 52 - 72
  • [6] LINEAR GRAMMARS WITH ONE-SIDED CONTEXTS AND THEIR AUTOMATON REPRESENTATION
    Barash, Mikhail
    Okhotin, Alexander
    RAIRO-THEORETICAL INFORMATICS AND APPLICATIONS, 2015, 49 (02): : 153 - 178
  • [7] Attribute reduction in generalized one-sided formal contexts
    Shao, Ming-Wen
    Li, Ke-Wen
    INFORMATION SCIENCES, 2017, 378 : 317 - 327
  • [8] One-sided forbidding grammars and selective substitution grammars
    Meduna, Alexander
    Zemek, Petr
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 2012, 89 (05) : 586 - 596
  • [9] One-sided random context grammars
    Meduna, Alexander
    Zemek, Petr
    ACTA INFORMATICA, 2011, 48 (03) : 149 - 163
  • [10] One-sided random context grammars
    Alexander Meduna
    Petr Zemek
    Acta Informatica, 2011, 48 : 149 - 163