I was trying to find a lex or YACC or bison equivalent on .NET, and lo ho and behold I finally found it, by accident.
It’s called The Compiler Generator Coco/R, or just Coco/R in short. Here’s the link to it.
It has ports to C#, Java, and others. It does things slightly different from lex or YACC or bison, but it still serves the same purpose. To parse text/code.
So that’s that. This is actually for a project that MIGHT be doing in future. Check out the thread here.