j2d - translating Java to D with the language machine - progress
Peri Hankey
mpah at thegreen.co.uk
Sat Apr 1 06:38:03 PST 2006
Hello - just to let you all know that the j2d java-to-D-language
translator is now producing clean code (accepted by gdc syntax pass) for
all the bits of of gnu classpath that I have tried, and also for the
joeq_core part of the joeq jvm-in-java.
The difficult bit starts now: getting it to produce code that is
actually correct and works.
See http://languagemachine.sourceforge.net/j2d.html
=== results ===
j2d gdc1 gdc2 lines java
y y n 917 java/applet/
y y n 98944 java/awt/
y y n 11843 java/beans/
y y n 23187 java/io/
y y n 33871 java/lang/
y y n 2780 java/math/
y y n 15173 java/net/
y y n 13287 java/nio/
y y n 6233 java/rmi/
y y n 23482 java/security/
y y n 9250 java/sql/
y y n 11861 java/text/
y y n 56636 java/util/
j2d gdc1 gdc2 lines javax
y y n 4081 javax/accessibility/
y y n 7661 javax/crypto/
y y n 14485 javax/imageio/
y y n 138 javax/management/
y y n 8754 javax/naming/
y y n 4082 javax/net/
y y n 17942 javax/print/
y y n 1805 javax/rmi/
y y n 8148 javax/security/
y y n 8851 javax/sound/
y y n 1033 javax/sql/
y y n 205028 javax/swing/
y y n 1049 javax/transaction/
y y n 11274 javax/xml/
j2d gdc1 gdc2 lines gnu
y y n 12911 gnu/classpath/
y y n 42958 gnu/CORBA/
y y n 107506 gnu/java/
y y n 92887 gnu/javax/
y y n 5959 gnu/regexp/
y y n 542 gnu/test/
y y n 94523 gnu/xml/
j2d gdc1 gdc2 lines vm
y y n 7505 vm/reference/
j2d gdc1 gdc2 lines joeq
y y n 62 joeq/Allocator/
y y n 8083 joeq/Class/
y y n 385 joeq/ClassLib/
y y n 71684 joeq/Compiler/
y y n 1962 joeq/Interpreter/
y y n 3303 joeq/Main/
y y n 306 joeq/Memory/
y y n 2246 joeq/Runtime/
y y n 2440 joeq/Support/
y y n 578 joeq/UTF/
y y n 1096 joeq/Util/
NB 'y?' means that the status is subject to regression tests, or that
there are some errors which are understood. The actual code produced is
probably wrong in many places.
At present gdc compilation is failing mainly because:
* gdc complains that modules in the java.lang hierarchy are importing
themselves - the code generator needs to notice this
* gdc complains "invalid UTF character \U0000ffff" for "char MAX_VALUE =
'\uFFFF';" and similar (should be wchar or dchar?)
Of course there is there is still a great deal to do. The sources (about
700 rules, 1100 lines) are in SVN at dsource - it's easiest to start at
http://languagemachine.sourceforge.net/j2d.html
Suggestions, feedback, assistance all welcome as ever.
Peri
--
Peri Hankey mpah at thegreen.co.uk
http://languagemachine.sourceforge.net - The language machine
More information about the Digitalmars-d-announce
mailing list