import Cocoa
var numericExpression = "7*(10+2)"
let expression = NSExpression(format: numericExpression)
var result = expression.expressionValueWithObject(nil, context: nil) as! NSNumber
print(result) // 84
import UIKit
var numericExpression = "7*(10+2)"
let expression = NSExpression(format: numericExpression)
var result = expression.expressionValueWithObject(nil, context: nil) as! NSNumber
print(result) // 84