DSL Tutorials (MGrammar)
DSL Tutorials (MGrammar)
[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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.

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View