Lars Wilhelmsen

Microsoft Connected Systems MVP

Skip to: Content | Sidebar | Footer

Category: DSLs

Parsing the command line with MGrammar – part 2

19 March, 2009 (11:39) | .NET, C#, Codename+Oslo, DSLs, MGrammar, Programming | By: larsw

In the first installment of this series we took a look at the basic grammar for parsing the command line with MGrammar. In this part I’ll show you how we can load in a compiled version of the MGrammar and parse the input (i.e. the command line) to produce a valid MGraph that we in [...]

Parsing the command line with MGrammar – part 1

16 March, 2009 (20:56) | C#, Codename+Oslo, DSLs, MGrammar | By: larsw

Let’s take a look at how we can use MGrammar to create a mini-DSL for a language most developers knows quite well; command line arguments. Most applications that accepts arguments on the command line in Windows (or in Linux/Un*x for that matter) is on the form: Application.exe /a /b 123 /c “some input string goes [...]