I was exploring ways how to implement a general-purpose/DSL language for .NET platform. From what I saw, there are several tools that make language implementation (parsing source code) relatively easy. Irony, Yacc, ANTLR… the problems with these projects are that some are not evolving, some generate slow parsers, some cannot run on .NET Core CLR etc. There is always some obstacle that pushes me towards solution “write your own parser”.
So I was wondering… is it possible to write my own parser and connect/integrate it with Roslyn? Are there any books, tutorials or examples how it can be done?
I know this is an old thread, but your best bet (in visual studio at least) is to create an IVsSingleFileGenerator that converts your code into c# or other Roslyn language.
Roslyn does not allow to do it.
Look at this project: Nitra. It's under active development.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With