# Copyright 2005-2008 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.syntax("0.9") pragma.enable("importer") pragma.enable("exporter") def makeEParser :DeepFrozen := def simpleRuneAuthor implements DeepFrozen, ExitViaHere { to defaultAuths() { def privilegedScope := return [ "file__uriGetter" => privilegedScope["file__uriGetter"], "privilegedScope" => privilegedScope ] } to run(auths :Map) { def [=> , => privilegedScope] | _ := auths def simpleRune { to run(args :List) { switch (args) { match [scriptName] + scriptArgs { def scope := privilegedScope.with("interp", def interp extends privilegedScope["interp"] { to getArgs() { return scriptArgs }}) return makeEParser.run([scriptName].getTwine()).asKernelE() <- eval(scope) } match [] { def [=> lisp] | _ := privilegedScope return lisp["CL", "FUNCALL"].getFunction()( lisp["E.UTIL", "SYSTEM-SYMBOL"].getFunction()( "REPL-START", "E.UPDOC", "e-on-cl.updoc")) } } } } return simpleRune } }