C# version of the parser developed in chapter 9 of Functional Programming in Scala