| 1 | /** |
| 2 | * @license cs 0.3.1 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. |
| 3 | * Available via the MIT or new BSD license. |
| 4 | * see: http://github.com/jrburke/require-cs for details |
| 5 | * |
| 6 | * CoffeeScript is Copyright (c) 2011 Jeremy Ashkenas |
| 7 | * http://jashkenas.github.com/coffee-script/ |
| 8 | * CoffeeScriptVersion: '1.1.2' |
| 9 | */ |
| 10 | |
| 11 | if (typeof define !== 'function') { var define = (require('../../../amdefine'))(module); } |
| 12 | |
| 13 | /* Yes, deliciously evil. */ |
| 14 | /*jslint evil: true, strict: false, plusplus: false, regexp: false */ |
| 15 | /*global require: false, XMLHttpRequest: false, ActiveXObject: false, |
| 16 | define: false, process: false, window: false */ |
| 17 | |
| 18 | (function () { |
| 19 | |
| 20 | //>>excludeStart('excludeCoffeeScript', pragmas.excludeCoffeeScript) |
| 21 | |
| 22 | var fs, getXhr, CoffeeScript, |
| 23 | progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], |
| 24 | fetchText = function () { |
| 25 | throw new Error('Environment unsupported.'); |
| 26 | }, |
| 27 | buildMap = []; |
| 28 | |
| 29 | //START COFFEESCRIPT |
| 30 | CoffeeScript = (function () { |
| 31 | var __MODULES = {}; function require(name) { return __MODULES[name.substring(2)]; }; |
| 32 | (function () { |
| 33 | var exports = __MODULES['helpers'] = {}; |
| 34 | (function() { |
| 35 | var extend, flatten; |
| 36 | exports.starts = function(string, literal, start) { |
| 37 | return literal === string.substr(start, literal.length); |
| 38 | }; |
| 39 | exports.ends = function(string, literal, back) { |
| 40 | var len; |
| 41 | len = literal.length; |
| 42 | return literal === string.substr(string.length - len - (back || 0), len); |
| 43 | }; |
| 44 | exports.compact = function(array) { |
| 45 | var item, _i, _len, _results; |
| 46 | _results = []; |
| 47 | for (_i = 0, _len = array.length; _i < _len; _i++) { |
| 48 | item = array[_i]; |
| 49 | if (item) { |
| 50 | _results.push(item); |
| 51 | } |
| 52 | } |
| 53 | return _results; |
| 54 | }; |
| 55 | exports.count = function(string, substr) { |
| 56 | var num, pos; |
| 57 | num = pos = 0; |
| 58 | if (!substr.length) { |
| 59 | return 1 / 0; |
| 60 | } |
| 61 | while (pos = 1 + string.indexOf(substr, pos)) { |
| 62 | num++; |
| 63 | } |
| 64 | return num; |
| 65 | }; |
| 66 | exports.merge = function(options, overrides) { |
| 67 | return extend(extend({}, options), overrides); |
| 68 | }; |
| 69 | extend = exports.extend = function(object, properties) { |
| 70 | var key, val; |
| 71 | for (key in properties) { |
| 72 | val = properties[key]; |
| 73 | object[key] = val; |
| 74 | } |
| 75 | return object; |
| 76 | }; |
| 77 | exports.flatten = flatten = function(array) { |
| 78 | var element, flattened, _i, _len; |
| 79 | flattened = []; |
| 80 | for (_i = 0, _len = array.length; _i < _len; _i++) { |
| 81 | element = array[_i]; |
| 82 | if (element instanceof Array) { |
| 83 | flattened = flattened.concat(flatten(element)); |
| 84 | } else { |
| 85 | flattened.push(element); |
| 86 | } |
| 87 | } |
| 88 | return flattened; |
| 89 | }; |
| 90 | exports.del = function(obj, key) { |
| 91 | var val; |
| 92 | val = obj[key]; |
| 93 | delete obj[key]; |
| 94 | return val; |
| 95 | }; |
| 96 | exports.last = function(array, back) { |
| 97 | return array[array.length - (back || 0) - 1]; |
| 98 | }; |
| 99 | }).call(this); |
| 100 | return exports; |
| 101 | }());(function () { |
| 102 | var exports = __MODULES['rewriter'] = {}; |
| 103 | (function() { |
| 104 | var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref; |
| 105 | var __indexOf = Array.prototype.indexOf || function(item) { |
| 106 | for (var i = 0, l = this.length; i < l; i++) { |
| 107 | if (this[i] === item) return i; |
| 108 | } |
| 109 | return -1; |
| 110 | }, __slice = Array.prototype.slice; |
| 111 | exports.Rewriter = (function() { |
| 112 | function Rewriter() {} |
| 113 | Rewriter.prototype.rewrite = function(tokens) { |
| 114 | this.tokens = tokens; |
| 115 | this.removeLeadingNewlines(); |
| 116 | this.removeMidExpressionNewlines(); |
| 117 | this.closeOpenCalls(); |
| 118 | this.closeOpenIndexes(); |
| 119 | this.addImplicitIndentation(); |
| 120 | this.tagPostfixConditionals(); |
| 121 | this.addImplicitBraces(); |
| 122 | this.addImplicitParentheses(); |
| 123 | this.ensureBalance(BALANCED_PAIRS); |
| 124 | this.rewriteClosingParens(); |
| 125 | return this.tokens; |
| 126 | }; |
| 127 | Rewriter.prototype.scanTokens = function(block) { |
| 128 | var i, token, tokens; |
| 129 | tokens = this.tokens; |
| 130 | i = 0; |
| 131 | while (token = tokens[i]) { |
| 132 | i += block.call(this, token, i, tokens); |
| 133 | } |
| 134 | return true; |
| 135 | }; |
| 136 | Rewriter.prototype.detectEnd = function(i, condition, action) { |
| 137 | var levels, token, tokens, _ref, _ref2; |
| 138 | tokens = this.tokens; |
| 139 | levels = 0; |
| 140 | while (token = tokens[i]) { |
| 141 | if (levels === 0 && condition.call(this, token, i)) { |
| 142 | return action.call(this, token, i); |
| 143 | } |
| 144 | if (!token || levels < 0) { |
| 145 | return action.call(this, token, i - 1); |
| 146 | } |
| 147 | if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) { |
| 148 | levels += 1; |
| 149 | } else if (_ref2 = token[0], __indexOf.call(EXPRESSION_END, _ref2) >= 0) { |
| 150 | levels -= 1; |
| 151 | } |
| 152 | i += 1; |
| 153 | } |
| 154 | return i - 1; |
| 155 | }; |
| 156 | Rewriter.prototype.removeLeadingNewlines = function() { |
| 157 | var i, tag, _len, _ref; |
| 158 | _ref = this.tokens; |
| 159 | for (i = 0, _len = _ref.length; i < _len; i++) { |
| 160 | tag = _ref[i][0]; |
| 161 | if (tag !== 'TERMINATOR') { |
| 162 | break; |
| 163 | } |
| 164 | } |
| 165 | if (i) { |
| 166 | return this.tokens.splice(0, i); |
| 167 | } |
| 168 | }; |
| 169 | Rewriter.prototype.removeMidExpressionNewlines = function() { |
| 170 | return this.scanTokens(function(token, i, tokens) { |
| 171 | var _ref; |
| 172 | if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) { |
| 173 | return 1; |
| 174 | } |
| 175 | tokens.splice(i, 1); |
| 176 | return 0; |
| 177 | }); |
| 178 | }; |
| 179 | Rewriter.prototype.closeOpenCalls = function() { |
| 180 | var action, condition; |
| 181 | condition = function(token, i) { |
| 182 | var _ref; |
| 183 | return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; |
| 184 | }; |
| 185 | action = function(token, i) { |
| 186 | return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; |
| 187 | }; |
| 188 | return this.scanTokens(function(token, i) { |
| 189 | if (token[0] === 'CALL_START') { |
| 190 | this.detectEnd(i + 1, condition, action); |
| 191 | } |
| 192 | return 1; |
| 193 | }); |
| 194 | }; |
| 195 | Rewriter.prototype.closeOpenIndexes = function() { |
| 196 | var action, condition; |
| 197 | condition = function(token, i) { |
| 198 | var _ref; |
| 199 | return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; |
| 200 | }; |
| 201 | action = function(token, i) { |
| 202 | return token[0] = 'INDEX_END'; |
| 203 | }; |
| 204 | return this.scanTokens(function(token, i) { |
| 205 | if (token[0] === 'INDEX_START') { |
| 206 | this.detectEnd(i + 1, condition, action); |
| 207 | } |
| 208 | return 1; |
| 209 | }); |
| 210 | }; |
| 211 | Rewriter.prototype.addImplicitBraces = function() { |
| 212 | var action, condition, stack, start, startIndent; |
| 213 | stack = []; |
| 214 | start = null; |
| 215 | startIndent = 0; |
| 216 | condition = function(token, i) { |
| 217 | var one, tag, three, two, _ref, _ref2; |
| 218 | _ref = this.tokens.slice(i + 1, (i + 3 + 1) || 9e9), one = _ref[0], two = _ref[1], three = _ref[2]; |
| 219 | if ('HERECOMMENT' === (one != null ? one[0] : void 0)) { |
| 220 | return false; |
| 221 | } |
| 222 | tag = token[0]; |
| 223 | return ((tag === 'TERMINATOR' || tag === 'OUTDENT') && !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':')) || (tag === ',' && one && ((_ref2 = one[0]) !== 'IDENTIFIER' && _ref2 !== 'NUMBER' && _ref2 !== 'STRING' && _ref2 !== '@' && _ref2 !== 'TERMINATOR' && _ref2 !== 'OUTDENT')); |
| 224 | }; |
| 225 | action = function(token, i) { |
| 226 | var tok; |
| 227 | tok = ['}', '}', token[2]]; |
| 228 | tok.generated = true; |
| 229 | return this.tokens.splice(i, 0, tok); |
| 230 | }; |
| 231 | return this.scanTokens(function(token, i, tokens) { |
| 232 | var ago, idx, tag, tok, value, _ref, _ref2; |
| 233 | if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) { |
| 234 | stack.push([(tag === 'INDENT' && this.tag(i - 1) === '{' ? '{' : tag), i]); |
| 235 | return 1; |
| 236 | } |
| 237 | if (__indexOf.call(EXPRESSION_END, tag) >= 0) { |
| 238 | start = stack.pop(); |
| 239 | return 1; |
| 240 | } |
| 241 | if (!(tag === ':' && ((ago = this.tag(i - 2)) === ':' || ((_ref2 = stack[stack.length - 1]) != null ? _ref2[0] : void 0) !== '{'))) { |
| 242 | return 1; |
| 243 | } |
| 244 | stack.push(['{']); |
| 245 | idx = ago === '@' ? i - 2 : i - 1; |
| 246 | while (this.tag(idx - 2) === 'HERECOMMENT') { |
| 247 | idx -= 2; |
| 248 | } |
| 249 | value = new String('{'); |
| 250 | value.generated = true; |
| 251 | tok = ['{', value, token[2]]; |
| 252 | tok.generated = true; |
| 253 | tokens.splice(idx, 0, tok); |
| 254 | this.detectEnd(i + 2, condition, action); |
| 255 | return 2; |
| 256 | }); |
| 257 | }; |
| 258 | Rewriter.prototype.addImplicitParentheses = function() { |
| 259 | var action, noCall; |
| 260 | noCall = false; |
| 261 | action = function(token, i) { |
| 262 | var idx; |
| 263 | idx = token[0] === 'OUTDENT' ? i + 1 : i; |
| 264 | return this.tokens.splice(idx, 0, ['CALL_END', ')', token[2]]); |
| 265 | }; |
| 266 | return this.scanTokens(function(token, i, tokens) { |
| 267 | var callObject, current, next, prev, seenControl, seenSingle, tag, _ref, _ref2, _ref3; |
| 268 | tag = token[0]; |
| 269 | if (tag === 'CLASS' || tag === 'IF') { |
| 270 | noCall = true; |
| 271 | } |
| 272 | _ref = tokens.slice(i - 1, (i + 1 + 1) || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2]; |
| 273 | callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0); |
| 274 | seenSingle = false; |
| 275 | seenControl = false; |
| 276 | if (__indexOf.call(LINEBREAKS, tag) >= 0) { |
| 277 | noCall = false; |
| 278 | } |
| 279 | if (prev && !prev.spaced && tag === '?') { |
| 280 | token.call = true; |
| 281 | } |
| 282 | if (token.fromThen) { |
| 283 | return 1; |
| 284 | } |
| 285 | if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref3 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref3) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) { |
| 286 | return 1; |
| 287 | } |
| 288 | tokens.splice(i, 0, ['CALL_START', '(', token[2]]); |
| 289 | this.detectEnd(i + 1, function(token, i) { |
| 290 | var post, _ref4; |
| 291 | tag = token[0]; |
| 292 | if (!seenSingle && token.fromThen) { |
| 293 | return true; |
| 294 | } |
| 295 | if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>') { |
| 296 | seenSingle = true; |
| 297 | } |
| 298 | if (tag === 'IF' || tag === 'ELSE' || tag === 'SWITCH' || tag === 'TRY') { |
| 299 | seenControl = true; |
| 300 | } |
| 301 | if ((tag === '.' || tag === '?.' || tag === '::') && this.tag(i - 1) === 'OUTDENT') { |
| 302 | return true; |
| 303 | } |
| 304 | return !token.generated && this.tag(i - 1) !== ',' && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === 'INDENT' && !seenControl)) && (tag !== 'INDENT' || (this.tag(i - 2) !== 'CLASS' && (_ref4 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref4) < 0) && !((post = this.tokens[i + 1]) && post.generated && post[0] === '{'))); |
| 305 | }, action); |
| 306 | if (prev[0] === '?') { |
| 307 | prev[0] = 'FUNC_EXIST'; |
| 308 | } |
| 309 | return 2; |
| 310 | }); |
| 311 | }; |
| 312 | Rewriter.prototype.addImplicitIndentation = function() { |
| 313 | return this.scanTokens(function(token, i, tokens) { |
| 314 | var action, condition, indent, outdent, starter, tag, _ref, _ref2; |
| 315 | tag = token[0]; |
| 316 | if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { |
| 317 | tokens.splice(i, 1); |
| 318 | return 0; |
| 319 | } |
| 320 | if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { |
| 321 | tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation(token)))); |
| 322 | return 2; |
| 323 | } |
| 324 | if (tag === 'CATCH' && ((_ref = this.tag(i + 2)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { |
| 325 | tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation(token)))); |
| 326 | return 4; |
| 327 | } |
| 328 | if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { |
| 329 | starter = tag; |
| 330 | _ref2 = this.indentation(token), indent = _ref2[0], outdent = _ref2[1]; |
| 331 | if (starter === 'THEN') { |
| 332 | indent.fromThen = true; |
| 333 | } |
| 334 | indent.generated = outdent.generated = true; |
| 335 | tokens.splice(i + 1, 0, indent); |
| 336 | condition = function(token, i) { |
| 337 | var _ref3; |
| 338 | return token[1] !== ';' && (_ref3 = token[0], __indexOf.call(SINGLE_CLOSERS, _ref3) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN')); |
| 339 | }; |
| 340 | action = function(token, i) { |
| 341 | return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); |
| 342 | }; |
| 343 | this.detectEnd(i + 2, condition, action); |
| 344 | if (tag === 'THEN') { |
| 345 | tokens.splice(i, 1); |
| 346 | } |
| 347 | return 1; |
| 348 | } |
| 349 | return 1; |
| 350 | }); |
| 351 | }; |
| 352 | Rewriter.prototype.tagPostfixConditionals = function() { |
| 353 | var condition; |
| 354 | condition = function(token, i) { |
| 355 | var _ref; |
| 356 | return (_ref = token[0]) === 'TERMINATOR' || _ref === 'INDENT'; |
| 357 | }; |
| 358 | return this.scanTokens(function(token, i) { |
| 359 | var original; |
| 360 | if (token[0] !== 'IF') { |
| 361 | return 1; |
| 362 | } |
| 363 | original = token; |
| 364 | this.detectEnd(i + 1, condition, function(token, i) { |
| 365 | if (token[0] !== 'INDENT') { |
| 366 | return original[0] = 'POST_' + original[0]; |
| 367 | } |
| 368 | }); |
| 369 | return 1; |
| 370 | }); |
| 371 | }; |
| 372 | Rewriter.prototype.ensureBalance = function(pairs) { |
| 373 | var close, level, levels, open, openLine, tag, token, _i, _j, _len, _len2, _ref, _ref2; |
| 374 | levels = {}; |
| 375 | openLine = {}; |
| 376 | _ref = this.tokens; |
| 377 | for (_i = 0, _len = _ref.length; _i < _len; _i++) { |
| 378 | token = _ref[_i]; |
| 379 | tag = token[0]; |
| 380 | for (_j = 0, _len2 = pairs.length; _j < _len2; _j++) { |
| 381 | _ref2 = pairs[_j], open = _ref2[0], close = _ref2[1]; |
| 382 | levels[open] |= 0; |
| 383 | if (tag === open) { |
| 384 | if (levels[open]++ === 0) { |
| 385 | openLine[open] = token[2]; |
| 386 | } |
| 387 | } else if (tag === close && --levels[open] < 0) { |
| 388 | throw Error("too many " + token[1] + " on line " + (token[2] + 1)); |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | for (open in levels) { |
| 393 | level = levels[open]; |
| 394 | if (level > 0) { |
| 395 | throw Error("unclosed " + open + " on line " + (openLine[open] + 1)); |
| 396 | } |
| 397 | } |
| 398 | return this; |
| 399 | }; |
| 400 | Rewriter.prototype.rewriteClosingParens = function() { |
| 401 | var debt, key, stack; |
| 402 | stack = []; |
| 403 | debt = {}; |
| 404 | for (key in INVERSES) { |
| 405 | debt[key] = 0; |
| 406 | } |
| 407 | return this.scanTokens(function(token, i, tokens) { |
| 408 | var inv, match, mtag, oppos, tag, val, _ref; |
| 409 | if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) { |
| 410 | stack.push(token); |
| 411 | return 1; |
| 412 | } |
| 413 | if (__indexOf.call(EXPRESSION_END, tag) < 0) { |
| 414 | return 1; |
| 415 | } |
| 416 | if (debt[inv = INVERSES[tag]] > 0) { |
| 417 | debt[inv] -= 1; |
| 418 | tokens.splice(i, 1); |
| 419 | return 0; |
| 420 | } |
| 421 | match = stack.pop(); |
| 422 | mtag = match[0]; |
| 423 | oppos = INVERSES[mtag]; |
| 424 | if (tag === oppos) { |
| 425 | return 1; |
| 426 | } |
| 427 | debt[mtag] += 1; |
| 428 | val = [oppos, mtag === 'INDENT' ? match[1] : oppos]; |
| 429 | if (this.tag(i + 2) === mtag) { |
| 430 | tokens.splice(i + 3, 0, val); |
| 431 | stack.push(match); |
| 432 | } else { |
| 433 | tokens.splice(i, 0, val); |
| 434 | } |
| 435 | return 1; |
| 436 | }); |
| 437 | }; |
| 438 | Rewriter.prototype.indentation = function(token) { |
| 439 | return [['INDENT', 2, token[2]], ['OUTDENT', 2, token[2]]]; |
| 440 | }; |
| 441 | Rewriter.prototype.tag = function(i) { |
| 442 | var _ref; |
| 443 | return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; |
| 444 | }; |
| 445 | return Rewriter; |
| 446 | })(); |
| 447 | BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; |
| 448 | INVERSES = {}; |
| 449 | EXPRESSION_START = []; |
| 450 | EXPRESSION_END = []; |
| 451 | for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { |
| 452 | _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; |
| 453 | EXPRESSION_START.push(INVERSES[rite] = left); |
| 454 | EXPRESSION_END.push(INVERSES[left] = rite); |
| 455 | } |
| 456 | EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); |
| 457 | IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; |
| 458 | IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++']; |
| 459 | IMPLICIT_UNSPACED_CALL = ['+', '-']; |
| 460 | IMPLICIT_BLOCK = ['->', '=>', '{', '[', ',']; |
| 461 | IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; |
| 462 | SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; |
| 463 | SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; |
| 464 | LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; |
| 465 | }).call(this); |
| 466 | return exports; |
| 467 | }());(function () { |
| 468 | var exports = __MODULES['lexer'] = {}; |
| 469 | (function() { |
| 470 | var ASSIGNED, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NO_NEWLINE, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref; |
| 471 | var __indexOf = Array.prototype.indexOf || function(item) { |
| 472 | for (var i = 0, l = this.length; i < l; i++) { |
| 473 | if (this[i] === item) return i; |
| 474 | } |
| 475 | return -1; |
| 476 | }; |
| 477 | Rewriter = require('./rewriter').Rewriter; |
| 478 | _ref = require('./helpers'), count = _ref.count, starts = _ref.starts, compact = _ref.compact, last = _ref.last; |
| 479 | exports.Lexer = Lexer = (function() { |
| 480 | function Lexer() {} |
| 481 | Lexer.prototype.tokenize = function(code, opts) { |
| 482 | var i; |
| 483 | if (opts == null) { |
| 484 | opts = {}; |
| 485 | } |
| 486 | if (WHITESPACE.test(code)) { |
| 487 | code = "\n" + code; |
| 488 | } |
| 489 | code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); |
| 490 | this.code = code; |
| 491 | this.line = opts.line || 0; |
| 492 | this.indent = 0; |
| 493 | this.indebt = 0; |
| 494 | this.outdebt = 0; |
| 495 | this.indents = []; |
| 496 | this.tokens = []; |
| 497 | i = 0; |
| 498 | while (this.chunk = code.slice(i)) { |
| 499 | i += this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); |
| 500 | } |
| 501 | this.closeIndentation(); |
| 502 | if (opts.rewrite === false) { |
| 503 | return this.tokens; |
| 504 | } |
| 505 | return (new Rewriter).rewrite(this.tokens); |
| 506 | }; |
| 507 | Lexer.prototype.identifierToken = function() { |
| 508 | var colon, forcedIdentifier, id, input, match, prev, tag, _ref2, _ref3; |
| 509 | if (!(match = IDENTIFIER.exec(this.chunk))) { |
| 510 | return 0; |
| 511 | } |
| 512 | input = match[0], id = match[1], colon = match[2]; |
| 513 | if (id === 'own' && this.tag() === 'FOR') { |
| 514 | this.token('OWN', id); |
| 515 | return id.length; |
| 516 | } |
| 517 | forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::') || !prev.spaced && prev[0] === '@'); |
| 518 | tag = 'IDENTIFIER'; |
| 519 | if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { |
| 520 | tag = id.toUpperCase(); |
| 521 | if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { |
| 522 | tag = 'LEADING_WHEN'; |
| 523 | } else if (tag === 'FOR') { |
| 524 | this.seenFor = true; |
| 525 | } else if (tag === 'UNLESS') { |
| 526 | tag = 'IF'; |
| 527 | } else if (__indexOf.call(UNARY, tag) >= 0) { |
| 528 | tag = 'UNARY'; |
| 529 | } else if (__indexOf.call(RELATION, tag) >= 0) { |
| 530 | if (tag !== 'INSTANCEOF' && this.seenFor) { |
| 531 | tag = 'FOR' + tag; |
| 532 | this.seenFor = false; |
| 533 | } else { |
| 534 | tag = 'RELATION'; |
| 535 | if (this.value() === '!') { |
| 536 | this.tokens.pop(); |
| 537 | id = '!' + id; |
| 538 | } |
| 539 | } |
| 540 | } |
| 541 | } |
| 542 | if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { |
| 543 | if (forcedIdentifier) { |
| 544 | tag = 'IDENTIFIER'; |
| 545 | id = new String(id); |
| 546 | id.reserved = true; |
| 547 | } else if (__indexOf.call(RESERVED, id) >= 0) { |
| 548 | this.identifierError(id); |
| 549 | } |
| 550 | } |
| 551 | if (!forcedIdentifier) { |
| 552 | if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { |
| 553 | id = COFFEE_ALIAS_MAP[id]; |
| 554 | } |
| 555 | tag = (function() { |
| 556 | switch (id) { |
| 557 | case '!': |
| 558 | return 'UNARY'; |
| 559 | case '==': |
| 560 | case '!=': |
| 561 | return 'COMPARE'; |
| 562 | case '&&': |
| 563 | case '||': |
| 564 | return 'LOGIC'; |
| 565 | case 'true': |
| 566 | case 'false': |
| 567 | case 'null': |
| 568 | case 'undefined': |
| 569 | return 'BOOL'; |
| 570 | case 'break': |
| 571 | case 'continue': |
| 572 | case 'debugger': |
| 573 | return 'STATEMENT'; |
| 574 | default: |
| 575 | return tag; |
| 576 | } |
| 577 | })(); |
| 578 | } |
| 579 | this.token(tag, id); |
| 580 | if (colon) { |
| 581 | this.token(':', ':'); |
| 582 | } |
| 583 | return input.length; |
| 584 | }; |
| 585 | Lexer.prototype.numberToken = function() { |
| 586 | var match, number; |
| 587 | if (!(match = NUMBER.exec(this.chunk))) { |
| 588 | return 0; |
| 589 | } |
| 590 | number = match[0]; |
| 591 | this.token('NUMBER', number); |
| 592 | return number.length; |
| 593 | }; |
| 594 | Lexer.prototype.stringToken = function() { |
| 595 | var match, string; |
| 596 | switch (this.chunk.charAt(0)) { |
| 597 | case "'": |
| 598 | if (!(match = SIMPLESTR.exec(this.chunk))) { |
| 599 | return 0; |
| 600 | } |
| 601 | this.token('STRING', (string = match[0]).replace(MULTILINER, '\\\n')); |
| 602 | break; |
| 603 | case '"': |
| 604 | if (!(string = this.balancedString(this.chunk, '"'))) { |
| 605 | return 0; |
| 606 | } |
| 607 | if (0 < string.indexOf('#{', 1)) { |
| 608 | this.interpolateString(string.slice(1, -1)); |
| 609 | } else { |
| 610 | this.token('STRING', this.escapeLines(string)); |
| 611 | } |
| 612 | break; |
| 613 | default: |
| 614 | return 0; |
| 615 | } |
| 616 | this.line += count(string, '\n'); |
| 617 | return string.length; |
| 618 | }; |
| 619 | Lexer.prototype.heredocToken = function() { |
| 620 | var doc, heredoc, match, quote; |
| 621 | if (!(match = HEREDOC.exec(this.chunk))) { |
| 622 | return 0; |
| 623 | } |
| 624 | heredoc = match[0]; |
| 625 | quote = heredoc.charAt(0); |
| 626 | doc = this.sanitizeHeredoc(match[2], { |
| 627 | quote: quote, |
| 628 | indent: null |
| 629 | }); |
| 630 | if (quote === '"' && 0 <= doc.indexOf('#{')) { |
| 631 | this.interpolateString(doc, { |
| 632 | heredoc: true |
| 633 | }); |
| 634 | } else { |
| 635 | this.token('STRING', this.makeString(doc, quote, true)); |
| 636 | } |
| 637 | this.line += count(heredoc, '\n'); |
| 638 | return heredoc.length; |
| 639 | }; |
| 640 | Lexer.prototype.commentToken = function() { |
| 641 | var comment, here, match; |
| 642 | if (!(match = this.chunk.match(COMMENT))) { |
| 643 | return 0; |
| 644 | } |
| 645 | comment = match[0], here = match[1]; |
| 646 | if (here) { |
| 647 | this.token('HERECOMMENT', this.sanitizeHeredoc(here, { |
| 648 | herecomment: true, |
| 649 | indent: Array(this.indent + 1).join(' ') |
| 650 | })); |
| 651 | this.token('TERMINATOR', '\n'); |
| 652 | } |
| 653 | this.line += count(comment, '\n'); |
| 654 | return comment.length; |
| 655 | }; |
| 656 | Lexer.prototype.jsToken = function() { |
| 657 | var match, script; |
| 658 | if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { |
| 659 | return 0; |
| 660 | } |
| 661 | this.token('JS', (script = match[0]).slice(1, -1)); |
| 662 | return script.length; |
| 663 | }; |
| 664 | Lexer.prototype.regexToken = function() { |
| 665 | var length, match, prev, regex, _ref2; |
| 666 | if (this.chunk.charAt(0) !== '/') { |
| 667 | return 0; |
| 668 | } |
| 669 | if (match = HEREGEX.exec(this.chunk)) { |
| 670 | length = this.heregexToken(match); |
| 671 | this.line += count(match[0], '\n'); |
| 672 | return length; |
| 673 | } |
| 674 | prev = last(this.tokens); |
| 675 | if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { |
| 676 | return 0; |
| 677 | } |
| 678 | if (!(match = REGEX.exec(this.chunk))) { |
| 679 | return 0; |
| 680 | } |
| 681 | regex = match[0]; |
| 682 | this.token('REGEX', regex === '//' ? '/(?:)/' : regex); |
| 683 | return regex.length; |
| 684 | }; |
| 685 | Lexer.prototype.heregexToken = function(match) { |
| 686 | var body, flags, heregex, re, tag, tokens, value, _i, _len, _ref2, _ref3, _ref4, _ref5; |
| 687 | heregex = match[0], body = match[1], flags = match[2]; |
| 688 | if (0 > body.indexOf('#{')) { |
| 689 | re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/'); |
| 690 | this.token('REGEX', "/" + (re || '(?:)') + "/" + flags); |
| 691 | return heregex.length; |
| 692 | } |
| 693 | this.token('IDENTIFIER', 'RegExp'); |
| 694 | this.tokens.push(['CALL_START', '(']); |
| 695 | tokens = []; |
| 696 | _ref2 = this.interpolateString(body, { |
| 697 | regex: true |
| 698 | }); |
| 699 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 700 | _ref3 = _ref2[_i], tag = _ref3[0], value = _ref3[1]; |
| 701 | if (tag === 'TOKENS') { |
| 702 | tokens.push.apply(tokens, value); |
| 703 | } else { |
| 704 | if (!(value = value.replace(HEREGEX_OMIT, ''))) { |
| 705 | continue; |
| 706 | } |
| 707 | value = value.replace(/\\/g, '\\\\'); |
| 708 | tokens.push(['STRING', this.makeString(value, '"', true)]); |
| 709 | } |
| 710 | tokens.push(['+', '+']); |
| 711 | } |
| 712 | tokens.pop(); |
| 713 | if (((_ref4 = tokens[0]) != null ? _ref4[0] : void 0) !== 'STRING') { |
| 714 | this.tokens.push(['STRING', '""'], ['+', '+']); |
| 715 | } |
| 716 | (_ref5 = this.tokens).push.apply(_ref5, tokens); |
| 717 | if (flags) { |
| 718 | this.tokens.push([',', ','], ['STRING', '"' + flags + '"']); |
| 719 | } |
| 720 | this.token(')', ')'); |
| 721 | return heregex.length; |
| 722 | }; |
| 723 | Lexer.prototype.lineToken = function() { |
| 724 | var diff, indent, match, noNewlines, prev, size; |
| 725 | if (!(match = MULTI_DENT.exec(this.chunk))) { |
| 726 | return 0; |
| 727 | } |
| 728 | indent = match[0]; |
| 729 | this.line += count(indent, '\n'); |
| 730 | prev = last(this.tokens, 1); |
| 731 | size = indent.length - 1 - indent.lastIndexOf('\n'); |
| 732 | noNewlines = this.unfinished(); |
| 733 | if (size - this.indebt === this.indent) { |
| 734 | if (noNewlines) { |
| 735 | this.suppressNewlines(); |
| 736 | } else { |
| 737 | this.newlineToken(); |
| 738 | } |
| 739 | return indent.length; |
| 740 | } |
| 741 | if (size > this.indent) { |
| 742 | if (noNewlines) { |
| 743 | this.indebt = size - this.indent; |
| 744 | this.suppressNewlines(); |
| 745 | return indent.length; |
| 746 | } |
| 747 | diff = size - this.indent + this.outdebt; |
| 748 | this.token('INDENT', diff); |
| 749 | this.indents.push(diff); |
| 750 | this.outdebt = this.indebt = 0; |
| 751 | } else { |
| 752 | this.indebt = 0; |
| 753 | this.outdentToken(this.indent - size, noNewlines); |
| 754 | } |
| 755 | this.indent = size; |
| 756 | return indent.length; |
| 757 | }; |
| 758 | Lexer.prototype.outdentToken = function(moveOut, noNewlines, close) { |
| 759 | var dent, len; |
| 760 | while (moveOut > 0) { |
| 761 | len = this.indents.length - 1; |
| 762 | if (this.indents[len] === void 0) { |
| 763 | moveOut = 0; |
| 764 | } else if (this.indents[len] === this.outdebt) { |
| 765 | moveOut -= this.outdebt; |
| 766 | this.outdebt = 0; |
| 767 | } else if (this.indents[len] < this.outdebt) { |
| 768 | this.outdebt -= this.indents[len]; |
| 769 | moveOut -= this.indents[len]; |
| 770 | } else { |
| 771 | dent = this.indents.pop() - this.outdebt; |
| 772 | moveOut -= dent; |
| 773 | this.outdebt = 0; |
| 774 | this.token('OUTDENT', dent); |
| 775 | } |
| 776 | } |
| 777 | if (dent) { |
| 778 | this.outdebt -= moveOut; |
| 779 | } |
| 780 | if (!(this.tag() === 'TERMINATOR' || noNewlines)) { |
| 781 | this.token('TERMINATOR', '\n'); |
| 782 | } |
| 783 | return this; |
| 784 | }; |
| 785 | Lexer.prototype.whitespaceToken = function() { |
| 786 | var match, nline, prev; |
| 787 | if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { |
| 788 | return 0; |
| 789 | } |
| 790 | prev = last(this.tokens); |
| 791 | if (prev) { |
| 792 | prev[match ? 'spaced' : 'newLine'] = true; |
| 793 | } |
| 794 | if (match) { |
| 795 | return match[0].length; |
| 796 | } else { |
| 797 | return 0; |
| 798 | } |
| 799 | }; |
| 800 | Lexer.prototype.newlineToken = function() { |
| 801 | if (this.tag() !== 'TERMINATOR') { |
| 802 | this.token('TERMINATOR', '\n'); |
| 803 | } |
| 804 | return this; |
| 805 | }; |
| 806 | Lexer.prototype.suppressNewlines = function() { |
| 807 | if (this.value() === '\\') { |
| 808 | this.tokens.pop(); |
| 809 | } |
| 810 | return this; |
| 811 | }; |
| 812 | Lexer.prototype.literalToken = function() { |
| 813 | var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; |
| 814 | if (match = OPERATOR.exec(this.chunk)) { |
| 815 | value = match[0]; |
| 816 | if (CODE.test(value)) { |
| 817 | this.tagParameters(); |
| 818 | } |
| 819 | } else { |
| 820 | value = this.chunk.charAt(0); |
| 821 | } |
| 822 | tag = value; |
| 823 | prev = last(this.tokens); |
| 824 | if (value === '=' && prev) { |
| 825 | if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { |
| 826 | this.assignmentError(); |
| 827 | } |
| 828 | if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { |
| 829 | prev[0] = 'COMPOUND_ASSIGN'; |
| 830 | prev[1] += '='; |
| 831 | return value.length; |
| 832 | } |
| 833 | } |
| 834 | if (value === ';') { |
| 835 | tag = 'TERMINATOR'; |
| 836 | } else if (__indexOf.call(MATH, value) >= 0) { |
| 837 | tag = 'MATH'; |
| 838 | } else if (__indexOf.call(COMPARE, value) >= 0) { |
| 839 | tag = 'COMPARE'; |
| 840 | } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { |
| 841 | tag = 'COMPOUND_ASSIGN'; |
| 842 | } else if (__indexOf.call(UNARY, value) >= 0) { |
| 843 | tag = 'UNARY'; |
| 844 | } else if (__indexOf.call(SHIFT, value) >= 0) { |
| 845 | tag = 'SHIFT'; |
| 846 | } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { |
| 847 | tag = 'LOGIC'; |
| 848 | } else if (prev && !prev.spaced) { |
| 849 | if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { |
| 850 | if (prev[0] === '?') { |
| 851 | prev[0] = 'FUNC_EXIST'; |
| 852 | } |
| 853 | tag = 'CALL_START'; |
| 854 | } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { |
| 855 | tag = 'INDEX_START'; |
| 856 | switch (prev[0]) { |
| 857 | case '?': |
| 858 | prev[0] = 'INDEX_SOAK'; |
| 859 | break; |
| 860 | case '::': |
| 861 | prev[0] = 'INDEX_PROTO'; |
| 862 | } |
| 863 | } |
| 864 | } |
| 865 | this.token(tag, value); |
| 866 | return value.length; |
| 867 | }; |
| 868 | Lexer.prototype.sanitizeHeredoc = function(doc, options) { |
| 869 | var attempt, herecomment, indent, match, _ref2; |
| 870 | indent = options.indent, herecomment = options.herecomment; |
| 871 | if (herecomment) { |
| 872 | if (HEREDOC_ILLEGAL.test(doc)) { |
| 873 | throw new Error("block comment cannot contain \"*/\", starting on line " + (this.line + 1)); |
| 874 | } |
| 875 | if (doc.indexOf('\n') <= 0) { |
| 876 | return doc; |
| 877 | } |
| 878 | } else { |
| 879 | while (match = HEREDOC_INDENT.exec(doc)) { |
| 880 | attempt = match[1]; |
| 881 | if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { |
| 882 | indent = attempt; |
| 883 | } |
| 884 | } |
| 885 | } |
| 886 | if (indent) { |
| 887 | doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); |
| 888 | } |
| 889 | if (!herecomment) { |
| 890 | doc = doc.replace(/^\n/, ''); |
| 891 | } |
| 892 | return doc; |
| 893 | }; |
| 894 | Lexer.prototype.tagParameters = function() { |
| 895 | var i, stack, tok, tokens; |
| 896 | if (this.tag() !== ')') { |
| 897 | return this; |
| 898 | } |
| 899 | stack = []; |
| 900 | tokens = this.tokens; |
| 901 | i = tokens.length; |
| 902 | tokens[--i][0] = 'PARAM_END'; |
| 903 | while (tok = tokens[--i]) { |
| 904 | switch (tok[0]) { |
| 905 | case ')': |
| 906 | stack.push(tok); |
| 907 | break; |
| 908 | case '(': |
| 909 | case 'CALL_START': |
| 910 | if (stack.length) { |
| 911 | stack.pop(); |
| 912 | } else if (tok[0] === '(') { |
| 913 | tok[0] = 'PARAM_START'; |
| 914 | return this; |
| 915 | } else { |
| 916 | return this; |
| 917 | } |
| 918 | } |
| 919 | } |
| 920 | return this; |
| 921 | }; |
| 922 | Lexer.prototype.closeIndentation = function() { |
| 923 | return this.outdentToken(this.indent); |
| 924 | }; |
| 925 | Lexer.prototype.identifierError = function(word) { |
| 926 | throw SyntaxError("Reserved word \"" + word + "\" on line " + (this.line + 1)); |
| 927 | }; |
| 928 | Lexer.prototype.assignmentError = function() { |
| 929 | throw SyntaxError("Reserved word \"" + (this.value()) + "\" on line " + (this.line + 1) + " can't be assigned"); |
| 930 | }; |
| 931 | Lexer.prototype.balancedString = function(str, end) { |
| 932 | var i, letter, match, prev, stack, _ref2; |
| 933 | stack = [end]; |
| 934 | for (i = 1, _ref2 = str.length; 1 <= _ref2 ? i < _ref2 : i > _ref2; 1 <= _ref2 ? i++ : i--) { |
| 935 | switch (letter = str.charAt(i)) { |
| 936 | case '\\': |
| 937 | i++; |
| 938 | continue; |
| 939 | case end: |
| 940 | stack.pop(); |
| 941 | if (!stack.length) { |
| 942 | return str.slice(0, i + 1); |
| 943 | } |
| 944 | end = stack[stack.length - 1]; |
| 945 | continue; |
| 946 | } |
| 947 | if (end === '}' && (letter === '"' || letter === "'")) { |
| 948 | stack.push(end = letter); |
| 949 | } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { |
| 950 | i += match[0].length - 1; |
| 951 | } else if (end === '}' && letter === '{') { |
| 952 | stack.push(end = '}'); |
| 953 | } else if (end === '"' && prev === '#' && letter === '{') { |
| 954 | stack.push(end = '}'); |
| 955 | } |
| 956 | prev = letter; |
| 957 | } |
| 958 | throw new Error("missing " + (stack.pop()) + ", starting on line " + (this.line + 1)); |
| 959 | }; |
| 960 | Lexer.prototype.interpolateString = function(str, options) { |
| 961 | var expr, heredoc, i, inner, interpolated, len, letter, nested, pi, regex, tag, tokens, value, _len, _ref2, _ref3, _ref4; |
| 962 | if (options == null) { |
| 963 | options = {}; |
| 964 | } |
| 965 | heredoc = options.heredoc, regex = options.regex; |
| 966 | tokens = []; |
| 967 | pi = 0; |
| 968 | i = -1; |
| 969 | while (letter = str.charAt(i += 1)) { |
| 970 | if (letter === '\\') { |
| 971 | i += 1; |
| 972 | continue; |
| 973 | } |
| 974 | if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { |
| 975 | continue; |
| 976 | } |
| 977 | if (pi < i) { |
| 978 | tokens.push(['NEOSTRING', str.slice(pi, i)]); |
| 979 | } |
| 980 | inner = expr.slice(1, -1); |
| 981 | if (inner.length) { |
| 982 | nested = new Lexer().tokenize(inner, { |
| 983 | line: this.line, |
| 984 | rewrite: false |
| 985 | }); |
| 986 | nested.pop(); |
| 987 | if (((_ref2 = nested[0]) != null ? _ref2[0] : void 0) === 'TERMINATOR') { |
| 988 | nested.shift(); |
| 989 | } |
| 990 | if (len = nested.length) { |
| 991 | if (len > 1) { |
| 992 | nested.unshift(['(', '(']); |
| 993 | nested.push([')', ')']); |
| 994 | } |
| 995 | tokens.push(['TOKENS', nested]); |
| 996 | } |
| 997 | } |
| 998 | i += expr.length; |
| 999 | pi = i + 1; |
| 1000 | } |
| 1001 | if ((i > pi && pi < str.length)) { |
| 1002 | tokens.push(['NEOSTRING', str.slice(pi)]); |
| 1003 | } |
| 1004 | if (regex) { |
| 1005 | return tokens; |
| 1006 | } |
| 1007 | if (!tokens.length) { |
| 1008 | return this.token('STRING', '""'); |
| 1009 | } |
| 1010 | if (tokens[0][0] !== 'NEOSTRING') { |
| 1011 | tokens.unshift(['', '']); |
| 1012 | } |
| 1013 | if (interpolated = tokens.length > 1) { |
| 1014 | this.token('(', '('); |
| 1015 | } |
| 1016 | for (i = 0, _len = tokens.length; i < _len; i++) { |
| 1017 | _ref3 = tokens[i], tag = _ref3[0], value = _ref3[1]; |
| 1018 | if (i) { |
| 1019 | this.token('+', '+'); |
| 1020 | } |
| 1021 | if (tag === 'TOKENS') { |
| 1022 | (_ref4 = this.tokens).push.apply(_ref4, value); |
| 1023 | } else { |
| 1024 | this.token('STRING', this.makeString(value, '"', heredoc)); |
| 1025 | } |
| 1026 | } |
| 1027 | if (interpolated) { |
| 1028 | this.token(')', ')'); |
| 1029 | } |
| 1030 | return tokens; |
| 1031 | }; |
| 1032 | Lexer.prototype.token = function(tag, value) { |
| 1033 | return this.tokens.push([tag, value, this.line]); |
| 1034 | }; |
| 1035 | Lexer.prototype.tag = function(index, tag) { |
| 1036 | var tok; |
| 1037 | return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); |
| 1038 | }; |
| 1039 | Lexer.prototype.value = function(index, val) { |
| 1040 | var tok; |
| 1041 | return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); |
| 1042 | }; |
| 1043 | Lexer.prototype.unfinished = function() { |
| 1044 | var prev, value; |
| 1045 | return LINE_CONTINUER.test(this.chunk) || (prev = last(this.tokens, 1)) && prev[0] !== '.' && (value = this.value()) && !value.reserved && NO_NEWLINE.test(value) && !CODE.test(value) && !ASSIGNED.test(this.chunk); |
| 1046 | }; |
| 1047 | Lexer.prototype.escapeLines = function(str, heredoc) { |
| 1048 | return str.replace(MULTILINER, heredoc ? '\\n' : ''); |
| 1049 | }; |
| 1050 | Lexer.prototype.makeString = function(body, quote, heredoc) { |
| 1051 | if (!body) { |
| 1052 | return quote + quote; |
| 1053 | } |
| 1054 | body = body.replace(/\\([\s\S])/g, function(match, contents) { |
| 1055 | if (contents === '\n' || contents === quote) { |
| 1056 | return contents; |
| 1057 | } else { |
| 1058 | return match; |
| 1059 | } |
| 1060 | }); |
| 1061 | body = body.replace(RegExp("" + quote, "g"), '\\$&'); |
| 1062 | return quote + this.escapeLines(body, heredoc) + quote; |
| 1063 | }; |
| 1064 | return Lexer; |
| 1065 | })(); |
| 1066 | JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; |
| 1067 | COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; |
| 1068 | COFFEE_ALIAS_MAP = { |
| 1069 | and: '&&', |
| 1070 | or: '||', |
| 1071 | is: '==', |
| 1072 | isnt: '!=', |
| 1073 | not: '!', |
| 1074 | yes: 'true', |
| 1075 | no: 'false', |
| 1076 | on: 'true', |
| 1077 | off: 'false' |
| 1078 | }; |
| 1079 | COFFEE_ALIASES = (function() { |
| 1080 | var _results; |
| 1081 | _results = []; |
| 1082 | for (key in COFFEE_ALIAS_MAP) { |
| 1083 | _results.push(key); |
| 1084 | } |
| 1085 | return _results; |
| 1086 | })(); |
| 1087 | COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); |
| 1088 | RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf']; |
| 1089 | JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED); |
| 1090 | exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS); |
| 1091 | IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; |
| 1092 | NUMBER = /^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; |
| 1093 | HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/; |
| 1094 | OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/; |
| 1095 | WHITESPACE = /^[^\n\S]+/; |
| 1096 | COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/; |
| 1097 | CODE = /^[-=]>/; |
| 1098 | MULTI_DENT = /^(?:\n[^\n\S]*)+/; |
| 1099 | SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/; |
| 1100 | JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; |
| 1101 | REGEX = /^\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?!\w)/; |
| 1102 | HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/; |
| 1103 | HEREGEX_OMIT = /\s+(?:#.*)?/g; |
| 1104 | MULTILINER = /\n/g; |
| 1105 | HEREDOC_INDENT = /\n+([^\n\S]*)/g; |
| 1106 | HEREDOC_ILLEGAL = /\*\//; |
| 1107 | ASSIGNED = /^\s*@?([$A-Za-z_][$\w\x7f-\uffff]*|['"].*['"])[^\n\S]*?[:=][^:=>]/; |
| 1108 | LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; |
| 1109 | TRAILING_SPACES = /\s+$/; |
| 1110 | NO_NEWLINE = /^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/; |
| 1111 | COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; |
| 1112 | UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; |
| 1113 | LOGIC = ['&&', '||', '&', '|', '^']; |
| 1114 | SHIFT = ['<<', '>>', '>>>']; |
| 1115 | COMPARE = ['==', '!=', '<', '>', '<=', '>=']; |
| 1116 | MATH = ['*', '/', '%']; |
| 1117 | RELATION = ['IN', 'OF', 'INSTANCEOF']; |
| 1118 | BOOL = ['TRUE', 'FALSE', 'NULL', 'UNDEFINED']; |
| 1119 | NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', '++', '--', ']']; |
| 1120 | NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING'); |
| 1121 | CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; |
| 1122 | INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL'); |
| 1123 | LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; |
| 1124 | }).call(this); |
| 1125 | return exports; |
| 1126 | }());(function () { |
| 1127 | var exports = __MODULES['parser'] = {}; |
| 1128 | /* Jison generated parser */ |
| 1129 | var parser = (function(){ |
| 1130 | var parser = {trace: function trace() { }, |
| 1131 | yy: {}, |
| 1132 | symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Throw":11,"Comment":12,"STATEMENT":13,"Value":14,"Invocation":15,"Code":16,"Operation":17,"Assign":18,"If":19,"Try":20,"While":21,"For":22,"Switch":23,"Class":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"BOOL":35,"Assignable":36,"=":37,"AssignObj":38,"ObjAssignable":39,":":40,"ThisProperty":41,"RETURN":42,"HERECOMMENT":43,"PARAM_START":44,"ParamList":45,"PARAM_END":46,"FuncGlyph":47,"->":48,"=>":49,"OptComma":50,",":51,"Param":52,"ParamVar":53,"...":54,"Array":55,"Object":56,"Splat":57,"SimpleAssignable":58,"Accessor":59,"Parenthetical":60,"Range":61,"This":62,".":63,"?.":64,"::":65,"Index":66,"INDEX_START":67,"IndexValue":68,"INDEX_END":69,"INDEX_SOAK":70,"INDEX_PROTO":71,"Slice":72,"{":73,"AssignList":74,"}":75,"CLASS":76,"EXTENDS":77,"OptFuncExist":78,"Arguments":79,"SUPER":80,"FUNC_EXIST":81,"CALL_START":82,"CALL_END":83,"ArgList":84,"THIS":85,"@":86,"[":87,"]":88,"RangeDots":89,"..":90,"Arg":91,"SimpleArgs":92,"TRY":93,"Catch":94,"FINALLY":95,"CATCH":96,"THROW":97,"(":98,")":99,"WhileSource":100,"WHILE":101,"WHEN":102,"UNTIL":103,"Loop":104,"LOOP":105,"ForBody":106,"FOR":107,"ForStart":108,"ForSource":109,"ForVariables":110,"OWN":111,"ForValue":112,"FORIN":113,"FOROF":114,"BY":115,"SWITCH":116,"Whens":117,"ELSE":118,"When":119,"LEADING_WHEN":120,"IfBlock":121,"IF":122,"POST_IF":123,"UNARY":124,"-":125,"+":126,"--":127,"++":128,"?":129,"MATH":130,"SHIFT":131,"COMPARE":132,"LOGIC":133,"RELATION":134,"COMPOUND_ASSIGN":135,"$accept":0,"$end":1}, |
| 1133 | terminals_: {2:"error",6:"TERMINATOR",13:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"BOOL",37:"=",40:":",42:"RETURN",43:"HERECOMMENT",44:"PARAM_START",46:"PARAM_END",48:"->",49:"=>",51:",",54:"...",63:".",64:"?.",65:"::",67:"INDEX_START",69:"INDEX_END",70:"INDEX_SOAK",71:"INDEX_PROTO",73:"{",75:"}",76:"CLASS",77:"EXTENDS",80:"SUPER",81:"FUNC_EXIST",82:"CALL_START",83:"CALL_END",85:"THIS",86:"@",87:"[",88:"]",90:"..",93:"TRY",95:"FINALLY",96:"CATCH",97:"THROW",98:"(",99:")",101:"WHILE",102:"WHEN",103:"UNTIL",105:"LOOP",107:"FOR",111:"OWN",113:"FORIN",114:"FOROF",115:"BY",116:"SWITCH",118:"ELSE",120:"LEADING_WHEN",122:"IF",123:"POST_IF",124:"UNARY",125:"-",126:"+",127:"--",128:"++",129:"?",130:"MATH",131:"SHIFT",132:"COMPARE",133:"LOGIC",134:"RELATION",135:"COMPOUND_ASSIGN"}, |
| 1134 | productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[18,3],[18,5],[38,1],[38,3],[38,5],[38,1],[39,1],[39,1],[39,1],[10,2],[10,1],[12,1],[16,5],[16,2],[47,1],[47,1],[50,0],[50,1],[45,0],[45,1],[45,3],[52,1],[52,2],[52,3],[53,1],[53,1],[53,1],[53,1],[57,2],[58,1],[58,2],[58,2],[58,1],[36,1],[36,1],[36,1],[14,1],[14,1],[14,1],[14,1],[14,1],[59,2],[59,2],[59,2],[59,1],[59,1],[66,3],[66,2],[66,2],[68,1],[68,1],[56,4],[74,0],[74,1],[74,3],[74,4],[74,6],[24,1],[24,2],[24,3],[24,4],[24,2],[24,3],[24,4],[24,5],[15,3],[15,3],[15,1],[15,2],[78,0],[78,1],[79,2],[79,4],[62,1],[62,1],[41,2],[55,2],[55,4],[89,1],[89,1],[61,5],[72,3],[72,2],[72,2],[84,1],[84,3],[84,4],[84,4],[84,6],[91,1],[91,1],[92,1],[92,3],[20,2],[20,3],[20,4],[20,5],[94,3],[11,2],[60,3],[60,5],[100,2],[100,4],[100,2],[100,4],[21,2],[21,2],[21,2],[21,1],[104,2],[104,2],[22,2],[22,2],[22,2],[106,2],[106,2],[108,2],[108,3],[112,1],[112,1],[112,1],[110,1],[110,3],[109,2],[109,2],[109,4],[109,4],[109,4],[109,6],[109,6],[23,5],[23,7],[23,4],[23,6],[117,1],[117,2],[119,3],[119,4],[121,3],[121,5],[19,1],[19,3],[19,3],[19,3],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,5],[17,3]], |
| 1135 | performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { |
| 1136 | |
| 1137 | var $0 = $$.length - 1; |
| 1138 | switch (yystate) { |
| 1139 | case 1:return this.$ = new yy.Block; |
| 1140 | break; |
| 1141 | case 2:return this.$ = $$[$0]; |
| 1142 | break; |
| 1143 | case 3:return this.$ = $$[$0-1]; |
| 1144 | break; |
| 1145 | case 4:this.$ = yy.Block.wrap([$$[$0]]); |
| 1146 | break; |
| 1147 | case 5:this.$ = $$[$0-2].push($$[$0]); |
| 1148 | break; |
| 1149 | case 6:this.$ = $$[$0-1]; |
| 1150 | break; |
| 1151 | case 7:this.$ = $$[$0]; |
| 1152 | break; |
| 1153 | case 8:this.$ = $$[$0]; |
| 1154 | break; |
| 1155 | case 9:this.$ = $$[$0]; |
| 1156 | break; |
| 1157 | case 10:this.$ = $$[$0]; |
| 1158 | break; |
| 1159 | case 11:this.$ = $$[$0]; |
| 1160 | break; |
| 1161 | case 12:this.$ = new yy.Literal($$[$0]); |
| 1162 | break; |
| 1163 | case 13:this.$ = $$[$0]; |
| 1164 | break; |
| 1165 | case 14:this.$ = $$[$0]; |
| 1166 | break; |
| 1167 | case 15:this.$ = $$[$0]; |
| 1168 | break; |
| 1169 | case 16:this.$ = $$[$0]; |
| 1170 | break; |
| 1171 | case 17:this.$ = $$[$0]; |
| 1172 | break; |
| 1173 | case 18:this.$ = $$[$0]; |
| 1174 | break; |
| 1175 | case 19:this.$ = $$[$0]; |
| 1176 | break; |
| 1177 | case 20:this.$ = $$[$0]; |
| 1178 | break; |
| 1179 | case 21:this.$ = $$[$0]; |
| 1180 | break; |
| 1181 | case 22:this.$ = $$[$0]; |
| 1182 | break; |
| 1183 | case 23:this.$ = $$[$0]; |
| 1184 | break; |
| 1185 | case 24:this.$ = new yy.Block; |
| 1186 | break; |
| 1187 | case 25:this.$ = $$[$0-1]; |
| 1188 | break; |
| 1189 | case 26:this.$ = new yy.Literal($$[$0]); |
| 1190 | break; |
| 1191 | case 27:this.$ = new yy.Literal($$[$0]); |
| 1192 | break; |
| 1193 | case 28:this.$ = new yy.Literal($$[$0]); |
| 1194 | break; |
| 1195 | case 29:this.$ = $$[$0]; |
| 1196 | break; |
| 1197 | case 30:this.$ = new yy.Literal($$[$0]); |
| 1198 | break; |
| 1199 | case 31:this.$ = new yy.Literal($$[$0]); |
| 1200 | break; |
| 1201 | case 32:this.$ = (function () { |
| 1202 | var val; |
| 1203 | val = new yy.Literal($$[$0]); |
| 1204 | if ($$[$0] === 'undefined') { |
| 1205 | val.isUndefined = true; |
| 1206 | } |
| 1207 | return val; |
| 1208 | }()); |
| 1209 | break; |
| 1210 | case 33:this.$ = new yy.Assign($$[$0-2], $$[$0]); |
| 1211 | break; |
| 1212 | case 34:this.$ = new yy.Assign($$[$0-4], $$[$0-1]); |
| 1213 | break; |
| 1214 | case 35:this.$ = new yy.Value($$[$0]); |
| 1215 | break; |
| 1216 | case 36:this.$ = new yy.Assign(new yy.Value($$[$0-2]), $$[$0], 'object'); |
| 1217 | break; |
| 1218 | case 37:this.$ = new yy.Assign(new yy.Value($$[$0-4]), $$[$0-1], 'object'); |
| 1219 | break; |
| 1220 | case 38:this.$ = $$[$0]; |
| 1221 | break; |
| 1222 | case 39:this.$ = $$[$0]; |
| 1223 | break; |
| 1224 | case 40:this.$ = $$[$0]; |
| 1225 | break; |
| 1226 | case 41:this.$ = $$[$0]; |
| 1227 | break; |
| 1228 | case 42:this.$ = new yy.Return($$[$0]); |
| 1229 | break; |
| 1230 | case 43:this.$ = new yy.Return; |
| 1231 | break; |
| 1232 | case 44:this.$ = new yy.Comment($$[$0]); |
| 1233 | break; |
| 1234 | case 45:this.$ = new yy.Code($$[$0-3], $$[$0], $$[$0-1]); |
| 1235 | break; |
| 1236 | case 46:this.$ = new yy.Code([], $$[$0], $$[$0-1]); |
| 1237 | break; |
| 1238 | case 47:this.$ = 'func'; |
| 1239 | break; |
| 1240 | case 48:this.$ = 'boundfunc'; |
| 1241 | break; |
| 1242 | case 49:this.$ = $$[$0]; |
| 1243 | break; |
| 1244 | case 50:this.$ = $$[$0]; |
| 1245 | break; |
| 1246 | case 51:this.$ = []; |
| 1247 | break; |
| 1248 | case 52:this.$ = [$$[$0]]; |
| 1249 | break; |
| 1250 | case 53:this.$ = $$[$0-2].concat($$[$0]); |
| 1251 | break; |
| 1252 | case 54:this.$ = new yy.Param($$[$0]); |
| 1253 | break; |
| 1254 | case 55:this.$ = new yy.Param($$[$0-1], null, true); |
| 1255 | break; |
| 1256 | case 56:this.$ = new yy.Param($$[$0-2], $$[$0]); |
| 1257 | break; |
| 1258 | case 57:this.$ = $$[$0]; |
| 1259 | break; |
| 1260 | case 58:this.$ = $$[$0]; |
| 1261 | break; |
| 1262 | case 59:this.$ = $$[$0]; |
| 1263 | break; |
| 1264 | case 60:this.$ = $$[$0]; |
| 1265 | break; |
| 1266 | case 61:this.$ = new yy.Splat($$[$0-1]); |
| 1267 | break; |
| 1268 | case 62:this.$ = new yy.Value($$[$0]); |
| 1269 | break; |
| 1270 | case 63:this.$ = $$[$0-1].push($$[$0]); |
| 1271 | break; |
| 1272 | case 64:this.$ = new yy.Value($$[$0-1], [$$[$0]]); |
| 1273 | break; |
| 1274 | case 65:this.$ = $$[$0]; |
| 1275 | break; |
| 1276 | case 66:this.$ = $$[$0]; |
| 1277 | break; |
| 1278 | case 67:this.$ = new yy.Value($$[$0]); |
| 1279 | break; |
| 1280 | case 68:this.$ = new yy.Value($$[$0]); |
| 1281 | break; |
| 1282 | case 69:this.$ = $$[$0]; |
| 1283 | break; |
| 1284 | case 70:this.$ = new yy.Value($$[$0]); |
| 1285 | break; |
| 1286 | case 71:this.$ = new yy.Value($$[$0]); |
| 1287 | break; |
| 1288 | case 72:this.$ = new yy.Value($$[$0]); |
| 1289 | break; |
| 1290 | case 73:this.$ = $$[$0]; |
| 1291 | break; |
| 1292 | case 74:this.$ = new yy.Access($$[$0]); |
| 1293 | break; |
| 1294 | case 75:this.$ = new yy.Access($$[$0], 'soak'); |
| 1295 | break; |
| 1296 | case 76:this.$ = new yy.Access($$[$0], 'proto'); |
| 1297 | break; |
| 1298 | case 77:this.$ = new yy.Access(new yy.Literal('prototype')); |
| 1299 | break; |
| 1300 | case 78:this.$ = $$[$0]; |
| 1301 | break; |
| 1302 | case 79:this.$ = $$[$0-1]; |
| 1303 | break; |
| 1304 | case 80:this.$ = yy.extend($$[$0], { |
| 1305 | soak: true |
| 1306 | }); |
| 1307 | break; |
| 1308 | case 81:this.$ = yy.extend($$[$0], { |
| 1309 | proto: true |
| 1310 | }); |
| 1311 | break; |
| 1312 | case 82:this.$ = new yy.Index($$[$0]); |
| 1313 | break; |
| 1314 | case 83:this.$ = new yy.Slice($$[$0]); |
| 1315 | break; |
| 1316 | case 84:this.$ = new yy.Obj($$[$0-2], $$[$0-3].generated); |
| 1317 | break; |
| 1318 | case 85:this.$ = []; |
| 1319 | break; |
| 1320 | case 86:this.$ = [$$[$0]]; |
| 1321 | break; |
| 1322 | case 87:this.$ = $$[$0-2].concat($$[$0]); |
| 1323 | break; |
| 1324 | case 88:this.$ = $$[$0-3].concat($$[$0]); |
| 1325 | break; |
| 1326 | case 89:this.$ = $$[$0-5].concat($$[$0-2]); |
| 1327 | break; |
| 1328 | case 90:this.$ = new yy.Class; |
| 1329 | break; |
| 1330 | case 91:this.$ = new yy.Class(null, null, $$[$0]); |
| 1331 | break; |
| 1332 | case 92:this.$ = new yy.Class(null, $$[$0]); |
| 1333 | break; |
| 1334 | case 93:this.$ = new yy.Class(null, $$[$0-1], $$[$0]); |
| 1335 | break; |
| 1336 | case 94:this.$ = new yy.Class($$[$0]); |
| 1337 | break; |
| 1338 | case 95:this.$ = new yy.Class($$[$0-1], null, $$[$0]); |
| 1339 | break; |
| 1340 | case 96:this.$ = new yy.Class($$[$0-2], $$[$0]); |
| 1341 | break; |
| 1342 | case 97:this.$ = new yy.Class($$[$0-3], $$[$0-1], $$[$0]); |
| 1343 | break; |
| 1344 | case 98:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]); |
| 1345 | break; |
| 1346 | case 99:this.$ = new yy.Call($$[$0-2], $$[$0], $$[$0-1]); |
| 1347 | break; |
| 1348 | case 100:this.$ = new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]); |
| 1349 | break; |
| 1350 | case 101:this.$ = new yy.Call('super', $$[$0]); |
| 1351 | break; |
| 1352 | case 102:this.$ = false; |
| 1353 | break; |
| 1354 | case 103:this.$ = true; |
| 1355 | break; |
| 1356 | case 104:this.$ = []; |
| 1357 | break; |
| 1358 | case 105:this.$ = $$[$0-2]; |
| 1359 | break; |
| 1360 | case 106:this.$ = new yy.Value(new yy.Literal('this')); |
| 1361 | break; |
| 1362 | case 107:this.$ = new yy.Value(new yy.Literal('this')); |
| 1363 | break; |
| 1364 | case 108:this.$ = new yy.Value(new yy.Literal('this'), [new yy.Access($$[$0])], 'this'); |
| 1365 | break; |
| 1366 | case 109:this.$ = new yy.Arr([]); |
| 1367 | break; |
| 1368 | case 110:this.$ = new yy.Arr($$[$0-2]); |
| 1369 | break; |
| 1370 | case 111:this.$ = 'inclusive'; |
| 1371 | break; |
| 1372 | case 112:this.$ = 'exclusive'; |
| 1373 | break; |
| 1374 | case 113:this.$ = new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]); |
| 1375 | break; |
| 1376 | case 114:this.$ = new yy.Range($$[$0-2], $$[$0], $$[$0-1]); |
| 1377 | break; |
| 1378 | case 115:this.$ = new yy.Range($$[$0-1], null, $$[$0]); |
| 1379 | break; |
| 1380 | case 116:this.$ = new yy.Range(null, $$[$0], $$[$0-1]); |
| 1381 | break; |
| 1382 | case 117:this.$ = [$$[$0]]; |
| 1383 | break; |
| 1384 | case 118:this.$ = $$[$0-2].concat($$[$0]); |
| 1385 | break; |
| 1386 | case 119:this.$ = $$[$0-3].concat($$[$0]); |
| 1387 | break; |
| 1388 | case 120:this.$ = $$[$0-2]; |
| 1389 | break; |
| 1390 | case 121:this.$ = $$[$0-5].concat($$[$0-2]); |
| 1391 | break; |
| 1392 | case 122:this.$ = $$[$0]; |
| 1393 | break; |
| 1394 | case 123:this.$ = $$[$0]; |
| 1395 | break; |
| 1396 | case 124:this.$ = $$[$0]; |
| 1397 | break; |
| 1398 | case 125:this.$ = [].concat($$[$0-2], $$[$0]); |
| 1399 | break; |
| 1400 | case 126:this.$ = new yy.Try($$[$0]); |
| 1401 | break; |
| 1402 | case 127:this.$ = new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]); |
| 1403 | break; |
| 1404 | case 128:this.$ = new yy.Try($$[$0-2], null, null, $$[$0]); |
| 1405 | break; |
| 1406 | case 129:this.$ = new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]); |
| 1407 | break; |
| 1408 | case 130:this.$ = [$$[$0-1], $$[$0]]; |
| 1409 | break; |
| 1410 | case 131:this.$ = new yy.Throw($$[$0]); |
| 1411 | break; |
| 1412 | case 132:this.$ = new yy.Parens($$[$0-1]); |
| 1413 | break; |
| 1414 | case 133:this.$ = new yy.Parens($$[$0-2]); |
| 1415 | break; |
| 1416 | case 134:this.$ = new yy.While($$[$0]); |
| 1417 | break; |
| 1418 | case 135:this.$ = new yy.While($$[$0-2], { |
| 1419 | guard: $$[$0] |
| 1420 | }); |
| 1421 | break; |
| 1422 | case 136:this.$ = new yy.While($$[$0], { |
| 1423 | invert: true |
| 1424 | }); |
| 1425 | break; |
| 1426 | case 137:this.$ = new yy.While($$[$0-2], { |
| 1427 | invert: true, |
| 1428 | guard: $$[$0] |
| 1429 | }); |
| 1430 | break; |
| 1431 | case 138:this.$ = $$[$0-1].addBody($$[$0]); |
| 1432 | break; |
| 1433 | case 139:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]])); |
| 1434 | break; |
| 1435 | case 140:this.$ = $$[$0].addBody(yy.Block.wrap([$$[$0-1]])); |
| 1436 | break; |
| 1437 | case 141:this.$ = $$[$0]; |
| 1438 | break; |
| 1439 | case 142:this.$ = new yy.While(new yy.Literal('true')).addBody($$[$0]); |
| 1440 | break; |
| 1441 | case 143:this.$ = new yy.While(new yy.Literal('true')).addBody(yy.Block.wrap([$$[$0]])); |
| 1442 | break; |
| 1443 | case 144:this.$ = new yy.For($$[$0-1], $$[$0]); |
| 1444 | break; |
| 1445 | case 145:this.$ = new yy.For($$[$0-1], $$[$0]); |
| 1446 | break; |
| 1447 | case 146:this.$ = new yy.For($$[$0], $$[$0-1]); |
| 1448 | break; |
| 1449 | case 147:this.$ = { |
| 1450 | source: new yy.Value($$[$0]) |
| 1451 | }; |
| 1452 | break; |
| 1453 | case 148:this.$ = (function () { |
| 1454 | $$[$0].own = $$[$0-1].own; |
| 1455 | $$[$0].name = $$[$0-1][0]; |
| 1456 | $$[$0].index = $$[$0-1][1]; |
| 1457 | return $$[$0]; |
| 1458 | }()); |
| 1459 | break; |
| 1460 | case 149:this.$ = $$[$0]; |
| 1461 | break; |
| 1462 | case 150:this.$ = (function () { |
| 1463 | $$[$0].own = true; |
| 1464 | return $$[$0]; |
| 1465 | }()); |
| 1466 | break; |
| 1467 | case 151:this.$ = $$[$0]; |
| 1468 | break; |
| 1469 | case 152:this.$ = new yy.Value($$[$0]); |
| 1470 | break; |
| 1471 | case 153:this.$ = new yy.Value($$[$0]); |
| 1472 | break; |
| 1473 | case 154:this.$ = [$$[$0]]; |
| 1474 | break; |
| 1475 | case 155:this.$ = [$$[$0-2], $$[$0]]; |
| 1476 | break; |
| 1477 | case 156:this.$ = { |
| 1478 | source: $$[$0] |
| 1479 | }; |
| 1480 | break; |
| 1481 | case 157:this.$ = { |
| 1482 | source: $$[$0], |
| 1483 | object: true |
| 1484 | }; |
| 1485 | break; |
| 1486 | case 158:this.$ = { |
| 1487 | source: $$[$0-2], |
| 1488 | guard: $$[$0] |
| 1489 | }; |
| 1490 | break; |
| 1491 | case 159:this.$ = { |
| 1492 | source: $$[$0-2], |
| 1493 | guard: $$[$0], |
| 1494 | object: true |
| 1495 | }; |
| 1496 | break; |
| 1497 | case 160:this.$ = { |
| 1498 | source: $$[$0-2], |
| 1499 | step: $$[$0] |
| 1500 | }; |
| 1501 | break; |
| 1502 | case 161:this.$ = { |
| 1503 | source: $$[$0-4], |
| 1504 | guard: $$[$0-2], |
| 1505 | step: $$[$0] |
| 1506 | }; |
| 1507 | break; |
| 1508 | case 162:this.$ = { |
| 1509 | source: $$[$0-4], |
| 1510 | step: $$[$0-2], |
| 1511 | guard: $$[$0] |
| 1512 | }; |
| 1513 | break; |
| 1514 | case 163:this.$ = new yy.Switch($$[$0-3], $$[$0-1]); |
| 1515 | break; |
| 1516 | case 164:this.$ = new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]); |
| 1517 | break; |
| 1518 | case 165:this.$ = new yy.Switch(null, $$[$0-1]); |
| 1519 | break; |
| 1520 | case 166:this.$ = new yy.Switch(null, $$[$0-3], $$[$0-1]); |
| 1521 | break; |
| 1522 | case 167:this.$ = $$[$0]; |
| 1523 | break; |
| 1524 | case 168:this.$ = $$[$0-1].concat($$[$0]); |
| 1525 | break; |
| 1526 | case 169:this.$ = [[$$[$0-1], $$[$0]]]; |
| 1527 | break; |
| 1528 | case 170:this.$ = [[$$[$0-2], $$[$0-1]]]; |
| 1529 | break; |
| 1530 | case 171:this.$ = new yy.If($$[$0-1], $$[$0], { |
| 1531 | type: $$[$0-2] |
| 1532 | }); |
| 1533 | break; |
| 1534 | case 172:this.$ = $$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { |
| 1535 | type: $$[$0-2] |
| 1536 | })); |
| 1537 | break; |
| 1538 | case 173:this.$ = $$[$0]; |
| 1539 | break; |
| 1540 | case 174:this.$ = $$[$0-2].addElse($$[$0]); |
| 1541 | break; |
| 1542 | case 175:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), { |
| 1543 | type: $$[$0-1], |
| 1544 | statement: true |
| 1545 | }); |
| 1546 | break; |
| 1547 | case 176:this.$ = new yy.If($$[$0], yy.Block.wrap([$$[$0-2]]), { |
| 1548 | type: $$[$0-1], |
| 1549 | statement: true |
| 1550 | }); |
| 1551 | break; |
| 1552 | case 177:this.$ = new yy.Op($$[$0-1], $$[$0]); |
| 1553 | break; |
| 1554 | case 178:this.$ = new yy.Op('-', $$[$0]); |
| 1555 | break; |
| 1556 | case 179:this.$ = new yy.Op('+', $$[$0]); |
| 1557 | break; |
| 1558 | case 180:this.$ = new yy.Op('--', $$[$0]); |
| 1559 | break; |
| 1560 | case 181:this.$ = new yy.Op('++', $$[$0]); |
| 1561 | break; |
| 1562 | case 182:this.$ = new yy.Op('--', $$[$0-1], null, true); |
| 1563 | break; |
| 1564 | case 183:this.$ = new yy.Op('++', $$[$0-1], null, true); |
| 1565 | break; |
| 1566 | case 184:this.$ = new yy.Existence($$[$0-1]); |
| 1567 | break; |
| 1568 | case 185:this.$ = new yy.Op('+', $$[$0-2], $$[$0]); |
| 1569 | break; |
| 1570 | case 186:this.$ = new yy.Op('-', $$[$0-2], $$[$0]); |
| 1571 | break; |
| 1572 | case 187:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]); |
| 1573 | break; |
| 1574 | case 188:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]); |
| 1575 | break; |
| 1576 | case 189:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]); |
| 1577 | break; |
| 1578 | case 190:this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]); |
| 1579 | break; |
| 1580 | case 191:this.$ = (function () { |
| 1581 | if ($$[$0-1].charAt(0) === '!') { |
| 1582 | return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); |
| 1583 | } else { |
| 1584 | return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); |
| 1585 | } |
| 1586 | }()); |
| 1587 | break; |
| 1588 | case 192:this.$ = new yy.Assign($$[$0-2], $$[$0], $$[$0-1]); |
| 1589 | break; |
| 1590 | case 193:this.$ = new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]); |
| 1591 | break; |
| 1592 | case 194:this.$ = new yy.Extends($$[$0-2], $$[$0]); |
| 1593 | break; |
| 1594 | } |
| 1595 | }, |
| 1596 | table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[3]},{1:[2,2],6:[1,71]},{6:[1,72]},{1:[2,4],6:[2,4],26:[2,4],99:[2,4]},{4:74,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[1,73],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,7],6:[2,7],26:[2,7],99:[2,7],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,8],6:[2,8],26:[2,8],99:[2,8],100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],46:[2,13],51:[2,13],54:[2,13],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,13],70:[1,97],71:[1,98],75:[2,13],78:89,81:[1,91],82:[2,102],83:[2,13],88:[2,13],90:[2,13],99:[2,13],101:[2,13],102:[2,13],103:[2,13],107:[2,13],115:[2,13],123:[2,13],125:[2,13],126:[2,13],129:[2,13],130:[2,13],131:[2,13],132:[2,13],133:[2,13],134:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],46:[2,14],51:[2,14],54:[2,14],59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,14],70:[1,97],71:[1,98],75:[2,14],78:99,81:[1,91],82:[2,102],83:[2,14],88:[2,14],90:[2,14],99:[2,14],101:[2,14],102:[2,14],103:[2,14],107:[2,14],115:[2,14],123:[2,14],125:[2,14],126:[2,14],129:[2,14],130:[2,14],131:[2,14],132:[2,14],133:[2,14],134:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],46:[2,15],51:[2,15],54:[2,15],69:[2,15],75:[2,15],83:[2,15],88:[2,15],90:[2,15],99:[2,15],101:[2,15],102:[2,15],103:[2,15],107:[2,15],115:[2,15],123:[2,15],125:[2,15],126:[2,15],129:[2,15],130:[2,15],131:[2,15],132:[2,15],133:[2,15],134:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],46:[2,16],51:[2,16],54:[2,16],69:[2,16],75:[2,16],83:[2,16],88:[2,16],90:[2,16],99:[2,16],101:[2,16],102:[2,16],103:[2,16],107:[2,16],115:[2,16],123:[2,16],125:[2,16],126:[2,16],129:[2,16],130:[2,16],131:[2,16],132:[2,16],133:[2,16],134:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],46:[2,17],51:[2,17],54:[2,17],69:[2,17],75:[2,17],83:[2,17],88:[2,17],90:[2,17],99:[2,17],101:[2,17],102:[2,17],103:[2,17],107:[2,17],115:[2,17],123:[2,17],125:[2,17],126:[2,17],129:[2,17],130:[2,17],131:[2,17],132:[2,17],133:[2,17],134:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],46:[2,18],51:[2,18],54:[2,18],69:[2,18],75:[2,18],83:[2,18],88:[2,18],90:[2,18],99:[2,18],101:[2,18],102:[2,18],103:[2,18],107:[2,18],115:[2,18],123:[2,18],125:[2,18],126:[2,18],129:[2,18],130:[2,18],131:[2,18],132:[2,18],133:[2,18],134:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],46:[2,19],51:[2,19],54:[2,19],69:[2,19],75:[2,19],83:[2,19],88:[2,19],90:[2,19],99:[2,19],101:[2,19],102:[2,19],103:[2,19],107:[2,19],115:[2,19],123:[2,19],125:[2,19],126:[2,19],129:[2,19],130:[2,19],131:[2,19],132:[2,19],133:[2,19],134:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],46:[2,20],51:[2,20],54:[2,20],69:[2,20],75:[2,20],83:[2,20],88:[2,20],90:[2,20],99:[2,20],101:[2,20],102:[2,20],103:[2,20],107:[2,20],115:[2,20],123:[2,20],125:[2,20],126:[2,20],129:[2,20],130:[2,20],131:[2,20],132:[2,20],133:[2,20],134:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],46:[2,21],51:[2,21],54:[2,21],69:[2,21],75:[2,21],83:[2,21],88:[2,21],90:[2,21],99:[2,21],101:[2,21],102:[2,21],103:[2,21],107:[2,21],115:[2,21],123:[2,21],125:[2,21],126:[2,21],129:[2,21],130:[2,21],131:[2,21],132:[2,21],133:[2,21],134:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],46:[2,22],51:[2,22],54:[2,22],69:[2,22],75:[2,22],83:[2,22],88:[2,22],90:[2,22],99:[2,22],101:[2,22],102:[2,22],103:[2,22],107:[2,22],115:[2,22],123:[2,22],125:[2,22],126:[2,22],129:[2,22],130:[2,22],131:[2,22],132:[2,22],133:[2,22],134:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],46:[2,23],51:[2,23],54:[2,23],69:[2,23],75:[2,23],83:[2,23],88:[2,23],90:[2,23],99:[2,23],101:[2,23],102:[2,23],103:[2,23],107:[2,23],115:[2,23],123:[2,23],125:[2,23],126:[2,23],129:[2,23],130:[2,23],131:[2,23],132:[2,23],133:[2,23],134:[2,23]},{1:[2,9],6:[2,9],26:[2,9],99:[2,9],101:[2,9],103:[2,9],107:[2,9],123:[2,9]},{1:[2,10],6:[2,10],26:[2,10],99:[2,10],101:[2,10],103:[2,10],107:[2,10],123:[2,10]},{1:[2,11],6:[2,11],26:[2,11],99:[2,11],101:[2,11],103:[2,11],107:[2,11],123:[2,11]},{1:[2,12],6:[2,12],26:[2,12],99:[2,12],101:[2,12],103:[2,12],107:[2,12],123:[2,12]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],37:[1,101],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],46:[2,70],51:[2,70],54:[2,70],63:[2,70],64:[2,70],65:[2,70],67:[2,70],69:[2,70],70:[2,70],71:[2,70],75:[2,70],81:[2,70],82:[2,70],83:[2,70],88:[2,70],90:[2,70],99:[2,70],101:[2,70],102:[2,70],103:[2,70],107:[2,70],115:[2,70],123:[2,70],125:[2,70],126:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],46:[2,71],51:[2,71],54:[2,71],63:[2,71],64:[2,71],65:[2,71],67:[2,71],69:[2,71],70:[2,71],71:[2,71],75:[2,71],81:[2,71],82:[2,71],83:[2,71],88:[2,71],90:[2,71],99:[2,71],101:[2,71],102:[2,71],103:[2,71],107:[2,71],115:[2,71],123:[2,71],125:[2,71],126:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],46:[2,72],51:[2,72],54:[2,72],63:[2,72],64:[2,72],65:[2,72],67:[2,72],69:[2,72],70:[2,72],71:[2,72],75:[2,72],81:[2,72],82:[2,72],83:[2,72],88:[2,72],90:[2,72],99:[2,72],101:[2,72],102:[2,72],103:[2,72],107:[2,72],115:[2,72],123:[2,72],125:[2,72],126:[2,72],129:[2,72],130:[2,72],131:[2,72],132:[2,72],133:[2,72],134:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],46:[2,73],51:[2,73],54:[2,73],63:[2,73],64:[2,73],65:[2,73],67:[2,73],69:[2,73],70:[2,73],71:[2,73],75:[2,73],81:[2,73],82:[2,73],83:[2,73],88:[2,73],90:[2,73],99:[2,73],101:[2,73],102:[2,73],103:[2,73],107:[2,73],115:[2,73],123:[2,73],125:[2,73],126:[2,73],129:[2,73],130:[2,73],131:[2,73],132:[2,73],133:[2,73],134:[2,73]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],46:[2,100],51:[2,100],54:[2,100],63:[2,100],64:[2,100],65:[2,100],67:[2,100],69:[2,100],70:[2,100],71:[2,100],75:[2,100],79:102,81:[2,100],82:[1,103],83:[2,100],88:[2,100],90:[2,100],99:[2,100],101:[2,100],102:[2,100],103:[2,100],107:[2,100],115:[2,100],123:[2,100],125:[2,100],126:[2,100],129:[2,100],130:[2,100],131:[2,100],132:[2,100],133:[2,100],134:[2,100]},{27:107,28:[1,70],41:108,45:104,46:[2,51],51:[2,51],52:105,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{5:113,25:[1,5]},{8:114,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:116,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:117,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:118,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:122,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],37:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],77:[1,126],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],127:[1,123],128:[1,124],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66],135:[1,125]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],46:[2,173],51:[2,173],54:[2,173],69:[2,173],75:[2,173],83:[2,173],88:[2,173],90:[2,173],99:[2,173],101:[2,173],102:[2,173],103:[2,173],107:[2,173],115:[2,173],118:[1,127],123:[2,173],125:[2,173],126:[2,173],129:[2,173],130:[2,173],131:[2,173],132:[2,173],133:[2,173],134:[2,173]},{5:128,25:[1,5]},{5:129,25:[1,5]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],46:[2,141],51:[2,141],54:[2,141],69:[2,141],75:[2,141],83:[2,141],88:[2,141],90:[2,141],99:[2,141],101:[2,141],102:[2,141],103:[2,141],107:[2,141],115:[2,141],123:[2,141],125:[2,141],126:[2,141],129:[2,141],130:[2,141],131:[2,141],132:[2,141],133:[2,141],134:[2,141]},{5:130,25:[1,5]},{8:131,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,132],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,90],5:133,6:[2,90],14:119,15:120,25:[1,5],26:[2,90],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,46:[2,90],51:[2,90],54:[2,90],55:47,56:48,58:135,60:25,61:26,62:27,69:[2,90],73:[1,67],75:[2,90],77:[1,134],80:[1,28],83:[2,90],85:[1,55],86:[1,56],87:[1,54],88:[2,90],90:[2,90],98:[1,53],99:[2,90],101:[2,90],102:[2,90],103:[2,90],107:[2,90],115:[2,90],123:[2,90],125:[2,90],126:[2,90],129:[2,90],130:[2,90],131:[2,90],132:[2,90],133:[2,90],134:[2,90]},{1:[2,43],6:[2,43],8:136,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,43],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,43],100:39,101:[2,43],103:[2,43],104:40,105:[1,64],106:41,107:[2,43],108:66,116:[1,42],121:37,122:[1,61],123:[2,43],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:137,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,44],6:[2,44],25:[2,44],26:[2,44],51:[2,44],75:[2,44],99:[2,44],101:[2,44],103:[2,44],107:[2,44],123:[2,44]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],37:[2,67],46:[2,67],51:[2,67],54:[2,67],63:[2,67],64:[2,67],65:[2,67],67:[2,67],69:[2,67],70:[2,67],71:[2,67],75:[2,67],81:[2,67],82:[2,67],83:[2,67],88:[2,67],90:[2,67],99:[2,67],101:[2,67],102:[2,67],103:[2,67],107:[2,67],115:[2,67],123:[2,67],125:[2,67],126:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],37:[2,68],46:[2,68],51:[2,68],54:[2,68],63:[2,68],64:[2,68],65:[2,68],67:[2,68],69:[2,68],70:[2,68],71:[2,68],75:[2,68],81:[2,68],82:[2,68],83:[2,68],88:[2,68],90:[2,68],99:[2,68],101:[2,68],102:[2,68],103:[2,68],107:[2,68],115:[2,68],123:[2,68],125:[2,68],126:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],46:[2,29],51:[2,29],54:[2,29],63:[2,29],64:[2,29],65:[2,29],67:[2,29],69:[2,29],70:[2,29],71:[2,29],75:[2,29],81:[2,29],82:[2,29],83:[2,29],88:[2,29],90:[2,29],99:[2,29],101:[2,29],102:[2,29],103:[2,29],107:[2,29],115:[2,29],123:[2,29],125:[2,29],126:[2,29],129:[2,29],130:[2,29],131:[2,29],132:[2,29],133:[2,29],134:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],46:[2,30],51:[2,30],54:[2,30],63:[2,30],64:[2,30],65:[2,30],67:[2,30],69:[2,30],70:[2,30],71:[2,30],75:[2,30],81:[2,30],82:[2,30],83:[2,30],88:[2,30],90:[2,30],99:[2,30],101:[2,30],102:[2,30],103:[2,30],107:[2,30],115:[2,30],123:[2,30],125:[2,30],126:[2,30],129:[2,30],130:[2,30],131:[2,30],132:[2,30],133:[2,30],134:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],46:[2,31],51:[2,31],54:[2,31],63:[2,31],64:[2,31],65:[2,31],67:[2,31],69:[2,31],70:[2,31],71:[2,31],75:[2,31],81:[2,31],82:[2,31],83:[2,31],88:[2,31],90:[2,31],99:[2,31],101:[2,31],102:[2,31],103:[2,31],107:[2,31],115:[2,31],123:[2,31],125:[2,31],126:[2,31],129:[2,31],130:[2,31],131:[2,31],132:[2,31],133:[2,31],134:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],46:[2,32],51:[2,32],54:[2,32],63:[2,32],64:[2,32],65:[2,32],67:[2,32],69:[2,32],70:[2,32],71:[2,32],75:[2,32],81:[2,32],82:[2,32],83:[2,32],88:[2,32],90:[2,32],99:[2,32],101:[2,32],102:[2,32],103:[2,32],107:[2,32],115:[2,32],123:[2,32],125:[2,32],126:[2,32],129:[2,32],130:[2,32],131:[2,32],132:[2,32],133:[2,32],134:[2,32]},{4:138,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,139],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:140,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],46:[2,106],51:[2,106],54:[2,106],63:[2,106],64:[2,106],65:[2,106],67:[2,106],69:[2,106],70:[2,106],71:[2,106],75:[2,106],81:[2,106],82:[2,106],83:[2,106],88:[2,106],90:[2,106],99:[2,106],101:[2,106],102:[2,106],103:[2,106],107:[2,106],115:[2,106],123:[2,106],125:[2,106],126:[2,106],129:[2,106],130:[2,106],131:[2,106],132:[2,106],133:[2,106],134:[2,106]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],27:146,28:[1,70],46:[2,107],51:[2,107],54:[2,107],63:[2,107],64:[2,107],65:[2,107],67:[2,107],69:[2,107],70:[2,107],71:[2,107],75:[2,107],81:[2,107],82:[2,107],83:[2,107],88:[2,107],90:[2,107],99:[2,107],101:[2,107],102:[2,107],103:[2,107],107:[2,107],115:[2,107],123:[2,107],125:[2,107],126:[2,107],129:[2,107],130:[2,107],131:[2,107],132:[2,107],133:[2,107],134:[2,107]},{25:[2,47]},{25:[2,48]},{1:[2,62],6:[2,62],25:[2,62],26:[2,62],37:[2,62],46:[2,62],51:[2,62],54:[2,62],63:[2,62],64:[2,62],65:[2,62],67:[2,62],69:[2,62],70:[2,62],71:[2,62],75:[2,62],77:[2,62],81:[2,62],82:[2,62],83:[2,62],88:[2,62],90:[2,62],99:[2,62],101:[2,62],102:[2,62],103:[2,62],107:[2,62],115:[2,62],123:[2,62],125:[2,62],126:[2,62],127:[2,62],128:[2,62],129:[2,62],130:[2,62],131:[2,62],132:[2,62],133:[2,62],134:[2,62],135:[2,62]},{1:[2,65],6:[2,65],25:[2,65],26:[2,65],37:[2,65],46:[2,65],51:[2,65],54:[2,65],63:[2,65],64:[2,65],65:[2,65],67:[2,65],69:[2,65],70:[2,65],71:[2,65],75:[2,65],77:[2,65],81:[2,65],82:[2,65],83:[2,65],88:[2,65],90:[2,65],99:[2,65],101:[2,65],102:[2,65],103:[2,65],107:[2,65],115:[2,65],123:[2,65],125:[2,65],126:[2,65],127:[2,65],128:[2,65],129:[2,65],130:[2,65],131:[2,65],132:[2,65],133:[2,65],134:[2,65],135:[2,65]},{8:147,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:148,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:149,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:150,8:151,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{27:156,28:[1,70],55:157,56:158,61:152,73:[1,67],87:[1,54],110:153,111:[1,154],112:155},{109:159,113:[1,160],114:[1,161]},{6:[2,85],12:165,25:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:162,75:[2,85],86:[1,111]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],40:[2,27],46:[2,27],51:[2,27],54:[2,27],63:[2,27],64:[2,27],65:[2,27],67:[2,27],69:[2,27],70:[2,27],71:[2,27],75:[2,27],81:[2,27],82:[2,27],83:[2,27],88:[2,27],90:[2,27],99:[2,27],101:[2,27],102:[2,27],103:[2,27],107:[2,27],115:[2,27],123:[2,27],125:[2,27],126:[2,27],129:[2,27],130:[2,27],131:[2,27],132:[2,27],133:[2,27],134:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],40:[2,28],46:[2,28],51:[2,28],54:[2,28],63:[2,28],64:[2,28],65:[2,28],67:[2,28],69:[2,28],70:[2,28],71:[2,28],75:[2,28],81:[2,28],82:[2,28],83:[2,28],88:[2,28],90:[2,28],99:[2,28],101:[2,28],102:[2,28],103:[2,28],107:[2,28],115:[2,28],123:[2,28],125:[2,28],126:[2,28],129:[2,28],130:[2,28],131:[2,28],132:[2,28],133:[2,28],134:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],37:[2,26],40:[2,26],46:[2,26],51:[2,26],54:[2,26],63:[2,26],64:[2,26],65:[2,26],67:[2,26],69:[2,26],70:[2,26],71:[2,26],75:[2,26],77:[2,26],81:[2,26],82:[2,26],83:[2,26],88:[2,26],90:[2,26],99:[2,26],101:[2,26],102:[2,26],103:[2,26],107:[2,26],113:[2,26],114:[2,26],115:[2,26],123:[2,26],125:[2,26],126:[2,26],127:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26]},{1:[2,6],6:[2,6],7:169,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,6],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,6],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],46:[2,24],51:[2,24],54:[2,24],69:[2,24],75:[2,24],83:[2,24],88:[2,24],90:[2,24],95:[2,24],96:[2,24],99:[2,24],101:[2,24],102:[2,24],103:[2,24],107:[2,24],115:[2,24],118:[2,24],120:[2,24],123:[2,24],125:[2,24],126:[2,24],129:[2,24],130:[2,24],131:[2,24],132:[2,24],133:[2,24],134:[2,24]},{6:[1,71],26:[1,170]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],46:[2,184],51:[2,184],54:[2,184],69:[2,184],75:[2,184],83:[2,184],88:[2,184],90:[2,184],99:[2,184],101:[2,184],102:[2,184],103:[2,184],107:[2,184],115:[2,184],123:[2,184],125:[2,184],126:[2,184],129:[2,184],130:[2,184],131:[2,184],132:[2,184],133:[2,184],134:[2,184]},{8:171,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:172,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:173,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:174,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:175,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:176,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:177,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:178,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],46:[2,140],51:[2,140],54:[2,140],69:[2,140],75:[2,140],83:[2,140],88:[2,140],90:[2,140],99:[2,140],101:[2,140],102:[2,140],103:[2,140],107:[2,140],115:[2,140],123:[2,140],125:[2,140],126:[2,140],129:[2,140],130:[2,140],131:[2,140],132:[2,140],133:[2,140],134:[2,140]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],46:[2,145],51:[2,145],54:[2,145],69:[2,145],75:[2,145],83:[2,145],88:[2,145],90:[2,145],99:[2,145],101:[2,145],102:[2,145],103:[2,145],107:[2,145],115:[2,145],123:[2,145],125:[2,145],126:[2,145],129:[2,145],130:[2,145],131:[2,145],132:[2,145],133:[2,145],134:[2,145]},{8:179,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],46:[2,139],51:[2,139],54:[2,139],69:[2,139],75:[2,139],83:[2,139],88:[2,139],90:[2,139],99:[2,139],101:[2,139],102:[2,139],103:[2,139],107:[2,139],115:[2,139],123:[2,139],125:[2,139],126:[2,139],129:[2,139],130:[2,139],131:[2,139],132:[2,139],133:[2,139],134:[2,139]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],46:[2,144],51:[2,144],54:[2,144],69:[2,144],75:[2,144],83:[2,144],88:[2,144],90:[2,144],99:[2,144],101:[2,144],102:[2,144],103:[2,144],107:[2,144],115:[2,144],123:[2,144],125:[2,144],126:[2,144],129:[2,144],130:[2,144],131:[2,144],132:[2,144],133:[2,144],134:[2,144]},{79:180,82:[1,103]},{1:[2,63],6:[2,63],25:[2,63],26:[2,63],37:[2,63],46:[2,63],51:[2,63],54:[2,63],63:[2,63],64:[2,63],65:[2,63],67:[2,63],69:[2,63],70:[2,63],71:[2,63],75:[2,63],77:[2,63],81:[2,63],82:[2,63],83:[2,63],88:[2,63],90:[2,63],99:[2,63],101:[2,63],102:[2,63],103:[2,63],107:[2,63],115:[2,63],123:[2,63],125:[2,63],126:[2,63],127:[2,63],128:[2,63],129:[2,63],130:[2,63],131:[2,63],132:[2,63],133:[2,63],134:[2,63],135:[2,63]},{82:[2,103]},{27:181,28:[1,70]},{27:182,28:[1,70]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],27:183,28:[1,70],37:[2,77],46:[2,77],51:[2,77],54:[2,77],63:[2,77],64:[2,77],65:[2,77],67:[2,77],69:[2,77],70:[2,77],71:[2,77],75:[2,77],77:[2,77],81:[2,77],82:[2,77],83:[2,77],88:[2,77],90:[2,77],99:[2,77],101:[2,77],102:[2,77],103:[2,77],107:[2,77],115:[2,77],123:[2,77],125:[2,77],126:[2,77],127:[2,77],128:[2,77],129:[2,77],130:[2,77],131:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],37:[2,78],46:[2,78],51:[2,78],54:[2,78],63:[2,78],64:[2,78],65:[2,78],67:[2,78],69:[2,78],70:[2,78],71:[2,78],75:[2,78],77:[2,78],81:[2,78],82:[2,78],83:[2,78],88:[2,78],90:[2,78],99:[2,78],101:[2,78],102:[2,78],103:[2,78],107:[2,78],115:[2,78],123:[2,78],125:[2,78],126:[2,78],127:[2,78],128:[2,78],129:[2,78],130:[2,78],131:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78]},{8:185,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],54:[1,189],55:47,56:48,58:36,60:25,61:26,62:27,68:184,72:186,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],89:187,90:[1,188],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{66:190,67:[1,96],70:[1,97],71:[1,98]},{66:191,67:[1,96],70:[1,97],71:[1,98]},{79:192,82:[1,103]},{1:[2,64],6:[2,64],25:[2,64],26:[2,64],37:[2,64],46:[2,64],51:[2,64],54:[2,64],63:[2,64],64:[2,64],65:[2,64],67:[2,64],69:[2,64],70:[2,64],71:[2,64],75:[2,64],77:[2,64],81:[2,64],82:[2,64],83:[2,64],88:[2,64],90:[2,64],99:[2,64],101:[2,64],102:[2,64],103:[2,64],107:[2,64],115:[2,64],123:[2,64],125:[2,64],126:[2,64],127:[2,64],128:[2,64],129:[2,64],130:[2,64],131:[2,64],132:[2,64],133:[2,64],134:[2,64],135:[2,64]},{8:193,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,194],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],46:[2,101],51:[2,101],54:[2,101],63:[2,101],64:[2,101],65:[2,101],67:[2,101],69:[2,101],70:[2,101],71:[2,101],75:[2,101],81:[2,101],82:[2,101],83:[2,101],88:[2,101],90:[2,101],99:[2,101],101:[2,101],102:[2,101],103:[2,101],107:[2,101],115:[2,101],123:[2,101],125:[2,101],126:[2,101],129:[2,101],130:[2,101],131:[2,101],132:[2,101],133:[2,101],134:[2,101]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[1,195],84:196,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{46:[1,198],51:[1,199]},{46:[2,52],51:[2,52]},{37:[1,201],46:[2,54],51:[2,54],54:[1,200]},{37:[2,57],46:[2,57],51:[2,57],54:[2,57]},{37:[2,58],46:[2,58],51:[2,58],54:[2,58]},{37:[2,59],46:[2,59],51:[2,59],54:[2,59]},{37:[2,60],46:[2,60],51:[2,60],54:[2,60]},{27:146,28:[1,70]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,46],6:[2,46],25:[2,46],26:[2,46],46:[2,46],51:[2,46],54:[2,46],69:[2,46],75:[2,46],83:[2,46],88:[2,46],90:[2,46],99:[2,46],101:[2,46],102:[2,46],103:[2,46],107:[2,46],115:[2,46],123:[2,46],125:[2,46],126:[2,46],129:[2,46],130:[2,46],131:[2,46],132:[2,46],133:[2,46],134:[2,46]},{1:[2,177],6:[2,177],25:[2,177],26:[2,177],46:[2,177],51:[2,177],54:[2,177],69:[2,177],75:[2,177],83:[2,177],88:[2,177],90:[2,177],99:[2,177],100:84,101:[2,177],102:[2,177],103:[2,177],106:85,107:[2,177],108:66,115:[2,177],123:[2,177],125:[2,177],126:[2,177],129:[1,75],130:[2,177],131:[2,177],132:[2,177],133:[2,177],134:[2,177]},{100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,178],6:[2,178],25:[2,178],26:[2,178],46:[2,178],51:[2,178],54:[2,178],69:[2,178],75:[2,178],83:[2,178],88:[2,178],90:[2,178],99:[2,178],100:84,101:[2,178],102:[2,178],103:[2,178],106:85,107:[2,178],108:66,115:[2,178],123:[2,178],125:[2,178],126:[2,178],129:[1,75],130:[2,178],131:[2,178],132:[2,178],133:[2,178],134:[2,178]},{1:[2,179],6:[2,179],25:[2,179],26:[2,179],46:[2,179],51:[2,179],54:[2,179],69:[2,179],75:[2,179],83:[2,179],88:[2,179],90:[2,179],99:[2,179],100:84,101:[2,179],102:[2,179],103:[2,179],106:85,107:[2,179],108:66,115:[2,179],123:[2,179],125:[2,179],126:[2,179],129:[1,75],130:[2,179],131:[2,179],132:[2,179],133:[2,179],134:[2,179]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],46:[2,180],51:[2,180],54:[2,180],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,180],70:[2,66],71:[2,66],75:[2,180],81:[2,66],82:[2,66],83:[2,180],88:[2,180],90:[2,180],99:[2,180],101:[2,180],102:[2,180],103:[2,180],107:[2,180],115:[2,180],123:[2,180],125:[2,180],126:[2,180],129:[2,180],130:[2,180],131:[2,180],132:[2,180],133:[2,180],134:[2,180]},{59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:89,81:[1,91],82:[2,102]},{59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:99,81:[1,91],82:[2,102]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],46:[2,181],51:[2,181],54:[2,181],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,181],70:[2,66],71:[2,66],75:[2,181],81:[2,66],82:[2,66],83:[2,181],88:[2,181],90:[2,181],99:[2,181],101:[2,181],102:[2,181],103:[2,181],107:[2,181],115:[2,181],123:[2,181],125:[2,181],126:[2,181],129:[2,181],130:[2,181],131:[2,181],132:[2,181],133:[2,181],134:[2,181]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],46:[2,182],51:[2,182],54:[2,182],69:[2,182],75:[2,182],83:[2,182],88:[2,182],90:[2,182],99:[2,182],101:[2,182],102:[2,182],103:[2,182],107:[2,182],115:[2,182],123:[2,182],125:[2,182],126:[2,182],129:[2,182],130:[2,182],131:[2,182],132:[2,182],133:[2,182],134:[2,182]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],46:[2,183],51:[2,183],54:[2,183],69:[2,183],75:[2,183],83:[2,183],88:[2,183],90:[2,183],99:[2,183],101:[2,183],102:[2,183],103:[2,183],107:[2,183],115:[2,183],123:[2,183],125:[2,183],126:[2,183],129:[2,183],130:[2,183],131:[2,183],132:[2,183],133:[2,183],134:[2,183]},{8:202,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,203],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:204,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:205,25:[1,5],122:[1,206]},{1:[2,126],6:[2,126],25:[2,126],26:[2,126],46:[2,126],51:[2,126],54:[2,126],69:[2,126],75:[2,126],83:[2,126],88:[2,126],90:[2,126],94:207,95:[1,208],96:[1,209],99:[2,126],101:[2,126],102:[2,126],103:[2,126],107:[2,126],115:[2,126],123:[2,126],125:[2,126],126:[2,126],129:[2,126],130:[2,126],131:[2,126],132:[2,126],133:[2,126],134:[2,126]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],46:[2,138],51:[2,138],54:[2,138],69:[2,138],75:[2,138],83:[2,138],88:[2,138],90:[2,138],99:[2,138],101:[2,138],102:[2,138],103:[2,138],107:[2,138],115:[2,138],123:[2,138],125:[2,138],126:[2,138],129:[2,138],130:[2,138],131:[2,138],132:[2,138],133:[2,138],134:[2,138]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],46:[2,146],51:[2,146],54:[2,146],69:[2,146],75:[2,146],83:[2,146],88:[2,146],90:[2,146],99:[2,146],101:[2,146],102:[2,146],103:[2,146],107:[2,146],115:[2,146],123:[2,146],125:[2,146],126:[2,146],129:[2,146],130:[2,146],131:[2,146],132:[2,146],133:[2,146],134:[2,146]},{25:[1,210],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{117:211,119:212,120:[1,213]},{1:[2,91],6:[2,91],25:[2,91],26:[2,91],46:[2,91],51:[2,91],54:[2,91],69:[2,91],75:[2,91],83:[2,91],88:[2,91],90:[2,91],99:[2,91],101:[2,91],102:[2,91],103:[2,91],107:[2,91],115:[2,91],123:[2,91],125:[2,91],126:[2,91],129:[2,91],130:[2,91],131:[2,91],132:[2,91],133:[2,91],134:[2,91]},{14:214,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,94],5:216,6:[2,94],25:[1,5],26:[2,94],46:[2,94],51:[2,94],54:[2,94],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,94],70:[2,66],71:[2,66],75:[2,94],77:[1,217],81:[2,66],82:[2,66],83:[2,94],88:[2,94],90:[2,94],99:[2,94],101:[2,94],102:[2,94],103:[2,94],107:[2,94],115:[2,94],123:[2,94],125:[2,94],126:[2,94],129:[2,94],130:[2,94],131:[2,94],132:[2,94],133:[2,94],134:[2,94]},{1:[2,42],6:[2,42],26:[2,42],99:[2,42],100:84,101:[2,42],103:[2,42],106:85,107:[2,42],108:66,123:[2,42],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,131],6:[2,131],26:[2,131],99:[2,131],100:84,101:[2,131],103:[2,131],106:85,107:[2,131],108:66,123:[2,131],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,71],99:[1,218]},{4:219,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,122],25:[2,122],51:[2,122],54:[1,221],88:[2,122],89:220,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],37:[2,109],46:[2,109],51:[2,109],54:[2,109],63:[2,109],64:[2,109],65:[2,109],67:[2,109],69:[2,109],70:[2,109],71:[2,109],75:[2,109],81:[2,109],82:[2,109],83:[2,109],88:[2,109],90:[2,109],99:[2,109],101:[2,109],102:[2,109],103:[2,109],107:[2,109],113:[2,109],114:[2,109],115:[2,109],123:[2,109],125:[2,109],126:[2,109],129:[2,109],130:[2,109],131:[2,109],132:[2,109],133:[2,109],134:[2,109]},{6:[2,49],25:[2,49],50:222,51:[1,223],88:[2,49]},{6:[2,117],25:[2,117],26:[2,117],51:[2,117],83:[2,117],88:[2,117]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:224,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,123],25:[2,123],26:[2,123],51:[2,123],83:[2,123],88:[2,123]},{1:[2,108],6:[2,108],25:[2,108],26:[2,108],37:[2,108],40:[2,108],46:[2,108],51:[2,108],54:[2,108],63:[2,108],64:[2,108],65:[2,108],67:[2,108],69:[2,108],70:[2,108],71:[2,108],75:[2,108],77:[2,108],81:[2,108],82:[2,108],83:[2,108],88:[2,108],90:[2,108],99:[2,108],101:[2,108],102:[2,108],103:[2,108],107:[2,108],115:[2,108],123:[2,108],125:[2,108],126:[2,108],127:[2,108],128:[2,108],129:[2,108],130:[2,108],131:[2,108],132:[2,108],133:[2,108],134:[2,108],135:[2,108]},{5:225,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],46:[2,134],51:[2,134],54:[2,134],69:[2,134],75:[2,134],83:[2,134],88:[2,134],90:[2,134],99:[2,134],100:84,101:[1,62],102:[1,226],103:[1,63],106:85,107:[1,65],108:66,115:[2,134],123:[2,134],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],46:[2,136],51:[2,136],54:[2,136],69:[2,136],75:[2,136],83:[2,136],88:[2,136],90:[2,136],99:[2,136],100:84,101:[1,62],102:[1,227],103:[1,63],106:85,107:[1,65],108:66,115:[2,136],123:[2,136],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],46:[2,142],51:[2,142],54:[2,142],69:[2,142],75:[2,142],83:[2,142],88:[2,142],90:[2,142],99:[2,142],101:[2,142],102:[2,142],103:[2,142],107:[2,142],115:[2,142],123:[2,142],125:[2,142],126:[2,142],129:[2,142],130:[2,142],131:[2,142],132:[2,142],133:[2,142],134:[2,142]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],46:[2,143],51:[2,143],54:[2,143],69:[2,143],75:[2,143],83:[2,143],88:[2,143],90:[2,143],99:[2,143],100:84,101:[1,62],102:[2,143],103:[1,63],106:85,107:[1,65],108:66,115:[2,143],123:[2,143],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],46:[2,147],51:[2,147],54:[2,147],69:[2,147],75:[2,147],83:[2,147],88:[2,147],90:[2,147],99:[2,147],101:[2,147],102:[2,147],103:[2,147],107:[2,147],115:[2,147],123:[2,147],125:[2,147],126:[2,147],129:[2,147],130:[2,147],131:[2,147],132:[2,147],133:[2,147],134:[2,147]},{113:[2,149],114:[2,149]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],110:228,112:155},{51:[1,229],113:[2,154],114:[2,154]},{51:[2,151],113:[2,151],114:[2,151]},{51:[2,152],113:[2,152],114:[2,152]},{51:[2,153],113:[2,153],114:[2,153]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],46:[2,148],51:[2,148],54:[2,148],69:[2,148],75:[2,148],83:[2,148],88:[2,148],90:[2,148],99:[2,148],101:[2,148],102:[2,148],103:[2,148],107:[2,148],115:[2,148],123:[2,148],125:[2,148],126:[2,148],129:[2,148],130:[2,148],131:[2,148],132:[2,148],133:[2,148],134:[2,148]},{8:230,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:231,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],50:232,51:[1,233],75:[2,49]},{6:[2,86],25:[2,86],26:[2,86],51:[2,86],75:[2,86]},{6:[2,35],25:[2,35],26:[2,35],40:[1,234],51:[2,35],75:[2,35]},{6:[2,38],25:[2,38],26:[2,38],51:[2,38],75:[2,38]},{6:[2,39],25:[2,39],26:[2,39],40:[2,39],51:[2,39],75:[2,39]},{6:[2,40],25:[2,40],26:[2,40],40:[2,40],51:[2,40],75:[2,40]},{6:[2,41],25:[2,41],26:[2,41],40:[2,41],51:[2,41],75:[2,41]},{1:[2,5],6:[2,5],26:[2,5],99:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],46:[2,25],51:[2,25],54:[2,25],69:[2,25],75:[2,25],83:[2,25],88:[2,25],90:[2,25],95:[2,25],96:[2,25],99:[2,25],101:[2,25],102:[2,25],103:[2,25],107:[2,25],115:[2,25],118:[2,25],120:[2,25],123:[2,25],125:[2,25],126:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],46:[2,185],51:[2,185],54:[2,185],69:[2,185],75:[2,185],83:[2,185],88:[2,185],90:[2,185],99:[2,185],100:84,101:[2,185],102:[2,185],103:[2,185],106:85,107:[2,185],108:66,115:[2,185],123:[2,185],125:[2,185],126:[2,185],129:[1,75],130:[1,78],131:[2,185],132:[2,185],133:[2,185],134:[2,185]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],46:[2,186],51:[2,186],54:[2,186],69:[2,186],75:[2,186],83:[2,186],88:[2,186],90:[2,186],99:[2,186],100:84,101:[2,186],102:[2,186],103:[2,186],106:85,107:[2,186],108:66,115:[2,186],123:[2,186],125:[2,186],126:[2,186],129:[1,75],130:[1,78],131:[2,186],132:[2,186],133:[2,186],134:[2,186]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],46:[2,187],51:[2,187],54:[2,187],69:[2,187],75:[2,187],83:[2,187],88:[2,187],90:[2,187],99:[2,187],100:84,101:[2,187],102:[2,187],103:[2,187],106:85,107:[2,187],108:66,115:[2,187],123:[2,187],125:[2,187],126:[2,187],129:[1,75],130:[2,187],131:[2,187],132:[2,187],133:[2,187],134:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],46:[2,188],51:[2,188],54:[2,188],69:[2,188],75:[2,188],83:[2,188],88:[2,188],90:[2,188],99:[2,188],100:84,101:[2,188],102:[2,188],103:[2,188],106:85,107:[2,188],108:66,115:[2,188],123:[2,188],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[2,188],132:[2,188],133:[2,188],134:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],46:[2,189],51:[2,189],54:[2,189],69:[2,189],75:[2,189],83:[2,189],88:[2,189],90:[2,189],99:[2,189],100:84,101:[2,189],102:[2,189],103:[2,189],106:85,107:[2,189],108:66,115:[2,189],123:[2,189],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,189],133:[2,189],134:[1,82]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],46:[2,190],51:[2,190],54:[2,190],69:[2,190],75:[2,190],83:[2,190],88:[2,190],90:[2,190],99:[2,190],100:84,101:[2,190],102:[2,190],103:[2,190],106:85,107:[2,190],108:66,115:[2,190],123:[2,190],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[2,190],134:[1,82]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],46:[2,191],51:[2,191],54:[2,191],69:[2,191],75:[2,191],83:[2,191],88:[2,191],90:[2,191],99:[2,191],100:84,101:[2,191],102:[2,191],103:[2,191],106:85,107:[2,191],108:66,115:[2,191],123:[2,191],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,191],133:[2,191],134:[2,191]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],46:[2,176],51:[2,176],54:[2,176],69:[2,176],75:[2,176],83:[2,176],88:[2,176],90:[2,176],99:[2,176],100:84,101:[1,62],102:[2,176],103:[1,63],106:85,107:[1,65],108:66,115:[2,176],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],46:[2,175],51:[2,175],54:[2,175],69:[2,175],75:[2,175],83:[2,175],88:[2,175],90:[2,175],99:[2,175],100:84,101:[1,62],102:[2,175],103:[1,63],106:85,107:[1,65],108:66,115:[2,175],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],46:[2,98],51:[2,98],54:[2,98],63:[2,98],64:[2,98],65:[2,98],67:[2,98],69:[2,98],70:[2,98],71:[2,98],75:[2,98],81:[2,98],82:[2,98],83:[2,98],88:[2,98],90:[2,98],99:[2,98],101:[2,98],102:[2,98],103:[2,98],107:[2,98],115:[2,98],123:[2,98],125:[2,98],126:[2,98],129:[2,98],130:[2,98],131:[2,98],132:[2,98],133:[2,98],134:[2,98]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],37:[2,74],46:[2,74],51:[2,74],54:[2,74],63:[2,74],64:[2,74],65:[2,74],67:[2,74],69:[2,74],70:[2,74],71:[2,74],75:[2,74],77:[2,74],81:[2,74],82:[2,74],83:[2,74],88:[2,74],90:[2,74],99:[2,74],101:[2,74],102:[2,74],103:[2,74],107:[2,74],115:[2,74],123:[2,74],125:[2,74],126:[2,74],127:[2,74],128:[2,74],129:[2,74],130:[2,74],131:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],37:[2,75],46:[2,75],51:[2,75],54:[2,75],63:[2,75],64:[2,75],65:[2,75],67:[2,75],69:[2,75],70:[2,75],71:[2,75],75:[2,75],77:[2,75],81:[2,75],82:[2,75],83:[2,75],88:[2,75],90:[2,75],99:[2,75],101:[2,75],102:[2,75],103:[2,75],107:[2,75],115:[2,75],123:[2,75],125:[2,75],126:[2,75],127:[2,75],128:[2,75],129:[2,75],130:[2,75],131:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],37:[2,76],46:[2,76],51:[2,76],54:[2,76],63:[2,76],64:[2,76],65:[2,76],67:[2,76],69:[2,76],70:[2,76],71:[2,76],75:[2,76],77:[2,76],81:[2,76],82:[2,76],83:[2,76],88:[2,76],90:[2,76],99:[2,76],101:[2,76],102:[2,76],103:[2,76],107:[2,76],115:[2,76],123:[2,76],125:[2,76],126:[2,76],127:[2,76],128:[2,76],129:[2,76],130:[2,76],131:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76]},{69:[1,235]},{54:[1,189],69:[2,82],89:236,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{69:[2,83]},{8:237,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{13:[2,111],28:[2,111],30:[2,111],31:[2,111],33:[2,111],34:[2,111],35:[2,111],42:[2,111],43:[2,111],44:[2,111],48:[2,111],49:[2,111],69:[2,111],73:[2,111],76:[2,111],80:[2,111],85:[2,111],86:[2,111],87:[2,111],93:[2,111],97:[2,111],98:[2,111],101:[2,111],103:[2,111],105:[2,111],107:[2,111],116:[2,111],122:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111],128:[2,111]},{13:[2,112],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],69:[2,112],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],37:[2,80],46:[2,80],51:[2,80],54:[2,80],63:[2,80],64:[2,80],65:[2,80],67:[2,80],69:[2,80],70:[2,80],71:[2,80],75:[2,80],77:[2,80],81:[2,80],82:[2,80],83:[2,80],88:[2,80],90:[2,80],99:[2,80],101:[2,80],102:[2,80],103:[2,80],107:[2,80],115:[2,80],123:[2,80],125:[2,80],126:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],37:[2,81],46:[2,81],51:[2,81],54:[2,81],63:[2,81],64:[2,81],65:[2,81],67:[2,81],69:[2,81],70:[2,81],71:[2,81],75:[2,81],77:[2,81],81:[2,81],82:[2,81],83:[2,81],88:[2,81],90:[2,81],99:[2,81],101:[2,81],102:[2,81],103:[2,81],107:[2,81],115:[2,81],123:[2,81],125:[2,81],126:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],46:[2,99],51:[2,99],54:[2,99],63:[2,99],64:[2,99],65:[2,99],67:[2,99],69:[2,99],70:[2,99],71:[2,99],75:[2,99],81:[2,99],82:[2,99],83:[2,99],88:[2,99],90:[2,99],99:[2,99],101:[2,99],102:[2,99],103:[2,99],107:[2,99],115:[2,99],123:[2,99],125:[2,99],126:[2,99],129:[2,99],130:[2,99],131:[2,99],132:[2,99],133:[2,99],134:[2,99]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],46:[2,33],51:[2,33],54:[2,33],69:[2,33],75:[2,33],83:[2,33],88:[2,33],90:[2,33],99:[2,33],100:84,101:[2,33],102:[2,33],103:[2,33],106:85,107:[2,33],108:66,115:[2,33],123:[2,33],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:238,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],46:[2,104],51:[2,104],54:[2,104],63:[2,104],64:[2,104],65:[2,104],67:[2,104],69:[2,104],70:[2,104],71:[2,104],75:[2,104],81:[2,104],82:[2,104],83:[2,104],88:[2,104],90:[2,104],99:[2,104],101:[2,104],102:[2,104],103:[2,104],107:[2,104],115:[2,104],123:[2,104],125:[2,104],126:[2,104],129:[2,104],130:[2,104],131:[2,104],132:[2,104],133:[2,104],134:[2,104]},{6:[2,49],25:[2,49],50:239,51:[1,223],83:[2,49]},{6:[2,122],25:[2,122],26:[2,122],51:[2,122],54:[1,240],83:[2,122],88:[2,122],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{47:241,48:[1,57],49:[1,58]},{27:107,28:[1,70],41:108,52:242,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{46:[2,55],51:[2,55]},{8:243,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],46:[2,192],51:[2,192],54:[2,192],69:[2,192],75:[2,192],83:[2,192],88:[2,192],90:[2,192],99:[2,192],100:84,101:[2,192],102:[2,192],103:[2,192],106:85,107:[2,192],108:66,115:[2,192],123:[2,192],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:244,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],46:[2,194],51:[2,194],54:[2,194],69:[2,194],75:[2,194],83:[2,194],88:[2,194],90:[2,194],99:[2,194],100:84,101:[2,194],102:[2,194],103:[2,194],106:85,107:[2,194],108:66,115:[2,194],123:[2,194],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],46:[2,174],51:[2,174],54:[2,174],69:[2,174],75:[2,174],83:[2,174],88:[2,174],90:[2,174],99:[2,174],101:[2,174],102:[2,174],103:[2,174],107:[2,174],115:[2,174],123:[2,174],125:[2,174],126:[2,174],129:[2,174],130:[2,174],131:[2,174],132:[2,174],133:[2,174],134:[2,174]},{8:245,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,127],6:[2,127],25:[2,127],26:[2,127],46:[2,127],51:[2,127],54:[2,127],69:[2,127],75:[2,127],83:[2,127],88:[2,127],90:[2,127],95:[1,246],99:[2,127],101:[2,127],102:[2,127],103:[2,127],107:[2,127],115:[2,127],123:[2,127],125:[2,127],126:[2,127],129:[2,127],130:[2,127],131:[2,127],132:[2,127],133:[2,127],134:[2,127]},{5:247,25:[1,5]},{27:248,28:[1,70]},{117:249,119:212,120:[1,213]},{26:[1,250],118:[1,251],119:252,120:[1,213]},{26:[2,167],118:[2,167],120:[2,167]},{8:254,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],92:253,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,92],5:255,6:[2,92],25:[1,5],26:[2,92],46:[2,92],51:[2,92],54:[2,92],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,92],70:[1,97],71:[1,98],75:[2,92],78:89,81:[1,91],82:[2,102],83:[2,92],88:[2,92],90:[2,92],99:[2,92],101:[2,92],102:[2,92],103:[2,92],107:[2,92],115:[2,92],123:[2,92],125:[2,92],126:[2,92],129:[2,92],130:[2,92],131:[2,92],132:[2,92],133:[2,92],134:[2,92]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66]},{1:[2,95],6:[2,95],25:[2,95],26:[2,95],46:[2,95],51:[2,95],54:[2,95],69:[2,95],75:[2,95],83:[2,95],88:[2,95],90:[2,95],99:[2,95],101:[2,95],102:[2,95],103:[2,95],107:[2,95],115:[2,95],123:[2,95],125:[2,95],126:[2,95],129:[2,95],130:[2,95],131:[2,95],132:[2,95],133:[2,95],134:[2,95]},{14:256,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],46:[2,132],51:[2,132],54:[2,132],63:[2,132],64:[2,132],65:[2,132],67:[2,132],69:[2,132],70:[2,132],71:[2,132],75:[2,132],81:[2,132],82:[2,132],83:[2,132],88:[2,132],90:[2,132],99:[2,132],101:[2,132],102:[2,132],103:[2,132],107:[2,132],115:[2,132],123:[2,132],125:[2,132],126:[2,132],129:[2,132],130:[2,132],131:[2,132],132:[2,132],133:[2,132],134:[2,132]},{6:[1,71],26:[1,257]},{8:258,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,61],13:[2,112],25:[2,61],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],51:[2,61],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],88:[2,61],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{6:[1,260],25:[1,261],88:[1,259]},{6:[2,50],8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[2,50],26:[2,50],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[2,50],85:[1,55],86:[1,56],87:[1,54],88:[2,50],91:262,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],26:[2,49],50:263,51:[1,223]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],46:[2,171],51:[2,171],54:[2,171],69:[2,171],75:[2,171],83:[2,171],88:[2,171],90:[2,171],99:[2,171],101:[2,171],102:[2,171],103:[2,171],107:[2,171],115:[2,171],118:[2,171],123:[2,171],125:[2,171],126:[2,171],129:[2,171],130:[2,171],131:[2,171],132:[2,171],133:[2,171],134:[2,171]},{8:264,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:265,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{113:[2,150],114:[2,150]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],112:266},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],46:[2,156],51:[2,156],54:[2,156],69:[2,156],75:[2,156],83:[2,156],88:[2,156],90:[2,156],99:[2,156],100:84,101:[2,156],102:[1,267],103:[2,156],106:85,107:[2,156],108:66,115:[1,268],123:[2,156],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],46:[2,157],51:[2,157],54:[2,157],69:[2,157],75:[2,157],83:[2,157],88:[2,157],90:[2,157],99:[2,157],100:84,101:[2,157],102:[1,269],103:[2,157],106:85,107:[2,157],108:66,115:[2,157],123:[2,157],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,271],25:[1,272],75:[1,270]},{6:[2,50],12:165,25:[2,50],26:[2,50],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:273,39:164,41:168,43:[1,46],75:[2,50],86:[1,111]},{8:274,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,275],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],37:[2,79],46:[2,79],51:[2,79],54:[2,79],63:[2,79],64:[2,79],65:[2,79],67:[2,79],69:[2,79],70:[2,79],71:[2,79],75:[2,79],77:[2,79],81:[2,79],82:[2,79],83:[2,79],88:[2,79],90:[2,79],99:[2,79],101:[2,79],102:[2,79],103:[2,79],107:[2,79],115:[2,79],123:[2,79],125:[2,79],126:[2,79],127:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79]},{8:276,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,69:[2,115],73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,116],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,277],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],83:[1,278]},{6:[2,61],25:[2,61],26:[2,61],51:[2,61],83:[2,61],88:[2,61]},{5:279,25:[1,5]},{46:[2,53],51:[2,53]},{46:[2,56],51:[2,56],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,280],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:281,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:282,25:[1,5]},{1:[2,128],6:[2,128],25:[2,128],26:[2,128],46:[2,128],51:[2,128],54:[2,128],69:[2,128],75:[2,128],83:[2,128],88:[2,128],90:[2,128],99:[2,128],101:[2,128],102:[2,128],103:[2,128],107:[2,128],115:[2,128],123:[2,128],125:[2,128],126:[2,128],129:[2,128],130:[2,128],131:[2,128],132:[2,128],133:[2,128],134:[2,128]},{5:283,25:[1,5]},{26:[1,284],118:[1,285],119:252,120:[1,213]},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],46:[2,165],51:[2,165],54:[2,165],69:[2,165],75:[2,165],83:[2,165],88:[2,165],90:[2,165],99:[2,165],101:[2,165],102:[2,165],103:[2,165],107:[2,165],115:[2,165],123:[2,165],125:[2,165],126:[2,165],129:[2,165],130:[2,165],131:[2,165],132:[2,165],133:[2,165],134:[2,165]},{5:286,25:[1,5]},{26:[2,168],118:[2,168],120:[2,168]},{5:287,25:[1,5],51:[1,288]},{25:[2,124],51:[2,124],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,93],6:[2,93],25:[2,93],26:[2,93],46:[2,93],51:[2,93],54:[2,93],69:[2,93],75:[2,93],83:[2,93],88:[2,93],90:[2,93],99:[2,93],101:[2,93],102:[2,93],103:[2,93],107:[2,93],115:[2,93],123:[2,93],125:[2,93],126:[2,93],129:[2,93],130:[2,93],131:[2,93],132:[2,93],133:[2,93],134:[2,93]},{1:[2,96],5:289,6:[2,96],25:[1,5],26:[2,96],46:[2,96],51:[2,96],54:[2,96],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,96],70:[1,97],71:[1,98],75:[2,96],78:89,81:[1,91],82:[2,102],83:[2,96],88:[2,96],90:[2,96],99:[2,96],101:[2,96],102:[2,96],103:[2,96],107:[2,96],115:[2,96],123:[2,96],125:[2,96],126:[2,96],129:[2,96],130:[2,96],131:[2,96],132:[2,96],133:[2,96],134:[2,96]},{99:[1,290]},{88:[1,291],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],37:[2,110],46:[2,110],51:[2,110],54:[2,110],63:[2,110],64:[2,110],65:[2,110],67:[2,110],69:[2,110],70:[2,110],71:[2,110],75:[2,110],81:[2,110],82:[2,110],83:[2,110],88:[2,110],90:[2,110],99:[2,110],101:[2,110],102:[2,110],103:[2,110],107:[2,110],113:[2,110],114:[2,110],115:[2,110],123:[2,110],125:[2,110],126:[2,110],129:[2,110],130:[2,110],131:[2,110],132:[2,110],133:[2,110],134:[2,110]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],91:292,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:293,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,118],25:[2,118],26:[2,118],51:[2,118],83:[2,118],88:[2,118]},{6:[1,260],25:[1,261],26:[1,294]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],46:[2,135],51:[2,135],54:[2,135],69:[2,135],75:[2,135],83:[2,135],88:[2,135],90:[2,135],99:[2,135],100:84,101:[1,62],102:[2,135],103:[1,63],106:85,107:[1,65],108:66,115:[2,135],123:[2,135],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],46:[2,137],51:[2,137],54:[2,137],69:[2,137],75:[2,137],83:[2,137],88:[2,137],90:[2,137],99:[2,137],100:84,101:[1,62],102:[2,137],103:[1,63],106:85,107:[1,65],108:66,115:[2,137],123:[2,137],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{113:[2,155],114:[2,155]},{8:295,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:296,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:297,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],37:[2,84],46:[2,84],51:[2,84],54:[2,84],63:[2,84],64:[2,84],65:[2,84],67:[2,84],69:[2,84],70:[2,84],71:[2,84],75:[2,84],81:[2,84],82:[2,84],83:[2,84],88:[2,84],90:[2,84],99:[2,84],101:[2,84],102:[2,84],103:[2,84],107:[2,84],113:[2,84],114:[2,84],115:[2,84],123:[2,84],125:[2,84],126:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84]},{12:165,27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:298,39:164,41:168,43:[1,46],86:[1,111]},{6:[2,85],12:165,25:[2,85],26:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:299,86:[1,111]},{6:[2,87],25:[2,87],26:[2,87],51:[2,87],75:[2,87]},{6:[2,36],25:[2,36],26:[2,36],51:[2,36],75:[2,36],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:300,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,114],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],46:[2,34],51:[2,34],54:[2,34],69:[2,34],75:[2,34],83:[2,34],88:[2,34],90:[2,34],99:[2,34],101:[2,34],102:[2,34],103:[2,34],107:[2,34],115:[2,34],123:[2,34],125:[2,34],126:[2,34],129:[2,34],130:[2,34],131:[2,34],132:[2,34],133:[2,34],134:[2,34]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],46:[2,105],51:[2,105],54:[2,105],63:[2,105],64:[2,105],65:[2,105],67:[2,105],69:[2,105],70:[2,105],71:[2,105],75:[2,105],81:[2,105],82:[2,105],83:[2,105],88:[2,105],90:[2,105],99:[2,105],101:[2,105],102:[2,105],103:[2,105],107:[2,105],115:[2,105],123:[2,105],125:[2,105],126:[2,105],129:[2,105],130:[2,105],131:[2,105],132:[2,105],133:[2,105],134:[2,105]},{1:[2,45],6:[2,45],25:[2,45],26:[2,45],46:[2,45],51:[2,45],54:[2,45],69:[2,45],75:[2,45],83:[2,45],88:[2,45],90:[2,45],99:[2,45],101:[2,45],102:[2,45],103:[2,45],107:[2,45],115:[2,45],123:[2,45],125:[2,45],126:[2,45],129:[2,45],130:[2,45],131:[2,45],132:[2,45],133:[2,45],134:[2,45]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],46:[2,193],51:[2,193],54:[2,193],69:[2,193],75:[2,193],83:[2,193],88:[2,193],90:[2,193],99:[2,193],101:[2,193],102:[2,193],103:[2,193],107:[2,193],115:[2,193],123:[2,193],125:[2,193],126:[2,193],129:[2,193],130:[2,193],131:[2,193],132:[2,193],133:[2,193],134:[2,193]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],46:[2,172],51:[2,172],54:[2,172],69:[2,172],75:[2,172],83:[2,172],88:[2,172],90:[2,172],99:[2,172],101:[2,172],102:[2,172],103:[2,172],107:[2,172],115:[2,172],118:[2,172],123:[2,172],125:[2,172],126:[2,172],129:[2,172],130:[2,172],131:[2,172],132:[2,172],133:[2,172],134:[2,172]},{1:[2,129],6:[2,129],25:[2,129],26:[2,129],46:[2,129],51:[2,129],54:[2,129],69:[2,129],75:[2,129],83:[2,129],88:[2,129],90:[2,129],99:[2,129],101:[2,129],102:[2,129],103:[2,129],107:[2,129],115:[2,129],123:[2,129],125:[2,129],126:[2,129],129:[2,129],130:[2,129],131:[2,129],132:[2,129],133:[2,129],134:[2,129]},{1:[2,130],6:[2,130],25:[2,130],26:[2,130],46:[2,130],51:[2,130],54:[2,130],69:[2,130],75:[2,130],83:[2,130],88:[2,130],90:[2,130],95:[2,130],99:[2,130],101:[2,130],102:[2,130],103:[2,130],107:[2,130],115:[2,130],123:[2,130],125:[2,130],126:[2,130],129:[2,130],130:[2,130],131:[2,130],132:[2,130],133:[2,130],134:[2,130]},{1:[2,163],6:[2,163],25:[2,163],26:[2,163],46:[2,163],51:[2,163],54:[2,163],69:[2,163],75:[2,163],83:[2,163],88:[2,163],90:[2,163],99:[2,163],101:[2,163],102:[2,163],103:[2,163],107:[2,163],115:[2,163],123:[2,163],125:[2,163],126:[2,163],129:[2,163],130:[2,163],131:[2,163],132:[2,163],133:[2,163],134:[2,163]},{5:301,25:[1,5]},{26:[1,302]},{6:[1,303],26:[2,169],118:[2,169],120:[2,169]},{8:304,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],46:[2,97],51:[2,97],54:[2,97],69:[2,97],75:[2,97],83:[2,97],88:[2,97],90:[2,97],99:[2,97],101:[2,97],102:[2,97],103:[2,97],107:[2,97],115:[2,97],123:[2,97],125:[2,97],126:[2,97],129:[2,97],130:[2,97],131:[2,97],132:[2,97],133:[2,97],134:[2,97]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],46:[2,133],51:[2,133],54:[2,133],63:[2,133],64:[2,133],65:[2,133],67:[2,133],69:[2,133],70:[2,133],71:[2,133],75:[2,133],81:[2,133],82:[2,133],83:[2,133],88:[2,133],90:[2,133],99:[2,133],101:[2,133],102:[2,133],103:[2,133],107:[2,133],115:[2,133],123:[2,133],125:[2,133],126:[2,133],129:[2,133],130:[2,133],131:[2,133],132:[2,133],133:[2,133],134:[2,133]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],46:[2,113],51:[2,113],54:[2,113],63:[2,113],64:[2,113],65:[2,113],67:[2,113],69:[2,113],70:[2,113],71:[2,113],75:[2,113],81:[2,113],82:[2,113],83:[2,113],88:[2,113],90:[2,113],99:[2,113],101:[2,113],102:[2,113],103:[2,113],107:[2,113],115:[2,113],123:[2,113],125:[2,113],126:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113]},{6:[2,119],25:[2,119],26:[2,119],51:[2,119],83:[2,119],88:[2,119]},{6:[2,49],25:[2,49],26:[2,49],50:305,51:[1,223]},{6:[2,120],25:[2,120],26:[2,120],51:[2,120],83:[2,120],88:[2,120]},{1:[2,158],6:[2,158],25:[2,158],26:[2,158],46:[2,158],51:[2,158],54:[2,158],69:[2,158],75:[2,158],83:[2,158],88:[2,158],90:[2,158],99:[2,158],100:84,101:[2,158],102:[2,158],103:[2,158],106:85,107:[2,158],108:66,115:[1,306],123:[2,158],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,160],6:[2,160],25:[2,160],26:[2,160],46:[2,160],51:[2,160],54:[2,160],69:[2,160],75:[2,160],83:[2,160],88:[2,160],90:[2,160],99:[2,160],100:84,101:[2,160],102:[1,307],103:[2,160],106:85,107:[2,160],108:66,115:[2,160],123:[2,160],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,159],6:[2,159],25:[2,159],26:[2,159],46:[2,159],51:[2,159],54:[2,159],69:[2,159],75:[2,159],83:[2,159],88:[2,159],90:[2,159],99:[2,159],100:84,101:[2,159],102:[2,159],103:[2,159],106:85,107:[2,159],108:66,115:[2,159],123:[2,159],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,88],25:[2,88],26:[2,88],51:[2,88],75:[2,88]},{6:[2,49],25:[2,49],26:[2,49],50:308,51:[1,233]},{26:[1,309],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,310]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],46:[2,166],51:[2,166],54:[2,166],69:[2,166],75:[2,166],83:[2,166],88:[2,166],90:[2,166],99:[2,166],101:[2,166],102:[2,166],103:[2,166],107:[2,166],115:[2,166],123:[2,166],125:[2,166],126:[2,166],129:[2,166],130:[2,166],131:[2,166],132:[2,166],133:[2,166],134:[2,166]},{26:[2,170],118:[2,170],120:[2,170]},{25:[2,125],51:[2,125],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],26:[1,311]},{8:312,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:313,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[1,271],25:[1,272],26:[1,314]},{6:[2,37],25:[2,37],26:[2,37],51:[2,37],75:[2,37]},{1:[2,164],6:[2,164],25:[2,164],26:[2,164],46:[2,164],51:[2,164],54:[2,164],69:[2,164],75:[2,164],83:[2,164],88:[2,164],90:[2,164],99:[2,164],101:[2,164],102:[2,164],103:[2,164],107:[2,164],115:[2,164],123:[2,164],125:[2,164],126:[2,164],129:[2,164],130:[2,164],131:[2,164],132:[2,164],133:[2,164],134:[2,164]},{6:[2,121],25:[2,121],26:[2,121],51:[2,121],83:[2,121],88:[2,121]},{1:[2,161],6:[2,161],25:[2,161],26:[2,161],46:[2,161],51:[2,161],54:[2,161],69:[2,161],75:[2,161],83:[2,161],88:[2,161],90:[2,161],99:[2,161],100:84,101:[2,161],102:[2,161],103:[2,161],106:85,107:[2,161],108:66,115:[2,161],123:[2,161],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,162],6:[2,162],25:[2,162],26:[2,162],46:[2,162],51:[2,162],54:[2,162],69:[2,162],75:[2,162],83:[2,162],88:[2,162],90:[2,162],99:[2,162],100:84,101:[2,162],102:[2,162],103:[2,162],106:85,107:[2,162],108:66,115:[2,162],123:[2,162],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,89],25:[2,89],26:[2,89],51:[2,89],75:[2,89]}], |
| 1597 | defaultActions: {57:[2,47],58:[2,48],72:[2,3],91:[2,103],186:[2,83]}, |
| 1598 | parseError: function parseError(str, hash) { |
| 1599 | throw new Error(str); |
| 1600 | }, |
| 1601 | parse: function parse(input) { |
| 1602 | var self = this, |
| 1603 | stack = [0], |
| 1604 | vstack = [null], // semantic value stack |
| 1605 | lstack = [], // location stack |
| 1606 | table = this.table, |
| 1607 | yytext = '', |
| 1608 | yylineno = 0, |
| 1609 | yyleng = 0, |
| 1610 | recovering = 0, |
| 1611 | TERROR = 2, |
| 1612 | EOF = 1; |
| 1613 | |
| 1614 | //this.reductionCount = this.shiftCount = 0; |
| 1615 | |
| 1616 | this.lexer.setInput(input); |
| 1617 | this.lexer.yy = this.yy; |
| 1618 | this.yy.lexer = this.lexer; |
| 1619 | if (typeof this.lexer.yylloc == 'undefined') |
| 1620 | this.lexer.yylloc = {}; |
| 1621 | var yyloc = this.lexer.yylloc; |
| 1622 | lstack.push(yyloc); |
| 1623 | |
| 1624 | if (typeof this.yy.parseError === 'function') |
| 1625 | this.parseError = this.yy.parseError; |
| 1626 | |
| 1627 | function popStack (n) { |
| 1628 | stack.length = stack.length - 2*n; |
| 1629 | vstack.length = vstack.length - n; |
| 1630 | lstack.length = lstack.length - n; |
| 1631 | } |
| 1632 | |
| 1633 | function lex() { |
| 1634 | var token; |
| 1635 | token = self.lexer.lex() || 1; // $end = 1 |
| 1636 | // if token isn't its numeric value, convert |
| 1637 | if (typeof token !== 'number') { |
| 1638 | token = self.symbols_[token] || token; |
| 1639 | } |
| 1640 | return token; |
| 1641 | }; |
| 1642 | |
| 1643 | var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected; |
| 1644 | while (true) { |
| 1645 | // retreive state number from top of stack |
| 1646 | state = stack[stack.length-1]; |
| 1647 | |
| 1648 | // use default actions if available |
| 1649 | if (this.defaultActions[state]) { |
| 1650 | action = this.defaultActions[state]; |
| 1651 | } else { |
| 1652 | if (symbol == null) |
| 1653 | symbol = lex(); |
| 1654 | // read action for current state and first input |
| 1655 | action = table[state] && table[state][symbol]; |
| 1656 | } |
| 1657 | |
| 1658 | // handle parse error |
| 1659 | if (typeof action === 'undefined' || !action.length || !action[0]) { |
| 1660 | |
| 1661 | if (!recovering) { |
| 1662 | // Report error |
| 1663 | expected = []; |
| 1664 | for (p in table[state]) if (this.terminals_[p] && p > 2) { |
| 1665 | expected.push("'"+this.terminals_[p]+"'"); |
| 1666 | } |
| 1667 | var errStr = ''; |
| 1668 | if (this.lexer.showPosition) { |
| 1669 | errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+'\nExpecting '+expected.join(', '); |
| 1670 | } else { |
| 1671 | errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " + |
| 1672 | (symbol == 1 /*EOF*/ ? "end of input" : |
| 1673 | ("'"+(this.terminals_[symbol] || symbol)+"'")); |
| 1674 | } |
| 1675 | this.parseError(errStr, |
| 1676 | {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); |
| 1677 | } |
| 1678 | |
| 1679 | // just recovered from another error |
| 1680 | if (recovering == 3) { |
| 1681 | if (symbol == EOF) { |
| 1682 | throw new Error(errStr || 'Parsing halted.'); |
| 1683 | } |
| 1684 | |
| 1685 | // discard current lookahead and grab another |
| 1686 | yyleng = this.lexer.yyleng; |
| 1687 | yytext = this.lexer.yytext; |
| 1688 | yylineno = this.lexer.yylineno; |
| 1689 | yyloc = this.lexer.yylloc; |
| 1690 | symbol = lex(); |
| 1691 | } |
| 1692 | |
| 1693 | // try to recover from error |
| 1694 | while (1) { |
| 1695 | // check for error recovery rule in this state |
| 1696 | if ((TERROR.toString()) in table[state]) { |
| 1697 | break; |
| 1698 | } |
| 1699 | if (state == 0) { |
| 1700 | throw new Error(errStr || 'Parsing halted.'); |
| 1701 | } |
| 1702 | popStack(1); |
| 1703 | state = stack[stack.length-1]; |
| 1704 | } |
| 1705 | |
| 1706 | preErrorSymbol = symbol; // save the lookahead token |
| 1707 | symbol = TERROR; // insert generic error symbol as new lookahead |
| 1708 | state = stack[stack.length-1]; |
| 1709 | action = table[state] && table[state][TERROR]; |
| 1710 | recovering = 3; // allow 3 real symbols to be shifted before reporting a new error |
| 1711 | } |
| 1712 | |
| 1713 | // this shouldn't happen, unless resolve defaults are off |
| 1714 | if (action[0] instanceof Array && action.length > 1) { |
| 1715 | throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol); |
| 1716 | } |
| 1717 | |
| 1718 | switch (action[0]) { |
| 1719 | |
| 1720 | case 1: // shift |
| 1721 | //this.shiftCount++; |
| 1722 | |
| 1723 | stack.push(symbol); |
| 1724 | vstack.push(this.lexer.yytext); |
| 1725 | lstack.push(this.lexer.yylloc); |
| 1726 | stack.push(action[1]); // push state |
| 1727 | symbol = null; |
| 1728 | if (!preErrorSymbol) { // normal execution/no error |
| 1729 | yyleng = this.lexer.yyleng; |
| 1730 | yytext = this.lexer.yytext; |
| 1731 | yylineno = this.lexer.yylineno; |
| 1732 | yyloc = this.lexer.yylloc; |
| 1733 | if (recovering > 0) |
| 1734 | recovering--; |
| 1735 | } else { // error just occurred, resume old lookahead f/ before error |
| 1736 | symbol = preErrorSymbol; |
| 1737 | preErrorSymbol = null; |
| 1738 | } |
| 1739 | break; |
| 1740 | |
| 1741 | case 2: // reduce |
| 1742 | //this.reductionCount++; |
| 1743 | |
| 1744 | len = this.productions_[action[1]][1]; |
| 1745 | |
| 1746 | // perform semantic action |
| 1747 | yyval.$ = vstack[vstack.length-len]; // default to $$ = $1 |
| 1748 | // default location, uses first token for firsts, last for lasts |
| 1749 | yyval._$ = { |
| 1750 | first_line: lstack[lstack.length-(len||1)].first_line, |
| 1751 | last_line: lstack[lstack.length-1].last_line, |
| 1752 | first_column: lstack[lstack.length-(len||1)].first_column, |
| 1753 | last_column: lstack[lstack.length-1].last_column |
| 1754 | }; |
| 1755 | r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); |
| 1756 | |
| 1757 | if (typeof r !== 'undefined') { |
| 1758 | return r; |
| 1759 | } |
| 1760 | |
| 1761 | // pop off stack |
| 1762 | if (len) { |
| 1763 | stack = stack.slice(0,-1*len*2); |
| 1764 | vstack = vstack.slice(0, -1*len); |
| 1765 | lstack = lstack.slice(0, -1*len); |
| 1766 | } |
| 1767 | |
| 1768 | stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce) |
| 1769 | vstack.push(yyval.$); |
| 1770 | lstack.push(yyval._$); |
| 1771 | // goto new state = table[STATE][NONTERMINAL] |
| 1772 | newState = table[stack[stack.length-2]][stack[stack.length-1]]; |
| 1773 | stack.push(newState); |
| 1774 | break; |
| 1775 | |
| 1776 | case 3: // accept |
| 1777 | return true; |
| 1778 | } |
| 1779 | |
| 1780 | } |
| 1781 | |
| 1782 | return true; |
| 1783 | }}; |
| 1784 | return parser; |
| 1785 | })(); |
| 1786 | if (typeof require !== 'undefined' && typeof exports !== 'undefined') { |
| 1787 | exports.parser = parser; |
| 1788 | exports.parse = function () { return parser.parse.apply(parser, arguments); } |
| 1789 | exports.main = function commonjsMain(args) { |
| 1790 | if (!args[1]) |
| 1791 | throw new Error('Usage: '+args[0]+' FILE'); |
| 1792 | if (typeof process !== 'undefined') { |
| 1793 | var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8"); |
| 1794 | } else { |
| 1795 | var cwd = require("file").path(require("file").cwd()); |
| 1796 | var source = cwd.join(args[1]).read({charset: "utf-8"}); |
| 1797 | } |
| 1798 | return exports.parser.parse(source); |
| 1799 | } |
| 1800 | if (typeof module !== 'undefined' && require.main === module) { |
| 1801 | exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args); |
| 1802 | } |
| 1803 | }return exports; |
| 1804 | }());(function () { |
| 1805 | var exports = __MODULES['scope'] = {}; |
| 1806 | (function() { |
| 1807 | var Scope, extend, last, _ref; |
| 1808 | _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; |
| 1809 | exports.Scope = Scope = (function() { |
| 1810 | Scope.root = null; |
| 1811 | function Scope(parent, expressions, method) { |
| 1812 | this.parent = parent; |
| 1813 | this.expressions = expressions; |
| 1814 | this.method = method; |
| 1815 | this.variables = [ |
| 1816 | { |
| 1817 | name: 'arguments', |
| 1818 | type: 'arguments' |
| 1819 | } |
| 1820 | ]; |
| 1821 | this.positions = {}; |
| 1822 | if (!this.parent) { |
| 1823 | Scope.root = this; |
| 1824 | } |
| 1825 | } |
| 1826 | Scope.prototype.add = function(name, type, immediate) { |
| 1827 | var pos; |
| 1828 | if (this.shared && !immediate) { |
| 1829 | return this.parent.add(name, type, immediate); |
| 1830 | } |
| 1831 | if (typeof (pos = this.positions[name]) === 'number') { |
| 1832 | return this.variables[pos].type = type; |
| 1833 | } else { |
| 1834 | return this.positions[name] = this.variables.push({ |
| 1835 | name: name, |
| 1836 | type: type |
| 1837 | }) - 1; |
| 1838 | } |
| 1839 | }; |
| 1840 | Scope.prototype.find = function(name, options) { |
| 1841 | if (this.check(name, options)) { |
| 1842 | return true; |
| 1843 | } |
| 1844 | this.add(name, 'var'); |
| 1845 | return false; |
| 1846 | }; |
| 1847 | Scope.prototype.parameter = function(name) { |
| 1848 | if (this.shared && this.parent.check(name, true)) { |
| 1849 | return; |
| 1850 | } |
| 1851 | return this.add(name, 'param'); |
| 1852 | }; |
| 1853 | Scope.prototype.check = function(name, immediate) { |
| 1854 | var found, _ref2; |
| 1855 | found = !!this.type(name); |
| 1856 | if (found || immediate) { |
| 1857 | return found; |
| 1858 | } |
| 1859 | return !!((_ref2 = this.parent) != null ? _ref2.check(name) : void 0); |
| 1860 | }; |
| 1861 | Scope.prototype.temporary = function(name, index) { |
| 1862 | if (name.length > 1) { |
| 1863 | return '_' + name + (index > 1 ? index : ''); |
| 1864 | } else { |
| 1865 | return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); |
| 1866 | } |
| 1867 | }; |
| 1868 | Scope.prototype.type = function(name) { |
| 1869 | var v, _i, _len, _ref2; |
| 1870 | _ref2 = this.variables; |
| 1871 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 1872 | v = _ref2[_i]; |
| 1873 | if (v.name === name) { |
| 1874 | return v.type; |
| 1875 | } |
| 1876 | } |
| 1877 | return null; |
| 1878 | }; |
| 1879 | Scope.prototype.freeVariable = function(type) { |
| 1880 | var index, temp; |
| 1881 | index = 0; |
| 1882 | while (this.check((temp = this.temporary(type, index)))) { |
| 1883 | index++; |
| 1884 | } |
| 1885 | this.add(temp, 'var', true); |
| 1886 | return temp; |
| 1887 | }; |
| 1888 | Scope.prototype.assign = function(name, value) { |
| 1889 | this.add(name, { |
| 1890 | value: value, |
| 1891 | assigned: true |
| 1892 | }); |
| 1893 | return this.hasAssignments = true; |
| 1894 | }; |
| 1895 | Scope.prototype.hasDeclarations = function() { |
| 1896 | return !!this.declaredVariables().length; |
| 1897 | }; |
| 1898 | Scope.prototype.declaredVariables = function() { |
| 1899 | var realVars, tempVars, v, _i, _len, _ref2; |
| 1900 | realVars = []; |
| 1901 | tempVars = []; |
| 1902 | _ref2 = this.variables; |
| 1903 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 1904 | v = _ref2[_i]; |
| 1905 | if (v.type === 'var') { |
| 1906 | (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); |
| 1907 | } |
| 1908 | } |
| 1909 | return realVars.sort().concat(tempVars.sort()); |
| 1910 | }; |
| 1911 | Scope.prototype.assignedVariables = function() { |
| 1912 | var v, _i, _len, _ref2, _results; |
| 1913 | _ref2 = this.variables; |
| 1914 | _results = []; |
| 1915 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 1916 | v = _ref2[_i]; |
| 1917 | if (v.type.assigned) { |
| 1918 | _results.push("" + v.name + " = " + v.type.value); |
| 1919 | } |
| 1920 | } |
| 1921 | return _results; |
| 1922 | }; |
| 1923 | return Scope; |
| 1924 | })(); |
| 1925 | }).call(this); |
| 1926 | return exports; |
| 1927 | }());(function () { |
| 1928 | var exports = __MODULES['nodes'] = {}; |
| 1929 | (function() { |
| 1930 | var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, Push, Range, Return, SIMPLENUM, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, starts, unfoldSoak, utility, _ref; |
| 1931 | var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { |
| 1932 | for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } |
| 1933 | function ctor() { this.constructor = child; } |
| 1934 | ctor.prototype = parent.prototype; |
| 1935 | child.prototype = new ctor; |
| 1936 | child.__super__ = parent.prototype; |
| 1937 | return child; |
| 1938 | }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = Array.prototype.indexOf || function(item) { |
| 1939 | for (var i = 0, l = this.length; i < l; i++) { |
| 1940 | if (this[i] === item) return i; |
| 1941 | } |
| 1942 | return -1; |
| 1943 | }; |
| 1944 | Scope = require('./scope').Scope; |
| 1945 | _ref = require('./helpers'), compact = _ref.compact, flatten = _ref.flatten, extend = _ref.extend, merge = _ref.merge, del = _ref.del, starts = _ref.starts, ends = _ref.ends, last = _ref.last; |
| 1946 | exports.extend = extend; |
| 1947 | YES = function() { |
| 1948 | return true; |
| 1949 | }; |
| 1950 | NO = function() { |
| 1951 | return false; |
| 1952 | }; |
| 1953 | THIS = function() { |
| 1954 | return this; |
| 1955 | }; |
| 1956 | NEGATE = function() { |
| 1957 | this.negated = !this.negated; |
| 1958 | return this; |
| 1959 | }; |
| 1960 | exports.Base = Base = (function() { |
| 1961 | function Base() {} |
| 1962 | Base.prototype.compile = function(o, lvl) { |
| 1963 | var node; |
| 1964 | o = extend({}, o); |
| 1965 | if (lvl) { |
| 1966 | o.level = lvl; |
| 1967 | } |
| 1968 | node = this.unfoldSoak(o) || this; |
| 1969 | node.tab = o.indent; |
| 1970 | if (o.level === LEVEL_TOP || !node.isStatement(o)) { |
| 1971 | return node.compileNode(o); |
| 1972 | } else { |
| 1973 | return node.compileClosure(o); |
| 1974 | } |
| 1975 | }; |
| 1976 | Base.prototype.compileClosure = function(o) { |
| 1977 | if (this.jumps() || this instanceof Throw) { |
| 1978 | throw SyntaxError('cannot use a pure statement in an expression.'); |
| 1979 | } |
| 1980 | o.sharedScope = true; |
| 1981 | return Closure.wrap(this).compileNode(o); |
| 1982 | }; |
| 1983 | Base.prototype.cache = function(o, level, reused) { |
| 1984 | var ref, sub; |
| 1985 | if (!this.isComplex()) { |
| 1986 | ref = level ? this.compile(o, level) : this; |
| 1987 | return [ref, ref]; |
| 1988 | } else { |
| 1989 | ref = new Literal(reused || o.scope.freeVariable('ref')); |
| 1990 | sub = new Assign(ref, this); |
| 1991 | if (level) { |
| 1992 | return [sub.compile(o, level), ref.value]; |
| 1993 | } else { |
| 1994 | return [sub, ref]; |
| 1995 | } |
| 1996 | } |
| 1997 | }; |
| 1998 | Base.prototype.compileLoopReference = function(o, name) { |
| 1999 | var src, tmp; |
| 2000 | src = tmp = this.compile(o, LEVEL_LIST); |
| 2001 | if (!((-Infinity < +src && +src < Infinity) || IDENTIFIER.test(src) && o.scope.check(src, true))) { |
| 2002 | src = "" + (tmp = o.scope.freeVariable(name)) + " = " + src; |
| 2003 | } |
| 2004 | return [src, tmp]; |
| 2005 | }; |
| 2006 | Base.prototype.makeReturn = function() { |
| 2007 | return new Return(this); |
| 2008 | }; |
| 2009 | Base.prototype.contains = function(pred) { |
| 2010 | var contains; |
| 2011 | contains = false; |
| 2012 | this.traverseChildren(false, function(node) { |
| 2013 | if (pred(node)) { |
| 2014 | contains = true; |
| 2015 | return false; |
| 2016 | } |
| 2017 | }); |
| 2018 | return contains; |
| 2019 | }; |
| 2020 | Base.prototype.containsType = function(type) { |
| 2021 | return this instanceof type || this.contains(function(node) { |
| 2022 | return node instanceof type; |
| 2023 | }); |
| 2024 | }; |
| 2025 | Base.prototype.lastNonComment = function(list) { |
| 2026 | var i; |
| 2027 | i = list.length; |
| 2028 | while (i--) { |
| 2029 | if (!(list[i] instanceof Comment)) { |
| 2030 | return list[i]; |
| 2031 | } |
| 2032 | } |
| 2033 | return null; |
| 2034 | }; |
| 2035 | Base.prototype.toString = function(idt, name) { |
| 2036 | var tree; |
| 2037 | if (idt == null) { |
| 2038 | idt = ''; |
| 2039 | } |
| 2040 | if (name == null) { |
| 2041 | name = this.constructor.name; |
| 2042 | } |
| 2043 | tree = '\n' + idt + name; |
| 2044 | if (this.soak) { |
| 2045 | tree += '?'; |
| 2046 | } |
| 2047 | this.eachChild(function(node) { |
| 2048 | return tree += node.toString(idt + TAB); |
| 2049 | }); |
| 2050 | return tree; |
| 2051 | }; |
| 2052 | Base.prototype.eachChild = function(func) { |
| 2053 | var attr, child, _i, _j, _len, _len2, _ref2, _ref3; |
| 2054 | if (!this.children) { |
| 2055 | return this; |
| 2056 | } |
| 2057 | _ref2 = this.children; |
| 2058 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2059 | attr = _ref2[_i]; |
| 2060 | if (this[attr]) { |
| 2061 | _ref3 = flatten([this[attr]]); |
| 2062 | for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { |
| 2063 | child = _ref3[_j]; |
| 2064 | if (func(child) === false) { |
| 2065 | return this; |
| 2066 | } |
| 2067 | } |
| 2068 | } |
| 2069 | } |
| 2070 | return this; |
| 2071 | }; |
| 2072 | Base.prototype.traverseChildren = function(crossScope, func) { |
| 2073 | return this.eachChild(function(child) { |
| 2074 | if (func(child) === false) { |
| 2075 | return false; |
| 2076 | } |
| 2077 | return child.traverseChildren(crossScope, func); |
| 2078 | }); |
| 2079 | }; |
| 2080 | Base.prototype.invert = function() { |
| 2081 | return new Op('!', this); |
| 2082 | }; |
| 2083 | Base.prototype.unwrapAll = function() { |
| 2084 | var node; |
| 2085 | node = this; |
| 2086 | while (node !== (node = node.unwrap())) { |
| 2087 | continue; |
| 2088 | } |
| 2089 | return node; |
| 2090 | }; |
| 2091 | Base.prototype.children = []; |
| 2092 | Base.prototype.isStatement = NO; |
| 2093 | Base.prototype.jumps = NO; |
| 2094 | Base.prototype.isComplex = YES; |
| 2095 | Base.prototype.isChainable = NO; |
| 2096 | Base.prototype.isAssignable = NO; |
| 2097 | Base.prototype.unwrap = THIS; |
| 2098 | Base.prototype.unfoldSoak = NO; |
| 2099 | Base.prototype.assigns = NO; |
| 2100 | return Base; |
| 2101 | })(); |
| 2102 | exports.Block = Block = (function() { |
| 2103 | __extends(Block, Base); |
| 2104 | function Block(nodes) { |
| 2105 | this.expressions = compact(flatten(nodes || [])); |
| 2106 | } |
| 2107 | Block.prototype.children = ['expressions']; |
| 2108 | Block.prototype.push = function(node) { |
| 2109 | this.expressions.push(node); |
| 2110 | return this; |
| 2111 | }; |
| 2112 | Block.prototype.pop = function() { |
| 2113 | return this.expressions.pop(); |
| 2114 | }; |
| 2115 | Block.prototype.unshift = function(node) { |
| 2116 | this.expressions.unshift(node); |
| 2117 | return this; |
| 2118 | }; |
| 2119 | Block.prototype.unwrap = function() { |
| 2120 | if (this.expressions.length === 1) { |
| 2121 | return this.expressions[0]; |
| 2122 | } else { |
| 2123 | return this; |
| 2124 | } |
| 2125 | }; |
| 2126 | Block.prototype.isEmpty = function() { |
| 2127 | return !this.expressions.length; |
| 2128 | }; |
| 2129 | Block.prototype.isStatement = function(o) { |
| 2130 | var exp, _i, _len, _ref2; |
| 2131 | _ref2 = this.expressions; |
| 2132 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2133 | exp = _ref2[_i]; |
| 2134 | if (exp.isStatement(o)) { |
| 2135 | return true; |
| 2136 | } |
| 2137 | } |
| 2138 | return false; |
| 2139 | }; |
| 2140 | Block.prototype.jumps = function(o) { |
| 2141 | var exp, _i, _len, _ref2; |
| 2142 | _ref2 = this.expressions; |
| 2143 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2144 | exp = _ref2[_i]; |
| 2145 | if (exp.jumps(o)) { |
| 2146 | return exp; |
| 2147 | } |
| 2148 | } |
| 2149 | }; |
| 2150 | Block.prototype.makeReturn = function() { |
| 2151 | var expr, len; |
| 2152 | len = this.expressions.length; |
| 2153 | while (len--) { |
| 2154 | expr = this.expressions[len]; |
| 2155 | if (!(expr instanceof Comment)) { |
| 2156 | this.expressions[len] = expr.makeReturn(); |
| 2157 | if (expr instanceof Return && !expr.expression) { |
| 2158 | this.expressions.splice(len, 1); |
| 2159 | } |
| 2160 | break; |
| 2161 | } |
| 2162 | } |
| 2163 | return this; |
| 2164 | }; |
| 2165 | Block.prototype.compile = function(o, level) { |
| 2166 | if (o == null) { |
| 2167 | o = {}; |
| 2168 | } |
| 2169 | if (o.scope) { |
| 2170 | return Block.__super__.compile.call(this, o, level); |
| 2171 | } else { |
| 2172 | return this.compileRoot(o); |
| 2173 | } |
| 2174 | }; |
| 2175 | Block.prototype.compileNode = function(o) { |
| 2176 | var code, codes, node, top, _i, _len, _ref2; |
| 2177 | this.tab = o.indent; |
| 2178 | top = o.level === LEVEL_TOP; |
| 2179 | codes = []; |
| 2180 | _ref2 = this.expressions; |
| 2181 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2182 | node = _ref2[_i]; |
| 2183 | node = node.unwrapAll(); |
| 2184 | node = node.unfoldSoak(o) || node; |
| 2185 | if (node instanceof Block) { |
| 2186 | codes.push(node.compileNode(o)); |
| 2187 | } else if (top) { |
| 2188 | node.front = true; |
| 2189 | code = node.compile(o); |
| 2190 | codes.push(node.isStatement(o) ? code : this.tab + code + ';'); |
| 2191 | } else { |
| 2192 | codes.push(node.compile(o, LEVEL_LIST)); |
| 2193 | } |
| 2194 | } |
| 2195 | if (top) { |
| 2196 | return codes.join('\n'); |
| 2197 | } |
| 2198 | code = codes.join(', ') || 'void 0'; |
| 2199 | if (codes.length > 1 && o.level >= LEVEL_LIST) { |
| 2200 | return "(" + code + ")"; |
| 2201 | } else { |
| 2202 | return code; |
| 2203 | } |
| 2204 | }; |
| 2205 | Block.prototype.compileRoot = function(o) { |
| 2206 | var code; |
| 2207 | o.indent = this.tab = o.bare ? '' : TAB; |
| 2208 | o.scope = new Scope(null, this, null); |
| 2209 | o.level = LEVEL_TOP; |
| 2210 | code = this.compileWithDeclarations(o); |
| 2211 | if (o.bare) { |
| 2212 | return code; |
| 2213 | } else { |
| 2214 | return "(function() {\n" + code + "\n}).call(this);\n"; |
| 2215 | } |
| 2216 | }; |
| 2217 | Block.prototype.compileWithDeclarations = function(o) { |
| 2218 | var assigns, code, declars, exp, i, post, rest, scope, _len, _ref2; |
| 2219 | code = post = ''; |
| 2220 | _ref2 = this.expressions; |
| 2221 | for (i = 0, _len = _ref2.length; i < _len; i++) { |
| 2222 | exp = _ref2[i]; |
| 2223 | exp = exp.unwrap(); |
| 2224 | if (!(exp instanceof Comment || exp instanceof Literal)) { |
| 2225 | break; |
| 2226 | } |
| 2227 | } |
| 2228 | o = merge(o, { |
| 2229 | level: LEVEL_TOP |
| 2230 | }); |
| 2231 | if (i) { |
| 2232 | rest = this.expressions.splice(i, this.expressions.length); |
| 2233 | code = this.compileNode(o); |
| 2234 | this.expressions = rest; |
| 2235 | } |
| 2236 | post = this.compileNode(o); |
| 2237 | scope = o.scope; |
| 2238 | if (scope.expressions === this) { |
| 2239 | declars = o.scope.hasDeclarations(); |
| 2240 | assigns = scope.hasAssignments; |
| 2241 | if ((declars || assigns) && i) { |
| 2242 | code += '\n'; |
| 2243 | } |
| 2244 | if (declars) { |
| 2245 | code += "" + this.tab + "var " + (scope.declaredVariables().join(', ')) + ";\n"; |
| 2246 | } |
| 2247 | if (assigns) { |
| 2248 | code += "" + this.tab + "var " + (multident(scope.assignedVariables().join(', '), this.tab)) + ";\n"; |
| 2249 | } |
| 2250 | } |
| 2251 | return code + post; |
| 2252 | }; |
| 2253 | Block.wrap = function(nodes) { |
| 2254 | if (nodes.length === 1 && nodes[0] instanceof Block) { |
| 2255 | return nodes[0]; |
| 2256 | } |
| 2257 | return new Block(nodes); |
| 2258 | }; |
| 2259 | return Block; |
| 2260 | })(); |
| 2261 | exports.Literal = Literal = (function() { |
| 2262 | __extends(Literal, Base); |
| 2263 | function Literal(value) { |
| 2264 | this.value = value; |
| 2265 | } |
| 2266 | Literal.prototype.makeReturn = function() { |
| 2267 | if (this.isStatement()) { |
| 2268 | return this; |
| 2269 | } else { |
| 2270 | return new Return(this); |
| 2271 | } |
| 2272 | }; |
| 2273 | Literal.prototype.isAssignable = function() { |
| 2274 | return IDENTIFIER.test(this.value); |
| 2275 | }; |
| 2276 | Literal.prototype.isStatement = function() { |
| 2277 | var _ref2; |
| 2278 | return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; |
| 2279 | }; |
| 2280 | Literal.prototype.isComplex = NO; |
| 2281 | Literal.prototype.assigns = function(name) { |
| 2282 | return name === this.value; |
| 2283 | }; |
| 2284 | Literal.prototype.jumps = function(o) { |
| 2285 | if (!this.isStatement()) { |
| 2286 | return false; |
| 2287 | } |
| 2288 | if (!(o && (o.loop || o.block && (this.value !== 'continue')))) { |
| 2289 | return this; |
| 2290 | } else { |
| 2291 | return false; |
| 2292 | } |
| 2293 | }; |
| 2294 | Literal.prototype.compileNode = function(o) { |
| 2295 | var code; |
| 2296 | code = this.isUndefined ? o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0' : this.value.reserved ? "\"" + this.value + "\"" : this.value; |
| 2297 | if (this.isStatement()) { |
| 2298 | return "" + this.tab + code + ";"; |
| 2299 | } else { |
| 2300 | return code; |
| 2301 | } |
| 2302 | }; |
| 2303 | Literal.prototype.toString = function() { |
| 2304 | return ' "' + this.value + '"'; |
| 2305 | }; |
| 2306 | return Literal; |
| 2307 | })(); |
| 2308 | exports.Return = Return = (function() { |
| 2309 | __extends(Return, Base); |
| 2310 | function Return(expr) { |
| 2311 | if (expr && !expr.unwrap().isUndefined) { |
| 2312 | this.expression = expr; |
| 2313 | } |
| 2314 | } |
| 2315 | Return.prototype.children = ['expression']; |
| 2316 | Return.prototype.isStatement = YES; |
| 2317 | Return.prototype.makeReturn = THIS; |
| 2318 | Return.prototype.jumps = THIS; |
| 2319 | Return.prototype.compile = function(o, level) { |
| 2320 | var expr, _ref2; |
| 2321 | expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0; |
| 2322 | if (expr && !(expr instanceof Return)) { |
| 2323 | return expr.compile(o, level); |
| 2324 | } else { |
| 2325 | return Return.__super__.compile.call(this, o, level); |
| 2326 | } |
| 2327 | }; |
| 2328 | Return.prototype.compileNode = function(o) { |
| 2329 | return this.tab + ("return" + (this.expression ? ' ' + this.expression.compile(o, LEVEL_PAREN) : '') + ";"); |
| 2330 | }; |
| 2331 | return Return; |
| 2332 | })(); |
| 2333 | exports.Value = Value = (function() { |
| 2334 | __extends(Value, Base); |
| 2335 | function Value(base, props, tag) { |
| 2336 | if (!props && base instanceof Value) { |
| 2337 | return base; |
| 2338 | } |
| 2339 | this.base = base; |
| 2340 | this.properties = props || []; |
| 2341 | if (tag) { |
| 2342 | this[tag] = true; |
| 2343 | } |
| 2344 | return this; |
| 2345 | } |
| 2346 | Value.prototype.children = ['base', 'properties']; |
| 2347 | Value.prototype.push = function(prop) { |
| 2348 | this.properties.push(prop); |
| 2349 | return this; |
| 2350 | }; |
| 2351 | Value.prototype.hasProperties = function() { |
| 2352 | return !!this.properties.length; |
| 2353 | }; |
| 2354 | Value.prototype.isArray = function() { |
| 2355 | return !this.properties.length && this.base instanceof Arr; |
| 2356 | }; |
| 2357 | Value.prototype.isComplex = function() { |
| 2358 | return this.hasProperties() || this.base.isComplex(); |
| 2359 | }; |
| 2360 | Value.prototype.isAssignable = function() { |
| 2361 | return this.hasProperties() || this.base.isAssignable(); |
| 2362 | }; |
| 2363 | Value.prototype.isSimpleNumber = function() { |
| 2364 | return this.base instanceof Literal && SIMPLENUM.test(this.base.value); |
| 2365 | }; |
| 2366 | Value.prototype.isAtomic = function() { |
| 2367 | var node, _i, _len, _ref2; |
| 2368 | _ref2 = this.properties.concat(this.base); |
| 2369 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2370 | node = _ref2[_i]; |
| 2371 | if (node.soak || node instanceof Call) { |
| 2372 | return false; |
| 2373 | } |
| 2374 | } |
| 2375 | return true; |
| 2376 | }; |
| 2377 | Value.prototype.isStatement = function(o) { |
| 2378 | return !this.properties.length && this.base.isStatement(o); |
| 2379 | }; |
| 2380 | Value.prototype.assigns = function(name) { |
| 2381 | return !this.properties.length && this.base.assigns(name); |
| 2382 | }; |
| 2383 | Value.prototype.jumps = function(o) { |
| 2384 | return !this.properties.length && this.base.jumps(o); |
| 2385 | }; |
| 2386 | Value.prototype.isObject = function(onlyGenerated) { |
| 2387 | if (this.properties.length) { |
| 2388 | return false; |
| 2389 | } |
| 2390 | return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); |
| 2391 | }; |
| 2392 | Value.prototype.isSplice = function() { |
| 2393 | return last(this.properties) instanceof Slice; |
| 2394 | }; |
| 2395 | Value.prototype.makeReturn = function() { |
| 2396 | if (this.properties.length) { |
| 2397 | return Value.__super__.makeReturn.call(this); |
| 2398 | } else { |
| 2399 | return this.base.makeReturn(); |
| 2400 | } |
| 2401 | }; |
| 2402 | Value.prototype.unwrap = function() { |
| 2403 | if (this.properties.length) { |
| 2404 | return this; |
| 2405 | } else { |
| 2406 | return this.base; |
| 2407 | } |
| 2408 | }; |
| 2409 | Value.prototype.cacheReference = function(o) { |
| 2410 | var base, bref, name, nref; |
| 2411 | name = last(this.properties); |
| 2412 | if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { |
| 2413 | return [this, this]; |
| 2414 | } |
| 2415 | base = new Value(this.base, this.properties.slice(0, -1)); |
| 2416 | if (base.isComplex()) { |
| 2417 | bref = new Literal(o.scope.freeVariable('base')); |
| 2418 | base = new Value(new Parens(new Assign(bref, base))); |
| 2419 | } |
| 2420 | if (!name) { |
| 2421 | return [base, bref]; |
| 2422 | } |
| 2423 | if (name.isComplex()) { |
| 2424 | nref = new Literal(o.scope.freeVariable('name')); |
| 2425 | name = new Index(new Assign(nref, name.index)); |
| 2426 | nref = new Index(nref); |
| 2427 | } |
| 2428 | return [base.push(name), new Value(bref || base.base, [nref || name])]; |
| 2429 | }; |
| 2430 | Value.prototype.compileNode = function(o) { |
| 2431 | var code, prop, props, _i, _len; |
| 2432 | this.base.front = this.front; |
| 2433 | props = this.properties; |
| 2434 | code = this.base.compile(o, props.length ? LEVEL_ACCESS : null); |
| 2435 | if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(code)) { |
| 2436 | code = "" + code + "."; |
| 2437 | } |
| 2438 | for (_i = 0, _len = props.length; _i < _len; _i++) { |
| 2439 | prop = props[_i]; |
| 2440 | code += prop.compile(o); |
| 2441 | } |
| 2442 | return code; |
| 2443 | }; |
| 2444 | Value.prototype.unfoldSoak = function(o) { |
| 2445 | var result; |
| 2446 | if (this.unfoldedSoak != null) { |
| 2447 | return this.unfoldedSoak; |
| 2448 | } |
| 2449 | result = __bind(function() { |
| 2450 | var fst, i, ifn, prop, ref, snd, _len, _ref2; |
| 2451 | if (ifn = this.base.unfoldSoak(o)) { |
| 2452 | Array.prototype.push.apply(ifn.body.properties, this.properties); |
| 2453 | return ifn; |
| 2454 | } |
| 2455 | _ref2 = this.properties; |
| 2456 | for (i = 0, _len = _ref2.length; i < _len; i++) { |
| 2457 | prop = _ref2[i]; |
| 2458 | if (prop.soak) { |
| 2459 | prop.soak = false; |
| 2460 | fst = new Value(this.base, this.properties.slice(0, i)); |
| 2461 | snd = new Value(this.base, this.properties.slice(i)); |
| 2462 | if (fst.isComplex()) { |
| 2463 | ref = new Literal(o.scope.freeVariable('ref')); |
| 2464 | fst = new Parens(new Assign(ref, fst)); |
| 2465 | snd.base = ref; |
| 2466 | } |
| 2467 | return new If(new Existence(fst), snd, { |
| 2468 | soak: true |
| 2469 | }); |
| 2470 | } |
| 2471 | } |
| 2472 | return null; |
| 2473 | }, this)(); |
| 2474 | return this.unfoldedSoak = result || false; |
| 2475 | }; |
| 2476 | return Value; |
| 2477 | })(); |
| 2478 | exports.Comment = Comment = (function() { |
| 2479 | __extends(Comment, Base); |
| 2480 | function Comment(comment) { |
| 2481 | this.comment = comment; |
| 2482 | } |
| 2483 | Comment.prototype.isStatement = YES; |
| 2484 | Comment.prototype.makeReturn = THIS; |
| 2485 | Comment.prototype.compileNode = function(o, level) { |
| 2486 | var code; |
| 2487 | code = '/*' + multident(this.comment, this.tab) + '*/'; |
| 2488 | if ((level || o.level) === LEVEL_TOP) { |
| 2489 | code = o.indent + code; |
| 2490 | } |
| 2491 | return code; |
| 2492 | }; |
| 2493 | return Comment; |
| 2494 | })(); |
| 2495 | exports.Call = Call = (function() { |
| 2496 | __extends(Call, Base); |
| 2497 | function Call(variable, args, soak) { |
| 2498 | this.args = args != null ? args : []; |
| 2499 | this.soak = soak; |
| 2500 | this.isNew = false; |
| 2501 | this.isSuper = variable === 'super'; |
| 2502 | this.variable = this.isSuper ? null : variable; |
| 2503 | } |
| 2504 | Call.prototype.children = ['variable', 'args']; |
| 2505 | Call.prototype.newInstance = function() { |
| 2506 | var base; |
| 2507 | base = this.variable.base || this.variable; |
| 2508 | if (base instanceof Call && !base.isNew) { |
| 2509 | base.newInstance(); |
| 2510 | } else { |
| 2511 | this.isNew = true; |
| 2512 | } |
| 2513 | return this; |
| 2514 | }; |
| 2515 | Call.prototype.superReference = function(o) { |
| 2516 | var method, name; |
| 2517 | method = o.scope.method; |
| 2518 | if (!method) { |
| 2519 | throw SyntaxError('cannot call super outside of a function.'); |
| 2520 | } |
| 2521 | name = method.name; |
| 2522 | if (name == null) { |
| 2523 | throw SyntaxError('cannot call super on an anonymous function.'); |
| 2524 | } |
| 2525 | if (method.klass) { |
| 2526 | return (new Value(new Literal(method.klass), [new Access(new Literal("__super__")), new Access(new Literal(name))])).compile(o); |
| 2527 | } else { |
| 2528 | return "" + name + ".__super__.constructor"; |
| 2529 | } |
| 2530 | }; |
| 2531 | Call.prototype.unfoldSoak = function(o) { |
| 2532 | var call, ifn, left, list, rite, _i, _len, _ref2, _ref3; |
| 2533 | if (this.soak) { |
| 2534 | if (this.variable) { |
| 2535 | if (ifn = unfoldSoak(o, this, 'variable')) { |
| 2536 | return ifn; |
| 2537 | } |
| 2538 | _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1]; |
| 2539 | } else { |
| 2540 | left = new Literal(this.superReference(o)); |
| 2541 | rite = new Value(left); |
| 2542 | } |
| 2543 | rite = new Call(rite, this.args); |
| 2544 | rite.isNew = this.isNew; |
| 2545 | left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); |
| 2546 | return new If(left, new Value(rite), { |
| 2547 | soak: true |
| 2548 | }); |
| 2549 | } |
| 2550 | call = this; |
| 2551 | list = []; |
| 2552 | while (true) { |
| 2553 | if (call.variable instanceof Call) { |
| 2554 | list.push(call); |
| 2555 | call = call.variable; |
| 2556 | continue; |
| 2557 | } |
| 2558 | if (!(call.variable instanceof Value)) { |
| 2559 | break; |
| 2560 | } |
| 2561 | list.push(call); |
| 2562 | if (!((call = call.variable.base) instanceof Call)) { |
| 2563 | break; |
| 2564 | } |
| 2565 | } |
| 2566 | _ref3 = list.reverse(); |
| 2567 | for (_i = 0, _len = _ref3.length; _i < _len; _i++) { |
| 2568 | call = _ref3[_i]; |
| 2569 | if (ifn) { |
| 2570 | if (call.variable instanceof Call) { |
| 2571 | call.variable = ifn; |
| 2572 | } else { |
| 2573 | call.variable.base = ifn; |
| 2574 | } |
| 2575 | } |
| 2576 | ifn = unfoldSoak(o, call, 'variable'); |
| 2577 | } |
| 2578 | return ifn; |
| 2579 | }; |
| 2580 | Call.prototype.filterImplicitObjects = function(list) { |
| 2581 | var node, nodes, obj, prop, properties, _i, _j, _len, _len2, _ref2; |
| 2582 | nodes = []; |
| 2583 | for (_i = 0, _len = list.length; _i < _len; _i++) { |
| 2584 | node = list[_i]; |
| 2585 | if (!((typeof node.isObject === "function" ? node.isObject() : void 0) && node.base.generated)) { |
| 2586 | nodes.push(node); |
| 2587 | continue; |
| 2588 | } |
| 2589 | obj = null; |
| 2590 | _ref2 = node.base.properties; |
| 2591 | for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { |
| 2592 | prop = _ref2[_j]; |
| 2593 | if (prop instanceof Assign || prop instanceof Comment) { |
| 2594 | if (!obj) { |
| 2595 | nodes.push(obj = new Obj(properties = [], true)); |
| 2596 | } |
| 2597 | properties.push(prop); |
| 2598 | } else { |
| 2599 | nodes.push(prop); |
| 2600 | obj = null; |
| 2601 | } |
| 2602 | } |
| 2603 | } |
| 2604 | return nodes; |
| 2605 | }; |
| 2606 | Call.prototype.compileNode = function(o) { |
| 2607 | var arg, args, code, _ref2; |
| 2608 | if ((_ref2 = this.variable) != null) { |
| 2609 | _ref2.front = this.front; |
| 2610 | } |
| 2611 | if (code = Splat.compileSplattedArray(o, this.args, true)) { |
| 2612 | return this.compileSplat(o, code); |
| 2613 | } |
| 2614 | args = this.filterImplicitObjects(this.args); |
| 2615 | args = ((function() { |
| 2616 | var _i, _len, _results; |
| 2617 | _results = []; |
| 2618 | for (_i = 0, _len = args.length; _i < _len; _i++) { |
| 2619 | arg = args[_i]; |
| 2620 | _results.push(arg.compile(o, LEVEL_LIST)); |
| 2621 | } |
| 2622 | return _results; |
| 2623 | })()).join(', '); |
| 2624 | if (this.isSuper) { |
| 2625 | return this.superReference(o) + (".call(this" + (args && ', ' + args) + ")"); |
| 2626 | } else { |
| 2627 | return (this.isNew ? 'new ' : '') + this.variable.compile(o, LEVEL_ACCESS) + ("(" + args + ")"); |
| 2628 | } |
| 2629 | }; |
| 2630 | Call.prototype.compileSuper = function(args, o) { |
| 2631 | return "" + (this.superReference(o)) + ".call(this" + (args.length ? ', ' : '') + args + ")"; |
| 2632 | }; |
| 2633 | Call.prototype.compileSplat = function(o, splatArgs) { |
| 2634 | var base, fun, idt, name, ref; |
| 2635 | if (this.isSuper) { |
| 2636 | return "" + (this.superReference(o)) + ".apply(this, " + splatArgs + ")"; |
| 2637 | } |
| 2638 | if (this.isNew) { |
| 2639 | idt = this.tab + TAB; |
| 2640 | return "(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return typeof result === \"object\" ? result : child;\n" + this.tab + "})(" + (this.variable.compile(o, LEVEL_LIST)) + ", " + splatArgs + ", function() {})"; |
| 2641 | } |
| 2642 | base = new Value(this.variable); |
| 2643 | if ((name = base.properties.pop()) && base.isComplex()) { |
| 2644 | ref = o.scope.freeVariable('ref'); |
| 2645 | fun = "(" + ref + " = " + (base.compile(o, LEVEL_LIST)) + ")" + (name.compile(o)); |
| 2646 | } else { |
| 2647 | fun = base.compile(o, LEVEL_ACCESS); |
| 2648 | if (SIMPLENUM.test(fun)) { |
| 2649 | fun = "(" + fun + ")"; |
| 2650 | } |
| 2651 | if (name) { |
| 2652 | ref = fun; |
| 2653 | fun += name.compile(o); |
| 2654 | } else { |
| 2655 | ref = 'null'; |
| 2656 | } |
| 2657 | } |
| 2658 | return "" + fun + ".apply(" + ref + ", " + splatArgs + ")"; |
| 2659 | }; |
| 2660 | return Call; |
| 2661 | })(); |
| 2662 | exports.Extends = Extends = (function() { |
| 2663 | __extends(Extends, Base); |
| 2664 | function Extends(child, parent) { |
| 2665 | this.child = child; |
| 2666 | this.parent = parent; |
| 2667 | } |
| 2668 | Extends.prototype.children = ['child', 'parent']; |
| 2669 | Extends.prototype.compile = function(o) { |
| 2670 | utility('hasProp'); |
| 2671 | return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compile(o); |
| 2672 | }; |
| 2673 | return Extends; |
| 2674 | })(); |
| 2675 | exports.Access = Access = (function() { |
| 2676 | __extends(Access, Base); |
| 2677 | function Access(name, tag) { |
| 2678 | this.name = name; |
| 2679 | this.name.asKey = true; |
| 2680 | this.proto = tag === 'proto' ? '.prototype' : ''; |
| 2681 | this.soak = tag === 'soak'; |
| 2682 | } |
| 2683 | Access.prototype.children = ['name']; |
| 2684 | Access.prototype.compile = function(o) { |
| 2685 | var name; |
| 2686 | name = this.name.compile(o); |
| 2687 | return this.proto + (IDENTIFIER.test(name) ? "." + name : "[" + name + "]"); |
| 2688 | }; |
| 2689 | Access.prototype.isComplex = NO; |
| 2690 | return Access; |
| 2691 | })(); |
| 2692 | exports.Index = Index = (function() { |
| 2693 | __extends(Index, Base); |
| 2694 | function Index(index) { |
| 2695 | this.index = index; |
| 2696 | } |
| 2697 | Index.prototype.children = ['index']; |
| 2698 | Index.prototype.compile = function(o) { |
| 2699 | return (this.proto ? '.prototype' : '') + ("[" + (this.index.compile(o, LEVEL_PAREN)) + "]"); |
| 2700 | }; |
| 2701 | Index.prototype.isComplex = function() { |
| 2702 | return this.index.isComplex(); |
| 2703 | }; |
| 2704 | return Index; |
| 2705 | })(); |
| 2706 | exports.Range = Range = (function() { |
| 2707 | __extends(Range, Base); |
| 2708 | Range.prototype.children = ['from', 'to']; |
| 2709 | function Range(from, to, tag) { |
| 2710 | this.from = from; |
| 2711 | this.to = to; |
| 2712 | this.exclusive = tag === 'exclusive'; |
| 2713 | this.equals = this.exclusive ? '' : '='; |
| 2714 | } |
| 2715 | Range.prototype.compileVariables = function(o) { |
| 2716 | var step, _ref2, _ref3, _ref4, _ref5; |
| 2717 | o = merge(o, { |
| 2718 | top: true |
| 2719 | }); |
| 2720 | _ref2 = this.from.cache(o, LEVEL_LIST), this.fromC = _ref2[0], this.fromVar = _ref2[1]; |
| 2721 | _ref3 = this.to.cache(o, LEVEL_LIST), this.toC = _ref3[0], this.toVar = _ref3[1]; |
| 2722 | if (step = del(o, 'step')) { |
| 2723 | _ref4 = step.cache(o, LEVEL_LIST), this.step = _ref4[0], this.stepVar = _ref4[1]; |
| 2724 | } |
| 2725 | _ref5 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref5[0], this.toNum = _ref5[1]; |
| 2726 | if (this.stepVar) { |
| 2727 | return this.stepNum = this.stepVar.match(SIMPLENUM); |
| 2728 | } |
| 2729 | }; |
| 2730 | Range.prototype.compileNode = function(o) { |
| 2731 | var cond, condPart, from, gt, idx, known, lt, stepPart, to, varPart, _ref2, _ref3; |
| 2732 | if (!this.fromVar) { |
| 2733 | this.compileVariables(o); |
| 2734 | } |
| 2735 | if (!o.index) { |
| 2736 | return this.compileArray(o); |
| 2737 | } |
| 2738 | known = this.fromNum && this.toNum; |
| 2739 | idx = del(o, 'index'); |
| 2740 | varPart = "" + idx + " = " + this.fromC; |
| 2741 | if (this.toC !== this.toVar) { |
| 2742 | varPart += ", " + this.toC; |
| 2743 | } |
| 2744 | if (this.step !== this.stepVar) { |
| 2745 | varPart += ", " + this.step; |
| 2746 | } |
| 2747 | _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1]; |
| 2748 | condPart = this.stepNum ? condPart = +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [+this.fromNum, +this.toNum], from = _ref3[0], to = _ref3[1], _ref3), condPart = from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = "" + this.fromVar + " <= " + this.toVar, condPart = "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); |
| 2749 | stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? from <= to ? "" + idx + "++" : "" + idx + "--" : "" + cond + " ? " + idx + "++ : " + idx + "--"; |
| 2750 | return "" + varPart + "; " + condPart + "; " + stepPart; |
| 2751 | }; |
| 2752 | Range.prototype.compileArray = function(o) { |
| 2753 | var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results; |
| 2754 | if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { |
| 2755 | range = (function() { |
| 2756 | _results = []; |
| 2757 | for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); } |
| 2758 | return _results; |
| 2759 | }).apply(this); |
| 2760 | if (this.exclusive) { |
| 2761 | range.pop(); |
| 2762 | } |
| 2763 | return "[" + (range.join(', ')) + "]"; |
| 2764 | } |
| 2765 | idt = this.tab + TAB; |
| 2766 | i = o.scope.freeVariable('i'); |
| 2767 | result = o.scope.freeVariable('results'); |
| 2768 | pre = "\n" + idt + result + " = [];"; |
| 2769 | if (this.fromNum && this.toNum) { |
| 2770 | o.index = i; |
| 2771 | body = this.compileNode(o); |
| 2772 | } else { |
| 2773 | vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); |
| 2774 | cond = "" + this.fromVar + " <= " + this.toVar; |
| 2775 | body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; |
| 2776 | } |
| 2777 | post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; |
| 2778 | hasArgs = function(node) { |
| 2779 | return node != null ? node.contains(function(n) { |
| 2780 | return n instanceof Literal && n.value === 'arguments' && !n.asKey; |
| 2781 | }) : void 0; |
| 2782 | }; |
| 2783 | if (hasArgs(this.from) || hasArgs(this.to)) { |
| 2784 | args = ', arguments'; |
| 2785 | } |
| 2786 | return "(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")"; |
| 2787 | }; |
| 2788 | return Range; |
| 2789 | })(); |
| 2790 | exports.Slice = Slice = (function() { |
| 2791 | __extends(Slice, Base); |
| 2792 | Slice.prototype.children = ['range']; |
| 2793 | function Slice(range) { |
| 2794 | this.range = range; |
| 2795 | Slice.__super__.constructor.call(this); |
| 2796 | } |
| 2797 | Slice.prototype.compileNode = function(o) { |
| 2798 | var compiled, from, fromStr, to, toStr, _ref2; |
| 2799 | _ref2 = this.range, to = _ref2.to, from = _ref2.from; |
| 2800 | fromStr = from && from.compile(o, LEVEL_PAREN) || '0'; |
| 2801 | compiled = to && to.compile(o, LEVEL_PAREN); |
| 2802 | if (to && !(!this.range.exclusive && +compiled === -1)) { |
| 2803 | toStr = ', ' + (this.range.exclusive ? compiled : SIMPLENUM.test(compiled) ? (+compiled + 1).toString() : "(" + compiled + " + 1) || 9e9"); |
| 2804 | } |
| 2805 | return ".slice(" + fromStr + (toStr || '') + ")"; |
| 2806 | }; |
| 2807 | return Slice; |
| 2808 | })(); |
| 2809 | exports.Obj = Obj = (function() { |
| 2810 | __extends(Obj, Base); |
| 2811 | function Obj(props, generated) { |
| 2812 | this.generated = generated != null ? generated : false; |
| 2813 | this.objects = this.properties = props || []; |
| 2814 | } |
| 2815 | Obj.prototype.children = ['properties']; |
| 2816 | Obj.prototype.compileNode = function(o) { |
| 2817 | var i, idt, indent, join, lastNoncom, node, obj, prop, props, _i, _len; |
| 2818 | props = this.properties; |
| 2819 | if (!props.length) { |
| 2820 | if (this.front) { |
| 2821 | return '({})'; |
| 2822 | } else { |
| 2823 | return '{}'; |
| 2824 | } |
| 2825 | } |
| 2826 | if (this.generated) { |
| 2827 | for (_i = 0, _len = props.length; _i < _len; _i++) { |
| 2828 | node = props[_i]; |
| 2829 | if (node instanceof Value) { |
| 2830 | throw new Error('cannot have an implicit value in an implicit object'); |
| 2831 | } |
| 2832 | } |
| 2833 | } |
| 2834 | idt = o.indent += TAB; |
| 2835 | lastNoncom = this.lastNonComment(this.properties); |
| 2836 | props = (function() { |
| 2837 | var _len2, _results; |
| 2838 | _results = []; |
| 2839 | for (i = 0, _len2 = props.length; i < _len2; i++) { |
| 2840 | prop = props[i]; |
| 2841 | join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; |
| 2842 | indent = prop instanceof Comment ? '' : idt; |
| 2843 | if (prop instanceof Value && prop["this"]) { |
| 2844 | prop = new Assign(prop.properties[0].name, prop, 'object'); |
| 2845 | } |
| 2846 | if (!(prop instanceof Comment)) { |
| 2847 | if (!(prop instanceof Assign)) { |
| 2848 | prop = new Assign(prop, prop, 'object'); |
| 2849 | } |
| 2850 | (prop.variable.base || prop.variable).asKey = true; |
| 2851 | } |
| 2852 | _results.push(indent + prop.compile(o, LEVEL_TOP) + join); |
| 2853 | } |
| 2854 | return _results; |
| 2855 | })(); |
| 2856 | props = props.join(''); |
| 2857 | obj = "{" + (props && '\n' + props + '\n' + this.tab) + "}"; |
| 2858 | if (this.front) { |
| 2859 | return "(" + obj + ")"; |
| 2860 | } else { |
| 2861 | return obj; |
| 2862 | } |
| 2863 | }; |
| 2864 | Obj.prototype.assigns = function(name) { |
| 2865 | var prop, _i, _len, _ref2; |
| 2866 | _ref2 = this.properties; |
| 2867 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2868 | prop = _ref2[_i]; |
| 2869 | if (prop.assigns(name)) { |
| 2870 | return true; |
| 2871 | } |
| 2872 | } |
| 2873 | return false; |
| 2874 | }; |
| 2875 | return Obj; |
| 2876 | })(); |
| 2877 | exports.Arr = Arr = (function() { |
| 2878 | __extends(Arr, Base); |
| 2879 | function Arr(objs) { |
| 2880 | this.objects = objs || []; |
| 2881 | } |
| 2882 | Arr.prototype.children = ['objects']; |
| 2883 | Arr.prototype.filterImplicitObjects = Call.prototype.filterImplicitObjects; |
| 2884 | Arr.prototype.compileNode = function(o) { |
| 2885 | var code, obj, objs; |
| 2886 | if (!this.objects.length) { |
| 2887 | return '[]'; |
| 2888 | } |
| 2889 | o.indent += TAB; |
| 2890 | objs = this.filterImplicitObjects(this.objects); |
| 2891 | if (code = Splat.compileSplattedArray(o, objs)) { |
| 2892 | return code; |
| 2893 | } |
| 2894 | code = ((function() { |
| 2895 | var _i, _len, _results; |
| 2896 | _results = []; |
| 2897 | for (_i = 0, _len = objs.length; _i < _len; _i++) { |
| 2898 | obj = objs[_i]; |
| 2899 | _results.push(obj.compile(o, LEVEL_LIST)); |
| 2900 | } |
| 2901 | return _results; |
| 2902 | })()).join(', '); |
| 2903 | if (code.indexOf('\n') >= 0) { |
| 2904 | return "[\n" + o.indent + code + "\n" + this.tab + "]"; |
| 2905 | } else { |
| 2906 | return "[" + code + "]"; |
| 2907 | } |
| 2908 | }; |
| 2909 | Arr.prototype.assigns = function(name) { |
| 2910 | var obj, _i, _len, _ref2; |
| 2911 | _ref2 = this.objects; |
| 2912 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2913 | obj = _ref2[_i]; |
| 2914 | if (obj.assigns(name)) { |
| 2915 | return true; |
| 2916 | } |
| 2917 | } |
| 2918 | return false; |
| 2919 | }; |
| 2920 | return Arr; |
| 2921 | })(); |
| 2922 | exports.Class = Class = (function() { |
| 2923 | __extends(Class, Base); |
| 2924 | function Class(variable, parent, body) { |
| 2925 | this.variable = variable; |
| 2926 | this.parent = parent; |
| 2927 | this.body = body != null ? body : new Block; |
| 2928 | this.boundFuncs = []; |
| 2929 | this.body.classBody = true; |
| 2930 | } |
| 2931 | Class.prototype.children = ['variable', 'parent', 'body']; |
| 2932 | Class.prototype.determineName = function() { |
| 2933 | var decl, tail; |
| 2934 | if (!this.variable) { |
| 2935 | return null; |
| 2936 | } |
| 2937 | decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; |
| 2938 | return decl && (decl = IDENTIFIER.test(decl) && decl); |
| 2939 | }; |
| 2940 | Class.prototype.setContext = function(name) { |
| 2941 | return this.body.traverseChildren(false, function(node) { |
| 2942 | if (node.classBody) { |
| 2943 | return false; |
| 2944 | } |
| 2945 | if (node instanceof Literal && node.value === 'this') { |
| 2946 | return node.value = name; |
| 2947 | } else if (node instanceof Code) { |
| 2948 | node.klass = name; |
| 2949 | if (node.bound) { |
| 2950 | return node.context = name; |
| 2951 | } |
| 2952 | } |
| 2953 | }); |
| 2954 | }; |
| 2955 | Class.prototype.addBoundFunctions = function(o) { |
| 2956 | var bvar, lhs, _i, _len, _ref2, _results; |
| 2957 | if (this.boundFuncs.length) { |
| 2958 | _ref2 = this.boundFuncs; |
| 2959 | _results = []; |
| 2960 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 2961 | bvar = _ref2[_i]; |
| 2962 | lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); |
| 2963 | _results.push(this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"))); |
| 2964 | } |
| 2965 | return _results; |
| 2966 | } |
| 2967 | }; |
| 2968 | Class.prototype.addProperties = function(node, name, o) { |
| 2969 | var assign, base, exprs, func, props; |
| 2970 | props = node.base.properties.slice(0); |
| 2971 | exprs = (function() { |
| 2972 | var _results; |
| 2973 | _results = []; |
| 2974 | while (assign = props.shift()) { |
| 2975 | if (assign instanceof Assign) { |
| 2976 | base = assign.variable.base; |
| 2977 | delete assign.context; |
| 2978 | func = assign.value; |
| 2979 | if (base.value === 'constructor') { |
| 2980 | if (this.ctor) { |
| 2981 | throw new Error('cannot define more than one constructor in a class'); |
| 2982 | } |
| 2983 | if (func.bound) { |
| 2984 | throw new Error('cannot define a constructor as a bound function'); |
| 2985 | } |
| 2986 | if (func instanceof Code) { |
| 2987 | assign = this.ctor = func; |
| 2988 | } else { |
| 2989 | this.externalCtor = o.scope.freeVariable('class'); |
| 2990 | assign = new Assign(new Literal(this.externalCtor), func); |
| 2991 | } |
| 2992 | } else { |
| 2993 | if (!assign.variable["this"]) { |
| 2994 | assign.variable = new Value(new Literal(name), [new Access(base, 'proto')]); |
| 2995 | } |
| 2996 | if (func instanceof Code && func.bound) { |
| 2997 | this.boundFuncs.push(base); |
| 2998 | func.bound = false; |
| 2999 | } |
| 3000 | } |
| 3001 | } |
| 3002 | _results.push(assign); |
| 3003 | } |
| 3004 | return _results; |
| 3005 | }).call(this); |
| 3006 | return compact(exprs); |
| 3007 | }; |
| 3008 | Class.prototype.walkBody = function(name, o) { |
| 3009 | return this.traverseChildren(false, __bind(function(child) { |
| 3010 | var exps, i, node, _len, _ref2; |
| 3011 | if (child instanceof Class) { |
| 3012 | return false; |
| 3013 | } |
| 3014 | if (child instanceof Block) { |
| 3015 | _ref2 = exps = child.expressions; |
| 3016 | for (i = 0, _len = _ref2.length; i < _len; i++) { |
| 3017 | node = _ref2[i]; |
| 3018 | if (node instanceof Value && node.isObject(true)) { |
| 3019 | exps[i] = this.addProperties(node, name, o); |
| 3020 | } |
| 3021 | } |
| 3022 | return child.expressions = exps = flatten(exps); |
| 3023 | } |
| 3024 | }, this)); |
| 3025 | }; |
| 3026 | Class.prototype.ensureConstructor = function(name) { |
| 3027 | if (!this.ctor) { |
| 3028 | this.ctor = new Code; |
| 3029 | if (this.parent) { |
| 3030 | this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)")); |
| 3031 | } |
| 3032 | if (this.externalCtor) { |
| 3033 | this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)")); |
| 3034 | } |
| 3035 | this.body.expressions.unshift(this.ctor); |
| 3036 | } |
| 3037 | this.ctor.ctor = this.ctor.name = name; |
| 3038 | this.ctor.klass = null; |
| 3039 | return this.ctor.noReturn = true; |
| 3040 | }; |
| 3041 | Class.prototype.compileNode = function(o) { |
| 3042 | var decl, klass, lname, name; |
| 3043 | decl = this.determineName(); |
| 3044 | name = decl || this.name || '_Class'; |
| 3045 | lname = new Literal(name); |
| 3046 | this.setContext(name); |
| 3047 | this.walkBody(name, o); |
| 3048 | this.ensureConstructor(name); |
| 3049 | if (this.parent) { |
| 3050 | this.body.expressions.unshift(new Extends(lname, this.parent)); |
| 3051 | } |
| 3052 | if (!(this.ctor instanceof Code)) { |
| 3053 | this.body.expressions.unshift(this.ctor); |
| 3054 | } |
| 3055 | this.body.expressions.push(lname); |
| 3056 | this.addBoundFunctions(o); |
| 3057 | klass = new Parens(Closure.wrap(this.body), true); |
| 3058 | if (this.variable) { |
| 3059 | klass = new Assign(this.variable, klass); |
| 3060 | } |
| 3061 | return klass.compile(o); |
| 3062 | }; |
| 3063 | return Class; |
| 3064 | })(); |
| 3065 | exports.Assign = Assign = (function() { |
| 3066 | __extends(Assign, Base); |
| 3067 | function Assign(variable, value, context, options) { |
| 3068 | this.variable = variable; |
| 3069 | this.value = value; |
| 3070 | this.context = context; |
| 3071 | this.param = options && options.param; |
| 3072 | } |
| 3073 | Assign.prototype.children = ['variable', 'value']; |
| 3074 | Assign.prototype.isStatement = function(o) { |
| 3075 | return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; |
| 3076 | }; |
| 3077 | Assign.prototype.assigns = function(name) { |
| 3078 | return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); |
| 3079 | }; |
| 3080 | Assign.prototype.unfoldSoak = function(o) { |
| 3081 | return unfoldSoak(o, this, 'variable'); |
| 3082 | }; |
| 3083 | Assign.prototype.compileNode = function(o) { |
| 3084 | var isValue, match, name, val, _ref2, _ref3, _ref4, _ref5; |
| 3085 | if (isValue = this.variable instanceof Value) { |
| 3086 | if (this.variable.isArray() || this.variable.isObject()) { |
| 3087 | return this.compilePatternMatch(o); |
| 3088 | } |
| 3089 | if (this.variable.isSplice()) { |
| 3090 | return this.compileSplice(o); |
| 3091 | } |
| 3092 | if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') { |
| 3093 | return this.compileConditional(o); |
| 3094 | } |
| 3095 | } |
| 3096 | name = this.variable.compile(o, LEVEL_LIST); |
| 3097 | if (!(this.context || this.variable.isAssignable())) { |
| 3098 | throw SyntaxError("\"" + (this.variable.compile(o)) + "\" cannot be assigned."); |
| 3099 | } |
| 3100 | if (!(this.context || isValue && (this.variable.namespaced || this.variable.hasProperties()))) { |
| 3101 | if (this.param) { |
| 3102 | o.scope.add(name, 'var'); |
| 3103 | } else { |
| 3104 | o.scope.find(name); |
| 3105 | } |
| 3106 | } |
| 3107 | if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { |
| 3108 | if (match[1]) { |
| 3109 | this.value.klass = match[1]; |
| 3110 | } |
| 3111 | this.value.name = (_ref3 = (_ref4 = (_ref5 = match[2]) != null ? _ref5 : match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5]; |
| 3112 | } |
| 3113 | val = this.value.compile(o, LEVEL_LIST); |
| 3114 | if (this.context === 'object') { |
| 3115 | return "" + name + ": " + val; |
| 3116 | } |
| 3117 | val = name + (" " + (this.context || '=') + " ") + val; |
| 3118 | if (o.level <= LEVEL_LIST) { |
| 3119 | return val; |
| 3120 | } else { |
| 3121 | return "(" + val + ")"; |
| 3122 | } |
| 3123 | }; |
| 3124 | Assign.prototype.compilePatternMatch = function(o) { |
| 3125 | var acc, assigns, code, i, idx, isObject, ivar, obj, objects, olen, ref, rest, splat, top, val, value, vvar, _len, _ref2, _ref3, _ref4, _ref5; |
| 3126 | top = o.level === LEVEL_TOP; |
| 3127 | value = this.value; |
| 3128 | objects = this.variable.base.objects; |
| 3129 | if (!(olen = objects.length)) { |
| 3130 | code = value.compile(o); |
| 3131 | if (o.level >= LEVEL_OP) { |
| 3132 | return "(" + code + ")"; |
| 3133 | } else { |
| 3134 | return code; |
| 3135 | } |
| 3136 | } |
| 3137 | isObject = this.variable.isObject(); |
| 3138 | if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { |
| 3139 | if (obj instanceof Assign) { |
| 3140 | _ref2 = obj, idx = _ref2.variable.base, obj = _ref2.value; |
| 3141 | } else { |
| 3142 | if (obj.base instanceof Parens) { |
| 3143 | _ref3 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref3[0], idx = _ref3[1]; |
| 3144 | } else { |
| 3145 | idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); |
| 3146 | } |
| 3147 | } |
| 3148 | acc = IDENTIFIER.test(idx.unwrap().value || 0); |
| 3149 | value = new Value(value); |
| 3150 | value.properties.push(new (acc ? Access : Index)(idx)); |
| 3151 | return new Assign(obj, value, null, { |
| 3152 | param: this.param |
| 3153 | }).compile(o, LEVEL_TOP); |
| 3154 | } |
| 3155 | vvar = value.compile(o, LEVEL_LIST); |
| 3156 | assigns = []; |
| 3157 | splat = false; |
| 3158 | if (!IDENTIFIER.test(vvar) || this.variable.assigns(vvar)) { |
| 3159 | assigns.push("" + (ref = o.scope.freeVariable('ref')) + " = " + vvar); |
| 3160 | vvar = ref; |
| 3161 | } |
| 3162 | for (i = 0, _len = objects.length; i < _len; i++) { |
| 3163 | obj = objects[i]; |
| 3164 | idx = i; |
| 3165 | if (isObject) { |
| 3166 | if (obj instanceof Assign) { |
| 3167 | _ref4 = obj, idx = _ref4.variable.base, obj = _ref4.value; |
| 3168 | } else { |
| 3169 | if (obj.base instanceof Parens) { |
| 3170 | _ref5 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref5[0], idx = _ref5[1]; |
| 3171 | } else { |
| 3172 | idx = obj["this"] ? obj.properties[0].name : obj; |
| 3173 | } |
| 3174 | } |
| 3175 | } |
| 3176 | if (!splat && obj instanceof Splat) { |
| 3177 | val = "" + olen + " <= " + vvar + ".length ? " + (utility('slice')) + ".call(" + vvar + ", " + i; |
| 3178 | if (rest = olen - i - 1) { |
| 3179 | ivar = o.scope.freeVariable('i'); |
| 3180 | val += ", " + ivar + " = " + vvar + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; |
| 3181 | } else { |
| 3182 | val += ") : []"; |
| 3183 | } |
| 3184 | val = new Literal(val); |
| 3185 | splat = "" + ivar + "++"; |
| 3186 | } else { |
| 3187 | if (obj instanceof Splat) { |
| 3188 | obj = obj.name.compile(o); |
| 3189 | throw SyntaxError("multiple splats are disallowed in an assignment: " + obj + " ..."); |
| 3190 | } |
| 3191 | if (typeof idx === 'number') { |
| 3192 | idx = new Literal(splat || idx); |
| 3193 | acc = false; |
| 3194 | } else { |
| 3195 | acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); |
| 3196 | } |
| 3197 | val = new Value(new Literal(vvar), [new (acc ? Access : Index)(idx)]); |
| 3198 | } |
| 3199 | assigns.push(new Assign(obj, val, null, { |
| 3200 | param: this.param |
| 3201 | }).compile(o, LEVEL_TOP)); |
| 3202 | } |
| 3203 | if (!top) { |
| 3204 | assigns.push(vvar); |
| 3205 | } |
| 3206 | code = assigns.join(', '); |
| 3207 | if (o.level < LEVEL_LIST) { |
| 3208 | return code; |
| 3209 | } else { |
| 3210 | return "(" + code + ")"; |
| 3211 | } |
| 3212 | }; |
| 3213 | Assign.prototype.compileConditional = function(o) { |
| 3214 | var left, rite, _ref2; |
| 3215 | _ref2 = this.variable.cacheReference(o), left = _ref2[0], rite = _ref2[1]; |
| 3216 | if (__indexOf.call(this.context, "?") >= 0) { |
| 3217 | o.isExistentialEquals = true; |
| 3218 | } |
| 3219 | return new Op(this.context.slice(0, -1), left, new Assign(rite, this.value, '=')).compile(o); |
| 3220 | }; |
| 3221 | Assign.prototype.compileSplice = function(o) { |
| 3222 | var code, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4; |
| 3223 | _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive; |
| 3224 | name = this.variable.compile(o); |
| 3225 | _ref3 = (from != null ? from.cache(o, LEVEL_OP) : void 0) || ['0', '0'], fromDecl = _ref3[0], fromRef = _ref3[1]; |
| 3226 | if (to) { |
| 3227 | if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) { |
| 3228 | to = +to.compile(o) - +fromRef; |
| 3229 | if (!exclusive) { |
| 3230 | to += 1; |
| 3231 | } |
| 3232 | } else { |
| 3233 | to = to.compile(o) + ' - ' + fromRef; |
| 3234 | if (!exclusive) { |
| 3235 | to += ' + 1'; |
| 3236 | } |
| 3237 | } |
| 3238 | } else { |
| 3239 | to = "9e9"; |
| 3240 | } |
| 3241 | _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1]; |
| 3242 | code = "[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat(" + valDef + ")), " + valRef; |
| 3243 | if (o.level > LEVEL_TOP) { |
| 3244 | return "(" + code + ")"; |
| 3245 | } else { |
| 3246 | return code; |
| 3247 | } |
| 3248 | }; |
| 3249 | return Assign; |
| 3250 | })(); |
| 3251 | exports.Code = Code = (function() { |
| 3252 | __extends(Code, Base); |
| 3253 | function Code(params, body, tag) { |
| 3254 | this.params = params || []; |
| 3255 | this.body = body || new Block; |
| 3256 | this.bound = tag === 'boundfunc'; |
| 3257 | if (this.bound) { |
| 3258 | this.context = 'this'; |
| 3259 | } |
| 3260 | } |
| 3261 | Code.prototype.children = ['params', 'body']; |
| 3262 | Code.prototype.isStatement = function() { |
| 3263 | return !!this.ctor; |
| 3264 | }; |
| 3265 | Code.prototype.jumps = NO; |
| 3266 | Code.prototype.compileNode = function(o) { |
| 3267 | var code, exprs, i, idt, lit, p, param, ref, splats, v, val, vars, wasEmpty, _i, _j, _k, _len, _len2, _len3, _len4, _ref2, _ref3, _ref4, _ref5; |
| 3268 | o.scope = new Scope(o.scope, this.body, this); |
| 3269 | o.scope.shared = del(o, 'sharedScope'); |
| 3270 | o.indent += TAB; |
| 3271 | delete o.bare; |
| 3272 | vars = []; |
| 3273 | exprs = []; |
| 3274 | _ref2 = this.params; |
| 3275 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 3276 | param = _ref2[_i]; |
| 3277 | if (param.splat) { |
| 3278 | _ref3 = this.params; |
| 3279 | for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { |
| 3280 | p = _ref3[_j]; |
| 3281 | if (p.name.value) { |
| 3282 | o.scope.add(p.name.value, 'var', true); |
| 3283 | } |
| 3284 | } |
| 3285 | splats = new Assign(new Value(new Arr((function() { |
| 3286 | var _k, _len3, _ref4, _results; |
| 3287 | _ref4 = this.params; |
| 3288 | _results = []; |
| 3289 | for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { |
| 3290 | p = _ref4[_k]; |
| 3291 | _results.push(p.asReference(o)); |
| 3292 | } |
| 3293 | return _results; |
| 3294 | }).call(this))), new Value(new Literal('arguments'))); |
| 3295 | break; |
| 3296 | } |
| 3297 | } |
| 3298 | _ref4 = this.params; |
| 3299 | for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { |
| 3300 | param = _ref4[_k]; |
| 3301 | if (param.isComplex()) { |
| 3302 | val = ref = param.asReference(o); |
| 3303 | if (param.value) { |
| 3304 | val = new Op('?', ref, param.value); |
| 3305 | } |
| 3306 | exprs.push(new Assign(new Value(param.name), val, '=', { |
| 3307 | param: true |
| 3308 | })); |
| 3309 | } else { |
| 3310 | ref = param; |
| 3311 | if (param.value) { |
| 3312 | lit = new Literal(ref.name.value + ' == null'); |
| 3313 | val = new Assign(new Value(param.name), param.value, '='); |
| 3314 | exprs.push(new If(lit, val)); |
| 3315 | } |
| 3316 | } |
| 3317 | if (!splats) { |
| 3318 | vars.push(ref); |
| 3319 | } |
| 3320 | } |
| 3321 | wasEmpty = this.body.isEmpty(); |
| 3322 | if (splats) { |
| 3323 | exprs.unshift(splats); |
| 3324 | } |
| 3325 | if (exprs.length) { |
| 3326 | (_ref5 = this.body.expressions).unshift.apply(_ref5, exprs); |
| 3327 | } |
| 3328 | if (!splats) { |
| 3329 | for (i = 0, _len4 = vars.length; i < _len4; i++) { |
| 3330 | v = vars[i]; |
| 3331 | o.scope.parameter(vars[i] = v.compile(o)); |
| 3332 | } |
| 3333 | } |
| 3334 | if (!(wasEmpty || this.noReturn)) { |
| 3335 | this.body.makeReturn(); |
| 3336 | } |
| 3337 | idt = o.indent; |
| 3338 | code = 'function'; |
| 3339 | if (this.ctor) { |
| 3340 | code += ' ' + this.name; |
| 3341 | } |
| 3342 | code += '(' + vars.join(', ') + ') {'; |
| 3343 | if (!this.body.isEmpty()) { |
| 3344 | code += "\n" + (this.body.compileWithDeclarations(o)) + "\n" + this.tab; |
| 3345 | } |
| 3346 | code += '}'; |
| 3347 | if (this.ctor) { |
| 3348 | return this.tab + code; |
| 3349 | } |
| 3350 | if (this.bound) { |
| 3351 | return utility('bind') + ("(" + code + ", " + this.context + ")"); |
| 3352 | } |
| 3353 | if (this.front || (o.level >= LEVEL_ACCESS)) { |
| 3354 | return "(" + code + ")"; |
| 3355 | } else { |
| 3356 | return code; |
| 3357 | } |
| 3358 | }; |
| 3359 | Code.prototype.traverseChildren = function(crossScope, func) { |
| 3360 | if (crossScope) { |
| 3361 | return Code.__super__.traverseChildren.call(this, crossScope, func); |
| 3362 | } |
| 3363 | }; |
| 3364 | return Code; |
| 3365 | })(); |
| 3366 | exports.Param = Param = (function() { |
| 3367 | __extends(Param, Base); |
| 3368 | function Param(name, value, splat) { |
| 3369 | this.name = name; |
| 3370 | this.value = value; |
| 3371 | this.splat = splat; |
| 3372 | } |
| 3373 | Param.prototype.children = ['name', 'value']; |
| 3374 | Param.prototype.compile = function(o) { |
| 3375 | return this.name.compile(o, LEVEL_LIST); |
| 3376 | }; |
| 3377 | Param.prototype.asReference = function(o) { |
| 3378 | var node; |
| 3379 | if (this.reference) { |
| 3380 | return this.reference; |
| 3381 | } |
| 3382 | node = this.name; |
| 3383 | if (node["this"]) { |
| 3384 | node = node.properties[0].name; |
| 3385 | if (node.value.reserved) { |
| 3386 | node = new Literal('_' + node.value); |
| 3387 | } |
| 3388 | } else if (node.isComplex()) { |
| 3389 | node = new Literal(o.scope.freeVariable('arg')); |
| 3390 | } |
| 3391 | node = new Value(node); |
| 3392 | if (this.splat) { |
| 3393 | node = new Splat(node); |
| 3394 | } |
| 3395 | return this.reference = node; |
| 3396 | }; |
| 3397 | Param.prototype.isComplex = function() { |
| 3398 | return this.name.isComplex(); |
| 3399 | }; |
| 3400 | return Param; |
| 3401 | })(); |
| 3402 | exports.Splat = Splat = (function() { |
| 3403 | __extends(Splat, Base); |
| 3404 | Splat.prototype.children = ['name']; |
| 3405 | Splat.prototype.isAssignable = YES; |
| 3406 | function Splat(name) { |
| 3407 | this.name = name.compile ? name : new Literal(name); |
| 3408 | } |
| 3409 | Splat.prototype.assigns = function(name) { |
| 3410 | return this.name.assigns(name); |
| 3411 | }; |
| 3412 | Splat.prototype.compile = function(o) { |
| 3413 | if (this.index != null) { |
| 3414 | return this.compileParam(o); |
| 3415 | } else { |
| 3416 | return this.name.compile(o); |
| 3417 | } |
| 3418 | }; |
| 3419 | Splat.compileSplattedArray = function(o, list, apply) { |
| 3420 | var args, base, code, i, index, node, _len; |
| 3421 | index = -1; |
| 3422 | while ((node = list[++index]) && !(node instanceof Splat)) { |
| 3423 | continue; |
| 3424 | } |
| 3425 | if (index >= list.length) { |
| 3426 | return ''; |
| 3427 | } |
| 3428 | if (list.length === 1) { |
| 3429 | code = list[0].compile(o, LEVEL_LIST); |
| 3430 | if (apply) { |
| 3431 | return code; |
| 3432 | } |
| 3433 | return "" + (utility('slice')) + ".call(" + code + ")"; |
| 3434 | } |
| 3435 | args = list.slice(index); |
| 3436 | for (i = 0, _len = args.length; i < _len; i++) { |
| 3437 | node = args[i]; |
| 3438 | code = node.compile(o, LEVEL_LIST); |
| 3439 | args[i] = node instanceof Splat ? "" + (utility('slice')) + ".call(" + code + ")" : "[" + code + "]"; |
| 3440 | } |
| 3441 | if (index === 0) { |
| 3442 | return args[0] + (".concat(" + (args.slice(1).join(', ')) + ")"); |
| 3443 | } |
| 3444 | base = (function() { |
| 3445 | var _i, _len2, _ref2, _results; |
| 3446 | _ref2 = list.slice(0, index); |
| 3447 | _results = []; |
| 3448 | for (_i = 0, _len2 = _ref2.length; _i < _len2; _i++) { |
| 3449 | node = _ref2[_i]; |
| 3450 | _results.push(node.compile(o, LEVEL_LIST)); |
| 3451 | } |
| 3452 | return _results; |
| 3453 | })(); |
| 3454 | return "[" + (base.join(', ')) + "].concat(" + (args.join(', ')) + ")"; |
| 3455 | }; |
| 3456 | return Splat; |
| 3457 | })(); |
| 3458 | exports.While = While = (function() { |
| 3459 | __extends(While, Base); |
| 3460 | function While(condition, options) { |
| 3461 | this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; |
| 3462 | this.guard = options != null ? options.guard : void 0; |
| 3463 | } |
| 3464 | While.prototype.children = ['condition', 'guard', 'body']; |
| 3465 | While.prototype.isStatement = YES; |
| 3466 | While.prototype.makeReturn = function() { |
| 3467 | this.returns = true; |
| 3468 | return this; |
| 3469 | }; |
| 3470 | While.prototype.addBody = function(body) { |
| 3471 | this.body = body; |
| 3472 | return this; |
| 3473 | }; |
| 3474 | While.prototype.jumps = function() { |
| 3475 | var expressions, node, _i, _len; |
| 3476 | expressions = this.body.expressions; |
| 3477 | if (!expressions.length) { |
| 3478 | return false; |
| 3479 | } |
| 3480 | for (_i = 0, _len = expressions.length; _i < _len; _i++) { |
| 3481 | node = expressions[_i]; |
| 3482 | if (node.jumps({ |
| 3483 | loop: true |
| 3484 | })) { |
| 3485 | return node; |
| 3486 | } |
| 3487 | } |
| 3488 | return false; |
| 3489 | }; |
| 3490 | While.prototype.compileNode = function(o) { |
| 3491 | var body, code, rvar, set; |
| 3492 | o.indent += TAB; |
| 3493 | set = ''; |
| 3494 | body = this.body; |
| 3495 | if (body.isEmpty()) { |
| 3496 | body = ''; |
| 3497 | } else { |
| 3498 | if (o.level > LEVEL_TOP || this.returns) { |
| 3499 | rvar = o.scope.freeVariable('results'); |
| 3500 | set = "" + this.tab + rvar + " = [];\n"; |
| 3501 | if (body) { |
| 3502 | body = Push.wrap(rvar, body); |
| 3503 | } |
| 3504 | } |
| 3505 | if (this.guard) { |
| 3506 | body = Block.wrap([new If(this.guard, body)]); |
| 3507 | } |
| 3508 | body = "\n" + (body.compile(o, LEVEL_TOP)) + "\n" + this.tab; |
| 3509 | } |
| 3510 | code = set + this.tab + ("while (" + (this.condition.compile(o, LEVEL_PAREN)) + ") {" + body + "}"); |
| 3511 | if (this.returns) { |
| 3512 | code += "\n" + this.tab + "return " + rvar + ";"; |
| 3513 | } |
| 3514 | return code; |
| 3515 | }; |
| 3516 | return While; |
| 3517 | })(); |
| 3518 | exports.Op = Op = (function() { |
| 3519 | var CONVERSIONS, INVERSIONS; |
| 3520 | __extends(Op, Base); |
| 3521 | function Op(op, first, second, flip) { |
| 3522 | var call; |
| 3523 | if (op === 'in') { |
| 3524 | return new In(first, second); |
| 3525 | } |
| 3526 | if (op === 'do') { |
| 3527 | call = new Call(first, first.params || []); |
| 3528 | call["do"] = true; |
| 3529 | return call; |
| 3530 | } |
| 3531 | if (op === 'new') { |
| 3532 | if (first instanceof Call && !first["do"] && !first.isNew) { |
| 3533 | return first.newInstance(); |
| 3534 | } |
| 3535 | if (first instanceof Code && first.bound || first["do"]) { |
| 3536 | first = new Parens(first); |
| 3537 | } |
| 3538 | } |
| 3539 | this.operator = CONVERSIONS[op] || op; |
| 3540 | this.first = first; |
| 3541 | this.second = second; |
| 3542 | this.flip = !!flip; |
| 3543 | return this; |
| 3544 | } |
| 3545 | CONVERSIONS = { |
| 3546 | '==': '===', |
| 3547 | '!=': '!==', |
| 3548 | 'of': 'in' |
| 3549 | }; |
| 3550 | INVERSIONS = { |
| 3551 | '!==': '===', |
| 3552 | '===': '!==' |
| 3553 | }; |
| 3554 | Op.prototype.children = ['first', 'second']; |
| 3555 | Op.prototype.isSimpleNumber = NO; |
| 3556 | Op.prototype.isUnary = function() { |
| 3557 | return !this.second; |
| 3558 | }; |
| 3559 | Op.prototype.isComplex = function() { |
| 3560 | var _ref2; |
| 3561 | return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex(); |
| 3562 | }; |
| 3563 | Op.prototype.isChainable = function() { |
| 3564 | var _ref2; |
| 3565 | return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!=='; |
| 3566 | }; |
| 3567 | Op.prototype.invert = function() { |
| 3568 | var allInvertable, curr, fst, op, _ref2; |
| 3569 | if (this.isChainable() && this.first.isChainable()) { |
| 3570 | allInvertable = true; |
| 3571 | curr = this; |
| 3572 | while (curr && curr.operator) { |
| 3573 | allInvertable && (allInvertable = curr.operator in INVERSIONS); |
| 3574 | curr = curr.first; |
| 3575 | } |
| 3576 | if (!allInvertable) { |
| 3577 | return new Parens(this).invert(); |
| 3578 | } |
| 3579 | curr = this; |
| 3580 | while (curr && curr.operator) { |
| 3581 | curr.invert = !curr.invert; |
| 3582 | curr.operator = INVERSIONS[curr.operator]; |
| 3583 | curr = curr.first; |
| 3584 | } |
| 3585 | return this; |
| 3586 | } else if (op = INVERSIONS[this.operator]) { |
| 3587 | this.operator = op; |
| 3588 | if (this.first.unwrap() instanceof Op) { |
| 3589 | this.first.invert(); |
| 3590 | } |
| 3591 | return this; |
| 3592 | } else if (this.second) { |
| 3593 | return new Parens(this).invert(); |
| 3594 | } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) { |
| 3595 | return fst; |
| 3596 | } else { |
| 3597 | return new Op('!', this); |
| 3598 | } |
| 3599 | }; |
| 3600 | Op.prototype.unfoldSoak = function(o) { |
| 3601 | var _ref2; |
| 3602 | return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first'); |
| 3603 | }; |
| 3604 | Op.prototype.compileNode = function(o) { |
| 3605 | var code; |
| 3606 | if (this.isUnary()) { |
| 3607 | return this.compileUnary(o); |
| 3608 | } |
| 3609 | if (this.isChainable() && this.first.isChainable()) { |
| 3610 | return this.compileChain(o); |
| 3611 | } |
| 3612 | if (this.operator === '?') { |
| 3613 | return this.compileExistence(o); |
| 3614 | } |
| 3615 | this.first.front = this.front; |
| 3616 | code = this.first.compile(o, LEVEL_OP) + ' ' + this.operator + ' ' + this.second.compile(o, LEVEL_OP); |
| 3617 | if (o.level <= LEVEL_OP) { |
| 3618 | return code; |
| 3619 | } else { |
| 3620 | return "(" + code + ")"; |
| 3621 | } |
| 3622 | }; |
| 3623 | Op.prototype.compileChain = function(o) { |
| 3624 | var code, fst, shared, _ref2; |
| 3625 | _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1]; |
| 3626 | fst = this.first.compile(o, LEVEL_OP); |
| 3627 | code = "" + fst + " " + (this.invert ? '&&' : '||') + " " + (shared.compile(o)) + " " + this.operator + " " + (this.second.compile(o, LEVEL_OP)); |
| 3628 | return "(" + code + ")"; |
| 3629 | }; |
| 3630 | Op.prototype.compileExistence = function(o) { |
| 3631 | var fst, ref; |
| 3632 | if (this.first.isComplex()) { |
| 3633 | ref = new Literal(o.scope.freeVariable('ref')); |
| 3634 | fst = new Parens(new Assign(ref, this.first)); |
| 3635 | } else { |
| 3636 | fst = this.first; |
| 3637 | ref = fst; |
| 3638 | } |
| 3639 | return new If(new Existence(fst), ref, { |
| 3640 | type: 'if' |
| 3641 | }).addElse(this.second).compile(o); |
| 3642 | }; |
| 3643 | Op.prototype.compileUnary = function(o) { |
| 3644 | var op, parts; |
| 3645 | parts = [op = this.operator]; |
| 3646 | if ((op === 'new' || op === 'typeof' || op === 'delete') || (op === '+' || op === '-') && this.first instanceof Op && this.first.operator === op) { |
| 3647 | parts.push(' '); |
| 3648 | } |
| 3649 | if (op === 'new' && this.first.isStatement(o)) { |
| 3650 | this.first = new Parens(this.first); |
| 3651 | } |
| 3652 | parts.push(this.first.compile(o, LEVEL_OP)); |
| 3653 | if (this.flip) { |
| 3654 | parts.reverse(); |
| 3655 | } |
| 3656 | return parts.join(''); |
| 3657 | }; |
| 3658 | Op.prototype.toString = function(idt) { |
| 3659 | return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); |
| 3660 | }; |
| 3661 | return Op; |
| 3662 | })(); |
| 3663 | exports.In = In = (function() { |
| 3664 | __extends(In, Base); |
| 3665 | function In(object, array) { |
| 3666 | this.object = object; |
| 3667 | this.array = array; |
| 3668 | } |
| 3669 | In.prototype.children = ['object', 'array']; |
| 3670 | In.prototype.invert = NEGATE; |
| 3671 | In.prototype.compileNode = function(o) { |
| 3672 | var hasSplat, obj, _i, _len, _ref2; |
| 3673 | if (this.array instanceof Value && this.array.isArray()) { |
| 3674 | _ref2 = this.array.base.objects; |
| 3675 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 3676 | obj = _ref2[_i]; |
| 3677 | if (obj instanceof Splat) { |
| 3678 | hasSplat = true; |
| 3679 | break; |
| 3680 | } |
| 3681 | } |
| 3682 | if (!hasSplat) { |
| 3683 | return this.compileOrTest(o); |
| 3684 | } |
| 3685 | } |
| 3686 | return this.compileLoopTest(o); |
| 3687 | }; |
| 3688 | In.prototype.compileOrTest = function(o) { |
| 3689 | var cmp, cnj, i, item, ref, sub, tests, _ref2, _ref3; |
| 3690 | _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1]; |
| 3691 | _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1]; |
| 3692 | tests = (function() { |
| 3693 | var _len, _ref4, _results; |
| 3694 | _ref4 = this.array.base.objects; |
| 3695 | _results = []; |
| 3696 | for (i = 0, _len = _ref4.length; i < _len; i++) { |
| 3697 | item = _ref4[i]; |
| 3698 | _results.push((i ? ref : sub) + cmp + item.compile(o, LEVEL_OP)); |
| 3699 | } |
| 3700 | return _results; |
| 3701 | }).call(this); |
| 3702 | if (tests.length === 0) { |
| 3703 | return 'false'; |
| 3704 | } |
| 3705 | tests = tests.join(cnj); |
| 3706 | if (o.level < LEVEL_OP) { |
| 3707 | return tests; |
| 3708 | } else { |
| 3709 | return "(" + tests + ")"; |
| 3710 | } |
| 3711 | }; |
| 3712 | In.prototype.compileLoopTest = function(o) { |
| 3713 | var code, ref, sub, _ref2; |
| 3714 | _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1]; |
| 3715 | code = utility('indexOf') + (".call(" + (this.array.compile(o, LEVEL_LIST)) + ", " + ref + ") ") + (this.negated ? '< 0' : '>= 0'); |
| 3716 | if (sub === ref) { |
| 3717 | return code; |
| 3718 | } |
| 3719 | code = sub + ', ' + code; |
| 3720 | if (o.level < LEVEL_LIST) { |
| 3721 | return code; |
| 3722 | } else { |
| 3723 | return "(" + code + ")"; |
| 3724 | } |
| 3725 | }; |
| 3726 | In.prototype.toString = function(idt) { |
| 3727 | return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); |
| 3728 | }; |
| 3729 | return In; |
| 3730 | })(); |
| 3731 | exports.Try = Try = (function() { |
| 3732 | __extends(Try, Base); |
| 3733 | function Try(attempt, error, recovery, ensure) { |
| 3734 | this.attempt = attempt; |
| 3735 | this.error = error; |
| 3736 | this.recovery = recovery; |
| 3737 | this.ensure = ensure; |
| 3738 | } |
| 3739 | Try.prototype.children = ['attempt', 'recovery', 'ensure']; |
| 3740 | Try.prototype.isStatement = YES; |
| 3741 | Try.prototype.jumps = function(o) { |
| 3742 | var _ref2; |
| 3743 | return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0); |
| 3744 | }; |
| 3745 | Try.prototype.makeReturn = function() { |
| 3746 | if (this.attempt) { |
| 3747 | this.attempt = this.attempt.makeReturn(); |
| 3748 | } |
| 3749 | if (this.recovery) { |
| 3750 | this.recovery = this.recovery.makeReturn(); |
| 3751 | } |
| 3752 | return this; |
| 3753 | }; |
| 3754 | Try.prototype.compileNode = function(o) { |
| 3755 | var catchPart, errorPart; |
| 3756 | o.indent += TAB; |
| 3757 | errorPart = this.error ? " (" + (this.error.compile(o)) + ") " : ' '; |
| 3758 | catchPart = this.recovery ? (o.scope.add(this.error.value, 'param'), " catch" + errorPart + "{\n" + (this.recovery.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}") : !(this.ensure || this.recovery) ? ' catch (_e) {}' : void 0; |
| 3759 | return ("" + this.tab + "try {\n" + (this.attempt.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" + (catchPart || '')) + (this.ensure ? " finally {\n" + (this.ensure.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" : ''); |
| 3760 | }; |
| 3761 | return Try; |
| 3762 | })(); |
| 3763 | exports.Throw = Throw = (function() { |
| 3764 | __extends(Throw, Base); |
| 3765 | function Throw(expression) { |
| 3766 | this.expression = expression; |
| 3767 | } |
| 3768 | Throw.prototype.children = ['expression']; |
| 3769 | Throw.prototype.isStatement = YES; |
| 3770 | Throw.prototype.jumps = NO; |
| 3771 | Throw.prototype.makeReturn = THIS; |
| 3772 | Throw.prototype.compileNode = function(o) { |
| 3773 | return this.tab + ("throw " + (this.expression.compile(o)) + ";"); |
| 3774 | }; |
| 3775 | return Throw; |
| 3776 | })(); |
| 3777 | exports.Existence = Existence = (function() { |
| 3778 | __extends(Existence, Base); |
| 3779 | function Existence(expression) { |
| 3780 | this.expression = expression; |
| 3781 | } |
| 3782 | Existence.prototype.children = ['expression']; |
| 3783 | Existence.prototype.invert = NEGATE; |
| 3784 | Existence.prototype.compileNode = function(o) { |
| 3785 | var cmp, cnj, code, _ref2; |
| 3786 | code = this.expression.compile(o, LEVEL_OP); |
| 3787 | code = IDENTIFIER.test(code) && !o.scope.check(code) ? ((_ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1], _ref2), "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null") : "" + code + " " + (this.negated ? '==' : '!=') + " null"; |
| 3788 | if (o.level <= LEVEL_COND) { |
| 3789 | return code; |
| 3790 | } else { |
| 3791 | return "(" + code + ")"; |
| 3792 | } |
| 3793 | }; |
| 3794 | return Existence; |
| 3795 | })(); |
| 3796 | exports.Parens = Parens = (function() { |
| 3797 | __extends(Parens, Base); |
| 3798 | function Parens(body) { |
| 3799 | this.body = body; |
| 3800 | } |
| 3801 | Parens.prototype.children = ['body']; |
| 3802 | Parens.prototype.unwrap = function() { |
| 3803 | return this.body; |
| 3804 | }; |
| 3805 | Parens.prototype.isComplex = function() { |
| 3806 | return this.body.isComplex(); |
| 3807 | }; |
| 3808 | Parens.prototype.makeReturn = function() { |
| 3809 | return this.body.makeReturn(); |
| 3810 | }; |
| 3811 | Parens.prototype.compileNode = function(o) { |
| 3812 | var bare, code, expr; |
| 3813 | expr = this.body.unwrap(); |
| 3814 | if (expr instanceof Value && expr.isAtomic()) { |
| 3815 | expr.front = this.front; |
| 3816 | return expr.compile(o); |
| 3817 | } |
| 3818 | code = expr.compile(o, LEVEL_PAREN); |
| 3819 | bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); |
| 3820 | if (bare) { |
| 3821 | return code; |
| 3822 | } else { |
| 3823 | return "(" + code + ")"; |
| 3824 | } |
| 3825 | }; |
| 3826 | return Parens; |
| 3827 | })(); |
| 3828 | exports.For = For = (function() { |
| 3829 | __extends(For, Base); |
| 3830 | function For(body, source) { |
| 3831 | var _ref2; |
| 3832 | this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; |
| 3833 | this.body = Block.wrap([body]); |
| 3834 | this.own = !!source.own; |
| 3835 | this.object = !!source.object; |
| 3836 | if (this.object) { |
| 3837 | _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1]; |
| 3838 | } |
| 3839 | if (this.index instanceof Value) { |
| 3840 | throw SyntaxError('index cannot be a pattern matching expression'); |
| 3841 | } |
| 3842 | this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; |
| 3843 | this.pattern = this.name instanceof Value; |
| 3844 | if (this.range && this.index) { |
| 3845 | throw SyntaxError('indexes do not apply to range loops'); |
| 3846 | } |
| 3847 | if (this.range && this.pattern) { |
| 3848 | throw SyntaxError('cannot pattern match over range loops'); |
| 3849 | } |
| 3850 | this.returns = false; |
| 3851 | } |
| 3852 | For.prototype.children = ['body', 'source', 'guard', 'step']; |
| 3853 | For.prototype.isStatement = YES; |
| 3854 | For.prototype.jumps = While.prototype.jumps; |
| 3855 | For.prototype.makeReturn = function() { |
| 3856 | this.returns = true; |
| 3857 | return this; |
| 3858 | }; |
| 3859 | For.prototype.compileNode = function(o) { |
| 3860 | var body, defPart, forPart, forVarPart, guardPart, idt1, index, ivar, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, stepPart, stepvar, svar, varPart, _ref2; |
| 3861 | body = Block.wrap([this.body]); |
| 3862 | lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0; |
| 3863 | if (lastJumps && lastJumps instanceof Return) { |
| 3864 | this.returns = false; |
| 3865 | } |
| 3866 | source = this.range ? this.source.base : this.source; |
| 3867 | scope = o.scope; |
| 3868 | name = this.name && this.name.compile(o, LEVEL_LIST); |
| 3869 | index = this.index && this.index.compile(o, LEVEL_LIST); |
| 3870 | if (name && !this.pattern) { |
| 3871 | scope.find(name, { |
| 3872 | immediate: true |
| 3873 | }); |
| 3874 | } |
| 3875 | if (index) { |
| 3876 | scope.find(index, { |
| 3877 | immediate: true |
| 3878 | }); |
| 3879 | } |
| 3880 | if (this.returns) { |
| 3881 | rvar = scope.freeVariable('results'); |
| 3882 | } |
| 3883 | ivar = (this.range ? name : index) || scope.freeVariable('i'); |
| 3884 | if (this.step && !this.range) { |
| 3885 | stepvar = scope.freeVariable("step"); |
| 3886 | } |
| 3887 | if (this.pattern) { |
| 3888 | name = ivar; |
| 3889 | } |
| 3890 | varPart = ''; |
| 3891 | guardPart = ''; |
| 3892 | defPart = ''; |
| 3893 | idt1 = this.tab + TAB; |
| 3894 | if (this.range) { |
| 3895 | forPart = source.compile(merge(o, { |
| 3896 | index: ivar, |
| 3897 | step: this.step |
| 3898 | })); |
| 3899 | } else { |
| 3900 | svar = this.source.compile(o, LEVEL_LIST); |
| 3901 | if ((name || this.own) && !IDENTIFIER.test(svar)) { |
| 3902 | defPart = "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; |
| 3903 | svar = ref; |
| 3904 | } |
| 3905 | if (name && !this.pattern) { |
| 3906 | namePart = "" + name + " = " + svar + "[" + ivar + "]"; |
| 3907 | } |
| 3908 | if (!this.object) { |
| 3909 | lvar = scope.freeVariable('len'); |
| 3910 | forVarPart = ("" + ivar + " = 0, " + lvar + " = " + svar + ".length") + (this.step ? ", " + stepvar + " = " + (this.step.compile(o, LEVEL_OP)) : ''); |
| 3911 | stepPart = this.step ? "" + ivar + " += " + stepvar : "" + ivar + "++"; |
| 3912 | forPart = "" + forVarPart + "; " + ivar + " < " + lvar + "; " + stepPart; |
| 3913 | } |
| 3914 | } |
| 3915 | if (this.returns) { |
| 3916 | resultPart = "" + this.tab + rvar + " = [];\n"; |
| 3917 | returnResult = "\n" + this.tab + "return " + rvar + ";"; |
| 3918 | body = Push.wrap(rvar, body); |
| 3919 | } |
| 3920 | if (this.guard) { |
| 3921 | body = Block.wrap([new If(this.guard, body)]); |
| 3922 | } |
| 3923 | if (this.pattern) { |
| 3924 | body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + ivar + "]"))); |
| 3925 | } |
| 3926 | defPart += this.pluckDirectCall(o, body); |
| 3927 | if (namePart) { |
| 3928 | varPart = "\n" + idt1 + namePart + ";"; |
| 3929 | } |
| 3930 | if (this.object) { |
| 3931 | forPart = "" + ivar + " in " + svar; |
| 3932 | if (this.own) { |
| 3933 | guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + ivar + ")) continue;"; |
| 3934 | } |
| 3935 | } |
| 3936 | body = body.compile(merge(o, { |
| 3937 | indent: idt1 |
| 3938 | }), LEVEL_TOP); |
| 3939 | if (body) { |
| 3940 | body = '\n' + body + '\n'; |
| 3941 | } |
| 3942 | return "" + defPart + (resultPart || '') + this.tab + "for (" + forPart + ") {" + guardPart + varPart + body + this.tab + "}" + (returnResult || ''); |
| 3943 | }; |
| 3944 | For.prototype.pluckDirectCall = function(o, body) { |
| 3945 | var base, defs, expr, fn, idx, ref, val, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; |
| 3946 | defs = ''; |
| 3947 | _ref2 = body.expressions; |
| 3948 | for (idx = 0, _len = _ref2.length; idx < _len; idx++) { |
| 3949 | expr = _ref2[idx]; |
| 3950 | expr = expr.unwrapAll(); |
| 3951 | if (!(expr instanceof Call)) { |
| 3952 | continue; |
| 3953 | } |
| 3954 | val = expr.variable.unwrapAll(); |
| 3955 | if (!((val instanceof Code) || (val instanceof Value && ((_ref3 = val.base) != null ? _ref3.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref4 = (_ref5 = val.properties[0].name) != null ? _ref5.value : void 0) === 'call' || _ref4 === 'apply')))) { |
| 3956 | continue; |
| 3957 | } |
| 3958 | fn = ((_ref6 = val.base) != null ? _ref6.unwrapAll() : void 0) || val; |
| 3959 | ref = new Literal(o.scope.freeVariable('fn')); |
| 3960 | base = new Value(ref); |
| 3961 | if (val.base) { |
| 3962 | _ref7 = [base, val], val.base = _ref7[0], base = _ref7[1]; |
| 3963 | } |
| 3964 | body.expressions[idx] = new Call(base, expr.args); |
| 3965 | defs += this.tab + new Assign(ref, fn).compile(o, LEVEL_TOP) + ';\n'; |
| 3966 | } |
| 3967 | return defs; |
| 3968 | }; |
| 3969 | return For; |
| 3970 | })(); |
| 3971 | exports.Switch = Switch = (function() { |
| 3972 | __extends(Switch, Base); |
| 3973 | function Switch(subject, cases, otherwise) { |
| 3974 | this.subject = subject; |
| 3975 | this.cases = cases; |
| 3976 | this.otherwise = otherwise; |
| 3977 | } |
| 3978 | Switch.prototype.children = ['subject', 'cases', 'otherwise']; |
| 3979 | Switch.prototype.isStatement = YES; |
| 3980 | Switch.prototype.jumps = function(o) { |
| 3981 | var block, conds, _i, _len, _ref2, _ref3, _ref4; |
| 3982 | if (o == null) { |
| 3983 | o = { |
| 3984 | block: true |
| 3985 | }; |
| 3986 | } |
| 3987 | _ref2 = this.cases; |
| 3988 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 3989 | _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1]; |
| 3990 | if (block.jumps(o)) { |
| 3991 | return block; |
| 3992 | } |
| 3993 | } |
| 3994 | return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0; |
| 3995 | }; |
| 3996 | Switch.prototype.makeReturn = function() { |
| 3997 | var pair, _i, _len, _ref2, _ref3; |
| 3998 | _ref2 = this.cases; |
| 3999 | for (_i = 0, _len = _ref2.length; _i < _len; _i++) { |
| 4000 | pair = _ref2[_i]; |
| 4001 | pair[1].makeReturn(); |
| 4002 | } |
| 4003 | if ((_ref3 = this.otherwise) != null) { |
| 4004 | _ref3.makeReturn(); |
| 4005 | } |
| 4006 | return this; |
| 4007 | }; |
| 4008 | Switch.prototype.compileNode = function(o) { |
| 4009 | var block, body, code, cond, conditions, expr, i, idt1, idt2, _i, _len, _len2, _ref2, _ref3, _ref4, _ref5; |
| 4010 | idt1 = o.indent + TAB; |
| 4011 | idt2 = o.indent = idt1 + TAB; |
| 4012 | code = this.tab + ("switch (" + (((_ref2 = this.subject) != null ? _ref2.compile(o, LEVEL_PAREN) : void 0) || false) + ") {\n"); |
| 4013 | _ref3 = this.cases; |
| 4014 | for (i = 0, _len = _ref3.length; i < _len; i++) { |
| 4015 | _ref4 = _ref3[i], conditions = _ref4[0], block = _ref4[1]; |
| 4016 | _ref5 = flatten([conditions]); |
| 4017 | for (_i = 0, _len2 = _ref5.length; _i < _len2; _i++) { |
| 4018 | cond = _ref5[_i]; |
| 4019 | if (!this.subject) { |
| 4020 | cond = cond.invert(); |
| 4021 | } |
| 4022 | code += idt1 + ("case " + (cond.compile(o, LEVEL_PAREN)) + ":\n"); |
| 4023 | } |
| 4024 | if (body = block.compile(o, LEVEL_TOP)) { |
| 4025 | code += body + '\n'; |
| 4026 | } |
| 4027 | if (i === this.cases.length - 1 && !this.otherwise) { |
| 4028 | break; |
| 4029 | } |
| 4030 | expr = this.lastNonComment(block.expressions); |
| 4031 | if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { |
| 4032 | continue; |
| 4033 | } |
| 4034 | code += idt2 + 'break;\n'; |
| 4035 | } |
| 4036 | if (this.otherwise && this.otherwise.expressions.length) { |
| 4037 | code += idt1 + ("default:\n" + (this.otherwise.compile(o, LEVEL_TOP)) + "\n"); |
| 4038 | } |
| 4039 | return code + this.tab + '}'; |
| 4040 | }; |
| 4041 | return Switch; |
| 4042 | })(); |
| 4043 | exports.If = If = (function() { |
| 4044 | __extends(If, Base); |
| 4045 | function If(condition, body, options) { |
| 4046 | this.body = body; |
| 4047 | if (options == null) { |
| 4048 | options = {}; |
| 4049 | } |
| 4050 | this.condition = options.type === 'unless' ? condition.invert() : condition; |
| 4051 | this.elseBody = null; |
| 4052 | this.isChain = false; |
| 4053 | this.soak = options.soak; |
| 4054 | } |
| 4055 | If.prototype.children = ['condition', 'body', 'elseBody']; |
| 4056 | If.prototype.bodyNode = function() { |
| 4057 | var _ref2; |
| 4058 | return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0; |
| 4059 | }; |
| 4060 | If.prototype.elseBodyNode = function() { |
| 4061 | var _ref2; |
| 4062 | return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0; |
| 4063 | }; |
| 4064 | If.prototype.addElse = function(elseBody) { |
| 4065 | if (this.isChain) { |
| 4066 | this.elseBodyNode().addElse(elseBody); |
| 4067 | } else { |
| 4068 | this.isChain = elseBody instanceof If; |
| 4069 | this.elseBody = this.ensureBlock(elseBody); |
| 4070 | } |
| 4071 | return this; |
| 4072 | }; |
| 4073 | If.prototype.isStatement = function(o) { |
| 4074 | var _ref2; |
| 4075 | return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0); |
| 4076 | }; |
| 4077 | If.prototype.jumps = function(o) { |
| 4078 | var _ref2; |
| 4079 | return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0); |
| 4080 | }; |
| 4081 | If.prototype.compileNode = function(o) { |
| 4082 | if (this.isStatement(o)) { |
| 4083 | return this.compileStatement(o); |
| 4084 | } else { |
| 4085 | return this.compileExpression(o); |
| 4086 | } |
| 4087 | }; |
| 4088 | If.prototype.makeReturn = function() { |
| 4089 | this.body && (this.body = new Block([this.body.makeReturn()])); |
| 4090 | this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn()])); |
| 4091 | return this; |
| 4092 | }; |
| 4093 | If.prototype.ensureBlock = function(node) { |
| 4094 | if (node instanceof Block) { |
| 4095 | return node; |
| 4096 | } else { |
| 4097 | return new Block([node]); |
| 4098 | } |
| 4099 | }; |
| 4100 | If.prototype.compileStatement = function(o) { |
| 4101 | var body, child, cond, exeq, ifPart; |
| 4102 | child = del(o, 'chainChild'); |
| 4103 | exeq = del(o, 'isExistentialEquals'); |
| 4104 | if (exeq) { |
| 4105 | return new If(this.condition.invert(), this.elseBodyNode(), { |
| 4106 | type: 'if' |
| 4107 | }).compile(o); |
| 4108 | } |
| 4109 | cond = this.condition.compile(o, LEVEL_PAREN); |
| 4110 | o.indent += TAB; |
| 4111 | body = this.ensureBlock(this.body).compile(o); |
| 4112 | if (body) { |
| 4113 | body = "\n" + body + "\n" + this.tab; |
| 4114 | } |
| 4115 | ifPart = "if (" + cond + ") {" + body + "}"; |
| 4116 | if (!child) { |
| 4117 | ifPart = this.tab + ifPart; |
| 4118 | } |
| 4119 | if (!this.elseBody) { |
| 4120 | return ifPart; |
| 4121 | } |
| 4122 | return ifPart + ' else ' + (this.isChain ? (o.indent = this.tab, o.chainChild = true, this.elseBody.unwrap().compile(o, LEVEL_TOP)) : "{\n" + (this.elseBody.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}"); |
| 4123 | }; |
| 4124 | If.prototype.compileExpression = function(o) { |
| 4125 | var alt, body, code, cond; |
| 4126 | cond = this.condition.compile(o, LEVEL_COND); |
| 4127 | body = this.bodyNode().compile(o, LEVEL_LIST); |
| 4128 | alt = this.elseBodyNode() ? this.elseBodyNode().compile(o, LEVEL_LIST) : 'void 0'; |
| 4129 | code = "" + cond + " ? " + body + " : " + alt; |
| 4130 | if (o.level >= LEVEL_COND) { |
| 4131 | return "(" + code + ")"; |
| 4132 | } else { |
| 4133 | return code; |
| 4134 | } |
| 4135 | }; |
| 4136 | If.prototype.unfoldSoak = function() { |
| 4137 | return this.soak && this; |
| 4138 | }; |
| 4139 | return If; |
| 4140 | })(); |
| 4141 | Push = { |
| 4142 | wrap: function(name, exps) { |
| 4143 | if (exps.isEmpty() || last(exps.expressions).jumps()) { |
| 4144 | return exps; |
| 4145 | } |
| 4146 | return exps.push(new Call(new Value(new Literal(name), [new Access(new Literal('push'))]), [exps.pop()])); |
| 4147 | } |
| 4148 | }; |
| 4149 | Closure = { |
| 4150 | wrap: function(expressions, statement, noReturn) { |
| 4151 | var args, call, func, mentionsArgs, meth; |
| 4152 | if (expressions.jumps()) { |
| 4153 | return expressions; |
| 4154 | } |
| 4155 | func = new Code([], Block.wrap([expressions])); |
| 4156 | args = []; |
| 4157 | if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) { |
| 4158 | meth = new Literal(mentionsArgs ? 'apply' : 'call'); |
| 4159 | args = [new Literal('this')]; |
| 4160 | if (mentionsArgs) { |
| 4161 | args.push(new Literal('arguments')); |
| 4162 | } |
| 4163 | func = new Value(func, [new Access(meth)]); |
| 4164 | } |
| 4165 | func.noReturn = noReturn; |
| 4166 | call = new Call(func, args); |
| 4167 | if (statement) { |
| 4168 | return Block.wrap([call]); |
| 4169 | } else { |
| 4170 | return call; |
| 4171 | } |
| 4172 | }, |
| 4173 | literalArgs: function(node) { |
| 4174 | return node instanceof Literal && node.value === 'arguments' && !node.asKey; |
| 4175 | }, |
| 4176 | literalThis: function(node) { |
| 4177 | return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound); |
| 4178 | } |
| 4179 | }; |
| 4180 | unfoldSoak = function(o, parent, name) { |
| 4181 | var ifn; |
| 4182 | if (!(ifn = parent[name].unfoldSoak(o))) { |
| 4183 | return; |
| 4184 | } |
| 4185 | parent[name] = ifn.body; |
| 4186 | ifn.body = new Value(parent); |
| 4187 | return ifn; |
| 4188 | }; |
| 4189 | UTILITIES = { |
| 4190 | "extends": 'function(child, parent) {\n for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n child.__super__ = parent.prototype;\n return child;\n}', |
| 4191 | bind: 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }', |
| 4192 | indexOf: 'Array.prototype.indexOf || function(item) {\n for (var i = 0, l = this.length; i < l; i++) {\n if (this[i] === item) return i;\n }\n return -1;\n}', |
| 4193 | hasProp: 'Object.prototype.hasOwnProperty', |
| 4194 | slice: 'Array.prototype.slice' |
| 4195 | }; |
| 4196 | LEVEL_TOP = 1; |
| 4197 | LEVEL_PAREN = 2; |
| 4198 | LEVEL_LIST = 3; |
| 4199 | LEVEL_COND = 4; |
| 4200 | LEVEL_OP = 5; |
| 4201 | LEVEL_ACCESS = 6; |
| 4202 | TAB = ' '; |
| 4203 | IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; |
| 4204 | IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); |
| 4205 | SIMPLENUM = /^[+-]?\d+$/; |
| 4206 | METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$"); |
| 4207 | IS_STRING = /^['"]/; |
| 4208 | utility = function(name) { |
| 4209 | var ref; |
| 4210 | ref = "__" + name; |
| 4211 | Scope.root.assign(ref, UTILITIES[name]); |
| 4212 | return ref; |
| 4213 | }; |
| 4214 | multident = function(code, tab) { |
| 4215 | return code.replace(/\n/g, '$&' + tab); |
| 4216 | }; |
| 4217 | }).call(this); |
| 4218 | return exports; |
| 4219 | }());(function () { |
| 4220 | var exports = __MODULES['coffee-script'] = {}; |
| 4221 | (function() { |
| 4222 | var Lexer, RESERVED, compile, fs, lexer, parser, path, _ref; |
| 4223 | var __hasProp = Object.prototype.hasOwnProperty; |
| 4224 | fs = require('fs'); |
| 4225 | path = require('path'); |
| 4226 | _ref = require('./lexer'), Lexer = _ref.Lexer, RESERVED = _ref.RESERVED; |
| 4227 | parser = require('./parser').parser; |
| 4228 | if (require.extensions) { |
| 4229 | require.extensions['.coffee'] = function(module, filename) { |
| 4230 | var content; |
| 4231 | content = compile(fs.readFileSync(filename, 'utf8'), { |
| 4232 | filename: filename |
| 4233 | }); |
| 4234 | return module._compile(content, filename); |
| 4235 | }; |
| 4236 | } else if (require.registerExtension) { |
| 4237 | require.registerExtension('.coffee', function(content) { |
| 4238 | return compile(content); |
| 4239 | }); |
| 4240 | } |
| 4241 | exports.VERSION = '1.1.2'; |
| 4242 | exports.RESERVED = RESERVED; |
| 4243 | exports.helpers = require('./helpers'); |
| 4244 | exports.compile = compile = function(code, options) { |
| 4245 | if (options == null) { |
| 4246 | options = {}; |
| 4247 | } |
| 4248 | try { |
| 4249 | return (parser.parse(lexer.tokenize(code))).compile(options); |
| 4250 | } catch (err) { |
| 4251 | if (options.filename) { |
| 4252 | err.message = "In " + options.filename + ", " + err.message; |
| 4253 | } |
| 4254 | throw err; |
| 4255 | } |
| 4256 | }; |
| 4257 | exports.tokens = function(code, options) { |
| 4258 | return lexer.tokenize(code, options); |
| 4259 | }; |
| 4260 | exports.nodes = function(source, options) { |
| 4261 | if (typeof source === 'string') { |
| 4262 | return parser.parse(lexer.tokenize(source, options)); |
| 4263 | } else { |
| 4264 | return parser.parse(source); |
| 4265 | } |
| 4266 | }; |
| 4267 | exports.run = function(code, options) { |
| 4268 | var Module, mainModule; |
| 4269 | mainModule = require.main; |
| 4270 | mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; |
| 4271 | mainModule.moduleCache && (mainModule.moduleCache = {}); |
| 4272 | if (process.binding('natives').module) { |
| 4273 | Module = require('module').Module; |
| 4274 | mainModule.paths = Module._nodeModulePaths(path.dirname(options.filename)); |
| 4275 | } |
| 4276 | if (path.extname(mainModule.filename) !== '.coffee' || require.extensions) { |
| 4277 | return mainModule._compile(compile(code, options), mainModule.filename); |
| 4278 | } else { |
| 4279 | return mainModule._compile(code, mainModule.filename); |
| 4280 | } |
| 4281 | }; |
| 4282 | exports.eval = function(code, options) { |
| 4283 | var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref2, _ref3, _ref4, _require; |
| 4284 | if (options == null) { |
| 4285 | options = {}; |
| 4286 | } |
| 4287 | if (!(code = code.trim())) { |
| 4288 | return; |
| 4289 | } |
| 4290 | if (_ref2 = require('vm'), Script = _ref2.Script, _ref2) { |
| 4291 | sandbox = Script.createContext(); |
| 4292 | sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; |
| 4293 | if (options.sandbox != null) { |
| 4294 | if (options.sandbox instanceof sandbox.constructor) { |
| 4295 | sandbox = options.sandbox; |
| 4296 | } else { |
| 4297 | _ref3 = options.sandbox; |
| 4298 | for (k in _ref3) { |
| 4299 | if (!__hasProp.call(_ref3, k)) continue; |
| 4300 | v = _ref3[k]; |
| 4301 | sandbox[k] = v; |
| 4302 | } |
| 4303 | } |
| 4304 | } |
| 4305 | sandbox.__filename = options.filename || 'eval'; |
| 4306 | sandbox.__dirname = path.dirname(sandbox.__filename); |
| 4307 | if (!(sandbox.module || sandbox.require)) { |
| 4308 | Module = require('module'); |
| 4309 | sandbox.module = _module = new Module(options.modulename || 'eval'); |
| 4310 | sandbox.require = _require = function(path) { |
| 4311 | return Module._load(path, _module); |
| 4312 | }; |
| 4313 | _module.filename = sandbox.__filename; |
| 4314 | _ref4 = Object.getOwnPropertyNames(require); |
| 4315 | for (_i = 0, _len = _ref4.length; _i < _len; _i++) { |
| 4316 | r = _ref4[_i]; |
| 4317 | _require[r] = require[r]; |
| 4318 | } |
| 4319 | _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); |
| 4320 | _require.resolve = function(request) { |
| 4321 | return Module._resolveFilename(request, _module); |
| 4322 | }; |
| 4323 | } |
| 4324 | } |
| 4325 | o = {}; |
| 4326 | for (k in options) { |
| 4327 | if (!__hasProp.call(options, k)) continue; |
| 4328 | v = options[k]; |
| 4329 | o[k] = v; |
| 4330 | } |
| 4331 | o.bare = true; |
| 4332 | js = compile(code, o); |
| 4333 | if (Script) { |
| 4334 | return Script.runInContext(js, sandbox); |
| 4335 | } else { |
| 4336 | return eval(js); |
| 4337 | } |
| 4338 | }; |
| 4339 | lexer = new Lexer; |
| 4340 | parser.lexer = { |
| 4341 | lex: function() { |
| 4342 | var tag, _ref2; |
| 4343 | _ref2 = this.tokens[this.pos++] || [''], tag = _ref2[0], this.yytext = _ref2[1], this.yylineno = _ref2[2]; |
| 4344 | return tag; |
| 4345 | }, |
| 4346 | setInput: function(tokens) { |
| 4347 | this.tokens = tokens; |
| 4348 | return this.pos = 0; |
| 4349 | }, |
| 4350 | upcomingInput: function() { |
| 4351 | return ""; |
| 4352 | } |
| 4353 | }; |
| 4354 | parser.yy = require('./nodes'); |
| 4355 | }).call(this); |
| 4356 | return exports; |
| 4357 | }()); |
| 4358 | return __MODULES['coffee-script']; |
| 4359 | |
| 4360 | }()); |
| 4361 | //END COFFEESCRIPT |
| 4362 | |
| 4363 | if (typeof window !== "undefined" && window.navigator && window.document) { |
| 4364 | // Browser action |
| 4365 | getXhr = function () { |
| 4366 | //Would love to dump the ActiveX crap in here. Need IE 6 to die first. |
| 4367 | var xhr, i, progId; |
| 4368 | if (typeof XMLHttpRequest !== "undefined") { |
| 4369 | return new XMLHttpRequest(); |
| 4370 | } else { |
| 4371 | for (i = 0; i < 3; i++) { |
| 4372 | progId = progIds[i]; |
| 4373 | try { |
| 4374 | xhr = new ActiveXObject(progId); |
| 4375 | } catch (e) {} |
| 4376 | |
| 4377 | if (xhr) { |
| 4378 | progIds = [progId]; // so faster next time |
| 4379 | break; |
| 4380 | } |
| 4381 | } |
| 4382 | } |
| 4383 | |
| 4384 | if (!xhr) { |
| 4385 | throw new Error("getXhr(): XMLHttpRequest not available"); |
| 4386 | } |
| 4387 | |
| 4388 | return xhr; |
| 4389 | }; |
| 4390 | |
| 4391 | fetchText = function (url, callback) { |
| 4392 | var xhr = getXhr(); |
| 4393 | xhr.open('GET', url, true); |
| 4394 | xhr.onreadystatechange = function (evt) { |
| 4395 | //Do not explicitly handle errors, those should be |
| 4396 | //visible via console output in the browser. |
| 4397 | if (xhr.readyState === 4) { |
| 4398 | callback(xhr.responseText); |
| 4399 | } |
| 4400 | }; |
| 4401 | xhr.send(null); |
| 4402 | }; |
| 4403 | |
| 4404 | //Some overrides for the browser env, taken from the |
| 4405 | //browser.js in the CoffeeScript source. |
| 4406 | CoffeeScript.eval = function(code, options) { |
| 4407 | return eval(CoffeeScript.compile(code, options)); |
| 4408 | }; |
| 4409 | CoffeeScript.run = function(code, options) { |
| 4410 | if (options == null) { |
| 4411 | options = {}; |
| 4412 | } |
| 4413 | options.bare = true; |
| 4414 | return Function(CoffeeScript.compile(code, options))(); |
| 4415 | }; |
| 4416 | // end browser.js adapters |
| 4417 | } else if (typeof process !== "undefined" && |
| 4418 | process.versions && |
| 4419 | !!process.versions.node) { |
| 4420 | //Using special require.nodeRequire, something added by r.js. |
| 4421 | fs = (require.nodeRequire || require)('fs'); |
| 4422 | fetchText = function (path, callback) { |
| 4423 | callback(fs.readFileSync(path, 'utf8')); |
| 4424 | }; |
| 4425 | } else if (typeof Packages !== 'undefined') { |
| 4426 | //Why Java, why is this so awkward? |
| 4427 | fetchText = function (path, callback) { |
| 4428 | var encoding = "utf-8", |
| 4429 | file = new java.io.File(path), |
| 4430 | lineSeparator = java.lang.System.getProperty("line.separator"), |
| 4431 | input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)), |
| 4432 | stringBuffer, line, |
| 4433 | content = ''; |
| 4434 | try { |
| 4435 | stringBuffer = new java.lang.StringBuffer(); |
| 4436 | line = input.readLine(); |
| 4437 | |
| 4438 | // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324 |
| 4439 | // http://www.unicode.org/faq/utf_bom.html |
| 4440 | |
| 4441 | // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK: |
| 4442 | // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058 |
| 4443 | if (line && line.length() && line.charAt(0) === 0xfeff) { |
| 4444 | // Eat the BOM, since we've already found the encoding on this file, |
| 4445 | // and we plan to concatenating this buffer with others; the BOM should |
| 4446 | // only appear at the top of a file. |
| 4447 | line = line.substring(1); |
| 4448 | } |
| 4449 | |
| 4450 | stringBuffer.append(line); |
| 4451 | |
| 4452 | while ((line = input.readLine()) !== null) { |
| 4453 | stringBuffer.append(lineSeparator); |
| 4454 | stringBuffer.append(line); |
| 4455 | } |
| 4456 | //Make sure we return a JavaScript string and not a Java string. |
| 4457 | content = String(stringBuffer.toString()); //String |
| 4458 | } finally { |
| 4459 | input.close(); |
| 4460 | } |
| 4461 | callback(content); |
| 4462 | }; |
| 4463 | } |
| 4464 | //>>excludeEnd('excludeCoffeeScript') |
| 4465 | |
| 4466 | define({ |
| 4467 | |
| 4468 | //>>excludeStart('excludeCoffeeScript', pragmas.excludeCoffeeScript) |
| 4469 | get: function () { |
| 4470 | return CoffeeScript; |
| 4471 | }, |
| 4472 | |
| 4473 | write: function (pluginName, name, write) { |
| 4474 | if (name in buildMap) { |
| 4475 | var text = buildMap[name]; |
| 4476 | write.asModule(pluginName + "!" + name, text); |
| 4477 | } |
| 4478 | }, |
| 4479 | //>>excludeEnd('excludeCoffeeScript') |
| 4480 | |
| 4481 | version: '0.3.1', |
| 4482 | |
| 4483 | load: function (name, parentRequire, load, config) { |
| 4484 | //>>excludeStart('excludeCoffeeScript', pragmas.excludeCoffeeScript) |
| 4485 | var path = parentRequire.toUrl(name + '.coffee'); |
| 4486 | fetchText(path, function (text) { |
| 4487 | |
| 4488 | //Do CoffeeScript transform. |
| 4489 | text = CoffeeScript.compile(text, config.CoffeeScript); |
| 4490 | |
| 4491 | //Hold on to the transformed text if a build. |
| 4492 | if (config.isBuild) { |
| 4493 | buildMap[name] = text; |
| 4494 | } |
| 4495 | |
| 4496 | //IE with conditional comments on cannot handle the |
| 4497 | //sourceURL trick, so skip it if enabled. |
| 4498 | /*@if (@_jscript) @else @*/ |
| 4499 | if (!config.isBuild) { |
| 4500 | text += "\r\n//@ sourceURL=" + path; |
| 4501 | } |
| 4502 | /*@end@*/ |
| 4503 | |
| 4504 | load.fromText(name, text); |
| 4505 | |
| 4506 | //Give result to load. Need to wait until the module |
| 4507 | //is fully parse, which will happen after this |
| 4508 | //execution. |
| 4509 | parentRequire([name], function (value) { |
| 4510 | load(value); |
| 4511 | }); |
| 4512 | }); |
| 4513 | //>>excludeEnd('excludeCoffeeScript') |
| 4514 | } |
| 4515 | }); |
| 4516 | |
| 4517 | }()); |