Is there a valid alternative to ANTLR written in C#? [closed]

送分小仙女□ 提交于 2020-01-02 03:16:07

问题


ANTLR is a great piece of software, but, in my opinion, is a little bit uncomfortable for a C# programmer (the C# porting is out of date, the parser antlr-3.1.3.jar required java, etc) I'm looking for a "more C# native" language tool in order to parse a simple json-like grammar, any suggestion?


回答1:


I've used the GOLD Parser Generator, a freeware tool that you can use to specify BNF grammars, and then generate a parser in almost any target language including C#. You can also modify the way the parser generator generates C# code by altering a text template.

http://www.devincook.com/goldparser/




回答2:


peg-sharp (C# packrat parser) is a simple but valid alternative.



来源:https://stackoverflow.com/questions/5242750/is-there-a-valid-alternative-to-antlr-written-in-c

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