问题标签 [dsl-tools]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
80 浏览

visual-studio-2010 - Can't get a shape to enter in "edit mode". Why?

I have created a very simple DSL that as a particular shape (TasksGroupShape) that I can't get to enter in edit mode either when the user starts to hit the keyboard or presses F2.

This shape is a geometry shape with a simple text decorator (called Name) linked to a property called Name.

The model element is called TasksGroup and inherits from another domain class called NamedElement (abstract) that has the domain property Name.

This property is a simple string with "Is Element Name" set to true.

This is a simple design that I used in other DSL projects and that worked fine.

Probably there is something wrong with this one but I don't know where to look to find the problem.

Am I forgetting something? Any advice on where to put a breakpoint to understand what is wrong?

0 投票
1 回答
1025 浏览

dsl - 创建领域特定查询语言的步骤是什么?

  1. 我想创建特定领域的查询语言
  2. 我需要创建它的步骤以及如何从创建的域特定查询语言转换为普通 SQL 查询来执行它。
  3. 和任何推荐的工具?
0 投票
0 回答
131 浏览

.net - 如何使 DSL 与 VS2010 和 2012 兼容?

我负责工作中的 DSL/VSVM VSIX 扩展,由于 VS2012 刚刚发布,我想让它与两者兼容。

VSIX 已经可以在两种环境中安装,但我收到加载错误。我还没有完全检查,但我认为这是由于不同的 SDK 版本。

是否可以使我的代码库与两个 Visual Studio 兼容,而无需分叉?

0 投票
4 回答
413 浏览

antlr - 代表我的领域特定语言

我设计了一种非常简单的领域特定语言 (DSL) 来指定和执行设备上的全屏交互行为。它是基于事件的动作语言,以 XML 作为载体语法。它的例子在这里:

它在语义上意味着以下内容: DSL的语义解释

它是一种状态转换语言,程序员在其中以声明方式描述 UI 布局和程序应响应的事件以及流向事件的操作。DSL 是为可读性而设计的。以下是节点的简短描述:

  • timeout:执行每个状态时状态计时器的持续时间
  • 背景动作:这些代表进入状态时执行的动作
  • 状态屏幕:屏幕组件和与之关联的事件
  • expectedevents:当前状态预期的事件。这些是异步事件

有没有办法以更正式的描述将这种特定语言表示为语法或元模型(我不熟悉语言建模技术)。我的想法是为此 DSL 编写语言规范,以便我团队中的其他程序员可以根据该规范生成他们选择的其他语言的脚本,例如 python 或 lua。甚至可能代码生成这个 XML?代表这一点的最佳方式是什么?我一直在使用许多语言工具和 dsl 工具,但我不知道什么对这种语言最有效?有专业知识的人可以帮助我朝着正确的方向前进,并在需要完成的步骤上抢先一步。

0 投票
1 回答
211 浏览

haskell - Haskell LLVM -- Duplicate Functions Created

The problem I am having with the LLVM-Haskell bindings is that I am getting "duplicated" names. I think the best way to explain my problem is with a small concrete example (note the example is contrived, and for such a small example there are easy ways around it... however it does point out my problem).

If you now run this haskell program (you'll need some imports like Data.Int/Word, and LLVM.Core), you'll get the following output.

The problem is that in the IR, the (external) putchar is declared twice, but the second time with the name putchar1. I have a good sense as to why this is, but not a good sense for a nice general way around this. I.e. I don't want to have to put everything inside of one giant CodeGenModule.

This brings me to the another related issue. Is the LLVM-Haskell binding appropriate for building the backend of a compiler. Perhaps with a reasonable solution to the above -- I can figure out a way to use it ... but it seems simpler just to hand write the IR code...

0 投票
1 回答
680 浏览

antlr - XText:如何为多种目标语言创建解析器

我在 XText 中定义了我的 DSL,它自动生成了 Java 版本的语言解析器和代码生成框架,这真的很酷。

问题是我的 DSL 旨在供使用多种语言实现的项目使用。你可以想象我们可能至少需要在 C#、Java 和 Ruby 中解析 DSL。

所以问题是:有没有办法在 xtext 的帮助下生成多种语言的解析器?

0 投票
0 回答
489 浏览

visual-studio-2012 - Visual Studio 实验实例加载太慢?

我正在开发一个新的 Visual Studio 扩展,并且在测试时我使用 vsix 项目来运行实验实例,但是这大约需要 5 分钟才能启动。我在我的 VS 开发实例上安装了 resharper 和 devexpress,我注意到这些 dll 在我的实验实例加载时加载,即使我没有在我的扩展中使用这些开发工具。我已尝试从实例上的工具箱项中删除 devexpress 的加载项,但它们仍处于加载状态。Devexpress 需要一些时间来加载是因为该套件包含许多 dll。我无法删除它,因为我正在使用 Devexpress 维护其他项目。是否有任何地方可以提高性能并使用没有额外加载项的实例,请告知?

0 投票
1 回答
50 浏览

visual-studio-2012 - 如何在运行时跟踪 Dsl/DslPackage (Visual Studio VS2012)

如何在运行时跟踪 VS2012 DSL/DSL 包 VSIX。我有一个奇怪的错误消息,“'null' 的值对 'stream' 无效”,我想这与反序列化 DSL 编写的 XML 有关。

虽然我可以在 Exp Instance 中调试时在 DSL 代码中添加断点,但代码是如此的事件驱动,以至于很难找到原因。

我不想用 Trace.Writeline 语句乱扔代码。相反,我想监视应用程序正在做什么以获取堆栈跟踪或类似信息。我知道这种事情在 Unix 上是可能的,但不知道在 Win 8.1 上。

Visual Studio 的活动日志没有太大帮助。

谢谢约翰

0 投票
1 回答
225 浏览

visual-studio-2013 - Visual Modelling SDK VS 2013 - MinimalLanguage template does not run

If I create the basic example using the MinimalLanguage template in VS2013 it does not run when debugging in the Exp Instance. When I open Sample.mydsl1 it fails on line 234 of CommandSet.cs, with error "Operation is not valid due to the current state of the object".

Doing exactly the same in VS2012 works fine.

Any suggestions as to what is wrong and how this can be fixed for VS2013?

Can someone with VS2013 (prof) try the Extensibility MinLang template and let me know if it runs.

0 投票
1 回答
119 浏览

visual-studio - 选择隔间形状的属性

我在选择 dsl 的隔间形状上的属性时遇到问题。我想做的是:

我有一个带有一个隔间形状的 DSL,它在一个隔间中有许多属性。每个属性都有一个用于保存 c# 代码的文本字段。我编译此代码并将错误任务添加到错误列表中。我为错误任务的导航事件添加了一个事件处理程序。在这个处理程序中,我想选择导致错误的隔间形状的属性。我尝试了很多东西,但没有成功。这是我目前的选择逻辑:

问题似乎是隔间形状的属性没有演示视图,因为我无法得到它。

如果有人能帮我解决这个问题,我会很高兴也很感激。

谢谢你问候曼努埃尔