Alekhya
Alekhya

Reputation: 1

How to parse antlr grammar's written in JAVA using C#

Can we able to use antlr grammars (written in java) in visual studio using C#?

I am facing one problem with antlr grammar's that are JAVA target but I want C# target grammars and i couldn't get C# target grammars. So, my question is can we use those antlr JAVA targeted grammars in C#.

Upvotes: 0

Views: 231

Answers (1)

Mike Lischke
Mike Lischke

Reputation: 53307

Your question title is misleading. ANTLR grammars are written in ANTLR's grammar language, not Java or C#. But I guess your real question is: can we use a parser, generated for the Java target, also with C#. And the obvious answer is: no. The generated code is Java, how can you use that in C#? You have to generate C# code.

Upvotes: 1

Related Questions