计算机科学 > 程序设计语言
[提交于 2018年1月31日]
标题:Recognising and Generating Terms using Derivatives of Parsing Expression Grammars
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Alessandro Warth[v1] 2018年1月31日 星期三 15:28:30 UTC