当前位置: X-MOL 学术arXiv.cs.FL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
An Exploration of Left-Corner Transformations
arXiv - CS - Formal Languages and Automata Theory Pub Date : 2023-11-27 , DOI: arxiv-2311.16258
Andreas Opedal, Eleftheria Tsipidi, Tiago Pimentel, Ryan Cotterell, Tim Vieira

The left-corner transformation (Rosenkrantz and Lewis, 1970) is used to remove left recursion from context-free grammars, which is an important step towards making the grammar parsable top-down with simple techniques. This paper generalizes prior left-corner transformations to support semiring-weighted production rules and to provide finer-grained control over which left corners may be moved. Our generalized left-corner transformation (GLCT) arose from unifying the left-corner transformation and speculation transformation (Eisner and Blatz, 2007), originally for logic programming. Our new transformation and speculation define equivalent weighted languages. Yet, their derivation trees are structurally different in an important way: GLCT replaces left recursion with right recursion, and speculation does not. We also provide several technical results regarding the formal relationships between the outputs of GLCT, speculation, and the original grammar. Lastly, we empirically investigate the efficiency of GLCT for left-recursion elimination from grammars of nine languages.

中文翻译:

左角变换的探索

左角变换(Rosenkrantz and Lewis,1970)用于从上下文无关语法中删除左递归,这是使用简单技术使语法可自上而下解析的重要一步。本文概括了先前的左角变换以支持半环加权产生规则并提供对可以移动的左角的更细粒度的控制。我们的广义左角变换(GLCT)源于统一左角变换和推测变换(Eisner 和 Blatz,2007),最初用于逻辑编程。我们的新转换和推测定义了等效的加权语言。然而,它们的推导树在结构上有一个重要的不同:GLCT 用右递归代替了左递归,而推测则没有。我们还提供了一些关于 GLCT 输出、推测和原始语法之间的形式关系的技术结果。最后,我们实证研究了 GLCT 在九种语言语法中消除左递归的效率。
更新日期:2023-11-29
down
wechat
bug