Oslo Intellipad: How to configure a 3-column MGrammarMode?

I am using Oslo for MSchema. It works great. I can write an M-schema for database design, and it generates T-SQL for building all db with PK, FK, checks integrity, etc. I configured the .bat file to compile .m to .mx, then upload it to db, then run SqlMetal in my project, and after 30 seconds I will continue my changes. I like it.

So now I go to mGrammar. I'm not quite sure how I will include it in my application, but I will find out. First I need to configure Intellipad to give me an input / grammar / output triptych. I'm at a dead end. I can’t figure out how to set up a stream. Yes, I can perhaps take the song.mg project and rename it, but that does not give me any idea of ​​how this works. Any ideas?

+4
source share
3 answers

Here are the steps you should take

  • Open "Intellipad (Samples Included)"
  • File-> Open your DSL file (example.)
  • CTRL + SHIFT + D, enter "SetMode (" MGMode ")"
  • In the menu: MGrammar mode-> Tree preview
  • Select a grammar file (Song.mg)

This will open three types of viewing. The left window is your sample code, the middle is your grammar, and the tree structure of your output is on the right.

+5
source

Like @ Just-in-case said, but easier if you just:

(1) CTRL - SHIFT - T

(2) Open the MG file

Ie, From the laboratory document:

  • Open Intellipad (samples are included) either from the Start menu or enter 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 includes additional features, including the dynamic parsing editing mode that we are going to use.

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

    1. Select the Movies.mg file in the IntroToM \ Example02-MovieDSL \ begin folder.
+3
source

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

0
source

All Articles