tunnelvisionlabs / antlr4cs

The original, highly-optimized C# Target for ANTLR 4
Other
449 stars 103 forks source link

How to use ANTLR best in a F# solution? #371

Open ChristophSchmidpeter opened 3 years ago

ChristophSchmidpeter commented 3 years ago

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?

lextm commented 3 years ago

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