eval(readFile('Compiled_NamespaceJS_Compiler')) oldLibrary = ' function runCoroutines(startingPoint){ //set up the context var context = {} var innerNamespace = new Object(); context.yieldTo = function(what) { throw [innerNamespace] what; } var outerNamespace = new Object(); context.returnFromCoroutine = function(what) { throw [outerNamespace] what; } //start the loop var next = startingPoint; try [outerNamespace]{ while[new Object()](true){ try [innerNamespace]{ next(context); } catch (what) { next = what; } } } catch(what){ return what; } } ' library =' function callcc(fn){ var continuationNs = new Object() try [continuationNs] { var continuationObject = function(val) { throw [continuationNs] val } fn(continuationObject) } catch (e) { return e } } function returnFromableFunction(fn){ return function() { try [fn] {fn()} catch (e) {return e} } } function returnFrom(fn, val) { throw [fn] val } ' runWithLibrary = function(program_str) { var a = NSJSParser.matchAll(library + program_str, "topLevel") var b = NSJSTranslator.match(a, "trans") eval(b) }