java2python icon indicating copy to clipboard operation
java2python copied to clipboard

Any plans to make this run on Python 3

Open hasii2011 opened this issue 5 years ago • 3 comments

Inquiring minds would like to know? :-)

hasii2011 avatar Apr 14 '20 13:04 hasii2011

https://github.com/adsharma/java2python has antrl4+java9+python3.

I started with the grammar here:

https://github.com/antlr/grammars-v4/tree/master/java/java9

But switched to:

https://github.com/antlr/grammars-v4/tree/master/java/java

Much of it was running 2to3, downloading grammars and updating routine stuff. Now comes the hard part.

Java.g and JavaParser.g4 are not exactly the same. So j2py fails because of the differences. If anyone has made further progress on this, happy to collaborate.

adsharma avatar Aug 10 '21 17:08 adsharma

I found it easier to bootstrap a new project from scratch using antlr4-python3 and updated grammars. This one handles HelloWorld.java.

https://github.com/adsharma/decaf2many

adsharma avatar Aug 12 '21 02:08 adsharma

Xrefing #66 #71 and #76 for the people coming from search engines.

MatthewTingum avatar May 06 '22 00:05 MatthewTingum