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

最优LL(k)句法分析的LL(有限)策略

The LL(finite) strategy for optimal LL(k) parsing

Peter Belcak

摘要:

本文提出了一种LL(有限)分析策略,用于分析k不需要已知的LL(k)文法。该策略在线性时间内解析输入,使用任意但总是最小的前瞻性必要的非终端的替代品之间消除歧义,它是最佳的前瞻性终端扫描的数量进行。算法的修改,允许通过优先级的语法歧义的决议-有效地解释为一个解析表达式语法的输入-以及使用的谓词,和概念的证明,开源解析器生成器Astir,采用LL(有限)的策略,它产生的输出。

英文摘要:

The LL(finite) parsing strategy for parsing of LL(k) grammars where k needs not to be known is presented. The strategy parses input in linear time, uses arbitrary but always minimal lookahead necessary to disambiguate between alternatives of nonterminals, and it is optimal in the number of lookahead terminal scans performed. Modifications to the algorithm are shown that allow for resolution of grammar ambiguities by precedence -- effectively interpreting the input as a parsing expression grammar -- as well as for the use of predicates, and a proof of concept, the open-source parser generator Astir, employs the LL(finite) strategy in the output it generates.

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

↑