You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

569 lines
1.5 MiB
JavaScript

5 years ago
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("test",[],e):"object"==typeof exports?exports.test=e():(n.peg=n.peg||{},n.peg.test=e())}("undefined"!=typeof self?self:window,function(){return function(n){var e={};function t(l){if(e[l])return e[l].exports;var r=e[l]={i:l,l:!1,exports:{}};return n[l].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,l){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:l})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(l,r,function(e){return n[e]}.bind(null,r));return l},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=54)}([function(n,e,t){"use strict";var l=t(11),r=t(7),u=t(25),i=t(16),o=t(1),a={VERSION:t(15).version,GrammarError:l,ast:r,parser:i,compiler:u,util:o,generate:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=new u.Session({passes:o.convertPasses(u.passes)});return Array.isArray(e.plugins)&&e.plugins.forEach(function(n){"function"==typeof n.use&&n.use(t,e)}),u.compile(t.parse(n,e.parser||{}),t,e)}};n.exports=a},function(n,e,t){"use strict";var l=t(21),r=t(22),u=t(23),i=t(13),o=function(){function n(n){return Array.isArray(n)?n:u.values(n)}return function(e){return u.map(e,n)}}();n.exports={find:l.find,findIndex:l.findIndex,stringEscape:r.stringEscape,regexpEscape:r.regexpEscape,reservedWords:r.reservedWords,clone:u.clone,each:u.each,extend:u.extend,map:u.map,values:u.values,enforceFastProperties:u.enforceFastProperties,evalModule:i.evalModule,convertPasses:o,processOptions:function(n,e){var t={};return u.extend(t,n),u.extend(t,e),t},noop:function(){}}},function(n,e,t){document.getElementById("mocha")||document.write('<div id="mocha"></div>'),t(57),t(62)},function(n,e,t){n.exports=t(8)},function(n,e,t){(function(e){e.nextTick(function(){delete t.c[n.i],"undefined"!=typeof window&&window.mochaPhantomJS?mochaPhantomJS.run():mocha.run()})}).call(this,t(50))},function(n,e){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e,t){var l=n.__flags||(n.__flags=Object.create(null));if(3!==arguments.length)return l[e];l[e]=t}},function(n,e,t){"use strict";var l=t(99),r=t(0).compiler.Session;n.exports=function(n,e){n.use(l);var t=n.Assertion;function u(n,e,t){var l=e.parse(n);return t.allowedStartRules||(t.allowedStartRules=l.rules.length>0?[l.rules[0].name]:[]),l}t.addMethod("changeAST",function(n,l,i,o){i=void 0!==i?i:{},o=void 0!==o?o:{reportFailures:!0};var a=new r({grammar:n}),s=u(n,a,i);s.rules=s.rules.map(function(n){return Object.assign(n,o)}),e.flag(this,"object")(s,a,i),new t(s).like(l)}),t.addMethod("reportError",function(n,l,i){i=void 0!==i?i:{};var o,a,s=new r({grammar:n}),c=u(n,s,i);try{e.flag(this,"object")(c,s,i),o=!0}catch(n){a=n,o=!1}this.assert(!o,"expected #{this} to report an error but it didn't","expected #{this} to not report an error but #{act} was reported",null,a),o||void 0===l||("string"==typeof l&&(l={message:l}),Object.keys(l).forEach(function(n){new t(a).to.have.property(n).that.is.deep.equal(l[n])}))}),t.addMethod("reportWarning",function(n,t,l){var i=this;t=Array.isArray(t)?t:null==t?[]:[t],l=void 0!==l?l:{};var o=[];var a=new r({grammar:n,warn:function(n){o.push(n)}}),s=u(n,a,l);e.flag(this,"object")(s,a,l);var c=o.length,f=t.length;t.length&&this.assert(c===f,"expected #{this} to report ".concat(f," warnings, but it reported ").concat(c," warnings"),"expected #{this} to not report ".concat(f," warnings"),t,o),t.forEach(function(n){i.assert(-1!==o.indexOf(n),"expected #{this} to report the warning #{exp}, but it didn't","expected #{this} to not report the warning #{exp}",n)})})}},function(n,e,t){"use strict";e.visitor=t(12),e.Node=t(14),e.Grammar=t(24)},function(n,e,t){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=[];
/*!
* Chai version
5 years ago
*/e.version="4.2.0",
/*!
* Assertion Error
*/
5 years ago
e.AssertionError=t(43);
/*!
* Utils for plugins (not exported)
*/
5 years ago
var r=t(66);e.use=function(n){return~l.indexOf(n)||(n(e,r),l.push(n)),e},
/*!
* Utility Functions
*/
5 years ago
e.util=r;
/*!
* Configuration
*/
5 years ago
var u=t(10);e.config=u;
/*!
* Primary `Assertion` prototype
*/
5 years ago
var i=t(83);e.use(i);
/*!
* Core Assertions
*/
5 years ago
var o=t(84);e.use(o);
/*!
* Expect interface
*/
5 years ago
var a=t(85);e.use(a);
/*!
* Should interface
*/
5 years ago
var s=t(86);e.use(s);
/*!
* Assert interface
*/
5 years ago
var c=t(87);e.use(c)},function(n,e){
/*!
* Chai - transferFlags utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e,t){var l=n.__flags||(n.__flags=Object.create(null));for(var r in e.__flags||(e.__flags=Object.create(null)),t=3!==arguments.length||t,l)(t||"object"!==r&&"ssfi"!==r&&"lockSsfi"!==r&&"message"!=r)&&(e.__flags[r]=l[r])}},function(n,e){n.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"]}},function(n,e,t){"use strict";n.exports=function n(e,t){!function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.name="GrammarError",this.message=e,this.location=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,n)}},function(n,e,t){"use strict";function l(n,e){for(var t=0;t<e.length;t++){var l=e[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}var r=t(1),u=function(){function n(){!function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n)}var e,t,r;return e=n,(t=[{key:"visit",value:function(n){if(!n)throw new Error("Visitor function called with no arguments or a `falsy` node");var e=this[n.type];if(!e)throw new Error('Visitor function for node type "'.concat(n.type,'" not defined'));return e.apply(this,arguments)}}])&&l(e.prototype,t),r&&l(e,r),n}();n.exports={ASTVisitor:u,build:function(n){var e=new u;return r.extend(e,n),(e=r.enforceFastProperties(e)).visit.bind(e)}};var i=u.on={property:function(n){return function(e){for(var t=e[n],l=arguments.length,r=new Array(l>1?l-1:0),u=1;u<l;u++)r[u-1]=arguments[u];r.length?this.visit.apply(this,[t].concat(r)):this.visit(t)}},children:function(n){return function(e){for(var t=arguments.length,l=new Array(t>1?t-1:0),r=1;r<t;r++)l[r-1]=arguments[r];var u=e[n],i=this,o=l.length<1?function(n){i.visit(n)}:function(n){i.visit.apply(i,[n].concat(l))};u.forEach(o)}}},o=r.noop,a=i.property("expression"),s={grammar:function(n){for(var e=this,t=arguments.length,l=new Array(t>1?t-1:0),r=1;r<t;r++)l[r-1]=arguments[r];n.initializer&&this.visit.apply(this,[n.initializer].concat(l)),n.rules.forEach(function(n){e.visit.apply(e,[n].concat(l))})},initializer:o,rule:a,named:a,choice:i.children("alternatives"),action:a,sequence:i.children("elements"),labeled:a,text:a,simple_and:a,simple_not:a,optional:a,zero_or_more:a,one_or_more:a,group:a,semantic_and:o,semantic_not:o,rule_ref:o,literal:o,class:o,any:o};r.each(s,function(n,e){u.prototype[e]=n})},function(n,e,t){"use strict";function l(n){return function(n){if(Array.isArray(n)){for(var e=0,t=new Array(n.length);e<n.length;e++)t[e]=n[e];return t}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.exports={evalModule:function(n,e){var t=Object.keys(e),r=t.map(function(n){return e[n]}),u={exports:{}};return t.push("module","exports",n),r.push(u,u.exports),Function.apply(void 0,l(t)).apply(void 0,l(r)),u.exports}}},function(n,e,t){"use strict";n.exports=function n(e,t){!function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.type=e,this.location=t}},function(n){n.exports={name:"pegjs",version:"0.11.0-dev",description:"Parser generator for JavaScript",keywords:["PEG.js","pegjs","grammar","parser","generator","language","PEG"],homepage:"https://pegjs.org/",repository:"pegjs/pegjs",license:"MIT",contributors:["David Majda <david@majda.cz> (https://majda.cz/)","Futago-za Ryuu <futagoza.ryuu@gmail.com>"],types:"typings/pegjs.d.ts",main:"lib/peg.js",bin:"bin/peg.js",engines:{node:">= 6"}}},function(n,e,t){"use strict";var l=t(7),r=t(1);function u(n,e,t,l){this.message=n,this.expected=e,this.found=t,this.location=l,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,u)}!function(n,e){function t(){this.constructor=n}t.prototype=e.prototype,n.prototype=new t}(u,Error),u.buildMessage=function(n,e){var t={literal:function(n){return'"'+r(n.text)+'"'},
/*!
* Chai - isProxyEnabled helper
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
5 years ago
*/n.exports=function(){return l.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}},function(n,e){var t=Object.getOwnPropertyDescriptor(function(){},"length");
/*!
* Chai - addLengthGuard utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
5 years ago
*/n.exports=function(n,e,l){return t.configurable?(Object.defineProperty(n,"length",{get:function(){if(l)throw Error("Invalid Chai property: "+e+'.length. Due to a compatibility issue, "length" cannot directly follow "'+e+'". Use "'+e+'.lengthOf" instead.');throw Error("Invalid Chai property: "+e+'.length. See docs for proper usage of "'+e+'".')}}),n):n}},function(n,e,t){var l=t(10),r=t(5),u=t(47),i=t(18),o=["__flags","__methods","_obj","assert"];n.exports=function(n,e){return i()?new Proxy(n,{get:function n(t,i){if("string"==typeof i&&-1===l.proxyExcludedKeys.indexOf(i)&&!Reflect.has(t,i)){if(e)throw Error("Invalid Chai property: "+e+"."+i+'. See docs for proper usage of "'+e+'".');var a=null,s=4;throw u(t).forEach(function(n){if(!Object.prototype.hasOwnProperty(n)&&-1===o.indexOf(n)){var e=function(n,e,t){if(Math.abs(n.length-e.length)>=t)return t;for(var l=[],r=0;r<=n.length;r++)l[r]=Array(e.length+1).fill(0),l[r][0]=r;for(var u=0;u<e.length;u++)l[0][u]=u;for(var r=1;r<=n.length;r++)for(var i=n.charCodeAt(r-1),u=1;u<=e.length;u++)Math.abs(r-u)>=t?l[r][u]=t:l[r][u]=Math.min(l[r-1][u]+1,l[r][u-1]+1,l[r-1][u-1]+(i===e.charCodeAt(u-1)?0:1));return l[n.length][e.length]}(i,n,s);e<s&&(a=n,s=e)}}),null!==a?Error("Invalid Chai property: "+i+'. Did you mean "'+a+'"?'):Error("Invalid Chai property: "+i)}return-1!==o.indexOf(i)||r(t,"lockSsfi")||r(t,"ssfi",n),Reflect.get(t,i)}}):n}},function(n,e,t){"use strict";function l(n,e){for(var t=0;t<n.length;++t)if(e(n[t],t))return t;return-1}n.exports={findIndex:l,find:function(n,e){var t=l(n,e);return t<0?void 0:n[t]}}},function(n,e,t){"use strict";function l(n){return n.charCodeAt(0).toString(16).toUpperCase()}function r(n){return n.replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(n){return"\\x0"+l(n)}).replace(/[\x10-\x1F\x7F-\xFF]/g,function(n){return"\\x"+l(n)}).replace(/[\u0100-\u0FFF]/g,function(n){return"\\u0"+l(n)}).replace(/[\u1000-\uFFFF]/g,function(n){return"\\u"+l(n)})}var u={stringEscape:function(n){return r(n.replace(/\\/g,"\\\\").replace(/"/g,'\\"'))},regexpEscape:function(n){return r(n.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-"))},reservedWords:["break","case","catch","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","class","const","enum","export","extends","implements","import","interface","let","package","private","protected","public","static","super","yield","false","null","true"]};n.exports=u},function(n,e,t){"use strict";function l(n){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var r=Object.prototype.hasOwnProperty,u={clone:function(n){var e={};for(var t in n)r.call(n,t)&&(e[t]=n[t]);return e},each:function(n,e){for(var t in n)r.call(n,t)&&e(n[t],t)},extend:function(n,e){for(var t in e)r.call(e,t)&&(r.call(n,t)||(n[t]=e[t]));return n},map:function(n,e){var t={};for(var l in n)r.call(n,l)&&(t[l]=e(n[l],l));return t},values:function(n,e){var t,l,u=[],i=-1;for(t in n)r.call(n,t)&&(l=n[t],u[++i]=e?e(l,t):l);return u},enforceFastProperties:function n(e){function t(){}t.prototype=e;var r=new t;function u(){return l(r.foo)}return u(),u(),e}};n.exports=u},function(n,e,t){"use strict";function l(n){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function r(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function u(n,e){for(var t=0;t<e.length;t++){var l=e[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function i(n,e,t){
/*!
* assertion-error
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
* MIT Licensed
*/
/*!
* Return a function that will copy properties from
* one object to another excluding any originally
* listed. Returned function will create a new `{}`.
*
* @param {String} excluded properties ...
* @return {Function}
*/
5 years ago
function t(){var n=[].slice.call(arguments);function e(e,t){Object.keys(t).forEach(function(l){~n.indexOf(l)||(e[l]=t[l])})}return function(){for(var n=[].slice.call(arguments),t=0,l={};t<n.length;t++)e(l,n[t]);return l}}function l(n,e,r){var u=t("name","message","stack","constructor","toJSON")(e||{});for(var i in this.message=n||"Unspecified AssertionError",this.showDiff=!1,u)this[i]=u[i];if(r=r||l,Error.captureStackTrace)Error.captureStackTrace(this,r);else try{throw new Error}catch(n){this.stack=n.stack}}
/*!
* Inherit from Error.prototype
*/
/*!
* Primary Exports
*/
5 years ago
n.exports=l,l.prototype=Object.create(Error.prototype),
/*!
* Statically set name
*/
5 years ago
l.prototype.name="AssertionError",
/*!
* Ensure correct constructor
*/
5 years ago
l.prototype.constructor=l,l.prototype.toJSON=function(n){var e=t("constructor","toJSON","stack")({name:this.name},this);return!1!==n&&this.stack&&(e.stack=this.stack),e}},function(n,e){
/*!
* Chai - getActual utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e){return e.length>4?e[4]:n._obj}},function(n,e,t){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(41),r=t(10);n.exports=function(n){var e=l(n),t=Object.prototype.toString.call(n);if(r.truncateThreshold&&e.length>=r.truncateThreshold){if("[object Function]"===t)return n.name&&""!==n.name?"[Function: "+n.name+"]":"[Function]";if("[object Array]"===t)return"[ Array("+n.length+") ]";if("[object Object]"===t){var u=Object.keys(n);return"{ Object ("+(u.length>2?u.splice(0,2).join(", ")+", ...":u.join(", "))+") }"}return e}return e}},function(n,e,t){"use strict";var l=Function.prototype.toString,r=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;n.exports=function(n){if("function"!=typeof n)return null;var e="";if(void 0===Function.prototype.name&&void 0===n.name){var t=l.call(n).match(r);t&&(e=t[1])}else e=n.name;return e}},function(n,e){
/*!
* Chai - getProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n){var e=Object.getOwnPropertyNames(n);function t(n){-1===e.indexOf(n)&&e.push(n)}for(var l=Object.getPrototypeOf(n);null!==l;)Object.getOwnPropertyNames(l).forEach(t),l=Object.getPrototypeOf(l);return e}},function(n,e){
/*!
* Chai - getOwnEnumerablePropertySymbols utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})}},function(n,e,t){(function(n){var l=void 0!==n&&n||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function u(n,e){this._id=n,this._clearFn=e}e.setTimeout=function(){return new u(r.call(setTimeout,l,arguments),clearTimeout)},e.setInterval=function(){return new u(r.call(setInterval,l,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(n){n&&n.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(l,this._id)},e.enroll=function(n,e){clearTimeout(n._idleTimeoutId),n._idleTimeout=e},e.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},e._unrefActive=e.active=function(n){clearTimeout(n._idleTimeoutId);var e=n._idleTimeout;e>=0&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},e))},t(88),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==n&&n.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==n&&n.clearImmediate||this&&this.clearImmediate}).call(this,t(17))},function(n,e){var t,l,r=n.exports={};function u(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(n){if(t===setTimeout)return setTimeout(n,0);if((t===u||!t)&&setTimeout)return t=setTimeout,setTimeout(n,0);try{return t(n,0)}catch(e){try{return t.call(null,n,0)}catch(e){return t.call(this,n,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:u}catch(n){t=u}try{l="function"==typeof clearTimeout?clearTimeout:i}catch(n){l=i}}();var a,s=[],c=!1,f=-1;function p(){c&&a&&(c=!1,a.length?s=a.concat(s):f=-1,s.length&&d())}function d(){if(!c){var n=o(p);c=!0;for(var e=s.length;e;){for(a=s,s=[];++f<e;)a&&a[f].run();f=-1,e=s.length}a=null,c=!1,function(n){if(l===clearTimeout)return clearTimeout(n);if((l===i||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(n);try{l(n)}catch(e){try{return l.call(null,n)}catch(e){return l.call(this,n)}}}(n)}}function h(n,e){this.fun=n,this.array=e}function m(){}r.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];s.push(new h(n,e)),1!==s.length||c||o(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(n){return[]},r.binding=function(n){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(n){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},,,,function(n,e,t){"use strict";var l=t(55);l.keys().forEach(l),n.exports=l},function(n,e,t){var l={"./api/generated-parser-api.spec.js":56,"./api/pegjs-api.spec.js":89,"./api/pegjs-util.spec.js":91,"./api/plugin-api.spec.js":93,"./behavior/generated-parser-behavior.spec.js":95,"./unit/compiler/passes/generate-bytecode.spec.js":97,"./unit/compiler/passes/inference-match-result.spec.js":101,"./unit/compiler/passes/remove-proxy-rules.spec.js":103,"./unit/compiler/passes/report-duplicate-labels.spec.js":105,"./unit/compiler/passes/report-duplicate-rules.spec.js":107,"./unit/compiler/passes/report-incorrect-plucking.spec.js":109,"./unit/compiler/passes/report-infinite-recursion.spec.js":111,"./unit/compiler/passes/report-infinite-repetition.spec.js":113,"./unit/compiler/passes/report-undefined-rules.spec.js":115,"./unit/compiler/passes/report-unused-rules.spec.js":117,"./unit/parser.spec.js":119};function r(n){var e=u(n);return t(e)}function u(n){if(!t.o(l,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return l[n]}r.keys=function(){return Object.keys(l)},r.resolve=u,n.exports=r,r.id=55},function(n,e,t){t(2),"undefin
/*!
* chai
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Dependencies that are used for multiple exports are required here only once
*/
5 years ago
var l=t(67);
/*!
* test utility
5 years ago
*/e.test=t(68),
/*!
* type utility
*/
5 years ago
e.type=t(40),
/*!
* expectTypes utility
*/
5 years ago
e.expectTypes=t(69),
/*!
* message utility
*/
5 years ago
e.getMessage=t(70),
/*!
* actual utility
*/
5 years ago
e.getActual=t(44),
/*!
* Inspect util
*/
5 years ago
e.inspect=t(41),
/*!
* Object Display util
*/
5 years ago
e.objDisplay=t(45),
/*!
* Flag utility
*/
5 years ago
e.flag=t(5),
/*!
* Flag transferring utility
*/
5 years ago
e.transferFlags=t(9),
/*!
* Deep equal utility
*/
5 years ago
e.eql=t(72),
/*!
* Deep path info
*/
5 years ago
e.getPathInfo=l.getPathInfo,
/*!
* Check if a property exists
*/
5 years ago
e.hasProperty=l.hasProperty,
/*!
* Function name
*/
5 years ago
e.getName=t(46),
/*!
* add Property
*/
5 years ago
e.addProperty=t(73),
/*!
* add Method
*/
5 years ago
e.addMethod=t(74),
/*!
* overwrite Property
*/
5 years ago
e.overwriteProperty=t(75),
/*!
* overwrite Method
*/
5 years ago
e.overwriteMethod=t(76),
/*!
* Add a chainable method
*/
5 years ago
e.addChainableMethod=t(77),
/*!
* Overwrite chainable method
*/
5 years ago
e.overwriteChainableMethod=t(78),
/*!
* Compare by inspect method
*/
5 years ago
e.compareByInspect=t(79),
/*!
* Get own enumerable property symbols method
*/
5 years ago
e.getOwnEnumerablePropertySymbols=t(48),
/*!
* Get own enumerable properties method
*/
5 years ago
e.getOwnEnumerableProperties=t(80),
/*!
* Checks error against a given set of criteria
*/
5 years ago
e.checkError=t(81),
/*!
* Proxify util
*/
5 years ago
e.proxify=t(20),
/*!
* addLengthGuard util
*/
5 years ago
e.addLengthGuard=t(19),
/*!
* isProxyEnabled helper
*/
5 years ago
e.isProxyEnabled=t(18),
/*!
* isNaN method
*/
5 years ago
e.isNaN=t(82)},function(n,e,t){"use strict";function l(n,e){return null!=n&&e in Object(n)}function r(n){return n.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(n){var e=/^\[(\d+)\]$/.exec(n);return e?{i:parseFloat(e[1])}:{p:n.replace(/\\([.\[\]])/g,"$1")}})}function u(n,e,t){var l=n,r=null;t=void 0===t?e.length:t;for(var u=0;u<t;u++){var i=e[u];l&&(l=void 0===i.p?l[i.i]:l[i.p],u===t-1&&(r=l))}return r}function i(n,e){var t=r(e),i=t[t.length-1],o={parent:t.length>1?u(n,t,t.length-1):n,name:i.p||i.i,value:u(n,t)};return o.exists=l(o.parent,o.name),o}n.exports={hasProperty:l,getPathInfo:i,getPathValue:function(n,e){return i(n,e).value},setPathValue:function(n,e,t){return function(n,e,t){for(var l=n,r=t.length,u=null,i=0;i<r;i++){var o=null,a=null;if(u=t[i],i===r-1)l[o=void 0===u.p?u.i:u.p]=e;else if(void 0!==u.p&&l[u.p])l=l[u.p];else if(void 0!==u.i&&l[u.i])l=l[u.i];else{var s=t[i+1];o=void 0===u.p?u.i:u.p,a=void 0===s.p?[]:{},l[o]=a,l=l[o]}}}(n,t,r(e)),n}}},function(n,e,t){
/*!
* Chai - test utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(5);n.exports=function(n,e){var t=l(n,"negate"),r=e[0];return t?!r:r}},function(n,e,t){
/*!
* Chai - expectTypes utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(43),r=t(5),u=t(40);n.exports=function(n,e){var t=r(n,"message"),i=r(n,"ssfi");t=t?t+": ":"",n=r(n,"object"),(e=e.map(function(n){return n.toLowerCase()})).sort();var o=e.map(function(n,t){var l=~["a","e","i","o","u"].indexOf(n.charAt(0))?"an":"a";return(e.length>1&&t===e.length-1?"or ":"")+l+" "+n}).join(", "),a=u(n).toLowerCase();if(!e.some(function(n){return a===n}))throw new l(t+"object tested must be "+o+", but "+a+" given",void 0,i)}},function(n,e,t){
/*!
* Chai - message composition utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(5),r=t(44),u=t(45);n.exports=function(n,e){var t=l(n,"negate"),i=l(n,"object"),o=e[3],a=r(n,e),s=t?e[2]:e[1],c=l(n,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,function(){return u(i)}).replace(/#\{act\}/g,function(){return u(a)}).replace(/#\{exp\}/g,function(){return u(o)}),c?c+": "+s:s}},function(n,e){
/*!
* Chai - getEnumerableProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n){var e=[];for(var t in n)e.push(t);return e}},function(n,e,t){"use strict";
/*!
* deep-eql
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
5 years ago
*/var l=t(40);function r(){this._key="chai/deep-eql__"+Math.random()+Date.now()}r.prototype={get:function(n){return n[this._key]},set:function(n,e){Object.isExtensible(n)&&Object.defineProperty(n,this._key,{value:e,configurable:!0})}};var u="function"==typeof WeakMap?WeakMap:r;
/*!
* Check to see if the MemoizeMap has recorded a result of the two operands
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @returns {Boolean|null} result
5 years ago
*/function i(n,e,t){if(!t||g(n)||g(e))return null;var l=t.get(n);if(l){var r=l.get(e);if("boolean"==typeof r)return r}return null}
/*!
* Set the result of the equality into the MemoizeMap
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @param {Boolean} result
5 years ago
*/function o(n,e,t,l){if(t&&!g(n)&&!g(e)){var r=t.get(n);r?r.set(e,l):((r=new u).set(e,l),t.set(n,r))}}
/*!
* Primary Export
5 years ago
*/function a(n,e,t){if(t&&t.comparator)return c(n,e,t);var l=s(n,e);return null!==l?l:c(n,e,t)}function s(n,e){return n===e?0!==n||1/n==1/e:n!=n&&e!=e||!g(n)&&!g(e)&&null}
/*!
* The main logic of the `deepEqual` function.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (optional) Additional options
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
references to blow the stack.
* @return {Boolean} equal match
5 years ago
*/function c(n,e,t){(t=t||{}).memoize=!1!==t.memoize&&(t.memoize||new u);var r=t&&t.comparator,c=i(n,e,t.memoize);if(null!==c)return c;var g=i(e,n,t.memoize);if(null!==g)return g;if(r){var b=r(n,e);if(!1===b||!0===b)return o(n,e,t.memoize,b),b;var y=s(n,e);if(null!==y)return y}var v=l(n);if(v!==l(e))return o(n,e,t.memoize,!1),!1;o(n,e,t.memoize,!0);var w=function(n,e,t,l){switch(t){case"String":case"Number":case"Boolean":case"Date":return a(n.valueOf(),e.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":case"Error":return n===e;case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return p(n,e,l);case"RegExp":
/*!
* Compare two Regular Expressions for equality.
*
* @param {RegExp} leftHandOperand
* @param {RegExp} rightHandOperand
* @return {Boolean} result
*/
5 years ago
return function(n,e){return n.toString()===e.toString()}
/*!
* Compare two Sets/Maps for equality. Faster than other equality functions.
*
* @param {Set} leftHandOperand
* @param {Set} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
5 years ago
*/(n,e);case"Generator":
/*!
* Simple equality for generator objects such as those returned by generator functions.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
5 years ago
return function(n,e,t){return p(h(n),h(e),t)}
/*!
* Determine if the given object has an @@iterator function.
*
* @param {Object} target
* @return {Boolean} `true` if the object has an @@iterator function.
5 years ago
*/(n,e,l);case"DataView":return p(new Uint8Array(n.buffer),new Uint8Array(e.buffer),l);case"ArrayBuffer":return p(new Uint8Array(n),new Uint8Array(e),l);case"Set":case"Map":return f(n,e,l);default:
/*!
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
* for each enumerable key in the object.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
5 years ago
return function(n,e,t){var l=m(n),r=m(e);if(l.length&&l.length===r.length)return l.sort(),r.sort(),!1!==p(l,r)&&
/*!
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
* each key. If any value of the given key is not equal, the function will return false (early).
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
5 years ago
function(n,e,t,l){var r=t.length;if(0===r)return!0;for(var u=0;u<r;u+=1)if(!1===a(n[t[u]],e[t[u]],l))return!1;return!0}(n,e,l,t);var u=d(n),i=d(e);if(u.length&&u.length===i.length)return u.sort(),i.sort(),p(u,i,t);if(0===l.length&&0===u.length&&0===r.length&&0===i.length)return!0;return!1}
/*!
* Returns true if the argument is a primitive.
*
* This intentionally returns true for all objects that can be compared by reference,
* including functions and symbols.
*
* @param {Mixed} value
* @return {Boolean} result
5 years ago
*/(n,e,l)}}(n,e,v,t);return o(n,e,t.memoize,w),w}function f(n,e,t){if(n.size!==e.size)return!1;if(0===n.size)return!0;var l=[],r=[];return n.forEach(function(n,e){l.push([n,e])}),e.forEach(function(n,e){r.push([n,e])}),p(l.sort(),r.sort(),t)}
/*!
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
5 years ago
*/function p(n,e,t){var l=n.length;if(l!==e.length)return!1;if(0===l)return!0;for(var r=-1;++r<l;)if(!1===a(n[r],e[r],t))return!1;return!0}
/*!
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
*
* @param {Object} target
* @returns {Array} an array of entries from the @@iterator function
*/
5 years ago
function d(n){if(function(n){return"undefined"!=typeof Symbol&&"object"==typeof n&&void 0!==Symbol.iterator&&"function"==typeof n[Symbol.iterator]}(n))try{return h(n[Symbol.iterator]())}catch(n){return[]}return[]}
/*!
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
*
* @param {Generator} target
* @returns {Array} an array of entries from the Generator.
5 years ago
*/function h(n){for(var e=n.next(),t=[e.value];!1===e.done;)e=n.next(),t.push(e.value);return t}
/*!
* Gets all own and inherited enumerable keys from a target.
*
* @param {Object} target
* @returns {Array} an array of own and inherited enumerable keys from the target.
5 years ago
*/function m(n){var e=[];for(var t in n)e.push(t);return e}function g(n){return null===n||"object"!=typeof n}n.exports=a,n.exports.MemoizeMap=u},function(n,e,t){
/*!
* Chai - addProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(8),r=t(5),u=t(18),i=t(9);n.exports=function(n,e,t){t=void 0===t?function(){}:t,Object.defineProperty(n,e,{get:function n(){u()||r(this,"lockSsfi")||r(this,"ssfi",n);var e=t.call(this);if(void 0!==e)return e;var o=new l.Assertion;return i(this,o),o},configurable:!0})}},function(n,e,t){
/*!
* Chai - addMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(19),r=t(8),u=t(5),i=t(20),o=t(9);n.exports=function(n,e,t){var a=function(){u(this,"lockSsfi")||u(this,"ssfi",a);var n=t.apply(this,arguments);if(void 0!==n)return n;var e=new r.Assertion;return o(this,e),e};l(a,e,!1),n[e]=i(a,e)}},function(n,e,t){
/*!
* Chai - overwriteProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(8),r=t(5),u=t(18),i=t(9);n.exports=function(n,e,t){var o=Object.getOwnPropertyDescriptor(n,e),a=function(){};o&&"function"==typeof o.get&&(a=o.get),Object.defineProperty(n,e,{get:function n(){u()||r(this,"lockSsfi")||r(this,"ssfi",n);var e=r(this,"lockSsfi");r(this,"lockSsfi",!0);var o=t(a).call(this);if(r(this,"lockSsfi",e),void 0!==o)return o;var s=new l.Assertion;return i(this,s),s},configurable:!0})}},function(n,e,t){
/*!
* Chai - overwriteMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(19),r=t(8),u=t(5),i=t(20),o=t(9);n.exports=function(n,e,t){var a=n[e],s=function(){throw new Error(e+" is not a function")};a&&"function"==typeof a&&(s=a);var c=function(){u(this,"lockSsfi")||u(this,"ssfi",c);var n=u(this,"lockSsfi");u(this,"lockSsfi",!0);var e=t(s).apply(this,arguments);if(u(this,"lockSsfi",n),void 0!==e)return e;var l=new r.Assertion;return o(this,l),l};l(c,e,!1),n[e]=i(c,e)}},function(n,e,t){
/*!
* Chai - addChainingMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(19),r=t(8),u=t(5),i=t(20),o=t(9),a="function"==typeof Object.setPrototypeOf,s=function(){},c=Object.getOwnPropertyNames(s).filter(function(n){var e=Object.getOwnPropertyDescriptor(s,n);return"object"!=typeof e||!e.configurable}),f=Function.prototype.call,p=Function.prototype.apply;n.exports=function(n,e,t,s){"function"!=typeof s&&(s=function(){});var d={method:t,chainingBehavior:s};n.__methods||(n.__methods={}),n.__methods[e]=d,Object.defineProperty(n,e,{get:function(){d.chainingBehavior.call(this);var t=function(){u(this,"lockSsfi")||u(this,"ssfi",t);var n=d.method.apply(this,arguments);if(void 0!==n)return n;var e=new r.Assertion;return o(this,e),e};if(l(t,e,!0),a){var s=Object.create(this);s.call=f,s.apply=p,Object.setPrototypeOf(t,s)}else{Object.getOwnPropertyNames(n).forEach(function(e){if(-1===c.indexOf(e)){var l=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,l)}})}return o(this,t),i(t)},configurable:!0})}},function(n,e,t){
/*!
* Chai - overwriteChainableMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(8),r=t(9);n.exports=function(n,e,t,u){var i=n.__methods[e],o=i.chainingBehavior;i.chainingBehavior=function(){var n=u(o).call(this);if(void 0!==n)return n;var e=new l.Assertion;return r(this,e),e};var a=i.method;i.method=function(){var n=t(a).apply(this,arguments);if(void 0!==n)return n;var e=new l.Assertion;return r(this,e),e}}},function(n,e,t){
/*!
* Chai - compareByInspect utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(41);n.exports=function(n,e){return l(n)<l(e)?-1:1}},function(n,e,t){
/*!
* Chai - getOwnEnumerableProperties utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
5 years ago
var l=t(48);n.exports=function(n){return Object.keys(n).concat(l(n))}},function(n,e,t){"use strict";var l=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/;function r(n){var e="";if(void 0===n.name){var t=String(n).match(l);t&&(e=t[1])}else e=n.name;return e}n.exports={compatibleInstance:function(n,e){return e instanceof Error&&n===e},compatibleConstructor:function(n,e){return e instanceof Error?n.constructor===e.constructor||n instanceof e.constructor:(e.prototype instanceof Error||e===Error)&&(n.constructor===e||n instanceof e)},compatibleMessage:function(n,e){var t="string"==typeof n?n:n.message;return e instanceof RegExp?e.test(t):"string"==typeof e&&-1!==t.indexOf(e)},getMessage:function(n){var e="";return n&&n.message?e=n.message:"string"==typeof n&&(e=n),e},getConstructorName:function(n){var e=n;return n instanceof Error?e=r(n.constructor):"function"==typeof n&&(e=r(n).trim()||r(new n)),e}}},function(n,e){n.exports=Number.isNaN||
/*!
* Chai - isNaN utility
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* MIT Licensed
*/
5 years ago
function(n){return n!=n}},function(n,e,t){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
var l=t(10);n.exports=function(n,e){
/*!
* Module dependencies.
*/
5 years ago
var t=n.AssertionError,r=e.flag;
/*!
* Module export.
*/
/*!
* Assertion Constructor
*
* Creates object for chaining.
*
* `Assertion` objects contain metadata in the form of flags. Three flags can
* be assigned during instantiation by passing arguments to this constructor:
*
* - `object`: This flag contains the target of the assertion. For example, in
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
* contain `numKittens` so that the `equal` assertion can reference it when
* needed.
*
* - `message`: This flag contains an optional custom error message to be
* prepended to the error message that's generated by the assertion when it
* fails.
*
* - `ssfi`: This flag stands for "start stack function indicator". It
* contains a function reference that serves as the starting point for
* removing frames from the stack trace of the error that's created by the
* assertion when it fails. The goal is to provide a cleaner stack trace to
* end users by removing Chai's internal functions. Note that it only works
* in environments that support `Error.captureStackTrace`, and only when
* `Chai.config.includeStack` hasn't been set to `false`.
*
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
* should retain its current value, even as assertions are chained off of
* this object. This is usually set to `true` when creating a new assertion
* from within another assertion. It's also temporarily set to `true` before
* an overwritten assertion gets called by the overwriting assertion.
*
* @param {Mixed} obj target of the assertion
* @param {String} msg (optional) custom error message
* @param {Function} ssfi (optional) starting point for removing stack frames
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
* @api private
*/
5 years ago
function u(n,t,l,i){return r(this,"ssfi",l||u),r(this,"lockSsfi",i),r(this,"object",n),r(this,"message",t),e.proxify(this)}n.Assertion=u,Object.defineProperty(u,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),l.includeStack},set:function(n){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),l.includeStack=n}}),Object.defineProperty(u,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),l.showDiff},set:function(n){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),l.showDiff=n}}),u.addProperty=function(n,t){e.addProperty(this.prototype,n,t)},u.addMethod=function(n,t){e.addMethod(this.prototype,n,t)},u.addChainableMethod=function(n,t,l){e.addChainableMethod(this.prototype,n,t,l)},u.overwriteProperty=function(n,t){e.overwriteProperty(this.prototype,n,t)},u.overwriteMethod=function(n,t){e.overwriteMethod(this.prototype,n,t)},u.overwriteChainableMethod=function(n,t,l){e.overwriteChainableMethod(this.prototype,n,t,l)},u.prototype.assert=function(n,u,i,o,a,s){var c=e.test(this,arguments);if(!1!==s&&(s=!0),void 0===o&&void 0===a&&(s=!1),!0!==l.showDiff&&(s=!1),!c){u=e.getMessage(this,arguments);var f=e.getActual(this,arguments);throw new t(u,{actual:f,expected:o,showDiff:s},l.includeStack?this.assert:r(this,"ssfi"))}},
/*!
* ### ._obj
*
* Quick reference to stored `actual` value for plugin developers.
*
* @api private
*/
5 years ago
Object.defineProperty(u.prototype,"_obj",{get:function(){return r(this,"object")},set:function(n){r(this,"object",n)}})}},function(n,e){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e){var t=n.Assertion,l=n.AssertionError,r=e.flag;function u(n,t){t&&r(this,"message",t),n=n.toLowerCase();var l=r(this,"object"),u=~["a","e","i","o","u"].indexOf(n.charAt(0))?"an ":"a ";this.assert(n===e.type(l).toLowerCase(),"expected #{this} to be "+u+n,"expected #{this} not to be "+u+n)}function i(n,t){return e.isNaN(n)&&e.isNaN(t)||n===t}function o(){r(this,"contains",!0)}function a(n,u){u&&r(this,"message",u);var o=r(this,"object"),a=e.type(o).toLowerCase(),s=r(this,"message"),c=r(this,"negate"),f=r(this,"ssfi"),p=r(this,"deep"),d=p?"deep ":"";s=s?s+": ":"";var h=!1;switch(a){case"string":h=-1!==o.indexOf(n);break;case"weakset":if(p)throw new l(s+"unable to use .deep.include with WeakSet",void 0,f);h=o.has(n);break;case"map":var m=p?e.eql:i;o.forEach(function(e){h=h||m(e,n)});break;case"set":p?o.forEach(function(t){h=h||e.eql(t,n)}):h=o.has(n);break;case"array":h=p?o.some(function(t){return e.eql(t,n)}):-1!==o.indexOf(n);break;default:if(n!==Object(n))throw new l(s+"object tested must be an array, a map, an object, a set, a string, or a weakset, but "+a+" given",void 0,f);var g=Object.keys(n),b=null,y=0;if(g.forEach(function(u){var i=new t(o);if(e.transferFlags(this,i,!0),r(i,"lockSsfi",!0),c&&1!==g.length)try{i.property(u,n[u])}catch(n){if(!e.checkError.compatibleConstructor(n,l))throw n;null===b&&(b=n),y++}else i.property(u,n[u])},this),c&&g.length>1&&y===g.length)throw b;return}this.assert(h,"expected #{this} to "+d+"include "+e.inspect(n),"expected #{this} to not "+d+"include "+e.inspect(n))}function s(){var n=r(this,"object"),t=e.type(n);this.assert("Arguments"===t,"expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}function c(n,e){e&&r(this,"message",e);var t=r(this,"object");if(r(this,"deep")){var l=r(this,"lockSsfi");r(this,"lockSsfi",!0),this.eql(n),r(this,"lockSsfi",l)}else this.assert(n===t,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",n,this._obj,!0)}function f(n,t){t&&r(this,"message",t),this.assert(e.eql(n,r(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,this._obj,!0)}function p(n,u){u&&r(this,"message",u);var i,o=r(this,"object"),a=r(this,"doLength"),s=r(this,"message"),c=s?s+": ":"",f=r(this,"ssfi"),p=e.type(o).toLowerCase(),d=e.type(n).toLowerCase(),h=!0;if(a&&"map"!==p&&"set"!==p&&new t(o,s,f,!0).to.have.property("length"),a||"date"!==p||"date"===d)if("number"===d||!a&&"number"!==p)if(a||"date"===p||"number"===p)h=!1;else{i=c+"expected "+("string"===p?"'"+o+"'":o)+" to be a number or a date"}else i=c+"the argument to above must be a number";else i=c+"the argument to above must be a date";if(h)throw new l(i,void 0,f);if(a){var m,g="length";"map"===p||"set"===p?(g="size",m=o.size):m=o.length,this.assert(m>n,"expected #{this} to have a "+g+" above #{exp} but got #{act}","expected #{this} to not have a "+g+" above #{exp}",n,m)}else this.assert(o>n,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",n)}function d(n,u){u&&r(this,"message",u);var i,o=r(this,"object"),a=r(this,"doLength"),s=r(this,"message"),c=s?s+": ":"",f=r(this,"ssfi"),p=e.type(o).toLowerCase(),d=e.type(n).toLowerCase(),h=!0;if(a&&"map"!==p&&"set"!==p&&new t(o,s,f,!0).to.have.property("length"),a||"date"!==p||"date"===d)if("number"===d||!a&&"number"!==p)if(a||"date"===p||"number"===p)h=!1;else{i=c+"expected "+("string"===p?"'"+o+"'":o)+" to be a number or a date"}else i=c+"the argument to least must be a number";else i=c+"the argument to least must be a date";if(h)throw new l(i,void 0,f);if(a){var m,g="length";"map"===p||"set"===p?(g="size",m=o.size):m=o.length,this.assert(m>=n,"expected #{this} to have a "+g+" at least #{exp} but got #{act}","expected #{this} to have a "+g+" below #{exp}",n,m)}else this.assert(o>=n,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",n)}function h(n,u){u&&r(this,"message",u);var i,o=r(this,"object"),a=r(this,"doLength"),s=r(this,"message"),c=s?s+": ":"",f=r(this,"ssfi"),p=e.type(o).toLowerCase(),d=e.type(n).toL
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e){n.expect=function(e,t){return new n.Assertion(e,t)},n.expect.fail=function(e,t,l,r){throw arguments.length<2&&(l=e,e=void 0),l=l||"expect.fail()",new n.AssertionError(l,{actual:e,expected:t,operator:r},n.expect.fail)}}},function(n,e){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e){var t=n.Assertion;function l(){Object.defineProperty(Object.prototype,"should",{set:function(n){Object.defineProperty(this,"should",{value:n,enumerable:!0,configurable:!0,writable:!0})},get:function n(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol?new t(this.valueOf(),null,n):new t(this,null,n)},configurable:!0});var e={fail:function(t,l,r,u){throw arguments.length<2&&(r=t,t=void 0),r=r||"should.fail()",new n.AssertionError(r,{actual:t,expected:l,operator:u},e.fail)},equal:function(n,e,l){new t(n,l).to.equal(e)},Throw:function(n,e,l,r){new t(n,r).to.Throw(e,l)},exist:function(n,e){new t(n,e).to.exist},not:{}};return e.not.equal=function(n,e,l){new t(n,l).to.not.equal(e)},e.not.Throw=function(n,e,l,r){new t(n,r).to.not.Throw(e,l)},e.not.exist=function(n,e){new t(n,e).to.not.exist},e.throw=e.Throw,e.not.throw=e.not.Throw,e}n.should=l,n.Should=l}},function(n,e){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
5 years ago
n.exports=function(n,e){
/*!
* Chai dependencies.
*/
5 years ago
var t=n.Assertion,l=e.flag,r=n.assert=function(e,l){new t(null,null,n.assert,!0).assert(e,l,"[ negation message unavailable ]")};
/*!
* Module export.
5 years ago
*/r.fail=function(e,t,l,u){throw arguments.length<2&&(l=e,e=void 0),l=l||"assert.fail()",new n.AssertionError(l,{actual:e,expected:t,operator:u},r.fail)},r.isOk=function(n,e){new t(n,e,r.isOk,!0).is.ok},r.isNotOk=function(n,e){new t(n,e,r.isNotOk,!0).is.not.ok},r.equal=function(n,e,u){var i=new t(n,u,r.equal,!0);i.assert(e==l(i,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",e,n,!0)},r.notEqual=function(n,e,u){var i=new t(n,u,r.notEqual,!0);i.assert(e!=l(i,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",e,n,!0)},r.strictEqual=function(n,e,l){new t(n,l,r.strictEqual,!0).to.equal(e)},r.notStrictEqual=function(n,e,l){new t(n,l,r.notStrictEqual,!0).to.not.equal(e)},r.deepEqual=r.deepStrictEqual=function(n,e,l){new t(n,l,r.deepEqual,!0).to.eql(e)},r.notDeepEqual=function(n,e,l){new t(n,l,r.notDeepEqual,!0).to.not.eql(e)},r.isAbove=function(n,e,l){new t(n,l,r.isAbove,!0).to.be.above(e)},r.isAtLeast=function(n,e,l){new t(n,l,r.isAtLeast,!0).to.be.least(e)},r.isBelow=function(n,e,l){new t(n,l,r.isBelow,!0).to.be.below(e)},r.isAtMost=function(n,e,l){new t(n,l,r.isAtMost,!0).to.be.most(e)},r.isTrue=function(n,e){new t(n,e,r.isTrue,!0).is.true},r.isNotTrue=function(n,e){new t(n,e,r.isNotTrue,!0).to.not.equal(!0)},r.isFalse=function(n,e){new t(n,e,r.isFalse,!0).is.false},r.isNotFalse=function(n,e){new t(n,e,r.isNotFalse,!0).to.not.equal(!1)},r.isNull=function(n,e){new t(n,e,r.isNull,!0).to.equal(null)},r.isNotNull=function(n,e){new t(n,e,r.isNotNull,!0).to.not.equal(null)},r.isNaN=function(n,e){new t(n,e,r.isNaN,!0).to.be.NaN},r.isNotNaN=function(n,e){new t(n,e,r.isNotNaN,!0).not.to.be.NaN},r.exists=function(n,e){new t(n,e,r.exists,!0).to.exist},r.notExists=function(n,e){new t(n,e,r.notExists,!0).to.not.exist},r.isUndefined=function(n,e){new t(n,e,r.isUndefined,!0).to.equal(void 0)},r.isDefined=function(n,e){new t(n,e,r.isDefined,!0).to.not.equal(void 0)},r.isFunction=function(n,e){new t(n,e,r.isFunction,!0).to.be.a("function")},r.isNotFunction=function(n,e){new t(n,e,r.isNotFunction,!0).to.not.be.a("function")},r.isObject=function(n,e){new t(n,e,r.isObject,!0).to.be.a("object")},r.isNotObject=function(n,e){new t(n,e,r.isNotObject,!0).to.not.be.a("object")},r.isArray=function(n,e){new t(n,e,r.isArray,!0).to.be.an("array")},r.isNotArray=function(n,e){new t(n,e,r.isNotArray,!0).to.not.be.an("array")},r.isString=function(n,e){new t(n,e,r.isString,!0).to.be.a("string")},r.isNotString=function(n,e){new t(n,e,r.isNotString,!0).to.not.be.a("string")},r.isNumber=function(n,e){new t(n,e,r.isNumber,!0).to.be.a("number")},r.isNotNumber=function(n,e){new t(n,e,r.isNotNumber,!0).to.not.be.a("number")},r.isFinite=function(n,e){new t(n,e,r.isFinite,!0).to.be.finite},r.isBoolean=function(n,e){new t(n,e,r.isBoolean,!0).to.be.a("boolean")},r.isNotBoolean=function(n,e){new t(n,e,r.isNotBoolean,!0).to.not.be.a("boolean")},r.typeOf=function(n,e,l){new t(n,l,r.typeOf,!0).to.be.a(e)},r.notTypeOf=function(n,e,l){new t(n,l,r.notTypeOf,!0).to.not.be.a(e)},r.instanceOf=function(n,e,l){new t(n,l,r.instanceOf,!0).to.be.instanceOf(e)},r.notInstanceOf=function(n,e,l){new t(n,l,r.notInstanceOf,!0).to.not.be.instanceOf(e)},r.include=function(n,e,l){new t(n,l,r.include,!0).include(e)},r.notInclude=function(n,e,l){new t(n,l,r.notInclude,!0).not.include(e)},r.deepInclude=function(n,e,l){new t(n,l,r.deepInclude,!0).deep.include(e)},r.notDeepInclude=function(n,e,l){new t(n,l,r.notDeepInclude,!0).not.deep.include(e)},r.nestedInclude=function(n,e,l){new t(n,l,r.nestedInclude,!0).nested.include(e)},r.notNestedInclude=function(n,e,l){new t(n,l,r.notNestedInclude,!0).not.nested.include(e)},r.deepNestedInclude=function(n,e,l){new t(n,l,r.deepNestedInclude,!0).deep.nested.include(e)},r.notDeepNestedInclude=function(n,e,l){new t(n,l,r.notDeepNestedInclude,!0).not.deep.nested.include(e)},r.ownInclude=function(n,e,l){new t(n,l,r.ownInclude,!0).own.include(e)},r.notOwnInclude=function(n,e,l){new t(n,l,r.notOwnInclude,!0).not.own.include(e)},r.deepOwnInclude=function(n,e,l){new t(n,l,r.deepOwnInclude,!0).de
/*!
* ### .ifError(object)
*
* Asserts if value is not a false value, and throws if it is a true value.
* This is added to allow for chai to be a drop-in replacement for Node's
* assert class.
*
* var err = new Error('I am a custom error');
* assert.ifError(err); // Rethrows err!
*
* @name ifError
* @param {Object} object
* @namespace Assert
* @api public
5 years ago
*/,r.ifError=function(n){if(n)throw n},r.isExtensible=function(n,e){new t(n,e,r.isExtensible,!0).to.be.extensible},r.isNotExtensible=function(n,e){new t(n,e,r.isNotExtensible,!0).to.not.be.extensible},r.isSealed=function(n,e){new t(n,e,r.isSealed,!0).to.be.sealed},r.isNotSealed=function(n,e){new t(n,e,r.isNotSealed,!0).to.not.be.sealed},r.isFrozen=function(n,e){new t(n,e,r.isFrozen,!0).to.be.frozen},r.isNotFrozen=function(n,e){new t(n,e,r.isNotFrozen,!0).to.not.be.frozen},r.isEmpty=function(n,e){new t(n,e,r.isEmpty,!0).to.be.empty},r.isNotEmpty=function(n,e){new t(n,e,r.isNotEmpty,!0).to.not.be.empty},
/*!
* Aliases.
*/
5 years ago
function n(e,t){return r[t]=r[e],n}("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")}},function(n,e,t){(function(n,e){!function(n,t){"use strict";if(!n.setImmediate){var l,r,u,i,o,a=1,s={},c=!1,f=n.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(n);p=p&&p.setTimeout?p:n,"[object process]"==={}.toString.call(n.process)?l=function(n){e.nextTick(function(){h(n)})}:!function(){if(n.postMessage&&!n.importScripts){var e=!0,t=n.onmessage;return n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}}()?n.MessageChannel?((u=new MessageChannel).port1.onmessage=function(n){h(n.data)},l=function(n){u.port2.postMessage(n)}):f&&"onreadystatechange"in f.createElement("script")?(r=f.documentElement,l=function(n){var e=f.createElement("script");e.onreadystatechange=function(){h(n),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):l=function(n){setTimeout(h,0,n)}:(i="setImmediate$"+Math.random()+"$",o=function(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(i)&&h(+e.data.slice(i.length))},n.addEventListener?n.addEventListener("message",o,!1):n.attachEvent("onmessage",o),l=function(e){n.postMessage(i+e,"*")}),p.setImmediate=function(n){"function"!=typeof n&&(n=new Function(""+n));for(var e=new Array(arguments.length-1),t=0;t<e.length;t++)e[t]=arguments[t+1];var r={callback:n,args:e};return s[a]=r,l(a),a++},p.clearImmediate=d}function d(n){delete s[n]}function h(n){if(c)setTimeout(h,0,n);else{var e=s[n];if(e){c=!0;try{!function(n){var e=n.callback,l=n.args;switch(l.length){case 0:e();break;case 1:e(l[0]);break;case 2:e(l[0],l[1]);break;case 3:e(l[0],l[1],l[2]);break;default:e.apply(t,l)}}(e)}finally{d(n),c=!1}}}}}("undefined"==typeof self?void 0===n?this:n:self)}).call(this,t(17),t(50))},function(n,e,t){t(2),"undefined"!=typeof window&&window.initMochaPhantomJS&&window.initMochaPhantomJS(),mocha.setup({ui:"bdd"}),t(90),t(4)},function(module,exports,__webpack_require__){"use strict";var chai=__webpack_require__(3),peg=__webpack_require__(0),sinon=__webpack_require__(42),expect=chai.expect;describe("PEG.js API",function(){describe("generate",function(){it("generates a parser",function(){var n=peg.generate("start = 'a'");expect(n).to.be.an("object"),expect(n.parse("a")).to.equal("a")}),it("throws an exception on syntax error",function(){expect(function(){peg.generate("start = @")}).to.throw()}),it("throws an exception on semantic error",function(){expect(function(){peg.generate("start = undefined")}).to.throw()}),describe("allowed start rules",function(){var n="\n\n a = 'x'\n b = 'x'\n c = 'x'\n\n ";it("throws an error on missing rule",function(){expect(function(){peg.generate(n,{allowedStartRules:["missing"]})}).to.throw()}),describe("when optimizing for parsing speed",function(){describe("when |allowedStartRules| is not set",function(){it("generated parser can start only from the first rule",function(){var e=peg.generate(n,{optimize:"speed"});expect(e.parse("x",{startRule:"a"})).to.equal("x"),expect(function(){e.parse("x",{startRule:"b"})}).to.throw(),expect(function(){e.parse("x",{startRule:"c"})}).to.throw()})}),describe("when |allowedStartRules| is set",function(){it("generated parser can start only from specified rules",function(){var e=peg.generate(n,{optimize:"speed",allowedStartRules:["b","c"]});expect(function(){e.parse("x",{startRule:"a"})}).to.throw(),expect(e.parse("x",{startRule:"b"})).to.equal("x"),expect(e.parse("x",{startRule:"c"})).to.equal("x")})})}),describe("when optimizing for code size",function(){describe("when |allowedStartRules| is not set",function(){it("generated parser can start only from the first rule",function(){var e=peg.generate(n,{optimize:"size"});expect(e.parse("x",{startRule:"a"})).to.equal("x"),expect(function(){e.parse("x",{startRule:"b"})}).to.throw(),expect(function(){e.pars