在线解析器的默认消歧
Default Disambiguation for Online Parsers
摘要:
由于组合语法通常是二义性的,语法组合需要一种处理二义性的机制:要么通过使用分隔符(这很难处理)来排除二义性,要么通过使用消歧运算符将解析森林过滤到单个解析树(通常,我们不能确保我们已经覆盖了所有可能的解析森林)。在本文中,我们表明,默认的消歧,这是不适当的批处理解析,以及在线解析,如果需要的话,它可以被用户覆盖。我们扩展语言框-基于定界符的算法之上增量解析-在这样一种方式,默认消歧可以自动插入,删除,或调整大小,语言框,导致自动语言框算法。问题的本质意味着默认消歧并不总是符合用户的意图。然而,我们的实验评估表明,自动语言框的行为可以接受的98.8%的测试,涉及现实世界的程序设计语言的组合物。
英文摘要:
Since composed grammars are often ambiguous, grammar composition requires a mechanism for dealing with ambiguity: either ruling it out by using delimiters (which are awkward to work with), or by using disambiguation operators to filter a parse forest down to a single parse tree (where, in general, we cannot be sure that we have covered all possible parse forests). In this paper, we show that default disambiguation, which is inappropriate for batch parsing, works well for online parsing, where it can be overridden by the user if necessary. We extend language boxes -- a delimiter-based algorithm atop incremental parsing -- in such a way that default disambiguation can automatically insert, remove, or resize, language boxes, leading to the automatic language boxes algorithm. The nature of the problem means that default disambiguation cannot always match a user's intention. However, our experimental evaluation shows that automatic language boxes behave acceptably in 98.8% of tests involving compositions of real-world programming languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。