craigmjohnston / grunsharp

C# implementation of grun, the ANTLR grammar test rig. Not being actively worked on right now.
MIT License
6 stars 4 forks source link

Issue with Antlr4.Runtime.Standard vs Antlr4.Runtime #4

Open Falthazar opened 5 years ago

Falthazar commented 5 years ago

I was trying to get this working with a console project in Visual Studio. I kept getting the following error: 'LanguageLexer.TokenNames': no suitable method found to override Same error for the Parser and some other files.

After some digging I found out that the Antlr4 Language Support extension uses the "C# optimized" version of Antlr4, not the standard runtime. There are obviously a couple of differences, unfortunately.

Maybe add a switch to choose which runtime to use? Compiling GRunSharp with Antlr4.Runtime (vs Antlr4.Runtime.Standard) fixed the issue.