From 45972f9a6a0b689abbf8815cf40511cf99e4bbdc Mon Sep 17 00:00:00 2001 From: Alessandro Warth Date: Tue, 2 Jun 2015 23:19:27 -0700 Subject: [PATCH] (1) brought back the ability to write semantic actions for _iter nodes. (2) added default behaviors for _iter and _terminal nodes, that way most people will never have to worry about them. (3) added default implementation of _default action that does what ohm.actions.passThrough used to do. (4) got rid of the default semantic actions (ohm.actions) because now that's what you get automatically. --- dist/ohm.js | 149 +++++++++++++++++++------------ dist/ohm.min.js | 10 +-- examples/math/index.html | 31 +++++-- examples/viz/index.html | 3 +- src/Grammar.js | 10 ++- src/Semantics.js | 77 ++++++++-------- src/main.js | 7 +- test/ohm-spec.js | 137 +++++++--------------------- test/test-parameterized-rules.js | 17 +--- test/test-semantics.js | 38 +++----- 10 files changed, 214 insertions(+), 265 deletions(-) diff --git a/dist/ohm.js b/dist/ohm.js index b43cc2a6..a72b2229 100644 --- a/dist/ohm.js +++ b/dist/ohm.js @@ -2240,6 +2240,12 @@ Grammar.prototype = { _terminal: function() { this._node.parent = stack[stack.length - 1]; }, + _iter: function(children) { + stack.push(this._node); + children.forEach(function(child) { child.setParents(); }); + stack.pop(); + this._node.parent = stack[stack.length - 1]; + }, _default: function(children) { stack.push(this._node); children.forEach(function(child) { child.setParents(); }); @@ -2277,7 +2283,7 @@ Grammar.prototype = { // a function of the correct arity. If not, throw an exception. _checkTopDownActionDict: function(what, name, actionDict) { function isSpecialAction(name) { - return name === '_terminal' || name === '_default'; + return name === '_terminal' || name === '_iter' || name === '_default'; } var problems = []; @@ -2311,7 +2317,7 @@ Grammar.prototype = { // Return the expected arity for a semantic action named `actionName`, which // is either a rule name or a special action name like '_default'. _topDownActionArity: function(actionName) { - if (actionName === '_default') { + if (actionName === '_default' || actionName === '_iter') { return 1; } else if (actionName === '_terminal') { return 0; @@ -2389,7 +2395,6 @@ Grammar.prototype = { // TODO: add the super-grammar's templates at the right place, e.g., a case for AddExpr_plus // should appear next to other cases of AddExpr. - var self = this; var sb = new common.StringBuffer(); sb.append('{'); @@ -3257,7 +3262,37 @@ Semantics.prototype.addOperationOrAttribute = function(type, name, actionDict) { var Ctor = type === 'operation' ? Operation : Attribute; this.assertNewName(name, type); - this[typePlural][name] = new Ctor(name, actionDict); + + // Create the action dictionary for this operation / attribute. We begin by defining the default + // behavior of terminal and iteration nodes, and add a '_default' action that throws an error if + // a rule in the grammar doesn't have a corresponding action in this operation / attribute... + var realActionDict = { + _terminal: function() { + return this.primitiveValue; + }, + _iter: function(children) { + // This CST node corresponds to an iteration expression in the grammar (*, +, or ?). The + // default behavior is to map this operation or attribute over all of its child nodes. + var thisSemantics = this._semantics; + var thisThing = thisSemantics[typePlural][name]; + return children.map(function(child) { return thisThing.execute(thisSemantics, child); }); + }, + _default: function(children) { + if (children.length === 1) { + var thisSemantics = this._semantics; + var thisThing = thisSemantics[typePlural][name]; + return thisThing.execute(thisSemantics, children[0]); + } + throw new Error('missing semantic action for ' + this.ctorName + ' in ' + name + ' ' + type); + } + }; + // ... and add in the actions supplied by the programmer, which may override some or all of the + // default ones. + Object.keys(actionDict).forEach(function(name) { + realActionDict[name] = actionDict[name]; + }); + + this[typePlural][name] = new Ctor(name, realActionDict); // The following check is not strictly necessary (it will happen later anyway) but it's better to // catch errors early. @@ -3386,19 +3421,6 @@ Semantics.createSemantics = function(grammar, optSuperSemantics) { return proxy; }; -// ----------------- Default semantic actions ----------------- - -var actions = { - getPrimitiveValue: function() { - return this.primitiveValue; - }, - passThrough: function(childNode) { - throw new Error('BUG: ohm.actions.passThrough should never be called'); - } -}; - -Semantics.actions = actions; - // ----------------- Operation ----------------- // An Operation represents a function to be applied to a concrete syntax tree (CST) -- it's very @@ -3420,34 +3442,19 @@ Operation.prototype.checkActionDict = function(grammar) { // Execute this operation on the CST node associated with `nodeWrapper` in the context of the given // Semantics instance. Operation.prototype.execute = function(semantics, nodeWrapper) { - if (nodeWrapper.isIteration()) { - // This CST node corresponds to an iteration expression in the grammar (*, +, or ?), so we map - // this operation over all of its child nodes. - var results = []; - for (var idx = 0; idx < nodeWrapper._node.numChildren(); idx++) { - results.push(this.execute(semantics, nodeWrapper.child(idx))); - } - return results; - } - // Look for a semantic action whose name matches the node's constructor name, which is either the - // name of a rule in the grammar, or the special value '_terminal'. + // name of a rule in the grammar, or '_terminal' (for a terminal node), or '_iter' (for an + // iteration node). In the latter case, the action function receives a single argument, which is + // an array containing all of the children of the CST node. var actionFn = this.actionDict[nodeWrapper._node.ctorName]; if (actionFn) { - return this.doAction(semantics, nodeWrapper, actionFn); + return this.doAction(semantics, nodeWrapper, actionFn, nodeWrapper.isIteration()); } // The action dictionary does not contain a semantic action for this specific type of node, so - // invoke the '_default' semantic action if it exists (but only if this node is not a terminal). - var defaultActionFn = this.actionDict._default; - if (defaultActionFn && !nodeWrapper.isTerminal()) { - return this.doAction(semantics, nodeWrapper, defaultActionFn, true); - } - - // The programmer hasn't written a semantic action for this type of node yet. - throw new Error( - 'missing semantic action for ' + nodeWrapper._node.ctorName + ' in ' + this.name + ' ' + - this.typeName); + // invoke the '_default' semantic action. The built-in implementation of the `_default` semantic + // action just throws an error, but the programmer may have overridden it. + return this.doAction(semantics, nodeWrapper, this.actionDict._default, true); }; // Invoke `actionFn` on the CST node that corresponds to `nodeWrapper`, in the context of @@ -3455,9 +3462,6 @@ Operation.prototype.execute = function(semantics, nodeWrapper) { // argument, which is an array of wrappers. Otherwise, the number of arguments to `actionFn` will // be equal to the number of children in the CST node. Operation.prototype.doAction = function(semantics, nodeWrapper, actionFn, optPassChildrenAsArray) { - if (actionFn === actions.passThrough) { - return this.execute(semantics, nodeWrapper._onlyChild()); - } return optPassChildrenAsArray ? actionFn.call(nodeWrapper, nodeWrapper._children()) : actionFn.apply(nodeWrapper, nodeWrapper._children()); @@ -3823,10 +3827,6 @@ var extend = _dereq_('util-extend'); // Helpers -function repeatStr(str, n) { - return new Array(n + 1).join(str); -} - var escapeStringFor = {}; for (var c = 0; c < 128; c++) { escapeStringFor[c] = String.fromCharCode(c); @@ -3849,6 +3849,12 @@ exports.abstract = function() { throw new Error('this method is abstract!'); }; +exports.assert = function(cond, message) { + if (!cond) { + throw new Error(message); + } +}; + // Define a lazily-computed, non-enumerable property named `propName` // on the object `obj`. `getterFn` will be called to compute the value the // first time the property is accessed. @@ -3881,6 +3887,10 @@ exports.repeatFn = function(fn, n) { 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); }; @@ -3906,7 +3916,7 @@ exports.isSyntactic = function(ruleName) { exports.padLeft = function(str, len, optChar) { var ch = optChar || ' '; if (str.length < len) { - return repeatStr(ch, len - str.length) + str; + return exports.repeatStr(ch, len - str.length) + str; } return str; }; @@ -4288,7 +4298,6 @@ module.exports = { var Builder = _dereq_('./Builder'); var Grammar = _dereq_('./Grammar'); var Namespace = _dereq_('./Namespace'); -var Semantics = _dereq_('./Semantics'); var UnicodeCategories = _dereq_('../third_party/unicode').UnicodeCategories; var common = _dereq_('./common'); var errors = _dereq_('./errors'); @@ -4554,10 +4563,7 @@ function buildGrammar(match, namespace, optOhmGrammarForTesting) { }, ListOf_none: function() { return []; - }, - - _terminal: Semantics.actions.getPrimitiveValue, - _default: Semantics.actions.passThrough + } }); return helpers(match).visit(); } @@ -4658,7 +4664,6 @@ function makeRecipe(recipeFn) { // Stuff that users should know about module.exports = { - actions: Semantics.actions, createNamespace: Namespace.createNamespace, error: errors, grammar: grammar, @@ -4677,7 +4682,7 @@ module.exports._setDocumentInterfaceForTesting = function(doc) { documentInterfa module.exports.ohmGrammar = ohmGrammar; }).call(this,_dereq_("buffer").Buffer) -},{"../dist/built-in-rules":1,"../dist/ohm-grammar":2,"../third_party/unicode":46,"./Builder":15,"./Grammar":16,"./Namespace":21,"./Semantics":23,"./common":26,"./errors":27,"./util":45,"buffer":3}],29:[function(_dereq_,module,exports){ +},{"../dist/built-in-rules":1,"../dist/ohm-grammar":2,"../third_party/unicode":46,"./Builder":15,"./Grammar":16,"./Namespace":21,"./common":26,"./errors":27,"./util":45,"buffer":3}],29:[function(_dereq_,module,exports){ 'use strict'; var inherits = _dereq_('inherits'); @@ -6453,6 +6458,15 @@ function padNumbersToEqualLength(arr) { return strings.map(function(s) { return common.padLeft(s, maxLen); }); } +// Produce a new string that would be the result of copying the contents +// of the string `src` onto `dest` at offset `offest`. +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 // -------------------------------------------------------------------- @@ -6515,7 +6529,9 @@ exports.getLineAndColumn = function(str, offset) { // Return a nicely-formatted string describing the line and column for the // given offset in `str`. -exports.getLineAndColumnMessage = function(str, offset) { +exports.getLineAndColumnMessage = function(str, offset /* ...ranges */) { + var repeatStr = common.repeatStr; + var lineAndCol = exports.getLineAndColumn(str, offset); var sb = new common.StringBuffer(); sb.append('Line ' + lineAndCol.lineNum + ', col ' + lineAndCol.colNum + ':\n'); @@ -6539,9 +6555,26 @@ exports.getLineAndColumnMessage = function(str, offset) { // Line that the error occurred on. appendLine(1, lineAndCol.line, '> '); - // Line indicating the column on which the error occurred. + // Build up the line that points to the offset and possible indicates one or more ranges. + // Start with a blank line, and indicate each range by overlaying a string of `~` chars. + var lineLen = lineAndCol.line.length; + var indicationLine = repeatStr(' ', lineLen + 1); + var ranges = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < ranges.length; ++i) { + var startIdx = ranges[i][0]; + var endIdx = ranges[i][1]; + common.assert(startIdx >= 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(common.padLeft('^', gutterWidth + lineAndCol.colNum) + '\n'); + sb.append(repeatStr(' ', gutterWidth)); + indicationLine = strcpy(indicationLine, '^', lineAndCol.colNum - 1); + sb.append(indicationLine.replace(/ +$/, '') + '\n'); // Include the next line for context if possible. if (lineAndCol.nextLine != null) { @@ -6584,6 +6617,6 @@ exports.UnicodeCategories = { }; },{}]},{},[28]) -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2Jyb3dzZXItcGFjay9fcHJlbHVkZS5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vZGlzdC9idWlsdC1pbi1ydWxlcy5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vZGlzdC9vaG0tZ3JhbW1hci5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2J1ZmZlci9pbmRleC5qcyIsIi9Vc2Vycy9hd2FydGgvcHJvZy9vaG0vbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2J1ZmZlci9ub2RlX21vZHVsZXMvYmFzZTY0LWpzL2xpYi9iNjQuanMiLCIvVXNlcnMvYXdhcnRoL3Byb2cvb2htL25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9idWZmZXIvbm9kZV9tb2R1bGVzL2llZWU3NTQvaW5kZXguanMiLCIvVXNlcnMvYXdhcnRoL3Byb2cvb2htL25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9jcnlwdG8tYnJvd3NlcmlmeS9oZWxwZXJzLmpzIiwiL1VzZXJzL2F3YXJ0aC9wcm9nL29obS9ub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvY3J5cHRvLWJy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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"){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 self=this;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.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 Semantics=_dereq_("./Semantics");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[]},_terminal:Semantics.actions.getPrimitiveValue,_default:Semantics.actions.passThrough});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)})}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 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 gutterWidth=2+lineNumbers[1].length+3;sb.append(common.padLeft("^",gutterWidth+lineAndCol.colNum)+"\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]|[\u1E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|[\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]|[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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-\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]|[\u0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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]|[\u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124]|[\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-\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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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]|[\u0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FDFB]|[\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]|[\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-\u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\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)}); +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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\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]|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\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-\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-\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71-\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]|[\u1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101]|[\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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AA]|[\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-\u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182]|[\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]|[\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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B]|[\uFE33-\uFE34]|[\uFE4D-\uFE4F]|[\uFF3F-\uFF3F]|[\uFF65-\uFF65]/,Zs:/[\u2000-\u200B]|[\u3000-\u3000]/}},{}]},{},[28])(28)}); diff --git a/examples/math/index.html b/examples/math/index.html index ae124f7f..9f99826a 100644 --- a/examples/math/index.html +++ b/examples/math/index.html @@ -333,7 +333,24 @@ PriExp_neg: function(_, e) { return ['neg', e.asLisp]; }, ident: function(_, _) { return this.interval.contents; }, number: function(_) { return this.interval.contents; }, - _default: ohm.actions.passThrough // TODO: Explain _default. + + /* + You can optionally provide a _default semantic action that will be invoked when the action + dictionary does not have a method that corresponds to the type of a CST node. The receiver + (`this`) of the _default method is that CST node, _default's only argument is an array that + contains the children of that node. + */ + _default: function(children) { + if (children.length === 1) { + // If this node only has one child, just return the Lisp tree of its child. This lets us avoid + // writing semantic actions for the Exp, AddExp, MulExp, ExpExp, and PriExp rules. + return children[0].asLisp; + } else { + // Hmm, this probably means that we forgot to write a semantic action for one of the rules. + // We'll throw an exception so we'll know that it's missing. + throw new Error("Uh-oh, missing semantic action for " + this.constructor); + } + } }); /* @@ -363,8 +380,7 @@ PriExp_pos: function(sign, e) { return elt('pos', sign.toTree(), e.toTree()); }, PriExp_neg: function(sign, e) { return elt('neg', sign.toTree(), e.toTree()); }, ident: function(_, _) { return elt('ident', this.interval.contents); }, - number: function(_) { return elt('number', this.interval.contents); }, - _terminal: ohm.actions.getPrimitiveValue // TODO: explain _terminal, ohm...getPrimitiveValue + number: function(_) { return elt('number', this.interval.contents); } }); // ------------------------------------------------------------------------------------------------- @@ -387,9 +403,12 @@ PriExp_neg: function(sign, e) { return elt('neg', sign.toTwoD(), e.toTwoD()); }, ident: function(_, _) { var text = this.interval.contents; return elt('ident', text === 'pi' ? '\u03C0' : text); }, - number: function(_) { return elt('number', this.interval.contents); }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + number: function(_) { return elt('number', this.interval.contents); } + + // Remember the _default semantic action that we wrote for the `interpret` operation above? Turns + // out that's so convenient that the Ohm people decided to give it to you "for free", i.e., if you + // don't write a _default semantic action, you get that one automatically. Of course you're free + // to override it if that's not what you want, but in this case, it's exactly what we want. }); diff --git a/examples/viz/index.html b/examples/viz/index.html index ea715c12..0111909d 100644 --- a/examples/viz/index.html +++ b/examples/viz/index.html @@ -276,8 +276,7 @@ keyword_false: function(_) { add('prim', 'false'); }, - Prop: function(n, _, p) {}, - _terminal: ohm.actions.getPrimitiveValue + Prop: function(n, _, p) {} }); s.addOperation('vizChoice', { diff --git a/src/Grammar.js b/src/Grammar.js index a287737a..86508618 100644 --- a/src/Grammar.js +++ b/src/Grammar.js @@ -86,6 +86,12 @@ Grammar.prototype = { _terminal: function() { this._node.parent = stack[stack.length - 1]; }, + _iter: function(children) { + stack.push(this._node); + children.forEach(function(child) { child.setParents(); }); + stack.pop(); + this._node.parent = stack[stack.length - 1]; + }, _default: function(children) { stack.push(this._node); children.forEach(function(child) { child.setParents(); }); @@ -123,7 +129,7 @@ Grammar.prototype = { // a function of the correct arity. If not, throw an exception. _checkTopDownActionDict: function(what, name, actionDict) { function isSpecialAction(name) { - return name === '_terminal' || name === '_default'; + return name === '_terminal' || name === '_iter' || name === '_default'; } var problems = []; @@ -157,7 +163,7 @@ Grammar.prototype = { // Return the expected arity for a semantic action named `actionName`, which // is either a rule name or a special action name like '_default'. _topDownActionArity: function(actionName) { - if (actionName === '_default') { + if (actionName === '_default' || actionName === '_iter') { return 1; } else if (actionName === '_terminal') { return 0; diff --git a/src/Semantics.js b/src/Semantics.js index 19b328e7..4bc43399 100644 --- a/src/Semantics.js +++ b/src/Semantics.js @@ -181,7 +181,37 @@ Semantics.prototype.addOperationOrAttribute = function(type, name, actionDict) { var Ctor = type === 'operation' ? Operation : Attribute; this.assertNewName(name, type); - this[typePlural][name] = new Ctor(name, actionDict); + + // Create the action dictionary for this operation / attribute. We begin by defining the default + // behavior of terminal and iteration nodes, and add a '_default' action that throws an error if + // a rule in the grammar doesn't have a corresponding action in this operation / attribute... + var realActionDict = { + _terminal: function() { + return this.primitiveValue; + }, + _iter: function(children) { + // This CST node corresponds to an iteration expression in the grammar (*, +, or ?). The + // default behavior is to map this operation or attribute over all of its child nodes. + var thisSemantics = this._semantics; + var thisThing = thisSemantics[typePlural][name]; + return children.map(function(child) { return thisThing.execute(thisSemantics, child); }); + }, + _default: function(children) { + if (children.length === 1) { + var thisSemantics = this._semantics; + var thisThing = thisSemantics[typePlural][name]; + return thisThing.execute(thisSemantics, children[0]); + } + throw new Error('missing semantic action for ' + this.ctorName + ' in ' + name + ' ' + type); + } + }; + // ... and add in the actions supplied by the programmer, which may override some or all of the + // default ones. + Object.keys(actionDict).forEach(function(name) { + realActionDict[name] = actionDict[name]; + }); + + this[typePlural][name] = new Ctor(name, realActionDict); // The following check is not strictly necessary (it will happen later anyway) but it's better to // catch errors early. @@ -310,19 +340,6 @@ Semantics.createSemantics = function(grammar, optSuperSemantics) { return proxy; }; -// ----------------- Default semantic actions ----------------- - -var actions = { - getPrimitiveValue: function() { - return this.primitiveValue; - }, - passThrough: function(childNode) { - throw new Error('BUG: ohm.actions.passThrough should never be called'); - } -}; - -Semantics.actions = actions; - // ----------------- Operation ----------------- // An Operation represents a function to be applied to a concrete syntax tree (CST) -- it's very @@ -344,34 +361,19 @@ Operation.prototype.checkActionDict = function(grammar) { // Execute this operation on the CST node associated with `nodeWrapper` in the context of the given // Semantics instance. Operation.prototype.execute = function(semantics, nodeWrapper) { - if (nodeWrapper.isIteration()) { - // This CST node corresponds to an iteration expression in the grammar (*, +, or ?), so we map - // this operation over all of its child nodes. - var results = []; - for (var idx = 0; idx < nodeWrapper._node.numChildren(); idx++) { - results.push(this.execute(semantics, nodeWrapper.child(idx))); - } - return results; - } - // Look for a semantic action whose name matches the node's constructor name, which is either the - // name of a rule in the grammar, or the special value '_terminal'. + // name of a rule in the grammar, or '_terminal' (for a terminal node), or '_iter' (for an + // iteration node). In the latter case, the action function receives a single argument, which is + // an array containing all of the children of the CST node. var actionFn = this.actionDict[nodeWrapper._node.ctorName]; if (actionFn) { - return this.doAction(semantics, nodeWrapper, actionFn); + return this.doAction(semantics, nodeWrapper, actionFn, nodeWrapper.isIteration()); } // The action dictionary does not contain a semantic action for this specific type of node, so - // invoke the '_default' semantic action if it exists (but only if this node is not a terminal). - var defaultActionFn = this.actionDict._default; - if (defaultActionFn && !nodeWrapper.isTerminal()) { - return this.doAction(semantics, nodeWrapper, defaultActionFn, true); - } - - // The programmer hasn't written a semantic action for this type of node yet. - throw new Error( - 'missing semantic action for ' + nodeWrapper._node.ctorName + ' in ' + this.name + ' ' + - this.typeName); + // invoke the '_default' semantic action. The built-in implementation of the `_default` semantic + // action just throws an error, but the programmer may have overridden it. + return this.doAction(semantics, nodeWrapper, this.actionDict._default, true); }; // Invoke `actionFn` on the CST node that corresponds to `nodeWrapper`, in the context of @@ -379,9 +381,6 @@ Operation.prototype.execute = function(semantics, nodeWrapper) { // argument, which is an array of wrappers. Otherwise, the number of arguments to `actionFn` will // be equal to the number of children in the CST node. Operation.prototype.doAction = function(semantics, nodeWrapper, actionFn, optPassChildrenAsArray) { - if (actionFn === actions.passThrough) { - return this.execute(semantics, nodeWrapper._onlyChild()); - } return optPassChildrenAsArray ? actionFn.call(nodeWrapper, nodeWrapper._children()) : actionFn.apply(nodeWrapper, nodeWrapper._children()); diff --git a/src/main.js b/src/main.js index 90b66c11..97da7971 100644 --- a/src/main.js +++ b/src/main.js @@ -9,7 +9,6 @@ var Builder = require('./Builder'); var Grammar = require('./Grammar'); var Namespace = require('./Namespace'); -var Semantics = require('./Semantics'); var UnicodeCategories = require('../third_party/unicode').UnicodeCategories; var common = require('./common'); var errors = require('./errors'); @@ -275,10 +274,7 @@ function buildGrammar(match, namespace, optOhmGrammarForTesting) { }, ListOf_none: function() { return []; - }, - - _terminal: Semantics.actions.getPrimitiveValue, - _default: Semantics.actions.passThrough + } }); return helpers(match).visit(); } @@ -379,7 +375,6 @@ function makeRecipe(recipeFn) { // Stuff that users should know about module.exports = { - actions: Semantics.actions, createNamespace: Namespace.createNamespace, error: errors, grammar: grammar, diff --git a/test/ohm-spec.js b/test/ohm-spec.js index 0f47aa7b..fa70e3f5 100644 --- a/test/ohm-spec.js +++ b/test/ohm-spec.js @@ -53,8 +53,7 @@ function buildTreeNodeWithUniqueId(g) { _default: function(children) { return ['id', nextId++, this.ctorName] .concat(children.map(function(child) { return child.tree; })); - }, - _terminal: ohm.actions.getPrimitiveValue + } }); function makeTree(node) { return s(node).tree; } @@ -229,10 +228,7 @@ test('primitive patterns', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - _: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); t.equal(s(m.match(5, '_')).v, 5); t.equal(s(m.match(null, '_')).v, null); }); @@ -246,10 +242,7 @@ test('primitive patterns', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - _: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); t.equal(s(m.match('5', '_')).v, '5'); }); t.end(); @@ -261,10 +254,7 @@ test('primitive patterns', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - _: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); t.deepEqual(s(m.match(['123'], '_')).v, ['123']); }); t.end(); @@ -329,13 +319,7 @@ test('primitive patterns', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - five: ohm.actions.passThrough, - _true: ohm.actions.passThrough, - _false: ohm.actions.passThrough, - _null: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); t.equal(s(m.match(5)).v, 5); t.equal(s(m.match(true, '_true')).v, true); t.equal(s(m.match(false, '_false')).v, false); @@ -379,10 +363,7 @@ test('char', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - bang: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); var cst = m.match('!'); t.equal(s(cst).v, '!'); }); @@ -397,10 +378,7 @@ test('char', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - bang: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); var cst = m.match('!'); t.equal(s(cst).v, '!'); }); @@ -421,10 +399,7 @@ test('string', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - foo: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + 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'); }); @@ -444,10 +419,7 @@ test('string', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - foo: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + 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'); }); @@ -478,10 +450,7 @@ test('regexp', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - myDigit: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); var cst = m.match('4'); t.equal(s(cst).v, '4'); }); @@ -500,10 +469,7 @@ test('regexp', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - myLetter: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); var cst = m.match('a', 'myLetter'); t.equal(s(cst).v, 'a'); }); @@ -523,10 +489,7 @@ test('alt', function(t) { }); it('semantic actions', function() { - var s = m.semantics().addAttribute('v', { - altTest: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue - }); + var s = m.semantics().addAttribute('v', {}); t.equal(s(m.match('a')).v, 'a'); t.equal(s(m.match('b')).v, 'b'); }); @@ -653,8 +616,7 @@ test('kleene-* and kleene-+', function(t) { }, digit: function(expr) { return ['digit', expr.v]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match('1234', 'number')).v, [ 'digits', [ @@ -691,8 +653,7 @@ test('opt', function(t) { var s = m.semantics().addAttribute('v', { name: function(title, last) { return [title.children.length === 1 ? title.v[0] : undefined, last.primitiveValue]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match('drwarth')).v, ['dr', 'warth']); t.deepEqual(s(m.match('warth')).v, [undefined, 'warth']); @@ -756,9 +717,7 @@ test('arr', function(t) { var s = m.semantics().addAttribute('v', { start: function(_, y, x, _, _) { return [x.v, y.v]; - }, - _: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match(['abc', ['d', 'ef'], 'g'])).v, ['d', ['d', 'ef']]); }); @@ -831,8 +790,7 @@ test('obj', function(t) { var s = m.semantics().addAttribute('v', { withStringProps: function(foos, bar) { return [foos.v, bar.v]; - }, - _terminal: ohm.actions.getPrimitiveValue, + } }); t.deepEqual(s(m.match({foos: 'foofoo', bar: 'bar'}, 'withStringProps')).v, [ ['foo', 'foo'], 'bar' @@ -875,8 +833,7 @@ test('apply', function(t) { }, foo: function(expr) { return ['foo', expr.v]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match('foo')).v, ['easy', ['foo', 'foo']]); }); @@ -902,23 +859,19 @@ test('apply', function(t) { it('semantic actions', function() { var f = m.match('1234', 'number'); var s = m.semantics().addAttribute('v', { - number: ohm.actions.passThrough, numberRec: function(n, d) { return n.v * 10 + d.v; }, digit: function(expr) { return expr.v.charCodeAt(0) - '0'.charCodeAt(0); - }, - _terminal: ohm.actions.getPrimitiveValue + } }).addAttribute('t', { number: function(expr) { return ['number', expr.t]; }, numberRec: function(n, d) { return ['numberRec', n.t, d.t]; - }, - digit: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.equal(s(f).v, 1234); t.deepEqual(s(f).t, @@ -953,14 +906,9 @@ test('apply', function(t) { it('semantic actions', function() { var s = m.semantics().addAttribute('v', { - add: ohm.actions.passThrough, addRec: function(x, _, y) { return [x.v, '+', y.v]; - }, - pri: ohm.actions.passThrough, - priX: ohm.actions.passThrough, - priY: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match('x+y+x', 'add')).v, [['x', '+', 'y'], '+', 'x']); }); @@ -988,17 +936,9 @@ test('apply', function(t) { it('semantic actions', function() { var s = m.semantics().addAttribute('v', { - number: ohm.actions.passThrough, - foo: ohm.actions.passThrough, - bar: ohm.actions.passThrough, - baz: ohm.actions.passThrough, - qux: ohm.actions.passThrough, - quux: ohm.actions.passThrough, numberRec: function(n, d) { return [n.v, d.v]; - }, - digit: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(m.match('1234', 'number')).v, [[['1', '2'], '3'], '4']); }); @@ -1039,9 +979,7 @@ test('apply', function(t) { }, mulExpRec: function(x, _, y) { return ['mulExpRec', x.t, y.t]; - }, - priExp: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }).addAttribute('v', { addExp: function(expr) { return expr.v; @@ -1057,19 +995,14 @@ test('apply', function(t) { }, priExp: function(expr) { return parseInt(expr.v); - }, - _terminal: ohm.actions.getPrimitiveValue + } }).addAttribute('p', { - addExp: ohm.actions.passThrough, addExpRec: function(x, _, y) { return '(' + x.p + '+' + y.p + ')'; }, - mulExp: ohm.actions.passThrough, mulExpRec: function(x, _, y) { return '(' + x.p + '*' + y.p + ')'; - }, - priExp: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(f).t, ['addExp', @@ -1144,9 +1077,7 @@ test('apply', function(t) { }, mulExpRec: function(x, _, y) { return [x.t, '*', y.t]; - }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + } }); t.deepEqual(s(m.match('7+8*9+0')).t, [['7', '+', ['8', '*', '9']], '+', '0']); }); @@ -1186,9 +1117,7 @@ test('apply', function(t) { }, barRec: function(x, y) { return ['barRec', x.t, y.t]; - }, - digit: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(f).t, ['tricky', @@ -1292,8 +1221,7 @@ test('inheritance', function(t) { }, digit: function(expr) { return ['digit', expr.v]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); var expected = ['number', [['digit', 'a'], ['digit', 'b'], ['digit', 'c'], ['digit', 'd']]]; t.deepEqual(s(ns.G2.match('abcd', 'number')).v, expected); @@ -1410,8 +1338,7 @@ test('bindings', function(t) { }, baz: function(expr) { return ['baz', expr.v, id++]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(g.match('ab')).v, { x: ['bar', 'a', 0], @@ -1433,8 +1360,7 @@ test('bindings', function(t) { }, baz: function(expr) { return ['baz', expr.v, id++]; - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.deepEqual(s(g.match('ab')).v, { x: ['bar', 'a', 1], @@ -1468,8 +1394,6 @@ test('inline rule declarations', function(t) { digit: function(expr) { return expr.v.charCodeAt(0) - '0'.charCodeAt(0); }, - _default: ohm.actions.passThrough, - _terminal: ohm.actions.getPrimitiveValue }); return function(node) { return s(node).v; @@ -1767,8 +1691,7 @@ test('bootstrap', function(t) { }, digit: function(expr) { return expr.v.charCodeAt(0) - '0'.charCodeAt(0); - }, - _terminal: ohm.actions.getPrimitiveValue + } }); t.equal(s(Arithmetic.match('10*(2+123)-4/5')).v, 1249.2); }); diff --git a/test/test-parameterized-rules.js b/test/test-parameterized-rules.js index be7093e4..7968fc94 100644 --- a/test/test-parameterized-rules.js +++ b/test/test-parameterized-rules.js @@ -9,7 +9,6 @@ var test = require('tape-catch'); var errors = require('../src/errors'); -var ohm = require('..'); var testUtil = require('./testUtil'); // -------------------------------------------------------------------- @@ -84,9 +83,7 @@ test('simple examples', function(t) { ' Start = Pair\n' + '}'); var s = g.semantics().addOperation('v', { - Pair: function(oparen, x, comma, y, cparen) { return [x.v(), y.v()]; }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + Pair: function(oparen, x, comma, y, cparen) { return [x.v(), y.v()]; } }); var cst = g.match('(1,2)', 'Start'); t.deepEqual(s(cst).v(), ['1', '2']); @@ -104,9 +101,7 @@ test('inline rule declarations', function(t) { '}'); var s = g.semantics().addOperation('v', { List_some: function(x, sep, xs) { return [x.v()].concat(xs.v()); }, - List_none: function() { return []; }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + List_none: function() { return []; } }); var cst = g.match('x, x,x', 'Start'); t.deepEqual(s(cst).v(), ['x', 'x', 'x']); @@ -124,9 +119,7 @@ test('left recursion', function(t) { '}'); var s = g.semantics().addOperation('v', { LeftAssoc_rec: function(x, op, y) { return [op.v(), x.v(), y.v()]; }, - LeftAssoc_base: function(x) { return x.v(); }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + LeftAssoc_base: function(x) { return x.v(); } }); var cst = g.match('1 + 2 + 3', 'Start'); t.deepEqual(s(cst).v(), ['+', ['+', '1', '2'], '3']); @@ -140,9 +133,7 @@ test('complex parameters', function(t) { ' two = x x\n' + '}'); var s = g.semantics().addOperation('v', { - two: function(x, y) { return [x.v(), y.v()]; }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + two: function(x, y) { return [x.v(), y.v()]; } }); t.deepEqual(s(g.match('42')).v(), ['4', '2']); t.equal(g.match('45').failed(), true); diff --git a/test/test-semantics.js b/test/test-semantics.js index cf9c25b3..247550de 100644 --- a/test/test-semantics.js +++ b/test/test-semantics.js @@ -37,10 +37,6 @@ test('operations', function(t) { }, digit: function(expr) { return expr.value().charCodeAt(0) - '0'.charCodeAt(0); - }, - _default: ohm.actions.passThrough, - _terminal: function() { - return this.primitiveValue; } }); @@ -57,8 +53,7 @@ test('operations', function(t) { }, number: function(n) { return [n.value()]; - }, - _default: ohm.actions.passThrough + } }); t.deepEqual(s(Arithmetic.match('9')).numberValues(), [9]); t.deepEqual(s(Arithmetic.match('13+10*2*3')).numberValues(), [13, 10, 2, 3]); @@ -86,7 +81,6 @@ test('attributes', function(t) { count++; return expr.value.charCodeAt(0) - '0'.charCodeAt(0); }, - _default: ohm.actions.passThrough, _terminal: function() { count++; return this.primitiveValue; @@ -172,10 +166,9 @@ test('_iter nodes', function(t) { s = g.semantics().addOperation('op', { letter: function(l) { return l.interval.contents; - }, - _default: ohm.actions.passThrough + } }); - t.deepEqual(s(m).op(), ['a', 'b', 'c'], 'works with passThrough'); + t.deepEqual(s(m).op(), ['a', 'b', 'c'], 'works with pass-through default behavior of _default'); s = g.semantics().addOperation('op', { letters: function(ls) { @@ -186,9 +179,7 @@ test('_iter nodes', function(t) { return typeof l.op === 'function'; }), 'children is an array of wrappers'); return ls.children.map(function(l) { return l.op(); }).join(','); - }, - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough + } }); t.equal(s(m).op(), 'a,b,c'); @@ -197,19 +188,15 @@ test('_iter nodes', function(t) { test('_terminal nodes', function(t) { var g = ohm.grammar('G { letters = letter* }'); - var s = g.semantics().addOperation('op', { - _terminal: ohm.actions.getPrimitiveValue, - _default: ohm.actions.passThrough - }); + var s = g.semantics().addOperation('op', {}); var m = g.match('abc', 'letters'); - t.deepEqual(s(m).op(), ['a', 'b', 'c'], 'getPrimitiveValue works'); + t.deepEqual(s(m).op(), ['a', 'b', 'c'], 'default behavior is to return `primitiveValue`'); t.throws(function() { g.semantics().addOperation('op', { - _terminal: ohm.actions.passThrough, - _default: ohm.actions.passThrough + _terminal: function(x) {} }); - }, /wrong arity/, 'throws with passThrough'); + }, /wrong arity/); s = g.semantics().addOperation('op', { _terminal: function() { @@ -217,8 +204,7 @@ test('_terminal nodes', function(t) { t.equal(this.ctorName, '_terminal'); t.equal(this.children.length, 0, 'node has no children'); return this.primitiveValue; - }, - _default: ohm.actions.passThrough + } }); t.deepEqual(s(m).op(), ['a', 'b', 'c']); @@ -300,8 +286,7 @@ test('extending semantics', function(t) { var s = ns.G.semantics(). addOperation('value', { one: function(_) { return 1; }, - two: function(_) { return 2; }, - _terminal: ohm.actions.getPrimitiveValue + two: function(_) { return 2; } }). addOperation('valueTimesTwo', { _default: function(children) { return this.value() * 2; } @@ -342,8 +327,7 @@ test('extending semantics', function(t) { s = ns.G.semantics(). addAttribute('value', { one: function(_) { return 1; }, - two: function(_) { return 2; }, - _terminal: ohm.actions.getPrimitiveValue + two: function(_) { return 2; } }). addAttribute('valueTimesTwo', { _default: function(children) { return this.value * 2; }