良好的解析器发电机(想法/ YACC或ANTLR)的.NET?只有建立时间?发电机、想法、良好、时间

2023-09-02 01:46:12 作者:丶喜欢你的格调

是否有一个良好的解析器生成器(想法/ YACC或ANTLR)的.NET?任何有这不会吓跑律师执照?罗得的LGPL,但我工作的嵌入式组件和一些组织还不太习惯我服用LGPL的依赖。

Is there a good parser generator (think lex/yacc or antlr) for .NET? Any that have a license that would not scare lawyers? Lot’s of LGPL but I am working on embedded components and some organizations are not comfortable with me taking an LGPL dependency.

我听说奥斯陆可以提供这一功能,但我不知道它是否是一个建造时间相关性或同时运行时依赖。任何人都可以澄清奥斯陆将提供?

I've heard that Oslo may provide this functionality but I'm not sure if it's a build time dependency or also a runtime dependency. Can anyone clarify what Oslo will provide?

更新 我真的希望是一个解析器生成器,是构建时唯一的依赖。它看起来像ANTLR有一个运行时组件。

UPDATE What I would really like is a parser generator that is a build time only dependency. It looks like ANTLR has a runtime component.

推荐答案

我刚刚发现,F#附带yacc和法的实现。它看起来像我将能够利用这个解析器生成我的.NET的需求。

I just discovered that F# ships with an implementation of yacc and lex. It looks like I will be able to leverage this parser generator for my .NET needs.

F#样品

解析示例演示了如何使用fsyacc和fslex工具来构建解析器和词法分析器与F#中使用。 (模式:编译,运行于:任何命令行,包括单声道)

The Parsing sample shows how to use the fsyacc and fslex tools to build parsers and lexers for use with F#. (Mode: Compiled, Runs on: any CLI, including Mono)

相关博客文章:

在F#中一个简单的解析器