...
首页> 外文期刊>Electronic Notes in Theoretical Computer Science >A Pure Object-Oriented Embedding of Attribute Grammars
【24h】

A Pure Object-Oriented Embedding of Attribute Grammars

机译:属性语法的纯面向对象嵌入

获取原文
           

摘要

Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes by need. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented programming language to implement a small, lightweight attribute grammar library. The Kiama attribution library has similar features to current generators, including cached, uncached, circular, higher-order and parameterised attributes, and implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its combination of object-oriented and functional features, support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations and mixins for composition. A performance analysis shows that our approach is practical for realistic language processing.
机译:属性语法是许多语言处理任务(尤其是编程语言的语义分析)的强大规范范式。最近的属性语法系统使用动态调度算法来按需评估属性。在本文中,我们展示了如何通过在现代的,面向对象的编程语言中嵌入动态方法来实现小型,轻量级的属性语法库,从而消除对生成器的需求。 Kiama归因库具有与当前生成器类似的功能,包括已缓存,未缓存,循环,高阶和参数化属性,并实现了用于属性方程的动态扩展和变化的新技术。我们使用Scala编程语言是因为它结合了面向对象和功能特性,对特定于域的表示法的支持以及对可伸缩性的强调。与具有专用标记法的生成器不同,Kiama属性语法使用标准的Scala标记法,例如用于方程式的模式匹配函数和用于合成的mixin。性能分析表明,我们的方法对于现实的语言处理非常实用。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号