function makeKeywords(str) {
        var obj = {}, words = str.split(" ");
        for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
        return obj;
    }
Author: Hans Engel
Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)