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


import yaml

public class YAMLParser {
    
    public init() {
        
    }
    
    public func yamlGetVersionString() -> String? {
        let version = yaml_get_version_string()

        yaml_parser_set_input_file(&parser, fileHandler)
        
        repeat {
            if yaml_parser_parse(&parser, &event) == 0 {
                print("Parser error %d\n", parser.error)
                exit(EXIT_FAILURE);
            }
            
            switch(event.type) {
                case YAML_NO_EVENT: print("No event!")
                
                /* Stream start/end */
                case YAML_STREAM_START_EVENT:   print("STREAM START")
                case YAML_STREAM_END_EVENT:     print("STREAM END")
                
                /* Block delimeters */
                case YAML_DOCUMENT_START_EVENT: print("Start Document")
                case YAML_DOCUMENT_END_EVENT:   print("End Document")
                case YAML_SEQUENCE_START_EVENT: print("Start Sequence")
                case YAML_SEQUENCE_END_EVENT:   print("End Sequence")
                case YAML_MAPPING_START_EVENT:  print("Start Mapping")
                case YAML_MAPPING_END_EVENT:    print("End Mapping")
                
                /* Data */
                case YAML_ALIAS_EVENT:
                    print("Got alias (anchor: \(event.data.alias.anchor)");
                case YAML_SCALAR_EVENT:
                    
                    print("Got scalar (value: \(scalarToString(event.data.scalar)))")
                
                
            default: print("Uknown event");
            }
