diff --git a/dist/ohm-grammar.js b/dist/ohm-grammar.js index f46b1fb2..a261c356 100644 --- a/dist/ohm-grammar.js +++ b/dist/ohm-grammar.js @@ -54,7 +54,9 @@ module.exports = ohm.makeRecipe(function() { .define('escapeChar_tab', [], this.prim('\\t')) .define('escapeChar_unicodeEscape', [], this.seq(this.prim('\\u'), this.app('hexDigit'), this.app('hexDigit'), this.app('hexDigit'), this.app('hexDigit'))) .define('escapeChar_hexEscape', [], this.seq(this.prim('\\x'), this.app('hexDigit'), this.app('hexDigit'))) - .define('escapeChar', [], this.alt(this.app('escapeChar_backslash'), this.app('escapeChar_doubleQuote'), this.app('escapeChar_singleQuote'), this.app('escapeChar_backspace'), this.app('escapeChar_lineFeed'), this.app('escapeChar_carriageReturn'), this.app('escapeChar_tab'), this.app('escapeChar_unicodeEscape'), this.app('escapeChar_hexEscape'))) + .define('escapeChar_unrecognized', [], this.seq(this.prim('\\'), this.not(this.app('controlChar')), this.not(this.prim(' ')), this.app('_'))) + .define('escapeChar', [], this.alt(this.app('escapeChar_backslash'), this.app('escapeChar_doubleQuote'), this.app('escapeChar_singleQuote'), this.app('escapeChar_backspace'), this.app('escapeChar_lineFeed'), this.app('escapeChar_carriageReturn'), this.app('escapeChar_tab'), this.app('escapeChar_unicodeEscape'), this.app('escapeChar_hexEscape'), this.app('escapeChar_unrecognized'))) + .define('controlChar', [], this.prim(/[\000-\037]/)) .define('regExp', [], this.seq(this.prim('/'), this.app('reCharClass'), this.prim('/')), 'a regular expression') .define('reCharClass_unicode', [], this.seq(this.prim('\\p{'), this.plus(this.prim(/[A-Za-z]/)), this.prim('}'))) .define('reCharClass_ordinary', [], this.seq(this.prim('['), this.star(this.alt(this.prim('\\]'), this.seq(this.not(this.prim(']')), this.app('_')))), this.prim(']'))) diff --git a/dist/ohm.js b/dist/ohm.js index a72b2229..12172cd1 100644 --- a/dist/ohm.js +++ b/dist/ohm.js @@ -72,7 +72,9 @@ module.exports = ohm.makeRecipe(function() { .define('escapeChar_tab', [], this.prim('\\t')) .define('escapeChar_unicodeEscape', [], this.seq(this.prim('\\u'), this.app('hexDigit'), this.app('hexDigit'), this.app('hexDigit'), this.app('hexDigit'))) .define('escapeChar_hexEscape', [], this.seq(this.prim('\\x'), this.app('hexDigit'), this.app('hexDigit'))) - .define('escapeChar', [], this.alt(this.app('escapeChar_backslash'), this.app('escapeChar_doubleQuote'), this.app('escapeChar_singleQuote'), this.app('escapeChar_backspace'), this.app('escapeChar_lineFeed'), this.app('escapeChar_carriageReturn'), this.app('escapeChar_tab'), this.app('escapeChar_unicodeEscape'), this.app('escapeChar_hexEscape'))) + .define('escapeChar_unrecognized', [], this.seq(this.prim('\\'), this.not(this.app('controlChar')), this.not(this.prim(' ')), this.app('_'))) + .define('escapeChar', [], this.alt(this.app('escapeChar_backslash'), this.app('escapeChar_doubleQuote'), this.app('escapeChar_singleQuote'), this.app('escapeChar_backspace'), this.app('escapeChar_lineFeed'), this.app('escapeChar_carriageReturn'), this.app('escapeChar_tab'), this.app('escapeChar_unicodeEscape'), this.app('escapeChar_hexEscape'), this.app('escapeChar_unrecognized'))) + .define('controlChar', [], this.prim(/[\000-\037]/)) .define('regExp', [], this.seq(this.prim('/'), this.app('reCharClass'), this.prim('/')), 'a regular expression') .define('reCharClass_unicode', [], this.seq(this.prim('\\p{'), this.plus(this.prim(/[A-Za-z]/)), this.prim('}'))) .define('reCharClass_ordinary', [], this.seq(this.prim('['), this.star(this.alt(this.prim('\\]'), this.seq(this.not(this.prim(']')), this.app('_')))), this.prim(']'))) @@ -2787,7 +2789,8 @@ Interval.prototype = { }, getLineAndColumnMessage: function() { - return util.getLineAndColumnMessage(this.inputStream.source, this.startIdx); + var range = [this.startIdx, this.endIdx]; + return util.getLineAndColumnMessage(this.inputStream.source, this.startIdx, range); }, // Returns a new Interval which contains the same contents as this one, @@ -4068,6 +4071,18 @@ var GrammarSyntaxError = makeCustomError( } ); +var UnrecognizedEscapeSequence = makeCustomError( + 'ohm.error.UnrecognizedEscapeSequence', + function(interval) { + this.interval = interval; + var seq = interval.contents; + var c = seq[1]; + this.message = interval.getLineAndColumnMessage() + + 'Unrecognized escape sequence "' + seq + '". Did you mean ' + + JSON.stringify(seq) + ' or ' + JSON.stringify(c) + '?'; + } +); + // Undeclared grammar var UndeclaredGrammar = makeCustomError( @@ -4273,6 +4288,7 @@ module.exports = { MultipleErrors: MultipleErrors, UndeclaredGrammar: UndeclaredGrammar, UndeclaredRule: UndeclaredRule, + UnrecognizedEscapeSequence: UnrecognizedEscapeSequence, WrongNumberOfParameters: WrongNumberOfParameters, throwErrors: function(errors) { @@ -4532,10 +4548,13 @@ function buildGrammar(match, namespace, optOhmGrammarForTesting) { }, strChar: function(_) { - return this.interval.contents; + return _.visit(); }, - escapeChar: function(_) { + escapeChar: function(child) { + if (child.ctorName === 'escapeChar_unrecognized') { + throw new errors.UnrecognizedEscapeSequence(child.interval); + } return this.interval.contents; }, @@ -6617,6 +6636,6 @@ exports.UnicodeCategories = { }; },{}]},{},[28]) -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2Jyb3dzZXItcGFjay9fcHJlbHVkZS5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vZGlzdC9idWlsdC1pbi1ydWxlcy5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vZGlzdC9vaG0tZ3JhbW1hci5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2J1ZmZlci9pbmRleC5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2J1ZmZlci9ub2RlX21vZHVsZXMvYmFz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3RoOyBpZHgrKykge1xuICAgICAgICB2YXIgb3RoZXJTdGFjayA9IHN0YWNrc1tpZHhdO1xuICAgICAgICBpZiAoc3RhY2subGVuZ3RoICE9PSBvdGhlclN0YWNrLmxlbmd0aCkge1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIGlkeDIgPSAwOyBpZHgyIDwgc3RhY2subGVuZ3RoOyBpZHgyKyspIHtcbiAgICAgICAgICBpZiAoc3RhY2tbaWR4Ml0gIT09IG90aGVyU3RhY2tbaWR4Ml0pIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoaWR4MiA9PT0gc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgLy8gZm91bmQgaXQsIG5vIG5lZWQgdG8gYWRkXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBzdGFja3MucHVzaChzdGFjayk7XG4gICAgfVxuXG4gICAgLy8gQW5vdGhlciBmYWlsdXJlIGF0IHJpZ2h0LW1vc3QgcG9zaXRpb24gLS0gcmVjb3JkIGl0IGlmIGl0IHdhc24ndCBhbHJlYWR5LlxuICAgIHZhciBzdGFjayA9IHRoaXMuYXBwbGljYXRpb25TdGFjay5zbGljZSgpO1xuICAgIHZhciBleHByc0FuZFN0YWNrcyA9IHRoaXMuZmFpbHVyZXM7XG4gICAgZm9yICh2YXIgaWR4ID0gMDsgaWR4IDwgZXhwcnNBbmRTdGFja3MubGVuZ3RoOyBpZHgrKykge1xuICAgICAgdmFyIGV4cHJBbmRTdGFja3MgPSBleHByc0FuZFN0YWNrc1tpZHhdO1xuICAgICAgaWYgKGV4cHJBbmRTdGFja3MuZXhwciA9PT0gZXhwcikge1xuICAgICAgICBhZGRTdGFjayhzdGFjaywgZXhwckFuZFN0YWNrcy5zdGFja3MpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgfVxu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xbXFx1MENFNi1cXHUwQ0VGXXxbXFx1MEQ2Ni1cXHUwRDZGXXxbXFx1MEU1MC1cXHUwRTU5XXxbXFx1MEVEMC1cXHUwRUQ5XXxbXFx1MEYyMC1cXHUwRjI5XXxbXFx1RkYxMC1cXHVGRjE5XS8sXG4gIFBjICAgOiAvW1xcdTAwNUYtXFx1MDA1Rl18W1xcdTIwM0YtXFx1MjA0MF18W1xcdTMwRkItXFx1MzBGQl18W1xcdUZFMzMtXFx1RkUzNF18W1xcdUZFNEQtXFx1RkU0Rl18W1xcdUZGM0YtXFx1RkYzRl18W1xcdUZGNjUtXFx1RkY2NV0vLFxuICBacyAgIDogL1tcXHUyMDAwLVxcdTIwMEJdfFtcXHUzMDAwLVxcdTMwMDBdLyxcbn07XG4iXX0= (28) }); diff --git a/dist/ohm.min.js b/dist/ohm.min.js index 901029e4..48e65fbc 100644 --- a/dist/ohm.min.js +++ b/dist/ohm.min.js @@ -1,6 +1,6 @@ -!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ohm=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o"))).define("Params",[],this.seq(this.prim("<"),this.app("ListOf",[this.app("Seq"),this.prim(",")]),this.prim(">"))).define("Alt",[],this.seq(this.app("Term"),this.star(this.seq(this.prim("|"),this.app("Term"))))).define("Term_inline",[],this.seq(this.app("Seq"),this.app("caseName"))).define("Term",[],this.alt(this.app("Term_inline"),this.app("Seq"))).define("Seq",[],this.star(this.app("Iter"))).define("Iter_star",[],this.seq(this.app("Pred"),this.prim("*"))).define("Iter_plus",[],this.seq(this.app("Pred"),this.prim("+"))).define("Iter_opt",[],this.seq(this.app("Pred"),this.prim("?"))).define("Iter",[],this.alt(this.app("Iter_star"),this.app("Iter_plus"),this.app("Iter_opt"),this.app("Pred"))).define("Pred_not",[],this.seq(this.prim("~"),this.app("Base"))).define("Pred_lookahead",[],this.seq(this.prim("&"),this.app("Base"))).define("Pred",[],this.alt(this.app("Pred_not"),this.app("Pred_lookahead"),this.app("Base"))).define("Base_application",[],this.seq(this.app("ident"),this.opt(this.app("Params")),this.not(this.alt(this.seq(this.opt(this.app("ruleDescr")),this.prim("=")),this.prim(":="),this.prim("+="))))).define("Base_prim",[],this.alt(this.app("keyword"),this.app("string"),this.app("regExp"),this.app("number"))).define("Base_paren",[],this.seq(this.prim("("),this.app("Alt"),this.prim(")"))).define("Base_arr",[],this.seq(this.prim("["),this.app("Alt"),this.prim("]"))).define("Base_str",[],this.seq(this.prim("``"),this.app("Alt"),this.prim("''"))).define("Base_obj",[],this.seq(this.prim("{"),this.opt(this.prim("...")),this.prim("}"))).define("Base_objWithProps",[],this.seq(this.prim("{"),this.app("Props"),this.opt(this.seq(this.prim(","),this.prim("..."))),this.prim("}"))).define("Base",[],this.alt(this.app("Base_application"),this.app("Base_prim"),this.app("Base_paren"),this.app("Base_arr"),this.app("Base_str"),this.app("Base_obj"),this.app("Base_objWithProps"))).define("Props",[],this.seq(this.app("Prop"),this.star(this.seq(this.prim(","),this.app("Prop"))))).define("Prop",[],this.seq(this.alt(this.app("name"),this.app("string")),this.prim(":"),this.app("Alt"))).define("ruleDescr",[],this.seq(this.prim("("),this.app("ruleDescrText"),this.prim(")")),"a rule description").define("ruleDescrText",[],this.star(this.seq(this.not(this.prim(")")),this.app("_")))).define("caseName",[],this.seq(this.prim("--"),this.star(this.seq(this.not(this.prim("\n")),this.app("space"))),this.app("name"),this.star(this.seq(this.not(this.prim("\n")),this.app("space"))),this.alt(this.prim("\n"),this.la(this.prim("}"))))).define("name",[],this.seq(this.app("nameFirst"),this.star(this.app("nameRest"))),"a name").define("nameFirst",[],this.alt(this.prim("_"),this.app("letter"))).define("nameRest",[],this.alt(this.prim("_"),this.app("alnum"))).define("ident",[],this.seq(this.not(this.app("keyword")),this.app("name")),"an identifier").define("keyword_null",[],this.seq(this.prim("null"),this.not(this.app("nameRest")))).define("keyword_true",[],this.seq(this.prim("true"),this.not(this.app("nameRest")))).define("keyword_false",[],this.seq(this.prim("false"),this.not(this.app("nameRest")))).define("keyword",[],this.alt(this.app("keyword_null"),this.app("keyword_true"),this.app("keyword_false"))).define("string",[],this.seq(this.prim('"'),this.star(this.app("strChar")),this.prim('"')),"a string literal").define("strChar",[],this.alt(this.app("escapeChar"),this.seq(this.not(this.prim("\\")),this.not(this.prim('"')),this.not(this.prim("\n")),this.app("_")))).define("escapeChar_backslash",[],this.prim("\\\\")).define("escapeChar_doubleQuote",[],this.prim('\\"')).define("escapeChar_singleQuote",[],this.prim("\\'")).define("escapeChar_backspace",[],this.prim("\\b")).define("escapeChar_lineFeed",[],this.prim("\\n")).define("escapeChar_carriageReturn",[],this.prim("\\r")).define("escapeChar_tab",[],this.prim("\\t")).define("escapeChar_unicodeEscape",[],this.seq(this.prim("\\u"),this.app("hexDigit"),this.app("hexDigit"),this.app("hexDigit"),this.app("hexDigit"))).define("escapeChar_hexEscape",[],this.seq(this.prim("\\x"),this.app("hexDigit"),this.app("hexDigit"))).define("escapeChar",[],this.alt(this.app("escapeChar_backslash"),this.app("escapeChar_doubleQuote"),this.app("escapeChar_singleQuote"),this.app("escapeChar_backspace"),this.app("escapeChar_lineFeed"),this.app("escapeChar_carriageReturn"),this.app("escapeChar_tab"),this.app("escapeChar_unicodeEscape"),this.app("escapeChar_hexEscape"))).define("regExp",[],this.seq(this.prim("/"),this.app("reCharClass"),this.prim("/")),"a regular expression").define("reCharClass_unicode",[],this.seq(this.prim("\\p{"),this.plus(this.prim(/[A-Za-z]/)),this.prim("}"))).define("reCharClass_ordinary",[],this.seq(this.prim("["),this.star(this.alt(this.prim("\\]"),this.seq(this.not(this.prim("]")),this.app("_")))),this.prim("]"))).define("reCharClass",[],this.alt(this.app("reCharClass_unicode"),this.app("reCharClass_ordinary"))).define("number",[],this.seq(this.opt(this.prim("-")),this.plus(this.app("digit"))),"a number").define("space_singleLine",[],this.seq(this.prim("//"),this.star(this.seq(this.not(this.prim("\n")),this.app("_"))),this.prim("\n"))).define("space_multiLine",[],this.seq(this.prim("/*"),this.star(this.seq(this.not(this.prim("*/")),this.app("_"))),this.prim("*/"))).extend("space",[],this.alt(this.alt(this.app("space_singleLine"),this.app("space_multiLine")),this.prim(/[\s]/)),"a space").build()})},{"..":28}],3:[function(_dereq_,module,exports){var base64=_dereq_("base64-js");var ieee754=_dereq_("ieee754");exports.Buffer=Buffer;exports.SlowBuffer=Buffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;Buffer._useTypedArrays=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return 42===arr.foo()&&typeof arr.subarray==="function"}catch(e){return false}}();function Buffer(subject,encoding,noZero){if(!(this instanceof Buffer))return new Buffer(subject,encoding,noZero);var type=typeof subject;if(encoding==="base64"&&type==="string"){subject=stringtrim(subject);while(subject.length%4!==0){subject=subject+"="}}var length;if(type==="number")length=coerce(subject);else if(type==="string")length=Buffer.byteLength(subject,encoding);else if(type==="object")length=coerce(subject.length);else throw new Error("First argument needs to be a number, array or string.");var buf;if(Buffer._useTypedArrays){buf=Buffer._augment(new Uint8Array(length))}else{buf=this;buf.length=length;buf._isBuffer=true}var i;if(Buffer._useTypedArrays&&typeof subject.byteLength==="number"){buf._set(subject)}else if(isArrayish(subject)){for(i=0;iremaining){length=remaining}}var strLen=string.length;assert(strLen%2===0,"Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=_hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=_utf8Write(this,string,offset,length);break;case"ascii":ret=_asciiWrite(this,string,offset,length);break;case"binary":ret=_binaryWrite(this,string,offset,length);break;case"base64":ret=_base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=_utf16leWrite(this,string,offset,length);break;default:throw new Error("Unknown encoding")}return ret};Buffer.prototype.toString=function(encoding,start,end){var self=this;encoding=String(encoding||"utf8").toLowerCase();start=Number(start)||0;end=end!==undefined?Number(end):end=self.length;if(end===start)return"";var ret;switch(encoding){case"hex":ret=_hexSlice(self,start,end);break;case"utf8":case"utf-8":ret=_utf8Slice(self,start,end);break;case"ascii":ret=_asciiSlice(self,start,end);break;case"binary":ret=_binarySlice(self,start,end);break;case"base64":ret=_base64Slice(self,start,end);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=_utf16leSlice(self,start,end);break;default:throw new Error("Unknown encoding")}return ret};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(!start)start=0;if(!end&&end!==0)end=this.length;if(!target_start)target_start=0;if(end===start)return;if(target.length===0||source.length===0)return;assert(end>=start,"sourceEnd < sourceStart");assert(target_start>=0&&target_start=0&&start=0&&end<=source.length,"sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_startlen)end=len;var out="";for(var i=start;i=this.length)return;return this[offset]};function _readUInt16(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;var val;if(littleEndian){val=buf[offset];if(offset+1=len)return;var val;if(littleEndian){if(offset+2>>0)}else{if(offset+1>>0)}return val}Buffer.prototype.readUInt32LE=function(offset,noAssert){return _readUInt32(this,offset,true,noAssert)};Buffer.prototype.readUInt32BE=function(offset,noAssert){return _readUInt32(this,offset,false,noAssert)};Buffer.prototype.readInt8=function(offset,noAssert){if(!noAssert){assert(offset!==undefined&&offset!==null,"missing offset");assert(offset=this.length)return;var neg=this[offset]&128;if(neg)return(255-this[offset]+1)*-1;else return this[offset]};function _readInt16(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;var val=_readUInt16(buf,offset,littleEndian,true);var neg=val&32768;if(neg)return(65535-val+1)*-1;else return val}Buffer.prototype.readInt16LE=function(offset,noAssert){return _readInt16(this,offset,true,noAssert)};Buffer.prototype.readInt16BE=function(offset,noAssert){return _readInt16(this,offset,false,noAssert)};function _readInt32(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;var val=_readUInt32(buf,offset,littleEndian,true);var neg=val&2147483648;if(neg)return(4294967295-val+1)*-1;else return val}Buffer.prototype.readInt32LE=function(offset,noAssert){return _readInt32(this,offset,true,noAssert)};Buffer.prototype.readInt32BE=function(offset,noAssert){return _readInt32(this,offset,false,noAssert)};function _readFloat(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset+3=this.length)return;this[offset]=value};function _writeUInt16(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;for(var i=0,j=Math.min(len-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){_writeUInt16(this,value,offset,true,noAssert)};Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){_writeUInt16(this,value,offset,false,noAssert)};function _writeUInt32(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;for(var i=0,j=Math.min(len-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){_writeUInt32(this,value,offset,true,noAssert)};Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){_writeUInt32(this,value,offset,false,noAssert)};Buffer.prototype.writeInt8=function(value,offset,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset=this.length)return;if(value>=0)this.writeUInt8(value,offset,noAssert);else this.writeUInt8(255+value+1,offset,noAssert)};function _writeInt16(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;if(value>=0)_writeUInt16(buf,value,offset,littleEndian,noAssert);else _writeUInt16(buf,65535+value+1,offset,littleEndian,noAssert)}Buffer.prototype.writeInt16LE=function(value,offset,noAssert){_writeInt16(this,value,offset,true,noAssert)};Buffer.prototype.writeInt16BE=function(value,offset,noAssert){_writeInt16(this,value,offset,false,noAssert)};function _writeInt32(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;if(value>=0)_writeUInt32(buf,value,offset,littleEndian,noAssert);else _writeUInt32(buf,4294967295+value+1,offset,littleEndian,noAssert)}Buffer.prototype.writeInt32LE=function(value,offset,noAssert){_writeInt32(this,value,offset,true,noAssert)};Buffer.prototype.writeInt32BE=function(value,offset,noAssert){_writeInt32(this,value,offset,false,noAssert)};function _writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;ieee754.write(buf,value,offset,littleEndian,23,4)}Buffer.prototype.writeFloatLE=function(value,offset,noAssert){_writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function(value,offset,noAssert){_writeFloat(this,value,offset,false,noAssert)};function _writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+7=len)return;ieee754.write(buf,value,offset,littleEndian,52,8)}Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){_writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){_writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.fill=function(value,start,end){if(!value)value=0;if(!start)start=0;if(!end)end=this.length;if(typeof value==="string"){value=value.charCodeAt(0)}assert(typeof value==="number"&&!isNaN(value),"value is not a number");assert(end>=start,"end < start");if(end===start)return;if(this.length===0)return;assert(start>=0&&start=0&&end<=this.length,"end out of bounds");for(var i=start;i"};Buffer.prototype.toArrayBuffer=function(){if(typeof Uint8Array!=="undefined"){if(Buffer._useTypedArrays){return new Buffer(this).buffer}else{var buf=new Uint8Array(this.length);for(var i=0,len=buf.length;i=len)return len;if(index>=0)return index;index+=len;if(index>=0)return index;return 0}function coerce(length){length=~~Math.ceil(+length);return length<0?0:length}function isArray(subject){return(Array.isArray||function(subject){return Object.prototype.toString.call(subject)==="[object Array]"})(subject)}function isArrayish(subject){return isArray(subject)||Buffer.isBuffer(subject)||subject&&typeof subject==="object"&&typeof subject.length==="number"}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(str){var byteArray=[];for(var i=0;i=55296&&b<=57343)i++;var h=encodeURIComponent(str.slice(start,i+1)).substr(1).split("%");for(var j=0;j>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(str)}function blitBuffer(src,dst,offset,length){var pos;for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}function verifuint(value,max){assert(typeof value==="number","cannot write a non-number as a number");assert(value>=0,"specified a negative value for writing an unsigned value");assert(value<=max,"value is larger than maximum value for type");assert(Math.floor(value)===value,"value has a fractional component")}function verifsint(value,max,min){assert(typeof value==="number","cannot write a non-number as a number");assert(value<=max,"value larger than maximum allowed value");assert(value>=min,"value smaller than minimum allowed value");assert(Math.floor(value)===value,"value has a fractional component")}function verifIEEE754(value,max,min){assert(typeof value==="number","cannot write a non-number as a number");assert(value<=max,"value larger than maximum allowed value");assert(value>=min,"value smaller than minimum allowed value")}function assert(test,message){if(!test)throw new Error(message||"Failed assertion")}},{"base64-js":4,ieee754:5}],4:[function(_dereq_,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1]; -output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],5:[function(_dereq_,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,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,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,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,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],6:[function(_dereq_,module,exports){var Buffer=_dereq_("buffer").Buffer;var intSize=4;var zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var chrsz=8;function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}var arr=[];var fn=bigEndian?buf.readInt32BE:buf.readInt32LE;for(var i=0;iblocksize){key=fn(key)}else if(key.length>5]|=128<>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bit_rol(num,cnt){return num<>>32-cnt}module.exports=function md5(buf){return helpers.hash(buf,core_md5,16)}},{"./helpers":6}],9:[function(_dereq_,module,exports){(function(){var _global=this;var mathRNG,whatwgRNG;mathRNG=function(size){var bytes=new Array(size);var r;for(var i=0,r;i>>((i&3)<<3)&255}return bytes};if(_global.crypto&&crypto.getRandomValues){whatwgRNG=function(size){var bytes=new Uint8Array(size);crypto.getRandomValues(bytes);return bytes}}module.exports=whatwgRNG||mathRNG})()},{}],10:[function(_dereq_,module,exports){var helpers=_dereq_("./helpers");function core_sha1(x,len){x[len>>5]|=128<<24-len%32;x[(len+64>>9<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function rol(num,cnt){return num<>>32-cnt}module.exports=function sha1(buf){return helpers.hash(buf,core_sha1,20,true)}},{"./helpers":6}],11:[function(_dereq_,module,exports){var helpers=_dereq_("./helpers");var safe_add=function(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535};var S=function(X,n){return X>>>n|X<<32-n};var R=function(X,n){return X>>>n};var Ch=function(x,y,z){return x&y^~x&z};var Maj=function(x,y,z){return x&y^x&z^y&z};var Sigma0256=function(x){return S(x,2)^S(x,13)^S(x,22)};var Sigma1256=function(x){return S(x,6)^S(x,11)^S(x,25)};var Gamma0256=function(x){return S(x,7)^S(x,18)^R(x,3)};var Gamma1256=function(x){return S(x,17)^S(x,19)^R(x,10)};var core_sha256=function(m,l){var K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var HASH=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var W=new Array(64);var a,b,c,d,e,f,g,h,i,j;var T1,T2;m[l>>5]|=128<<24-l%32;m[(l+64>>9<<4)+15]=l;for(var i=0;i0){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==="_default"||actionName==="_iter"){return 1}else if(actionName==="_terminal"){return 0}return this.ruleDict[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(" return new this.newGrammar("+common.toStringLiteral(this.name)+")\n");sb.append(superGrammarDecl);if(this.defaultStartRule){sb.append(" .withDefaultStartRule('"+this.defaultStartRule+"')\n")}var self=this;Object.keys(this.ruleDict).forEach(function(ruleName){var body=self.ruleDict[ruleName];sb.append(" .");if(self.superGrammar.ruleDict[ruleName]){sb.append(body instanceof pexprs.Extend?"extend":"override")}else{sb.append("define")}var formals="["+body.formals.map(common.toStringLiteral).join(", ")+"]";sb.append("("+common.toStringLiteral(ruleName)+", "+formals+", ");body.outputRecipe(sb,body.formals);if(body.description){sb.append(", "+common.toStringLiteral(body.description))}sb.append(")\n")});sb.append(" .build();\n});\n");return sb.contents()},toOperationActionDictionaryTemplate:function(){return this._toOperationOrAttributeActionDictionaryTemplate()},toAttributeActionDictionaryTemplate:function(){return this._toOperationOrAttributeActionDictionaryTemplate()},_toOperationOrAttributeActionDictionaryTemplate:function(){var sb=new common.StringBuffer;sb.append("{");var first=true;for(var ruleName in this.ruleDict){if(ruleName==="spaces_"){continue}var body=this.ruleDict[ruleName];if(first){first=false}else{sb.append(",")}sb.append("\n");sb.append(" ");this.addSemanticActionTemplate(ruleName,body,sb)}sb.append("\n}");return sb.contents()},addSemanticActionTemplate:function(ruleName,body,sb){sb.append(ruleName);sb.append(": function(");var arity=this._topDownActionArity(ruleName);sb.append(common.repeat("_",arity).join(", "));sb.append(") {\n");sb.append(" }")}};Grammar.ProtoBuiltInRules=new Grammar("ProtoBuiltInRules",undefined,{_:pexprs.anything.withFormals([]),end:pexprs.end.withFormals([]),spaces_:new pexprs.Star(new pexprs.Apply("space")).withFormals([]),space:pexprs.makePrim(/[\s]/).withFormals([]).withDescription("a space")});module.exports=Grammar},{"./InputStream":18,"./Interval":19,"./MatchResult":20,"./Semantics":23,"./State":24,"./common":26,"./errors":27,"./nodes":29,"./pexprs":44}],17:[function(_dereq_,module,exports){"use strict";var Grammar=_dereq_("./Grammar");var common=_dereq_("./common");var errors=_dereq_("./errors");var pexprs=_dereq_("./pexprs");function GrammarDecl(name){this.name=name}function onOhmError(doFn,onErrorFn){try{doFn()}catch(e){if(e instanceof errors.Error){onErrorFn(e)}else{throw e}}}GrammarDecl.prototype.ensureSuperGrammar=function(){if(!this.superGrammar){this.withSuperGrammar(this.name==="BuiltInRules"?Grammar.ProtoBuiltInRules:Grammar.BuiltInRules)}return this.superGrammar};GrammarDecl.prototype.installOverriddenOrExtendedRule=function(name,formals,body){var duplicateParameterNames=common.getDuplicates(formals);if(duplicateParameterNames.length>0){throw new errors.DuplicateParameterNames(name,duplicateParameterNames)}var baseRule=this.ensureSuperGrammar().ruleDict[name];if(formals.length!==baseRule.formals.length){throw new errors.WrongNumberOfParameters(name,baseRule.formals.length,formals.length)}return this.install(name,formals,baseRule.description,body)};GrammarDecl.prototype.install=function(name,formals,description,body){body=body.introduceParams(formals);body.formals=formals;body.description=description;this.ruleDict[name]=body;return this};GrammarDecl.prototype.withSuperGrammar=function(superGrammar){if(this.superGrammar){throw new Error("the super grammar of a GrammarDecl cannot be set more than once")}this.superGrammar=superGrammar;this.ruleDict=Object.create(superGrammar.ruleDict);if(!superGrammar.isBuiltIn()){this.defaultStartRule=superGrammar.defaultStartRule}return this};GrammarDecl.prototype.withDefaultStartRule=function(ruleName){this.defaultStartRule=ruleName;return this};GrammarDecl.prototype.build=function(){var grammar=new Grammar(this.name,this.ensureSuperGrammar(),this.ruleDict,this.defaultStartRule);var grammarErrors=[];var grammarHasInvalidApplications=false;Object.keys(grammar.ruleDict).forEach(function(ruleName){var body=grammar.ruleDict[ruleName];onOhmError(function(){body.assertChoicesHaveUniformArity(ruleName)},function(e){grammarErrors.push(e)});onOhmError(function(){body.assertAllApplicationsAreValid(grammar)},function(e){grammarErrors.push(e);grammarHasInvalidApplications=true})});if(!grammarHasInvalidApplications){Object.keys(grammar.ruleDict).forEach(function(ruleName){var body=grammar.ruleDict[ruleName];onOhmError(function(){body.assertIteratedExprsAreNotNullable(grammar,ruleName)},function(e){grammarErrors.push(e)})})}if(grammarErrors.length>0){errors.throwErrors(grammarErrors)}return grammar};GrammarDecl.prototype.define=function(name,formals,body,optDescr){this.ensureSuperGrammar();if(this.superGrammar.ruleDict[name]){throw new errors.DuplicateRuleDeclaration(name,this.name,this.superGrammar.name)}else if(this.ruleDict[name]){throw new errors.DuplicateRuleDeclaration(name,this.name,this.name)}var duplicateParameterNames=common.getDuplicates(formals);if(duplicateParameterNames.length>0){throw new errors.DuplicateParameterNames(name,duplicateParameterNames)}return this.install(name,formals,optDescr,body)};GrammarDecl.prototype.override=function(name,formals,body){var baseRule=this.ensureSuperGrammar().ruleDict[name];if(!baseRule){throw new errors.CannotOverrideUndeclaredRule(name,this.superGrammar.name)}this.installOverriddenOrExtendedRule(name,formals,body);return this};GrammarDecl.prototype.extend=function(name,formals,body){var baseRule=this.ensureSuperGrammar().ruleDict[name];if(!baseRule){throw new errors.CannotExtendUndeclaredRule(name,this.superGrammar.name)}this.installOverriddenOrExtendedRule(name,formals,new pexprs.Extend(this.superGrammar,name,body));return this};module.exports=GrammarDecl},{"./Grammar":16,"./common":26,"./errors":27,"./pexprs":44}],18:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var Interval=_dereq_("./Interval");function InputStream(){throw new Error("InputStream cannot be instantiated -- it's abstract")}InputStream.newFor=function(obj){if(typeof obj==="string"){return new StringInputStream(obj)}else if(Array.isArray(obj)){return new ListInputStream(obj)}else if(obj instanceof InputStream){return obj}else{throw new Error("cannot make input stream for "+obj)}};InputStream.prototype={init:function(source){this.source=source;this.pos=0;this.posInfos=[]},atEnd:function(){return this.pos===this.source.length},next:function(){if(this.atEnd()){return common.fail}else{return this.source[this.pos++]}},matchExactly:function(x){return this.next()===x?true:common.fail},sourceSlice:function(startIdx,endIdx){return this.source.slice(startIdx,endIdx)},intervalFrom:function(startIdx){return new Interval(this,startIdx,this.pos)}};function StringInputStream(source){this.init(source)}StringInputStream.prototype=Object.create(InputStream.prototype,{matchString:{value:function(s){for(var idx=0;idx0){if(idx===expected.length-1){sb.append(expected.length>2?", or ":" or ")}else{sb.append(", ")}}sb.append(expected[idx])}return sb.contents()};MatchFailure.prototype.getExpected=function(){var expected={};var ruleDict=this.state.grammar.ruleDict;this._exprsAndStacks.forEach(function(obj){expected[obj.expr.toExpected(ruleDict)]=true});return Object.keys(expected)};module.exports=MatchResult},{"./common":26,"./util":45,inherits:12}],21:[function(_dereq_,module,exports){"use strict";var extend=_dereq_("util-extend");function Namespace(){}Namespace.prototype=Object.create(null);Namespace.asNamespace=function(objOrNamespace){if(objOrNamespace instanceof Namespace){return objOrNamespace}return Namespace.createNamespace(objOrNamespace)};Namespace.createNamespace=function(optProps){return Namespace.extend(Namespace.prototype,optProps)};Namespace.extend=function(namespace,optProps){if(namespace!==Namespace.prototype&&!(namespace instanceof Namespace)){throw new TypeError("not a Namespace object: "+namespace)}var ns=Object.create(namespace,{constructor:{value:Namespace,enumerable:false,writable:true,configurable:true}});return extend(ns,optProps)};Namespace.toString=function(ns){return Object.prototype.toString.call(ns)};module.exports=Namespace},{"util-extend":14}],22:[function(_dereq_,module,exports){"use strict";function PosInfo(globalApplicationStack){this.globalApplicationStack=globalApplicationStack;this.applicationStack=[];this.activeApplications={};this.memo={}}PosInfo.prototype={isActive:function(application){return this.activeApplications[application.toMemoKey()]},enter:function(application){this.globalApplicationStack.push(application); -this.applicationStack.push(application);this.activeApplications[application.toMemoKey()]=true},exit:function(){var application=this.globalApplicationStack.pop();this.applicationStack.pop();this.activeApplications[application.toMemoKey()]=false},shouldUseMemoizedResult:function(memoRec){var involvedApplications=memoRec.involvedApplications;for(var memoKey in involvedApplications){if(involvedApplications[memoKey]&&this.activeApplications[memoKey]){return false}}return true},getCurrentLeftRecursion:function(){if(this.leftRecursionStack){return this.leftRecursionStack[this.leftRecursionStack.length-1]}},startLeftRecursion:function(application){if(!this.leftRecursionStack){this.leftRecursionStack=[]}this.leftRecursionStack.push({memoKey:application.toMemoKey(),value:false,pos:-1,involvedApplications:{}});this.updateInvolvedApplications()},endLeftRecursion:function(application){this.leftRecursionStack.pop()},updateInvolvedApplications:function(){var currentLeftRecursion=this.getCurrentLeftRecursion();var involvedApplications=currentLeftRecursion.involvedApplications;var lrApplicationMemoKey=currentLeftRecursion.memoKey;var idx=this.applicationStack.length-1;while(true){var memoKey=this.applicationStack[idx--].toMemoKey();if(memoKey===lrApplicationMemoKey){break}involvedApplications[memoKey]=true}}};module.exports=PosInfo},{}],23:[function(_dereq_,module,exports){"use strict";var Symbol=_dereq_("symbol");var inherits=_dereq_("inherits");var MatchResult=_dereq_("./MatchResult");var common=_dereq_("./common");function Wrapper(){}Wrapper.prototype.toString=function(){return"[semantics wrapper for "+this._node.grammar.name+"]"};Wrapper.prototype.child=function(idx){if(!(0<=idx&&idx0){return}if(posthis.rightmostFailPos){this.rightmostFailPos=pos}if(!this.failures){return}function addStack(stack,stacks){for(var idx=0;idx0){arr.push(fn())}return arr};exports.repeatStr=function(str,n){return new Array(n+1).join(str)};exports.repeat=function(x,n){return exports.repeatFn(function(){return x},n)};exports.getDuplicates=function(array){var duplicates=[];for(var idx=0;idx=0;var hasDoubleQuotes=str.indexOf('"')>=0;var delim=hasSingleQuotes&&!hasDoubleQuotes?'"':"'";var sb=new exports.StringBuffer;sb.append(delim);for(var idx=0;idx1){throw new MultipleErrors(errors)}}}},{"./Namespace":21}],28:[function(_dereq_,module,exports){(function(Buffer){"use strict";var Builder=_dereq_("./Builder");var Grammar=_dereq_("./Grammar");var Namespace=_dereq_("./Namespace");var UnicodeCategories=_dereq_("../third_party/unicode").UnicodeCategories;var common=_dereq_("./common");var errors=_dereq_("./errors");var util=_dereq_("./util");var ohmGrammar;var documentInterface={querySelector:function(sel){return document.querySelector(sel)},querySelectorAll:function(sel){return document.querySelectorAll(sel)}};function isElement(obj){return!!(obj&&obj.nodeType===1)}function isUndefined(obj){return obj===void 0}var MAX_ARRAY_INDEX=Math.pow(2,53)-1;function isArrayLike(obj){if(obj==null){return false}var length=obj.length;return typeof length==="number"&&length>=0&&length<=MAX_ARRAY_INDEX}function load(url){var req=new XMLHttpRequest;req.open("GET",url,false);try{req.send();if(req.status===0||req.status===200){return req.responseText}}catch(e){}throw new Error("unable to load url "+url)}function buildGrammar(match,namespace,optOhmGrammarForTesting){var builder;var decl;var currentRuleName;var currentRuleFormals;var overriding=false;var metaGrammar=optOhmGrammarForTesting||ohmGrammar;var helpers=metaGrammar.semantics().addOperation("visit",{Grammar:function(n,s,open,rs,close){builder=new Builder;var grammarName=n.visit();decl=builder.newGrammar(grammarName,namespace);s.visit();rs.visit();var g=decl.build();if(grammarName in namespace){throw new errors.DuplicateGrammarDeclaration(grammarName,namespace)}g.definitionInterval=this.interval.trimmed();namespace[grammarName]=g;return g},SuperGrammar:function(_,n){var superGrammarName=n.visit();if(superGrammarName==="null"){decl.withSuperGrammar(null)}else{if(!namespace||!(superGrammarName in namespace)){throw new errors.UndeclaredGrammar(superGrammarName,namespace)}decl.withSuperGrammar(namespace[superGrammarName])}},Rule_define:function(n,fs,d,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];if(!decl.defaultStartRule&&decl.ensureSuperGrammar()!==Grammar.ProtoBuiltInRules){decl.withDefaultStartRule(currentRuleName)}var body=b.visit();body.definitionInterval=this.interval.trimmed();var description=d.visit()[0];return decl.define(currentRuleName,currentRuleFormals,body,description)},Rule_override:function(n,fs,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];overriding=true;var body=b.visit();body.definitionInterval=this.interval.trimmed();var ans=decl.override(currentRuleName,currentRuleFormals,body);overriding=false;return ans},Rule_extend:function(n,fs,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];var body=b.visit();var ans=decl.extend(currentRuleName,currentRuleFormals,body);decl.ruleDict[currentRuleName].definitionInterval=this.interval.trimmed();return ans},Formals:function(opointy,fs,cpointy){return fs.visit()},Params:function(opointy,ps,cpointy){return ps.visit()},Alt:function(term,_,terms){var args=[term.visit()].concat(terms.visit());return builder.alt.apply(builder,args).withInterval(this.interval)},Term_inline:function(b,n){var inlineRuleName=currentRuleName+"_"+n.visit();var body=b.visit();body.definitionInterval=this.interval.trimmed();var isNewRuleDeclaration=!(decl.superGrammar&&decl.superGrammar.ruleDict[inlineRuleName]);if(overriding&&!isNewRuleDeclaration){decl.override(inlineRuleName,currentRuleFormals,body)}else{decl.define(inlineRuleName,currentRuleFormals,body)}var params=currentRuleFormals.map(function(formal){return builder.app(formal)});return builder.app(inlineRuleName,params).withInterval(body.interval)},Seq:function(expr){return builder.seq.apply(builder,expr.visit()).withInterval(this.interval)},Iter_star:function(x,_){return builder.star(x.visit()).withInterval(this.interval)},Iter_plus:function(x,_){return builder.plus(x.visit()).withInterval(this.interval)},Iter_opt:function(x,_){return builder.opt(x.visit()).withInterval(this.interval)},Pred_not:function(_,x){return builder.not(x.visit()).withInterval(this.interval)},Pred_lookahead:function(_,x){return builder.la(x.visit()).withInterval(this.interval)},Base_application:function(rule,ps){return builder.app(rule.visit(),ps.visit()[0]||[]).withInterval(this.interval)},Base_prim:function(expr){return builder.prim(expr.visit()).withInterval(this.interval)},Base_paren:function(open,x,close){return x.visit()},Base_arr:function(open,x,close){return builder.arr(x.visit()).withInterval(this.interval)},Base_str:function(open,x,close){return builder.str(x.visit())},Base_obj:function(open,lenient,close){return builder.obj([],lenient.visit()[0])},Base_objWithProps:function(open,ps,_,lenient,close){return builder.obj(ps.visit(),lenient.visit()[0]).withInterval(this.interval)},Props:function(p,_,ps){return[p.visit()].concat(ps.visit())},Prop:function(n,_,p){return{name:n.visit(),pattern:p.visit()}},ruleDescr:function(open,t,close){return t.visit()},ruleDescrText:function(_){return this.interval.contents.trim()},caseName:function(_,space1,n,space2,end){return n.visit()},name:function(first,rest){return this.interval.contents},nameFirst:function(expr){},nameRest:function(expr){},keyword_null:function(_){return null},keyword_true:function(_){return true},keyword_false:function(_){return false},string:function(open,cs,close){return cs.visit().map(function(c){return common.unescapeChar(c)}).join("")},strChar:function(_){return this.interval.contents},escapeChar:function(_){return this.interval.contents},regExp:function(open,e,close){return e.visit()},reCharClass_unicode:function(open,unicodeClass,close){return UnicodeCategories[unicodeClass.visit().join("")]},reCharClass_ordinary:function(open,_,close){return new RegExp(this.interval.contents)},number:function(_,digits){return parseInt(this.interval.contents)},space:function(expr){},space_multiLine:function(start,_,end){},space_singleLine:function(start,_,end){},ListOf_some:function(x,_,xs){return[x.visit()].concat(xs.visit())},ListOf_none:function(){return[]}});return helpers(match).visit()}function compileAndLoad(source,namespace){var m=ohmGrammar.match(source,"Grammars");if(m.failed()){throw new errors.GrammarSyntaxError(m)}return buildGrammar(m,namespace)}function getScriptElementContents(el){if(!isElement(el)){throw new TypeError("Expected a DOM Node, got "+common.unexpectedObjToString(el))}if(el.type!=="text/ohm-js"){throw new Error('Expected a script tag with type="text/ohm-js", got '+el)}return el.getAttribute("src")?load(el.getAttribute("src")):el.innerHTML}function grammar(source,optNamespace){var ns=grammars(source,optNamespace);var grammarNames=Object.keys(ns);if(grammarNames.length===0){throw new Error("Missing grammar definition")}else if(grammarNames.length>1){var secondGrammar=ns[grammarNames[1]];var interval=secondGrammar.definitionInterval;throw new Error(util.getLineAndColumnMessage(interval.inputStream.source,interval.startIdx)+"Found more than one grammar definition -- use ohm.grammars() instead.")}return ns[grammarNames[0]]}function grammars(source,optNamespace){var ns=Namespace.extend(Namespace.asNamespace(optNamespace));if(typeof source!=="string"){if(Buffer&&Buffer.isBuffer(source)){source=source.toString()}else{throw new TypeError("Expected string as first argument, got "+common.unexpectedObjToString(source))}}compileAndLoad(source,ns);return ns}function grammarFromScriptElement(optNode){var node=optNode;if(isUndefined(node)){var nodeList=documentInterface.querySelectorAll('script[type="text/ohm-js"]');if(nodeList.length!==1){throw new Error('Expected exactly one script tag with type="text/ohm-js", found '+nodeList.length)}node=nodeList[0]}return grammar(getScriptElementContents(node))}function grammarsFromScriptElements(optNodeOrNodeList){if(isElement(optNodeOrNodeList)){return grammars(optNodeOrNodeList)}var nodeList=optNodeOrNodeList;if(isUndefined(nodeList)){nodeList=documentInterface.querySelectorAll('script[type="text/ohm-js"]')}else if(typeof nodeList==="string"||!isElement(nodeList)&&!isArrayLike(nodeList)){throw new TypeError("Expected a Node, NodeList, or Array, but got "+nodeList)}var ns=Namespace.createNamespace();for(var i=0;i0};Node.prototype.hasNoChildren=function(){return!this.hasChildren()};Node.prototype.onlyChild=function(){if(this.children.length!==1){throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)")}else{return this.firstChild()}};Node.prototype.firstChild=function(){if(this.hasNoChildren()){throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children")}else{return this.childAt(0)}};Node.prototype.lastChild=function(){if(this.hasNoChildren()){throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children")}else{return this.childAt(this.numChildren()-1)}};Node.prototype.childBefore=function(child){var childIdx=this.indexOfChild(child);if(childIdx<0){throw new Error("Node.childBefore() called w/ an argument that is not a child")}else if(childIdx===0){throw new Error("cannot get child before first child")}else{return this.childAt(childIdx-1)}};Node.prototype.childAfter=function(child){var childIdx=this.indexOfChild(child);if(childIdx<0){throw new Error("Node.childAfter() called w/ an argument that is not a child")}else if(childIdx===this.numChildren()-1){throw new Error("cannot get child after last child")}else{return this.childAt(childIdx+1)}};Node.prototype.isTerminal=function(){return false};Node.prototype.toJSON=function(){var r={};r[this.ctorName]=this.children;return r};function TerminalNode(grammar,value,interval){Node.call(this,grammar,"_terminal",[],interval);this.primitiveValue=value}inherits(TerminalNode,Node);TerminalNode.prototype.isTerminal=function(){return true};module.exports={Node:Node,TerminalNode:TerminalNode}},{inherits:12}],30:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");var errors=_dereq_("./errors");pexprs.PExpr.prototype.assertAllApplicationsAreValid=common.abstract;pexprs.anything.assertAllApplicationsAreValid=function(grammar){};pexprs.end.assertAllApplicationsAreValid=function(grammar){};pexprs.Prim.prototype.assertAllApplicationsAreValid=function(grammar){};pexprs.Param.prototype.assertAllApplicationsAreValid=function(grammar){};pexprs.Alt.prototype.assertAllApplicationsAreValid=function(grammar){for(var idx=0;idx=1};pexprs.end.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&vals[0].primitiveValue===undefined};pexprs.Prim.prototype.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&vals[0].primitiveValue===this.obj};pexprs.Param.prototype.check=function(grammar,vals){return vals.length>=1};pexprs.RegExpPrim.prototype.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&typeof vals[0].primitiveValue==="string"&&vals[0].primitiveValue.replace(this.obj,"")===""};pexprs.Alt.prototype.check=function(grammar,vals){for(var i=0;i1?state.applicationStack[state.applicationStack.length-1].params:[];var app=this.substituteParams(actuals);var ruleName=app.ruleName;var memoKey=app.toMemoKey();if(common.isSyntactic(ruleName)){skipSpaces(state)}var origPosInfo=state.getCurrentPosInfo();var memoRec=origPosInfo.memo[memoKey];var currentLR;if(memoRec&&origPosInfo.shouldUseMemoizedResult(memoRec)){return useMemoizedResult(memoRec)}else if(origPosInfo.isActive(app)){currentLR=origPosInfo.getCurrentLeftRecursion();if(currentLR&¤tLR.memoKey===memoKey){origPosInfo.updateInvolvedApplications();return useMemoizedResult(currentLR)}else{origPosInfo.startLeftRecursion(app);return false}}else{var body=grammar.ruleDict[ruleName];var origPos=inputStream.pos;origPosInfo.enter(app);if(body.description){state.ignoreFailures()}var value=app.evalOnce(body,state,inputStream,origPos);currentLR=origPosInfo.getCurrentLeftRecursion();if(currentLR){if(currentLR.memoKey===memoKey){value=app.handleLeftRecursion(body,state,origPos,currentLR,value);origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value,involvedApplications:currentLR.involvedApplications};origPosInfo.endLeftRecursion(app)}else if(!currentLR.involvedApplications[memoKey]){origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value}}}else{origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value}}if(body.description){state.recordFailures();if(!value){state.recordFailure(origPos,app)}}if(state.isTracing()&&origPosInfo.memo[memoKey]){var entry=state.getTraceEntry(origPos,app,value);entry.setLeftRecursive(currentLR&¤tLR.memoKey===memoKey);origPosInfo.memo[memoKey].traceEntry=entry}var ans;if(value){bindings.push(value);if(state.applicationStack.length===1){if(common.isSyntactic(ruleName)){skipSpaces(state)}ans=pexprs.end.eval(state);bindings.pop()}else{ans=true}}else{ans=false}origPosInfo.exit();return ans}};pexprs.Apply.prototype.evalOnce=function(expr,state,inputStream,origPos){if(expr.eval(state)){var arity=expr.getArity();var bindings=state.bindings.splice(state.bindings.length-arity,arity);var ans=new Node(state.grammar,this.ruleName,bindings,inputStream.intervalFrom(origPos));return ans}else{return false}};pexprs.Apply.prototype.handleLeftRecursion=function(body,state,origPos,currentLR,seedValue){if(!seedValue){return seedValue}var inputStream=state.inputStream;var value=seedValue;currentLR.value=seedValue;currentLR.pos=inputStream.pos;while(true){if(state.isTracing()){currentLR.traceEntry=common.clone(state.trace[state.trace.length-1])}inputStream.pos=origPos;value=this.evalOnce(body,state,inputStream,origPos);if(value&&inputStream.pos>currentLR.pos){currentLR.value=value;currentLR.pos=inputStream.pos}else{inputStream.pos=currentLR.pos;if(state.isTracing()){state.trace.pop()}break}}return currentLR.value}},{"./InputStream":18,"./common":26,"./nodes":29,"./pexprs":44}],35:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.getArity=function(){return 1};pexprs.Alt.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};pexprs.Seq.prototype.getArity=function(){var arity=0;for(var idx=0;idx=0){if(this.params.length>0){throw new Error("FIXME: should catch this earlier")}return new pexprs.Param(index)}else{this.params.forEach(function(param,idx,params){params[idx]=param.introduceParams(formals)});return this}}},{"./pexprs":44}],37:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.isNullable=function(grammar){return this._isNullable(grammar,Object.create(null))};pexprs.PExpr.prototype._isNullable=function(grammar,memo){return false};pexprs.end._isNullable=function(grammar,memo){return true};pexprs.StringPrim.prototype._isNullable=function(grammar,memo){return this.obj===""};pexprs.Alt.prototype._isNullable=function(grammar,memo){return this.terms.length===0||this.terms.some(function(term){return term._isNullable(grammar,memo)})};pexprs.Seq.prototype._isNullable=function(grammar,memo){return this.factors.every(function(factor){return factor._isNullable(grammar,memo)})};pexprs.Star.prototype._isNullable=pexprs.Opt.prototype._isNullable=pexprs.Not.prototype._isNullable=pexprs.Lookahead.prototype._isNullable=function(grammar,memo){return true};pexprs.Str.prototype._isNullable=function(grammar,memo){return this.expr._isNullable(grammar,memo)};pexprs.Apply.prototype._isNullable=function(grammar,memo){var key=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(memo,key)){var body=grammar.ruleDict[this.ruleName];var inlined=body.substituteParams(this.params);memo[key]=false;memo[key]=inlined._isNullable(grammar,memo)}return memo[key]}},{"./pexprs":44}],38:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.maybeRecordFailure=function(state,startPos){};pexprs.anything.maybeRecordFailure=pexprs.end.maybeRecordFailure=pexprs.Prim.prototype.maybeRecordFailure=pexprs.Not.prototype.maybeRecordFailure=function(state,startPos){state.recordFailure(startPos,this)}},{"./pexprs":44}],39:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.outputRecipe=common.abstract;pexprs.anything.outputRecipe=function(sb,formals){sb.append("this.anything()")};pexprs.end.outputRecipe=function(sb,formals){sb.append("this.end()")};pexprs.Prim.prototype.outputRecipe=function(sb,formals){sb.append("this.prim(");sb.append(typeof this.obj==="string"?common.toStringLiteral(this.obj):""+this.obj);sb.append(")")};pexprs.Param.prototype.outputRecipe=function(sb,formals){sb.append("this.param("+this.index+")")};pexprs.Alt.prototype.outputRecipe=function(sb,formals){sb.append("this.alt(");for(var idx=0;idx0){sb.append(", ")}this.terms[idx].outputRecipe(sb,formals)}sb.append(")")};pexprs.Seq.prototype.outputRecipe=function(sb,formals){sb.append("this.seq(");for(var idx=0;idx0){sb.append(", ")}this.factors[idx].outputRecipe(sb,formals)}sb.append(")")};pexprs.Star.prototype.outputRecipe=function(sb,formals){sb.append("this.star(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Plus.prototype.outputRecipe=function(sb,formals){sb.append("this.plus(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Opt.prototype.outputRecipe=function(sb,formals){sb.append("this.opt(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Not.prototype.outputRecipe=function(sb,formals){sb.append("this.not(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Lookahead.prototype.outputRecipe=function(sb,formals){sb.append("this.la(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Arr.prototype.outputRecipe=function(sb,formals){sb.append("this.arr(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Str.prototype.outputRecipe=function(sb,formals){sb.append("this.str(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Obj.prototype.outputRecipe=function(sb,formals){function outputPropertyRecipe(prop){sb.append("{name: ");sb.append(common.toStringLiteral(prop.name));sb.append(", pattern: ");prop.pattern.outputRecipe(sb,formals);sb.append("}")}sb.append("this.obj([");for(var idx=0;idx0){sb.append(", ")}outputPropertyRecipe(this.properties[idx])}sb.append("], ");sb.append(!!this.isLenient);sb.append(")")};pexprs.Apply.prototype.outputRecipe=function(sb,formals){sb.append("this.app(");sb.append(common.toStringLiteral(this.ruleName));if(this.ruleName.indexOf("_")>=0&&formals.length>0){var apps=formals.map(function(formal){return"this.app("+common.toStringLiteral(formal)+")"});sb.append(", ["+apps.join(", ")+"]")}else if(this.params.length>0){sb.append(", [");this.params.forEach(function(param,idx){if(idx>0){sb.append(", ")}param.outputRecipe(sb,formals)});sb.append("]")}sb.append(")")}},{"./common":26,"./pexprs":44}],40:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.substituteParams=function(actuals){return this};pexprs.Param.prototype.substituteParams=function(actuals){return actuals[this.index]};pexprs.Alt.prototype.substituteParams=function(actuals){return new pexprs.Alt(this.terms.map(function(term){return term.substituteParams(actuals)}))};pexprs.Seq.prototype.substituteParams=function(actuals){return new pexprs.Seq(this.factors.map(function(factor){return factor.substituteParams(actuals)}))};pexprs.Iter.prototype.substituteParams=pexprs.Not.prototype.substituteParams=pexprs.Lookahead.prototype.substituteParams=pexprs.Arr.prototype.substituteParams=pexprs.Str.prototype.substituteParams=function(actuals){return new this.constructor(this.expr.substituteParams(actuals))};pexprs.Obj.prototype.substituteParams=function(actuals){var properties=this.properties.map(function(property){return{name:property.name,pattern:property.pattern.substituteParams(actuals)}});return new pexprs.Obj(properties,this.isLenient)};pexprs.Apply.prototype.substituteParams=function(actuals){if(this.params.length===0){return this}else{var params=this.params.map(function(param){return param.substituteParams(actuals)});return new pexprs.Apply(this.ruleName,params)}}},{"./pexprs":44}],41:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toDisplayString=function(){if(this.interval){return this.interval.trimmed().contents}return"["+this.constructor.name+"]"};pexprs.anything.toDisplayString=function(){return"_"};pexprs.end.toDisplayString=function(){return"end"};pexprs.Prim.prototype.toDisplayString=function(){return String(this.obj)};pexprs.Param.prototype.toDisplayString=function(){return"#"+this.index};pexprs.StringPrim.prototype.toDisplayString=function(){return'"'+this.obj+'"'};pexprs.Apply.prototype.toDisplayString=function(){return this.ruleName}},{"./pexprs":44}],42:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toExpected=function(ruleDict){return undefined};pexprs.anything.toExpected=function(ruleDict){return"any object"};pexprs.end.toExpected=function(ruleDict){return"end of input"};pexprs.Prim.prototype.toExpected=function(ruleDict){return common.toStringLiteral(this.obj)};pexprs.Not.prototype.toExpected=function(ruleDict){if(this.expr===pexprs.anything){return"nothing"}else{return"not "+this.expr.toExpected(ruleDict)}};pexprs.Apply.prototype.toExpected=function(ruleDict){var description=ruleDict[this.ruleName].description;if(description){return description}else{var article=/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a";return article+" "+this.ruleName}}},{"./common":26,"./pexprs":44}],43:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toString=common.abstract;pexprs.anything.toString=function(){return"_"};pexprs.end.toString=function(){return"end"};pexprs.Prim.prototype.toString=function(){return JSON.stringify(this.obj)};pexprs.Param.prototype.toString=function(){return"#"+this.index};pexprs.RegExpPrim.prototype.toString=function(){return this.obj.toString()};pexprs.Alt.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(function(term){return term.toString()}).join(" | ")+")"};pexprs.Seq.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(function(factor){return factor.toString()}).join(" ")+")"};pexprs.Iter.prototype.toString=function(){return this.expr+this.operator};pexprs.Not.prototype.toString=function(){return"~"+this.expr};pexprs.Lookahead.prototype.toString=function(){return"&"+this.expr};pexprs.Arr.prototype.toString=function(){return"["+this.expr.toString()+"]"};pexprs.Str.prototype.toString=function(){return"``"+this.expr.toString()+"''"};pexprs.Obj.prototype.toString=function(){var parts=["{"];var first=true;function emit(part){if(first){first=false}else{parts.push(", ")}parts.push(part)}this.properties.forEach(function(property){emit(JSON.stringify(property.name)+": "+property.pattern.toString())});if(this.isLenient){emit("...")}parts.push("}");return parts.join("")};pexprs.Apply.prototype.toString=function(){if(this.params.length>0){var ps=this.params.map(function(param){return param.toString()});return this.ruleName+"<"+ps.join(",")+">"}else{return this.ruleName}}},{"./common":26,"./pexprs":44}],44:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var errors=_dereq_("./errors");var inherits=_dereq_("inherits");function PExpr(){throw new Error("PExpr cannot be instantiated -- it's abstract")}PExpr.prototype.withDescription=function(description){this.description=description;return this};PExpr.prototype.withInterval=function(interval){this.interval=interval.trimmed();return this};PExpr.prototype.withFormals=function(formals){this.formals=formals;return this};var anything=Object.create(PExpr.prototype);var end=Object.create(PExpr.prototype);function Prim(obj){this.obj=obj}inherits(Prim,PExpr); -function StringPrim(obj){this.obj=obj}inherits(StringPrim,Prim);function RegExpPrim(obj){this.obj=obj}inherits(RegExpPrim,Prim);function Param(index){this.index=index}inherits(Param,PExpr);function Alt(terms){this.terms=terms}inherits(Alt,PExpr);function Extend(superGrammar,name,body){var origBody=superGrammar.ruleDict[name];this.terms=[body,origBody]}inherits(Extend,Alt);function Seq(factors){this.factors=factors}inherits(Seq,PExpr);function Iter(expr){this.expr=expr}inherits(Iter,PExpr);function Star(expr){this.expr=expr}inherits(Star,Iter);function Plus(expr){this.expr=expr}inherits(Plus,Iter);function Opt(expr){this.expr=expr}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 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 new errors.DuplicatePropertyNames(duplicates)}else{this.properties=properties;this.isLenient=isLenient}}inherits(Obj,PExpr);function Apply(ruleName,optParams){this.ruleName=ruleName;this.params=optParams||[]}inherits(Apply,PExpr);Apply.prototype.toMemoKey=function(){if(!this._memoKey){Object.defineProperty(this,"_memoKey",{value:this.toString()})}return this._memoKey};exports.makePrim=function(obj){if(typeof obj==="string"&&obj.length!==1){return new StringPrim(obj)}else if(obj instanceof RegExp){return new RegExpPrim(obj)}else{return new Prim(obj)}};exports.PExpr=PExpr;exports.anything=anything;exports.end=end;exports.Prim=Prim;exports.StringPrim=StringPrim;exports.RegExpPrim=RegExpPrim;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.Arr=Arr;exports.Str=Str;exports.Obj=Obj;exports.Apply=Apply;_dereq_("./pexprs-assertAllApplicationsAreValid");_dereq_("./pexprs-assertChoicesHaveUniformArity");_dereq_("./pexprs-assertIteratedExprsAreNotNullable");_dereq_("./pexprs-check");_dereq_("./pexprs-eval");_dereq_("./pexprs-maybeRecordFailure");_dereq_("./pexprs-getArity");_dereq_("./pexprs-outputRecipe");_dereq_("./pexprs-introduceParams");_dereq_("./pexprs-isNullable");_dereq_("./pexprs-substituteParams");_dereq_("./pexprs-toDisplayString");_dereq_("./pexprs-toExpected");_dereq_("./pexprs-toString")},{"./common":26,"./errors":27,"./pexprs-assertAllApplicationsAreValid":30,"./pexprs-assertChoicesHaveUniformArity":31,"./pexprs-assertIteratedExprsAreNotNullable":32,"./pexprs-check":33,"./pexprs-eval":34,"./pexprs-getArity":35,"./pexprs-introduceParams":36,"./pexprs-isNullable":37,"./pexprs-maybeRecordFailure":38,"./pexprs-outputRecipe":39,"./pexprs-substituteParams":40,"./pexprs-toDisplayString":41,"./pexprs-toExpected":42,"./pexprs-toString":43,inherits:12}],45:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./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=0){prevLine=str.slice(prevLineStartOffset,lineStartOffset).replace(/\r?\n$/,"")}var line=str.slice(lineStartOffset,lineEndOffset).replace(/\r$/,"");return{lineNum:lineNum,colNum:colNum,line:line,prevLine:prevLine,nextLine:nextLine}};exports.getLineAndColumnMessage=function(str,offset){var repeatStr=common.repeatStr;var lineAndCol=exports.getLineAndColumn(str,offset);var sb=new common.StringBuffer;sb.append("Line "+lineAndCol.lineNum+", col "+lineAndCol.colNum+":\n");var lineNumbers=padNumbersToEqualLength([lineAndCol.prevLine==null?0:lineAndCol.lineNum-1,lineAndCol.lineNum,lineAndCol.nextLine==null?0:lineAndCol.lineNum+1]);function appendLine(num,content,prefix){sb.append(prefix+lineNumbers[num]+" | "+content+"\n")}if(lineAndCol.prevLine!=null){appendLine(0,lineAndCol.prevLine," ")}appendLine(1,lineAndCol.line,"> ");var lineLen=lineAndCol.line.length;var indicationLine=repeatStr(" ",lineLen+1);var ranges=Array.prototype.slice.call(arguments,2);for(var i=0;i=0&&startIdx<=endIdx,"range start must be >= 0 and <= end");var lineStartOffset=offset-lineAndCol.colNum+1;startIdx=Math.max(0,startIdx-lineStartOffset);endIdx=Math.min(endIdx-lineStartOffset,lineLen);indicationLine=strcpy(indicationLine,repeatStr("~",endIdx-startIdx),startIdx)}var gutterWidth=2+lineNumbers[1].length+3;sb.append(repeatStr(" ",gutterWidth));indicationLine=strcpy(indicationLine,"^",lineAndCol.colNum-1);sb.append(indicationLine.replace(/ +$/,"")+"\n");if(lineAndCol.nextLine!=null){appendLine(2,lineAndCol.nextLine," ")}return sb.contents()}},{"./common":26}],46:[function(_dereq_,module,exports){exports.UnicodeCategories={ZWNJ:/\u200C/,ZWJ:/\u200D/,TAB:/\u0009/,VT:/\u000B/,FF:/\u000C/,SP:/\u0020/,NBSP:/\u00A0/,BOM:/\uFEFF/,LF:/\u000A/,CR:/\u000D/,LS:/\u2028/,PS:/\u2029/,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]|[\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A]|[\u00AA-\u00AA]|[\u00B5-\u00B5]|[\u00BA-\u00BA]|[\u00DF-\u00F6]|[\u00F8-\u00FF]|[\u0101-\u0101]|[\u0103-\u0103]|[\u0105-\u0105]|[\u0107-\u0107]|[\u0109-\u0109]|[\u010B-\u010B]|[\u010D-\u010D]|[\u010F-\u010F]|[\u0111-\u0111]|[\u0113-\u0113]|[\u0115-\u0115]|[\u0117-\u0117]|[\u0119-\u0119]|[\u011B-\u011B]|[\u011D-\u011D]|[\u011F-\u011F]|[\u0121-\u0121]|[\u0123-\u0123]|[\u0125-\u0125]|[\u0127-\u0127]|[\u0129-\u0129]|[\u012B-\u012B]|[\u012D-\u012D]|[\u012F-\u012F]|[\u0131-\u0131]|[\u0133-\u0133]|[\u0135-\u0135]|[\u0137-\u0138]|[\u013A-\u013A]|[\u013C-\u013C]|[\u013E-\u013E]|[\u0140-\u0140]|[\u0142-\u0142]|[\u0144-\u0144]|[\u0146-\u0146]|[\u0148-\u0149]|[\u014B-\u014B]|[\u014D-\u014D]|[\u014F-\u014F]|[\u0151-\u0151]|[\u0153-\u0153]|[\u0155-\u0155]|[\u0157-\u0157]|[\u0159-\u0159]|[\u015B-\u015B]|[\u015D-\u015D]|[\u015F-\u015F]|[\u0161-\u0161]|[\u0163-\u0163]|[\u0165-\u0165]|[\u0167-\u0167]|[\u0169-\u0169]|[\u016B-\u016B]|[\u016D-\u016D]|[\u016F-\u016F]|[\u0171-\u0171]|[\u0173-\u0173]|[\u0175-\u0175]|[\u0177-\u0177]|[\u017A-\u017A]|[\u017C-\u017C]|[\u017E-\u0180]|[\u0183-\u0183]|[\u0185-\u0185]|[\u0188-\u0188]|[\u018C-\u018D]|[\u0192-\u0192]|[\u0195-\u0195]|[\u0199-\u019B]|[\u019E-\u019E]|[\u01A1-\u01A1]|[\u01A3-\u01A3]|[\u01A5-\u01A5]|[\u01A8-\u01A8]|[\u01AB-\u01AB]|[\u01AD-\u01AD]|[\u01B0-\u01B0]|[\u01B4-\u01B4]|[\u01B6-\u01B6]|[\u01B9-\u01BA]|[\u01BD-\u01BD]|[\u01C6-\u01C6]|[\u01C9-\u01C9]|[\u01CC-\u01CC]|[\u01CE-\u01CE]|[\u01D0-\u01D0]|[\u01D2-\u01D2]|[\u01D4-\u01D4]|[\u01D6-\u01D6]|[\u01D8-\u01D8]|[\u01DA-\u01DA]|[\u01DC-\u01DD]|[\u01DF-\u01DF]|[\u01E1-\u01E1]|[\u01E3-\u01E3]|[\u01E5-\u01E5]|[\u01E7-\u01E7]|[\u01E9-\u01E9]|[\u01EB-\u01EB]|[\u01ED-\u01ED]|[\u01EF-\u01F0]|[\u01F3-\u01F3]|[\u01F5-\u01F5]|[\u01FB-\u01FB]|[\u01FD-\u01FD]|[\u01FF-\u01FF]|[\u0201-\u0201]|[\u0203-\u0203]|[\u0205-\u0205]|[\u0207-\u0207]|[\u0209-\u0209]|[\u020B-\u020B]|[\u020D-\u020D]|[\u020F-\u020F]|[\u0211-\u0211]|[\u0213-\u0213]|[\u0215-\u0215]|[\u0217-\u0217]|[\u0250-\u02A8]|[\u0390-\u0390]|[\u03AC-\u03CE]|[\u03D0-\u03D1]|[\u03D5-\u03D6]|[\u03E3-\u03E3]|[\u03E5-\u03E5]|[\u03E7-\u03E7]|[\u03E9-\u03E9]|[\u03EB-\u03EB]|[\u03ED-\u03ED]|[\u03EF-\u03F2]|[\u0430-\u044F]|[\u0451-\u045C]|[\u045E-\u045F]|[\u0461-\u0461]|[\u0463-\u0463]|[\u0465-\u0465]|[\u0467-\u0467]|[\u0469-\u0469]|[\u046B-\u046B]|[\u046D-\u046D]|[\u046F-\u046F]|[\u0471-\u0471]|[\u0473-\u0473]|[\u0475-\u0475]|[\u0477-\u0477]|[\u0479-\u0479]|[\u047B-\u047B]|[\u047D-\u047D]|[\u047F-\u047F]|[\u0481-\u0481]|[\u0491-\u0491]|[\u0493-\u0493]|[\u0495-\u0495]|[\u0497-\u0497]|[\u0499-\u0499]|[\u049B-\u049B]|[\u049D-\u049D]|[\u049F-\u049F]|[\u04A1-\u04A1]|[\u04A3-\u04A3]|[\u04A5-\u04A5]|[\u04A7-\u04A7]|[\u04A9-\u04A9]|[\u04AB-\u04AB]|[\u04AD-\u04AD]|[\u04AF-\u04AF]|[\u04B1-\u04B1]|[\u04B3-\u04B3]|[\u04B5-\u04B5]|[\u04B7-\u04B7]|[\u04B9-\u04B9]|[\u04BB-\u04BB]|[\u04BD-\u04BD]|[\u04BF-\u04BF]|[\u04C2-\u04C2]|[\u04C4-\u04C4]|[\u04C8-\u04C8]|[\u04CC-\u04CC]|[\u04D1-\u04D1]|[\u04D3-\u04D3]|[\u04D5-\u04D5]|[\u04D7-\u04D7]|[\u04D9-\u04D9]|[\u04DB-\u04DB]|[\u04DD-\u04DD]|[\u04DF-\u04DF]|[\u04E1-\u04E1]|[\u04E3-\u04E3]|[\u04E5-\u04E5]|[\u04E7-\u04E7]|[\u04E9-\u04E9]|[\u04EB-\u04EB]|[\u04EF-\u04EF]|[\u04F1-\u04F1]|[\u04F3-\u04F3]|[\u04F5-\u04F5]|[\u04F9-\u04F9]|[\u0561-\u0587]|[\u10D0-\u10F6]|[\u1E01-\u1E01]|[\u1E03-\u1E03]|[\u1E05-\u1E05]|[\u1E07-\u1E07]|[\u1E09-\u1E09]|[\u1E0B-\u1E0B]|[\u1E0D-\u1E0D]|[\u1E0F-\u1E0F]|[\u1E11-\u1E11]|[\u1E13-\u1E13]|[\u1E15-\u1E15]|[\u1E17-\u1E17]|[\u1E19-\u1E19]|[\u1E1B-\u1E1B]|[\u1E1D-\u1E1D]|[\u1E1F-\u1E1F]|[\u1E21-\u1E21]|[\u1E23-\u1E23]|[\u1E25-\u1E25]|[\u1E27-\u1E27]|[\u1E29-\u1E29]|[\u1E2B-\u1E2B]|[\u1E2D-\u1E2D]|[\u1E2F-\u1E2F]|[\u1E31-\u1E31]|[\u1E33-\u1E33]|[\u1E35-\u1E35]|[\u1E37-\u1E37]|[\u1E39-\u1E39]|[\u1E3B-\u1E3B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309D-\u309E]|[\u30FC-\u30FE]|[\uFF70-\uFF70]|[\uFF9E-\uFF9F]|[\u01AA-\u01AA]|[\u01BB-\u01BB]|[\u01BE-\u01C3]|[\u03F3-\u03F3]|[\u04C0-\u04C0]|[\u05D0-\u05EA]|[\u05F0-\u05F2]|[\u0621-\u063A]|[\u0641-\u064A]|[\u0671-\u06B7]|[\u06BA-\u06BE]|[\u06C0-\u06CE]|[\u06D0-\u06D3]|[\u06D5-\u06D5]|[\u0905-\u0939]|[\u093D-\u093D]|[\u0950-\u0950]|[\u0958-\u0961]|[\u0985-\u098C]|[\u098F-\u0990]|[\u0993-\u09A8]|[\u09AA-\u09B0]|[\u09B2-\u09B2]|[\u09B6-\u09B9]|[\u09DC-\u09DD]|[\u09DF-\u09E1]|[\u09F0-\u09F1]|[\u0A05-\u0A0A]|[\u0A0F-\u0A10]|[\u0A13-\u0A28]|[\u0A2A-\u0A30]|[\u0A32-\u0A33]|[\u0A35-\u0A36]|[\u0A38-\u0A39]|[\u0A59-\u0A5C]|[\u0A5E-\u0A5E]|[\u0A72-\u0A74]|[\u0A85-\u0A8B]|[\u0A8D-\u0A8D]|[\u0A8F-\u0A91]|[\u0A93-\u0AA8]|[\u0AAA-\u0AB0]|[\u0AB2-\u0AB3]|[\u0AB5-\u0AB9]|[\u0ABD-\u0ABD]|[\u0AD0-\u0AD0]|[\u0AE0-\u0AE0]|[\u0B05-\u0B0C]|[\u0B0F-\u0B10]|[\u0B13-\u0B28]|[\u0B2A-\u0B30]|[\u0B32-\u0B33]|[\u0B36-\u0B39]|[\u0B3D-\u0B3D]|[\u0B5C-\u0B5D]|[\u0B5F-\u0B61]|[\u0B85-\u0B8A]|[\u0B8E-\u0B90]|[\u0B92-\u0B95]|[\u0B99-\u0B9A]|[\u0B9C-\u0B9C]|[\u0B9E-\u0B9F]|[\u0BA3-\u0BA4]|[\u0BA8-\u0BAA]|[\u0BAE-\u0BB5]|[\u0BB7-\u0BB9]|[\u0C05-\u0C0C]|[\u0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[\uFFCA-\uFFCF]|[\uFFD2-\uFFD7]|[\uFFDA-\uFFDC]/,Lu:/[\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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0109-\u0109]|[\u010B-\u010B]|[\u010D-\u010D]|[\u010F-\u010F]|[\u0111-\u0111]|[\u0113-\u0113]|[\u0115-\u0115]|[\u0117-\u0117]|[\u0119-\u0119]|[\u011B-\u011B]|[\u011D-\u011D]|[\u011F-\u011F]|[\u0121-\u0121]|[\u0123-\u0123]|[\u0125-\u0125]|[\u0127-\u0127]|[\u0129-\u0129]|[\u012B-\u012B]|[\u012D-\u012D]|[\u012F-\u012F]|[\u0131-\u0131]|[\u0133-\u0133]|[\u0135-\u0135]|[\u0137-\u0138]|[\u013A-\u013A]|[\u013C-\u013C]|[\u013E-\u013E]|[\u0140-\u0140]|[\u0142-\u0142]|[\u0144-\u0144]|[\u0146-\u0146]|[\u0148-\u0149]|[\u014B-\u014B]|[\u014D-\u014D]|[\u014F-\u014F]|[\u0151-\u0151]|[\u0153-\u0153]|[\u0155-\u0155]|[\u0157-\u0157]|[\u0159-\u0159]|[\u015B-\u015B]|[\u015D-\u015D]|[\u015F-\u015F]|[\u0161-\u0161]|[\u0163-\u0163]|[\u0165-\u0165]|[\u0167-\u0167]|[\u0169-\u0169]|[\u016B-\u016B]|[\u016D-\u016D]|[\u016F-\u016F]|[\u0171-\u0171]|[\u0173-\u0173]|[\u0175-\u0175]|[\u0177-\u0177]|[\u017A-\u017A]|[\u017C-\u017C]|[\u017E-\u0180]|[\u0183-\u0183]|[\u0185-\u0185]|[\u0188-\u0188]|[\u018C-\u018D]|[\u0192-\u0192]|[\u0195-\u0195]|[\u0199-\u019B]|[\u019E-\u019E]|[\u01A1-\u01A1]|[\u01A3-\u01A3]|[\u01A5-\u01A5]|[\u01A8-\u01A8]|[\u01AB-\u01AB]|[\u01AD-\u01AD]|[\u01B0-\u01B0]|[\u01B4-\u01B4]|[\u01B6-\u01B6]|[\u01B9-\u01BA]|[\u01BD-\u01BD]|[\u01C6-\u01C6]|[\u01C9-\u01C9]|[\u01CC-\u01CC]|[\u01CE-\u01CE]|[\u01D0-\u01D0]|[\u01D2-\u01D2]|[\u01D4-\u01D4]|[\u01D6-\u01D6]|[\u01D8-\u01D8]|[\u01DA-\u01DA]|[\u01DC-\u01DD]|[\u01DF-\u01DF]|[\u01E1-\u01E1]|[\u01E3-\u01E3]|[\u01E5-\u01E5]|[\u01E7-\u01E7]|[\u01E9-\u01E9]|[\u01EB-\u01EB]|[\u01ED-\u01ED]|[\u01EF-\u01F0]|[\u01F3-\u01F3]|[\u01F5-\u01F5]|[\u01FB-\u01FB]|[\u01FD-\u01FD]|[\u01FF-\u01FF]|[\u0201-\u0201]|[\u0203-\u0203]|[\u0205-\u0205]|[\u0207-\u0207]|[\u0209-\u0209]|[\u020B-\u020B]|[\u020D-\u020D]|[\u020F-\u020F]|[\u0211-\u0211]|[\u0213-\u0213]|[\u0215-\u0215]|[\u0217-\u0217]|[\u0250-\u02A8]|[\u0390-\u0390]|[\u03AC-\u03CE]|[\u03D0-\u03D1]|[\u03D5-\u03D6]|[\u03E3-\u03E3]|[\u03E5-\u03E5]|[\u03E7-\u03E7]|[\u03E9-\u03E9]|[\u03EB-\u03EB]|[\u03ED-\u03ED]|[\u03EF-\u03F2]|[\u0430-\u044F]|[\u0451-\u045C]|[\u045E-\u045F]|[\u0461-\u0461]|[\u0463-\u0463]|[\u0465-\u0465]|[\u0467-\u0467]|[\u0469-\u0469]|[\u046B-\u046B]|[\u046D-\u046D]|[\u046F-\u046F]|[\u0471-\u0471]|[\u0473-\u0473]|[\u0475-\u0475]|[\u0477-\u0477]|[\u0479-\u0479]|[\u047B-\u047B]|[\u047D-\u047D]|[\u047F-\u047F]|[\u0481-\u0481]|[\u0491-\u0491]|[\u0493-\u0493]|[\u0495-\u0495]|[\u0497-\u0497]|[\u0499-\u0499]|[\u049B-\u049B]|[\u049D-\u049D]|[\u049F-\u049F]|[\u04A1-\u04A1]|[\u04A3-\u04A3]|[\u04A5-\u04A5]|[\u04A7-\u04A7]|[\u04A9-\u04A9]|[\u04AB-\u04AB]|[\u04AD-\u04AD]|[\u04AF-\u04AF]|[\u04B1-\u04B1]|[\u04B3-\u04B3]|[\u04B5-\u04B5]|[\u04B7-\u04B7]|[\u04B9-\u04B9]|[\u04BB-\u04BB]|[\u04BD-\u04BD]|[\u04BF-\u04BF]|[\u04C2-\u04C2]|[\u04C4-\u04C4]|[\u04C8-\u04C8]|[\u04CC-\u04CC]|[\u04D1-\u04D1]|[\u04D3-\u04D3]|[\u04D5-\u04D5]|[\u04D7-\u04D7]|[\u04D9-\u04D9]|[\u04DB-\u04DB]|[\u04DD-\u04DD]|[\u04DF-\u04DF]|[\u04E1-\u04E1]|[\u04E3-\u04E3]|[\u04E5-\u04E5]|[\u04E7-\u04E7]|[\u04E9-\u04E9]|[\u04EB-\u04EB]|[\u04EF-\u04EF]|[\u04F1-\u04F1]|[\u04F3-\u04F3]|[\u04F5-\u04F5]|[\u04F9-\u04F9]|[\u0561-\u0587]|[\u10D0-\u10F6]|[\u1E01-\u1E01]|[\u1E03-\u1E03]|[\u1E05-\u1E05]|[\u1E07-\u1E07]|[\u1E09-\u1E09]|[\u1E0B-\u1E0B]|[\u1E0D-\u1E0D]|[\u1E0F-\u1E0F]|[\u1E11-\u1E11]|[\u1E13-\u1E13]|[\u1E15-\u1E15]|[\u1E17-\u1E17]|[\u1E19-\u1E19]|[\u1E1B-\u1E1B]|[\u1E1D-\u1E1D]|[\u1E1F-\u1E1F]|[\u1E21-\u1E21]|[\u1E23-\u1E23]|[\u1E25-\u1E25]|[\u1E27-\u1E27]|[\u1E29-\u1E29]|[\u1E2B-\u1E2B]|[\u1E2D-\u1E2D]|[\u1E2F-\u1E2F]|[\u1E31-\u1E31]|[\u1E33-\u1E33]|[\u1E35-\u1E35]|[\u1E37-\u1E37]|[\u1E39-\u1E39]|[\u1E3B-\u1E3B]|[\u1E3D-\u1E3D]|[\u1E3F-\u1E3F]|[\u1E41-\u1E41]|[\u1E43-\u1E43]|[\u1E45-\u1E45]|[\u1E47-\u1E47]|[\u1E49-\u1E49]|[\u1E4B-\u1E4B]|[\u1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\u1EDD-\u1EDD]|[\u1EDF-\u1EDF]|[\u1EE1-\u1EE1]|[\u1EE3-\u1EE3]|[\u1EE5-\u1EE5]|[\u1EE7-\u1EE7]|[\u1EE9-\u1EE9]|[\u1EEB-\u1EEB]|[\u1EED-\u1EED]|[\u1EEF-\u1EEF]|[\u1EF1-\u1EF1]|[\u1EF3-\u1EF3]|[\u1EF5-\u1EF5]|[\u1EF7-\u1EF7]|[\u1EF9-\u1EF9]|[\u1F00-\u1F07]|[\u1F10-\u1F15]|[\u1F20-\u1F27]|[\u1F30-\u1F37]|[\u1F40-\u1F45]|[\u1F50-\u1F57]|[\u1F60-\u1F67]|[\u1F70-\u1F7D]|[\u1F80-\u1F87]|[\u1F90-\u1F97]|[\u1FA0-\u1FA7]|[\u1FB0-\u1FB4]|[\u1FB6-\u1FB7]|[\u1FBE-\u1FBE]|[\u1FC2-\u1FC4]|[\u1FC6-\u1FC7]|[\u1FD0-\u1FD3]|[\u1FD6-\u1FD7]|[\u1FE0-\u1FE7]|[\u1FF2-\u1FF4]|[\u1FF6-\u1FF7]|[\u207F-\u207F]|[\u210A-\u210A]|[\u210E-\u210F]|[\u2113-\u2113]|[\u2118-\u2118]|[\u212E-\u212F]|[\u2134-\u2134]|[\uFB00-\uFB06]|[\uFB13-\uFB17]|[\uFF41-\uFF5A]/,Lt:/[\u01C5-\u01C5]|[\u01C8-\u01C8]|[\u01CB-\u01CB]|[\u01F2-\u01F2]/,Lm:/[\u02B0-\u02B8]|[\u02BB-\u02C1]|[\u02D0-\u02D1]|[\u02E0-\u02E4]|[\u037A-\u037A]|[\u0559-\u0559]|[\u0640-\u0640]|[\u06E5-\u06E6]|[\u0E46-\u0E46]|[\u0EC6-\u0EC6]|[\u3005-\u3005]|[\u3031-\u3035]|[\u309D-\u309E]|[\u30FC-\u30FE]|[\uFF70-\uFF70]|[\uFF9E-\uFF9F]/, -Lo:/[\u01AA-\u01AA]|[\u01BB-\u01BB]|[\u01BE-\u01C3]|[\u03F3-\u03F3]|[\u04C0-\u04C0]|[\u05D0-\u05EA]|[\u05F0-\u05F2]|[\u0621-\u063A]|[\u0641-\u064A]|[\u0671-\u06B7]|[\u06BA-\u06BE]|[\u06C0-\u06CE]|[\u06D0-\u06D3]|[\u06D5-\u06D5]|[\u0905-\u0939]|[\u093D-\u093D]|[\u0950-\u0950]|[\u0958-\u0961]|[\u0985-\u098C]|[\u098F-\u0990]|[\u0993-\u09A8]|[\u09AA-\u09B0]|[\u09B2-\u09B2]|[\u09B6-\u09B9]|[\u09DC-\u09DD]|[\u09DF-\u09E1]|[\u09F0-\u09F1]|[\u0A05-\u0A0A]|[\u0A0F-\u0A10]|[\u0A13-\u0A28]|[\u0A2A-\u0A30]|[\u0A32-\u0A33]|[\u0A35-\u0A36]|[\u0A38-\u0A39]|[\u0A59-\u0A5C]|[\u0A5E-\u0A5E]|[\u0A72-\u0A74]|[\u0A85-\u0A8B]|[\u0A8D-\u0A8D]|[\u0A8F-\u0A91]|[\u0A93-\u0AA8]|[\u0AAA-\u0AB0]|[\u0AB2-\u0AB3]|[\u0AB5-\u0AB9]|[\u0ABD-\u0ABD]|[\u0AD0-\u0AD0]|[\u0AE0-\u0AE0]|[\u0B05-\u0B0C]|[\u0B0F-\u0B10]|[\u0B13-\u0B28]|[\u0B2A-\u0B30]|[\u0B32-\u0B33]|[\u0B36-\u0B39]|[\u0B3D-\u0B3D]|[\u0B5C-\u0B5D]|[\u0B5F-\u0B61]|[\u0B85-\u0B8A]|[\u0B8E-\u0B90]|[\u0B92-\u0B95]|[\u0B99-\u0B9A]|[\u0B9C-\u0B9C]|[\u0B9E-\u0B9F]|[\u0BA3-\u0BA4]|[\u0BA8-\u0BAA]|[\u0BAE-\u0BB5]|[\u0BB7-\u0BB9]|[\u0C05-\u0C0C]|[\u0C0E-\u0C10]|[\u0C12-\u0C28]|[\u0C2A-\u0C33]|[\u0C35-\u0C39]|[\u0C60-\u0C61]|[\u0C85-\u0C8C]|[\u0C8E-\u0C90]|[\u0C92-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345]|[\u0360-\u0361]|[\u0483-\u0486]|[\u0591-\u05A1]|[\u05A3-\u05B9]|[\u05BB-\u05BD]|[\u05BF-\u05BF]|[\u05C1-\u05C2]|[\u05C4-\u05C4]|[\u064B-\u0652]|[\u0670-\u0670]|[\u06D6-\u06DC]|[\u06DF-\u06E4]|[\u06E7-\u06E8]|[\u06EA-\u06ED]|[\u0901-\u0902]|[\u093C-\u093C]|[\u0941-\u0948]|[\u094D-\u094D]|[\u0951-\u0954]|[\u0962-\u0963]|[\u0981-\u0981]|[\u09BC-\u09BC]|[\u09C1-\u09C4]|[\u09CD-\u09CD]|[\u09E2-\u09E3]|[\u0A02-\u0A02]|[\u0A3C-\u0A3C]|[\u0A41-\u0A42]|[\u0A47-\u0A48]|[\u0A4B-\u0A4D]|[\u0A70-\u0A71]|[\u0A81-\u0A82]|[\u0ABC-\u0ABC]|[\u0AC1-\u0AC5]|[\u0AC7-\u0AC8]|[\u0ACD-\u0ACD]|[\u0B01-\u0B01]|[\u0B3C-\u0B3C]|[\u0B3F-\u0B3F]|[\u0B41-\u0B43]|[\u0B4D-\u0B4D]|[\u0B56-\u0B56]|[\u0B82-\u0B82]|[\u0BC0-\u0BC0]|[\u0BCD-\u0BCD]|[\u0C3E-\u0C40]|[\u0C46-\u0C48]|[\u0C4A-\u0C4D]|[\u0C55-\u0C56]|[\u0CBF-\u0CBF]|[\u0CC6-\u0CC6]|[\u0CCC-\u0CCD]|[\u0D41-\u0D43]|[\u0D4D-\u0D4D]|[\u0E31-\u0E31]|[\u0E34-\u0E3A]|[\u0E47-\u0E4E]|[\u0EB1-\u0EB1]|[\u0EB4-\u0EB9]|[\u0EBB-\u0EBC]|[\u0EC8-\u0ECD]|[\u0F18-\u0F19]|[\u0F35-\u0F35]|[\u0F37-\u0F37]|[\u0F39-\u0F39]|[\u0F71-\u0F7E]|[\u0F80-\u0F84]|[\u0F86-\u0F87]|[\u0F90-\u0F95]|[\u0F97-\u0F97]|[\u0F99-\u0FAD]|[\u0F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uFF3F]|[\uFF65-\uFF65]/,Zs:/[\u2000-\u200B]|[\u3000-\u3000]/}},{}]},{},[28])(28)}); +!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ohm=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o"))).define("Params",[],this.seq(this.prim("<"),this.app("ListOf",[this.app("Seq"),this.prim(",")]),this.prim(">"))).define("Alt",[],this.seq(this.app("Term"),this.star(this.seq(this.prim("|"),this.app("Term"))))).define("Term_inline",[],this.seq(this.app("Seq"),this.app("caseName"))).define("Term",[],this.alt(this.app("Term_inline"),this.app("Seq"))).define("Seq",[],this.star(this.app("Iter"))).define("Iter_star",[],this.seq(this.app("Pred"),this.prim("*"))).define("Iter_plus",[],this.seq(this.app("Pred"),this.prim("+"))).define("Iter_opt",[],this.seq(this.app("Pred"),this.prim("?"))).define("Iter",[],this.alt(this.app("Iter_star"),this.app("Iter_plus"),this.app("Iter_opt"),this.app("Pred"))).define("Pred_not",[],this.seq(this.prim("~"),this.app("Base"))).define("Pred_lookahead",[],this.seq(this.prim("&"),this.app("Base"))).define("Pred",[],this.alt(this.app("Pred_not"),this.app("Pred_lookahead"),this.app("Base"))).define("Base_application",[],this.seq(this.app("ident"),this.opt(this.app("Params")),this.not(this.alt(this.seq(this.opt(this.app("ruleDescr")),this.prim("=")),this.prim(":="),this.prim("+="))))).define("Base_prim",[],this.alt(this.app("keyword"),this.app("string"),this.app("regExp"),this.app("number"))).define("Base_paren",[],this.seq(this.prim("("),this.app("Alt"),this.prim(")"))).define("Base_arr",[],this.seq(this.prim("["),this.app("Alt"),this.prim("]"))).define("Base_str",[],this.seq(this.prim("``"),this.app("Alt"),this.prim("''"))).define("Base_obj",[],this.seq(this.prim("{"),this.opt(this.prim("...")),this.prim("}"))).define("Base_objWithProps",[],this.seq(this.prim("{"),this.app("Props"),this.opt(this.seq(this.prim(","),this.prim("..."))),this.prim("}"))).define("Base",[],this.alt(this.app("Base_application"),this.app("Base_prim"),this.app("Base_paren"),this.app("Base_arr"),this.app("Base_str"),this.app("Base_obj"),this.app("Base_objWithProps"))).define("Props",[],this.seq(this.app("Prop"),this.star(this.seq(this.prim(","),this.app("Prop"))))).define("Prop",[],this.seq(this.alt(this.app("name"),this.app("string")),this.prim(":"),this.app("Alt"))).define("ruleDescr",[],this.seq(this.prim("("),this.app("ruleDescrText"),this.prim(")")),"a rule description").define("ruleDescrText",[],this.star(this.seq(this.not(this.prim(")")),this.app("_")))).define("caseName",[],this.seq(this.prim("--"),this.star(this.seq(this.not(this.prim("\n")),this.app("space"))),this.app("name"),this.star(this.seq(this.not(this.prim("\n")),this.app("space"))),this.alt(this.prim("\n"),this.la(this.prim("}"))))).define("name",[],this.seq(this.app("nameFirst"),this.star(this.app("nameRest"))),"a name").define("nameFirst",[],this.alt(this.prim("_"),this.app("letter"))).define("nameRest",[],this.alt(this.prim("_"),this.app("alnum"))).define("ident",[],this.seq(this.not(this.app("keyword")),this.app("name")),"an identifier").define("keyword_null",[],this.seq(this.prim("null"),this.not(this.app("nameRest")))).define("keyword_true",[],this.seq(this.prim("true"),this.not(this.app("nameRest")))).define("keyword_false",[],this.seq(this.prim("false"),this.not(this.app("nameRest")))).define("keyword",[],this.alt(this.app("keyword_null"),this.app("keyword_true"),this.app("keyword_false"))).define("string",[],this.seq(this.prim('"'),this.star(this.app("strChar")),this.prim('"')),"a string literal").define("strChar",[],this.alt(this.app("escapeChar"),this.seq(this.not(this.prim("\\")),this.not(this.prim('"')),this.not(this.prim("\n")),this.app("_")))).define("escapeChar_backslash",[],this.prim("\\\\")).define("escapeChar_doubleQuote",[],this.prim('\\"')).define("escapeChar_singleQuote",[],this.prim("\\'")).define("escapeChar_backspace",[],this.prim("\\b")).define("escapeChar_lineFeed",[],this.prim("\\n")).define("escapeChar_carriageReturn",[],this.prim("\\r")).define("escapeChar_tab",[],this.prim("\\t")).define("escapeChar_unicodeEscape",[],this.seq(this.prim("\\u"),this.app("hexDigit"),this.app("hexDigit"),this.app("hexDigit"),this.app("hexDigit"))).define("escapeChar_hexEscape",[],this.seq(this.prim("\\x"),this.app("hexDigit"),this.app("hexDigit"))).define("escapeChar_unrecognized",[],this.seq(this.prim("\\"),this.not(this.app("controlChar")),this.not(this.prim(" ")),this.app("_"))).define("escapeChar",[],this.alt(this.app("escapeChar_backslash"),this.app("escapeChar_doubleQuote"),this.app("escapeChar_singleQuote"),this.app("escapeChar_backspace"),this.app("escapeChar_lineFeed"),this.app("escapeChar_carriageReturn"),this.app("escapeChar_tab"),this.app("escapeChar_unicodeEscape"),this.app("escapeChar_hexEscape"),this.app("escapeChar_unrecognized"))).define("controlChar",[],this.prim(/[\000-\037]/)).define("regExp",[],this.seq(this.prim("/"),this.app("reCharClass"),this.prim("/")),"a regular expression").define("reCharClass_unicode",[],this.seq(this.prim("\\p{"),this.plus(this.prim(/[A-Za-z]/)),this.prim("}"))).define("reCharClass_ordinary",[],this.seq(this.prim("["),this.star(this.alt(this.prim("\\]"),this.seq(this.not(this.prim("]")),this.app("_")))),this.prim("]"))).define("reCharClass",[],this.alt(this.app("reCharClass_unicode"),this.app("reCharClass_ordinary"))).define("number",[],this.seq(this.opt(this.prim("-")),this.plus(this.app("digit"))),"a number").define("space_singleLine",[],this.seq(this.prim("//"),this.star(this.seq(this.not(this.prim("\n")),this.app("_"))),this.prim("\n"))).define("space_multiLine",[],this.seq(this.prim("/*"),this.star(this.seq(this.not(this.prim("*/")),this.app("_"))),this.prim("*/"))).extend("space",[],this.alt(this.alt(this.app("space_singleLine"),this.app("space_multiLine")),this.prim(/[\s]/)),"a space").build()})},{"..":28}],3:[function(_dereq_,module,exports){var base64=_dereq_("base64-js");var ieee754=_dereq_("ieee754");exports.Buffer=Buffer;exports.SlowBuffer=Buffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;Buffer._useTypedArrays=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return 42===arr.foo()&&typeof arr.subarray==="function"}catch(e){return false}}();function Buffer(subject,encoding,noZero){if(!(this instanceof Buffer))return new Buffer(subject,encoding,noZero);var type=typeof subject;if(encoding==="base64"&&type==="string"){subject=stringtrim(subject);while(subject.length%4!==0){subject=subject+"="}}var length;if(type==="number")length=coerce(subject);else if(type==="string")length=Buffer.byteLength(subject,encoding);else if(type==="object")length=coerce(subject.length);else throw new Error("First argument needs to be a number, array or string.");var buf;if(Buffer._useTypedArrays){buf=Buffer._augment(new Uint8Array(length))}else{buf=this;buf.length=length;buf._isBuffer=true}var i;if(Buffer._useTypedArrays&&typeof subject.byteLength==="number"){buf._set(subject)}else if(isArrayish(subject)){for(i=0;iremaining){length=remaining}}var strLen=string.length;assert(strLen%2===0,"Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=_hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=_utf8Write(this,string,offset,length);break;case"ascii":ret=_asciiWrite(this,string,offset,length);break;case"binary":ret=_binaryWrite(this,string,offset,length);break;case"base64":ret=_base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=_utf16leWrite(this,string,offset,length);break;default:throw new Error("Unknown encoding")}return ret};Buffer.prototype.toString=function(encoding,start,end){var self=this;encoding=String(encoding||"utf8").toLowerCase();start=Number(start)||0;end=end!==undefined?Number(end):end=self.length;if(end===start)return"";var ret;switch(encoding){case"hex":ret=_hexSlice(self,start,end);break;case"utf8":case"utf-8":ret=_utf8Slice(self,start,end);break;case"ascii":ret=_asciiSlice(self,start,end);break;case"binary":ret=_binarySlice(self,start,end);break;case"base64":ret=_base64Slice(self,start,end);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=_utf16leSlice(self,start,end);break;default:throw new Error("Unknown encoding")}return ret};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(!start)start=0;if(!end&&end!==0)end=this.length;if(!target_start)target_start=0;if(end===start)return;if(target.length===0||source.length===0)return;assert(end>=start,"sourceEnd < sourceStart");assert(target_start>=0&&target_start=0&&start=0&&end<=source.length,"sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_startlen)end=len;var out="";for(var i=start;i=this.length)return;return this[offset]};function _readUInt16(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;var val;if(littleEndian){val=buf[offset];if(offset+1=len)return;var val;if(littleEndian){if(offset+2>>0)}else{if(offset+1>>0)}return val}Buffer.prototype.readUInt32LE=function(offset,noAssert){return _readUInt32(this,offset,true,noAssert)};Buffer.prototype.readUInt32BE=function(offset,noAssert){return _readUInt32(this,offset,false,noAssert)};Buffer.prototype.readInt8=function(offset,noAssert){if(!noAssert){assert(offset!==undefined&&offset!==null,"missing offset");assert(offset=this.length)return;var neg=this[offset]&128;if(neg)return(255-this[offset]+1)*-1;else return this[offset]};function _readInt16(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;var val=_readUInt16(buf,offset,littleEndian,true);var neg=val&32768;if(neg)return(65535-val+1)*-1;else return val}Buffer.prototype.readInt16LE=function(offset,noAssert){return _readInt16(this,offset,true,noAssert)};Buffer.prototype.readInt16BE=function(offset,noAssert){return _readInt16(this,offset,false,noAssert)};function _readInt32(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;var val=_readUInt32(buf,offset,littleEndian,true);var neg=val&2147483648;if(neg)return(4294967295-val+1)*-1;else return val}Buffer.prototype.readInt32LE=function(offset,noAssert){return _readInt32(this,offset,true,noAssert)};Buffer.prototype.readInt32BE=function(offset,noAssert){return _readInt32(this,offset,false,noAssert)};function _readFloat(buf,offset,littleEndian,noAssert){if(!noAssert){assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset+3=this.length)return;this[offset]=value};function _writeUInt16(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;for(var i=0,j=Math.min(len-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){_writeUInt16(this,value,offset,true,noAssert)};Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){_writeUInt16(this,value,offset,false,noAssert)};function _writeUInt32(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;for(var i=0,j=Math.min(len-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){_writeUInt32(this,value,offset,true,noAssert)};Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){_writeUInt32(this,value,offset,false,noAssert)};Buffer.prototype.writeInt8=function(value,offset,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset=this.length)return;if(value>=0)this.writeUInt8(value,offset,noAssert);else this.writeUInt8(255+value+1,offset,noAssert)};function _writeInt16(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+1=len)return;if(value>=0)_writeUInt16(buf,value,offset,littleEndian,noAssert);else _writeUInt16(buf,65535+value+1,offset,littleEndian,noAssert)}Buffer.prototype.writeInt16LE=function(value,offset,noAssert){_writeInt16(this,value,offset,true,noAssert)};Buffer.prototype.writeInt16BE=function(value,offset,noAssert){_writeInt16(this,value,offset,false,noAssert)};function _writeInt32(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;if(value>=0)_writeUInt32(buf,value,offset,littleEndian,noAssert);else _writeUInt32(buf,4294967295+value+1,offset,littleEndian,noAssert)}Buffer.prototype.writeInt32LE=function(value,offset,noAssert){_writeInt32(this,value,offset,true,noAssert)};Buffer.prototype.writeInt32BE=function(value,offset,noAssert){_writeInt32(this,value,offset,false,noAssert)};function _writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+3=len)return;ieee754.write(buf,value,offset,littleEndian,23,4)}Buffer.prototype.writeFloatLE=function(value,offset,noAssert){_writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function(value,offset,noAssert){_writeFloat(this,value,offset,false,noAssert)};function _writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){assert(value!==undefined&&value!==null,"missing value");assert(typeof littleEndian==="boolean","missing or invalid endian");assert(offset!==undefined&&offset!==null,"missing offset");assert(offset+7=len)return;ieee754.write(buf,value,offset,littleEndian,52,8)}Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){_writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){_writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.fill=function(value,start,end){if(!value)value=0;if(!start)start=0;if(!end)end=this.length;if(typeof value==="string"){value=value.charCodeAt(0)}assert(typeof value==="number"&&!isNaN(value),"value is not a number");assert(end>=start,"end < start");if(end===start)return;if(this.length===0)return;assert(start>=0&&start=0&&end<=this.length,"end out of bounds");for(var i=start;i"};Buffer.prototype.toArrayBuffer=function(){if(typeof Uint8Array!=="undefined"){if(Buffer._useTypedArrays){return new Buffer(this).buffer}else{var buf=new Uint8Array(this.length);for(var i=0,len=buf.length;i=len)return len;if(index>=0)return index;index+=len;if(index>=0)return index;return 0}function coerce(length){length=~~Math.ceil(+length);return length<0?0:length}function isArray(subject){return(Array.isArray||function(subject){return Object.prototype.toString.call(subject)==="[object Array]"})(subject)}function isArrayish(subject){return isArray(subject)||Buffer.isBuffer(subject)||subject&&typeof subject==="object"&&typeof subject.length==="number"}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(str){var byteArray=[];for(var i=0;i=55296&&b<=57343)i++;var h=encodeURIComponent(str.slice(start,i+1)).substr(1).split("%");for(var j=0;j>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(str)}function blitBuffer(src,dst,offset,length){var pos;for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}function verifuint(value,max){assert(typeof value==="number","cannot write a non-number as a number");assert(value>=0,"specified a negative value for writing an unsigned value");assert(value<=max,"value is larger than maximum value for type");assert(Math.floor(value)===value,"value has a fractional component")}function verifsint(value,max,min){assert(typeof value==="number","cannot write a non-number as a number");assert(value<=max,"value larger than maximum allowed value");assert(value>=min,"value smaller than minimum allowed value");assert(Math.floor(value)===value,"value has a fractional component")}function verifIEEE754(value,max,min){assert(typeof value==="number","cannot write a non-number as a number");assert(value<=max,"value larger than maximum allowed value");assert(value>=min,"value smaller than minimum allowed value")}function assert(test,message){if(!test)throw new Error(message||"Failed assertion")}},{"base64-js":4,ieee754:5}],4:[function(_dereq_,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],5:[function(_dereq_,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,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,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,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,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],6:[function(_dereq_,module,exports){var Buffer=_dereq_("buffer").Buffer;var intSize=4;var zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var chrsz=8;function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}var arr=[];var fn=bigEndian?buf.readInt32BE:buf.readInt32LE;for(var i=0;iblocksize){key=fn(key)}else if(key.length>5]|=128<>>9<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function bit_rol(num,cnt){return num<>>32-cnt}module.exports=function md5(buf){return helpers.hash(buf,core_md5,16)}},{"./helpers":6}],9:[function(_dereq_,module,exports){(function(){var _global=this;var mathRNG,whatwgRNG;mathRNG=function(size){var bytes=new Array(size);var r;for(var i=0,r;i>>((i&3)<<3)&255}return bytes};if(_global.crypto&&crypto.getRandomValues){whatwgRNG=function(size){var bytes=new Uint8Array(size);crypto.getRandomValues(bytes);return bytes}}module.exports=whatwgRNG||mathRNG})()},{}],10:[function(_dereq_,module,exports){var helpers=_dereq_("./helpers");function core_sha1(x,len){x[len>>5]|=128<<24-len%32;x[(len+64>>9<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}function rol(num,cnt){return num<>>32-cnt}module.exports=function sha1(buf){return helpers.hash(buf,core_sha1,20,true)}},{"./helpers":6}],11:[function(_dereq_,module,exports){var helpers=_dereq_("./helpers");var safe_add=function(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535};var S=function(X,n){return X>>>n|X<<32-n};var R=function(X,n){return X>>>n};var Ch=function(x,y,z){return x&y^~x&z};var Maj=function(x,y,z){return x&y^x&z^y&z};var Sigma0256=function(x){return S(x,2)^S(x,13)^S(x,22)};var Sigma1256=function(x){return S(x,6)^S(x,11)^S(x,25)};var Gamma0256=function(x){return S(x,7)^S(x,18)^R(x,3)};var Gamma1256=function(x){return S(x,17)^S(x,19)^R(x,10)};var core_sha256=function(m,l){var K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var HASH=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var W=new Array(64);var a,b,c,d,e,f,g,h,i,j;var T1,T2;m[l>>5]|=128<<24-l%32;m[(l+64>>9<<4)+15]=l;for(var i=0;i0){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==="_default"||actionName==="_iter"){return 1}else if(actionName==="_terminal"){return 0}return this.ruleDict[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(" return new this.newGrammar("+common.toStringLiteral(this.name)+")\n");sb.append(superGrammarDecl);if(this.defaultStartRule){sb.append(" .withDefaultStartRule('"+this.defaultStartRule+"')\n")}var self=this;Object.keys(this.ruleDict).forEach(function(ruleName){var body=self.ruleDict[ruleName];sb.append(" .");if(self.superGrammar.ruleDict[ruleName]){sb.append(body instanceof pexprs.Extend?"extend":"override")}else{sb.append("define")}var formals="["+body.formals.map(common.toStringLiteral).join(", ")+"]";sb.append("("+common.toStringLiteral(ruleName)+", "+formals+", ");body.outputRecipe(sb,body.formals);if(body.description){sb.append(", "+common.toStringLiteral(body.description))}sb.append(")\n")});sb.append(" .build();\n});\n");return sb.contents()},toOperationActionDictionaryTemplate:function(){return this._toOperationOrAttributeActionDictionaryTemplate()},toAttributeActionDictionaryTemplate:function(){return this._toOperationOrAttributeActionDictionaryTemplate()},_toOperationOrAttributeActionDictionaryTemplate:function(){var sb=new common.StringBuffer;sb.append("{");var first=true;for(var ruleName in this.ruleDict){if(ruleName==="spaces_"){continue}var body=this.ruleDict[ruleName];if(first){first=false}else{sb.append(",")}sb.append("\n");sb.append(" ");this.addSemanticActionTemplate(ruleName,body,sb)}sb.append("\n}");return sb.contents()},addSemanticActionTemplate:function(ruleName,body,sb){sb.append(ruleName);sb.append(": function(");var arity=this._topDownActionArity(ruleName);sb.append(common.repeat("_",arity).join(", "));sb.append(") {\n");sb.append(" }")}};Grammar.ProtoBuiltInRules=new Grammar("ProtoBuiltInRules",undefined,{_:pexprs.anything.withFormals([]),end:pexprs.end.withFormals([]),spaces_:new pexprs.Star(new pexprs.Apply("space")).withFormals([]),space:pexprs.makePrim(/[\s]/).withFormals([]).withDescription("a space")});module.exports=Grammar},{"./InputStream":18,"./Interval":19,"./MatchResult":20,"./Semantics":23,"./State":24,"./common":26,"./errors":27,"./nodes":29,"./pexprs":44}],17:[function(_dereq_,module,exports){"use strict";var Grammar=_dereq_("./Grammar");var common=_dereq_("./common");var errors=_dereq_("./errors");var pexprs=_dereq_("./pexprs");function GrammarDecl(name){this.name=name}function onOhmError(doFn,onErrorFn){try{doFn()}catch(e){if(e instanceof errors.Error){onErrorFn(e)}else{throw e}}}GrammarDecl.prototype.ensureSuperGrammar=function(){if(!this.superGrammar){this.withSuperGrammar(this.name==="BuiltInRules"?Grammar.ProtoBuiltInRules:Grammar.BuiltInRules)}return this.superGrammar};GrammarDecl.prototype.installOverriddenOrExtendedRule=function(name,formals,body){var duplicateParameterNames=common.getDuplicates(formals);if(duplicateParameterNames.length>0){throw new errors.DuplicateParameterNames(name,duplicateParameterNames)}var baseRule=this.ensureSuperGrammar().ruleDict[name];if(formals.length!==baseRule.formals.length){throw new errors.WrongNumberOfParameters(name,baseRule.formals.length,formals.length)}return this.install(name,formals,baseRule.description,body)};GrammarDecl.prototype.install=function(name,formals,description,body){body=body.introduceParams(formals);body.formals=formals;body.description=description;this.ruleDict[name]=body;return this};GrammarDecl.prototype.withSuperGrammar=function(superGrammar){if(this.superGrammar){throw new Error("the super grammar of a GrammarDecl cannot be set more than once")}this.superGrammar=superGrammar;this.ruleDict=Object.create(superGrammar.ruleDict);if(!superGrammar.isBuiltIn()){this.defaultStartRule=superGrammar.defaultStartRule}return this};GrammarDecl.prototype.withDefaultStartRule=function(ruleName){this.defaultStartRule=ruleName;return this};GrammarDecl.prototype.build=function(){var grammar=new Grammar(this.name,this.ensureSuperGrammar(),this.ruleDict,this.defaultStartRule);var grammarErrors=[];var grammarHasInvalidApplications=false;Object.keys(grammar.ruleDict).forEach(function(ruleName){var body=grammar.ruleDict[ruleName];onOhmError(function(){body.assertChoicesHaveUniformArity(ruleName)},function(e){grammarErrors.push(e)});onOhmError(function(){body.assertAllApplicationsAreValid(grammar)},function(e){grammarErrors.push(e);grammarHasInvalidApplications=true})});if(!grammarHasInvalidApplications){Object.keys(grammar.ruleDict).forEach(function(ruleName){var body=grammar.ruleDict[ruleName];onOhmError(function(){body.assertIteratedExprsAreNotNullable(grammar,ruleName)},function(e){grammarErrors.push(e)})})}if(grammarErrors.length>0){errors.throwErrors(grammarErrors)}return grammar};GrammarDecl.prototype.define=function(name,formals,body,optDescr){this.ensureSuperGrammar();if(this.superGrammar.ruleDict[name]){throw new errors.DuplicateRuleDeclaration(name,this.name,this.superGrammar.name)}else if(this.ruleDict[name]){throw new errors.DuplicateRuleDeclaration(name,this.name,this.name)}var duplicateParameterNames=common.getDuplicates(formals);if(duplicateParameterNames.length>0){throw new errors.DuplicateParameterNames(name,duplicateParameterNames)}return this.install(name,formals,optDescr,body)};GrammarDecl.prototype.override=function(name,formals,body){var baseRule=this.ensureSuperGrammar().ruleDict[name];if(!baseRule){throw new errors.CannotOverrideUndeclaredRule(name,this.superGrammar.name)}this.installOverriddenOrExtendedRule(name,formals,body);return this};GrammarDecl.prototype.extend=function(name,formals,body){var baseRule=this.ensureSuperGrammar().ruleDict[name];if(!baseRule){throw new errors.CannotExtendUndeclaredRule(name,this.superGrammar.name)}this.installOverriddenOrExtendedRule(name,formals,new pexprs.Extend(this.superGrammar,name,body));return this};module.exports=GrammarDecl},{"./Grammar":16,"./common":26,"./errors":27,"./pexprs":44}],18:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var Interval=_dereq_("./Interval");function InputStream(){throw new Error("InputStream cannot be instantiated -- it's abstract")}InputStream.newFor=function(obj){if(typeof obj==="string"){return new StringInputStream(obj)}else if(Array.isArray(obj)){return new ListInputStream(obj)}else if(obj instanceof InputStream){return obj}else{throw new Error("cannot make input stream for "+obj)}};InputStream.prototype={init:function(source){this.source=source;this.pos=0;this.posInfos=[]},atEnd:function(){return this.pos===this.source.length},next:function(){if(this.atEnd()){return common.fail}else{return this.source[this.pos++]}},matchExactly:function(x){return this.next()===x?true:common.fail},sourceSlice:function(startIdx,endIdx){return this.source.slice(startIdx,endIdx)},intervalFrom:function(startIdx){return new Interval(this,startIdx,this.pos)}};function StringInputStream(source){this.init(source)}StringInputStream.prototype=Object.create(InputStream.prototype,{matchString:{value:function(s){for(var idx=0;idx0){if(idx===expected.length-1){sb.append(expected.length>2?", or ":" or ")}else{sb.append(", ")}}sb.append(expected[idx])}return sb.contents()};MatchFailure.prototype.getExpected=function(){var expected={};var ruleDict=this.state.grammar.ruleDict;this._exprsAndStacks.forEach(function(obj){expected[obj.expr.toExpected(ruleDict)]=true});return Object.keys(expected)};module.exports=MatchResult},{"./common":26,"./util":45,inherits:12}],21:[function(_dereq_,module,exports){"use strict";var extend=_dereq_("util-extend");function Namespace(){}Namespace.prototype=Object.create(null);Namespace.asNamespace=function(objOrNamespace){if(objOrNamespace instanceof Namespace){return objOrNamespace}return Namespace.createNamespace(objOrNamespace)};Namespace.createNamespace=function(optProps){return Namespace.extend(Namespace.prototype,optProps)};Namespace.extend=function(namespace,optProps){if(namespace!==Namespace.prototype&&!(namespace instanceof Namespace)){throw new TypeError("not a Namespace object: "+namespace)}var ns=Object.create(namespace,{constructor:{value:Namespace,enumerable:false,writable:true,configurable:true}});return extend(ns,optProps)};Namespace.toString=function(ns){return Object.prototype.toString.call(ns)};module.exports=Namespace},{"util-extend":14}],22:[function(_dereq_,module,exports){"use strict";function PosInfo(globalApplicationStack){ +this.globalApplicationStack=globalApplicationStack;this.applicationStack=[];this.activeApplications={};this.memo={}}PosInfo.prototype={isActive:function(application){return this.activeApplications[application.toMemoKey()]},enter:function(application){this.globalApplicationStack.push(application);this.applicationStack.push(application);this.activeApplications[application.toMemoKey()]=true},exit:function(){var application=this.globalApplicationStack.pop();this.applicationStack.pop();this.activeApplications[application.toMemoKey()]=false},shouldUseMemoizedResult:function(memoRec){var involvedApplications=memoRec.involvedApplications;for(var memoKey in involvedApplications){if(involvedApplications[memoKey]&&this.activeApplications[memoKey]){return false}}return true},getCurrentLeftRecursion:function(){if(this.leftRecursionStack){return this.leftRecursionStack[this.leftRecursionStack.length-1]}},startLeftRecursion:function(application){if(!this.leftRecursionStack){this.leftRecursionStack=[]}this.leftRecursionStack.push({memoKey:application.toMemoKey(),value:false,pos:-1,involvedApplications:{}});this.updateInvolvedApplications()},endLeftRecursion:function(application){this.leftRecursionStack.pop()},updateInvolvedApplications:function(){var currentLeftRecursion=this.getCurrentLeftRecursion();var involvedApplications=currentLeftRecursion.involvedApplications;var lrApplicationMemoKey=currentLeftRecursion.memoKey;var idx=this.applicationStack.length-1;while(true){var memoKey=this.applicationStack[idx--].toMemoKey();if(memoKey===lrApplicationMemoKey){break}involvedApplications[memoKey]=true}}};module.exports=PosInfo},{}],23:[function(_dereq_,module,exports){"use strict";var Symbol=_dereq_("symbol");var inherits=_dereq_("inherits");var MatchResult=_dereq_("./MatchResult");var common=_dereq_("./common");function Wrapper(){}Wrapper.prototype.toString=function(){return"[semantics wrapper for "+this._node.grammar.name+"]"};Wrapper.prototype.child=function(idx){if(!(0<=idx&&idx0){return}if(posthis.rightmostFailPos){this.rightmostFailPos=pos}if(!this.failures){return}function addStack(stack,stacks){for(var idx=0;idx0){arr.push(fn())}return arr};exports.repeatStr=function(str,n){return new Array(n+1).join(str)};exports.repeat=function(x,n){return exports.repeatFn(function(){return x},n)};exports.getDuplicates=function(array){var duplicates=[];for(var idx=0;idx=0;var hasDoubleQuotes=str.indexOf('"')>=0;var delim=hasSingleQuotes&&!hasDoubleQuotes?'"':"'";var sb=new exports.StringBuffer;sb.append(delim);for(var idx=0;idx1){throw new MultipleErrors(errors)}}}},{"./Namespace":21}],28:[function(_dereq_,module,exports){(function(Buffer){"use strict";var Builder=_dereq_("./Builder");var Grammar=_dereq_("./Grammar");var Namespace=_dereq_("./Namespace");var UnicodeCategories=_dereq_("../third_party/unicode").UnicodeCategories;var common=_dereq_("./common");var errors=_dereq_("./errors");var util=_dereq_("./util");var ohmGrammar;var documentInterface={querySelector:function(sel){return document.querySelector(sel)},querySelectorAll:function(sel){return document.querySelectorAll(sel)}};function isElement(obj){return!!(obj&&obj.nodeType===1)}function isUndefined(obj){return obj===void 0}var MAX_ARRAY_INDEX=Math.pow(2,53)-1;function isArrayLike(obj){if(obj==null){return false}var length=obj.length;return typeof length==="number"&&length>=0&&length<=MAX_ARRAY_INDEX}function load(url){var req=new XMLHttpRequest;req.open("GET",url,false);try{req.send();if(req.status===0||req.status===200){return req.responseText}}catch(e){}throw new Error("unable to load url "+url)}function buildGrammar(match,namespace,optOhmGrammarForTesting){var builder;var decl;var currentRuleName;var currentRuleFormals;var overriding=false;var metaGrammar=optOhmGrammarForTesting||ohmGrammar;var helpers=metaGrammar.semantics().addOperation("visit",{Grammar:function(n,s,open,rs,close){builder=new Builder;var grammarName=n.visit();decl=builder.newGrammar(grammarName,namespace);s.visit();rs.visit();var g=decl.build();if(grammarName in namespace){throw new errors.DuplicateGrammarDeclaration(grammarName,namespace)}g.definitionInterval=this.interval.trimmed();namespace[grammarName]=g;return g},SuperGrammar:function(_,n){var superGrammarName=n.visit();if(superGrammarName==="null"){decl.withSuperGrammar(null)}else{if(!namespace||!(superGrammarName in namespace)){throw new errors.UndeclaredGrammar(superGrammarName,namespace)}decl.withSuperGrammar(namespace[superGrammarName])}},Rule_define:function(n,fs,d,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];if(!decl.defaultStartRule&&decl.ensureSuperGrammar()!==Grammar.ProtoBuiltInRules){decl.withDefaultStartRule(currentRuleName)}var body=b.visit();body.definitionInterval=this.interval.trimmed();var description=d.visit()[0];return decl.define(currentRuleName,currentRuleFormals,body,description)},Rule_override:function(n,fs,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];overriding=true;var body=b.visit();body.definitionInterval=this.interval.trimmed();var ans=decl.override(currentRuleName,currentRuleFormals,body);overriding=false;return ans},Rule_extend:function(n,fs,_,b){currentRuleName=n.visit();currentRuleFormals=fs.visit()[0]||[];var body=b.visit();var ans=decl.extend(currentRuleName,currentRuleFormals,body);decl.ruleDict[currentRuleName].definitionInterval=this.interval.trimmed();return ans},Formals:function(opointy,fs,cpointy){return fs.visit()},Params:function(opointy,ps,cpointy){return ps.visit()},Alt:function(term,_,terms){var args=[term.visit()].concat(terms.visit());return builder.alt.apply(builder,args).withInterval(this.interval)},Term_inline:function(b,n){var inlineRuleName=currentRuleName+"_"+n.visit();var body=b.visit();body.definitionInterval=this.interval.trimmed();var isNewRuleDeclaration=!(decl.superGrammar&&decl.superGrammar.ruleDict[inlineRuleName]);if(overriding&&!isNewRuleDeclaration){decl.override(inlineRuleName,currentRuleFormals,body)}else{decl.define(inlineRuleName,currentRuleFormals,body)}var params=currentRuleFormals.map(function(formal){return builder.app(formal)});return builder.app(inlineRuleName,params).withInterval(body.interval)},Seq:function(expr){return builder.seq.apply(builder,expr.visit()).withInterval(this.interval)},Iter_star:function(x,_){return builder.star(x.visit()).withInterval(this.interval)},Iter_plus:function(x,_){return builder.plus(x.visit()).withInterval(this.interval)},Iter_opt:function(x,_){return builder.opt(x.visit()).withInterval(this.interval)},Pred_not:function(_,x){return builder.not(x.visit()).withInterval(this.interval)},Pred_lookahead:function(_,x){return builder.la(x.visit()).withInterval(this.interval)},Base_application:function(rule,ps){return builder.app(rule.visit(),ps.visit()[0]||[]).withInterval(this.interval)},Base_prim:function(expr){return builder.prim(expr.visit()).withInterval(this.interval)},Base_paren:function(open,x,close){return x.visit()},Base_arr:function(open,x,close){return builder.arr(x.visit()).withInterval(this.interval)},Base_str:function(open,x,close){return builder.str(x.visit())},Base_obj:function(open,lenient,close){return builder.obj([],lenient.visit()[0])},Base_objWithProps:function(open,ps,_,lenient,close){return builder.obj(ps.visit(),lenient.visit()[0]).withInterval(this.interval)},Props:function(p,_,ps){return[p.visit()].concat(ps.visit())},Prop:function(n,_,p){return{name:n.visit(),pattern:p.visit()}},ruleDescr:function(open,t,close){return t.visit()},ruleDescrText:function(_){return this.interval.contents.trim()},caseName:function(_,space1,n,space2,end){return n.visit()},name:function(first,rest){return this.interval.contents},nameFirst:function(expr){},nameRest:function(expr){},keyword_null:function(_){return null},keyword_true:function(_){return true},keyword_false:function(_){return false},string:function(open,cs,close){return cs.visit().map(function(c){return common.unescapeChar(c)}).join("")},strChar:function(_){return _.visit()},escapeChar:function(child){if(child.ctorName==="escapeChar_unrecognized"){throw new errors.UnrecognizedEscapeSequence(child.interval)}return this.interval.contents},regExp:function(open,e,close){return e.visit()},reCharClass_unicode:function(open,unicodeClass,close){return UnicodeCategories[unicodeClass.visit().join("")]},reCharClass_ordinary:function(open,_,close){return new RegExp(this.interval.contents)},number:function(_,digits){return parseInt(this.interval.contents)},space:function(expr){},space_multiLine:function(start,_,end){},space_singleLine:function(start,_,end){},ListOf_some:function(x,_,xs){return[x.visit()].concat(xs.visit())},ListOf_none:function(){return[]}});return helpers(match).visit()}function compileAndLoad(source,namespace){var m=ohmGrammar.match(source,"Grammars");if(m.failed()){throw new errors.GrammarSyntaxError(m)}return buildGrammar(m,namespace)}function getScriptElementContents(el){if(!isElement(el)){throw new TypeError("Expected a DOM Node, got "+common.unexpectedObjToString(el))}if(el.type!=="text/ohm-js"){throw new Error('Expected a script tag with type="text/ohm-js", got '+el)}return el.getAttribute("src")?load(el.getAttribute("src")):el.innerHTML}function grammar(source,optNamespace){var ns=grammars(source,optNamespace);var grammarNames=Object.keys(ns);if(grammarNames.length===0){throw new Error("Missing grammar definition")}else if(grammarNames.length>1){var secondGrammar=ns[grammarNames[1]];var interval=secondGrammar.definitionInterval;throw new Error(util.getLineAndColumnMessage(interval.inputStream.source,interval.startIdx)+"Found more than one grammar definition -- use ohm.grammars() instead.")}return ns[grammarNames[0]]}function grammars(source,optNamespace){var ns=Namespace.extend(Namespace.asNamespace(optNamespace));if(typeof source!=="string"){if(Buffer&&Buffer.isBuffer(source)){source=source.toString()}else{throw new TypeError("Expected string as first argument, got "+common.unexpectedObjToString(source))}}compileAndLoad(source,ns);return ns}function grammarFromScriptElement(optNode){var node=optNode;if(isUndefined(node)){var nodeList=documentInterface.querySelectorAll('script[type="text/ohm-js"]');if(nodeList.length!==1){ +throw new Error('Expected exactly one script tag with type="text/ohm-js", found '+nodeList.length)}node=nodeList[0]}return grammar(getScriptElementContents(node))}function grammarsFromScriptElements(optNodeOrNodeList){if(isElement(optNodeOrNodeList)){return grammars(optNodeOrNodeList)}var nodeList=optNodeOrNodeList;if(isUndefined(nodeList)){nodeList=documentInterface.querySelectorAll('script[type="text/ohm-js"]')}else if(typeof nodeList==="string"||!isElement(nodeList)&&!isArrayLike(nodeList)){throw new TypeError("Expected a Node, NodeList, or Array, but got "+nodeList)}var ns=Namespace.createNamespace();for(var i=0;i0};Node.prototype.hasNoChildren=function(){return!this.hasChildren()};Node.prototype.onlyChild=function(){if(this.children.length!==1){throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)")}else{return this.firstChild()}};Node.prototype.firstChild=function(){if(this.hasNoChildren()){throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children")}else{return this.childAt(0)}};Node.prototype.lastChild=function(){if(this.hasNoChildren()){throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children")}else{return this.childAt(this.numChildren()-1)}};Node.prototype.childBefore=function(child){var childIdx=this.indexOfChild(child);if(childIdx<0){throw new Error("Node.childBefore() called w/ an argument that is not a child")}else if(childIdx===0){throw new Error("cannot get child before first child")}else{return this.childAt(childIdx-1)}};Node.prototype.childAfter=function(child){var childIdx=this.indexOfChild(child);if(childIdx<0){throw new Error("Node.childAfter() called w/ an argument that is not a child")}else if(childIdx===this.numChildren()-1){throw new Error("cannot get child after last child")}else{return this.childAt(childIdx+1)}};Node.prototype.isTerminal=function(){return false};Node.prototype.toJSON=function(){var r={};r[this.ctorName]=this.children;return r};function TerminalNode(grammar,value,interval){Node.call(this,grammar,"_terminal",[],interval);this.primitiveValue=value}inherits(TerminalNode,Node);TerminalNode.prototype.isTerminal=function(){return true};module.exports={Node:Node,TerminalNode:TerminalNode}},{inherits:12}],30:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");var errors=_dereq_("./errors");pexprs.PExpr.prototype.assertAllApplicationsAreValid=common.abstract;pexprs.anything.assertAllApplicationsAreValid=function(grammar){};pexprs.end.assertAllApplicationsAreValid=function(grammar){};pexprs.Prim.prototype.assertAllApplicationsAreValid=function(grammar){};pexprs.Param.prototype.assertAllApplicationsAreValid=function(grammar){};pexprs.Alt.prototype.assertAllApplicationsAreValid=function(grammar){for(var idx=0;idx=1};pexprs.end.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&vals[0].primitiveValue===undefined};pexprs.Prim.prototype.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&vals[0].primitiveValue===this.obj};pexprs.Param.prototype.check=function(grammar,vals){return vals.length>=1};pexprs.RegExpPrim.prototype.check=function(grammar,vals){return vals[0]instanceof nodes.Node&&vals[0].isTerminal()&&typeof vals[0].primitiveValue==="string"&&vals[0].primitiveValue.replace(this.obj,"")===""};pexprs.Alt.prototype.check=function(grammar,vals){for(var i=0;i1?state.applicationStack[state.applicationStack.length-1].params:[];var app=this.substituteParams(actuals);var ruleName=app.ruleName;var memoKey=app.toMemoKey();if(common.isSyntactic(ruleName)){skipSpaces(state)}var origPosInfo=state.getCurrentPosInfo();var memoRec=origPosInfo.memo[memoKey];var currentLR;if(memoRec&&origPosInfo.shouldUseMemoizedResult(memoRec)){return useMemoizedResult(memoRec)}else if(origPosInfo.isActive(app)){currentLR=origPosInfo.getCurrentLeftRecursion();if(currentLR&¤tLR.memoKey===memoKey){origPosInfo.updateInvolvedApplications();return useMemoizedResult(currentLR)}else{origPosInfo.startLeftRecursion(app);return false}}else{var body=grammar.ruleDict[ruleName];var origPos=inputStream.pos;origPosInfo.enter(app);if(body.description){state.ignoreFailures()}var value=app.evalOnce(body,state,inputStream,origPos);currentLR=origPosInfo.getCurrentLeftRecursion();if(currentLR){if(currentLR.memoKey===memoKey){value=app.handleLeftRecursion(body,state,origPos,currentLR,value);origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value,involvedApplications:currentLR.involvedApplications};origPosInfo.endLeftRecursion(app)}else if(!currentLR.involvedApplications[memoKey]){origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value}}}else{origPosInfo.memo[memoKey]={pos:inputStream.pos,value:value}}if(body.description){state.recordFailures();if(!value){state.recordFailure(origPos,app)}}if(state.isTracing()&&origPosInfo.memo[memoKey]){var entry=state.getTraceEntry(origPos,app,value);entry.setLeftRecursive(currentLR&¤tLR.memoKey===memoKey);origPosInfo.memo[memoKey].traceEntry=entry}var ans;if(value){bindings.push(value);if(state.applicationStack.length===1){if(common.isSyntactic(ruleName)){skipSpaces(state)}ans=pexprs.end.eval(state);bindings.pop()}else{ans=true}}else{ans=false}origPosInfo.exit();return ans}};pexprs.Apply.prototype.evalOnce=function(expr,state,inputStream,origPos){if(expr.eval(state)){var arity=expr.getArity();var bindings=state.bindings.splice(state.bindings.length-arity,arity);var ans=new Node(state.grammar,this.ruleName,bindings,inputStream.intervalFrom(origPos));return ans}else{return false}};pexprs.Apply.prototype.handleLeftRecursion=function(body,state,origPos,currentLR,seedValue){if(!seedValue){return seedValue}var inputStream=state.inputStream;var value=seedValue;currentLR.value=seedValue;currentLR.pos=inputStream.pos;while(true){if(state.isTracing()){currentLR.traceEntry=common.clone(state.trace[state.trace.length-1])}inputStream.pos=origPos;value=this.evalOnce(body,state,inputStream,origPos);if(value&&inputStream.pos>currentLR.pos){currentLR.value=value;currentLR.pos=inputStream.pos}else{inputStream.pos=currentLR.pos;if(state.isTracing()){state.trace.pop()}break}}return currentLR.value}},{"./InputStream":18,"./common":26,"./nodes":29,"./pexprs":44}],35:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.getArity=function(){return 1};pexprs.Alt.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};pexprs.Seq.prototype.getArity=function(){var arity=0;for(var idx=0;idx=0){if(this.params.length>0){throw new Error("FIXME: should catch this earlier")}return new pexprs.Param(index)}else{this.params.forEach(function(param,idx,params){params[idx]=param.introduceParams(formals)});return this}}},{"./pexprs":44}],37:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.isNullable=function(grammar){return this._isNullable(grammar,Object.create(null))};pexprs.PExpr.prototype._isNullable=function(grammar,memo){return false};pexprs.end._isNullable=function(grammar,memo){return true};pexprs.StringPrim.prototype._isNullable=function(grammar,memo){return this.obj===""};pexprs.Alt.prototype._isNullable=function(grammar,memo){return this.terms.length===0||this.terms.some(function(term){return term._isNullable(grammar,memo)})};pexprs.Seq.prototype._isNullable=function(grammar,memo){return this.factors.every(function(factor){return factor._isNullable(grammar,memo)})};pexprs.Star.prototype._isNullable=pexprs.Opt.prototype._isNullable=pexprs.Not.prototype._isNullable=pexprs.Lookahead.prototype._isNullable=function(grammar,memo){return true};pexprs.Str.prototype._isNullable=function(grammar,memo){return this.expr._isNullable(grammar,memo)};pexprs.Apply.prototype._isNullable=function(grammar,memo){var key=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(memo,key)){var body=grammar.ruleDict[this.ruleName];var inlined=body.substituteParams(this.params);memo[key]=false;memo[key]=inlined._isNullable(grammar,memo)}return memo[key]}},{"./pexprs":44}],38:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.maybeRecordFailure=function(state,startPos){};pexprs.anything.maybeRecordFailure=pexprs.end.maybeRecordFailure=pexprs.Prim.prototype.maybeRecordFailure=pexprs.Not.prototype.maybeRecordFailure=function(state,startPos){state.recordFailure(startPos,this)}},{"./pexprs":44}],39:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.outputRecipe=common.abstract;pexprs.anything.outputRecipe=function(sb,formals){sb.append("this.anything()")};pexprs.end.outputRecipe=function(sb,formals){sb.append("this.end()")};pexprs.Prim.prototype.outputRecipe=function(sb,formals){sb.append("this.prim(");sb.append(typeof this.obj==="string"?common.toStringLiteral(this.obj):""+this.obj);sb.append(")")};pexprs.Param.prototype.outputRecipe=function(sb,formals){sb.append("this.param("+this.index+")")};pexprs.Alt.prototype.outputRecipe=function(sb,formals){sb.append("this.alt(");for(var idx=0;idx0){sb.append(", ")}this.terms[idx].outputRecipe(sb,formals)}sb.append(")")};pexprs.Seq.prototype.outputRecipe=function(sb,formals){sb.append("this.seq(");for(var idx=0;idx0){sb.append(", ")}this.factors[idx].outputRecipe(sb,formals)}sb.append(")")};pexprs.Star.prototype.outputRecipe=function(sb,formals){sb.append("this.star(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Plus.prototype.outputRecipe=function(sb,formals){sb.append("this.plus(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Opt.prototype.outputRecipe=function(sb,formals){sb.append("this.opt(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Not.prototype.outputRecipe=function(sb,formals){sb.append("this.not(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Lookahead.prototype.outputRecipe=function(sb,formals){sb.append("this.la(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Arr.prototype.outputRecipe=function(sb,formals){sb.append("this.arr(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Str.prototype.outputRecipe=function(sb,formals){sb.append("this.str(");this.expr.outputRecipe(sb,formals);sb.append(")")};pexprs.Obj.prototype.outputRecipe=function(sb,formals){function outputPropertyRecipe(prop){sb.append("{name: ");sb.append(common.toStringLiteral(prop.name));sb.append(", pattern: ");prop.pattern.outputRecipe(sb,formals);sb.append("}")}sb.append("this.obj([");for(var idx=0;idx0){sb.append(", ")}outputPropertyRecipe(this.properties[idx])}sb.append("], ");sb.append(!!this.isLenient);sb.append(")")};pexprs.Apply.prototype.outputRecipe=function(sb,formals){sb.append("this.app(");sb.append(common.toStringLiteral(this.ruleName));if(this.ruleName.indexOf("_")>=0&&formals.length>0){var apps=formals.map(function(formal){return"this.app("+common.toStringLiteral(formal)+")"});sb.append(", ["+apps.join(", ")+"]")}else if(this.params.length>0){sb.append(", [");this.params.forEach(function(param,idx){if(idx>0){sb.append(", ")}param.outputRecipe(sb,formals)});sb.append("]")}sb.append(")")}},{"./common":26,"./pexprs":44}],40:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.substituteParams=function(actuals){return this};pexprs.Param.prototype.substituteParams=function(actuals){return actuals[this.index]};pexprs.Alt.prototype.substituteParams=function(actuals){return new pexprs.Alt(this.terms.map(function(term){return term.substituteParams(actuals)}))};pexprs.Seq.prototype.substituteParams=function(actuals){return new pexprs.Seq(this.factors.map(function(factor){return factor.substituteParams(actuals)}))};pexprs.Iter.prototype.substituteParams=pexprs.Not.prototype.substituteParams=pexprs.Lookahead.prototype.substituteParams=pexprs.Arr.prototype.substituteParams=pexprs.Str.prototype.substituteParams=function(actuals){return new this.constructor(this.expr.substituteParams(actuals))};pexprs.Obj.prototype.substituteParams=function(actuals){var properties=this.properties.map(function(property){return{name:property.name,pattern:property.pattern.substituteParams(actuals)}});return new pexprs.Obj(properties,this.isLenient)};pexprs.Apply.prototype.substituteParams=function(actuals){if(this.params.length===0){return this}else{var params=this.params.map(function(param){return param.substituteParams(actuals)});return new pexprs.Apply(this.ruleName,params)}}},{"./pexprs":44}],41:[function(_dereq_,module,exports){"use strict";var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toDisplayString=function(){if(this.interval){return this.interval.trimmed().contents}return"["+this.constructor.name+"]"};pexprs.anything.toDisplayString=function(){return"_"};pexprs.end.toDisplayString=function(){return"end"};pexprs.Prim.prototype.toDisplayString=function(){return String(this.obj)};pexprs.Param.prototype.toDisplayString=function(){return"#"+this.index};pexprs.StringPrim.prototype.toDisplayString=function(){return'"'+this.obj+'"'};pexprs.Apply.prototype.toDisplayString=function(){return this.ruleName}},{"./pexprs":44}],42:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toExpected=function(ruleDict){return undefined};pexprs.anything.toExpected=function(ruleDict){return"any object"};pexprs.end.toExpected=function(ruleDict){return"end of input"};pexprs.Prim.prototype.toExpected=function(ruleDict){return common.toStringLiteral(this.obj)};pexprs.Not.prototype.toExpected=function(ruleDict){if(this.expr===pexprs.anything){return"nothing"}else{return"not "+this.expr.toExpected(ruleDict)}};pexprs.Apply.prototype.toExpected=function(ruleDict){var description=ruleDict[this.ruleName].description;if(description){return description}else{var article=/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a";return article+" "+this.ruleName}}},{"./common":26,"./pexprs":44}],43:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var pexprs=_dereq_("./pexprs");pexprs.PExpr.prototype.toString=common.abstract;pexprs.anything.toString=function(){return"_"};pexprs.end.toString=function(){return"end"};pexprs.Prim.prototype.toString=function(){return JSON.stringify(this.obj)};pexprs.Param.prototype.toString=function(){return"#"+this.index};pexprs.RegExpPrim.prototype.toString=function(){return this.obj.toString()};pexprs.Alt.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(function(term){return term.toString()}).join(" | ")+")"};pexprs.Seq.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(function(factor){return factor.toString()}).join(" ")+")"};pexprs.Iter.prototype.toString=function(){return this.expr+this.operator};pexprs.Not.prototype.toString=function(){return"~"+this.expr};pexprs.Lookahead.prototype.toString=function(){return"&"+this.expr};pexprs.Arr.prototype.toString=function(){return"["+this.expr.toString()+"]"};pexprs.Str.prototype.toString=function(){return"``"+this.expr.toString()+"''"};pexprs.Obj.prototype.toString=function(){var parts=["{"];var first=true;function emit(part){if(first){first=false}else{parts.push(", ")}parts.push(part)}this.properties.forEach(function(property){emit(JSON.stringify(property.name)+": "+property.pattern.toString())});if(this.isLenient){emit("...")}parts.push("}");return parts.join("")};pexprs.Apply.prototype.toString=function(){if(this.params.length>0){var ps=this.params.map(function(param){ +return param.toString()});return this.ruleName+"<"+ps.join(",")+">"}else{return this.ruleName}}},{"./common":26,"./pexprs":44}],44:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./common");var errors=_dereq_("./errors");var inherits=_dereq_("inherits");function PExpr(){throw new Error("PExpr cannot be instantiated -- it's abstract")}PExpr.prototype.withDescription=function(description){this.description=description;return this};PExpr.prototype.withInterval=function(interval){this.interval=interval.trimmed();return this};PExpr.prototype.withFormals=function(formals){this.formals=formals;return this};var anything=Object.create(PExpr.prototype);var end=Object.create(PExpr.prototype);function Prim(obj){this.obj=obj}inherits(Prim,PExpr);function StringPrim(obj){this.obj=obj}inherits(StringPrim,Prim);function RegExpPrim(obj){this.obj=obj}inherits(RegExpPrim,Prim);function Param(index){this.index=index}inherits(Param,PExpr);function Alt(terms){this.terms=terms}inherits(Alt,PExpr);function Extend(superGrammar,name,body){var origBody=superGrammar.ruleDict[name];this.terms=[body,origBody]}inherits(Extend,Alt);function Seq(factors){this.factors=factors}inherits(Seq,PExpr);function Iter(expr){this.expr=expr}inherits(Iter,PExpr);function Star(expr){this.expr=expr}inherits(Star,Iter);function Plus(expr){this.expr=expr}inherits(Plus,Iter);function Opt(expr){this.expr=expr}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 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 new errors.DuplicatePropertyNames(duplicates)}else{this.properties=properties;this.isLenient=isLenient}}inherits(Obj,PExpr);function Apply(ruleName,optParams){this.ruleName=ruleName;this.params=optParams||[]}inherits(Apply,PExpr);Apply.prototype.toMemoKey=function(){if(!this._memoKey){Object.defineProperty(this,"_memoKey",{value:this.toString()})}return this._memoKey};exports.makePrim=function(obj){if(typeof obj==="string"&&obj.length!==1){return new StringPrim(obj)}else if(obj instanceof RegExp){return new RegExpPrim(obj)}else{return new Prim(obj)}};exports.PExpr=PExpr;exports.anything=anything;exports.end=end;exports.Prim=Prim;exports.StringPrim=StringPrim;exports.RegExpPrim=RegExpPrim;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.Arr=Arr;exports.Str=Str;exports.Obj=Obj;exports.Apply=Apply;_dereq_("./pexprs-assertAllApplicationsAreValid");_dereq_("./pexprs-assertChoicesHaveUniformArity");_dereq_("./pexprs-assertIteratedExprsAreNotNullable");_dereq_("./pexprs-check");_dereq_("./pexprs-eval");_dereq_("./pexprs-maybeRecordFailure");_dereq_("./pexprs-getArity");_dereq_("./pexprs-outputRecipe");_dereq_("./pexprs-introduceParams");_dereq_("./pexprs-isNullable");_dereq_("./pexprs-substituteParams");_dereq_("./pexprs-toDisplayString");_dereq_("./pexprs-toExpected");_dereq_("./pexprs-toString")},{"./common":26,"./errors":27,"./pexprs-assertAllApplicationsAreValid":30,"./pexprs-assertChoicesHaveUniformArity":31,"./pexprs-assertIteratedExprsAreNotNullable":32,"./pexprs-check":33,"./pexprs-eval":34,"./pexprs-getArity":35,"./pexprs-introduceParams":36,"./pexprs-isNullable":37,"./pexprs-maybeRecordFailure":38,"./pexprs-outputRecipe":39,"./pexprs-substituteParams":40,"./pexprs-toDisplayString":41,"./pexprs-toExpected":42,"./pexprs-toString":43,inherits:12}],45:[function(_dereq_,module,exports){"use strict";var common=_dereq_("./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=0){prevLine=str.slice(prevLineStartOffset,lineStartOffset).replace(/\r?\n$/,"")}var line=str.slice(lineStartOffset,lineEndOffset).replace(/\r$/,"");return{lineNum:lineNum,colNum:colNum,line:line,prevLine:prevLine,nextLine:nextLine}};exports.getLineAndColumnMessage=function(str,offset){var repeatStr=common.repeatStr;var lineAndCol=exports.getLineAndColumn(str,offset);var sb=new common.StringBuffer;sb.append("Line "+lineAndCol.lineNum+", col "+lineAndCol.colNum+":\n");var lineNumbers=padNumbersToEqualLength([lineAndCol.prevLine==null?0:lineAndCol.lineNum-1,lineAndCol.lineNum,lineAndCol.nextLine==null?0:lineAndCol.lineNum+1]);function appendLine(num,content,prefix){sb.append(prefix+lineNumbers[num]+" | "+content+"\n")}if(lineAndCol.prevLine!=null){appendLine(0,lineAndCol.prevLine," ")}appendLine(1,lineAndCol.line,"> ");var lineLen=lineAndCol.line.length;var indicationLine=repeatStr(" ",lineLen+1);var ranges=Array.prototype.slice.call(arguments,2);for(var i=0;i=0&&startIdx<=endIdx,"range start must be >= 0 and <= end");var lineStartOffset=offset-lineAndCol.colNum+1;startIdx=Math.max(0,startIdx-lineStartOffset);endIdx=Math.min(endIdx-lineStartOffset,lineLen);indicationLine=strcpy(indicationLine,repeatStr("~",endIdx-startIdx),startIdx)}var gutterWidth=2+lineNumbers[1].length+3;sb.append(repeatStr(" ",gutterWidth));indicationLine=strcpy(indicationLine,"^",lineAndCol.colNum-1);sb.append(indicationLine.replace(/ +$/,"")+"\n");if(lineAndCol.nextLine!=null){appendLine(2,lineAndCol.nextLine," ")}return sb.contents()}},{"./common":26}],46:[function(_dereq_,module,exports){exports.UnicodeCategories={ZWNJ:/\u200C/,ZWJ:/\u200D/,TAB:/\u0009/,VT:/\u000B/,FF:/\u000C/,SP:/\u0020/,NBSP:/\u00A0/,BOM:/\uFEFF/,LF:/\u000A/,CR:/\u000D/,LS:/\u2028/,PS:/\u2029/,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-\u1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[\u1ED4-\u1ED4]|[\u1ED6-\u1ED6]|[\u1ED8-\u1ED8]|[\u1EDA-\u1EDA]|[\u1EDC-\u1EDC]|[\u1EDE-\u1EDE]|[\u1EE0-\u1EE0]|[\u1EE2-\u1EE2]|[\u1EE4-\u1EE4]|[\u1EE6-\u1EE6]|[\u1EE8-\u1EE8]|[\u1EEA-\u1EEA]|[\u1EEC-\u1EEC]|[\u1EEE-\u1EEE]|[\u1EF0-\u1EF0]|[\u1EF2-\u1EF2]|[\u1EF4-\u1EF4]|[\u1EF6-\u1EF6]|[\u1EF8-\u1EF8]|[\u1F08-\u1F0F]|[\u1F18-\u1F1D]|[\u1F28-\u1F2F]|[\u1F38-\u1F3F]|[\u1F48-\u1F4D]|[\u1F59-\u1F59]|[\u1F5B-\u1F5B]|[\u1F5D-\u1F5D]|[\u1F5F-\u1F5F]|[\u1F68-\u1F6F]|[\u1F88-\u1F8F]|[\u1F98-\u1F9F]|[\u1FA8-\u1FAF]|[\u1FB8-\u1FBC]|[\u1FC8-\u1FCC]|[\u1FD8-\u1FDB]|[\u1FE8-\u1FEC]|[\u1FF8-\u1FFC]|[\u2102-\u2102]|[\u2107-\u2107]|[\u210B-\u210D]|[\u2110-\u2112]|[\u2115-\u2115]|[\u2119-\u211D]|[\u2124-\u2124]|[\u2126-\u2126]|[\u2128-\u2128]|[\u212A-\u212D]|[\u2130-\u2131]|[\u2133-\u2133]|[\uFF21-\uFF3A]|[\u0061-\u007A]|[\u00AA-\u00AA]|[\u00B5-\u00B5]|[\u00BA-\u00BA]|[\u00DF-\u00F6]|[\u00F8-\u00FF]|[\u0101-\u0101]|[\u0103-\u0103]|[\u0105-\u0105]|[\u0107-\u0107]|[\u0109-\u0109]|[\u010B-\u010B]|[\u010D-\u010D]|[\u010F-\u010F]|[\u0111-\u0111]|[\u0113-\u0113]|[\u0115-\u0115]|[\u0117-\u0117]|[\u0119-\u0119]|[\u011B-\u011B]|[\u011D-\u011D]|[\u011F-\u011F]|[\u0121-\u0121]|[\u0123-\u0123]|[\u0125-\u0125]|[\u0127-\u0127]|[\u0129-\u0129]|[\u012B-\u012B]|[\u012D-\u012D]|[\u012F-\u012F]|[\u0131-\u0131]|[\u0133-\u0133]|[\u0135-\u0135]|[\u0137-\u0138]|[\u013A-\u013A]|[\u013C-\u013C]|[\u013E-\u013E]|[\u0140-\u0140]|[\u0142-\u0142]|[\u0144-\u0144]|[\u0146-\u0146]|[\u0148-\u0149]|[\u014B-\u014B]|[\u014D-\u014D]|[\u014F-\u014F]|[\u0151-\u0151]|[\u0153-\u0153]|[\u0155-\u0155]|[\u0157-\u0157]|[\u0159-\u0159]|[\u015B-\u015B]|[\u015D-\u015D]|[\u015F-\u015F]|[\u0161-\u0161]|[\u0163-\u0163]|[\u0165-\u0165]|[\u0167-\u0167]|[\u0169-\u0169]|[\u016B-\u016B]|[\u016D-\u016D]|[\u016F-\u016F]|[\u0171-\u0171]|[\u0173-\u0173]|[\u0175-\u0175]|[\u0177-\u0177]|[\u017A-\u017A]|[\u017C-\u017C]|[\u017E-\u0180]|[\u0183-\u0183]|[\u0185-\u0185]|[\u0188-\u0188]|[\u018C-\u018D]|[\u0192-\u0192]|[\u0195-\u0195]|[\u0199-\u019B]|[\u019E-\u019E]|[\u01A1-\u01A1]|[\u01A3-\u01A3]|[\u01A5-\u01A5]|[\u01A8-\u01A8]|[\u01AB-\u01AB]|[\u01AD-\u01AD]|[\u01B0-\u01B0]|[\u01B4-\u01B4]|[\u01B6-\u01B6]|[\u01B9-\u01BA]|[\u01BD-\u01BD]|[\u01C6-\u01C6]|[\u01C9-\u01C9]|[\u01CC-\u01CC]|[\u01CE-\u01CE]|[\u01D0-\u01D0]|[\u01D2-\u01D2]|[\u01D4-\u01D4]|[\u01D6-\u01D6]|[\u01D8-\u01D8]|[\u01DA-\u01DA]|[\u01DC-\u01DD]|[\u01DF-\u01DF]|[\u01E1-\u01E1]|[\u01E3-\u01E3]|[\u01E5-\u01E5]|[\u01E7-\u01E7]|[\u01E9-\u01E9]|[\u01EB-\u01EB]|[\u01ED-\u01ED]|[\u01EF-\u01F0]|[\u01F3-\u01F3]|[\u01F5-\u01F5]|[\u01FB-\u01FB]|[\u01FD-\u01FD]|[\u01FF-\u01FF]|[\u0201-\u0201]|[\u0203-\u0203]|[\u0205-\u0205]|[\u0207-\u0207]|[\u0209-\u0209]|[\u020B-\u020B]|[\u020D-\u020D]|[\u020F-\u020F]|[\u0211-\u0211]|[\u0213-\u0213]|[\u0215-\u0215]|[\u0217-\u0217]|[\u0250-\u02A8]|[\u0390-\u0390]|[\u03AC-\u03CE]|[\u03D0-\u03D1]|[\u03D5-\u03D6]|[\u03E3-\u03E3]|[\u03E5-\u03E5]|[\u03E7-\u03E7]|[\u03E9-\u03E9]|[\u03EB-\u03EB]|[\u03ED-\u03ED]|[\u03EF-\u03F2]|[\u0430-\u044F]|[\u0451-\u045C]|[\u045E-\u045F]|[\u0461-\u0461]|[\u0463-\u0463]|[\u0465-\u0465]|[\u0467-\u0467]|[\u0469-\u0469]|[\u046B-\u046B]|[\u046D-\u046D]|[\u046F-\u046F]|[\u0471-\u0471]|[\u0473-\u0473]|[\u0475-\u0475]|[\u0477-\u0477]|[\u0479-\u0479]|[\u047B-\u047B]|[\u047D-\u047D]|[\u047F-\u047F]|[\u0481-\u0481]|[\u0491-\u0491]|[\u0493-\u0493]|[\u0495-\u0495]|[\u0497-\u0497]|[\u0499-\u0499]|[\u049B-\u049B]|[\u049D-\u049D]|[\u049F-\u049F]|[\u04A1-\u04A1]|[\u04A3-\u04A3]|[\u04A5-\u04A5]|[\u04A7-\u04A7]|[\u04A9-\u04A9]|[\u04AB-\u04AB]|[\u04AD-\u04AD]|[\u04AF-\u04AF]|[\u04B1-\u04B1]|[\u04B3-\u04B3]|[\u04B5-\u04B5]|[\u04B7-\u04B7]|[\u04B9-\u04B9]|[\u04BB-\u04BB]|[\u04BD-\u04BD]|[\u04BF-\u04BF]|[\u04C2-\u04C2]|[\u04C4-\u04C4]|[\u04C8-\u04C8]|[\u04CC-\u04CC]|[\u04D1-\u04D1]|[\u04D3-\u04D3]|[\u04D5-\u04D5]|[\u04D7-\u04D7]|[\u04D9-\u04D9]|[\u04DB-\u04DB]|[\u04DD-\u04DD]|[\u04DF-\u04DF]|[\u04E1-\u04E1]|[\u04E3-\u04E3]|[\u04E5-\u04E5]|[\u04E7-\u04E7]|[\u04E9-\u04E9]|[\u04EB-\u04EB]|[\u04EF-\u04EF]|[\u04F1-\u04F1]|[\u04F3-\u04F3]|[\u04F5-\u04F5]|[\u04F9-\u04F9]|[\u0561-\u0587]|[\u10D0-\u10F6]|[\u1E01-\u1E01]|[\u1E03-\u1E03]|[\u1E05-\u1E05]|[\u1E07-\u1E07]|[\u1E09-\u1E09]|[\u1E0B-\u1E0B]|[\u1E0D-\u1E0D]|[\u1E0F-\u1E0F]|[\u1E11-\u1E11]|[\u1E13-\u1E13]|[\u1E15-\u1E15]|[\u1E17-\u1E17]|[\u1E19-\u1E19]|[\u1E1B-\u1E1B]|[\u1E1D-\u1E1D]|[\u1E1F-\u1E1F]|[\u1E21-\u1E21]|[\u1E23-\u1E23]|[\u1E25-\u1E25]|[\u1E27-\u1E27]|[\u1E29-\u1E29]|[\u1E2B-\u1E2B]|[\u1E2D-\u1E2D]|[\u1E2F-\u1E2F]|[\u1E31-\u1E31]|[\u1E33-\u1E33]|[\u1E35-\u1E35]|[\u1E37-\u1E37]|[\u1E39-\u1E39]|[\u1E3B-\u1E3B]|[\u1E3D-\u1E3D]|[\u1E3F-\u1E3F]|[\u1E41-\u1E41]|[\u1E43-\u1E43]|[\u1E45-\u1E45]|[\u1E47-\u1E47]|[\u1E49-\u1E49]|[\u1E4B-\u1E4B]|[\u1E4D-\u1E4D]|[\u1E4F-\u1E4F]|[\u1E51-\u1E51]|[\u1E53-\u1E53]|[\u1E55-\u1E55]|[\u1E57-\u1E57]|[\u1E59-\u1E59]|[\u1E5B-\u1E5B]|[\u1E5D-\u1E5D]|[\u1E5F-\u1E5F]|[\u1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u1EEF]|[\u1EF1-\u1EF1]|[\u1EF3-\u1EF3]|[\u1EF5-\u1EF5]|[\u1EF7-\u1EF7]|[\u1EF9-\u1EF9]|[\u1F00-\u1F07]|[\u1F10-\u1F15]|[\u1F20-\u1F27]|[\u1F30-\u1F37]|[\u1F40-\u1F45]|[\u1F50-\u1F57]|[\u1F60-\u1F67]|[\u1F70-\u1F7D]|[\u1F80-\u1F87]|[\u1F90-\u1F97]|[\u1FA0-\u1FA7]|[\u1FB0-\u1FB4]|[\u1FB6-\u1FB7]|[\u1FBE-\u1FBE]|[\u1FC2-\u1FC4]|[\u1FC6-\u1FC7]|[\u1FD0-\u1FD3]|[\u1FD6-\u1FD7]|[\u1FE0-\u1FE7]|[\u1FF2-\u1FF4]|[\u1FF6-\u1FF7]|[\u207F-\u207F]|[\u210A-\u210A]|[\u210E-\u210F]|[\u2113-\u2113]|[\u2118-\u2118]|[\u212E-\u212F]|[\u2134-\u2134]|[\uFB00-\uFB06]|[\uFB13-\uFB17]|[\uFF41-\uFF5A]|[\u01C5-\u01C5]|[\u01C8-\u01C8]|[\u01CB-\u01CB]|[\u01F2-\u01F2]|[\u02B0-\u02B8]|[\u02BB-\u02C1]|[\u02D0-\u02D1]|[\u02E0-\u02E4]|[\u037A-\u037A]|[\u0559-\u0559]|[\u0640-\u0640]|[\u06E5-\u06E6]|[\u0E46-\u0E46]|[\u0EC6-\u0EC6]|[\u3005-\u3005]|[\u3031-\u3035]|[\u309D-\u309E]|[\u30FC-\u30FE]|[\uFF70-\uFF70]|[\uFF9E-\uFF9F]|[\u01AA-\u01AA]|[\u01BB-\u01BB]|[\u01BE-\u01C3]|[\u03F3-\u03F3]|[\u04C0-\u04C0]|[\u05D0-\u05EA]|[\u05F0-\u05F2]|[\u0621-\u063A]|[\u0641-\u064A]|[\u0671-\u06B7]|[\u06BA-\u06BE]|[\u06C0-\u06CE]|[\u06D0-\u06D3]|[\u06D5-\u06D5]|[\u0905-\u0939]|[\u093D-\u093D]|[\u0950-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E33]|[\u0E40-\u0E45]|[\u0E81-\u0E82]|[\u0E84-\u0E84]|[\u0E87-\u0E88]|[\u0E8A-\u0E8A]|[\u0E8D-\u0E8D]|[\u0E94-\u0E97]|[\u0E99-\u0E9F]|[\u0EA1-\u0EA3]|[\u0EA5-\u0EA5]|[\u0EA7-\u0EA7]|[\u0EAA-\u0EAB]|[\u0EAD-\u0EB0]|[\u0EB2-\u0EB3]|[\u0EBD-\u0EBD]|[\u0EC0-\u0EC4]|[\u0EDC-\u0EDD]|[\u0F00-\u0F00]|[\u0F40-\u0F47]|[\u0F49-\u0F69]|[\u0F88-\u0F8B]|[\u1100-\u1159]|[\u115F-\u11A2]|[\u11A8-\u11F9]|[\u2135-\u2138]|[\u3006-\u3006]|[\u3041-\u3094]|[\u30A1-\u30FA]|[\u3105-\u312C]|[\u3131-\u318E]|[\u4E00-\u9FA5]|[\uAC00-\uD7A3]|[\uF900-\uFA2D]|[\uFB1F-\uFB28]|[\uFB2A-\uFB36]|[\uFB38-\uFB3C]|[\uFB3E-\uFB3E]|[\uFB40-\uFB41]|[\uFB43-\uFB44]|[\uFB46-\uFBB1]|[\uFBD3-\uFD3D]|[\uFD50-\uFD8F]|[\uFD92-\uFDC7]|[\uFDF0-\uFDFB]|[\uFE70-\uFE72]|[\uFE74-\uFE74]|[\uFE76-\uFEFC]|[\uFF66-\uFF6F]|[\uFF71-\uFF9D]|[\uFFA0-\uFFBE]|[\uFFC2-\uFFC7]|[\uFFCA-\uFFCF]|[\uFFD2-\uFFD7]|[\uFFDA-\uFFDC]/,Lu:/[\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-\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u1EE4-\u1EE4]|[\u1EE6-\u1EE6]|[\u1EE8-\u1EE8]|[\u1EEA-\u1EEA]|[\u1EEC-\u1EEC]|[\u1EEE-\u1EEE]|[\u1EF0-\u1EF0]|[\u1EF2-\u1EF2]|[\u1EF4-\u1EF4]|[\u1EF6-\u1EF6]|[\u1EF8-\u1EF8]|[\u1F08-\u1F0F]|[\u1F18-\u1F1D]|[\u1F28-\u1F2F]|[\u1F38-\u1F3F]|[\u1F48-\u1F4D]|[\u1F59-\u1F59]|[\u1F5B-\u1F5B]|[\u1F5D-\u1F5D]|[\u1F5F-\u1F5F]|[\u1F68-\u1F6F]|[\u1F88-\u1F8F]|[\u1F98-\u1F9F]|[\u1FA8-\u1FAF]|[\u1FB8-\u1FBC]|[\u1FC8-\u1FCC]|[\u1FD8-\u1FDB]|[\u1FE8-\u1FEC]|[\u1FF8-\u1FFC]|[\u2102-\u2102]|[\u2107-\u2107]|[\u210B-\u210D]|[\u2110-\u2112]|[\u2115-\u2115]|[\u2119-\u211D]|[\u2124-\u2124]|[\u2126-\u2126]|[\u2128-\u2128]|[\u212A-\u212D]|[\u2130-\u2131]|[\u2133-\u2133]|[\uFF21-\uFF3A]/,Ll:/[\u0061-\u007A]|[\u00AA-\u00AA]|[\u00B5-\u00B5]|[\u00BA-\u00BA]|[\u00DF-\u00F6]|[\u00F8-\u00FF]|[\u0101-\u0101]|[\u0103-\u0103]|[\u0105-\u0105]|[\u0107-\u0107]|[\u0109-\u0109]|[\u010B-\u010B]|[\u010D-\u010D]|[\u010F-\u010F]|[\u0111-\u0111]|[\u0113-\u0113]|[\u0115-\u0115]|[\u0117-\u0117]|[\u0119-\u0119]|[\u011B-\u011B]|[\u011D-\u011D]|[\u011F-\u011F]|[\u0121-\u0121]|[\u0123-\u0123]|[\u0125-\u0125]|[\u0127-\u0127]|[\u0129-\u0129]|[\u012B-\u012B]|[\u012D-\u012D]|[\u012F-\u012F]|[\u0131-\u0131]|[\u0133-\u0133]|[\u0135-\u0135]|[\u0137-\u0138]|[\u013A-\u013A]|[\u013C-\u013C]|[\u013E-\u013E]|[\u0140-\u0140]|[\u0142-\u0142]|[\u0144-\u0144]|[\u0146-\u0146]|[\u0148-\u0149]|[\u014B-\u014B]|[\u014D-\u014D]|[\u014F-\u014F]|[\u0151-\u0151]|[\u0153-\u0153]|[\u0155-\u0155]|[\u0157-\u0157]|[\u0159-\u0159]|[\u015B-\u015B]|[\u015D-\u015D]|[\u015F-\u015F]|[\u0161-\u0161]|[\u0163-\u0163]|[\u0165-\u0165]|[\u0167-\u0167]|[\u0169-\u0169]|[\u016B-\u016B]|[\u016D-\u016D]|[\u016F-\u016F]|[\u0171-\u0171]|[\u0173-\u0173]|[\u0175-\u0175]|[\u0177-\u0177]|[\u017A-\u017A]|[\u017C-\u017C]|[\u017E-\u0180]|[\u0183-\u0183]|[\u0185-\u0185]|[\u0188-\u0188]|[\u018C-\u018D]|[\u0192-\u0192]|[\u0195-\u0195]|[\u0199-\u019B]|[\u019E-\u019E]|[\u01A1-\u01A1]|[\u01A3-\u01A3]|[\u01A5-\u01A5]|[\u01A8-\u01A8]|[\u01AB-\u01AB]|[\u01AD-\u01AD]|[\u01B0-\u01B0]|[\u01B4-\u01B4]|[\u01B6-\u01B6]|[\u01B9-\u01BA]|[\u01BD-\u01BD]|[\u01C6-\u01C6]|[\u01C9-\u01C9]|[\u01CC-\u01CC]|[\u01CE-\u01CE]|[\u01D0-\u01D0]|[\u01D2-\u01D2]|[\u01D4-\u01D4]|[\u01D6-\u01D6]|[\u01D8-\u01D8]|[\u01DA-\u01DA]|[\u01DC-\u01DD]|[\u01DF-\u01DF]|[\u01E1-\u01E1]|[\u01E3-\u01E3]|[\u01E5-\u01E5]|[\u01E7-\u01E7]|[\u01E9-\u01E9]|[\u01EB-\u01EB]|[\u01ED-\u01ED]|[\u01EF-\u01F0]|[\u01F3-\u01F3]|[\u01F5-\u01F5]|[\u01FB-\u01FB]|[\u01FD-\u01FD]|[\u01FF-\u01FF]|[\u0201-\u0201]|[\u0203-\u0203]|[\u0205-\u0205]|[\u0207-\u0207]|[\u0209-\u0209]|[\u020B-\u020B]|[\u020D-\u020D]|[\u020F-\u020F]|[\u0211-\u0211]|[\u0213-\u0213]|[\u0215-\u0215]|[\u0217-\u0217]|[\u0250-\u02A8]|[\u0390-\u0390]|[\u03AC-\u03CE]|[\u03D0-\u03D1]|[\u03D5-\u03D6]|[\u03E3-\u03E3]|[\u03E5-\u03E5]|[\u03E7-\u03E7]|[\u03E9-\u03E9]|[\u03EB-\u03EB]|[\u03ED-\u03ED]|[\u03EF-\u03F2]|[\u0430-\u044F]|[\u0451-\u045C]|[\u045E-\u045F]|[\u0461-\u0461]|[\u0463-\u0463]|[\u0465-\u0465]|[\u0467-\u0467]|[\u0469-\u0469]|[\u046B-\u046B]|[\u046D-\u046D]|[\u046F-\u046F]|[\u0471-\u0471]|[\u0473-\u0473]|[\u0475-\u0475]|[\u0477-\u0477]|[\u0479-\u0479]|[\u047B-\u047B]|[\u047D-\u047D]|[\u047F-\u047F]|[\u0481-\u0481]|[\u0491-\u0491]|[\u0493-\u0493]|[\u0495-\u0495]|[\u0497-\u0497]|[\u0499-\u0499]|[\u049B-\u049B]|[\u049D-\u049D]|[\u049F-\u049F]|[\u04A1-\u04A1]|[\u04A3-\u04A3]|[\u04A5-\u04A5]|[\u04A7-\u04A7]|[\u04A9-\u04A9]|[\u04AB-\u04AB]|[\u04AD-\u04AD]|[\u04AF-\u04AF]|[\u04B1-\u04B1]|[\u04B3-\u04B3]|[\u04B5-\u04B5]|[\u04B7-\u04B7]|[\u04B9-\u04B9]|[\u04BB-\u04BB]|[\u04BD-\u04BD]|[\u04BF-\u04BF]|[\u04C2-\u04C2]|[\u04C4-\u04C4]|[\u04C8-\u04C8]|[\u04CC-\u04CC]|[\u04D1-\u04D1]|[\u04D3-\u04D3]|[\u04D5-\u04D5]|[\u04D7-\u04D7]|[\u04D9-\u04D9]|[\u04DB-\u04DB]|[\u04DD-\u04DD]|[\u04DF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1F27]|[\u1F30-\u1F37]|[\u1F40-\u1F45]|[\u1F50-\u1F57]|[\u1F60-\u1F67]|[\u1F70-\u1F7D]|[\u1F80-\u1F87]|[\u1F90-\u1F97]|[\u1FA0-\u1FA7]|[\u1FB0-\u1FB4]|[\u1FB6-\u1FB7]|[\u1FBE-\u1FBE]|[\u1FC2-\u1FC4]|[\u1FC6-\u1FC7]|[\u1FD0-\u1FD3]|[\u1FD6-\u1FD7]|[\u1FE0-\u1FE7]|[\u1FF2-\u1FF4]|[\u1FF6-\u1FF7]|[\u207F-\u207F]|[\u210A-\u210A]|[\u210E-\u210F]|[\u2113-\u2113]|[\u2118-\u2118]|[\u212E-\u212F]|[\u2134-\u2134]|[\uFB00-\uFB06]|[\uFB13-\uFB17]|[\uFF41-\uFF5A]/, +Lt:/[\u01C5-\u01C5]|[\u01C8-\u01C8]|[\u01CB-\u01CB]|[\u01F2-\u01F2]/,Lm:/[\u02B0-\u02B8]|[\u02BB-\u02C1]|[\u02D0-\u02D1]|[\u02E0-\u02E4]|[\u037A-\u037A]|[\u0559-\u0559]|[\u0640-\u0640]|[\u06E5-\u06E6]|[\u0E46-\u0E46]|[\u0EC6-\u0EC6]|[\u3005-\u3005]|[\u3031-\u3035]|[\u309D-\u309E]|[\u30FC-\u30FE]|[\uFF70-\uFF70]|[\uFF9E-\uFF9F]/,Lo:/[\u01AA-\u01AA]|[\u01BB-\u01BB]|[\u01BE-\u01C3]|[\u03F3-\u03F3]|[\u04C0-\u04C0]|[\u05D0-\u05EA]|[\u05F0-\u05F2]|[\u0621-\u063A]|[\u0641-\u064A]|[\u0671-\u06B7]|[\u06BA-\u06BE]|[\u06C0-\u06CE]|[\u06D0-\u06D3]|[\u06D5-\u06D5]|[\u0905-\u0939]|[\u093D-\u093D]|[\u0950-\u0950]|[\u0958-\u0961]|[\u0985-\u098C]|[\u098F-\u0990]|[\u0993-\u09A8]|[\u09AA-\u09B0]|[\u09B2-\u09B2]|[\u09B6-\u09B9]|[\u09DC-\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|[\u0E99-\u0E9F]|[\u0EA1-\u0EA3]|[\u0EA5-\u0EA5]|[\u0EA7-\u0EA7]|[\u0EAA-\u0EAB]|[\u0EAD-\u0EB0]|[\u0EB2-\u0EB3]|[\u0EBD-\u0EBD]|[\u0EC0-\u0EC4]|[\u0EDC-\u0EDD]|[\u0F00-\u0F00]|[\u0F40-\u0F47]|[\u0F49-\u0F69]|[\u0F88-\u0F8B]|[\u1100-\u1159]|[\u115F-\u11A2]|[\u11A8-\u11F9]|[\u2135-\u2138]|[\u3006-\u3006]|[\u3041-\u3094]|[\u30A1-\u30FA]|[\u3105-\u312C]|[\u3131-\u318E]|[\u4E00-\u9FA5]|[\uAC00-\uD7A3]|[\uF900-\uFA2D]|[\uFB1F-\uFB28]|[\uFB2A-\uFB36]|[\uFB38-\uFB3C]|[\uFB3E-\uFB3E]|[\uFB40-\uFB41]|[\uFB43-\uFB44]|[\uFB46-\uFBB1]|[\uFBD3-\uFD3D]|[\uFD50-\uFD8F]|[\uFD92-\uFDC7]|[\uFDF0-\uFDFB]|[\uFE70-\uFE72]|[\uFE74-\uFE74]|[\uFE76-\uFEFC]|[\uFF66-\uFF6F]|[\uFF71-\uFF9D]|[\uFFA0-\uFFBE]|[\uFFC2-\uFFC7]|[\uFFCA-\uFFCF]|[\uFFD2-\uFFD7]|[\uFFDA-\uFFDC]/,Nl:/[\u2160-\u2182]|[\u3007-\u3007]|[\u3021-\u3029]/,Mn:/[\u0300-\u0345]|[\u0360-\u0361]|[\u0483-\u0486]|[\u0591-\u05A1]|[\u05A3-\u05B9]|[\u05BB-\u05BD]|[\u05BF-\u05BF]|[\u05C1-\u05C2]|[\u05C4-\u05C4]|[\u064B-\u0652]|[\u0670-\u0670]|[\u06D6-\u06DC]|[\u06DF-\u06E4]|[\u06E7-\u06E8]|[\u06EA-\u06ED]|[\u0901-\u0902]|[\u093C-\u093C]|[\u0941-\u0948]|[\u094D-\u094D]|[\u0951-\u0954]|[\u0962-\u0963]|[\u0981-\u0981]|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0AC9]|[\u0ACB-\u0ACC]|[\u0B02-\u0B03]|[\u0B3E-\u0B3E]|[\u0B40-\u0B40]|[\u0B47-\u0B48]|[\u0B4B-\u0B4C]|[\u0B57-\u0B57]|[\u0B83-\u0B83]|[\u0BBE-\u0BBF]|[\u0BC1-\u0BC2]|[\u0BC6-\u0BC8]|[\u0BCA-\u0BCC]|[\u0BD7-\u0BD7]|[\u0C01-\u0C03]|[\u0C41-\u0C44]|[\u0C82-\u0C83]|[\u0CBE-\u0CBE]|[\u0CC0-\u0CC4]|[\u0CC7-\u0CC8]|[\u0CCA-\u0CCB]|[\u0CD5-\u0CD6]|[\u0D02-\u0D03]|[\u0D3E-\u0D40]|[\u0D46-\u0D48]|[\u0D4A-\u0D4C]|[\u0D57-\u0D57]|[\u0F3E-\u0F3F]|[\u0F7F-\u0F7F]/,Nd:/[\u0030-\u0039]|[\u0660-\u0669]|[\u06F0-\u06F9]|[\u0966-\u096F]|[\u09E6-\u09EF]|[\u0A66-\u0A6F]|[\u0AE6-\u0AEF]|[\u0B66-\u0B6F]|[\u0BE7-\u0BEF]|[\u0C66-\u0C6F]|[\u0CE6-\u0CEF]|[\u0D66-\u0D6F]|[\u0E50-\u0E59]|[\u0ED0-\u0ED9]|[\u0F20-\u0F29]|[\uFF10-\uFF19]/,Pc:/[\u005F-\u005F]|[\u203F-\u2040]|[\u30FB-\u30FB]|[\uFE33-\uFE34]|[\uFE4D-\uFE4F]|[\uFF3F-\uFF3F]|[\uFF65-\uFF65]/,Zs:/[\u2000-\u200B]|[\u3000-\u3000]/}},{}]},{},[28])(28)}); diff --git a/src/Interval.js b/src/Interval.js index 28cea9ff..c91254f4 100644 --- a/src/Interval.js +++ b/src/Interval.js @@ -49,7 +49,8 @@ Interval.prototype = { }, getLineAndColumnMessage: function() { - return util.getLineAndColumnMessage(this.inputStream.source, this.startIdx); + var range = [this.startIdx, this.endIdx]; + return util.getLineAndColumnMessage(this.inputStream.source, this.startIdx, range); }, // Returns a new Interval which contains the same contents as this one, diff --git a/src/errors.js b/src/errors.js index f4ec666d..cd9b39b9 100644 --- a/src/errors.js +++ b/src/errors.js @@ -56,6 +56,18 @@ var GrammarSyntaxError = makeCustomError( } ); +var UnrecognizedEscapeSequence = makeCustomError( + 'ohm.error.UnrecognizedEscapeSequence', + function(interval) { + this.interval = interval; + var seq = interval.contents; + var c = seq[1]; + this.message = interval.getLineAndColumnMessage() + + 'Unrecognized escape sequence "' + seq + '". Did you mean ' + + JSON.stringify(seq) + ' or ' + JSON.stringify(c) + '?'; + } +); + // Undeclared grammar var UndeclaredGrammar = makeCustomError( @@ -261,6 +273,7 @@ module.exports = { MultipleErrors: MultipleErrors, UndeclaredGrammar: UndeclaredGrammar, UndeclaredRule: UndeclaredRule, + UnrecognizedEscapeSequence: UnrecognizedEscapeSequence, WrongNumberOfParameters: WrongNumberOfParameters, throwErrors: function(errors) { diff --git a/src/main.js b/src/main.js index 97da7971..87c882c0 100644 --- a/src/main.js +++ b/src/main.js @@ -243,10 +243,13 @@ function buildGrammar(match, namespace, optOhmGrammarForTesting) { }, strChar: function(_) { - return this.interval.contents; + return _.visit(); }, - escapeChar: function(_) { + escapeChar: function(child) { + if (child.ctorName === 'escapeChar_unrecognized') { + throw new errors.UnrecognizedEscapeSequence(child.interval); + } return this.interval.contents; }, diff --git a/src/ohm-grammar.ohm b/src/ohm-grammar.ohm index 72b37e46..907bbb96 100644 --- a/src/ohm-grammar.ohm +++ b/src/ohm-grammar.ohm @@ -101,6 +101,10 @@ Ohm { | "\\t" -- tab | "\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape | "\\x" hexDigit hexDigit -- hexEscape + | "\\" ~controlChar ~" " _ -- unrecognized + + controlChar + = /[\000-\037]/ regExp (a regular expression) = "/" reCharClass "/" diff --git a/test/ohm-spec.js b/test/ohm-spec.js index fa70e3f5..087f116f 100644 --- a/test/ohm-spec.js +++ b/test/ohm-spec.js @@ -390,41 +390,30 @@ test('char', function(t) { test('string', function(t) { var m = ohm.grammar('M { foo = "foo\\b\\n\\r\\t\\\\\\\"\\u01bcff\\x8f" }'); - test('direct match, no stream', function(t) { - it('recognition', function() { - t.ok(m.match('foo\b\n\r\t\\"')); - t.equal(m.match('foo1').failed(), true); - t.equal(m.match('bar').failed(), true); - t.equal(m.match(null).failed(), true); - }); - - it('semantic actions', function() { - var s = m.semantics().addAttribute('v', {}); - var cst = m.match('foo\b\n\r\t\\"\u01bcff\x8f'); - t.equal(s(cst).v, 'foo\b\n\r\t\\"\u01bcff\x8f'); - }); - - it('unrecognized escape characters are parse errors', function() { - t.throws(function() { ohm.grammar('G { r = "\\w" }'); }, /Failed to parse grammar/); - }); + it('recognition', function() { + t.ok(m.match('foo\b\n\r\t\\"')); + t.equal(m.match('foo1').failed(), true); + t.equal(m.match('bar').failed(), true); + t.equal(m.match(null).failed(), true); + }); - t.end(); + it('semantic actions', function() { + var s = m.semantics().addAttribute('v', {}); + var cst = m.match('foo\b\n\r\t\\"\u01bcff\x8f'); + t.equal(s(cst).v, 'foo\b\n\r\t\\"\u01bcff\x8f'); }); - test('match in string stream', function(t) { - it('recognition', function() { - t.ok(m.match('foo\b\n\r\t\\"\u01bcff\x8f')); - t.equal(m.match('foo1').failed(), true); - t.equal(m.match('bar').failed(), true); - }); + // Printable chars after "\" throw UnrecognizedEscapeSequence. + t.throws(function() { ohm.grammar('G { r = "\\w" }'); }, /Unrecognized escape sequence/); + t.throws(function() { ohm.grammar('G { r = "\\!" }'); }, /Unrecognized escape sequence/); + t.throws(function() { ohm.grammar('G { r = "\\~" }'); }, /Unrecognized escape sequence/); + + // Non-printable chars or " " after "\" are just a regular parse error. + t.throws(function() { ohm.grammar('G { r = "\\\0" }'); }, /Failed to parse grammar/); + t.throws(function() { ohm.grammar('G { r = "\\\n" }'); }, /Failed to parse grammar/); + t.throws(function() { ohm.grammar('G { r = "\\\t" }'); }, /Failed to parse grammar/); + t.throws(function() { ohm.grammar('G { r = "\\ " }'); }, /Failed to parse grammar/); - it('semantic actions', function() { - var s = m.semantics().addAttribute('v', {}); - var cst = m.match('foo\b\n\r\t\\"\u01bcff\x8f'); - t.equal(s(cst).v, 'foo\b\n\r\t\\"\u01bcff\x8f'); - }); - t.end(); - }); t.end(); }); diff --git a/test/test-errors.js b/test/test-errors.js index 1568cda6..6d47c37f 100644 --- a/test/test-errors.js +++ b/test/test-errors.js @@ -89,7 +89,7 @@ test('many expressions with nullable operands', function(t) { t.equal(e.message, [ 'Line 1, col 14:', '> 1 | G { start = ("a"?)*}', - ' ^', + ' ^~~~', 'Nullable expression "a"? is not allowed inside \'*\' (possible infinite loop)'].join('\n')); } @@ -100,7 +100,7 @@ test('many expressions with nullable operands', function(t) { t.equal(e.message, [ 'Line 1, col 14:', '> 1 | G { start = ("a"?)+}', - ' ^', + ' ^~~~', 'Nullable expression "a"? is not allowed inside \'+\' (possible infinite loop)'].join('\n')); } @@ -142,3 +142,19 @@ test('errors from makeGrammar()', function(t) { t.end(); }); + +test('unrecognized escape sequences', function(t) { + function getExceptionMessage(ruleBody) { + try { + ohm.grammar('G { r = ' + ruleBody + ' }'); + t.fail('Expected an exception to be thrown'); + } catch (e) { + return e.message; + } + } + + t.ok(getExceptionMessage('"\\!"').match(/Did you mean "\\\\!" or "!"?/), '"\\!"'); + t.ok(getExceptionMessage('"\\w"').match(/Did you mean "\\\\w" or "w"?/), '"\\w"'); + + t.end(); +});