using antlr4 C# grammar in java

236 views Asked by At

How can I obtain the parse tree of a C# file using C# grammar and antlr 4 in java? I have tried to generate a parser and lexer for C# grammar, but is generated only the parser, and it throws this error:

can't find or load grammar CSharp4PreProcessor

1

There are 1 answers

0
Hamzawey On

Assuming you are using the grammar from this link, you will have to download all the .g4 files there.