Is there any advanced compiler-compiler lexer/parser in C#?

290 views Asked by At

I want to know Is there any compiler-compiler library that is written in C# or Not ?

I know Antlr & JavaCC but these library wrote in Java

Is there any library like antlr but in C# (or ported in C#) and open source or not ?

Can anybody introduce them ?

2

There are 2 answers

0
d--b On BEST ANSWER

There is Irony. I've never used it myself though.

5
Erik Funkenbusch On

The C# compiler is itself written in C#, and with Roslyn, this has been made open source.

https://github.com/dotnet/roslyn

There is also a C# port of JavaCC, however, it's no longer maintained. The author switched to Irony instead. If you're just looking for code for examples, it would do that.

https://github.com/deveel/csharpcc