Johannes, You've convinced me. After some time experimenting with IKVM, I have to say I am very impressed and am motivated to find uses for it. But I have decided to make no changes to how I apply the ANTLR tools.
I plan to continue targeting C# directly and not via bytecode-to-IL translation. This decision is based partly on the fact that I am more hooked than I like to admit on the syntactic sugar of C# properties and -- more importantly -- any work that I might have to invest into smoothing out wrinkles in ikvm I would rather invest into giving back to the antlr community. All that said, I would encourage anyone who needs to get a chunk of java going on .NET -- or call .NET assemblies from Java -- to check out IKVM. Despite the very modest version number (0.38) it seems very mature. Full disclosure: I did not get around to passing antlr through IKVM. I only tried some in-house Java classes that I thoroughly understand, and it worked great. I even called .NET stubs from Java. Nice. Thanks again! On Fri, Feb 6, 2009 at 9:25 AM, Johannes Luber <[email protected]> wrote: > > I have a further thought on this: > > > > On Fri, Feb 6, 2009 at 2:03 AM, Johannes Luber <[email protected]> wrote: > > > > Con: I haven't checked it, but I believe that IKVM won't create the > > .NETisms > > > like properties instead getters and setters. If true, your parser > > backend > > > will be schizophrenic regarding the approaches. > > > Con: .NET-only additions like #pragmas to silence warnings won't be > > > inlcuded. > > > > > > I think I managed to trick myself, by forgetting that I've been looking > at > > too many alternatives. > > > > What I'm thinking of is using the ANTLR java tool and writing all of my > > actions in Java. Next, compile the java to bytecode targeting the JVM. > > Then, use ikvmc to do a one-time translation of the JVM bytecode to .NET > > IL > > bytecode, i.e. a .NET assembly. According to the IKVM folks, I would > have > > to write my own classloder if I need to load Java classes dynamicaly. > > Otherwise, I would never see C#, because I'd be coding in Java. > > > > (Ok, it's actually a little more complex. Write lexer in Java. Compile > > lexer class to JVM bytecode. Recompile to IL (ikvmc). Create java stub > > for > > lexer IL (ikvmstub). Write parser in Java, by getting token stream from > > java stub of lexer. Compile parser class to JVM bytecode. Recompile to > > IL. Done. > > > > It seems like the properties v. setter/getter concern goes away in this > > scenario. Am I completely wrong? > > > > C. Mundi > > You still have to interface your parser. Depending on how you do it, you > may or may not have the need to access things like "token.getText()" in C#. > > Johannes > > -- > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger01 > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
