Menu

Tree [b500fe] master /
 History

HTTPS access


File Date Author Commit
 src 2011-09-27 Kees Bos Kees Bos [b500fe] Use 'is'/'is not' in comparison in stead of
 .gitignore 2011-03-28 Kees Bos Kees Bos [9fa022] Initial code
 README 2011-08-16 Kees Bos Kees Bos [4e4b94] Updated gwtconfig and README
 bootstrap.py 2011-05-13 Kees Bos Kees Bos [c189e9] Added example environment settings for bin/java...

Read Me

This project is in alpha state and needs lots of testing.
The majority of gwt code can be parsed and converted to python code.


Install
=======

Download antlr-3.3-complete.jar from http://www.antlr.org/
	http://www.antlr.org/download/antlr-3.3-complete.jar

Put it in src/javaparser/

Install jython:
sudo apt-get install jython

and run bootstrap.py

# Copy and paste:
# wget http://www.antlr.org/download/antlr-3.3-complete.jar
# mv antlr-3.3-complete.jar src/javaparser/
# apt-get install jython
# python bootstrap.py



Now you should have a bin/javapyler and a bin/gwtpyler

See src/gwtpyler.cfg for an example config file

There's a javaparser.jar in the repo, bit if you want to generate
it yourself:
cd src/javaparser
./build-java.sh


Example usage for gwtpyler:
Edit (a copy of) gwtpyler.cfg and put the correct values
for src and output in the [DEFAULT] section.

Then:
bin/gwtpyler --config gwtpyler.cfg


The contents of src/java/__init__.py should go to the __pyjamas__.py (for d
esktop) and to the translator __pyjamas__ for pyjs. In the latter case some 
additional fixes are needed for POST/PRE INC/DEC. However, most ++/-- are 
converted to straight AugAssign asts (eg. foo += 1).


Example usage
=============

What I've done is:

$ cd javapyler
$ mkdir gwt
$ cp ../src/gwtpyler.cfg .
$ ln -s <source path>/gwt/user/src/com .
$ mkdir out
$ ../bin/gwtpyler

Another location to do this is probably neater

For some other java project, you could do somethin similar, but invoke
the ../bin/javapyler in stead of ../bin/gwtpyler.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.