...
【24h】

Declarative, formal, and extensible syntax definition for aspectJ

机译:AspectJ的声明性,正式和可扩展语法定义

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

Aspect-Oriented Programming (AOP) is attracting attention from both research and industry, as illustrated by the ever-growing popularity of AspectJ, the de facto standard AOP extension of Java. From a compiler construction perspective AspectJ is interesting as it is a typical example of compositional language, ie a language composed of a number of separate languages with different syntactical styles: in addition to plain Java, AspectJ includes a language for defining pointcuts and one for defining advices. Language composition represents a non-trivial challenge for conventional parsing techniques. First, combining several languages with different lexical syntax leads to considerable complexity in the lexical states to processed. Second, as new language features for AOP are being explored, many research proposals are concerned with further extending the AspectJ language, resulting in a need for an extensible syntax definition.This paper shows how scannerless parsing elegantly addresses the issues encountered by conventional techniques when parsing AspectJ . We present the design of a modular, extensible, and formal definition of the lexical and context-free aspects of the AspectJ syntax in the Syntax Definition Formalism SDF, which is implemented by a scannerless, generalized-LR parser (SGLR). We introduce grammar mixins as a novel application of SDF's modularity features, which allows the declarative definition of different keyword policies and combination of extensions. We illustrate the modular extensibility of our definition with syntax extensions taken from current research on aspect languages. Finally, benchmarks show the reasonable performance of scannerless generalized-LR parsing for this grammar.
机译:面向方面的编程(AOP)吸引了研究和工业界的关注,正如AspectJ(Java的事实上的标准AOP扩展)的日益普及所说明的那样。从编译器构造的角度来看,AspectJ很有趣,因为它是组合语言的典型示例,即由多种具有不同句法样式的独立语言组成的语言:除纯Java之外,AspectJ还包括一种用于定义切入点的语言和一种用于定义切入点的语言。建议。语言组成代表了传统解析技术的一项重要挑战。首先,将几种具有不同词法语法的语言组合在一起会导致要处理的词法状态相当复杂。其次,随着AOP的新语言功能的探索,许多研究建议都涉及到进一步扩展AspectJ语言,从而需要可扩展的语法定义。本文说明了无扫描器解析如何优雅地解决了传统技术在解析时遇到的问题。 AspectJ。我们介绍了语法定义形式主义SDF中AspectJ语法的词汇和上下文无关方面的模块化,可扩展和形式化定义,该设计由无扫描程序的广义LR解析器(SGLR)实现。我们介绍语法混合作为SDF模块化功能的一种新颖应用,它允许声明性定义不同的关键字策略和扩展的组合。我们使用从方面语言的最新研究中获取的语法扩展来说明我们定义的模块可扩展性。最后,基准测试显示了该语法的无扫描器广义LR解析的合理性能。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号