Ooops
November 24, 2020, 06:26:50 AM

Author Topic: [bmx] BlitzMax to Java 2.0 by Matt Merkulov [ 1+ years ago ]  (Read 820 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : BlitzMax to Java 2.0
Author : Matt Merkulov
Posted : 1+ years ago

Description : Most of converting work will be done by this program, but after it some point manual changements should be done anyway. Requires regular expressions module by Brucey.

Code :
Code: BlitzMax
  1. SuperStrict
  2.  
  3. Import bah.regex
  4.  
  5.  
  6. Type TClass
  7.         Global Classes:TMap = New TMap
  8.        
  9.         Field ID:String
  10.         Field Package:String
  11.         Field Name:String
  12.        
  13.         Function Create:TClass( Package:String, Name:String )
  14.                 Local Class:TClass = New TClass
  15.                 Classes.Insert( Name.ToLower(), Class )
  16.                
  17.                 If Name.StartsWith( "LT" ) Then Name = Name[ 2.. ]
  18.                 If Name.StartsWith( "T" ) And Name.Length > 1 Then
  19.                         If Name[ 1 ] >= Asc( "A" ) And Name[ 1 ] <= Asc( "Z" ) Then Name = Name[ 1.. ]
  20.                 End If
  21.                 Name = Name[ 0..1 ].ToUpper() + Name[ 1.. ]
  22.                
  23.                 Class.Name = Name
  24.                 Class.Package = Package
  25.                 Return Class
  26.         End Function
  27. End Type
  28.  
  29. TClass.Create( "java.lang", "System" )
  30. TClass.Create( "java.lang", "Math" )
  31. TClass.Create( "java.util", "LinkedList" )
  32. TClass.Create( "java.util", "HashMap" )
  33.  
  34.  
  35. Type TIdentifier
  36.         Global Identifiers:TMap = New TMap
  37.        
  38.         Field Result:String
  39.         Field Class:TClass
  40. End Type
  41.  
  42. For Local Pair:String[] = Eachin [ ..
  43.         [ "Byte", "byte" ], ..
  44.         [ "Short", "short" ], ..
  45.         [ "Int", "int" ], ..
  46.         [ "Long", "long" ], ..
  47.         [ "Float", "float" ], ..
  48.         [ "Double", "double" ], ..
  49.         [ "Object", "Object" ], ..
  50.         ..
  51.         [ "And", "&&" ], ..
  52.         [ "Or", "||" ], ..
  53.         [ "Not", "!" ], ..
  54.         [ "Mod", "%" ], ..
  55.         ..
  56.         [ "String", "String" ], ..
  57.         [ "Length", "length" ], ..
  58.         [ "Find", "indexOf" ], ..
  59.         [ "FindLast", "lastIndexOf" ], ..
  60.         [ "Trim", "trim" ], ..
  61.         [ "Replace", "replaceAll" ], ..
  62.         [ "StartsWith", "startsWith" ], ..
  63.         [ "EndsWith", "endsWith" ], ..
  64.         [ "Join", "indexOf" ], ..
  65.         [ "Split", "split" ], ..
  66.         [ "ToLower", "toLowerCase" ], ..
  67.         [ "ToUpper", "toUpperCase" ], ..
  68.         [ "Length", "length()" ], ..
  69.         ..
  70.         [ "TList", "LinkedList", "linkedlist" ], ..
  71.         [ "IsEmpty", "isEmpty" ], ..
  72.         [ "Contains", "contains" ], ..
  73.         [ "AddFirst", "addFirst" ], ..
  74.         [ "AddLast", "addLast" ], ..
  75.         [ "First", "getFirst" ], ..
  76.         [ "Last", "getLast" ], ..
  77.         [ "Remove", "remove" ], ..
  78.         [ "RemoveFirst", "removeFirst" ], ..
  79.         [ "RemoveLast", "removeLast" ], ..
  80.         [ "Clear", "clear" ], ..
  81.         [ "ValueAtIndex", "get" ], ..
  82.         [ "ToArray", "toArray" ], ..
  83.         [ "Count", "size" ], ..
  84.         ..
  85.         [ "TMap", "HashMap", "hashmap" ], ..
  86.         [ "ValueForKey", "get" ], ..
  87.         [ "Insert", "put" ], ..
  88.         [ "Keys", "keySet" ], ..
  89.         [ "Values", "values" ], ..
  90.         ..
  91.         [ "Millisecs", "System.currentTimeMillis()", "system" ], ..
  92.         ..
  93.         [ "Max", "Math.max", "math" ], ..
  94.         [ "Min", "Math.min", "math" ], ..
  95.         [ "Sin", "Math.sin", "math" ], ..
  96.         [ "Cos", "Math.cos", "math" ], ..
  97.         [ "Tan", "Math.tan", "math" ], ..
  98.         [ "ACos", "Math.acos", "math" ], ..
  99.         [ "ASin", "Math.asin", "math" ], ..
  100.         [ "ATan", "Math.atan", "math" ], ..
  101.         [ "ATan2", "Math.atan2", "math" ], ..
  102.         [ "Floor", "Math.floor", "math" ], ..
  103.         [ "Ceil", "Math.ceil", "math" ], ..
  104.         [ "Abs", "Math.abs", "math" ], ..
  105.         [ "Sqr", "Math.sqrt", "math" ], ..
  106.         [ "Log", "Math.log", "math" ], ..
  107.         [ "Exp", "Math.exp", "math" ], ..
  108.         [ "Rnd", "Math.random", "math" ], ..
  109.         [ "Pi", "PI", "math" ], ..
  110.         ..
  111.         [ "True", "true" ], ..
  112.         [ "False", "false" ], ..
  113.         [ "Null", "null" ], ..
  114.         ..
  115.         [ "Return", "return" ], ..
  116.         [ "Exit", "break" ], ..
  117.         [ "Super", "super" ], ..
  118.         [ "Self", "this" ], ..
  119.         [ "Extends", "extends" ], ..
  120.         [ "New", "new" ] ..
  121. ]
  122.         '[ "", "" ], ..
  123.        
  124.         Local Identifier:TIdentifier = New TIdentifier
  125.         Identifier.Result = Pair[ 1 ]
  126.         If Pair.Length = 3 Then Identifier.Class = TClass( TClass.Classes.ValueForKey( Pair[ 2 ] ) )
  127.         TIdentifier.Identifiers.Insert( Pair[ 0 ].ToLower(), Identifier )
  128. Next
  129.  
  130.  
  131.  
  132. Const Directory:String = "D:    empsrc"
  133.  
  134. GetClassNames( Directory )
  135. ProcessDirectory( Directory )
  136.  
  137. Function GetClassNames( DirName:String, Package:String = "" )
  138.         Local Dir:Int = ReadDir( DirName )
  139.         Repeat
  140.                 Local FileName:String = NextFile( Dir )
  141.                 If Not FileName Then Exit
  142.                 If FileName = "." Or FileName = ".." Then Continue
  143.                
  144.                 Local FullFileName:String = DirName + "" + FileName
  145.                 If FileType( FullFileName ) = FILETYPE_DIR Then
  146.                         Local NewPackage:String
  147.                         If Package Then NewPackage = Package + "." + FileName Else NewPackage = FileName
  148.                         GetClassNames( FullFileName, NewPackage )
  149.                         Continue
  150.                 End If
  151.                
  152.                 If Not FileName.ToLower().EndsWith( ".bmx" ) Then Continue
  153.        
  154.                 DebugLog "Retrieving class names from " + FileName
  155.                 Local File:TStream = ReadFile( FullFileName )
  156.                 While Not Eof( File )
  157.                         Local Line:String = ReadLine( File ).Trim()
  158.                         If Line.ToLower().StartsWith( "type" ) Then
  159.                                 Line = Line[ 4.. ].Trim() + " "
  160.                                 TClass.Create( Package, Line[ ..Line.Find( " " ) ] )
  161.                         End If
  162.                 WEnd
  163.         Forever
  164. End Function
  165.  
  166. Global FileClasses:TMap
  167.  
  168. Function ProcessDirectory( DirName:String, Start:Int = -1 )
  169.         If Start < 0 Then Start = DirName.Length
  170.        
  171.         Local Dir:Int = ReadDir( DirName )
  172.         Repeat
  173.                 Local FileName:String = NextFile( Dir )
  174.                 If Not FileName Then Exit
  175.                 If FileName = "." Or FileName = ".." Then Continue
  176.  
  177.                 Local FullFileName:String = DirName + "" + FileName
  178.                 If FileType( FullFileName ) = FILETYPE_DIR Then
  179.                         ProcessDirectory( FullFileName, Start )
  180.                         Continue
  181.                 End If
  182.        
  183.                 If Not FileName.ToLower().EndsWith( ".bmx" ) Then Continue
  184.                
  185.                 FileClasses = New TMap
  186.                
  187.                 DebugLog "Converting " + FileName
  188.                 Local File:TStream = ReadFile( FullFileName )
  189.                 Local Text:String = ""
  190.                 Local RemBlock:Int = False
  191.                 While Not Eof( File )
  192.                         Local Line:String = ReadLine( File )
  193.                         Local Trimmed:String = Line.ToLower().Trim()
  194.                         If Trimmed.StartsWith( "?" ) Then Continue
  195.                         if Text Then Text :+ "~n"
  196.                         If RemBlock Then
  197.                                 If Trimmed = "endrem" or Trimmed = "end rem" Then
  198.                                         Text :+ TRegEx.Create( "^((     | )*)(EndRem|End Rem)" ).ReplaceAll( Line, "1 */" )
  199.                                         RemBlock = False
  200.                                 Else
  201.                                         Local N:Int = 0
  202.                                         Repeat
  203.                                                 N = Line.Find( "#", N ) + 1
  204.                                                 If N = 0 or N = Line.Length Then Exit
  205.                                                 Line = Line[ ..N ] + Chr( Line[ N ] ).ToLower() + Line [ N + 1.. ]
  206.                                         Forever
  207.                                        
  208.                                         Line = TRegEx.Create( "^((      | )*)(bbdoc|about): *" ).ReplaceAll( Line, "1" )
  209.                                         Line = TRegEx.Create( "^((      | )*)returns: *" ).ReplaceAll( Line, "1@return " )
  210.                                         Line = TRegEx.Create( "^((      | )*)See also: *" ).ReplaceAll( Line, "1@see " )
  211.                                         Text :+ TRegEx.Create( "^((     | )*)(.*)$" ).ReplaceAll( Line, "1 * 3" )
  212.                                 End If
  213.                         ElseIf Trimmed = "rem" Then
  214.                                 Text :+ TRegEx.Create( "^((     | )*)Rem" ).ReplaceAll( Line, "1/**" )
  215.                                 RemBlock = True
  216.                         Else
  217.                                 If Trimmed.StartsWith( "import" ) Or Trimmed.StartsWith( "framework" ) Or Trimmed.StartsWith( "include" ) Then Continue
  218.                                 If Line.Trim() Then
  219.                                         Line :+ ";"
  220.                                        
  221.                                         Local IdentifierBegin:Int = -1
  222.                                         Local Brackets:Int = False
  223.                                         Local N:Int = 0
  224.                                         While N < Line.Length
  225.                                                 If Brackets Then
  226.                                                         If Line[ N ] = Asc( "~q" ) Then Brackets = False
  227.                                                 Else
  228.                                                         If Line[ N ] = Asc( "~q" ) Then
  229.                                                                 Brackets = True
  230.                                                         ElseIf Line[ N ] = Asc( "'" ) Then
  231.                                                                 Line = Line [ ..N ] + "//" + Line[ N + 1..Line.Length - 1 ]
  232.                                                                 Exit
  233.                                                         ElseIf IdentifierBegin < 0 Then
  234.                                                                 If IsIdentifier( Line[ N ], True ) Then IdentifierBegin = N
  235.                                                         ElseIf Not IsIdentifier( Line[ N ], False ) Then
  236.                                                                 Local NewIdentifier:String = ConvertIdentifier( Line[ IdentifierBegin..N ] )
  237.                                                                 Line = Line[ ..IdentifierBegin ] + NewIdentifier + Line[ N.. ]
  238.                                                                 N = IdentifierBegin + NewIdentifier.Length
  239.                                                                 IdentifierBegin = -1
  240.                                                         End If
  241.                                                 End If
  242.                                                 N :+ 1
  243.                                         WEnd
  244.                                        
  245.                                         Text :+ ApplyRegExs( Line )
  246.                                 End If
  247.                         End If
  248.                 WEnd
  249.                 CloseFile File
  250.                
  251.                 If FileName.StartsWith( "LT" ) Then FullFileName = DirName + "" + FileName[ 2.. ]
  252.                 If FileName[ 0 ] = Asc( "T" ) And FileName[ 1 ] >= Asc( "A" ) And FileName[ 1 ] <= Asc( "Z" ) Then FullFileName = DirName + "" + FileName[ 1.. ]
  253.                 File = WriteFile( FullFileName[ ..FullFileName.Length - 4 ] + ".java" )
  254.                
  255.                 Local Package:String = DirName[ Start + 1.. ].Replace( "", "." )
  256.                 WriteLine( File, "package " + Package + ";" )
  257.                 For Local Class:TClass = Eachin FileClasses.Keys()
  258.                         if Class.Package <> Package Then WriteLine( File, "import " + Class.Package + "." + Class.Name + ";" )
  259.                 Next
  260.                 WriteLine( File, "" )
  261.                
  262.                 WriteLine( File, Text )
  263.                
  264.                 CloseFile File
  265.         Forever
  266. End Function
  267.  
  268. Function ApplyRegExs:String( Text:String )
  269.         Text = TRegEx.Create( "^((      | )*)Local " ).ReplaceAll( Text, "1" )
  270.         Text = TRegEx.Create( "^((      | )*)Global " ).ReplaceAll( Text, "1public static " )
  271.         Text = TRegEx.Create( "^((      | )*)Field " ).ReplaceAll( Text, "1public " )
  272.         Text = TRegEx.Create( "^((      | )*)Const " ).ReplaceAll( Text, "1public final " )
  273.        
  274.         Text = TRegEx.Create( "^((      | )*)(Function|Method) *((w|d|_)*) *(" ).ReplaceAll( Text, "13 4:void(" )
  275.         Text = TRegEx.Create( "^((      | )*)Method (.*);" ).ReplaceAll( Text, "1public 3 {" )
  276.         Text = TRegEx.Create( "^((      | )*)Function (.*);" ).ReplaceAll( Text, "1public static 3 {" )
  277.         Text = TRegEx.Create( "^((      | )*)Type (.*);" ).ReplaceAll( Text, "1public class 3 {" )
  278.        
  279.         Local RegEx:TRegEx = TRegEx.Create( "^((        | )*)If (.*)([^=])=([^=])(.*) Then" )
  280.         While RegEx.Find( Text )
  281.                 Text = RegEx.ReplaceAll( Text, "1if 34==56 then" )
  282.         Wend
  283.         Text = TRegEx.Create( " *== *~q~q" ).ReplaceAll( Text, ".isEmpty()" )
  284.         Text = TRegEx.Create( " *== *~q(.*?)~q" ).ReplaceAll( Text, ".equals( ~q1~q )" )
  285.        
  286.         Text = TRegEx.Create( "^((      | )*)(ElseIf|Else If) (.*?) Then((      | )*);" ).ReplaceAll( Text, "1} else if( 4 ) {" )
  287.         Text = TRegEx.Create( "^((      | )*)(ElseIf|Else If) (.*?)((   | )*);$" ).ReplaceAll( Text, "1} else if( 4 ) {" )
  288.         Local LowerText:String =Text.Trim().ToLower()
  289.         if LowerText.StartsWith( "if" ) Then If Not LowerText.Contains( "then" ) Then Text = Text[ ..Text.Length - 1 ] + "then;"
  290.         Text = TRegEx.Create( "^((      | )*)If (.*?) Then((    | )*);$" ).ReplaceAll( Text, "1if( 3 ) {" )
  291.         Text = TRegEx.Create( "^((      | )*)If (.*?) Then (.*?) else (.*?);$" ).ReplaceAll( Text, "1if( 3 ) 4; else 5;" )
  292.         Text = TRegEx.Create( "^((      | )*)If (.*?) Then (.*?)((      | )*);$" ).ReplaceAll( Text, "1if( 3 ) 4;" )
  293.         Text = TRegEx.Create( "^((      | )*)If (.*?) ((        | )*);$" ).ReplaceAll( Text, "1if( 3 ) {" )
  294.         Text = TRegEx.Create( "^((      | )*)Else((     | )*);" ).ReplaceAll( Text, "1} else {" )
  295.        
  296.         Text = TRegEx.Create( "^((      | )*)For Local ((w|d|_)*):((w|d|_)*) *= *(.*) To (.*) Step (.*);" ).ReplaceAll( Text, "1for( 3:5 = 7; 3 <= 8; 3 += 9 ) {" )
  297.         Text = TRegEx.Create( "^((      | )*)For ((w|d|_)*) *= *(.*) To (.*) Step (.*);" ).ReplaceAll( Text, "1for( 3 = 5; 3 <= 6; 3 += 7 ) {" )
  298.         Text = TRegEx.Create( "^((      | )*)For Local ((w|d|_)*):((w|d|_)*) *= *(.*) To (.*);" ).ReplaceAll( Text, "1for( 3:5 = 7; 3 <= 8; 3++ ) {" )
  299.         Text = TRegEx.Create( "^((      | )*)For ((w|d|_)*) *= *(.*) To (.*);" ).ReplaceAll( Text, "1for( 3 = 5; 3 <= 6; 3++ ) {" )
  300.         Text = TRegEx.Create( "^((      | )*)For Local ((w|d|_)*):((w|d|_)*) *= *(.*) Until (.*);" ).ReplaceAll( Text, "1for( 3:5 = 7; 3 <= 8; 3++ ) {" )
  301.         Text = TRegEx.Create( "^((      | )*)For ((w|d|_)*) *= *(.*) Until (.*);" ).ReplaceAll( Text, "1for( 3 = 5; 3 < 6; 3++ ) {" )
  302.         Text = TRegEx.Create( "^((      | )*)For Local ((w|d|_)*):((w|d|_)*) *= *EachIn (.*);" ).ReplaceAll( Text, "1for( 3:5 @@ 7 ) {" )
  303.         Text = TRegEx.Create( "^((      | )*)For ((w|d|_)*) *= *EachIn (.*);" ).ReplaceAll( Text, "1for( 3 @@ 5 ) {" )
  304.         Text = TRegEx.Create( "^((      | )*)While *(.*);" ).ReplaceAll( Text, "1while( 3 ) {" )
  305.         Text = TRegEx.Create( "^((      | )*)Repeat((   | )*);" ).ReplaceAll( Text, "1while( true ) {" )
  306.         Text = TRegEx.Create( "^((      | )*)Select *(.*);" ).ReplaceAll( Text, "1switch( 3 ) {" )
  307.         Text = TRegEx.Create( "^((      | )*)(EndMethod|End Method|EndIf|End If|End Function|EndFunction|End Type|EndType|Next|WEnd|Forever|End Select|EndSelect)((     | )*);" ).ReplaceAll( Text, "1}" )
  308.        
  309.         Text = TRegEx.Create( "new +((w|d|_)*)" ).ReplaceAll( Text, "new 1()" )
  310.         Text = TRegEx.Create( "^(((     | )*)case [^;^:]*);" ).ReplaceAll( Text, "1@@" )
  311.         Text = TRegEx.Create( "^(((     | )*)default) *;" ).ReplaceAll( Text, "1@@" )
  312.        
  313.         Text = TRegEx.Create( ":+" ).ReplaceAll( Text, "+=" )
  314.         Text = TRegEx.Create( ":-" ).ReplaceAll( Text, "-=" )
  315.         Text = TRegEx.Create( ":*" ).ReplaceAll( Text, "*=" )
  316.         Text = TRegEx.Create( ":/" ).ReplaceAll( Text, "/=" )
  317.        
  318.         Text = TRegEx.Create( ">==" ).ReplaceAll( Text, ">=" )
  319.         Text = TRegEx.Create( "<==" ).ReplaceAll( Text, "<=" )
  320.         Text = TRegEx.Create( "<>" ).ReplaceAll( Text, "!=" )
  321.        
  322.         Text = TRegEx.Create( "~~q" ).ReplaceAll( Text, "~q" )
  323.         Text = TRegEx.Create( "~~n" ).ReplaceAll( Text, "
  324. " )
  325.         Text = TRegEx.Create( "~~t" ).ReplaceAll( Text, "       " )
  326.         Text = TRegEx.Create( "..((     | )*);$" ).ReplaceAll( Text, "" )
  327.        
  328.         Text = TRegEx.Create( "(d):Byte" ).ReplaceAll( Text, "1" )
  329.         Text = TRegEx.Create( "(d):Short" ).ReplaceAll( Text, "1" )
  330.         Text = TRegEx.Create( "(d):Int" ).ReplaceAll( Text, "1" )
  331.         Text = TRegEx.Create( "(d):Long" ).ReplaceAll( Text, "1l" )
  332.         Text = TRegEx.Create( "(d):Float" ).ReplaceAll( Text, "1f" )
  333.         Text = TRegEx.Create( "(d):Double" ).ReplaceAll( Text, "1d" )
  334.         Text = TRegEx.Create( "((w|d|_)*) *: *((w|d|_)*)" ).ReplaceAll( Text, "3 1" )
  335.        
  336.         Text = TRegEx.Create( "$(d)" ).ReplaceAll( Text, "0x1" )
  337.         Text = TRegEx.Create( "%(d)" ).ReplaceAll( Text, "0b1" )
  338.        
  339.         Text = Text.Replace( "@@", ":" )
  340.         'Text = TRegEx.Create( "" ).ReplaceAll( Text, "" )
  341.        
  342.         Return Text
  343. End Function
  344.  
  345. Function IsIdentifier:Int( Code:Int, StringBeginning:Int )
  346.         If StringBeginning And Code >= Asc( "0" ) And Code <= Asc( "9" ) Then Return True
  347.         If Code >= Asc( "A" ) And Code <= Asc( "Z" ) Then Return True
  348.         If Code >= Asc( "a" ) And Code <= Asc( "z" ) Then Return True
  349.         If Code = Asc( "_" ) Then Return True
  350. End Function
  351.  
  352. Function ConvertIdentifier:String( Identifier:String )
  353.         Local LowerCaseIdentifer:String = Identifier.ToLower()
  354.        
  355.         Local Class:TClass = TClass( TClass.Classes.ValueForKey( LowerCaseIdentifer ) )
  356.         If Class Then
  357.                 FileClasses.Insert( Class, Null )
  358.                 Return Class.Name
  359.         End If
  360.        
  361.         Local ID:TIdentifier = TIdentifier( TIdentifier.Identifiers.ValueForKey( LowerCaseIdentifer ) )
  362.         If ID Then
  363.                 If ID.Class Then FileClasses.Insert( ID.Class, Null )
  364.                 Return ID.Result
  365.         End If
  366.        
  367.         If Identifier.EndsWith( "@" ) Then Identifier = Identifier[ ..Identifier.Length - 1 ] + ":Byte"
  368.         If Identifier.EndsWith( "%" ) Then Identifier = Identifier[ ..Identifier.Length - 1 ] + ":Int"
  369.         If Identifier.EndsWith( "#" ) Then Identifier = Identifier[ ..Identifier.Length - 1 ] + ":Float"
  370.         If Identifier.EndsWith( "!" ) Then Identifier = Identifier[ ..Identifier.Length - 1 ] + ":Double"
  371.         If Identifier.EndsWith( "$" ) Then Identifier = Identifier[ ..Identifier.Length - 1 ] + ":String"
  372.        
  373.         If LowerCaseIdentifer.StartsWith( "l_" ) Then Identifier = Identifier[ 2.. ]
  374.         Return Identifier[ 0..1 ].ToLower() + Identifier[ 1.. ]
  375. End Function


Comments :


Captain Wicker (crazy hillbilly)(Posted 1+ years ago)

 Very Nicely Done! :DDo you plan on creating a Java to BlitzMax converter too?


Guy Fawkes(Posted 1+ years ago)

 Holy crap dude! Is there any way u can do this for Blitz3D?! O_O


Matt Merkulov(Posted 1+ years ago)

 <div class="quote"> Do you plan on creating a Java to BlitzMax converter too? </div>No, it's senseless, I guess.<div class="quote"> Is there any way u can do this for Blitz3D?! </div>I didn't use B3D for 5 years now and forgot a lot unfortunately.


Nexinarus(Posted 1+ years ago)

 damn.. It would be cool


Yasha(Posted 1+ years ago)

 Which way do you want, B3D->Java or Java->B3D? One's rather easier than the other!Ask nicely and I'll think about doing one, if Matt doesn't want to.I can't really imagine many scenarios where it would be very useful though, as B3D is heavily tied to the 2D/3D engines, and as far as I know, nobody's completed a Java port of either of them yet.


Guy Fawkes(Posted 1+ years ago)

 Could you please make a B3D->Java version? :) That would be wonderful! :) Thanks, Yasha! :)


Matt Merkulov(Posted 1+ years ago)

 B3D code can be ported to BlitzMax via BM IDE and then to Java. Though some additional automatic function name replacements can be done to tie B3D functions to MiniB3D ones (MiniB3D should be ported too then).


Jason W.(Posted 1+ years ago)

 Nice job Matt!Jason


Matt Merkulov(Posted 1+ years ago)

 Converter is heavily updated. List of changes:* now converter scans directory tree instead of "include" links, so you have to arrange your code in folder structure as in standard Java project first, "include", "import" and "framework" lines will be ignored* added class scanning pass before conversion* source file package will be set in output file* java source import strings will be properly set depending on classes used* some standard BlitzMax classes and methods will be converted to corresponding Java ones* proper conversion of comments including these for documentation generation* correct conversion of identifiers (classes to pascal case, others to camel case)* conversion of variable postfixes* fixed some bugs in conversion of conditions


salric(Posted 1+ years ago)

 Great stuff! Thanks!


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal