syndicate-2017/dist/syndicatecompiler.min.js

10 lines
260 KiB
JavaScript
Raw Normal View History

2017-09-16 19:59:49 +00:00
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SyndicateCompiler=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(Buffer){"use strict";var path=require("path");var ohm=require("ohm-js");var ES5=require("./es5.js");var grammarSource=Buffer("Ly8gLSotIGphdmFzY3JpcHQgLSotCi8vIFN5bnRhY3RpYyBleHRlbnNpb25zIHRvIEVTNSBmb3IgU3luZGljYXRlL2pzLiBTZWUgY29tcGlsZXIuanMgZm9yCi8vIHRoZSByZXN0IG9mIHRoZSB0cmFuc2xhdG9yLgoKU3luZGljYXRlIDw6IEVTNSB7CiAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAvLyBFeHRlbnNpb25zIHRvIGV4cHJlc3Npb25zLgoKICBTdGF0ZW1lbnQKICAgICs9IEFjdG9yU3RhdGVtZW50CiAgICB8IERhdGFzcGFjZVN0YXRlbWVudAogICAgfCBBY3RvckZhY2V0U3RhdGVtZW50CiAgICB8IEFjdG9yRW5kcG9pbnRTdGF0ZW1lbnQKICAgIHwgQXNzZXJ0aW9uVHlw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AgIHwgb24gRmFjZXRFdmVudFBhdHRlcm4gRnVuY3Rpb25Cb2R5QmxvY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0gZXZlbnQKICAgIHwgb24gZXZlbnQgaWRlbnRpZmllciBGdW5jdGlvbkJvZHlCbG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0gb25FdmVudAogICAgfCBzdG9wIG9uIEZhY2V0VHJhbnNpdGlvbkV2ZW50UGF0dGVybiBGdW5jdGlvbkJvZHlCbG9jayAgICAgICAgICAgICAgICAgICAtLSBzdG9wT25XaXRoQ29udAogICAgfCBzdG9wIG9uIEZhY2V0VHJhbnNpdGlvbkV2ZW50UGF0dGVybiAjKHNjKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLSBzdG9wT25Ob0NvbnQKICAgIHwgZGF0YWZsb3cgRnVuY3Rpb25Cb2R5QmxvY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0gZGF0YWZsb3cKICAgIHwgZHVyaW5nIEZhY2V0UGF0dGVybiBGdW5jdGlvbkJvZHlCbG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0gZHVyaW5nCiAgICB8IGR1cmluZyBGYWNldFBhdHRlcm4gc3Bhd24gKG5hbWVkIEV4cHJlc3Npb248d2l0aEluPik/IEZ1bmN0aW9uQm9keUJsb2NrIC0tIGR1cmluZ1NwYXduCgogIEFzc2VydFdoZW5DbGF1c2UgPSB3aGVuICIoIiBFeHByZXNzaW9uPHdpdGhJbj4gIikiCgogIEFzc2VydGlvblR5cGVEZWNsYXJhdGlvblN0YXRlbWVudAogICAgPSAoYXNzZXJ0aW9uIHwgbWVzc2FnZSkgdHlwZSBpZGVudGlmaWVyICIoIiBGb3JtYWxQYXJhbWV0ZXJMaXN0ICIpIiAoIj0iIHN0cmluZ0xpdGVyYWwpPyAjKHNjKQoKICBGaWVsZERlY2xhcmF0aW9uU3Rh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GIiB8ICJcdTBENjYiLi4iXHUwRDZGIiB8ICJcdTBFNTAiLi4iXHUwRTU5IiB8ICJcdTBFRDAiLi4iXHUwRUQ5IiB8ICJcdTBGMjAiLi4iXHUwRjI5IiB8ICJcdUZGMTAiL
;var output=compiler.compileSyndicateSource(allSourceText);var f=new Function(output);f.call(window)}document.addEventListener("DOMContentLoaded",translateSyndicateScripts,false);module.exports=compiler},{"./compiler.js":1}],4:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undef
;for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":5,ieee754:6,isarray:7}],5:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i}revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function placeHoldersCount(b64){var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],6:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,
;return decl.define("Grammars",[],this.star(this.app("Grammar").withInterval(decl.sourceInterval(24,31))).withInterval(decl.sourceInterval(24,32))).define("Grammar",[],this.seq(this.app("ident").withInterval(decl.sourceInterval(50,55)),this.opt(this.app("SuperGrammar").withInterval(decl.sourceInterval(56,68))).withInterval(decl.sourceInterval(56,69)),this.terminal("{").withInterval(decl.sourceInterval(70,73)),this.star(this.app("Rule").withInterval(decl.sourceInterval(74,78))).withInterval(decl.sourceInterval(74,79)),this.terminal("}").withInterval(decl.sourceInterval(80,83))).withInterval(decl.sourceInterval(50,83))).define("SuperGrammar",[],this.seq(this.terminal("<:").withInterval(decl.sourceInterval(106,110)),this.app("ident").withInterval(decl.sourceInterval(111,116))).withInterval(decl.sourceInterval(106,116))).define("Rule_define",[],this.seq(this.app("ident").withInterval(decl.sourceInterval(131,136)),this.opt(this.app("Formals").withInterval(decl.sourceInterval(137,144))).withInterval(decl.sourceInterval(137,145)),this.opt(this.app("ruleDescr").withInterval(decl.sourceInterval(146,155))).withInterval(decl.sourceInterval(146,156)),this.terminal("=").withInterval(decl.sourceInterval(157,160)),this.app("RuleBody").withInterval(decl.sourceInterval(162,170))).withInterval(decl.sourceInterval(131,170))).define("Rule_override",[],this.seq(this.app("ident").withInterval(decl.sourceInterval(188,193)),this.opt(this.app("Formals").withInterval(decl.sourceInterval(194,201))).withInterval(decl.sourceInterval(194,202)),this.terminal(":=").withInterval(decl.sourceInterval(214,218)),this.app("RuleBody").withInterval(decl.sourceInterval(219,227))).withInterval(decl.sourceInterval(188,227))).define("Rule_extend",[],this.seq(this.app("ident").withInterval(decl.sourceInterval(247,252)),this.opt(this.app("Formals").withInterval(decl.sourceInterval(253,260))).withInterval(decl.sourceInterval(253,261)),this.terminal("+=").withInterval(decl.sourceInterval(273,277)),this.app("RuleBody").withInterval(decl.sourceInterval(278,286))).withInterval(decl.sourceInterval(247,286))).define("Rule",[],this.alt(this.app("Rule_define").withInterval(decl.sourceInterval(131,170)),this.app("Rule_override").withInterval(decl.sourceInterval(188,227)),this.app("Rule_extend").withInterval(decl.sourceInterval(247,286))).withInterval(decl.sourceInterval(131,297))).define("RuleBody",[],this.seq(this.opt(this.terminal("|").withInterval(decl.sourceInterval(316,319))).withInterval(decl.sourceInterval(316,320)),this.app("TopLevelTerm").withInterval(decl.sourceInterval(321,333)),this.star(this.seq(this.terminal("|").withInterval(decl.sourceInterval(335,338)),this.app("TopLevelTerm").withInterval(decl.sourceInterval(339,351))).withInterval(decl.sourceInterval(335,351))).withInterval(decl.sourceInterval(334,353))).withInterval(decl.sourceInterval(316,353))).define("TopLevelTerm_inline",[],this.seq(this.app("Seq").withInterval(decl.sourceInterval(376,379)),this.app("caseName").withInterval(decl.sourceInterval(380,388))).withInterval(decl.sourceInterval(376,388))).define("TopLevelTerm",[],this.alt(this.app("TopLevelTerm_inline").withInterval(decl.sourceInterval(376,388)),this.app("Seq").withInterval(decl.sourceInterval(406,409))).withInterval(decl.sourceInterval(376,409))).define("Formals",[],this.seq(this.terminal("<").withInterval(decl.sourceInterval(427,430)),this.app("ListOf",[this.app("ident").withInterval(decl.sourceInterval(438,443)),this.terminal(",").withInterval(decl.sourceInterval(445,448))]).withInterval(decl.sourceInterval(431,449)),this.terminal(">").withInterval(decl.sourceInterval(450,453))).withInterval(decl.sourceInterval(427,453))).define("Params",[],this.seq(this.terminal("<").withInterval(decl.sourceInterval(470,473)),this.app("ListOf",[this.app("Seq").withInterval(decl.sourceInterval(481,484)),this.terminal(",").withInterval(decl.sourceInterval(486,489))]).withInterval(decl.sourceInterval(474,490)),this.terminal(">").withInterval(decl.sourceInterval(491,494))).withInterval(decl.sourceInterval(470,494))).define("Alt",[],this.seq(this.app("Seq").wi
return this.getText()===that.getText()&&this.type===that.type&&(!this.isFluffy()||this.isFluffy()&&that.isFluffy())};Failure.prototype.toString=function(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()};Failure.prototype.clone=function(){var failure=new Failure(this.text,this.type);if(this.isFluffy()){failure.makeFluffy()}return failure};Failure.prototype.toKey=function(){return this.toString()+"#"+this.type};module.exports=Failure},{}],38:[function(require,module,exports){"use strict";var MatchResult=require("./MatchResult");var Semantics=require("./Semantics");var State=require("./State");var common=require("./common");var errors=require("./errors");var pexprs=require("./pexprs");function Grammar(name,superGrammar,ruleBodies,ruleFormals,ruleDescriptions,optDefaultStartRule){this.name=name;this.superGrammar=superGrammar;this.ruleBodies=ruleBodies;this.ruleFormals=ruleFormals;this.ruleDescriptions=ruleDescriptions;if(optDefaultStartRule){if(!(optDefaultStartRule in ruleBodies)){throw new Error("Invalid start rule: '"+optDefaultStartRule+"' is not a rule in grammar '"+name+"'")}this.defaultStartRule=optDefaultStartRule}}var ohmGrammar;var buildGrammar;Grammar.initApplicationParser=function(grammar,builderFn){ohmGrammar=grammar;buildGrammar=builderFn};Grammar.prototype={isBuiltIn:function(){return this===Grammar.ProtoBuiltInRules||this===Grammar.BuiltInRules},_match:function(input,opts){var state=new State(this,input,opts);state.evalFromStart();return state},match:function(input,optStartApplication){var state=this._match(input,{startApplication:optStartApplication});return MatchResult.newFor(state)},trace:function(input,optStartApplication){var state=this._match(input,{startApplication:optStartApplication,trace:true});var rootTrace=state.trace[state.trace.length-1];rootTrace.state=state;rootTrace.result=MatchResult.newFor(state);return rootTrace},semantics:function(){return Semantics.createSemantics(this)},extendSemantics:function(superSemantics){return Semantics.createSemantics(this,superSemantics._getSemantics())},_checkTopDownActionDict:function(what,name,actionDict){function isSpecialAction(a){return a==="_iter"||a==="_terminal"||a==="_nonterminal"||a==="_default"}var problems=[];for(var k in actionDict){var v=actionDict[k];if(!isSpecialAction(k)&&!(k in this.ruleBodies)){problems.push("'"+k+"' is not a valid semantic action for '"+this.name+"'")}else if(typeof v!=="function"){problems.push("'"+k+"' must be a function in an action dictionary for '"+this.name+"'")}else{var actual=v.length;var expected=this._topDownActionArity(k);if(actual!==expected){problems.push("Semantic action '"+k+"' has the wrong arity: "+"expected "+expected+", got "+actual)}}}if(problems.length>0){var prettyProblems=problems.map(function(problem){return"- "+problem});var error=new Error("Found errors in the action dictionary of the '"+name+"' "+what+":\n"+prettyProblems.join("\n"));error.problems=problems;throw error}},_topDownActionArity:function(actionName){if(actionName==="_iter"||actionName==="_nonterminal"||actionName==="_default"){return 1}else if(actionName==="_terminal"){return 0}return this.ruleBodies[actionName].getArity()},_inheritsFrom:function(grammar){var g=this.superGrammar;while(g){if(g===grammar){return true}g=g.superGrammar}return false},toRecipe:function(optVarName){if(this.isBuiltIn()){throw new Error("Why would anyone want to generate a recipe for the "+this.name+" grammar?!?!")}var sb=new common.StringBuffer;if(optVarName){sb.append("var "+optVarName+" = ")}sb.append("(function() {\n");var superGrammarDecl="";if(!this.superGrammar.isBuiltIn()){sb.append(this.superGrammar.toRecipe("buildSuperGrammar"));superGrammarDecl=" .withSuperGrammar(buildSuperGrammar.call(this))\n"}sb.append(" var decl = this.newGrammar("+JSON.stringify(this.name)+")\n");if(this.definitionInterval){sb.append(" .withSource("+JSON.stringify(this.definitionInterval.contents)+")\n")}sb.append(superGrammarDecl);if(this.defaultStartRule){sb.append(' .withDefaultStartRule("'+this.defaultStartRule+'")\n')}sb.append(" retu
EmptyListOf:actions.empty,NonemptyListOf:actions.nonEmpty})};function Operation(name,formals,actionDict,builtInDefault){this.name=name;this.formals=formals;this.actionDict=actionDict;this.builtInDefault=builtInDefault}Operation.prototype.typeName="operation";Operation.prototype.checkActionDict=function(grammar){grammar._checkTopDownActionDict(this.typeName,this.name,this.actionDict)};Operation.prototype.execute=function(semantics,nodeWrapper){var actionFn=this.actionDict[nodeWrapper._node.ctorName];if(actionFn){return this.doAction(semantics,nodeWrapper,actionFn,nodeWrapper.isIteration())}if(nodeWrapper.isNonterminal()){actionFn=this.actionDict._nonterminal;if(actionFn){return this.doAction(semantics,nodeWrapper,actionFn,true)}}return this.doAction(semantics,nodeWrapper,this.actionDict._default,true)};Operation.prototype.doAction=function(semantics,nodeWrapper,actionFn,optPassChildrenAsArray){return optPassChildrenAsArray?actionFn.call(nodeWrapper,nodeWrapper._children()):actionFn.apply(nodeWrapper,nodeWrapper._children())};function Attribute(name,actionDict,builtInDefault){this.name=name;this.formals=[];this.actionDict=actionDict;this.builtInDefault=builtInDefault}inherits(Attribute,Operation);Attribute.prototype.typeName="attribute";Attribute.prototype.execute=function(semantics,nodeWrapper){var node=nodeWrapper._node;var key=semantics.attributeKeys[this.name];if(!node.hasOwnProperty(key)){node[key]=Operation.prototype.execute.call(this,semantics,nodeWrapper)}return node[key]};module.exports=Semantics},{"./MatchResult":42,"./common":48,"./nodes":51,"es6-symbol":15,inherits:33}],46:[function(require,module,exports){"use strict";var InputStream=require("./InputStream");var PosInfo=require("./PosInfo");var Trace=require("./Trace");var pexprs=require("./pexprs");var RM_RIGHTMOST_FAILURE_POSITION=0;var RM_RIGHTMOST_FAILURES=1;var applySpaces=new pexprs.Apply("spaces");function State(grammar,input,opts){this.grammar=grammar;this.startExpr=this._getStartExpr(grammar,opts.startApplication);this.inputStream=new InputStream(input);this.tracingEnabled=opts.trace||false;this.matchNodes=opts.matchNodes||false;this.init(RM_RIGHTMOST_FAILURE_POSITION)}State.prototype={init:function(recordingMode){this.posInfos=[];this.bindings=[];this.applicationStack=[];this.inLexifiedContextStack=[false];this.recordingMode=recordingMode;if(recordingMode===RM_RIGHTMOST_FAILURE_POSITION){this.rightmostFailurePosition=-1}else if(recordingMode===RM_RIGHTMOST_FAILURES){this.tracingEnabled=false}else{throw new Error("invalid recording mode: "+recordingMode)}if(this.isTracing()){this.trace=[]}},enter:function(app){this.applicationStack.push(app);this.inLexifiedContextStack.push(false)},exit:function(){this.applicationStack.pop();this.inLexifiedContextStack.pop()},enterLexifiedContext:function(){this.inLexifiedContextStack.push(true)},exitLexifiedContext:function(){this.inLexifiedContextStack.pop()},currentApplication:function(){return this.applicationStack[this.applicationStack.length-1]},inSyntacticContext:function(){if(typeof this.inputStream.source!=="string"){return false}var currentApplication=this.currentApplication();if(currentApplication){return currentApplication.isSyntactic()&&!this.inLexifiedContext()}else{return this.startExpr.factors[0].isSyntactic()}},inLexifiedContext:function(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]},skipSpaces:function(){var origFailuresInfo=this.getFailuresInfo();this.eval(applySpaces);this.bindings.pop();this.restoreFailuresInfo(origFailuresInfo);return this.inputStream.pos},skipSpacesIfInSyntacticContext:function(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos},maybeSkipSpacesBefore:function(expr){if(expr instanceof pexprs.Apply&&expr.isSyntactic()){return this.skipSpaces()}else if(expr.allowsSkippingPrecedingSpace()&&expr!==applySpaces){return this.skipSpacesIfInSyntacticContext()}else{return this.inputStream.pos}},truncateBindings:function(newLength){while(this.bindings.length>newLength){this.bindings.pop()}},getCurrentPosInfo:function(){return this.getPosI
;pexprs.Alt.prototype.allowsSkippingPrecedingSpace=pexprs.Iter.prototype.allowsSkippingPrecedingSpace=pexprs.Lex.prototype.allowsSkippingPrecedingSpace=pexprs.Lookahead.prototype.allowsSkippingPrecedingSpace=pexprs.Not.prototype.allowsSkippingPrecedingSpace=pexprs.Param.prototype.allowsSkippingPrecedingSpace=pexprs.Seq.prototype.allowsSkippingPrecedingSpace=function(){return false}},{"./common":48,"./pexprs":67}],53:[function(require,module,exports){"use strict";var common=require("./common");var errors=require("./errors");var pexprs=require("./pexprs");var lexifyCount;pexprs.PExpr.prototype.assertAllApplicationsAreValid=function(ruleName,grammar){lexifyCount=0;this._assertAllApplicationsAreValid(ruleName,grammar)};pexprs.PExpr.prototype._assertAllApplicationsAreValid=common.abstract;pexprs.any._assertAllApplicationsAreValid=pexprs.end._assertAllApplicationsAreValid=pexprs.Terminal.prototype._assertAllApplicationsAreValid=pexprs.Range.prototype._assertAllApplicationsAreValid=pexprs.Param.prototype._assertAllApplicationsAreValid=pexprs.UnicodeChar.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){};pexprs.Lex.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){lexifyCount++;this.expr._assertAllApplicationsAreValid(ruleName,grammar);lexifyCount--};pexprs.Alt.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){for(var idx=0;idx<this.terms.length;idx++){this.terms[idx]._assertAllApplicationsAreValid(ruleName,grammar)}};pexprs.Seq.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){for(var idx=0;idx<this.factors.length;idx++){this.factors[idx]._assertAllApplicationsAreValid(ruleName,grammar)}};pexprs.Iter.prototype._assertAllApplicationsAreValid=pexprs.Not.prototype._assertAllApplicationsAreValid=pexprs.Lookahead.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){this.expr._assertAllApplicationsAreValid(ruleName,grammar)};pexprs.Apply.prototype._assertAllApplicationsAreValid=function(ruleName,grammar){var body=grammar.ruleBodies[this.ruleName];if(!body){throw errors.undeclaredRule(this.ruleName,grammar.name,this.interval)}if(common.isSyntactic(this.ruleName)&&(!common.isSyntactic(ruleName)||lexifyCount>0)){throw errors.applicationOfSyntacticRuleFromLexicalContext(this.ruleName,this)}var actual=this.args.length;var expected=grammar.ruleFormals[this.ruleName].length;if(actual!==expected){throw errors.wrongNumberOfArguments(this.ruleName,expected,actual,this)}var self=this;this.args.forEach(function(arg){arg._assertAllApplicationsAreValid(ruleName,grammar);if(arg.getArity()!==1){throw errors.invalidParameter(self.ruleName,arg)}})}},{"./common":48,"./errors":49,"./pexprs":67}],54:[function(require,module,exports){"use strict";var common=require("./common");var errors=require("./errors");var pexprs=require("./pexprs");pexprs.PExpr.prototype.assertChoicesHaveUniformArity=common.abstract;pexprs.any.assertChoicesHaveUniformArity=pexprs.end.assertChoicesHaveUniformArity=pexprs.Terminal.prototype.assertChoicesHaveUniformArity=pexprs.Range.prototype.assertChoicesHaveUniformArity=pexprs.Param.prototype.assertChoicesHaveUniformArity=pexprs.Lex.prototype.assertChoicesHaveUniformArity=pexprs.UnicodeChar.prototype.assertChoicesHaveUniformArity=function(ruleName){};pexprs.Alt.prototype.assertChoicesHaveUniformArity=function(ruleName){if(this.terms.length===0){return}var arity=this.terms[0].getArity();for(var idx=0;idx<this.terms.length;idx++){var term=this.terms[idx];term.assertChoicesHaveUniformArity();var otherArity=term.getArity();if(arity!==otherArity){throw errors.inconsistentArity(ruleName,arity,otherArity,term)}}};pexprs.Extend.prototype.assertChoicesHaveUniformArity=function(ruleName){var actualArity=this.terms[0].getArity();var expectedArity=this.terms[1].getArity();if(actualArity!==expectedArity){throw errors.inconsistentArity(ruleName,expectedArity,actualArity,this.terms[0])}};pexprs.Seq.prototype.assertChoicesHaveUniformArity=function(ruleName){for(var idx=0;idx<this.factors.length;idx++){this.factors[idx].assertChoicesHaveUniformArity(ruleName)}};
inherits(Opt,Iter);Star.prototype.operator="*";Plus.prototype.operator="+";Opt.prototype.operator="?";Star.prototype.minNumMatches=0;Plus.prototype.minNumMatches=1;Opt.prototype.minNumMatches=0;Star.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Plus.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Opt.prototype.maxNumMatches=1;function Not(expr){this.expr=expr}inherits(Not,PExpr);function Lookahead(expr){this.expr=expr}inherits(Lookahead,PExpr);function Lex(expr){this.expr=expr}inherits(Lex,PExpr);function Arr(expr){this.expr=expr}inherits(Arr,PExpr);function Str(expr){this.expr=expr}inherits(Str,PExpr);function Obj(properties,isLenient){var names=properties.map(function(property){return property.name});var duplicates=common.getDuplicates(names);if(duplicates.length>0){throw errors.duplicatePropertyNames(duplicates)}else{this.properties=properties;this.isLenient=isLenient}}inherits(Obj,PExpr);function Apply(ruleName,optArgs){this.ruleName=ruleName;this.args=optArgs||[]}inherits(Apply,PExpr);Apply.prototype.isSyntactic=function(){return common.isSyntactic(this.ruleName)};Apply.prototype.toMemoKey=function(){if(!this._memoKey){Object.defineProperty(this,"_memoKey",{value:this.toString()})}return this._memoKey};function UnicodeChar(category){this.category=category;this.pattern=UnicodeCategories[category]}inherits(UnicodeChar,PExpr);exports.PExpr=PExpr;exports.any=any;exports.end=end;exports.Terminal=Terminal;exports.Range=Range;exports.Param=Param;exports.Alt=Alt;exports.Extend=Extend;exports.Seq=Seq;exports.Iter=Iter;exports.Star=Star;exports.Plus=Plus;exports.Opt=Opt;exports.Not=Not;exports.Lookahead=Lookahead;exports.Lex=Lex;exports.Arr=Arr;exports.Str=Str;exports.Obj=Obj;exports.Apply=Apply;exports.UnicodeChar=UnicodeChar;require("./pexprs-allowsSkippingPrecedingSpace");require("./pexprs-assertAllApplicationsAreValid");require("./pexprs-assertChoicesHaveUniformArity");require("./pexprs-assertIteratedExprsAreNotNullable");require("./pexprs-check");require("./pexprs-eval");require("./pexprs-getArity");require("./pexprs-outputRecipe");require("./pexprs-introduceParams");require("./pexprs-isNullable");require("./pexprs-substituteParams");require("./pexprs-toDisplayString");require("./pexprs-toArgumentNameList");require("./pexprs-toFailure");require("./pexprs-toString")},{"../third_party/UnicodeCategories":69,"./common":48,"./errors":49,"./pexprs-allowsSkippingPrecedingSpace":52,"./pexprs-assertAllApplicationsAreValid":53,"./pexprs-assertChoicesHaveUniformArity":54,"./pexprs-assertIteratedExprsAreNotNullable":55,"./pexprs-check":56,"./pexprs-eval":57,"./pexprs-getArity":58,"./pexprs-introduceParams":59,"./pexprs-isNullable":60,"./pexprs-outputRecipe":61,"./pexprs-substituteParams":62,"./pexprs-toArgumentNameList":63,"./pexprs-toDisplayString":64,"./pexprs-toFailure":65,"./pexprs-toString":66,inherits:33}],68:[function(require,module,exports){"use strict";var common=require("./common");function padNumbersToEqualLength(arr){var maxLen=0;var strings=arr.map(function(n){var str=n.toString();maxLen=Math.max(maxLen,str.length);return str});return strings.map(function(s){return common.padLeft(s,maxLen)})}function strcpy(dest,src,offset){var origDestLen=dest.length;var start=dest.slice(0,offset);var end=dest.slice(offset+src.length);return(start+src+end).substr(0,origDestLen)}exports.getLineAndColumn=function(str,offset){var lineNum=1;var colNum=1;var currOffset=0;var lineStartOffset=0;var nextLine=null;var prevLine=null;var prevLineStartOffset=-1;while(currOffset<offset){var c=str.charAt(currOffset++);if(c==="\n"){lineNum++;colNum=1;prevLineStartOffset=lineStartOffset;lineStartOffset=currOffset}else if(c!=="\r"){colNum++}}var lineEndOffset=str.indexOf("\n",lineStartOffset);if(lineEndOffset===-1){lineEndOffset=str.length}else{var nextLineEndOffset=str.indexOf("\n",lineEndOffset+1);nextLine=nextLineEndOffset===-1?str.slice(lineEndOffset):str.slice(lineEndOffset,nextLineEndOffset);nextLine=nextLine.replace(/^\r?\n/,"").replace(/\r$/,"")}if(prevLineStartOffset>=0){prevLine=str.slice(prevLineStartOffset,lineStartOffset).replace(/\r?
L:/[\u0041-\u005A]|[\u00C0-\u00D6]|[\u00D8-\u00DE]|[\u0100-\u0100]|[\u0102-\u0102]|[\u0104-\u0104]|[\u0106-\u0106]|[\u0108-\u0108]|[\u010A-\u010A]|[\u010C-\u010C]|[\u010E-\u010E]|[\u0110-\u0110]|[\u0112-\u0112]|[\u0114-\u0114]|[\u0116-\u0116]|[\u0118-\u0118]|[\u011A-\u011A]|[\u011C-\u011C]|[\u011E-\u011E]|[\u0120-\u0120]|[\u0122-\u0122]|[\u0124-\u0124]|[\u0126-\u0126]|[\u0128-\u0128]|[\u012A-\u012A]|[\u012C-\u012C]|[\u012E-\u012E]|[\u0130-\u0130]|[\u0132-\u0132]|[\u0134-\u0134]|[\u0136-\u0136]|[\u0139-\u0139]|[\u013B-\u013B]|[\u013D-\u013D]|[\u013F-\u013F]|[\u0141-\u0141]|[\u0143-\u0143]|[\u0145-\u0145]|[\u0147-\u0147]|[\u014A-\u014A]|[\u014C-\u014C]|[\u014E-\u014E]|[\u0150-\u0150]|[\u0152-\u0152]|[\u0154-\u0154]|[\u0156-\u0156]|[\u0158-\u0158]|[\u015A-\u015A]|[\u015C-\u015C]|[\u015E-\u015E]|[\u0160-\u0160]|[\u0162-\u0162]|[\u0164-\u0164]|[\u0166-\u0166]|[\u0168-\u0168]|[\u016A-\u016A]|[\u016C-\u016C]|[\u016E-\u016E]|[\u0170-\u0170]|[\u0172-\u0172]|[\u0174-\u0174]|[\u0176-\u0176]|[\u0178-\u0179]|[\u017B-\u017B]|[\u017D-\u017D]|[\u0181-\u0182]|[\u0184-\u0184]|[\u0186-\u0187]|[\u0189-\u018B]|[\u018E-\u0191]|[\u0193-\u0194]|[\u0196-\u0198]|[\u019C-\u019D]|[\u019F-\u01A0]|[\u01A2-\u01A2]|[\u01A4-\u01A4]|[\u01A6-\u01A7]|[\u01A9-\u01A9]|[\u01AC-\u01AC]|[\u01AE-\u01AF]|[\u01B1-\u01B3]|[\u01B5-\u01B5]|[\u01B7-\u01B8]|[\u01BC-\u01BC]|[\u01C4-\u01C4]|[\u01C7-\u01C7]|[\u01CA-\u01CA]|[\u01CD-\u01CD]|[\u01CF-\u01CF]|[\u01D1-\u01D1]|[\u01D3-\u01D3]|[\u01D5-\u01D5]|[\u01D7-\u01D7]|[\u01D9-\u01D9]|[\u01DB-\u01DB]|[\u01DE-\u01DE]|[\u01E0-\u01E0]|[\u01E2-\u01E2]|[\u01E4-\u01E4]|[\u01E6-\u01E6]|[\u01E8-\u01E8]|[\u01EA-\u01EA]|[\u01EC-\u01EC]|[\u01EE-\u01EE]|[\u01F1-\u01F1]|[\u01F4-\u01F4]|[\u01FA-\u01FA]|[\u01FC-\u01FC]|[\u01FE-\u01FE]|[\u0200-\u0200]|[\u0202-\u0202]|[\u0204-\u0204]|[\u0206-\u0206]|[\u0208-\u0208]|[\u020A-\u020A]|[\u020C-\u020C]|[\u020E-\u020E]|[\u0210-\u0210]|[\u0212-\u0212]|[\u0214-\u0214]|[\u0216-\u0216]|[\u0386-\u0386]|[\u0388-\u038A]|[\u038C-\u038C]|[\u038E-\u038F]|[\u0391-\u03A1]|[\u03A3-\u03AB]|[\u03D2-\u03D4]|[\u03DA-\u03DA]|[\u03DC-\u03DC]|[\u03DE-\u03DE]|[\u03E0-\u03E0]|[\u03E2-\u03E2]|[\u03E4-\u03E4]|[\u03E6-\u03E6]|[\u03E8-\u03E8]|[\u03EA-\u03EA]|[\u03EC-\u03EC]|[\u03EE-\u03EE]|[\u0401-\u040C]|[\u040E-\u042F]|[\u0460-\u0460]|[\u0462-\u0462]|[\u0464-\u0464]|[\u0466-\u0466]|[\u0468-\u0468]|[\u046A-\u046A]|[\u046C-\u046C]|[\u046E-\u046E]|[\u0470-\u0470]|[\u0472-\u0472]|[\u0474-\u0474]|[\u0476-\u0476]|[\u0478-\u0478]|[\u047A-\u047A]|[\u047C-\u047C]|[\u047E-\u047E]|[\u0480-\u0480]|[\u0490-\u0490]|[\u0492-\u0492]|[\u0494-\u0494]|[\u0496-\u0496]|[\u0498-\u0498]|[\u049A-\u049A]|[\u049C-\u049C]|[\u049E-\u049E]|[\u04A0-\u04A0]|[\u04A2-\u04A2]|[\u04A4-\u04A4]|[\u04A6-\u04A6]|[\u04A8-\u04A8]|[\u04AA-\u04AA]|[\u04AC-\u04AC]|[\u04AE-\u04AE]|[\u04B0-\u04B0]|[\u04B2-\u04B2]|[\u04B4-\u04B4]|[\u04B6-\u04B6]|[\u04B8-\u04B8]|[\u04BA-\u04BA]|[\u04BC-\u04BC]|[\u04BE-\u04BE]|[\u04C1-\u04C1]|[\u04C3-\u04C3]|[\u04C7-\u04C7]|[\u04CB-\u04CB]|[\u04D0-\u04D0]|[\u04D2-\u04D2]|[\u04D4-\u04D4]|[\u04D6-\u04D6]|[\u04D8-\u04D8]|[\u04DA-\u04DA]|[\u04DC-\u04DC]|[\u04DE-\u04DE]|[\u04E0-\u04E0]|[\u04E2-\u04E2]|[\u04E4-\u04E4]|[\u04E6-\u04E6]|[\u04E8-\u04E8]|[\u04EA-\u04EA]|[\u04EE-\u04EE]|[\u04F0-\u04F0]|[\u04F2-\u04F2]|[\u04F4-\u04F4]|[\u04F8-\u04F8]|[\u0531-\u0556]|[\u10A0-\u10C5]|[\u1E00-\u1E00]|[\u1E02-\u1E02]|[\u1E04-\u1E04]|[\u1E06-\u1E06]|[\u1E08-\u1E08]|[\u1E0A-\u1E0A]|[\u1E0C-\u1E0C]|[\u1E0E-\u1E0E]|[\u1E10-\u1E10]|[\u1E12-\u1E12]|[\u1E14-\u1E14]|[\u1E16-\u1E16]|[\u1E18-\u1E18]|[\u1E1A-\u1E1A]|[\u1E1C-\u1E1C]|[\u1E1E-\u1E1E]|[\u1E20-\u1E20]|[\u1E22-\u1E22]|[\u1E24-\u1E24]|[\u1E26-\u1E26]|[\u1E28-\u1E28]|[\u1E2A-\u1E2A]|[\u1E2C-\u1E2C]|[\u1E2E-\u1E2E]|[\u1E30-\u1E30]|[\u1E32-\u1E32]|[\u1E34-\u1E34]|[\u1E36-\u1E36]|[\u1E38-\u1E38]|[\u1E3A-\u1E3A]|[\u1E3C-\u1E3C]|[\u1E3E-\u1E3E]|[\u1E40-\u1E40]|[\u1E42-\u1E42]|[\u1E44-\u1E44]|[\u1E46-\u1E46]|[\u1E48-\u1E48]|[\u1E4A-\u1E4A]|[\u1E4C-\u1E4C]|[\u1E4E-\u1E4E]|[\u1E50-\u1E50]|[\u1E52-\u1E52]|[\u1E54-\u1E54]|[\u1E56-\u1E56]|[\u1E58-\u1E58]|[\u1E5A-\u1E5A]|[\u1E5C-\u1E5C]|[\u1E5E-\u1E5E]|[\u1E60-\u1E