Code parser for own DSL in C# [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-06 06:09:20

There are several options. I've found Irony to be good. It's powerful, and it has a novel syntax utilizing C# operator overloads to convey the syntax of your grammars directly in C#.

Irony - .NET Language Implementation Kit.
http://irony.codeplex.com/

ANTLR is a very common parser generator with output bindings for many languages (including c#), but it is LLR which might make it a little more cumbersome than flex/bison if that's what you are accustomed to.

I've had my best luck with ANTLR, it can generate C# code as well. Good Language design support as well with ANTLR Works, an IDE for designing and testing your grammars, and quite a few tutorials to explain the whole thing.

Other option is the F# powerpack that has fsLex and fsYacc. Only brielfy poked at it, seems powerful but very little documentation.

For C# that's the two first thing to look at i think.

GJ

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!