[
  {
    "path": ".gitignore",
    "content": "Gemfile.lock\nbuild\ntry-fargo/javascripts/fargo\ntry-fargo/downloads\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"vendor/js.class\"]\n\tpath = vendor/js.class\n\turl = git://github.com/jcoglan/js.class.git\n[submodule \"vendor/heist\"]\n\tpath = vendor/heist\n\turl = git://github.com/jcoglan/heist.git\n[submodule \"try-fargo/javascripts/jquery-console\"]\n\tpath = try-fargo/javascripts/jquery-console\n\turl = git://github.com/chrisdone/jquery-console.git\n"
  },
  {
    "path": "Gemfile",
    "content": "source :rubygems\ngem 'jake'\n\n"
  },
  {
    "path": "Jakefile",
    "content": "require 'fileutils'\n\njake_hook :build_complete do |build|\n  FileUtils.copy_entry build.source_dir + '/fargo/lib',\n                       build.build_dir + '/lib'\n  \n  FileUtils.copy_entry build.source_dir + '/../vendor/js.class/build/min',\n                       build.build_dir + '/js.class'\n  \n  FileUtils.cp 'vendor/heist/lib/builtin/syntax.scm',\n               build.build_dir + '/lib/syntax.scm'\n  \n  %w[util logic numeric list vector].each do |lib|\n    FileUtils.cp \"vendor/heist/lib/builtin/lib/#{lib}.scm\",\n                 build.build_dir + \"/lib/#{lib}.scm\"\n  end\n  \n  FileUtils.copy_entry build.build_dir,\n                       build.source_dir + '/../try-fargo/javascripts/fargo'\nend\n"
  },
  {
    "path": "README.markdown",
    "content": "# Fargo\n\nTry it out at http://fargo.jcoglan.com\n\nFargo is a programming language that runs on Node.js. It's designed to ease\nasynchronous functional programming by providing features missing in JavaScript,\nnamely tail recursion and some form of continuations. It is still an experiment\nand a toy.\n\nIt is loosely based on Scheme, in that I'm using Scheme's function names where\nappropriate. It is unlikely to become a complete Scheme implementation; at this\nstage it is an extremely minimal language that you can use where JavaScript is\nnot sufficiently expressive. The initial version was written in various airport\nand hotel bars. It is probably slow and full of bugs.\n\n\n## Building Fargo\n\n    git clone git://github.com/jcoglan/fargo.git\n    cd fargo\n    gem install jake\n    git submodule update --init --recursive\n    cd vendor/js.class\n    jake\n    cd ../../\n    jake\n    \n    node bin/fargo path/to/program.scm\n\n\n## Fibers\n\nThe main reason for Fargo's existence at present is to add fibers to the Node\nenvironment to make async programming easier. Fibers are a lightweight form of\ncontinuations that allow blocks of code to be suspended and resumed by the user.\nMany Ruby programmers are using fibers to let them write non-blocking code with\nblocking-style syntax.\n\nIn Fargo, fibers look like functions and are callable in the same way. When a\nfiber is running, you can use the `yield` function which suspends the fiber and\nreturns the yielded value as the result of the fiber's invokation. Next time you\ncall the fiber, it will resume from the last `yield`; the value you invoke the\nfiber with will become the result of the `yield` expression. Some basic examples:\n\n    (define stream (fiber (max)\n      (define (loop i)\n        (if (< i max)\n            (begin\n              (yield i)\n              (loop (+ i 1)))\n            'done))\n      (loop 0)))\n    \n    ; This binds 2 to `max` and begins running `stream`. The first `yield` is\n    ; called with 0. The next `yield` produces 1, then the fiber exits with `done`\n    (puts (stream 2)) ; -> 0\n    (puts (stream))   ; -> 1\n    (puts (stream))   ; -> done\n    \n    \n    (define test (fiber (first)\n      (define second (yield (+ first 2)))\n      second))\n    \n    ; Binds 10 to `first`, begins the fiber. 12 is yielded\n    (puts (test 10)) ; -> 12\n    \n    ; The `yield` is replaced with the value 14 and the fiber continues by\n    ; returning the value of `second`\n    (puts (test 14)) ; -> 14\n    \n    ; The fiber has no more code to run so this produces an error\n    (puts (test 18))\n\nFibers can help mask async code with callback-free APIs. Here's an example:\n\nIn Node we can make asynchronous HTTP requests. Let's write a function to expose\nthis facility to Fargo; our function will take a URL and a callback function (a\nFargo `Procedure` object, not a JavaScript function) and invoke the callback\nwith the response body after requesting the URL.\n\n    // lib-http.js\n    \n    Fargo.runtime.define('http-get', function(url, callback) {\n      var uri    = require('url').parse(url),\n          client = require('http').createClient(80, uri.hostname);\n      \n      var request = client.request('GET', uri.pathname);\n      request.addListener('response', function(response) {\n        var data = '';\n        response.addListener('data', function(c) { data += c });\n        response.addListener('end', function() {\n          callback.exec(data);\n        });\n      });\n      return request.end();\n    });\n\nIn Fargo, we can wrap this function in some Fiber yield/resume magic to give us\na callback-free version of the function. We can then use this function when\nrunning within a fiber to simplify our async code.\n\n    ; http.scm\n    \n    (load \"./lib-http.js\")\n    \n    ; This function captures the current fiber and initiates a request. It then\n    ; returns a `yield` as the return value, suspending the fiber. When the\n    ; callback is called, we resume the captured fiber with the response; the\n    ; response is injected at the point of the yield and is returned to the\n    ; caller.\n    (define (fiber-http-get url)\n      (define f (current-fiber))\n      (http-get url (lambda (response)\n        (f response)))\n      (yield))\n    \n    ; We wrap our main program in a fiber so it can be suspended at will\n    (define program (fiber ()\n      (define page (fiber-http-get \"http://www.google.com/\"))\n      (puts page)))\n    \n    ; Begins the main program fiber\n    (program)\n\n\n## Features\n\nFargo's syntax is that of Scheme. Booleans are written as `#t` and `#f`. Strings\nare be double-quoted only. Numeric literals are base-10 decimals. Lists are\ndelimited with `(` and `)`. Quoted values are prefixed with `'`. The null value\nis the empty list `'()`. Vectors and characters are currently not implemented.\n\nFargo implements the following syntax elements from Scheme:\n\n* `define` for binding variables and creating functions\n* `begin` for bundling blocks of code as single expressions\n* `if` for conditional branching\n* `lambda` for creating first-class anonymous functions\n* `quote` for defining immutable lists\n* `and` and `or` for boolean logic\n\nThe following predicates are included:\n\n* `eq?`, `eqv?`, `boolean?`, `number?`, `string?`, `symbol?`,\n  `pair?`, `null?`, `list?`, `procedure?`\n\nBinary numeric operators, which delegate to the JavaScript equivalents:\n\n* `+`, `-`, `*`, `/`, `>`, `>=`, `<`, `<=`, `=`\n\nList primitives and library functions:\n\n* `cons`, `car`, `cdr`, `set-car!`, `set-cdr!`, `length`, `map`\n\n\n## License\n\nCopyright (c) 2011 James Coglan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "bin/fargo",
    "content": "#!/usr/bin/env node\n\nvar path = require('path'),\n    sys  = require('sys'),\n    rl   = require('readline');\n\nJSCLASS_PATH = path.dirname(__filename) + '/../build/js.class';\nFARGO_PATH   = path.dirname(__filename) + '/../build';\n\nrequire(JSCLASS_PATH + '/loader');\nrequire(JSCLASS_PATH + '/core');\nrequire(JSCLASS_PATH + '/enumerable');\nrequire(path.dirname(__filename) + '/../build/fargo-min');\n\nvar runtime  = new Fargo.Runtime(),\n    filename = null;\n\nif (filename = process.ARGV[2]) {\n  runtime.run(path.resolve(filename));\n  \n} else {\n  var readline = rl.createInterface(process.stdin, process.stdout),\n      buffer   = '';\n  \n  var reset = function() {\n    buffer = '';\n    readline.setPrompt('> ');\n  };\n  \n  readline.addListener('line', function(line) {\n    buffer += (buffer === '' ? '' : '\\n') + line;\n    \n    var parser  = new Fargo.SchemeParser(buffer),\n        program = parser.parse();\n    \n    if (!program) {\n      if (parser.error.actual !== '<EOF>') {\n        reset();\n        sys.puts(Fargo.SchemeParser.formatError(parser.error));\n      } else {\n        readline.setPrompt('  ');\n      }\n      return readline.prompt();\n    }\n    \n    reset();\n    try {\n      var result = program.eval(runtime.scope);\n      sys.puts('; => ' + Fargo.stringify(result));\n    } catch (e) {\n      sys.puts(e);\n    }\n    \n    readline.prompt();\n  });\n  \n  readline.addListener('attemptClose', function() {\n    if (buffer.length === 0) {\n      readline.close();\n    } else {\n      reset();\n      sys.puts('');\n      readline.prompt();\n    }\n  });\n  \n  readline.prompt();\n}\n"
  },
  {
    "path": "examples/demo.scm",
    "content": "(define factorial (lambda (x)\n  (if (= 0 x)\n      1\n      (* (factorial (- x 1))\n         x))))\n\n(puts (factorial 2000))\n\n(define add (lambda (a)\n  (lambda (b)\n    (+ a b))))\n\n(puts ((add 2) 3))\n\n(puts '(a b c))\n(puts (cdr '(a b c)))\n\n(define list (cons 1 (cons 2 (cons 3 '()))))\n(set-car! (cdr list) 5)\n\n(puts list)\n(puts (eq? '(1 2) '(1 2)))\n(puts (eq? 'foo 'foo))\n(puts (eq? '() '()))\n(puts (list? 'foo))\n\n(define square (lambda (x) (* x x)))\n(puts (map square '(1 2 3 4)))\n\n(puts (let ((x 1)\n            (y 2)\n            (z 3)\n            (h 7))\n        (+ (+ x y) z)))\n\n(puts `(x y ,map))\n"
  },
  {
    "path": "examples/fibers.scm",
    "content": "(define stream (fiber (max)\n  (do ((i 0 (+ 1 i)))\n      ((eqv? max i) 'done)\n    (yield i))))\n\n(puts (stream 2))\n(puts (stream))\n(puts (stream))\n\n(define test (fiber (first)\n  (define second (yield (+ first 2)))\n  second))\n\n(puts (test 10))\n(puts (test 14))\n(puts (test 18))\n"
  },
  {
    "path": "examples/http.scm",
    "content": "(load \"./lib-http.js\")\n\n(define (fiber-http-get url)\n  (http-get url (current-fiber))\n  (yield))\n\n(define program (fiber ()\n  (define page (fiber-http-get \"http://www.google.com/\"))\n  (puts page)))\n\n(program)\n"
  },
  {
    "path": "examples/lib-http.js",
    "content": "Fargo.runtime.define('http-get', function(url, callback) {\n  var uri = require('url').parse(url),\n      client = require('http').createClient(80, uri.hostname);\n  \n  var request = client.request('GET', uri.pathname);\n  request.addListener('response', function(response) {\n    var data = '';\n    response.addListener('data', function(c) { data += c });\n    response.addListener('end', function() {\n      callback.exec(data);\n    });\n  });\n  return request.end();\n});\n"
  },
  {
    "path": "jake.yml",
    "content": "---\nsource_directory:   source\nbuild_directory:    build\nlayout:             together\n\nbuilds:\n  src:\n    suffix:         false\n    packer:         false\n  min:\n    shrink_vars:    true\n    private:        true\n\npackages:\n\n  fargo:\n    - fargo\n    - fargo/scheme\n    - fargo/scheme_nodes\n    - fargo/runtime/data/cons\n    - fargo/runtime/data/symbol\n    - fargo/runtime/data/vector\n    - fargo/runtime/callable/procedure\n    - fargo/runtime/callable/syntax\n    - fargo/runtime/callable/macro\n    - fargo/runtime/callable/macro/matches\n    - fargo/runtime/callable/macro/tree\n    - fargo/runtime/callable/macro/expansion\n    - fargo/runtime/callable/fiber\n    - fargo/runtime/stack\n    - fargo/runtime/stackless\n    - fargo/runtime/frame\n    - fargo/runtime/scope\n    - fargo/runtime/top_level\n    - fargo/runtime/value\n"
  },
  {
    "path": "source/fargo/lib/primitives.js",
    "content": "var Runtime = Fargo.Runtime,\n    Cons    = Runtime.Cons,\n    Symbol  = Runtime.Symbol,\n    NULL    = Cons.NULL;\n\n//================================================================\n// Core syntax\n\nFargo.runtime.syntax('define', function(scope, cells) {\n  if (cells.car.klass === Cons) {\n    var name   = cells.car.car.name,\n        params = cells.car.cdr,\n        body   = cells.cdr,\n        proc   = new Runtime.Procedure(scope, params, body);\n    \n    scope.define(name, proc);\n    return proc;\n    \n  } else if (cells.car.klass === Symbol) {\n    var value = Fargo.evaluate(cells.cdr.car, scope);\n    scope.define(cells.car.name, value);\n    return value;\n  }\n});\n\nFargo.runtime.syntax('set!', function(scope, cells) {\n  return scope.set(cells.car.name, Fargo.evaluate(cells.cdr.car, scope));\n});\n\nFargo.runtime.syntax('if', function(scope, cells) {\n  var which = (Fargo.evaluate(cells.car, scope) === false)\n            ? cells.cdr.cdr.car\n            : cells.cdr.car;\n  \n  if (which === undefined) return false;\n  else return new Runtime.Frame(which, scope);\n});\n\nFargo.runtime.syntax('begin', function(scope, cells) {\n  return new Runtime.Body(cells, scope);\n});\n\nFargo.runtime.syntax('lambda', function(scope, cells) {\n  return new Runtime.Procedure(scope, cells.car, cells.cdr);\n});\n\nFargo.runtime.syntax('quote', function(scope, cells) {\n  return Fargo.freeze(cells.car);\n});\n\nFargo.runtime.syntax('define-syntax', function(scope, cells) {\n  var macro = Fargo.evaluate(cells.cdr.car, scope);\n  scope.define(cells.car.name, macro);\n  return macro;\n});\n\nFargo.runtime.syntax('syntax-rules', function(scope, cells) {\n  return new Runtime.Macro(scope, cells.car, cells.cdr);\n});\n\n//================================================================\n// Fibers\n\nFargo.runtime.syntax('fiber', function(scope, cells) {\n  return new Runtime.Fiber(scope, cells.car, cells.cdr);\n});\n\nFargo.runtime.syntax('current-fiber', function(scope, cells) {\n  return scope.runtime.currentFiber;\n});\n\nFargo.runtime.define('yield', function(value) {\n  value = (value === undefined) ? NULL : value;\n  return {yieldValue: value};\n});\n\nFargo.runtime.define('call-with-current-continuation', function() {\n  return NULL;\n});\n\n//================================================================\n// I/O\n\nFargo.runtime.syntax('load', function(scope, cells) {\n  scope.run(Fargo.evaluate(cells.car, scope));\n  return true;\n});\n\nFargo.runtime.define('puts', function(string) {\n  Fargo.puts(string);\n  return string;\n});\n\nFargo.runtime.define('exit', function() {\n  process.exit();\n});\n\n//================================================================\n// Predicates\n\nvar eqv = function(a,b) {\n  if (a.klass === Symbol && b.klass === Symbol)\n    return a.name === b.name;\n  else\n    return a === b;\n};\nFargo.runtime.define('eqv?', eqv);\nFargo.runtime.define('eq?',  eqv);\n\nFargo.runtime.define('equal?', function(a, b) {\n  return (a && a.equals) ? a.equals(b) : a === b;\n});\n\nFargo.runtime.define('pair?', function(object) {\n  return object.klass === Cons && object !== NULL;\n});\n\nFargo.runtime.define('vector?', function(object) {\n  return object.klass === Runtime.Vector;\n});\n\nFargo.runtime.define('complex?', function(object) { return typeof object === 'number' });\nFargo.runtime.define('string?',  function(object) { return typeof object === 'string' });\n\nFargo.runtime.define('symbol?', function(object) {\n  return object.klass === Runtime.Symbol;\n});\n\nFargo.runtime.define('procedure?', function(object) {\n  return object.klass === Runtime.Function;\n});\n\n//================================================================\n// Math library\n\nFargo.runtime.define('+', function() {\n  var value = arguments[0];\n  if (value === undefined) value = 0;\n  for (var i = 1, n = arguments.length; i < n; i++) value += arguments[i];\n  return value;\n});\n\nFargo.runtime.define('-', function() {\n  var value = arguments[0];\n  if (arguments.length === 1) return 0 - value;\n  for (var i = 1, n = arguments.length; i < n; i++) value -= arguments[i];\n  return value;\n});\n\nFargo.runtime.define('*', function() {\n  var value = arguments[0];\n  if (value === undefined) value = 1;\n  for (var i = 1, n = arguments.length; i < n; i++) value *= arguments[i];\n  return value;\n});\n\nFargo.runtime.define('/', function() {\n  var value = arguments[0];\n  if (arguments.length === 1) return 1/value;\n  for (var i = 1, n = arguments.length; i < n; i++) value /= arguments[i];\n  return value;\n});\n\nFargo.runtime.define('<',  function(a,b) { return a <  b });\nFargo.runtime.define('<=', function(a,b) { return a <= b });\nFargo.runtime.define('>',  function(a,b) { return a >  b });\nFargo.runtime.define('>=', function(a,b) { return a >= b });\n\n'ceil floor round sin cos tan asin acos atan exp log sqrt random'.\nsplit(' ').forEach(function(fn) {\n  Fargo.runtime.define(fn, Math[fn]);\n});\n\nFargo.runtime.define('expt', Math.pow);\n\nFargo.runtime.define('number->string', function(number) {\n  return number.toString(10);\n});\n\nFargo.runtime.define('string->number', function(string) {\n  return parseFloat(string, 10);\n});\n\nFargo.runtime.define('PI', Math.PI);\n\n//================================================================\n// Lists and pairs\n\nFargo.runtime.define('cons', function(a,b) { return new Cons(a,b) });\n\nFargo.runtime.define('car', function(pair) { return pair.car });\nFargo.runtime.define('cdr', function(pair) { return pair.cdr });\n\nFargo.runtime.define('set-car!', function(pair, value) {\n  if (pair.frozen) throw new Error('Cannot set-car! on immutable list');\n  pair.car = value;\n  return value;\n});\n\nFargo.runtime.define('set-cdr!', function(pair, value) {\n  if (pair.frozen) throw new Error('Cannot set-cdr! on immutable list');\n  pair.cdr = value;\n  return value;\n});\n\nFargo.runtime.define('caar',   function(pair) { return pair.car.car });\nFargo.runtime.define('cadr',   function(pair) { return pair.cdr.car });\nFargo.runtime.define('cdar',   function(pair) { return pair.car.cdr });\nFargo.runtime.define('cddr',   function(pair) { return pair.cdr.cdr });\nFargo.runtime.define('caaar',  function(pair) { return pair.car.car.car });\nFargo.runtime.define('caadr',  function(pair) { return pair.cdr.car.car });\nFargo.runtime.define('cadar',  function(pair) { return pair.car.cdr.car });\nFargo.runtime.define('caddr',  function(pair) { return pair.cdr.cdr.car });\nFargo.runtime.define('cdaar',  function(pair) { return pair.car.car.cdr });\nFargo.runtime.define('cdadr',  function(pair) { return pair.cdr.car.cdr });\nFargo.runtime.define('cddar',  function(pair) { return pair.car.cdr.cdr });\nFargo.runtime.define('cdddr',  function(pair) { return pair.cdr.cdr.cdr });\nFargo.runtime.define('caaaar', function(pair) { return pair.car.car.car.car });\nFargo.runtime.define('caaadr', function(pair) { return pair.cdr.car.car.car });\nFargo.runtime.define('caadar', function(pair) { return pair.car.cdr.car.car });\nFargo.runtime.define('caaddr', function(pair) { return pair.cdr.cdr.car.car });\nFargo.runtime.define('cadaar', function(pair) { return pair.car.car.cdr.car });\nFargo.runtime.define('cadadr', function(pair) { return pair.cdr.car.cdr.car });\nFargo.runtime.define('caddar', function(pair) { return pair.car.cdr.cdr.car });\nFargo.runtime.define('cadddr', function(pair) { return pair.cdr.cdr.cdr.car });\nFargo.runtime.define('cdaaar', function(pair) { return pair.car.car.car.cdr });\nFargo.runtime.define('cdaadr', function(pair) { return pair.cdr.car.car.cdr });\nFargo.runtime.define('cdadar', function(pair) { return pair.car.cdr.car.cdr });\nFargo.runtime.define('cdaddr', function(pair) { return pair.cdr.cdr.car.cdr });\nFargo.runtime.define('cddaar', function(pair) { return pair.car.car.cdr.cdr });\nFargo.runtime.define('cddadr', function(pair) { return pair.cdr.car.cdr.cdr });\nFargo.runtime.define('cdddar', function(pair) { return pair.car.cdr.cdr.cdr });\nFargo.runtime.define('cddddr', function(pair) { return pair.cdr.cdr.cdr.cdr });\n\nFargo.runtime.define('apply', function(procedure, list) {\n  return procedure.apply(list.toArray());\n});\n\n//================================================================\n// Vectors\n\nFargo.runtime.define('make-vector', function(size, fill) {\n  if (fill === undefined) fill = NULL;\n  var elements = [];\n  while (size--) elements.push(fill);\n  return new Runtime.Vector(elements);\n});\n\nFargo.runtime.define('vector-length', function(vector) {\n  return vector.members.length;\n});\n\nFargo.runtime.define('vector-ref', function(vector, k) {\n  var size = vector.members.length;\n  if (k < 0 || k >= size) throw new Error('Index out of bounds');\n  return vector.members[k];\n});\n\nFargo.runtime.define('vector-set!', function(vector, k, object) {\n  var size = vector.members.length;\n  if (k < 0 || k >= size) throw new Error('Index out of bounds');\n  if (vector.frozen) throw new Error('Cannot vector-set! on immutable vector');\n  return vector.members[k] = object;\n});\n"
  },
  {
    "path": "source/fargo/lib/timers.js",
    "content": "Fargo.runtime.define('set-timeout', function(procedure, millis) {\n  return setTimeout(function() { procedure.exec() }, millis);\n});\n\nFargo.runtime.define('clear-timeout', function(id) {\n  clearTimeout(id);\n  return id;\n});\n\nFargo.runtime.define('set-interval', function(procedure, millis) {\n  return setInterval(function() { procedure.exec() }, millis);\n});\n\nFargo.runtime.define('clear-interval', function(id) {\n  clearInterval(id);\n  return id;\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/fiber.js",
    "content": "Fargo.Runtime.extend({\n  Fiber: new JS.Class(Fargo.Runtime.Procedure, {\n    apply: function(args) {\n      var R = Fargo.Runtime, NULL = R.Cons.NULL;\n      \n      if (!this._stack) {\n        this._scope = this._createScope(args);\n        this._stack = new R.Stack(new R.Body(this._body, this._scope));\n      }\n      \n      var runtime = this._scope.runtime,\n          fiber   = runtime.currentFiber,\n          stack   = runtime.stack;\n      \n      runtime.currentFiber = this;\n      runtime.stack = this._stack;\n      \n      var arg   = (args[0] === undefined) ? NULL : args[0],\n          value = runtime.stack.resume(arg);\n      \n      runtime.currentFiber = fiber;\n      runtime.stack = stack;\n      \n      return value;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/macro/expansion.js",
    "content": "Fargo.Runtime.Macro.extend({\n  Expansion: new JS.Class({\n    initialize: function(lexicalScope, callingScope, template, matches) {\n      this._lexicalScope = lexicalScope;\n      this._callingScope = callingScope;\n      this.expression    = this.expand(template, matches);\n    },\n    \n    expand: function(template, matches, depth, ignoringEllipses) {\n      var klass    = (template && template.klass),\n          depth    = depth || 0,\n          Cons     = Fargo.Runtime.Cons,\n          NULL     = Cons.NULL,\n          ELLIPSIS = Fargo.Runtime.Macro.ELLIPSIS,\n          result, last, repeater, templatePair,\n          push, cell, followedByEllipsis, dx;\n      \n      if (klass === Cons) {\n        if (template === NULL) return NULL;\n        \n        if (ELLIPSIS.equals(template.car))\n          return this.expand(template.cdr.car, matches, depth, true);\n        \n        templatePair = template;\n        \n        push = function(value) {\n          var pair = new Cons(value);\n          result = result || pair;\n          if (last) last.cdr = pair;\n          last = pair;\n        };\n        \n        while (templatePair.klass === Cons && templatePair !== NULL) {\n          cell = templatePair.car;\n          \n          followedByEllipsis = (templatePair.cdr.klass === Cons &&\n                                ELLIPSIS.equals(templatePair.cdr.car) &&\n                                !ignoringEllipses);\n          \n          dx = followedByEllipsis ? 1 : 0;\n          if (followedByEllipsis) repeater = cell;\n          \n          if (ELLIPSIS.equals(cell) && !ignoringEllipses) {\n            matches.expand(repeater, depth + 1, function() {\n              push(this.expand(repeater, matches, depth + 1));\n            }, this);\n          \n          } else if (!followedByEllipsis) {\n            push(this.expand(cell, matches, depth + dx, ignoringEllipses));\n          }\n          templatePair = templatePair.cdr;\n        }\n        \n        if (last)\n          last.cdr = this.expand(templatePair, matches, depth, ignoringEllipses);\n        \n        return result;\n      }\n      \n      else if (klass === Fargo.Runtime.Vector) {\n        result = [];\n        push = function(value) { result.push(value) };\n        \n        var elements = template.members;\n        for (var i = 0, n = elements.length; i < n; i++) {\n          cell = elements[i];\n          \n          followedByEllipsis = (ELLIPSIS.equals(template.get(i + 1)) && !ignoringEllipses);\n          dx = followedByEllipsis ? 1 : 0;\n          \n          if (followedByEllipsis) repeater = cell;\n          \n          if (ELLIPSIS.equals(cell) && !ignoringEllipses) {\n            matches.expand(repeater, depth + 1, function() {\n              push(this.expand(repeater, matches, depth + 1));\n            }, this);\n            \n          } else if (!followedByEllipsis) {\n            push(this.expand(cell, matches, depth + dx, ignoringEllipses));\n          }\n        }\n        \n        return new Fargo.Runtime.Vector(result);\n      }\n      \n      else if (klass === Fargo.Runtime.Symbol) {\n        if (matches.has(template.name)) return matches.get(template.name);\n        else return new Fargo.Runtime.Symbol(template.name);\n      }\n      \n      else\n        return template;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/macro/matches.js",
    "content": "Fargo.Runtime.Macro.extend({\n  Matches: new JS.Class({\n    initialize: function(pattern, formals) {\n      this._data = {};\n      var names  = Fargo.Runtime.Macro.patternVars(pattern, formals),\n          i      = names.length;\n      \n      while (i--) this._data[names[i]] = new Fargo.Runtime.Macro.Tree(names[i]);\n    },\n    \n    descend: function(names, depth) {\n      for (var name in this._data) {\n        if (names.indexOf(name) >= 0) this._data[name].descend(depth);\n      }\n    },\n    \n    put: function(name, value) {\n      if (this._data.hasOwnProperty(name))\n        this._data[name].push(value);\n    },\n    \n    has: function(name) {\n      return this._data.hasOwnProperty(name);\n    },\n    \n    get: function(name) {\n      return this._data[name].read();\n    },\n    \n    expand: function(template, depth, callback, context) {\n      var names = Fargo.Runtime.Macro.patternVars(template),\n          i     = this._size(names, depth);\n      \n      while (i--) {\n        callback.call(context);\n        this._iterate(names, depth);\n      }\n    },\n    \n    _size: function(names, depth) {\n      var sizes = [], size;\n      for (var name in this._data) {\n        size = this._data[name].size(depth);\n        if (names.indexOf(name) >= 0 && size !== null && sizes.indexOf(size) < 0)\n          sizes.push(size);\n      }\n      if (sizes.length === 1) return sizes[0];\n      else throw new Error('Mismatched repetition patterns');\n    },\n    \n    _iterate: function(names, depth) {\n      for (var name in this._data) {\n        if (names.indexOf(name) >= 0) this._data[name].shift(depth);\n      }\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/macro/tree.js",
    "content": "Fargo.Runtime.Macro.extend({\n  Tree: new JS.Class({\n    initialize: function(name) {\n      this._name  = name;\n      this._data  = [];\n      this._depth = 0;\n    },\n    \n    descend: function(depth) {\n      this._tail(depth-1).push([]);\n      this._depth = Math.max(this._depth, depth);\n    },\n    \n    push: function(value) {\n      this._tail(this._depth).push(value);\n    },\n    \n    read: function() {\n      var indexes = this._indexes(),\n          depth   = this._depth;\n      return this._current(depth)[indexes[depth]];\n    },\n    \n    shift: function(depth) {\n      if (depth > this._depth) return;\n      var indexes = this._indexes();\n      indexes[depth] += 1;\n      if (indexes[depth] >= this._current(depth).length)\n        indexes[depth] = 0;\n    },\n    \n    size: function(depth) {\n      if (depth > this._depth) return null;\n      return this._current(depth).length;\n    },\n    \n    _tail: function(depth) {\n      var list = this._data;\n      while (depth--) list = list[list.length - 1];\n      return list;\n    },\n    \n    _current: function(depth) {\n      var list = this._data,\n          idx  = this._indexes();\n      for (var i = 0; i < depth; i++) list = list[idx[i]];\n      return list;\n    },\n    \n    _indexes: function() {\n      if (this._idx) return this._idx;\n      this._idx = [];\n      for (var i = 0, n = this._depth; i <= n; i++) this._idx.push(0);\n      return this._idx;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/macro.js",
    "content": "Fargo.Runtime.extend({\n  Macro: new JS.Class(Fargo.Runtime.Procedure, {\n    extend: {\n      ELLIPSIS: new Fargo.Runtime.Symbol('...'),\n      RESERVED: ['_', '...'],\n      \n      patternVars: function(pattern, excluded, results) {\n        excluded = excluded || [];\n        results  = results  || [];\n        if (pattern === Fargo.Runtime.Cons.NULL) return results;\n        \n        var klass = (pattern && pattern.klass),\n            Cons  = Fargo.Runtime.Cons,\n            NULL  = Cons.NULL,\n            name, cell, elements, i;\n        \n        if (klass === Fargo.Runtime.Symbol) {\n          name = pattern.name;\n          if (excluded.indexOf(name) >= 0 || this.RESERVED.indexOf(name) >= 0) return;\n          if (results.indexOf(name) < 0) results.push(name);\n        }\n        \n        if (klass === Cons) {\n          cell = pattern;\n          while (cell.klass === Cons && cell !== NULL) {\n            this.patternVars(cell.car, excluded, results);\n            cell = cell.cdr;\n          }\n          this.patternVars(cell, excluded, results);\n        }\n        \n        if (klass === Fargo.Runtime.Vector) {\n          elements = pattern.members;\n          i = elements.length;\n          while (i--) this.patternVars(elements[i], excluded, results);\n        }\n        \n        return results;\n      }\n    },\n    \n    initialize: function() {\n      this.callSuper();\n      this._params = this._params.map(function(s) { return s.name });\n    },\n    \n    call: function(scope, cells) {\n      var result = this.ruleFor(cells, scope);\n      if (!result) throw new Error('Syntax error');\n      return new this.klass.Expansion(this._lexicalScope, scope, result[0].car.cdr.car, result[1]);\n    },\n    \n    ruleFor: function(cells, scope) {\n      var rule = this._body,\n          Cons = Fargo.Runtime.Cons,\n          NULL = Cons.NULL;\n      \n      while (rule !== NULL) {\n        var matches = this.ruleMatches(scope, rule.car.car.cdr, cells);\n        if (matches) return [rule, matches];\n        rule = rule.cdr;\n      }\n    },\n    \n    ruleMatches: function(scope, pattern, input, matches, depth) {\n      matches = matches || new this.klass.Matches(pattern, this._params);\n      depth   = depth || 0;\n      \n      var klass = (pattern && pattern.klass),\n          Cons  = Fargo.Runtime.Cons,\n          NULL  = Cons.NULL,\n          self  = this,\n          patternPair, inputPair,\n          token, followedByEllipsis,\n          dx, consume, consumed, inputIndex;\n      \n      if (klass === Cons) {\n        if (pattern === NULL) return (input === NULL) ? matches : null;\n        if (!input || input.klass !== Cons) return null;\n        \n        patternPair = pattern,\n        inputPair   = input;\n        \n        while (patternPair.klass === Cons && patternPair !== NULL) {\n          token = patternPair.car;\n          \n          if (this.klass.ELLIPSIS.equals(token)) {\n            patternPair = patternPair.cdr;\n            continue;\n          }\n          followedByEllipsis = this.klass.ELLIPSIS.equals(patternPair.cdr.car);\n          dx = followedByEllipsis ? 1 : 0;\n          \n          if (followedByEllipsis)\n            matches.descend(this.klass.patternVars(token, this._params), depth + dx);\n          \n          consume = function() {\n            return (inputPair.klass === Cons && inputPair !== NULL)\n                ? self.ruleMatches(scope, token, inputPair.car, matches, depth + dx)\n                : null;\n          };\n          \n          consumed = consume();\n          if (!consumed && !followedByEllipsis) return null;\n          if (consumed) inputPair = inputPair.cdr;\n          while (followedByEllipsis && consume()) inputPair = inputPair.cdr;\n          patternPair = patternPair.cdr;\n        }\n        if (!this.ruleMatches(scope, patternPair, inputPair, matches, depth))\n          return null;\n      }\n      \n      else if (klass === Fargo.Runtime.Vector) {\n        if (!input || input.klass !== Fargo.Runtime.Vector) return null;\n        \n        inputIndex = 0;\n        \n        var elements = pattern.members;\n        for (var i = 0, n = elements.length; i < n; i++) {\n          token = elements[i];\n          if (this.klass.ELLIPSIS.equals(token)) continue;\n          \n          followedByEllipsis = this.klass.ELLIPSIS.equals(pattern.get(i + 1));\n          dx = followedByEllipsis ? 1 : 0;\n          \n          if (followedByEllipsis)\n            matches.descend(this.klass.patternVars(token, this._params), depth + dx);\n          \n          consume = function() {\n            return input.get(inputIndex) !== undefined &&\n                   self.ruleMatches(scope, token, input.get(inputIndex), matches, depth + dx);\n          };\n          \n          consumed = consume();\n          if (!consumed && !followedByEllipsis) return null;\n          if (consumed) inputIndex += 1;\n          while (followedByEllipsis && consume()) inputIndex += 1;\n        }\n        \n        if (inputIndex !== input.length) return null;\n      }\n      \n      else if (klass === Fargo.Runtime.Symbol) {\n        if (this._params.indexOf(pattern.name) >= 0)\n          return pattern.equals(input) && this._lexicalScope.innermostBinding(pattern.name)\n                                          === scope.innermostBinding(input.name);\n        else\n          matches.put(pattern.name, input);\n      }\n      \n      else {\n        if (pattern !== input) return null;\n      }\n      \n      return matches;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/procedure.js",
    "content": "Fargo.Runtime.extend({\n  Procedure: new JS.Class({\n    initialize: function(scope, params, body) {\n      this._lexicalScope = scope;\n      this._runtime = scope.runtime;\n      \n      if (typeof params === 'function') {\n        this._body = params;\n      } else {\n        this._params = params;\n        this._body   = body;\n      }\n    },\n    \n    call: function(scope, cells) {\n      var args = [],\n          cell = cells,\n          NULL = Fargo.Runtime.Cons.NULL;\n      \n      while (cell !== NULL) {\n        args.push(Fargo.evaluate(cell.car, scope));\n        cell = cell.cdr;\n      }\n      return this.apply(args);\n    },\n    \n    apply: function(args) {\n      var NULL = Fargo.Runtime.Cons.NULL;\n      \n      if (typeof this._body === 'function')\n        return this._body.apply(this, args);\n      \n      var scope = this._createScope(args);\n      return new Fargo.Runtime.Body(this._body, scope);\n    },\n    \n    exec: function() {\n      var args = [].slice.call(arguments);\n      var frame = this.apply(args);\n      return this._runtime.stack.push(frame);\n    },\n    \n    toString: function() {\n      var name = this.name ? ':' + this.name : '';\n      return '#<procedure' + name + '>';\n    },\n    \n    _createScope: function(args) {\n      var Cons  = Fargo.Runtime.Cons,\n          NULL  = Cons.NULL,\n          param = this._params,\n          scope = this._lexicalScope.spawn(),\n          i     = 0;\n      \n      while (param.klass === Cons && param !== NULL) {\n        scope.define(param.car.name, args[i]);\n        param = param.cdr;\n        i += 1;\n      }\n      if (param !== NULL)\n        scope.define(param.name, Cons.list(args.slice(i)));\n      \n      return scope;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/callable/syntax.js",
    "content": "Fargo.Runtime.extend({\n  Syntax: new JS.Class(Fargo.Runtime.Procedure, {\n    call: function(scope, cells) {\n      return this._body.call(this, scope, cells);\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/data/cons.js",
    "content": "Fargo.Runtime.extend({\n  Cons: new JS.Class({\n    include: JS.Enumerable,\n    \n    initialize: function(car, cdr) {\n      this.car = (car === undefined) ? this.klass.NULL : car;\n      this.cdr = (cdr === undefined) ? this.klass.NULL : cdr;\n      \n      if (this.car !== this.klass.NULL) this.car.parent = this;\n    },\n    \n    forEach: function(block, context) {\n      var pair = this;\n      while (pair.klass === this.klass && pair !== this.klass.NULL) {\n        block.call(context, pair.car);\n        pair = pair.cdr;\n      }\n    },\n    \n    clone: function() {\n      return this.klass.list(this);\n    },\n    \n    equals: function(other) {\n      if (!other || other.klass !== this.klass) return false;\n      var E = JS.Enumerable;\n      return E.areEqual(this.car, other.car) &&\n             E.areEqual(this.cdr, other.cdr);\n    },\n    \n    eval: function(scope) {\n      var frame = new Fargo.Runtime.Frame(this, scope);\n      return scope.runtime.stack.push(frame);\n    },\n    \n    freeze: function() {\n      if (this.frozen) return;\n      this.frozen = true;\n      Fargo.freeze(this.car);\n      Fargo.freeze(this.cdr);\n    },\n    \n    toString: function() {\n      var elems  = [],\n          pair   = this,\n          NULL   = this.klass.NULL;\n      \n      while (pair.klass === this.klass && pair !== NULL) {\n        elems.push(Fargo.stringify(pair.car));\n        pair = pair.cdr;\n      }\n      \n      var tail = (pair === NULL) ? '' : ' . ' + pair;\n      return '(' + elems.join(' ') + tail + ')';\n    }\n  })\n});\n\nFargo.Runtime.Cons.extend({\n  list: function(array, tail) {\n    var list, tail, i;\n    \n    if (array.klass === this) {\n      list = tail = new this();\n      while (array !== this.NULL) {\n        tail.car = array.car;\n        tail = tail.cdr = (array.cdr === this.NULL) ? this.NULL : new this();\n        array = array.cdr;\n      }\n      \n    } else {\n      list = tail || this.NULL;\n      i = array.length;\n      while (i--) list = new this(array[i], list);\n    }\n    return list;\n  },\n  \n  NULL: new Fargo.Runtime.Cons()\n});\n\n(function() {\n  var nil = Fargo.Runtime.Cons.NULL;\n  nil.extend({\n    car:      undefined,\n    cdr:      undefined,\n    equals:   function(other) { return other === this },\n    toString: function() { return '()' }\n  });\n})();\n"
  },
  {
    "path": "source/fargo/runtime/data/symbol.js",
    "content": "Fargo.Runtime.extend({\n  Symbol: new JS.Class({\n    initialize: function(name) {\n      this.name = name;\n    },\n    \n    equals: function(other) {\n      return other && other.klass === this.klass && other.name === this.name;\n    },\n    \n    eval: function(scope) {\n      return scope.resolve(this.name);\n    },\n    \n    toString: function() {\n      return this.name;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/data/vector.js",
    "content": "Fargo.Runtime.extend({\n  Vector: new JS.Class({\n    include: JS.Enumerable,\n    \n    initialize: function(elements) {\n      this.members = elements.slice();\n      this.length  = elements.length;\n    },\n    \n    forEach: function(block, context) {\n      for (var i = 0, n = this.members.length; i < n; i++)\n        block.call(context, this.members[i]);\n    },\n    \n    equals: function(other) {\n      if (!other || other.klass !== this.klass) return false;\n      if (other.length !== this.length) return false;\n      var i = this.length;\n      while (i--) {\n        if (!JS.Enumerable.areEqual(this.members[i], other.members[i]))\n          return false;\n      }\n      return true;\n    },\n    \n    get: function(index) {\n      return this.members[index];\n    },\n    \n    clone: function() {\n      return new this.klass(this.members);\n    },\n    \n    eval: function(scope) {\n      return this.clone();\n    },\n    \n    freeze: function() {\n      if (this.frozen) return;\n      this.frozen = true;\n      var el = this.members, i = el.length;\n      while (i--) Fargo.freeze(el[i]);\n    },\n    \n    toString: function() {\n      var elems = [];\n      \n      for (var i = 0, n = this.members.length; i < n; i++)\n        elems.push(Fargo.stringify(this.members[i]));\n      \n      return '#(' + elems.join(' ') + ')';\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/frame.js",
    "content": "Fargo.Runtime.extend({\n  Frame: new JS.Class({\n    initialize: function(expression, scope) {\n      this._reset(expression);\n      this._scope = scope;\n    },\n    \n    process: function() {\n      var expr    = this._expression,\n          scope   = this._scope,\n          Runtime = Fargo.Runtime,\n          Cons    = Runtime.Cons,\n          NULL    = Cons.NULL;\n      \n      if (!expr || expr.klass !== Cons) {\n        this.complete = true;\n        return Fargo.evaluate(expr, scope);\n      }\n      \n      var proc = this._values.car;\n      \n      if (proc.klass === Runtime.Syntax || proc.klass === Runtime.Macro || this._current === NULL) {\n        \n        if (typeof proc.call !== 'function')\n          throw new Error('Invalid expression: ' + this._expression);\n        \n        this.complete = true;\n        var result = proc.call(scope, this._values.cdr);\n        if (result === null || result === undefined)\n          throw new Error('Expression returned no value: ' + expression);\n        \n        return (result && result.klass === Fargo.Runtime.Macro.Expansion)\n            ? this._reset(result.expression, true)\n            : result;\n      }\n      \n      var stack   = scope.runtime.stack,\n          current = this._current,\n          value   = this._curValue;\n      \n      var result = stack.push(new Runtime.Frame(current.car, scope));\n      \n      this._curValue.car = result;\n      this._current = this._current.cdr;\n      this._curValue = this._curValue.cdr;\n      \n      return result;\n    },\n    \n    fill: function(frame, result) {\n      var subexpr = frame.target,\n          expr    = this._expression,\n          value   = this._values,\n          NULL    = Fargo.Runtime.Cons.NULL;\n      \n      while (expr.car !== subexpr && expr !== NULL) {\n        expr = expr.cdr;\n        value = value.cdr;\n      }\n      if (expr !== NULL) value.car = new Fargo.Runtime.Value(result);\n    },\n    \n    _reset: function(expression, replace) {\n      if (replace) {\n        this._expression.parent.car = expression;\n        expression.parent = this._expression.parent;\n      }\n      this._expression = expression;\n      this.target      = expression;\n      this._current    = expression;\n      this._values     = Fargo.clone(expression);\n      this._curValue   = this._values;\n      this.complete    = false;\n    }\n  })\n});\n\nFargo.Runtime.extend({\n  Body: new JS.Class(Fargo.Runtime.Frame, {\n    initialize: function(expressions, scope) {\n      this._expression = expressions;\n      this._scope      = scope;\n      this._values     = [];\n    },\n    \n    process: function() {\n      var expression = this._expression.car,\n          Frame      = Fargo.Runtime.Frame,\n          NULL       = Fargo.Runtime.Cons.NULL;\n      \n      this._expression = this._expression.cdr;\n      \n      if (this._expression === NULL) {\n        this.complete = true;\n        return new Frame(expression, this._scope);\n      }\n      \n      var stack = this._scope.runtime.stack;\n      return stack.push(new Frame(expression, this._scope));\n    },\n    \n    fill: function() {}\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/scope.js",
    "content": "Fargo.Runtime.extend({\n  Scope: new JS.Class({\n    initialize: function(runtime, parent) {\n      this.runtime = runtime;\n      this._parent = parent;\n      this._vars   = {};\n    },\n    \n    spawn: function() {\n      return new Fargo.Runtime.Scope(this.runtime, this);\n    },\n    \n    set: function(name, value) {\n      var scope = this.innermostBinding(name);\n      if (!scope) throw new Error('Undefined variable ' + name);\n      return scope._vars[name] = value;\n    },\n    \n    resolve: function(name) {\n      var value, scope = this;\n      while (value === undefined && scope) {\n        value = scope._vars[name];\n        scope = scope._parent;\n      }\n      if (value !== undefined) return value;\n      throw new Error('Undefined variable ' + name);\n    },\n    \n    innermostBinding: function(name) {\n      var scope = this;\n      while (scope && !scope._vars.hasOwnProperty(name))\n        scope = scope._parent;\n      return scope;\n    },\n    \n    define: function(name, value) {\n      if (typeof value === 'function') value = new Fargo.Runtime.Procedure(this, value);\n      if (!value.name) value.name = name;\n      return this._vars[name] = value;\n    },\n    \n    syntax: function(name, block) {\n      var syntax = new Fargo.Runtime.Syntax(this, block);\n      syntax.name = name;\n      return this._vars[name] = syntax;\n    },\n    \n    run: function(pathname) {\n      var dirname = this._path ? Fargo.dirname(this._path) : '',\n          fqpath  = Fargo.path(dirname, pathname),\n          runtime = Fargo.runtime,\n          scope   = new Fargo.Runtime.FileScope(fqpath, this.runtime, this);\n      \n      Fargo.runtime = this.runtime;\n      if (!/\\.[^\\.\\/]+$/.test(fqpath)) fqpath += '.scm';\n      \n      if (/\\.js$/i.test(fqpath)) {\n        Fargo.loadJavaScript(fqpath);\n      } else {\n        var source  = Fargo.readFile(fqpath),\n            parser  = new Fargo.SchemeParser(source),\n            program = parser.parse();\n        \n        if (program) program.eval(scope);\n        else throw new Error(Fargo.SchemeParser.formatError(parser.error));\n      }\n      \n      Fargo.runtime = runtime;\n    }\n  })\n});\n\nFargo.Runtime.extend({\n  FileScope: new JS.Class(Fargo.Runtime.Scope, {\n    initialize: function(path, runtime, parent) {\n      this._path   = path;\n      this.runtime = runtime;\n      this._parent = parent;\n      this._vars   = parent._vars;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/stack.js",
    "content": "Fargo.Runtime.extend({\n  Stack: new JS.Class({\n    initialize: function(frame) {\n      this._frames = [];\n      if (frame) this._frames.push(frame);\n    },\n    \n    resume: function(value) {\n      var frames = this._frames, last;\n      if (frames.length === 0) throw new Error('Dead fiber called');\n      \n      if (this._yield) {\n        last = frames.pop();\n        frames[frames.length - 1].fill(last, value);\n        delete this._yield;\n      }\n      \n      this.clear();\n      return this._yield ? this._value.yieldValue : this._value;\n    },\n    \n    push: function(frame) {\n      var frames = this._frames;\n      frames.push(frame);\n      this.clear(frames.length - 1);\n      return this._value;\n    },\n    \n    clear: function(limit) {\n      var frames = this._frames,\n          limit  = limit || 0;\n      \n      while (frames.length > limit && !this._yield)\n        this.process();\n    },\n    \n    process: function() {\n      var frames = this._frames,\n          Frame  = Fargo.Runtime.Frame,\n          last   = frames[frames.length - 1],\n          value  = last.process(),\n          klass  = value && value.klass;\n      \n      this.setValue(value);\n      if (this._yield || frames.length === 0 || !last.complete) return;\n      \n      if (this._tail) this._value.target = last.target;\n      frames.pop();\n      \n      if (klass && (klass === Frame || klass.superclass === Frame))\n        this._frames.push(value);\n    },\n    \n    setValue: function(value) {\n      var Frame = Fargo.Runtime.Frame;\n      this._value = value;\n      this._yield = value && value.yieldValue !== undefined;\n      \n      this._tail = value && value.klass &&\n                   (value.klass === Frame ||\n                    value.klass.superclass === Frame);\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/stackless.js",
    "content": "Fargo.Runtime.extend({\n  Stackless: new JS.Class({\n    push: function(frame) {\n      this._current = frame;\n      var Frame = Fargo.Runtime.Frame,\n          klass = this._current.klass;\n      \n      while (klass && (klass === Frame || klass.superclass === Frame)) {\n        this._current = this.process();\n        klass = (this._current || {}).klass;\n      }\n      \n      return this._current;\n    },\n    \n    process: function() {\n      var expression = this._current._expression,\n          scope      = this._current._scope,\n          NULL       = Fargo.Runtime.Cons.NULL;\n      \n      if (this._current.klass === Fargo.Runtime.Body) {\n        while (expression.cdr !== NULL) {\n          Fargo.evaluate(expression.car, scope);\n          expression = expression.cdr;\n        }\n        \n        return new Fargo.Runtime.Frame(expression.car, scope);\n      }\n      if (expression.klass !== Fargo.Runtime.Cons)\n        return Fargo.evaluate(expression, scope);\n      \n      var proc = (expression !== NULL) && Fargo.evaluate(expression.car, scope);\n      if (typeof proc.call !== 'function')\n        throw new Error('Invalid expression: ' + expression);\n      \n      var result = proc.call(scope, expression.cdr);\n      if (result === null || result === undefined)\n        throw new Error('Expression has no value: ' + expression);\n      \n      if (!result || result.klass !== Fargo.Runtime.Macro.Expansion)\n        return result;\n      \n      expression.parent.car = result.expression;\n      result.expression.parent = expression.parent;\n      \n      return new Fargo.Runtime.Frame(result.expression, scope);\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/top_level.js",
    "content": "Fargo.Runtime.extend({\n  TopLevel: new JS.Class(Fargo.Runtime.Scope, {\n    initialize: function() {\n      this.callSuper();\n      this.runtime.scope = this;\n      \n      // Built-in functions and syntax\n      this.run(FARGO_PATH + '/lib/primitives.js');\n      this.run(FARGO_PATH + '/lib/syntax.scm');\n      \n      // Core Scheme libraries\n      this.run(FARGO_PATH + '/lib/util.scm');\n      this.run(FARGO_PATH + '/lib/logic.scm');\n      this.run(FARGO_PATH + '/lib/numeric.scm');\n      this.run(FARGO_PATH + '/lib/list.scm');\n      this.run(FARGO_PATH + '/lib/vector.scm');\n      \n      // Fargo platform libraries\n      this.run(FARGO_PATH + '/lib/timers.js');\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/runtime/value.js",
    "content": "Fargo.Runtime.extend({\n  Value: new JS.Class({\n    initialize: function(value) {\n      this.value = value;\n    }\n  })\n});\n"
  },
  {
    "path": "source/fargo/scheme.js",
    "content": "\n(function() {;\n    var namespace = this;\n    namespace = namespace.Fargo = namespace.Fargo || {};\n    if (typeof exports === \"object\") {\n        exports.Fargo = this.Fargo;\n    }\n})();\n\nFargo.Scheme = new JS.Module(\"Fargo.Scheme\", {\n    root: \"program\",\n    __consume__program: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.program = this._nodeCache.program || {};\n        var cached = this._nodeCache.program[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var index2 = this._offset;\n        address1 = this.__consume__shebang();\n        if (address1) {\n        } else {\n            this._offset = index2;\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"\", this._offset, []);\n            this._offset += 0;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var remaining0 = 0;\n            var index3 = this._offset;\n            var elements1 = [];\n            var text1 = \"\";\n            var address3 = true;\n            while (address3) {\n                address3 = this.__consume__cell();\n                if (address3) {\n                    elements1.push(address3);\n                    text1 += address3.textValue;\n                    remaining0 -= 1;\n                }\n            }\n            if (remaining0 <= 0) {\n                this._offset = index3;\n                var klass1 = this.klass.SyntaxNode;\n                address2 = new klass1(text1, this._offset, elements1);\n                this._offset += text1.length;\n            } else {\n                address2 = null;\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass2 = null;\n            if (Fargo.Scheme.Program instanceof Function) {\n                klass2 = Fargo.Scheme.Program;\n            } else {\n                klass2 = this.klass.SyntaxNode;\n            }\n            address0 = new klass2(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.Program instanceof Function)) {\n                address0.extend(Fargo.Scheme.Program);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.program[index0] = address0;\n    },\n    __consume__shebang: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.shebang = this._nodeCache.shebang || {};\n        var cached = this._nodeCache.shebang[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var remaining0 = 0;\n        var index2 = this._offset;\n        var elements1 = [];\n        var text1 = \"\";\n        var address2 = true;\n        while (address2) {\n            address2 = this.__consume__space();\n            if (address2) {\n                elements1.push(address2);\n                text1 += address2.textValue;\n                remaining0 -= 1;\n            }\n        }\n        if (remaining0 <= 0) {\n            this._offset = index2;\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(text1, this._offset, elements1);\n            this._offset += text1.length;\n        } else {\n            address1 = null;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address3 = null;\n            var slice0 = null;\n            if (this._input.length > this._offset) {\n                slice0 = this._input.substring(this._offset, this._offset + 2);\n            } else {\n                slice0 = null;\n            }\n            if (slice0 === \"#!\") {\n                var klass1 = this.klass.SyntaxNode;\n                address3 = new klass1(\"#!\", this._offset, []);\n                this._offset += 2;\n            } else {\n                address3 = null;\n                var slice1 = null;\n                if (this._input.length > this._offset) {\n                    slice1 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice1 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n                }\n            }\n            if (address3) {\n                elements0.push(address3);\n                text0 += address3.textValue;\n                var address4 = null;\n                var remaining1 = 0;\n                var index3 = this._offset;\n                var elements2 = [];\n                var text2 = \"\";\n                var address5 = true;\n                while (address5) {\n                    var index4 = this._offset;\n                    var elements3 = [];\n                    var labelled1 = {};\n                    var text3 = \"\";\n                    var address6 = null;\n                    var index5 = this._offset;\n                    var slice2 = null;\n                    if (this._input.length > this._offset) {\n                        slice2 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice2 = null;\n                    }\n                    var temp0 = slice2;\n                    var match0 = null;\n                    if (match0 = temp0 && temp0.match(/^[\\n\\r]/)) {\n                        var klass2 = this.klass.SyntaxNode;\n                        address6 = new klass2(match0[0], this._offset, []);\n                        this._offset += 1;\n                    } else {\n                        address6 = null;\n                        var slice3 = null;\n                        if (this._input.length > this._offset) {\n                            slice3 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice3 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[\\n\\r]\", actual: slice3 || \"<EOF>\"};\n                        }\n                    }\n                    this._offset = index5;\n                    if (!(address6)) {\n                        var klass3 = this.klass.SyntaxNode;\n                        address6 = new klass3(\"\", this._offset, []);\n                        this._offset += 0;\n                    } else {\n                        address6 = null;\n                    }\n                    if (address6) {\n                        elements3.push(address6);\n                        text3 += address6.textValue;\n                        var address7 = null;\n                        var slice4 = null;\n                        if (this._input.length > this._offset) {\n                            slice4 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice4 = null;\n                        }\n                        var temp1 = slice4;\n                        if (temp1 === null) {\n                            address7 = null;\n                            var slice5 = null;\n                            if (this._input.length > this._offset) {\n                                slice5 = this._input.substring(this._offset, this._offset + 1);\n                            } else {\n                                slice5 = null;\n                            }\n                            if (!this.error || this.error.offset <= this._offset) {\n                                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice5 || \"<EOF>\"};\n                            }\n                        } else {\n                            var klass4 = this.klass.SyntaxNode;\n                            address7 = new klass4(temp1, this._offset, []);\n                            this._offset += 1;\n                        }\n                        if (address7) {\n                            elements3.push(address7);\n                            text3 += address7.textValue;\n                        } else {\n                            elements3 = null;\n                            this._offset = index4;\n                        }\n                    } else {\n                        elements3 = null;\n                        this._offset = index4;\n                    }\n                    if (elements3) {\n                        this._offset = index4;\n                        var klass5 = this.klass.SyntaxNode;\n                        address5 = new klass5(text3, this._offset, elements3, labelled1);\n                        this._offset += text3.length;\n                    } else {\n                        address5 = null;\n                    }\n                    if (address5) {\n                        elements2.push(address5);\n                        text2 += address5.textValue;\n                        remaining1 -= 1;\n                    }\n                }\n                if (remaining1 <= 0) {\n                    this._offset = index3;\n                    var klass6 = this.klass.SyntaxNode;\n                    address4 = new klass6(text2, this._offset, elements2);\n                    this._offset += text2.length;\n                } else {\n                    address4 = null;\n                }\n                if (address4) {\n                    elements0.push(address4);\n                    text0 += address4.textValue;\n                } else {\n                    elements0 = null;\n                    this._offset = index1;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass7 = this.klass.SyntaxNode;\n            address0 = new klass7(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.shebang[index0] = address0;\n    },\n    __consume__cell: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.cell = this._nodeCache.cell || {};\n        var cached = this._nodeCache.cell[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var index2 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        address1 = this.__consume__ignore();\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            labelled0.ignore = address1;\n            var address2 = null;\n            address2 = this.__consume__quote();\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                labelled0.quote = address2;\n                var address3 = null;\n                address3 = this.__consume__cell();\n                if (address3) {\n                    elements0.push(address3);\n                    text0 += address3.textValue;\n                    labelled0.cell = address3;\n                } else {\n                    elements0 = null;\n                    this._offset = index2;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index2;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index2;\n        }\n        if (elements0) {\n            this._offset = index2;\n            var klass0 = null;\n            if (Fargo.Scheme.QuotedCell instanceof Function) {\n                klass0 = Fargo.Scheme.QuotedCell;\n            } else {\n                klass0 = this.klass.SyntaxNode;\n            }\n            address0 = new klass0(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.QuotedCell instanceof Function)) {\n                address0.extend(Fargo.Scheme.QuotedCell);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        if (address0) {\n        } else {\n            this._offset = index1;\n            var index3 = this._offset;\n            var elements1 = [];\n            var labelled1 = {};\n            var text1 = \"\";\n            var address4 = null;\n            address4 = this.__consume__ignore();\n            if (address4) {\n                elements1.push(address4);\n                text1 += address4.textValue;\n                labelled1.ignore = address4;\n                var address5 = null;\n                var index4 = this._offset;\n                address5 = this.__consume__list();\n                if (address5) {\n                } else {\n                    this._offset = index4;\n                    address5 = this.__consume__vector();\n                    if (address5) {\n                    } else {\n                        this._offset = index4;\n                        address5 = this.__consume__atom();\n                        if (address5) {\n                        } else {\n                            this._offset = index4;\n                        }\n                    }\n                }\n                if (address5) {\n                    elements1.push(address5);\n                    text1 += address5.textValue;\n                    var address6 = null;\n                    address6 = this.__consume__ignore();\n                    if (address6) {\n                        elements1.push(address6);\n                        text1 += address6.textValue;\n                        labelled1.ignore = address6;\n                    } else {\n                        elements1 = null;\n                        this._offset = index3;\n                    }\n                } else {\n                    elements1 = null;\n                    this._offset = index3;\n                }\n            } else {\n                elements1 = null;\n                this._offset = index3;\n            }\n            if (elements1) {\n                this._offset = index3;\n                var klass1 = null;\n                if (Fargo.Scheme.Cell instanceof Function) {\n                    klass1 = Fargo.Scheme.Cell;\n                } else {\n                    klass1 = this.klass.SyntaxNode;\n                }\n                address0 = new klass1(text1, this._offset, elements1, labelled1);\n                if (!(Fargo.Scheme.Cell instanceof Function)) {\n                    address0.extend(Fargo.Scheme.Cell);\n                }\n                this._offset += text1.length;\n            } else {\n                address0 = null;\n            }\n            if (address0) {\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.cell[index0] = address0;\n    },\n    __consume__quote: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.quote = this._nodeCache.quote || {};\n        var cached = this._nodeCache.quote[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"'\") {\n            var klass0 = this.klass.SyntaxNode;\n            address0 = new klass0(\"'\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address0 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address0) {\n        } else {\n            this._offset = index1;\n            var slice2 = null;\n            if (this._input.length > this._offset) {\n                slice2 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice2 = null;\n            }\n            if (slice2 === \"`\") {\n                var klass1 = this.klass.SyntaxNode;\n                address0 = new klass1(\"`\", this._offset, []);\n                this._offset += 1;\n            } else {\n                address0 = null;\n                var slice3 = null;\n                if (this._input.length > this._offset) {\n                    slice3 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice3 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice3 || \"<EOF>\"};\n                }\n            }\n            if (address0) {\n            } else {\n                this._offset = index1;\n                var slice4 = null;\n                if (this._input.length > this._offset) {\n                    slice4 = this._input.substring(this._offset, this._offset + 2);\n                } else {\n                    slice4 = null;\n                }\n                if (slice4 === \",@\") {\n                    var klass2 = this.klass.SyntaxNode;\n                    address0 = new klass2(\",@\", this._offset, []);\n                    this._offset += 2;\n                } else {\n                    address0 = null;\n                    var slice5 = null;\n                    if (this._input.length > this._offset) {\n                        slice5 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice5 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice5 || \"<EOF>\"};\n                    }\n                }\n                if (address0) {\n                } else {\n                    this._offset = index1;\n                    var slice6 = null;\n                    if (this._input.length > this._offset) {\n                        slice6 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice6 = null;\n                    }\n                    if (slice6 === \",\") {\n                        var klass3 = this.klass.SyntaxNode;\n                        address0 = new klass3(\",\", this._offset, []);\n                        this._offset += 1;\n                    } else {\n                        address0 = null;\n                        var slice7 = null;\n                        if (this._input.length > this._offset) {\n                            slice7 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice7 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice7 || \"<EOF>\"};\n                        }\n                    }\n                    if (address0) {\n                    } else {\n                        this._offset = index1;\n                    }\n                }\n            }\n        }\n        return this._nodeCache.quote[index0] = address0;\n    },\n    __consume__list: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.list = this._nodeCache.list || {};\n        var cached = this._nodeCache.list[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var index2 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"(\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"(\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            address2 = this.__consume__cells();\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                labelled0.cells = address2;\n                var address3 = null;\n                var slice2 = null;\n                if (this._input.length > this._offset) {\n                    slice2 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice2 = null;\n                }\n                if (slice2 === \")\") {\n                    var klass1 = this.klass.SyntaxNode;\n                    address3 = new klass1(\")\", this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address3 = null;\n                    var slice3 = null;\n                    if (this._input.length > this._offset) {\n                        slice3 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice3 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice3 || \"<EOF>\"};\n                    }\n                }\n                if (address3) {\n                    elements0.push(address3);\n                    text0 += address3.textValue;\n                } else {\n                    elements0 = null;\n                    this._offset = index2;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index2;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index2;\n        }\n        if (elements0) {\n            this._offset = index2;\n            var klass2 = this.klass.SyntaxNode;\n            address0 = new klass2(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        if (address0) {\n            if (!(Fargo.Scheme.List instanceof Function)) {\n                address0.extend(Fargo.Scheme.List);\n            }\n        } else {\n            this._offset = index1;\n            var index3 = this._offset;\n            var elements1 = [];\n            var labelled1 = {};\n            var text1 = \"\";\n            var address4 = null;\n            var slice4 = null;\n            if (this._input.length > this._offset) {\n                slice4 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice4 = null;\n            }\n            if (slice4 === \"[\") {\n                var klass3 = this.klass.SyntaxNode;\n                address4 = new klass3(\"[\", this._offset, []);\n                this._offset += 1;\n            } else {\n                address4 = null;\n                var slice5 = null;\n                if (this._input.length > this._offset) {\n                    slice5 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice5 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice5 || \"<EOF>\"};\n                }\n            }\n            if (address4) {\n                elements1.push(address4);\n                text1 += address4.textValue;\n                var address5 = null;\n                address5 = this.__consume__cells();\n                if (address5) {\n                    elements1.push(address5);\n                    text1 += address5.textValue;\n                    labelled1.cells = address5;\n                    var address6 = null;\n                    var slice6 = null;\n                    if (this._input.length > this._offset) {\n                        slice6 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice6 = null;\n                    }\n                    if (slice6 === \"]\") {\n                        var klass4 = this.klass.SyntaxNode;\n                        address6 = new klass4(\"]\", this._offset, []);\n                        this._offset += 1;\n                    } else {\n                        address6 = null;\n                        var slice7 = null;\n                        if (this._input.length > this._offset) {\n                            slice7 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice7 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice7 || \"<EOF>\"};\n                        }\n                    }\n                    if (address6) {\n                        elements1.push(address6);\n                        text1 += address6.textValue;\n                    } else {\n                        elements1 = null;\n                        this._offset = index3;\n                    }\n                } else {\n                    elements1 = null;\n                    this._offset = index3;\n                }\n            } else {\n                elements1 = null;\n                this._offset = index3;\n            }\n            if (elements1) {\n                this._offset = index3;\n                var klass5 = this.klass.SyntaxNode;\n                address0 = new klass5(text1, this._offset, elements1, labelled1);\n                this._offset += text1.length;\n            } else {\n                address0 = null;\n            }\n            if (address0) {\n                if (!(Fargo.Scheme.List instanceof Function)) {\n                    address0.extend(Fargo.Scheme.List);\n                }\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.list[index0] = address0;\n    },\n    __consume__cells: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.cells = this._nodeCache.cells || {};\n        var cached = this._nodeCache.cells[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var index2 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var remaining0 = 1;\n        var index3 = this._offset;\n        var elements1 = [];\n        var text1 = \"\";\n        var address2 = true;\n        while (address2) {\n            address2 = this.__consume__cell();\n            if (address2) {\n                elements1.push(address2);\n                text1 += address2.textValue;\n                remaining0 -= 1;\n            }\n        }\n        if (remaining0 <= 0) {\n            this._offset = index3;\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(text1, this._offset, elements1);\n            this._offset += text1.length;\n        } else {\n            address1 = null;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address3 = null;\n            var slice0 = null;\n            if (this._input.length > this._offset) {\n                slice0 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice0 = null;\n            }\n            if (slice0 === \".\") {\n                var klass1 = this.klass.SyntaxNode;\n                address3 = new klass1(\".\", this._offset, []);\n                this._offset += 1;\n            } else {\n                address3 = null;\n                var slice1 = null;\n                if (this._input.length > this._offset) {\n                    slice1 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice1 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n                }\n            }\n            if (address3) {\n                elements0.push(address3);\n                text0 += address3.textValue;\n                labelled0.dot = address3;\n                var address4 = null;\n                address4 = this.__consume__space();\n                if (address4) {\n                    elements0.push(address4);\n                    text0 += address4.textValue;\n                    labelled0.space = address4;\n                    var address5 = null;\n                    address5 = this.__consume__cell();\n                    if (address5) {\n                        elements0.push(address5);\n                        text0 += address5.textValue;\n                        labelled0.cell = address5;\n                    } else {\n                        elements0 = null;\n                        this._offset = index2;\n                    }\n                } else {\n                    elements0 = null;\n                    this._offset = index2;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index2;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index2;\n        }\n        if (elements0) {\n            this._offset = index2;\n            var klass2 = this.klass.SyntaxNode;\n            address0 = new klass2(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        if (address0) {\n        } else {\n            this._offset = index1;\n            var remaining1 = 0;\n            var index4 = this._offset;\n            var elements2 = [];\n            var text2 = \"\";\n            var address6 = true;\n            while (address6) {\n                address6 = this.__consume__cell();\n                if (address6) {\n                    elements2.push(address6);\n                    text2 += address6.textValue;\n                    remaining1 -= 1;\n                }\n            }\n            if (remaining1 <= 0) {\n                this._offset = index4;\n                var klass3 = this.klass.SyntaxNode;\n                address0 = new klass3(text2, this._offset, elements2);\n                this._offset += text2.length;\n            } else {\n                address0 = null;\n            }\n            if (address0) {\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.cells[index0] = address0;\n    },\n    __consume__vector: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.vector = this._nodeCache.vector || {};\n        var cached = this._nodeCache.vector[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var index2 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 2);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"#(\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"#(\", this._offset, []);\n            this._offset += 2;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var remaining0 = 0;\n            var index3 = this._offset;\n            var elements1 = [];\n            var text1 = \"\";\n            var address3 = true;\n            while (address3) {\n                address3 = this.__consume__cell();\n                if (address3) {\n                    elements1.push(address3);\n                    text1 += address3.textValue;\n                    remaining0 -= 1;\n                }\n            }\n            if (remaining0 <= 0) {\n                this._offset = index3;\n                var klass1 = this.klass.SyntaxNode;\n                address2 = new klass1(text1, this._offset, elements1);\n                this._offset += text1.length;\n            } else {\n                address2 = null;\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                var address4 = null;\n                var slice2 = null;\n                if (this._input.length > this._offset) {\n                    slice2 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice2 = null;\n                }\n                if (slice2 === \")\") {\n                    var klass2 = this.klass.SyntaxNode;\n                    address4 = new klass2(\")\", this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address4 = null;\n                    var slice3 = null;\n                    if (this._input.length > this._offset) {\n                        slice3 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice3 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice3 || \"<EOF>\"};\n                    }\n                }\n                if (address4) {\n                    elements0.push(address4);\n                    text0 += address4.textValue;\n                } else {\n                    elements0 = null;\n                    this._offset = index2;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index2;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index2;\n        }\n        if (elements0) {\n            this._offset = index2;\n            var klass3 = this.klass.SyntaxNode;\n            address0 = new klass3(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        if (address0) {\n            if (!(Fargo.Scheme.Vector instanceof Function)) {\n                address0.extend(Fargo.Scheme.Vector);\n            }\n        } else {\n            this._offset = index1;\n            var index4 = this._offset;\n            var elements2 = [];\n            var labelled1 = {};\n            var text2 = \"\";\n            var address5 = null;\n            var slice4 = null;\n            if (this._input.length > this._offset) {\n                slice4 = this._input.substring(this._offset, this._offset + 2);\n            } else {\n                slice4 = null;\n            }\n            if (slice4 === \"#[\") {\n                var klass4 = this.klass.SyntaxNode;\n                address5 = new klass4(\"#[\", this._offset, []);\n                this._offset += 2;\n            } else {\n                address5 = null;\n                var slice5 = null;\n                if (this._input.length > this._offset) {\n                    slice5 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice5 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice5 || \"<EOF>\"};\n                }\n            }\n            if (address5) {\n                elements2.push(address5);\n                text2 += address5.textValue;\n                var address6 = null;\n                var remaining1 = 0;\n                var index5 = this._offset;\n                var elements3 = [];\n                var text3 = \"\";\n                var address7 = true;\n                while (address7) {\n                    address7 = this.__consume__cell();\n                    if (address7) {\n                        elements3.push(address7);\n                        text3 += address7.textValue;\n                        remaining1 -= 1;\n                    }\n                }\n                if (remaining1 <= 0) {\n                    this._offset = index5;\n                    var klass5 = this.klass.SyntaxNode;\n                    address6 = new klass5(text3, this._offset, elements3);\n                    this._offset += text3.length;\n                } else {\n                    address6 = null;\n                }\n                if (address6) {\n                    elements2.push(address6);\n                    text2 += address6.textValue;\n                    var address8 = null;\n                    var slice6 = null;\n                    if (this._input.length > this._offset) {\n                        slice6 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice6 = null;\n                    }\n                    if (slice6 === \"]\") {\n                        var klass6 = this.klass.SyntaxNode;\n                        address8 = new klass6(\"]\", this._offset, []);\n                        this._offset += 1;\n                    } else {\n                        address8 = null;\n                        var slice7 = null;\n                        if (this._input.length > this._offset) {\n                            slice7 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice7 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice7 || \"<EOF>\"};\n                        }\n                    }\n                    if (address8) {\n                        elements2.push(address8);\n                        text2 += address8.textValue;\n                    } else {\n                        elements2 = null;\n                        this._offset = index4;\n                    }\n                } else {\n                    elements2 = null;\n                    this._offset = index4;\n                }\n            } else {\n                elements2 = null;\n                this._offset = index4;\n            }\n            if (elements2) {\n                this._offset = index4;\n                var klass7 = this.klass.SyntaxNode;\n                address0 = new klass7(text2, this._offset, elements2, labelled1);\n                this._offset += text2.length;\n            } else {\n                address0 = null;\n            }\n            if (address0) {\n                if (!(Fargo.Scheme.Vector instanceof Function)) {\n                    address0.extend(Fargo.Scheme.Vector);\n                }\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.vector[index0] = address0;\n    },\n    __consume__atom: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.atom = this._nodeCache.atom || {};\n        var cached = this._nodeCache.atom[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        address0 = this.__consume__datum();\n        if (address0) {\n        } else {\n            this._offset = index1;\n            address0 = this.__consume__symbol();\n            if (address0) {\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.atom[index0] = address0;\n    },\n    __consume__datum: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.datum = this._nodeCache.datum || {};\n        var cached = this._nodeCache.datum[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var index2 = this._offset;\n        address1 = this.__consume__boolean();\n        if (address1) {\n        } else {\n            this._offset = index2;\n            address1 = this.__consume__number();\n            if (address1) {\n            } else {\n                this._offset = index2;\n                address1 = this.__consume__character();\n                if (address1) {\n                } else {\n                    this._offset = index2;\n                    address1 = this.__consume__string();\n                    if (address1) {\n                    } else {\n                        this._offset = index2;\n                    }\n                }\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var index3 = this._offset;\n            var index4 = this._offset;\n            var elements1 = [];\n            var labelled1 = {};\n            var text1 = \"\";\n            var address3 = null;\n            var index5 = this._offset;\n            address3 = this.__consume__reserved();\n            this._offset = index5;\n            if (!(address3)) {\n                var klass0 = this.klass.SyntaxNode;\n                address3 = new klass0(\"\", this._offset, []);\n                this._offset += 0;\n            } else {\n                address3 = null;\n            }\n            if (address3) {\n                elements1.push(address3);\n                text1 += address3.textValue;\n                var address4 = null;\n                var slice0 = null;\n                if (this._input.length > this._offset) {\n                    slice0 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice0 = null;\n                }\n                var temp0 = slice0;\n                if (temp0 === null) {\n                    address4 = null;\n                    var slice1 = null;\n                    if (this._input.length > this._offset) {\n                        slice1 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice1 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice1 || \"<EOF>\"};\n                    }\n                } else {\n                    var klass1 = this.klass.SyntaxNode;\n                    address4 = new klass1(temp0, this._offset, []);\n                    this._offset += 1;\n                }\n                if (address4) {\n                    elements1.push(address4);\n                    text1 += address4.textValue;\n                } else {\n                    elements1 = null;\n                    this._offset = index4;\n                }\n            } else {\n                elements1 = null;\n                this._offset = index4;\n            }\n            if (elements1) {\n                this._offset = index4;\n                var klass2 = this.klass.SyntaxNode;\n                address2 = new klass2(text1, this._offset, elements1, labelled1);\n                this._offset += text1.length;\n            } else {\n                address2 = null;\n            }\n            this._offset = index3;\n            if (!(address2)) {\n                var klass3 = this.klass.SyntaxNode;\n                address2 = new klass3(\"\", this._offset, []);\n                this._offset += 0;\n            } else {\n                address2 = null;\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass4 = null;\n            if (Fargo.Scheme.Datum instanceof Function) {\n                klass4 = Fargo.Scheme.Datum;\n            } else {\n                klass4 = this.klass.SyntaxNode;\n            }\n            address0 = new klass4(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.Datum instanceof Function)) {\n                address0.extend(Fargo.Scheme.Datum);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.datum[index0] = address0;\n    },\n    __consume__boolean: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.boolean = this._nodeCache.boolean || {};\n        var cached = this._nodeCache.boolean[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"#\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"#\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var slice2 = null;\n            if (this._input.length > this._offset) {\n                slice2 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice2 = null;\n            }\n            var temp0 = slice2;\n            var match0 = null;\n            if (match0 = temp0 && temp0.match(/^[tf]/)) {\n                var klass1 = this.klass.SyntaxNode;\n                address2 = new klass1(match0[0], this._offset, []);\n                this._offset += 1;\n            } else {\n                address2 = null;\n                var slice3 = null;\n                if (this._input.length > this._offset) {\n                    slice3 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice3 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[tf]\", actual: slice3 || \"<EOF>\"};\n                }\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass2 = null;\n            if (Fargo.Scheme.Boolean instanceof Function) {\n                klass2 = Fargo.Scheme.Boolean;\n            } else {\n                klass2 = this.klass.SyntaxNode;\n            }\n            address0 = new klass2(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.Boolean instanceof Function)) {\n                address0.extend(Fargo.Scheme.Boolean);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.boolean[index0] = address0;\n    },\n    __consume__number: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.number = this._nodeCache.number || {};\n        var cached = this._nodeCache.number[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var index2 = this._offset;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"-\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"-\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n        } else {\n            this._offset = index2;\n            var klass1 = this.klass.SyntaxNode;\n            address1 = new klass1(\"\", this._offset, []);\n            this._offset += 0;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var index3 = this._offset;\n            var slice2 = null;\n            if (this._input.length > this._offset) {\n                slice2 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice2 = null;\n            }\n            if (slice2 === \"0\") {\n                var klass2 = this.klass.SyntaxNode;\n                address2 = new klass2(\"0\", this._offset, []);\n                this._offset += 1;\n            } else {\n                address2 = null;\n                var slice3 = null;\n                if (this._input.length > this._offset) {\n                    slice3 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice3 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice3 || \"<EOF>\"};\n                }\n            }\n            if (address2) {\n            } else {\n                this._offset = index3;\n                var index4 = this._offset;\n                var elements1 = [];\n                var labelled1 = {};\n                var text1 = \"\";\n                var address3 = null;\n                var slice4 = null;\n                if (this._input.length > this._offset) {\n                    slice4 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice4 = null;\n                }\n                var temp0 = slice4;\n                var match0 = null;\n                if (match0 = temp0 && temp0.match(/^[1-9]/)) {\n                    var klass3 = this.klass.SyntaxNode;\n                    address3 = new klass3(match0[0], this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address3 = null;\n                    var slice5 = null;\n                    if (this._input.length > this._offset) {\n                        slice5 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice5 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[1-9]\", actual: slice5 || \"<EOF>\"};\n                    }\n                }\n                if (address3) {\n                    elements1.push(address3);\n                    text1 += address3.textValue;\n                    var address4 = null;\n                    var remaining0 = 0;\n                    var index5 = this._offset;\n                    var elements2 = [];\n                    var text2 = \"\";\n                    var address5 = true;\n                    while (address5) {\n                        var slice6 = null;\n                        if (this._input.length > this._offset) {\n                            slice6 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice6 = null;\n                        }\n                        var temp1 = slice6;\n                        var match1 = null;\n                        if (match1 = temp1 && temp1.match(/^[0-9]/)) {\n                            var klass4 = this.klass.SyntaxNode;\n                            address5 = new klass4(match1[0], this._offset, []);\n                            this._offset += 1;\n                        } else {\n                            address5 = null;\n                            var slice7 = null;\n                            if (this._input.length > this._offset) {\n                                slice7 = this._input.substring(this._offset, this._offset + 1);\n                            } else {\n                                slice7 = null;\n                            }\n                            if (!this.error || this.error.offset <= this._offset) {\n                                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[0-9]\", actual: slice7 || \"<EOF>\"};\n                            }\n                        }\n                        if (address5) {\n                            elements2.push(address5);\n                            text2 += address5.textValue;\n                            remaining0 -= 1;\n                        }\n                    }\n                    if (remaining0 <= 0) {\n                        this._offset = index5;\n                        var klass5 = this.klass.SyntaxNode;\n                        address4 = new klass5(text2, this._offset, elements2);\n                        this._offset += text2.length;\n                    } else {\n                        address4 = null;\n                    }\n                    if (address4) {\n                        elements1.push(address4);\n                        text1 += address4.textValue;\n                    } else {\n                        elements1 = null;\n                        this._offset = index4;\n                    }\n                } else {\n                    elements1 = null;\n                    this._offset = index4;\n                }\n                if (elements1) {\n                    this._offset = index4;\n                    var klass6 = this.klass.SyntaxNode;\n                    address2 = new klass6(text1, this._offset, elements1, labelled1);\n                    this._offset += text1.length;\n                } else {\n                    address2 = null;\n                }\n                if (address2) {\n                } else {\n                    this._offset = index3;\n                }\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                var address6 = null;\n                var index6 = this._offset;\n                var index7 = this._offset;\n                var elements3 = [];\n                var labelled2 = {};\n                var text3 = \"\";\n                var address7 = null;\n                var slice8 = null;\n                if (this._input.length > this._offset) {\n                    slice8 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice8 = null;\n                }\n                if (slice8 === \".\") {\n                    var klass7 = this.klass.SyntaxNode;\n                    address7 = new klass7(\".\", this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address7 = null;\n                    var slice9 = null;\n                    if (this._input.length > this._offset) {\n                        slice9 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice9 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice9 || \"<EOF>\"};\n                    }\n                }\n                if (address7) {\n                    elements3.push(address7);\n                    text3 += address7.textValue;\n                    var address8 = null;\n                    var remaining1 = 1;\n                    var index8 = this._offset;\n                    var elements4 = [];\n                    var text4 = \"\";\n                    var address9 = true;\n                    while (address9) {\n                        var slice10 = null;\n                        if (this._input.length > this._offset) {\n                            slice10 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice10 = null;\n                        }\n                        var temp2 = slice10;\n                        var match2 = null;\n                        if (match2 = temp2 && temp2.match(/^[0-9]/)) {\n                            var klass8 = this.klass.SyntaxNode;\n                            address9 = new klass8(match2[0], this._offset, []);\n                            this._offset += 1;\n                        } else {\n                            address9 = null;\n                            var slice11 = null;\n                            if (this._input.length > this._offset) {\n                                slice11 = this._input.substring(this._offset, this._offset + 1);\n                            } else {\n                                slice11 = null;\n                            }\n                            if (!this.error || this.error.offset <= this._offset) {\n                                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[0-9]\", actual: slice11 || \"<EOF>\"};\n                            }\n                        }\n                        if (address9) {\n                            elements4.push(address9);\n                            text4 += address9.textValue;\n                            remaining1 -= 1;\n                        }\n                    }\n                    if (remaining1 <= 0) {\n                        this._offset = index8;\n                        var klass9 = this.klass.SyntaxNode;\n                        address8 = new klass9(text4, this._offset, elements4);\n                        this._offset += text4.length;\n                    } else {\n                        address8 = null;\n                    }\n                    if (address8) {\n                        elements3.push(address8);\n                        text3 += address8.textValue;\n                    } else {\n                        elements3 = null;\n                        this._offset = index7;\n                    }\n                } else {\n                    elements3 = null;\n                    this._offset = index7;\n                }\n                if (elements3) {\n                    this._offset = index7;\n                    var klass10 = this.klass.SyntaxNode;\n                    address6 = new klass10(text3, this._offset, elements3, labelled2);\n                    this._offset += text3.length;\n                } else {\n                    address6 = null;\n                }\n                if (address6) {\n                } else {\n                    this._offset = index6;\n                    var klass11 = this.klass.SyntaxNode;\n                    address6 = new klass11(\"\", this._offset, []);\n                    this._offset += 0;\n                }\n                if (address6) {\n                    elements0.push(address6);\n                    text0 += address6.textValue;\n                } else {\n                    elements0 = null;\n                    this._offset = index1;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass12 = null;\n            if (Fargo.Scheme.Number instanceof Function) {\n                klass12 = Fargo.Scheme.Number;\n            } else {\n                klass12 = this.klass.SyntaxNode;\n            }\n            address0 = new klass12(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.Number instanceof Function)) {\n                address0.extend(Fargo.Scheme.Number);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.number[index0] = address0;\n    },\n    __consume__character: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.character = this._nodeCache.character || {};\n        var cached = this._nodeCache.character[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 2);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"#\\\\\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"#\\\\\", this._offset, []);\n            this._offset += 2;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var index2 = this._offset;\n            address2 = this.__consume__symbol();\n            if (address2) {\n            } else {\n                this._offset = index2;\n                var slice2 = null;\n                if (this._input.length > this._offset) {\n                    slice2 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice2 = null;\n                }\n                var temp0 = slice2;\n                if (temp0 === null) {\n                    address2 = null;\n                    var slice3 = null;\n                    if (this._input.length > this._offset) {\n                        slice3 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice3 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice3 || \"<EOF>\"};\n                    }\n                } else {\n                    var klass1 = this.klass.SyntaxNode;\n                    address2 = new klass1(temp0, this._offset, []);\n                    this._offset += 1;\n                }\n                if (address2) {\n                } else {\n                    this._offset = index2;\n                }\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                labelled0.glyph = address2;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass2 = this.klass.SyntaxNode;\n            address0 = new klass2(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.character[index0] = address0;\n    },\n    __consume__string: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.string = this._nodeCache.string || {};\n        var cached = this._nodeCache.string[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \"\\\"\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\"\\\"\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var remaining0 = 0;\n            var index2 = this._offset;\n            var elements1 = [];\n            var text1 = \"\";\n            var address3 = true;\n            while (address3) {\n                var index3 = this._offset;\n                var slice2 = null;\n                if (this._input.length > this._offset) {\n                    slice2 = this._input.substring(this._offset, this._offset + 2);\n                } else {\n                    slice2 = null;\n                }\n                if (slice2 === \"\\\\\\\"\") {\n                    var klass1 = this.klass.SyntaxNode;\n                    address3 = new klass1(\"\\\\\\\"\", this._offset, []);\n                    this._offset += 2;\n                } else {\n                    address3 = null;\n                    var slice3 = null;\n                    if (this._input.length > this._offset) {\n                        slice3 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice3 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice3 || \"<EOF>\"};\n                    }\n                }\n                if (address3) {\n                } else {\n                    this._offset = index3;\n                    var slice4 = null;\n                    if (this._input.length > this._offset) {\n                        slice4 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice4 = null;\n                    }\n                    var temp0 = slice4;\n                    var match0 = null;\n                    if (match0 = temp0 && temp0.match(/^[^\"]/)) {\n                        var klass2 = this.klass.SyntaxNode;\n                        address3 = new klass2(match0[0], this._offset, []);\n                        this._offset += 1;\n                    } else {\n                        address3 = null;\n                        var slice5 = null;\n                        if (this._input.length > this._offset) {\n                            slice5 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice5 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[^\\\"]\", actual: slice5 || \"<EOF>\"};\n                        }\n                    }\n                    if (address3) {\n                    } else {\n                        this._offset = index3;\n                    }\n                }\n                if (address3) {\n                    elements1.push(address3);\n                    text1 += address3.textValue;\n                    remaining0 -= 1;\n                }\n            }\n            if (remaining0 <= 0) {\n                this._offset = index2;\n                var klass3 = this.klass.SyntaxNode;\n                address2 = new klass3(text1, this._offset, elements1);\n                this._offset += text1.length;\n            } else {\n                address2 = null;\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n                var address4 = null;\n                var slice6 = null;\n                if (this._input.length > this._offset) {\n                    slice6 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice6 = null;\n                }\n                if (slice6 === \"\\\"\") {\n                    var klass4 = this.klass.SyntaxNode;\n                    address4 = new klass4(\"\\\"\", this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address4 = null;\n                    var slice7 = null;\n                    if (this._input.length > this._offset) {\n                        slice7 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice7 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice7 || \"<EOF>\"};\n                    }\n                }\n                if (address4) {\n                    elements0.push(address4);\n                    text0 += address4.textValue;\n                } else {\n                    elements0 = null;\n                    this._offset = index1;\n                }\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass5 = null;\n            if (Fargo.Scheme.String instanceof Function) {\n                klass5 = Fargo.Scheme.String;\n            } else {\n                klass5 = this.klass.SyntaxNode;\n            }\n            address0 = new klass5(text0, this._offset, elements0, labelled0);\n            if (!(Fargo.Scheme.String instanceof Function)) {\n                address0.extend(Fargo.Scheme.String);\n            }\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.string[index0] = address0;\n    },\n    __consume__symbol: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.symbol = this._nodeCache.symbol || {};\n        var cached = this._nodeCache.symbol[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var index2 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var index3 = this._offset;\n        var elements1 = [];\n        var labelled1 = {};\n        var text1 = \"\";\n        var address2 = null;\n        var index4 = this._offset;\n        address2 = this.__consume__delimiter();\n        this._offset = index4;\n        if (!(address2)) {\n            var klass0 = this.klass.SyntaxNode;\n            address2 = new klass0(\"\", this._offset, []);\n            this._offset += 0;\n        } else {\n            address2 = null;\n        }\n        if (address2) {\n            elements1.push(address2);\n            text1 += address2.textValue;\n            var address3 = null;\n            var slice0 = null;\n            if (this._input.length > this._offset) {\n                slice0 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice0 = null;\n            }\n            var temp0 = slice0;\n            if (temp0 === null) {\n                address3 = null;\n                var slice1 = null;\n                if (this._input.length > this._offset) {\n                    slice1 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice1 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice1 || \"<EOF>\"};\n                }\n            } else {\n                var klass1 = this.klass.SyntaxNode;\n                address3 = new klass1(temp0, this._offset, []);\n                this._offset += 1;\n            }\n            if (address3) {\n                elements1.push(address3);\n                text1 += address3.textValue;\n            } else {\n                elements1 = null;\n                this._offset = index3;\n            }\n        } else {\n            elements1 = null;\n            this._offset = index3;\n        }\n        if (elements1) {\n            this._offset = index3;\n            var klass2 = this.klass.SyntaxNode;\n            address1 = new klass2(text1, this._offset, elements1, labelled1);\n            this._offset += text1.length;\n        } else {\n            address1 = null;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address4 = null;\n            var remaining0 = 1;\n            var index5 = this._offset;\n            var elements2 = [];\n            var text2 = \"\";\n            var address5 = true;\n            while (address5) {\n                var index6 = this._offset;\n                var elements3 = [];\n                var labelled2 = {};\n                var text3 = \"\";\n                var address6 = null;\n                var index7 = this._offset;\n                address6 = this.__consume__delimiter();\n                this._offset = index7;\n                if (!(address6)) {\n                    var klass3 = this.klass.SyntaxNode;\n                    address6 = new klass3(\"\", this._offset, []);\n                    this._offset += 0;\n                } else {\n                    address6 = null;\n                }\n                if (address6) {\n                    elements3.push(address6);\n                    text3 += address6.textValue;\n                    var address7 = null;\n                    var slice2 = null;\n                    if (this._input.length > this._offset) {\n                        slice2 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice2 = null;\n                    }\n                    var temp1 = slice2;\n                    if (temp1 === null) {\n                        address7 = null;\n                        var slice3 = null;\n                        if (this._input.length > this._offset) {\n                            slice3 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice3 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice3 || \"<EOF>\"};\n                        }\n                    } else {\n                        var klass4 = this.klass.SyntaxNode;\n                        address7 = new klass4(temp1, this._offset, []);\n                        this._offset += 1;\n                    }\n                    if (address7) {\n                        elements3.push(address7);\n                        text3 += address7.textValue;\n                    } else {\n                        elements3 = null;\n                        this._offset = index6;\n                    }\n                } else {\n                    elements3 = null;\n                    this._offset = index6;\n                }\n                if (elements3) {\n                    this._offset = index6;\n                    var klass5 = this.klass.SyntaxNode;\n                    address5 = new klass5(text3, this._offset, elements3, labelled2);\n                    this._offset += text3.length;\n                } else {\n                    address5 = null;\n                }\n                if (address5) {\n                    elements2.push(address5);\n                    text2 += address5.textValue;\n                    remaining0 -= 1;\n                }\n            }\n            if (remaining0 <= 0) {\n                this._offset = index5;\n                var klass6 = this.klass.SyntaxNode;\n                address4 = new klass6(text2, this._offset, elements2);\n                this._offset += text2.length;\n            } else {\n                address4 = null;\n            }\n            if (address4) {\n                elements0.push(address4);\n                text0 += address4.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index2;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index2;\n        }\n        if (elements0) {\n            this._offset = index2;\n            var klass7 = this.klass.SyntaxNode;\n            address0 = new klass7(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        if (address0) {\n            if (!(Fargo.Scheme.Symbol instanceof Function)) {\n                address0.extend(Fargo.Scheme.Symbol);\n            }\n        } else {\n            this._offset = index1;\n            var index8 = this._offset;\n            var elements4 = [];\n            var labelled3 = {};\n            var text4 = \"\";\n            var address8 = null;\n            var index9 = this._offset;\n            address8 = this.__consume__reserved();\n            this._offset = index9;\n            if (!(address8)) {\n                var klass8 = this.klass.SyntaxNode;\n                address8 = new klass8(\"\", this._offset, []);\n                this._offset += 0;\n            } else {\n                address8 = null;\n            }\n            if (address8) {\n                elements4.push(address8);\n                text4 += address8.textValue;\n                var address9 = null;\n                var slice4 = null;\n                if (this._input.length > this._offset) {\n                    slice4 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice4 = null;\n                }\n                var temp2 = slice4;\n                if (temp2 === null) {\n                    address9 = null;\n                    var slice5 = null;\n                    if (this._input.length > this._offset) {\n                        slice5 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice5 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice5 || \"<EOF>\"};\n                    }\n                } else {\n                    var klass9 = this.klass.SyntaxNode;\n                    address9 = new klass9(temp2, this._offset, []);\n                    this._offset += 1;\n                }\n                if (address9) {\n                    elements4.push(address9);\n                    text4 += address9.textValue;\n                } else {\n                    elements4 = null;\n                    this._offset = index8;\n                }\n            } else {\n                elements4 = null;\n                this._offset = index8;\n            }\n            if (elements4) {\n                this._offset = index8;\n                var klass10 = this.klass.SyntaxNode;\n                address0 = new klass10(text4, this._offset, elements4, labelled3);\n                this._offset += text4.length;\n            } else {\n                address0 = null;\n            }\n            if (address0) {\n                if (!(Fargo.Scheme.Symbol instanceof Function)) {\n                    address0.extend(Fargo.Scheme.Symbol);\n                }\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.symbol[index0] = address0;\n    },\n    __consume__reserved: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.reserved = this._nodeCache.reserved || {};\n        var cached = this._nodeCache.reserved[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \".\") {\n            var klass0 = this.klass.SyntaxNode;\n            address0 = new klass0(\".\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address0 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address0) {\n        } else {\n            this._offset = index1;\n            address0 = this.__consume__delimiter();\n            if (address0) {\n            } else {\n                this._offset = index1;\n            }\n        }\n        return this._nodeCache.reserved[index0] = address0;\n    },\n    __consume__delimiter: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.delimiter = this._nodeCache.delimiter || {};\n        var cached = this._nodeCache.delimiter[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        address0 = this.__consume__quote();\n        if (address0) {\n        } else {\n            this._offset = index1;\n            var slice0 = null;\n            if (this._input.length > this._offset) {\n                slice0 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice0 = null;\n            }\n            if (slice0 === \"#\") {\n                var klass0 = this.klass.SyntaxNode;\n                address0 = new klass0(\"#\", this._offset, []);\n                this._offset += 1;\n            } else {\n                address0 = null;\n                var slice1 = null;\n                if (this._input.length > this._offset) {\n                    slice1 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice1 = null;\n                }\n                if (!this.error || this.error.offset <= this._offset) {\n                    this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n                }\n            }\n            if (address0) {\n            } else {\n                this._offset = index1;\n                address0 = this.__consume__paren();\n                if (address0) {\n                } else {\n                    this._offset = index1;\n                    address0 = this.__consume__space();\n                    if (address0) {\n                    } else {\n                        this._offset = index1;\n                    }\n                }\n            }\n        }\n        return this._nodeCache.delimiter[index0] = address0;\n    },\n    __consume__paren: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.paren = this._nodeCache.paren || {};\n        var cached = this._nodeCache.paren[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        var temp0 = slice0;\n        var match0 = null;\n        if (match0 = temp0 && temp0.match(/^[\\(\\)\\[\\]]/)) {\n            var klass0 = this.klass.SyntaxNode;\n            address0 = new klass0(match0[0], this._offset, []);\n            this._offset += 1;\n        } else {\n            address0 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[\\(\\)\\[\\]]\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        return this._nodeCache.paren[index0] = address0;\n    },\n    __consume__space: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.space = this._nodeCache.space || {};\n        var cached = this._nodeCache.space[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        var temp0 = slice0;\n        var match0 = null;\n        if (match0 = temp0 && temp0.match(/^[\\s\\n\\r\\t]/)) {\n            var klass0 = this.klass.SyntaxNode;\n            address0 = new klass0(match0[0], this._offset, []);\n            this._offset += 1;\n        } else {\n            address0 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[\\s\\n\\r\\t]\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        return this._nodeCache.space[index0] = address0;\n    },\n    __consume__ignore: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.ignore = this._nodeCache.ignore || {};\n        var cached = this._nodeCache.ignore[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var remaining0 = 0;\n        var index2 = this._offset;\n        var elements1 = [];\n        var text1 = \"\";\n        var address2 = true;\n        while (address2) {\n            address2 = this.__consume__space();\n            if (address2) {\n                elements1.push(address2);\n                text1 += address2.textValue;\n                remaining0 -= 1;\n            }\n        }\n        if (remaining0 <= 0) {\n            this._offset = index2;\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(text1, this._offset, elements1);\n            this._offset += text1.length;\n        } else {\n            address1 = null;\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address3 = null;\n            var index3 = this._offset;\n            var index4 = this._offset;\n            var elements2 = [];\n            var labelled1 = {};\n            var text2 = \"\";\n            var address4 = null;\n            address4 = this.__consume__comment();\n            if (address4) {\n                elements2.push(address4);\n                text2 += address4.textValue;\n                labelled1.comment = address4;\n                var address5 = null;\n                address5 = this.__consume__ignore();\n                if (address5) {\n                    elements2.push(address5);\n                    text2 += address5.textValue;\n                    labelled1.ignore = address5;\n                } else {\n                    elements2 = null;\n                    this._offset = index4;\n                }\n            } else {\n                elements2 = null;\n                this._offset = index4;\n            }\n            if (elements2) {\n                this._offset = index4;\n                var klass1 = this.klass.SyntaxNode;\n                address3 = new klass1(text2, this._offset, elements2, labelled1);\n                this._offset += text2.length;\n            } else {\n                address3 = null;\n            }\n            if (address3) {\n            } else {\n                this._offset = index3;\n                var klass2 = this.klass.SyntaxNode;\n                address3 = new klass2(\"\", this._offset, []);\n                this._offset += 0;\n            }\n            if (address3) {\n                elements0.push(address3);\n                text0 += address3.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass3 = this.klass.SyntaxNode;\n            address0 = new klass3(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.ignore[index0] = address0;\n    },\n    __consume__comment: function(input) {\n        var address0 = null;\n        var index0 = this._offset;\n        this._nodeCache.comment = this._nodeCache.comment || {};\n        var cached = this._nodeCache.comment[index0];\n        if (cached) {\n            this._offset += cached.textValue.length;\n            return cached;\n        }\n        var index1 = this._offset;\n        var elements0 = [];\n        var labelled0 = {};\n        var text0 = \"\";\n        var address1 = null;\n        var slice0 = null;\n        if (this._input.length > this._offset) {\n            slice0 = this._input.substring(this._offset, this._offset + 1);\n        } else {\n            slice0 = null;\n        }\n        if (slice0 === \";\") {\n            var klass0 = this.klass.SyntaxNode;\n            address1 = new klass0(\";\", this._offset, []);\n            this._offset += 1;\n        } else {\n            address1 = null;\n            var slice1 = null;\n            if (this._input.length > this._offset) {\n                slice1 = this._input.substring(this._offset, this._offset + 1);\n            } else {\n                slice1 = null;\n            }\n            if (!this.error || this.error.offset <= this._offset) {\n                this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"\", actual: slice1 || \"<EOF>\"};\n            }\n        }\n        if (address1) {\n            elements0.push(address1);\n            text0 += address1.textValue;\n            var address2 = null;\n            var remaining0 = 0;\n            var index2 = this._offset;\n            var elements1 = [];\n            var text1 = \"\";\n            var address3 = true;\n            while (address3) {\n                var index3 = this._offset;\n                var elements2 = [];\n                var labelled1 = {};\n                var text2 = \"\";\n                var address4 = null;\n                var index4 = this._offset;\n                var slice2 = null;\n                if (this._input.length > this._offset) {\n                    slice2 = this._input.substring(this._offset, this._offset + 1);\n                } else {\n                    slice2 = null;\n                }\n                var temp0 = slice2;\n                var match0 = null;\n                if (match0 = temp0 && temp0.match(/^[\\n\\r]/)) {\n                    var klass1 = this.klass.SyntaxNode;\n                    address4 = new klass1(match0[0], this._offset, []);\n                    this._offset += 1;\n                } else {\n                    address4 = null;\n                    var slice3 = null;\n                    if (this._input.length > this._offset) {\n                        slice3 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice3 = null;\n                    }\n                    if (!this.error || this.error.offset <= this._offset) {\n                        this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"[\\n\\r]\", actual: slice3 || \"<EOF>\"};\n                    }\n                }\n                this._offset = index4;\n                if (!(address4)) {\n                    var klass2 = this.klass.SyntaxNode;\n                    address4 = new klass2(\"\", this._offset, []);\n                    this._offset += 0;\n                } else {\n                    address4 = null;\n                }\n                if (address4) {\n                    elements2.push(address4);\n                    text2 += address4.textValue;\n                    var address5 = null;\n                    var slice4 = null;\n                    if (this._input.length > this._offset) {\n                        slice4 = this._input.substring(this._offset, this._offset + 1);\n                    } else {\n                        slice4 = null;\n                    }\n                    var temp1 = slice4;\n                    if (temp1 === null) {\n                        address5 = null;\n                        var slice5 = null;\n                        if (this._input.length > this._offset) {\n                            slice5 = this._input.substring(this._offset, this._offset + 1);\n                        } else {\n                            slice5 = null;\n                        }\n                        if (!this.error || this.error.offset <= this._offset) {\n                            this.error = this.klass.lastError = {input: this._input, offset: this._offset, expected: \"<any char>\", actual: slice5 || \"<EOF>\"};\n                        }\n                    } else {\n                        var klass3 = this.klass.SyntaxNode;\n                        address5 = new klass3(temp1, this._offset, []);\n                        this._offset += 1;\n                    }\n                    if (address5) {\n                        elements2.push(address5);\n                        text2 += address5.textValue;\n                    } else {\n                        elements2 = null;\n                        this._offset = index3;\n                    }\n                } else {\n                    elements2 = null;\n                    this._offset = index3;\n                }\n                if (elements2) {\n                    this._offset = index3;\n                    var klass4 = this.klass.SyntaxNode;\n                    address3 = new klass4(text2, this._offset, elements2, labelled1);\n                    this._offset += text2.length;\n                } else {\n                    address3 = null;\n                }\n                if (address3) {\n                    elements1.push(address3);\n                    text1 += address3.textValue;\n                    remaining0 -= 1;\n                }\n            }\n            if (remaining0 <= 0) {\n                this._offset = index2;\n                var klass5 = this.klass.SyntaxNode;\n                address2 = new klass5(text1, this._offset, elements1);\n                this._offset += text1.length;\n            } else {\n                address2 = null;\n            }\n            if (address2) {\n                elements0.push(address2);\n                text0 += address2.textValue;\n            } else {\n                elements0 = null;\n                this._offset = index1;\n            }\n        } else {\n            elements0 = null;\n            this._offset = index1;\n        }\n        if (elements0) {\n            this._offset = index1;\n            var klass6 = this.klass.SyntaxNode;\n            address0 = new klass6(text0, this._offset, elements0, labelled0);\n            this._offset += text0.length;\n        } else {\n            address0 = null;\n        }\n        return this._nodeCache.comment[index0] = address0;\n    }\n});\n\nFargo.SchemeParser = new JS.Class(\"Fargo.SchemeParser\", {\n    include: Fargo.Scheme,\n    initialize: function(input) {\n        this._input = input;\n        this._offset = 0;\n        this._nodeCache = {};\n    },\n    parse: function() {\n        var result = this[\"__consume__\" + this.root]();\n        return this._offset === this._input.length ? result : null;\n    },\n    extend: {\n        parse: function(input) {\n            var parser = new this(input);\n            return parser.parse();\n        }\n    }\n});\n\nFargo.SchemeParser.SyntaxNode = new JS.Class(\"Fargo.SchemeParser.SyntaxNode\", {\n    include: JS.Enumerable,\n    initialize: function(textValue, offset, elements, properties) {\n        this.textValue = textValue;\n        this.offset    = offset;\n        this.elements  = elements || [];\n        if (!properties) return;\n        for (var key in properties) this[key] = properties[key];\n    },\n    forEach: function(block, context) {\n        for (var i = 0, n = this.elements.length; i < n; i++)\n            block.call(context, this.elements[i], i);\n    }\n});\n\nFargo.SchemeParser.formatError = function (error) {\n    var lines    = error.input.split(/\\n/g),\n        lineNo   = 0,\n        offset   = 0;\n    \n    while (offset < error.offset) {\n      offset += lines[lineNo].length + 1;\n      lineNo += 1;\n    }\n    var message = 'Line ' + lineNo + ': expected ' + error.expected + '\\n',\n        line    = lines[lineNo - 1];\n    \n    message += line + '\\n';\n    offset  -= line.length + 1;\n    \n    while (offset < error.offset) {\n      message += ' ';\n      offset  += 1;\n    }\n    return message + '^';\n  };"
  },
  {
    "path": "source/fargo/scheme.peg",
    "content": "grammar Fargo.Scheme\n  \n  program   <- shebang? cell* <Fargo.Scheme.Program>\n  \n  shebang   <- space* \"#!\" (![\\n\\r] .)*\n  \n  cell      <- ignore quote cell <Fargo.Scheme.QuotedCell>\n             / ignore (list / vector / atom) ignore <Fargo.Scheme.Cell>\n  \n  quote     <- \"'\" / \"`\" / \",@\" / \",\"\n  \n  list      <- (\"(\" cells \")\" / \"[\" cells \"]\") <Fargo.Scheme.List>\n  \n  cells     <- cell+ dot:\".\" space cell / cell*\n  \n  vector    <- (\"#(\" cell* \")\" / \"#[\" cell* \"]\") <Fargo.Scheme.Vector>\n  \n  atom      <- datum / symbol\n  \n  datum     <- (boolean / number / character / string) !(!reserved .) <Fargo.Scheme.Datum>\n  \n  boolean   <- \"#\" [tf] <Fargo.Scheme.Boolean>\n  \n  number    <- \"-\"? (\"0\" / [1-9] [0-9]*) (\".\" [0-9]+)? <Fargo.Scheme.Number>\n  \n  character <- \"#\\\\\" glyph:(symbol / .)\n  \n  string    <- \"\\\"\" (\"\\\\\\\"\" / [^\"])* \"\\\"\" <Fargo.Scheme.String>\n  \n  symbol    <- ((!delimiter .) (!delimiter .)+ / (!reserved .)) <Fargo.Scheme.Symbol>\n  \n  reserved  <- \".\" / delimiter\n  \n  delimiter <- quote / \"#\" / paren / space\n  \n  paren     <- [\\(\\)\\[\\]]\n  \n  space     <- [\\s\\n\\r\\t]\n  \n  ignore    <- space* (comment ignore)?\n  \n  comment   <- \";\" (![\\n\\r] .)*\n"
  },
  {
    "path": "source/fargo/scheme_nodes.js",
    "content": "Fargo.Scheme.Program = new JS.Module({\n  eval: function(scope) {\n    var expr  = this.convert(),\n        value = null,\n        nil   = Fargo.Runtime.Cons.NULL;\n    \n    while (expr !== nil) {\n      value = Fargo.evaluate(expr.car, scope);\n      expr  = expr.cdr;\n    }\n    return value;\n  },\n  \n  convert: function() {\n    if (this._ast) return this._ast;\n    \n    var cells = this.elements[1].elements,\n        cons  = Fargo.Runtime.Cons,\n        list  = cons.NULL,\n        i     = cells.length;\n    \n    while (i--) list = new cons(cells[i].convert(), list);\n    return this._ast = list;\n  }\n});\n\nFargo.Scheme.QuotedCell = new JS.Module({\n  SHORTHANDS: {\n    \"'\":  'quote',\n    \"`\":  'quasiquote',\n    \",\":  'unquote',\n    \",@\": 'unquote-splicing'\n  },\n  \n  convert: function() {\n    var runtime = Fargo.Runtime,\n        macro   = this.SHORTHANDS[this.elements[1].textValue];\n    \n    return new runtime.Cons(new runtime.Symbol(macro),\n           new runtime.Cons(this.cell.convert(),\n                            runtime.Cons.NULL));\n  }\n});\n\nFargo.Scheme.Cell = new JS.Module({\n  convert: function() {\n    return this.elements[1].convert();\n  }\n});\n\nFargo.Scheme.Datum = new JS.Module({\n  convert: function() {\n    return this.elements[0].convert();\n  }\n});\n\nFargo.Scheme.List = new JS.Module({\n  convert: function() {\n    if (this._ast) return this._ast;\n    \n    var cells = this.cells.dot ? this.cells.elements[0].elements : this.cells.elements,\n        elems = [],\n        i = cells.length;\n    \n    while (i--) elems[i] = cells[i].convert();\n    var tail = this.cells.dot && this.cells.elements[3].convert();\n    this._ast = Fargo.Runtime.Cons.list(elems, tail);\n    \n    return this._ast;\n  }\n});\n\nFargo.Scheme.Vector = new JS.Module({\n  convert: function() {\n    if (this._ast) return this._ast;\n    \n    var cells = this.elements[1].elements,\n        elems = [],\n        i = cells.length;\n    \n    while (i--) elems[i] = cells[i].convert();\n    return this._ast = new Fargo.Runtime.Vector(elems);\n  }\n});\n\nFargo.Scheme.Boolean = new JS.Module({\n  convert: function() {\n    return this.textValue === '#t';\n  }\n});\n\nFargo.Scheme.Number = new JS.Module({\n  convert: function() {\n    return parseFloat(this.textValue, 10);\n  }\n});\n\nFargo.Scheme.String = new JS.Module({\n  convert: function() {\n    return eval(this.textValue);\n  }\n});\n\nFargo.Scheme.Symbol = new JS.Module({\n  convert: function() {\n    return new Fargo.Runtime.Symbol(this.textValue);\n  }\n});\n"
  },
  {
    "path": "source/fargo.js",
    "content": "Fargo = new JS.Module('Fargo');\n\nFargo.extend({\n  VERSION: '0.0.1-preview',\n  \n  Runtime: new JS.Class({\n    initialize: function() {\n      this.stack = new this.klass.Stackless();\n      this.scope = new this.klass.TopLevel(this);\n    },\n    \n    define: function(name, value) {\n      return this.scope.define(name, value);\n    },\n    \n    syntax: function(name, value) {\n      return this.scope.syntax(name, value);\n    },\n    \n    run: function(path) {\n      return this.scope.run(path);\n    }\n  }),\n  \n  clone: function(value) {\n    if (value && value.clone) return value.clone();\n    return value;\n  },\n  \n  evaluate: function(expression, scope) {\n    if (expression && expression.klass === Fargo.Runtime.Value)\n      return expression.value;\n    \n    if (!expression || !expression.eval) return expression;\n    return expression.eval(scope);\n  },\n  \n  freeze: function(value) {\n    if (value && value.freeze) value.freeze();\n    return value;\n  },\n  \n  stringify: function(object) {\n    if (typeof object === 'boolean') return object ? '#t' : '#f';\n    if (typeof object === 'string') return JSON.stringify(object);\n    if (typeof object === 'number') return object.toString(10);\n    return object.toString();\n  },\n          \n  dirname: function(path) {\n    return path.replace(/\\/[^\\/]*$/g, '');\n  },\n  \n  path: function() {\n    return Array.prototype.join.call(arguments, '/')\n           .replace(/\\/+/g, '/');\n  },\n  \n  puts: function(string) {\n    if (typeof require === 'function') require('sys').puts(string);\n  },\n  \n  loadJavaScript: function(path) {\n    if (typeof require === 'function') return require(path);\n    \n    var head = document.getElementsByTagName('head')[0],\n        script = document.createElement('script');\n    \n    script.type = 'text/javascript';\n    script.text = this.readFile(path);\n    head.appendChild(script);\n  },\n  \n  readFile: function(path) {\n    if (typeof require === 'function')\n      return require('fs').readFileSync(path).toString();\n    \n    var data = null,\n        xhr  = window.ActiveXObject\n             ? new ActiveXObject(\"Microsoft.XMLHTTP\")\n             : new XMLHttpRequest();\n    \n    xhr.open('GET', path, false);\n    xhr.onreadystatechange = function() {\n      if (xhr.readyState !== 4) return;\n      data = xhr.responseText;\n      xhr.onreadystatechange = function() {};\n      xhr = null;\n    };\n    xhr.send(null);\n    return data;\n  }\n});\n"
  },
  {
    "path": "test.js",
    "content": "var path   = require('path'),\n    assert = require('assert'),\n    sys    = require('sys');\n\nJSCLASS_PATH = './build/js.class';\nFARGO_PATH   = path.dirname(__filename) + '/build';\nTEST_PATH    = path.dirname(__filename) + '/vendor/heist/test/scheme_tests';\n\nrequire(JSCLASS_PATH + '/loader');\nJS.require('JS.Test');\nrequire(FARGO_PATH + '/fargo')\n\nvar runtime = new Fargo.Runtime(),\n    test    = new JS.Singleton(JS.Test.Unit.Assertions);\n\nruntime.define('assert', function(truthy) {\n  test.assert(truthy);\n  return true;\n});\n\nruntime.define('assert-equal', function(expected, actual) {\n  test.assertEqual(expected, actual);\n  return true;\n});\n\nruntime.syntax('assert-raise', function(scope, cells) {\n  sys.debug('Not implemented: assert-raise ' + cells);\n  return true;\n});\n\n// runtime.run(TEST_PATH + '/arithmetic.scm');\nruntime.run(TEST_PATH + '/booleans.scm');\nruntime.run(TEST_PATH + '/closures.scm');\nruntime.run(TEST_PATH + '/conditionals.scm');\nruntime.run(TEST_PATH + '/define_functions.scm');\n// runtime.run(TEST_PATH + '/define_values.scm');\nruntime.run(TEST_PATH + '/delay.scm');\n// runtime.run(TEST_PATH + '/equivalence.scm');\nruntime.run(TEST_PATH + '/functional.scm');\nruntime.run(TEST_PATH + '/let.scm');\nruntime.run(TEST_PATH + '/lists.scm');\nruntime.run(TEST_PATH + '/macros.scm');\nruntime.run(TEST_PATH + '/unhygienic.scm');\n// runtime.run(TEST_PATH + '/hygienic.scm');\n// runtime.run(TEST_PATH + '/numbers.scm');\n// runtime.run(TEST_PATH + '/protection.scm');\n// runtime.run(TEST_PATH + '/strings.scm');\nruntime.run(TEST_PATH + '/vectors.scm');\n"
  },
  {
    "path": "try-fargo/analytics.js",
    "content": "var _gaq = _gaq || [];\n_gaq.push(['_setAccount', 'UA-873493-9']);\n_gaq.push(['_trackPageview']);\n\n(function() {\n  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n})();\n"
  },
  {
    "path": "try-fargo/index.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">\n    <title>Try Fargo</title>\n    <link rel=\"stylesheet\" href=\"/style.css\">\n    <script type=\"text/javascript\" src=\"/javascripts/fargo/js.class/loader.js\"></script>\n    <script type=\"text/javascript\" src=\"/javascripts/packages.js\"></script>\n  </head>\n  <body>\n    \n    <!--\n      Hello-world fiber example using set-timeout and alert\n      \n      (define (get-message)\n        (define f (current-fiber))\n        (set-timeout (lambda ()\n          (f \"Hello, world!\")\n        ) 5000)\n        (yield))\n      \n      (define main (fiber ()\n        ; Look ma, it looks synchronous!\n        (define msg (get-message))\n        (alert msg)\n      ))\n    -->\n    \n    <div id=\"container\">\n      <div id=\"sidebar\">\n        <h1>Fargo //</h1>\n        \n        <p>An experimental language to improve how we work with asynchronous\n          systems in JavaScript. It runs on <a href=\"http://nodejs.org\">Node.js</a>\n          and in browsers.</p>\n        \n        <p>Its core is a modified R5RS Scheme. It has tail-recursion and\n          <tt>syntax-rules</tt> macros, and uses the core library from\n          <a href=\"http://github.com/jcoglan/heist\">Heist</a>. Data types are\n          booleans <tt>#t</tt>/<tt>#f</tt>, numbers, symbols, strings, lists\n          <tt>(a b c)</tt> and vectors <tt>#(a b c)</tt>. Quasiquoting with\n          <tt>'</tt>/<tt>`</tt>/<tt>,</tt>/<tt>,@</tt> is supported.</p>\n        \n        <p>Instead of <tt>call/cc</tt>, Fargo supports Ruby-style fibers for\n          pausing and resuming async work. View source for an example using\n          <tt>set-timeout</tt>. You can find out more over on\n          <a href=\"http://github.com/jcoglan/fargo\">GitHub</a>.</p>\n        \n        <p><tt>(download \"0.0.1-preview\")</tt></p>\n        \n        <p>MIT licensed, &copy; 2011 <a href=\"http://jcoglan.com\">James Coglan</a>.</p>\n      </div>\n      <div id=\"fargo-console\"></div>\n    </div>\n    \n    <script type=\"text/javascript\">\n      window.FARGO_PATH = '/javascripts/fargo';\n      JS.require('jQuery.fn.console', 'Fargo', function() {\n        \n        var runtime = new Fargo.Runtime();\n        \n        runtime.define('alert', function(message) {\n          alert(message);\n          return message;\n        });\n        \n        runtime.define('download', function(version) {\n          window.location = '/downloads/fargo-' + version + '.zip';\n          return true;\n        });\n        \n        var OPTIONS = {\n          commandValidate: function(line) {\n            return line.replace(/\\s/, '') !== '';\n          },\n          \n          commandHandle: function(line) {\n            var parser  = new Fargo.SchemeParser(line),\n                program = parser.parse(),\n                result;\n            \n            if (!program) {\n              if (parser.error.actual === '<EOF>')\n                return fargoConsole.continuedPrompt = true;\n              \n              fargoConsole.continuedPrompt = false;\n              return Fargo.SchemeParser.formatError(parser.error);\n            }\n            \n            try {\n              result = program.eval(runtime.scope);\n              return result === undefined ? '' : '; => ' + Fargo.stringify(result);\n            } catch (e) {\n              return e.toString();\n            } finally {\n              fargoConsole.continuedPrompt = false;\n            }\n          },\n          \n          welcomeMessage:       'Fargo ' + Fargo.VERSION + '\\ne.g. (alert \"Hello, world!\")',\n          animateScroll:        true,\n          autofocus:            true,\n          promptHistory:        true,\n          promptLabel:          '> ',\n          continuedPrompt:      true,\n          continuedPromptLabel: '  '\n        };\n        \n        window.fargoConsole = jQuery('#fargo-console').console(OPTIONS);\n      });  \n    </script>\n    \n  </body>\n</html>\n"
  },
  {
    "path": "try-fargo/javascripts/packages.js",
    "content": "JS.Packages(function() { with(this) {\n  file('/javascripts/fargo/fargo-min.js')\n    .provides('Fargo')\n    .requires('JS.Class', 'JS.Module', 'JS.Enumerable');\n  \n  file('/javascripts/jquery-console/jquery-1.4.2.min.js')\n    .provides('jQuery');\n  \n  file('/javascripts/jquery-console/jquery.console.js')\n    .provides('jQuery.fn.console')\n    .requires('jQuery');\n}});\n"
  },
  {
    "path": "try-fargo/style.css",
    "content": "html {\n  background: #ddf2fd;\n  background-image: -webkit-gradient(radial, 50% 40%, 5, 40% 40%, 800, from(#ddf2fd), to(#75bce1));\n}\nbody {\n  color: #444;\n  margin: 0;\n  padding: 0;\n  font: 13px/1.5 FreeSans, Helvetica, Arial, sans-serif;\n}\n#container {\n  margin: 60px auto;\n  width: 960px;\n  height: 480px;\n  -moz-box-shadow:    0 10px 50px #888;\n  -webkit-box-shadow: 0 10px 50px #888;\n  box-shadow:         0 10px 50px #888;\n}\n#sidebar {\n  background: #fff;\n  float: left;\n  padding: 8px 20px;\n  width: 320px;\n  height: 464px;\n}\nh1 {\n  color: #6f3d1b;\n  font-size: 300%;\n  margin: 0 -20px;\n  padding: 0 20px;\n  border-bottom: 1px solid #ccc;\n  text-transform: uppercase;\n}\np {\n  margin: 1.5em 0;\n}\na {\n  color: #50b0d7;\n  font-weight: bold;\n  text-decoration: none;\n}\ntt {\n  background: #f0f0f0;\n}\n.jquery-console-inner {\n  background: #333;\n  color: #b3dc47;\n  float: left;\n  padding: 20px;\n  width: 560px;\n  height: 440px;\n  overflow: auto;\n  font-size: 120%;\n  font-family: Monaco, Courier New, monospace;\n}\n.jquery-console-cursor {\n  background: #b3dc47;\n}\n"
  }
]