DSL框架的选择

发布于 2024-07-22 03:29:15 字数 457 浏览 7 评论 0原文

我正在从事一个需要我定义 DSL 的项目。 由于提出正确的 DSL 对我的项目至关重要,因此我决定评估有助于定义 DSL、解析它和代码生成(必须采用基于 .NET 的语言)的现有框架。我考虑的框架是:

  1. Boo 语言它具有可定制的编译器和 Python 语法,非常适合定义 DSL。
  2. 支持可扩展命令行开关的 Windows powershell。
  3. 支持可视化建模的 Microsoft DSL 工具,但不太灵活(在我看来)
  4. ANTLR 是经过验证的
  5. C# 流畅接口工具。(对此不太满意)
  6. Oslo 框架(在生产中使用成熟吗?)

有优点和缺点对于上述每个框架,我无法做出决定。如果在上述框架之间进行选择,您会选择哪一个?为什么?

是否还有其他如此基础而我可能错过的框架?

任何帮助或指导将不胜感激。

I am working on a project that requires me to define a DSL. Since coming up with the right DSL is critical for my project, I decided to evaluate existing frameworks that help in defining DSLs,parsing it and code generation(which has to be in a .NET based language) The frameworks I considered are :

  1. Boo language that has a customizable compiler and pythonish syntax ideal for defining a DSL.
  2. Windows powershell that supports extensible commandlets.
  3. Microsoft DSL tools that support visual modeling,but less flexible(in my opinion)
  4. ANTLR which is proven tool
  5. C# fluent interfaces.(Not so happy with this)
  6. Oslo framework (Is it mature to be used in production?)

There are pros and cons of each of the framework mentioned above and I am unable to make a decision.Given a choice between the above frameworks, which one would you choose and why?

Is there any other framework so fundamental that I might have missed out?

Any help or guidance would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

棒棒糖 2024-07-29 03:29:15

我的问题中,涉及以下主题: DSL,建议我使用 IronyDLR。 但我不知道它们是否稳定。 Irony 是 Alpha 版本,DLR 虽然稳定,但仍处于 v0.9 版本。 我的目标是在一两周内开始使用 Irony,这样我就能够提供一些反馈。 然而好的一面是——它们都是开源的,所以你可以自己修复错误。

In a question of mine that touched the subject of DSL's, it was suggested to me to use a combination of Irony and DLR. I don't know stable they are however. Irony is an Alpha, and DLR, although stable, is still in v0.9. I'm aiming to start using Irony myself in a week or two, so then I will be able to provide some feedback. On the bright side however - they are both opensource, so you can fix bugs yourself.

面如桃花 2024-07-29 03:29:15

如果您计划实现外部 DSL,Spoofax (http://strategoxt.org/Spoofax) 是一个不错的选择语言工作台可以做到这一点。 它是一个基于解析器的文本语言工作台,利用了 SDF 、 Stratego 等多种最先进的技术。 除了 DSL 实现之外,您还可以获得非常丰富的编辑器服务,例如代码完成、大纲视图、智能感知等。

它附带了一个很好的示例 DSL 实现和 Java 代码生成。 它也可以作为开始使用这些工具的起点。

以下教程详细介绍了此语言工作台的用法:http://strategoxt.org/Spoofax/Tour

希望能帮助到你!

编辑-1:

以下是使用此语言工作台实现的语言示例:http://mobl-lang.org/< /a>.

If you are planning to implement an external DSLs , Spoofax ( http://strategoxt.org/Spoofax )is a nice Language Workbench to do this. It is a parser-based textual Langauge Workbench that leverage several state-of-art technology such as SDF , Stratego. Besides the DSL implemenation , you could get a very rich editor services such as, code completion , outline view , intellisense etc.

It comes with a nice sample DSL implementation and code generation to Java. It might also work as a starting point to get started with the tools.

Following tutorial details about the usage this langauge workbench : http://strategoxt.org/Spoofax/Tour .

Hope it helps!

Edit -1 :

Following is an example of a language implemented using this Langauge Workbench : http://mobl-lang.org/.

浅唱ヾ落雨殇 2024-07-29 03:29:15

Jetbrains 有一个可视化工具来帮助语言开发,忘记了名字,但他们的首页上有它。 我相信它是免费的并且部分开源的。

Jetbrains have a visual tool to aid in language development, forgotten the name but their front page has it on it. I believe its free and partially open sourced.

小…楫夜泊 2024-07-29 03:29:15

DMS 软件再工程工具包是一套用于定义任意语言的集成工具,包括 DSL,为定义的语言自动构建解析器、分析器和代码生成器。

The DMS Software Reengineering Toolkit is an integrated set of tools for defining arbitrary langauges, including DSLs, automating the construction of parsers, analyzers, and code generators for the defined languages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文