Giter Site home page Giter Site logo

javapyler's Introduction

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.

javapyler's People

Contributors

keesbos avatar rwl avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

justuni

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.