arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1801.10490cs.PL
收藏

利用解析表达式文法的导数识别和生成术语

Recognising and Generating Terms using Derivatives of Parsing Expression Grammars

Tony Garnock-Jones, Mahdi Eslamimehr, Alessandro Warth

摘要:

基于语法的句子生成已被彻底探索上下文无关文法(CFG),但仍然没有解决基于语法的方法,如解析表达式语法(PEG)。由于缺乏工具支持,使用PEG的语言设计者很难预测其解析器的行为。在本文中,我们扩展了衍生物的想法,最初制定的正则表达式,PEG。然后,我们提出了一种新的技术,句子生成的基础上衍生物,适用于任何语法形式主义的衍生物可以被定义-现在包括PEG。最后,我们建议将衍生物更普遍地应用于语言设计者和实现者面临的其他问题。

英文摘要:

Grammar-based sentence generation has been thoroughly explored for Context-Free Grammars (CFGs), but remains unsolved for recognition-based approaches such as Parsing Expression Grammars (PEGs). Lacking tool support, language designers using PEGs have difficulty predicting the behaviour of their parsers. In this paper, we extend the idea of derivatives, originally formulated for regular expressions, to PEGs. We then present a novel technique for sentence generation based on derivatives, applicable to any grammatical formalism for which the derivative can be defined--now including PEGs. Finally, we propose applying derivatives more generally to other problems facing language designers and implementers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑