Attribute Grammar-Based Language Extensions for Java

Attribute Grammar-Based Language Extensions for Java
复制标题

Java 的基于属性语法的语言扩展

DOI:
10.1007/978-3-540-73589-2_27
复制
发表时间:
2007
期刊:
J. Comput. Syst. Sci.
影响因子:
--
通讯作者:
August Schwerdfeger
August Schwerdfeger
中科院分区:
--
文献类型:
--
作者:
E. V. Wyk;Lijesh Krishnan;Derek Bodin;August Schwerdfeger

文献摘要

被引文献

相似文献

本文介绍了ableJ 可扩展语言框架,该工具允许人们通过将特定于领域的语言扩展导入到Java 1.4 的可扩展实现中来创建新的适应领域的语言。语言扩展可以定义新语言结构的语法、语义分析和优化。 Java 和语言扩展被指定为高阶属性语法。 我们描述了几种语言扩展及其在框架中的实现。例如,一种扩展将 SQL 数据库查询语言嵌入到 Java 中,并静态检查 SQL 查询中的语法和类型错误。该工具支持可组合语言扩展的模块化规范,以便程序员可以将他们想要的独特扩展集导入到 Java 中。当扩展遵循某些限制时,可以在不需要语言扩展的任何实现级知识的情况下组合它们。这些工具自动组成选定的扩展和 Java 主机语言规范。
This paper describes the ableJ extensible language framework, a tool that allows one to create new domain-adapted languages by importing domain-specific language extensions into an extensible implementation of Java 1.4. Language extensions may define the syntax, semantic analysis, and optimizations of new language constructs. Java and the language extensions are specified as higher-order attribute grammars. We describe several language extensions and their implementation in the framework. For example, one extension embeds the SQL database query language into Java and statically checks for syntax and type errors in SQL queries. The tool supports the modular specification of composable language extensions so that programmers can import into Java the unique set of extensions that they desire. When extensions follow certain restrictions, they can be composed without requiring any implementation-level knowledge of the language extensions. The tools automatically compose the selected extensions and the Java host language specification.