跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 数据结构与算法

arXiv:cs/0603077 (cs)
[提交于 2006年3月18日]

标题:Packrat Parsing: Simple, Powerful, Lazy, Linear Time

作者:Bryan Ford
查看论文《Packrat Parsing: Simple, Powerful, Lazy, Linear Time》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Packrat parsing is a novel technique for implementing parsers in a lazy functional programming language. A packrat parser provides the power and flexibility of top-down parsing with backtracking and unlimited lookahead, but nevertheless guarantees linear parse time. Any language defined by an LL(k) or LR(k) grammar can be recognized by a packrat parser, in addition to many languages that conventional linear-time algorithms do not support. This additional power simplifies the handling of common syntactic idioms such as the widespread but troublesome longest-match rule, enables the use of sophisticated disambiguation strategies such as syntactic and semantic predicates, provides better grammar composition properties, and allows lexical analysis to be integrated seamlessly into parsing. Yet despite its power, packrat parsing shares the same simplicity and elegance as recursive descent parsing; in fact converting a backtracking recursive descent parser into a linear-time packrat parser often involves only a fairly straightforward structural change. This paper describes packrat parsing informally with emphasis on its use in practical applications, and explores its advantages and disadvantages with respect to the more conventional alternatives.
评论: 12 pages, 5 figures
主题: 数据结构与算法 (cs.DS); 计算复杂性 (cs.CC); 程序设计语言 (cs.PL)
引用方式: arXiv:cs/0603077 [cs.DS]
  (或者 arXiv:cs/0603077v1 [cs.DS] 对于此版本)
  https://doi.org/10.48550/arXiv.cs/0603077
期刊参考: International Conference on Functional Programming (ICFP '02), October 2002, Pittsburgh, PA

提交历史

来自:Bryan Ford
[v1] 2006年3月18日 星期六 17:49:45 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.DS
< 上一篇   |   下一篇 >
最新 | 近期 | 2006-03
切换浏览方式为:
cs
cs.CC
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站