antlr4cs icon indicating copy to clipboard operation
antlr4cs copied to clipboard

How to use ANTLR best in a F# solution?

Open ChristophSchmidpeter opened this issue 4 years ago • 1 comments

Is there a way to generate F# or MSIL code? Or is the only way to use ANTLR in a F# environment to create a separate C# project into which ANTLR creates C# code?

ChristophSchmidpeter avatar Nov 06 '21 11:11 ChristophSchmidpeter

Microsoft's primary goal of designing .NET is to enable interoperation among languages, so when C# code can be generated from an ANTLR grammar file you don't need the duplicate tooling for VB.NET or F#.

But in case you do want to generate F# code and help the F# community, you can get started from https://github.com/antlr/antlr4/blob/master/doc/creating-a-language-target.md

lextm avatar Nov 06 '21 20:11 lextm