%TOC% ---++ Features [[JavaFront][Java-front]] is a package you can use to generate or transform Java code. It contains a handcrafted SDF grammar for [[Transform.JavaLanguage][Java]], [[Stratego signatures]] generated from this grammar and a handcrafted [[pretty printer]]. Some of the unique features of Java-front are: * Modular and extensible syntax definition for Java * Full support for the new language features introduced in Java 5.0 * Heavily tested pretty-printer, which inserts parentheses where necessary! * Option to preserve comments * Conversion of abstract syntax tree to XML possible ---+++ Available Versions of Java Java-front supports Java 5.0. The syntax definition closely follows the structure of the [[http://java.sun.com/docs/books/jls/][Java Language Specifcation, Third Edition]] (JLS3). All new features (generics, wildcards, varargs, static import, enums, foreach loop, annotations) are supported. This syntax definition is called =Java-15=. ---+++ Quality and Compliance The Java grammar in Java-front is able to parse and pretty-print all the Java sources in the GNU Classpath (over 2200 classes) and the Java 2 SDK version 1.5.0 of Sun Microsystems (over 6500 classes). The results of the pretty-printer are verified. A note on compliance: SDF assumes an ASCII world. This means that only ASCII input characters are supported. Fortunately, most sources do not use unescaped characters outside the ASCII range, so this is not a big problem in practice. ---++ Documentation * Manual: [[%MANUAL%/java-front.html][Getting Started with java-front]] * [[%DOCSSYNTAX%/java-front/stable/docs/html/languages/java-15/Main.sdf.html][Browse]] the syntax definition of Java online. * [[%DOCSSYNTAX%/java-front/stable/docs/html/languages/java/EmbeddedJava.sdf.html][Embedding of Java in Stratego]] ---+++ Publications Java-front has been used for the following research publications: * Lennart C. L. Kats, Martin Bravenboer, and Eelco Visser. _Mixing Source and Bytecode. A Case for Compilation by Normalization._ In Proceedings of the 23st ACM SIGPLAN _Conference on Object-Oriented Programming, Systems, Languages, and Applications ([[http://www.oopsla.org/2008/][OOPSLA 2008]])_, Nashville, Tennessee, USA, October 2008. ([[http://www.lclnet.nl/publications/TUD-SERG-2008-030.pdf][pdf]]) * Martin Bravenboer, Éric Tanter, and Eelco Visser. _Declarative, Formal, and Extensible Syntax Definition for AspectJ - A Case for Scannerless Generalized-LR Parsing_. In Proceedings of the 21st ACM SIGPLAN _Conference on Object-Oriented Programming, Systems, Languages, and Applications ([[http://www.oopsla.org/2006/][OOPSLA 2006]])_, Portland, USA, October 2006. (pdf) * Eric Tanter. _An Extensible Kernel Language for AOP_. In Proceedings of the AOSD Workshop on Open and Dynamic Aspect Languages (ODAL 2006). March 2006, Bonn, Germany. * Mina Askari and Raihan Al-Ekram. _Bringing Smalltalk Blocks to Java Through Transformation Techniques_. 2005 IBIMA Conference on Theory and Practice of Software Engineering for the 21st Century (TPSE 2005). Cairo, Egypt. December 13 - 15, 2005 ([[http://swag.uwaterloo.ca/~rekram/publications/tpse2005--bringing-smalltalk-blocks-to-java-through-transformation.pdf][pdf]]) * Martin Bravenboer, Rob Vermaas, Jurgen Vinju and Eelco Visser. _Generalized Type-Based Disambiguation of Meta Programs with Concrete Object Syntax_. In _Proceedings of the Fourth International Conference on Generative Programming and Component Engineering ([[http://www.program-transformation.org/Gpce05/][GPCE 2005]])_, Tallinn, Estonia, September 2005. (pdf, presentation) * Anya Helene Bagge, Martin Bravenboer, Karl Trygve Kalleberg, Koen Muilwijk, and Eelco Visser. _Adaptive Code Reuse by Aspects, Cloning and Renaming_. Technical Report UU-CS-2005-031, Department of Information and Computing Sciences, Universiteit Utrecht, Utrecht, The Netherlands, August 2005. (pdf) * Martin Bravenboer, Rene de Groot, and Eelco Visser. _MetaBorg in Action: Examples of Domain-specific Language Embedding and Assimilation using Stratego/XT_. In _Proceedings of the Summer School on Generative and Transformational Techniques in Software Engineering ([[http://www.di.uminho.pt/GTTSE2005][GTTSE 2005]])_, Braga, Portugal, July, 2005. (draft: pdf) * Martin Bravenboer and Eelco Visser. _Concrete Syntax for Objects. Domain-Specific Language Embedding and Assimilation without Restrictions_. In Douglas C.Schmidt (ed.) _Proceedings of the 19th ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications ([[http://www.oopsla.org][OOPSLA'04]])._ Vancouver, Canada. October 2004. (pdf) ---++ Download ---+++ Stable Releases The current release is: * [[JavaFrontRelease09][java-front-0.9]] Older releases: * [[JavaFrontRelease08][java-front-0.8]] * [[JavaFrontRelease07][java-front-0.7]] * [[JavaFrontRelease06][java-front-0.6]] * [[JavaFrontRelease05][java-front-0.5]] ---+++ Latest Developments Distributions (tarball, rpm, srpm) of the head revision are created continuously: * http://hydra.nixos.org/jobset/strategoxt-java/java-front-trunk The distributions contain the latest of the latest developments, but if you really want to, the latest sources can be checked out using:
  svn checkout %SVNSTRATEGOXT%/java-front/trunk
Before you can configure the package as described above you have to run the =./bootstrap= script. ---+++ Installation Install the package with the usual sequence of commands: $ ./configure $ make $ make install You might need to set your =PKG_CONFIG_PATH= if you did not install the dependencies in a standard location. Configure will tell you to do this if it cannot find aterm, sdf or strategoxt. ---++ Project Info ---+++ Issue Tracking We use JIRA to keep track of issues. Please report any issues that you encounter! * %ISSUE%/project/JavaFront ---+++ Contact and Mailing List Please send questions to the [[https://mailman.st.ewi.tudelft.nl/listinfo/users][users@strategoxt.org mailing list]]. Also, the Java-front developers are usually available on IRC at [[irc://irc.freenode.net/stratego][irc.freenode.net/stratego]]. Feel free to drop by! ---+++ Source Repository The sources of Java-front are available from Subversion. * %SVNROOT%/StrategoXT/java-front/trunk ---+++ Team Contributors: * [[http://martin.bravenboer.name][Martin Bravenboer]] (lead developer) * [[Main.RobVermaas][Rob Vermaas]] * [[Main.ReneDeGroot][Rene de Groot]] * [[http://www.cs.uu.nl/people/eelco/][Eelco Dolstra]] Feedback and bug reports: * [[Main.EelcoVisser][Eelco Visser]] * Jurgen Vinju * Mikal Ziane * Pankaj Risbood * [[http://www.lrde.epita.fr/cgi-bin/twiki/view/Main/ValentinDavid][Valentin David]] * [[http://arthur.van-dam.net/twiki][Arthur van Dam]] Sponsors: * [[http://www.cs.uu.nl][Department of Information and Computing Sciences, University of Utrecht]] * [[http://www.jacquard.nl/][NWO Jacquard]] project [[http://www.cs.uu.nl/wiki/Trace/WebHome][TraCE]] ---+++ License Java-front is LGPL (GNU Lesser General Public License) software. ---++ Related Software * [[JavaBorg][Java-borg]], which is based on Java-front, illustrates how to implement Java extensions. * [[TheDryad][Dryad]] is a set of Java compiler components. The application of these components is not restricted to compilers: Java program transformations profit from the disambiguation and semantics analysis components in Dryad. Dryad is based on Java-front. * [[AspectJFront][AspectJ-front]] provides a syntax definition and parser for AspectJ. AspectJ-front is based on Java-front. * [[JimpleFront][Jimple-front]] provides support for the [[http://www.sable.mcgill.ca/soot/][Jimple]] 3-address representation of Java bytecode, which is a useful representation for program analysis and transformation. * STRJ compiles [[Stratego Language][Stratego]] to Java.