A while back I mentioned Shawn Wildermuth's series on building domain specific languages using the Oslo modeling tools and now the remaining two parts of that series are available. The second and third parts of the series cover creating a textual domain specific language, including defining its grammar, and consuming the domain specific language from an application. Here's the complete article series for this tutorial.

Textual Domain Specific Languages for Developers, Part 1

Textual Domain Specific Languages for Developers, Part 2

Textual Domain Specific Languages for Developers, Part 3