DSL Tutorials (MGrammar)

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

The tutorials in this section provide an introduction to programming in the MGrammar component of the Microsoft code name “M” language. Each tutorial introduces a new concept, so you should do them in order, because they build upon each other.

In This Section

Hello World (MGrammar)
Shows an introduction to creating a domain specific language (DSL) using the MGrammar feature of the Microsoft code name “M” language.

Handling Spaces (MGrammar)
Shows how to ignore extra spaces within your input text file and builds a DSL that parses a text file that lists all the types contained in a .NET Framework assembly.

Tokens: Handling Variable Fields (MGrammar)
Shows how to use the token keyword to identify fixed parts of the input text (keywords or field names), and to specify required conditions imposed on variable parts of the text (field values). You also learn how to make the domain specific language (DSL) accept more than a single line of input text.

A DSL for Movies (Video)
Shows how to how to use the MGrammar language (Mg) to write your own language for a Movies application.

Community Additions