Write TRUE or FALSE in a NetRexx way Update DumpVisitor.java public void visit(BooleanLiteralExpr n, Object arg) { if (n.getValue()) { printer.print("1"); } else { printer.print("0"); } } Update java2nrx.java System.out.println("java2nrx, the translator translator, version 1.0.3"); Update build.xml <attribute name="Implementation-Version" value="1.0.3" /> Added Note: When I use, I always place java2nrx.sh and the Jar file in my NetRexx/bin so it's always available to me. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
*Maybe* NetRexx vs. 4.0 could support *TRUE* and *FALSE* as Synonyms
to
boolean 1 *and* boolean 0 *the other way around* ? Thomas Schneider. ====================================================================== Am 02.03.2016 um 21:16 schrieb Jason
Martin:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Jason Martin
Also change throw to signal, public void visit(ThrowStmt n, Object arg) { printer.print("signal "); n.getExpr().accept(this, arg); // printer.print(";"); } On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
Needs Bug Fix for method declarations with duplicate modifiers Example from Android: From file sdk/sources/android-16/junit/runner/TestSuiteLoader.java: On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
In my local copy, I also added: private String literal_to_chop; public void visit(DoubleLiteralExpr n, Object arg) { literal_to_chop = (n.getValue()).toString(); if ((literal_to_chop.substring(literal_to_chop.length() - 1)).equals("d")) { printer.print(literal_to_chop.substring(0, literal_to_chop.length()-1)); } else if ((literal_to_chop.substring(literal_to_chop.length() - 1)).equals("f")) { printer.print(literal_to_chop.substring(0, literal_to_chop.length()-1)); } else { printer.print(n.getValue()); } literal_to_chop = ""; } public void visit(LongLiteralExpr n, Object arg) { literal_to_chop = (n.getValue()).toString(); if ((literal_to_chop.substring(literal_to_chop.length() - 1)).equals("L")) { printer.print(literal_to_chop.substring(0, literal_to_chop.length()-1)); } else { printer.print(n.getValue()); } literal_to_chop = ""; } On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
Change all "end to <quote><space>end in DumpVisitor.java No end with be joined to previous token Not pretty printed but NetRexx Compiler will parse On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Jason,
can you point to some source code that is wrongly translated? I have not seen 'joined end' statements. BTW, I'm updating the code with your previous feedback. Thanks On 03/05/2016 04:56 PM, Jason Martin wrote: > Change all "end to <quote><space>end in DumpVisitor.java > > No end with be joined to previous token > > Not pretty printed but NetRexx Compiler will parse > > > On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email] <mailto:[hidden email]>> wrote: > > Write TRUE or FALSE in a NetRexx way > > Update DumpVisitor.java > > public void visit(BooleanLiteralExpr n, Object arg) { > if (n.getValue()) { > printer.print("1"); > } else { > printer.print("0"); > } > } > > > Update java2nrx.java > > System.out.println("java2nrx, the translator translator, version 1.0.3"); > > > Update build.xml > > <attribute name="Implementation-Version" value="1.0.3" /> > > > Added Note: > > When I use, I always place java2nrx.sh and the Jar file in my NetRexx/bin so it's always available to me. > > > > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > -- Marc _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
Are duplicate modifiers allowed? Note, I'm using the java 1.5 AST code, apparently that does not accept these..
On 03/04/2016 09:41 PM, Jason Martin wrote: > Needs Bug Fix for method declarations with duplicate modifiers > > Example from Android: > > From file sdk/sources/android-16/junit/runner/TestSuiteLoader.java: > > method load( suiteClassName=String ) abstract abstract returns Class signals ClassNotFoundException > > > On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email] <mailto:[hidden email]>> wrote: > > Write TRUE or FALSE in a NetRexx way > > Update DumpVisitor.java > > public void visit(BooleanLiteralExpr n, Object arg) { > if (n.getValue()) { > printer.print("1"); > } else { > printer.print("0"); > } > } > > > Update java2nrx.java > > System.out.println("java2nrx, the translator translator, version 1.0.3"); > > > Update build.xml > > <attribute name="Implementation-Version" value="1.0.3" /> > > > Added Note: > > When I use, I always place java2nrx.sh and the Jar file in my NetRexx/bin so it's always available to me. > > > > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > -- Marc _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
dupe modifiers? From the NetRexx docs. "No" I am using API 16 platform sources that you install from the Android SDK Manager There are 6721 java files there that takes my machine 4 hours to process (2 fail to convert) It makes a good Test Case for java2nrx. (Code was still at Java 6) It would not build even if they all converted perfectly. grep -c -e 1end MY_BUILD.LOG returns 37 cases of just 1end most are occuring after return a number Adding <quote><space>end got me to about 760 clean buildable nrx files Here are some files with problems CASES without RETURN LoadingTestCollector.java BaseTestRunner.java TestRunner.java TestWebServer.java Selection.java LinkMovementMethod.java LoginFilter.java CASE without RETURN NetRexx portable processor 3.04 GA build 4-20150630-1657 Copyright (c) RexxLA, 2011,2015. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program HTML5VideoViewProxy.nrx 188 +++ VideoPlayer.isVideoSelfEnded = 1end +++ ^^^ +++ Error: Incorrect syntax for a number Compilation of 'HTML5VideoViewProxy.nrx' failed [one error] On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
First CASES without RETURN should read CASES with RETURN Here's a Summary of Errors I am left with : RED or Doubled quoted should probably(up to you) be caught by java2nrx
On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
# If you have SHELL and may HELP some SHELL user later on # Copy Sources to Junk dir # CD to /Junk # Batch Convert find . -type f -name "*.java" -exec java2nrx.sh "{}" \; # Apply Bug Fix hacks find . -type f -name "*.nrx" -exec sed -i -e 's/abstract abstract/abstract/g' "{}" \; find . -type f -name "*.nrx" -exec sed -i -e 's/dependent interface/interface/g' "{}" \; find . -type f -name "*.nrx" -exec sed -i -e 's/dependent public interface/public interface/g' "{}" \; find . -type f -name "*.nrx" -exec sed -i -e 's/dependent private interface/private interface/g' "{}" \; # Compile one at time. NOT building anything here-Don't care find . -type f -name "*.nrx" -exec nrc "{}" \; On Wed, Mar 2, 2016 at 3:16 PM, Jason Martin <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |