1 /* 2 JessieCode Interpreter and Compiler 3 4 Copyright 2011-2013 5 Michael Gerhaeuser, 6 Alfred Wassermann 7 8 JessieCode is free software dual licensed under the GNU LGPL or MIT License. 9 10 You can redistribute it and/or modify it under the terms of the 11 12 * GNU Lesser General Public License as published by 13 the Free Software Foundation, either version 3 of the License, or 14 (at your option) any later version 15 OR 16 * MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT 17 18 JessieCode is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU Lesser General Public License for more details. 22 23 You should have received a copy of the GNU Lesser General Public License and 24 the MIT License along with JessieCode. If not, see <http://www.gnu.org/licenses/> 25 and <http://opensource.org/licenses/MIT/>. 26 */ 27 28 /*global JXG: true, define: true, window: true, console: true, self: true, document: true, parser: true*/ 29 /*jslint nomen: true, plusplus: true*/ 30 31 /* depends: 32 jxg 33 parser/geonext 34 base/constants 35 base/text 36 math/math 37 math/geometry 38 math/statistics 39 utils/type 40 utils/uuid 41 */ 42 43 /** 44 * @fileoverview JessieCode is a scripting language designed to provide a simple scripting language to build constructions 45 * with JSXGraph. It is similar to JavaScript, but prevents access to the DOM. Hence, it can be used in community driven 46 * Math portals which want to use JSXGraph to display interactive math graphics. 47 */ 48 49 define([ 50 'jxg', 'base/constants', 'base/text', 'math/math', 'math/geometry', 'math/statistics', 'utils/type', 'utils/uuid', 'utils/env' 51 ], function (JXG, Const, Text, Mat, Geometry, Statistics, Type, UUID, Env) { 52 53 ; 54 55 var priv = { 56 modules: { 57 'math': Mat, 58 'math/geometry': Geometry, 59 'math/statistics': Statistics, 60 'math/numerics': Mat.Numerics 61 } 62 }; 63 64 /** 65 * A JessieCode object provides an interfacce to the parser and stores all variables and objects used within a JessieCode script. 66 * The optional argument <tt>code</tt> is interpreted after initializing. To evaluate more code after initializing a JessieCode instance 67 * please use {@link JXG.JessieCode#parse}. For code snippets like single expressions use {@link JXG.JessieCode#snippet}. 68 * @constructor 69 * @param {String} [code] Code to parse. 70 * @param {Boolean} [geonext=false] Geonext compatibility mode. 71 */ 72 JXG.JessieCode = function (code, geonext) { 73 // Control structures 74 75 /** 76 * The global scope. 77 * @type {Object} 78 */ 79 this.scope = { 80 id: 0, 81 hasChild: true, 82 args: [], 83 locals: {}, 84 context: null, 85 previous: null 86 }; 87 88 /** 89 * Keeps track of all possible scopes every required. 90 * @type {Array} 91 */ 92 this.scopes = []; 93 this.scopes.push(this.scope); 94 95 /** 96 * A stack to store debug information (like line and column where it was defined) of a parameter 97 * @type Array 98 * @private 99 */ 100 this.dpstack = [[]]; 101 102 /** 103 * Determines the parameter stack scope. 104 * @type Number 105 * @private 106 */ 107 this.pscope = 0; 108 109 /** 110 * Used to store the property-value definition while parsing an object literal. 111 * @type Array 112 * @private 113 */ 114 this.propstack = [{}]; 115 116 /** 117 * The current scope of the object literal stack {@link JXG.JessieCode#propstack}. 118 * @type Number 119 * @private 120 */ 121 this.propscope = 0; 122 123 /** 124 * Store the left hand side of an assignment. If an element is constructed and no attributes are given, this is 125 * used as the element's name. 126 * @type Array 127 * @private 128 */ 129 this.lhs = []; 130 131 /** 132 * lhs flag, used by JXG.JessieCode#replaceNames 133 * @type Boolean 134 * @default false 135 */ 136 this.isLHS = false; 137 138 /** 139 * The id of an HTML node in which innerHTML all warnings are stored (if no <tt>console</tt> object is available). 140 * @type String 141 * @default 'jcwarn' 142 */ 143 this.warnLog = 'jcwarn'; 144 145 /** 146 * Store $log messages in case there's no console. 147 * @type {Array} 148 */ 149 this.$log = []; 150 151 /** 152 * Built-in functions and constants 153 * @type Object 154 */ 155 this.builtIn = this.defineBuiltIn(); 156 157 /** 158 * The board which currently is used to create and look up elements. 159 * @type JXG.Board 160 */ 161 this.board = null; 162 163 /** 164 * Keep track of which element is created in which line. 165 * @type Object 166 */ 167 this.lineToElement = {}; 168 169 this.parCurLine = 1; 170 this.parCurColumn = 0; 171 this.line = 1; 172 this.col = 1; 173 174 this.code = ''; 175 176 if (typeof code === 'string') { 177 this.parse(code, geonext); 178 } 179 }; 180 181 182 JXG.extend(JXG.JessieCode.prototype, /** @lends JXG.JessieCode.prototype */ { 183 /** 184 * Create a new parse tree node. 185 * @param {String} type Type of node, e.g. node_op, node_var, or node_const 186 * @param value The nodes value, e.g. a variables value or a functions body. 187 * @param {Array} children Arbitrary number of child nodes. 188 */ 189 node: function (type, value, children) { 190 return { 191 type: type, 192 value: value, 193 children: children 194 }; 195 }, 196 197 /** 198 * Create a new parse tree node. Basically the same as node(), but this builds 199 * the children part out of an arbitrary number of parameters, instead of one 200 * array parameter. 201 * @param {String} type Type of node, e.g. node_op, node_var, or node_const 202 * @param value The nodes value, e.g. a variables value or a functions body. 203 * @param children Arbitrary number of parameters; define the child nodes. 204 */ 205 createNode: function (type, value, children) { 206 var n = this.node(type, value, []), 207 i; 208 209 for (i = 2; i < arguments.length; i++) { 210 n.children.push(arguments[i]); 211 } 212 213 n.line = this.parCurLine; 214 n.col = this.parCurColumn; 215 216 return n; 217 }, 218 219 /** 220 * Create a new scope. 221 * @param {Array} args 222 * @returns {Object} 223 */ 224 pushScope: function (args) { 225 var scope = { 226 args: args, 227 locals: {}, 228 context: null, 229 previous: this.scope 230 }; 231 232 this.scope.hasChild = true; 233 this.scope = scope; 234 scope.id = this.scopes.push(scope) - 1; 235 236 return scope; 237 }, 238 239 /** 240 * Remove the current scope and reinstate the previous scope 241 * @returns {Object} 242 */ 243 popScope: function () { 244 var s = this.scope.previous; 245 246 // make sure the global scope is not lost 247 this.scope = s !== null ? s : this.scope; 248 249 return this.scope; 250 }, 251 252 /** 253 * Looks up an {@link JXG.GeometryElement} by its id. 254 * @param {String} id 255 * @returns {JXG.GeometryElement} 256 */ 257 getElementById: function (id) { 258 return this.board.objects[id]; 259 }, 260 261 log: function () { 262 this.$log.push(arguments); 263 264 if (typeof console === 'object' && console.log) { 265 console.log.apply(console, arguments); 266 } 267 }, 268 269 /** 270 * Returns a element creator function which takes two parameters: the parents array and the attributes object. 271 * @param {String} vname The element type, e.g. 'point', 'line', 'midpoint' 272 * @returns {function} 273 */ 274 creator: (function () { 275 // stores the already defined creators 276 var _ccache = {}, r; 277 278 r = function (vname) { 279 var f; 280 281 // _ccache is global, i.e. it is the same for ALL JessieCode instances. 282 // That's why we need the board id here 283 if (typeof _ccache[this.board.id + vname] === 'function') { 284 f = _ccache[this.board.id + vname]; 285 } else { 286 f = (function (that) { 287 return function (parameters, attributes) { 288 var attr; 289 290 if (Type.exists(attributes)) { 291 attr = attributes; 292 } else { 293 attr = {name: (that.lhs[that.scope] !== 0 ? that.lhs[that.scope] : '')}; 294 } 295 return that.board.create(vname, parameters, attr); 296 }; 297 }(this)); 298 299 f.creator = true; 300 _ccache[this.board.id + vname] = f; 301 } 302 303 return f; 304 }; 305 306 r.clearCache = function () { 307 _ccache = {}; 308 }; 309 310 return r; 311 }()), 312 313 /** 314 * Assigns a value to a variable in the current scope. 315 * @param {String} vname Variable name 316 * @param value Anything 317 * @see JXG.JessieCode#sstack 318 * @see JXG.JessieCode#scope 319 */ 320 letvar: function (vname, value) { 321 if (this.builtIn[vname]) { 322 this._warn('"' + vname + '" is a predefined value.'); 323 } 324 325 //this.sstack[this.scope][vname] = value; 326 this.scope.locals[vname] = value; 327 }, 328 329 /** 330 * Checks if the given variable name can be found in the current scope chain. 331 * @param {String} vname 332 * @returns {Object} A reference to the scope object the variable can be found in or null if it can't be found. 333 */ 334 isLocalVariable: function (vname) { 335 var s = this.scope; 336 337 while (s !== null) { 338 if (Type.exists(s.locals[vname])) { 339 return s; 340 } 341 342 s = s.previous; 343 } 344 345 return null; 346 }, 347 348 /** 349 * Checks if the given variable name is a parameter in any scope from the current to the global scope. 350 * @param {String} vname 351 * @returns {Object} A reference to the scope object that contains the variable in its arg list. 352 */ 353 isParameter: function (vname) { 354 var s = this.scope; 355 356 while (s !== null) { 357 if (Type.indexOf(s.args, vname) > -1) { 358 return s; 359 } 360 361 s = s.previous; 362 } 363 364 return null; 365 }, 366 367 /** 368 * Checks if the given variable name is a valid creator method. 369 * @param {String} vname 370 * @returns {Boolean} 371 */ 372 isCreator: function (vname) { 373 // check for an element with this name 374 return !!JXG.elements[vname]; 375 }, 376 377 /** 378 * Checks if the given variable identifier is a valid member of the JavaScript Math Object. 379 * @param {String} vname 380 * @returns {Boolean} 381 */ 382 isMathMethod: function (vname) { 383 return vname !== 'E' && !!Math[vname]; 384 }, 385 386 /** 387 * Returns true if the given identifier is a builtIn variable/function. 388 * @param {String} vname 389 * @returns {Boolean} 390 */ 391 isBuiltIn: function (vname) { 392 return !!this.builtIn[vname]; 393 }, 394 395 /** 396 * Looks up the value of the given variable. 397 * @param {String} vname Name of the variable 398 * @param {Boolean} [local=false] Only look up the internal symbol table and don't look for 399 * the <tt>vname</tt> in Math or the element list. 400 */ 401 getvar: function (vname, local) { 402 var s, undef; 403 404 local = Type.def(local, false); 405 406 s = this.isLocalVariable(vname); 407 if (s !== null) { 408 return s.locals[vname]; 409 } 410 411 // check for an element with this name 412 if (this.isCreator(vname)) { 413 return this.creator(vname); 414 } 415 416 if (this.isBuiltIn(vname)) { 417 return this.builtIn[vname]; 418 } 419 420 if (this.isMathMethod(vname)) { 421 return Math[vname]; 422 } 423 424 if (!local) { 425 s = this.board.select(vname); 426 if (s !== vname) { 427 return s; 428 } 429 } 430 431 return undef; 432 }, 433 434 /** 435 * Look up the value of a local variable. 436 * @param {string} vname 437 * @returns {*} 438 */ 439 resolve: function (vname) { 440 var s = this.scope; 441 442 while (s !== null) { 443 if (Type.exists(s.locals[vname])) { 444 return s.locals[vname]; 445 } 446 447 s = s.previous; 448 } 449 450 return; 451 }, 452 453 /** 454 * TODO this needs to be called from JS and should not generate JS code 455 * Looks up a variable identifier in various tables and generates JavaScript code that could be eval'd to get the value. 456 * @param {String} vname Identifier 457 * @param {Boolean} [local=false] Don't resolve ids and names of elements 458 * @param {Boolean} [withProps=false] 459 */ 460 getvarJS: function (vname, local, withProps) { 461 var s, r = ''; 462 463 local = Type.def(local, false); 464 withProps = Type.def(withProps, false); 465 466 s = this.isParameter(vname); 467 if (s !== null) { 468 return vname; 469 } 470 471 s = this.isLocalVariable(vname); 472 if (s !== null && !withProps) { 473 //return '$jc$.sstack[' + s + '][\'' + vname + '\']'; 474 return '$jc$.resolve(\'' + vname + '\')'; 475 } 476 477 // check for an element with this name 478 if (this.isCreator(vname)) { 479 return '(function () { var a = Array.prototype.slice.call(arguments, 0), props = ' + (withProps ? 'a.pop()' : '{}') + '; return $jc$.board.create.apply($jc$.board, [\'' + vname + '\'].concat([a, props])); })'; 480 } 481 482 if (withProps) { 483 this._error('Syntax error (attribute values are allowed with element creators only)'); 484 } 485 486 if (this.isBuiltIn(vname)) { 487 // if src does not exist, it is a number. in that case, just return the value. 488 return this.builtIn[vname].src || this.builtIn[vname]; 489 } 490 491 if (this.isMathMethod(vname)) { 492 return 'Math.' + vname; 493 } 494 495 if (!local) { 496 if (Type.isId(this.board, vname)) { 497 r = '$jc$.board.objects[\'' + vname + '\']'; 498 } else if (Type.isName(this.board, vname)) { 499 r = '$jc$.board.elementsByName[\'' + vname + '\']'; 500 } else if (Type.isGroup(this.board, vname)) { 501 r = '$jc$.board.groups[\'' + vname + '\']'; 502 } 503 504 return r; 505 } 506 507 return ''; 508 }, 509 510 /** 511 * Adds the property <tt>isMap</tt> to a function and sets it to true. 512 * @param {function} f 513 * @returns {function} 514 */ 515 makeMap: function (f) { 516 f.isMap = true; 517 518 return f; 519 }, 520 521 functionCodeJS: function (node) { 522 var p = node.children[0].join(', '), 523 bo = '', 524 bc = ''; 525 526 if (node.value === 'op_map') { 527 bo = '{ return '; 528 bc = ' }'; 529 } 530 531 return 'function (' + p + ') {\n' + 532 'var $oldscope$ = $jc$.scope;\n' + 533 '$jc$.scope = $jc$.scopes[' + this.scope.id + '];\n' + 534 'var r = (function () ' + bo + this.compile(node.children[1], true) + bc + ')();\n' + 535 '$jc$.scope = $oldscope$;\n' + 536 'return r;\n' + 537 '}'; 538 }, 539 540 /** 541 * Converts a node type <tt>node_op</tt> and value <tt>op_map</tt> or <tt>op_function</tt> into a executable 542 * function. 543 * @param {Object} node 544 * @returns {function} 545 */ 546 defineFunction: function (node) { 547 var fun, i, 548 bo = '', 549 bc = '', 550 list = node.children[0], 551 scope = this.pushScope(list); 552 553 if (this.board.options.jc.compile) { 554 this.isLHS = false; 555 556 // we currently need to put the parameters into the local scope 557 // until the compiled JS variable lookup code is fixed 558 for (i = 0; i < list.length; i++) { 559 scope.locals[list[i]] = list[i]; 560 } 561 562 this.replaceNames(node.children[1]); 563 564 fun = (function ($jc$, list) { 565 var fun, 566 p = list.join(', '), 567 //str = 'var f = function (' + p + ') {\nvar $oldscope$ = $jc$.scope;\n$jc$.scope = $jc$.scopes[' + scope.id + '];\nvar r = (function () ' + bo + $jc$.compile(node.children[1], true) + bc + ')();\n$jc$.scope = $oldscope$;\nreturn r;\n}; f;'; 568 str = 'var f = ' + $jc$.functionCodeJS(node) + '; f;'; 569 570 try { 571 // yeah, eval is evil, but we don't have much choice here. 572 // the str is well defined and there is no user input in it that we didn't check before 573 574 /*jslint evil:true*/ 575 fun = eval(str); 576 /*jslint evil:false*/ 577 578 return fun; 579 } catch (e) { 580 $jc$._warn('error compiling function\n\n' + str + '\n\n' + e.toString()); 581 return function () {}; 582 } 583 }(this, list)); 584 585 // clean up scope 586 this.popScope(); 587 } else { 588 fun = (function (_pstack, that, id) { 589 return function () { 590 var r, oldscope; 591 592 oldscope = that.scope; 593 that.scope = that.scopes[id]; 594 595 for (r = 0; r < _pstack.length; r++) { 596 that.scope.locals[_pstack[r]] = arguments[r]; 597 } 598 599 r = that.execute(node.children[1]); 600 that.scope = oldscope; 601 602 return r; 603 }; 604 }(list, this, scope.id)); 605 } 606 607 fun.node = node; 608 fun.scope = scope; 609 fun.toJS = fun.toString; 610 fun.toString = (function (_that) { 611 return function () { 612 return _that.compile(_that.replaceIDs(Type.deepCopy(node))); 613 }; 614 }(this)); 615 616 fun.deps = {}; 617 this.collectDependencies(node.children[1], fun.deps); 618 619 return fun; 620 }, 621 622 /** 623 * Merge all atribute values given with an element creator into one object. 624 * @param {Object} o An arbitrary number of objects 625 * @returns {Object} All given objects merged into one. If properties appear in more (case sensitive) than one 626 * object the last value is taken. 627 */ 628 mergeAttributes: function (o) { 629 var i, attr = {}; 630 631 for (i = 0; i < arguments.length; i++) { 632 attr = Type.deepCopy(attr, arguments[i], true); 633 } 634 635 return attr; 636 }, 637 638 /** 639 * Sets the property <tt>what</tt> of <tt>o</tt> to <tt>value</tt> 640 * @param {JXG.Point|JXG.Text} o 641 * @param {String} what 642 * @param value 643 */ 644 setProp: function (o, what, value) { 645 var par = {}, x, y; 646 647 if (o.elementClass === Const.OBJECT_CLASS_POINT && (what === 'X' || what === 'Y')) { 648 // set coords 649 650 what = what.toLowerCase(); 651 652 // be advised, we've spotted three cases in your AO: 653 // o.isDraggable && typeof value === number: 654 // stay draggable, just set the new coords (e.g. via moveTo) 655 // o.isDraggable && typeof value === function: 656 // convert to !o.isDraggable, set the new coords via o.addConstraint() 657 // !o.isDraggable: 658 // stay !o.isDraggable, update the given coord by overwriting X/YEval 659 660 if (o.isDraggable && typeof value === 'number') { 661 x = what === 'x' ? value : o.X(); 662 y = what === 'y' ? value : o.Y(); 663 664 o.setPosition(Const.COORDS_BY_USER, [x, y]); 665 } else if (o.isDraggable && (typeof value === 'function' || typeof value === 'string')) { 666 x = what === 'x' ? value : o.coords.usrCoords[1]; 667 y = what === 'y' ? value : o.coords.usrCoords[2]; 668 669 o.addConstraint([x, y]); 670 } else if (!o.isDraggable) { 671 x = what === 'x' ? value : o.XEval.origin; 672 y = what === 'y' ? value : o.YEval.origin; 673 674 o.addConstraint([x, y]); 675 } 676 677 this.board.update(); 678 } else if (o.elementClass === Const.OBJECT_CLASS_TEXT && (what === 'X' || what === 'Y')) { 679 if (typeof value === 'number') { 680 o[what] = function () { return value; }; 681 } else if (typeof value === 'function') { 682 o.isDraggable = false; 683 o[what] = value; 684 } else if (typeof value === 'string') { 685 o.isDraggable = false; 686 o[what] = Type.createFunction(value, this.board, null, true); 687 o[what + 'jc'] = value; 688 } 689 690 o[what].origin = value; 691 692 this.board.update(); 693 } else if (o.type && o.elementClass && o.visProp) { 694 if (Type.exists(o[o.methodMap[what]]) && typeof o[o.methodMap[what]] !== 'function') { 695 o[o.methodMap[what]] = value; 696 } else { 697 par[what] = value; 698 o.setProperty(par); 699 } 700 } else { 701 o[what] = value; 702 } 703 }, 704 705 /** 706 * Parses JessieCode 707 * @param {String} code 708 * @param {Boolean} [geonext=false] Geonext compatibility mode. 709 * @param {Boolean} dontstore 710 */ 711 parse: function (code, geonext, dontstore) { 712 var i, setTextBackup, ast, result, 713 ccode = code.replace(/\r\n/g, '\n').split('\n'), 714 cleaned = []; 715 716 if (!dontstore) { 717 this.code += code + '\n'; 718 } 719 720 if (Text) { 721 setTextBackup = Text.Text.prototype.setText; 722 Text.Text.prototype.setText = Text.Text.prototype.setTextJessieCode; 723 } 724 725 try { 726 if (!Type.exists(geonext)) { 727 geonext = false; 728 } 729 730 for (i = 0; i < ccode.length; i++) { 731 if (geonext) { 732 ccode[i] = JXG.GeonextParser.geonext2JS(ccode[i], this.board); 733 } 734 cleaned.push(ccode[i]); 735 } 736 737 code = cleaned.join('\n'); 738 ast = parser.parse(code); 739 result = this.execute(ast); 740 } finally { 741 // make sure the original text method is back in place 742 if (Text) { 743 Text.Text.prototype.setText = setTextBackup; 744 } 745 } 746 747 return result; 748 }, 749 750 /** 751 * Parses a JessieCode snippet, e.g. "3+4", and wraps it into a function, if desired. 752 * @param {String} code A small snippet of JessieCode. Must not be an assignment. 753 * @param {Boolean} funwrap If true, the code is wrapped in a function. 754 * @param {String} varname Name of the parameter(s) 755 * @param {Boolean} [geonext=false] Geonext compatibility mode. 756 */ 757 snippet: function (code, funwrap, varname, geonext) { 758 var c, result; 759 760 funwrap = Type.def(funwrap, true); 761 varname = Type.def(varname, ''); 762 geonext = Type.def(geonext, false); 763 764 c = (funwrap ? ' function (' + varname + ') { return ' : '') + code + (funwrap ? '; }' : '') + ';'; 765 766 return this.parse(c, geonext, true); 767 }, 768 769 /** 770 * Traverses through the given subtree and changes all values of nodes with the replaced flag set by 771 * {@link JXG.JessieCode#replaceNames} to the name of the element (if not empty). 772 * @param {Object} node 773 */ 774 replaceIDs: function (node) { 775 var i, v; 776 777 if (node.replaced) { 778 // these children exist, if node.replaced is set. 779 v = this.board.objects[node.children[1][0].value]; 780 781 if (Type.exists(v) && v.name !== "") { 782 node.type = 'node_var'; 783 node.value = v.name; 784 785 // maybe it's not necessary, but just to be sure that everything is cleaned up we better delete all 786 // children and the replaced flag 787 node.children.length = 0; 788 delete node.replaced; 789 } 790 } 791 792 if (node.children) { 793 // assignments are first evaluated on the right hand side 794 for (i = node.children.length; i > 0; i--) { 795 if (Type.exists(node.children[i - 1])) { 796 node.children[i - 1] = this.replaceIDs(node.children[i - 1]); 797 } 798 799 } 800 } 801 802 return node; 803 }, 804 805 /** 806 * Traverses through the given subtree and changes all elements referenced by names through referencing them by ID. 807 * An identifier is only replaced if it is not found in all scopes above the current scope and if it 808 * has not been blacklisted within the codeblock determined by the given subtree. 809 * @param {Object} node 810 */ 811 replaceNames: function (node) { 812 var i, v; 813 814 v = node.value; 815 816 // we are interested only in nodes of type node_var and node_op > op_lhs. 817 // currently, we are not checking if the id is a local variable. in this case, we're stuck anyway. 818 819 if (node.type === 'node_op' && v === 'op_lhs' && node.children.length === 1) { 820 this.isLHS = true; 821 } else if (node.type === 'node_var') { 822 if (this.isLHS) { 823 this.letvar(v, true); 824 } else if (!Type.exists(this.getvar(v, true)) && Type.exists(this.board.elementsByName[v])) { 825 node = this.createReplacementNode(node); 826 } 827 } 828 829 if (node.children) { 830 // assignments are first evaluated on the right hand side 831 for (i = node.children.length; i > 0; i--) { 832 if (Type.exists(node.children[i - 1])) { 833 node.children[i - 1] = this.replaceNames(node.children[i - 1]); 834 } 835 } 836 } 837 838 if (node.type === 'node_op' && node.value === 'op_lhs' && node.children.length === 1) { 839 this.isLHS = false; 840 } 841 842 return node; 843 }, 844 845 /** 846 * Replaces node_var nodes with node_op>op_execfun nodes, calling the internal $() function with the id of the 847 * element accessed by the node_var node. 848 * @param {Object} node 849 * @returns {Object} op_execfun node 850 */ 851 createReplacementNode: function (node) { 852 var v = node.value, 853 el = this.board.elementsByName[v]; 854 855 node = this.createNode('node_op', 'op_execfun', 856 this.createNode('node_var', '$'), 857 [this.createNode('node_str', el.id)]); 858 859 node.replaced = true; 860 861 return node; 862 }, 863 864 /** 865 * Search the parse tree below <tt>node</tt> for <em>stationary</em> dependencies, i.e. dependencies hard coded into 866 * the function. 867 * @param {Object} node 868 * @param {Object} result An object where the referenced elements will be stored. Access key is their id. 869 */ 870 collectDependencies: function (node, result) { 871 var i, v, e; 872 873 v = node.value; 874 875 if (node.type === 'node_var') { 876 e = this.getvar(v); 877 if (e && e.visProp && e.type && e.elementClass && e.id) { 878 result[e.id] = e; 879 } 880 } 881 882 // the $()-function-calls are special because their parameter is given as a string, not as a node_var. 883 if (node.type === 'node_op' && node.value === 'op_execfun' && node.children.length > 1 && node.children[0].value === '$' && node.children[1].length > 0) { 884 e = node.children[1][0].value; 885 result[e] = this.board.objects[e]; 886 } 887 888 if (node.children) { 889 for (i = node.children.length; i > 0; i--) { 890 if (Type.exists(node.children[i - 1])) { 891 this.collectDependencies(node.children[i - 1], result); 892 } 893 894 } 895 } 896 }, 897 898 resolveProperty: function (e, v, compile) { 899 compile = Type.def(compile, false); 900 901 // is it a geometry element or a board? 902 if (e /*&& e.type && e.elementClass*/ && e.methodMap) { 903 // yeah, it is. but what does the user want? 904 if (Type.exists(e.subs) && Type.exists(e.subs[v])) { 905 // a subelement it is, good sir. 906 e = e.subs; 907 } else if (Type.exists(e.methodMap[v])) { 908 // the user wants to call a method 909 v = e.methodMap[v]; 910 } else { 911 // the user wants to change an attribute 912 e = e.visProp; 913 v = v.toLowerCase(); 914 } 915 } 916 917 if (!Type.exists(e)) { 918 this._error(e + ' is not an object'); 919 } 920 921 if (!Type.exists(e[v])) { 922 this._error('unknown property ' + v); 923 } 924 925 if (compile && typeof e[v] === 'function') { 926 return function () { return e[v].apply(e, arguments); }; 927 } 928 929 return e[v]; 930 }, 931 932 /** 933 * Resolves the lefthand side of an assignment operation 934 * @param node 935 * @returns {Object} An object with two properties. <strong>o</strong> which contains the object, and 936 * a string <strong>what</strong> which contains the property name. 937 */ 938 getLHS: function (node) { 939 var res; 940 941 if (node.type === 'node_var') { 942 res = { 943 o: this.scope.locals, 944 what: node.value 945 }; 946 } else if (node.type === 'node_op' && node.value === 'op_property') { 947 res = { 948 o: this.execute(node.children[0]), 949 what: node.children[1] 950 }; 951 } else if (node.type === 'node_op' && node.value === 'op_extvalue') { 952 res = { 953 o: this.execute(node.children[0]), 954 what: this.execute(node.children[1]) 955 }; 956 } else { 957 throw new Error('Syntax error: Invalid left-hand side of assignment.'); 958 } 959 960 return res; 961 }, 962 963 getLHSCompiler: function (node, js) { 964 var res, t; 965 966 if (node.type === 'node_var') { 967 res = node.value; 968 } else if (node.type === 'node_op' && node.value === 'op_property') { 969 res = [ 970 this.compile(node.children[0], js), 971 "'" + node.children[1] + "'" 972 ]; 973 } else if (node.type === 'node_op' && node.value === 'op_extvalue') { 974 res = [ 975 this.compile(node.children[0]), 976 node.children[1].type === 'node_const' ? node.children[1].value : this.compile(node.children[1], js) 977 ]; 978 } else { 979 throw new Error('Syntax error: Invalid left-hand side of assignment.'); 980 } 981 982 return res; 983 }, 984 985 /** 986 * Executes a parse subtree. 987 * @param {Object} node 988 * @returns {Number|String|Object|Boolean} Something 989 * @private 990 */ 991 execute: function (node) { 992 var ret, v, i, e, l, undef, list, ilist, 993 parents = [], 994 // exec fun 995 fun, attr, sc, 996 // op_use 997 b, 998 found = false; 999 1000 ret = 0; 1001 1002 if (!node) { 1003 return ret; 1004 } 1005 1006 this.line = node.line; 1007 this.col = node.col; 1008 1009 switch (node.type) { 1010 case 'node_op': 1011 switch (node.value) { 1012 case 'op_none': 1013 if (node.children[0]) { 1014 this.execute(node.children[0]); 1015 } 1016 if (node.children[1]) { 1017 ret = this.execute(node.children[1]); 1018 } 1019 break; 1020 case 'op_assign': 1021 v = this.getLHS(node.children[0]); 1022 1023 this.lhs[this.scope.id] = v[1]; 1024 1025 if (v.o.type && v.o.elementClass && v.o.methodMap && v.what === 'label') { 1026 this._error('Left-hand side of assignment is read-only.'); 1027 } 1028 1029 ret = this.execute(node.children[1]); 1030 if (v.o !== this.scope.locals || (Type.isArray(v.o) && typeof v.what === 'number')) { 1031 // it is either an array component being set or a property of an object. 1032 this.setProp(v.o, v.what, ret); 1033 } else { 1034 // this is just a local variable inside JessieCode 1035 this.letvar(v.what, ret); 1036 } 1037 1038 this.lhs[this.scope.id] = 0; 1039 break; 1040 case 'op_if': 1041 if (this.execute(node.children[0])) { 1042 ret = this.execute(node.children[1]); 1043 } 1044 break; 1045 case 'op_conditional': 1046 // fall through 1047 case 'op_if_else': 1048 if (this.execute(node.children[0])) { 1049 ret = this.execute(node.children[1]); 1050 } else { 1051 ret = this.execute(node.children[2]); 1052 } 1053 break; 1054 case 'op_while': 1055 while (this.execute(node.children[0])) { 1056 this.execute(node.children[1]); 1057 } 1058 break; 1059 case 'op_do': 1060 do { 1061 this.execute(node.children[0]); 1062 } while (this.execute(node.children[1])); 1063 break; 1064 case 'op_for': 1065 for (this.execute(node.children[0]); this.execute(node.children[1]); this.execute(node.children[2])) { 1066 this.execute(node.children[3]); 1067 } 1068 break; 1069 case 'op_proplst': 1070 if (node.children[0]) { 1071 this.execute(node.children[0]); 1072 } 1073 if (node.children[1]) { 1074 this.execute(node.children[1]); 1075 } 1076 break; 1077 case 'op_emptyobject': 1078 ret = {}; 1079 break; 1080 case 'op_proplst_val': 1081 this.propstack.push({}); 1082 this.propscope++; 1083 1084 this.execute(node.children[0]); 1085 ret = this.propstack[this.propscope]; 1086 1087 this.propstack.pop(); 1088 this.propscope--; 1089 break; 1090 case 'op_prop': 1091 // child 0: Identifier 1092 // child 1: Value 1093 this.propstack[this.propscope][node.children[0]] = this.execute(node.children[1]); 1094 break; 1095 case 'op_array': 1096 ret = []; 1097 l = node.children[0].length; 1098 1099 for (i = 0; i < l; i++) { 1100 ret.push(this.execute(node.children[0][i])); 1101 } 1102 1103 break; 1104 case 'op_extvalue': 1105 ret = this.execute(node.children[0]); 1106 i = this.execute(node.children[1]); 1107 1108 if (typeof i === 'number' && Math.abs(Math.round(i) - i) < Mat.eps) { 1109 ret = ret[i]; 1110 } else { 1111 ret = undef; 1112 } 1113 break; 1114 case 'op_return': 1115 if (this.scope === 0) { 1116 this._error('Unexpected return.'); 1117 } else { 1118 return this.execute(node.children[0]); 1119 } 1120 break; 1121 case 'op_map': 1122 if (!node.children[1].isMath) { 1123 this._error('In a map only function calls and mathematical expressions are allowed.'); 1124 } 1125 1126 fun = this.defineFunction(node); 1127 fun.isMap = true; 1128 1129 ret = fun; 1130 break; 1131 case 'op_function': 1132 // parse the parameter list 1133 // after this, the parameters are in pstack 1134 1135 fun = this.defineFunction(node); 1136 fun.isMap = false; 1137 1138 ret = fun; 1139 break; 1140 case 'op_execfun': 1141 // node.children: 1142 // [0]: Name of the function 1143 // [1]: Parameter list as a parse subtree 1144 // [2]: Properties, only used in case of a create function 1145 this.dpstack.push([]); 1146 this.pscope++; 1147 1148 // parameter parsing is done below 1149 list = node.children[1]; 1150 1151 // parse the properties only if given 1152 if (Type.exists(node.children[2])) { 1153 if (node.children[3]) { 1154 ilist = node.children[2]; 1155 attr = {}; 1156 1157 for (i = 0; i < ilist.length; i++) { 1158 attr = Type.deepCopy(attr, this.execute(ilist[i]), true); 1159 } 1160 } else { 1161 attr = this.execute(node.children[2]); 1162 } 1163 } 1164 1165 // look up the variables name in the variable table 1166 fun = this.execute(node.children[0]); 1167 1168 // determine the scope the function wants to run in 1169 if (fun && fun.sc) { 1170 sc = fun.sc; 1171 } else { 1172 sc = this; 1173 } 1174 1175 if (!fun.creator && Type.exists(node.children[2])) { 1176 this._error('Unexpected value. Only element creators are allowed to have a value after the function call.'); 1177 } 1178 1179 // interpret ALL the parameters 1180 for (i = 0; i < list.length; i++) { 1181 parents[i] = this.execute(list[i]); 1182 this.dpstack[this.pscope].push({ 1183 line: node.children[1][i].line, 1184 // SketchBin currently works only if the last column of the 1185 // parent position is taken. This is due to how I patched JS/CC 1186 // to count the lines and columns. So, ecol will do for now 1187 col: node.children[1][i].ecol 1188 }); 1189 } 1190 1191 // check for the function in the variable table 1192 if (typeof fun === 'function' && !fun.creator) { 1193 ret = fun.apply(sc, parents); 1194 } else if (typeof fun === 'function' && !!fun.creator) { 1195 e = this.line; 1196 1197 // creator methods are the only ones that take properties, hence this special case 1198 try { 1199 ret = fun(parents, attr); 1200 ret.jcLineStart = e; 1201 ret.jcLineEnd = node.eline; 1202 1203 for (i = e; i <= node.line; i++) { 1204 this.lineToElement[i] = ret; 1205 } 1206 1207 ret.debugParents = this.dpstack[this.pscope]; 1208 } catch (ex) { 1209 this._error(ex.toString()); 1210 } 1211 } else { 1212 this._error('Function \'' + fun + '\' is undefined.'); 1213 } 1214 1215 // clear parameter stack 1216 this.dpstack.pop(); 1217 this.pscope--; 1218 break; 1219 case 'op_property': 1220 e = this.execute(node.children[0]); 1221 v = node.children[1]; 1222 1223 ret = this.resolveProperty(e, v, false); 1224 1225 // set the scope, in case this is a method the user wants to call 1226 if (Type.exists(ret)) { 1227 ret.sc = e; 1228 } 1229 1230 break; 1231 case 'op_use': 1232 this._warn('Use of the \'use\' operator is deprecated.'); 1233 this.use(node.children[0].toString()); 1234 break; 1235 case 'op_delete': 1236 this._warn('Use of the \'delete\' operator is deprecated. Please use the remove() function.'); 1237 v = this.getvar(node.children[0]); 1238 ret = this.del(v); 1239 break; 1240 case 'op_equ': 1241 // == is intentional 1242 /*jslint eqeq:true*/ 1243 ret = this.execute(node.children[0]) == this.execute(node.children[1]); 1244 /*jslint eqeq:false*/ 1245 break; 1246 case 'op_neq': 1247 // != is intentional 1248 /*jslint eqeq:true*/ 1249 ret = this.execute(node.children[0]) != this.execute(node.children[1]); 1250 /*jslint eqeq:true*/ 1251 break; 1252 case 'op_approx': 1253 ret = Math.abs(this.execute(node.children[0]) - this.execute(node.children[1])) < Mat.eps; 1254 break; 1255 case 'op_grt': 1256 ret = this.execute(node.children[0]) > this.execute(node.children[1]); 1257 break; 1258 case 'op_lot': 1259 ret = this.execute(node.children[0]) < this.execute(node.children[1]); 1260 break; 1261 case 'op_gre': 1262 ret = this.execute(node.children[0]) >= this.execute(node.children[1]); 1263 break; 1264 case 'op_loe': 1265 ret = this.execute(node.children[0]) <= this.execute(node.children[1]); 1266 break; 1267 case 'op_or': 1268 ret = this.execute(node.children[0]) || this.execute(node.children[1]); 1269 break; 1270 case 'op_and': 1271 ret = this.execute(node.children[0]) && this.execute(node.children[1]); 1272 break; 1273 case 'op_not': 1274 ret = !this.execute(node.children[0]); 1275 break; 1276 case 'op_add': 1277 ret = this.add(this.execute(node.children[0]), this.execute(node.children[1])); 1278 break; 1279 case 'op_sub': 1280 ret = this.sub(this.execute(node.children[0]), this.execute(node.children[1])); 1281 break; 1282 case 'op_div': 1283 ret = this.div(this.execute(node.children[0]), this.execute(node.children[1])); 1284 break; 1285 case 'op_mod': 1286 // use mathematical modulo, JavaScript implements the symmetric modulo. 1287 ret = this.mod(this.execute(node.children[0]), this.execute(node.children[1]), true); 1288 break; 1289 case 'op_mul': 1290 ret = this.mul(this.execute(node.children[0]), this.execute(node.children[1])); 1291 break; 1292 case 'op_exp': 1293 ret = this.pow(this.execute(node.children[0]), this.execute(node.children[1])); 1294 break; 1295 case 'op_neg': 1296 ret = this.execute(node.children[0]) * -1; 1297 break; 1298 } 1299 break; 1300 1301 case 'node_var': 1302 ret = this.getvar(node.value); 1303 break; 1304 1305 case 'node_const': 1306 ret = Number(node.value); 1307 break; 1308 1309 case 'node_const_bool': 1310 ret = node.value; 1311 break; 1312 1313 case 'node_str': 1314 //ret = node.value.replace(/\\'/, "'").replace(/\\"/, '"').replace(/\\\\/, '\\'); 1315 /*jslint regexp:true*/ 1316 ret = node.value.replace(/\\(.)/, '$1'); 1317 /*jslint regexp:false*/ 1318 break; 1319 } 1320 1321 return ret; 1322 }, 1323 1324 /** 1325 * Compiles a parse tree back to JessieCode. 1326 * @param {Object} node 1327 * @param {Boolean} [js=false] Currently ignored. Compile either to JavaScript or back to JessieCode (required for the UI). 1328 * @returns Something 1329 * @private 1330 */ 1331 compile: function (node, js) { 1332 var e, i, list, scope, 1333 ret = ''; 1334 1335 if (!Type.exists(js)) { 1336 js = false; 1337 } 1338 1339 if (!node) { 1340 return ret; 1341 } 1342 1343 switch (node.type) { 1344 case 'node_op': 1345 switch (node.value) { 1346 case 'op_none': 1347 if (node.children[0]) { 1348 ret = this.compile(node.children[0], js); 1349 } 1350 if (node.children[1]) { 1351 ret += this.compile(node.children[1], js); 1352 } 1353 break; 1354 case 'op_assign': 1355 //e = this.compile(node.children[0], js); 1356 if (js) { 1357 e = this.getLHSCompiler(node.children[0]); 1358 if (Type.isArray(e)) { 1359 ret = '$jc$.setProp(' + e[0] + ', ' + e[1] + ', ' + this.compile(node.children[1], js) + ');\n'; 1360 } else { 1361 if (this.isLocalVariable(e) !== this.scope) { 1362 this.scope.locals[e] = true; 1363 } 1364 ret = '$jc$.scopes[' + this.scope.id + '].locals[\'' + e + '\'] = ' + this.compile(node.children[1], js) + ';\n'; 1365 } 1366 } else { 1367 e = this.compile(node.children[0]); 1368 ret = e + ' = ' + this.compile(node.children[1], js) + ';\n'; 1369 } 1370 1371 break; 1372 case 'op_if': 1373 ret = ' if (' + this.compile(node.children[0], js) + ') ' + this.compile(node.children[1], js); 1374 break; 1375 case 'op_if_else': 1376 ret = ' if (' + this.compile(node.children[0], js) + ')' + this.compile(node.children[1], js); 1377 ret += ' else ' + this.compile(node.children[2], js); 1378 break; 1379 case 'op_conditional': 1380 ret = '((' + this.compile(node.children[0], js) + ')?(' + this.compile(node.children[1], js); 1381 ret += '):(' + this.compile(node.children[2], js) + '))'; 1382 break; 1383 case 'op_while': 1384 ret = ' while (' + this.compile(node.children[0], js) + ') {\n' + this.compile(node.children[1], js) + '}\n'; 1385 break; 1386 case 'op_do': 1387 ret = ' do {\n' + this.compile(node.children[0], js) + '} while (' + this.compile(node.children[1], js) + ');\n'; 1388 break; 1389 case 'op_for': 1390 ret = ' for (' + this.compile(node.children[0], js) + '; ' + this.compile(node.children[1], js) + '; ' + this.compile(node.children[2], js) + ') {\n' + this.compile(node.children[3], js) + '\n}\n'; 1391 break; 1392 case 'op_proplst': 1393 if (node.children[0]) { 1394 ret = this.compile(node.children[0], js) + ', '; 1395 } 1396 1397 ret += this.compile(node.children[1], js); 1398 break; 1399 case 'op_prop': 1400 // child 0: Identifier 1401 // child 1: Value 1402 ret = node.children[0] + ': ' + this.compile(node.children[1], js); 1403 break; 1404 case 'op_emptyobject': 1405 ret = js ? '{}' : '<< >>'; 1406 break; 1407 case 'op_proplst_val': 1408 ret = this.compile(node.children[0], js); 1409 break; 1410 case 'op_array': 1411 list = []; 1412 for (i = 0; i < node.children[0].length; i++) { 1413 list.push(this.compile(node.children[0][i]), js); 1414 } 1415 ret = '[' + list.join(', ') + ']'; 1416 break; 1417 case 'op_extvalue': 1418 ret = this.compile(node.children[0], js) + '[' + this.compile(node.children[1], js) + ']'; 1419 break; 1420 case 'op_return': 1421 ret = ' return ' + this.compile(node.children[0], js) + ';\n'; 1422 break; 1423 case 'op_map': 1424 if (!node.children[1].isMath) { 1425 this._error('In a map only function calls and mathematical expressions are allowed.'); 1426 } 1427 1428 list = node.children[0]; 1429 if (js) { 1430 ret = ' $jc$.makeMap(function (' + list.join(', ') + ') { return ' + this.compile(node.children[1], js) + '; })'; 1431 } else { 1432 ret = 'map (' + list.join(', ') + ') -> ' + this.compile(node.children[1], js); 1433 } 1434 break; 1435 case 'op_function': 1436 list = node.children[0]; 1437 scope = this.pushScope(list); 1438 if (js) { 1439 ret = this.functionCodeJS(node); 1440 } else { 1441 ret = ' function (' + list.join(', ') + ') ' + this.compile(node.children[1], js); 1442 } 1443 this.popScope(); 1444 break; 1445 case 'op_execfunmath': 1446 console.log('TODO'); 1447 ret = '-1'; 1448 break; 1449 case 'op_execfun': 1450 // parse the properties only if given 1451 if (node.children[2]) { 1452 list = []; 1453 for (i = 0; i < node.children[2].length; i++) { 1454 list.push(this.compile(node.children[2][i], js)); 1455 } 1456 1457 if (js) { 1458 e = '$jc$.mergeAttributes(' + list.join(', ') + ')'; 1459 } 1460 } 1461 node.children[0].withProps = !!node.children[2]; 1462 list = []; 1463 for (i = 0; i < node.children[1].length; i++) { 1464 list.push(this.compile(node.children[1][i], js)); 1465 } 1466 ret = this.compile(node.children[0], js) + '(' + list.join(', ') + (node.children[2] && js ? ', ' + e : '') + ')' + (node.children[2] && !js ? e : ''); 1467 1468 // save us a function call when compiled to javascript 1469 if (js && node.children[0].value === '$') { 1470 ret = '$jc$.board.objects[' + this.compile(node.children[1][0], js) + ']'; 1471 } 1472 1473 break; 1474 case 'op_property': 1475 if (js && node.children[1] !== 'X' && node.children[1] !== 'Y') { 1476 ret = '$jc$.resolveProperty(' + this.compile(node.children[0], js) + ', \'' + node.children[1] + '\', true)'; 1477 } else { 1478 ret = this.compile(node.children[0], js) + '.' + node.children[1]; 1479 } 1480 break; 1481 case 'op_use': 1482 this._warn('Use of the \'use\' operator is deprecated.'); 1483 if (js) { 1484 ret = '$jc$.use(\''; 1485 } else { 1486 ret = 'use(\''; 1487 } 1488 1489 ret += node.children[0].toString() + '\');'; 1490 break; 1491 case 'op_delete': 1492 this._warn('Use of the \'delete\' operator is deprecated. Please use the remove() function.'); 1493 if (js) { 1494 ret = '$jc$.del('; 1495 } else { 1496 ret = 'remove('; 1497 } 1498 1499 ret += this.compile(node.children[0], js) + ')'; 1500 break; 1501 case 'op_equ': 1502 ret = '(' + this.compile(node.children[0], js) + ' == ' + this.compile(node.children[1], js) + ')'; 1503 break; 1504 case 'op_neq': 1505 ret = '(' + this.compile(node.children[0], js) + ' != ' + this.compile(node.children[1], js) + ')'; 1506 break; 1507 case 'op_approx': 1508 ret = '(' + this.compile(node.children[0], js) + ' ~= ' + this.compile(node.children[1], js) + ')'; 1509 break; 1510 case 'op_grt': 1511 ret = '(' + this.compile(node.children[0], js) + ' > ' + this.compile(node.children[1], js) + ')'; 1512 break; 1513 case 'op_lot': 1514 ret = '(' + this.compile(node.children[0], js) + ' < ' + this.compile(node.children[1], js) + ')'; 1515 break; 1516 case 'op_gre': 1517 ret = '(' + this.compile(node.children[0], js) + ' >= ' + this.compile(node.children[1], js) + ')'; 1518 break; 1519 case 'op_loe': 1520 ret = '(' + this.compile(node.children[0], js) + ' <= ' + this.compile(node.children[1], js) + ')'; 1521 break; 1522 case 'op_or': 1523 ret = '(' + this.compile(node.children[0], js) + ' || ' + this.compile(node.children[1], js) + ')'; 1524 break; 1525 case 'op_and': 1526 ret = '(' + this.compile(node.children[0], js) + ' && ' + this.compile(node.children[1], js) + ')'; 1527 break; 1528 case 'op_not': 1529 ret = '!(' + this.compile(node.children[0], js) + ')'; 1530 break; 1531 case 'op_add': 1532 if (js) { 1533 ret = '$jc$.add(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ')'; 1534 } else { 1535 ret = '(' + this.compile(node.children[0], js) + ' + ' + this.compile(node.children[1], js) + ')'; 1536 } 1537 break; 1538 case 'op_sub': 1539 if (js) { 1540 ret = '$jc$.sub(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ')'; 1541 } else { 1542 ret = '(' + this.compile(node.children[0], js) + ' - ' + this.compile(node.children[1], js) + ')'; 1543 } 1544 break; 1545 case 'op_div': 1546 if (js) { 1547 ret = '$jc$.div(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ')'; 1548 } else { 1549 ret = '(' + this.compile(node.children[0], js) + ' / ' + this.compile(node.children[1], js) + ')'; 1550 } 1551 break; 1552 case 'op_mod': 1553 if (js) { 1554 ret = '$jc$.mod(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ', true)'; 1555 } else { 1556 ret = '(' + this.compile(node.children[0], js) + ' % ' + this.compile(node.children[1], js) + ')'; 1557 } 1558 break; 1559 case 'op_mul': 1560 if (js) { 1561 ret = '$jc$.mul(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ')'; 1562 } else { 1563 ret = '(' + this.compile(node.children[0], js) + ' * ' + this.compile(node.children[1], js) + ')'; 1564 } 1565 break; 1566 case 'op_exp': 1567 if (js) { 1568 ret = '$jc$.pow(' + this.compile(node.children[0], js) + ', ' + this.compile(node.children[1], js) + ')'; 1569 } else { 1570 ret = '(' + this.compile(node.children[0], js) + '^' + this.compile(node.children[1], js) + ')'; 1571 } 1572 break; 1573 case 'op_neg': 1574 ret = '(-' + this.compile(node.children[0], js) + ')'; 1575 break; 1576 } 1577 break; 1578 1579 case 'node_var': 1580 if (js) { 1581 ret = this.getvarJS(node.value, false, node.withProps); 1582 } else { 1583 ret = node.value; 1584 } 1585 break; 1586 1587 case 'node_const': 1588 ret = node.value; 1589 break; 1590 1591 case 'node_const_bool': 1592 ret = node.value; 1593 break; 1594 1595 case 'node_str': 1596 ret = '\'' + node.value + '\''; 1597 break; 1598 } 1599 1600 if (node.needsBrackets) { 1601 ret = '{\n' + ret + '}\n'; 1602 } 1603 1604 return ret; 1605 }, 1606 1607 /** 1608 * This is used as the global X() function. 1609 * @param {JXG.Point|JXG.Text} e 1610 * @returns {Number} 1611 */ 1612 X: function (e) { 1613 return e.X(); 1614 }, 1615 1616 /** 1617 * This is used as the global Y() function. 1618 * @param {JXG.Point|JXG.Text} e 1619 * @returns {Number} 1620 */ 1621 Y: function (e) { 1622 return e.Y(); 1623 }, 1624 1625 /** 1626 * This is used as the global V() function. 1627 * @param {Glider|Slider} e 1628 * @returns {Number} 1629 */ 1630 V: function (e) { 1631 return e.Value(); 1632 }, 1633 1634 /** 1635 * This is used as the global L() function. 1636 * @param {JXG.Line} e 1637 * @returns {Number} 1638 */ 1639 L: function (e) { 1640 return e.L(); 1641 }, 1642 1643 /** 1644 * This is used as the global dist() function. 1645 * @param {JXG.Point} p1 1646 * @param {JXG.Point} p2 1647 * @returns {Number} 1648 */ 1649 dist: function (p1, p2) { 1650 if (!Type.exists(p1) || !Type.exists(p1.Dist)) { 1651 this._error('Error: Can\'t calculate distance.'); 1652 } 1653 1654 return p1.Dist(p2); 1655 }, 1656 1657 /** 1658 * + operator implementation 1659 * @param {Number|Array|JXG.Point} a 1660 * @param {Number|Array|JXG.Point} b 1661 * @returns {Number|Array} 1662 */ 1663 add: function (a, b) { 1664 var i, len, res; 1665 1666 a = Type.evalSlider(a); 1667 b = Type.evalSlider(b); 1668 1669 if (Type.isArray(a) && Type.isArray(b)) { 1670 len = Math.min(a.length, b.length); 1671 res = []; 1672 1673 for (i = 0; i < len; i++) { 1674 res[i] = a[i] + b[i]; 1675 } 1676 } else if (Type.isNumber(a) && Type.isNumber(b)) { 1677 res = a + b; 1678 } else if (Type.isString(a) || Type.isString(b)) { 1679 res = a.toString() + b.toString(); 1680 } else { 1681 this._error('Operation + not defined on operands ' + typeof a + ' and ' + typeof b); 1682 } 1683 1684 return res; 1685 }, 1686 1687 /** 1688 * + operator implementation 1689 * @param {Number|Array|JXG.Point} a 1690 * @param {Number|Array|JXG.Point} b 1691 * @returns {Number|Array} 1692 */ 1693 sub: function (a, b) { 1694 var i, len, res; 1695 1696 a = Type.evalSlider(a); 1697 b = Type.evalSlider(b); 1698 1699 if (Type.isArray(a) && Type.isArray(b)) { 1700 len = Math.min(a.length, b.length); 1701 res = []; 1702 1703 for (i = 0; i < len; i++) { 1704 res[i] = a[i] - b[i]; 1705 } 1706 } else if (Type.isNumber(a) && Type.isNumber(b)) { 1707 res = a - b; 1708 } else { 1709 this._error('Operation - not defined on operands ' + typeof a + ' and ' + typeof b); 1710 } 1711 1712 return res; 1713 }, 1714 1715 /** 1716 * Multiplication of vectors and numbers 1717 * @param {Number|Array} a 1718 * @param {Number|Array} b 1719 * @returns {Number|Array} (Inner) product of the given input values. 1720 */ 1721 mul: function (a, b) { 1722 var i, len, res; 1723 1724 a = Type.evalSlider(a); 1725 b = Type.evalSlider(b); 1726 1727 if (Type.isArray(a) && Type.isNumber(b)) { 1728 // swap b and a 1729 i = a; 1730 a = b; 1731 b = a; 1732 } 1733 1734 if (Type.isArray(a) && Type.isArray(b)) { 1735 len = Math.min(a.length, b.length); 1736 res = Mat.innerProduct(a, b, len); 1737 } else if (Type.isNumber(a) && Type.isArray(b)) { 1738 len = b.length; 1739 res = []; 1740 1741 for (i = 0; i < len; i++) { 1742 res[i] = a * b[i]; 1743 } 1744 } else if (Type.isNumber(a) && Type.isNumber(b)) { 1745 res = a * b; 1746 } else { 1747 this._error('Operation * not defined on operands ' + typeof a + ' and ' + typeof b); 1748 } 1749 1750 return res; 1751 }, 1752 1753 /** 1754 * Implementation of the / operator. 1755 * @param {Number|Array} a 1756 * @param {Number} b 1757 * @returns {Number|Array} 1758 */ 1759 div: function (a, b) { 1760 var i, len, res; 1761 1762 a = Type.evalSlider(a); 1763 b = Type.evalSlider(b); 1764 1765 if (Type.isArray(a) && Type.isNumber(b)) { 1766 len = a.length; 1767 res = []; 1768 1769 for (i = 0; i < len; i++) { 1770 res[i] = a[i] / b; 1771 } 1772 } else if (Type.isNumber(a) && Type.isNumber(b)) { 1773 res = a / b; 1774 } else { 1775 this._error('Operation * not defined on operands ' + typeof a + ' and ' + typeof b); 1776 } 1777 1778 return res; 1779 }, 1780 1781 /** 1782 * Implementation of the % operator. 1783 * @param {Number|Array} a 1784 * @param {Number} b 1785 * @returns {Number|Array} 1786 */ 1787 mod: function (a, b) { 1788 var i, len, res; 1789 1790 a = Type.evalSlider(a); 1791 b = Type.evalSlider(b); 1792 1793 if (Type.isArray(a) && Type.isNumber(b)) { 1794 len = a.length; 1795 res = []; 1796 1797 for (i = 0; i < len; i++) { 1798 res[i] = Mat.mod(a[i], b, true); 1799 } 1800 } else if (Type.isNumber(a) && Type.isNumber(b)) { 1801 res = Mat.mod(a, b, true); 1802 } else { 1803 this._error('Operation * not defined on operands ' + typeof a + ' and ' + typeof b); 1804 } 1805 1806 return res; 1807 }, 1808 1809 /** 1810 * Pow function wrapper to allow direct usage of sliders. 1811 * @param {Number|Slider} a 1812 * @param {Number|Slider} b 1813 * @returns {Number} 1814 */ 1815 pow: function (a, b) { 1816 a = Type.evalSlider(a); 1817 b = Type.evalSlider(b); 1818 1819 return Math.pow(a, b); 1820 }, 1821 1822 /** 1823 * Implementation of the ?: operator 1824 * @param {Boolean} cond Condition 1825 * @param {*} v1 1826 * @param {*} v2 1827 * @returns {*} Either v1 or v2. 1828 */ 1829 ifthen: function (cond, v1, v2) { 1830 if (cond) { 1831 return v1; 1832 } 1833 1834 return v2; 1835 }, 1836 1837 /** 1838 * Implementation of the delete() builtin function 1839 * @param {JXG.GeometryElement} element 1840 */ 1841 del: function (element) { 1842 if (typeof element === 'object' && JXG.exists(element.type) && JXG.exists(element.elementClass)) { 1843 this.board.removeObject(element); 1844 } 1845 }, 1846 1847 /** 1848 * Implementation of the use() builtin function 1849 * @param {String} board 1850 */ 1851 use: function (board) { 1852 var b, ref, 1853 found = false; 1854 1855 if (typeof board === 'string') { 1856 // search all the boards for the one with the appropriate container div 1857 for (b in JXG.boards) { 1858 if (JXG.boards.hasOwnProperty(b) && JXG.boards[b].container === board) { 1859 ref = JXG.boards[b]; 1860 found = true; 1861 break; 1862 } 1863 } 1864 } else { 1865 ref = board; 1866 found = true; 1867 } 1868 1869 if (found) { 1870 this.board = ref; 1871 this.builtIn.$board = ref; 1872 this.builtIn.$board.src = '$jc$.board'; 1873 } else { 1874 this._error('Board \'' + board + '\' not found!'); 1875 } 1876 }, 1877 1878 /** 1879 * Find the first symbol to the given value from the given scope upwards. 1880 * @param v Value 1881 * @param {Number} [scope=-1] The scope, default is to start with current scope (-1). 1882 * @returns {Array} An array containing the symbol and the scope if a symbol could be found, 1883 * an empty array otherwise; 1884 */ 1885 findSymbol: function (v, scope) { 1886 var i, s; 1887 1888 scope = Type.def(scope, -1); 1889 1890 if (scope === -1) { 1891 s = this.scope; 1892 } else { 1893 s = this.scopes[scope]; 1894 } 1895 1896 while (s !== null) { 1897 for (i in s.locals) { 1898 if (s.locals.hasOwnProperty(i) && s.locals[i] === v) { 1899 return [i, s]; 1900 } 1901 } 1902 1903 s = s.previous; 1904 } 1905 1906 return []; 1907 }, 1908 1909 /** 1910 * Import modules into a JessieCode script. 1911 * @param {String} module 1912 */ 1913 importModule: function (module) { 1914 return priv.modules[module.toLowerCase()]; 1915 }, 1916 1917 /** 1918 * Defines built in methods and constants. 1919 * @returns {Object} BuiltIn control object 1920 */ 1921 defineBuiltIn: function () { 1922 var that = this, 1923 builtIn = { 1924 PI: Math.PI, 1925 EULER: Math.E, 1926 X: that.X, 1927 Y: that.Y, 1928 V: that.V, 1929 L: that.L, 1930 dist: that.dist, 1931 rad: Geometry.rad, 1932 deg: Geometry.trueAngle, 1933 factorial: Mat.factorial, 1934 trunc: Type.trunc, 1935 log: Mat.log, 1936 ln: Math.log, 1937 log10: Mat.log10, 1938 lg: Mat.log10, 1939 log2: Mat.log2, 1940 lb: Mat.log2, 1941 ld: Mat.log2, 1942 cosh: Mat.cosh, 1943 sinh: Mat.sinh, 1944 IfThen: that.ifthen, 1945 'import': that.importModule, 1946 'use': that.use, 1947 'remove': that.del, 1948 '$': that.getElementById, 1949 '$board': that.board, 1950 '$log': that.log 1951 }; 1952 1953 // special scopes for factorial, deg, and rad 1954 builtIn.rad.sc = Geometry; 1955 builtIn.deg.sc = Geometry; 1956 builtIn.factorial.sc = Mat; 1957 1958 // set the javascript equivalent for the builtIns 1959 // some of the anonymous functions should be replaced by global methods later on 1960 // EULER and PI don't get a source attribute - they will be lost anyways and apparently 1961 // some browser will throw an exception when a property is assigned to a primitive value. 1962 builtIn.X.src = '$jc$.X'; 1963 builtIn.Y.src = '$jc$.Y'; 1964 builtIn.V.src = '$jc$.V'; 1965 builtIn.L.src = '$jc$.L'; 1966 builtIn.dist.src = '$jc$.dist'; 1967 builtIn.rad.src = 'JXG.Math.Geometry.rad'; 1968 builtIn.deg.src = 'JXG.Math.Geometry.trueAngle'; 1969 builtIn.factorial.src = 'JXG.Math.factorial'; 1970 builtIn.trunc.src = 'JXG.trunc'; 1971 builtIn.ln.src = 'Math.log'; 1972 builtIn.log10.src = 'JXG.Math.log10'; 1973 builtIn.lg.src = 'JXG.Math.log10'; 1974 builtIn.log2.src = 'JXG.Math.log2'; 1975 builtIn.lb.src = 'JXG.Math.log2'; 1976 builtIn.ld.src = 'JXG.Math.log2'; 1977 builtIn.cosh.src = 'JXG.Math.cosh'; 1978 builtIn.sinh.src = 'JXG.Math.sinh'; 1979 builtIn['import'].src = '$jc$.importModule'; 1980 builtIn.use.src = '$jc$.use'; 1981 builtIn.remove.src = '$jc$.del'; 1982 builtIn.IfThen.src = '$jc$.ifthen'; 1983 // usually unused, see node_op > op_execfun 1984 builtIn.$.src = '(function (n) { return $jc$.board.select(n); })'; 1985 if (builtIn.$board) { 1986 builtIn.$board.src = '$jc$.board'; 1987 } 1988 builtIn.$log.src = '$jc$.log'; 1989 1990 return builtIn; 1991 }, 1992 1993 /** 1994 * Output a debugging message. Uses debug console, if available. Otherwise an HTML element with the 1995 * id "debug" and an innerHTML property is used. 1996 * @param {String} log 1997 * @private 1998 */ 1999 _debug: function (log) { 2000 if (typeof console === 'object') { 2001 console.log(log); 2002 } else if (Env.isBrowser && document && document.getElementById('debug') !== null) { 2003 document.getElementById('debug').innerHTML += log + '<br />'; 2004 } 2005 }, 2006 2007 /** 2008 * Throws an exception with the given error message. 2009 * @param {String} msg Error message 2010 */ 2011 _error: function (msg) { 2012 var e = new Error('Error(' + this.line + '): ' + msg); 2013 e.line = this.line; 2014 throw e; 2015 }, 2016 2017 /** 2018 * Output a warning message using {@link JXG#debug} and precedes the message with "Warning: ". 2019 * @param {String} msg 2020 */ 2021 _warn: function (msg) { 2022 if (typeof console === 'object') { 2023 console.log('Warning(' + this.line + '): ' + msg); 2024 } else if (Env.isBrowser && document && document.getElementById(this.warnLog) !== null) { 2025 document.getElementById(this.warnLog).innerHTML += 'Warning(' + this.line + '): ' + msg + '<br />'; 2026 } 2027 }, 2028 2029 _log: function (msg) { 2030 if (typeof window !== 'object' && typeof self === 'object' && self.postMessage) { 2031 self.postMessage({type: 'log', msg: 'Log: ' + msg.toString()}); 2032 } else { 2033 console.log('Log: ', arguments); 2034 } 2035 } 2036 2037 }); 2038 2039 /* parser generated by jison 0.4.13 */ 2040 /* 2041 Returns a Parser object of the following structure: 2042 2043 Parser: { 2044 yy: {} 2045 } 2046 2047 Parser.prototype: { 2048 yy: {}, 2049 trace: function(), 2050 symbols_: {associative list: name ==> number}, 2051 terminals_: {associative list: number ==> name}, 2052 productions_: [...], 2053 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), 2054 table: [...], 2055 defaultActions: {...}, 2056 parseError: function(str, hash), 2057 parse: function(input), 2058 2059 lexer: { 2060 EOF: 1, 2061 parseError: function(str, hash), 2062 setInput: function(input), 2063 input: function(), 2064 unput: function(str), 2065 more: function(), 2066 less: function(n), 2067 pastInput: function(), 2068 upcomingInput: function(), 2069 showPosition: function(), 2070 test_match: function(regex_match_array, rule_index), 2071 next: function(), 2072 lex: function(), 2073 begin: function(condition), 2074 popState: function(), 2075 _currentRules: function(), 2076 topState: function(), 2077 pushState: function(condition), 2078 2079 options: { 2080 ranges: boolean (optional: true ==> token location info will include a .range[] member) 2081 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) 2082 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) 2083 }, 2084 2085 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), 2086 rules: [...], 2087 conditions: {associative list: name ==> set}, 2088 } 2089 } 2090 2091 2092 token location info (@$, _$, etc.): { 2093 first_line: n, 2094 last_line: n, 2095 first_column: n, 2096 last_column: n, 2097 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) 2098 } 2099 2100 2101 the parseError function receives a 'hash' object with these members for lexer and parser errors: { 2102 text: (matched text) 2103 token: (the produced terminal token, if any) 2104 line: (yylineno) 2105 } 2106 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { 2107 loc: (yylloc) 2108 expected: (string describing the set of expected tokens) 2109 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) 2110 } 2111 */ 2112 var parser = (function(){ 2113 var parser = {trace: function trace() { }, 2114 yy: {}, 2115 symbols_: {"error":2,"Program":3,"StatementList":4,"EOF":5,"IfStatement":6,"IF":7,"(":8,"Expression":9,")":10,"Statement":11,"ELSE":12,"LoopStatement":13,"WHILE":14,"FOR":15,";":16,"DO":17,"UnaryStatement":18,"USE":19,"IDENTIFIER":20,"DELETE":21,"ReturnStatement":22,"RETURN":23,"EmptyStatement":24,"StatementBlock":25,"{":26,"}":27,"ExpressionStatement":28,"AssignmentExpression":29,"ConditionalExpression":30,"LeftHandSideExpression":31,"=":32,"LogicalORExpression":33,"?":34,":":35,"LogicalANDExpression":36,"||":37,"EqualityExpression":38,"&&":39,"RelationalExpression":40,"==":41,"!=":42,"~=":43,"AdditiveExpression":44,"<":45,">":46,"<=":47,">=":48,"MultiplicativeExpression":49,"+":50,"-":51,"UnaryExpression":52,"*":53,"/":54,"%":55,"ExponentExpression":56,"^":57,"!":58,"MemberExpression":59,"CallExpression":60,"PrimaryExpression":61,"FunctionExpression":62,"MapExpression":63,".":64,"[":65,"]":66,"BasicLiteral":67,"ObjectLiteral":68,"ArrayLiteral":69,"NullLiteral":70,"BooleanLiteral":71,"StringLiteral":72,"NumberLiteral":73,"NULL":74,"TRUE":75,"FALSE":76,"STRING":77,"NUMBER":78,"NAN":79,"INFINITY":80,"ElementList":81,"<<":82,">>":83,"PropertyList":84,"Property":85,",":86,"PropertyName":87,"Arguments":88,"AttributeList":89,"Attribute":90,"FUNCTION":91,"ParameterDefinitionList":92,"MAP":93,"->":94,"$accept":0,"$end":1}, 2116 terminals_: {2:"error",5:"EOF",7:"IF",8:"(",10:")",12:"ELSE",14:"WHILE",15:"FOR",16:";",17:"DO",19:"USE",20:"IDENTIFIER",21:"DELETE",23:"RETURN",26:"{",27:"}",32:"=",34:"?",35:":",37:"||",39:"&&",41:"==",42:"!=",43:"~=",45:"<",46:">",47:"<=",48:">=",50:"+",51:"-",53:"*",54:"/",55:"%",57:"^",58:"!",64:".",65:"[",66:"]",74:"NULL",75:"TRUE",76:"FALSE",77:"STRING",78:"NUMBER",79:"NAN",80:"INFINITY",82:"<<",83:">>",86:",",91:"FUNCTION",93:"MAP",94:"->"}, 2117 productions_: [0,[3,2],[6,5],[6,7],[13,5],[13,9],[13,7],[18,2],[18,2],[22,2],[22,3],[24,1],[25,3],[4,2],[4,0],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[28,2],[9,1],[29,1],[29,3],[30,1],[30,5],[33,1],[33,3],[36,1],[36,3],[38,1],[38,3],[38,3],[38,3],[40,1],[40,3],[40,3],[40,3],[40,3],[44,1],[44,3],[44,3],[49,1],[49,3],[49,3],[49,3],[56,1],[56,3],[52,1],[52,2],[52,2],[52,2],[31,1],[31,1],[59,1],[59,1],[59,1],[59,3],[59,4],[61,1],[61,1],[61,1],[61,1],[61,3],[67,1],[67,1],[67,1],[67,1],[70,1],[71,1],[71,1],[72,1],[73,1],[73,1],[73,1],[69,2],[69,3],[68,2],[68,3],[84,1],[84,3],[85,3],[87,1],[87,1],[87,1],[60,2],[60,3],[60,2],[60,4],[60,3],[88,2],[88,3],[89,1],[89,3],[90,1],[90,1],[81,1],[81,3],[62,4],[62,5],[63,6],[92,1],[92,3]], 2118 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { 2119 /* this == yyval */ 2120 2121 var $0 = $$.length - 1; 2122 switch (yystate) { 2123 case 1: return $$[$0-1]; 2124 break; 2125 case 2: this.$ = AST.createNode(lc(_$[$0-4]), 'node_op', 'op_if', $$[$0-2], $$[$0]); 2126 break; 2127 case 3: this.$ = AST.createNode(lc(_$[$0-6]), 'node_op', 'op_if_else', $$[$0-4], $$[$0-2], $$[$0]); 2128 break; 2129 case 4: this.$ = AST.createNode(lc(_$[$0-4]), 'node_op', 'op_while', $$[$0-2], $$[$0]); 2130 break; 2131 case 5: this.$ = AST.createNode(lc(_$[$0-8]), 'node_op', 'op_for', $$[$0-6], $$[$0-4], $$[$0-2], $$[$0]); 2132 break; 2133 case 6: this.$ = AST.createNode(lc(_$[$0-6]), 'node_op', 'op_do', $$[$0-5], $$[$0-2]); 2134 break; 2135 case 7: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_use', $$[$0]); 2136 break; 2137 case 8: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_delete', $$[$0]); 2138 break; 2139 case 9: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_return', undefined); 2140 break; 2141 case 10: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_return', $$[$0-1]); 2142 break; 2143 case 11: this.$ = AST.createNode(lc(_$[$0]), 'node_op', 'op_none'); 2144 break; 2145 case 12: this.$ = $$[$0-1]; this.$.needsBrackets = true; 2146 break; 2147 case 13: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_none', $$[$0-1], $$[$0]); 2148 break; 2149 case 14: this.$ = AST.createNode(lc(_$[$0]), 'node_op', 'op_none'); 2150 break; 2151 case 15: this.$ = $$[$0]; 2152 break; 2153 case 16: this.$ = $$[$0]; 2154 break; 2155 case 17: this.$ = $$[$0]; 2156 break; 2157 case 18: this.$ = $$[$0]; 2158 break; 2159 case 19: this.$ = $$[$0]; 2160 break; 2161 case 20: this.$ = $$[$0]; 2162 break; 2163 case 21: this.$ = $$[$0]; 2164 break; 2165 case 22: this.$ = $$[$0-1]; 2166 break; 2167 case 23: this.$ = $$[$0]; 2168 break; 2169 case 24: this.$ = $$[$0]; 2170 break; 2171 case 25: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_assign', $$[$0-2], $$[$0]); this.$.isMath = false; 2172 break; 2173 case 26: this.$ = $$[$0]; 2174 break; 2175 case 27: this.$ = AST.createNode(lc(_$[$0-4]), 'node_op', 'op_conditional', $$[$0-4], $$[$0-2], $$[$0]); this.$.isMath = false; 2176 break; 2177 case 28: this.$ = $$[$0]; 2178 break; 2179 case 29: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_or', $$[$0-2], $$[$0]); this.$.isMath = false; 2180 break; 2181 case 30: this.$ = $$[$0]; 2182 break; 2183 case 31: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_and', $$[$0-2], $$[$0]); this.$.isMath = false; 2184 break; 2185 case 32: this.$ = $$[$0]; 2186 break; 2187 case 33: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_equ', $$[$0-2], $$[$0]); this.$.isMath = false; 2188 break; 2189 case 34: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_neq', $$[$0-2], $$[$0]); this.$.isMath = false; 2190 break; 2191 case 35: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_approx', $$[$0-2], $$[$0]); this.$.isMath = false; 2192 break; 2193 case 36: this.$ = $$[$0]; 2194 break; 2195 case 37: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_lot', $$[$0-2], $$[$0]); this.$.isMath = false; 2196 break; 2197 case 38: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_grt', $$[$0-2], $$[$0]); this.$.isMath = false; 2198 break; 2199 case 39: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_loe', $$[$0-2], $$[$0]); this.$.isMath = false; 2200 break; 2201 case 40: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_gre', $$[$0-2], $$[$0]); this.$.isMath = false; 2202 break; 2203 case 41: this.$ = $$[$0]; 2204 break; 2205 case 42: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_add', $$[$0-2], $$[$0]); this.$.isMath = true; 2206 break; 2207 case 43: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_sub', $$[$0-2], $$[$0]); this.$.isMath = true; 2208 break; 2209 case 44: this.$ = $$[$0]; 2210 break; 2211 case 45: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_mul', $$[$0-2], $$[$0]); this.$.isMath = true; 2212 break; 2213 case 46: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_div', $$[$0-2], $$[$0]); this.$.isMath = true; 2214 break; 2215 case 47: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_mod', $$[$0-2], $$[$0]); this.$.isMath = true; 2216 break; 2217 case 48: this.$ = $$[$0]; 2218 break; 2219 case 49: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_exp', $$[$0-2], $$[$0]); this.$.isMath = true; 2220 break; 2221 case 50: this.$ = $$[$0]; 2222 break; 2223 case 51: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_not', $$[$0]); this.$.isMath = false; 2224 break; 2225 case 52: this.$ = $$[$0]; 2226 break; 2227 case 53: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_neg', $$[$0]); this.$.isMath = true; 2228 break; 2229 case 54: this.$ = $$[$0]; 2230 break; 2231 case 55: this.$ = $$[$0]; 2232 break; 2233 case 56: this.$ = $$[$0]; 2234 break; 2235 case 57: this.$ = $$[$0]; this.$.isMath = false; 2236 break; 2237 case 58: this.$ = $$[$0]; 2238 break; 2239 case 59: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_property', $$[$0-2], $$[$0]); this.$.isMath = true; 2240 break; 2241 case 60: this.$ = AST.createNode(lc(_$[$0-3]), 'node_op', 'op_extvalue', $$[$0-3], $$[$0-1]); this.$.isMath = true; 2242 break; 2243 case 61: this.$ = AST.createNode(lc(_$[$0]), 'node_var', $$[$0]); 2244 break; 2245 case 62: this.$ = $$[$0]; 2246 break; 2247 case 63: this.$ = $$[$0]; this.$.isMath = false; 2248 break; 2249 case 64: this.$ = $$[$0]; this.$.isMath = false; 2250 break; 2251 case 65: this.$ = $$[$0-1]; 2252 break; 2253 case 66: this.$ = $$[$0]; this.$.isMath = false; 2254 break; 2255 case 67: this.$ = $$[$0]; this.$.isMath = false; 2256 break; 2257 case 68: this.$ = $$[$0]; this.$.isMath = false; 2258 break; 2259 case 69: this.$ = $$[$0]; this.$.isMath = true; 2260 break; 2261 case 70: this.$ = AST.createNode(lc(_$[$0]), 'node_const', null); 2262 break; 2263 case 71: this.$ = AST.createNode(lc(_$[$0]), 'node_const_bool', true); 2264 break; 2265 case 72: this.$ = AST.createNode(lc(_$[$0]), 'node_const_bool', false); 2266 break; 2267 case 73: this.$ = AST.createNode(lc(_$[$0]), 'node_str', $$[$0].substring(1, $$[$0].length - 1)); 2268 break; 2269 case 74: this.$ = AST.createNode(lc(_$[$0]), 'node_const', parseFloat($$[$0])); 2270 break; 2271 case 75: this.$ = AST.createNode(lc(_$[$0]), 'node_const', NaN); 2272 break; 2273 case 76: this.$ = AST.createNode(lc(_$[$0]), 'node_const', Infinity); 2274 break; 2275 case 77: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_array', []); 2276 break; 2277 case 78: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_array', $$[$0-1]); 2278 break; 2279 case 79: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_emptyobject', {}); 2280 break; 2281 case 80: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_proplst_val', $$[$0-1]); 2282 break; 2283 case 81: this.$ = $$[$0]; 2284 break; 2285 case 82: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_proplst', $$[$0-2], $$[$0]); 2286 break; 2287 case 83: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_prop', $$[$0-2], $$[$0]); 2288 break; 2289 case 84: this.$ = $$[$0]; 2290 break; 2291 case 85: this.$ = $$[$0]; 2292 break; 2293 case 86: this.$ = $$[$0]; 2294 break; 2295 case 87: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_execfun', $$[$0-1], $$[$0]); this.$.isMath = true; 2296 break; 2297 case 88: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_execfun', $$[$0-2], $$[$0-1], $$[$0], true); this.$.isMath = false; 2298 break; 2299 case 89: this.$ = AST.createNode(lc(_$[$0-1]), 'node_op', 'op_execfun', $$[$0-1], $$[$0]); this.$.isMath = true; 2300 break; 2301 case 90: this.$ = AST.createNode(lc(_$[$0-3]), 'node_op', 'op_extvalue', $$[$0-3], $$[$0-1]); this.$.isMath = true; 2302 break; 2303 case 91: this.$ = AST.createNode(lc(_$[$0-2]), 'node_op', 'op_property', $$[$0-2], $$[$0]); this.$.isMath = true; 2304 break; 2305 case 92: this.$ = []; 2306 break; 2307 case 93: this.$ = $$[$0-1]; 2308 break; 2309 case 94: this.$ = [$$[$0]]; 2310 break; 2311 case 95: this.$ = $$[$0-2].concat($$[$0]); 2312 break; 2313 case 96: this.$ = AST.createNode(lc(_$[$0]), 'node_var', $$[$0]); this.$.isMath = true; 2314 break; 2315 case 97: this.$ = $$[$0]; this.$.isMath = false; 2316 break; 2317 case 98: this.$ = [$$[$0]]; 2318 break; 2319 case 99: this.$ = $$[$0-2].concat($$[$0]); 2320 break; 2321 case 100: this.$ = AST.createNode(lc(_$[$0-3]), 'node_op', 'op_function', [], $$[$0]); this.$.isMath = false; 2322 break; 2323 case 101: this.$ = AST.createNode(lc(_$[$0-4]), 'node_op', 'op_function', $$[$0-2], $$[$0]); this.$.isMath = false; 2324 break; 2325 case 102: this.$ = AST.createNode(lc(_$[$0-5]), 'node_op', 'op_map', $$[$0-3], $$[$0]); 2326 break; 2327 case 103: this.$ = [$$[$0]]; 2328 break; 2329 case 104: this.$ = $$[$0-2].concat($$[$0]); 2330 break; 2331 } 2332 }, 2333 table: [{3:1,4:2,5:[2,14],7:[2,14],8:[2,14],14:[2,14],15:[2,14],16:[2,14],17:[2,14],19:[2,14],20:[2,14],21:[2,14],23:[2,14],26:[2,14],50:[2,14],51:[2,14],58:[2,14],65:[2,14],74:[2,14],75:[2,14],76:[2,14],77:[2,14],78:[2,14],79:[2,14],80:[2,14],82:[2,14],91:[2,14],93:[2,14]},{1:[3]},{5:[1,3],6:6,7:[1,13],8:[1,37],9:20,11:4,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{1:[2,1]},{5:[2,13],7:[2,13],8:[2,13],14:[2,13],15:[2,13],16:[2,13],17:[2,13],19:[2,13],20:[2,13],21:[2,13],23:[2,13],26:[2,13],27:[2,13],50:[2,13],51:[2,13],58:[2,13],65:[2,13],74:[2,13],75:[2,13],76:[2,13],77:[2,13],78:[2,13],79:[2,13],80:[2,13],82:[2,13],91:[2,13],93:[2,13]},{5:[2,15],7:[2,15],8:[2,15],12:[2,15],14:[2,15],15:[2,15],16:[2,15],17:[2,15],19:[2,15],20:[2,15],21:[2,15],23:[2,15],26:[2,15],27:[2,15],50:[2,15],51:[2,15],58:[2,15],65:[2,15],74:[2,15],75:[2,15],76:[2,15],77:[2,15],78:[2,15],79:[2,15],80:[2,15],82:[2,15],91:[2,15],93:[2,15]},{5:[2,16],7:[2,16],8:[2,16],12:[2,16],14:[2,16],15:[2,16],16:[2,16],17:[2,16],19:[2,16],20:[2,16],21:[2,16],23:[2,16],26:[2,16],27:[2,16],50:[2,16],51:[2,16],58:[2,16],65:[2,16],74:[2,16],75:[2,16],76:[2,16],77:[2,16],78:[2,16],79:[2,16],80:[2,16],82:[2,16],91:[2,16],93:[2,16]},{5:[2,17],7:[2,17],8:[2,17],12:[2,17],14:[2,17],15:[2,17],16:[2,17],17:[2,17],19:[2,17],20:[2,17],21:[2,17],23:[2,17],26:[2,17],27:[2,17],50:[2,17],51:[2,17],58:[2,17],65:[2,17],74:[2,17],75:[2,17],76:[2,17],77:[2,17],78:[2,17],79:[2,17],80:[2,17],82:[2,17],91:[2,17],93:[2,17]},{5:[2,18],7:[2,18],8:[2,18],12:[2,18],14:[2,18],15:[2,18],16:[2,18],17:[2,18],19:[2,18],20:[2,18],21:[2,18],23:[2,18],26:[2,18],27:[2,18],50:[2,18],51:[2,18],58:[2,18],65:[2,18],74:[2,18],75:[2,18],76:[2,18],77:[2,18],78:[2,18],79:[2,18],80:[2,18],82:[2,18],91:[2,18],93:[2,18]},{5:[2,19],7:[2,19],8:[2,19],12:[2,19],14:[2,19],15:[2,19],16:[2,19],17:[2,19],19:[2,19],20:[2,19],21:[2,19],23:[2,19],26:[2,19],27:[2,19],50:[2,19],51:[2,19],58:[2,19],65:[2,19],74:[2,19],75:[2,19],76:[2,19],77:[2,19],78:[2,19],79:[2,19],80:[2,19],82:[2,19],91:[2,19],93:[2,19]},{5:[2,20],7:[2,20],8:[2,20],12:[2,20],14:[2,20],15:[2,20],16:[2,20],17:[2,20],19:[2,20],20:[2,20],21:[2,20],23:[2,20],26:[2,20],27:[2,20],50:[2,20],51:[2,20],58:[2,20],65:[2,20],74:[2,20],75:[2,20],76:[2,20],77:[2,20],78:[2,20],79:[2,20],80:[2,20],82:[2,20],91:[2,20],93:[2,20]},{5:[2,21],7:[2,21],8:[2,21],12:[2,21],14:[2,21],15:[2,21],16:[2,21],17:[2,21],19:[2,21],20:[2,21],21:[2,21],23:[2,21],26:[2,21],27:[2,21],50:[2,21],51:[2,21],58:[2,21],65:[2,21],74:[2,21],75:[2,21],76:[2,21],77:[2,21],78:[2,21],79:[2,21],80:[2,21],82:[2,21],91:[2,21],93:[2,21]},{4:61,7:[2,14],8:[2,14],14:[2,14],15:[2,14],16:[2,14],17:[2,14],19:[2,14],20:[2,14],21:[2,14],23:[2,14],26:[2,14],27:[2,14],50:[2,14],51:[2,14],58:[2,14],65:[2,14],74:[2,14],75:[2,14],76:[2,14],77:[2,14],78:[2,14],79:[2,14],80:[2,14],82:[2,14],91:[2,14],93:[2,14]},{8:[1,62]},{8:[1,63]},{8:[1,64]},{6:6,7:[1,13],8:[1,37],9:20,11:65,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{20:[1,66]},{20:[1,67]},{8:[1,37],9:69,16:[1,68],20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{16:[1,70]},{5:[2,11],7:[2,11],8:[2,11],12:[2,11],14:[2,11],15:[2,11],16:[2,11],17:[2,11],19:[2,11],20:[2,11],21:[2,11],23:[2,11],26:[2,11],27:[2,11],50:[2,11],51:[2,11],58:[2,11],65:[2,11],74:[2,11],75:[2,11],76:[2,11],77:[2,11],78:[2,11],79:[2,11],80:[2,11],82:[2,11],91:[2,11],93:[2,11]},{8:[2,23],10:[2,23],16:[2,23],32:[2,23],34:[2,23],35:[2,23],37:[2,23],39:[2,23],41:[2,23],42:[2,23],43:[2,23],45:[2,23],46:[2,23],47:[2,23],48:[2,23],50:[2,23],51:[2,23],53:[2,23],54:[2,23],55:[2,23],57:[2,23],64:[2,23],65:[2,23],66:[2,23],83:[2,23],86:[2,23]},{8:[2,24],10:[2,24],16:[2,24],32:[2,24],34:[2,24],35:[2,24],37:[2,24],39:[2,24],41:[2,24],42:[2,24],43:[2,24],45:[2,24],46:[2,24],47:[2,24],48:[2,24],50:[2,24],51:[2,24],53:[2,24],54:[2,24],55:[2,24],57:[2,24],64:[2,24],65:[2,24],66:[2,24],83:[2,24],86:[2,24]},{8:[2,48],10:[2,48],16:[2,48],32:[1,71],34:[2,48],35:[2,48],37:[2,48],39:[2,48],41:[2,48],42:[2,48],43:[2,48],45:[2,48],46:[2,48],47:[2,48],48:[2,48],50:[2,48],51:[2,48],53:[2,48],54:[2,48],55:[2,48],57:[1,72],64:[2,48],65:[2,48],66:[2,48],83:[2,48],86:[2,48]},{8:[2,26],10:[2,26],16:[2,26],32:[2,26],34:[1,73],35:[2,26],37:[1,74],39:[2,26],41:[2,26],42:[2,26],43:[2,26],45:[2,26],46:[2,26],47:[2,26],48:[2,26],50:[2,26],51:[2,26],53:[2,26],54:[2,26],55:[2,26],57:[2,26],64:[2,26],65:[2,26],66:[2,26],83:[2,26],86:[2,26]},{8:[1,78],10:[2,54],16:[2,54],32:[2,54],34:[2,54],35:[2,54],37:[2,54],39:[2,54],41:[2,54],42:[2,54],43:[2,54],45:[2,54],46:[2,54],47:[2,54],48:[2,54],50:[2,54],51:[2,54],53:[2,54],54:[2,54],55:[2,54],57:[2,54],64:[1,75],65:[1,76],66:[2,54],83:[2,54],86:[2,54],88:77},{8:[1,78],10:[2,55],16:[2,55],32:[2,55],34:[2,55],35:[2,55],37:[2,55],39:[2,55],41:[2,55],42:[2,55],43:[2,55],45:[2,55],46:[2,55],47:[2,55],48:[2,55],50:[2,55],51:[2,55],53:[2,55],54:[2,55],55:[2,55],57:[2,55],64:[1,81],65:[1,80],66:[2,55],83:[2,55],86:[2,55],88:79},{8:[2,28],10:[2,28],16:[2,28],32:[2,28],34:[2,28],35:[2,28],37:[2,28],39:[1,82],41:[2,28],42:[2,28],43:[2,28],45:[2,28],46:[2,28],47:[2,28],48:[2,28],50:[2,28],51:[2,28],53:[2,28],54:[2,28],55:[2,28],57:[2,28],64:[2,28],65:[2,28],66:[2,28],83:[2,28],86:[2,28]},{8:[2,56],10:[2,56],16:[2,56],32:[2,56],34:[2,56],35:[2,56],37:[2,56],39:[2,56],41:[2,56],42:[2,56],43:[2,56],45:[2,56],46:[2,56],47:[2,56],48:[2,56],50:[2,56],51:[2,56],53:[2,56],54:[2,56],55:[2,56],57:[2,56],64:[2,56],65:[2,56],66:[2,56],83:[2,56],86:[2,56]},{8:[2,57],10:[2,57],16:[2,57],32:[2,57],34:[2,57],35:[2,57],37:[2,57],39:[2,57],41:[2,57],42:[2,57],43:[2,57],45:[2,57],46:[2,57],47:[2,57],48:[2,57],50:[2,57],51:[2,57],53:[2,57],54:[2,57],55:[2,57],57:[2,57],64:[2,57],65:[2,57],66:[2,57],83:[2,57],86:[2,57]},{8:[2,58],10:[2,58],16:[2,58],32:[2,58],34:[2,58],35:[2,58],37:[2,58],39:[2,58],41:[2,58],42:[2,58],43:[2,58],45:[2,58],46:[2,58],47:[2,58],48:[2,58],50:[2,58],51:[2,58],53:[2,58],54:[2,58],55:[2,58],57:[2,58],64:[2,58],65:[2,58],66:[2,58],83:[2,58],86:[2,58]},{8:[2,30],10:[2,30],16:[2,30],32:[2,30],34:[2,30],35:[2,30],37:[2,30],39:[2,30],41:[1,83],42:[1,84],43:[1,85],45:[2,30],46:[2,30],47:[2,30],48:[2,30],50:[2,30],51:[2,30],53:[2,30],54:[2,30],55:[2,30],57:[2,30],64:[2,30],65:[2,30],66:[2,30],83:[2,30],86:[2,30]},{8:[2,61],10:[2,61],16:[2,61],32:[2,61],34:[2,61],35:[2,61],37:[2,61],39:[2,61],41:[2,61],42:[2,61],43:[2,61],45:[2,61],46:[2,61],47:[2,61],48:[2,61],50:[2,61],51:[2,61],53:[2,61],54:[2,61],55:[2,61],57:[2,61],64:[2,61],65:[2,61],66:[2,61],83:[2,61],86:[2,61]},{8:[2,62],10:[2,62],16:[2,62],32:[2,62],34:[2,62],35:[2,62],37:[2,62],39:[2,62],41:[2,62],42:[2,62],43:[2,62],45:[2,62],46:[2,62],47:[2,62],48:[2,62],50:[2,62],51:[2,62],53:[2,62],54:[2,62],55:[2,62],57:[2,62],64:[2,62],65:[2,62],66:[2,62],83:[2,62],86:[2,62]},{8:[2,63],10:[2,63],16:[2,63],32:[2,63],34:[2,63],35:[2,63],37:[2,63],39:[2,63],41:[2,63],42:[2,63],43:[2,63],45:[2,63],46:[2,63],47:[2,63],48:[2,63],50:[2,63],51:[2,63],53:[2,63],54:[2,63],55:[2,63],57:[2,63],64:[2,63],65:[2,63],66:[2,63],83:[2,63],86:[2,63]},{8:[2,64],10:[2,64],16:[2,64],32:[2,64],34:[2,64],35:[2,64],37:[2,64],39:[2,64],41:[2,64],42:[2,64],43:[2,64],45:[2,64],46:[2,64],47:[2,64],48:[2,64],50:[2,64],51:[2,64],53:[2,64],54:[2,64],55:[2,64],57:[2,64],64:[2,64],65:[2,64],66:[2,64],83:[2,64],86:[2,64]},{8:[1,37],9:86,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,87]},{8:[1,88]},{8:[2,32],10:[2,32],16:[2,32],32:[2,32],34:[2,32],35:[2,32],37:[2,32],39:[2,32],41:[2,32],42:[2,32],43:[2,32],45:[1,89],46:[1,90],47:[1,91],48:[1,92],50:[2,32],51:[2,32],53:[2,32],54:[2,32],55:[2,32],57:[2,32],64:[2,32],65:[2,32],66:[2,32],83:[2,32],86:[2,32]},{8:[2,66],10:[2,66],16:[2,66],32:[2,66],34:[2,66],35:[2,66],37:[2,66],39:[2,66],41:[2,66],42:[2,66],43:[2,66],45:[2,66],46:[2,66],47:[2,66],48:[2,66],50:[2,66],51:[2,66],53:[2,66],54:[2,66],55:[2,66],57:[2,66],64:[2,66],65:[2,66],66:[2,66],83:[2,66],86:[2,66]},{8:[2,67],10:[2,67],16:[2,67],32:[2,67],34:[2,67],35:[2,67],37:[2,67],39:[2,67],41:[2,67],42:[2,67],43:[2,67],45:[2,67],46:[2,67],47:[2,67],48:[2,67],50:[2,67],51:[2,67],53:[2,67],54:[2,67],55:[2,67],57:[2,67],64:[2,67],65:[2,67],66:[2,67],83:[2,67],86:[2,67]},{8:[2,68],10:[2,68],16:[2,68],32:[2,68],34:[2,68],35:[2,68],37:[2,68],39:[2,68],41:[2,68],42:[2,68],43:[2,68],45:[2,68],46:[2,68],47:[2,68],48:[2,68],50:[2,68],51:[2,68],53:[2,68],54:[2,68],55:[2,68],57:[2,68],64:[2,68],65:[2,68],66:[2,68],83:[2,68],86:[2,68]},{8:[2,69],10:[2,69],16:[2,69],32:[2,69],34:[2,69],35:[2,69],37:[2,69],39:[2,69],41:[2,69],42:[2,69],43:[2,69],45:[2,69],46:[2,69],47:[2,69],48:[2,69],50:[2,69],51:[2,69],53:[2,69],54:[2,69],55:[2,69],57:[2,69],64:[2,69],65:[2,69],66:[2,69],83:[2,69],86:[2,69]},{20:[1,97],72:98,73:99,77:[1,51],78:[1,52],79:[1,53],80:[1,54],83:[1,93],84:94,85:95,87:96},{8:[1,37],20:[1,33],29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],66:[1,100],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],81:101,82:[1,45],91:[1,38],93:[1,39]},{8:[2,36],10:[2,36],16:[2,36],32:[2,36],34:[2,36],35:[2,36],37:[2,36],39:[2,36],41:[2,36],42:[2,36],43:[2,36],45:[2,36],46:[2,36],47:[2,36],48:[2,36],50:[1,103],51:[1,104],53:[2,36],54:[2,36],55:[2,36],57:[2,36],64:[2,36],65:[2,36],66:[2,36],83:[2,36],86:[2,36]},{8:[2,70],10:[2,70],16:[2,70],32:[2,70],34:[2,70],35:[2,70],37:[2,70],39:[2,70],41:[2,70],42:[2,70],43:[2,70],45:[2,70],46:[2,70],47:[2,70],48:[2,70],50:[2,70],51:[2,70],53:[2,70],54:[2,70],55:[2,70],57:[2,70],64:[2,70],65:[2,70],66:[2,70],83:[2,70],86:[2,70]},{8:[2,71],10:[2,71],16:[2,71],32:[2,71],34:[2,71],35:[2,71],37:[2,71],39:[2,71],41:[2,71],42:[2,71],43:[2,71],45:[2,71],46:[2,71],47:[2,71],48:[2,71],50:[2,71],51:[2,71],53:[2,71],54:[2,71],55:[2,71],57:[2,71],64:[2,71],65:[2,71],66:[2,71],83:[2,71],86:[2,71]},{8:[2,72],10:[2,72],16:[2,72],32:[2,72],34:[2,72],35:[2,72],37:[2,72],39:[2,72],41:[2,72],42:[2,72],43:[2,72],45:[2,72],46:[2,72],47:[2,72],48:[2,72],50:[2,72],51:[2,72],53:[2,72],54:[2,72],55:[2,72],57:[2,72],64:[2,72],65:[2,72],66:[2,72],83:[2,72],86:[2,72]},{8:[2,73],10:[2,73],16:[2,73],32:[2,73],34:[2,73],35:[2,73],37:[2,73],39:[2,73],41:[2,73],42:[2,73],43:[2,73],45:[2,73],46:[2,73],47:[2,73],48:[2,73],50:[2,73],51:[2,73],53:[2,73],54:[2,73],55:[2,73],57:[2,73],64:[2,73],65:[2,73],66:[2,73],83:[2,73],86:[2,73]},{8:[2,74],10:[2,74],16:[2,74],32:[2,74],34:[2,74],35:[2,74],37:[2,74],39:[2,74],41:[2,74],42:[2,74],43:[2,74],45:[2,74],46:[2,74],47:[2,74],48:[2,74],50:[2,74],51:[2,74],53:[2,74],54:[2,74],55:[2,74],57:[2,74],64:[2,74],65:[2,74],66:[2,74],83:[2,74],86:[2,74]},{8:[2,75],10:[2,75],16:[2,75],32:[2,75],34:[2,75],35:[2,75],37:[2,75],39:[2,75],41:[2,75],42:[2,75],43:[2,75],45:[2,75],46:[2,75],47:[2,75],48:[2,75],50:[2,75],51:[2,75],53:[2,75],54:[2,75],55:[2,75],57:[2,75],64:[2,75],65:[2,75],66:[2,75],83:[2,75],86:[2,75]},{8:[2,76],10:[2,76],16:[2,76],32:[2,76],34:[2,76],35:[2,76],37:[2,76],39:[2,76],41:[2,76],42:[2,76],43:[2,76],45:[2,76],46:[2,76],47:[2,76],48:[2,76],50:[2,76],51:[2,76],53:[2,76],54:[2,76],55:[2,76],57:[2,76],64:[2,76],65:[2,76],66:[2,76],83:[2,76],86:[2,76]},{8:[2,41],10:[2,41],16:[2,41],32:[2,41],34:[2,41],35:[2,41],37:[2,41],39:[2,41],41:[2,41],42:[2,41],43:[2,41],45:[2,41],46:[2,41],47:[2,41],48:[2,41],50:[2,41],51:[2,41],53:[1,105],54:[1,106],55:[1,107],57:[2,41],64:[2,41],65:[2,41],66:[2,41],83:[2,41],86:[2,41]},{8:[2,44],10:[2,44],16:[2,44],32:[2,44],34:[2,44],35:[2,44],37:[2,44],39:[2,44],41:[2,44],42:[2,44],43:[2,44],45:[2,44],46:[2,44],47:[2,44],48:[2,44],50:[2,44],51:[2,44],53:[2,44],54:[2,44],55:[2,44],57:[2,44],64:[2,44],65:[2,44],66:[2,44],83:[2,44],86:[2,44]},{8:[2,50],10:[2,50],16:[2,50],32:[2,50],34:[2,50],35:[2,50],37:[2,50],39:[2,50],41:[2,50],42:[2,50],43:[2,50],45:[2,50],46:[2,50],47:[2,50],48:[2,50],50:[2,50],51:[2,50],53:[2,50],54:[2,50],55:[2,50],57:[2,50],64:[2,50],65:[2,50],66:[2,50],83:[2,50],86:[2,50]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:108,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:110,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:111,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{6:6,7:[1,13],8:[1,37],9:20,11:4,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],27:[1,112],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:113,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:114,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:115,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{14:[1,116]},{5:[2,7],7:[2,7],8:[2,7],12:[2,7],14:[2,7],15:[2,7],16:[2,7],17:[2,7],19:[2,7],20:[2,7],21:[2,7],23:[2,7],26:[2,7],27:[2,7],50:[2,7],51:[2,7],58:[2,7],65:[2,7],74:[2,7],75:[2,7],76:[2,7],77:[2,7],78:[2,7],79:[2,7],80:[2,7],82:[2,7],91:[2,7],93:[2,7]},{5:[2,8],7:[2,8],8:[2,8],12:[2,8],14:[2,8],15:[2,8],16:[2,8],17:[2,8],19:[2,8],20:[2,8],21:[2,8],23:[2,8],26:[2,8],27:[2,8],50:[2,8],51:[2,8],58:[2,8],65:[2,8],74:[2,8],75:[2,8],76:[2,8],77:[2,8],78:[2,8],79:[2,8],80:[2,8],82:[2,8],91:[2,8],93:[2,8]},{5:[2,9],7:[2,9],8:[2,9],12:[2,9],14:[2,9],15:[2,9],16:[2,9],17:[2,9],19:[2,9],20:[2,9],21:[2,9],23:[2,9],26:[2,9],27:[2,9],50:[2,9],51:[2,9],58:[2,9],65:[2,9],74:[2,9],75:[2,9],76:[2,9],77:[2,9],78:[2,9],79:[2,9],80:[2,9],82:[2,9],91:[2,9],93:[2,9]},{16:[1,117]},{5:[2,22],7:[2,22],8:[2,22],12:[2,22],14:[2,22],15:[2,22],16:[2,22],17:[2,22],19:[2,22],20:[2,22],21:[2,22],23:[2,22],26:[2,22],27:[2,22],50:[2,22],51:[2,22],58:[2,22],65:[2,22],74:[2,22],75:[2,22],76:[2,22],77:[2,22],78:[2,22],79:[2,22],80:[2,22],82:[2,22],91:[2,22],93:[2,22]},{8:[1,37],20:[1,33],29:118,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:119,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],29:120,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,36:121,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{20:[1,122]},{8:[1,37],9:123,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,87],10:[2,87],16:[2,87],20:[1,126],32:[2,87],34:[2,87],35:[2,87],37:[2,87],39:[2,87],41:[2,87],42:[2,87],43:[2,87],45:[2,87],46:[2,87],47:[2,87],48:[2,87],50:[2,87],51:[2,87],53:[2,87],54:[2,87],55:[2,87],57:[2,87],64:[2,87],65:[2,87],66:[2,87],68:127,82:[1,45],83:[2,87],86:[2,87],89:124,90:125},{8:[1,37],10:[1,128],20:[1,33],29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],81:129,82:[1,45],91:[1,38],93:[1,39]},{8:[2,89],10:[2,89],16:[2,89],32:[2,89],34:[2,89],35:[2,89],37:[2,89],39:[2,89],41:[2,89],42:[2,89],43:[2,89],45:[2,89],46:[2,89],47:[2,89],48:[2,89],50:[2,89],51:[2,89],53:[2,89],54:[2,89],55:[2,89],57:[2,89],64:[2,89],65:[2,89],66:[2,89],83:[2,89],86:[2,89]},{8:[1,37],9:130,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{20:[1,131]},{8:[1,37],20:[1,33],31:109,38:132,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,40:133,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,40:134,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,40:135,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{10:[1,136]},{10:[1,137],20:[1,139],92:138},{20:[1,139],92:140},{8:[1,37],20:[1,33],31:109,44:141,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,44:142,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,44:143,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,44:144,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,79],10:[2,79],16:[2,79],32:[2,79],34:[2,79],35:[2,79],37:[2,79],39:[2,79],41:[2,79],42:[2,79],43:[2,79],45:[2,79],46:[2,79],47:[2,79],48:[2,79],50:[2,79],51:[2,79],53:[2,79],54:[2,79],55:[2,79],57:[2,79],64:[2,79],65:[2,79],66:[2,79],83:[2,79],86:[2,79]},{83:[1,145],86:[1,146]},{83:[2,81],86:[2,81]},{35:[1,147]},{35:[2,84]},{35:[2,85]},{35:[2,86]},{8:[2,77],10:[2,77],16:[2,77],32:[2,77],34:[2,77],35:[2,77],37:[2,77],39:[2,77],41:[2,77],42:[2,77],43:[2,77],45:[2,77],46:[2,77],47:[2,77],48:[2,77],50:[2,77],51:[2,77],53:[2,77],54:[2,77],55:[2,77],57:[2,77],64:[2,77],65:[2,77],66:[2,77],83:[2,77],86:[2,77]},{66:[1,148],86:[1,149]},{10:[2,98],66:[2,98],86:[2,98]},{8:[1,37],20:[1,33],31:109,49:150,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,49:151,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:152,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:153,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],31:109,50:[1,59],51:[1,60],52:154,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,51],10:[2,51],16:[2,51],32:[2,51],34:[2,51],35:[2,51],37:[2,51],39:[2,51],41:[2,51],42:[2,51],43:[2,51],45:[2,51],46:[2,51],47:[2,51],48:[2,51],50:[2,51],51:[2,51],53:[2,51],54:[2,51],55:[2,51],57:[2,51],64:[2,51],65:[2,51],66:[2,51],83:[2,51],86:[2,51]},{8:[2,48],10:[2,48],16:[2,48],32:[2,48],34:[2,48],35:[2,48],37:[2,48],39:[2,48],41:[2,48],42:[2,48],43:[2,48],45:[2,48],46:[2,48],47:[2,48],48:[2,48],50:[2,48],51:[2,48],53:[2,48],54:[2,48],55:[2,48],57:[1,72],64:[2,48],65:[2,48],66:[2,48],83:[2,48],86:[2,48]},{8:[2,52],10:[2,52],16:[2,52],32:[2,52],34:[2,52],35:[2,52],37:[2,52],39:[2,52],41:[2,52],42:[2,52],43:[2,52],45:[2,52],46:[2,52],47:[2,52],48:[2,52],50:[2,52],51:[2,52],53:[2,52],54:[2,52],55:[2,52],57:[2,52],64:[2,52],65:[2,52],66:[2,52],83:[2,52],86:[2,52]},{8:[2,53],10:[2,53],16:[2,53],32:[2,53],34:[2,53],35:[2,53],37:[2,53],39:[2,53],41:[2,53],42:[2,53],43:[2,53],45:[2,53],46:[2,53],47:[2,53],48:[2,53],50:[2,53],51:[2,53],53:[2,53],54:[2,53],55:[2,53],57:[2,53],64:[2,53],65:[2,53],66:[2,53],83:[2,53],86:[2,53]},{5:[2,12],7:[2,12],8:[2,12],10:[2,12],12:[2,12],14:[2,12],15:[2,12],16:[2,12],17:[2,12],19:[2,12],20:[2,12],21:[2,12],23:[2,12],26:[2,12],27:[2,12],32:[2,12],34:[2,12],35:[2,12],37:[2,12],39:[2,12],41:[2,12],42:[2,12],43:[2,12],45:[2,12],46:[2,12],47:[2,12],48:[2,12],50:[2,12],51:[2,12],53:[2,12],54:[2,12],55:[2,12],57:[2,12],58:[2,12],64:[2,12],65:[2,12],66:[2,12],74:[2,12],75:[2,12],76:[2,12],77:[2,12],78:[2,12],79:[2,12],80:[2,12],82:[2,12],83:[2,12],86:[2,12],91:[2,12],93:[2,12]},{10:[1,155]},{10:[1,156]},{16:[1,157]},{8:[1,158]},{5:[2,10],7:[2,10],8:[2,10],12:[2,10],14:[2,10],15:[2,10],16:[2,10],17:[2,10],19:[2,10],20:[2,10],21:[2,10],23:[2,10],26:[2,10],27:[2,10],50:[2,10],51:[2,10],58:[2,10],65:[2,10],74:[2,10],75:[2,10],76:[2,10],77:[2,10],78:[2,10],79:[2,10],80:[2,10],82:[2,10],91:[2,10],93:[2,10]},{8:[2,25],10:[2,25],16:[2,25],32:[2,25],34:[2,25],35:[2,25],37:[2,25],39:[2,25],41:[2,25],42:[2,25],43:[2,25],45:[2,25],46:[2,25],47:[2,25],48:[2,25],50:[2,25],51:[2,25],53:[2,25],54:[2,25],55:[2,25],57:[2,25],64:[2,25],65:[2,25],66:[2,25],83:[2,25],86:[2,25]},{8:[2,49],10:[2,49],16:[2,49],32:[2,49],34:[2,49],35:[2,49],37:[2,49],39:[2,49],41:[2,49],42:[2,49],43:[2,49],45:[2,49],46:[2,49],47:[2,49],48:[2,49],50:[2,49],51:[2,49],53:[2,49],54:[2,49],55:[2,49],57:[2,49],64:[2,49],65:[2,49],66:[2,49],83:[2,49],86:[2,49]},{35:[1,159]},{8:[2,29],10:[2,29],16:[2,29],32:[2,29],34:[2,29],35:[2,29],37:[2,29],39:[1,82],41:[2,29],42:[2,29],43:[2,29],45:[2,29],46:[2,29],47:[2,29],48:[2,29],50:[2,29],51:[2,29],53:[2,29],54:[2,29],55:[2,29],57:[2,29],64:[2,29],65:[2,29],66:[2,29],83:[2,29],86:[2,29]},{8:[2,59],10:[2,59],16:[2,59],32:[2,59],34:[2,59],35:[2,59],37:[2,59],39:[2,59],41:[2,59],42:[2,59],43:[2,59],45:[2,59],46:[2,59],47:[2,59],48:[2,59],50:[2,59],51:[2,59],53:[2,59],54:[2,59],55:[2,59],57:[2,59],64:[2,59],65:[2,59],66:[2,59],83:[2,59],86:[2,59]},{66:[1,160]},{8:[2,88],10:[2,88],16:[2,88],32:[2,88],34:[2,88],35:[2,88],37:[2,88],39:[2,88],41:[2,88],42:[2,88],43:[2,88],45:[2,88],46:[2,88],47:[2,88],48:[2,88],50:[2,88],51:[2,88],53:[2,88],54:[2,88],55:[2,88],57:[2,88],64:[2,88],65:[2,88],66:[2,88],83:[2,88],86:[1,161]},{8:[2,94],10:[2,94],16:[2,94],32:[2,94],34:[2,94],35:[2,94],37:[2,94],39:[2,94],41:[2,94],42:[2,94],43:[2,94],45:[2,94],46:[2,94],47:[2,94],48:[2,94],50:[2,94],51:[2,94],53:[2,94],54:[2,94],55:[2,94],57:[2,94],64:[2,94],65:[2,94],66:[2,94],83:[2,94],86:[2,94]},{8:[2,96],10:[2,96],16:[2,96],32:[2,96],34:[2,96],35:[2,96],37:[2,96],39:[2,96],41:[2,96],42:[2,96],43:[2,96],45:[2,96],46:[2,96],47:[2,96],48:[2,96],50:[2,96],51:[2,96],53:[2,96],54:[2,96],55:[2,96],57:[2,96],64:[2,96],65:[2,96],66:[2,96],83:[2,96],86:[2,96]},{8:[2,97],10:[2,97],16:[2,97],32:[2,97],34:[2,97],35:[2,97],37:[2,97],39:[2,97],41:[2,97],42:[2,97],43:[2,97],45:[2,97],46:[2,97],47:[2,97],48:[2,97],50:[2,97],51:[2,97],53:[2,97],54:[2,97],55:[2,97],57:[2,97],64:[2,97],65:[2,97],66:[2,97],83:[2,97],86:[2,97]},{8:[2,92],10:[2,92],16:[2,92],20:[2,92],32:[2,92],34:[2,92],35:[2,92],37:[2,92],39:[2,92],41:[2,92],42:[2,92],43:[2,92],45:[2,92],46:[2,92],47:[2,92],48:[2,92],50:[2,92],51:[2,92],53:[2,92],54:[2,92],55:[2,92],57:[2,92],64:[2,92],65:[2,92],66:[2,92],82:[2,92],83:[2,92],86:[2,92]},{10:[1,162],86:[1,149]},{66:[1,163]},{8:[2,91],10:[2,91],16:[2,91],32:[2,91],34:[2,91],35:[2,91],37:[2,91],39:[2,91],41:[2,91],42:[2,91],43:[2,91],45:[2,91],46:[2,91],47:[2,91],48:[2,91],50:[2,91],51:[2,91],53:[2,91],54:[2,91],55:[2,91],57:[2,91],64:[2,91],65:[2,91],66:[2,91],83:[2,91],86:[2,91]},{8:[2,31],10:[2,31],16:[2,31],32:[2,31],34:[2,31],35:[2,31],37:[2,31],39:[2,31],41:[1,83],42:[1,84],43:[1,85],45:[2,31],46:[2,31],47:[2,31],48:[2,31],50:[2,31],51:[2,31],53:[2,31],54:[2,31],55:[2,31],57:[2,31],64:[2,31],65:[2,31],66:[2,31],83:[2,31],86:[2,31]},{8:[2,33],10:[2,33],16:[2,33],32:[2,33],34:[2,33],35:[2,33],37:[2,33],39:[2,33],41:[2,33],42:[2,33],43:[2,33],45:[1,89],46:[1,90],47:[1,91],48:[1,92],50:[2,33],51:[2,33],53:[2,33],54:[2,33],55:[2,33],57:[2,33],64:[2,33],65:[2,33],66:[2,33],83:[2,33],86:[2,33]},{8:[2,34],10:[2,34],16:[2,34],32:[2,34],34:[2,34],35:[2,34],37:[2,34],39:[2,34],41:[2,34],42:[2,34],43:[2,34],45:[1,89],46:[1,90],47:[1,91],48:[1,92],50:[2,34],51:[2,34],53:[2,34],54:[2,34],55:[2,34],57:[2,34],64:[2,34],65:[2,34],66:[2,34],83:[2,34],86:[2,34]},{8:[2,35],10:[2,35],16:[2,35],32:[2,35],34:[2,35],35:[2,35],37:[2,35],39:[2,35],41:[2,35],42:[2,35],43:[2,35],45:[1,89],46:[1,90],47:[1,91],48:[1,92],50:[2,35],51:[2,35],53:[2,35],54:[2,35],55:[2,35],57:[2,35],64:[2,35],65:[2,35],66:[2,35],83:[2,35],86:[2,35]},{8:[2,65],10:[2,65],16:[2,65],32:[2,65],34:[2,65],35:[2,65],37:[2,65],39:[2,65],41:[2,65],42:[2,65],43:[2,65],45:[2,65],46:[2,65],47:[2,65],48:[2,65],50:[2,65],51:[2,65],53:[2,65],54:[2,65],55:[2,65],57:[2,65],64:[2,65],65:[2,65],66:[2,65],83:[2,65],86:[2,65]},{25:164,26:[1,12]},{10:[1,165],86:[1,166]},{10:[2,103],86:[2,103]},{10:[1,167],86:[1,166]},{8:[2,37],10:[2,37],16:[2,37],32:[2,37],34:[2,37],35:[2,37],37:[2,37],39:[2,37],41:[2,37],42:[2,37],43:[2,37],45:[2,37],46:[2,37],47:[2,37],48:[2,37],50:[1,103],51:[1,104],53:[2,37],54:[2,37],55:[2,37],57:[2,37],64:[2,37],65:[2,37],66:[2,37],83:[2,37],86:[2,37]},{8:[2,38],10:[2,38],16:[2,38],32:[2,38],34:[2,38],35:[2,38],37:[2,38],39:[2,38],41:[2,38],42:[2,38],43:[2,38],45:[2,38],46:[2,38],47:[2,38],48:[2,38],50:[1,103],51:[1,104],53:[2,38],54:[2,38],55:[2,38],57:[2,38],64:[2,38],65:[2,38],66:[2,38],83:[2,38],86:[2,38]},{8:[2,39],10:[2,39],16:[2,39],32:[2,39],34:[2,39],35:[2,39],37:[2,39],39:[2,39],41:[2,39],42:[2,39],43:[2,39],45:[2,39],46:[2,39],47:[2,39],48:[2,39],50:[1,103],51:[1,104],53:[2,39],54:[2,39],55:[2,39],57:[2,39],64:[2,39],65:[2,39],66:[2,39],83:[2,39],86:[2,39]},{8:[2,40],10:[2,40],16:[2,40],32:[2,40],34:[2,40],35:[2,40],37:[2,40],39:[2,40],41:[2,40],42:[2,40],43:[2,40],45:[2,40],46:[2,40],47:[2,40],48:[2,40],50:[1,103],51:[1,104],53:[2,40],54:[2,40],55:[2,40],57:[2,40],64:[2,40],65:[2,40],66:[2,40],83:[2,40],86:[2,40]},{8:[2,80],10:[2,80],16:[2,80],32:[2,80],34:[2,80],35:[2,80],37:[2,80],39:[2,80],41:[2,80],42:[2,80],43:[2,80],45:[2,80],46:[2,80],47:[2,80],48:[2,80],50:[2,80],51:[2,80],53:[2,80],54:[2,80],55:[2,80],57:[2,80],64:[2,80],65:[2,80],66:[2,80],83:[2,80],86:[2,80]},{20:[1,97],72:98,73:99,77:[1,51],78:[1,52],79:[1,53],80:[1,54],85:168,87:96},{8:[1,37],20:[1,33],29:169,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,78],10:[2,78],16:[2,78],32:[2,78],34:[2,78],35:[2,78],37:[2,78],39:[2,78],41:[2,78],42:[2,78],43:[2,78],45:[2,78],46:[2,78],47:[2,78],48:[2,78],50:[2,78],51:[2,78],53:[2,78],54:[2,78],55:[2,78],57:[2,78],64:[2,78],65:[2,78],66:[2,78],83:[2,78],86:[2,78]},{8:[1,37],20:[1,33],29:170,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,42],10:[2,42],16:[2,42],32:[2,42],34:[2,42],35:[2,42],37:[2,42],39:[2,42],41:[2,42],42:[2,42],43:[2,42],45:[2,42],46:[2,42],47:[2,42],48:[2,42],50:[2,42],51:[2,42],53:[1,105],54:[1,106],55:[1,107],57:[2,42],64:[2,42],65:[2,42],66:[2,42],83:[2,42],86:[2,42]},{8:[2,43],10:[2,43],16:[2,43],32:[2,43],34:[2,43],35:[2,43],37:[2,43],39:[2,43],41:[2,43],42:[2,43],43:[2,43],45:[2,43],46:[2,43],47:[2,43],48:[2,43],50:[2,43],51:[2,43],53:[1,105],54:[1,106],55:[1,107],57:[2,43],64:[2,43],65:[2,43],66:[2,43],83:[2,43],86:[2,43]},{8:[2,45],10:[2,45],16:[2,45],32:[2,45],34:[2,45],35:[2,45],37:[2,45],39:[2,45],41:[2,45],42:[2,45],43:[2,45],45:[2,45],46:[2,45],47:[2,45],48:[2,45],50:[2,45],51:[2,45],53:[2,45],54:[2,45],55:[2,45],57:[2,45],64:[2,45],65:[2,45],66:[2,45],83:[2,45],86:[2,45]},{8:[2,46],10:[2,46],16:[2,46],32:[2,46],34:[2,46],35:[2,46],37:[2,46],39:[2,46],41:[2,46],42:[2,46],43:[2,46],45:[2,46],46:[2,46],47:[2,46],48:[2,46],50:[2,46],51:[2,46],53:[2,46],54:[2,46],55:[2,46],57:[2,46],64:[2,46],65:[2,46],66:[2,46],83:[2,46],86:[2,46]},{8:[2,47],10:[2,47],16:[2,47],32:[2,47],34:[2,47],35:[2,47],37:[2,47],39:[2,47],41:[2,47],42:[2,47],43:[2,47],45:[2,47],46:[2,47],47:[2,47],48:[2,47],50:[2,47],51:[2,47],53:[2,47],54:[2,47],55:[2,47],57:[2,47],64:[2,47],65:[2,47],66:[2,47],83:[2,47],86:[2,47]},{6:6,7:[1,13],8:[1,37],9:20,11:171,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{6:6,7:[1,13],8:[1,37],9:20,11:172,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:173,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:174,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],20:[1,33],29:175,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[2,60],10:[2,60],16:[2,60],32:[2,60],34:[2,60],35:[2,60],37:[2,60],39:[2,60],41:[2,60],42:[2,60],43:[2,60],45:[2,60],46:[2,60],47:[2,60],48:[2,60],50:[2,60],51:[2,60],53:[2,60],54:[2,60],55:[2,60],57:[2,60],64:[2,60],65:[2,60],66:[2,60],83:[2,60],86:[2,60]},{20:[1,126],68:127,82:[1,45],90:176},{8:[2,93],10:[2,93],16:[2,93],20:[2,93],32:[2,93],34:[2,93],35:[2,93],37:[2,93],39:[2,93],41:[2,93],42:[2,93],43:[2,93],45:[2,93],46:[2,93],47:[2,93],48:[2,93],50:[2,93],51:[2,93],53:[2,93],54:[2,93],55:[2,93],57:[2,93],64:[2,93],65:[2,93],66:[2,93],82:[2,93],83:[2,93],86:[2,93]},{8:[2,90],10:[2,90],16:[2,90],32:[2,90],34:[2,90],35:[2,90],37:[2,90],39:[2,90],41:[2,90],42:[2,90],43:[2,90],45:[2,90],46:[2,90],47:[2,90],48:[2,90],50:[2,90],51:[2,90],53:[2,90],54:[2,90],55:[2,90],57:[2,90],64:[2,90],65:[2,90],66:[2,90],83:[2,90],86:[2,90]},{8:[2,100],10:[2,100],16:[2,100],32:[2,100],34:[2,100],35:[2,100],37:[2,100],39:[2,100],41:[2,100],42:[2,100],43:[2,100],45:[2,100],46:[2,100],47:[2,100],48:[2,100],50:[2,100],51:[2,100],53:[2,100],54:[2,100],55:[2,100],57:[2,100],64:[2,100],65:[2,100],66:[2,100],83:[2,100],86:[2,100]},{25:177,26:[1,12]},{20:[1,178]},{94:[1,179]},{83:[2,82],86:[2,82]},{83:[2,83],86:[2,83]},{10:[2,99],66:[2,99],86:[2,99]},{5:[2,2],7:[2,2],8:[2,2],12:[1,180],14:[2,2],15:[2,2],16:[2,2],17:[2,2],19:[2,2],20:[2,2],21:[2,2],23:[2,2],26:[2,2],27:[2,2],50:[2,2],51:[2,2],58:[2,2],65:[2,2],74:[2,2],75:[2,2],76:[2,2],77:[2,2],78:[2,2],79:[2,2],80:[2,2],82:[2,2],91:[2,2],93:[2,2]},{5:[2,4],7:[2,4],8:[2,4],12:[2,4],14:[2,4],15:[2,4],16:[2,4],17:[2,4],19:[2,4],20:[2,4],21:[2,4],23:[2,4],26:[2,4],27:[2,4],50:[2,4],51:[2,4],58:[2,4],65:[2,4],74:[2,4],75:[2,4],76:[2,4],77:[2,4],78:[2,4],79:[2,4],80:[2,4],82:[2,4],91:[2,4],93:[2,4]},{16:[1,181]},{10:[1,182]},{8:[2,27],10:[2,27],16:[2,27],32:[2,27],34:[2,27],35:[2,27],37:[2,27],39:[2,27],41:[2,27],42:[2,27],43:[2,27],45:[2,27],46:[2,27],47:[2,27],48:[2,27],50:[2,27],51:[2,27],53:[2,27],54:[2,27],55:[2,27],57:[2,27],64:[2,27],65:[2,27],66:[2,27],83:[2,27],86:[2,27]},{8:[2,95],10:[2,95],16:[2,95],32:[2,95],34:[2,95],35:[2,95],37:[2,95],39:[2,95],41:[2,95],42:[2,95],43:[2,95],45:[2,95],46:[2,95],47:[2,95],48:[2,95],50:[2,95],51:[2,95],53:[2,95],54:[2,95],55:[2,95],57:[2,95],64:[2,95],65:[2,95],66:[2,95],83:[2,95],86:[2,95]},{8:[2,101],10:[2,101],16:[2,101],32:[2,101],34:[2,101],35:[2,101],37:[2,101],39:[2,101],41:[2,101],42:[2,101],43:[2,101],45:[2,101],46:[2,101],47:[2,101],48:[2,101],50:[2,101],51:[2,101],53:[2,101],54:[2,101],55:[2,101],57:[2,101],64:[2,101],65:[2,101],66:[2,101],83:[2,101],86:[2,101]},{10:[2,104],86:[2,104]},{8:[1,37],9:183,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{6:6,7:[1,13],8:[1,37],9:20,11:184,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{8:[1,37],9:185,20:[1,33],29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{16:[1,186]},{8:[2,102],10:[2,102],16:[2,102],32:[2,102],34:[2,102],35:[2,102],37:[2,102],39:[2,102],41:[2,102],42:[2,102],43:[2,102],45:[2,102],46:[2,102],47:[2,102],48:[2,102],50:[2,102],51:[2,102],53:[2,102],54:[2,102],55:[2,102],57:[2,102],64:[2,102],65:[2,102],66:[2,102],83:[2,102],86:[2,102]},{5:[2,3],7:[2,3],8:[2,3],12:[2,3],14:[2,3],15:[2,3],16:[2,3],17:[2,3],19:[2,3],20:[2,3],21:[2,3],23:[2,3],26:[2,3],27:[2,3],50:[2,3],51:[2,3],58:[2,3],65:[2,3],74:[2,3],75:[2,3],76:[2,3],77:[2,3],78:[2,3],79:[2,3],80:[2,3],82:[2,3],91:[2,3],93:[2,3]},{10:[1,187]},{5:[2,6],7:[2,6],8:[2,6],12:[2,6],14:[2,6],15:[2,6],16:[2,6],17:[2,6],19:[2,6],20:[2,6],21:[2,6],23:[2,6],26:[2,6],27:[2,6],50:[2,6],51:[2,6],58:[2,6],65:[2,6],74:[2,6],75:[2,6],76:[2,6],77:[2,6],78:[2,6],79:[2,6],80:[2,6],82:[2,6],91:[2,6],93:[2,6]},{6:6,7:[1,13],8:[1,37],9:20,11:188,13:7,14:[1,14],15:[1,15],16:[1,21],17:[1,16],18:8,19:[1,17],20:[1,33],21:[1,18],22:9,23:[1,19],24:11,25:5,26:[1,12],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:[1,59],51:[1,60],52:56,56:57,58:[1,58],59:26,60:27,61:29,62:30,63:31,65:[1,46],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:[1,48],75:[1,49],76:[1,50],77:[1,51],78:[1,52],79:[1,53],80:[1,54],82:[1,45],91:[1,38],93:[1,39]},{5:[2,5],7:[2,5],8:[2,5],12:[2,5],14:[2,5],15:[2,5],16:[2,5],17:[2,5],19:[2,5],20:[2,5],21:[2,5],23:[2,5],26:[2,5],27:[2,5],50:[2,5],51:[2,5],58:[2,5],65:[2,5],74:[2,5],75:[2,5],76:[2,5],77:[2,5],78:[2,5],79:[2,5],80:[2,5],82:[2,5],91:[2,5],93:[2,5]}], 2334 defaultActions: {3:[2,1],97:[2,84],98:[2,85],99:[2,86]}, 2335 parseError: function parseError(str, hash) { 2336 if (hash.recoverable) { 2337 this.trace(str); 2338 } else { 2339 throw new Error(str); 2340 } 2341 }, 2342 parse: function parse(input) { 2343 var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; 2344 var args = lstack.slice.call(arguments, 1); 2345 this.lexer.setInput(input); 2346 this.lexer.yy = this.yy; 2347 this.yy.lexer = this.lexer; 2348 this.yy.parser = this; 2349 if (typeof this.lexer.yylloc == 'undefined') { 2350 this.lexer.yylloc = {}; 2351 } 2352 var yyloc = this.lexer.yylloc; 2353 lstack.push(yyloc); 2354 var ranges = this.lexer.options && this.lexer.options.ranges; 2355 if (typeof this.yy.parseError === 'function') { 2356 this.parseError = this.yy.parseError; 2357 } else { 2358 this.parseError = Object.getPrototypeOf(this).parseError; 2359 } 2360 function popStack(n) { 2361 stack.length = stack.length - 2 * n; 2362 vstack.length = vstack.length - n; 2363 lstack.length = lstack.length - n; 2364 } 2365 function lex() { 2366 var token; 2367 token = self.lexer.lex() || EOF; 2368 if (typeof token !== 'number') { 2369 token = self.symbols_[token] || token; 2370 } 2371 return token; 2372 } 2373 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; 2374 while (true) { 2375 state = stack[stack.length - 1]; 2376 if (this.defaultActions[state]) { 2377 action = this.defaultActions[state]; 2378 } else { 2379 if (symbol === null || typeof symbol == 'undefined') { 2380 symbol = lex(); 2381 } 2382 action = table[state] && table[state][symbol]; 2383 } 2384 if (typeof action === 'undefined' || !action.length || !action[0]) { 2385 var errStr = ''; 2386 expected = []; 2387 for (p in table[state]) { 2388 if (this.terminals_[p] && p > TERROR) { 2389 expected.push('\'' + this.terminals_[p] + '\''); 2390 } 2391 } 2392 if (this.lexer.showPosition) { 2393 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + this.lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; 2394 } else { 2395 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); 2396 } 2397 this.parseError(errStr, { 2398 text: this.lexer.match, 2399 token: this.terminals_[symbol] || symbol, 2400 line: this.lexer.yylineno, 2401 loc: yyloc, 2402 expected: expected 2403 }); 2404 } 2405 if (action[0] instanceof Array && action.length > 1) { 2406 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); 2407 } 2408 switch (action[0]) { 2409 case 1: 2410 stack.push(symbol); 2411 vstack.push(this.lexer.yytext); 2412 lstack.push(this.lexer.yylloc); 2413 stack.push(action[1]); 2414 symbol = null; 2415 if (!preErrorSymbol) { 2416 yyleng = this.lexer.yyleng; 2417 yytext = this.lexer.yytext; 2418 yylineno = this.lexer.yylineno; 2419 yyloc = this.lexer.yylloc; 2420 if (recovering > 0) { 2421 recovering--; 2422 } 2423 } else { 2424 symbol = preErrorSymbol; 2425 preErrorSymbol = null; 2426 } 2427 break; 2428 case 2: 2429 len = this.productions_[action[1]][1]; 2430 yyval.$ = vstack[vstack.length - len]; 2431 yyval._$ = { 2432 first_line: lstack[lstack.length - (len || 1)].first_line, 2433 last_line: lstack[lstack.length - 1].last_line, 2434 first_column: lstack[lstack.length - (len || 1)].first_column, 2435 last_column: lstack[lstack.length - 1].last_column 2436 }; 2437 if (ranges) { 2438 yyval._$.range = [ 2439 lstack[lstack.length - (len || 1)].range[0], 2440 lstack[lstack.length - 1].range[1] 2441 ]; 2442 } 2443 r = this.performAction.apply(yyval, [ 2444 yytext, 2445 yyleng, 2446 yylineno, 2447 this.yy, 2448 action[1], 2449 vstack, 2450 lstack 2451 ].concat(args)); 2452 if (typeof r !== 'undefined') { 2453 return r; 2454 } 2455 if (len) { 2456 stack = stack.slice(0, -1 * len * 2); 2457 vstack = vstack.slice(0, -1 * len); 2458 lstack = lstack.slice(0, -1 * len); 2459 } 2460 stack.push(this.productions_[action[1]][0]); 2461 vstack.push(yyval.$); 2462 lstack.push(yyval._$); 2463 newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; 2464 stack.push(newState); 2465 break; 2466 case 3: 2467 return true; 2468 } 2469 } 2470 return true; 2471 }}; 2472 2473 2474 var AST = { 2475 node: function (type, value, children) { 2476 return { 2477 type: type, 2478 value: value, 2479 children: children 2480 }; 2481 }, 2482 2483 createNode: function (pos, type, value, children) { 2484 var i, 2485 n = this.node(type, value, []); 2486 2487 for (i = 3; i < arguments.length; i++) { 2488 n.children.push(arguments[i]); 2489 } 2490 2491 n.line = pos[0]; 2492 n.col = pos[1]; 2493 n.eline = pos[2]; 2494 n.ecol = pos[3]; 2495 2496 return n; 2497 } 2498 }; 2499 2500 var lc = function (lc1) { 2501 return [lc1.first_line, lc1.first_column, lc1.last_line, lc1.last_column]; 2502 }; 2503 2504 /* generated by jison-lex 0.2.1 */ 2505 var lexer = (function(){ 2506 var lexer = { 2507 2508 EOF:1, 2509 2510 parseError:function parseError(str, hash) { 2511 if (this.yy.parser) { 2512 this.yy.parser.parseError(str, hash); 2513 } else { 2514 throw new Error(str); 2515 } 2516 }, 2517 2518 // resets the lexer, sets new input 2519 setInput:function (input) { 2520 this._input = input; 2521 this._more = this._backtrack = this.done = false; 2522 this.yylineno = this.yyleng = 0; 2523 this.yytext = this.matched = this.match = ''; 2524 this.conditionStack = ['INITIAL']; 2525 this.yylloc = { 2526 first_line: 1, 2527 first_column: 0, 2528 last_line: 1, 2529 last_column: 0 2530 }; 2531 if (this.options.ranges) { 2532 this.yylloc.range = [0,0]; 2533 } 2534 this.offset = 0; 2535 return this; 2536 }, 2537 2538 // consumes and returns one char from the input 2539 input:function () { 2540 var ch = this._input[0]; 2541 this.yytext += ch; 2542 this.yyleng++; 2543 this.offset++; 2544 this.match += ch; 2545 this.matched += ch; 2546 var lines = ch.match(/(?:\r\n?|\n).*/g); 2547 if (lines) { 2548 this.yylineno++; 2549 this.yylloc.last_line++; 2550 } else { 2551 this.yylloc.last_column++; 2552 } 2553 if (this.options.ranges) { 2554 this.yylloc.range[1]++; 2555 } 2556 2557 this._input = this._input.slice(1); 2558 return ch; 2559 }, 2560 2561 // unshifts one char (or a string) into the input 2562 unput:function (ch) { 2563 var len = ch.length; 2564 var lines = ch.split(/(?:\r\n?|\n)/g); 2565 2566 this._input = ch + this._input; 2567 this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); 2568 //this.yyleng -= len; 2569 this.offset -= len; 2570 var oldLines = this.match.split(/(?:\r\n?|\n)/g); 2571 this.match = this.match.substr(0, this.match.length - 1); 2572 this.matched = this.matched.substr(0, this.matched.length - 1); 2573 2574 if (lines.length - 1) { 2575 this.yylineno -= lines.length - 1; 2576 } 2577 var r = this.yylloc.range; 2578 2579 this.yylloc = { 2580 first_line: this.yylloc.first_line, 2581 last_line: this.yylineno + 1, 2582 first_column: this.yylloc.first_column, 2583 last_column: lines ? 2584 (lines.length === oldLines.length ? this.yylloc.first_column : 0) 2585 + oldLines[oldLines.length - lines.length].length - lines[0].length : 2586 this.yylloc.first_column - len 2587 }; 2588 2589 if (this.options.ranges) { 2590 this.yylloc.range = [r[0], r[0] + this.yyleng - len]; 2591 } 2592 this.yyleng = this.yytext.length; 2593 return this; 2594 }, 2595 2596 // When called from action, caches matched text and appends it on next action 2597 more:function () { 2598 this._more = true; 2599 return this; 2600 }, 2601 2602 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. 2603 reject:function () { 2604 if (this.options.backtrack_lexer) { 2605 this._backtrack = true; 2606 } else { 2607 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { 2608 text: "", 2609 token: null, 2610 line: this.yylineno 2611 }); 2612 2613 } 2614 return this; 2615 }, 2616 2617 // retain first n characters of the match 2618 less:function (n) { 2619 this.unput(this.match.slice(n)); 2620 }, 2621 2622 // displays already matched input, i.e. for error messages 2623 pastInput:function () { 2624 var past = this.matched.substr(0, this.matched.length - this.match.length); 2625 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); 2626 }, 2627 2628 // displays upcoming input, i.e. for error messages 2629 upcomingInput:function () { 2630 var next = this.match; 2631 if (next.length < 20) { 2632 next += this._input.substr(0, 20-next.length); 2633 } 2634 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); 2635 }, 2636 2637 // displays the character position where the lexing error occurred, i.e. for error messages 2638 showPosition:function () { 2639 var pre = this.pastInput(); 2640 var c = new Array(pre.length + 1).join("-"); 2641 return pre + this.upcomingInput() + "\n" + c + "^"; 2642 }, 2643 2644 // test the lexed token: return FALSE when not a match, otherwise return token 2645 test_match:function (match, indexed_rule) { 2646 var token, 2647 lines, 2648 backup; 2649 2650 if (this.options.backtrack_lexer) { 2651 // save context 2652 backup = { 2653 yylineno: this.yylineno, 2654 yylloc: { 2655 first_line: this.yylloc.first_line, 2656 last_line: this.last_line, 2657 first_column: this.yylloc.first_column, 2658 last_column: this.yylloc.last_column 2659 }, 2660 yytext: this.yytext, 2661 match: this.match, 2662 matches: this.matches, 2663 matched: this.matched, 2664 yyleng: this.yyleng, 2665 offset: this.offset, 2666 _more: this._more, 2667 _input: this._input, 2668 yy: this.yy, 2669 conditionStack: this.conditionStack.slice(0), 2670 done: this.done 2671 }; 2672 if (this.options.ranges) { 2673 backup.yylloc.range = this.yylloc.range.slice(0); 2674 } 2675 } 2676 2677 lines = match[0].match(/(?:\r\n?|\n).*/g); 2678 if (lines) { 2679 this.yylineno += lines.length; 2680 } 2681 this.yylloc = { 2682 first_line: this.yylloc.last_line, 2683 last_line: this.yylineno + 1, 2684 first_column: this.yylloc.last_column, 2685 last_column: lines ? 2686 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : 2687 this.yylloc.last_column + match[0].length 2688 }; 2689 this.yytext += match[0]; 2690 this.match += match[0]; 2691 this.matches = match; 2692 this.yyleng = this.yytext.length; 2693 if (this.options.ranges) { 2694 this.yylloc.range = [this.offset, this.offset += this.yyleng]; 2695 } 2696 this._more = false; 2697 this._backtrack = false; 2698 this._input = this._input.slice(match[0].length); 2699 this.matched += match[0]; 2700 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); 2701 if (this.done && this._input) { 2702 this.done = false; 2703 } 2704 if (token) { 2705 return token; 2706 } else if (this._backtrack) { 2707 // recover context 2708 for (var k in backup) { 2709 this[k] = backup[k]; 2710 } 2711 return false; // rule action called reject() implying the next rule should be tested instead. 2712 } 2713 return false; 2714 }, 2715 2716 // return next match in input 2717 next:function () { 2718 if (this.done) { 2719 return this.EOF; 2720 } 2721 if (!this._input) { 2722 this.done = true; 2723 } 2724 2725 var token, 2726 match, 2727 tempMatch, 2728 index; 2729 if (!this._more) { 2730 this.yytext = ''; 2731 this.match = ''; 2732 } 2733 var rules = this._currentRules(); 2734 for (var i = 0; i < rules.length; i++) { 2735 tempMatch = this._input.match(this.rules[rules[i]]); 2736 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { 2737 match = tempMatch; 2738 index = i; 2739 if (this.options.backtrack_lexer) { 2740 token = this.test_match(tempMatch, rules[i]); 2741 if (token !== false) { 2742 return token; 2743 } else if (this._backtrack) { 2744 match = false; 2745 continue; // rule action called reject() implying a rule MISmatch. 2746 } else { 2747 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) 2748 return false; 2749 } 2750 } else if (!this.options.flex) { 2751 break; 2752 } 2753 } 2754 } 2755 if (match) { 2756 token = this.test_match(match, rules[index]); 2757 if (token !== false) { 2758 return token; 2759 } 2760 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) 2761 return false; 2762 } 2763 if (this._input === "") { 2764 return this.EOF; 2765 } else { 2766 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { 2767 text: "", 2768 token: null, 2769 line: this.yylineno 2770 }); 2771 } 2772 }, 2773 2774 // return next match that has a token 2775 lex:function lex() { 2776 var r = this.next(); 2777 if (r) { 2778 return r; 2779 } else { 2780 return this.lex(); 2781 } 2782 }, 2783 2784 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) 2785 begin:function begin(condition) { 2786 this.conditionStack.push(condition); 2787 }, 2788 2789 // pop the previously active lexer condition state off the condition stack 2790 popState:function popState() { 2791 var n = this.conditionStack.length - 1; 2792 if (n > 0) { 2793 return this.conditionStack.pop(); 2794 } else { 2795 return this.conditionStack[0]; 2796 } 2797 }, 2798 2799 // produce the lexer rule set which is active for the currently active lexer condition state 2800 _currentRules:function _currentRules() { 2801 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { 2802 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; 2803 } else { 2804 return this.conditions["INITIAL"].rules; 2805 } 2806 }, 2807 2808 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available 2809 topState:function topState(n) { 2810 n = this.conditionStack.length - 1 - Math.abs(n || 0); 2811 if (n >= 0) { 2812 return this.conditionStack[n]; 2813 } else { 2814 return "INITIAL"; 2815 } 2816 }, 2817 2818 // alias for begin(condition) 2819 pushState:function pushState(condition) { 2820 this.begin(condition); 2821 }, 2822 2823 // return the number of states currently on the stack 2824 stateStackSize:function stateStackSize() { 2825 return this.conditionStack.length; 2826 }, 2827 options: {}, 2828 performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { 2829 2830 var YYSTATE=YY_START; 2831 switch($avoiding_name_collisions) { 2832 case 0:/* ignore */ 2833 break; 2834 case 1:return 78 2835 break; 2836 case 2:return 78 2837 break; 2838 case 3: return 77; 2839 break; 2840 case 4: return 77; 2841 break; 2842 case 5:/* ignore comment */ 2843 break; 2844 case 6:/* ignore multiline comment */ 2845 break; 2846 case 7:return 7 2847 break; 2848 case 8:return 12 2849 break; 2850 case 9:return 14 2851 break; 2852 case 10:return 17 2853 break; 2854 case 11:return 15 2855 break; 2856 case 12:return 91 2857 break; 2858 case 13:return 93 2859 break; 2860 case 14:return 19 2861 break; 2862 case 15:return 23 2863 break; 2864 case 16:return 21 2865 break; 2866 case 17:return 75 2867 break; 2868 case 18:return 76 2869 break; 2870 case 19:return 74 2871 break; 2872 case 20:return 80 2873 break; 2874 case 21:return 94 2875 break; 2876 case 22:return 82 2877 break; 2878 case 23:return 83 2879 break; 2880 case 24:return 26 2881 break; 2882 case 25:return 27 2883 break; 2884 case 26:return 16 2885 break; 2886 case 27:return '#' 2887 break; 2888 case 28:return 34 2889 break; 2890 case 29:return 35 2891 break; 2892 case 30:return 79 2893 break; 2894 case 31:return 64 2895 break; 2896 case 32:return 65 2897 break; 2898 case 33:return 66 2899 break; 2900 case 34:return 8 2901 break; 2902 case 35:return 10 2903 break; 2904 case 36:return 58 2905 break; 2906 case 37:return 57 2907 break; 2908 case 38:return 53 2909 break; 2910 case 39:return 54 2911 break; 2912 case 40:return 55 2913 break; 2914 case 41:return 50 2915 break; 2916 case 42:return 51 2917 break; 2918 case 43:return 47 2919 break; 2920 case 44:return 45 2921 break; 2922 case 45:return 48 2923 break; 2924 case 46:return 46 2925 break; 2926 case 47:return 41 2927 break; 2928 case 48:return 43 2929 break; 2930 case 49:return 42 2931 break; 2932 case 50:return 39 2933 break; 2934 case 51:return 37 2935 break; 2936 case 52:return 32 2937 break; 2938 case 53:return 86 2939 break; 2940 case 54:return 5 2941 break; 2942 case 55:return 20 2943 break; 2944 case 56:return 'INVALID' 2945 break; 2946 } 2947 }, 2948 rules: [/^(?:\s+)/,/^(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+\b)/,/^(?:[0-9]+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:\/\/.*)/,/^(?:\/\*(.|\n|\r)*?\*\/)/,/^(?:if\b)/,/^(?:else\b)/,/^(?:while\b)/,/^(?:do\b)/,/^(?:for\b)/,/^(?:function\b)/,/^(?:map\b)/,/^(?:use\b)/,/^(?:return\b)/,/^(?:delete\b)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:Infinity\b)/,/^(?:->)/,/^(?:<<)/,/^(?:>>)/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:#)/,/^(?:\?)/,/^(?::)/,/^(?:NaN\b)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:!)/,/^(?:\^)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\+)/,/^(?:-)/,/^(?:<=)/,/^(?:<)/,/^(?:>=)/,/^(?:>)/,/^(?:==)/,/^(?:~=)/,/^(?:!=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:=)/,/^(?:,)/,/^(?:$)/,/^(?:[A-Za-z_\$][A-Za-z0-9_]*)/,/^(?:.)/], 2949 conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],"inclusive":true}} 2950 }; 2951 return lexer; 2952 })(); 2953 parser.lexer = lexer; 2954 function Parser () { 2955 this.yy = {}; 2956 } 2957 Parser.prototype = parser;parser.Parser = Parser; 2958 return new Parser; 2959 })(); 2960 2961 2962 if (typeof require !== 'undefined' && typeof exports !== 'undefined') { 2963 exports.parser = parser; 2964 exports.Parser = parser.Parser; 2965 exports.parse = function () { return parser.parse.apply(parser, arguments); }; 2966 exports.main = function commonjsMain(args) { 2967 if (!args[1]) { 2968 console.log('Usage: '+args[0]+' FILE'); 2969 process.exit(1); 2970 } 2971 var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); 2972 return exports.parser.parse(source); 2973 }; 2974 if (typeof module !== 'undefined' && require.main === module) { 2975 exports.main(process.argv.slice(1)); 2976 } 2977 } 2978 2979 // Work around an issue with browsers that don't support Object.getPrototypeOf() 2980 parser.yy.parseError = parser.parseError; 2981 2982 return JXG.JessieCode; 2983 }); 2984