...
首页> 外文期刊>Computer Science and Information Systems >Solving Difficult LR Parsing Conflicts by Postponing Them
【24h】

Solving Difficult LR Parsing Conflicts by Postponing Them

机译:通过推迟解决困难的LR分析冲突

获取原文

摘要

Though yacc-like LR parser generators provide ways to solve shift-reduce conflicts using token precedences, no mechanisms are provided for the resolution of difficult shift-reduce or reduce-reduce conflicts. To solve this kind of conflicts the language designer has to modify the grammar. All the solutions for dealing with these difficult conflicts branch at each alternative, leading to the exploration of the whole search tree. These strategies differ in the way the tree is explored: GLR, Backtracking LR, Backtracking LR with priorities, etc. This paper explores an entirely different path: to extend the yacc conflict resolution sublanguage with new constructs allowing the programmers to explicit the way the conflict must be solved. These extensions supply ways to resolve any kind of conflicts, including those that can not be solved using static precedences. The method makes also feasible the parsing of grammars whose ambiguity must be solved in terms of the semantic context. Besides, it brings to LR-parsing a common LL-parsing feature: the advantage of providing full control over the specific trees the user wants to build.
机译:尽管类似yacc的LR解析器生成器提供了使用令牌优先级解决移位减少冲突的方法,但没有提供机制来解决困难的移位减少或减少冲突。为了解决这种冲突,语言设计者必须修改语法。处理这些困难冲突的所有解决方案在每个替代方案上都有分支,从而可以探索整个搜索树。这些策略在树的探索方式上有所不同:GLR,Backtracking LR,Backtracking LR具有优先级等。本文探索了一条完全不同的路径:使用新的结构扩展yacc冲突解决子语言,从而使程序员可以明确冲突的方式必须解决。这些扩展提供了解决任何类型冲突的方法,包括那些无法使用静态优先级解决的冲突。该方法还使语法的解析变得可行,该语法的歧义必须根据语义上下文来解决。此外,它为LR解析带来了通用的LL解析功能:对用户想要构建的特定树提供完全控制的优势。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号