首页> 外文OA文献 >LLLR Parsing: a Combination of LL and LR Parsing
【2h】

LLLR Parsing: a Combination of LL and LR Parsing

机译:LLLR解析:LL和LR解析的组合

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

A new parsing method called LLLR parsing is defined and a method for producing LLLR parsers is described. An LLLR parser uses an LL parser as its backbone and parses as much of its input string using LL parsing as possible. To resolve LL conflicts it triggers small embedded LR parsers. An embedded LR parser starts parsing the remaining input and once the LL conflict is resolved, the LR parser produces the left parse of the substring it has just parsed and passes the control back to the backbone LL parser. The LLLR(k) parser can be constructed for any LR(k) grammar. It produces the left parse of the input string without any backtracking and, if used for a syntax-directed translation, it evaluates semantic actions using the top-down strategy just like the canonical LL(k) parser. An LLLR(k) parser is appropriate for grammars where the LL(k) conflicting nonterminals either appear relatively close to the bottom of the derivation trees or produce short substrings. In such cases an LLLR parser can perform a significantly better error recovery than an LR parser since the most part of the input string is parsed with the backbone LL parser. LLLR parsing is similar to LL(^*) parsing except that it (a) uses LR(k) parsers instead of finite automata to resolve the LL(k) conflicts and (b) does not perform any backtracking.
机译:定义了一种称为LLLR解析的新解析方法,并描述了一种用于生成LLLR解析器的方法。 LLLR解析器将LL解析器用作其主干,并使用LL解析来尽可能多地解析其输入字符串。为了解决LL冲突,它会触发小型嵌入式LR解析器。嵌入式LR解析器开始解析剩余的输入,一旦LL冲突解决,LR解析器将生成刚解析的子字符串的左解析,并将控制权传递回主干LL解析器。可以为任何LR(k)语法构造LLLR(k)解析器。它产生输入字符串的左侧解析而没有任何回溯,并且,如果用于语法指导的翻译,它会使用自上而下的策略来评估语义动作,就像规范的LL(k)解析器一样。 LLLR(k)解析器适用于语法,其中LL(k)冲突的非终结符看起来相对靠近派生树的底部或产生较短的子字符串。在这种情况下,LLLR解析器可以比LR解析器执行明显更好的错误恢复,因为大部分输入字符串都是使用主干LL解析器进行解析的。 LLLR解析类似于LL(^ *)解析,不同之处在于它(a)使用LR(k)解析器而不是有限自动机来解决LL(k)冲突,并且(b)不执行任何回溯。

著录项

  • 作者

    Slivnik Boštjan;

  • 作者单位
  • 年度 2016
  • 总页数
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号