UNPKG

mmir-lib

Version:

MMIR (Mobile Multimodal Interaction and Relay) library

2 lines 63 kB
define(["mmirf/parsingResult"],function(t){var u,r,l=l||{};return l.antlr=l.antlr||{},l.antlr.runtime=l.antlr.runtime||{},l.antlr.runtime.tree=l.antlr.runtime.tree||{},t._nsParserInit(l),void 0!==(l=void 0===l||!l?{}:l).antlr&&l.antlr||(l.antlr={}),l.antlr.global=function(){return this}.call(null),l.antlr.namespace=function(){for(var t,e,n=arguments,i=null,r=0;r<n.length;r+=1)for(e=n[r].split("."),i=l.antlr.global,t=0;t<e.length;t+=1)i[e[t]]=i[e[t]]||{},i=i[e[t]];return i},l.antlr.env=l.antlr.env||{},l.antlr.env.ua=function(){var t,e,n={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,rhino:!1};try{t=navigator.userAgent,/KHTML/.test(t)&&(n.webkit=1),(e=t.match(/AppleWebKit\/([^\s]*)/))&&e[1]&&(n.webkit=parseFloat(e[1]),/ Mobile\//.test(t)?n.mobile="Apple":(e=t.match(/NokiaN[^\/]*/))&&(n.mobile=e[0]),(e=t.match(/AdobeAIR\/([^\s]*)/))&&(n.air=e[0])),n.webkit||((e=t.match(/Opera[\s\/]([^\s]*)/))&&e[1]?(n.opera=parseFloat(e[1]),(e=t.match(/Opera Mini[^;]*/))&&(n.mobile=e[0])):(e=t.match(/MSIE\s([^;]*)/))&&e[1]?n.ie=parseFloat(e[1]):(e=t.match(/Gecko\/([^\s]*)/))&&(n.gecko=1,(e=t.match(/rv:([^\s\)]*)/))&&e[1]&&(n.gecko=parseFloat(e[1]))))}catch(t){}try{"undefined"==typeof window&&loadClass&&(n.rhino=!0)}catch(t){}return n}(),l.antlr.namespace("org.antlr.runtime.tree"),l.antlr.lang=l.antlr.lang||{isArray:function(t){if(t){var e=l.antlr.lang;return e.isNumber(t.length)&&e.isFunction(t.splice)}return!1},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null===t},isNumber:function(t){return"number"==typeof t&&isFinite(t)},isObject:function(t){return t&&("object"==typeof t||l.antlr.lang.isFunction(t))||!1},isString:function(t){return"string"==typeof t},isUndefined:function(t){return void 0===t},_IEEnumFix:function(t,e){if(l.antlr.env.ua.ie)for(var n=["toString","valueOf"],i=0;i<n.length;i+=1){var r=n[i],s=e[r];l.antlr.lang.isFunction(s)&&s!=Object.prototype[r]&&(t[r]=s)}},extend:function(t,e,n){if(!e||!t)throw new Error("org.antlr.lang.extend failed, please check that all dependencies are included.");function i(){}if(i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){for(var r in n)t.prototype[r]=n[r];l.antlr.lang._IEEnumFix(t.prototype,n)}},augmentObject:function(t,e){if(!e||!t)throw new Error("Absorb failed, verify dependencies.");var n,i,r=arguments,s=r[2];if(s&&!0!==s)for(n=2;n<r.length;n+=1)t[r[n]]=e[r[n]];else{for(i in e)!s&&t[i]||(t[i]=e[i]);l.antlr.lang._IEEnumFix(t,e)}},augmentProto:function(t,e){if(!e||!t)throw new Error("Augment failed, verify dependencies.");for(var n=[t.prototype,e.prototype],i=2;i<arguments.length;i+=1)n.push(arguments[i]);l.antlr.lang.augmentObject.apply(this,n)},merge:function(){for(var t={},e=arguments,n=0,i=e.length;n<i;n+=1)l.antlr.lang.augmentObject(t,e[n],!0);return t},isValue:function(t){var e=l.antlr.lang;return e.isObject(t)||e.isString(t)||e.isNumber(t)||e.isBoolean(t)},array:{peek:function(t){if(!l.antlr.lang.isArray(t))throw new Error("org.antlr.lang.array.peek: a is not an array.");var e=t.length;if(e<=0)throw new Error("org.antlr.lang.array.peek: a is empty.");return t[e-1]}}},l.antlr.runtime.RecognizerSharedState=function(){this.following=[],this._fsp=-1,this.errorRecovery=!1,this.lastErrorIndex=-1,this.failed=!1,this.syntaxErrors=0,this.backtracking=0,this.ruleMemo=null,this.token=null,this.tokenStartCharIndex=-1,this.text=null},l.antlr.runtime.IndexOutOfBoundsException=function(t){l.antlr.runtime.IndexOutOfBoundsException.superclass.constructor.call(this,t)},l.antlr.lang.extend(l.antlr.runtime.IndexOutOfBoundsException,Error,{name:"org.antlr.runtime.IndexOutOfBoundsException"}),l.antlr.runtime.RecognitionException=function(t){l.antlr.runtime.RecognitionException.superclass.constructor.call(this),this.input=t,this.index=t.index(),t instanceof l.antlr.runtime.CommonTokenStream&&(this.token=t.LT(1),this.line=this.token.getLine(),this.charPositionInLine=this.token.getCharPositionInLine()),t instanceof l.antlr.runtime.tree.TreeNodeStream?this.extractInformationFromTreeNodeStream(t):t instanceof l.antlr.runtime.ANTLRStringStream?(this.c=t.LA(1),this.line=t.getLine(),this.charPositionInLine=t.getCharPositionInLine()):this.c=t.LA(1),this.message=this.toString()},l.antlr.lang.extend(l.antlr.runtime.RecognitionException,Error,{input:null,index:null,token:null,node:null,c:null,line:null,name:"org.antlr.runtime.RecognitionException",charPositionInLine:null,approximateLineInfo:null,extractInformationFromTreeNodeStream:function(t){var e,n,i=t;this.node=i.LT(1);var r=i.getTreeAdaptor(),s=r.getToken(this.node);if(s)if((this.token=s).getLine()<=0)for(e=i.LT(n=-1);e;){if(priorPayload=r.getToken(e),priorPayload&&0<priorPayload.getLine()){this.line=priorPayload.getLine(),this.charPositionInLine=priorPayload.getCharPositionInLine(),this.approximateLineInfo=!0;break}--n,e=i.LT(n)}else this.line=s.getLine(),this.charPositionInLine=s.getCharPositionInLine();else this.node instanceof l.antlr.runtime.tree.CommonTree?(this.line=this.node.getLine(),this.charPositionInLine=this.node.getCharPositionInLine(),this.node instanceof l.antlr.runtime.tree.CommonTree&&(this.token=this.node.token)):(t=r.getType(this.node),s=r.getText(this.node),this.token=new l.antlr.runtime.CommonToken(t,s))},getUnexpectedType:function(){return this.input instanceof l.antlr.runtime.CommonTokenStream?this.token.getType():this.input instanceof l.antlr.runtime.tree.TreeNodeStream?this.input.getTreeAdaptor().getType(this.node):this.c}}),l.antlr.runtime.MismatchedTokenException=function(t,e){0===arguments.length?this.expecting=l.antlr.runtime.Token.INVALID_TOKEN_TYPE:(l.antlr.runtime.MismatchedTokenException.superclass.constructor.call(this,e),this.expecting=t)},l.antlr.lang.extend(l.antlr.runtime.MismatchedTokenException,l.antlr.runtime.RecognitionException,{toString:function(){return"MismatchedTokenException("+this.getUnexpectedType()+"!="+this.expecting+")"},name:"org.antlr.runtime.MismatchedTokenException"}),l.antlr.runtime.UnwantedTokenException=function(t,e){0<arguments.length&&l.antlr.runtime.UnwantedTokenException.superclass.constructor.call(this,t,e)},l.antlr.lang.extend(l.antlr.runtime.UnwantedTokenException,l.antlr.runtime.MismatchedTokenException,{getUnexpectedToken:function(){return this.token},toString:function(){var t=", expected "+this.expecting;return this.expecting===l.antlr.runtime.Token.INVALID_TOKEN_TYPE&&(t=""),l.antlr.lang.isValue(this.token)?"UnwantedTokenException(found="+this.token.getText()+t+")":"UnwantedTokenException(found="+t+")"},name:"org.antlr.runtime.UnwantedTokenException"}),l.antlr.runtime.MissingTokenException=function(t,e,n){0<arguments.length&&(l.antlr.runtime.MissingTokenException.superclass.constructor.call(this,t,e),this.inserted=n)},l.antlr.lang.extend(l.antlr.runtime.MissingTokenException,l.antlr.runtime.MismatchedTokenException,{getMissingType:function(){return this.expecting},toString:function(){return l.antlr.lang.isValue(this.inserted)&&l.antlr.lang.isValue(this.token)?"MissingTokenException(inserted "+this.inserted+" at "+this.token.getText()+")":l.antlr.lang.isValue(this.token)?"MissingTokenException(at "+this.token.getText()+")":"MissingTokenException"},name:"org.antlr.runtime.MissingTokenException"}),l.antlr.runtime.NoViableAltException=function(t,e,n,i){l.antlr.runtime.NoViableAltException.superclass.constructor.call(this,i),this.grammarDecisionDescription=t,this.decisionNumber=e,this.stateNumber=n},l.antlr.lang.extend(l.antlr.runtime.NoViableAltException,l.antlr.runtime.RecognitionException,{toString:function(){return this.input instanceof l.antlr.runtime.ANTLRStringStream?"NoViableAltException('"+this.getUnexpectedType()+"'@["+this.grammarDecisionDescription+"])":"NoViableAltException("+this.getUnexpectedType()+"@["+this.grammarDecisionDescription+"])"},name:"org.antlr.runtime.NoViableAltException"}),l.antlr.runtime.EarlyExitException=function(t,e){l.antlr.runtime.EarlyExitException.superclass.constructor.call(this,e),this.decisionNumber=t},l.antlr.lang.extend(l.antlr.runtime.EarlyExitException,l.antlr.runtime.RecognitionException,{name:"org.antlr.runtime.EarlyExitException"}),l.antlr.runtime.MismatchedSetException=function(t,e){l.antlr.runtime.MismatchedSetException.superclass.constructor.call(this,e),this.expecting=t},l.antlr.lang.extend(l.antlr.runtime.MismatchedSetException,l.antlr.runtime.RecognitionException,{toString:function(){return"MismatchedSetException("+this.getUnexpectedType()+"!="+this.expecting+")"},name:"org.antlr.runtime.MismatchedSetException"}),l.antlr.runtime.MismatchedNotSetException=function(t,e){l.antlr.runtime.MismatchedNotSetException.superclass.constructor.call(this,t,e)},l.antlr.lang.extend(l.antlr.runtime.MismatchedNotSetException,l.antlr.runtime.MismatchedSetException,{toString:function(){return"MismatchedNotSetException("+this.getUnexpectedType()+"!="+this.expecting+")"},name:"org.antlr.runtime.MismatchedNotSetException"}),l.antlr.runtime.MismatchedRangeException=function(t,e,n){if(0===arguments.length)return this;l.antlr.runtime.MismatchedRangeException.superclass.constructor.call(this,n),this.a=t,this.b=e},l.antlr.lang.extend(l.antlr.runtime.MismatchedRangeException,l.antlr.runtime.RecognitionException,{toString:function(){return"MismatchedRangeException("+this.getUnexpectedType()+" not in ["+this.a+","+this.b+"])"},name:"org.antlr.runtime.MismatchedRangeException"}),l.antlr.runtime.FailedPredicateException=function(t,e,n){l.antlr.runtime.FailedPredicateException.superclass.constructor.call(this,t),this.ruleName=e,this.predicateText=n},l.antlr.lang.extend(l.antlr.runtime.FailedPredicateException,l.antlr.runtime.RecognitionException,{toString:function(){return"FailedPredicateException("+this.ruleName+",{"+this.predicateText+"}?)"},name:"org.antlr.runtime.FailedPredicateException"}),l.antlr.runtime.BitSet=function(t){t=t||l.antlr.runtime.BitSet.BITS,l.antlr.lang.isArray(t)?this.bits=t:l.antlr.lang.isNumber(t)&&(this.bits=[])},l.antlr.lang.augmentObject(l.antlr.runtime.BitSet,{BITS:32,LOG_BITS:5,MOD_MASK:31,bitMask:function(t){return 1<<(t&l.antlr.runtime.BitSet.MOD_MASK)},numWordsToHold:function(t){return 1+(t>>l.antlr.runtime.BitSet.LOG_BITS)},wordNumber:function(t){return t>>l.antlr.runtime.BitSet.LOG_BITS},of:function(t,e){var n,i,r,s;if(l.antlr.lang.isNumber(t)){if(l.antlr.lang.isNumber(e)){for(r=new l.antlr.runtime.BitSet(e+1),n=t;n<=e;n++)i=l.antlr.runtime.BitSet.wordNumber(n),r.bits[i]|=l.antlr.runtime.BitSet.bitMask(n);return r}return(r=new l.antlr.runtime.BitSet(t+1)).add(t),r}if(l.antlr.lang.isArray(t)){for(r=new l.antlr.runtime.BitSet,n=t.length-1;0<=n;n--)r.add(t[n]);return r}if(t instanceof l.antlr.runtime.BitSet)return t||null;if(t instanceof l.antlr.runtime.IntervalSet)return t?((r=new l.antlr.runtime.BitSet).addAll(t),r):null;if(l.antlr.lang.isObject(t)){for(n in s=[],t)l.antlr.lang.isNumber(n)&&s.push(n);return l.antlr.runtime.BitSet.of(s)}}}),l.antlr.runtime.BitSet.prototype={add:function(t){var e=l.antlr.runtime.BitSet.wordNumber(t);e>=this.bits.length&&this.growToInclude(t),this.bits[e]|=l.antlr.runtime.BitSet.bitMask(t)},addAll:function(t){var e,n;if(t instanceof l.antlr.runtime.BitSet)this.orInPlace(t);else if(t instanceof l.antlr.runtime.IntervalSet)0;else if(l.antlr.lang.isArray(t))for(e=0;e<t.length;e++)n=t[e],this.add(n)},and:function(t){var e=this.clone();return e.andInPlace(t),e},andInPlace:function(t){for(var e=Math.min(this.bits.length,t.bits.length),n=e-1;0<=n;n--)this.bits[n]&=t.bits[n];for(n=e;n<this.bits.length;n++)this.bits[n]=0},clear:function(t){if(0!==arguments.length){var e=l.antlr.runtime.BitSet.wordNumber(t);e>=this.bits.length&&this.growToInclude(t),this.bits[e]&=~l.antlr.runtime.BitSet.bitMask(t)}else for(var n=this.bits.length-1;0<=n;n--)this.bits[n]=0},clone:function(){for(var t=[],e=0,n=this.bits.length;e<n;e++)t[e]=this.bits[e];return new l.antlr.runtime.BitSet(t)},size:function(){for(var t,e,n=0,i=this.bits.length-1;0<=i;i--)if(0!==(t=this.bits[i]))for(e=l.antlr.runtime.BitSet.BITS-1;0<=e;e--)0!=(t&1<<e)&&n++;return n},equals:function(t){if(!(t&&t instanceof l.antlr.runtime.BitSet))return!1;for(var e=t,n=Math.min(this.bits.length,e.bits.length),i=0;i<n;i++)if(this.bits[i]!=e.bits[i])return!1;if(this.bits.length>n){for(i=n+1;i<this.bits.length;i++)if(0!==this.bits[i])return!1}else if(e.bits.length>n)for(i=n+1;i<e.bits.length;i++)if(0!==e.bits[i])return!1;return!0},growToInclude:function(t){Math.max(this.bits.length<<1,l.antlr.runtime.BitSet.numWordsToHold(t));var e=[],n=0;for(len=this.bits.length;n<len;n++)e[n]=this.bits[n];this.bits=e},member:function(t){var e=l.antlr.runtime.BitSet.wordNumber(t);return!(e>=this.bits.length)&&0!=(this.bits[e]&l.antlr.runtime.BitSet.bitMask(t))},getSingleElement:function(){for(var t=0;t<this.bits.length<<l.antlr.runtime.BitSet.LOG_BITS;t++)if(this.member(t))return t;return-1},isNil:function(){for(var t=this.bits.length-1;0<=t;t--)if(0!==this.bits[t])return!1;return!0},complement:function(t){if(t)return t.subtract(this);t=this.clone();return t.notInPlace(),t},notInPlace:function(){var t,e,n,i;if(0===arguments.length)for(n=this.bits.length-1;0<=n;n--)this.bits[n]=~this.bits[n];else for(e=1===arguments.length?arguments[t=0]:(t=arguments[0],arguments[1]),this.growToInclude(e),n=t;n<=e;n++)i=l.antlr.runtime.BitSet.wordNumber(n),this.bits[i]^=l.antlr.runtime.BitSet.bitMask(n)},or:function(t){if(!t)return this;var e=this.clone();return e.orInPlace(t),e},orInPlace:function(t){if(t){t.bits.length>this.bits.length&&this.setSize(t.bits.length);for(var e=Math.min(this.bits.length,t.bits.length)-1;0<=e;e--)this.bits[e]|=t.bits[e]}},remove:function(t){var e=l.antlr.runtime.BitSet.wordNumber(t);e>=this.bits.length&&this.growToInclude(t),this.bits[e]&=~l.antlr.runtime.BitSet.bitMask(t)},setSize:function(t){for(var e=t-this.bits.length;0<=e;)this.bits.push(0),e--},numBits:function(){return this.bits.length<<l.antlr.runtime.BitSet.LOG_BITS},lengthInLongWords:function(){return this.bits.length},subset:function(t){return!!t&&this.and(t).equals(this)},subtractInPlace:function(t){if(t)for(var e=0;e<this.bits.length&&e<t.bits.length;e++)this.bits[e]&=~t.bits[e]},subtract:function(t){if(!(t&&t instanceof l.antlr.runtime.BitSet))return null;var e=this.clone();return e.subtractInPlace(t),e},toArray:function(){for(var t=[],e=0,n=0;n<this.bits.length<<l.antlr.runtime.BitSet.LOG_BITS;n++)this.member(n)&&(t[e++]=n);return t},toPackedArray:function(){return this.bits},toString:function(){return 0===arguments.length?this.toString1(null):l.antlr.lang.isString(arguments[0])?l.antlr.lang.isValue(arguments[1])?this.toString2(arguments[0],arguments[1]):this.toString1(null):this.toString1(arguments[0])},toString1:function(t){for(var e="{",n=!1,i=0;i<this.bits.length<<l.antlr.runtime.BitSet.LOG_BITS;i++)this.member(i)&&(0<i&&n&&(e+=","),e+=t?t.getTokenDisplayName(i):i.toString(),n=!0);return e+"}"},toString2:function(t,e){for(var n="",i=0;i<this.bits.length<<l.antlr.runtime.BitSet.LOG_BITS;i++)this.member(i)&&(0<n.length&&(n+=t),!(i>=e.size())&&l.antlr.lang.isValue(e.get(i))?n+=e.get(i):n+="'"+i+"'");return n}},l.antlr.runtime.CharStream={EOF:-1},l.antlr.runtime.CommonToken=function(){var t;this.charPositionInLine=-1,this.channel=0,this.index=-1,1==arguments.length?l.antlr.lang.isNumber(arguments[0])?this.type=arguments[0]:(this.text=(t=arguments[0]).getText(),this.type=t.getType(),this.line=t.getLine(),this.index=t.getTokenIndex(),this.charPositionInLine=t.getCharPositionInLine(),this.channel=t.getChannel(),t instanceof l.antlr.runtime.CommonToken&&(this.start=t.start,this.stop=t.stop)):2==arguments.length?(this.type=arguments[0],this.text=arguments[1],this.channel=0):5==arguments.length&&(this.input=arguments[0],this.type=arguments[1],this.channel=arguments[2],this.start=arguments[3],this.stop=arguments[4])},l.antlr.runtime.CommonToken.prototype={getType:function(){return this.type},setLine:function(t){this.line=t},getText:function(){return l.antlr.lang.isString(this.text)?this.text:this.input?(this.text=this.input.substring(this.start,this.stop),this.text):null},setText:function(t){this.text=t},getLine:function(){return this.line},getCharPositionInLine:function(){return this.charPositionInLine},setCharPositionInLine:function(t){this.charPositionInLine=t},getChannel:function(){return this.channel},setChannel:function(t){this.channel=t},setType:function(t){this.type=t},getStartIndex:function(){return this.start},setStartIndex:function(t){this.start=t},getStopIndex:function(){return this.stop},setStopIndex:function(t){this.stop=t},getTokenIndex:function(){return this.index},setTokenIndex:function(t){this.index=t},getInputStream:function(){return this.input},setInputStream:function(t){this.input=t},toString:function(){var t="";0<this.channel&&(t=",channel="+this.channel);var e=this.getText(),e=l.antlr.lang.isNull(e)?"<no text>":(e=(e=e.replace(/\n/g,"\\\\n")).replace(/\r/g,"\\\\r")).replace(/\t/g,"\\\\t");return"[@"+this.getTokenIndex()+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+t+","+this.line+":"+this.getCharPositionInLine()+"]"}},l.antlr.runtime.Token=function(){},l.antlr.lang.augmentObject(l.antlr.runtime.Token,{EOR_TOKEN_TYPE:1,DOWN:2,UP:3,MIN_TOKEN_TYPE:4,EOF:l.antlr.runtime.CharStream.EOF,EOF_TOKEN:new l.antlr.runtime.CommonToken(l.antlr.runtime.CharStream.EOF),INVALID_TOKEN_TYPE:0,INVALID_TOKEN:new l.antlr.runtime.CommonToken(0),SKIP_TOKEN:new l.antlr.runtime.CommonToken(0),DEFAULT_CHANNEL:0,HIDDEN_CHANNEL:99}),l.antlr.lang.augmentObject(l.antlr.runtime.CommonToken,l.antlr.runtime.Token),l.antlr.runtime.tree.RewriteCardinalityException=function(t){this.elementDescription=t},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteCardinalityException,Error,{getMessage:function(){return l.antlr.lang.isString(this.elementDescription)?this.elementDescription:null},name:function(){return"org.antlr.runtime.tree.RewriteCardinalityException"}}),l.antlr.runtime.tree.RewriteEmptyStreamException=function(t){l.antlr.runtime.tree.RewriteEmptyStreamException.superclass.constructor.call(this,t)},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteEmptyStreamException,l.antlr.runtime.tree.RewriteCardinalityException,{name:function(){return"org.antlr.runtime.tree.RewriteEmptyStreamException"}}),l.antlr.runtime.tree.RewriteEarlyExitException=function(t){var e=l.antlr.runtime.tree.RewriteEarlyExitException.superclass;l.antlr.lang.isUndefined(t)&&(t=null),e.constructor.call(this,t)},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteEarlyExitException,l.antlr.runtime.tree.RewriteCardinalityException,{name:function(){return"org.antlr.runtime.tree.RewriteEarlyExitException"}}),l.antlr.runtime.MismatchedTreeNodeException=function(t,e){t&&e&&(l.antlr.runtime.MismatchedTreeNodeException.superclass.constructor.call(this,e),this.expecting=t)},l.antlr.lang.extend(l.antlr.runtime.MismatchedTreeNodeException,l.antlr.runtime.RecognitionException,{toString:function(){return"MismatchedTreeNodeException("+this.getUnexpectedType()+"!="+this.expecting+")"},name:"org.antlr.runtime.MismatchedTreeNodeException"}),l.antlr.runtime.tree.BaseTree=function(){},l.antlr.runtime.tree.BaseTree.prototype={getChild:function(t){return!this.children||t>=this.children.length?null:this.children[t]},getChildren:function(){return this.children},getFirstChildWithType:function(t){for(var e,n=0;this.children&&n<this.children.length;n++)if((e=this.children[n]).getType()===t)return e;return null},getChildCount:function(){return this.children?this.children.length:0},addChild:function(t){if(l.antlr.lang.isValue(t)){var e,n,i,r=t;if(r.isNil()){if(this.children&&this.children==r.children)throw new Error("attempt to add child list to itself");if(r.children)if(this.children)for(e=r.children.length,n=0;n<e;n++)i=r.children[n],this.children.push(i),i.setParent(this),i.setChildIndex(this.children.length-1);else this.children=r.children,this.freshenParentAndChildIndexes()}else this.children||(this.children=this.createChildrenList()),this.children.push(t),r.setParent(this),r.setChildIndex(this.children.length-1)}},addChildren:function(t){for(var e,n=0;n<t.length;n++)e=t[n],this.addChild(e)},setChild:function(t,e){if(e){if(e.isNil())throw new Error("Can't set single child to a list");this.children||(this.children=this.createChildrenList()),(this.children[t]=e).setParent(this),e.setChildIndex(t)}},deleteChild:function(t){if(!this.children)return null;if(t<0||t>=this.children.length)throw new Error("Index out of bounds.");var e=this.children.splice(t,1)[0];return this.freshenParentAndChildIndexes(t),e},replaceChildren:function(t,e,n){if(!this.children)throw new Error("indexes invalid; no children in list");var i=e-t+1,n=n,r=null;n.isNil()?r=n.children:(r=[]).push(n);var s,o,a,l,u,h=r.length,c=r.length,n=i-h;if(0==n)for(s=0,o=t;o<=e;o++)a=r[s],(this.children[o]=a).setParent(this),a.setChildIndex(o),s++;else if(0<n){for(s=0;s<c;s++)this.children[t+s]=r[s];for(u=l=t+c;u<=e;u++)this.children.splice(l,1)[0];this.freshenParentAndChildIndexes(t)}else{for(s=0;s<i;s++)this.children[t+s]=r[s];for(s=i;s<h;s++)this.children.splice(t+s,0,r[s]);this.freshenParentAndChildIndexes(t)}},createChildrenList:function(){return[]},isNil:function(){return!1},freshenParentAndChildIndexes:function(t){l.antlr.lang.isNumber(t)||(t=0);for(var e,n=this.getChildCount(),i=t;i<n;i++)(e=this.getChild(i)).setChildIndex(i),e.setParent(this)},sanityCheckParentAndChildIndexes:function(t,e){if(0===arguments.length&&(t=null,e=-1),t!==this.getParent())throw new Error("parents don't match; expected "+t+" found "+this.getParent());if(e!==this.getChildIndex())throw new Error("child indexes don't match; expected "+e+" found "+this.getChildIndex());for(var n=this.getChildCount(),i=0;i<n;i++)this.getChild(i).sanityCheckParentAndChildIndexes(this,i)},getChildIndex:function(){return 0},setChildIndex:function(t){},getParent:function(){return null},setParent:function(t){},getTree:function(){return this},toStringTree:function(){if(!this.children||0===this.children.length)return this.toString();var t,e="";for(this.isNil()||(e+="(",e+=this.toString(),e+=" "),t=0;this.children&&t<this.children.length;t++)0<t&&(e+=" "),e+=this.children[t].toStringTree();return this.isNil()||(e+=")"),e},getLine:function(){return 0},getCharPositionInLine:function(){return 0}},l.antlr.runtime.tree.CommonTree=function(t){this.startIndex=-1,this.stopIndex=-1,this.childIndex=-1,this.parent=null,this.token=null,t instanceof l.antlr.runtime.tree.CommonTree?(l.antlr.runtime.tree.CommonTree.superclass.constructor.call(this,t),this.token=t.token,this.startIndex=t.startIndex,this.stopIndex=t.stopIndex):t instanceof l.antlr.runtime.CommonToken&&(this.token=t)},l.antlr.lang.extend(l.antlr.runtime.tree.CommonTree,l.antlr.runtime.tree.BaseTree,{getToken:function(){return this.token},dupNode:function(){return new l.antlr.runtime.tree.CommonTree(this)},isNil:function(){return!this.token},getType:function(){return this.token?this.token.getType():l.antlr.runtime.Token.INVALID_TOKEN_TYPE},getText:function(){return this.token?this.token.getText():null},getLine:function(){return this.token&&0!==this.token.getLine()?this.token.getLine():0<this.getChildCount()?this.getChild(0).getLine():0},getCharPositionInLine:function(){return this.token&&-1!==this.token.getCharPositionInLine()?this.token.getCharPositionInLine():0<this.getChildCount()?this.getChild(0).getCharPositionInLine():0},getTokenStartIndex:function(){return this.token?this.token.getTokenIndex():this.startIndex},setTokenStartIndex:function(t){this.startIndex=t},getTokenStopIndex:function(){return this.token?this.token.getTokenIndex():this.stopIndex},setTokenStopIndex:function(t){this.stopIndex=t},getChildIndex:function(){return this.childIndex},getParent:function(){return this.parent},setParent:function(t){this.parent=t},setChildIndex:function(t){this.childIndex=t},toString:function(){return this.isNil()?"nil":this.getType()===l.antlr.runtime.Token.INVALID_TOKEN_TYPE?"<errornode>":this.token?this.token.getText():null}}),l.antlr.runtime.tree.Tree={INVALID_NODE:new l.antlr.runtime.tree.CommonTree(l.antlr.runtime.Token.INVALID_TOKEN)},l.antlr.runtime.tree.CommonErrorNode=function(t,e,n,i){(!n||n.getTokenIndex()<e.getTokenIndex()&&n.getType()!=l.antlr.runtime.Token.EOF)&&(n=e),this.input=t,this.start=e,this.stop=n,this.trappedException=i},l.antlr.lang.extend(l.antlr.runtime.tree.CommonErrorNode,l.antlr.runtime.tree.CommonTree,{isNil:function(){return!1},getType:function(){return l.antlr.runtime.Token.INVALID_TOKEN_TYPE},getText:function(){var t,e;return this.start instanceof l.antlr.runtime.CommonToken?(t=this.start.getTokenIndex(),e=this.stop.getTokenIndex(),this.stop.getType()===l.antlr.runtime.Token.EOF&&(e=this.input.size()),this.input.toString(t,e)):this.start instanceof l.antlr.runtime.tree.CommonTree?this.input.toString(this.start,this.stop):"<unknown>"},toString:function(){return this.trappedException instanceof l.antlr.runtime.MissingTokenException?"<missing type: "+this.trappedException.getMissingType()+">":this.trappedException instanceof l.antlr.runtime.UnwantedTokenException?"<extraneous: "+this.trappedException.getUnexpectedToken()+", resync="+this.getText()+">":this.trappedException instanceof l.antlr.runtime.MismatchedTokenException?"<mismatched token: "+this.trappedException.token+", resync="+this.getText()+">":this.trappedException instanceof l.antlr.runtime.NoViableAltException?"<unexpected: "+this.trappedException.token+", resync="+this.getText()+">":"<error: "+this.getText()+">"}}),l.antlr.runtime.tree.BaseTreeAdaptor=function(){this.uniqueNodeID=1},l.antlr.runtime.tree.BaseTreeAdaptor.prototype={nil:function(){return this.create(null)},errorNode:function(t,e,n,i){return new l.antlr.runtime.tree.CommonErrorNode(t,e,n,i)},isNil:function(t){return t.isNil()},dupTree:function(t,e){if(1===arguments.length&&(e=null),!t)return null;var n=this.dupNode(t);this.setChildIndex(n,this.getChildIndex(t)),this.setParent(n,e);for(var i,r=this.getChildCount(t),s=0;s<r;s++)i=this.getChild(t,s),i=this.dupTree(i,t),this.addChild(n,i);return n},addChild:function(t,e){t&&l.antlr.lang.isValue(e)&&t.addChild(e)},becomeRoot:function(t,e){var n=t=t instanceof l.antlr.runtime.CommonToken||!t?this.create(t):t,i=e;if(!e)return t;if(n.isNil()){if(1<n.getChildCount())throw new Error("more than one node as root (TODO: make exception hierarchy)");n=n.getChild(0)}return n.addChild(i),n},rulePostProcessing:function(t){return t&&t.isNil()&&(0===t.getChildCount()?t=null:1===t.getChildCount()&&((t=t.getChild(0)).setParent(null),t.setChildIndex(-1))),t},create:function(t,e){var n;return 2===arguments.length?(l.antlr.lang.isString(arguments[1])?e=this.createToken(t,n=arguments[1]):(e=this.createToken(e)).setType(t),this.create(e)):3===arguments.length?(n=arguments[2],(e=this.createToken(e)).setType(t),e.setText(n),this.create(e)):void 0},getType:function(t){return t.getType(),0},setType:function(t,e){throw new Error("don't know enough about Tree node")},getText:function(t){return t.getText()},setText:function(t,e){throw new Error("don't know enough about Tree node")},getChild:function(t,e){return t.getChild(e)},setChild:function(t,e,n){t.setChild(e,n)},deleteChild:function(t,e){return t.deleteChild(e)},getChildCount:function(t){return t.getChildCount()},getUniqueID:function(t){this.treeToUniqueIDMap||(this.treeToUniqueIDMap={});var e=this.treeToUniqueIDMap[t];if(l.antlr.lang.isValue(e))return e;e=this.uniqueNodeID;return this.treeToUniqueIDMap[t]=e,this.uniqueNodeID++,e}},l.antlr.runtime.tree.CommonTreeAdaptor=function(){},l.antlr.lang.extend(l.antlr.runtime.tree.CommonTreeAdaptor,l.antlr.runtime.tree.BaseTreeAdaptor,{dupNode:function(t){return l.antlr.lang.isValue(t)?t.dupNode():null},create:function(t){return 1<arguments.length?l.antlr.runtime.tree.CommonTreeAdaptor.superclass.create.apply(this,arguments):new l.antlr.runtime.tree.CommonTree(t)},createToken:function(t){return 2===arguments.length?new l.antlr.runtime.CommonToken(t,arguments[1]):new l.antlr.runtime.CommonToken(t)},setTokenBoundaries:function(t,e,n){var i,r;l.antlr.lang.isValue(t)&&(r=i=0,l.antlr.lang.isValue(e)&&(i=e.getTokenIndex?e.getTokenIndex():e.getStartIndex?e.getStartIndex():e.getTokenStartIndex()),l.antlr.lang.isValue(n)&&(r=r.getTokenIndex?n.getTokenIndex():n.getStopIndex?n.getStopIndex():n.getTokenStopIndex()),t.setTokenStartIndex(i),t.setTokenStopIndex(r))},getTokenStartIndex:function(t){return t?t.getTokenStartIndex():-1},getTokenStopIndex:function(t){return t?t.getTokenStopIndex():-1},getText:function(t){return t?t.getText():null},getType:function(t){return t?t.getType():l.antlr.runtime.Token.INVALID_TOKEN_TYPE},getToken:function(t){return t instanceof l.antlr.runtime.tree.CommonTree?t.getToken():null},getChild:function(t,e){return t?t.getChild(e):null},getChildCount:function(t){return t?t.getChildCount():0},getParent:function(t){return t.getParent()},setParent:function(t,e){t.setParent(e)},getChildIndex:function(t){return t.getChildIndex()},setChildIndex:function(t,e){t.setChildIndex(e)},replaceChildren:function(t,e,n,i){t&&t.replaceChildren(e,n,i)}}),l.antlr.runtime.ANTLRStringStream=function(t){this.p=0,this.line=1,this.charPositionInLine=0,this.markDepth=0,this.markers=null,this.lastMarker=null,this.data=t,this.n=t.length},l.antlr.runtime.ANTLRStringStream.prototype={reset:function(){this.p=0,this.line=1,this.charPositionInLine=0,this.markDepth=0},consume:function(){this.p<this.n&&(this.charPositionInLine++,"\n"===this.data.charAt(this.p)&&(this.line++,this.charPositionInLine=0),this.p++)},LA:function(t){t<0&&t++;t=this.p+t-1;return t>=this.n||t<0?l.antlr.runtime.CharStream.EOF:this.data.charAt(t)},index:function(){return this.p},size:function(){return this.n},mark:function(){this.markers||(this.markers=[],this.markers.push(null)),this.markDepth++;var t=null;return this.markDepth>=this.markers.length?this.markers.push(t={}):t=this.markers[this.markDepth],t.p=this.p,t.line=this.line,t.charPositionInLine=this.charPositionInLine,this.lastMarker=this.markDepth,this.markDepth},rewind:function(t){l.antlr.lang.isNumber(t)||(t=this.lastMarker);var e=this.markers[t];this.seek(e.p),this.line=e.line,this.charPositionInLine=e.charPositionInLine,this.release(t)},release:function(t){this.markDepth=t,this.markDepth--},seek:function(t){if(t<=this.p)this.p=t;else for(;this.p<t;)this.consume()},substring:function(t,e){return this.data.substr(t,e-t+1)},getLine:function(){return this.line},getCharPositionInLine:function(){return this.charPositionInLine},setLine:function(t){this.line=t},setCharPositionInLine:function(t){this.charPositionInLine=t},getSourceName:function(){return null}},l.antlr.runtime.ANTLRStringStream.LT=l.antlr.runtime.ANTLRStringStream.LA,l.antlr.runtime.CommonTokenStream=function(t,e){this.p=-1,this.channel=l.antlr.runtime.Token.DEFAULT_CHANNEL,this.v_discardOffChannelTokens=!1,this.tokens=[],2<=arguments.length?this.channel=e:1===arguments.length&&(this.tokenSource=t)},l.antlr.runtime.CommonTokenStream.prototype={setTokenSource:function(t){this.tokenSource=t,this.tokens=[],this.p=-1,this.channel=l.antlr.runtime.Token.DEFAULT_CHANNEL},fillBuffer:function(){for(var t,e,n=0,i=this.tokenSource.nextToken();l.antlr.lang.isValue(i)&&i.getType()!=l.antlr.runtime.CharStream.EOF;)t=!1,this.channelOverrideMap&&(e=this.channelOverrideMap[i.getType()],l.antlr.lang.isValue(e)&&i.setChannel(e)),(t=this.discardSet&&this.discardSet[i.getType()]||this.v_discardOffChannelTokens&&i.getChannel()!=this.channel?!0:t)||(i.setTokenIndex(n),this.tokens.push(i),n++),i=this.tokenSource.nextToken();this.p=0,this.p=this.skipOffTokenChannels(this.p)},consume:function(){this.p<this.tokens.length&&(this.p++,this.p=this.skipOffTokenChannels(this.p))},skipOffTokenChannels:function(t){for(var e=this.tokens.length;t<e&&this.tokens[t].getChannel()!=this.channel;)t++;return t},skipOffTokenChannelsReverse:function(t){for(;0<=t&&this.tokens[t].getChannel()!=this.channel;)t--;return t},setTokenTypeChannel:function(t,e){this.channelOverrideMap||(this.channelOverrideMap={}),this.channelOverrideMap[t]=e},discardTokenType:function(t){this.discardSet||(this.discardSet={}),this.discardSet[t]=!0},discardOffChannelTokens:function(t){this.v_discardOffChannelTokens=t},getTokens:function(t,e,n){if(-1===this.p&&this.fillBuffer(),0===arguments.length)return this.tokens;if(l.antlr.lang.isArray(n)?n=new l.antlr.runtime.BitSet(n):l.antlr.lang.isNumber(n)&&(n=l.antlr.runtime.BitSet.of(n)),(e=e>=this.tokens.length?this.tokens.length-1:e)<(t=t<0?0:t))return null;for(var i,r=[],s=t;s<=e;s++)i=this.tokens[s],this.types&&!n.member(i.getType())||r.push(i);return r=0===r.length?null:r},LT:function(t){if(-1===this.p&&this.fillBuffer(),0===t)return null;if(t<0)return this.LB(-1*t);if(this.p+t-1>=this.tokens.length)return l.antlr.runtime.Token.EOF_TOKEN;for(var e=this.p,n=1;n<t;)e=this.skipOffTokenChannels(e+1),n++;return e>=this.tokens.length?l.antlr.runtime.Token.EOF_TOKEN:this.tokens[e]},LB:function(t){if(-1===this.p&&this.fillBuffer(),0===t)return null;if(this.p-t<0)return null;for(var e=this.p,n=1;n<=t;)e=this.skipOffTokenChannelsReverse(e-1),n++;return e<0?null:this.tokens[e]},get:function(t){return this.tokens[t]},LA:function(t){return this.LT(t).getType()},mark:function(){return-1===this.p&&this.fillBuffer(),this.lastMarker=this.index(),this.lastMarker},release:function(t){},size:function(){return this.tokens.length},index:function(){return this.p},rewind:function(t){l.antlr.lang.isNumber(t)||(t=this.lastMarker),this.seek(t)},reset:function(){this.p=-1,this.lastMarker=0},seek:function(t){this.p=t},getTokenSource:function(){return this.tokenSource},getSourceName:function(){return this.getTokenSource().getSourceName()},toString:function(t,e){if(0===arguments.length&&(-1===this.p&&this.fillBuffer(),t=0,e=this.tokens.length-1),!l.antlr.lang.isNumber(t)&&!l.antlr.lang.isNumber(e)){if(!l.antlr.lang.isValue(t)||!l.antlr.lang.isValue(e))return null;t=t.getTokenIndex(),e=e.getTokenIndex()}var n,i="";if(t<0||e<0)return null;for(-1==this.p&&this.fillBuffer(),e>=this.tokens.length&&(e=this.tokens.length-1),n=t;n<=e;n++)i+=this.tokens[n].getText();return i}},l.antlr.runtime.TokenRewriteStream=function(){var t=l.antlr.runtime.TokenRewriteStream.superclass;this.programs=null,this.lastRewriteTokenIndexes=null,0===arguments.length||t.constructor.apply(this,arguments),this.init()},u=l.antlr.runtime.TokenRewriteStream,l.antlr.lang.augmentObject(u,{DEFAULT_PROGRAM_NAME:"default",PROGRAM_INIT_SIZE:100,MIN_TOKEN_INDEX:0}),u.RewriteOperation=function(t,e){this.index=t,this.text=e},u.RewriteOperation.prototype={execute:function(t){return this.index},toString:function(){return this.text}},u.InsertBeforeOp=function(t,e){u.InsertBeforeOp.superclass.constructor.call(this,t,e)},l.antlr.lang.extend(u.InsertBeforeOp,u.RewriteOperation,{execute:function(t){return t.push(this.text),this.index}}),u.ReplaceOp=function(t,e,n){u.ReplaceOp.superclass.constructor.call(this,t,n),this.lastIndex=e},l.antlr.lang.extend(u.ReplaceOp,u.RewriteOperation,{execute:function(t){return l.antlr.lang.isValue(this.text)&&t.push(this.text),this.lastIndex+1}}),u.DeleteOp=function(t,e){u.DeleteOp.superclass.constructor.call(this,t,e)},l.antlr.lang.extend(u.DeleteOp,u.ReplaceOp),l.antlr.lang.extend(u,l.antlr.runtime.CommonTokenStream,{init:function(){this.programs={},this.programs[u.DEFAULT_PROGRAM_NAME]=[],this.lastRewriteTokenIndexes={}},rollback:function(){var t;1===arguments.length?t=u.DEFAULT_PROGRAM_NAME:2===arguments.length&&(t=arguments[0]);var e=this.programs[t];e&&(programs[t]=e.slice(u.MIN_TOKEN_INDEX,this.instructionIndex))},deleteProgram:function(t){t=t||u.DEFAULT_PROGRAM_NAME,this.rollback(t,u.MIN_TOKEN_INDEX)},addToSortedRewriteList:function(){var t,e;1===arguments.length?(t=u.DEFAULT_PROGRAM_NAME,e=arguments[0]):2===arguments.length&&(t=arguments[0],e=arguments[1]);for(var n,i,r,s,o=this.getProgram(t),a=0,l=o.length;a<l;a++){if((n=o[a]).index===e.index){if(e instanceof u.ReplaceOp){for(i=!1,s=a;s<o.length&&(r=o[a]).index===e.index;s++)if(r instanceof u.ReplaceOp){o[a]=e,i=!0;break}i||o.splice(s,0,e)}else o.splice(a,0,e);break}if(n.index>e.index){o.splice(a,0,e);break}}a===l&&o.push(e)},insertAfter:function(){var t,e,n;2===arguments.length?(e=u.DEFAULT_PROGRAM_NAME,t=arguments[0],n=arguments[1]):3===arguments.length&&(e=arguments[0],t=arguments[1],n=arguments[2]),t instanceof l.antlr.runtime.CommonToken&&(t=t.index),this.insertBefore(e,t+1,n)},insertBefore:function(){var t,e,n;2===arguments.length?(e=u.DEFAULT_PROGRAM_NAME,t=arguments[0],n=arguments[1]):3===arguments.length&&(e=arguments[0],t=arguments[1],n=arguments[2]),t instanceof l.antlr.runtime.CommonToken&&(t=t.index),this.addToSortedRewriteList(e,new u.InsertBeforeOp(t,n))},replace:function(){var t,e,n,i;2===arguments.length?(t=u.DEFAULT_PROGRAM_NAME,n=e=arguments[0],i=arguments[1]):3===arguments.length&&(t=u.DEFAULT_PROGRAM_NAME,e=arguments[0],n=arguments[1],i=arguments[2]),4===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3]),e instanceof l.antlr.runtime.CommonToken&&(e=e.index),(n=n instanceof l.antlr.runtime.CommonToken?n.index:n)<e||n<0||e<0||this.addToSortedRewriteList(t,new u.ReplaceOp(e,n,i))},remove:function(){for(var t=[],e=arguments.length-1;0<=e;)t[e]=arguments[e],e--;t.push(""),this.replace.apply(this,t)},getLastRewriteTokenIndex:function(t){return t=t||u.DEFAULT_PROGRAM_NAME,this.lastRewriteTokenIndexes[t]||-1},setLastRewriteTokenIndex:function(t,e){this.lastRewriteTokenIndexes[t]=e},getProgram:function(t){return this.programs[t]||this.initializeProgram(t)},initializeProgram:function(t){var e=[];return this.programs[t]=e},toOriginalString:function(t,e){l.antlr.lang.isNumber(t)||(t=u.MIN_TOKEN_INDEX),l.antlr.lang.isNumber(e)||(e=this.size()-1);for(var n=[],i=t;i>=u.MIN_TOKEN_INDEX&&i<=e&&i<this.tokens.length;i++)n.push(this.get(i).getText());return n.join("")},toString:function(){var t,e,n;0===arguments.length?(t=u.DEFAULT_PROGRAM_NAME,e=u.MIN_TOKEN_INDEX,n=this.size()-1):1===arguments.length?(t=arguments[0],e=u.MIN_TOKEN_INDEX,n=this.size()-1):2===arguments.length&&(t=u.DEFAULT_PROGRAM_NAME,e=arguments[0],n=arguments[1]);var i=this.programs[t];if(!i||0===i.length)return this.toOriginalString(e,n);for(var r,s,o=0,a=e,l=[];a>=u.MIN_TOKEN_INDEX&&a<=n&&a<this.tokens.length;){if(o<i.length){for(r=i[o];r.index<a&&o<i.length;)++o<i.length&&(r=i[o]);for(;a===r.index&&o<i.length;)a=r.execute(l),++o<i.length&&(r=i[o])}a<=n&&(l.push(this.get(a).getText()),a++)}for(s=o;s<i.length;s++)(r=i[s]).index>=this.size()&&r.execute(l);return l.join("")},toDebugString:function(t,e){l.antlr.lang.isNumber(t)||(t=u.MIN_TOKEN_INDEX),l.antlr.lang.isNumber(e)||(e=this.size()-1);for(var n=[],i=t;i>=u.MIN_TOKEN_INDEX&&i<=e&&i<this.tokens.length;i++)n.push(this.get(i));return n.join("")}}),l.antlr.runtime.tree.TreeNodeStream=function(){},l.antlr.runtime.tree.CommonTreeNodeStream=function(t,e,n){1===arguments.length&&(e=t,t=new l.antlr.runtime.tree.CommonTreeAdaptor),arguments.length<=2&&(n=l.antlr.runtime.tree.CommonTreeNodeStream.DEFAULT_INITIAL_BUFFER_SIZE),this.uniqueNavigationNodes=!1,this.p=-1;var i=l.antlr.runtime.Token;this.root=e,this.adaptor=t,this.nodes=[],this.down=this.adaptor.create(i.DOWN,"DOWN"),this.up=this.adaptor.create(i.UP,"UP"),this.eof=this.adaptor.create(i.EOF,"EOF")},l.antlr.lang.augmentObject(l.antlr.runtime.tree.CommonTreeNodeStream,{DEFAULT_INITIAL_BUFFER_SIZE:100,INITIAL_CALL_STACK_SIZE:10}),l.antlr.lang.extend(l.antlr.runtime.tree.CommonTreeNodeStream,l.antlr.runtime.tree.TreeNodeStream,{StreamIterator:function(){var e=0,n=this.nodes,i=this.eof;return{hasNext:function(){return e<n.length},next:function(){var t=e;return e++,t<n.length?n[t]:i},remove:function(){throw new Error("cannot remove nodes from stream")}}},fillBuffer:function(t){var e=!1;l.antlr.lang.isUndefined(t)&&(t=this.root,e=!0);var n=this.adaptor.isNil(t);n||this.nodes.push(t);var i,r,s=this.adaptor.getChildCount(t);for(!n&&0<s&&this.addNavigationNode(l.antlr.runtime.Token.DOWN),i=0;i<s;i++)r=this.adaptor.getChild(t,i),this.fillBuffer(r);!n&&0<s&&this.addNavigationNode(l.antlr.runtime.Token.UP),e&&(this.p=0)},getNodeIndex:function(t){var e;for(-1==this.p&&this.fillBuffer(),e=0;e<this.nodes.length;e++)if(this.nodes[e]===t)return e;return-1},addNavigationNode:function(t){var e=null,e=t===l.antlr.runtime.Token.DOWN?this.hasUniqueNavigationNodes()?this.adaptor.create(l.antlr.runtime.Token.DOWN,"DOWN"):this.down:this.hasUniqueNavigationNodes()?this.adaptor.create(l.antlr.runtime.Token.UP,"UP"):this.up;this.nodes.push(e)},get:function(t){return-1===this.p&&this.fillBuffer(),this.nodes[t]},LT:function(t){return-1===this.p&&this.fillBuffer(),0===t?null:t<0?this.LB(-1*t):this.p+t-1>=this.nodes.length?this.eof:this.nodes[this.p+t-1]},getCurrentSymbol:function(){return this.LT(1)},LB:function(t){return 0===t||this.p-t<0?null:this.nodes[this.p-t]},getTreeSource:function(){return this.root},getSourceName:function(){return this.getTokenStream().getSourceName()},getTokenStream:function(){return this.tokens},setTokenStream:function(t){this.tokens=t},getTreeAdaptor:function(){return this.adaptor},setTreeAdaptor:function(t){this.adaptor=t},hasUniqueNavigationNodes:function(){return this.uniqueNavigationNodes},setUniqueNavigationNodes:function(t){this.uniqueNavigationNodes=t},consume:function(){-1===this.p&&this.fillBuffer(),this.p++},LA:function(t){return this.adaptor.getType(this.LT(t))},mark:function(){return-1===this.p&&this.fillBuffer(),this.lastMarker=this.index(),this.lastMarker},release:function(t){},index:function(){return this.p},rewind:function(t){l.antlr.lang.isNumber(t)||(t=this.lastMarker),this.seek(t)},seek:function(t){-1===this.p&&this.fillBuffer(),this.p=t},push:function(t){this.calls||(this.calls=[]),this.calls.push(this.p),this.seek(t)},pop:function(){var t=this.calls.pop();return this.seek(t),t},reset:function(){this.p=-1,this.lastMarker=0,this.calls&&(this.calls=[])},size:function(){return-1===this.p&&this.fillBuffer(),this.nodes.length},iterator:function(){return-1===this.p&&this.fillBuffer(),this.StreamIterator()},replaceChildren:function(t,e,n,i){t&&this.adaptor.replaceChildren(t,e,n,i)},toTokenString:function(t,e){-1===this.p&&this.fillBuffer();for(var n,i="",r=t;r<this.nodes.length&&r<=e;r++)n=this.nodes[r],i+=" "+this.adaptor.getToken(n);return i},toString:function(t,e){var n,i,r,s,o,a="";if(0===arguments.length){for(-1===this.p&&this.fillBuffer(),r=0;r<this.nodes.length;r++)i=this.nodes[r],a+=" ",a+=this.adaptor.getType(i);return a}if(!l.antlr.lang.isNumber(t)||!l.antlr.lang.isNumber(e))return null;if(-1===this.p&&this.fillBuffer(),l.antlr.runtime.tree.CommonTree,l.antlr.runtime.tree.CommonTree,this.tokens)return s=this.adaptor.getTokenStartIndex(t),o=this.adaptor.getTokenStopIndex(e),this.adaptor.getType(e)===l.antlr.runtime.Token.UP?o=this.adaptor.getTokenStopIndex(t):this.adaptor.getType(e)==l.antlr.runtime.Token.EOF&&(o=this.size()-2),this.tokens.toString(s,o);for(i=null,r=0;r<this.nodes.length&&(i=this.nodes[r])!==t;r++);for(a=n="",i=this.nodes[r];i!==e;)n=this.adaptor.getText(i),a+=n=!l.antlr.lang.isString(n)?" "+this.adaptor.getType(i).toString():n,r++,i=nodes[r];return n=this.adaptor.getText(e),a+=n=!l.antlr.lang.isString(n)?" "+this.adaptor.getType(e).toString():n}}),l.antlr.runtime.tree.RewriteRuleElementStream=function(t,e,n){this.cursor=0,this.dirty=!1,this.elementDescription=e,this.adaptor=t,n&&(l.antlr.lang.isArray(n)?(this.singleElement=null,this.elements=n):this.add(n))},l.antlr.runtime.tree.RewriteRuleElementStream.prototype={reset:function(){this.cursor=0,this.dirty=!0},add:function(t){l.antlr.lang.isValue(t)&&(this.elements?this.elements.push(t):l.antlr.lang.isValue(this.singleElement)?(this.elements=[],this.elements.push(this.singleElement),this.singleElement=null,this.elements.push(t)):this.singleElement=t)},nextTree:function(){var t,e=this.size();return this.dirty||this.cursor>=e&&1==e?(t=this._next(),this.dup(t)):t=this._next()},_next:function(){var t=this.size();if(0===t)throw new l.antlr.runtime.tree.RewriteEmptyStreamException(this.elementDescription);if(this.cursor>=t){if(1===t)return this.toTree(this.singleElement);throw new l.antlr.runtime.tree.RewriteCardinalityException(this.elementDescription)}if(l.antlr.lang.isValue(this.singleElement))return this.cursor++,this.toTree(this.singleElement);t=this.toTree(this.elements[this.cursor]);return this.cursor++,t},toTree:function(t){return t&&t.getTree?t.getTree():t},hasNext:function(){return l.antlr.lang.isValue(this.singleElement)&&this.cursor<1||this.elements&&this.cursor<this.elements.length},size:function(){var t=0;return l.antlr.lang.isValue(this.singleElement)&&(t=1),this.elements?this.elements.length:t},getDescription:function(){return this.elementDescription}},l.antlr.runtime.tree.RewriteRuleNodeStream=function(t,e,n){l.antlr.runtime.tree.RewriteRuleNodeStream.superclass.constructor.apply(this,arguments)},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteRuleNodeStream,l.antlr.runtime.tree.RewriteRuleElementStream,{nextNode:function(){return this._next()},toTree:function(t){return this.adaptor.dupNode(t)},dup:function(){throw new Error("dup can't be called for a node stream.")}}),l.antlr.runtime.tree.RewriteRuleTokenStream=function(t,e,n){l.antlr.runtime.tree.RewriteRuleTokenStream.superclass.constructor.apply(this,arguments)},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteRuleTokenStream,l.antlr.runtime.tree.RewriteRuleElementStream,{nextNode:function(){var t=this._next();return this.adaptor.create(t)},nextToken:function(){return this._next()},toTree:function(t){return t},dup:function(t){throw new Error("dup can't be called for a token stream.")}}),l.antlr.runtime.tree.RewriteRuleSubtreeStream=function(){l.antlr.runtime.tree.RewriteRuleSubtreeStream.superclass.constructor.apply(this,arguments)},l.antlr.lang.extend(l.antlr.runtime.tree.RewriteRuleSubtreeStream,l.antlr.runtime.tree.RewriteRuleElementStream,{nextNode:function(){var t,e=this.size();return this.dirty||this.cursor>=e&&1===e?(t=this._next(),this.adaptor.dupNode(t)):t=this._next()},dup:function(t){return this.adaptor.dupTree(t)}}),l.antlr.runtime.BaseRecognizer=function(t){this.state=t||new l.antlr.runtime.RecognizerSharedState},l.antlr.lang.augmentObject(l.antlr.runtime.BaseRecognizer,{MEMO_RULE_FAILED:-2,MEMO_RULE_UNKNOWN:-1,INITIAL_FOLLOW_STACK_SIZE:100,MEMO_RULE_FAILED_I:-2,DEFAULT_TOKEN_CHANNEL:l.antlr.runtime.Token.DEFAULT_CHANNEL,HIDDEN:l.antlr.runtime.Token.HIDDEN_CHANNEL,NEXT_TOKEN_RULE_NAME:"nextToken"}),l.antlr.runtime.BaseRecognizer.prototype={reset:function(){var t,e;if(this.state&&(this.state._fsp=-1,this.state.errorRecovery=!1,this.state.lastErrorIndex=-1,this.state.failed=!1,this.state.syntaxErrors=0,this.state.backtracking=0,this.state.ruleMemo))for(t=0,e=this.state.ruleMemo.length;t<e;t++)this.state.ruleMemo[t]=null},match:function(t,e,n){var i=this.getCurrentInputSymbol(t);return t.LA(1)===e?(t.consume(),this.state.errorRecovery=!1,this.state.failed=!1,i):0<this.state.backtracking?(this.state.failed=!0,i):i=this.recoverFromMismatchedToken(t,e,n)},matchAny:function(t){this.state.errorRecovery=!1,this.state.failed=!1,t.consume()},mismatchIsUnwantedToken:function(t,e){return t.LA(2)===e},mismatchIsMissingToken:function(t,e){return!!e&&(e.member(l.antlr.runtime.Token.EOR_TOKEN_TYPE)&&(0<=this.state._fsp&&e.remove(l.antlr.runtime.Token.EOR_TOKEN_TYPE),this.computeContextSensitiveRuleFOLLOW(),e=e.or(this.viableTokensFollowingThisRule)),!(!e.member(t.LA(1))&&!e.member(l.antlr.runtime.Token.EOR_TOKEN_TYPE)))},mismatch:function(t,e,n){if(this.mismatchIsUnwantedToken(t,e))throw new l.antlr.runtime.UnwantedTokenException(e,t);if(this.mismatchIsMissingToken(t,n))throw new l.antlr.runtime.MissingTokenException(e,t,null);throw new l.antlr.runtime.MismatchedTokenException(e,t)},reportError:function(t){this.state.errorRecovery||(this.state.syntaxErrors++,this.state.errorRecovery=!0,this.displayRecognitionError(this.getTokenNames(),t))},displayRecognitionError:function(t,e){var n=this.getErrorHeader(e),t=this.getErrorMessage(e,t);this.emitErrorMessage(n+" "+t)},getErrorHeader:function(t){return l.antlr.lang.isNumber(t.line)||(t.line=0),"line "+t.line+":"+t.charPositionInLine},emitErrorMessage:function(t){("undefined"!=typeof window&&window.alert?alert:print)(t)},getErrorMessage:function(t,e){var n,i,r=t&&t.getMessage?t.getMessage():null;return t instanceof l.antlr.runtime.UnwantedTokenException?(i="<unknown>",i=t.expecting==l.antlr.runtime.Token.EOF?"EOF":e[t.expecting],r="extraneous input "+this.getTokenErrorDisplay(t.getUnexpectedToken())+" expecting "+i):t instanceof l.antlr.runtime.MissingTokenException?(i="<unknown>",r="missing "+(i=(n=t).expecting==l.antlr.runtime.Token.EOF?"EOF":e[n.expecting])+" at "+this.getTokenErrorDisplay(t.token)):t instanceof l.antlr.runtime.MismatchedTokenException?(i="<unknown>",i=(n=t).expecting==l.antlr.runtime.Token.EOF?"EOF":e[n.expecting],r="mismatched input "+this.getTokenErrorDisplay(t.token)+" expecting "+i):t instanceof l.antlr.runtime.NoViableAltException?r="no viable alternative at input "+this.getTokenErrorDisplay(t.token):t instanceof l.antlr.runtime.EarlyExitException?r="required (...)+ loop did not match anything at input "+this.getTokenErrorDisplay(t.token):t instanceof l.antlr.runtime.MismatchedSetException||t instanceof l.antlr.runtime.MismatchedNotSetException?r="mismatched input "+this.getTokenErrorDisplay(t.token)+" expecting set "+t.expecting:t instanceof l.antlr.runtime.FailedPredicateException&&(r="rule "+t.ruleName+" failed predicate: {"+t.predicateText+"}?"),r},getNumberOfSyntaxErrors:function(){return this.state.syntaxErrors},getTokenErrorDisplay:function(t){var e=t.getText();return"'"+(e=(e=(e=(e=!l.antlr.lang.isValue(e)?t.getType()==l.antlr.runtime.Token.EOF?"<EOF>":"<"+t.getType()+">":e).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"},recover:function(t,e){this.state.lastErrorIndex==t.index()&&t.consume(),this.state.lastErrorIndex=t.index();var n=this.computeErrorRecoverySet();this.beginResync(),this.consumeUntil(t,n),this.endResync()},beginResync:function(){},endResync:function(){},computeErrorRecoverySet:function(){return this.combineFollows(!1)},computeContextSensitiveRuleFOLLOW:function(){return this.combineFollows(!0)},combineFollows:function(t){for(var e,n=this.state._fsp,i=new l.antlr.runtime.BitSet,r=n;0<=r;r--)if(e=this.state.following[r],i.orInPlace(e),t){if(!e.member(l.antlr.runtime.Token.EOR_TOKEN_TYPE))break;0<r&&i.remove(l.antlr.runtime.Token.EOR_TOKEN_TYPE)}return i},recoverFromMismatchedToken:function(t,e,n){var i=null;if(this.mismatchIsUnwantedToken(t,e)){i=new l.antlr.runtime.UnwantedTokenException(e,t),this.beginResync(),t.consume(),this.endResync(),this.reportError(i);var r=this.getCurrentInputSymbol(t);return t.consume(),r}if(this.mismatchIsMissingToken(t,n)){n=this.getMissingSymbol(t,i,e,n),i=new l.antlr.runtime.MissingTokenException(e,t,n);return this.reportError(i),n}throw i=new l.antlr.runtime.MismatchedTokenException(e,t)},recoverFromMismatchedSet:function(t,e,n){if(this.mismatchIsMissingToken(t,n))return this.reportError(e),this.getMissingSymbol(t,e,l.antlr.runtime.Token.INVALID_TOKEN_TYPE,n);throw e},getCurrentInputSymbol:function(t){return null},getMissingSymbol:function(t,e,n,i){return null},consumeUntil:function(t,e){for(var n=t.LA(1);n!=l.antlr.runtime.Token.EOF&&!e.member(n);)t.consume(),n=t.LA(1)},pushFollow:function(t){if(this.state._fsp+1>=this.state.following.length){for(var e=[],n=this.state.following.length-1;0<=n;n--)e[n]=this.state.following[n];this.state.following=e}this.state._fsp++,this.state.following[this.state._fsp]=t},getRuleInvocationStack:function(t,e){throw new Error("Not implemented.")},getBacktrackingLevel:function(){return this.state.backtracking},getTokenNames:function(){return null},getGrammarFileName:function(){return null},toStrings:function(t){if(!t)return null;for(var e=[],n=0;n<t.length;n++)e.push(t[n].getText());return e},getRuleMemoization:function(t,e){this.state.ruleMemo[t]||(this.state.ruleMemo[t]={});e=this.state.ruleMemo[t][e];return l.antlr.lang.isNumber(e)?e:l.antlr.runtime.BaseRecognizer.MEMO_RULE_UNKNOWN},alreadyParsedRule:function(t,e){e=this.getRuleMemoization(e,t.index());return e!=l.antlr.runtime.BaseRecognizer.MEMO_RULE_UNKNOWN&&(e==l.antlr.runtime.BaseRecognizer.MEMO_RULE_FAILED?this.state.failed=!0:t.seek(e+1),!0)},memoize:function(t,e,n){t=this.state.failed?l.antlr.runtime.BaseRecognizer.MEMO_RULE_FAILED:t.index()-1;if(!l.antlr.lang.isValue(this.state.ruleMemo))throw new Error("!!!!!!!!! memo array is null for "+this.getGrammarFileName());if(e>=this.state.ruleMemo.length)throw new Error("!!!!!!!!! memo size is "+this.state.ruleMemo.length+", but rule index is "+e);l.antlr.lang.isValue(this.state.ruleMemo[e])&&(this.state.ruleMemo[e][n]=t)},getRuleMemoizationCacheSize:function(){for(var t=0,e=0;this.state.ruleMemo&&e<this.state.ruleMemo.length;e++){var n=this.state.ruleMemo[e];n&&(t+=n.length)}return t},traceIn:function(t,e,n){this.emitErrorMessage("enter "+t+" "+n),this.state.failed&&this.emitErrorMessage(" failed="+this.failed),0<this.state.backtracking&&this.emitErrorMessage(" backtracking="+this.state.backtracking)},traceOut:function(t,e,n){this.emitErrorMessage("exit "+t+" "+n),this.state.failed&&this.emitErrorMessage(" failed="+this.state.failed),0<this.state.backtracking&&this.emitErrorMessage(" backtracking="+this.state.backtracking)}},l.antlr.runtime.Lexer=function(t,e){e&&l.antlr.runtime.Lexer.superclass.constructor.call(this,e),t&&(this.input=t)},l.antlr.lang.extend(l.antlr.runtime.Lexer,l.antlr.runtime.BaseRecognizer,{reset:function(){l.antlr.runtime.Lexer.superclass.reset.call(this),l.antlr.lang.isValue(this.input)&&this.input.seek(0),l.antlr.lang.isValue(this.state)&&(this.state.token=null,this.state.type=l.antlr.runtime.Token.INVALID_TOKEN_TYPE,this.state.channel=l.antlr.runtime.Token.DEFAULT_CHANNEL,this.state.tokenStartCharIndex=-1,this.state.tokenStartCharPositionInLine=-1,this.state.tokenStartLine=-1,this.state.text=null)},nextToken:function(){for(;;){if(this.state.token=null,this.state.channel=l.antlr.runtime.Token.DEFAULT_CHANNEL,this.state.tokenStartCharIndex=this.input.index(),this.state.tokenStartCharPositionInLine=this.input.getCharPositionInLine(),this.state.tokenStartLine=this.input.getLine(),this.state.text=null,this.input.LA(1)===l.antlr.runtime.CharStream.EOF)return l.antlr.runtime.Token.EOF_TOKEN;try{if(this.mTokens(),l.antlr.lang.isValue(this.state.token)){if(this.state.token==l.antlr.runtime.Token.SKIP_TOKEN)continue}else this.emit();return this.state.token}catch(t){if(t instanceof l.antlr.runtime.RecognitionException)this.reportError(t);else{if(!(t instanceof l.antlr.runtime.NoViableAltException))throw t;this.reportError(t),this.recover(t)}}}},skip:function(){this.state.token=l.antlr.runtime.Token.SKIP_TOKEN},setCharStream:function(t){this.input=null,this.reset(),this.input=t},getCharStream:function(){return this.input},getSourceName:function(){return this.input.getSourceName()},emit:function(){if(0===arguments.length){var t=new l.antlr.runtime.CommonToken(this.input,this.state.type,this.state.channel,this.state.tokenStartCharIndex,this.getCharIndex()-1);return t.setLine(this.state.tokenStartLine),t.setText(this.state.text),t.setCharPositionInLine(this.state.tokenStartCharPositionInLine),this.state.token=t}this.state.token=arguments[0]},match:function(t){var e,n=0;if(l.antlr.lang.isString(t))for(;n<t.length;){if(this.input.LA(1)!=t.charAt(n)){if(0<this.state.backtracking)return void(this.state.failed=!0);throw e=new l.antlr.runtime.MismatchedTokenException(t.charAt(n),this.input),this.recover(e),e}n++,this.input.consume(),this.state.failed=!1}else if(l.antlr.lang.isNumber(t)){if(this.input.LA(1)!=t){if(0<this.state.backtracking)return void(this.state.failed=!0);throw e=new l.antlr.runtime.MismatchedTokenException(t,this.input),this.recover(e),e}this.input.consume(),this.state.failed=!1}},matchAny:function(){this.input.consume()},matchRange:function(t,e){if(this.input.LA(1)<t||this.input.LA(1)>e){if(0<this.state.backtracking)return void(this.state.failed=!0);throw mre=new l.antlr.runtime.MismatchedRangeException(t,e,this.input),this.recover(mre),mre}this.input.consume(),this.state.failed=!1},getLine:function(){return this.input.getLine()},getCharPositionInLine:function(){return this.input.getCharPositionInLine()},getCharIndex:function(){return this.input.index()},getText:function(){return l.antlr.lang.isString(this.state.text)?this.state.text:this.input.substring(this.state.tokenStartCharIndex,this.getCharIndex()-1)},setText:function(t){this.state.text=t},reportError:function(t){this.displayRecognitionError(this.getTokenNames(),t)},getErrorMessage:function(t,e){return t instanceof l.antlr.runtime.MismatchedTokenException?"mismatched character "+this.getCharErrorDisplay(t.c)+" expecting "+this.getCharErrorDisplay(t.expecting):t instanceof l.antlr.runtime.NoViableAltException?"no viable alternative at character "+this.getCharErrorDisplay(t.c):t instanceof l.antlr.runtime.EarlyExitException?"required (...)+ loop did not match anything at character "+this.getCharErrorDisplay(t.c):t instanceof l.antlr.runtime.MismatchedNotSetException||t instanceof l.antlr.runtime.MismatchedSetException?"mismatched character "+this.getCharErrorDisplay(t.c)+" expecting set "+t.expecting:t instanceof l.antlr.runtime.MismatchedRangeException?"mismatched character "+this.getCharErrorDisplay(t.c)+" expecting set "+this.getCharErrorDisplay(t.a)+".."+this.getCharErrorDisplay(t.b):l.antlr.runtime.Lexer.superclass.getErrorMessage.call(this,t,e)},getCharErrorDisplay:function(t){var e=t;switch(e){case l.antlr.runtime.Token.EOF:e="<EOF>";break;case"\n":e="\\n";break;case"\t":e="\\t";break;case"\r":e="\\r"}return"'"+e+"'"},recover:function(t){this.input.consume()},traceIn:function(t,e){var n=String.fromCharCode(this.input.LT(1))+" line="+this.getLine()+":"+this.getCharPositionInLine();l.antlr.runtime.Lexer.superclass.traceIn.call(this,t,e,n)},traceOut:function(t,e){var n=String.fromCharCode(this.input.LT(1))+" line="+this.getLine()+":"+this.getCharPositionInLine();l.antlr.runtime.Lexer.superclass.traceOut.call(this,t,e,n)}}),l.antlr.runtime.ParserRuleReturnScope=function(){},l.antlr.runtime.ParserRuleReturnScope.prototype={getStart:function(){return this.start},getStop:function(){return this.stop}},l.antlr.runtime.tree.TreeRuleReturnScope=function(){},l.antlr.runtime.tree.TreeRuleReturnScope.prototype={getStart:function(){return this.start}},l.antlr.runtime.Parser=function(t,e){l.antlr.runtime.Parser.superclass.constructor.call(this,e),this.setTokenStream(t)},l.antlr.lang.extend(l.antlr.runtime.Parser,l.antlr.runtime.BaseRecognizer,{reset:function(){l.antlr.runtime.Parser.superclass.reset.call(this),l.antlr.lang.isValue(this.input)&&this.input.seek(0)},getCurrentInputSymbol:function(t){return t.LT(1)},getMissingSymbol:function(t,e,n,i){var r="<missing "+this.getTokenNames()[n]+">",s=new l.antlr.runtime.CommonToken(n,r),n=t.LT(1);return n.getType()===l.antlr.runtime.Token.EOF&&(r=n,n=(n=t.LT(-1))||r),s.line=n.getLine(),s.charPositionInLine=n.getCharPositionInLine(),s.channel=l.antlr.runtime.BaseRecognizer.DEFAULT_TOKEN_CHANNEL,s},setTokenStream:function(t){this.input=null,this.reset(),this.input=t},getTokenStream:function(){return this.input},getSourceName:function(){return this.input.getSourceName()},traceIn:function(t,e){l.antlr.runtime.Parser.superclass.traceIn.call(this,t,e,this.input.LT(1))},traceOut:function(t,e){l.antlr.runtime.Parser.superclass.traceOut.call(this,t,e,this.input.LT(1))}}),l.antlr.runtime.DFA=function(){},l.antlr.runtime.DFA.prototype={predict:function(t){var e,n,i,r=t.mark(),s=0;try{for(;;)if(0<=(e=this.special[s])){if(-1===(s=this.specialStateTransition(e,t)))return this.noViableAlt(s,t),0;t.consume()}else{if(1<=this.accept[s])return this.accept[s];if((n=t.LA(1))===l.antlr.runtime.Token.EOF?n=-1:l.antlr.lang.isString(n)&&(n=n.charCodeAt(0)),n>=this.min[s]&&n<=this.max[s]){if((i=this.transition[s][n-this.min[s]])<0){if(0<=this.eot[s]){s=this.eot[s],t.consume();continue}return this.noViableAlt(s,t),0}s=i,t.consume()}else{if(!(0<=this.eot[s]))return n==l.antlr.runtime.Token.EOF&&0<=this.eof[s]?this.accept[this.eof[s]]:(this.noViableAlt(s,t),0);s=this.eot[s],t.consume()}}}finally{t.rewind(r)}},noViableAlt:function(t,e){if(!(0<this.recognizer.state.backtracking)){e=new l.antlr.runtime.NoViableAltException(this.getDescription(),this.decisionNumber,t,e);throw this.error(e),e}this.recognizer.state.failed=!0},error:function(t){},specialStateTransition:function(t,e){return-1},getDescription:function(){return"n/a"}},l.antlr.lang.augmentObject(l.antlr.runtime.DFA,{unpackEncodedString:function(t){for(var e,n,i,r=[],s=0,o=0;o<t.length;o+=2)for(e=t.charCodeAt(o),65535===(n=t.charCodeAt(o+1))&&(n=-1),i=1;i<=e;i++)r[s++]=n;return r},unpackEncodedStringToUnsignedChars:function(t){return l.antlr.runtime.DFA.unpackEncodedString(t)}}),l.antlr.runtime.tree.TreeParser=function(t){l.antlr.runtime.tree.TreeParser.superclass.constructor.call(this,arguments[1]),this.setTreeNodeStream(t)},r=l.antlr.runtime.tree.TreeParser,l.antlr.lang.augmentObject(r,{DOWN:l.antlr.runtime.Token.DOWN,UP:l.antlr.runtime.Token.UP}),l.antlr.lang.extend(r,l.antlr.runtime.BaseRecognizer,{reset:function(){r.superclass.reset.call(this),this.input&&this.input.seek(0)},setTreeNodeStream:function(t){this.input=t},getTreeNodeStream:function(){return this.input},getSourceName:function(){return this.input.getSourceName()},getCurrentInputSymbol:function(t){return t.LT(1)},getMissingSymbol:function(t,e,n,i){var r="<missing "+this.getTokenNames()[n]+">";return new l.antlr.runtime.tree.CommonTree(new l.antlr.runtime.CommonToken(n,r))},matchAny:function(t){this.state.errorRecovery=!1,this.state.failed=!1;var e=this.input.LT(1);if(0!==this.input.getTreeAdaptor().getChildCount(e)){for(var n=0,i=this.input.getTreeAdaptor().getType(e);i!==l.antlr.runtime.Token.EOF&&(i!==r.UP||0!==n);)this.input.consume(),e=this.input.LT(1),(i=this.input.getTreeAdaptor().getType(e))===r.DOWN?n++:i===r.UP&&n--;this.input.consume()}else this.input.consume()},mismatch:function(t,e,n){throw new l.antlr.runtime.MismatchedTreeNodeException(e,t)},getErrorHeader:function(t){return this.getGrammarFileName()+": node from "+(t.approximateLineInfo?"after ":"")+"line "+t.line+":"+t.charPositionInLine},getErrorMessage:function(t,e){var n;return this instanceof r&&(n=t.input.getTreeAdaptor(),t.token=n.getToken(t.node),l.antlr.lang.isValue(t.token)||(t.token=new l.antlr.runtime.CommonToken(n.getType(t.node),n.getText(t.node)))),r.superclass.getErrorMessage.call(this,t,e)},traceIn:function(t,e){r.superclass.traceIn.call(this,t,e,this.input.LT(1))},traceOut:function(t,e){r.superclass.traceOut.call(this,t,e,this.input.LT(1))}}),l});
//# sourceMappingURL=antlr3-all_amd.min.js.map