...
首页> 外文期刊>Computer Science and Information Systems >LL conflict resolution using the embedded left LR parser
【24h】

LL conflict resolution using the embedded left LR parser

机译:使用嵌入式左LR解析器的LL冲突解决

获取原文
           

摘要

A method for resolving LL(k) conflicts using small LR(k) parsers (called embedded left LR(k) parsers) is described. An embedded left LR(k) parser is capable of (a) producing the prefix of the left parse of the input string and (b) stopping not on the end-of-file marker but on any string from the set of lookahead strings fixed at the parser generation time. The conditions regarding the termination of the embedded left LR(k) parser if used within LL(k) (and similar) parsers are defined and examined in-depth. It is proved that an LL(k) parser augmented with a set of embedded left LR(k) parsers can parse any deterministic context-free grammar in the same asymptotic time as LR(k) parser. As the embedded left LR(k) parser produces the prefix of the left parse, the LL(k) parser augmented with embedded left LR(k) parsers still produces the left parse and the compiler writer does not need to bother with different parsing strategies during the compiler implementation.
机译:描述了一种使用小型LR(k)解析器(称为嵌入式左LR(k)解析器)解决LL(k)冲突的方法。嵌入式左LR(k)解析器能够(a)生成输入字符串左解析的前缀,并且(b)不仅在文件结尾标记上停止,而且在固定的先行字符串集中的任何字符串上停止在解析器生成时。如果在LL(k)(和类似的)解析器中使用嵌入的左LR(k)解析器,则有关终止条件的定义和深入检查。证明了用一组嵌入式左LR(k)解析器增强的LL(k)解析器可以在与LR(k)解析器相同的渐近时间内解析任何确定性的上下文无关文法。由于嵌入式左LR(k)解析器会生成左解析的前缀,因此使用嵌入式左LR(k)解析器进行增强的LL(k)解析器仍会生成左解析,并且编译器编写程序无需为使用其他解析策略而烦恼在编译器实施期间。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号