Wednesday 2 April 2008
by Dermot Hogan
In this series, I’m going to start at the bottom of the DLR pond and work upwards towards the light.Specifically, I’m going to construct an ANTLR tree grammar for a calculator and show you how to wire this into a DLR framework. This is about as simple as you can get with the DLR and still do something meaningful. It’s a lot simpler than the Microsoft example, ToyScript, which comes with the Iron Python distribution. I’ve tried hard to pare the calculator example down to the absolute minimum required to actually do something non-trivial. But I don’t want to denigrate ToyScript – it’s an excellent example of how to use the DLR, but in my view it’s not quite introductory enough.