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

解析表达式文法的派生

Derivatives of Parsing Expression Grammars

Aaron Moss

摘要:

本文介绍了一种新的派生句法分析算法,用于句法分析表达式语法的识别。导数解析示出有一个多项式的最坏情况下的时间界,一个改进的递归下降算法的指数界。这项工作还介绍了渐近分析的基础上,一个恒定的约束上的语法嵌套深度和回溯选择的数量输入;导数和递归下降解析运行在线性时间和恒定的空间,这类有用的输入,理论界和合理性的输入类经验验证。派生解析的这种常见情况下的常量内存使用是对packrat算法所需线性空间的改进。

英文摘要:

This paper introduces a new derivative parsing algorithm for recognition of parsing expression grammars. Derivative parsing is shown to have a polynomial worst-case time bound, an improvement on the exponential bound of the recursive descent algorithm. This work also introduces asymptotic analysis based on inputs with a constant bound on both grammar nesting depth and number of backtracking choices; derivative and recursive descent parsing are shown to run in linear time and constant space on this useful class of inputs, with both the theoretical bounds and the reasonability of the input class validated empirically. This common-case constant memory usage of derivative parsing is an improvement on the linear space required by the packrat algorithm.

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

↑