Is there a modern ( e.g. CLR ) replacement for bison / yacc?

北慕城南 提交于 2019-12-08 07:55:06

问题


I have just been re-working an old bit of compiler-like code written using bison. While I was doing this, I was wondering what the modern equivalent is? Is there a nice .NET ( or similar ) compiler writing framework that takes a BNF grammar and splits out a DLL that does the parsing?


回答1:


I use Gardens Point GPPG and GPLEX in my own dynamic language interpreter. GPPG and GPLEX have been adopted by Microsoft as MPPG and MPLEX in the Visual Studio 200x SDK. This means that is very easy to create a Visual Studio language extension for syntax colouring of your language.




回答2:


There's also ANTLR, a very widely used parser generator implemented in Java.




回答3:


Check out the Gardens Point Parser Generator. It's a YACC/BISON like implementation for C#

GPPG




回答4:


I recommend Coco/R. It's very similar to JavaCC. Supports C#, Java, C++, F#, VB.Net, Oberon, and other languages.




回答5:


A quick google search found the Gardens Point Parser Generator.



来源:https://stackoverflow.com/questions/269256/is-there-a-modern-e-g-clr-replacement-for-bison-yacc

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