Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parser builders for C#/.NET

Tags:

c#

.net

parsing

I want to write a simple DSL in C#. Nothing too complicated. I'm looking for the .NET equivalent of Lex & Yacc. The easiest one I've found so far is GOLD Parser builder. The other choice is to use the lex & yacc available with F#, but I'm not keen to program in F# right now.

If you have any suggestions for the .NET version of Lex or Yacc, I'd love to hear them!

Thanks!

like image 258
lesbegue's alter ego Avatar asked Aug 13 '26 04:08

lesbegue's alter ego


2 Answers

If you really want to stay in C#, I would recommend using the Irony toolkit - it allows you to specify grammars in C# code.

like image 136
Erik Forbes Avatar answered Aug 15 '26 20:08

Erik Forbes


ANTLR 3 has a C# target.

like image 43
Matthew Flaschen Avatar answered Aug 15 '26 20:08

Matthew Flaschen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!