paperbot · PL 论文追踪

RSS

Staged selective parser combinators

ICFP 4(ICFP)2020引用 20
Jamie Willis, Nicolas Wu, Matthew Pickering

尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。

原文摘要(Abstract)

Parser combinators are a middle ground between the fine control of hand-rolled parsers and the high-level almost grammar-like appearance of parsers created via parser generators. They also promote a cleaner, compositional design for parsers. Historically, however, they cannot match the performance of their counterparts. This paper describes how to compile parser combinators into parsers of hand-written quality. This is done by leveraging the static information present in the grammar by representing it as a tree. However, in order to exploit this information, it will be necessary to drop support for monadic computation since this generates dynamic structure. Selective functors can help recover lost functionality in the absence of monads, and the parser tree can be partially evaluated with staging. This is implemented in a library called Parsley.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{WillisWP20,
  title = {Staged selective parser combinators},
  author = {Jamie Willis and Nicolas Wu and Matthew Pickering},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {ICFP},
  year = {2020},
  doi = {10.1145/3409002}
}