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

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

计算机科学 > 程序设计语言

arXiv:1806.11150 (cs)
[提交于 2018年6月28日]

标题:Syntax Error Recovery in Parsing Expression Grammars

作者:Sérgio Medeiros, Fabio Mascarenhas
查看论文《Syntax Error Recovery in Parsing Expression Grammars》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Parsing Expression Grammars (PEGs) are a formalism used to describe top-down parsers with backtracking. As PEGs do not provide a good error recovery mechanism, PEG-based parsers usually do not recover from syntax errors in the input, or recover from syntax errors using ad-hoc, implementation-specific features. The lack of proper error recovery makes PEG parsers unsuitable for using with Integrated Development Environments (IDEs), which need to build syntactic trees even for incomplete, syntactically invalid programs. We propose a conservative extension, based on PEGs with labeled failures, that adds a syntax error recovery mechanism for PEGs. This extension associates recovery expressions to labels, where a label now not only reports a syntax error but also uses this recovery expression to reach a synchronization point in the input and resume parsing. We give an operational semantics of PEGs with this recovery mechanism, and use an implementation based on such semantics to build a robust parser for the Lua language. We evaluate the effectiveness of this parser, alone and in comparison with a Lua parser with automatic error recovery generated by ANTLR, a popular parser generator.
评论: Published on ACM Symposium On Applied Computing 2018
主题: 程序设计语言 (cs.PL); 形式语言与自动机理论 (cs.FL)
引用方式: arXiv:1806.11150 [cs.PL]
  (或者 arXiv:1806.11150v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.1806.11150
相关 DOI: https://doi.org/10.1145/3167132.3167261

提交历史

来自:Sérgio Medeiros
[v1] 2018年6月28日 星期四 19:20:06 UTC
全文链接:

访问论文:

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

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2018-06
切换浏览方式为:
cs
cs.FL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

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