From Lisp S-Expressions to Java Source Code
Computer Science and Information Systems, Tome 5 (2008) no. 2
Cet article a éte moissonné depuis la source Computer Science and Information Systems website
The syntax of Lisp languages is based on S-expressions, an extremely simple form of structured data representation that is nevertheless fundamental to the development of Lisp syntactic extensions. By adopting a more conventional syntax, the Java language placed itself in a difficult position in regard to user-defined syntax extensions. In spite of the many efforts to provide mechanisms for such extensions, they continue to be more difficult to use than S-expression-based ones. In this paper, we will describe the use of the S-expression syntax in a Java code generation environment. By providing an S-expression based program representation for Java source code, we are able to reuse and extend Lisp macro-expansion techniques to significantly simplify the construction of Java programs.
Keywords:
S-expressions, Macros, Common Lisp, Java
@article{CSIS_2008_5_2_a3,
author = {Ant\'onio Menezes Leit\~ao},
title = {From {Lisp} {S-Expressions} to {Java} {Source} {Code}},
journal = {Computer Science and Information Systems},
year = {2008},
volume = {5},
number = {2},
url = {http://geodesic.mathdoc.fr/item/CSIS_2008_5_2_a3/}
}
António Menezes Leitão. From Lisp S-Expressions to Java Source Code. Computer Science and Information Systems, Tome 5 (2008) no. 2. http://geodesic.mathdoc.fr/item/CSIS_2008_5_2_a3/