奥斯陆的 Intellipad:如何设置 3 列 MGrammarMode?

发布于 2024-07-10 06:49:11 字数 368 浏览 5 评论 0 原文

我一直在使用 Oslo 进行 MSchema。 效果很好。 我可以为数据库设计编写一个 M 模式,它会生成 T-SQL 来构建带有 PK、FK、完整性检查等的整个数据库。我已经设置了一个 .bat 文件来将 .m 编译为 .mx,然后加载将其写入数据库,然后将 SqlMetal 运行到我的项目中,30 秒后我将继续进行更改。 我喜欢它。

好的,现在我要继续学习 mGrammar。 我不太确定如何将其合并到我的应用程序中,但我会弄清楚的。 我首先需要设置 Intellipad 以提供输入/语法/输出三联图。 我很困惑。 我想不出任何方法来设置它的流程。 是的,我可能可以采用 Song.mg 项目并重命名它,但这并不能让我深入了解它是如何工作的。 有任何想法吗?

I've been using Oslo for MSchema. Works great. I can write an M Schema for a database design and it generates T-SQL to build the entire db with PKs, FKs, checks for integrity etc. I've set up a .bat file to compile the .m into .mx then load it into the db, then run SqlMetal into my project and in 30 seconds I'm moving on with my changes. I love it.

OK so now I'm moving on into mGrammar. I'm not quite sure how I'll incorporate it into my app but I'll figure that out. What I need first is to set up Intellipad to give me the Input/Grammar/Output triptych. I'm stumped. I can't figure out any way to set it up with a flow. Yes I can probably take the song.mg project and rename it but that doesn't give me any insight into how the thing works. Any ideas?

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

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

发布评论

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

评论(3

梦里泪两行 2024-07-17 06:49:11

以下是您必须执行的步骤:

  1. 打开“Intellipad(启用样本)”
  2. 文件 -> 打开 DSL 文件(Example.song)
  3. CTRL+SHIFT+D,键入“SetMode('MGMode')”
  4. 从菜单中:MGrammar 模式-> 树预览
  5. 选择您的语法文件 (Song.mg)

这将打开三个预览视图。 左侧窗口是示例代码,中间窗口是语法,右侧窗口是输出的树结构。

Here are the steps you have to take

  1. Open "Intellipad (Samples Enabled)"
  2. File->Open your DSL file (Example.song)
  3. CTRL+SHIFT+D, type "SetMode('MGMode')"
  4. From the menu: MGrammar Mode->Tree Preview
  5. Select your grammar file (Song.mg)

This will open up the three preview view. The left window is your sample code, the middle one is your grammar and the right is a tree structure of your output.

╭⌒浅淡时光〆 2024-07-17 06:49:11

正如@Just-in-case所说,但如果你只是:

(1)CTRL - SHIFT - T

(2)打开MG文件

,即从实验室文档:

  • 从开始菜单或输入打开Intellipad(启用示例)以下命令(来自“c:\Program Files\Microsoft Oslo SDK 1.0\Bin”):

“c:\program files\Microsoft Oslo SDK 1.0\bin\Intellipad\ipad.exe”/c:ipad-vs-samples。 xaml

注意:“ipad-vs-samples.xaml”是一个启用附加功能的配置,包括我们将要使用的动态解析编辑模式。

  • 在 Intellipad 中,使用 CONTROL-SHIFT-T 以动态解析器​​模式打开 Intellipad。

  • 选择 IntroToM\Example02-MovieDSL\begin 文件夹中的 Movies.mg 文件。

As @Just-in-case said, but simpler if you just:

(1) CTRL - SHIFT - T

(2) Open the MG file

I.e, From lab doc:

  • Open Intellipad (Samples Enabled) either from the start menu or by entering the following command (from "c:\Program Files\Microsoft Oslo SDK 1.0\Bin"):

"c:\program files\Microsoft Oslo SDK 1.0\bin\Intellipad\ipad.exe" /c:ipad-vs-samples.xaml

Note: "ipad-vs-samples.xaml" is a configuration that enable additional functionality including the dynamic parse editing mode that we are about to use.

  • In Intellipad, use CONTROL-SHIFT-T to open Intellipad in Dynamic parser mode.

    1. Select the Movies.mg file in the IntroToM\Example02-MovieDSL\begin folder.
一场春暖 2024-07-17 06:49:11

您可能已经经历过,MSchema 和 MGrammar 还没有很好地集成。 在这里阅读更多相关信息:http://tinyfinger.blogspot.com/ 2009/01/mgrammar-mschema-example.html

You might have experienced, that MSchema and MGrammar are not integrated that well yet. Read more about that here: http://tinyfinger.blogspot.com/2009/01/mgrammar-mschema-example.html

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