首页> 外文会议>ACM SIGPLAN-SIGACT symposium on Principles of programming languages >Recognizing substrings of LR(k) languages in linear time
【24h】

Recognizing substrings of LR(k) languages in linear time

机译:在线性时间内识别LR(k)语言的子字符串

获取原文

摘要

LR parsing techniques have long been studied as efficient and powerful methods for processing context free languages. A linear time algorithm for recognizing languages representable by LR(k) grammars has long been known. Recognizing substrings of a context-free language is at least as hard as recognizing full strings of the language, as the latter problem easily reduces to the former. In this paper we present a linear time algorithm for recognizing substrings of LR(k) languages, thus showing that the substring recognition problem for these languages is no harder than the full string recognition problem. An interesting data structure, the Forest Structured Stack, allows the algorithm to track all possible parses of a substring without loosing the efficiency of the original LR parser. We present the algorithm, prove its correctness, analyze its complexity, and mention several applications that have been constructed.

机译:长期以来,

LR解析技术已经作为处理上下文无关语言的有效而强大的方法进行了研究。长期以来,用于识别可由LR( k )语法表示的语言的线性时间算法已广为人知。识别上下文无关语言的子字符串至少与识别该语言的完整字符串一样困难,因为后者的问题很容易减少到前者。在本文中,我们提出了一种线性时间算法来识别LR( k )语言的子字符串,从而表明这些语言的子字符串识别问题并不比全字符串识别问题难。森林结构堆栈是一种有趣的数据结构,它允许算法跟踪子字符串的所有可能的解析,而不会降低原始LR解析器的效率。我们介绍了该算法,证明了它的正确性,分析了它的复杂性,并提到了已构建的几个应用程序。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号