...
【24h】

A Verified LL(1) Parser Generator

机译:经过验证的LL(1)解析器生成器

获取原文

摘要

An LL(1) parser is a recursive descent algorithm that uses a single token of lookahead to build a grammatical derivation for an input sequence. We present an LL(1) parser generator that, when applied to grammar G, produces an LL(1) parser for G if such a parser exists. We use the Coq Proof Assistant to verify that the generator and the parsers that it produces are sound and complete, and that they terminate on all inputs without using fuel parameters. As a case study, we extract the tool's source code and use it to generate a JSON parser. The generated parser runs in linear time; it is two to four times slower than an unverified parser for the same grammar.
机译:LL(1)解析器是一种递归下降算法,它使用超前的单个记号为输入序列构建语法推导。我们提供了一个LL(1)解析器生成器,当将其应用于语法G时,如果存在这样的解析器,则会为G生成一个LL(1)解析器。我们使用Coq Proof Assistant来验证生成器及其生成的解析器是否健全且完整,并且它们在不使用燃料参数的情况下终止于所有输入。作为案例研究,我们提取工具的源代码并使用它来生成JSON解析器。生成的解析器以线性时间运行;对于相同的语法,它比未经验证的解析器慢两到四倍。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号