A class I converted to VB.NET to C# a couple of years ago, and then to Objective-C about a year ago. Original version: http://www.codeproject.com/Articles/9519/An-expression-evaluator-written-in-VB-NET