Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

philcrow (3401)

philcrow
  (email not shown publicly)

Journal of philcrow (3401)

Tuesday April 03, 2007
06:15 PM

Java to Perl Micro Grant

[ #32894 ]

I'm a very pleased to receive a Perl Foundation microgrant. For the grant, I'm writing a Java to Perl 6 API converter. This will create the potential for highly similar APIs in both languages.

I originally wrote a Java API parser for Java::Swing, where I used it to feed a code generator which built the Java-Perl glue for event listener callbacks. Now I will convert that from Perl 5 to Perl 6 and make it more general and user friendly.

Thanks to Tim Bunce for suggesting the idea and for encouraging me to apply for the grant. He has some plan to use the result to aid development of the Perl 6 DBI, but Perl's DBI is unlikely to emulate Java's JDBC.

I've already begun planning the code. My initial thought is that there will be three modules. The first will simply shell out to the Java deparser 'javap'. That tool comes with the standard Java dev kit. Users of my module would need to have the tool. In the future, shelling out might not be necessary when the Perl 6 (or Parrot) equivalent of Inline::Java is available. Then the first module could use Java classes from the 'Axis' Apache foundation project instead.

The second module would take the raw output of javap and parse it using a Perl 6 grammar. Learning about Perl 6 rules is my primary motivation for taking on this task.

Finally, using the parse tree from the second module, would be a third module (or set of modules) to emit Perl 6 code.

Tying the three modules together will be a command line script.

More later...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.