计算机科学 > 形式语言与自动机理论
[提交于 2025年12月1日]
标题:Tahr: The Generative Attribute Grammar Framework
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In this article, we present Tahr, a framework that allows taking attribute grammar specifications and generating a set of software artefacts that can be used programmatically to operate on text compliant with the grammars. Tahr can be used as an algorithmic workbench to test different manipulations of attribute grammars and support translation between different languages out of the box. We describe the framework's organisation, how the user can specify an attribute grammar, and the generated software artefacts. We also discuss how Tahr deals with ambiguous grammar specifications, and how this ambiguity can be effectively exploited when using attribute grammars for text generation. We test the correctness of Tahr by showing the practical possibility of translating MIPS programs into their corresponding equivalents for x86 architectures and a custom virtual machine.
提交历史
来自:Alessandro Pellegrini[v1] 2025年12月1日 星期一 16:53:46 UTC