         
         yaml_event_delete(&event);
         
-        /* Cleanup */
         yaml_parser_delete(&parser);
         fclose(fileHandler);
     }
 
+        
+    // MARK: Private routines
+    
+    func scalarToString(scalar:scalar_t) -> String? {
+        let len = scalar.length
+        let ptr = scalar.value
+    
+        return cStringToString(ptr, length: len)
+    }
+    
+    func cStringToString(ptr: UnsafeMutablePointer<UInt8>, length len: Int) -> String? {
+        if let theString = NSString(bytes: ptr, length: len, encoding: NSUTF8StringEncoding) {
+            return theString as String
+        } else {
+            return nil
+        }
+    }
 }

        return (major, minor, patch)
    }
    
    public func parseStream (path:String, callback: (data:String) -> Void){
        let mode = "rb"
        


import yaml

typealias scalar_t = yaml_event_t.__Unnamed_union_data.__Unnamed_struct_scalar

public class YAMLParser {
    
    
    // MARK: Initialization
    
    public init() {
        
    }

    
    // MARK: Version
    
    public func yamlGetVersionString() -> String? {
        let version = yaml_get_version_string()
