From Lisp S-expressions to Java source code

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. .

[1]  Jonathan Rees,et al.  Syntactic closures , 1988, LISP and Functional Programming.

[2]  Kent M. Pitman,et al.  Special forms in Lisp , 1980, LISP Conference.

[3]  Andreas Paepcke Object-oriented programming: the CLOS perspective , 1993 .

[4]  Paul Graham On LISP: Advanced Techniques for Common LISP , 1993 .

[5]  Yannis Smaragdakis,et al.  JTS: tools for implementing domain-specific languages , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[6]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[7]  António Menezes Leitão Migration of Common Lisp Programs to the Java Platform -The Linj Approach , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[8]  Henry G. Baker,et al.  Critique of DIN Kernel Lisp definition version 1.2 , 1992, LISP Symb. Comput..

[9]  Joseph L. Zachary,et al.  Reflections on Metaprogramming , 1995, IEEE Trans. Software Eng..

[10]  Daniel Weise,et al.  Programmable syntax macros , 1993, PLDI '93.

[11]  Alan Bawden,et al.  Quasiquotation in Lisp , 1999, PEPM.

[12]  António Menezes Leitão The next 700 programming libraries , 2007, ILC.

[13]  David A. McAllester,et al.  Nondeterministic Lisp as a Substrate for Constraint Logic Programming , 1993, AAAI.

[14]  Jonathan Amsterdam The Iterate Manual , 1990 .

[15]  Shigeru Chiba,et al.  OpenJava: A Class-Based Macro System for Java , 1999, Reflection and Software Engineering.

[16]  Jonathan Rees,et al.  Macros that work , 1991, POPL '91.

[17]  G. L. Steele Common Lisp , 1990 .

[18]  William Maddox Semantically-Sensitive Macroprocessing , 1989 .

[19]  Timothy P. Hart,et al.  MACRO Definitions for LISP , 1963 .