0

Is there anyway to use Antlr for Converting C# to Java, I tried to look out for any article or sample, but couldn't find anything.

So the questions is ..... Can I do this using Antlr ? Any starting points\tips on how to start on it is appreciated.

  • Possible duplicate of [ANTLR from Java to C#](http://stackoverflow.com/questions/9069592/antlr-from-java-to-c-sharp) This post includes the opposite C# to Java as well. – Simon Bosley May 12 '17 at 10:22
  • 1
    A starting point would be the C# grammar: https://github.com/antlr/grammars-v4/tree/master/csharp . Then you can use the listener to walk the AST and generate Java code. – vyrp May 12 '17 at 10:22
  • @vyrp it's better to use Visitor with result value (string) instead of listener. – Ivan Kochurkin May 13 '17 at 18:27

0 Answers0