用于 .NET 的好的解析器生成器(想想 lex/yacc 或 antlr)?仅构建时间? [英] Good parser generator (think lex/yacc or antlr) for .NET? Build time only?

查看:26
本文介绍了用于 .NET 的好的解析器生成器(想想 lex/yacc 或 antlr)?仅构建时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET 有没有好的解析器生成器(想想 lex/yacc 或 antlr)?任何有执照不会吓到律师的人?很多 LGPL,但我正在研究嵌入式组件,有些组织对我依赖 LGPL 感到不舒服.

我听说 Oslo 可能会提供此功能,但我不确定它是构建时依赖项还是运行时依赖项.谁能澄清奥斯陆将提供什么?

更新
我真正想要的是一个解析器生成器,它只是构建时的依赖项.看起来 ANTLR 有一个运行时组件.

解决方案

我刚刚发现 F# 附带了 yacc 和 lex 的实现.看起来我将能够利用这个解析器生成器来满足我的 .NET 需求.

F# 示例<块引用>

解析示例展示了如何使用 fsyacc 和 fslex 工具构建用于 F# 的解析器和词法分析器.(模式:已编译,运行于:任何 CLI,包括 Mono)

相关博文:

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?

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.

解决方案

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# Samples

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)

Related blog posts:

这篇关于用于 .NET 的好的解析器生成器(想想 lex/yacc 或 antlr)?仅构建时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆