Chris Anderson Engineer Microsoft Corporation Giovanni Della-Libera Development Lead Microsoft Corporation TL31
“Quadrant” The modeling tool “M” The modeling language Repository The store for models
“MSchema” Schematizing data A family of languages for manipulating data “MGrammar” Text to data “MGraph” Representing data
DSL "M""M" Domain-specific grammars Abstract data model Domain-specific data models language PointLanguage { syntax Main = h:Integer "," v:Integer => Point { X { h }, Y { v }}; } type Point { X : Integer; Y : Integer; } Point { X { 100 }, Y { 200 } } Point.m Domain Model Point.m Domain Model DSL Y DomainY.mg Domain Grammar DomainY.mg Domain Grammar DSL X DomainX.m Domain Model DomainX.m Domain Model DomainY.m Domain Model DomainY.m Domain Model DomainX.mg Domain Grammar DomainX.mg Domain Grammar PointLanguage.mg Domain Grammar PointLanguage.mg Domain Grammar MSchema MGrammar MGraph
Contact: giodl –
InputGrammarOutput Errors Transform TextMGraph
Contact: giodl – Step 1: Tokenize
token Alias = ("A".."Z" | "a".."z")+; Tokens define the “words” of your language Contact: giodl –
Step 2: Parse Contact: giodl –
syntax ContactEntry = "Contact" ":" alias:Alias "-" phone:Phone => Contact { Alias { alias }, Phone { phone } }; Syntax defines the “sentences” of your language Contact: giodl –
Remember interleave? Contact: giodl – interleave Ignorable = " " | "\n" | "\r“;
Shape the data… Contact: giodl – syntax ContactEntry = "Contact" ":" alias:Alias "-" phone:Phone => Contact { Alias { alias }, Phone { phone } };
Contact: giodl – syntax ContactEntry = "Contact" ":" alias:Alias "-" phone:Phone => Contact { Alias { alias }, Phone { phone } }; Contact AliasPhone giodl
Contact AliasPhone giodl syntax ContactEntry = "Contact" ":" alias:Alias "-" phone:Phone => Contact { Alias { alias }, Phone { phone } };
Please fill out your evaluation for this session at: This session will be available as a recording at:
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.