Attribute Grammar-based Language Extensions for Java
Eric Van Wyk, Lijesh Krishnan, August C. Schwerdfeger, Derek Bodin · 2007
Abstract. This paper describes the Java Language Extender frame-work, a tool that allows one to create new domain-adapted languages by importing domain-specic language extensions into an extensible im-plementation of Java 1.4. Language extensions may dene the syntax, semantic analysis, and optimizations of new language constructs. Java and the language extensions are specied as higher-order attribute gram-mars. We describe several language extensions and their implementation in the framework. For example, one embeds the SQL database query lan-guage into Java and statically checks for syntax and type errors in SQL queries. The tool supports the modular specication of composable lan-guage extensions so that programmers can import into Java the unique set of extensions that they desire. When extensions follow certain restric-tions, 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 specication. 1