Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
js.lib.prompto.bundle.js Maven / Gradle / Ivy
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
antlr4 = __webpack_require__(1);
prompto = __webpack_require__(46);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
exports.atn = __webpack_require__(2);
exports.dfa = __webpack_require__(33);
exports.tree = __webpack_require__(36);
exports.error = __webpack_require__(37);
exports.Token = __webpack_require__(6).Token;
exports.CommonToken = __webpack_require__(6).CommonToken;
exports.InputStream = __webpack_require__(40).InputStream;
exports.FileStream = __webpack_require__(41).FileStream;
exports.CommonTokenStream = __webpack_require__(43).CommonTokenStream;
exports.Lexer = __webpack_require__(22).Lexer;
exports.Parser = __webpack_require__(45).Parser;
var pc = __webpack_require__(12);
exports.PredictionContextCache = pc.PredictionContextCache;
exports.ParserRuleContext = __webpack_require__(16).ParserRuleContext;
exports.Interval = __webpack_require__(10).Interval;
exports.Utils = __webpack_require__(5);
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
exports.ATN = __webpack_require__(3).ATN;
exports.ATNDeserializer = __webpack_require__(17).ATNDeserializer;
exports.LexerATNSimulator = __webpack_require__(21).LexerATNSimulator;
exports.ParserATNSimulator = __webpack_require__(31).ParserATNSimulator;
exports.PredictionMode = __webpack_require__(32).PredictionMode;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
var LL1Analyzer = __webpack_require__(4).LL1Analyzer;
var IntervalSet = __webpack_require__(10).IntervalSet;
function ATN(grammarType , maxTokenType) {
// Used for runtime deserialization of ATNs from strings///
// The type of the ATN.
this.grammarType = grammarType;
// The maximum value for any symbol recognized by a transition in the ATN.
this.maxTokenType = maxTokenType;
this.states = [];
// Each subrule/rule is a decision point and we must track them so we
// can go back later and build DFA predictors for them. This includes
// all the rules, subrules, optional blocks, ()+, ()* etc...
this.decisionToState = [];
// Maps from rule index to starting state number.
this.ruleToStartState = [];
// Maps from rule index to stop state number.
this.ruleToStopState = null;
this.modeNameToStartState = {};
// For lexer ATNs, this maps the rule index to the resulting token type.
// For parser ATNs, this maps the rule index to the generated bypass token
// type if the
// {@link ATNDeserializationOptions//isGenerateRuleBypassTransitions}
// deserialization option was specified; otherwise, this is {@code null}.
this.ruleToTokenType = null;
// For lexer ATNs, this is an array of {@link LexerAction} objects which may
// be referenced by action transitions in the ATN.
this.lexerActions = null;
this.modeToStartState = [];
return this;
}
// Compute the set of valid tokens that can occur starting in state {@code s}.
// If {@code ctx} is null, the set of tokens will not include what can follow
// the rule surrounding {@code s}. In other words, the set will be
// restricted to tokens reachable staying within {@code s}'s rule.
ATN.prototype.nextTokensInContext = function(s, ctx) {
var anal = new LL1Analyzer(this);
return anal.LOOK(s, null, ctx);
};
// Compute the set of valid tokens that can occur starting in {@code s} and
// staying in same rule. {@link Token//EPSILON} is in set if we reach end of
// rule.
ATN.prototype.nextTokensNoContext = function(s) {
if (s.nextTokenWithinRule !== null ) {
return s.nextTokenWithinRule;
}
s.nextTokenWithinRule = this.nextTokensInContext(s, null);
s.nextTokenWithinRule.readOnly = true;
return s.nextTokenWithinRule;
};
ATN.prototype.nextTokens = function(s, ctx) {
if ( ctx===undefined ) {
return this.nextTokensNoContext(s);
} else {
return this.nextTokensInContext(s, ctx);
}
};
ATN.prototype.addState = function( state) {
if ( state !== null ) {
state.atn = this;
state.stateNumber = this.states.length;
}
this.states.push(state);
};
ATN.prototype.removeState = function( state) {
this.states[state.stateNumber] = null; // just free mem, don't shift states in list
};
ATN.prototype.defineDecisionState = function( s) {
this.decisionToState.push(s);
s.decision = this.decisionToState.length-1;
return s.decision;
};
ATN.prototype.getDecisionState = function( decision) {
if (this.decisionToState.length===0) {
return null;
} else {
return this.decisionToState[decision];
}
};
// Computes the set of input symbols which could follow ATN state number
// {@code stateNumber} in the specified full {@code context}. This method
// considers the complete parser context, but does not evaluate semantic
// predicates (i.e. all predicates encountered during the calculation are
// assumed true). If a path in the ATN exists from the starting state to the
// {@link RuleStopState} of the outermost context without matching any
// symbols, {@link Token//EOF} is added to the returned set.
//
// If {@code context} is {@code null}, it is treated as
// {@link ParserRuleContext//EMPTY}.
//
// @param stateNumber the ATN state number
// @param context the full parse context
// @return The set of potentially valid input symbols which could follow the
// specified state in the specified context.
// @throws IllegalArgumentException if the ATN does not contain a state with
// number {@code stateNumber}
var Token = __webpack_require__(6).Token;
ATN.prototype.getExpectedTokens = function( stateNumber, ctx ) {
if ( stateNumber < 0 || stateNumber >= this.states.length ) {
throw("Invalid state number.");
}
var s = this.states[stateNumber];
var following = this.nextTokens(s);
if (!following.contains(Token.EPSILON)) {
return following;
}
var expected = new IntervalSet();
expected.addSet(following);
expected.removeOne(Token.EPSILON);
while (ctx !== null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {
var invokingState = this.states[ctx.invokingState];
var rt = invokingState.transitions[0];
following = this.nextTokens(rt.followState);
expected.addSet(following);
expected.removeOne(Token.EPSILON);
ctx = ctx.parentCtx;
}
if (following.contains(Token.EPSILON)) {
expected.addOne(Token.EOF);
}
return expected;
};
ATN.INVALID_ALT_NUMBER = 0;
exports.ATN = ATN;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
var Set = __webpack_require__(5).Set;
var BitSet = __webpack_require__(5).BitSet;
var Token = __webpack_require__(6).Token;
var ATNConfig = __webpack_require__(7).ATNConfig;
var Interval = __webpack_require__(10).Interval;
var IntervalSet = __webpack_require__(10).IntervalSet;
var RuleStopState = __webpack_require__(8).RuleStopState;
var RuleTransition = __webpack_require__(11).RuleTransition;
var NotSetTransition = __webpack_require__(11).NotSetTransition;
var WildcardTransition = __webpack_require__(11).WildcardTransition;
var AbstractPredicateTransition = __webpack_require__(11).AbstractPredicateTransition;
var pc = __webpack_require__(12);
var predictionContextFromRuleContext = pc.predictionContextFromRuleContext;
var PredictionContext = pc.PredictionContext;
var SingletonPredictionContext = pc.SingletonPredictionContext;
function LL1Analyzer (atn) {
this.atn = atn;
}
//* Special value added to the lookahead sets to indicate that we hit
// a predicate during analysis if {@code seeThruPreds==false}.
///
LL1Analyzer.HIT_PRED = Token.INVALID_TYPE;
//*
// Calculates the SLL(1) expected lookahead set for each outgoing transition
// of an {@link ATNState}. The returned array has one element for each
// outgoing transition in {@code s}. If the closure from transition
// i leads to a semantic predicate before matching a symbol, the
// element at index i of the result will be {@code null}.
//
// @param s the ATN state
// @return the expected symbols for each outgoing transition of {@code s}.
///
LL1Analyzer.prototype.getDecisionLookahead = function(s) {
if (s === null) {
return null;
}
var count = s.transitions.length;
var look = [];
for(var alt=0; alt< count; alt++) {
look[alt] = new IntervalSet();
var lookBusy = new Set();
var seeThruPreds = false; // fail to get lookahead upon pred
this._LOOK(s.transition(alt).target, null, PredictionContext.EMPTY,
look[alt], lookBusy, new BitSet(), seeThruPreds, false);
// Wipe out lookahead for this alternative if we found nothing
// or we had a predicate when we !seeThruPreds
if (look[alt].length===0 || look[alt].contains(LL1Analyzer.HIT_PRED)) {
look[alt] = null;
}
}
return look;
};
//*
// Compute set of tokens that can follow {@code s} in the ATN in the
// specified {@code ctx}.
//
// If {@code ctx} is {@code null} and the end of the rule containing
// {@code s} is reached, {@link Token//EPSILON} is added to the result set.
// If {@code ctx} is not {@code null} and the end of the outermost rule is
// reached, {@link Token//EOF} is added to the result set.
//
// @param s the ATN state
// @param stopState the ATN state to stop at. This can be a
// {@link BlockEndState} to detect epsilon paths through a closure.
// @param ctx the complete parser context, or {@code null} if the context
// should be ignored
//
// @return The set of tokens that can follow {@code s} in the ATN in the
// specified {@code ctx}.
///
LL1Analyzer.prototype.LOOK = function(s, stopState, ctx) {
var r = new IntervalSet();
var seeThruPreds = true; // ignore preds; get all lookahead
ctx = ctx || null;
var lookContext = ctx!==null ? predictionContextFromRuleContext(s.atn, ctx) : null;
this._LOOK(s, stopState, lookContext, r, new Set(), new BitSet(), seeThruPreds, true);
return r;
};
//*
// Compute set of tokens that can follow {@code s} in the ATN in the
// specified {@code ctx}.
//
// If {@code ctx} is {@code null} and {@code stopState} or the end of the
// rule containing {@code s} is reached, {@link Token//EPSILON} is added to
// the result set. If {@code ctx} is not {@code null} and {@code addEOF} is
// {@code true} and {@code stopState} or the end of the outermost rule is
// reached, {@link Token//EOF} is added to the result set.
//
// @param s the ATN state.
// @param stopState the ATN state to stop at. This can be a
// {@link BlockEndState} to detect epsilon paths through a closure.
// @param ctx The outer context, or {@code null} if the outer context should
// not be used.
// @param look The result lookahead set.
// @param lookBusy A set used for preventing epsilon closures in the ATN
// from causing a stack overflow. Outside code should pass
// {@code new Set} for this argument.
// @param calledRuleStack A set used for preventing left recursion in the
// ATN from causing a stack overflow. Outside code should pass
// {@code new BitSet()} for this argument.
// @param seeThruPreds {@code true} to true semantic predicates as
// implicitly {@code true} and "see through them", otherwise {@code false}
// to treat semantic predicates as opaque and add {@link //HIT_PRED} to the
// result if one is encountered.
// @param addEOF Add {@link Token//EOF} to the result if the end of the
// outermost context is reached. This parameter has no effect if {@code ctx}
// is {@code null}.
///
LL1Analyzer.prototype._LOOK = function(s, stopState , ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) {
var c = new ATNConfig({state:s, alt:0, context: ctx}, null);
if (lookBusy.contains(c)) {
return;
}
lookBusy.add(c);
if (s === stopState) {
if (ctx ===null) {
look.addOne(Token.EPSILON);
return;
} else if (ctx.isEmpty() && addEOF) {
look.addOne(Token.EOF);
return;
}
}
if (s instanceof RuleStopState ) {
if (ctx ===null) {
look.addOne(Token.EPSILON);
return;
} else if (ctx.isEmpty() && addEOF) {
look.addOne(Token.EOF);
return;
}
if (ctx !== PredictionContext.EMPTY) {
// run thru all possible stack tops in ctx
for(var i=0; i>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;
k1 = (k1 << 15) | (k1 >>> 17);
k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;
h1 ^= k1;
h1 = (h1 << 13) | (h1 >>> 19);
h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;
h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));
}
k1 = 0;
switch (remainder) {
case 3:
k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;
case 2:
k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;
case 1:
k1 ^= (key.charCodeAt(i) & 0xff);
k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;
k1 = (k1 << 15) | (k1 >>> 17);
k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;
h1 ^= k1;
}
h1 ^= key.length;
h1 ^= h1 >>> 16;
h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;
h1 ^= h1 >>> 13;
h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;
h1 ^= h1 >>> 16;
return h1 >>> 0;
};
function standardEqualsFunction(a, b) {
return a.equals(b);
}
function standardHashCodeFunction(a) {
return a.hashCode();
}
function Set(hashFunction, equalsFunction) {
this.data = {};
this.hashFunction = hashFunction || standardHashCodeFunction;
this.equalsFunction = equalsFunction || standardEqualsFunction;
return this;
}
Object.defineProperty(Set.prototype, "length", {
get: function () {
var l = 0;
for (var key in this.data) {
if (key.indexOf("hash_") === 0) {
l = l + this.data[key].length;
}
}
return l;
}
});
Set.prototype.add = function (value) {
var hash = this.hashFunction(value);
var key = "hash_" + hash;
if (key in this.data) {
var values = this.data[key];
for (var i = 0; i < values.length; i++) {
if (this.equalsFunction(value, values[i])) {
return values[i];
}
}
values.push(value);
return value;
} else {
this.data[key] = [value];
return value;
}
};
Set.prototype.contains = function (value) {
return this.get(value) != null;
};
Set.prototype.get = function (value) {
var hash = this.hashFunction(value);
var key = "hash_" + hash;
if (key in this.data) {
var values = this.data[key];
for (var i = 0; i < values.length; i++) {
if (this.equalsFunction(value, values[i])) {
return values[i];
}
}
}
return null;
};
Set.prototype.values = function () {
var l = [];
for (var key in this.data) {
if (key.indexOf("hash_") === 0) {
l = l.concat(this.data[key]);
}
}
return l;
};
Set.prototype.toString = function () {
return arrayToString(this.values());
};
function BitSet() {
this.data = [];
return this;
}
BitSet.prototype.add = function (value) {
this.data[value] = true;
};
BitSet.prototype.or = function (set) {
var bits = this;
Object.keys(set.data).map(function (alt) {
bits.add(alt);
});
};
BitSet.prototype.remove = function (value) {
delete this.data[value];
};
BitSet.prototype.contains = function (value) {
return this.data[value] === true;
};
BitSet.prototype.values = function () {
return Object.keys(this.data);
};
BitSet.prototype.minValue = function () {
return Math.min.apply(null, this.values());
};
BitSet.prototype.hashCode = function () {
var hash = new Hash();
hash.update(this.values());
return hash.finish();
};
BitSet.prototype.equals = function (other) {
if (!(other instanceof BitSet)) {
return false;
}
return this.hashCode() === other.hashCode();
};
Object.defineProperty(BitSet.prototype, "length", {
get: function () {
return this.values().length;
}
});
BitSet.prototype.toString = function () {
return "{" + this.values().join(", ") + "}";
};
function Map(hashFunction, equalsFunction) {
this.data = {};
this.hashFunction = hashFunction || standardHashCodeFunction;
this.equalsFunction = equalsFunction || standardEqualsFunction;
return this;
}
Object.defineProperty(Map.prototype, "length", {
get: function () {
var l = 0;
for (var hashKey in this.data) {
if (hashKey.indexOf("hash_") === 0) {
l = l + this.data[hashKey].length;
}
}
return l;
}
});
Map.prototype.put = function (key, value) {
var hashKey = "hash_" + this.hashFunction(key);
if (hashKey in this.data) {
var entries = this.data[hashKey];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
if (this.equalsFunction(key, entry.key)) {
var oldValue = entry.value;
entry.value = value;
return oldValue;
}
}
entries.push({key:key, value:value});
return value;
} else {
this.data[hashKey] = [{key:key, value:value}];
return value;
}
};
Map.prototype.containsKey = function (key) {
var hashKey = "hash_" + this.hashFunction(key);
if(hashKey in this.data) {
var entries = this.data[hashKey];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
if (this.equalsFunction(key, entry.key))
return true;
}
}
return false;
};
Map.prototype.get = function (key) {
var hashKey = "hash_" + this.hashFunction(key);
if(hashKey in this.data) {
var entries = this.data[hashKey];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
if (this.equalsFunction(key, entry.key))
return entry.value;
}
}
return null;
};
Map.prototype.entries = function () {
var l = [];
for (var key in this.data) {
if (key.indexOf("hash_") === 0) {
l = l.concat(this.data[key]);
}
}
return l;
};
Map.prototype.getKeys = function () {
return this.entries().map(function(e) {
return e.key;
});
};
Map.prototype.getValues = function () {
return this.entries().map(function(e) {
return e.value;
});
};
Map.prototype.toString = function () {
var ss = this.entries().map(function(entry) {
return '{' + entry.key + ':' + entry.value + '}';
});
return '[' + ss.join(", ") + ']';
};
function AltDict() {
this.data = {};
return this;
}
AltDict.prototype.get = function (key) {
key = "k-" + key;
if (key in this.data) {
return this.data[key];
} else {
return null;
}
};
AltDict.prototype.put = function (key, value) {
key = "k-" + key;
this.data[key] = value;
};
AltDict.prototype.values = function () {
var data = this.data;
var keys = Object.keys(this.data);
return keys.map(function (key) {
return data[key];
});
};
function DoubleDict() {
return this;
}
function Hash() {
this.count = 0;
this.hash = 0;
return this;
}
Hash.prototype.update = function () {
for(var i=0;i>> (32 - 15));
k = k * 0x1B873593;
this.count = this.count + 1;
hash = this.hash ^ k;
hash = (hash << 13) | (hash >>> (32 - 13));
hash = hash * 5 + 0xE6546B64;
this.hash = hash;
}
}
}
Hash.prototype.finish = function () {
var hash = this.hash ^ (this.count * 4);
hash = hash ^ (hash >>> 16);
hash = hash * 0x85EBCA6B;
hash = hash ^ (hash >>> 13);
hash = hash * 0xC2B2AE35;
hash = hash ^ (hash >>> 16);
return hash;
}
function hashStuff() {
var hash = new Hash();
hash.update.apply(arguments);
return hash.finish();
}
DoubleDict.prototype.get = function (a, b) {
var d = this[a] || null;
return d === null ? null : (d[b] || null);
};
DoubleDict.prototype.set = function (a, b, o) {
var d = this[a] || null;
if (d === null) {
d = {};
this[a] = d;
}
d[b] = o;
};
function escapeWhitespace(s, escapeSpaces) {
s = s.replace("\t", "\\t");
s = s.replace("\n", "\\n");
s = s.replace("\r", "\\r");
if (escapeSpaces) {
s = s.replace(" ", "\u00B7");
}
return s;
}
function titleCase(str) {
return str.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1);
});
};
function equalArrays(a, b)
{
if (!Array.isArray(a) || !Array.isArray(b))
return false;
if (a == b)
return true;
if (a.length != b.length)
return false;
for (var i = 0; i < a.length; i++) {
if (a[i] == b[i])
continue;
if (!a[i].equals(b[i]))
return false;
}
return true;
};
exports.Hash = Hash;
exports.Set = Set;
exports.Map = Map;
exports.BitSet = BitSet;
exports.AltDict = AltDict;
exports.DoubleDict = DoubleDict;
exports.hashStuff = hashStuff;
exports.escapeWhitespace = escapeWhitespace;
exports.arrayToString = arrayToString;
exports.titleCase = titleCase;
exports.equalArrays = equalArrays;
/***/ },
/* 6 */
/***/ function(module, exports) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
// A token has properties: text, type, line, character position in the line
// (so we can ignore tabs), token channel, index, and source from which
// we obtained this token.
function Token() {
this.source = null;
this.type = null; // token type of the token
this.channel = null; // The parser ignores everything not on DEFAULT_CHANNEL
this.start = null; // optional; return -1 if not implemented.
this.stop = null; // optional; return -1 if not implemented.
this.tokenIndex = null; // from 0..n-1 of the token object in the input stream
this.line = null; // line=1..n of the 1st character
this.column = null; // beginning of the line at which it occurs, 0..n-1
this._text = null; // text of the token.
return this;
}
Token.INVALID_TYPE = 0;
// During lookahead operations, this "token" signifies we hit rule end ATN state
// and did not follow it despite needing to.
Token.EPSILON = -2;
Token.MIN_USER_TOKEN_TYPE = 1;
Token.EOF = -1;
// All tokens go to the parser (unless skip() is called in that rule)
// on a particular "channel". The parser tunes to a particular channel
// so that whitespace etc... can go to the parser on a "hidden" channel.
Token.DEFAULT_CHANNEL = 0;
// Anything on different channel than DEFAULT_CHANNEL is not parsed
// by parser.
Token.HIDDEN_CHANNEL = 1;
// Explicitly set the text for this token. If {code text} is not
// {@code null}, then {@link //getText} will return this value rather than
// extracting the text from the input.
//
// @param text The explicit text of the token, or {@code null} if the text
// should be obtained from the input along with the start and stop indexes
// of the token.
Object.defineProperty(Token.prototype, "text", {
get : function() {
return this._text;
},
set : function(text) {
this._text = text;
}
});
Token.prototype.getTokenSource = function() {
return this.source[0];
};
Token.prototype.getInputStream = function() {
return this.source[1];
};
function CommonToken(source, type, channel, start, stop) {
Token.call(this);
this.source = source !== undefined ? source : CommonToken.EMPTY_SOURCE;
this.type = type !== undefined ? type : null;
this.channel = channel !== undefined ? channel : Token.DEFAULT_CHANNEL;
this.start = start !== undefined ? start : -1;
this.stop = stop !== undefined ? stop : -1;
this.tokenIndex = -1;
if (this.source[0] !== null) {
this.line = source[0].line;
this.column = source[0].column;
} else {
this.column = -1;
}
return this;
}
CommonToken.prototype = Object.create(Token.prototype);
CommonToken.prototype.constructor = CommonToken;
// An empty {@link Pair} which is used as the default value of
// {@link //source} for tokens that do not have a source.
CommonToken.EMPTY_SOURCE = [ null, null ];
// Constructs a new {@link CommonToken} as a copy of another {@link Token}.
//
//
// If {@code oldToken} is also a {@link CommonToken} instance, the newly
// constructed token will share a reference to the {@link //text} field and
// the {@link Pair} stored in {@link //source}. Otherwise, {@link //text} will
// be assigned the result of calling {@link //getText}, and {@link //source}
// will be constructed from the result of {@link Token//getTokenSource} and
// {@link Token//getInputStream}.
//
// @param oldToken The token to copy.
//
CommonToken.prototype.clone = function() {
var t = new CommonToken(this.source, this.type, this.channel, this.start,
this.stop);
t.tokenIndex = this.tokenIndex;
t.line = this.line;
t.column = this.column;
t.text = this.text;
return t;
};
Object.defineProperty(CommonToken.prototype, "text", {
get : function() {
if (this._text !== null) {
return this._text;
}
var input = this.getInputStream();
if (input === null) {
return null;
}
var n = input.size;
if (this.start < n && this.stop < n) {
return input.getText(this.start, this.stop);
} else {
return "";
}
},
set : function(text) {
this._text = text;
}
});
CommonToken.prototype.toString = function() {
var txt = this.text;
if (txt !== null) {
txt = txt.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t");
} else {
txt = "";
}
return "[@" + this.tokenIndex + "," + this.start + ":" + this.stop + "='" +
txt + "',<" + this.type + ">" +
(this.channel > 0 ? ",channel=" + this.channel : "") + "," +
this.line + ":" + this.column + "]";
};
exports.Token = Token;
exports.CommonToken = CommonToken;
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// A tuple: (ATN state, predicted alt, syntactic, semantic context).
// The syntactic context is a graph-structured stack node whose
// path(s) to the root is the rule invocation(s)
// chain used to arrive at the state. The semantic context is
// the tree of semantic predicates encountered before reaching
// an ATN state.
///
var DecisionState = __webpack_require__(8).DecisionState;
var SemanticContext = __webpack_require__(9).SemanticContext;
var Hash = __webpack_require__(5).Hash;
function checkParams(params, isCfg) {
if(params===null) {
var result = { state:null, alt:null, context:null, semanticContext:null };
if(isCfg) {
result.reachesIntoOuterContext = 0;
}
return result;
} else {
var props = {};
props.state = params.state || null;
props.alt = (params.alt === undefined) ? null : params.alt;
props.context = params.context || null;
props.semanticContext = params.semanticContext || null;
if(isCfg) {
props.reachesIntoOuterContext = params.reachesIntoOuterContext || 0;
props.precedenceFilterSuppressed = params.precedenceFilterSuppressed || false;
}
return props;
}
}
function ATNConfig(params, config) {
this.checkContext(params, config);
params = checkParams(params);
config = checkParams(config, true);
// The ATN state associated with this configuration///
this.state = params.state!==null ? params.state : config.state;
// What alt (or lexer rule) is predicted by this configuration///
this.alt = params.alt!==null ? params.alt : config.alt;
// The stack of invoking states leading to the rule/states associated
// with this config. We track only those contexts pushed during
// execution of the ATN simulator.
this.context = params.context!==null ? params.context : config.context;
this.semanticContext = params.semanticContext!==null ? params.semanticContext :
(config.semanticContext!==null ? config.semanticContext : SemanticContext.NONE);
// We cannot execute predicates dependent upon local context unless
// we know for sure we are in the correct context. Because there is
// no way to do this efficiently, we simply cannot evaluate
// dependent predicates unless we are in the rule that initially
// invokes the ATN simulator.
//
// closure() tracks the depth of how far we dip into the
// outer context: depth > 0. Note that it may not be totally
// accurate depth since I don't ever decrement. TODO: make it a boolean then
this.reachesIntoOuterContext = config.reachesIntoOuterContext;
this.precedenceFilterSuppressed = config.precedenceFilterSuppressed;
return this;
}
ATNConfig.prototype.checkContext = function(params, config) {
if((params.context===null || params.context===undefined) &&
(config===null || config.context===null || config.context===undefined)) {
this.context = null;
}
};
ATNConfig.prototype.hashCode = function() {
var hash = new Hash();
this.updateHashCode(hash);
return hash.finish();
};
ATNConfig.prototype.updateHashCode = function(hash) {
hash.update(this.state.stateNumber, this.alt, this.context, this.semanticContext);
};
// An ATN configuration is equal to another if both have
// the same state, they predict the same alternative, and
// syntactic/semantic contexts are the same.
ATNConfig.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof ATNConfig)) {
return false;
} else {
return this.state.stateNumber===other.state.stateNumber &&
this.alt===other.alt &&
(this.context===null ? other.context===null : this.context.equals(other.context)) &&
this.semanticContext.equals(other.semanticContext) &&
this.precedenceFilterSuppressed===other.precedenceFilterSuppressed;
}
};
ATNConfig.prototype.hashCodeForConfigSet = function() {
var hash = new Hash();
hash.update(this.state.stateNumber, this.alt, this.semanticContext);
return hash.finish();
};
ATNConfig.prototype.equalsForConfigSet = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof ATNConfig)) {
return false;
} else {
return this.state.stateNumber===other.state.stateNumber &&
this.alt===other.alt &&
this.semanticContext.equals(other.semanticContext);
}
};
ATNConfig.prototype.toString = function() {
return "(" + this.state + "," + this.alt +
(this.context!==null ? ",[" + this.context.toString() + "]" : "") +
(this.semanticContext !== SemanticContext.NONE ?
("," + this.semanticContext.toString())
: "") +
(this.reachesIntoOuterContext>0 ?
(",up=" + this.reachesIntoOuterContext)
: "") + ")";
};
function LexerATNConfig(params, config) {
ATNConfig.call(this, params, config);
// This is the backing field for {@link //getLexerActionExecutor}.
var lexerActionExecutor = params.lexerActionExecutor || null;
this.lexerActionExecutor = lexerActionExecutor || (config!==null ? config.lexerActionExecutor : null);
this.passedThroughNonGreedyDecision = config!==null ? this.checkNonGreedyDecision(config, this.state) : false;
return this;
}
LexerATNConfig.prototype = Object.create(ATNConfig.prototype);
LexerATNConfig.prototype.constructor = LexerATNConfig;
LexerATNConfig.prototype.updateHashCode = function(hash) {
hash.update(this.state.stateNumber, this.alt, this.context, this.semanticContext, this.passedThroughNonGreedyDecision, this.lexerActionExecutor);
};
LexerATNConfig.prototype.equals = function(other) {
return this === other ||
(other instanceof LexerATNConfig &&
this.passedThroughNonGreedyDecision == other.passedThroughNonGreedyDecision &&
(this.lexerActionExecutor ? this.lexerActionExecutor.equals(other.lexerActionExecutor) : !other.lexerActionExecutor) &&
ATNConfig.prototype.equals.call(this, other));
};
LexerATNConfig.prototype.hashCodeForConfigSet = LexerATNConfig.prototype.hashCode;
LexerATNConfig.prototype.equalsForConfigSet = LexerATNConfig.prototype.equals;
LexerATNConfig.prototype.checkNonGreedyDecision = function(source, target) {
return source.passedThroughNonGreedyDecision ||
(target instanceof DecisionState) && target.nonGreedy;
};
exports.ATNConfig = ATNConfig;
exports.LexerATNConfig = LexerATNConfig;
/***/ },
/* 8 */
/***/ function(module, exports) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
// The following images show the relation of states and
// {@link ATNState//transitions} for various grammar constructs.
//
//
//
// Solid edges marked with an &//0949; indicate a required
// {@link EpsilonTransition}.
//
// Dashed edges indicate locations where any transition derived from
// {@link Transition} might appear.
//
// Dashed nodes are place holders for either a sequence of linked
// {@link BasicState} states or the inclusion of a block representing a nested
// construct in one of the forms below.
//
// Nodes showing multiple outgoing alternatives with a {@code ...} support
// any number of alternatives (one or more). Nodes without the {@code ...} only
// support the exact number of alternatives shown in the diagram.
//
//
//
// Basic Blocks
//
// Rule
//
//
//
// Block of 1 or more alternatives
//
//
//
// Greedy Loops
//
// Greedy Closure: {@code (...)*}
//
//
//
// Greedy Positive Closure: {@code (...)+}
//
//
//
// Greedy Optional: {@code (...)?}
//
//
//
// Non-Greedy Loops
//
// Non-Greedy Closure: {@code (...)*?}
//
//
//
// Non-Greedy Positive Closure: {@code (...)+?}
//
//
//
// Non-Greedy Optional: {@code (...)??}
//
//
//
var INITIAL_NUM_TRANSITIONS = 4;
function ATNState() {
// Which ATN are we in?
this.atn = null;
this.stateNumber = ATNState.INVALID_STATE_NUMBER;
this.stateType = null;
this.ruleIndex = 0; // at runtime, we don't have Rule objects
this.epsilonOnlyTransitions = false;
// Track the transitions emanating from this ATN state.
this.transitions = [];
// Used to cache lookahead during parsing, not used during construction
this.nextTokenWithinRule = null;
return this;
}
// constants for serialization
ATNState.INVALID_TYPE = 0;
ATNState.BASIC = 1;
ATNState.RULE_START = 2;
ATNState.BLOCK_START = 3;
ATNState.PLUS_BLOCK_START = 4;
ATNState.STAR_BLOCK_START = 5;
ATNState.TOKEN_START = 6;
ATNState.RULE_STOP = 7;
ATNState.BLOCK_END = 8;
ATNState.STAR_LOOP_BACK = 9;
ATNState.STAR_LOOP_ENTRY = 10;
ATNState.PLUS_LOOP_BACK = 11;
ATNState.LOOP_END = 12;
ATNState.serializationNames = [
"INVALID",
"BASIC",
"RULE_START",
"BLOCK_START",
"PLUS_BLOCK_START",
"STAR_BLOCK_START",
"TOKEN_START",
"RULE_STOP",
"BLOCK_END",
"STAR_LOOP_BACK",
"STAR_LOOP_ENTRY",
"PLUS_LOOP_BACK",
"LOOP_END" ];
ATNState.INVALID_STATE_NUMBER = -1;
ATNState.prototype.toString = function() {
return this.stateNumber;
};
ATNState.prototype.equals = function(other) {
if (other instanceof ATNState) {
return this.stateNumber===other.stateNumber;
} else {
return false;
}
};
ATNState.prototype.isNonGreedyExitState = function() {
return false;
};
ATNState.prototype.addTransition = function(trans, index) {
if(index===undefined) {
index = -1;
}
if (this.transitions.length===0) {
this.epsilonOnlyTransitions = trans.isEpsilon;
} else if(this.epsilonOnlyTransitions !== trans.isEpsilon) {
this.epsilonOnlyTransitions = false;
}
if (index===-1) {
this.transitions.push(trans);
} else {
this.transitions.splice(index, 1, trans);
}
};
function BasicState() {
ATNState.call(this);
this.stateType = ATNState.BASIC;
return this;
}
BasicState.prototype = Object.create(ATNState.prototype);
BasicState.prototype.constructor = BasicState;
function DecisionState() {
ATNState.call(this);
this.decision = -1;
this.nonGreedy = false;
return this;
}
DecisionState.prototype = Object.create(ATNState.prototype);
DecisionState.prototype.constructor = DecisionState;
// The start of a regular {@code (...)} block.
function BlockStartState() {
DecisionState.call(this);
this.endState = null;
return this;
}
BlockStartState.prototype = Object.create(DecisionState.prototype);
BlockStartState.prototype.constructor = BlockStartState;
function BasicBlockStartState() {
BlockStartState.call(this);
this.stateType = ATNState.BLOCK_START;
return this;
}
BasicBlockStartState.prototype = Object.create(BlockStartState.prototype);
BasicBlockStartState.prototype.constructor = BasicBlockStartState;
// Terminal node of a simple {@code (a|b|c)} block.
function BlockEndState() {
ATNState.call(this);
this.stateType = ATNState.BLOCK_END;
this.startState = null;
return this;
}
BlockEndState.prototype = Object.create(ATNState.prototype);
BlockEndState.prototype.constructor = BlockEndState;
// The last node in the ATN for a rule, unless that rule is the start symbol.
// In that case, there is one transition to EOF. Later, we might encode
// references to all calls to this rule to compute FOLLOW sets for
// error handling.
//
function RuleStopState() {
ATNState.call(this);
this.stateType = ATNState.RULE_STOP;
return this;
}
RuleStopState.prototype = Object.create(ATNState.prototype);
RuleStopState.prototype.constructor = RuleStopState;
function RuleStartState() {
ATNState.call(this);
this.stateType = ATNState.RULE_START;
this.stopState = null;
this.isPrecedenceRule = false;
return this;
}
RuleStartState.prototype = Object.create(ATNState.prototype);
RuleStartState.prototype.constructor = RuleStartState;
// Decision state for {@code A+} and {@code (A|B)+}. It has two transitions:
// one to the loop back to start of the block and one to exit.
//
function PlusLoopbackState() {
DecisionState.call(this);
this.stateType = ATNState.PLUS_LOOP_BACK;
return this;
}
PlusLoopbackState.prototype = Object.create(DecisionState.prototype);
PlusLoopbackState.prototype.constructor = PlusLoopbackState;
// Start of {@code (A|B|...)+} loop. Technically a decision state, but
// we don't use for code generation; somebody might need it, so I'm defining
// it for completeness. In reality, the {@link PlusLoopbackState} node is the
// real decision-making note for {@code A+}.
//
function PlusBlockStartState() {
BlockStartState.call(this);
this.stateType = ATNState.PLUS_BLOCK_START;
this.loopBackState = null;
return this;
}
PlusBlockStartState.prototype = Object.create(BlockStartState.prototype);
PlusBlockStartState.prototype.constructor = PlusBlockStartState;
// The block that begins a closure loop.
function StarBlockStartState() {
BlockStartState.call(this);
this.stateType = ATNState.STAR_BLOCK_START;
return this;
}
StarBlockStartState.prototype = Object.create(BlockStartState.prototype);
StarBlockStartState.prototype.constructor = StarBlockStartState;
function StarLoopbackState() {
ATNState.call(this);
this.stateType = ATNState.STAR_LOOP_BACK;
return this;
}
StarLoopbackState.prototype = Object.create(ATNState.prototype);
StarLoopbackState.prototype.constructor = StarLoopbackState;
function StarLoopEntryState() {
DecisionState.call(this);
this.stateType = ATNState.STAR_LOOP_ENTRY;
this.loopBackState = null;
// Indicates whether this state can benefit from a precedence DFA during SLL decision making.
this.isPrecedenceDecision = null;
return this;
}
StarLoopEntryState.prototype = Object.create(DecisionState.prototype);
StarLoopEntryState.prototype.constructor = StarLoopEntryState;
// Mark the end of a * or + loop.
function LoopEndState() {
ATNState.call(this);
this.stateType = ATNState.LOOP_END;
this.loopBackState = null;
return this;
}
LoopEndState.prototype = Object.create(ATNState.prototype);
LoopEndState.prototype.constructor = LoopEndState;
// The Tokens rule start state linking to each lexer rule start state */
function TokensStartState() {
DecisionState.call(this);
this.stateType = ATNState.TOKEN_START;
return this;
}
TokensStartState.prototype = Object.create(DecisionState.prototype);
TokensStartState.prototype.constructor = TokensStartState;
exports.ATNState = ATNState;
exports.BasicState = BasicState;
exports.DecisionState = DecisionState;
exports.BlockStartState = BlockStartState;
exports.BlockEndState = BlockEndState;
exports.LoopEndState = LoopEndState;
exports.RuleStartState = RuleStartState;
exports.RuleStopState = RuleStopState;
exports.TokensStartState = TokensStartState;
exports.PlusLoopbackState = PlusLoopbackState;
exports.StarLoopbackState = StarLoopbackState;
exports.StarLoopEntryState = StarLoopEntryState;
exports.PlusBlockStartState = PlusBlockStartState;
exports.StarBlockStartState = StarBlockStartState;
exports.BasicBlockStartState = BasicBlockStartState;
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
// A tree structure used to record the semantic context in which
// an ATN configuration is valid. It's either a single predicate,
// a conjunction {@code p1&&p2}, or a sum of products {@code p1||p2}.
//
// I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of
// {@link SemanticContext} within the scope of this outer class.
//
var Set = __webpack_require__(5).Set;
var Hash = __webpack_require__(5).Hash;
function SemanticContext() {
return this;
}
SemanticContext.prototype.hashCode = function() {
var hash = new Hash();
this.updateHashCode(hash);
return hash.finish();
};
// For context independent predicates, we evaluate them without a local
// context (i.e., null context). That way, we can evaluate them without
// having to create proper rule-specific context during prediction (as
// opposed to the parser, which creates them naturally). In a practical
// sense, this avoids a cast exception from RuleContext to myruleContext.
//
// For context dependent predicates, we must pass in a local context so that
// references such as $arg evaluate properly as _localctx.arg. We only
// capture context dependent predicates in the context in which we begin
// prediction, so we passed in the outer context here in case of context
// dependent predicate evaluation.
//
SemanticContext.prototype.evaluate = function(parser, outerContext) {
};
//
// Evaluate the precedence predicates for the context and reduce the result.
//
// @param parser The parser instance.
// @param outerContext The current parser context object.
// @return The simplified semantic context after precedence predicates are
// evaluated, which will be one of the following values.
//
// {@link //NONE}: if the predicate simplifies to {@code true} after
// precedence predicates are evaluated.
// {@code null}: if the predicate simplifies to {@code false} after
// precedence predicates are evaluated.
// {@code this}: if the semantic context is not changed as a result of
// precedence predicate evaluation.
// A non-{@code null} {@link SemanticContext}: the new simplified
// semantic context after precedence predicates are evaluated.
//
//
SemanticContext.prototype.evalPrecedence = function(parser, outerContext) {
return this;
};
SemanticContext.andContext = function(a, b) {
if (a === null || a === SemanticContext.NONE) {
return b;
}
if (b === null || b === SemanticContext.NONE) {
return a;
}
var result = new AND(a, b);
if (result.opnds.length === 1) {
return result.opnds[0];
} else {
return result;
}
};
SemanticContext.orContext = function(a, b) {
if (a === null) {
return b;
}
if (b === null) {
return a;
}
if (a === SemanticContext.NONE || b === SemanticContext.NONE) {
return SemanticContext.NONE;
}
var result = new OR(a, b);
if (result.opnds.length === 1) {
return result.opnds[0];
} else {
return result;
}
};
function Predicate(ruleIndex, predIndex, isCtxDependent) {
SemanticContext.call(this);
this.ruleIndex = ruleIndex === undefined ? -1 : ruleIndex;
this.predIndex = predIndex === undefined ? -1 : predIndex;
this.isCtxDependent = isCtxDependent === undefined ? false : isCtxDependent; // e.g., $i ref in pred
return this;
}
Predicate.prototype = Object.create(SemanticContext.prototype);
Predicate.prototype.constructor = Predicate;
//The default {@link SemanticContext}, which is semantically equivalent to
//a predicate of the form {@code {true}?}.
//
SemanticContext.NONE = new Predicate();
Predicate.prototype.evaluate = function(parser, outerContext) {
var localctx = this.isCtxDependent ? outerContext : null;
return parser.sempred(localctx, this.ruleIndex, this.predIndex);
};
Predicate.prototype.updateHashCode = function(hash) {
hash.update(this.ruleIndex, this.predIndex, this.isCtxDependent);
};
Predicate.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof Predicate)) {
return false;
} else {
return this.ruleIndex === other.ruleIndex &&
this.predIndex === other.predIndex &&
this.isCtxDependent === other.isCtxDependent;
}
};
Predicate.prototype.toString = function() {
return "{" + this.ruleIndex + ":" + this.predIndex + "}?";
};
function PrecedencePredicate(precedence) {
SemanticContext.call(this);
this.precedence = precedence === undefined ? 0 : precedence;
}
PrecedencePredicate.prototype = Object.create(SemanticContext.prototype);
PrecedencePredicate.prototype.constructor = PrecedencePredicate;
PrecedencePredicate.prototype.evaluate = function(parser, outerContext) {
return parser.precpred(outerContext, this.precedence);
};
PrecedencePredicate.prototype.evalPrecedence = function(parser, outerContext) {
if (parser.precpred(outerContext, this.precedence)) {
return SemanticContext.NONE;
} else {
return null;
}
};
PrecedencePredicate.prototype.compareTo = function(other) {
return this.precedence - other.precedence;
};
PrecedencePredicate.prototype.updateHashCode = function(hash) {
hash.update(31);
};
PrecedencePredicate.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof PrecedencePredicate)) {
return false;
} else {
return this.precedence === other.precedence;
}
};
PrecedencePredicate.prototype.toString = function() {
return "{"+this.precedence+">=prec}?";
};
PrecedencePredicate.filterPrecedencePredicates = function(set) {
var result = [];
set.values().map( function(context) {
if (context instanceof PrecedencePredicate) {
result.push(context);
}
});
return result;
};
// A semantic context which is true whenever none of the contained contexts
// is false.
//
function AND(a, b) {
SemanticContext.call(this);
var operands = new Set();
if (a instanceof AND) {
a.opnds.map(function(o) {
operands.add(o);
});
} else {
operands.add(a);
}
if (b instanceof AND) {
b.opnds.map(function(o) {
operands.add(o);
});
} else {
operands.add(b);
}
var precedencePredicates = PrecedencePredicate.filterPrecedencePredicates(operands);
if (precedencePredicates.length > 0) {
// interested in the transition with the lowest precedence
var reduced = null;
precedencePredicates.map( function(p) {
if(reduced===null || p.precedence
// The evaluation of predicates by this context is short-circuiting, but
// unordered.
//
AND.prototype.evaluate = function(parser, outerContext) {
for (var i = 0; i < this.opnds.length; i++) {
if (!this.opnds[i].evaluate(parser, outerContext)) {
return false;
}
}
return true;
};
AND.prototype.evalPrecedence = function(parser, outerContext) {
var differs = false;
var operands = [];
for (var i = 0; i < this.opnds.length; i++) {
var context = this.opnds[i];
var evaluated = context.evalPrecedence(parser, outerContext);
differs |= (evaluated !== context);
if (evaluated === null) {
// The AND context is false if any element is false
return null;
} else if (evaluated !== SemanticContext.NONE) {
// Reduce the result by skipping true elements
operands.push(evaluated);
}
}
if (!differs) {
return this;
}
if (operands.length === 0) {
// all elements were true, so the AND context is true
return SemanticContext.NONE;
}
var result = null;
operands.map(function(o) {
result = result === null ? o : SemanticContext.andContext(result, o);
});
return result;
};
AND.prototype.toString = function() {
var s = "";
this.opnds.map(function(o) {
s += "&& " + o.toString();
});
return s.length > 3 ? s.slice(3) : s;
};
//
// A semantic context which is true whenever at least one of the contained
// contexts is true.
//
function OR(a, b) {
SemanticContext.call(this);
var operands = new Set();
if (a instanceof OR) {
a.opnds.map(function(o) {
operands.add(o);
});
} else {
operands.add(a);
}
if (b instanceof OR) {
b.opnds.map(function(o) {
operands.add(o);
});
} else {
operands.add(b);
}
var precedencePredicates = PrecedencePredicate.filterPrecedencePredicates(operands);
if (precedencePredicates.length > 0) {
// interested in the transition with the highest precedence
var s = precedencePredicates.sort(function(a, b) {
return a.compareTo(b);
});
var reduced = s[s.length-1];
operands.add(reduced);
}
this.opnds = operands.values();
return this;
}
OR.prototype = Object.create(SemanticContext.prototype);
OR.prototype.constructor = OR;
OR.prototype.constructor = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof OR)) {
return false;
} else {
return this.opnds === other.opnds;
}
};
OR.prototype.updateHashCode = function(hash) {
hash.update(this.opnds, "OR");
};
//
// The evaluation of predicates by this context is short-circuiting, but
// unordered.
//
OR.prototype.evaluate = function(parser, outerContext) {
for (var i = 0; i < this.opnds.length; i++) {
if (this.opnds[i].evaluate(parser, outerContext)) {
return true;
}
}
return false;
};
OR.prototype.evalPrecedence = function(parser, outerContext) {
var differs = false;
var operands = [];
for (var i = 0; i < this.opnds.length; i++) {
var context = this.opnds[i];
var evaluated = context.evalPrecedence(parser, outerContext);
differs |= (evaluated !== context);
if (evaluated === SemanticContext.NONE) {
// The OR context is true if any element is true
return SemanticContext.NONE;
} else if (evaluated !== null) {
// Reduce the result by skipping false elements
operands.push(evaluated);
}
}
if (!differs) {
return this;
}
if (operands.length === 0) {
// all elements were false, so the OR context is false
return null;
}
var result = null;
operands.map(function(o) {
return result === null ? o : SemanticContext.orContext(result, o);
});
return result;
};
OR.prototype.toString = function() {
var s = "";
this.opnds.map(function(o) {
s += "|| " + o.toString();
});
return s.length > 3 ? s.slice(3) : s;
};
exports.SemanticContext = SemanticContext;
exports.PrecedencePredicate = PrecedencePredicate;
exports.Predicate = Predicate;
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
/*jslint smarttabs:true */
var Token = __webpack_require__(6).Token;
/* stop is not included! */
function Interval(start, stop) {
this.start = start;
this.stop = stop;
return this;
}
Interval.prototype.contains = function(item) {
return item >= this.start && item < this.stop;
};
Interval.prototype.toString = function() {
if(this.start===this.stop-1) {
return this.start.toString();
} else {
return this.start.toString() + ".." + (this.stop-1).toString();
}
};
Object.defineProperty(Interval.prototype, "length", {
get : function() {
return this.stop - this.start;
}
});
function IntervalSet() {
this.intervals = null;
this.readOnly = false;
}
IntervalSet.prototype.first = function(v) {
if (this.intervals === null || this.intervals.length===0) {
return Token.INVALID_TYPE;
} else {
return this.intervals[0].start;
}
};
IntervalSet.prototype.addOne = function(v) {
this.addInterval(new Interval(v, v + 1));
};
IntervalSet.prototype.addRange = function(l, h) {
this.addInterval(new Interval(l, h + 1));
};
IntervalSet.prototype.addInterval = function(v) {
if (this.intervals === null) {
this.intervals = [];
this.intervals.push(v);
} else {
// find insert pos
for (var k = 0; k < this.intervals.length; k++) {
var i = this.intervals[k];
// distinct range -> insert
if (v.stop < i.start) {
this.intervals.splice(k, 0, v);
return;
}
// contiguous range -> adjust
else if (v.stop === i.start) {
this.intervals[k].start = v.start;
return;
}
// overlapping range -> adjust and reduce
else if (v.start <= i.stop) {
this.intervals[k] = new Interval(Math.min(i.start, v.start), Math.max(i.stop, v.stop));
this.reduce(k);
return;
}
}
// greater than any existing
this.intervals.push(v);
}
};
IntervalSet.prototype.addSet = function(other) {
if (other.intervals !== null) {
for (var k = 0; k < other.intervals.length; k++) {
var i = other.intervals[k];
this.addInterval(new Interval(i.start, i.stop));
}
}
return this;
};
IntervalSet.prototype.reduce = function(k) {
// only need to reduce if k is not the last
if (k < this.intervalslength - 1) {
var l = this.intervals[k];
var r = this.intervals[k + 1];
// if r contained in l
if (l.stop >= r.stop) {
this.intervals.pop(k + 1);
this.reduce(k);
} else if (l.stop >= r.start) {
this.intervals[k] = new Interval(l.start, r.stop);
this.intervals.pop(k + 1);
}
}
};
IntervalSet.prototype.complement = function(start, stop) {
var result = new IntervalSet();
result.addInterval(new Interval(start,stop+1));
for(var i=0; ii.start && v.stop=i.stop) {
this.intervals.splice(k, 1);
k = k - 1; // need another pass
}
// check for lower boundary
else if(v.start");
} else {
names.push("'" + String.fromCharCode(v.start) + "'");
}
} else {
names.push("'" + String.fromCharCode(v.start) + "'..'" + String.fromCharCode(v.stop-1) + "'");
}
}
if (names.length > 1) {
return "{" + names.join(", ") + "}";
} else {
return names[0];
}
};
IntervalSet.prototype.toIndexString = function() {
var names = [];
for (var i = 0; i < this.intervals.length; i++) {
var v = this.intervals[i];
if(v.stop===v.start+1) {
if ( v.start===Token.EOF ) {
names.push("");
} else {
names.push(v.start.toString());
}
} else {
names.push(v.start.toString() + ".." + (v.stop-1).toString());
}
}
if (names.length > 1) {
return "{" + names.join(", ") + "}";
} else {
return names[0];
}
};
IntervalSet.prototype.toTokenString = function(literalNames, symbolicNames) {
var names = [];
for (var i = 0; i < this.intervals.length; i++) {
var v = this.intervals[i];
for (var j = v.start; j < v.stop; j++) {
names.push(this.elementName(literalNames, symbolicNames, j));
}
}
if (names.length > 1) {
return "{" + names.join(", ") + "}";
} else {
return names[0];
}
};
IntervalSet.prototype.elementName = function(literalNames, symbolicNames, a) {
if (a === Token.EOF) {
return "";
} else if (a === Token.EPSILON) {
return "";
} else {
return literalNames[a] || symbolicNames[a];
}
};
exports.Interval = Interval;
exports.IntervalSet = IntervalSet;
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
// An ATN transition between any two ATN states. Subclasses define
// atom, set, epsilon, action, predicate, rule transitions.
//
// This is a one way link. It emanates from a state (usually via a list of
// transitions) and has a target state.
//
// Since we never have to change the ATN transitions once we construct it,
// we can fix these transitions as specific classes. The DFA transitions
// on the other hand need to update the labels as it adds transitions to
// the states. We'll use the term Edge for the DFA to distinguish them from
// ATN transitions.
var Token = __webpack_require__(6).Token;
var Interval = __webpack_require__(10).Interval;
var IntervalSet = __webpack_require__(10).IntervalSet;
var Predicate = __webpack_require__(9).Predicate;
var PrecedencePredicate = __webpack_require__(9).PrecedencePredicate;
function Transition (target) {
// The target of this transition.
if (target===undefined || target===null) {
throw "target cannot be null.";
}
this.target = target;
// Are we epsilon, action, sempred?
this.isEpsilon = false;
this.label = null;
return this;
}
// constants for serialization
Transition.EPSILON = 1;
Transition.RANGE = 2;
Transition.RULE = 3;
Transition.PREDICATE = 4; // e.g., {isType(input.LT(1))}?
Transition.ATOM = 5;
Transition.ACTION = 6;
Transition.SET = 7; // ~(A|B) or ~atom, wildcard, which convert to next 2
Transition.NOT_SET = 8;
Transition.WILDCARD = 9;
Transition.PRECEDENCE = 10;
Transition.serializationNames = [
"INVALID",
"EPSILON",
"RANGE",
"RULE",
"PREDICATE",
"ATOM",
"ACTION",
"SET",
"NOT_SET",
"WILDCARD",
"PRECEDENCE"
];
Transition.serializationTypes = {
EpsilonTransition: Transition.EPSILON,
RangeTransition: Transition.RANGE,
RuleTransition: Transition.RULE,
PredicateTransition: Transition.PREDICATE,
AtomTransition: Transition.ATOM,
ActionTransition: Transition.ACTION,
SetTransition: Transition.SET,
NotSetTransition: Transition.NOT_SET,
WildcardTransition: Transition.WILDCARD,
PrecedencePredicateTransition: Transition.PRECEDENCE
};
// TODO: make all transitions sets? no, should remove set edges
function AtomTransition(target, label) {
Transition.call(this, target);
this.label_ = label; // The token type or character value; or, signifies special label.
this.label = this.makeLabel();
this.serializationType = Transition.ATOM;
return this;
}
AtomTransition.prototype = Object.create(Transition.prototype);
AtomTransition.prototype.constructor = AtomTransition;
AtomTransition.prototype.makeLabel = function() {
var s = new IntervalSet();
s.addOne(this.label_);
return s;
};
AtomTransition.prototype.matches = function( symbol, minVocabSymbol, maxVocabSymbol) {
return this.label_ === symbol;
};
AtomTransition.prototype.toString = function() {
return this.label_;
};
function RuleTransition(ruleStart, ruleIndex, precedence, followState) {
Transition.call(this, ruleStart);
this.ruleIndex = ruleIndex; // ptr to the rule definition object for this rule ref
this.precedence = precedence;
this.followState = followState; // what node to begin computations following ref to rule
this.serializationType = Transition.RULE;
this.isEpsilon = true;
return this;
}
RuleTransition.prototype = Object.create(Transition.prototype);
RuleTransition.prototype.constructor = RuleTransition;
RuleTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return false;
};
function EpsilonTransition(target, outermostPrecedenceReturn) {
Transition.call(this, target);
this.serializationType = Transition.EPSILON;
this.isEpsilon = true;
this.outermostPrecedenceReturn = outermostPrecedenceReturn;
return this;
}
EpsilonTransition.prototype = Object.create(Transition.prototype);
EpsilonTransition.prototype.constructor = EpsilonTransition;
EpsilonTransition.prototype.matches = function( symbol, minVocabSymbol, maxVocabSymbol) {
return false;
};
EpsilonTransition.prototype.toString = function() {
return "epsilon";
};
function RangeTransition(target, start, stop) {
Transition.call(this, target);
this.serializationType = Transition.RANGE;
this.start = start;
this.stop = stop;
this.label = this.makeLabel();
return this;
}
RangeTransition.prototype = Object.create(Transition.prototype);
RangeTransition.prototype.constructor = RangeTransition;
RangeTransition.prototype.makeLabel = function() {
var s = new IntervalSet();
s.addRange(this.start, this.stop);
return s;
};
RangeTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return symbol >= this.start && symbol <= this.stop;
};
RangeTransition.prototype.toString = function() {
return "'" + String.fromCharCode(this.start) + "'..'" + String.fromCharCode(this.stop) + "'";
};
function AbstractPredicateTransition(target) {
Transition.call(this, target);
return this;
}
AbstractPredicateTransition.prototype = Object.create(Transition.prototype);
AbstractPredicateTransition.prototype.constructor = AbstractPredicateTransition;
function PredicateTransition(target, ruleIndex, predIndex, isCtxDependent) {
AbstractPredicateTransition.call(this, target);
this.serializationType = Transition.PREDICATE;
this.ruleIndex = ruleIndex;
this.predIndex = predIndex;
this.isCtxDependent = isCtxDependent; // e.g., $i ref in pred
this.isEpsilon = true;
return this;
}
PredicateTransition.prototype = Object.create(AbstractPredicateTransition.prototype);
PredicateTransition.prototype.constructor = PredicateTransition;
PredicateTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return false;
};
PredicateTransition.prototype.getPredicate = function() {
return new Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent);
};
PredicateTransition.prototype.toString = function() {
return "pred_" + this.ruleIndex + ":" + this.predIndex;
};
function ActionTransition(target, ruleIndex, actionIndex, isCtxDependent) {
Transition.call(this, target);
this.serializationType = Transition.ACTION;
this.ruleIndex = ruleIndex;
this.actionIndex = actionIndex===undefined ? -1 : actionIndex;
this.isCtxDependent = isCtxDependent===undefined ? false : isCtxDependent; // e.g., $i ref in pred
this.isEpsilon = true;
return this;
}
ActionTransition.prototype = Object.create(Transition.prototype);
ActionTransition.prototype.constructor = ActionTransition;
ActionTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return false;
};
ActionTransition.prototype.toString = function() {
return "action_" + this.ruleIndex + ":" + this.actionIndex;
};
// A transition containing a set of values.
function SetTransition(target, set) {
Transition.call(this, target);
this.serializationType = Transition.SET;
if (set !==undefined && set !==null) {
this.label = set;
} else {
this.label = new IntervalSet();
this.label.addOne(Token.INVALID_TYPE);
}
return this;
}
SetTransition.prototype = Object.create(Transition.prototype);
SetTransition.prototype.constructor = SetTransition;
SetTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return this.label.contains(symbol);
};
SetTransition.prototype.toString = function() {
return this.label.toString();
};
function NotSetTransition(target, set) {
SetTransition.call(this, target, set);
this.serializationType = Transition.NOT_SET;
return this;
}
NotSetTransition.prototype = Object.create(SetTransition.prototype);
NotSetTransition.prototype.constructor = NotSetTransition;
NotSetTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return symbol >= minVocabSymbol && symbol <= maxVocabSymbol &&
!SetTransition.prototype.matches.call(this, symbol, minVocabSymbol, maxVocabSymbol);
};
NotSetTransition.prototype.toString = function() {
return '~' + SetTransition.prototype.toString.call(this);
};
function WildcardTransition(target) {
Transition.call(this, target);
this.serializationType = Transition.WILDCARD;
return this;
}
WildcardTransition.prototype = Object.create(Transition.prototype);
WildcardTransition.prototype.constructor = WildcardTransition;
WildcardTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return symbol >= minVocabSymbol && symbol <= maxVocabSymbol;
};
WildcardTransition.prototype.toString = function() {
return ".";
};
function PrecedencePredicateTransition(target, precedence) {
AbstractPredicateTransition.call(this, target);
this.serializationType = Transition.PRECEDENCE;
this.precedence = precedence;
this.isEpsilon = true;
return this;
}
PrecedencePredicateTransition.prototype = Object.create(AbstractPredicateTransition.prototype);
PrecedencePredicateTransition.prototype.constructor = PrecedencePredicateTransition;
PrecedencePredicateTransition.prototype.matches = function(symbol, minVocabSymbol, maxVocabSymbol) {
return false;
};
PrecedencePredicateTransition.prototype.getPredicate = function() {
return new PrecedencePredicate(this.precedence);
};
PrecedencePredicateTransition.prototype.toString = function() {
return this.precedence + " >= _p";
};
exports.Transition = Transition;
exports.AtomTransition = AtomTransition;
exports.SetTransition = SetTransition;
exports.NotSetTransition = NotSetTransition;
exports.RuleTransition = RuleTransition;
exports.ActionTransition = ActionTransition;
exports.EpsilonTransition = EpsilonTransition;
exports.RangeTransition = RangeTransition;
exports.WildcardTransition = WildcardTransition;
exports.PredicateTransition = PredicateTransition;
exports.PrecedencePredicateTransition = PrecedencePredicateTransition;
exports.AbstractPredicateTransition = AbstractPredicateTransition;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
var RuleContext = __webpack_require__(13).RuleContext;
var Hash = __webpack_require__(5).Hash;
function PredictionContext(cachedHashCode) {
this.cachedHashCode = cachedHashCode;
}
// Represents {@code $} in local context prediction, which means wildcard.
// {@code//+x =//}.
// /
PredictionContext.EMPTY = null;
// Represents {@code $} in an array in full context mode, when {@code $}
// doesn't mean wildcard: {@code $ + x = [$,x]}. Here,
// {@code $} = {@link //EMPTY_RETURN_STATE}.
// /
PredictionContext.EMPTY_RETURN_STATE = 0x7FFFFFFF;
PredictionContext.globalNodeCount = 1;
PredictionContext.id = PredictionContext.globalNodeCount;
// Stores the computed hash code of this {@link PredictionContext}. The hash
// code is computed in parts to match the following reference algorithm.
//
//
// private int referenceHashCode() {
// int hash = {@link MurmurHash//initialize MurmurHash.initialize}({@link
// //INITIAL_HASH});
//
// for (int i = 0; i < {@link //size()}; i++) {
// hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link //getParent
// getParent}(i));
// }
//
// for (int i = 0; i < {@link //size()}; i++) {
// hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link
// //getReturnState getReturnState}(i));
// }
//
// hash = {@link MurmurHash//finish MurmurHash.finish}(hash, 2// {@link
// //size()});
// return hash;
// }
//
// /
// This means only the {@link //EMPTY} context is in set.
PredictionContext.prototype.isEmpty = function() {
return this === PredictionContext.EMPTY;
};
PredictionContext.prototype.hasEmptyPath = function() {
return this.getReturnState(this.length - 1) === PredictionContext.EMPTY_RETURN_STATE;
};
PredictionContext.prototype.hashCode = function() {
return this.cachedHashCode;
};
PredictionContext.prototype.updateHashCode = function(hash) {
hash.update(this.cachedHashCode);
};
/*
function calculateHashString(parent, returnState) {
return "" + parent + returnState;
}
*/
// Used to cache {@link PredictionContext} objects. Its used for the shared
// context cash associated with contexts in DFA states. This cache
// can be used for both lexers and parsers.
function PredictionContextCache() {
this.cache = {};
return this;
}
// Add a context to the cache and return it. If the context already exists,
// return that one instead and do not add a new context to the cache.
// Protect shared cache from unsafe thread access.
//
PredictionContextCache.prototype.add = function(ctx) {
if (ctx === PredictionContext.EMPTY) {
return PredictionContext.EMPTY;
}
var existing = this.cache[ctx] || null;
if (existing !== null) {
return existing;
}
this.cache[ctx] = ctx;
return ctx;
};
PredictionContextCache.prototype.get = function(ctx) {
return this.cache[ctx] || null;
};
Object.defineProperty(PredictionContextCache.prototype, "length", {
get : function() {
return this.cache.length;
}
});
function SingletonPredictionContext(parent, returnState) {
var hashCode = 0;
if(parent !== null) {
var hash = new Hash();
hash.update(parent, returnState);
hashCode = hash.finish();
}
PredictionContext.call(this, hashCode);
this.parentCtx = parent;
this.returnState = returnState;
}
SingletonPredictionContext.prototype = Object.create(PredictionContext.prototype);
SingletonPredictionContext.prototype.contructor = SingletonPredictionContext;
SingletonPredictionContext.create = function(parent, returnState) {
if (returnState === PredictionContext.EMPTY_RETURN_STATE && parent === null) {
// someone can pass in the bits of an array ctx that mean $
return PredictionContext.EMPTY;
} else {
return new SingletonPredictionContext(parent, returnState);
}
};
Object.defineProperty(SingletonPredictionContext.prototype, "length", {
get : function() {
return 1;
}
});
SingletonPredictionContext.prototype.getParent = function(index) {
return this.parentCtx;
};
SingletonPredictionContext.prototype.getReturnState = function(index) {
return this.returnState;
};
SingletonPredictionContext.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof SingletonPredictionContext)) {
return false;
} else if (this.hashCode() !== other.hashCode()) {
return false; // can't be same if hash is different
} else {
if(this.returnState !== other.returnState)
return false;
else if(this.parentCtx==null)
return other.parentCtx==null
else
return this.parentCtx.equals(other.parentCtx);
}
};
SingletonPredictionContext.prototype.toString = function() {
var up = this.parentCtx === null ? "" : this.parentCtx.toString();
if (up.length === 0) {
if (this.returnState === PredictionContext.EMPTY_RETURN_STATE) {
return "$";
} else {
return "" + this.returnState;
}
} else {
return "" + this.returnState + " " + up;
}
};
function EmptyPredictionContext() {
SingletonPredictionContext.call(this, null, PredictionContext.EMPTY_RETURN_STATE);
return this;
}
EmptyPredictionContext.prototype = Object.create(SingletonPredictionContext.prototype);
EmptyPredictionContext.prototype.constructor = EmptyPredictionContext;
EmptyPredictionContext.prototype.isEmpty = function() {
return true;
};
EmptyPredictionContext.prototype.getParent = function(index) {
return null;
};
EmptyPredictionContext.prototype.getReturnState = function(index) {
return this.returnState;
};
EmptyPredictionContext.prototype.equals = function(other) {
return this === other;
};
EmptyPredictionContext.prototype.toString = function() {
return "$";
};
PredictionContext.EMPTY = new EmptyPredictionContext();
function ArrayPredictionContext(parents, returnStates) {
// Parent can be null only if full ctx mode and we make an array
// from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using
// null parent and
// returnState == {@link //EMPTY_RETURN_STATE}.
var h = new Hash();
h.update(parents, returnStates);
var hashCode = h.finish();
PredictionContext.call(this, hashCode);
this.parents = parents;
this.returnStates = returnStates;
return this;
}
ArrayPredictionContext.prototype = Object.create(PredictionContext.prototype);
ArrayPredictionContext.prototype.constructor = ArrayPredictionContext;
ArrayPredictionContext.prototype.isEmpty = function() {
// since EMPTY_RETURN_STATE can only appear in the last position, we
// don't need to verify that size==1
return this.returnStates[0] === PredictionContext.EMPTY_RETURN_STATE;
};
Object.defineProperty(ArrayPredictionContext.prototype, "length", {
get : function() {
return this.returnStates.length;
}
});
ArrayPredictionContext.prototype.getParent = function(index) {
return this.parents[index];
};
ArrayPredictionContext.prototype.getReturnState = function(index) {
return this.returnStates[index];
};
ArrayPredictionContext.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof ArrayPredictionContext)) {
return false;
} else if (this.hashCode() !== other.hashCode()) {
return false; // can't be same if hash is different
} else {
return this.returnStates === other.returnStates &&
this.parents === other.parents;
}
};
ArrayPredictionContext.prototype.toString = function() {
if (this.isEmpty()) {
return "[]";
} else {
var s = "[";
for (var i = 0; i < this.returnStates.length; i++) {
if (i > 0) {
s = s + ", ";
}
if (this.returnStates[i] === PredictionContext.EMPTY_RETURN_STATE) {
s = s + "$";
continue;
}
s = s + this.returnStates[i];
if (this.parents[i] !== null) {
s = s + " " + this.parents[i];
} else {
s = s + "null";
}
}
return s + "]";
}
};
// Convert a {@link RuleContext} tree to a {@link PredictionContext} graph.
// Return {@link //EMPTY} if {@code outerContext} is empty or null.
// /
function predictionContextFromRuleContext(atn, outerContext) {
if (outerContext === undefined || outerContext === null) {
outerContext = RuleContext.EMPTY;
}
// if we are in RuleContext of start rule, s, then PredictionContext
// is EMPTY. Nobody called us. (if we are empty, return empty)
if (outerContext.parentCtx === null || outerContext === RuleContext.EMPTY) {
return PredictionContext.EMPTY;
}
// If we have a parent, convert it to a PredictionContext graph
var parent = predictionContextFromRuleContext(atn, outerContext.parentCtx);
var state = atn.states[outerContext.invokingState];
var transition = state.transitions[0];
return SingletonPredictionContext.create(parent, transition.followState.stateNumber);
}
/*
function calculateListsHashString(parents, returnStates) {
var s = "";
parents.map(function(p) {
s = s + p;
});
returnStates.map(function(r) {
s = s + r;
});
return s;
}
*/
function merge(a, b, rootIsWildcard, mergeCache) {
// share same graph if both same
if (a === b) {
return a;
}
if (a instanceof SingletonPredictionContext && b instanceof SingletonPredictionContext) {
return mergeSingletons(a, b, rootIsWildcard, mergeCache);
}
// At least one of a or b is array
// If one is $ and rootIsWildcard, return $ as// wildcard
if (rootIsWildcard) {
if (a instanceof EmptyPredictionContext) {
return a;
}
if (b instanceof EmptyPredictionContext) {
return b;
}
}
// convert singleton so both are arrays to normalize
if (a instanceof SingletonPredictionContext) {
a = new ArrayPredictionContext([a.getParent()], [a.returnState]);
}
if (b instanceof SingletonPredictionContext) {
b = new ArrayPredictionContext([b.getParent()], [b.returnState]);
}
return mergeArrays(a, b, rootIsWildcard, mergeCache);
}
//
// Merge two {@link SingletonPredictionContext} instances.
//
// Stack tops equal, parents merge is same; return left graph.
//
//
// Same stack top, parents differ; merge parents giving array node, then
// remainders of those graphs. A new root node is created to point to the
// merged parents.
//
//
// Different stack tops pointing to same parent. Make array node for the
// root where both element in the root point to the same (original)
// parent.
//
//
// Different stack tops pointing to different parents. Make array node for
// the root where each element points to the corresponding original
// parent.
//
//
// @param a the first {@link SingletonPredictionContext}
// @param b the second {@link SingletonPredictionContext}
// @param rootIsWildcard {@code true} if this is a local-context merge,
// otherwise false to indicate a full-context merge
// @param mergeCache
// /
function mergeSingletons(a, b, rootIsWildcard, mergeCache) {
if (mergeCache !== null) {
var previous = mergeCache.get(a, b);
if (previous !== null) {
return previous;
}
previous = mergeCache.get(b, a);
if (previous !== null) {
return previous;
}
}
var rootMerge = mergeRoot(a, b, rootIsWildcard);
if (rootMerge !== null) {
if (mergeCache !== null) {
mergeCache.set(a, b, rootMerge);
}
return rootMerge;
}
if (a.returnState === b.returnState) {
var parent = merge(a.parentCtx, b.parentCtx, rootIsWildcard, mergeCache);
// if parent is same as existing a or b parent or reduced to a parent,
// return it
if (parent === a.parentCtx) {
return a; // ax + bx = ax, if a=b
}
if (parent === b.parentCtx) {
return b; // ax + bx = bx, if a=b
}
// else: ax + ay = a'[x,y]
// merge parents x and y, giving array node with x,y then remainders
// of those graphs. dup a, a' points at merged array
// new joined parent so create new singleton pointing to it, a'
var spc = SingletonPredictionContext.create(parent, a.returnState);
if (mergeCache !== null) {
mergeCache.set(a, b, spc);
}
return spc;
} else { // a != b payloads differ
// see if we can collapse parents due to $+x parents if local ctx
var singleParent = null;
if (a === b || (a.parentCtx !== null && a.parentCtx === b.parentCtx)) { // ax +
// bx =
// [a,b]x
singleParent = a.parentCtx;
}
if (singleParent !== null) { // parents are same
// sort payloads and use same parent
var payloads = [ a.returnState, b.returnState ];
if (a.returnState > b.returnState) {
payloads[0] = b.returnState;
payloads[1] = a.returnState;
}
var parents = [ singleParent, singleParent ];
var apc = new ArrayPredictionContext(parents, payloads);
if (mergeCache !== null) {
mergeCache.set(a, b, apc);
}
return apc;
}
// parents differ and can't merge them. Just pack together
// into array; can't merge.
// ax + by = [ax,by]
var payloads = [ a.returnState, b.returnState ];
var parents = [ a.parentCtx, b.parentCtx ];
if (a.returnState > b.returnState) { // sort by payload
payloads[0] = b.returnState;
payloads[1] = a.returnState;
parents = [ b.parentCtx, a.parentCtx ];
}
var a_ = new ArrayPredictionContext(parents, payloads);
if (mergeCache !== null) {
mergeCache.set(a, b, a_);
}
return a_;
}
}
//
// Handle case where at least one of {@code a} or {@code b} is
// {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used
// to represent {@link //EMPTY}.
//
// Local-Context Merges
//
// These local-context merge operations are used when {@code rootIsWildcard}
// is true.
//
// {@link //EMPTY} is superset of any graph; return {@link //EMPTY}.
//
//
// {@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is
// {@code //EMPTY}; return left graph.
//
//
// Special case of last merge if local context.
//
//
// Full-Context Merges
//
// These full-context merge operations are used when {@code rootIsWildcard}
// is false.
//
//
//
// Must keep all contexts; {@link //EMPTY} in array is a special value (and
// null parent).
//
//
//
//
// @param a the first {@link SingletonPredictionContext}
// @param b the second {@link SingletonPredictionContext}
// @param rootIsWildcard {@code true} if this is a local-context merge,
// otherwise false to indicate a full-context merge
// /
function mergeRoot(a, b, rootIsWildcard) {
if (rootIsWildcard) {
if (a === PredictionContext.EMPTY) {
return PredictionContext.EMPTY; // // + b =//
}
if (b === PredictionContext.EMPTY) {
return PredictionContext.EMPTY; // a +// =//
}
} else {
if (a === PredictionContext.EMPTY && b === PredictionContext.EMPTY) {
return PredictionContext.EMPTY; // $ + $ = $
} else if (a === PredictionContext.EMPTY) { // $ + x = [$,x]
var payloads = [ b.returnState,
PredictionContext.EMPTY_RETURN_STATE ];
var parents = [ b.parentCtx, null ];
return new ArrayPredictionContext(parents, payloads);
} else if (b === PredictionContext.EMPTY) { // x + $ = [$,x] ($ is always first if present)
var payloads = [ a.returnState, PredictionContext.EMPTY_RETURN_STATE ];
var parents = [ a.parentCtx, null ];
return new ArrayPredictionContext(parents, payloads);
}
}
return null;
}
//
// Merge two {@link ArrayPredictionContext} instances.
//
// Different tops, different parents.
//
//
// Shared top, same parents.
//
//
// Shared top, different parents.
//
//
// Shared top, all shared parents.
//
//
// Equal tops, merge parents and reduce top to
// {@link SingletonPredictionContext}.
//
// /
function mergeArrays(a, b, rootIsWildcard, mergeCache) {
if (mergeCache !== null) {
var previous = mergeCache.get(a, b);
if (previous !== null) {
return previous;
}
previous = mergeCache.get(b, a);
if (previous !== null) {
return previous;
}
}
// merge sorted payloads a + b => M
var i = 0; // walks a
var j = 0; // walks b
var k = 0; // walks target M array
var mergedReturnStates = [];
var mergedParents = [];
// walk and merge to yield mergedParents, mergedReturnStates
while (i < a.returnStates.length && j < b.returnStates.length) {
var a_parent = a.parents[i];
var b_parent = b.parents[j];
if (a.returnStates[i] === b.returnStates[j]) {
// same payload (stack tops are equal), must yield merged singleton
var payload = a.returnStates[i];
// $+$ = $
var bothDollars = payload === PredictionContext.EMPTY_RETURN_STATE &&
a_parent === null && b_parent === null;
var ax_ax = (a_parent !== null && b_parent !== null && a_parent === b_parent); // ax+ax
// ->
// ax
if (bothDollars || ax_ax) {
mergedParents[k] = a_parent; // choose left
mergedReturnStates[k] = payload;
} else { // ax+ay -> a'[x,y]
var mergedParent = merge(a_parent, b_parent, rootIsWildcard, mergeCache);
mergedParents[k] = mergedParent;
mergedReturnStates[k] = payload;
}
i += 1; // hop over left one as usual
j += 1; // but also skip one in right side since we merge
} else if (a.returnStates[i] < b.returnStates[j]) { // copy a[i] to M
mergedParents[k] = a_parent;
mergedReturnStates[k] = a.returnStates[i];
i += 1;
} else { // b > a, copy b[j] to M
mergedParents[k] = b_parent;
mergedReturnStates[k] = b.returnStates[j];
j += 1;
}
k += 1;
}
// copy over any payloads remaining in either array
if (i < a.returnStates.length) {
for (var p = i; p < a.returnStates.length; p++) {
mergedParents[k] = a.parents[p];
mergedReturnStates[k] = a.returnStates[p];
k += 1;
}
} else {
for (var p = j; p < b.returnStates.length; p++) {
mergedParents[k] = b.parents[p];
mergedReturnStates[k] = b.returnStates[p];
k += 1;
}
}
// trim merged if we combined a few that had same stack tops
if (k < mergedParents.length) { // write index < last position; trim
if (k === 1) { // for just one merged element, return singleton top
var a_ = SingletonPredictionContext.create(mergedParents[0],
mergedReturnStates[0]);
if (mergeCache !== null) {
mergeCache.set(a, b, a_);
}
return a_;
}
mergedParents = mergedParents.slice(0, k);
mergedReturnStates = mergedReturnStates.slice(0, k);
}
var M = new ArrayPredictionContext(mergedParents, mergedReturnStates);
// if we created same array as a or b, return that instead
// TODO: track whether this is possible above during merge sort for speed
if (M === a) {
if (mergeCache !== null) {
mergeCache.set(a, b, a);
}
return a;
}
if (M === b) {
if (mergeCache !== null) {
mergeCache.set(a, b, b);
}
return b;
}
combineCommonParents(mergedParents);
if (mergeCache !== null) {
mergeCache.set(a, b, M);
}
return M;
}
//
// Make pass over all M {@code parents}; merge any {@code equals()}
// ones.
// /
function combineCommonParents(parents) {
var uniqueParents = {};
for (var p = 0; p < parents.length; p++) {
var parent = parents[p];
if (!(parent in uniqueParents)) {
uniqueParents[parent] = parent;
}
}
for (var q = 0; q < parents.length; q++) {
parents[q] = uniqueParents[parents[q]];
}
}
function getCachedPredictionContext(context, contextCache, visited) {
if (context.isEmpty()) {
return context;
}
var existing = visited[context] || null;
if (existing !== null) {
return existing;
}
existing = contextCache.get(context);
if (existing !== null) {
visited[context] = existing;
return existing;
}
var changed = false;
var parents = [];
for (var i = 0; i < parents.length; i++) {
var parent = getCachedPredictionContext(context.getParent(i), contextCache, visited);
if (changed || parent !== context.getParent(i)) {
if (!changed) {
parents = [];
for (var j = 0; j < context.length; j++) {
parents[j] = context.getParent(j);
}
changed = true;
}
parents[i] = parent;
}
}
if (!changed) {
contextCache.add(context);
visited[context] = context;
return context;
}
var updated = null;
if (parents.length === 0) {
updated = PredictionContext.EMPTY;
} else if (parents.length === 1) {
updated = SingletonPredictionContext.create(parents[0], context
.getReturnState(0));
} else {
updated = new ArrayPredictionContext(parents, context.returnStates);
}
contextCache.add(updated);
visited[updated] = updated;
visited[context] = updated;
return updated;
}
// ter's recursive version of Sam's getAllNodes()
function getAllContextNodes(context, nodes, visited) {
if (nodes === null) {
nodes = [];
return getAllContextNodes(context, nodes, visited);
} else if (visited === null) {
visited = {};
return getAllContextNodes(context, nodes, visited);
} else {
if (context === null || visited[context] !== null) {
return nodes;
}
visited[context] = context;
nodes.push(context);
for (var i = 0; i < context.length; i++) {
getAllContextNodes(context.getParent(i), nodes, visited);
}
return nodes;
}
}
exports.merge = merge;
exports.PredictionContext = PredictionContext;
exports.PredictionContextCache = PredictionContextCache;
exports.SingletonPredictionContext = SingletonPredictionContext;
exports.predictionContextFromRuleContext = predictionContextFromRuleContext;
exports.getCachedPredictionContext = getCachedPredictionContext;
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// A rule context is a record of a single rule invocation. It knows
// which context invoked it, if any. If there is no parent context, then
// naturally the invoking state is not valid. The parent link
// provides a chain upwards from the current rule invocation to the root
// of the invocation tree, forming a stack. We actually carry no
// information about the rule associated with this context (except
// when parsing). We keep only the state number of the invoking state from
// the ATN submachine that invoked this. Contrast this with the s
// pointer inside ParserRuleContext that tracks the current state
// being "executed" for the current rule.
//
// The parent contexts are useful for computing lookahead sets and
// getting error information.
//
// These objects are used during parsing and prediction.
// For the special case of parsers, we use the subclass
// ParserRuleContext.
//
// @see ParserRuleContext
///
var RuleNode = __webpack_require__(14).RuleNode;
var INVALID_INTERVAL = __webpack_require__(14).INVALID_INTERVAL;
var INVALID_ALT_NUMBER = __webpack_require__(3).INVALID_ALT_NUMBER;
function RuleContext(parent, invokingState) {
RuleNode.call(this);
// What context invoked this rule?
this.parentCtx = parent || null;
// What state invoked the rule associated with this context?
// The "return address" is the followState of invokingState
// If parent is null, this should be -1.
this.invokingState = invokingState || -1;
return this;
}
RuleContext.prototype = Object.create(RuleNode.prototype);
RuleContext.prototype.constructor = RuleContext;
RuleContext.prototype.depth = function() {
var n = 0;
var p = this;
while (p !== null) {
p = p.parentCtx;
n += 1;
}
return n;
};
// A context is empty if there is no invoking state; meaning nobody call
// current context.
RuleContext.prototype.isEmpty = function() {
return this.invokingState === -1;
};
// satisfy the ParseTree / SyntaxTree interface
RuleContext.prototype.getSourceInterval = function() {
return INVALID_INTERVAL;
};
RuleContext.prototype.getRuleContext = function() {
return this;
};
RuleContext.prototype.getPayload = function() {
return this;
};
// Return the combined text of all child nodes. This method only considers
// tokens which have been added to the parse tree.
//
// Since tokens on hidden channels (e.g. whitespace or comments) are not
// added to the parse trees, they will not appear in the output of this
// method.
// /
RuleContext.prototype.getText = function() {
if (this.getChildCount() === 0) {
return "";
} else {
return this.children.map(function(child) {
return child.getText();
}).join("");
}
};
// For rule associated with this parse tree internal node, return
// the outer alternative number used to match the input. Default
// implementation does not compute nor store this alt num. Create
// a subclass of ParserRuleContext with backing field and set
// option contextSuperClass.
// to set it.
RuleContext.prototype.getAltNumber = function() { return INVALID_ALT_NUMBER; }
// Set the outer alternative number for this context node. Default
// implementation does nothing to avoid backing field overhead for
// trees that don't need it. Create
// a subclass of ParserRuleContext with backing field and set
// option contextSuperClass.
RuleContext.prototype.setAltNumber = function(altNumber) { }
RuleContext.prototype.getChild = function(i) {
return null;
};
RuleContext.prototype.getChildCount = function() {
return 0;
};
RuleContext.prototype.accept = function(visitor) {
return visitor.visitChildren(this);
};
//need to manage circular dependencies, so export now
exports.RuleContext = RuleContext;
var Trees = __webpack_require__(15).Trees;
// Print out a whole tree, not just a node, in LISP format
// (root child1 .. childN). Print just a node if this is a leaf.
//
RuleContext.prototype.toStringTree = function(ruleNames, recog) {
return Trees.toStringTree(this, ruleNames, recog);
};
RuleContext.prototype.toString = function(ruleNames, stop) {
ruleNames = ruleNames || null;
stop = stop || null;
var p = this;
var s = "[";
while (p !== null && p !== stop) {
if (ruleNames === null) {
if (!p.isEmpty()) {
s += p.invokingState;
}
} else {
var ri = p.ruleIndex;
var ruleName = (ri >= 0 && ri < ruleNames.length) ? ruleNames[ri]
: "" + ri;
s += ruleName;
}
if (p.parentCtx !== null && (ruleNames !== null || !p.parentCtx.isEmpty())) {
s += " ";
}
p = p.parentCtx;
}
s += "]";
return s;
};
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// The basic notion of a tree has a parent, a payload, and a list of children.
// It is the most abstract interface for all the trees used by ANTLR.
///
var Token = __webpack_require__(6).Token;
var Interval = __webpack_require__(10).Interval;
var INVALID_INTERVAL = new Interval(-1, -2);
var Utils = __webpack_require__(5);
function Tree() {
return this;
}
function SyntaxTree() {
Tree.call(this);
return this;
}
SyntaxTree.prototype = Object.create(Tree.prototype);
SyntaxTree.prototype.constructor = SyntaxTree;
function ParseTree() {
SyntaxTree.call(this);
return this;
}
ParseTree.prototype = Object.create(SyntaxTree.prototype);
ParseTree.prototype.constructor = ParseTree;
function RuleNode() {
ParseTree.call(this);
return this;
}
RuleNode.prototype = Object.create(ParseTree.prototype);
RuleNode.prototype.constructor = RuleNode;
function TerminalNode() {
ParseTree.call(this);
return this;
}
TerminalNode.prototype = Object.create(ParseTree.prototype);
TerminalNode.prototype.constructor = TerminalNode;
function ErrorNode() {
TerminalNode.call(this);
return this;
}
ErrorNode.prototype = Object.create(TerminalNode.prototype);
ErrorNode.prototype.constructor = ErrorNode;
function ParseTreeVisitor() {
return this;
}
ParseTreeVisitor.prototype.visit = function(ctx) {
if (Array.isArray(ctx)) {
return ctx.map(function(child) {
return ctx.accept(this);
}, this);
} else {
return ctx.accept(this);
}
};
ParseTreeVisitor.prototype.visitChildren = function(ctx) {
return this.visit(ctx.children);
}
ParseTreeVisitor.prototype.visitTerminal = function(node) {
};
ParseTreeVisitor.prototype.visitErrorNode = function(node) {
};
function ParseTreeListener() {
return this;
}
ParseTreeListener.prototype.visitTerminal = function(node) {
};
ParseTreeListener.prototype.visitErrorNode = function(node) {
};
ParseTreeListener.prototype.enterEveryRule = function(node) {
};
ParseTreeListener.prototype.exitEveryRule = function(node) {
};
function TerminalNodeImpl(symbol) {
TerminalNode.call(this);
this.parentCtx = null;
this.symbol = symbol;
return this;
}
TerminalNodeImpl.prototype = Object.create(TerminalNode.prototype);
TerminalNodeImpl.prototype.constructor = TerminalNodeImpl;
TerminalNodeImpl.prototype.getChild = function(i) {
return null;
};
TerminalNodeImpl.prototype.getSymbol = function() {
return this.symbol;
};
TerminalNodeImpl.prototype.getParent = function() {
return this.parentCtx;
};
TerminalNodeImpl.prototype.getPayload = function() {
return this.symbol;
};
TerminalNodeImpl.prototype.getSourceInterval = function() {
if (this.symbol === null) {
return INVALID_INTERVAL;
}
var tokenIndex = this.symbol.tokenIndex;
return new Interval(tokenIndex, tokenIndex);
};
TerminalNodeImpl.prototype.getChildCount = function() {
return 0;
};
TerminalNodeImpl.prototype.accept = function(visitor) {
return visitor.visitTerminal(this);
};
TerminalNodeImpl.prototype.getText = function() {
return this.symbol.text;
};
TerminalNodeImpl.prototype.toString = function() {
if (this.symbol.type === Token.EOF) {
return "";
} else {
return this.symbol.text;
}
};
// Represents a token that was consumed during resynchronization
// rather than during a valid match operation. For example,
// we will create this kind of a node during single token insertion
// and deletion as well as during "consume until error recovery set"
// upon no viable alternative exceptions.
function ErrorNodeImpl(token) {
TerminalNodeImpl.call(this, token);
return this;
}
ErrorNodeImpl.prototype = Object.create(TerminalNodeImpl.prototype);
ErrorNodeImpl.prototype.constructor = ErrorNodeImpl;
ErrorNodeImpl.prototype.isErrorNode = function() {
return true;
};
ErrorNodeImpl.prototype.accept = function(visitor) {
return visitor.visitErrorNode(this);
};
function ParseTreeWalker() {
return this;
}
ParseTreeWalker.prototype.walk = function(listener, t) {
var errorNode = t instanceof ErrorNode ||
(t.isErrorNode !== undefined && t.isErrorNode());
if (errorNode) {
listener.visitErrorNode(t);
} else if (t instanceof TerminalNode) {
listener.visitTerminal(t);
} else {
this.enterRule(listener, t);
for (var i = 0; i < t.getChildCount(); i++) {
var child = t.getChild(i);
this.walk(listener, child);
}
this.exitRule(listener, t);
}
};
//
// The discovery of a rule node, involves sending two events: the generic
// {@link ParseTreeListener//enterEveryRule} and a
// {@link RuleContext}-specific event. First we trigger the generic and then
// the rule specific. We to them in reverse order upon finishing the node.
//
ParseTreeWalker.prototype.enterRule = function(listener, r) {
var ctx = r.getRuleContext();
listener.enterEveryRule(ctx);
ctx.enterRule(listener);
};
ParseTreeWalker.prototype.exitRule = function(listener, r) {
var ctx = r.getRuleContext();
ctx.exitRule(listener);
listener.exitEveryRule(ctx);
};
ParseTreeWalker.DEFAULT = new ParseTreeWalker();
exports.RuleNode = RuleNode;
exports.ErrorNode = ErrorNode;
exports.TerminalNode = TerminalNode;
exports.ErrorNodeImpl = ErrorNodeImpl;
exports.TerminalNodeImpl = TerminalNodeImpl;
exports.ParseTreeListener = ParseTreeListener;
exports.ParseTreeVisitor = ParseTreeVisitor;
exports.ParseTreeWalker = ParseTreeWalker;
exports.INVALID_INTERVAL = INVALID_INTERVAL;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
var Utils = __webpack_require__(5);
var Token = __webpack_require__(6).Token;
var RuleNode = __webpack_require__(14).RuleNode;
var ErrorNode = __webpack_require__(14).ErrorNode;
var TerminalNode = __webpack_require__(14).TerminalNode;
var ParserRuleContext = __webpack_require__(16).ParserRuleContext;
var RuleContext = __webpack_require__(13).RuleContext;
var INVALID_ALT_NUMBER = __webpack_require__(3).INVALID_ALT_NUMBER;
/** A set of utility routines useful for all kinds of ANTLR trees. */
function Trees() {
}
// Print out a whole tree in LISP form. {@link //getNodeText} is used on the
// node payloads to get the text for the nodes. Detect
// parse trees and extract data appropriately.
Trees.toStringTree = function(tree, ruleNames, recog) {
ruleNames = ruleNames || null;
recog = recog || null;
if(recog!==null) {
ruleNames = recog.ruleNames;
}
var s = Trees.getNodeText(tree, ruleNames);
s = Utils.escapeWhitespace(s, false);
var c = tree.getChildCount();
if(c===0) {
return s;
}
var res = "(" + s + ' ';
if(c>0) {
s = Trees.toStringTree(tree.getChild(0), ruleNames);
res = res.concat(s);
}
for(var i=1;i=i ? this.children[i] : null;
} else {
for(var j=0; j= idx1;
};
ATNDeserializer.prototype.deserialize = function(data) {
this.reset(data);
this.checkVersion();
this.checkUUID();
var atn = this.readATN();
this.readStates(atn);
this.readRules(atn);
this.readModes(atn);
var sets = this.readSets(atn);
this.readEdges(atn, sets);
this.readDecisions(atn);
this.readLexerActions(atn);
this.markPrecedenceDecisions(atn);
this.verifyATN(atn);
if (this.deserializationOptions.generateRuleBypassTransitions && atn.grammarType === ATNType.PARSER ) {
this.generateRuleBypassTransitions(atn);
// re-verify after modification
this.verifyATN(atn);
}
return atn;
};
ATNDeserializer.prototype.reset = function(data) {
var adjust = function(c) {
var v = c.charCodeAt(0);
return v>1 ? v-2 : -1;
};
var temp = data.split("").map(adjust);
// don't adjust the first value since that's the version number
temp[0] = data.charCodeAt(0);
this.data = temp;
this.pos = 0;
};
ATNDeserializer.prototype.checkVersion = function() {
var version = this.readInt();
if ( version !== SERIALIZED_VERSION ) {
throw ("Could not deserialize ATN with version " + version + " (expected " + SERIALIZED_VERSION + ").");
}
};
ATNDeserializer.prototype.checkUUID = function() {
var uuid = this.readUUID();
if (SUPPORTED_UUIDS.indexOf(uuid)<0) {
throw ("Could not deserialize ATN with UUID: " + uuid +
" (expected " + SERIALIZED_UUID + " or a legacy UUID).", uuid, SERIALIZED_UUID);
}
this.uuid = uuid;
};
ATNDeserializer.prototype.readATN = function() {
var grammarType = this.readInt();
var maxTokenType = this.readInt();
return new ATN(grammarType, maxTokenType);
};
ATNDeserializer.prototype.readStates = function(atn) {
var j, pair, stateNumber;
var loopBackStateNumbers = [];
var endStateNumbers = [];
var nstates = this.readInt();
for(var i=0; i 0) {
bypassStart.addTransition(ruleToStartState.transitions[count-1]);
ruleToStartState.transitions = ruleToStartState.transitions.slice(-1);
}
// link the new states
atn.ruleToStartState[idx].addTransition(new EpsilonTransition(bypassStart));
bypassStop.addTransition(new EpsilonTransition(endState));
var matchState = new BasicState();
atn.addState(matchState);
matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[idx]));
bypassStart.addTransition(new EpsilonTransition(matchState));
};
ATNDeserializer.prototype.stateIsEndStateFor = function(state, idx) {
if ( state.ruleIndex !== idx) {
return null;
}
if (!( state instanceof StarLoopEntryState)) {
return null;
}
var maybeLoopEndState = state.transitions[state.transitions.length - 1].target;
if (!( maybeLoopEndState instanceof LoopEndState)) {
return null;
}
if (maybeLoopEndState.epsilonOnlyTransitions &&
(maybeLoopEndState.transitions[0].target instanceof RuleStopState)) {
return state;
} else {
return null;
}
};
//
// Analyze the {@link StarLoopEntryState} states in the specified ATN to set
// the {@link StarLoopEntryState//isPrecedenceDecision} field to the
// correct value.
//
// @param atn The ATN.
//
ATNDeserializer.prototype.markPrecedenceDecisions = function(atn) {
for(var i=0; i= 0);
} else {
this.checkCondition(state.transitions.length <= 1 || (state instanceof RuleStopState));
}
}
};
ATNDeserializer.prototype.checkCondition = function(condition, message) {
if (!condition) {
if (message === undefined || message===null) {
message = "IllegalState";
}
throw (message);
}
};
ATNDeserializer.prototype.readInt = function() {
return this.data[this.pos++];
};
ATNDeserializer.prototype.readInt32 = function() {
var low = this.readInt();
var high = this.readInt();
return low | (high << 16);
};
ATNDeserializer.prototype.readLong = function() {
var low = this.readInt32();
var high = this.readInt32();
return (low & 0x00000000FFFFFFFF) | (high << 32);
};
function createByteToHex() {
var bth = [];
for (var i = 0; i < 256; i++) {
bth[i] = (i + 0x100).toString(16).substr(1).toUpperCase();
}
return bth;
}
var byteToHex = createByteToHex();
ATNDeserializer.prototype.readUUID = function() {
var bb = [];
for(var i=7;i>=0;i--) {
var int = this.readInt();
/* jshint bitwise: false */
bb[(2*i)+1] = int & 0xFF;
bb[2*i] = (int >> 8) & 0xFF;
}
return byteToHex[bb[0]] + byteToHex[bb[1]] +
byteToHex[bb[2]] + byteToHex[bb[3]] + '-' +
byteToHex[bb[4]] + byteToHex[bb[5]] + '-' +
byteToHex[bb[6]] + byteToHex[bb[7]] + '-' +
byteToHex[bb[8]] + byteToHex[bb[9]] + '-' +
byteToHex[bb[10]] + byteToHex[bb[11]] +
byteToHex[bb[12]] + byteToHex[bb[13]] +
byteToHex[bb[14]] + byteToHex[bb[15]];
};
ATNDeserializer.prototype.edgeFactory = function(atn, type, src, trg, arg1, arg2, arg3, sets) {
var target = atn.states[trg];
switch(type) {
case Transition.EPSILON:
return new EpsilonTransition(target);
case Transition.RANGE:
return arg3 !== 0 ? new RangeTransition(target, Token.EOF, arg2) : new RangeTransition(target, arg1, arg2);
case Transition.RULE:
return new RuleTransition(atn.states[arg1], arg2, arg3, target);
case Transition.PREDICATE:
return new PredicateTransition(target, arg1, arg2, arg3 !== 0);
case Transition.PRECEDENCE:
return new PrecedencePredicateTransition(target, arg1);
case Transition.ATOM:
return arg3 !== 0 ? new AtomTransition(target, Token.EOF) : new AtomTransition(target, arg1);
case Transition.ACTION:
return new ActionTransition(target, arg1, arg2, arg3 !== 0);
case Transition.SET:
return new SetTransition(target, sets[arg1]);
case Transition.NOT_SET:
return new NotSetTransition(target, sets[arg1]);
case Transition.WILDCARD:
return new WildcardTransition(target);
default:
throw "The specified transition type: " + type + " is not valid.";
}
};
ATNDeserializer.prototype.stateFactory = function(type, ruleIndex) {
if (this.stateFactories === null) {
var sf = [];
sf[ATNState.INVALID_TYPE] = null;
sf[ATNState.BASIC] = function() { return new BasicState(); };
sf[ATNState.RULE_START] = function() { return new RuleStartState(); };
sf[ATNState.BLOCK_START] = function() { return new BasicBlockStartState(); };
sf[ATNState.PLUS_BLOCK_START] = function() { return new PlusBlockStartState(); };
sf[ATNState.STAR_BLOCK_START] = function() { return new StarBlockStartState(); };
sf[ATNState.TOKEN_START] = function() { return new TokensStartState(); };
sf[ATNState.RULE_STOP] = function() { return new RuleStopState(); };
sf[ATNState.BLOCK_END] = function() { return new BlockEndState(); };
sf[ATNState.STAR_LOOP_BACK] = function() { return new StarLoopbackState(); };
sf[ATNState.STAR_LOOP_ENTRY] = function() { return new StarLoopEntryState(); };
sf[ATNState.PLUS_LOOP_BACK] = function() { return new PlusLoopbackState(); };
sf[ATNState.LOOP_END] = function() { return new LoopEndState(); };
this.stateFactories = sf;
}
if (type>this.stateFactories.length || this.stateFactories[type] === null) {
throw("The specified state type " + type + " is not valid.");
} else {
var s = this.stateFactories[type]();
if (s!==null) {
s.ruleIndex = ruleIndex;
return s;
}
}
};
ATNDeserializer.prototype.lexerActionFactory = function(type, data1, data2) {
if (this.actionFactories === null) {
var af = [];
af[LexerActionType.CHANNEL] = function(data1, data2) { return new LexerChannelAction(data1); };
af[LexerActionType.CUSTOM] = function(data1, data2) { return new LexerCustomAction(data1, data2); };
af[LexerActionType.MODE] = function(data1, data2) { return new LexerModeAction(data1); };
af[LexerActionType.MORE] = function(data1, data2) { return LexerMoreAction.INSTANCE; };
af[LexerActionType.POP_MODE] = function(data1, data2) { return LexerPopModeAction.INSTANCE; };
af[LexerActionType.PUSH_MODE] = function(data1, data2) { return new LexerPushModeAction(data1); };
af[LexerActionType.SKIP] = function(data1, data2) { return LexerSkipAction.INSTANCE; };
af[LexerActionType.TYPE] = function(data1, data2) { return new LexerTypeAction(data1); };
this.actionFactories = af;
}
if (type>this.actionFactories.length || this.actionFactories[type] === null) {
throw("The specified lexer action type " + type + " is not valid.");
} else {
return this.actionFactories[type](data1, data2);
}
};
exports.ATNDeserializer = ATNDeserializer;
/***/ },
/* 18 */
/***/ function(module, exports) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// Represents the type of recognizer an ATN applies to.
function ATNType() {
}
ATNType.LEXER = 0;
ATNType.PARSER = 1;
exports.ATNType = ATNType;
/***/ },
/* 19 */
/***/ function(module, exports) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
function ATNDeserializationOptions(copyFrom) {
if(copyFrom===undefined) {
copyFrom = null;
}
this.readOnly = false;
this.verifyATN = copyFrom===null ? true : copyFrom.verifyATN;
this.generateRuleBypassTransitions = copyFrom===null ? false : copyFrom.generateRuleBypassTransitions;
return this;
}
ATNDeserializationOptions.defaultOptions = new ATNDeserializationOptions();
ATNDeserializationOptions.defaultOptions.readOnly = true;
// def __setattr__(self, key, value):
// if key!="readOnly" and self.readOnly:
// raise Exception("The object is read only.")
// super(type(self), self).__setattr__(key,value)
exports.ATNDeserializationOptions = ATNDeserializationOptions;
/***/ },
/* 20 */
/***/ function(module, exports) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
function LexerActionType() {
}
LexerActionType.CHANNEL = 0; //The type of a {@link LexerChannelAction} action.
LexerActionType.CUSTOM = 1; //The type of a {@link LexerCustomAction} action.
LexerActionType.MODE = 2; //The type of a {@link LexerModeAction} action.
LexerActionType.MORE = 3; //The type of a {@link LexerMoreAction} action.
LexerActionType.POP_MODE = 4; //The type of a {@link LexerPopModeAction} action.
LexerActionType.PUSH_MODE = 5; //The type of a {@link LexerPushModeAction} action.
LexerActionType.SKIP = 6; //The type of a {@link LexerSkipAction} action.
LexerActionType.TYPE = 7; //The type of a {@link LexerTypeAction} action.
function LexerAction(action) {
this.actionType = action;
this.isPositionDependent = false;
return this;
}
LexerAction.prototype.hashCode = function() {
var hash = new Hash();
this.updateHashCode(hash);
return hash.finish()
};
LexerAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType);
};
LexerAction.prototype.equals = function(other) {
return this === other;
};
//
// Implements the {@code skip} lexer action by calling {@link Lexer//skip}.
//
// The {@code skip} command does not have any parameters, so this action is
// implemented as a singleton instance exposed by {@link //INSTANCE}.
function LexerSkipAction() {
LexerAction.call(this, LexerActionType.SKIP);
return this;
}
LexerSkipAction.prototype = Object.create(LexerAction.prototype);
LexerSkipAction.prototype.constructor = LexerSkipAction;
// Provides a singleton instance of this parameterless lexer action.
LexerSkipAction.INSTANCE = new LexerSkipAction();
LexerSkipAction.prototype.execute = function(lexer) {
lexer.skip();
};
LexerSkipAction.prototype.toString = function() {
return "skip";
};
// Implements the {@code type} lexer action by calling {@link Lexer//setType}
// with the assigned type.
function LexerTypeAction(type) {
LexerAction.call(this, LexerActionType.TYPE);
this.type = type;
return this;
}
LexerTypeAction.prototype = Object.create(LexerAction.prototype);
LexerTypeAction.prototype.constructor = LexerTypeAction;
LexerTypeAction.prototype.execute = function(lexer) {
lexer.type = this.type;
};
LexerTypeAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.type);
};
LexerTypeAction.prototype.equals = function(other) {
if(this === other) {
return true;
} else if (! (other instanceof LexerTypeAction)) {
return false;
} else {
return this.type === other.type;
}
};
LexerTypeAction.prototype.toString = function() {
return "type(" + this.type + ")";
};
// Implements the {@code pushMode} lexer action by calling
// {@link Lexer//pushMode} with the assigned mode.
function LexerPushModeAction(mode) {
LexerAction.call(this, LexerActionType.PUSH_MODE);
this.mode = mode;
return this;
}
LexerPushModeAction.prototype = Object.create(LexerAction.prototype);
LexerPushModeAction.prototype.constructor = LexerPushModeAction;
// This action is implemented by calling {@link Lexer//pushMode} with the
// value provided by {@link //getMode}.
LexerPushModeAction.prototype.execute = function(lexer) {
lexer.pushMode(this.mode);
};
LexerPushModeAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.mode);
};
LexerPushModeAction.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof LexerPushModeAction)) {
return false;
} else {
return this.mode === other.mode;
}
};
LexerPushModeAction.prototype.toString = function() {
return "pushMode(" + this.mode + ")";
};
// Implements the {@code popMode} lexer action by calling {@link Lexer//popMode}.
//
// The {@code popMode} command does not have any parameters, so this action is
// implemented as a singleton instance exposed by {@link //INSTANCE}.
function LexerPopModeAction() {
LexerAction.call(this,LexerActionType.POP_MODE);
return this;
}
LexerPopModeAction.prototype = Object.create(LexerAction.prototype);
LexerPopModeAction.prototype.constructor = LexerPopModeAction;
LexerPopModeAction.INSTANCE = new LexerPopModeAction();
// This action is implemented by calling {@link Lexer//popMode}.
LexerPopModeAction.prototype.execute = function(lexer) {
lexer.popMode();
};
LexerPopModeAction.prototype.toString = function() {
return "popMode";
};
// Implements the {@code more} lexer action by calling {@link Lexer//more}.
//
// The {@code more} command does not have any parameters, so this action is
// implemented as a singleton instance exposed by {@link //INSTANCE}.
function LexerMoreAction() {
LexerAction.call(this, LexerActionType.MORE);
return this;
}
LexerMoreAction.prototype = Object.create(LexerAction.prototype);
LexerMoreAction.prototype.constructor = LexerMoreAction;
LexerMoreAction.INSTANCE = new LexerMoreAction();
// This action is implemented by calling {@link Lexer//popMode}.
LexerMoreAction.prototype.execute = function(lexer) {
lexer.more();
};
LexerMoreAction.prototype.toString = function() {
return "more";
};
// Implements the {@code mode} lexer action by calling {@link Lexer//mode} with
// the assigned mode.
function LexerModeAction(mode) {
LexerAction.call(this, LexerActionType.MODE);
this.mode = mode;
return this;
}
LexerModeAction.prototype = Object.create(LexerAction.prototype);
LexerModeAction.prototype.constructor = LexerModeAction;
// This action is implemented by calling {@link Lexer//mode} with the
// value provided by {@link //getMode}.
LexerModeAction.prototype.execute = function(lexer) {
lexer.mode(this.mode);
};
LexerModeAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.mode);
};
LexerModeAction.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof LexerModeAction)) {
return false;
} else {
return this.mode === other.mode;
}
};
LexerModeAction.prototype.toString = function() {
return "mode(" + this.mode + ")";
};
// Executes a custom lexer action by calling {@link Recognizer//action} with the
// rule and action indexes assigned to the custom action. The implementation of
// a custom action is added to the generated code for the lexer in an override
// of {@link Recognizer//action} when the grammar is compiled.
//
// This class may represent embedded actions created with the {...}
// syntax in ANTLR 4, as well as actions created for lexer commands where the
// command argument could not be evaluated when the grammar was compiled.
// Constructs a custom lexer action with the specified rule and action
// indexes.
//
// @param ruleIndex The rule index to use for calls to
// {@link Recognizer//action}.
// @param actionIndex The action index to use for calls to
// {@link Recognizer//action}.
function LexerCustomAction(ruleIndex, actionIndex) {
LexerAction.call(this, LexerActionType.CUSTOM);
this.ruleIndex = ruleIndex;
this.actionIndex = actionIndex;
this.isPositionDependent = true;
return this;
}
LexerCustomAction.prototype = Object.create(LexerAction.prototype);
LexerCustomAction.prototype.constructor = LexerCustomAction;
// Custom actions are implemented by calling {@link Lexer//action} with the
// appropriate rule and action indexes.
LexerCustomAction.prototype.execute = function(lexer) {
lexer.action(null, this.ruleIndex, this.actionIndex);
};
LexerCustomAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.ruleIndex, this.actionIndex);
};
LexerCustomAction.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof LexerCustomAction)) {
return false;
} else {
return this.ruleIndex === other.ruleIndex && this.actionIndex === other.actionIndex;
}
};
// Implements the {@code channel} lexer action by calling
// {@link Lexer//setChannel} with the assigned channel.
// Constructs a new {@code channel} action with the specified channel value.
// @param channel The channel value to pass to {@link Lexer//setChannel}.
function LexerChannelAction(channel) {
LexerAction.call(this, LexerActionType.CHANNEL);
this.channel = channel;
return this;
}
LexerChannelAction.prototype = Object.create(LexerAction.prototype);
LexerChannelAction.prototype.constructor = LexerChannelAction;
// This action is implemented by calling {@link Lexer//setChannel} with the
// value provided by {@link //getChannel}.
LexerChannelAction.prototype.execute = function(lexer) {
lexer._channel = this.channel;
};
LexerChannelAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.channel);
};
LexerChannelAction.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof LexerChannelAction)) {
return false;
} else {
return this.channel === other.channel;
}
};
LexerChannelAction.prototype.toString = function() {
return "channel(" + this.channel + ")";
};
// This implementation of {@link LexerAction} is used for tracking input offsets
// for position-dependent actions within a {@link LexerActionExecutor}.
//
// This action is not serialized as part of the ATN, and is only required for
// position-dependent lexer actions which appear at a location other than the
// end of a rule. For more information about DFA optimizations employed for
// lexer actions, see {@link LexerActionExecutor//append} and
// {@link LexerActionExecutor//fixOffsetBeforeMatch}.
// Constructs a new indexed custom action by associating a character offset
// with a {@link LexerAction}.
//
// Note: This class is only required for lexer actions for which
// {@link LexerAction//isPositionDependent} returns {@code true}.
//
// @param offset The offset into the input {@link CharStream}, relative to
// the token start index, at which the specified lexer action should be
// executed.
// @param action The lexer action to execute at a particular offset in the
// input {@link CharStream}.
function LexerIndexedCustomAction(offset, action) {
LexerAction.call(this, action.actionType);
this.offset = offset;
this.action = action;
this.isPositionDependent = true;
return this;
}
LexerIndexedCustomAction.prototype = Object.create(LexerAction.prototype);
LexerIndexedCustomAction.prototype.constructor = LexerIndexedCustomAction;
// This method calls {@link //execute} on the result of {@link //getAction}
// using the provided {@code lexer}.
LexerIndexedCustomAction.prototype.execute = function(lexer) {
// assume the input stream position was properly set by the calling code
this.action.execute(lexer);
};
LexerIndexedCustomAction.prototype.updateHashCode = function(hash) {
hash.update(this.actionType, this.offset, this.action);
};
LexerIndexedCustomAction.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (! (other instanceof LexerIndexedCustomAction)) {
return false;
} else {
return this.offset === other.offset && this.action === other.action;
}
};
exports.LexerActionType = LexerActionType;
exports.LexerSkipAction = LexerSkipAction;
exports.LexerChannelAction = LexerChannelAction;
exports.LexerCustomAction = LexerCustomAction;
exports.LexerIndexedCustomAction = LexerIndexedCustomAction;
exports.LexerMoreAction = LexerMoreAction;
exports.LexerTypeAction = LexerTypeAction;
exports.LexerPushModeAction = LexerPushModeAction;
exports.LexerPopModeAction = LexerPopModeAction;
exports.LexerModeAction = LexerModeAction;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// When we hit an accept state in either the DFA or the ATN, we
// have to notify the character stream to start buffering characters
// via {@link IntStream//mark} and record the current state. The current sim state
// includes the current index into the input, the current line,
// and current character position in that line. Note that the Lexer is
// tracking the starting line and characterization of the token. These
// variables track the "state" of the simulator when it hits an accept state.
//
// We track these variables separately for the DFA and ATN simulation
// because the DFA simulation often has to fail over to the ATN
// simulation. If the ATN simulation fails, we need the DFA to fall
// back to its previously accepted state, if any. If the ATN succeeds,
// then the ATN does the accept and the DFA simulator that invoked it
// can simply return the predicted token type.
///
var Token = __webpack_require__(6).Token;
var Lexer = __webpack_require__(22).Lexer;
var ATN = __webpack_require__(3).ATN;
var ATNSimulator = __webpack_require__(27).ATNSimulator;
var DFAState = __webpack_require__(28).DFAState;
var ATNConfigSet = __webpack_require__(29).ATNConfigSet;
var OrderedATNConfigSet = __webpack_require__(29).OrderedATNConfigSet;
var PredictionContext = __webpack_require__(12).PredictionContext;
var SingletonPredictionContext = __webpack_require__(12).SingletonPredictionContext;
var RuleStopState = __webpack_require__(8).RuleStopState;
var LexerATNConfig = __webpack_require__(7).LexerATNConfig;
var Transition = __webpack_require__(11).Transition;
var LexerActionExecutor = __webpack_require__(30).LexerActionExecutor;
var LexerNoViableAltException = __webpack_require__(26).LexerNoViableAltException;
function resetSimState(sim) {
sim.index = -1;
sim.line = 0;
sim.column = -1;
sim.dfaState = null;
}
function SimState() {
resetSimState(this);
return this;
}
SimState.prototype.reset = function() {
resetSimState(this);
};
function LexerATNSimulator(recog, atn, decisionToDFA, sharedContextCache) {
ATNSimulator.call(this, atn, sharedContextCache);
this.decisionToDFA = decisionToDFA;
this.recog = recog;
// The current token's starting index into the character stream.
// Shared across DFA to ATN simulation in case the ATN fails and the
// DFA did not have a previous accept state. In this case, we use the
// ATN-generated exception object.
this.startIndex = -1;
// line number 1..n within the input///
this.line = 1;
// The index of the character relative to the beginning of the line
// 0..n-1///
this.column = 0;
this.mode = Lexer.DEFAULT_MODE;
// Used during DFA/ATN exec to record the most recent accept configuration
// info
this.prevAccept = new SimState();
// done
return this;
}
LexerATNSimulator.prototype = Object.create(ATNSimulator.prototype);
LexerATNSimulator.prototype.constructor = LexerATNSimulator;
LexerATNSimulator.debug = false;
LexerATNSimulator.dfa_debug = false;
LexerATNSimulator.MIN_DFA_EDGE = 0;
LexerATNSimulator.MAX_DFA_EDGE = 127; // forces unicode to stay in ATN
LexerATNSimulator.match_calls = 0;
LexerATNSimulator.prototype.copyState = function(simulator) {
this.column = simulator.column;
this.line = simulator.line;
this.mode = simulator.mode;
this.startIndex = simulator.startIndex;
};
LexerATNSimulator.prototype.match = function(input, mode) {
this.match_calls += 1;
this.mode = mode;
var mark = input.mark();
try {
this.startIndex = input.index;
this.prevAccept.reset();
var dfa = this.decisionToDFA[mode];
if (dfa.s0 === null) {
return this.matchATN(input);
} else {
return this.execATN(input, dfa.s0);
}
} finally {
input.release(mark);
}
};
LexerATNSimulator.prototype.reset = function() {
this.prevAccept.reset();
this.startIndex = -1;
this.line = 1;
this.column = 0;
this.mode = Lexer.DEFAULT_MODE;
};
LexerATNSimulator.prototype.matchATN = function(input) {
var startState = this.atn.modeToStartState[this.mode];
if (LexerATNSimulator.debug) {
console.log("matchATN mode " + this.mode + " start: " + startState);
}
var old_mode = this.mode;
var s0_closure = this.computeStartState(input, startState);
var suppressEdge = s0_closure.hasSemanticContext;
s0_closure.hasSemanticContext = false;
var next = this.addDFAState(s0_closure);
if (!suppressEdge) {
this.decisionToDFA[this.mode].s0 = next;
}
var predict = this.execATN(input, next);
if (LexerATNSimulator.debug) {
console.log("DFA after matchATN: " + this.decisionToDFA[old_mode].toLexerString());
}
return predict;
};
LexerATNSimulator.prototype.execATN = function(input, ds0) {
if (LexerATNSimulator.debug) {
console.log("start state closure=" + ds0.configs);
}
if (ds0.isAcceptState) {
// allow zero-length tokens
this.captureSimState(this.prevAccept, input, ds0);
}
var t = input.LA(1);
var s = ds0; // s is current/from DFA state
while (true) { // while more work
if (LexerATNSimulator.debug) {
console.log("execATN loop starting closure: " + s.configs);
}
// As we move src->trg, src->trg, we keep track of the previous trg to
// avoid looking up the DFA state again, which is expensive.
// If the previous target was already part of the DFA, we might
// be able to avoid doing a reach operation upon t. If s!=null,
// it means that semantic predicates didn't prevent us from
// creating a DFA state. Once we know s!=null, we check to see if
// the DFA state has an edge already for t. If so, we can just reuse
// it's configuration set; there's no point in re-computing it.
// This is kind of like doing DFA simulation within the ATN
// simulation because DFA simulation is really just a way to avoid
// computing reach/closure sets. Technically, once we know that
// we have a previously added DFA state, we could jump over to
// the DFA simulator. But, that would mean popping back and forth
// a lot and making things more complicated algorithmically.
// This optimization makes a lot of sense for loops within DFA.
// A character will take us back to an existing DFA state
// that already has lots of edges out of it. e.g., .* in comments.
// print("Target for:" + str(s) + " and:" + str(t))
var target = this.getExistingTargetState(s, t);
// print("Existing:" + str(target))
if (target === null) {
target = this.computeTargetState(input, s, t);
// print("Computed:" + str(target))
}
if (target === ATNSimulator.ERROR) {
break;
}
// If this is a consumable input element, make sure to consume before
// capturing the accept state so the input index, line, and char
// position accurately reflect the state of the interpreter at the
// end of the token.
if (t !== Token.EOF) {
this.consume(input);
}
if (target.isAcceptState) {
this.captureSimState(this.prevAccept, input, target);
if (t === Token.EOF) {
break;
}
}
t = input.LA(1);
s = target; // flip; current DFA target becomes new src/from state
}
return this.failOrAccept(this.prevAccept, input, s.configs, t);
};
// Get an existing target state for an edge in the DFA. If the target state
// for the edge has not yet been computed or is otherwise not available,
// this method returns {@code null}.
//
// @param s The current DFA state
// @param t The next input symbol
// @return The existing target DFA state for the given input symbol
// {@code t}, or {@code null} if the target state for this edge is not
// already cached
LexerATNSimulator.prototype.getExistingTargetState = function(s, t) {
if (s.edges === null || t < LexerATNSimulator.MIN_DFA_EDGE || t > LexerATNSimulator.MAX_DFA_EDGE) {
return null;
}
var target = s.edges[t - LexerATNSimulator.MIN_DFA_EDGE];
if(target===undefined) {
target = null;
}
if (LexerATNSimulator.debug && target !== null) {
console.log("reuse state " + s.stateNumber + " edge to " + target.stateNumber);
}
return target;
};
// Compute a target state for an edge in the DFA, and attempt to add the
// computed state and corresponding edge to the DFA.
//
// @param input The input stream
// @param s The current DFA state
// @param t The next input symbol
//
// @return The computed target DFA state for the given input symbol
// {@code t}. If {@code t} does not lead to a valid DFA state, this method
// returns {@link //ERROR}.
LexerATNSimulator.prototype.computeTargetState = function(input, s, t) {
var reach = new OrderedATNConfigSet();
// if we don't find an existing DFA state
// Fill reach starting from closure, following t transitions
this.getReachableConfigSet(input, s.configs, reach, t);
if (reach.items.length === 0) { // we got nowhere on t from s
if (!reach.hasSemanticContext) {
// we got nowhere on t, don't throw out this knowledge; it'd
// cause a failover from DFA later.
this.addDFAEdge(s, t, ATNSimulator.ERROR);
}
// stop when we can't match any more char
return ATNSimulator.ERROR;
}
// Add an edge from s to target DFA found/created for reach
return this.addDFAEdge(s, t, null, reach);
};
LexerATNSimulator.prototype.failOrAccept = function(prevAccept, input, reach, t) {
if (this.prevAccept.dfaState !== null) {
var lexerActionExecutor = prevAccept.dfaState.lexerActionExecutor;
this.accept(input, lexerActionExecutor, this.startIndex,
prevAccept.index, prevAccept.line, prevAccept.column);
return prevAccept.dfaState.prediction;
} else {
// if no accept and EOF is first char, return EOF
if (t === Token.EOF && input.index === this.startIndex) {
return Token.EOF;
}
throw new LexerNoViableAltException(this.recog, input, this.startIndex, reach);
}
};
// Given a starting configuration set, figure out all ATN configurations
// we can reach upon input {@code t}. Parameter {@code reach} is a return
// parameter.
LexerATNSimulator.prototype.getReachableConfigSet = function(input, closure,
reach, t) {
// this is used to skip processing for configs which have a lower priority
// than a config that already reached an accept state for the same rule
var skipAlt = ATN.INVALID_ALT_NUMBER;
for (var i = 0; i < closure.items.length; i++) {
var cfg = closure.items[i];
var currentAltReachedAcceptState = (cfg.alt === skipAlt);
if (currentAltReachedAcceptState && cfg.passedThroughNonGreedyDecision) {
continue;
}
if (LexerATNSimulator.debug) {
console.log("testing %s at %s\n", this.getTokenName(t), cfg
.toString(this.recog, true));
}
for (var j = 0; j < cfg.state.transitions.length; j++) {
var trans = cfg.state.transitions[j]; // for each transition
var target = this.getReachableTarget(trans, t);
if (target !== null) {
var lexerActionExecutor = cfg.lexerActionExecutor;
if (lexerActionExecutor !== null) {
lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - this.startIndex);
}
var treatEofAsEpsilon = (t === Token.EOF);
var config = new LexerATNConfig({state:target, lexerActionExecutor:lexerActionExecutor}, cfg);
if (this.closure(input, config, reach,
currentAltReachedAcceptState, true, treatEofAsEpsilon)) {
// any remaining configs for this alt have a lower priority
// than the one that just reached an accept state.
skipAlt = cfg.alt;
}
}
}
}
};
LexerATNSimulator.prototype.accept = function(input, lexerActionExecutor,
startIndex, index, line, charPos) {
if (LexerATNSimulator.debug) {
console.log("ACTION %s\n", lexerActionExecutor);
}
// seek to after last char in token
input.seek(index);
this.line = line;
this.column = charPos;
if (lexerActionExecutor !== null && this.recog !== null) {
lexerActionExecutor.execute(this.recog, input, startIndex);
}
};
LexerATNSimulator.prototype.getReachableTarget = function(trans, t) {
if (trans.matches(t, 0, 0xFFFE)) {
return trans.target;
} else {
return null;
}
};
LexerATNSimulator.prototype.computeStartState = function(input, p) {
var initialContext = PredictionContext.EMPTY;
var configs = new OrderedATNConfigSet();
for (var i = 0; i < p.transitions.length; i++) {
var target = p.transitions[i].target;
var cfg = new LexerATNConfig({state:target, alt:i+1, context:initialContext}, null);
this.closure(input, cfg, configs, false, false, false);
}
return configs;
};
// Since the alternatives within any lexer decision are ordered by
// preference, this method stops pursuing the closure as soon as an accept
// state is reached. After the first accept state is reached by depth-first
// search from {@code config}, all other (potentially reachable) states for
// this rule would have a lower priority.
//
// @return {@code true} if an accept state is reached, otherwise
// {@code false}.
LexerATNSimulator.prototype.closure = function(input, config, configs,
currentAltReachedAcceptState, speculative, treatEofAsEpsilon) {
var cfg = null;
if (LexerATNSimulator.debug) {
console.log("closure(" + config.toString(this.recog, true) + ")");
}
if (config.state instanceof RuleStopState) {
if (LexerATNSimulator.debug) {
if (this.recog !== null) {
console.log("closure at %s rule stop %s\n", this.recog.ruleNames[config.state.ruleIndex], config);
} else {
console.log("closure at rule stop %s\n", config);
}
}
if (config.context === null || config.context.hasEmptyPath()) {
if (config.context === null || config.context.isEmpty()) {
configs.add(config);
return true;
} else {
configs.add(new LexerATNConfig({ state:config.state, context:PredictionContext.EMPTY}, config));
currentAltReachedAcceptState = true;
}
}
if (config.context !== null && !config.context.isEmpty()) {
for (var i = 0; i < config.context.length; i++) {
if (config.context.getReturnState(i) !== PredictionContext.EMPTY_RETURN_STATE) {
var newContext = config.context.getParent(i); // "pop" return state
var returnState = this.atn.states[config.context.getReturnState(i)];
cfg = new LexerATNConfig({ state:returnState, context:newContext }, config);
currentAltReachedAcceptState = this.closure(input, cfg,
configs, currentAltReachedAcceptState, speculative,
treatEofAsEpsilon);
}
}
}
return currentAltReachedAcceptState;
}
// optimization
if (!config.state.epsilonOnlyTransitions) {
if (!currentAltReachedAcceptState || !config.passedThroughNonGreedyDecision) {
configs.add(config);
}
}
for (var j = 0; j < config.state.transitions.length; j++) {
var trans = config.state.transitions[j];
cfg = this.getEpsilonTarget(input, config, trans, configs, speculative, treatEofAsEpsilon);
if (cfg !== null) {
currentAltReachedAcceptState = this.closure(input, cfg, configs,
currentAltReachedAcceptState, speculative, treatEofAsEpsilon);
}
}
return currentAltReachedAcceptState;
};
// side-effect: can alter configs.hasSemanticContext
LexerATNSimulator.prototype.getEpsilonTarget = function(input, config, trans,
configs, speculative, treatEofAsEpsilon) {
var cfg = null;
if (trans.serializationType === Transition.RULE) {
var newContext = SingletonPredictionContext.create(config.context, trans.followState.stateNumber);
cfg = new LexerATNConfig( { state:trans.target, context:newContext}, config);
} else if (trans.serializationType === Transition.PRECEDENCE) {
throw "Precedence predicates are not supported in lexers.";
} else if (trans.serializationType === Transition.PREDICATE) {
// Track traversing semantic predicates. If we traverse,
// we cannot add a DFA state for this "reach" computation
// because the DFA would not test the predicate again in the
// future. Rather than creating collections of semantic predicates
// like v3 and testing them on prediction, v4 will test them on the
// fly all the time using the ATN not the DFA. This is slower but
// semantically it's not used that often. One of the key elements to
// this predicate mechanism is not adding DFA states that see
// predicates immediately afterwards in the ATN. For example,
// a : ID {p1}? | ID {p2}? ;
// should create the start state for rule 'a' (to save start state
// competition), but should not create target of ID state. The
// collection of ATN states the following ID references includes
// states reached by traversing predicates. Since this is when we
// test them, we cannot cash the DFA state target of ID.
if (LexerATNSimulator.debug) {
console.log("EVAL rule " + trans.ruleIndex + ":" + trans.predIndex);
}
configs.hasSemanticContext = true;
if (this.evaluatePredicate(input, trans.ruleIndex, trans.predIndex, speculative)) {
cfg = new LexerATNConfig({ state:trans.target}, config);
}
} else if (trans.serializationType === Transition.ACTION) {
if (config.context === null || config.context.hasEmptyPath()) {
// execute actions anywhere in the start rule for a token.
//
// TODO: if the entry rule is invoked recursively, some
// actions may be executed during the recursive call. The
// problem can appear when hasEmptyPath() is true but
// isEmpty() is false. In this case, the config needs to be
// split into two contexts - one with just the empty path
// and another with everything but the empty path.
// Unfortunately, the current algorithm does not allow
// getEpsilonTarget to return two configurations, so
// additional modifications are needed before we can support
// the split operation.
var lexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor,
this.atn.lexerActions[trans.actionIndex]);
cfg = new LexerATNConfig({ state:trans.target, lexerActionExecutor:lexerActionExecutor }, config);
} else {
// ignore actions in referenced rules
cfg = new LexerATNConfig( { state:trans.target}, config);
}
} else if (trans.serializationType === Transition.EPSILON) {
cfg = new LexerATNConfig({ state:trans.target}, config);
} else if (trans.serializationType === Transition.ATOM ||
trans.serializationType === Transition.RANGE ||
trans.serializationType === Transition.SET) {
if (treatEofAsEpsilon) {
if (trans.matches(Token.EOF, 0, 0xFFFF)) {
cfg = new LexerATNConfig( { state:trans.target }, config);
}
}
}
return cfg;
};
// Evaluate a predicate specified in the lexer.
//
// If {@code speculative} is {@code true}, this method was called before
// {@link //consume} for the matched character. This method should call
// {@link //consume} before evaluating the predicate to ensure position
// sensitive values, including {@link Lexer//getText}, {@link Lexer//getLine},
// and {@link Lexer//getcolumn}, properly reflect the current
// lexer state. This method should restore {@code input} and the simulator
// to the original state before returning (i.e. undo the actions made by the
// call to {@link //consume}.
//
// @param input The input stream.
// @param ruleIndex The rule containing the predicate.
// @param predIndex The index of the predicate within the rule.
// @param speculative {@code true} if the current index in {@code input} is
// one character before the predicate's location.
//
// @return {@code true} if the specified predicate evaluates to
// {@code true}.
// /
LexerATNSimulator.prototype.evaluatePredicate = function(input, ruleIndex,
predIndex, speculative) {
// assume true if no recognizer was provided
if (this.recog === null) {
return true;
}
if (!speculative) {
return this.recog.sempred(null, ruleIndex, predIndex);
}
var savedcolumn = this.column;
var savedLine = this.line;
var index = input.index;
var marker = input.mark();
try {
this.consume(input);
return this.recog.sempred(null, ruleIndex, predIndex);
} finally {
this.column = savedcolumn;
this.line = savedLine;
input.seek(index);
input.release(marker);
}
};
LexerATNSimulator.prototype.captureSimState = function(settings, input, dfaState) {
settings.index = input.index;
settings.line = this.line;
settings.column = this.column;
settings.dfaState = dfaState;
};
LexerATNSimulator.prototype.addDFAEdge = function(from_, tk, to, cfgs) {
if (to === undefined) {
to = null;
}
if (cfgs === undefined) {
cfgs = null;
}
if (to === null && cfgs !== null) {
// leading to this call, ATNConfigSet.hasSemanticContext is used as a
// marker indicating dynamic predicate evaluation makes this edge
// dependent on the specific input sequence, so the static edge in the
// DFA should be omitted. The target DFAState is still created since
// execATN has the ability to resynchronize with the DFA state cache
// following the predicate evaluation step.
//
// TJP notes: next time through the DFA, we see a pred again and eval.
// If that gets us to a previously created (but dangling) DFA
// state, we can continue in pure DFA mode from there.
// /
var suppressEdge = cfgs.hasSemanticContext;
cfgs.hasSemanticContext = false;
to = this.addDFAState(cfgs);
if (suppressEdge) {
return to;
}
}
// add the edge
if (tk < LexerATNSimulator.MIN_DFA_EDGE || tk > LexerATNSimulator.MAX_DFA_EDGE) {
// Only track edges within the DFA bounds
return to;
}
if (LexerATNSimulator.debug) {
console.log("EDGE " + from_ + " -> " + to + " upon " + tk);
}
if (from_.edges === null) {
// make room for tokens 1..n and -1 masquerading as index 0
from_.edges = [];
}
from_.edges[tk - LexerATNSimulator.MIN_DFA_EDGE] = to; // connect
return to;
};
// Add a new DFA state if there isn't one with this set of
// configurations already. This method also detects the first
// configuration containing an ATN rule stop state. Later, when
// traversing the DFA, we will know which rule to accept.
LexerATNSimulator.prototype.addDFAState = function(configs) {
var proposed = new DFAState(null, configs);
var firstConfigWithRuleStopState = null;
for (var i = 0; i < configs.items.length; i++) {
var cfg = configs.items[i];
if (cfg.state instanceof RuleStopState) {
firstConfigWithRuleStopState = cfg;
break;
}
}
if (firstConfigWithRuleStopState !== null) {
proposed.isAcceptState = true;
proposed.lexerActionExecutor = firstConfigWithRuleStopState.lexerActionExecutor;
proposed.prediction = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex];
}
var dfa = this.decisionToDFA[this.mode];
var existing = dfa.states.get(proposed);
if (existing!==null) {
return existing;
}
var newState = proposed;
newState.stateNumber = dfa.states.length;
configs.setReadonly(true);
newState.configs = configs;
dfa.states.add(newState);
return newState;
};
LexerATNSimulator.prototype.getDFA = function(mode) {
return this.decisionToDFA[mode];
};
// Get the text matched so far for the current token.
LexerATNSimulator.prototype.getText = function(input) {
// index is first lookahead char, don't include.
return input.getText(this.startIndex, input.index - 1);
};
LexerATNSimulator.prototype.consume = function(input) {
var curChar = input.LA(1);
if (curChar === "\n".charCodeAt(0)) {
this.line += 1;
this.column = 0;
} else {
this.column += 1;
}
input.consume();
};
LexerATNSimulator.prototype.getTokenName = function(tt) {
if (tt === -1) {
return "EOF";
} else {
return "'" + String.fromCharCode(tt) + "'";
}
};
exports.LexerATNSimulator = LexerATNSimulator;
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// A lexer is recognizer that draws input symbols from a character stream.
// lexer grammars result in a subclass of this object. A Lexer object
// uses simplified match() and error recovery mechanisms in the interest of speed.
var Token = __webpack_require__(6).Token;
var Recognizer = __webpack_require__(23).Recognizer;
var CommonTokenFactory = __webpack_require__(25).CommonTokenFactory;
var RecognitionException = __webpack_require__(26).RecognitionException;
var LexerNoViableAltException = __webpack_require__(26).LexerNoViableAltException;
function TokenSource() {
return this;
}
function Lexer(input) {
Recognizer.call(this);
this._input = input;
this._factory = CommonTokenFactory.DEFAULT;
this._tokenFactorySourcePair = [ this, input ];
this._interp = null; // child classes must populate this
// The goal of all lexer rules/methods is to create a token object.
// this is an instance variable as multiple rules may collaborate to
// create a single token. nextToken will return this object after
// matching lexer rule(s). If you subclass to allow multiple token
// emissions, then set this to the last token to be matched or
// something nonnull so that the auto token emit mechanism will not
// emit another token.
this._token = null;
// What character index in the stream did the current token start at?
// Needed, for example, to get the text for current token. Set at
// the start of nextToken.
this._tokenStartCharIndex = -1;
// The line on which the first character of the token resides///
this._tokenStartLine = -1;
// The character position of first character within the line///
this._tokenStartColumn = -1;
// Once we see EOF on char stream, next token will be EOF.
// If you have DONE : EOF ; then you see DONE EOF.
this._hitEOF = false;
// The channel number for the current token///
this._channel = Token.DEFAULT_CHANNEL;
// The token type for the current token///
this._type = Token.INVALID_TYPE;
this._modeStack = [];
this._mode = Lexer.DEFAULT_MODE;
// You can set the text for the current token to override what is in
// the input char buffer. Use setText() or can set this instance var.
// /
this._text = null;
return this;
}
Lexer.prototype = Object.create(Recognizer.prototype);
Lexer.prototype.constructor = Lexer;
Lexer.DEFAULT_MODE = 0;
Lexer.MORE = -2;
Lexer.SKIP = -3;
Lexer.DEFAULT_TOKEN_CHANNEL = Token.DEFAULT_CHANNEL;
Lexer.HIDDEN = Token.HIDDEN_CHANNEL;
Lexer.MIN_CHAR_VALUE = '\u0000';
Lexer.MAX_CHAR_VALUE = '\uFFFE';
Lexer.prototype.reset = function() {
// wack Lexer state variables
if (this._input !== null) {
this._input.seek(0); // rewind the input
}
this._token = null;
this._type = Token.INVALID_TYPE;
this._channel = Token.DEFAULT_CHANNEL;
this._tokenStartCharIndex = -1;
this._tokenStartColumn = -1;
this._tokenStartLine = -1;
this._text = null;
this._hitEOF = false;
this._mode = Lexer.DEFAULT_MODE;
this._modeStack = [];
this._interp.reset();
};
// Return a token from this source; i.e., match a token on the char stream.
Lexer.prototype.nextToken = function() {
if (this._input === null) {
throw "nextToken requires a non-null input stream.";
}
// Mark start location in char stream so unbuffered streams are
// guaranteed at least have text of current token
var tokenStartMarker = this._input.mark();
try {
while (true) {
if (this._hitEOF) {
this.emitEOF();
return this._token;
}
this._token = null;
this._channel = Token.DEFAULT_CHANNEL;
this._tokenStartCharIndex = this._input.index;
this._tokenStartColumn = this._interp.column;
this._tokenStartLine = this._interp.line;
this._text = null;
var continueOuter = false;
while (true) {
this._type = Token.INVALID_TYPE;
var ttype = Lexer.SKIP;
try {
ttype = this._interp.match(this._input, this._mode);
} catch (e) {
if(e instanceof RecognitionException) {
this.notifyListeners(e); // report error
this.recover(e);
} else {
console.log(e.stack);
throw e;
}
}
if (this._input.LA(1) === Token.EOF) {
this._hitEOF = true;
}
if (this._type === Token.INVALID_TYPE) {
this._type = ttype;
}
if (this._type === Lexer.SKIP) {
continueOuter = true;
break;
}
if (this._type !== Lexer.MORE) {
break;
}
}
if (continueOuter) {
continue;
}
if (this._token === null) {
this.emit();
}
return this._token;
}
} finally {
// make sure we release marker after match or
// unbuffered char stream will keep buffering
this._input.release(tokenStartMarker);
}
};
// Instruct the lexer to skip creating a token for current lexer rule
// and look for another token. nextToken() knows to keep looking when
// a lexer rule finishes with token set to SKIP_TOKEN. Recall that
// if token==null at end of any token rule, it creates one for you
// and emits it.
// /
Lexer.prototype.skip = function() {
this._type = Lexer.SKIP;
};
Lexer.prototype.more = function() {
this._type = Lexer.MORE;
};
Lexer.prototype.mode = function(m) {
this._mode = m;
};
Lexer.prototype.pushMode = function(m) {
if (this._interp.debug) {
console.log("pushMode " + m);
}
this._modeStack.push(this._mode);
this.mode(m);
};
Lexer.prototype.popMode = function() {
if (this._modeStack.length === 0) {
throw "Empty Stack";
}
if (this._interp.debug) {
console.log("popMode back to " + this._modeStack.slice(0, -1));
}
this.mode(this._modeStack.pop());
return this._mode;
};
// Set the char stream and reset the lexer
Object.defineProperty(Lexer.prototype, "inputStream", {
get : function() {
return this._input;
},
set : function(input) {
this._input = null;
this._tokenFactorySourcePair = [ this, this._input ];
this.reset();
this._input = input;
this._tokenFactorySourcePair = [ this, this._input ];
}
});
Object.defineProperty(Lexer.prototype, "sourceName", {
get : function sourceName() {
return this._input.sourceName;
}
});
// By default does not support multiple emits per nextToken invocation
// for efficiency reasons. Subclass and override this method, nextToken,
// and getToken (to push tokens into a list and pull from that list
// rather than a single variable as this implementation does).
// /
Lexer.prototype.emitToken = function(token) {
this._token = token;
};
// The standard method called to automatically emit a token at the
// outermost lexical rule. The token object should point into the
// char buffer start..stop. If there is a text override in 'text',
// use that to set the token's text. Override this method to emit
// custom Token objects or provide a new factory.
// /
Lexer.prototype.emit = function() {
var t = this._factory.create(this._tokenFactorySourcePair, this._type,
this._text, this._channel, this._tokenStartCharIndex, this
.getCharIndex() - 1, this._tokenStartLine,
this._tokenStartColumn);
this.emitToken(t);
return t;
};
Lexer.prototype.emitEOF = function() {
var cpos = this.column;
var lpos = this.line;
var eof = this._factory.create(this._tokenFactorySourcePair, Token.EOF,
null, Token.DEFAULT_CHANNEL, this._input.index,
this._input.index - 1, lpos, cpos);
this.emitToken(eof);
return eof;
};
Object.defineProperty(Lexer.prototype, "type", {
get : function() {
return this.type;
},
set : function(type) {
this._type = type;
}
});
Object.defineProperty(Lexer.prototype, "line", {
get : function() {
return this._interp.line;
},
set : function(line) {
this._interp.line = line;
}
});
Object.defineProperty(Lexer.prototype, "column", {
get : function() {
return this._interp.column;
},
set : function(column) {
this._interp.column = column;
}
});
// What is the index of the current character of lookahead?///
Lexer.prototype.getCharIndex = function() {
return this._input.index;
};
// Return the text matched so far for the current token or any text override.
//Set the complete text of this token; it wipes any previous changes to the text.
Object.defineProperty(Lexer.prototype, "text", {
get : function() {
if (this._text !== null) {
return this._text;
} else {
return this._interp.getText(this._input);
}
},
set : function(text) {
this._text = text;
}
});
// Return a list of all Token objects in input char stream.
// Forces load of all tokens. Does not include EOF token.
// /
Lexer.prototype.getAllTokens = function() {
var tokens = [];
var t = this.nextToken();
while (t.type !== Token.EOF) {
tokens.push(t);
t = this.nextToken();
}
return tokens;
};
Lexer.prototype.notifyListeners = function(e) {
var start = this._tokenStartCharIndex;
var stop = this._input.index;
var text = this._input.getText(start, stop);
var msg = "token recognition error at: '" + this.getErrorDisplay(text) + "'";
var listener = this.getErrorListenerDispatch();
listener.syntaxError(this, null, this._tokenStartLine,
this._tokenStartColumn, msg, e);
};
Lexer.prototype.getErrorDisplay = function(s) {
var d = [];
for (var i = 0; i < s.length; i++) {
d.push(s[i]);
}
return d.join('');
};
Lexer.prototype.getErrorDisplayForChar = function(c) {
if (c.charCodeAt(0) === Token.EOF) {
return "";
} else if (c === '\n') {
return "\\n";
} else if (c === '\t') {
return "\\t";
} else if (c === '\r') {
return "\\r";
} else {
return c;
}
};
Lexer.prototype.getCharErrorDisplay = function(c) {
return "'" + this.getErrorDisplayForChar(c) + "'";
};
// Lexers can normally match any char in it's vocabulary after matching
// a token, so do the easy thing and just kill a character and hope
// it all works out. You can instead use the rule invocation stack
// to do sophisticated error recovery if you are in a fragment rule.
// /
Lexer.prototype.recover = function(re) {
if (this._input.LA(1) !== Token.EOF) {
if (re instanceof LexerNoViableAltException) {
// skip a char and try again
this._interp.consume(this._input);
} else {
// TODO: Do we lose character or line position information?
this._input.consume();
}
}
};
exports.Lexer = Lexer;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
var Token = __webpack_require__(6).Token;
var ConsoleErrorListener = __webpack_require__(24).ConsoleErrorListener;
var ProxyErrorListener = __webpack_require__(24).ProxyErrorListener;
function Recognizer() {
this._listeners = [ ConsoleErrorListener.INSTANCE ];
this._interp = null;
this._stateNumber = -1;
return this;
}
Recognizer.tokenTypeMapCache = {};
Recognizer.ruleIndexMapCache = {};
Recognizer.prototype.checkVersion = function(toolVersion) {
var runtimeVersion = "4.6";
if (runtimeVersion!==toolVersion) {
console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion);
}
};
Recognizer.prototype.addErrorListener = function(listener) {
this._listeners.push(listener);
};
Recognizer.prototype.removeErrorListeners = function() {
this._listeners = [];
};
Recognizer.prototype.getTokenTypeMap = function() {
var tokenNames = this.getTokenNames();
if (tokenNames===null) {
throw("The current recognizer does not provide a list of token names.");
}
var result = this.tokenTypeMapCache[tokenNames];
if(result===undefined) {
result = tokenNames.reduce(function(o, k, i) { o[k] = i; });
result.EOF = Token.EOF;
this.tokenTypeMapCache[tokenNames] = result;
}
return result;
};
// Get a map from rule names to rule indexes.
//
// Used for XPath and tree pattern compilation.
//
Recognizer.prototype.getRuleIndexMap = function() {
var ruleNames = this.ruleNames;
if (ruleNames===null) {
throw("The current recognizer does not provide a list of rule names.");
}
var result = this.ruleIndexMapCache[ruleNames];
if(result===undefined) {
result = ruleNames.reduce(function(o, k, i) { o[k] = i; });
this.ruleIndexMapCache[ruleNames] = result;
}
return result;
};
Recognizer.prototype.getTokenType = function(tokenName) {
var ttype = this.getTokenTypeMap()[tokenName];
if (ttype !==undefined) {
return ttype;
} else {
return Token.INVALID_TYPE;
}
};
// What is the error header, normally line/character position information?//
Recognizer.prototype.getErrorHeader = function(e) {
var line = e.getOffendingToken().line;
var column = e.getOffendingToken().column;
return "line " + line + ":" + column;
};
// How should a token be displayed in an error message? The default
// is to display just the text, but during development you might
// want to have a lot of information spit out. Override in that case
// to use t.toString() (which, for CommonToken, dumps everything about
// the token). This is better than forcing you to override a method in
// your token objects because you don't have to go modify your lexer
// so that it creates a new Java type.
//
// @deprecated This method is not called by the ANTLR 4 Runtime. Specific
// implementations of {@link ANTLRErrorStrategy} may provide a similar
// feature when necessary. For example, see
// {@link DefaultErrorStrategy//getTokenErrorDisplay}.
//
Recognizer.prototype.getTokenErrorDisplay = function(t) {
if (t===null) {
return "";
}
var s = t.text;
if (s===null) {
if (t.type===Token.EOF) {
s = "";
} else {
s = "<" + t.type + ">";
}
}
s = s.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t");
return "'" + s + "'";
};
Recognizer.prototype.getErrorListenerDispatch = function() {
return new ProxyErrorListener(this._listeners);
};
// subclass needs to override these if there are sempreds or actions
// that the ATN interp needs to execute
Recognizer.prototype.sempred = function(localctx, ruleIndex, actionIndex) {
return true;
};
Recognizer.prototype.precpred = function(localctx , precedence) {
return true;
};
//Indicate that the recognizer has changed internal state that is
//consistent with the ATN state passed in. This way we always know
//where we are in the ATN as the parser goes along. The rule
//context objects form a stack that lets us see the stack of
//invoking rules. Combine this and we have complete ATN
//configuration information.
Object.defineProperty(Recognizer.prototype, "state", {
get : function() {
return this._stateNumber;
},
set : function(state) {
this._stateNumber = state;
}
});
exports.Recognizer = Recognizer;
/***/ },
/* 24 */
/***/ function(module, exports) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
// Provides an empty default implementation of {@link ANTLRErrorListener}. The
// default implementation of each method does nothing, but can be overridden as
// necessary.
function ErrorListener() {
return this;
}
ErrorListener.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
};
ErrorListener.prototype.reportAmbiguity = function(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {
};
ErrorListener.prototype.reportAttemptingFullContext = function(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {
};
ErrorListener.prototype.reportContextSensitivity = function(recognizer, dfa, startIndex, stopIndex, prediction, configs) {
};
function ConsoleErrorListener() {
ErrorListener.call(this);
return this;
}
ConsoleErrorListener.prototype = Object.create(ErrorListener.prototype);
ConsoleErrorListener.prototype.constructor = ConsoleErrorListener;
//
// Provides a default instance of {@link ConsoleErrorListener}.
//
ConsoleErrorListener.INSTANCE = new ConsoleErrorListener();
//
// {@inheritDoc}
//
//
// This implementation prints messages to {@link System//err} containing the
// values of {@code line}, {@code charPositionInLine}, and {@code msg} using
// the following format.
//
//
// line line :charPositionInLine msg
//
//
ConsoleErrorListener.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
console.error("line " + line + ":" + column + " " + msg);
};
function ProxyErrorListener(delegates) {
ErrorListener.call(this);
if (delegates===null) {
throw "delegates";
}
this.delegates = delegates;
return this;
}
ProxyErrorListener.prototype = Object.create(ErrorListener.prototype);
ProxyErrorListener.prototype.constructor = ProxyErrorListener;
ProxyErrorListener.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
this.delegates.map(function(d) { d.syntaxError(recognizer, offendingSymbol, line, column, msg, e); });
};
ProxyErrorListener.prototype.reportAmbiguity = function(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {
this.delegates.map(function(d) { d.reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs); });
};
ProxyErrorListener.prototype.reportAttemptingFullContext = function(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {
this.delegates.map(function(d) { d.reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs); });
};
ProxyErrorListener.prototype.reportContextSensitivity = function(recognizer, dfa, startIndex, stopIndex, prediction, configs) {
this.delegates.map(function(d) { d.reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs); });
};
exports.ErrorListener = ErrorListener;
exports.ConsoleErrorListener = ConsoleErrorListener;
exports.ProxyErrorListener = ProxyErrorListener;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
//
// This default implementation of {@link TokenFactory} creates
// {@link CommonToken} objects.
//
var CommonToken = __webpack_require__(6).CommonToken;
function TokenFactory() {
return this;
}
function CommonTokenFactory(copyText) {
TokenFactory.call(this);
// Indicates whether {@link CommonToken//setText} should be called after
// constructing tokens to explicitly set the text. This is useful for cases
// where the input stream might not be able to provide arbitrary substrings
// of text from the input after the lexer creates a token (e.g. the
// implementation of {@link CharStream//getText} in
// {@link UnbufferedCharStream} throws an
// {@link UnsupportedOperationException}). Explicitly setting the token text
// allows {@link Token//getText} to be called at any time regardless of the
// input stream implementation.
//
//
// The default value is {@code false} to avoid the performance and memory
// overhead of copying text for every token unless explicitly requested.
//
this.copyText = copyText===undefined ? false : copyText;
return this;
}
CommonTokenFactory.prototype = Object.create(TokenFactory.prototype);
CommonTokenFactory.prototype.constructor = CommonTokenFactory;
//
// The default {@link CommonTokenFactory} instance.
//
//
// This token factory does not explicitly copy token text when constructing
// tokens.
//
CommonTokenFactory.DEFAULT = new CommonTokenFactory();
CommonTokenFactory.prototype.create = function(source, type, text, channel, start, stop, line, column) {
var t = new CommonToken(source, type, channel, start, stop);
t.line = line;
t.column = column;
if (text !==null) {
t.text = text;
} else if (this.copyText && source[1] !==null) {
t.text = source[1].getText(start,stop);
}
return t;
};
CommonTokenFactory.prototype.createThin = function(type, text) {
var t = new CommonToken(null, type);
t.text = text;
return t;
};
exports.CommonTokenFactory = CommonTokenFactory;
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
// The root of the ANTLR exception hierarchy. In general, ANTLR tracks just
// 3 kinds of errors: prediction errors, failed predicate errors, and
// mismatched input errors. In each case, the parser knows where it is
// in the input, where it is in the ATN, the rule invocation stack,
// and what kind of problem occurred.
var PredicateTransition = __webpack_require__(11).PredicateTransition;
function RecognitionException(params) {
Error.call(this);
if (!!Error.captureStackTrace) {
Error.captureStackTrace(this, RecognitionException);
} else {
var stack = new Error().stack;
}
this.message = params.message;
this.recognizer = params.recognizer;
this.input = params.input;
this.ctx = params.ctx;
// The current {@link Token} when an error occurred. Since not all streams
// support accessing symbols by index, we have to track the {@link Token}
// instance itself.
this.offendingToken = null;
// Get the ATN state number the parser was in at the time the error
// occurred. For {@link NoViableAltException} and
// {@link LexerNoViableAltException} exceptions, this is the
// {@link DecisionState} number. For others, it is the state whose outgoing
// edge we couldn't match.
this.offendingState = -1;
if (this.recognizer!==null) {
this.offendingState = this.recognizer.state;
}
return this;
}
RecognitionException.prototype = Object.create(Error.prototype);
RecognitionException.prototype.constructor = RecognitionException;
// If the state number is not known, this method returns -1.
//
// Gets the set of input symbols which could potentially follow the
// previously matched symbol at the time this exception was thrown.
//
// If the set of expected tokens is not known and could not be computed,
// this method returns {@code null}.
//
// @return The set of token types that could potentially follow the current
// state in the ATN, or {@code null} if the information is not available.
// /
RecognitionException.prototype.getExpectedTokens = function() {
if (this.recognizer!==null) {
return this.recognizer.atn.getExpectedTokens(this.offendingState, this.ctx);
} else {
return null;
}
};
RecognitionException.prototype.toString = function() {
return this.message;
};
function LexerNoViableAltException(lexer, input, startIndex, deadEndConfigs) {
RecognitionException.call(this, {message:"", recognizer:lexer, input:input, ctx:null});
this.startIndex = startIndex;
this.deadEndConfigs = deadEndConfigs;
return this;
}
LexerNoViableAltException.prototype = Object.create(RecognitionException.prototype);
LexerNoViableAltException.prototype.constructor = LexerNoViableAltException;
LexerNoViableAltException.prototype.toString = function() {
var symbol = "";
if (this.startIndex >= 0 && this.startIndex < this.input.size) {
symbol = this.input.getText((this.startIndex,this.startIndex));
}
return "LexerNoViableAltException" + symbol;
};
// Indicates that the parser could not decide which of two or more paths
// to take based upon the remaining input. It tracks the starting token
// of the offending input and also knows where the parser was
// in the various paths when the error. Reported by reportNoViableAlternative()
//
function NoViableAltException(recognizer, input, startToken, offendingToken, deadEndConfigs, ctx) {
ctx = ctx || recognizer._ctx;
offendingToken = offendingToken || recognizer.getCurrentToken();
startToken = startToken || recognizer.getCurrentToken();
input = input || recognizer.getInputStream();
RecognitionException.call(this, {message:"", recognizer:recognizer, input:input, ctx:ctx});
// Which configurations did we try at input.index() that couldn't match
// input.LT(1)?//
this.deadEndConfigs = deadEndConfigs;
// The token object at the start index; the input stream might
// not be buffering tokens so get a reference to it. (At the
// time the error occurred, of course the stream needs to keep a
// buffer all of the tokens but later we might not have access to those.)
this.startToken = startToken;
this.offendingToken = offendingToken;
}
NoViableAltException.prototype = Object.create(RecognitionException.prototype);
NoViableAltException.prototype.constructor = NoViableAltException;
// This signifies any kind of mismatched input exceptions such as
// when the current input does not match the expected token.
//
function InputMismatchException(recognizer) {
RecognitionException.call(this, {message:"", recognizer:recognizer, input:recognizer.getInputStream(), ctx:recognizer._ctx});
this.offendingToken = recognizer.getCurrentToken();
}
InputMismatchException.prototype = Object.create(RecognitionException.prototype);
InputMismatchException.prototype.constructor = InputMismatchException;
// A semantic predicate failed during validation. Validation of predicates
// occurs when normally parsing the alternative just like matching a token.
// Disambiguating predicate evaluation occurs when we test a predicate during
// prediction.
function FailedPredicateException(recognizer, predicate, message) {
RecognitionException.call(this, {message:this.formatMessage(predicate,message || null), recognizer:recognizer,
input:recognizer.getInputStream(), ctx:recognizer._ctx});
var s = recognizer._interp.atn.states[recognizer.state];
var trans = s.transitions[0];
if (trans instanceof PredicateTransition) {
this.ruleIndex = trans.ruleIndex;
this.predicateIndex = trans.predIndex;
} else {
this.ruleIndex = 0;
this.predicateIndex = 0;
}
this.predicate = predicate;
this.offendingToken = recognizer.getCurrentToken();
return this;
}
FailedPredicateException.prototype = Object.create(RecognitionException.prototype);
FailedPredicateException.prototype.constructor = FailedPredicateException;
FailedPredicateException.prototype.formatMessage = function(predicate, message) {
if (message !==null) {
return message;
} else {
return "failed predicate: {" + predicate + "}?";
}
};
function ParseCancellationException() {
Error.call(this);
Error.captureStackTrace(this, ParseCancellationException);
return this;
}
ParseCancellationException.prototype = Object.create(Error.prototype);
ParseCancellationException.prototype.constructor = ParseCancellationException;
exports.RecognitionException = RecognitionException;
exports.NoViableAltException = NoViableAltException;
exports.LexerNoViableAltException = LexerNoViableAltException;
exports.InputMismatchException = InputMismatchException;
exports.FailedPredicateException = FailedPredicateException;
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
var DFAState = __webpack_require__(28).DFAState;
var ATNConfigSet = __webpack_require__(29).ATNConfigSet;
var getCachedPredictionContext = __webpack_require__(12).getCachedPredictionContext;
function ATNSimulator(atn, sharedContextCache) {
// The context cache maps all PredictionContext objects that are ==
// to a single cached copy. This cache is shared across all contexts
// in all ATNConfigs in all DFA states. We rebuild each ATNConfigSet
// to use only cached nodes/graphs in addDFAState(). We don't want to
// fill this during closure() since there are lots of contexts that
// pop up but are not used ever again. It also greatly slows down closure().
//
// This cache makes a huge difference in memory and a little bit in speed.
// For the Java grammar on java.*, it dropped the memory requirements
// at the end from 25M to 16M. We don't store any of the full context
// graphs in the DFA because they are limited to local context only,
// but apparently there's a lot of repetition there as well. We optimize
// the config contexts before storing the config set in the DFA states
// by literally rebuilding them with cached subgraphs only.
//
// I tried a cache for use during closure operations, that was
// whacked after each adaptivePredict(). It cost a little bit
// more time I think and doesn't save on the overall footprint
// so it's not worth the complexity.
///
this.atn = atn;
this.sharedContextCache = sharedContextCache;
return this;
}
// Must distinguish between missing edge and edge we know leads nowhere///
ATNSimulator.ERROR = new DFAState(0x7FFFFFFF, new ATNConfigSet());
ATNSimulator.prototype.getCachedContext = function(context) {
if (this.sharedContextCache ===null) {
return context;
}
var visited = {};
return getCachedPredictionContext(context, this.sharedContextCache, visited);
};
exports.ATNSimulator = ATNSimulator;
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
var ATNConfigSet = __webpack_require__(29).ATNConfigSet;
var Utils = __webpack_require__(5);
var Hash = Utils.Hash;
var Set = Utils.Set;
// Map a predicate to a predicted alternative.///
function PredPrediction(pred, alt) {
this.alt = alt;
this.pred = pred;
return this;
}
PredPrediction.prototype.toString = function() {
return "(" + this.pred + ", " + this.alt + ")";
};
// A DFA state represents a set of possible ATN configurations.
// As Aho, Sethi, Ullman p. 117 says "The DFA uses its state
// to keep track of all possible states the ATN can be in after
// reading each input symbol. That is to say, after reading
// input a1a2..an, the DFA is in a state that represents the
// subset T of the states of the ATN that are reachable from the
// ATN's start state along some path labeled a1a2..an."
// In conventional NFA→DFA conversion, therefore, the subset T
// would be a bitset representing the set of states the
// ATN could be in. We need to track the alt predicted by each
// state as well, however. More importantly, we need to maintain
// a stack of states, tracking the closure operations as they
// jump from rule to rule, emulating rule invocations (method calls).
// I have to add a stack to simulate the proper lookahead sequences for
// the underlying LL grammar from which the ATN was derived.
//
// I use a set of ATNConfig objects not simple states. An ATNConfig
// is both a state (ala normal conversion) and a RuleContext describing
// the chain of rules (if any) followed to arrive at that state.
//
// A DFA state may have multiple references to a particular state,
// but with different ATN contexts (with same or different alts)
// meaning that state was reached via a different set of rule invocations.
// /
function DFAState(stateNumber, configs) {
if (stateNumber === null) {
stateNumber = -1;
}
if (configs === null) {
configs = new ATNConfigSet();
}
this.stateNumber = stateNumber;
this.configs = configs;
// {@code edges[symbol]} points to target of symbol. Shift up by 1 so (-1)
// {@link Token//EOF} maps to {@code edges[0]}.
this.edges = null;
this.isAcceptState = false;
// if accept state, what ttype do we match or alt do we predict?
// This is set to {@link ATN//INVALID_ALT_NUMBER} when {@link
// //predicates}{@code !=null} or
// {@link //requiresFullContext}.
this.prediction = 0;
this.lexerActionExecutor = null;
// Indicates that this state was created during SLL prediction that
// discovered a conflict between the configurations in the state. Future
// {@link ParserATNSimulator//execATN} invocations immediately jumped doing
// full context prediction if this field is true.
this.requiresFullContext = false;
// During SLL parsing, this is a list of predicates associated with the
// ATN configurations of the DFA state. When we have predicates,
// {@link //requiresFullContext} is {@code false} since full context
// prediction evaluates predicates
// on-the-fly. If this is not null, then {@link //prediction} is
// {@link ATN//INVALID_ALT_NUMBER}.
//
// We only use these for non-{@link //requiresFullContext} but
// conflicting states. That
// means we know from the context (it's $ or we don't dip into outer
// context) that it's an ambiguity not a conflict.
//
// This list is computed by {@link
// ParserATNSimulator//predicateDFAState}.
this.predicates = null;
return this;
}
// Get the set of all alts mentioned by all ATN configurations in this
// DFA state.
DFAState.prototype.getAltSet = function() {
var alts = new Set();
if (this.configs !== null) {
for (var i = 0; i < this.configs.length; i++) {
var c = this.configs[i];
alts.add(c.alt);
}
}
if (alts.length === 0) {
return null;
} else {
return alts;
}
};
// Two {@link DFAState} instances are equal if their ATN configuration sets
// are the same. This method is used to see if a state already exists.
//
// Because the number of alternatives and number of ATN configurations are
// finite, there is a finite number of DFA states that can be processed.
// This is necessary to show that the algorithm terminates.
//
// Cannot test the DFA state numbers here because in
// {@link ParserATNSimulator//addDFAState} we need to know if any other state
// exists that has this exact set of ATN configurations. The
// {@link //stateNumber} is irrelevant.
DFAState.prototype.equals = function(other) {
// compare set of ATN configurations in this set with other
return this === other ||
(other instanceof DFAState &&
this.configs.equals(other.configs));
};
DFAState.prototype.toString = function() {
var s = "" + this.stateNumber + ":" + this.configs;
if(this.isAcceptState) {
s = s + "=>";
if (this.predicates !== null)
s = s + this.predicates;
else
s = s + this.prediction;
}
return s;
};
DFAState.prototype.hashCode = function() {
var hash = new Hash();
hash.update(this.configs);
if(this.isAcceptState) {
if (this.predicates !== null)
hash.update(this.predicates);
else
hash.update(this.prediction);
}
return hash.finish();
};
exports.DFAState = DFAState;
exports.PredPrediction = PredPrediction;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
// Specialized {@link Set}{@code <}{@link ATNConfig}{@code >} that can track
// info about the set, with support for combining similar configurations using a
// graph-structured stack.
///
var ATN = __webpack_require__(3).ATN;
var Utils = __webpack_require__(5);
var Hash = Utils.Hash;
var Set = Utils.Set;
var SemanticContext = __webpack_require__(9).SemanticContext;
var merge = __webpack_require__(12).merge;
function hashATNConfig(c) {
return c.hashCodeForConfigSet();
}
function equalATNConfigs(a, b) {
if ( a===b ) {
return true;
} else if ( a===null || b===null ) {
return false;
} else
return a.equalsForConfigSet(b);
}
function ATNConfigSet(fullCtx) {
//
// The reason that we need this is because we don't want the hash map to use
// the standard hash code and equals. We need all configurations with the
// same
// {@code (s,i,_,semctx)} to be equal. Unfortunately, this key effectively
// doubles
// the number of objects associated with ATNConfigs. The other solution is
// to
// use a hash table that lets us specify the equals/hashcode operation.
// All configs but hashed by (s, i, _, pi) not including context. Wiped out
// when we go readonly as this set becomes a DFA state.
this.configLookup = new Set(hashATNConfig, equalATNConfigs);
// Indicates that this configuration set is part of a full context
// LL prediction. It will be used to determine how to merge $. With SLL
// it's a wildcard whereas it is not for LL context merge.
this.fullCtx = fullCtx === undefined ? true : fullCtx;
// Indicates that the set of configurations is read-only. Do not
// allow any code to manipulate the set; DFA states will point at
// the sets and they must not change. This does not protect the other
// fields; in particular, conflictingAlts is set after
// we've made this readonly.
this.readOnly = false;
// Track the elements as they are added to the set; supports get(i)///
this.configs = [];
// TODO: these fields make me pretty uncomfortable but nice to pack up info
// together, saves recomputation
// TODO: can we track conflicts as they are added to save scanning configs
// later?
this.uniqueAlt = 0;
this.conflictingAlts = null;
// Used in parser and lexer. In lexer, it indicates we hit a pred
// while computing a closure operation. Don't make a DFA state from this.
this.hasSemanticContext = false;
this.dipsIntoOuterContext = false;
this.cachedHashCode = -1;
return this;
}
// Adding a new config means merging contexts with existing configs for
// {@code (s, i, pi, _)}, where {@code s} is the
// {@link ATNConfig//state}, {@code i} is the {@link ATNConfig//alt}, and
// {@code pi} is the {@link ATNConfig//semanticContext}. We use
// {@code (s,i,pi)} as key.
//
// This method updates {@link //dipsIntoOuterContext} and
// {@link //hasSemanticContext} when necessary.
// /
ATNConfigSet.prototype.add = function(config, mergeCache) {
if (mergeCache === undefined) {
mergeCache = null;
}
if (this.readOnly) {
throw "This set is readonly";
}
if (config.semanticContext !== SemanticContext.NONE) {
this.hasSemanticContext = true;
}
if (config.reachesIntoOuterContext > 0) {
this.dipsIntoOuterContext = true;
}
var existing = this.configLookup.add(config);
if (existing === config) {
this.cachedHashCode = -1;
this.configs.push(config); // track order here
return true;
}
// a previous (s,i,pi,_), merge with it and save result
var rootIsWildcard = !this.fullCtx;
var merged = merge(existing.context, config.context, rootIsWildcard, mergeCache);
// no need to check for existing.context, config.context in cache
// since only way to create new graphs is "call rule" and here. We
// cache at both places.
existing.reachesIntoOuterContext = Math.max( existing.reachesIntoOuterContext, config.reachesIntoOuterContext);
// make sure to preserve the precedence filter suppression during the merge
if (config.precedenceFilterSuppressed) {
existing.precedenceFilterSuppressed = true;
}
existing.context = merged; // replace context; no need to alt mapping
return true;
};
ATNConfigSet.prototype.getStates = function() {
var states = new Set();
for (var i = 0; i < this.configs.length; i++) {
states.add(this.configs[i].state);
}
return states;
};
ATNConfigSet.prototype.getPredicates = function() {
var preds = [];
for (var i = 0; i < this.configs.length; i++) {
var c = this.configs[i].semanticContext;
if (c !== SemanticContext.NONE) {
preds.push(c.semanticContext);
}
}
return preds;
};
Object.defineProperty(ATNConfigSet.prototype, "items", {
get : function() {
return this.configs;
}
});
ATNConfigSet.prototype.optimizeConfigs = function(interpreter) {
if (this.readOnly) {
throw "This set is readonly";
}
if (this.configLookup.length === 0) {
return;
}
for (var i = 0; i < this.configs.length; i++) {
var config = this.configs[i];
config.context = interpreter.getCachedContext(config.context);
}
};
ATNConfigSet.prototype.addAll = function(coll) {
for (var i = 0; i < coll.length; i++) {
this.add(coll[i]);
}
return false;
};
ATNConfigSet.prototype.equals = function(other) {
return this === other ||
(other instanceof ATNConfigSet &&
Utils.equalArrays(this.configs, other.configs) &&
this.fullCtx === other.fullCtx &&
this.uniqueAlt === other.uniqueAlt &&
this.conflictingAlts === other.conflictingAlts &&
this.hasSemanticContext === other.hasSemanticContext &&
this.dipsIntoOuterContext === other.dipsIntoOuterContext);
};
ATNConfigSet.prototype.hashCode = function() {
var hash = new Hash();
this.updateHashCode(hash);
return hash.finish();
};
ATNConfigSet.prototype.updateHashCode = function(hash) {
if (this.readOnly) {
if (this.cachedHashCode === -1) {
var hash = new Hash();
hash.update(this.configs);
this.cachedHashCode = hash.finish();
}
hash.update(this.cachedHashCode);
} else {
hash.update(this.configs);
}
};
Object.defineProperty(ATNConfigSet.prototype, "length", {
get : function() {
return this.configs.length;
}
});
ATNConfigSet.prototype.isEmpty = function() {
return this.configs.length === 0;
};
ATNConfigSet.prototype.contains = function(item) {
if (this.configLookup === null) {
throw "This method is not implemented for readonly sets.";
}
return this.configLookup.contains(item);
};
ATNConfigSet.prototype.containsFast = function(item) {
if (this.configLookup === null) {
throw "This method is not implemented for readonly sets.";
}
return this.configLookup.containsFast(item);
};
ATNConfigSet.prototype.clear = function() {
if (this.readOnly) {
throw "This set is readonly";
}
this.configs = [];
this.cachedHashCode = -1;
this.configLookup = new Set();
};
ATNConfigSet.prototype.setReadonly = function(readOnly) {
this.readOnly = readOnly;
if (readOnly) {
this.configLookup = null; // can't mod, no need for lookup cache
}
};
ATNConfigSet.prototype.toString = function() {
return Utils.arrayToString(this.configs) +
(this.hasSemanticContext ? ",hasSemanticContext=" + this.hasSemanticContext : "") +
(this.uniqueAlt !== ATN.INVALID_ALT_NUMBER ? ",uniqueAlt=" + this.uniqueAlt : "") +
(this.conflictingAlts !== null ? ",conflictingAlts=" + this.conflictingAlts : "") +
(this.dipsIntoOuterContext ? ",dipsIntoOuterContext" : "");
};
function OrderedATNConfigSet() {
ATNConfigSet.call(this);
this.configLookup = new Set();
return this;
}
OrderedATNConfigSet.prototype = Object.create(ATNConfigSet.prototype);
OrderedATNConfigSet.prototype.constructor = OrderedATNConfigSet;
exports.ATNConfigSet = ATNConfigSet;
exports.OrderedATNConfigSet = OrderedATNConfigSet;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
// Represents an executor for a sequence of lexer actions which traversed during
// the matching operation of a lexer rule (token).
//
// The executor tracks position information for position-dependent lexer actions
// efficiently, ensuring that actions appearing only at the end of the rule do
// not cause bloating of the {@link DFA} created for the lexer.
var hashStuff = __webpack_require__(5).hashStuff;
var LexerIndexedCustomAction = __webpack_require__(20).LexerIndexedCustomAction;
function LexerActionExecutor(lexerActions) {
this.lexerActions = lexerActions === null ? [] : lexerActions;
// Caches the result of {@link //hashCode} since the hash code is an element
// of the performance-critical {@link LexerATNConfig//hashCode} operation.
this.cachedHashCode = hashStuff(lexerActions); // "".join([str(la) for la in
// lexerActions]))
return this;
}
// Creates a {@link LexerActionExecutor} which executes the actions for
// the input {@code lexerActionExecutor} followed by a specified
// {@code lexerAction}.
//
// @param lexerActionExecutor The executor for actions already traversed by
// the lexer while matching a token within a particular
// {@link LexerATNConfig}. If this is {@code null}, the method behaves as
// though it were an empty executor.
// @param lexerAction The lexer action to execute after the actions
// specified in {@code lexerActionExecutor}.
//
// @return A {@link LexerActionExecutor} for executing the combine actions
// of {@code lexerActionExecutor} and {@code lexerAction}.
LexerActionExecutor.append = function(lexerActionExecutor, lexerAction) {
if (lexerActionExecutor === null) {
return new LexerActionExecutor([ lexerAction ]);
}
var lexerActions = lexerActionExecutor.lexerActions.concat([ lexerAction ]);
return new LexerActionExecutor(lexerActions);
};
// Creates a {@link LexerActionExecutor} which encodes the current offset
// for position-dependent lexer actions.
//
// Normally, when the executor encounters lexer actions where
// {@link LexerAction//isPositionDependent} returns {@code true}, it calls
// {@link IntStream//seek} on the input {@link CharStream} to set the input
// position to the end of the current token. This behavior provides
// for efficient DFA representation of lexer actions which appear at the end
// of a lexer rule, even when the lexer rule matches a variable number of
// characters.
//
// Prior to traversing a match transition in the ATN, the current offset
// from the token start index is assigned to all position-dependent lexer
// actions which have not already been assigned a fixed offset. By storing
// the offsets relative to the token start index, the DFA representation of
// lexer actions which appear in the middle of tokens remains efficient due
// to sharing among tokens of the same length, regardless of their absolute
// position in the input stream.
//
// If the current executor already has offsets assigned to all
// position-dependent lexer actions, the method returns {@code this}.
//
// @param offset The current offset to assign to all position-dependent
// lexer actions which do not already have offsets assigned.
//
// @return A {@link LexerActionExecutor} which stores input stream offsets
// for all position-dependent lexer actions.
// /
LexerActionExecutor.prototype.fixOffsetBeforeMatch = function(offset) {
var updatedLexerActions = null;
for (var i = 0; i < this.lexerActions.length; i++) {
if (this.lexerActions[i].isPositionDependent &&
!(this.lexerActions[i] instanceof LexerIndexedCustomAction)) {
if (updatedLexerActions === null) {
updatedLexerActions = this.lexerActions.concat([]);
}
updatedLexerActions[i] = new LexerIndexedCustomAction(offset,
this.lexerActions[i]);
}
}
if (updatedLexerActions === null) {
return this;
} else {
return new LexerActionExecutor(updatedLexerActions);
}
};
// Execute the actions encapsulated by this executor within the context of a
// particular {@link Lexer}.
//
// This method calls {@link IntStream//seek} to set the position of the
// {@code input} {@link CharStream} prior to calling
// {@link LexerAction//execute} on a position-dependent action. Before the
// method returns, the input position will be restored to the same position
// it was in when the method was invoked.
//
// @param lexer The lexer instance.
// @param input The input stream which is the source for the current token.
// When this method is called, the current {@link IntStream//index} for
// {@code input} should be the start of the following token, i.e. 1
// character past the end of the current token.
// @param startIndex The token start index. This value may be passed to
// {@link IntStream//seek} to set the {@code input} position to the beginning
// of the token.
// /
LexerActionExecutor.prototype.execute = function(lexer, input, startIndex) {
var requiresSeek = false;
var stopIndex = input.index;
try {
for (var i = 0; i < this.lexerActions.length; i++) {
var lexerAction = this.lexerActions[i];
if (lexerAction instanceof LexerIndexedCustomAction) {
var offset = lexerAction.offset;
input.seek(startIndex + offset);
lexerAction = lexerAction.action;
requiresSeek = (startIndex + offset) !== stopIndex;
} else if (lexerAction.isPositionDependent) {
input.seek(stopIndex);
requiresSeek = false;
}
lexerAction.execute(lexer);
}
} finally {
if (requiresSeek) {
input.seek(stopIndex);
}
}
};
LexerActionExecutor.prototype.hashCode = function() {
return this.cachedHashCode;
};
LexerActionExecutor.prototype.updateHashCode = function(hash) {
hash.update(this.cachedHashCode);
};
LexerActionExecutor.prototype.equals = function(other) {
if (this === other) {
return true;
} else if (!(other instanceof LexerActionExecutor)) {
return false;
} else if (this.cachedHashCode != other.cachedHashCode) {
return false;
} else if (this.lexerActions.length != other.lexerActions.length) {
return false;
} else {
var numActions = this.lexerActions.length
for (var idx = 0; idx < numActions; ++idx) {
if (!this.lexerActions[idx].equals(other.lexerActions[idx])) {
return false;
}
}
return true;
}
};
exports.LexerActionExecutor = LexerActionExecutor;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
//
// The embodiment of the adaptive LL(*), ALL(*), parsing strategy.
//
//
// The basic complexity of the adaptive strategy makes it harder to understand.
// We begin with ATN simulation to build paths in a DFA. Subsequent prediction
// requests go through the DFA first. If they reach a state without an edge for
// the current symbol, the algorithm fails over to the ATN simulation to
// complete the DFA path for the current input (until it finds a conflict state
// or uniquely predicting state).
//
//
// All of that is done without using the outer context because we want to create
// a DFA that is not dependent upon the rule invocation stack when we do a
// prediction. One DFA works in all contexts. We avoid using context not
// necessarily because it's slower, although it can be, but because of the DFA
// caching problem. The closure routine only considers the rule invocation stack
// created during prediction beginning in the decision rule. For example, if
// prediction occurs without invoking another rule's ATN, there are no context
// stacks in the configurations. When lack of context leads to a conflict, we
// don't know if it's an ambiguity or a weakness in the strong LL(*) parsing
// strategy (versus full LL(*)).
//
//
// When SLL yields a configuration set with conflict, we rewind the input and
// retry the ATN simulation, this time using full outer context without adding
// to the DFA. Configuration context stacks will be the full invocation stacks
// from the start rule. If we get a conflict using full context, then we can
// definitively say we have a true ambiguity for that input sequence. If we
// don't get a conflict, it implies that the decision is sensitive to the outer
// context. (It is not context-sensitive in the sense of context-sensitive
// grammars.)
//
//
// The next time we reach this DFA state with an SLL conflict, through DFA
// simulation, we will again retry the ATN simulation using full context mode.
// This is slow because we can't save the results and have to "interpret" the
// ATN each time we get that input.
//
//
// CACHING FULL CONTEXT PREDICTIONS
//
//
// We could cache results from full context to predicted alternative easily and
// that saves a lot of time but doesn't work in presence of predicates. The set
// of visible predicates from the ATN start state changes depending on the
// context, because closure can fall off the end of a rule. I tried to cache
// tuples (stack context, semantic context, predicted alt) but it was slower
// than interpreting and much more complicated. Also required a huge amount of
// memory. The goal is not to create the world's fastest parser anyway. I'd like
// to keep this algorithm simple. By launching multiple threads, we can improve
// the speed of parsing across a large number of files.
//
//
// There is no strict ordering between the amount of input used by SLL vs LL,
// which makes it really hard to build a cache for full context. Let's say that
// we have input A B C that leads to an SLL conflict with full context X. That
// implies that using X we might only use A B but we could also use A B C D to
// resolve conflict. Input A B C D could predict alternative 1 in one position
// in the input and A B C E could predict alternative 2 in another position in
// input. The conflicting SLL configurations could still be non-unique in the
// full context prediction, which would lead us to requiring more input than the
// original A B C. To make a prediction cache work, we have to track the exact
// input used during the previous prediction. That amounts to a cache that maps
// X to a specific DFA for that context.
//
//
// Something should be done for left-recursive expression predictions. They are
// likely LL(1) + pred eval. Easier to do the whole SLL unless error and retry
// with full LL thing Sam does.
//
//
// AVOIDING FULL CONTEXT PREDICTION
//
//
// We avoid doing full context retry when the outer context is empty, we did not
// dip into the outer context by falling off the end of the decision state rule,
// or when we force SLL mode.
//
//
// As an example of the not dip into outer context case, consider as super
// constructor calls versus function calls. One grammar might look like
// this:
//
//
// ctorBody
// : '{' superCall? stat* '}'
// ;
//
//
//
// Or, you might see something like
//
//
// stat
// : superCall ';'
// | expression ';'
// | ...
// ;
//
//
//
// In both cases I believe that no closure operations will dip into the outer
// context. In the first case ctorBody in the worst case will stop at the '}'.
// In the 2nd case it should stop at the ';'. Both cases should stay within the
// entry rule and not dip into the outer context.
//
//
// PREDICATES
//
//
// Predicates are always evaluated if present in either SLL or LL both. SLL and
// LL simulation deals with predicates differently. SLL collects predicates as
// it performs closure operations like ANTLR v3 did. It delays predicate
// evaluation until it reaches and accept state. This allows us to cache the SLL
// ATN simulation whereas, if we had evaluated predicates on-the-fly during
// closure, the DFA state configuration sets would be different and we couldn't
// build up a suitable DFA.
//
//
// When building a DFA accept state during ATN simulation, we evaluate any
// predicates and return the sole semantically valid alternative. If there is
// more than 1 alternative, we report an ambiguity. If there are 0 alternatives,
// we throw an exception. Alternatives without predicates act like they have
// true predicates. The simple way to think about it is to strip away all
// alternatives with false predicates and choose the minimum alternative that
// remains.
//
//
// When we start in the DFA and reach an accept state that's predicated, we test
// those and return the minimum semantically viable alternative. If no
// alternatives are viable, we throw an exception.
//
//
// During full LL ATN simulation, closure always evaluates predicates and
// on-the-fly. This is crucial to reducing the configuration set size during
// closure. It hits a landmine when parsing with the Java grammar, for example,
// without this on-the-fly evaluation.
//
//
// SHARING DFA
//
//
// All instances of the same parser share the same decision DFAs through a
// static field. Each instance gets its own ATN simulator but they share the
// same {@link //decisionToDFA} field. They also share a
// {@link PredictionContextCache} object that makes sure that all
// {@link PredictionContext} objects are shared among the DFA states. This makes
// a big size difference.
//
//
// THREAD SAFETY
//
//
// The {@link ParserATNSimulator} locks on the {@link //decisionToDFA} field when
// it adds a new DFA object to that array. {@link //addDFAEdge}
// locks on the DFA for the current decision when setting the
// {@link DFAState//edges} field. {@link //addDFAState} locks on
// the DFA for the current decision when looking up a DFA state to see if it
// already exists. We must make sure that all requests to add DFA states that
// are equivalent result in the same shared DFA object. This is because lots of
// threads will be trying to update the DFA at once. The
// {@link //addDFAState} method also locks inside the DFA lock
// but this time on the shared context cache when it rebuilds the
// configurations' {@link PredictionContext} objects using cached
// subgraphs/nodes. No other locking occurs, even during DFA simulation. This is
// safe as long as we can guarantee that all threads referencing
// {@code s.edge[t]} get the same physical target {@link DFAState}, or
// {@code null}. Once into the DFA, the DFA simulation does not reference the
// {@link DFA//states} map. It follows the {@link DFAState//edges} field to new
// targets. The DFA simulator will either find {@link DFAState//edges} to be
// {@code null}, to be non-{@code null} and {@code dfa.edges[t]} null, or
// {@code dfa.edges[t]} to be non-null. The
// {@link //addDFAEdge} method could be racing to set the field
// but in either case the DFA simulator works; if {@code null}, and requests ATN
// simulation. It could also race trying to get {@code dfa.edges[t]}, but either
// way it will work because it's not doing a test and set operation.
//
//
// Starting with SLL then failing to combined SLL/LL (Two-Stage
// Parsing)
//
//
// Sam pointed out that if SLL does not give a syntax error, then there is no
// point in doing full LL, which is slower. We only have to try LL if we get a
// syntax error. For maximum speed, Sam starts the parser set to pure SLL
// mode with the {@link BailErrorStrategy}:
//
//
// parser.{@link Parser//getInterpreter() getInterpreter()}.{@link //setPredictionMode setPredictionMode}{@code (}{@link PredictionMode//SLL}{@code )};
// parser.{@link Parser//setErrorHandler setErrorHandler}(new {@link BailErrorStrategy}());
//
//
//
// If it does not get a syntax error, then we're done. If it does get a syntax
// error, we need to retry with the combined SLL/LL strategy.
//
//
// The reason this works is as follows. If there are no SLL conflicts, then the
// grammar is SLL (at least for that input set). If there is an SLL conflict,
// the full LL analysis must yield a set of viable alternatives which is a
// subset of the alternatives reported by SLL. If the LL set is a singleton,
// then the grammar is LL but not SLL. If the LL set is the same size as the SLL
// set, the decision is SLL. If the LL set has size > 1, then that decision
// is truly ambiguous on the current input. If the LL set is smaller, then the
// SLL conflict resolution might choose an alternative that the full LL would
// rule out as a possibility based upon better context information. If that's
// the case, then the SLL parse will definitely get an error because the full LL
// analysis says it's not viable. If SLL conflict resolution chooses an
// alternative within the LL set, them both SLL and LL would choose the same
// alternative because they both choose the minimum of multiple conflicting
// alternatives.
//
//
// Let's say we have a set of SLL conflicting alternatives {@code {1, 2, 3}} and
// a smaller LL set called s . If s is {@code {2, 3}}, then SLL
// parsing will get an error because SLL will pursue alternative 1. If
// s is {@code {1, 2}} or {@code {1, 3}} then both SLL and LL will
// choose the same alternative because alternative one is the minimum of either
// set. If s is {@code {2}} or {@code {3}} then SLL will get a syntax
// error. If s is {@code {1}} then SLL will succeed.
//
//
// Of course, if the input is invalid, then we will get an error for sure in
// both SLL and LL parsing. Erroneous input will therefore require 2 passes over
// the input.
//
var Utils = __webpack_require__(5);
var Set = Utils.Set;
var BitSet = Utils.BitSet;
var DoubleDict = Utils.DoubleDict;
var ATN = __webpack_require__(3).ATN;
var ATNState = __webpack_require__(8).ATNState;
var ATNConfig = __webpack_require__(7).ATNConfig;
var ATNConfigSet = __webpack_require__(29).ATNConfigSet;
var Token = __webpack_require__(6).Token;
var DFAState = __webpack_require__(28).DFAState;
var PredPrediction = __webpack_require__(28).PredPrediction;
var ATNSimulator = __webpack_require__(27).ATNSimulator;
var PredictionMode = __webpack_require__(32).PredictionMode;
var RuleContext = __webpack_require__(13).RuleContext;
var ParserRuleContext = __webpack_require__(16).ParserRuleContext;
var SemanticContext = __webpack_require__(9).SemanticContext;
var StarLoopEntryState = __webpack_require__(8).StarLoopEntryState;
var RuleStopState = __webpack_require__(8).RuleStopState;
var PredictionContext = __webpack_require__(12).PredictionContext;
var Interval = __webpack_require__(10).Interval;
var Transitions = __webpack_require__(11);
var Transition = Transitions.Transition;
var SetTransition = Transitions.SetTransition;
var NotSetTransition = Transitions.NotSetTransition;
var RuleTransition = Transitions.RuleTransition;
var ActionTransition = Transitions.ActionTransition;
var NoViableAltException = __webpack_require__(26).NoViableAltException;
var SingletonPredictionContext = __webpack_require__(12).SingletonPredictionContext;
var predictionContextFromRuleContext = __webpack_require__(12).predictionContextFromRuleContext;
function ParserATNSimulator(parser, atn, decisionToDFA, sharedContextCache) {
ATNSimulator.call(this, atn, sharedContextCache);
this.parser = parser;
this.decisionToDFA = decisionToDFA;
// SLL, LL, or LL + exact ambig detection?//
this.predictionMode = PredictionMode.LL;
// LAME globals to avoid parameters!!!!! I need these down deep in predTransition
this._input = null;
this._startIndex = 0;
this._outerContext = null;
this._dfa = null;
// Each prediction operation uses a cache for merge of prediction contexts.
// Don't keep around as it wastes huge amounts of memory. DoubleKeyMap
// isn't synchronized but we're ok since two threads shouldn't reuse same
// parser/atnsim object because it can only handle one input at a time.
// This maps graphs a and b to merged result c. (a,b)→c. We can avoid
// the merge if we ever see a and b again. Note that (b,a)→c should
// also be examined during cache lookup.
//
this.mergeCache = null;
return this;
}
ParserATNSimulator.prototype = Object.create(ATNSimulator.prototype);
ParserATNSimulator.prototype.constructor = ParserATNSimulator;
ParserATNSimulator.prototype.debug = false;
ParserATNSimulator.prototype.debug_closure = false;
ParserATNSimulator.prototype.debug_add = false;
ParserATNSimulator.prototype.debug_list_atn_decisions = false;
ParserATNSimulator.prototype.dfa_debug = false;
ParserATNSimulator.prototype.retry_debug = false;
ParserATNSimulator.prototype.reset = function() {
};
ParserATNSimulator.prototype.adaptivePredict = function(input, decision, outerContext) {
if (this.debug || this.debug_list_atn_decisions) {
console.log("adaptivePredict decision " + decision +
" exec LA(1)==" + this.getLookaheadName(input) +
" line " + input.LT(1).line + ":" +
input.LT(1).column);
}
this._input = input;
this._startIndex = input.index;
this._outerContext = outerContext;
var dfa = this.decisionToDFA[decision];
this._dfa = dfa;
var m = input.mark();
var index = input.index;
// Now we are certain to have a specific decision's DFA
// But, do we still need an initial state?
try {
var s0;
if (dfa.precedenceDfa) {
// the start state for a precedence DFA depends on the current
// parser precedence, and is provided by a DFA method.
s0 = dfa.getPrecedenceStartState(this.parser.getPrecedence());
} else {
// the start state for a "regular" DFA is just s0
s0 = dfa.s0;
}
if (s0===null) {
if (outerContext===null) {
outerContext = RuleContext.EMPTY;
}
if (this.debug || this.debug_list_atn_decisions) {
console.log("predictATN decision " + dfa.decision +
" exec LA(1)==" + this.getLookaheadName(input) +
", outerContext=" + outerContext.toString(this.parser.ruleNames));
}
var fullCtx = false;
var s0_closure = this.computeStartState(dfa.atnStartState, RuleContext.EMPTY, fullCtx);
if( dfa.precedenceDfa) {
// If this is a precedence DFA, we use applyPrecedenceFilter
// to convert the computed start state to a precedence start
// state. We then use DFA.setPrecedenceStartState to set the
// appropriate start state for the precedence level rather
// than simply setting DFA.s0.
//
dfa.s0.configs = s0_closure; // not used for prediction but useful to know start configs anyway
s0_closure = this.applyPrecedenceFilter(s0_closure);
s0 = this.addDFAState(dfa, new DFAState(null, s0_closure));
dfa.setPrecedenceStartState(this.parser.getPrecedence(), s0);
} else {
s0 = this.addDFAState(dfa, new DFAState(null, s0_closure));
dfa.s0 = s0;
}
}
var alt = this.execATN(dfa, s0, input, index, outerContext);
if (this.debug) {
console.log("DFA after predictATN: " + dfa.toString(this.parser.literalNames));
}
return alt;
} finally {
this._dfa = null;
this.mergeCache = null; // wack cache after each prediction
input.seek(index);
input.release(m);
}
};
// Performs ATN simulation to compute a predicted alternative based
// upon the remaining input, but also updates the DFA cache to avoid
// having to traverse the ATN again for the same input sequence.
// There are some key conditions we're looking for after computing a new
// set of ATN configs (proposed DFA state):
// if the set is empty, there is no viable alternative for current symbol
// does the state uniquely predict an alternative?
// does the state have a conflict that would prevent us from
// putting it on the work list?
// We also have some key operations to do:
// add an edge from previous DFA state to potentially new DFA state, D,
// upon current symbol but only if adding to work list, which means in all
// cases except no viable alternative (and possibly non-greedy decisions?)
// collecting predicates and adding semantic context to DFA accept states
// adding rule context to context-sensitive DFA accept states
// consuming an input symbol
// reporting a conflict
// reporting an ambiguity
// reporting a context sensitivity
// reporting insufficient predicates
// cover these cases:
// dead end
// single alt
// single alt + preds
// conflict
// conflict + preds
//
ParserATNSimulator.prototype.execATN = function(dfa, s0, input, startIndex, outerContext ) {
if (this.debug || this.debug_list_atn_decisions) {
console.log("execATN decision " + dfa.decision +
" exec LA(1)==" + this.getLookaheadName(input) +
" line " + input.LT(1).line + ":" + input.LT(1).column);
}
var alt;
var previousD = s0;
if (this.debug) {
console.log("s0 = " + s0);
}
var t = input.LA(1);
while(true) { // while more work
var D = this.getExistingTargetState(previousD, t);
if(D===null) {
D = this.computeTargetState(dfa, previousD, t);
}
if(D===ATNSimulator.ERROR) {
// if any configs in previous dipped into outer context, that
// means that input up to t actually finished entry rule
// at least for SLL decision. Full LL doesn't dip into outer
// so don't need special case.
// We will get an error no matter what so delay until after
// decision; better error message. Also, no reachable target
// ATN states in SLL implies LL will also get nowhere.
// If conflict in states that dip out, choose min since we
// will get error no matter what.
var e = this.noViableAlt(input, outerContext, previousD.configs, startIndex);
input.seek(startIndex);
alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousD.configs, outerContext);
if(alt!==ATN.INVALID_ALT_NUMBER) {
return alt;
} else {
throw e;
}
}
if(D.requiresFullContext && this.predictionMode !== PredictionMode.SLL) {
// IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error)
var conflictingAlts = null;
if (D.predicates!==null) {
if (this.debug) {
console.log("DFA state has preds in DFA sim LL failover");
}
var conflictIndex = input.index;
if(conflictIndex !== startIndex) {
input.seek(startIndex);
}
conflictingAlts = this.evalSemanticContext(D.predicates, outerContext, true);
if (conflictingAlts.length===1) {
if(this.debug) {
console.log("Full LL avoided");
}
return conflictingAlts.minValue();
}
if (conflictIndex !== startIndex) {
// restore the index so reporting the fallback to full
// context occurs with the index at the correct spot
input.seek(conflictIndex);
}
}
if (this.dfa_debug) {
console.log("ctx sensitive state " + outerContext +" in " + D);
}
var fullCtx = true;
var s0_closure = this.computeStartState(dfa.atnStartState, outerContext, fullCtx);
this.reportAttemptingFullContext(dfa, conflictingAlts, D.configs, startIndex, input.index);
alt = this.execATNWithFullContext(dfa, D, s0_closure, input, startIndex, outerContext);
return alt;
}
if (D.isAcceptState) {
if (D.predicates===null) {
return D.prediction;
}
var stopIndex = input.index;
input.seek(startIndex);
var alts = this.evalSemanticContext(D.predicates, outerContext, true);
if (alts.length===0) {
throw this.noViableAlt(input, outerContext, D.configs, startIndex);
} else if (alts.length===1) {
return alts.minValue();
} else {
// report ambiguity after predicate evaluation to make sure the correct set of ambig alts is reported.
this.reportAmbiguity(dfa, D, startIndex, stopIndex, false, alts, D.configs);
return alts.minValue();
}
}
previousD = D;
if (t !== Token.EOF) {
input.consume();
t = input.LA(1);
}
}
};
//
// Get an existing target state for an edge in the DFA. If the target state
// for the edge has not yet been computed or is otherwise not available,
// this method returns {@code null}.
//
// @param previousD The current DFA state
// @param t The next input symbol
// @return The existing target DFA state for the given input symbol
// {@code t}, or {@code null} if the target state for this edge is not
// already cached
//
ParserATNSimulator.prototype.getExistingTargetState = function(previousD, t) {
var edges = previousD.edges;
if (edges===null) {
return null;
} else {
return edges[t + 1] || null;
}
};
//
// Compute a target state for an edge in the DFA, and attempt to add the
// computed state and corresponding edge to the DFA.
//
// @param dfa The DFA
// @param previousD The current DFA state
// @param t The next input symbol
//
// @return The computed target DFA state for the given input symbol
// {@code t}. If {@code t} does not lead to a valid DFA state, this method
// returns {@link //ERROR}.
//
ParserATNSimulator.prototype.computeTargetState = function(dfa, previousD, t) {
var reach = this.computeReachSet(previousD.configs, t, false);
if(reach===null) {
this.addDFAEdge(dfa, previousD, t, ATNSimulator.ERROR);
return ATNSimulator.ERROR;
}
// create new target state; we'll add to DFA after it's complete
var D = new DFAState(null, reach);
var predictedAlt = this.getUniqueAlt(reach);
if (this.debug) {
var altSubSets = PredictionMode.getConflictingAltSubsets(reach);
console.log("SLL altSubSets=" + Utils.arrayToString(altSubSets) +
", previous=" + previousD.configs +
", configs=" + reach +
", predict=" + predictedAlt +
", allSubsetsConflict=" +
PredictionMode.allSubsetsConflict(altSubSets) + ", conflictingAlts=" +
this.getConflictingAlts(reach));
}
if (predictedAlt!==ATN.INVALID_ALT_NUMBER) {
// NO CONFLICT, UNIQUELY PREDICTED ALT
D.isAcceptState = true;
D.configs.uniqueAlt = predictedAlt;
D.prediction = predictedAlt;
} else if (PredictionMode.hasSLLConflictTerminatingPrediction(this.predictionMode, reach)) {
// MORE THAN ONE VIABLE ALTERNATIVE
D.configs.conflictingAlts = this.getConflictingAlts(reach);
D.requiresFullContext = true;
// in SLL-only mode, we will stop at this state and return the minimum alt
D.isAcceptState = true;
D.prediction = D.configs.conflictingAlts.minValue();
}
if (D.isAcceptState && D.configs.hasSemanticContext) {
this.predicateDFAState(D, this.atn.getDecisionState(dfa.decision));
if( D.predicates!==null) {
D.prediction = ATN.INVALID_ALT_NUMBER;
}
}
// all adds to dfa are done after we've created full D state
D = this.addDFAEdge(dfa, previousD, t, D);
return D;
};
ParserATNSimulator.prototype.predicateDFAState = function(dfaState, decisionState) {
// We need to test all predicates, even in DFA states that
// uniquely predict alternative.
var nalts = decisionState.transitions.length;
// Update DFA so reach becomes accept state with (predicate,alt)
// pairs if preds found for conflicting alts
var altsToCollectPredsFrom = this.getConflictingAltsOrUniqueAlt(dfaState.configs);
var altToPred = this.getPredsForAmbigAlts(altsToCollectPredsFrom, dfaState.configs, nalts);
if (altToPred!==null) {
dfaState.predicates = this.getPredicatePredictions(altsToCollectPredsFrom, altToPred);
dfaState.prediction = ATN.INVALID_ALT_NUMBER; // make sure we use preds
} else {
// There are preds in configs but they might go away
// when OR'd together like {p}? || NONE == NONE. If neither
// alt has preds, resolve to min alt
dfaState.prediction = altsToCollectPredsFrom.minValue();
}
};
// comes back with reach.uniqueAlt set to a valid alt
ParserATNSimulator.prototype.execATNWithFullContext = function(dfa, D, // how far we got before failing over
s0,
input,
startIndex,
outerContext) {
if (this.debug || this.debug_list_atn_decisions) {
console.log("execATNWithFullContext "+s0);
}
var fullCtx = true;
var foundExactAmbig = false;
var reach = null;
var previous = s0;
input.seek(startIndex);
var t = input.LA(1);
var predictedAlt = -1;
while (true) { // while more work
reach = this.computeReachSet(previous, t, fullCtx);
if (reach===null) {
// if any configs in previous dipped into outer context, that
// means that input up to t actually finished entry rule
// at least for LL decision. Full LL doesn't dip into outer
// so don't need special case.
// We will get an error no matter what so delay until after
// decision; better error message. Also, no reachable target
// ATN states in SLL implies LL will also get nowhere.
// If conflict in states that dip out, choose min since we
// will get error no matter what.
var e = this.noViableAlt(input, outerContext, previous, startIndex);
input.seek(startIndex);
var alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext);
if(alt!==ATN.INVALID_ALT_NUMBER) {
return alt;
} else {
throw e;
}
}
var altSubSets = PredictionMode.getConflictingAltSubsets(reach);
if(this.debug) {
console.log("LL altSubSets=" + altSubSets + ", predict=" +
PredictionMode.getUniqueAlt(altSubSets) + ", resolvesToJustOneViableAlt=" +
PredictionMode.resolvesToJustOneViableAlt(altSubSets));
}
reach.uniqueAlt = this.getUniqueAlt(reach);
// unique prediction?
if(reach.uniqueAlt!==ATN.INVALID_ALT_NUMBER) {
predictedAlt = reach.uniqueAlt;
break;
} else if (this.predictionMode !== PredictionMode.LL_EXACT_AMBIG_DETECTION) {
predictedAlt = PredictionMode.resolvesToJustOneViableAlt(altSubSets);
if(predictedAlt !== ATN.INVALID_ALT_NUMBER) {
break;
}
} else {
// In exact ambiguity mode, we never try to terminate early.
// Just keeps scarfing until we know what the conflict is
if (PredictionMode.allSubsetsConflict(altSubSets) && PredictionMode.allSubsetsEqual(altSubSets)) {
foundExactAmbig = true;
predictedAlt = PredictionMode.getSingleViableAlt(altSubSets);
break;
}
// else there are multiple non-conflicting subsets or
// we're not sure what the ambiguity is yet.
// So, keep going.
}
previous = reach;
if( t !== Token.EOF) {
input.consume();
t = input.LA(1);
}
}
// If the configuration set uniquely predicts an alternative,
// without conflict, then we know that it's a full LL decision
// not SLL.
if (reach.uniqueAlt !== ATN.INVALID_ALT_NUMBER ) {
this.reportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.index);
return predictedAlt;
}
// We do not check predicates here because we have checked them
// on-the-fly when doing full context prediction.
//
// In non-exact ambiguity detection mode, we might actually be able to
// detect an exact ambiguity, but I'm not going to spend the cycles
// needed to check. We only emit ambiguity warnings in exact ambiguity
// mode.
//
// For example, we might know that we have conflicting configurations.
// But, that does not mean that there is no way forward without a
// conflict. It's possible to have nonconflicting alt subsets as in:
// altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}]
// from
//
// [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]),
// (13,2,[5 10 $]), (21,2,[5 10 $]), (11,2,[$])]
//
// In this case, (17,1,[5 $]) indicates there is some next sequence that
// would resolve this without conflict to alternative 1. Any other viable
// next sequence, however, is associated with a conflict. We stop
// looking for input because no amount of further lookahead will alter
// the fact that we should predict alternative 1. We just can't say for
// sure that there is an ambiguity without looking further.
this.reportAmbiguity(dfa, D, startIndex, input.index, foundExactAmbig, null, reach);
return predictedAlt;
};
ParserATNSimulator.prototype.computeReachSet = function(closure, t, fullCtx) {
if (this.debug) {
console.log("in computeReachSet, starting closure: " + closure);
}
if( this.mergeCache===null) {
this.mergeCache = new DoubleDict();
}
var intermediate = new ATNConfigSet(fullCtx);
// Configurations already in a rule stop state indicate reaching the end
// of the decision rule (local context) or end of the start rule (full
// context). Once reached, these configurations are never updated by a
// closure operation, so they are handled separately for the performance
// advantage of having a smaller intermediate set when calling closure.
//
// For full-context reach operations, separate handling is required to
// ensure that the alternative matching the longest overall sequence is
// chosen when multiple such configurations can match the input.
var skippedStopStates = null;
// First figure out where we can reach on input t
for (var i=0; iWhen {@code lookToEndOfRule} is true, this method uses
// {@link ATN//nextTokens} for each configuration in {@code configs} which is
// not already in a rule stop state to see if a rule stop state is reachable
// from the configuration via epsilon-only transitions.
//
// @param configs the configuration set to update
// @param lookToEndOfRule when true, this method checks for rule stop states
// reachable by epsilon-only transitions from each configuration in
// {@code configs}.
//
// @return {@code configs} if all configurations in {@code configs} are in a
// rule stop state, otherwise return a new configuration set containing only
// the configurations from {@code configs} which are in a rule stop state
//
ParserATNSimulator.prototype.removeAllConfigsNotInRuleStopState = function(configs, lookToEndOfRule) {
if (PredictionMode.allConfigsInRuleStopStates(configs)) {
return configs;
}
var result = new ATNConfigSet(configs.fullCtx);
for(var i=0; i
// Evaluate the precedence predicates for each configuration using
// {@link SemanticContext//evalPrecedence}.
// Remove all configurations which predict an alternative greater than
// 1, for which another configuration that predicts alternative 1 is in the
// same ATN state with the same prediction context. This transformation is
// valid for the following reasons:
//
// The closure block cannot contain any epsilon transitions which bypass
// the body of the closure, so all states reachable via alternative 1 are
// part of the precedence alternatives of the transformed left-recursive
// rule.
// The "primary" portion of a left recursive rule cannot contain an
// epsilon transition, so the only way an alternative other than 1 can exist
// in a state that is also reachable via alternative 1 is by nesting calls
// to the left-recursive rule, with the outer calls not being at the
// preferred precedence level.
//
//
//
//
//
// The prediction context must be considered by this filter to address
// situations like the following.
//
//
//
// grammar TA;
// prog: statement* EOF;
// statement: letterA | statement letterA 'b' ;
// letterA: 'a';
//
//
//
// If the above grammar, the ATN state immediately before the token
// reference {@code 'a'} in {@code letterA} is reachable from the left edge
// of both the primary and closure blocks of the left-recursive rule
// {@code statement}. The prediction context associated with each of these
// configurations distinguishes between them, and prevents the alternative
// which stepped out to {@code prog} (and then back in to {@code statement}
// from being eliminated by the filter.
//
//
// @param configs The configuration set computed by
// {@link //computeStartState} as the start state for the DFA.
// @return The transformed configuration set representing the start state
// for a precedence DFA at a particular precedence level (determined by
// calling {@link Parser//getPrecedence}).
//
ParserATNSimulator.prototype.applyPrecedenceFilter = function(configs) {
var config;
var statesFromAlt1 = [];
var configSet = new ATNConfigSet(configs.fullCtx);
for(var i=0; i1
// (basically a graph subtraction algorithm).
if (!config.precedenceFilterSuppressed) {
var context = statesFromAlt1[config.state.stateNumber] || null;
if (context!==null && context.equals(config.context)) {
// eliminated
continue;
}
}
configSet.add(config, this.mergeCache);
}
return configSet;
};
ParserATNSimulator.prototype.getReachableTarget = function(trans, ttype) {
if (trans.matches(ttype, 0, this.atn.maxTokenType)) {
return trans.target;
} else {
return null;
}
};
ParserATNSimulator.prototype.getPredsForAmbigAlts = function(ambigAlts, configs, nalts) {
// REACH=[1|1|[]|0:0, 1|2|[]|0:1]
// altToPred starts as an array of all null contexts. The entry at index i
// corresponds to alternative i. altToPred[i] may have one of three values:
// 1. null: no ATNConfig c is found such that c.alt==i
// 2. SemanticContext.NONE: At least one ATNConfig c exists such that
// c.alt==i and c.semanticContext==SemanticContext.NONE. In other words,
// alt i has at least one unpredicated config.
// 3. Non-NONE Semantic Context: There exists at least one, and for all
// ATNConfig c such that c.alt==i, c.semanticContext!=SemanticContext.NONE.
//
// From this, it is clear that NONE||anything==NONE.
//
var altToPred = [];
for(var i=0;i
// The default implementation of this method uses the following
// algorithm to identify an ATN configuration which successfully parsed the
// decision entry rule. Choosing such an alternative ensures that the
// {@link ParserRuleContext} returned by the calling rule will be complete
// and valid, and the syntax error will be reported later at a more
// localized location.
//
//
// If a syntactically valid path or paths reach the end of the decision rule and
// they are semantically valid if predicated, return the min associated alt.
// Else, if a semantically invalid but syntactically valid path exist
// or paths exist, return the minimum associated alt.
//
// Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
//
//
//
// In some scenarios, the algorithm described above could predict an
// alternative which will result in a {@link FailedPredicateException} in
// the parser. Specifically, this could occur if the only configuration
// capable of successfully parsing to the end of the decision rule is
// blocked by a semantic predicate. By choosing this alternative within
// {@link //adaptivePredict} instead of throwing a
// {@link NoViableAltException}, the resulting
// {@link FailedPredicateException} in the parser will identify the specific
// predicate which is preventing the parser from successfully parsing the
// decision rule, which helps developers identify and correct logic errors
// in semantic predicates.
//
//
// @param configs The ATN configurations which were valid immediately before
// the {@link //ERROR} state was reached
// @param outerContext The is the \gamma_0 initial parser context from the paper
// or the parser stack at the instant before prediction commences.
//
// @return The value to return from {@link //adaptivePredict}, or
// {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not
// identified and {@link //adaptivePredict} should report an error instead.
//
ParserATNSimulator.prototype.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule = function(configs, outerContext) {
var cfgs = this.splitAccordingToSemanticValidity(configs, outerContext);
var semValidConfigs = cfgs[0];
var semInvalidConfigs = cfgs[1];
var alt = this.getAltThatFinishedDecisionEntryRule(semValidConfigs);
if (alt!==ATN.INVALID_ALT_NUMBER) { // semantically/syntactically viable path exists
return alt;
}
// Is there a syntactically valid path with a failed pred?
if (semInvalidConfigs.items.length>0) {
alt = this.getAltThatFinishedDecisionEntryRule(semInvalidConfigs);
if (alt!==ATN.INVALID_ALT_NUMBER) { // syntactically viable path exists
return alt;
}
}
return ATN.INVALID_ALT_NUMBER;
};
ParserATNSimulator.prototype.getAltThatFinishedDecisionEntryRule = function(configs) {
var alts = [];
for(var i=0;i0 || ((c.state instanceof RuleStopState) && c.context.hasEmptyPath())) {
if(alts.indexOf(c.alt)<0) {
alts.push(c.alt);
}
}
}
if (alts.length===0) {
return ATN.INVALID_ALT_NUMBER;
} else {
return Math.min.apply(null, alts);
}
};
// Walk the list of configurations and split them according to
// those that have preds evaluating to true/false. If no pred, assume
// true pred and include in succeeded set. Returns Pair of sets.
//
// Create a new set so as not to alter the incoming parameter.
//
// Assumption: the input stream has been restored to the starting point
// prediction, which is where predicates need to evaluate.
//
ParserATNSimulator.prototype.splitAccordingToSemanticValidity = function( configs, outerContext) {
var succeeded = new ATNConfigSet(configs.fullCtx);
var failed = new ATNConfigSet(configs.fullCtx);
for(var i=0;i50) {
throw "problem";
}
}
if (config.state instanceof RuleStopState) {
// We hit rule end. If we have context info, use it
// run thru all possible stack tops in ctx
if (! config.context.isEmpty()) {
for ( var i =0; i 0.
if (closureBusy.add(c)!==c) {
// avoid infinite recursion for right-recursive rules
continue;
}
if (this._dfa !== null && this._dfa.precedenceDfa) {
if (t.outermostPrecedenceReturn === this._dfa.atnStartState.ruleIndex) {
c.precedenceFilterSuppressed = true;
}
}
c.reachesIntoOuterContext += 1;
configs.dipsIntoOuterContext = true; // TODO: can remove? only care when we add to set per middle of this method
newDepth -= 1;
if (this.debug) {
console.log("dips into outer ctx: " + c);
}
} else if (t instanceof RuleTransition) {
// latch when newDepth goes negative - once we step out of the entry context we can't return
if (newDepth >= 0) {
newDepth += 1;
}
}
this.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEofAsEpsilon);
}
}
};
ParserATNSimulator.prototype.canDropLoopEntryEdgeInLeftRecursiveRule = function(config) {
// return False
var p = config.state;
// First check to see if we are in StarLoopEntryState generated during
// left-recursion elimination. For efficiency, also check if
// the context has an empty stack case. If so, it would mean
// global FOLLOW so we can't perform optimization
// Are we the special loop entry/exit state? or SLL wildcard
if(p.stateType != ATNState.STAR_LOOP_ENTRY)
return false;
if(p.stateType != ATNState.STAR_LOOP_ENTRY || !p.isPrecedenceDecision ||
config.context.isEmpty() || config.context.hasEmptyPath())
return false;
// Require all return states to return back to the same rule that p is in.
var numCtxs = config.context.length;
for(var i=0; i=0) {
return this.parser.ruleNames[index];
} else {
return "";
}
};
ParserATNSimulator.prototype.getEpsilonTarget = function(config, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon) {
switch(t.serializationType) {
case Transition.RULE:
return this.ruleTransition(config, t);
case Transition.PRECEDENCE:
return this.precedenceTransition(config, t, collectPredicates, inContext, fullCtx);
case Transition.PREDICATE:
return this.predTransition(config, t, collectPredicates, inContext, fullCtx);
case Transition.ACTION:
return this.actionTransition(config, t);
case Transition.EPSILON:
return new ATNConfig({state:t.target}, config);
case Transition.ATOM:
case Transition.RANGE:
case Transition.SET:
// EOF transitions act like epsilon transitions after the first EOF
// transition is traversed
if (treatEofAsEpsilon) {
if (t.matches(Token.EOF, 0, 1)) {
return new ATNConfig({state: t.target}, config);
}
}
return null;
default:
return null;
}
};
ParserATNSimulator.prototype.actionTransition = function(config, t) {
if (this.debug) {
var index = t.actionIndex==-1 ? 65535 : t.actionIndex;
console.log("ACTION edge " + t.ruleIndex + ":" + index);
}
return new ATNConfig({state:t.target}, config);
};
ParserATNSimulator.prototype.precedenceTransition = function(config, pt, collectPredicates, inContext, fullCtx) {
if (this.debug) {
console.log("PRED (collectPredicates=" + collectPredicates + ") " +
pt.precedence + ">=_p, ctx dependent=true");
if (this.parser!==null) {
console.log("context surrounding pred is " + Utils.arrayToString(this.parser.getRuleInvocationStack()));
}
}
var c = null;
if (collectPredicates && inContext) {
if (fullCtx) {
// In full context mode, we can evaluate predicates on-the-fly
// during closure, which dramatically reduces the size of
// the config sets. It also obviates the need to test predicates
// later during conflict resolution.
var currentPosition = this._input.index;
this._input.seek(this._startIndex);
var predSucceeds = pt.getPredicate().evaluate(this.parser, this._outerContext);
this._input.seek(currentPosition);
if (predSucceeds) {
c = new ATNConfig({state:pt.target}, config); // no pred context
}
} else {
newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate());
c = new ATNConfig({state:pt.target, semanticContext:newSemCtx}, config);
}
} else {
c = new ATNConfig({state:pt.target}, config);
}
if (this.debug) {
console.log("config from pred transition=" + c);
}
return c;
};
ParserATNSimulator.prototype.predTransition = function(config, pt, collectPredicates, inContext, fullCtx) {
if (this.debug) {
console.log("PRED (collectPredicates=" + collectPredicates + ") " + pt.ruleIndex +
":" + pt.predIndex + ", ctx dependent=" + pt.isCtxDependent);
if (this.parser!==null) {
console.log("context surrounding pred is " + Utils.arrayToString(this.parser.getRuleInvocationStack()));
}
}
var c = null;
if (collectPredicates && ((pt.isCtxDependent && inContext) || ! pt.isCtxDependent)) {
if (fullCtx) {
// In full context mode, we can evaluate predicates on-the-fly
// during closure, which dramatically reduces the size of
// the config sets. It also obviates the need to test predicates
// later during conflict resolution.
var currentPosition = this._input.index;
this._input.seek(this._startIndex);
var predSucceeds = pt.getPredicate().evaluate(this.parser, this._outerContext);
this._input.seek(currentPosition);
if (predSucceeds) {
c = new ATNConfig({state:pt.target}, config); // no pred context
}
} else {
var newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate());
c = new ATNConfig({state:pt.target, semanticContext:newSemCtx}, config);
}
} else {
c = new ATNConfig({state:pt.target}, config);
}
if (this.debug) {
console.log("config from pred transition=" + c);
}
return c;
};
ParserATNSimulator.prototype.ruleTransition = function(config, t) {
if (this.debug) {
console.log("CALL rule " + this.getRuleName(t.target.ruleIndex) + ", ctx=" + config.context);
}
var returnState = t.followState;
var newContext = SingletonPredictionContext.create(config.context, returnState.stateNumber);
return new ATNConfig({state:t.target, context:newContext}, config );
};
ParserATNSimulator.prototype.getConflictingAlts = function(configs) {
var altsets = PredictionMode.getConflictingAltSubsets(configs);
return PredictionMode.getAlts(altsets);
};
// Sam pointed out a problem with the previous definition, v3, of
// ambiguous states. If we have another state associated with conflicting
// alternatives, we should keep going. For example, the following grammar
//
// s : (ID | ID ID?) ';' ;
//
// When the ATN simulation reaches the state before ';', it has a DFA
// state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally
// 12|1|[] and 12|2|[] conflict, but we cannot stop processing this node
// because alternative to has another way to continue, via [6|2|[]].
// The key is that we have a single state that has config's only associated
// with a single alternative, 2, and crucially the state transitions
// among the configurations are all non-epsilon transitions. That means
// we don't consider any conflicts that include alternative 2. So, we
// ignore the conflict between alts 1 and 2. We ignore a set of
// conflicting alts when there is an intersection with an alternative
// associated with a single alt state in the state→config-list map.
//
// It's also the case that we might have two conflicting configurations but
// also a 3rd nonconflicting configuration for a different alternative:
// [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar:
//
// a : A | A | A B ;
//
// After matching input A, we reach the stop state for rule A, state 1.
// State 8 is the state right before B. Clearly alternatives 1 and 2
// conflict and no amount of further lookahead will separate the two.
// However, alternative 3 will be able to continue and so we do not
// stop working on this state. In the previous example, we're concerned
// with states associated with the conflicting alternatives. Here alt
// 3 is not associated with the conflicting configs, but since we can continue
// looking for input reasonably, I don't declare the state done. We
// ignore a set of conflicting alts when we have an alternative
// that we still need to pursue.
//
ParserATNSimulator.prototype.getConflictingAltsOrUniqueAlt = function(configs) {
var conflictingAlts = null;
if (configs.uniqueAlt!== ATN.INVALID_ALT_NUMBER) {
conflictingAlts = new BitSet();
conflictingAlts.add(configs.uniqueAlt);
} else {
conflictingAlts = configs.conflictingAlts;
}
return conflictingAlts;
};
ParserATNSimulator.prototype.getTokenName = function( t) {
if (t===Token.EOF) {
return "EOF";
}
if( this.parser!==null && this.parser.literalNames!==null) {
if (t >= this.parser.literalNames.length && t >= this.parser.symbolicNames.length) {
console.log("" + t + " ttype out of range: " + this.parser.literalNames);
console.log("" + this.parser.getInputStream().getTokens());
} else {
var name = this.parser.literalNames[t] || this.parser.symbolicNames[t];
return name + "<" + t + ">";
}
}
return "" + t;
};
ParserATNSimulator.prototype.getLookaheadName = function(input) {
return this.getTokenName(input.LA(1));
};
// Used for debugging in adaptivePredict around execATN but I cut
// it out for clarity now that alg. works well. We can leave this
// "dead" code for a bit.
//
ParserATNSimulator.prototype.dumpDeadEndConfigs = function(nvae) {
console.log("dead end configs: ");
var decs = nvae.getDeadEndConfigs();
for(var i=0; i0) {
var t = c.state.transitions[0];
if (t instanceof AtomTransition) {
trans = "Atom "+ this.getTokenName(t.label);
} else if (t instanceof SetTransition) {
var neg = (t instanceof NotSetTransition);
trans = (neg ? "~" : "") + "Set " + t.set;
}
}
console.error(c.toString(this.parser, true) + ":" + trans);
}
};
ParserATNSimulator.prototype.noViableAlt = function(input, outerContext, configs, startIndex) {
return new NoViableAltException(this.parser, input, input.get(startIndex), input.LT(1), configs, outerContext);
};
ParserATNSimulator.prototype.getUniqueAlt = function(configs) {
var alt = ATN.INVALID_ALT_NUMBER;
for(var i=0;iIf {@code to} is {@code null}, this method returns {@code null}.
// Otherwise, this method returns the {@link DFAState} returned by calling
// {@link //addDFAState} for the {@code to} state.
//
// @param dfa The DFA
// @param from The source state for the edge
// @param t The input symbol
// @param to The target state for the edge
//
// @return If {@code to} is {@code null}, this method returns {@code null};
// otherwise this method returns the result of calling {@link //addDFAState}
// on {@code to}
//
ParserATNSimulator.prototype.addDFAEdge = function(dfa, from_, t, to) {
if( this.debug) {
console.log("EDGE " + from_ + " -> " + to + " upon " + this.getTokenName(t));
}
if (to===null) {
return null;
}
to = this.addDFAState(dfa, to); // used existing if possible not incoming
if (from_===null || t < -1 || t > this.atn.maxTokenType) {
return to;
}
if (from_.edges===null) {
from_.edges = [];
}
from_.edges[t+1] = to; // connect
if (this.debug) {
var literalNames = this.parser===null ? null : this.parser.literalNames;
var symbolicNames = this.parser===null ? null : this.parser.symbolicNames;
console.log("DFA=\n" + dfa.toString(literalNames, symbolicNames));
}
return to;
};
//
// Add state {@code D} to the DFA if it is not already present, and return
// the actual instance stored in the DFA. If a state equivalent to {@code D}
// is already in the DFA, the existing state is returned. Otherwise this
// method returns {@code D} after adding it to the DFA.
//
// If {@code D} is {@link //ERROR}, this method returns {@link //ERROR} and
// does not change the DFA.
//
// @param dfa The dfa
// @param D The DFA state to add
// @return The state stored in the DFA. This will be either the existing
// state if {@code D} is already in the DFA, or {@code D} itself if the
// state was not already present.
//
ParserATNSimulator.prototype.addDFAState = function(dfa, D) {
if (D == ATNSimulator.ERROR) {
return D;
}
var existing = dfa.states.get(D);
if(existing!==null) {
return existing;
}
D.stateNumber = dfa.states.length;
if (! D.configs.readOnly) {
D.configs.optimizeConfigs(this);
D.configs.setReadonly(true);
}
dfa.states.add(D);
if (this.debug) {
console.log("adding new DFA state: " + D);
}
return D;
};
ParserATNSimulator.prototype.reportAttemptingFullContext = function(dfa, conflictingAlts, configs, startIndex, stopIndex) {
if (this.debug || this.retry_debug) {
var interval = new Interval(startIndex, stopIndex + 1);
console.log("reportAttemptingFullContext decision=" + dfa.decision + ":" + configs +
", input=" + this.parser.getTokenStream().getText(interval));
}
if (this.parser!==null) {
this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser, dfa, startIndex, stopIndex, conflictingAlts, configs);
}
};
ParserATNSimulator.prototype.reportContextSensitivity = function(dfa, prediction, configs, startIndex, stopIndex) {
if (this.debug || this.retry_debug) {
var interval = new Interval(startIndex, stopIndex + 1);
console.log("reportContextSensitivity decision=" + dfa.decision + ":" + configs +
", input=" + this.parser.getTokenStream().getText(interval));
}
if (this.parser!==null) {
this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser, dfa, startIndex, stopIndex, prediction, configs);
}
};
// If context sensitive parsing, we know it's ambiguity not conflict//
ParserATNSimulator.prototype.reportAmbiguity = function(dfa, D, startIndex, stopIndex,
exact, ambigAlts, configs ) {
if (this.debug || this.retry_debug) {
var interval = new Interval(startIndex, stopIndex + 1);
console.log("reportAmbiguity " + ambigAlts + ":" + configs +
", input=" + this.parser.getTokenStream().getText(interval));
}
if (this.parser!==null) {
this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs);
}
};
exports.ParserATNSimulator = ParserATNSimulator;
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
//
// This enumeration defines the prediction modes available in ANTLR 4 along with
// utility methods for analyzing configuration sets for conflicts and/or
// ambiguities.
var Set = __webpack_require__(5).Set;
var Map = __webpack_require__(5).Map;
var BitSet = __webpack_require__(5).BitSet;
var AltDict = __webpack_require__(5).AltDict;
var ATN = __webpack_require__(3).ATN;
var RuleStopState = __webpack_require__(8).RuleStopState;
var ATNConfigSet = __webpack_require__(29).ATNConfigSet;
var ATNConfig = __webpack_require__(7).ATNConfig;
var SemanticContext = __webpack_require__(9).SemanticContext;
var Hash = __webpack_require__(5).Hash;
var hashStuff = __webpack_require__(5).hashStuff;
var equalArrays = __webpack_require__(5).equalArrays;
function PredictionMode() {
return this;
}
//
// The SLL(*) prediction mode. This prediction mode ignores the current
// parser context when making predictions. This is the fastest prediction
// mode, and provides correct results for many grammars. This prediction
// mode is more powerful than the prediction mode provided by ANTLR 3, but
// may result in syntax errors for grammar and input combinations which are
// not SLL.
//
//
// When using this prediction mode, the parser will either return a correct
// parse tree (i.e. the same parse tree that would be returned with the
// {@link //LL} prediction mode), or it will report a syntax error. If a
// syntax error is encountered when using the {@link //SLL} prediction mode,
// it may be due to either an actual syntax error in the input or indicate
// that the particular combination of grammar and input requires the more
// powerful {@link //LL} prediction abilities to complete successfully.
//
//
// This prediction mode does not provide any guarantees for prediction
// behavior for syntactically-incorrect inputs.
//
PredictionMode.SLL = 0;
//
// The LL(*) prediction mode. This prediction mode allows the current parser
// context to be used for resolving SLL conflicts that occur during
// prediction. This is the fastest prediction mode that guarantees correct
// parse results for all combinations of grammars with syntactically correct
// inputs.
//
//
// When using this prediction mode, the parser will make correct decisions
// for all syntactically-correct grammar and input combinations. However, in
// cases where the grammar is truly ambiguous this prediction mode might not
// report a precise answer for exactly which alternatives are
// ambiguous.
//
//
// This prediction mode does not provide any guarantees for prediction
// behavior for syntactically-incorrect inputs.
//
PredictionMode.LL = 1;
//
// The LL(*) prediction mode with exact ambiguity detection. In addition to
// the correctness guarantees provided by the {@link //LL} prediction mode,
// this prediction mode instructs the prediction algorithm to determine the
// complete and exact set of ambiguous alternatives for every ambiguous
// decision encountered while parsing.
//
//
// This prediction mode may be used for diagnosing ambiguities during
// grammar development. Due to the performance overhead of calculating sets
// of ambiguous alternatives, this prediction mode should be avoided when
// the exact results are not necessary.
//
//
// This prediction mode does not provide any guarantees for prediction
// behavior for syntactically-incorrect inputs.
//
PredictionMode.LL_EXACT_AMBIG_DETECTION = 2;
//
// Computes the SLL prediction termination condition.
//
//
// This method computes the SLL prediction termination condition for both of
// the following cases.
//
//
// The usual SLL+LL fallback upon SLL conflict
// Pure SLL without LL fallback
//
//
// COMBINED SLL+LL PARSING
//
// When LL-fallback is enabled upon SLL conflict, correct predictions are
// ensured regardless of how the termination condition is computed by this
// method. Due to the substantially higher cost of LL prediction, the
// prediction should only fall back to LL when the additional lookahead
// cannot lead to a unique SLL prediction.
//
// Assuming combined SLL+LL parsing, an SLL configuration set with only
// conflicting subsets should fall back to full LL, even if the
// configuration sets don't resolve to the same alternative (e.g.
// {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting
// configuration, SLL could continue with the hopes that more lookahead will
// resolve via one of those non-conflicting configurations.
//
// Here's the prediction termination rule them: SLL (for SLL+LL parsing)
// stops when it sees only conflicting configuration subsets. In contrast,
// full LL keeps going when there is uncertainty.
//
// HEURISTIC
//
// As a heuristic, we stop prediction when we see any conflicting subset
// unless we see a state that only has one alternative associated with it.
// The single-alt-state thing lets prediction continue upon rules like
// (otherwise, it would admit defeat too soon):
//
// {@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}
//
// When the ATN simulation reaches the state before {@code ';'}, it has a
// DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally
// {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop
// processing this node because alternative to has another way to continue,
// via {@code [6|2|[]]}.
//
// It also let's us continue for this rule:
//
// {@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ;}
//
// After matching input A, we reach the stop state for rule A, state 1.
// State 8 is the state right before B. Clearly alternatives 1 and 2
// conflict and no amount of further lookahead will separate the two.
// However, alternative 3 will be able to continue and so we do not stop
// working on this state. In the previous example, we're concerned with
// states associated with the conflicting alternatives. Here alt 3 is not
// associated with the conflicting configs, but since we can continue
// looking for input reasonably, don't declare the state done.
//
// PURE SLL PARSING
//
// To handle pure SLL parsing, all we have to do is make sure that we
// combine stack contexts for configurations that differ only by semantic
// predicate. From there, we can do the usual SLL termination heuristic.
//
// PREDICATES IN SLL+LL PARSING
//
// SLL decisions don't evaluate predicates until after they reach DFA stop
// states because they need to create the DFA cache that works in all
// semantic situations. In contrast, full LL evaluates predicates collected
// during start state computation so it can ignore predicates thereafter.
// This means that SLL termination detection can totally ignore semantic
// predicates.
//
// Implementation-wise, {@link ATNConfigSet} combines stack contexts but not
// semantic predicate contexts so we might see two configurations like the
// following.
//
// {@code (s, 1, x, {}), (s, 1, x', {p})}
//
// Before testing these configurations against others, we have to merge
// {@code x} and {@code x'} (without modifying the existing configurations).
// For example, we test {@code (x+x')==x''} when looking for conflicts in
// the following configurations.
//
// {@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}
//
// If the configuration set has predicates (as indicated by
// {@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of
// the configurations to strip out all of the predicates so that a standard
// {@link ATNConfigSet} will merge everything ignoring predicates.
//
PredictionMode.hasSLLConflictTerminatingPrediction = function( mode, configs) {
// Configs in rule stop states indicate reaching the end of the decision
// rule (local context) or end of start rule (full context). If all
// configs meet this condition, then none of the configurations is able
// to match additional input so we terminate prediction.
//
if (PredictionMode.allConfigsInRuleStopStates(configs)) {
return true;
}
// pure SLL mode parsing
if (mode === PredictionMode.SLL) {
// Don't bother with combining configs from different semantic
// contexts if we can fail over to full LL; costs more time
// since we'll often fail over anyway.
if (configs.hasSemanticContext) {
// dup configs, tossing out semantic predicates
var dup = new ATNConfigSet();
for(var i=0;iCan we stop looking ahead during ATN simulation or is there some
// uncertainty as to which alternative we will ultimately pick, after
// consuming more input? Even if there are partial conflicts, we might know
// that everything is going to resolve to the same minimum alternative. That
// means we can stop since no more lookahead will change that fact. On the
// other hand, there might be multiple conflicts that resolve to different
// minimums. That means we need more look ahead to decide which of those
// alternatives we should predict.
//
// The basic idea is to split the set of configurations {@code C}, into
// conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with
// non-conflicting configurations. Two configurations conflict if they have
// identical {@link ATNConfig//state} and {@link ATNConfig//context} values
// but different {@link ATNConfig//alt} value, e.g. {@code (s, i, ctx, _)}
// and {@code (s, j, ctx, _)} for {@code i!=j}.
//
// Reduce these configuration subsets to the set of possible alternatives.
// You can compute the alternative subsets in one pass as follows:
//
// {@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in
// {@code C} holding {@code s} and {@code ctx} fixed.
//
// Or in pseudo-code, for each configuration {@code c} in {@code C}:
//
//
// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
// alt and not pred
//
//
// The values in {@code map} are the set of {@code A_s,ctx} sets.
//
// If {@code |A_s,ctx|=1} then there is no conflict associated with
// {@code s} and {@code ctx}.
//
// Reduce the subsets to singletons by choosing a minimum of each subset. If
// the union of these alternative subsets is a singleton, then no amount of
// more lookahead will help us. We will always pick that alternative. If,
// however, there is more than one alternative, then we are uncertain which
// alternative to predict and must continue looking for resolution. We may
// or may not discover an ambiguity in the future, even if there are no
// conflicting subsets this round.
//
// The biggest sin is to terminate early because it means we've made a
// decision but were uncertain as to the eventual outcome. We haven't used
// enough lookahead. On the other hand, announcing a conflict too late is no
// big deal; you will still have the conflict. It's just inefficient. It
// might even look until the end of file.
//
// No special consideration for semantic predicates is required because
// predicates are evaluated on-the-fly for full LL prediction, ensuring that
// no configuration contains a semantic context during the termination
// check.
//
// CONFLICTING CONFIGS
//
// Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict
// when {@code i!=j} but {@code x=x'}. Because we merge all
// {@code (s, i, _)} configurations together, that means that there are at
// most {@code n} configurations associated with state {@code s} for
// {@code n} possible alternatives in the decision. The merged stacks
// complicate the comparison of configuration contexts {@code x} and
// {@code x'}. Sam checks to see if one is a subset of the other by calling
// merge and checking to see if the merged result is either {@code x} or
// {@code x'}. If the {@code x} associated with lowest alternative {@code i}
// is the superset, then {@code i} is the only possible prediction since the
// others resolve to {@code min(i)} as well. However, if {@code x} is
// associated with {@code j>i} then at least one stack configuration for
// {@code j} is not in conflict with alternative {@code i}. The algorithm
// should keep going, looking for more lookahead due to the uncertainty.
//
// For simplicity, I'm doing a equality check between {@code x} and
// {@code x'} that lets the algorithm continue to consume lookahead longer
// than necessary. The reason I like the equality is of course the
// simplicity but also because that is the test you need to detect the
// alternatives that are actually in conflict.
//
// CONTINUE/STOP RULE
//
// Continue if union of resolved alternative sets from non-conflicting and
// conflicting alternative subsets has more than one alternative. We are
// uncertain about which alternative to predict.
//
// The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which
// alternatives are still in the running for the amount of input we've
// consumed at this point. The conflicting sets let us to strip away
// configurations that won't lead to more states because we resolve
// conflicts to the configuration with a minimum alternate for the
// conflicting set.
//
// CASES
//
//
//
// no conflicts and more than 1 alternative in set => continue
//
// {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s, 3, z)},
// {@code (s', 1, y)}, {@code (s', 2, y)} yields non-conflicting set
// {@code {3}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} =
// {@code {1,3}} => continue
//
//
// {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)},
// {@code (s', 2, y)}, {@code (s'', 1, z)} yields non-conflicting set
// {@code {1}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} =
// {@code {1}} => stop and predict 1
//
// {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)},
// {@code (s', 2, y)} yields conflicting, reduced sets {@code {1}} U
// {@code {1}} = {@code {1}} => stop and predict 1, can announce
// ambiguity {@code {1,2}}
//
// {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 2, y)},
// {@code (s', 3, y)} yields conflicting, reduced sets {@code {1}} U
// {@code {2}} = {@code {1,2}} => continue
//
// {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 3, y)},
// {@code (s', 4, y)} yields conflicting, reduced sets {@code {1}} U
// {@code {3}} = {@code {1,3}} => continue
//
//
//
// EXACT AMBIGUITY DETECTION
//
// If all states report the same conflicting set of alternatives, then we
// know we have the exact ambiguity set.
//
// |A_i |>1 and
// A_i = A_j for all i , j .
//
// In other words, we continue examining lookahead until all {@code A_i}
// have more than one alternative and all {@code A_i} are the same. If
// {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate
// because the resolved set is {@code {1}}. To determine what the real
// ambiguity is, we have to know whether the ambiguity is between one and
// two or one and three so we keep going. We can only stop prediction when
// we need exact ambiguity detection when the sets look like
// {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...
//
PredictionMode.resolvesToJustOneViableAlt = function(altsets) {
return PredictionMode.getSingleViableAlt(altsets);
};
//
// Determines if every alternative subset in {@code altsets} contains more
// than one alternative.
//
// @param altsets a collection of alternative subsets
// @return {@code true} if every {@link BitSet} in {@code altsets} has
// {@link BitSet//cardinality cardinality} > 1, otherwise {@code false}
//
PredictionMode.allSubsetsConflict = function(altsets) {
return ! PredictionMode.hasNonConflictingAltSet(altsets);
};
//
// Determines if any single alternative subset in {@code altsets} contains
// exactly one alternative.
//
// @param altsets a collection of alternative subsets
// @return {@code true} if {@code altsets} contains a {@link BitSet} with
// {@link BitSet//cardinality cardinality} 1, otherwise {@code false}
//
PredictionMode.hasNonConflictingAltSet = function(altsets) {
for(var i=0;i1) {
return true;
}
}
return false;
};
//
// Determines if every alternative subset in {@code altsets} is equivalent.
//
// @param altsets a collection of alternative subsets
// @return {@code true} if every member of {@code altsets} is equal to the
// others, otherwise {@code false}
//
PredictionMode.allSubsetsEqual = function(altsets) {
var first = null;
for(var i=0;i
// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
// alt and not pred
//
PredictionMode.getConflictingAltSubsets = function(configs) {
var configToAlts = new Map();
configToAlts.hashFunction = function(cfg) { hashStuff(cfg.state.stateNumber, cfg.context); };
configToAlts.equalsFunction = function(c1, c2) { return c1.state.stateNumber==c2.state.stateNumber && c1.context.equals(c2.context);}
configs.items.map(function(cfg) {
var alts = configToAlts.get(cfg);
if (alts === null) {
alts = new BitSet();
configToAlts.put(cfg, alts);
}
alts.add(cfg.alt);
});
return configToAlts.getValues();
};
//
// Get a map from state to alt subset from a configuration set. For each
// configuration {@code c} in {@code configs}:
//
//
// map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}
//
//
PredictionMode.getStateToAltMap = function(configs) {
var m = new AltDict();
configs.items.map(function(c) {
var alts = m.get(c.state);
if (alts === null) {
alts = new BitSet();
m.put(c.state, alts);
}
alts.add(c.alt);
});
return m;
};
PredictionMode.hasStateAssociatedWithOneAlt = function(configs) {
var values = PredictionMode.getStateToAltMap(configs).values();
for(var i=0;i
= this.s0.edges.length) {
return null;
}
return this.s0.edges[precedence] || null;
};
// Set the start state for a specific precedence value.
//
// @param precedence The current precedence.
// @param startState The start state corresponding to the specified
// precedence.
//
// @throws IllegalStateException if this is not a precedence DFA.
// @see //isPrecedenceDfa()
//
DFA.prototype.setPrecedenceStartState = function(precedence, startState) {
if (!(this.precedenceDfa)) {
throw ("Only precedence DFAs may contain a precedence start state.");
}
if (precedence < 0) {
return;
}
// synchronization on s0 here is ok. when the DFA is turned into a
// precedence DFA, s0 will be initialized once and not updated again
// s0.edges is never null for a precedence DFA
this.s0.edges[precedence] = startState;
};
//
// Sets whether this is a precedence DFA. If the specified value differs
// from the current DFA configuration, the following actions are taken;
// otherwise no changes are made to the current DFA.
//
//
// The {@link //states} map is cleared
// If {@code precedenceDfa} is {@code false}, the initial state
// {@link //s0} is set to {@code null}; otherwise, it is initialized to a new
// {@link DFAState} with an empty outgoing {@link DFAState//edges} array to
// store the start states for individual precedence values.
// The {@link //precedenceDfa} field is updated
//
//
// @param precedenceDfa {@code true} if this is a precedence DFA; otherwise,
// {@code false}
DFA.prototype.setPrecedenceDfa = function(precedenceDfa) {
if (this.precedenceDfa!==precedenceDfa) {
this._states = new DFAStatesSet();
if (precedenceDfa) {
var precedenceState = new DFAState(null, new ATNConfigSet());
precedenceState.edges = [];
precedenceState.isAcceptState = false;
precedenceState.requiresFullContext = false;
this.s0 = precedenceState;
} else {
this.s0 = null;
}
this.precedenceDfa = precedenceDfa;
}
};
Object.defineProperty(DFA.prototype, "states", {
get : function() {
return this._states;
}
});
// Return a list of all states in this DFA, ordered by state number.
DFA.prototype.sortedStates = function() {
var list = this._states.values();
return list.sort(function(a, b) {
return a.stateNumber - b.stateNumber;
});
};
DFA.prototype.toString = function(literalNames, symbolicNames) {
literalNames = literalNames || null;
symbolicNames = symbolicNames || null;
if (this.s0 === null) {
return "";
}
var serializer = new DFASerializer(this, literalNames, symbolicNames);
return serializer.toString();
};
DFA.prototype.toLexerString = function() {
if (this.s0 === null) {
return "";
}
var serializer = new LexerDFASerializer(this);
return serializer.toString();
};
exports.DFA = DFA;
/***/ },
/* 35 */
/***/ function(module, exports) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
// A DFA walker that knows how to dump them to serialized strings.#/
function DFASerializer(dfa, literalNames, symbolicNames) {
this.dfa = dfa;
this.literalNames = literalNames || [];
this.symbolicNames = symbolicNames || [];
return this;
}
DFASerializer.prototype.toString = function() {
if(this.dfa.s0 === null) {
return null;
}
var buf = "";
var states = this.dfa.sortedStates();
for(var i=0;i");
buf = buf.concat(this.getStateString(t));
buf = buf.concat('\n');
}
}
}
}
return buf.length===0 ? null : buf;
};
DFASerializer.prototype.getEdgeLabel = function(i) {
if (i===0) {
return "EOF";
} else if(this.literalNames !==null || this.symbolicNames!==null) {
return this.literalNames[i-1] || this.symbolicNames[i-1];
} else {
return String.fromCharCode(i-1);
}
};
DFASerializer.prototype.getStateString = function(s) {
var baseStateStr = ( s.isAcceptState ? ":" : "") + "s" + s.stateNumber + ( s.requiresFullContext ? "^" : "");
if(s.isAcceptState) {
if (s.predicates !== null) {
return baseStateStr + "=>" + s.predicates.toString();
} else {
return baseStateStr + "=>" + s.prediction.toString();
}
} else {
return baseStateStr;
}
};
function LexerDFASerializer(dfa) {
DFASerializer.call(this, dfa, null);
return this;
}
LexerDFASerializer.prototype = Object.create(DFASerializer.prototype);
LexerDFASerializer.prototype.constructor = LexerDFASerializer;
LexerDFASerializer.prototype.getEdgeLabel = function(i) {
return "'" + String.fromCharCode(i) + "'";
};
exports.DFASerializer = DFASerializer;
exports.LexerDFASerializer = LexerDFASerializer;
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
var Tree = __webpack_require__(14);
exports.Trees = __webpack_require__(15).Trees;
exports.RuleNode = Tree.RuleNode;
exports.ParseTreeListener = Tree.ParseTreeListener;
exports.ParseTreeVisitor = Tree.ParseTreeVisitor;
exports.ParseTreeWalker = Tree.ParseTreeWalker;
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
exports.RecognitionException = __webpack_require__(26).RecognitionException;
exports.NoViableAltException = __webpack_require__(26).NoViableAltException;
exports.LexerNoViableAltException = __webpack_require__(26).LexerNoViableAltException;
exports.InputMismatchException = __webpack_require__(26).InputMismatchException;
exports.FailedPredicateException = __webpack_require__(26).FailedPredicateException;
exports.DiagnosticErrorListener = __webpack_require__(38).DiagnosticErrorListener;
exports.BailErrorStrategy = __webpack_require__(39).BailErrorStrategy;
exports.ErrorListener = __webpack_require__(24).ErrorListener;
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
//
// This implementation of {@link ANTLRErrorListener} can be used to identify
// certain potential correctness and performance problems in grammars. "Reports"
// are made by calling {@link Parser//notifyErrorListeners} with the appropriate
// message.
//
//
// Ambiguities : These are cases where more than one path through the
// grammar can match the input.
// Weak context sensitivity : These are cases where full-context
// prediction resolved an SLL conflict to a unique alternative which equaled the
// minimum alternative of the SLL conflict.
// Strong (forced) context sensitivity : These are cases where the
// full-context prediction resolved an SLL conflict to a unique alternative,
// and the minimum alternative of the SLL conflict was found to not be
// a truly viable alternative. Two-stage parsing cannot be used for inputs where
// this situation occurs.
//
var BitSet = __webpack_require__(5).BitSet;
var ErrorListener = __webpack_require__(24).ErrorListener;
var Interval = __webpack_require__(10).Interval;
function DiagnosticErrorListener(exactOnly) {
ErrorListener.call(this);
exactOnly = exactOnly || true;
// whether all ambiguities or only exact ambiguities are reported.
this.exactOnly = exactOnly;
return this;
}
DiagnosticErrorListener.prototype = Object.create(ErrorListener.prototype);
DiagnosticErrorListener.prototype.constructor = DiagnosticErrorListener;
DiagnosticErrorListener.prototype.reportAmbiguity = function(recognizer, dfa,
startIndex, stopIndex, exact, ambigAlts, configs) {
if (this.exactOnly && !exact) {
return;
}
var msg = "reportAmbiguity d=" +
this.getDecisionDescription(recognizer, dfa) +
": ambigAlts=" +
this.getConflictingAlts(ambigAlts, configs) +
", input='" +
recognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + "'";
recognizer.notifyErrorListeners(msg);
};
DiagnosticErrorListener.prototype.reportAttemptingFullContext = function(
recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {
var msg = "reportAttemptingFullContext d=" +
this.getDecisionDescription(recognizer, dfa) +
", input='" +
recognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + "'";
recognizer.notifyErrorListeners(msg);
};
DiagnosticErrorListener.prototype.reportContextSensitivity = function(
recognizer, dfa, startIndex, stopIndex, prediction, configs) {
var msg = "reportContextSensitivity d=" +
this.getDecisionDescription(recognizer, dfa) +
", input='" +
recognizer.getTokenStream().getText(new Interval(startIndex, stopIndex)) + "'";
recognizer.notifyErrorListeners(msg);
};
DiagnosticErrorListener.prototype.getDecisionDescription = function(recognizer, dfa) {
var decision = dfa.decision;
var ruleIndex = dfa.atnStartState.ruleIndex;
var ruleNames = recognizer.ruleNames;
if (ruleIndex < 0 || ruleIndex >= ruleNames.length) {
return "" + decision;
}
var ruleName = ruleNames[ruleIndex] || null;
if (ruleName === null || ruleName.length === 0) {
return "" + decision;
}
return "" + decision + " (" + ruleName + ")";
};
//
// Computes the set of conflicting or ambiguous alternatives from a
// configuration set, if that information was not already provided by the
// parser.
//
// @param reportedAlts The set of conflicting or ambiguous alternatives, as
// reported by the parser.
// @param configs The conflicting or ambiguous configuration set.
// @return Returns {@code reportedAlts} if it is not {@code null}, otherwise
// returns the set of alternatives represented in {@code configs}.
//
DiagnosticErrorListener.prototype.getConflictingAlts = function(reportedAlts, configs) {
if (reportedAlts !== null) {
return reportedAlts;
}
var result = new BitSet();
for (var i = 0; i < configs.items.length; i++) {
result.add(configs.items[i].alt);
}
return "{" + result.values().join(", ") + "}";
};
exports.DiagnosticErrorListener = DiagnosticErrorListener;
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
var Token = __webpack_require__(6).Token;
var Errors = __webpack_require__(26);
var NoViableAltException = Errors.NoViableAltException;
var InputMismatchException = Errors.InputMismatchException;
var FailedPredicateException = Errors.FailedPredicateException;
var ParseCancellationException = Errors.ParseCancellationException;
var ATNState = __webpack_require__(8).ATNState;
var Interval = __webpack_require__(10).Interval;
var IntervalSet = __webpack_require__(10).IntervalSet;
function ErrorStrategy() {
}
ErrorStrategy.prototype.reset = function(recognizer){
};
ErrorStrategy.prototype.recoverInline = function(recognizer){
};
ErrorStrategy.prototype.recover = function(recognizer, e){
};
ErrorStrategy.prototype.sync = function(recognizer){
};
ErrorStrategy.prototype.inErrorRecoveryMode = function(recognizer){
};
ErrorStrategy.prototype.reportError = function(recognizer){
};
// This is the default implementation of {@link ANTLRErrorStrategy} used for
// error reporting and recovery in ANTLR parsers.
//
function DefaultErrorStrategy() {
ErrorStrategy.call(this);
// Indicates whether the error strategy is currently "recovering from an
// error". This is used to suppress reporting multiple error messages while
// attempting to recover from a detected syntax error.
//
// @see //inErrorRecoveryMode
//
this.errorRecoveryMode = false;
// The index into the input stream where the last error occurred.
// This is used to prevent infinite loops where an error is found
// but no token is consumed during recovery...another error is found,
// ad nauseum. This is a failsafe mechanism to guarantee that at least
// one token/tree node is consumed for two errors.
//
this.lastErrorIndex = -1;
this.lastErrorStates = null;
return this;
}
DefaultErrorStrategy.prototype = Object.create(ErrorStrategy.prototype);
DefaultErrorStrategy.prototype.constructor = DefaultErrorStrategy;
// The default implementation simply calls {@link //endErrorCondition} to
// ensure that the handler is not in error recovery mode.
DefaultErrorStrategy.prototype.reset = function(recognizer) {
this.endErrorCondition(recognizer);
};
//
// This method is called to enter error recovery mode when a recognition
// exception is reported.
//
// @param recognizer the parser instance
//
DefaultErrorStrategy.prototype.beginErrorCondition = function(recognizer) {
this.errorRecoveryMode = true;
};
DefaultErrorStrategy.prototype.inErrorRecoveryMode = function(recognizer) {
return this.errorRecoveryMode;
};
//
// This method is called to leave error recovery mode after recovering from
// a recognition exception.
//
// @param recognizer
//
DefaultErrorStrategy.prototype.endErrorCondition = function(recognizer) {
this.errorRecoveryMode = false;
this.lastErrorStates = null;
this.lastErrorIndex = -1;
};
//
// {@inheritDoc}
//
// The default implementation simply calls {@link //endErrorCondition}.
//
DefaultErrorStrategy.prototype.reportMatch = function(recognizer) {
this.endErrorCondition(recognizer);
};
//
// {@inheritDoc}
//
// The default implementation returns immediately if the handler is already
// in error recovery mode. Otherwise, it calls {@link //beginErrorCondition}
// and dispatches the reporting task based on the runtime type of {@code e}
// according to the following table.
//
//
// {@link NoViableAltException}: Dispatches the call to
// {@link //reportNoViableAlternative}
// {@link InputMismatchException}: Dispatches the call to
// {@link //reportInputMismatch}
// {@link FailedPredicateException}: Dispatches the call to
// {@link //reportFailedPredicate}
// All other types: calls {@link Parser//notifyErrorListeners} to report
// the exception
//
//
DefaultErrorStrategy.prototype.reportError = function(recognizer, e) {
// if we've already reported an error and have not matched a token
// yet successfully, don't report any errors.
if(this.inErrorRecoveryMode(recognizer)) {
return; // don't report spurious errors
}
this.beginErrorCondition(recognizer);
if ( e instanceof NoViableAltException ) {
this.reportNoViableAlternative(recognizer, e);
} else if ( e instanceof InputMismatchException ) {
this.reportInputMismatch(recognizer, e);
} else if ( e instanceof FailedPredicateException ) {
this.reportFailedPredicate(recognizer, e);
} else {
console.log("unknown recognition error type: " + e.constructor.name);
console.log(e.stack);
recognizer.notifyErrorListeners(e.getOffendingToken(), e.getMessage(), e);
}
};
//
// {@inheritDoc}
//
// The default implementation resynchronizes the parser by consuming tokens
// until we find one in the resynchronization set--loosely the set of tokens
// that can follow the current rule.
//
DefaultErrorStrategy.prototype.recover = function(recognizer, e) {
if (this.lastErrorIndex===recognizer.getInputStream().index &&
this.lastErrorStates !== null && this.lastErrorStates.indexOf(recognizer.state)>=0) {
// uh oh, another error at same token index and previously-visited
// state in ATN; must be a case where LT(1) is in the recovery
// token set so nothing got consumed. Consume a single token
// at least to prevent an infinite loop; this is a failsafe.
recognizer.consume();
}
this.lastErrorIndex = recognizer._input.index;
if (this.lastErrorStates === null) {
this.lastErrorStates = [];
}
this.lastErrorStates.push(recognizer.state);
var followSet = this.getErrorRecoverySet(recognizer);
this.consumeUntil(recognizer, followSet);
};
// The default implementation of {@link ANTLRErrorStrategy//sync} makes sure
// that the current lookahead symbol is consistent with what were expecting
// at this point in the ATN. You can call this anytime but ANTLR only
// generates code to check before subrules/loops and each iteration.
//
// Implements Jim Idle's magic sync mechanism in closures and optional
// subrules. E.g.,
//
//
// a : sync ( stuff sync )* ;
// sync : {consume to what can follow sync} ;
//
//
// At the start of a sub rule upon error, {@link //sync} performs single
// token deletion, if possible. If it can't do that, it bails on the current
// rule and uses the default error recovery, which consumes until the
// resynchronization set of the current rule.
//
// If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block
// with an empty alternative), then the expected set includes what follows
// the subrule.
//
// During loop iteration, it consumes until it sees a token that can start a
// sub rule or what follows loop. Yes, that is pretty aggressive. We opt to
// stay in the loop as long as possible.
//
// ORIGINS
//
// Previous versions of ANTLR did a poor job of their recovery within loops.
// A single mismatch token or missing token would force the parser to bail
// out of the entire rules surrounding the loop. So, for rule
//
//
// classDef : 'class' ID '{' member* '}'
//
//
// input with an extra token between members would force the parser to
// consume until it found the next class definition rather than the next
// member definition of the current class.
//
// This functionality cost a little bit of effort because the parser has to
// compare token set at the start of the loop and at each iteration. If for
// some reason speed is suffering for you, you can turn off this
// functionality by simply overriding this method as a blank { }.
//
DefaultErrorStrategy.prototype.sync = function(recognizer) {
// If already recovering, don't try to sync
if (this.inErrorRecoveryMode(recognizer)) {
return;
}
var s = recognizer._interp.atn.states[recognizer.state];
var la = recognizer.getTokenStream().LA(1);
// try cheaper subset first; might get lucky. seems to shave a wee bit off
if (la===Token.EOF || recognizer.atn.nextTokens(s).contains(la)) {
return;
}
// Return but don't end recovery. only do that upon valid token match
if(recognizer.isExpectedToken(la)) {
return;
}
switch (s.stateType) {
case ATNState.BLOCK_START:
case ATNState.STAR_BLOCK_START:
case ATNState.PLUS_BLOCK_START:
case ATNState.STAR_LOOP_ENTRY:
// report error and recover if possible
if( this.singleTokenDeletion(recognizer) !== null) {
return;
} else {
throw new InputMismatchException(recognizer);
}
break;
case ATNState.PLUS_LOOP_BACK:
case ATNState.STAR_LOOP_BACK:
this.reportUnwantedToken(recognizer);
var expecting = new IntervalSet();
expecting.addSet(recognizer.getExpectedTokens());
var whatFollowsLoopIterationOrRule = expecting.addSet(this.getErrorRecoverySet(recognizer));
this.consumeUntil(recognizer, whatFollowsLoopIterationOrRule);
break;
default:
// do nothing if we can't identify the exact kind of ATN state
}
};
// This is called by {@link //reportError} when the exception is a
// {@link NoViableAltException}.
//
// @see //reportError
//
// @param recognizer the parser instance
// @param e the recognition exception
//
DefaultErrorStrategy.prototype.reportNoViableAlternative = function(recognizer, e) {
var tokens = recognizer.getTokenStream();
var input;
if(tokens !== null) {
if (e.startToken.type===Token.EOF) {
input = "";
} else {
input = tokens.getText(new Interval(e.startToken, e.offendingToken));
}
} else {
input = "";
}
var msg = "no viable alternative at input " + this.escapeWSAndQuote(input);
recognizer.notifyErrorListeners(msg, e.offendingToken, e);
};
//
// This is called by {@link //reportError} when the exception is an
// {@link InputMismatchException}.
//
// @see //reportError
//
// @param recognizer the parser instance
// @param e the recognition exception
//
DefaultErrorStrategy.prototype.reportInputMismatch = function(recognizer, e) {
var msg = "mismatched input " + this.getTokenErrorDisplay(e.offendingToken) +
" expecting " + e.getExpectedTokens().toString(recognizer.literalNames, recognizer.symbolicNames);
recognizer.notifyErrorListeners(msg, e.offendingToken, e);
};
//
// This is called by {@link //reportError} when the exception is a
// {@link FailedPredicateException}.
//
// @see //reportError
//
// @param recognizer the parser instance
// @param e the recognition exception
//
DefaultErrorStrategy.prototype.reportFailedPredicate = function(recognizer, e) {
var ruleName = recognizer.ruleNames[recognizer._ctx.ruleIndex];
var msg = "rule " + ruleName + " " + e.message;
recognizer.notifyErrorListeners(msg, e.offendingToken, e);
};
// This method is called to report a syntax error which requires the removal
// of a token from the input stream. At the time this method is called, the
// erroneous symbol is current {@code LT(1)} symbol and has not yet been
// removed from the input stream. When this method returns,
// {@code recognizer} is in error recovery mode.
//
// This method is called when {@link //singleTokenDeletion} identifies
// single-token deletion as a viable recovery strategy for a mismatched
// input error.
//
// The default implementation simply returns if the handler is already in
// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to
// enter error recovery mode, followed by calling
// {@link Parser//notifyErrorListeners}.
//
// @param recognizer the parser instance
//
DefaultErrorStrategy.prototype.reportUnwantedToken = function(recognizer) {
if (this.inErrorRecoveryMode(recognizer)) {
return;
}
this.beginErrorCondition(recognizer);
var t = recognizer.getCurrentToken();
var tokenName = this.getTokenErrorDisplay(t);
var expecting = this.getExpectedTokens(recognizer);
var msg = "extraneous input " + tokenName + " expecting " +
expecting.toString(recognizer.literalNames, recognizer.symbolicNames);
recognizer.notifyErrorListeners(msg, t, null);
};
// This method is called to report a syntax error which requires the
// insertion of a missing token into the input stream. At the time this
// method is called, the missing token has not yet been inserted. When this
// method returns, {@code recognizer} is in error recovery mode.
//
// This method is called when {@link //singleTokenInsertion} identifies
// single-token insertion as a viable recovery strategy for a mismatched
// input error.
//
// The default implementation simply returns if the handler is already in
// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to
// enter error recovery mode, followed by calling
// {@link Parser//notifyErrorListeners}.
//
// @param recognizer the parser instance
//
DefaultErrorStrategy.prototype.reportMissingToken = function(recognizer) {
if ( this.inErrorRecoveryMode(recognizer)) {
return;
}
this.beginErrorCondition(recognizer);
var t = recognizer.getCurrentToken();
var expecting = this.getExpectedTokens(recognizer);
var msg = "missing " + expecting.toString(recognizer.literalNames, recognizer.symbolicNames) +
" at " + this.getTokenErrorDisplay(t);
recognizer.notifyErrorListeners(msg, t, null);
};
// The default implementation attempts to recover from the mismatched input
// by using single token insertion and deletion as described below. If the
// recovery attempt fails, this method throws an
// {@link InputMismatchException}.
//
// EXTRA TOKEN (single token deletion)
//
// {@code LA(1)} is not what we are looking for. If {@code LA(2)} has the
// right token, however, then assume {@code LA(1)} is some extra spurious
// token and delete it. Then consume and return the next token (which was
// the {@code LA(2)} token) as the successful result of the match operation.
//
// This recovery strategy is implemented by {@link
// //singleTokenDeletion}.
//
// MISSING TOKEN (single token insertion)
//
// If current token (at {@code LA(1)}) is consistent with what could come
// after the expected {@code LA(1)} token, then assume the token is missing
// and use the parser's {@link TokenFactory} to create it on the fly. The
// "insertion" is performed by returning the created token as the successful
// result of the match operation.
//
// This recovery strategy is implemented by {@link
// //singleTokenInsertion}.
//
// EXAMPLE
//
// For example, Input {@code i=(3;} is clearly missing the {@code ')'}. When
// the parser returns from the nested call to {@code expr}, it will have
// call chain:
//
//
// stat → expr → atom
//
//
// and it will be trying to match the {@code ')'} at this point in the
// derivation:
//
//
// => ID '=' '(' INT ')' ('+' atom)* ';'
// ^
//
//
// The attempt to match {@code ')'} will fail when it sees {@code ';'} and
// call {@link //recoverInline}. To recover, it sees that {@code LA(1)==';'}
// is in the set of tokens that can follow the {@code ')'} token reference
// in rule {@code atom}. It can assume that you forgot the {@code ')'}.
//
DefaultErrorStrategy.prototype.recoverInline = function(recognizer) {
// SINGLE TOKEN DELETION
var matchedSymbol = this.singleTokenDeletion(recognizer);
if (matchedSymbol !== null) {
// we have deleted the extra token.
// now, move past ttype token as if all were ok
recognizer.consume();
return matchedSymbol;
}
// SINGLE TOKEN INSERTION
if (this.singleTokenInsertion(recognizer)) {
return this.getMissingSymbol(recognizer);
}
// even that didn't work; must throw the exception
throw new InputMismatchException(recognizer);
};
//
// This method implements the single-token insertion inline error recovery
// strategy. It is called by {@link //recoverInline} if the single-token
// deletion strategy fails to recover from the mismatched input. If this
// method returns {@code true}, {@code recognizer} will be in error recovery
// mode.
//
// This method determines whether or not single-token insertion is viable by
// checking if the {@code LA(1)} input symbol could be successfully matched
// if it were instead the {@code LA(2)} symbol. If this method returns
// {@code true}, the caller is responsible for creating and inserting a
// token with the correct type to produce this behavior.
//
// @param recognizer the parser instance
// @return {@code true} if single-token insertion is a viable recovery
// strategy for the current mismatched input, otherwise {@code false}
//
DefaultErrorStrategy.prototype.singleTokenInsertion = function(recognizer) {
var currentSymbolType = recognizer.getTokenStream().LA(1);
// if current token is consistent with what could come after current
// ATN state, then we know we're missing a token; error recovery
// is free to conjure up and insert the missing token
var atn = recognizer._interp.atn;
var currentState = atn.states[recognizer.state];
var next = currentState.transitions[0].target;
var expectingAtLL2 = atn.nextTokens(next, recognizer._ctx);
if (expectingAtLL2.contains(currentSymbolType) ){
this.reportMissingToken(recognizer);
return true;
} else {
return false;
}
};
// This method implements the single-token deletion inline error recovery
// strategy. It is called by {@link //recoverInline} to attempt to recover
// from mismatched input. If this method returns null, the parser and error
// handler state will not have changed. If this method returns non-null,
// {@code recognizer} will not be in error recovery mode since the
// returned token was a successful match.
//
// If the single-token deletion is successful, this method calls
// {@link //reportUnwantedToken} to report the error, followed by
// {@link Parser//consume} to actually "delete" the extraneous token. Then,
// before returning {@link //reportMatch} is called to signal a successful
// match.
//
// @param recognizer the parser instance
// @return the successfully matched {@link Token} instance if single-token
// deletion successfully recovers from the mismatched input, otherwise
// {@code null}
//
DefaultErrorStrategy.prototype.singleTokenDeletion = function(recognizer) {
var nextTokenType = recognizer.getTokenStream().LA(2);
var expecting = this.getExpectedTokens(recognizer);
if (expecting.contains(nextTokenType)) {
this.reportUnwantedToken(recognizer);
// print("recoverFromMismatchedToken deleting " \
// + str(recognizer.getTokenStream().LT(1)) \
// + " since " + str(recognizer.getTokenStream().LT(2)) \
// + " is what we want", file=sys.stderr)
recognizer.consume(); // simply delete extra token
// we want to return the token we're actually matching
var matchedSymbol = recognizer.getCurrentToken();
this.reportMatch(recognizer); // we know current token is correct
return matchedSymbol;
} else {
return null;
}
};
// Conjure up a missing token during error recovery.
//
// The recognizer attempts to recover from single missing
// symbols. But, actions might refer to that missing symbol.
// For example, x=ID {f($x);}. The action clearly assumes
// that there has been an identifier matched previously and that
// $x points at that token. If that token is missing, but
// the next token in the stream is what we want we assume that
// this token is missing and we keep going. Because we
// have to return some token to replace the missing token,
// we have to conjure one up. This method gives the user control
// over the tokens returned for missing tokens. Mostly,
// you will want to create something special for identifier
// tokens. For literals such as '{' and ',', the default
// action in the parser or tree parser works. It simply creates
// a CommonToken of the appropriate type. The text will be the token.
// If you change what tokens must be created by the lexer,
// override this method to create the appropriate tokens.
//
DefaultErrorStrategy.prototype.getMissingSymbol = function(recognizer) {
var currentSymbol = recognizer.getCurrentToken();
var expecting = this.getExpectedTokens(recognizer);
var expectedTokenType = expecting.first(); // get any element
var tokenText;
if (expectedTokenType===Token.EOF) {
tokenText = "";
} else {
tokenText = "";
}
var current = currentSymbol;
var lookback = recognizer.getTokenStream().LT(-1);
if (current.type===Token.EOF && lookback !== null) {
current = lookback;
}
return recognizer.getTokenFactory().create(current.source,
expectedTokenType, tokenText, Token.DEFAULT_CHANNEL,
-1, -1, current.line, current.column);
};
DefaultErrorStrategy.prototype.getExpectedTokens = function(recognizer) {
return recognizer.getExpectedTokens();
};
// How should a token be displayed in an error message? The default
// is to display just the text, but during development you might
// want to have a lot of information spit out. Override in that case
// to use t.toString() (which, for CommonToken, dumps everything about
// the token). This is better than forcing you to override a method in
// your token objects because you don't have to go modify your lexer
// so that it creates a new Java type.
//
DefaultErrorStrategy.prototype.getTokenErrorDisplay = function(t) {
if (t === null) {
return "";
}
var s = t.text;
if (s === null) {
if (t.type===Token.EOF) {
s = "";
} else {
s = "<" + t.type + ">";
}
}
return this.escapeWSAndQuote(s);
};
DefaultErrorStrategy.prototype.escapeWSAndQuote = function(s) {
s = s.replace(/\n/g,"\\n");
s = s.replace(/\r/g,"\\r");
s = s.replace(/\t/g,"\\t");
return "'" + s + "'";
};
// Compute the error recovery set for the current rule. During
// rule invocation, the parser pushes the set of tokens that can
// follow that rule reference on the stack; this amounts to
// computing FIRST of what follows the rule reference in the
// enclosing rule. See LinearApproximator.FIRST().
// This local follow set only includes tokens
// from within the rule; i.e., the FIRST computation done by
// ANTLR stops at the end of a rule.
//
// EXAMPLE
//
// When you find a "no viable alt exception", the input is not
// consistent with any of the alternatives for rule r. The best
// thing to do is to consume tokens until you see something that
// can legally follow a call to r//or* any rule that called r.
// You don't want the exact set of viable next tokens because the
// input might just be missing a token--you might consume the
// rest of the input looking for one of the missing tokens.
//
// Consider grammar:
//
// a : '[' b ']'
// | '(' b ')'
// ;
// b : c '^' INT ;
// c : ID
// | INT
// ;
//
// At each rule invocation, the set of tokens that could follow
// that rule is pushed on a stack. Here are the various
// context-sensitive follow sets:
//
// FOLLOW(b1_in_a) = FIRST(']') = ']'
// FOLLOW(b2_in_a) = FIRST(')') = ')'
// FOLLOW(c_in_b) = FIRST('^') = '^'
//
// Upon erroneous input "[]", the call chain is
//
// a -> b -> c
//
// and, hence, the follow context stack is:
//
// depth follow set start of rule execution
// 0 a (from main())
// 1 ']' b
// 2 '^' c
//
// Notice that ')' is not included, because b would have to have
// been called from a different context in rule a for ')' to be
// included.
//
// For error recovery, we cannot consider FOLLOW(c)
// (context-sensitive or otherwise). We need the combined set of
// all context-sensitive FOLLOW sets--the set of all tokens that
// could follow any reference in the call chain. We need to
// resync to one of those tokens. Note that FOLLOW(c)='^' and if
// we resync'd to that token, we'd consume until EOF. We need to
// sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
// In this case, for input "[]", LA(1) is ']' and in the set, so we would
// not consume anything. After printing an error, rule c would
// return normally. Rule b would not find the required '^' though.
// At this point, it gets a mismatched token error and throws an
// exception (since LA(1) is not in the viable following token
// set). The rule exception handler tries to recover, but finds
// the same recovery set and doesn't consume anything. Rule b
// exits normally returning to rule a. Now it finds the ']' (and
// with the successful match exits errorRecovery mode).
//
// So, you can see that the parser walks up the call chain looking
// for the token that was a member of the recovery set.
//
// Errors are not generated in errorRecovery mode.
//
// ANTLR's error recovery mechanism is based upon original ideas:
//
// "Algorithms + Data Structures = Programs" by Niklaus Wirth
//
// and
//
// "A note on error recovery in recursive descent parsers":
// http://portal.acm.org/citation.cfm?id=947902.947905
//
// Later, Josef Grosch had some good ideas:
//
// "Efficient and Comfortable Error Recovery in Recursive Descent
// Parsers":
// ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
//
// Like Grosch I implement context-sensitive FOLLOW sets that are combined
// at run-time upon error to avoid overhead during parsing.
//
DefaultErrorStrategy.prototype.getErrorRecoverySet = function(recognizer) {
var atn = recognizer._interp.atn;
var ctx = recognizer._ctx;
var recoverSet = new IntervalSet();
while (ctx !== null && ctx.invokingState>=0) {
// compute what follows who invoked us
var invokingState = atn.states[ctx.invokingState];
var rt = invokingState.transitions[0];
var follow = atn.nextTokens(rt.followState);
recoverSet.addSet(follow);
ctx = ctx.parentCtx;
}
recoverSet.removeOne(Token.EPSILON);
return recoverSet;
};
// Consume tokens until one matches the given token set.//
DefaultErrorStrategy.prototype.consumeUntil = function(recognizer, set) {
var ttype = recognizer.getTokenStream().LA(1);
while( ttype !== Token.EOF && !set.contains(ttype)) {
recognizer.consume();
ttype = recognizer.getTokenStream().LA(1);
}
};
//
// This implementation of {@link ANTLRErrorStrategy} responds to syntax errors
// by immediately canceling the parse operation with a
// {@link ParseCancellationException}. The implementation ensures that the
// {@link ParserRuleContext//exception} field is set for all parse tree nodes
// that were not completed prior to encountering the error.
//
//
// This error strategy is useful in the following scenarios.
//
//
// Two-stage parsing: This error strategy allows the first
// stage of two-stage parsing to immediately terminate if an error is
// encountered, and immediately fall back to the second stage. In addition to
// avoiding wasted work by attempting to recover from errors here, the empty
// implementation of {@link BailErrorStrategy//sync} improves the performance of
// the first stage.
// Silent validation: When syntax errors are not being
// reported or logged, and the parse result is simply ignored if errors occur,
// the {@link BailErrorStrategy} avoids wasting work on recovering from errors
// when the result will be ignored either way.
//
//
//
// {@code myparser.setErrorHandler(new BailErrorStrategy());}
//
// @see Parser//setErrorHandler(ANTLRErrorStrategy)
//
function BailErrorStrategy() {
DefaultErrorStrategy.call(this);
return this;
}
BailErrorStrategy.prototype = Object.create(DefaultErrorStrategy.prototype);
BailErrorStrategy.prototype.constructor = BailErrorStrategy;
// Instead of recovering from exception {@code e}, re-throw it wrapped
// in a {@link ParseCancellationException} so it is not caught by the
// rule function catches. Use {@link Exception//getCause()} to get the
// original {@link RecognitionException}.
//
BailErrorStrategy.prototype.recover = function(recognizer, e) {
var context = recognizer._ctx;
while (context !== null) {
context.exception = e;
context = context.parentCtx;
}
throw new ParseCancellationException(e);
};
// Make sure we don't attempt to recover inline; if the parser
// successfully recovers, it won't throw an exception.
//
BailErrorStrategy.prototype.recoverInline = function(recognizer) {
this.recover(recognizer, new InputMismatchException(recognizer));
};
// Make sure we don't attempt to recover from problems in subrules.//
BailErrorStrategy.prototype.sync = function(recognizer) {
// pass
};
exports.BailErrorStrategy = BailErrorStrategy;
exports.DefaultErrorStrategy = DefaultErrorStrategy;
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
var Token = __webpack_require__(6).Token;
// Vacuum all input from a string and then treat it like a buffer.
function _loadString(stream) {
stream._index = 0;
stream.data = [];
for (var i = 0; i < stream.strdata.length; i++) {
stream.data.push(stream.strdata.charCodeAt(i));
}
stream._size = stream.data.length;
}
function InputStream(data) {
this.name = "";
this.strdata = data;
_loadString(this);
return this;
}
Object.defineProperty(InputStream.prototype, "index", {
get : function() {
return this._index;
}
});
Object.defineProperty(InputStream.prototype, "size", {
get : function() {
return this._size;
}
});
// Reset the stream so that it's in the same state it was
// when the object was created *except* the data array is not
// touched.
//
InputStream.prototype.reset = function() {
this._index = 0;
};
InputStream.prototype.consume = function() {
if (this._index >= this._size) {
// assert this.LA(1) == Token.EOF
throw ("cannot consume EOF");
}
this._index += 1;
};
InputStream.prototype.LA = function(offset) {
if (offset === 0) {
return 0; // undefined
}
if (offset < 0) {
offset += 1; // e.g., translate LA(-1) to use offset=0
}
var pos = this._index + offset - 1;
if (pos < 0 || pos >= this._size) { // invalid
return Token.EOF;
}
return this.data[pos];
};
InputStream.prototype.LT = function(offset) {
return this.LA(offset);
};
// mark/release do nothing; we have entire buffer
InputStream.prototype.mark = function() {
return -1;
};
InputStream.prototype.release = function(marker) {
};
// consume() ahead until p==_index; can't just set p=_index as we must
// update line and column. If we seek backwards, just set p
//
InputStream.prototype.seek = function(_index) {
if (_index <= this._index) {
this._index = _index; // just jump; don't update stream state (line,
// ...)
return;
}
// seek forward
this._index = Math.min(_index, this._size);
};
InputStream.prototype.getText = function(start, stop) {
if (stop >= this._size) {
stop = this._size - 1;
}
if (start >= this._size) {
return "";
} else {
return this.strdata.slice(start, stop + 1);
}
};
InputStream.prototype.toString = function() {
return this.strdata;
};
exports.InputStream = InputStream;
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
//
//
// This is an InputStream that is loaded from a file all at once
// when you construct the object.
//
var InputStream = __webpack_require__(40).InputStream;
var isNodeJs = typeof window === 'undefined' && typeof importScripts === 'undefined';
var fs = isNodeJs ? __webpack_require__(42) : null;
function FileStream(fileName) {
var data = fs.readFileSync(fileName, "utf8");
InputStream.call(this, data);
this.fileName = fileName;
return this;
}
FileStream.prototype = Object.create(InputStream.prototype);
FileStream.prototype.constructor = FileStream;
exports.FileStream = FileStream;
/***/ },
/* 42 */
/***/ function(module, exports) {
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
///
//
// This class extends {@link BufferedTokenStream} with functionality to filter
// token streams to tokens on a particular channel (tokens where
// {@link Token//getChannel} returns a particular value).
//
//
// This token stream provides access to all tokens by index or when calling
// methods like {@link //getText}. The channel filtering is only used for code
// accessing tokens via the lookahead methods {@link //LA}, {@link //LT}, and
// {@link //LB}.
//
//
// By default, tokens are placed on the default channel
// ({@link Token//DEFAULT_CHANNEL}), but may be reassigned by using the
// {@code ->channel(HIDDEN)} lexer command, or by using an embedded action to
// call {@link Lexer//setChannel}.
//
//
//
// Note: lexer rules which use the {@code ->skip} lexer command or call
// {@link Lexer//skip} do not produce tokens at all, so input text matched by
// such a rule will not be available as part of the token stream, regardless of
// channel.
///
var Token = __webpack_require__(6).Token;
var BufferedTokenStream = __webpack_require__(44).BufferedTokenStream;
function CommonTokenStream(lexer, channel) {
BufferedTokenStream.call(this, lexer);
this.channel = channel===undefined ? Token.DEFAULT_CHANNEL : channel;
return this;
}
CommonTokenStream.prototype = Object.create(BufferedTokenStream.prototype);
CommonTokenStream.prototype.constructor = CommonTokenStream;
CommonTokenStream.prototype.adjustSeekIndex = function(i) {
return this.nextTokenOnChannel(i, this.channel);
};
CommonTokenStream.prototype.LB = function(k) {
if (k===0 || this.index-k<0) {
return null;
}
var i = this.index;
var n = 1;
// find k good tokens looking backwards
while (n <= k) {
// skip off-channel tokens
i = this.previousTokenOnChannel(i - 1, this.channel);
n += 1;
}
if (i < 0) {
return null;
}
return this.tokens[i];
};
CommonTokenStream.prototype.LT = function(k) {
this.lazyInit();
if (k === 0) {
return null;
}
if (k < 0) {
return this.LB(-k);
}
var i = this.index;
var n = 1; // we know tokens[pos] is a good one
// find k good tokens
while (n < k) {
// skip off-channel tokens, but make sure to not look past EOF
if (this.sync(i + 1)) {
i = this.nextTokenOnChannel(i + 1, this.channel);
}
n += 1;
}
return this.tokens[i];
};
// Count EOF just once.///
CommonTokenStream.prototype.getNumberOfOnChannelTokens = function() {
var n = 0;
this.fill();
for (var i =0; i< this.tokens.length;i++) {
var t = this.tokens[i];
if( t.channel===this.channel) {
n += 1;
}
if( t.type===Token.EOF) {
break;
}
}
return n;
};
exports.CommonTokenStream = CommonTokenStream;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
//
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
// This implementation of {@link TokenStream} loads tokens from a
// {@link TokenSource} on-demand, and places the tokens in a buffer to provide
// access to any previous token by index.
//
//
// This token stream ignores the value of {@link Token//getChannel}. If your
// parser requires the token stream filter tokens to only those on a particular
// channel, such as {@link Token//DEFAULT_CHANNEL} or
// {@link Token//HIDDEN_CHANNEL}, use a filtering token stream such a
// {@link CommonTokenStream}.
var Token = __webpack_require__(6).Token;
var Lexer = __webpack_require__(22).Lexer;
var Interval = __webpack_require__(10).Interval;
// this is just to keep meaningful parameter types to Parser
function TokenStream() {
return this;
}
function BufferedTokenStream(tokenSource) {
TokenStream.call(this);
// The {@link TokenSource} from which tokens for this stream are fetched.
this.tokenSource = tokenSource;
// A collection of all tokens fetched from the token source. The list is
// considered a complete view of the input once {@link //fetchedEOF} is set
// to {@code true}.
this.tokens = [];
// The index into {@link //tokens} of the current token (next token to
// {@link //consume}). {@link //tokens}{@code [}{@link //p}{@code ]} should
// be
// {@link //LT LT(1)}.
//
// This field is set to -1 when the stream is first constructed or when
// {@link //setTokenSource} is called, indicating that the first token has
// not yet been fetched from the token source. For additional information,
// see the documentation of {@link IntStream} for a description of
// Initializing Methods.
this.index = -1;
// Indicates whether the {@link Token//EOF} token has been fetched from
// {@link //tokenSource} and added to {@link //tokens}. This field improves
// performance for the following cases:
//
//
// {@link //consume}: The lookahead check in {@link //consume} to
// prevent
// consuming the EOF symbol is optimized by checking the values of
// {@link //fetchedEOF} and {@link //p} instead of calling {@link
// //LA}.
// {@link //fetch}: The check to prevent adding multiple EOF symbols
// into
// {@link //tokens} is trivial with this field.
//
this.fetchedEOF = false;
return this;
}
BufferedTokenStream.prototype = Object.create(TokenStream.prototype);
BufferedTokenStream.prototype.constructor = BufferedTokenStream;
BufferedTokenStream.prototype.mark = function() {
return 0;
};
BufferedTokenStream.prototype.release = function(marker) {
// no resources to release
};
BufferedTokenStream.prototype.reset = function() {
this.seek(0);
};
BufferedTokenStream.prototype.seek = function(index) {
this.lazyInit();
this.index = this.adjustSeekIndex(index);
};
BufferedTokenStream.prototype.get = function(index) {
this.lazyInit();
return this.tokens[index];
};
BufferedTokenStream.prototype.consume = function() {
var skipEofCheck = false;
if (this.index >= 0) {
if (this.fetchedEOF) {
// the last token in tokens is EOF. skip check if p indexes any
// fetched token except the last.
skipEofCheck = this.index < this.tokens.length - 1;
} else {
// no EOF token in tokens. skip check if p indexes a fetched token.
skipEofCheck = this.index < this.tokens.length;
}
} else {
// not yet initialized
skipEofCheck = false;
}
if (!skipEofCheck && this.LA(1) === Token.EOF) {
throw "cannot consume EOF";
}
if (this.sync(this.index + 1)) {
this.index = this.adjustSeekIndex(this.index + 1);
}
};
// Make sure index {@code i} in tokens has a token.
//
// @return {@code true} if a token is located at index {@code i}, otherwise
// {@code false}.
// @see //get(int i)
// /
BufferedTokenStream.prototype.sync = function(i) {
var n = i - this.tokens.length + 1; // how many more elements we need?
if (n > 0) {
var fetched = this.fetch(n);
return fetched >= n;
}
return true;
};
// Add {@code n} elements to buffer.
//
// @return The actual number of elements added to the buffer.
// /
BufferedTokenStream.prototype.fetch = function(n) {
if (this.fetchedEOF) {
return 0;
}
for (var i = 0; i < n; i++) {
var t = this.tokenSource.nextToken();
t.tokenIndex = this.tokens.length;
this.tokens.push(t);
if (t.type === Token.EOF) {
this.fetchedEOF = true;
return i + 1;
}
}
return n;
};
// Get all tokens from start..stop inclusively///
BufferedTokenStream.prototype.getTokens = function(start, stop, types) {
if (types === undefined) {
types = null;
}
if (start < 0 || stop < 0) {
return null;
}
this.lazyInit();
var subset = [];
if (stop >= this.tokens.length) {
stop = this.tokens.length - 1;
}
for (var i = start; i < stop; i++) {
var t = this.tokens[i];
if (t.type === Token.EOF) {
break;
}
if (types === null || types.contains(t.type)) {
subset.push(t);
}
}
return subset;
};
BufferedTokenStream.prototype.LA = function(i) {
return this.LT(i).type;
};
BufferedTokenStream.prototype.LB = function(k) {
if (this.index - k < 0) {
return null;
}
return this.tokens[this.index - k];
};
BufferedTokenStream.prototype.LT = function(k) {
this.lazyInit();
if (k === 0) {
return null;
}
if (k < 0) {
return this.LB(-k);
}
var i = this.index + k - 1;
this.sync(i);
if (i >= this.tokens.length) { // return EOF token
// EOF must be last token
return this.tokens[this.tokens.length - 1];
}
return this.tokens[i];
};
// Allowed derived classes to modify the behavior of operations which change
// the current stream position by adjusting the target token index of a seek
// operation. The default implementation simply returns {@code i}. If an
// exception is thrown in this method, the current stream index should not be
// changed.
//
// For example, {@link CommonTokenStream} overrides this method to ensure
// that
// the seek target is always an on-channel token.
//
// @param i The target token index.
// @return The adjusted target token index.
BufferedTokenStream.prototype.adjustSeekIndex = function(i) {
return i;
};
BufferedTokenStream.prototype.lazyInit = function() {
if (this.index === -1) {
this.setup();
}
};
BufferedTokenStream.prototype.setup = function() {
this.sync(0);
this.index = this.adjustSeekIndex(0);
};
// Reset this token stream by setting its token source.///
BufferedTokenStream.prototype.setTokenSource = function(tokenSource) {
this.tokenSource = tokenSource;
this.tokens = [];
this.index = -1;
};
// Given a starting index, return the index of the next token on channel.
// Return i if tokens[i] is on channel. Return -1 if there are no tokens
// on channel between i and EOF.
// /
BufferedTokenStream.prototype.nextTokenOnChannel = function(i, channel) {
this.sync(i);
if (i >= this.tokens.length) {
return -1;
}
var token = this.tokens[i];
while (token.channel !== this.channel) {
if (token.type === Token.EOF) {
return -1;
}
i += 1;
this.sync(i);
token = this.tokens[i];
}
return i;
};
// Given a starting index, return the index of the previous token on channel.
// Return i if tokens[i] is on channel. Return -1 if there are no tokens
// on channel between i and 0.
BufferedTokenStream.prototype.previousTokenOnChannel = function(i, channel) {
while (i >= 0 && this.tokens[i].channel !== channel) {
i -= 1;
}
return i;
};
// Collect all tokens on specified channel to the right of
// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or
// EOF. If channel is -1, find any non default channel token.
BufferedTokenStream.prototype.getHiddenTokensToRight = function(tokenIndex,
channel) {
if (channel === undefined) {
channel = -1;
}
this.lazyInit();
if (tokenIndex < 0 || tokenIndex >= this.tokens.length) {
throw "" + tokenIndex + " not in 0.." + this.tokens.length - 1;
}
var nextOnChannel = this.nextTokenOnChannel(tokenIndex + 1,
Lexer.DEFAULT_TOKEN_CHANNEL);
var from_ = tokenIndex + 1;
// if none onchannel to right, nextOnChannel=-1 so set to = last token
var to = nextOnChannel === -1 ? this.tokens.length - 1 : nextOnChannel;
return this.filterForChannel(from_, to, channel);
};
// Collect all tokens on specified channel to the left of
// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.
// If channel is -1, find any non default channel token.
BufferedTokenStream.prototype.getHiddenTokensToLeft = function(tokenIndex,
channel) {
if (channel === undefined) {
channel = -1;
}
this.lazyInit();
if (tokenIndex < 0 || tokenIndex >= this.tokens.length) {
throw "" + tokenIndex + " not in 0.." + this.tokens.length - 1;
}
var prevOnChannel = this.previousTokenOnChannel(tokenIndex - 1,
Lexer.DEFAULT_TOKEN_CHANNEL);
if (prevOnChannel === tokenIndex - 1) {
return null;
}
// if none on channel to left, prevOnChannel=-1 then from=0
var from_ = prevOnChannel + 1;
var to = tokenIndex - 1;
return this.filterForChannel(from_, to, channel);
};
BufferedTokenStream.prototype.filterForChannel = function(left, right, channel) {
var hidden = [];
for (var i = left; i < right + 1; i++) {
var t = this.tokens[i];
if (channel === -1) {
if (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) {
hidden.push(t);
}
} else if (t.channel === channel) {
hidden.push(t);
}
}
if (hidden.length === 0) {
return null;
}
return hidden;
};
BufferedTokenStream.prototype.getSourceName = function() {
return this.tokenSource.getSourceName();
};
// Get the text of all tokens in this buffer.///
BufferedTokenStream.prototype.getText = function(interval) {
this.lazyInit();
this.fill();
if (interval === undefined || interval === null) {
interval = new Interval(0, this.tokens.length - 1);
}
var start = interval.start;
if (start instanceof Token) {
start = start.tokenIndex;
}
var stop = interval.stop;
if (stop instanceof Token) {
stop = stop.tokenIndex;
}
if (start === null || stop === null || start < 0 || stop < 0) {
return "";
}
if (stop >= this.tokens.length) {
stop = this.tokens.length - 1;
}
var s = "";
for (var i = start; i < stop + 1; i++) {
var t = this.tokens[i];
if (t.type === Token.EOF) {
break;
}
s = s + t.text;
}
return s;
};
// Get all tokens from lexer until EOF///
BufferedTokenStream.prototype.fill = function() {
this.lazyInit();
while (this.fetch(1000) === 1000) {
continue;
}
};
exports.BufferedTokenStream = BufferedTokenStream;
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
/* Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
var Token = __webpack_require__(6).Token;
var ParseTreeListener = __webpack_require__(14).ParseTreeListener;
var Recognizer = __webpack_require__(23).Recognizer;
var DefaultErrorStrategy = __webpack_require__(39).DefaultErrorStrategy;
var ATNDeserializer = __webpack_require__(17).ATNDeserializer;
var ATNDeserializationOptions = __webpack_require__(19).ATNDeserializationOptions;
var TerminalNode = __webpack_require__(14).TerminalNode;
var ErrorNode = __webpack_require__(14).ErrorNode;
function TraceListener(parser) {
ParseTreeListener.call(this);
this.parser = parser;
return this;
}
TraceListener.prototype = Object.create(ParseTreeListener);
TraceListener.prototype.constructor = TraceListener;
TraceListener.prototype.enterEveryRule = function(ctx) {
console.log("enter " + this.parser.ruleNames[ctx.ruleIndex] + ", LT(1)=" + this.parser._input.LT(1).text);
};
TraceListener.prototype.visitTerminal = function( node) {
console.log("consume " + node.symbol + " rule " + this.parser.ruleNames[this.parser._ctx.ruleIndex]);
};
TraceListener.prototype.exitEveryRule = function(ctx) {
console.log("exit " + this.parser.ruleNames[ctx.ruleIndex] + ", LT(1)=" + this.parser._input.LT(1).text);
};
// this is all the parsing support code essentially; most of it is error
// recovery stuff.//
function Parser(input) {
Recognizer.call(this);
// The input stream.
this._input = null;
// The error handling strategy for the parser. The default value is a new
// instance of {@link DefaultErrorStrategy}.
this._errHandler = new DefaultErrorStrategy();
this._precedenceStack = [];
this._precedenceStack.push(0);
// The {@link ParserRuleContext} object for the currently executing rule.
// this is always non-null during the parsing process.
this._ctx = null;
// Specifies whether or not the parser should construct a parse tree during
// the parsing process. The default value is {@code true}.
this.buildParseTrees = true;
// When {@link //setTrace}{@code (true)} is called, a reference to the
// {@link TraceListener} is stored here so it can be easily removed in a
// later call to {@link //setTrace}{@code (false)}. The listener itself is
// implemented as a parser listener so this field is not directly used by
// other parser methods.
this._tracer = null;
// The list of {@link ParseTreeListener} listeners registered to receive
// events during the parse.
this._parseListeners = null;
// The number of syntax errors reported during parsing. this value is
// incremented each time {@link //notifyErrorListeners} is called.
this._syntaxErrors = 0;
this.setInputStream(input);
return this;
}
Parser.prototype = Object.create(Recognizer.prototype);
Parser.prototype.contructor = Parser;
// this field maps from the serialized ATN string to the deserialized {@link
// ATN} with
// bypass alternatives.
//
// @see ATNDeserializationOptions//isGenerateRuleBypassTransitions()
//
Parser.bypassAltsAtnCache = {};
// reset the parser's state//
Parser.prototype.reset = function() {
if (this._input !== null) {
this._input.seek(0);
}
this._errHandler.reset(this);
this._ctx = null;
this._syntaxErrors = 0;
this.setTrace(false);
this._precedenceStack = [];
this._precedenceStack.push(0);
if (this._interp !== null) {
this._interp.reset();
}
};
// Match current input symbol against {@code ttype}. If the symbol type
// matches, {@link ANTLRErrorStrategy//reportMatch} and {@link //consume} are
// called to complete the match process.
//
// If the symbol type does not match,
// {@link ANTLRErrorStrategy//recoverInline} is called on the current error
// strategy to attempt recovery. If {@link //getBuildParseTree} is
// {@code true} and the token index of the symbol returned by
// {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to
// the parse tree by calling {@link ParserRuleContext//addErrorNode}.
//
// @param ttype the token type to match
// @return the matched symbol
// @throws RecognitionException if the current input symbol did not match
// {@code ttype} and the error strategy could not recover from the
// mismatched symbol
Parser.prototype.match = function(ttype) {
var t = this.getCurrentToken();
if (t.type === ttype) {
this._errHandler.reportMatch(this);
this.consume();
} else {
t = this._errHandler.recoverInline(this);
if (this.buildParseTrees && t.tokenIndex === -1) {
// we must have conjured up a new token during single token
// insertion
// if it's not the current symbol
this._ctx.addErrorNode(t);
}
}
return t;
};
// Match current input symbol as a wildcard. If the symbol type matches
// (i.e. has a value greater than 0), {@link ANTLRErrorStrategy//reportMatch}
// and {@link //consume} are called to complete the match process.
//
// If the symbol type does not match,
// {@link ANTLRErrorStrategy//recoverInline} is called on the current error
// strategy to attempt recovery. If {@link //getBuildParseTree} is
// {@code true} and the token index of the symbol returned by
// {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to
// the parse tree by calling {@link ParserRuleContext//addErrorNode}.
//
// @return the matched symbol
// @throws RecognitionException if the current input symbol did not match
// a wildcard and the error strategy could not recover from the mismatched
// symbol
Parser.prototype.matchWildcard = function() {
var t = this.getCurrentToken();
if (t.type > 0) {
this._errHandler.reportMatch(this);
this.consume();
} else {
t = this._errHandler.recoverInline(this);
if (this._buildParseTrees && t.tokenIndex === -1) {
// we must have conjured up a new token during single token
// insertion
// if it's not the current symbol
this._ctx.addErrorNode(t);
}
}
return t;
};
Parser.prototype.getParseListeners = function() {
return this._parseListeners || [];
};
// Registers {@code listener} to receive events during the parsing process.
//
// To support output-preserving grammar transformations (including but not
// limited to left-recursion removal, automated left-factoring, and
// optimized code generation), calls to listener methods during the parse
// may differ substantially from calls made by
// {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In
// particular, rule entry and exit events may occur in a different order
// during the parse than after the parser. In addition, calls to certain
// rule entry methods may be omitted.
//
// With the following specific exceptions, calls to listener events are
// deterministic , i.e. for identical input the calls to listener
// methods will be the same.
//
//
// Alterations to the grammar used to generate code may change the
// behavior of the listener calls.
// Alterations to the command line options passed to ANTLR 4 when
// generating the parser may change the behavior of the listener calls.
// Changing the version of the ANTLR Tool used to generate the parser
// may change the behavior of the listener calls.
//
//
// @param listener the listener to add
//
// @throws NullPointerException if {@code} listener is {@code null}
//
Parser.prototype.addParseListener = function(listener) {
if (listener === null) {
throw "listener";
}
if (this._parseListeners === null) {
this._parseListeners = [];
}
this._parseListeners.push(listener);
};
//
// Remove {@code listener} from the list of parse listeners.
//
// If {@code listener} is {@code null} or has not been added as a parse
// listener, this method does nothing.
// @param listener the listener to remove
//
Parser.prototype.removeParseListener = function(listener) {
if (this._parseListeners !== null) {
var idx = this._parseListeners.indexOf(listener);
if (idx >= 0) {
this._parseListeners.splice(idx, 1);
}
if (this._parseListeners.length === 0) {
this._parseListeners = null;
}
}
};
// Remove all parse listeners.
Parser.prototype.removeParseListeners = function() {
this._parseListeners = null;
};
// Notify any parse listeners of an enter rule event.
Parser.prototype.triggerEnterRuleEvent = function() {
if (this._parseListeners !== null) {
var ctx = this._ctx;
this._parseListeners.map(function(listener) {
listener.enterEveryRule(ctx);
ctx.enterRule(listener);
});
}
};
//
// Notify any parse listeners of an exit rule event.
//
// @see //addParseListener
//
Parser.prototype.triggerExitRuleEvent = function() {
if (this._parseListeners !== null) {
// reverse order walk of listeners
var ctx = this._ctx;
this._parseListeners.slice(0).reverse().map(function(listener) {
ctx.exitRule(listener);
listener.exitEveryRule(ctx);
});
}
};
Parser.prototype.getTokenFactory = function() {
return this._input.tokenSource._factory;
};
// Tell our token source and error strategy about a new way to create tokens.//
Parser.prototype.setTokenFactory = function(factory) {
this._input.tokenSource._factory = factory;
};
// The ATN with bypass alternatives is expensive to create so we create it
// lazily.
//
// @throws UnsupportedOperationException if the current parser does not
// implement the {@link //getSerializedATN()} method.
//
Parser.prototype.getATNWithBypassAlts = function() {
var serializedAtn = this.getSerializedATN();
if (serializedAtn === null) {
throw "The current parser does not support an ATN with bypass alternatives.";
}
var result = this.bypassAltsAtnCache[serializedAtn];
if (result === null) {
var deserializationOptions = new ATNDeserializationOptions();
deserializationOptions.generateRuleBypassTransitions = true;
result = new ATNDeserializer(deserializationOptions)
.deserialize(serializedAtn);
this.bypassAltsAtnCache[serializedAtn] = result;
}
return result;
};
// The preferred method of getting a tree pattern. For example, here's a
// sample use:
//
//
// ParseTree t = parser.expr();
// ParseTreePattern p = parser.compileParseTreePattern("<ID>+0",
// MyParser.RULE_expr);
// ParseTreeMatch m = p.match(t);
// String id = m.get("ID");
//
var Lexer = __webpack_require__(22).Lexer;
Parser.prototype.compileParseTreePattern = function(pattern, patternRuleIndex, lexer) {
lexer = lexer || null;
if (lexer === null) {
if (this.getTokenStream() !== null) {
var tokenSource = this.getTokenStream().tokenSource;
if (tokenSource instanceof Lexer) {
lexer = tokenSource;
}
}
}
if (lexer === null) {
throw "Parser can't discover a lexer to use";
}
var m = new ParseTreePatternMatcher(lexer, this);
return m.compile(pattern, patternRuleIndex);
};
Parser.prototype.getInputStream = function() {
return this.getTokenStream();
};
Parser.prototype.setInputStream = function(input) {
this.setTokenStream(input);
};
Parser.prototype.getTokenStream = function() {
return this._input;
};
// Set the token stream and reset the parser.//
Parser.prototype.setTokenStream = function(input) {
this._input = null;
this.reset();
this._input = input;
};
// Match needs to return the current input symbol, which gets put
// into the label for the associated token ref; e.g., x=ID.
//
Parser.prototype.getCurrentToken = function() {
return this._input.LT(1);
};
Parser.prototype.notifyErrorListeners = function(msg, offendingToken, err) {
offendingToken = offendingToken || null;
err = err || null;
if (offendingToken === null) {
offendingToken = this.getCurrentToken();
}
this._syntaxErrors += 1;
var line = offendingToken.line;
var column = offendingToken.column;
var listener = this.getErrorListenerDispatch();
listener.syntaxError(this, offendingToken, line, column, msg, err);
};
//
// Consume and return the {@linkplain //getCurrentToken current symbol}.
//
// E.g., given the following input with {@code A} being the current
// lookahead symbol, this function moves the cursor to {@code B} and returns
// {@code A}.
//
//
// A B
// ^
//
//
// If the parser is not in error recovery mode, the consumed symbol is added
// to the parse tree using {@link ParserRuleContext//addChild(Token)}, and
// {@link ParseTreeListener//visitTerminal} is called on any parse listeners.
// If the parser is in error recovery mode, the consumed symbol is
// added to the parse tree using
// {@link ParserRuleContext//addErrorNode(Token)}, and
// {@link ParseTreeListener//visitErrorNode} is called on any parse
// listeners.
//
Parser.prototype.consume = function() {
var o = this.getCurrentToken();
if (o.type !== Token.EOF) {
this.getInputStream().consume();
}
var hasListener = this._parseListeners !== null && this._parseListeners.length > 0;
if (this.buildParseTrees || hasListener) {
var node;
if (this._errHandler.inErrorRecoveryMode(this)) {
node = this._ctx.addErrorNode(o);
} else {
node = this._ctx.addTokenNode(o);
}
node.invokingState = this.state;
if (hasListener) {
this._parseListeners.map(function(listener) {
if (node instanceof ErrorNode || (node.isErrorNode !== undefined && node.isErrorNode())) {
listener.visitErrorNode(node);
} else if (node instanceof TerminalNode) {
listener.visitTerminal(node);
}
});
}
}
return o;
};
Parser.prototype.addContextToParseTree = function() {
// add current context to parent if we have a parent
if (this._ctx.parentCtx !== null) {
this._ctx.parentCtx.addChild(this._ctx);
}
};
// Always called by generated parsers upon entry to a rule. Access field
// {@link //_ctx} get the current context.
Parser.prototype.enterRule = function(localctx, state, ruleIndex) {
this.state = state;
this._ctx = localctx;
this._ctx.start = this._input.LT(1);
if (this.buildParseTrees) {
this.addContextToParseTree();
}
if (this._parseListeners !== null) {
this.triggerEnterRuleEvent();
}
};
Parser.prototype.exitRule = function() {
this._ctx.stop = this._input.LT(-1);
// trigger event on _ctx, before it reverts to parent
if (this._parseListeners !== null) {
this.triggerExitRuleEvent();
}
this.state = this._ctx.invokingState;
this._ctx = this._ctx.parentCtx;
};
Parser.prototype.enterOuterAlt = function(localctx, altNum) {
localctx.setAltNumber(altNum);
// if we have new localctx, make sure we replace existing ctx
// that is previous child of parse tree
if (this.buildParseTrees && this._ctx !== localctx) {
if (this._ctx.parentCtx !== null) {
this._ctx.parentCtx.removeLastChild();
this._ctx.parentCtx.addChild(localctx);
}
}
this._ctx = localctx;
};
// Get the precedence level for the top-most precedence rule.
//
// @return The precedence level for the top-most precedence rule, or -1 if
// the parser context is not nested within a precedence rule.
Parser.prototype.getPrecedence = function() {
if (this._precedenceStack.length === 0) {
return -1;
} else {
return this._precedenceStack[this._precedenceStack.length-1];
}
};
Parser.prototype.enterRecursionRule = function(localctx, state, ruleIndex,
precedence) {
this.state = state;
this._precedenceStack.push(precedence);
this._ctx = localctx;
this._ctx.start = this._input.LT(1);
if (this._parseListeners !== null) {
this.triggerEnterRuleEvent(); // simulates rule entry for
// left-recursive rules
}
};
//
// Like {@link //enterRule} but for recursive rules.
Parser.prototype.pushNewRecursionContext = function(localctx, state, ruleIndex) {
var previous = this._ctx;
previous.parentCtx = localctx;
previous.invokingState = state;
previous.stop = this._input.LT(-1);
this._ctx = localctx;
this._ctx.start = previous.start;
if (this.buildParseTrees) {
this._ctx.addChild(previous);
}
if (this._parseListeners !== null) {
this.triggerEnterRuleEvent(); // simulates rule entry for
// left-recursive rules
}
};
Parser.prototype.unrollRecursionContexts = function(parentCtx) {
this._precedenceStack.pop();
this._ctx.stop = this._input.LT(-1);
var retCtx = this._ctx; // save current ctx (return value)
// unroll so _ctx is as it was before call to recursive method
if (this._parseListeners !== null) {
while (this._ctx !== parentCtx) {
this.triggerExitRuleEvent();
this._ctx = this._ctx.parentCtx;
}
} else {
this._ctx = parentCtx;
}
// hook into tree
retCtx.parentCtx = parentCtx;
if (this.buildParseTrees && parentCtx !== null) {
// add return ctx into invoking rule's tree
parentCtx.addChild(retCtx);
}
};
Parser.prototype.getInvokingContext = function(ruleIndex) {
var ctx = this._ctx;
while (ctx !== null) {
if (ctx.ruleIndex === ruleIndex) {
return ctx;
}
ctx = ctx.parentCtx;
}
return null;
};
Parser.prototype.precpred = function(localctx, precedence) {
return precedence >= this._precedenceStack[this._precedenceStack.length-1];
};
Parser.prototype.inContext = function(context) {
// TODO: useful in parser?
return false;
};
//
// Checks whether or not {@code symbol} can follow the current state in the
// ATN. The behavior of this method is equivalent to the following, but is
// implemented such that the complete context-sensitive follow set does not
// need to be explicitly constructed.
//
//
// return getExpectedTokens().contains(symbol);
//
//
// @param symbol the symbol type to check
// @return {@code true} if {@code symbol} can follow the current state in
// the ATN, otherwise {@code false}.
Parser.prototype.isExpectedToken = function(symbol) {
var atn = this._interp.atn;
var ctx = this._ctx;
var s = atn.states[this.state];
var following = atn.nextTokens(s);
if (following.contains(symbol)) {
return true;
}
if (!following.contains(Token.EPSILON)) {
return false;
}
while (ctx !== null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) {
var invokingState = atn.states[ctx.invokingState];
var rt = invokingState.transitions[0];
following = atn.nextTokens(rt.followState);
if (following.contains(symbol)) {
return true;
}
ctx = ctx.parentCtx;
}
if (following.contains(Token.EPSILON) && symbol === Token.EOF) {
return true;
} else {
return false;
}
};
// Computes the set of input symbols which could follow the current parser
// state and context, as given by {@link //getState} and {@link //getContext},
// respectively.
//
// @see ATN//getExpectedTokens(int, RuleContext)
//
Parser.prototype.getExpectedTokens = function() {
return this._interp.atn.getExpectedTokens(this.state, this._ctx);
};
Parser.prototype.getExpectedTokensWithinCurrentRule = function() {
var atn = this._interp.atn;
var s = atn.states[this.state];
return atn.nextTokens(s);
};
// Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.//
Parser.prototype.getRuleIndex = function(ruleName) {
var ruleIndex = this.getRuleIndexMap()[ruleName];
if (ruleIndex !== null) {
return ruleIndex;
} else {
return -1;
}
};
// Return List<String> of the rule names in your parser instance
// leading up to a call to the current rule. You could override if
// you want more details such as the file/line info of where
// in the ATN a rule is invoked.
//
// this is very useful for error messages.
//
Parser.prototype.getRuleInvocationStack = function(p) {
p = p || null;
if (p === null) {
p = this._ctx;
}
var stack = [];
while (p !== null) {
// compute what follows who invoked us
var ruleIndex = p.ruleIndex;
if (ruleIndex < 0) {
stack.push("n/a");
} else {
stack.push(this.ruleNames[ruleIndex]);
}
p = p.parentCtx;
}
return stack;
};
// For debugging and other purposes.//
Parser.prototype.getDFAStrings = function() {
return this._interp.decisionToDFA.toString();
};
// For debugging and other purposes.//
Parser.prototype.dumpDFA = function() {
var seenOne = false;
for (var i = 0; i < this._interp.decisionToDFA.length; i++) {
var dfa = this._interp.decisionToDFA[i];
if (dfa.states.length > 0) {
if (seenOne) {
console.log();
}
this.printer.println("Decision " + dfa.decision + ":");
this.printer.print(dfa.toString(this.literalNames, this.symbolicNames));
seenOne = true;
}
}
};
/*
" printer = function() {\r\n" +
" this.println = function(s) { document.getElementById('output') += s + '\\n'; }\r\n" +
" this.print = function(s) { document.getElementById('output') += s; }\r\n" +
" };\r\n" +
*/
Parser.prototype.getSourceName = function() {
return this._input.sourceName;
};
// During a parse is sometimes useful to listen in on the rule entry and exit
// events as well as token matches. this is for quick and dirty debugging.
//
Parser.prototype.setTrace = function(trace) {
if (!trace) {
this.removeParseListener(this._tracer);
this._tracer = null;
} else {
if (this._tracer !== null) {
this.removeParseListener(this._tracer);
}
this._tracer = new TraceListener(this);
this.addParseListener(this._tracer);
}
};
exports.Parser = Parser;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
exports.utils = __webpack_require__(47);
exports.literal = __webpack_require__(423);
exports.parser = __webpack_require__(455);
exports.problem = __webpack_require__(527);
exports.type = __webpack_require__(358);
exports.argument = __webpack_require__(107);
exports.constraint = __webpack_require__(120);
exports.instance = __webpack_require__(147);
exports.grammar = __webpack_require__(444);
exports.declaration = __webpack_require__(155);
exports.expression = __webpack_require__(180);
exports.statement = __webpack_require__(393);
exports.java = __webpack_require__(464);
exports.csharp = __webpack_require__(481);
exports.runtime = __webpack_require__(529);
exports.error = __webpack_require__(535);
exports.value = __webpack_require__(452);
exports.memstore = __webpack_require__(536);
exports.store = __webpack_require__(537);
exports.internet = __webpack_require__(538);
exports.io = __webpack_require__(548);
exports.reader = __webpack_require__(551);
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
exports.equalObjects = __webpack_require__(48).equalObjects;
exports.equalArrays = __webpack_require__(48).equalArrays;
exports.arrayContains = __webpack_require__(48).arrayContains;
exports.ObjectList = __webpack_require__(49).ObjectList;
exports.ExpressionList = __webpack_require__(50).ExpressionList;
exports.CodeWriter = __webpack_require__(51).CodeWriter;
exports.TypeUtils = __webpack_require__(169).TypeUtils;
/***/ },
/* 48 */
/***/ function(module, exports) {
function equalObjects(o1, o2) {
o1 = o1 || null;
o2 = o2 || null;
if(o1===o2) {
return true;
}
if(o1===null || o2===null) {
return false;
}
return o1.equals(o2);
}
function equalArrays(o1, o2) {
o1 = o1 || null;
o2 = o2 || null;
if(o1===o2) {
return true;
}
if(o1===null || o2===null) {
return false;
}
if(o1.length !== o2.length) {
return false;
}
for(var i=0;i>> 6);
view[idx++] = 0x80 /* 128 */ + (c & 0x3f /* 63 */);
} else if (c < 0x10000 /* 65536 */) {
/* three bytes */
view[idx++] = 0xe0 /* 224 */ + (c >>> 12);
view[idx++] = 0x80 /* 128 */ + ((c >>> 6) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + (c & 0x3f /* 63 */);
} else if (c < 0x200000 /* 2097152 */) {
/* four bytes */
view[idx++] = 0xf0 /* 240 */ + (c >>> 18);
view[idx++] = 0x80 /* 128 */ + ((c >>> 12) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 6) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + (c & 0x3f /* 63 */);
} else if (c < 0x4000000 /* 67108864 */) {
/* five bytes */
view[idx++] = 0xf8 /* 248 */ + (c >>> 24);
view[idx++] = 0x80 /* 128 */ + ((c >>> 18) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 12) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 6) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + (c & 0x3f /* 63 */);
} else /* if (c <= 0x7fffffff) */ { /* 2147483647 */
/* six bytes */
view[idx++] = 0xfc /* 252 */ + /* (c >>> 30) may be not safe in ECMAScript! So...: */ (c / 1073741824);
view[idx++] = 0x80 /* 128 */ + ((c >>> 24) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 18) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 12) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + ((c >>> 6) & 0x3f /* 63 */);
view[idx++] = 0x80 /* 128 */ + (c & 0x3f /* 63 */);
}
});
return buffer;
}
function utf8BufferToString(buffer) {
if(buffer instanceof ArrayBuffer)
buffer = new Uint8Array(buffer);
var chars = [];
var idx = 0;
while(idx 251 && byte < 254 && idx + 5 < buffer.length) {
/* (byte - 252 << 30) may be not safe in ECMAScript! So...: */
/* six bytes */
code = (byte - 252) * 1073741824 + (buffer[idx + 1] - 128 << 24) + (buffer[idx + 2] - 128 << 18)
+ (buffer[idx + 3] - 128 << 12) + (buffer[idx + 4] - 128 << 6) + buffer[idx + 5] - 128;
idx += 6;
} else if (byte > 247 && byte < 252 && idx + 4 < buffer.length) {
/* five bytes */
code = (byte - 248 << 24) + (buffer[idx + 1] - 128 << 18) + (buffer[idx + 2] - 128 << 12)
+ (buffer[idx + 3] - 128 << 6) + buffer[idx + 4] - 128;
idx += 5;
} else if (byte > 239 && byte < 248 && idx + 3 < buffer.length) {
/* four bytes */
code = (byte - 240 << 18) + (buffer[idx + 1] - 128 << 12) + (buffer[idx + 2] - 128 << 6)
+ buffer[idx + 3] - 128;
idx += 4;
} else if (byte > 223 && byte < 240 && idx + 2 < buffer.length) {
/* three bytes */
code = (byte - 224 << 12) + (buffer[idx + 1] - 128 << 6) + buffer[idx + 2] - 128;
idx += 3;
} else if (byte > 191 && byte < 224 && idx + 1 < buffer.length) {
/* two bytes */
code = (byte - 192 << 6) + buffer[idx + 1] - 128;
idx += 2;
} else {
/* one byte */
code = byte;
idx += 1;
}
chars.push(String.fromCharCode(code));
}
return chars.join("");
};
function mergeObjects() {
var res = {};
[].map.call(arguments, function(o) {
Object.getOwnPropertyNames(o).map(function(n) {
res[n] = o[n];
});
});
return res;
}
exports.mergeObjects = mergeObjects;
exports.equalObjects = equalObjects;
exports.equalArrays = equalArrays;
exports.arrayContains = arrayContains;
exports.removeAccents = removeAccents;
exports.getUtf8StringLength = getUtf8StringLength;
exports.getUtf8CharLength = getUtf8CharLength;
exports.stringToUtf8Buffer = stringToUtf8Buffer;
exports.utf8BufferToString = utf8BufferToString;
/***/ },
/* 49 */
/***/ function(module, exports) {
function ObjectList(items, item) {
Array.call(this);
items = items || null;
if(items!==null) {
this.addAll(items);
}
item = item || null;
if(item!==null) {
this.add(item);
}
return this;
}
ObjectList.prototype = Object.create(Array.prototype);
ObjectList.prototype.constructor = ObjectList;
ObjectList.prototype.addAll = function(items) {
this.push.apply(this, items);
};
ObjectList.prototype.add = function(item) {
if(item)
this.push(item);
};
ObjectList.prototype.insert = function(before, item) {
this.splice(0, 0, item);
};
ObjectList.prototype.remove = function(index) {
this.splice(index, 1);
};
ObjectList.prototype.toString = function() {
return this.join(", ");
};
exports.ObjectList = ObjectList;
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
var ObjectList = __webpack_require__(49).ObjectList;
function ExpressionList(items, item) {
ObjectList.call(this, items, item);
return this;
}
ExpressionList.prototype = Object.create(ObjectList.prototype);
ExpressionList.prototype.constructor = ExpressionList;
ExpressionList.prototype.toDialect = function(writer) {
if (this.length > 0) {
for (var i = 0; i < this.length; i++) {
this[i].toDialect(writer);
writer.append(", ");
}
writer.trimLast(2);
}
};
exports.ExpressionList = ExpressionList;
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
var Context = __webpack_require__(52).Context;
function Indenter() {
this.value = "";
this.indents = "";
this.isStartOfLine = true;
return this;
}
Indenter.prototype.appendTabsIfRequired = function(s) {
if(this.isStartOfLine) {
this.value += this.indents;
}
this.isStartOfLine = s.charAt(s.length-1)=='\n';
};
Indenter.prototype.append = function(s) {
this.value += s;
};
Indenter.prototype.trimLast = function(count) {
this.value = this.value.substring(0, this.value.length - count);
};
Indenter.prototype.indent = function() {
this.indents += '\t';
};
Indenter.prototype.dedent = function() {
if(this.indents.length==0) {
throw new Exception("Illegal dedent!");
}
this.indents = this.indents.slice(1);
};
function CodeWriter(dialect, context, indenter) {
this.dialect = dialect;
this.context = context || Context.newGlobalContext();
this.indenter = indenter || new Indenter();
return this;
}
CodeWriter.prototype.isGlobalContext = function() {
return this.context.isGlobalContext();
};
CodeWriter.prototype.append = function(s) {
this.indenter.appendTabsIfRequired(s);
this.indenter.append(s);
};
CodeWriter.prototype.toString = function() {
return this.indenter.value;
};
CodeWriter.prototype.trimLast = function(count) {
this.indenter.trimLast(count);
};
CodeWriter.prototype.indent = function() {
this.indenter.indent();
};
CodeWriter.prototype.dedent = function() {
this.indenter.dedent();
};
CodeWriter.prototype.newLine = function() {
this.append('\n');
};
CodeWriter.prototype.newLocalWriter = function() {
return new CodeWriter(this.dialect, this.context.newLocalContext(), this.indenter);
};
CodeWriter.prototype.newInstanceWriter = function(type) {
return new CodeWriter(this.dialect, this.context.newInstanceContext(null, type), this.indenter);
};
CodeWriter.prototype.newMemberWriter = function() {
var context = this.context.newLocalContext ();
context.parent = this.context;
return new CodeWriter (this.dialect, context, this.indenter);
};
CodeWriter.prototype.toDialect = function(o) {
this.dialect.toDialect(this, o);
};
exports.CodeWriter = CodeWriter
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
var EnumeratedCategoryDeclaration = __webpack_require__(53).EnumeratedCategoryDeclaration;
var EnumeratedNativeDeclaration = __webpack_require__(157).EnumeratedNativeDeclaration;
var ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
var BaseMethodDeclaration = __webpack_require__(133).BaseMethodDeclaration;
var TestMethodDeclaration = __webpack_require__(158).TestMethodDeclaration;
var CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
var AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
var ContextualExpression = __webpack_require__(136).ContextualExpression;
var MethodExpression = __webpack_require__(224).MethodExpression;
var ConcreteInstance = __webpack_require__(187).ConcreteInstance;
var ExpressionValue = __webpack_require__(199).ExpressionValue;
var ProblemListener = __webpack_require__(117).ProblemListener;
var DecimalType = __webpack_require__(80).DecimalType;
var Decimal = __webpack_require__(79).Decimal;
var Integer = __webpack_require__(78).Integer;
var Variable = __webpack_require__(88).Variable;
var LinkedValue = __webpack_require__(204).LinkedValue;
function Context() {
this.globals = null;
this.calling = null;
this.parent = null; // for inner methods
this.debugger = null;
this.declarations = {};
this.tests = {};
this.instances = {};
this.values = {};
this.nativeBindings = {};
this.problemListener = new ProblemListener();
return this;
}
Context.newGlobalContext = function() {
var context = new Context();
context.globals = context;
context.calling = null;
context.parent = null;
context.debugger = null;
return context;
};
Context.prototype.isGlobalContext = function() {
return this===this.globals;
};
Context.prototype.getCallingContext = function() {
return this.calling;
};
Context.prototype.getParentMostContext = function() {
if(this.parent==null) {
return this;
} else {
return this.parent.getParentMostContext();
}
};
Context.prototype.getParentContext = function() {
return this.parent;
}
Context.prototype.setParentContext = function(parent) {
this.parent = parent;
}
Context.prototype.newResourceContext = function() {
var context = new ResourceContext();
context.globals = this.globals;
context.calling = this.calling;
context.parent = this;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.newLocalContext = function() {
var context = new Context();
context.globals = this.globals;
context.calling = this;
context.parent = null;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.newDocumentContext = function(doc, isChild) {
var context = new DocumentContext(doc);
context.globals = this.globals;
context.calling = isChild ? this.calling : this;
context.parent = isChild ? this : null;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.newBuiltInContext = function(value) {
var context = new BuiltInContext(value);
context.globals = this.globals;
context.calling = this;
context.parent = null;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.newInstanceContext = function(instance, type) {
var context = new InstanceContext(instance, type);
context.globals = this.globals;
context.calling = this;
context.parent = null;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.newChildContext = function() {
var context = new Context();
context.globals = this.globals;
context.calling = this.calling;
context.parent = this;
context.debugger = this.debugger;
context.problemListener = this.problemListener;
return context;
};
Context.prototype.clone = function() {
var context = new Context();
context.globals = context;
context.calling = null;
context.parent = null;
context.debugger = null;
// copy from
context.declarations = Object.create(this.declarations);
context.tests = Object.create(this.tests);
context.instances = Object.create(this.instances);
context.values = Object.create(this.values);
context.nativeBindings = Object.create(this.nativeBindings);
return context;
};
Context.prototype.getCatalog = function() {
if (this != this.globals)
return this.globals.getCatalog();
else
return this.getLocalCatalog();
};
Context.prototype.getLocalCatalog = function() {
var catalog = { attributes : [], methods : [], categories : [], enumerations : [], tests : []};
for(var name in this.declarations) {
var decl = this.declarations[name];
if(decl instanceof AttributeDeclaration)
catalog.attributes.push(name);
else if(decl instanceof EnumeratedCategoryDeclaration)
catalog.enumerations.push(name);
else if(decl instanceof EnumeratedNativeDeclaration)
catalog.enumerations.push(name);
else if(decl instanceof CategoryDeclaration)
catalog.categories.push(name);
else if(decl instanceof MethodDeclarationMap) {
var method = {};
method.name = decl.name;
method.protos = [];
for (var proto in decl.protos) {
var main = decl.protos[proto].isEligibleAsMain();
method.protos.push({proto: proto, main: main});
}
catalog.methods.push(method);
}
}
for(var name in this.tests)
catalog.tests.push(name);
// minimize for UI optimization
if(!catalog.attributes.length)
delete catalog.attributes;
if(!catalog.methods.length)
delete catalog.methods;
if(!catalog.categories.length)
delete catalog.categories;
if(!catalog.tests.length)
delete catalog.tests;
return catalog;
};
Context.prototype.findAttribute = function(name) {
if(this==this.globals)
return this.declarations[name] || null;
else
return this.globals.findAttribute(name);
};
Context.prototype.getAllAttributes = function() {
if(this==this.globals) {
var list = [];
for(var name in this.declarations) {
if(this.declarations[name] instanceof AttributeDeclaration)
list.push(this.declarations[name]);
}
return list;
} else
return this.globals.getAllAttributes();
};
Context.prototype.getRegistered = function(name) {
// resolve upwards, since local names override global ones
var actual = this.declarations[name] || null;
if(actual!==null) {
return actual;
}
actual = this.instances[name] || null;
if(actual!==null) {
return actual;
} else if(this.parent!==null) {
return this.parent.getRegistered(name);
} else if(this.globals!==this) {
return this.globals.getRegistered(name);
} else {
return null;
}
};
Context.prototype.getRegisteredDeclaration = function(name) {
// resolve upwards, since local names override global ones
var actual = this.declarations[name] || null;
if(actual!==null) {
return actual;
} else if(this.parent!==null) {
return this.parent.getRegisteredDeclaration(name);
} else if(this.globals!==this) {
return this.globals.getRegisteredDeclaration(name);
} else {
return null;
}
}
Context.prototype.registerDeclaration = function(declaration) {
if(this.checkDuplicate(declaration))
this.declarations[declaration.name] = declaration;
};
Context.prototype.checkDuplicate = function(declaration) {
var actual = this.getRegistered(declaration.name) || null;
if (actual != null)
this.problemListener.reportDuplicate(declaration.name, declaration);
return actual == null;
}
Context.prototype.unregisterTestDeclaration = function(declaration) {
delete this.tests[declaration.name];
};
Context.prototype.unregisterMethodDeclaration = function(declaration, proto) {
var map = this.declarations[declaration.name];
if(map && map.unregister(proto))
delete this.declarations[declaration.name];
};
Context.prototype.unregisterDeclaration = function(declaration) {
delete this.declarations[declaration.name];
};
Context.prototype.registerMethodDeclaration = function(declaration) {
var actual = this.checkDuplicateMethod(declaration);
if (actual === null) {
actual = new MethodDeclarationMap(declaration.name);
this.declarations[declaration.name] = actual;
}
actual.register(declaration, this);
};
Context.prototype.checkDuplicateMethod = function(declaration) {
var actual = this.getRegistered(declaration.name) || null;
if (actual !== null && !(actual instanceof MethodDeclarationMap))
this.problemListener.reportDuplicate(declaration.name, declaration);
return actual;
};
Context.prototype.registerTestDeclaration = function(declaration) {
var actual = this.tests[declaration.name] || null;
if(actual!==null)
this.problemListener.reportDuplicate(declaration.name, declaration);
this.tests[declaration.name] = declaration;
};
Context.prototype.getRegisteredTest = function(name) {
// resolve upwards, since local names override global ones
var actual = this.tests[name] || null;
if(actual!==null) {
return actual;
} else if(this.parent!==null) {
return this.parent.getRegisteredTest(name);
} else if(this.globals!==this) {
return this.globals.getRegisteredTest(name);
} else {
return null;
}
};
Context.prototype.hasTests = function() {
for(var test in this.tests)
return true;
return false;
};
Context.prototype.registerNativeBinding = function(type, declaration) {
if(this==this.globals)
this.nativeBindings[type] = declaration;
else
this.globals.registerNativeBinding(type, declaration);
};
Context.prototype.getNativeBinding = function(type) {
if(this==this.globals)
return this.nativeBindings[type] || null;
else
return this.globals.getNativeBinding(type);
};
function MethodDeclarationMap(name) {
this.name = name;
this.protos = {};
return this;
}
MethodDeclarationMap.prototype.register = function(declaration, context) {
var proto = declaration.getProto();
var current = this.protos[proto] || null;
if(current!==null)
context.problemListener.reportDuplicate(declaration.name, declaration);
this.protos[proto] = declaration;
};
MethodDeclarationMap.prototype.unregister = function(proto) {
delete this.protos[proto];
return Object.getOwnPropertyNames(this.protos).length == 0;
};
MethodDeclarationMap.prototype.registerIfMissing = function(declaration,context) {
var proto = declaration.getProto();
if(!(proto in this.protos)) {
this.protos[proto] = declaration;
}
};
MethodDeclarationMap.prototype.getFirst = function() {
for(var proto in this.protos) {
return this.protos[proto];
}
};
Context.prototype.getRegisteredValue = function(name) {
var context = this.contextForValue(name);
if (context == null)
return null;
else
return context.readRegisteredValue(name);
};
Context.prototype.readRegisteredValue = function(name) {
return this.instances[name] || null;
};
Context.prototype.registerValue = function(value, checkDuplicate) {
if(checkDuplicate === undefined)
checkDuplicate = true;
if(checkDuplicate) {
// only explore current context
var actual = this.instances[value.name] || null;
if(actual!==null)
this.problemListener.reportDuplicateVariable(value.id);
}
this.instances[value.name] = value;
};
Context.prototype.unregisterValue = function(value) {
delete this.instances[value.name];
};
Context.prototype.hasValue = function(id) {
return this.contextForValue(id.name)!=null;
};
Context.prototype.getValue = function(id) {
var context = this.contextForValue(id.name);
if(context===null)
this.problemListener.reportUnknownVariable(id);
return context.readValue(id);
};
Context.prototype.readValue = function(id) {
var value = this.values[id.name] || null;
if(value===null)
this.problemListener.reportEmptyVariable(id);
if(value instanceof LinkedValue)
return value.context.getValue(id);
else
return value;
};
Context.prototype.setValue = function(id, value) {
var context = this.contextForValue(id.name);
if(context===null)
this.problemListener.reportUnknownVariable(id);
context.writeValue(id, value);
};
Context.prototype.writeValue = function(id, value) {
value = this.autocast(id.name, value);
var current = this.values[id.name];
if(current instanceof LinkedValue)
current.context.setValue(id, value);
else
this.values[id.name] = value;
};
Context.prototype.autocast = function(name, value) {
if(value!=null && value instanceof Integer) {
var actual = this.instances[name];
if(actual.getType(this)==DecimalType.instance)
value = new Decimal(value.DecimalValue());
}
return value;
};
Context.prototype.contextForValue = function(name) {
// resolve upwards, since local names override global ones
var actual = this.instances[name] || null;
if(actual!==null) {
return this;
} else if(this.parent!==null) {
return this.parent.contextForValue(name);
} else if(this.globals!==this) {
return this.globals.contextForValue(name);
} else {
return null;
}
};
Context.prototype.contextForDeclaration = function(name) {
// resolve upwards, since local names override global ones
var actual = this.declarations[name] || null;
if(actual!==null) {
return this;
} else if(this.parent!==null) {
return this.parent.contextForDeclaration(name);
} else if(this.globals!==this) {
return this.globals.contextForDeclaration(name);
} else {
return null;
}
};
function ResourceContext() {
Context.call(this);
return this;
}
ResourceContext.prototype = Object.create(Context.prototype);
ResourceContext.prototype.constructor = ResourceContext;
function InstanceContext(instance, type) {
Context.call(this);
this.instance = instance || null;
this.instanceType = type!=null ? type : instance.type;
return this;
}
InstanceContext.prototype = Object.create(Context.prototype);
InstanceContext.prototype.constructor = InstanceContext;
InstanceContext.prototype.readRegisteredValue = function(name) {
var actual = this.instances[name];
// not very pure, but avoids a lot of complexity when registering a value
if(actual==null) {
var attr = this.getRegisteredDeclaration(name);
var type = attr.getType();
actual = new Variable(name, type);
this.instances[name] = actual;
}
return actual;
};
InstanceContext.prototype.contextForValue = function(name) {
// params and variables have precedence over members
// so first look in context values
var context = Context.prototype.contextForValue.call(this, name);
if(context!=null) {
return context;
} else if(this.getDeclaration().hasAttribute(this, name)) {
return this;
} else {
return null;
}
};
InstanceContext.prototype.getDeclaration = function() {
if(this.instance!=null)
return this.instance.declaration;
else
return this.getRegisteredDeclaration(this.instanceType.name);
};
InstanceContext.prototype.readValue = function(id) {
return this.instance.getMemberValue(this.calling, id.name);
};
InstanceContext.prototype.writeValue = function(id, value) {
this.instance.setMember(this.calling, id.name, value);
};
function BuiltInContext(value) {
Context.call(this);
this.value = value;
return this;
}
BuiltInContext.prototype = Object.create(Context.prototype);
BuiltInContext.prototype.constructor = BuiltInContext;
function DocumentContext(document) {
Context.call(this);
this.document = document;
return this;
}
DocumentContext.prototype = Object.create(Context.prototype);
DocumentContext.prototype.constructor = DocumentContext;
DocumentContext.prototype.contextForValue = function(name) {
// params and variables have precedence over members
// so first look in context values
var context = Context.prototype.contextForValue.call(this, name);
if (context != null)
return context;
// since any name is valid in the context of a document
// simply return this document context
else
return this;
};
DocumentContext.prototype.readValue = function(name) {
return this.document.getMemberValue(this.calling, name);
};
DocumentContext.prototype.writeValue = function(name) {
this.document.setMember(this.calling, name, value);
};
Context.prototype.enterMethod = function(method) {
if(this.debugger!=null) {
this.debugger.enterMethod(this, method);
}
};
Context.prototype.leaveMethod = function(method) {
if(this.debugger!=null) {
this.debugger.leaveMethod(this, method);
}
};
Context.prototype.enterStatement = function(statement) {
if(this.debugger!=null) {
this.debugger.enterStatement(this, statement);
}
};
Context.prototype.leaveStatement = function(statement) {
if(this.debugger!=null) {
this.debugger.leaveStatement(this, statement);
}
};
Context.prototype.terminated = function() {
if (this.debugger != null) {
this.debugger.terminated();
}
};
Context.prototype.loadSingleton = function(type) {
if(this==this.globals) {
var value = this.values[type.name] || null;
if(value==null) {
var decl = this.declarations[type.name] || null;
if(!(decl instanceof ConcreteCategoryDeclaration))
throw new InternalError("No such singleton:" + type.name);
value = new ConcreteInstance(this, decl);
value.mutable = true; // a singleton is protected by "with x do", so always mutable in that context
this.values[type.name] = value;
}
if(value instanceof ConcreteInstance)
return value;
else
throw new InternalError("Not a concrete instance:" + value);
} else
return this.globals.loadSingleton(type);
};
exports.Context = Context;
exports.BuiltInContext = BuiltInContext;
exports.InstanceContext = InstanceContext;
exports.ResourceContext = ResourceContext;
exports.MethodDeclarationMap = MethodDeclarationMap;
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
var EnumeratedCategoryType = __webpack_require__(89).EnumeratedCategoryType;
function EnumeratedCategoryDeclaration(id, attrs, derived, symbols) {
ConcreteCategoryDeclaration.call(this, id, attrs, derived, null);
this.setSymbols(symbols);
return this;
}
EnumeratedCategoryDeclaration.prototype = Object.create(ConcreteCategoryDeclaration.prototype);
EnumeratedCategoryDeclaration.prototype.constructor = EnumeratedCategoryDeclaration;
EnumeratedCategoryDeclaration.prototype.getDeclarationType = function() {
return "Enumerated";
};
EnumeratedCategoryDeclaration.prototype.unregister = function(context) {
context.unregisterDeclaration (this);
this.symbols.forEach(function(symbol) {
symbol.unregister(context);
});
};
EnumeratedCategoryDeclaration.prototype.hasAttribute = function(context, name) {
if("name"==name)
return true;
else
return ConcreteCategoryDeclaration.prototype.hasAttribute.call(this, context, name);
};
EnumeratedCategoryDeclaration.prototype.setSymbols = function(symbols) {
this.symbols = symbols;
var type = new EnumeratedCategoryType(this.id);
this.symbols.forEach(function(symbol) {
symbol.type = type;
});
};
EnumeratedCategoryDeclaration.prototype.register = function(context) {
context.registerDeclaration(this);
this.symbols.forEach(function(symbol) {
symbol.register(context);
});
};
EnumeratedCategoryDeclaration.prototype.check = function(context) {
ConcreteCategoryDeclaration.prototype.check.call(this, context);
this.symbols.forEach(function(symbol) {
symbol.check(context);
});
return this.getType(context);
};
EnumeratedCategoryDeclaration.prototype.getType = function(context) {
return new EnumeratedCategoryType(this.id);
};
EnumeratedCategoryDeclaration.prototype.toODialect = function(writer) {
writer.append("enumerated category ");
writer.append(this.name);
if(this.attributes!=null) {
writer.append('(');
this.attributes.toDialect(writer, true);
writer.append(")");
}
if(this.derivedFrom!=null) {
writer.append(" extends ");
this.derivedFrom.toDialect(writer, true);
}
writer.append(" {\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append(";\n");
});
writer.dedent();
writer.append("}\n");
}
EnumeratedCategoryDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as enumerated ");
if(this.derivedFrom!=null)
this.derivedFrom.toDialect(writer, true);
else
writer.append("category");
if(this.attributes!=null && this.attributes.length>0) {
if(this.attributes.length==1)
writer.append(" with attribute ");
else
writer.append(" with attributes ");
this.attributes.toDialect(writer, true);
if(this.symbols!=null && this.symbols.length>0)
writer.append(", and symbols:\n");
} else
writer.append(" with symbols:\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append("\n");
});
writer.dedent();
}
EnumeratedCategoryDeclaration.prototype.toMDialect = function(writer) {
writer.append("enum ");
writer.append(this.name);
writer.append("(");
if(this.derivedFrom!=null) {
this.derivedFrom.toDialect(writer, false);
if(this.attributes!=null && this.attributes.length>0)
writer.append(", ");
}
if(this.attributes!=null && this.attributes.length>0)
this.attributes.toDialect(writer, false);
writer.append("):\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append("\n");
});
writer.dedent();
}
exports.EnumeratedCategoryDeclaration = EnumeratedCategoryDeclaration;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
var CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
var SetterMethodDeclaration = __webpack_require__(177).SetterMethodDeclaration;
var GetterMethodDeclaration = __webpack_require__(176).GetterMethodDeclaration;
var MethodDeclarationMap = null;
var ConcreteInstance = __webpack_require__(187).ConcreteInstance;
var mergeObjects = __webpack_require__(48).mergeObjects;
exports.resolve = function() {
MethodDeclarationMap = __webpack_require__(52).MethodDeclarationMap;
}
function ConcreteCategoryDeclaration(id, attributes, derivedFrom, methods) {
CategoryDeclaration.call(this, id, attributes);
this.derivedFrom = derivedFrom || null;
this.methodsMap = null;
this.methods = methods || [];
return this;
}
ConcreteCategoryDeclaration.prototype = Object.create(CategoryDeclaration.prototype);
ConcreteCategoryDeclaration.prototype.constructor = ConcreteCategoryDeclaration;
ConcreteCategoryDeclaration.prototype.toEDialect = function(writer) {
var hasMethods = this.methods!=null && this.methods.length>0;
this.protoToEDialect(writer, hasMethods, false); // no bindings
if(hasMethods)
this.methodsToEDialect(writer, this.methods);
}
ConcreteCategoryDeclaration.prototype.categoryTypeToEDialect = function(writer) {
if(this.derivedFrom==null)
writer.append("category");
else
this.derivedFrom.toDialect(writer, true);
};
ConcreteCategoryDeclaration.prototype.toODialect = function(writer) {
var hasMethods = this.methods!=null && this.methods.length>0;
this.allToODialect(writer, hasMethods);
};
ConcreteCategoryDeclaration.prototype.categoryTypeToODialect = function(writer) {
writer.append("category");
};
ConcreteCategoryDeclaration.prototype.categoryExtensionToODialect = function(writer) {
if(this.derivedFrom!=null) {
writer.append(" extends ");
this.derivedFrom.toDialect(writer, true);
}
};
ConcreteCategoryDeclaration.prototype.bodyToODialect = function(writer) {
this.methodsToODialect (writer, this.methods);
};
ConcreteCategoryDeclaration.prototype.toMDialect = function(writer) {
this.protoToMDialect(writer, this.derivedFrom);
this.methodsToMDialect(writer);
};
ConcreteCategoryDeclaration.prototype.categoryTypeToMDialect = function(writer) {
writer.append("class");
};
ConcreteCategoryDeclaration.prototype.methodsToMDialect = function(writer) {
writer.indent();
if(this.methods==null || this.methods.length==0)
writer.append("pass\n");
else {
writer.newLine();
this.methods.forEach(function(method) {
var w = writer.newMemberWriter();
method.toDialect(w);
writer.newLine();
});
}
writer.dedent();
};
ConcreteCategoryDeclaration.prototype.hasAttribute = function(context, name) {
if (CategoryDeclaration.prototype.hasAttribute.call(this, context, name)) {
return true;
} else {
return this.hasDerivedAttribute(context, name);
}
};
ConcreteCategoryDeclaration.prototype.hasDerivedAttribute = function(context, name) {
if(this.derivedFrom==null) {
return false;
}
for(var i=0;i=0;
};
CategoryDeclaration.prototype.hasMethod = function(context, key, object) {
return false;
};
CategoryDeclaration.prototype.isDerivedFrom = function(context, categoryType) {
return false;
};
CategoryDeclaration.prototype.checkConstructorContext = function(context) {
// nothing to do
};
CategoryDeclaration.prototype.toDialect = function(writer) {
var type = this.getType(writer.context);
writer = writer.newInstanceWriter(type);
writer.toDialect(this);
};
CategoryDeclaration.prototype.protoToEDialect = function(writer, hasMethods, hasBindings) {
var hasAttributes = this.attributes!=null && this.attributes.length>0;
writer.append("define ");
writer.append(this.name);
writer.append(" as ");
if(this.storable)
writer.append("storable ");
this.categoryTypeToEDialect(writer);
if(hasAttributes) {
if(this.attributes.length==1)
writer.append(" with attribute ");
else
writer.append(" with attributes ");
this.attributes.toDialect(writer, true);
}
if(hasMethods) {
if(hasAttributes)
writer.append(", and methods:");
else
writer.append(" with methods:");
} else if (hasBindings) {
if(hasAttributes)
writer.append(", and bindings:");
else
writer.append(" with bindings:");
}
writer.newLine();
};
CategoryDeclaration.prototype.methodsToEDialect = function(writer, methods) {
writer.indent();
methods.forEach(function(method) {
writer.newLine();
var w = writer.newMemberWriter();
method.toDialect(w);
});
writer.dedent();
};
CategoryDeclaration.prototype.methodsToODialect = function(writer, methods) {
methods.forEach(function(method) {
var w = writer.newMemberWriter();
method.toDialect(w);
w.newLine();
});
}
CategoryDeclaration.prototype.allToODialect = function(writer, hasBody) {
if(this.storable)
writer.append("storable ");
this.categoryTypeToODialect(writer);
writer.append(" ");
writer.append(this.name);
if(this.attributes!=null) {
writer.append('(');
this.attributes.toDialect(writer, true);
writer.append(')');
}
this.categoryExtensionToODialect(writer);
if(hasBody) {
writer.append(" {\n");
writer.newLine();
writer.indent();
this.bodyToODialect(writer);
writer.dedent();
writer.append('}');
writer.newLine();
} else
writer.append(';');
};
CategoryDeclaration.prototype.categoryExtensionToODialect = function(writer) {
// by default no extension
};
CategoryDeclaration.prototype.protoToMDialect = function(writer, derivedFrom) {
if(this.storable)
writer.append("storable ");
this.categoryTypeToMDialect(writer);
writer.append(" ");
writer.append(this.name);
writer.append("(");
if(this.derivedFrom!=null) {
this.derivedFrom.toDialect(writer, false);
if(this.attributes!=null)
writer.append(", ");
}
if(this.attributes!=null)
this.attributes.toDialect(writer, false);
writer.append("):\n");
};
exports.CategoryDeclaration = CategoryDeclaration;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
var BaseDeclaration = __webpack_require__(57).BaseDeclaration;
var InternalError = __webpack_require__(60).InternalError;
var ContainerType = __webpack_require__(62).ContainerType;
var AttributeInfo = __webpack_require__(208).AttributeInfo;
var Value = __webpack_require__(73).Value;
function AttributeDeclaration(id, type, constraint, indexTypes) {
BaseDeclaration.call(this, id);
this.type = type;
this.constraint = constraint;
this.indexTypes = indexTypes;
this.storable = false;
return this;
}
AttributeDeclaration.prototype = Object.create(BaseDeclaration.prototype);
AttributeDeclaration.prototype.constructor = AttributeDeclaration;
AttributeDeclaration.prototype.getDeclarationType = function() {
return "Attribute";
};
AttributeDeclaration.prototype.getType = function() {
return this.type;
};
AttributeDeclaration.prototype.toString = function() {
return this.name + ':' + this.type.toString();
};
AttributeDeclaration.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
AttributeDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as ");
if(this.storable)
writer.append("storable ");
this.type.toDialect(writer);
writer.append(" attribute");
if (this.constraint != null)
this.constraint.toDialect(writer);
if (this.indexTypes != null) {
writer.append(" with ");
this.indexTypes.toDialect(writer, true);
writer.append(" index");
}
};
AttributeDeclaration.prototype.toODialect = function(writer) {
if(this.storable)
writer.append("storable ");
writer.append("attribute ");
writer.append(this.name);
writer.append(" : ");
this.type.toDialect(writer);
if (this.constraint != null)
this.constraint.toDialect(writer);
if (this.indexTypes != null) {
writer.append(" with index")
if (this.indexTypes.length > 0) {
writer.append(" (");
this.indexTypes.toDialect(writer, false);
writer.append(')');
}
}
writer.append(';');
};
AttributeDeclaration.prototype.toMDialect = function(writer) {
if(this.storable)
writer.append("storable ");
writer.append("attr ");
writer.append(this.name);
writer.append(" ( ");
this.type.toDialect(writer);
writer.append(" ):\n");
writer.indent();
if (this.constraint != null)
this.constraint.toDialect(writer);
if (this.indexTypes != null) {
if (this.constraint != null)
writer.newLine();
writer.append("index (");
this.indexTypes.toDialect(writer, false);
writer.append(')');
}
if (this.constraint ==null && this.indexTypes ==null)
writer.append("pass");
writer.dedent();
};
AttributeDeclaration.prototype.register = function(context) {
context.registerDeclaration(this);
};
AttributeDeclaration.prototype.check = function(context) {
this.type.checkExists(context);
return this.type;
};
AttributeDeclaration.prototype.checkValue = function(context, expression) {
var value = expression.interpret(context);
if(this.constraint==null) {
return value;
}
this.constraint.checkValue(context, value);
return value;
};
AttributeDeclaration.prototype.getAttributeInfo = function() {
var collection = this.type instanceof ContainerType;
var family = collection ? this.type.itemType.family : this.type.family;
return new AttributeInfo(this.name, family, collection, this.indexTypes);
};
exports.AttributeDeclaration = AttributeDeclaration;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
function BaseDeclaration(id) {
Section.call(this);
this.id = id;
this.comments = null;
return this;
}
BaseDeclaration.prototype = Object.create(Section.prototype);
BaseDeclaration.prototype.constructor = BaseDeclaration;
Object.defineProperty(BaseDeclaration.prototype, "name", {
get : function() {
return this.id.name;
}
});
BaseDeclaration.prototype.unregister = function(context) {
context.unregisterDeclaration (this);
};
BaseDeclaration.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
exports.BaseDeclaration = BaseDeclaration;
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
var Location = __webpack_require__(59).Location;
function Section(section) {
if(!section)
section = { path : "", start : null, end : null, dialect : null, breakpoint : null };
this.copySectionFrom(section);
return this;
}
Section.prototype.copySectionFrom = function(section) {
this.path = section.path;
this.start = section.start;
this.end = section.end;
this.dialect = section.dialect;
this.breakpoint = section.breakpoint;
};
Section.prototype.setSectionFrom = function(path, start, end, dialect) {
this.path = path;
this.start = new Location(start);
this.end = new Location(end, true);
this.dialect = dialect;
this.breakpoint = false;
};
exports.Section = Section;
/***/ },
/* 59 */
/***/ function(module, exports) {
function Location(token, isEnd) {
this.index = token.startIndex;
this.line = token.line;
this.column = token.column;
if(isEnd && token.text!==null) {
this.index += token.text.length;
this.column += token.text.length;
}
}
exports.Location = Location;
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
var PromptoError = __webpack_require__(61).PromptoError;
function InternalError(message) {
PromptoError.call(this, message);
return this;
}
InternalError.prototype = Object.create(InternalError.prototype);
InternalError.prototype.constructor = InternalError;
exports.InternalError = InternalError;
/***/ },
/* 61 */
/***/ function(module, exports) {
function PromptoError() {
var tmp = Error.apply(this, arguments);
this.message = tmp.message
tmp.name = this.name = 'PromptoError'
Object.defineProperty(this, "stack", {
get: function () {
return tmp.stack
}
});
return this;
}
exports.PromptoError = PromptoError;
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
var IterableType = __webpack_require__(63).IterableType;
var BooleanType = __webpack_require__(69).BooleanType;
function ContainerType(id, itemType) {
IterableType.call(this, id);
this.itemType = itemType;
return this;
}
ContainerType.prototype = Object.create(IterableType.prototype);
ContainerType.prototype.constructor = ContainerType;
ContainerType.prototype.checkContains = function(context, other) {
if(other.isAssignableFrom(context, this.itemType)) {
return BooleanType.instance;
} else {
return IterableType.prototype.checkContains.call(this, context, other);
}
};
exports.ContainerType = ContainerType;
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var BooleanType = __webpack_require__(69).BooleanType;
function IterableType(id, itemType) {
NativeType.call(this, id);
this.itemType = itemType;
return this;
}
IterableType.prototype = Object.create(NativeType.prototype);
IterableType.prototype.constructor = IterableType;
IterableType.prototype.isMoreSpecificThan = function(context, other) {
return (other instanceof IterableType &&
this.itemType.isMoreSpecificThan(context, other.itemType));
};
exports.IterableType = IterableType;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
function NativeType(id) {
BaseType.call(this, id);
return this;
}
NativeType.prototype = Object.create(BaseType.prototype);
NativeType.prototype.constructor = NativeType;
NativeType.prototype.checkUnique = function(context) {
// nothing to do
};
NativeType.prototype.checkExists = function(context) {
// nothing to do
};
NativeType.prototype.isMoreSpecificThan = function(context, other) {
return false;
};
NativeType.prototype.equals = function(obj) {
return obj===this;
};
NativeType.prototype.sort = function(context, list, desc) {
function cmp(o1, o2) {
o1 = o1.value;
o2 = o2.value;
return o1 > o2 ? 1 : o1 == o2 ? 0 : -1;
}
return this.doSort(context, list, cmp, desc);
};
exports.NativeType = NativeType;
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
var SyntaxError = __webpack_require__(66).SyntaxError;
var EnumeratedNativeType = null;
var TextType = null;
var NullType = null;
var TupleValue = null;
var SetValue = null;
var ListValue = null;
exports.resolve = function() {
EnumeratedNativeType = __webpack_require__(67).EnumeratedNativeType;
TextType = __webpack_require__(125).TextType;
NullType = __webpack_require__(75).NullType;
TupleValue = __webpack_require__(227).TupleValue;
SetValue = __webpack_require__(130).SetValue;
ListValue = __webpack_require__(128).ListValue;
};
function BaseType(id) {
this.id = id;
return this;
};
Object.defineProperty(BaseType.prototype, "name", {
get : function() {
return this.id.name;
}
});
BaseType.prototype.toString = function() {
return this.name;
};
BaseType.prototype.equals = function(other) {
return (other instanceof BaseType) && this.name==other.name;
};
BaseType.prototype.isAssignableFrom = function(context, other) {
return this==other || this.equals(other) || other.equals(NullType.instance);
};
BaseType.prototype.getMemberMethods = function(context, name) {
return [];
};
BaseType.prototype.checkAdd = function(context, other, tryReverse) {
if(other instanceof EnumeratedNativeType)
return this.checkAdd(context, other.derivedFrom, tryReverse);
else if(tryReverse)
return other.checkAdd(context, this, false);
else
throw new SyntaxError("Cannot add " + this.name + " to " + other.name);
};
BaseType.prototype.checkSubstract = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkSubstract(context, other.derivedFrom);
else
throw new SyntaxError("Cannot substract " + this.name + " from " + other.name);
};
BaseType.prototype.checkDivide = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkDivide(context, other.derivedFrom);
else
throw new SyntaxError("Cannot divide " + this.name + " with " + other.name);
};
BaseType.prototype.checkIntDivide = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkIntDivide(context, other.derivedFrom);
else
throw new SyntaxError("Cannot divide " + this.name + " with " + other.name);
};
BaseType.prototype.checkModulo = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkModulo(context, other.derivedFrom);
else
throw new SyntaxError("Cannot modulo " + this.name + " with " + other.name);
};
BaseType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof EnumeratedNativeType)
return this.checkMultiply(context, other.derivedFrom, tryReverse);
else if(tryReverse)
return other.checkMultiply(context, this, false);
else
throw new SyntaxError("Cannot multiply " + this.name + " with " + other.name);
};
BaseType.prototype.checkMinus = function(context) {
throw new SyntaxError("Cannot negate " + this.name);
};
BaseType.prototype.checkCompare = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkCompare(context, other.derivedFrom);
else
throw new SyntaxError("Cannot compare " + this.name + " to " + other.name);
};
BaseType.prototype.checkContains = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkContains(context, other.derivedFrom);
else
throw new SyntaxError(this.name + " cannot contain " + other.name);
};
BaseType.prototype.checkContainsAllOrAny = function(context, other) {
if(other instanceof EnumeratedNativeType)
return this.checkContainsAllOrAny(context, other.derivedFrom);
else
throw new SyntaxError(this.name + " cannot contain " + other.name);
};
BaseType.prototype.checkItem = function(context, itemType) {
if(itemType instanceof EnumeratedNativeType)
return this.checkItem(context, itemType.derivedFrom);
else
throw new SyntaxError("Cannot read item from " + this.name);
};
BaseType.prototype.checkMember = function(context, name) {
if("text" == name)
return TextType.instance;
else
throw new SyntaxError("Cannot read member from " + this.name);
};
BaseType.prototype.checkSlice = function(context) {
throw new SyntaxError("Cannot slice " + this.name);
};
BaseType.prototype.checkIterator = function(context) {
throw new SyntaxError("Cannot iterate over " + this.name);
};
BaseType.prototype.checkAssignableFrom = function(context, other) {
if (!this.isAssignableFrom(context, other)) {
throw new SyntaxError("Type: " + this.name + " is not compatible with: " + other.name);
};
};
BaseType.prototype.checkRange = function(context, other) {
throw new SyntaxError("Cannot create range of " + this.name + " and " + other.name);
};
BaseType.prototype.checkAnd = function(context, other) {
throw new SyntaxError("Cannot logically combine " + this.name + " and " + other.name);
};
BaseType.prototype.checkOr = function(context, other) {
throw new SyntaxError("Cannot logically combine " + this.name + " or " + other.name);
};
BaseType.prototype.checkNot = function(context) {
throw new SyntaxError("Cannot logically negate " + this.name);
};
BaseType.prototype.getMember = function(context, name) {
throw new SyntaxError("Cannot read member from " + this.name);
};
BaseType.prototype.readJSONValue = function(context, node, parts) {
throw new Error("Unsupported!")
};
BaseType.prototype.sort = function(context, list, desc) {
throw new Error("Unsupported!")
};
BaseType.prototype.doSort = function(context, list, cmp, desc) {
// only sort if required
if(list.size()<=1) {
return list;
}
// create result list we can sort in place
var items = [];
if( list instanceof ListValue || list instanceof TupleValue) {
items = items.concat(list.items);
} else if ( list instanceof SetValue) {
for(var name in list.items)
items.push(list.items[name]);
}
items.sort(cmp);
if(desc)
items.reverse(); // TODO optimize
return new ListValue(list.type.itemType, items);
};
BaseType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
return value; // TODO for now
};
BaseType.prototype.toDialect = function(writer) {
writer.append(this.name);
};
exports.BaseType = BaseType;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
var PromptoError = __webpack_require__(61).PromptoError;
function SyntaxError(message) {
PromptoError.call(this, message);
return this;
}
SyntaxError.prototype = Object.create(PromptoError.prototype);
SyntaxError.prototype.constructor = SyntaxError;
exports.SyntaxError = SyntaxError;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
var ListType = __webpack_require__(68).ListType;
var TextType = __webpack_require__(125).TextType;
var SyntaxError = __webpack_require__(66).SyntaxError;
function EnumeratedNativeType(name, derivedFrom) {
BaseType.call(this, name);
this.derivedFrom = derivedFrom;
return this;
}
EnumeratedNativeType.prototype = Object.create(BaseType.prototype);
EnumeratedNativeType.prototype.constructor = EnumeratedNativeType;
EnumeratedNativeType.prototype.checkMember = function(context, name) {
if ("symbols"==name) {
return new ListType(this.derivedFrom);
} else if ("value"==name) {
return this;
} else if ("name"==name) {
return TextType.instance;
} else {
return BaseType.prototype.checkMember.call(this, context, name);
}
};
EnumeratedNativeType.prototype.getMemberValue = function(context, name) {
var decl = context.getRegisteredDeclaration(this.name);
if(!decl || !decl.symbols) {
throw new SyntaxError(name + " is not an enumerated type!");
}
if ("symbols"==name) {
return decl.symbols;
} else {
throw new SyntaxError("Unknown member:" + name);
}
};
exports.EnumeratedNativeType = EnumeratedNativeType;
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
var ContainerType = __webpack_require__(62).ContainerType;
var SetType = null;
var IntegerType = null;
var BooleanType = __webpack_require__(69).BooleanType;
var Identifier = __webpack_require__(70).Identifier;
var ListValue = __webpack_require__(128).ListValue;
exports.resolve = function() {
IntegerType = __webpack_require__(81).IntegerType;
SetType = __webpack_require__(131).SetType;
};
function ListType(itemType) {
ContainerType.call(this, new Identifier(itemType.name+"[]"), itemType);
return this;
}
ListType.prototype = Object.create(ContainerType.prototype);
ListType.prototype.constructor = ListType;
ListType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
var values = value.map(function(item) {
return this.itemType.convertJavaScriptValueToPromptoValue(context, item, null);
}, this);
return new ListValue(this.itemType, values);
};
ListType.prototype.isAssignableFrom = function(context, other) {
return ContainerType.prototype.isAssignableFrom.call(this, context, other)
|| ((other instanceof ListType) && this.itemType.isAssignableFrom(context, other.itemType));
};
ListType.prototype.equals = function(obj) {
if(obj===this) {
return true;
}
if(obj===null) {
return false;
}
if(!(obj instanceof ListType)) {
return false;
}
return this.itemType.equals(obj.itemType);
};
ListType.prototype.checkAdd = function(context, other, tryReverse) {
if((other instanceof ListType || other instanceof SetType) && this.itemType.equals(other.itemType)) {
return this;
} else {
return ContainerType.prototype.checkAdd.call(this, context, other, tryReverse);
}
};
ListType.prototype.checkItem = function(context, other) {
if(other==IntegerType.instance) {
return this.itemType;
} else {
return ContainerType.prototype.checkItem.call(this, context, other);
}
};
ListType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return this;
} else {
return ContainerType.prototype.checkMultiply.call(this, context, other, tryReverse);
}
};
ListType.prototype.checkSlice = function(context) {
return this;
};
ListType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
}
ListType.prototype.checkIterator = function(context) {
return this.itemType;
}
ListType.prototype.checkMember = function(context, name) {
if ("count" == name) {
return IntegerType.instance;
} else {
return ContainerType.prototype.checkMember.call(this, context, name);
}
};
exports.ListType = ListType;
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
var AnyType = __webpack_require__(71).AnyType;
var Bool = null;
exports.resolve = function() {
Bool = __webpack_require__(72).Bool;
}
function BooleanType() {
NativeType.call(this, new Identifier("Boolean"));
return this;
}
BooleanType.prototype = Object.create(NativeType.prototype);
BooleanType.prototype.constructor = BooleanType;
BooleanType.instance = new BooleanType();
BooleanType.prototype.checkAnd = function(context, other) {
if(other instanceof BooleanType) {
return BooleanType.instance;
} else {
return NativeType.prototype.checkAnd.call(this, context, other);
}
};
BooleanType.prototype.checkOr = function(context, other) {
if(other instanceof BooleanType) {
return BooleanType.instance;
} else {
return NativeType.prototype.checkOr.call(this, context, other);
}
};
BooleanType.prototype.checkNot = function(context) {
return BooleanType.instance;
};
BooleanType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
if (typeof(value)=='boolean') {
return Bool.ValueOf(value);
} else {
return value; // TODO for now
}
};
exports.BooleanType = BooleanType;
/***/ },
/* 70 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
function Identifier(name) {
Section.call(this);
this.name = name;
return this;
}
Identifier.prototype = Object.create(Section.prototype);
Identifier.prototype.constructor = Identifier;
Identifier.prototype.toString = function() {
return this.name;
};
Identifier.prototype.equals = function(other) {
if(!other || !(other instanceof Identifier))
return false;
else
return this.name==other.name;
};
exports.Identifier = Identifier;
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
function AnyType() {
NativeType.call(this, new Identifier("any"));
return this;
}
AnyType.prototype = Object.create(NativeType.prototype);
AnyType.prototype.constructor = AnyType;
AnyType.instance = new AnyType();
AnyType.prototype.checkItem = function(context, name) {
return AnyType.instance; // required to support Document items
};
AnyType.prototype.checkMember = function(context, name) {
return AnyType.instance; // required to support Document members
};
AnyType.prototype.isAssignableFrom = function(context, other) {
return true;
};
exports.AnyType = AnyType;
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
var BooleanType = __webpack_require__(69).BooleanType;
var Value = __webpack_require__(73).Value;
function Bool(value) {
Value.call(this, BooleanType.instance);
this.value = value;
return this;
}
Bool.prototype = Object.create(Value.prototype);
Bool.prototype.constructor = Bool;
Bool.TRUE = new Bool(true);
Bool.FALSE = new Bool(false);
Bool.TRUE.not = Bool.FALSE;
Bool.FALSE.not = Bool.TRUE;
Bool.ValueOf = function(value) {
return value ? Bool.TRUE : Bool.FALSE;
};
Bool.Parse = function(text) {
var bool = text==="true";
return Bool.ValueOf(bool);
};
Bool.prototype.getValue = function() {
return this.value;
};
Bool.prototype.And = function(value) {
if(value instanceof Bool) {
return Bool.ValueOf(this.value && value.value);
} else {
throw new SyntaxError("Illegal: Boolean and " + typeof(value));
}
return this.value;
};
Bool.prototype.Or = function(value) {
if(value instanceof Bool) {
return Bool.ValueOf(this.value || value.value);
} else {
throw new SyntaxError("Illegal: Boolean or " + typeof(value));
}
return this.value;
};
Bool.prototype.Not = function() {
return this.not;
};
/*
public Boolean getNot() {
return not;
}
public int CompareTo(Context context, IValue value) throws SyntaxError {
if (value instanceof Boolean)
return compareTo((Boolean) value);
else
throw new SyntaxError("Illegal comparison: Boolean + " + value.getClass().getSimpleName());
}
public int compareTo(Boolean other) {
return java.lang.Boolean.compare(this.value, other.value);
}
public Object ConvertTo(Class> type) {
return value;
}
*/
Bool.prototype.toString = function() {
return this.value.toString();
};
Bool.prototype.equals = function(obj) {
if (obj instanceof Bool) {
return this.value == obj.value;
} else {
return false;
}
};
exports.Bool = Bool;
/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {
var NullValue = null;
var Text = null;
var Integer = null;
var Decimal = null;
exports.resolve = function() {
NullValue = __webpack_require__(74).NullValue;
Text = __webpack_require__(76).Text;
Integer = __webpack_require__(78).Integer;
Decimal = __webpack_require__(79).Decimal;
};
var id = 0;
function Value (type) {
this.id = ++id;
this.type = type;
this.mutable = false;
return this;
}
Value.prototype.collectStorables = function(list) {
// do nothing
};
Value.prototype.And = function(context, value) {
throw new SyntaxError("Logical and not supported by " + this.constructor.name);
};
Value.prototype.Or = function(context, value) {
throw new SyntaxError("Logical or not supported by " + this.constructor.name);
};
Value.prototype.Not = function(context) {
throw new SyntaxError("Logical negation not supported by " + this.constructor.name);
};
Value.prototype.Add = function(context, value) {
throw new SyntaxError("Add not supported by " + this.constructor.name);
};
Value.prototype.Subtract = function(context, value) {
throw new SyntaxError("Subtract not supported by " + this.constructor.name);
};
Value.prototype.Multiply = function(context, value) {
throw new SyntaxError("Multiply not supported by " + this.constructor.name);
};
Value.prototype.Divide = function(context, value) {
throw new SyntaxError("Divide not supported by " + this.constructor.name);
};
Value.prototype.IntDivide = function(context, value) {
throw new SyntaxError("Integer divide not supported by " + this.constructor.name);
};
Value.prototype.Modulo = function(context, value) {
throw new SyntaxError("Modulo not supported by " + this.constructor.name);
};
Value.prototype.Minus = function(context) {
throw new SyntaxError("Minus not supported by " + this.constructor.name);
};
Value.prototype.CompareTo = function(context, value) {
throw new SyntaxError("Compare not supported by " + this.constructor.name);
};
Value.prototype.getMemberValue = function(context, name) {
if("text" == name) {
return new Text(this.toString());
}
else
throw new SyntaxError("No member support for " + this.constructor.name);
};
Value.prototype.ConvertTo = function(type) {
return this;
};
Value.prototype.Roughly = function(context, value) {
return this.equals(value);
};
function Instance(type) {
Value.call(this, type);
return this;
}
Instance.prototype = Object.create(Value.prototype);
Instance.prototype.constructor = Instance;
function Container(type) {
Value.call(this, type);
return this;
}
Container.prototype = Object.create(Value.prototype);
Container.prototype.constructor = Container;
exports.Value = Value;
exports.Instance = Instance;
exports.Container = Container;
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var NullType = __webpack_require__(75).NullType;
function NullValue() {
Value.call(this, NullType.instance);
return this;
}
NullValue.prototype = Object.create(Value.prototype);
NullValue.prototype.constructor = NullValue;
NullValue.prototype.toString = function() {
return "null";
};
NullValue.prototype.getStorableData = function() {
return null; // <- YES!
};
NullValue.prototype.convertToJavaScript = function() {
return null; // <- YES!
};
NullValue.instance = new NullValue();
exports.NullValue = NullValue;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
var Identifier = __webpack_require__(70).Identifier;
function NullType() {
BaseType.call(this, new Identifier("Null"));
return this;
}
NullType.prototype = Object.create(BaseType.prototype);
NullType.prototype.constructor = NullType;
NullType.instance = new NullType();
NullType.prototype.checkUnique = function(context) {
// ok
};
NullType.prototype.checkExists = function(context) {
// ok
};
NullType.prototype.isAssignableFrom = function(context, other) {
return true;
};
NullType.prototype.isMoreSpecificThan = function(context, other) {
return false;
};
NullType.prototype.equals = function(other) {
return other==this;
};
exports.NullType = NullType;
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Character = __webpack_require__(77).Character;
var Integer = __webpack_require__(78).Integer;
var TextType = __webpack_require__(125).TextType;
var IndexOutOfRangeError = __webpack_require__(85).IndexOutOfRangeError;
var removeAccents = __webpack_require__(48).removeAccents;
function Text(value) {
Value.call(this, TextType.instance);
this.value = value;
return this;
}
Text.prototype = Object.create(Value.prototype);
Text.prototype.constructor = Text;
Text.prototype.getStorableData = function() {
return this.value;
};
Text.prototype.getValue = function() {
return this.value;
};
Text.prototype.toString = function() {
return this.value;
};
Text.prototype.Add = function(context, value) {
return new Text(this.value + value.toString());
};
Text.prototype.Multiply = function(context, value) {
if (value instanceof Integer) {
var count = value.IntegerValue();
if (count < 0) {
throw new SyntaxError("Negative repeat count:" + count);
} else if (count == 0) {
return new Text("");
} else if (count == 1) {
return new Text(this.value);
} else {
var all = [];
while (--count >= 0) {
all[count] = this.value;
}
var value = all.join("");
return new Text(value);
}
} else {
throw new SyntaxError("Illegal: Chararacter * " + typeof(value));
}
};
Text.prototype.CompareTo = function(context, value) {
if(value instanceof Text || value instanceof Character) {
return this.value > value.value ? 1 : this.value == value.value ? 0 : -1;
} else {
throw new SyntaxError("Illegal: Compare Text with " + typeof(value));
}
};
Text.prototype.hasItem = function(context, value) {
if (value instanceof Character || value instanceof Text) {
return this.value.indexOf(value.value) >= 0;
} else {
throw new SyntaxError("Illegal contains: Text + " + typeof(value));
}
};
Text.prototype.getMemberValue = function(context, name) {
if ("count"==name) {
return new Integer(this.value.length);
} else {
return Value.prototype.getMemberValue.call(this, context, name);
}
};
Text.prototype.getItemInContext = function(context, index) {
try {
if (index instanceof Integer) {
return new Character(this.value[index.IntegerValue() - 1]);
} else {
throw new InvalidDataError("No such item:" + index.toString());
}
} catch (e) {
if(e instanceof IndexOutOfBoundsException) {
throw new IndexOutOfRangeError();
} else {
throw e;
}
}
}
Text.prototype.getIterator = function(context) {
return new TextIterator(this.value);
};
function TextIterator(value) {
this.index = -1;
this.value = value;
return this;
}
TextIterator.prototype.hasNext = function() {
return this.index < this.value.length - 1;
};
TextIterator.prototype.next = function() {
return new Character(this.value[++this.index]);
};
Text.prototype.convertToJavaScript = function() {
return this.value;
};
Text.prototype.slice = function(fi, li) {
var first = this.checkFirst(fi);
var last = this.checkLast(li);
return new Text(this.value.slice(first - 1, last));
};
Text.prototype.checkFirst = function(fi) {
var value = (fi == null) ? 1 : fi.IntegerValue();
if (value < 1 || value > this.value.length) {
throw new IndexOutOfRangeError();
}
return value;
};
Text.prototype.checkLast = function(li) {
var value = (li == null) ? this.value.length : li.IntegerValue();
if (value < 0) {
value = this.value.length + 1 + li.IntegerValue();
}
if (value < 1 || value > this.value.length) {
throw new IndexOutOfRangeError();
}
return value;
};
Text.prototype.equals = function(obj) {
if (obj instanceof Text) {
return this.value == obj.value;
} else {
return false;
}
};
Text.prototype.Roughly = function(context, obj) {
if (obj instanceof Text || obj instanceof Character) {
return removeAccents(this.value.toLowerCase()) == removeAccents(obj.value.toLowerCase());
} else {
return false;
}
};
Text.prototype.toJson = function(context, json, instanceId, fieldName, withType, binaries) {
if(Array.isArray(json))
json.push(this.value);
else
json[fieldName] = this.value;
};
exports.Text = Text;
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Integer = __webpack_require__(78).Integer;
var CharacterType = __webpack_require__(126).CharacterType;
var Text = null; // circular dependency
var removeAccents = __webpack_require__(48).removeAccents;
exports.resolve = function() {
Text = __webpack_require__(76).Text;
}
function Character(value) {
Value.call(this, CharacterType.instance);
this.value = value;
return this;
}
Character.prototype = Object.create(Value.prototype);
Character.prototype.constructor = Character;
var whitespace = [];
whitespace[" ".charCodeAt(0)] = true;
whitespace["\t".charCodeAt(0)] = true;
whitespace["\r".charCodeAt(0)] = true;
whitespace["\n".charCodeAt(0)] = true;
Character.isWhitespace = function(c) {
return !!whitespace[c.charCodeAt(0)];
};
Character.prototype.getMemberValue = function(context, name) {
if ("codePoint"==name) {
return new Integer(this.value.charCodeAt(0));
} else {
return Value.prototype.getMemberValue.call(this, context, name);
}
};
Character.prototype.Add = function(context, value) {
return new Text(this.value + value.toString());
}
Character.prototype.Multiply = function(context, value) {
if (value instanceof Integer) {
var count = value.value;
if (count < 0) {
throw new SyntaxError("Negative repeat count:" + count);
} else if (count == 0) {
return new Text("");
} else if (count == 1) {
return new Text(value.toString());
} else {
var all = [];
while (--count >= 0) {
all[count] = this.value;
}
var value = all.join("");
return new Text(value);
}
} else {
throw new SyntaxError("Illegal: Chararacter * " + typeof(value));
}
};
Character.prototype.cmp = function(obj) {
return this.value > obj.value ? 1 : this.value == obj.value ? 0 : -1 ;
};
Character.prototype.CompareTo = function(context, value) {
if(value instanceof Text || value instanceof Character) {
return this.value > value.value ? 1 : this.value == value.value ? 0 : -1;
} else {
throw new SyntaxError("Illegal: Compare Character with " + typeof(value));
}
};
Character.prototype.convertToJavaScript = function() {
return this.value;
};
Character.prototype.toString = function() {
return this.value;
};
Character.prototype.equals = function(obj) {
if (obj instanceof Character) {
return this.value == obj.value;
} else {
return false;
}
};
Character.prototype.Roughly = function(context, obj) {
if (obj instanceof Text || obj instanceof Character) {
return removeAccents(this.value.toLowerCase()) == removeAccents(obj.value.toLowerCase());
} else {
return false;
}
};
exports.Character = Character;
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Decimal = __webpack_require__(79).Decimal;
var IntegerType = null;
var DivideByZeroError = __webpack_require__(526).DivideByZeroError;
exports.resolve = function() {
IntegerType = __webpack_require__(81).IntegerType;
};
function Integer(value) {
Value.call(this, IntegerType.instance);
this.value = value>0 ? Math.floor(value) : Math.ceil(value);
return this;
}
Integer.prototype = Object.create(Value.prototype);
Integer.prototype.constructor = Integer;
Integer.Parse = function(text) {
return new Integer(parseInt(text));
};
Integer.prototype.toString = function() {
return this.value.toString();
};
Integer.prototype.getStorableData = function() {
return this.value;
};
Integer.prototype.IntegerValue = function() {
return this.value;
};
Integer.prototype.DecimalValue = function() {
return this.value * 1.0;
};
Integer.prototype.Add = function(context, value) {
if (value instanceof Integer) {
return new Integer(this.value + value.value);
} else if (value instanceof Decimal) {
return new Decimal(value.DecimalValue() + this.value);
} else {
throw new SyntaxError("Illegal: Integer + " + typeof(value));
}
};
Integer.prototype.Subtract = function(context, value) {
if (value instanceof Integer) {
return new Integer(this.value - value.value);
} else if (value instanceof Decimal) {
return new Decimal(this.value - value.DecimalValue());
} else {
throw new SyntaxError("Illegal: Integer - " + typeof(value));
}
};
Integer.prototype.Multiply = function(context, value) {
if (value instanceof Integer) {
return new Integer(this.value * value.value);
} else if (value instanceof Decimal) {
return new Decimal(value.value * this.value);
} else if (value.Multiply) {
return value.Multiply(context, this);
} else {
throw new SyntaxError("Illegal: Integer * " + typeof(value));
}
};
Integer.prototype.Divide = function(context, value) {
if (value instanceof Integer || value instanceof Decimal) {
if (value.DecimalValue() == 0.0) {
throw new DivideByZeroError();
} else {
return new Decimal(this.DecimalValue() / value.DecimalValue());
}
} else {
throw new SyntaxError("Illegal: Integer / " + typeof(value));
}
};
Integer.prototype.IntDivide = function(context, value) {
if (value instanceof Integer) {
if (value.IntegerValue() == 0) {
throw new DivideByZeroError();
} else {
return new Integer(this.IntegerValue() / value.IntegerValue());
}
} else {
throw new SyntaxError("Illegal: Integer \\ " + typeof(value));
}
};
Integer.prototype.Modulo = function(context, value) {
if (value instanceof Integer) {
if (value.IntegerValue() == 0) {
throw new DivideByZeroError();
} else {
return new Integer(this.IntegerValue() % value.IntegerValue());
}
} else {
throw new SyntaxError("Illegal: Integer \\ " + typeof(value));
}
};
Integer.prototype.Minus = function(context) {
return new Integer(-this.value);
};
Integer.prototype.cmp = function(obj) {
return this.value > obj.IntegerValue() ? 1 : this.value == obj.IntegerValue() ? 0 : -1 ;
};
Integer.prototype.CompareTo = function(context, value) {
if (value instanceof Integer || value instanceof Decimal) {
return this.value > value.value ? 1 : this.value == value.value ? 0 : -1;
} else {
throw new SyntaxError("Illegal comparison: Integer and " + typeof(value));
}
};
Integer.prototype.equals = function(obj) {
if (obj instanceof Integer) {
return this.value == obj.value;
} else if (obj instanceof Decimal) {
return this.value == obj.value;
} else {
return false;
}
};
Integer.prototype.toJson = function(context, json, instanceId, fieldName, withType, binaries) {
if(Array.isArray(json))
json.push(this.value);
else
json[fieldName] = this.value;
};
exports.Integer = Integer;
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Integer = null; // circular dependency
var DecimalType = null;
exports.resolve = function() {
Integer = __webpack_require__(78).Integer;
DecimalType = __webpack_require__(80).DecimalType;
};
function Decimal(value) {
Value.call(this, DecimalType.instance);
this.value = value;
return this;
}
Decimal.prototype = Object.create(Value.prototype);
Decimal.prototype.constructor = Decimal;
Decimal.Parse = function(text) {
return new Decimal(parseFloat(text));
};
Decimal.prototype.toString = function() {
// mimic 0.0######
if(this.value == Math.floor(this.value)) {
return Number(this.value).toFixed(1);
} else {
return this.value;
}
};
/*jshint bitwise:false*/
Decimal.prototype.IntegerValue = function() {
return Math.floor(this.value);
};
Decimal.prototype.DecimalValue = function() {
return this.value;
};
Decimal.prototype.Add = function(context, value) {
if (value instanceof Integer) {
return new Decimal(this.value + value.IntegerValue());
} else if (value instanceof Decimal) {
return new Decimal(this.value + value.DecimalValue());
} else {
throw new SyntaxError("Illegal: Decimal + " + typeof(value));
}
};
Decimal.prototype.Subtract = function(context, value) {
if (value instanceof Integer) {
return new Decimal(this.value - value.IntegerValue());
} else if (value instanceof Decimal) {
return new Decimal(this.value - value.DecimalValue());
} else {
throw new SyntaxError("Illegal: Decimal - " + typeof(value));
}
};
Decimal.prototype.Multiply = function(context, value) {
if (value instanceof Integer) {
return new Decimal(this.value * value.IntegerValue());
} else if (value instanceof Decimal) {
return new Decimal(this.value * value.DecimalValue());
} else {
throw new SyntaxError("Illegal: Decimal * " + typeof(value));
}
};
Decimal.prototype.Divide = function(context, value) {
if (value instanceof Integer || value instanceof Decimal) {
if (value.DecimalValue() == 0.0) {
throw new DivideByZeroError();
} else {
return new Decimal(this.DecimalValue() / value.DecimalValue());
}
} else {
throw new SyntaxError("Illegal: Decimal / " + typeof(value));
}
};
Decimal.prototype.IntDivide = function(context, value) {
if (value instanceof Integer) {
if (value.IntegerValue() == 0) {
throw new DivideByZeroError();
} else {
return new Integer(this.DecimalValue() / value.IntegerValue());
}
} else {
throw new SyntaxError("Illegal: Decimal \\ " + typeof(value));
}
};
Decimal.prototype.Modulo = function(context, value) {
if (value instanceof Integer || value instanceof Decimal) {
if (value.DecimalValue() == 0.0) {
throw new DivideByZeroError();
} else {
return new Decimal(this.DecimalValue() % value.DecimalValue());
}
} else {
throw new SyntaxError("Illegal: Decimal % " + typeof(value));
}
};
Decimal.prototype.Minus = function(context) {
return new Decimal(-this.value);
};
Decimal.prototype.CompareTo = function(context, value) {
if (value instanceof Integer || value instanceof Decimal) {
return this.value > value.value ? 1 : this.value == value.value ? 0 : -1;
} else {
throw new SyntaxError("Illegal comparison: Integer and " + typeof(value));
}
};
/*
@Override
public Object ConvertTo(Class> type) {
return value;
}
*/
Decimal.prototype.equals = function(obj) {
if (obj instanceof Integer || obj instanceof Decimal) {
return this.value == obj.value;
} else {
return false;
}
};
exports.Decimal = Decimal;
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var BooleanType = __webpack_require__(69).BooleanType;
var IntegerType = null; // circular dependency
var AnyType = __webpack_require__(71).AnyType;
var Decimal = __webpack_require__(79).Decimal;
var Identifier = __webpack_require__(70).Identifier;
exports.resolve = function() {
IntegerType = __webpack_require__(81).IntegerType;
}
function DecimalType() {
NativeType.call(this, new Identifier("Decimal"));
return this;
}
DecimalType.prototype = Object.create(NativeType.prototype);
DecimalType.prototype.constructor = DecimalType;
DecimalType.instance = new DecimalType();
DecimalType.prototype.isAssignableFrom = function(context, other) {
return NativeType.prototype.isAssignableFrom.call(this, context, other)
|| (other == IntegerType.instance);
};
DecimalType.prototype.checkAdd = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return this;
} else if(other instanceof DecimalType) {
return this;
} else {
return NativeType.prototype.checkAdd.call(this, context, other, tryReverse);
}
};
DecimalType.prototype.checkSubstract = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return this;
} else {
return NativeType.prototype.checkSubstract.call(this, context, other);
}
};
DecimalType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return this;
} else {
return NativeType.prototype.checkMultiply.call(this, context, other, tryReverse);
}
};
DecimalType.prototype.checkDivide = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return this;
} else {
return NativeType.prototype.checkDivide.call(this, context, other);
}
};
DecimalType.prototype.checkIntDivide = function(context, other) {
if(other instanceof IntegerType) {
return this;
} else {
return NativeType.prototype.checkIntDivide.call(this, context, other);
}
};
DecimalType.prototype.checkModulo = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return this;
} else {
return NativeType.prototype.checkModulo.call(this, context, other);
}
};
DecimalType.prototype.checkMinus = function(context) {
return this;
};
DecimalType.prototype.checkCompare = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return BooleanType.instance;
} else {
return NativeType.prototype.checkCompare.call(this, context, other);
}
};
DecimalType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
if (typeof(value)=='number') {
return new Decimal(value);
} else {
return value; // TODO for now
}
};
exports.DecimalType = DecimalType;
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var BooleanType = __webpack_require__(69).BooleanType;
var DecimalType = __webpack_require__(80).DecimalType;
var CharacterType = null;
var ListType = __webpack_require__(68).ListType;
var RangeType = __webpack_require__(82).RangeType;
var TextType = null;
var AnyType = __webpack_require__(71).AnyType;
var Integer = __webpack_require__(78).Integer;
var IntegerRange = __webpack_require__(83).IntegerRange;
var Identifier = __webpack_require__(70).Identifier;
var PeriodType = null;
exports.resolve = function() {
CharacterType = __webpack_require__(126).CharacterType;
TextType = __webpack_require__(125).TextType;
PeriodType = __webpack_require__(361).PeriodType;
}
function IntegerType() {
NativeType.call(this, new Identifier("Integer"));
return this;
}
IntegerType.prototype = Object.create(NativeType.prototype);
IntegerType.prototype.constructor = IntegerType;
IntegerType.instance = new IntegerType();
IntegerType.prototype.isAssignableFrom = function(context, other) {
return NativeType.prototype.isAssignableFrom.call(this, context, other)
|| (other == DecimalType.instance);
};
IntegerType.prototype.checkAdd = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return this;
} else if(other instanceof DecimalType) {
return other;
} else {
return NativeType.prototype.checkAdd.call(this, context, other, tryReverse);
}
};
IntegerType.prototype.checkSubstract = function(context, other) {
if(other instanceof IntegerType) {
return this;
} else if(other instanceof DecimalType) {
return other;
} else {
return NativeType.prototype.checkSubstract.call(this, context, other);
}
};
IntegerType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return this;
} else if(other instanceof DecimalType) {
return other;
} else if(other instanceof CharacterType) {
return TextType.instance;
} else if(other instanceof TextType) {
return other;
} else if(other instanceof PeriodType) {
return other;
} else if(other instanceof ListType) {
return other;
} else {
return NativeType.prototype.checkMultiply.call(this, context, other, tryReverse);
}
};
IntegerType.prototype.checkDivide = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return DecimalType.instance;
} else {
return NativeType.prototype.checkDivide.call(this, context, other);
}
};
IntegerType.prototype.checkIntDivide = function(context, other) {
if(other instanceof IntegerType) {
return this;
} else {
return NativeType.prototype.checkIntDivide.call(this, context, other);
}
};
IntegerType.prototype.checkModulo = function(context, other) {
if(other instanceof IntegerType) {
return this;
} else {
return NativeType.prototype.checkModulo.call(this, context, other);
}
};
IntegerType.prototype.checkMinus = function(context) {
return this;
};
IntegerType.prototype.checkCompare = function(context, other) {
if(other instanceof IntegerType || other instanceof DecimalType) {
return BooleanType.instance;
} else {
return NativeType.prototype.checkCompare.call(this, context, other);
}
};
IntegerType.prototype.checkRange = function(context, other) {
if(other instanceof IntegerType) {
return new RangeType(this);
} else {
return NativeType.prototype.checkRange.call(this, context, other);
}
};
IntegerType.prototype.newRange = function(left, right) {
if(left instanceof Integer && right instanceof Integer) {
return new IntegerRange(left, right);
} else {
return NativeType.prototype.newRange.call(this, left, right);
}
};
IntegerType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
if (typeof(value)=='number') {
return new Integer(value);
} else {
return value; // TODO for now
}
};
exports.IntegerType = IntegerType;
/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {
var ContainerType = __webpack_require__(62).ContainerType;
var Identifier = __webpack_require__(70).Identifier;
var IntegerType = null;
var BooleanType = null;
exports.resolve = function() {
IntegerType = __webpack_require__(81).IntegerType;
BooleanType = __webpack_require__(69).BooleanType;
};
function RangeType(itemType) {
ContainerType.call(this, new Identifier(itemType.name+"[..]"),itemType);
return this;
}
RangeType.prototype = Object.create(ContainerType.prototype);
RangeType.prototype.constructor = RangeType;
RangeType.prototype.checkItem = function(context, other) {
if (other == IntegerType.instance) {
return this.itemType;
} else {
return ContainerType.prototype.checkItem.call(this, context, other);
}
};
RangeType.prototype.checkSlice = function(context) {
return this;
};
RangeType.prototype.checkIterator = function(context) {
return this.itemType;
};
RangeType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
};
exports.RangeType = RangeType;
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
var Range = __webpack_require__(84).Range;
var Integer = __webpack_require__(78).Integer;
var IntegerType = null;
exports.resolve =function() {
IntegerType = __webpack_require__(81).IntegerType;
};
function IntegerRange(left, right) {
Range.call(this, IntegerType.instance, left, right);
return this;
}
IntegerRange.prototype = Object.create(Range.prototype);
IntegerRange.prototype.constructor = IntegerRange;
IntegerRange.prototype.size = function() {
return 1 + this.high.IntegerValue() - this.low.IntegerValue();
};
IntegerRange.prototype.getItem = function(index) {
var result = this.low.IntegerValue() + index - 1;
if(result>this.high.IntegerValue()) {
throw new IndexOutOfBoundsException();
}
return new Integer(result);
};
IntegerRange.prototype.newInstance = function(left, right) {
return new IntegerRange(left, right);
};
exports.IntegerRange = IntegerRange;
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Integer = __webpack_require__(78).Integer;
var IndexOutOfRangeError = __webpack_require__(85).IndexOutOfRangeError;
var BaseType = __webpack_require__(65).BaseType;
var RangeType = __webpack_require__(82).RangeType;
function Range(itemType, left, right) {
if(!(itemType instanceof BaseType))
return;
Value.call(this, new RangeType(itemType));
var cmp = left.cmp(right);
if(cmp<0) {
this.low = left;
this.high = right;
} else {
this.low = right;
this.high = left;
}
return this;
}
Range.prototype = Object.create(Value.prototype);
Range.prototype.constructor = Range;
Range.prototype.toString = function() {
return "[" + (this.low==null?"":this.low.toString()) + ".."
+ (this.high==null?"":this.high.toString()) + "]";
};
Range.prototype.equals = function(obj) {
if(obj instanceof Range) {
return this.low.equals(obj.low) && this.high.equals(obj.high);
} else {
return false;
}
};
Range.prototype.hasItem = function(context, lval) {
var a = lval.cmp(this.low);
var b = this.high.cmp(lval);
return a>=0 && b>=0;
};
Range.prototype.getItemInContext = function(context, index) {
if (index instanceof Integer) {
try {
var value = this.getItem(index.IntegerValue());
if (value instanceof Value) {
return value;
} else {
throw new InternalError("Item not a value!");
}
} catch (e) {
throw new IndexOutOfRangeError();
}
} else {
throw new SyntaxError("No such item:" + index.toString());
}
};
Range.prototype.slice = function(fi, li) {
var size = this.size();
var first = this.checkFirst(fi, size);
var last = this.checkLast(li, size);
return this.newInstance(this.getItem(first),this.getItem(last));
}
Range.prototype.checkFirst = function(fi, size) {
var value = (fi == null) ? 1 : fi.IntegerValue();
if (value < 1 || value > size) {
throw new IndexOutOfRangeError();
}
return value;
};
Range.prototype.checkLast = function(li, size) {
var value = (li == null) ? size : li.IntegerValue();
if (value < 0) {
value = size + 1 + li.IntegerValue();
}
if (value < 1 || value > size) {
throw new IndexOutOfRangeError();
}
return value;
};
/*
@Override
public Iterable getItems(Context context) {
return new RangeIterable(context);
}
*/
Range.prototype.getIterator = function(context) {
return new RangeIterator(context, this);
};
function RangeIterator(context, range) {
this.context = context;
this.range = range;
this.index = 0;
return this;
}
RangeIterator.prototype.hasNext = function() {
return this.index newInstance(T left,T right);
*/
exports.Range = Range;
/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {
var ExecutionError = __webpack_require__(86).ExecutionError;
function IndexOutOfRangeError() {
ExecutionError.call(this);
return this;
}
IndexOutOfRangeError.prototype = Object.create(ExecutionError.prototype);
IndexOutOfRangeError.prototype.constructor = IndexOutOfRangeError;
IndexOutOfRangeError.prototype.getExpression = function(context) {
return context.getRegisteredValue("INDEX_OUT_OF_RANGE");
};
exports.IndexOutOfRangeError = IndexOutOfRangeError;
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
var PromptoError = __webpack_require__(61).PromptoError;
var ErrorVariable = __webpack_require__(87).ErrorVariable;
function ExecutionError(message) {
PromptoError.call(this, message);
return this;
}
ExecutionError.prototype = Object.create(PromptoError.prototype);
ExecutionError.prototype.constructor = ExecutionError;
ExecutionError.prototype.interpret = function(context, errorName) {
var exp = this.getExpression(context);
if(exp==null) {
var args = new ArgumentAssignmentList();
args.add(new ArgumentAssignment(new UnresolvedArgument("name"), new TextLiteral(this.getType().Name)));
args.add(new ArgumentAssignment(new UnresolvedArgument("text"), new TextLiteral(this.message)));
exp = new ConstructorExpression(new CategoryType("Error"), args);
}
if(context.getRegisteredValue(errorName)==null)
context.registerValue(new ErrorVariable(errorName));
var error = exp.interpret(context);
context.setValue(errorName, error);
return error;
};
exports.ExecutionError = ExecutionError;
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
var Variable = __webpack_require__(88).Variable;
var Identifier = __webpack_require__(70).Identifier;
var EnumeratedCategoryType = null;
exports.resolve = function() {
EnumeratedCategoryType = __webpack_require__(89).EnumeratedCategoryType;
};
function ErrorVariable(id) {
Variable.call(this, id, new EnumeratedCategoryType(new Identifier("Error")));
return this;
}
ErrorVariable.prototype = Object.create(Variable.prototype);
ErrorVariable.prototype.constructor = ErrorVariable;
ErrorVariable.prototype.toString = function() {
return this.name;
};
ErrorVariable.prototype.getType = function(context) {
return new EnumeratedCategoryType(new Identifier("Error"));
};
exports.ErrorVariable = ErrorVariable;
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
function Variable (id, type) {
if(!(type instanceof BaseType))
throw new Error();
this.id = id;
this.type = type;
return this;
}
Object.defineProperty(Variable.prototype, "name", {
get : function() {
return this.id.name;
}
});
Variable.prototype.toString = function() {
return this.name;
}
Variable.prototype.getType = function(context) {
return this.type;
};
exports.Variable = Variable;
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
var CategoryType = __webpack_require__(90).CategoryType;
var ListType = __webpack_require__(68).ListType;
var TextType = __webpack_require__(125).TextType;
var SyntaxError = __webpack_require__(66).SyntaxError;
function EnumeratedCategoryType(id) {
CategoryType.call(this, id);
return this;
}
EnumeratedCategoryType.prototype = Object.create(CategoryType.prototype);
EnumeratedCategoryType.prototype.constructor = EnumeratedCategoryType;
EnumeratedCategoryType.prototype.checkMember = function(context, name) {
if ("symbols"==name) {
return new ListType(this);
} else if ("name"==name) {
return TextType.instance;
} else {
return CategoryType.prototype.checkMember.call(this, context, name);
}
};
EnumeratedCategoryType.prototype.getMemberValue = function(context, name) {
var decl = context.getRegisteredDeclaration(this.name);
if (!decl || !decl.symbols) {
throw new SyntaxError(name + " is not an enumerated type!");
}
if ("symbols" == name) {
return decl.symbols;
} else {
throw new SyntaxError("Unknown member:" + name);
}
};
exports.EnumeratedCategoryType = EnumeratedCategoryType;
/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {
var UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
var Identifier = __webpack_require__(70).Identifier;
var ArgumentAssignmentList = null;
var ArgumentAssignment = null;
var CategoryDeclaration = null;
var ConcreteCategoryDeclaration = null;
var ExpressionValue = __webpack_require__(199).ExpressionValue;
var Operator = __webpack_require__(200).Operator;
var BaseType = __webpack_require__(65).BaseType;
var NullType = __webpack_require__(75).NullType;
var TextType = __webpack_require__(125).TextType;
var AnyType = __webpack_require__(71).AnyType;
var MissingType = __webpack_require__(150).MissingType;
var PromptoError = __webpack_require__(61).PromptoError;
var MethodCall = __webpack_require__(92).MethodCall;
var MethodSelector = __webpack_require__(183).MethodSelector;
var MethodFinder = __webpack_require__(95).MethodFinder;
var DataStore = __webpack_require__(189).DataStore;
var Score = __webpack_require__(96).Score;
exports.resolve = function() {
ArgumentAssignmentList = __webpack_require__(97).ArgumentAssignmentList;
ArgumentAssignment = __webpack_require__(135).ArgumentAssignment;
CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
}
function CategoryType(id) {
BaseType.call(this, id);
this.mutable = false;
return this;
}
CategoryType.prototype = Object.create(BaseType.prototype);
CategoryType.prototype.constructor = CategoryType;
/*
public Class> toJavaClass() {
// TODO Auto-generated method stub
return null;
}
*/
CategoryType.prototype.toDialect = function(writer) {
if (this.mutable)
writer.append("mutable ");
writer.append(this.name);
};
CategoryType.prototype.newInstanceFromStored = function(context, stored) {
var decl = this.getDeclaration(context);
var inst = decl.newInstanceFromStored(context, stored);
inst.mutable = this.mutable;
return inst;
};
CategoryType.prototype.equals = function(obj) {
if(obj===this) {
return true;
}
if(obj===null) {
return false;
}
if(!(obj instanceof CategoryType)) {
return false;
}
return this.name===obj.name;
};
CategoryType.prototype.checkUnique = function(context) {
var actual = context.getRegisteredDeclaration(this.name) || null;
if(actual!=null) {
throw new SyntaxError("Duplicate name: \"" + this.name + "\"");
}
};
CategoryType.prototype.getDeclaration = function(context) {
var decl = context.getRegisteredDeclaration(this.name) || null;
if(decl==null) {
if(context.problemListener)
context.problemListener.reportUnknownCategory(this.id);
else
throw new SyntaxError("Unknown category: \"" + this.name + "\"");
}
return decl;
};
CategoryType.prototype.checkMultiply = function(context, other, tryReverse) {
var type = this.checkOperator(context, other, tryReverse, Operator.MULTIPLY);
if(type!=null)
return type;
else
return BaseType.prototype.checkMultiply.call(this, context, other, tryReverse);
}
CategoryType.prototype.checkDivide = function(context, other) {
var type = this.checkOperator(context, other, false, Operator.DIVIDE);
if(type!=null)
return type;
else
return BaseType.prototype.checkDivide.call(this, context, other);
}
CategoryType.prototype.checkIntDivide = function(context, other) {
var type = this.checkOperator(context, other, false, Operator.IDIVIDE);
if(type!=null)
return type;
else
return BaseType.prototype.checkIntDivide.call(this, context, other);
}
CategoryType.prototype.checkModulo = function(context, other) {
var type = this.checkOperator(context, other, false, Operator.MODULO);
if(type!=null)
return type;
else
return BaseType.prototype.checkModulo.call(this, context, other);
}
CategoryType.prototype.checkAdd = function(context, other, tryReverse) {
var type = this.checkOperator(context, other, tryReverse, Operator.PLUS);
if(type!=null)
return type;
else
return BaseType.prototype.checkAdd.call(this, context, other, tryReverse);
}
CategoryType.prototype.checkSubstract = function(context, other) {
var type = this.checkOperator(context, other, false, Operator.MINUS);
if(type!=null)
return type;
else
return BaseType.prototype.checkSubstract.call(this, context, other);
}
CategoryType.prototype.checkOperator = function(context, other, tryReverse, operator) {
var actual = this.getDeclaration(context);
if(actual instanceof ConcreteCategoryDeclaration) try {
var method = actual.getOperatorMethod(context, operator, other);
if(method==null)
return null;
context = context.newInstanceContext(null, this);
var local = context.newLocalContext();
method.registerArguments(local);
return method.check(local);
} catch(e) {
// ok to pass, will try reverse
}
if(tryReverse)
return null;
else
throw new SyntaxError("Unsupported operation: " + this.name + " " + operator.token + " " + other.name);
};
CategoryType.prototype.checkExists = function(context) {
this.getDeclaration(context);
};
CategoryType.prototype.checkMember = function(context, name) {
var cd = context.getRegisteredDeclaration(this.name);
if (cd == null) {
throw new SyntaxError("Unknown category:" + this.name);
}
if (cd.hasAttribute(context, name)) {
var ad = context.getRegisteredDeclaration(name);
if (ad == null) {
throw new SyntaxError("Unknown atttribute:" + name);
}
return ad.getType(context);
} else if("text" == name.toString()) {
return TextType.instance
} else {
throw new SyntaxError("No attribute:" + name + " in category:" + this.name);
}
};
CategoryType.prototype.isAssignableFrom = function(context, other) {
return BaseType.prototype.isAssignableFrom.call(this, context, other)
|| ((other instanceof CategoryType) && this.isAssignableFromCategory(context, other));
};
CategoryType.prototype.isAssignableFromCategory = function(context, other) {
return other.isDerivedFrom(context, this)
|| other.isDerivedFromAnonymous(context, this);
};
CategoryType.prototype.isDerivedFrom = function(context, other) {
try {
var thisDecl = this.getDeclaration(context);
if (thisDecl instanceof CategoryDeclaration)
return this.isDerivedFromCategory(context, thisDecl, other);
} catch (e) {
}
return false; // TODO
};
CategoryType.prototype.isDerivedFromCategory = function(context, decl, other) {
if(decl.derivedFrom==null) {
return false;
}
for(var i=0;i s2 ? 1 : s1 == s2 ? 0 : -1;
}
};
CategoryType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
var decl = this.getDeclaration(context)
if (decl == null)
return BaseType.prototype.convertPythonValueToPromptoValue(context, value, returnType);
if (DataStore.instance.isDbIdType(typeof(value)))
value = DataStore.instance.fetchUnique(value);
return decl.newInstanceFromStored(context, value);
};
exports.CategoryType = CategoryType;
/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {
var MethodCall = __webpack_require__(92).MethodCall;
var EnumeratedCategoryDeclaration = null;
var CategoryDeclaration = null;
var EnumeratedNativeDeclaration = __webpack_require__(157).EnumeratedNativeDeclaration;
var ConstructorExpression = null;
var InstanceExpression = __webpack_require__(184).InstanceExpression;
var SymbolExpression = __webpack_require__(139).SymbolExpression;
var TypeExpression = __webpack_require__(140).TypeExpression;
var ProblemListener = __webpack_require__(117).ProblemListener;
var PromptoError = __webpack_require__(61).PromptoError;
var Section = __webpack_require__(58).Section;
var EnumeratedCategoryType = null;
var CategoryType = null;
var MethodSelector = null;
exports.resolve = function() {
EnumeratedCategoryDeclaration = __webpack_require__(53).EnumeratedCategoryDeclaration;
EnumeratedCategoryType = __webpack_require__(89).EnumeratedCategoryType;
MethodSelector = __webpack_require__(183).MethodSelector;
CategoryType = __webpack_require__(90).CategoryType;
CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
ConstructorExpression = __webpack_require__(338).ConstructorExpression;
}
function UnresolvedIdentifier(id) {
Section.call(this);
this.id = id;
this.resolved = null;
return this;
}
UnresolvedIdentifier.prototype = Object.create(Section.prototype);
UnresolvedIdentifier.prototype.constructor = UnresolvedIdentifier;
Object.defineProperty(UnresolvedIdentifier.prototype, "name", {
get : function() {
return this.id.name;
}
});
UnresolvedIdentifier.prototype.toString = function() {
return this.id.name;
};
UnresolvedIdentifier.prototype.toDialect = function(writer) {
try {
this.resolve(writer.context, false);
} catch(e) {
}
if(this.resolved!=null)
this.resolved.toDialect(writer);
else
writer.append(this.id.name);
};
UnresolvedIdentifier.prototype.check = function(context) {
return this.resolveAndCheck(context, false);
};
UnresolvedIdentifier.prototype.checkMember = function(context) {
return this.resolveAndCheck(context, true);
};
UnresolvedIdentifier.prototype.interpret = function(context) {
if(this.resolved==null) {
this.resolveAndCheck(context, false);
}
return this.resolved.interpret(context);
};
UnresolvedIdentifier.prototype.resolveAndCheck = function(context, forMember) {
this.resolve(context, forMember);
return this.resolved.check(context);
};
UnresolvedIdentifier.prototype.resolve = function(context, forMember) {
if(this.resolved==null) {
// don't collect problems during resolution
var listener = context.problemListener;
context.problemListener = new ProblemListener();
// try out various solutions
this.resolved = this.resolveSymbol(context);
if (this.resolved == null) {
// is first char uppercase?
if (this.resolved == null && this.id.name[0].toUpperCase() == this.id.name[0]) {
if (forMember) {
this.resolved = this.resolveType(context);
} else {
this.resolved = this.resolveConstructor(context);
}
}
if (this.resolved == null) {
this.resolved = this.resolveMethod(context);
if (this.resolved == null) {
this.resolved = this.resolveInstance(context);
}
}
}
// restore listener
context.problemListener = listener;
}
if(this.resolved==null)
context.problemListener.reportUnknownIdentifier(this.id);
return this.resolved;
};
UnresolvedIdentifier.prototype.resolveInstance = function(context) {
try {
var id = new InstanceExpression(this.id);
id.check(context);
return id;
} catch(e) {
if(e instanceof SyntaxError) {
return null;
} else {
throw e;
}
}
};
UnresolvedIdentifier.prototype.resolveMethod = function(context) {
try {
var method = new MethodCall(new MethodSelector(null, this.id));
method.check(context);
return method;
} catch(e) {
if(e instanceof PromptoError) {
return null;
} else {
throw e;
}
}
};
UnresolvedIdentifier.prototype.resolveConstructor = function(context) {
try {
var method = new ConstructorExpression(new CategoryType(this.id), null);
method.check(context);
return method;
} catch(e) {
if(e instanceof SyntaxError) {
return null;
} else {
throw e;
}
}
};
UnresolvedIdentifier.prototype.resolveType = function(context) {
var decl = context.getRegisteredDeclaration(this.name);
if(decl instanceof EnumeratedCategoryDeclaration) {
return new TypeExpression(new EnumeratedCategoryType(this.id));
} else if(decl instanceof CategoryDeclaration) {
return new TypeExpression(new CategoryType(this.id));
} else if(decl instanceof EnumeratedNativeDeclaration) {
return new TypeExpression(decl.getType(context));
} else {
var allTypes = NativeType.getAll();
for(var i=0;i 0)
return false;
try {
finder = new MethodFinder(writer.context, this);
var declaration = finder.findMethod(false);
/* if method is abstract, need to prefix with invoke */
if(declaration instanceof AbstractMethodDeclaration)
return true;
} catch(e) {
// ok
}
return false;
}
MethodCall.prototype.toString = function() {
return this.method.toString() + " " + (this.assignments!==null ? this.assignments.toString() : "");
};
MethodCall.prototype.check = function(context) {
var finder = new MethodFinder(context,this);
var declaration = finder.findMethod(false);
if(!declaration)
return VoidType.instance;
var local = this.method.newLocalCheckContext(context, declaration);
return this.checkDeclaration(declaration, context, local);
};
MethodCall.prototype.checkDeclaration = function(declaration, parent, local) {
if(declaration instanceof ConcreteMethodDeclaration && declaration.mustBeBeCheckedInCallContext(parent)) {
return this.fullCheck(declaration, parent, local);
} else {
return this.lightCheck(declaration, parent, local);
}
};
MethodCall.prototype.lightCheck = function(declaration, parent, local) {
declaration.registerArguments(local);
return declaration.check(local);
};
MethodCall.prototype.fullCheck = function(declaration, parent, local) {
try {
var assignments = this.makeAssignments(parent,declaration);
declaration.registerArguments(local);
assignments.forEach(function(assignment) {
var expression = assignment.resolve(local,declaration,true);
var value = assignment.argument.checkValue(parent,expression);
local.setValue(assignment.id, value);
});
return declaration.check(local);
} catch (e) {
if(e instanceof PromptoError) {
throw new SyntaxError(e.message);
}
}
};
MethodCall.prototype.makeAssignments = function(context, declaration) {
if(this.assignments==null) {
return new ArgumentAssignmentList();
} else {
return this.assignments.makeAssignments(context, declaration);
}
};
MethodCall.prototype.interpret = function(context) {
var declaration = this.findDeclaration(context);
var local = this.method.newLocalContext(context, declaration);
declaration.registerArguments(local);
var assignments = this.makeAssignments(context,declaration);
assignments.forEach(function(assignment) {
var expression = assignment.resolve(local, declaration, true);
var argument = assignment.argument;
var value = argument.checkValue(context,expression);
if(value!=null && argument.mutable && !value.mutable)
throw new NotMutableError();
local.setValue(assignment.id, value);
});
return declaration.interpret(local, true);
};
MethodCall.prototype.interpretAssert = function(context, testMethodDeclaration) {
var value = this.interpret(context);
if(value instanceof Bool)
return value.value;
else {
var writer = new CodeWriter(this.dialect, context);
this.toDialect(writer);
throw new SyntaxError("Cannot test '" + writer.toString() + "'");
}
};
MethodCall.prototype.findDeclaration = function(context) {
// look for method as value
try {
var o = context.getValue(this.method.id);
if(o instanceof ClosureValue) {
return new ClosureDeclaration(o);
}
} catch (e) {
if(!(e instanceof PromptoError)) {
throw e;
}
}
// look for declared method
var finder = new MethodFinder(context,this);
return finder.findMethod(true);
};
exports.MethodCall = MethodCall;
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
var BaseStatement = __webpack_require__(94).BaseStatement;
function SimpleStatement() {
BaseStatement.call(this);
return this;
}
SimpleStatement.prototype = Object.create(BaseStatement.prototype);
SimpleStatement.prototype.constructor = SimpleStatement;
exports.SimpleStatement = SimpleStatement;
/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
function BaseStatement() {
Section.call(this);
return this;
}
BaseStatement.prototype = Object.create(Section.prototype);
BaseStatement.prototype.constructor = BaseStatement;
exports.BaseStatement = BaseStatement;
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
var PromptoError = __webpack_require__(61).PromptoError;
var CategoryType = null;
var Score = __webpack_require__(96).Score;
exports.resolve = function() {
CategoryType = __webpack_require__(90).CategoryType;
}
function MethodFinder(context, methodCall) {
this.context = context;
this.methodCall = methodCall;
return this;
}
MethodFinder.prototype.findMethod = function(checkInstance) {
var selector = this.methodCall.method;
var candidates = selector.getCandidates(this.context, checkInstance);
if(candidates.length==0)
this.context.problemListener.reportUnknownMethod(this.methodCall.method.id);
var compatibles = this.filterCompatible(candidates, checkInstance);
switch(compatibles.length) {
case 0:
this.context.problemListener.reportNoMatchingPrototype(this.methodCall);
case 1:
return compatibles[0];
default:
return this.findMostSpecific(compatibles, checkInstance);
}
};
MethodFinder.prototype.findMostSpecific = function(candidates, checkInstance) {
var candidate = null;
var ambiguous = [];
candidates.forEach(function(c) {
if(candidate==null)
candidate = c;
else {
var score = this.scoreMostSpecific(candidate, c, checkInstance);
switch(score) {
case Score.WORSE:
candidate = c;
ambiguous = [];
break;
case Score.BETTER:
break;
case Score.SIMILAR:
ambiguous.push(c);
break;
}
}
}, this);
if(ambiguous.length>0) {
throw new SyntaxError("Too many prototypes!"); // TODO refine
}
return candidate;
}
MethodFinder.prototype.scoreMostSpecific = function(d1, d2, checkInstance) {
try {
var s1 = this.context.newLocalContext();
d1.registerArguments(s1);
var s2 = this.context.newLocalContext();
d2.registerArguments(s2);
var ass1 = this.methodCall.makeAssignments(this.context, d1);
var ass2 = this.methodCall.makeAssignments(this.context, d2);
for(var i=0;i0 && this[0].argument==null) {
writer.append(' ');
this[idx++].toDialect(writer);
}
if(idx0)
writer.trimLast(2);
writer.append(")");
};
ArgumentAssignmentList.prototype.toMDialect = function(writer) {
this.toODialect(writer);
};
exports.ArgumentAssignmentList = ArgumentAssignmentList;
/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {
var EParserFactory = null;
var OParserFactory = null;
var MParserFactory = null;
exports.resolve = function() {
EParserFactory = __webpack_require__(99).EParserFactory;
OParserFactory = __webpack_require__(523).OParserFactory;
MParserFactory = __webpack_require__(524).MParserFactory;
}
function Dialect() {
return this;
}
Dialect.E = new Dialect();
Dialect.E.getParserFactory = function() {
return new EParserFactory();
};
Dialect.E.toDialect = function(w, o) {
o.toEDialect(w);
};
Dialect.E.toString = function(o) {
return o.toEString();
};
Dialect.O = new Dialect();
Dialect.O.getParserFactory = function() {
return new OParserFactory();
};
Dialect.O.toDialect = function(w, o) {
o.toODialect(w);
};
Dialect.O.toString = function(o) {
return o.toOString();
};
Dialect.M = new Dialect();
Dialect.M.getParserFactory = function() {
return new MParserFactory();
};
Dialect.M.toDialect = function(w, o) {
o.toMDialect(w);
};
Dialect.M.toString = function(o) {
return o.toMString();
};
exports.Dialect = Dialect;
/***/ },
/* 99 */
/***/ function(module, exports, __webpack_require__) {
var antlr4 = __webpack_require__(1);
var EIndentingLexer = __webpack_require__(100).EIndentingLexer;
var ECleverParser = __webpack_require__(102).ECleverParser;
exports.EParserFactory = function() {
this.newLexer = function(data) {
return new EIndentingLexer(new antlr4.InputStream(data));
};
this.newParser = function(path, data) {
return new ECleverParser(path, data);
};
};
/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {
var antlr4 = __webpack_require__(1);
var ELexer = __webpack_require__(101).ELexer;
var Dialect = __webpack_require__(98).Dialect;
function EIndentingLexer(input) {
ELexer.call(this, input);
this.tokens = [];
this.indents = [0];
this.wasLF = false;
this.addLF = true;
this.dialect = Dialect.BOA;
this.nextLexerToken = this.nextToken;
this.nextToken = this.indentedNextToken;
return this;
}
EIndentingLexer.prototype = Object.create(ELexer.prototype);
EIndentingLexer.prototype.constructor = EIndentingLexer;
EIndentingLexer.prototype.indentedNextToken = function() {
var t = this.getNextToken();
this.wasLF = t.type===ELexer.LF;
return t;
};
EIndentingLexer.prototype.getNextToken = function() {
if(this.tokens.length>0) {
return this.tokens.shift();
}
this.interpret(this.nextLexerToken());
return this.nextToken();
};
EIndentingLexer.prototype.interpret = function(token) {
switch(token.type) {
case ELexer.EOF:
this.interpretEOF(token);
break;
case ELexer.LF_TAB:
this.interpretLFTAB(token);
break;
default:
this.interpretAnyToken(token);
}
};
EIndentingLexer.prototype.interpretEOF = function(eof) {
// gracefully handle missing dedents
while(this.indents.length>1) {
this.tokens.push(this.deriveToken(eof, ELexer.DEDENT));
this.tokens.push(this.deriveToken(eof, ELexer.LF));
this.wasLF = true;
this.indents.pop();
}
// gracefully handle missing lf
if(!this.wasLF && this.addLF) {
this.tokens.push(this.deriveToken(eof, ELexer.LF));
}
this.tokens.push(eof);
};
EIndentingLexer.prototype.interpretLFTAB = function(lftab) {
// count TABs following LF
var indentCount = this.countIndents(lftab.text);
var next = this.nextLexerToken();
// if this was an empty line, simply skip it
if(next.type===ELexer.EOF || next.type===ELexer.LF_TAB) {
this.tokens.push(this.deriveToken(lftab, ELexer.LF));
this.interpret(next);
} else if(indentCount===this.indents[this.indents.length-1]) {
this.tokens.push(this.deriveToken(lftab, ELexer.LF));
this.interpret(next);
} else if(indentCount>this.indents[this.indents.length-1]) {
this.tokens.push(this.deriveToken(lftab, ELexer.LF));
this.tokens.push(this.deriveToken(lftab, ELexer.INDENT));
this.indents.push(indentCount);
this.interpret(next);
} else {
while(this.indents.length>1 && indentCountthis.indents[this.indents.length-1]) {
// TODO, fire an error through token
}
this.interpret(next);
/*jshint noempty:true*/
}
};
EIndentingLexer.prototype.deriveToken = function(token, type) {
var res = token.clone();
res.type = type;
return res;
};
EIndentingLexer.prototype.countIndents = function(text) {
var count = 0;
for(var i=0;i\t>\4?\t?\4@\t@\4A\tA\4B\t",
"B\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM",
"\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\tV\4W\tW\4X\tX\4",
"Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4",
"d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o",
"\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4z\t",
"z\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080\4\u0081\t\u0081",
"\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085\t\u0085\4\u0086",
"\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a",
"\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e\t\u008e\4\u008f",
"\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092\4\u0093\t\u0093",
"\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098",
"\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b\4\u009c\t\u009c",
"\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f\4\u00a0\t\u00a0\4\u00a1",
"\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3\4\u00a4\t\u00a4\4\u00a5\t\u00a5",
"\4\u00a6\t\u00a6\4\u00a7\t\u00a7\4\u00a8\t\u00a8\4\u00a9\t\u00a9\4\u00aa",
"\t\u00aa\4\u00ab\t\u00ab\4\u00ac\t\u00ac\4\u00ad\t\u00ad\4\u00ae\t\u00ae",
"\4\u00af\t\u00af\4\u00b0\t\u00b0\4\u00b1\t\u00b1\4\u00b2\t\u00b2\4\u00b3",
"\t\u00b3\4\u00b4\t\u00b4\4\u00b5\t\u00b5\4\u00b6\t\u00b6\4\u00b7\t\u00b7",
"\4\u00b8\t\u00b8\4\u00b9\t\u00b9\4\u00ba\t\u00ba\4\u00bb\t\u00bb\4\u00bc",
"\t\u00bc\4\u00bd\t\u00bd\4\u00be\t\u00be\4\u00bf\t\u00bf\3\2\3\2\7\2",
"\u0182\n\2\f\2\16\2\u0185\13\2\3\3\3\3\3\3\3\4\5\4\u018b\n\4\3\4\3\4",
"\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\7\7\u019b\n\7\f\7\16",
"\7\u019e\13\7\3\7\3\7\3\7\3\7\3\7\3\7\7\7\u01a6\n\7\f\7\16\7\u01a9\13",
"\7\5\7\u01ab\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n",
"\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13",
"\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r",
"\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\23",
"\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3",
"\32\3\32\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\36\3\36\3\36\3\37\3\37",
"\3 \3 \3!\3!\3\"\3\"\3#\3#\3$\3$\3%\3%\3&\3&\3&\3\'\3\'\3(\3(\3(\3)",
"\3)\3)\3*\3*\3+\3+\3+\3,\3,\3,\3-\3-\3-\3.\3.\3/\3/\3/\3\60\3\60\3\60",
"\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3",
"\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64",
"\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3",
"\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\38",
"\38\39\39\39\39\39\39\39\3:\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3<\3<\3",
"<\3<\3<\3<\3<\3<\3<\3=\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3?\3?\3?\3?\3?",
"\3@\3@\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3",
"B\3B\3B\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3G",
"\3G\3G\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u02ce\nH\3I\3I\3I\3I\3",
"I\3J\3J\3J\3J\3J\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3L",
"\3L\3L\3L\3L\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3N\3N\3N\3O\3O\3O\3O\3O\3",
"P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\3R\3S\3S",
"\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3V\3V\3V\3V\3V\3",
"V\3V\3V\3W\3W\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y",
"\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u034d\nY\3Z\3Z\3Z\3[\3[\3[\3[\3[\3[\3\\",
"\3\\\3\\\3\\\3\\\3]\3]\3]\3]\3]\3^\3^\3^\3^\3^\3_\3_\3_\3_\3_\3_\3_",
"\3_\3_\3_\3_\3`\3`\3`\3`\3`\3`\3`\3a\3a\3a\3a\3a\3a\3a\3a\3b\3b\3b\3",
"b\3b\3b\3b\3b\3b\3b\3c\3c\3c\3c\3c\3c\3c\3c\3d\3d\3d\3d\3d\3d\3e\3e",
"\3e\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g\3h\3",
"h\3h\3h\3i\3i\3i\3i\3i\3j\3j\3j\3j\3j\3j\3j\3k\3k\3k\3l\3l\3l\3m\3m",
"\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3p\3p\3p\3p\3p\3p\3p\3p\3",
"p\3q\3q\3q\3q\3q\3q\3q\3r\3r\3r\3r\3r\3r\3r\3r\3s\3s\3s\3s\3s\3s\3s",
"\3t\3t\3t\3t\3t\3t\3t\3t\3u\3u\3u\3u\3u\3u\3u\3v\3v\3v\3v\3v\3w\3w\3",
"w\3w\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\3x\5x\u041b\nx\3y\3y\3y",
"\3y\3y\3z\3z\3z\3{\3{\3{\3{\3|\3|\3|\3|\3|\3}\3}\3}\3}\3}\3}\3}\3}\3",
"}\3~\3~\3~\3\177\3\177\3\177\3\177\3\177\3\177\3\u0080\3\u0080\3\u0080",
"\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0081\3\u0081",
"\3\u0081\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0082\3\u0082\3\u0082",
"\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0084\3\u0084\3\u0084\3\u0084",
"\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085",
"\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086",
"\3\u0086\3\u0086\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087",
"\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0088",
"\3\u0088\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a",
"\3\u008a\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b",
"\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c\3\u008c\3\u008c",
"\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008d\3\u008d\3\u008d",
"\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e",
"\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090",
"\3\u0090\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091\3\u0092",
"\3\u0092\3\u0092\3\u0092\3\u0092\3\u0092\3\u0093\3\u0093\3\u0093\3\u0094",
"\3\u0094\3\u0094\3\u0094\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095",
"\3\u0095\3\u0095\3\u0095\3\u0095\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096",
"\3\u0097\3\u0097\3\u0097\3\u0097\3\u0097\3\u0098\3\u0098\3\u0098\3\u0098",
"\3\u0098\3\u0098\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u009a",
"\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009b\3\u009b\3\u009b\3\u009b",
"\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b",
"\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\5\u009b\u0505\n\u009b\3\u009c",
"\3\u009c\3\u009c\5\u009c\u050a\n\u009c\3\u009c\3\u009c\3\u009d\3\u009d",
"\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d\3\u009d",
"\3\u009d\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e",
"\3\u009e\3\u009e\3\u009e\3\u009e\3\u009f\3\u009f\3\u009f\7\u009f\u0529",
"\n\u009f\f\u009f\16\u009f\u052c\13\u009f\3\u00a0\3\u00a0\3\u00a0\3\u00a1",
"\3\u00a1\3\u00a1\3\u00a2\3\u00a2\3\u00a2\3\u00a3\3\u00a3\3\u00a3\3\u00a4",
"\3\u00a4\7\u00a4\u053c\n\u00a4\f\u00a4\16\u00a4\u053f\13\u00a4\3\u00a5",
"\3\u00a5\3\u00a6\3\u00a6\3\u00a7\3\u00a7\3\u00a7\7\u00a7\u0548\n\u00a7",
"\f\u00a7\16\u00a7\u054b\13\u00a7\3\u00a7\3\u00a7\3\u00a8\3\u00a8\3\u00a8",
"\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8",
"\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a8",
"\3\u00a8\3\u00a8\3\u00a9\3\u00a9\3\u00aa\3\u00aa\3\u00ab\3\u00ab\3\u00ac",
"\3\u00ac\3\u00ac\7\u00ac\u056f\n\u00ac\f\u00ac\16\u00ac\u0572\13\u00ac",
"\5\u00ac\u0574\n\u00ac\3\u00ad\3\u00ad\3\u00ad\6\u00ad\u0579\n\u00ad",
"\r\u00ad\16\u00ad\u057a\3\u00ad\5\u00ad\u057e\n\u00ad\3\u00ae\3\u00ae",
"\5\u00ae\u0582\n\u00ae\3\u00ae\6\u00ae\u0585\n\u00ae\r\u00ae\16\u00ae",
"\u0586\3\u00af\3\u00af\3\u00af\3\u00af\5\u00af\u058d\n\u00af\3\u00af",
"\6\u00af\u0590\n\u00af\r\u00af\16\u00af\u0591\3\u00b0\3\u00b0\3\u00b1",
"\3\u00b1\3\u00b1\3\u00b1\6\u00b1\u059a\n\u00b1\r\u00b1\16\u00b1\u059b",
"\5\u00b1\u059e\n\u00b1\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\5\u00b2",
"\u05a5\n\u00b2\3\u00b2\3\u00b2\3\u00b3\3\u00b3\3\u00b3\3\u00b3\3\u00b4",
"\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4",
"\3\u00b4\3\u00b4\5\u00b4\u05b9\n\u00b4\5\u00b4\u05bb\n\u00b4\5\u00b4",
"\u05bd\n\u00b4\5\u00b4\u05bf\n\u00b4\3\u00b5\3\u00b5\3\u00b5\3\u00b5",
"\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6",
"\3\u00b6\3\u00b6\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7",
"\5\u00b7\u05d7\n\u00b7\3\u00b8\3\u00b8\3\u00b8\5\u00b8\u05dc\n\u00b8",
"\3\u00b8\5\u00b8\u05df\n\u00b8\3\u00b8\5\u00b8\u05e2\n\u00b8\3\u00b8",
"\3\u00b8\3\u00b8\5\u00b8\u05e7\n\u00b8\3\u00b8\5\u00b8\u05ea\n\u00b8",
"\3\u00b8\3\u00b8\3\u00b8\5\u00b8\u05ef\n\u00b8\3\u00b8\3\u00b8\5\u00b8",
"\u05f3\n\u00b8\3\u00b8\3\u00b8\3\u00b9\5\u00b9\u05f8\n\u00b9\3\u00b9",
"\3\u00b9\3\u00b9\3\u00ba\5\u00ba\u05fe\n\u00ba\3\u00ba\3\u00ba\3\u00ba",
"\3\u00bb\5\u00bb\u0604\n\u00bb\3\u00bb\3\u00bb\3\u00bb\3\u00bc\5\u00bc",
"\u060a\n\u00bc\3\u00bc\3\u00bc\3\u00bc\3\u00bd\5\u00bd\u0610\n\u00bd",
"\3\u00bd\3\u00bd\3\u00bd\3\u00be\5\u00be\u0616\n\u00be\3\u00be\3\u00be",
"\3\u00be\7\u00be\u061b\n\u00be\f\u00be\16\u00be\u061e\13\u00be\3\u00be",
"\5\u00be\u0621\n\u00be\3\u00be\3\u00be\3\u00bf\3\u00bf\3\u00bf\3\u019c",
"\2\u00c0\3\5\5\6\7\7\t\b\13\t\r\n\17\13\21\f\23\r\25\16\27\17\31\20",
"\33\21\35\22\37\23!\24#\25%\26\'\27)\30+\31-\32/\33\61\34\63\35\65\36",
"\67\379 ;!=\"?#A$C%E&G\'I(K)M*O+Q,S-U.W/Y\60[\61]\62_\63a\64c\65e\66",
"g\67i8k9m:o;qw?y@{A}B\177C\u0081D\u0083E\u0085F\u0087G\u0089H\u008b",
"I\u008dJ\u008fK\u0091L\u0093M\u0095N\u0097O\u0099P\u009bQ\u009dR\u009f",
"S\u00a1T\u00a3U\u00a5V\u00a7W\u00a9X\u00abY\u00adZ\u00af[\u00b1\\\u00b3",
"]\u00b5^\u00b7_\u00b9`\u00bba\u00bdb\u00bfc\u00c1d\u00c3e\u00c5f\u00c7",
"g\u00c9h\u00cbi\u00cdj\u00cfk\u00d1l\u00d3m\u00d5n\u00d7o\u00d9p\u00db",
"q\u00ddr\u00dfs\u00e1t\u00e3u\u00e5v\u00e7w\u00e9x\u00eby\u00edz\u00ef",
"{\u00f1|\u00f3}\u00f5~\u00f7\177\u00f9\u0080\u00fb\u0081\u00fd\u0082",
"\u00ff\u0083\u0101\u0084\u0103\u0085\u0105\u0086\u0107\u0087\u0109\u0088",
"\u010b\u0089\u010d\u008a\u010f\u008b\u0111\u008c\u0113\u008d\u0115\u008e",
"\u0117\u008f\u0119\u0090\u011b\u0091\u011d\u0092\u011f\u0093\u0121\u0094",
"\u0123\u0095\u0125\u0096\u0127\u0097\u0129\u0098\u012b\u0099\u012d\u009a",
"\u012f\u009b\u0131\u009c\u0133\u009d\u0135\u009e\u0137\u009f\u0139\u00a0",
"\u013b\u00a1\u013d\u00a2\u013f\u00a3\u0141\u00a4\u0143\u00a5\u0145\u00a6",
"\u0147\2\u0149\2\u014b\2\u014d\u00a7\u014f\u00a8\u0151\u00a9\u0153\u00aa",
"\u0155\u00ab\u0157\2\u0159\2\u015b\2\u015d\2\u015f\2\u0161\2\u0163\u00ac",
"\u0165\u00ad\u0167\2\u0169\u00ae\u016b\2\u016d\2\u016f\u00af\u0171\2",
"\u0173\2\u0175\2\u0177\2\u0179\2\u017b\2\u017d\2\3\2\f\4\2\13\13\"\"",
"\4\2\f\f\17\17\6\2\f\f\17\17))^^\4\2C\\aa\5\2C\\aac|\6\2\f\f\17\17$",
"$^^\4\2GGgg\4\2--//\5\2\62;CHch\n\2$$))^^ddhhppttvv\u0646\2\3\3\2\2",
"\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17",
"\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3",
"\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2",
"\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2",
"\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3",
"\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2",
"\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2",
"\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2",
"\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2",
"m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y",
"\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083",
"\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2",
"\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2",
"\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d",
"\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2",
"\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2",
"\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7",
"\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2",
"\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2",
"\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1",
"\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2",
"\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2",
"\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb",
"\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3\3\2",
"\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2\2",
"\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2\2\2\u0103\3\2\2\2\2\u0105",
"\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b\3\2\2\2\2\u010d\3\2",
"\2\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2\2\2\u0115\3\2\2\2",
"\2\u0117\3\2\2\2\2\u0119\3\2\2\2\2\u011b\3\2\2\2\2\u011d\3\2\2\2\2\u011f",
"\3\2\2\2\2\u0121\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2\2\2\u0127\3\2",
"\2\2\2\u0129\3\2\2\2\2\u012b\3\2\2\2\2\u012d\3\2\2\2\2\u012f\3\2\2\2",
"\2\u0131\3\2\2\2\2\u0133\3\2\2\2\2\u0135\3\2\2\2\2\u0137\3\2\2\2\2\u0139",
"\3\2\2\2\2\u013b\3\2\2\2\2\u013d\3\2\2\2\2\u013f\3\2\2\2\2\u0141\3\2",
"\2\2\2\u0143\3\2\2\2\2\u0145\3\2\2\2\2\u014d\3\2\2\2\2\u014f\3\2\2\2",
"\2\u0151\3\2\2\2\2\u0153\3\2\2\2\2\u0155\3\2\2\2\2\u0163\3\2\2\2\2\u0165",
"\3\2\2\2\2\u0169\3\2\2\2\2\u016f\3\2\2\2\3\u017f\3\2\2\2\5\u0186\3\2",
"\2\2\7\u018a\3\2\2\2\t\u018e\3\2\2\2\13\u0192\3\2\2\2\r\u01aa\3\2\2",
"\2\17\u01ac\3\2\2\2\21\u01b2\3\2\2\2\23\u01b6\3\2\2\2\25\u01bf\3\2\2",
"\2\27\u01c8\3\2\2\2\31\u01d4\3\2\2\2\33\u01db\3\2\2\2\35\u01dd\3\2\2",
"\2\37\u01df\3\2\2\2!\u01e1\3\2\2\2#\u01e4\3\2\2\2%\u01e6\3\2\2\2\'\u01e8",
"\3\2\2\2)\u01ea\3\2\2\2+\u01ec\3\2\2\2-\u01ee\3\2\2\2/\u01f0\3\2\2\2",
"\61\u01f2\3\2\2\2\63\u01f4\3\2\2\2\65\u01f6\3\2\2\2\67\u01f8\3\2\2\2",
"9\u01fb\3\2\2\2;\u01fd\3\2\2\2=\u0200\3\2\2\2?\u0202\3\2\2\2A\u0204",
"\3\2\2\2C\u0206\3\2\2\2E\u0208\3\2\2\2G\u020a\3\2\2\2I\u020c\3\2\2\2",
"K\u020e\3\2\2\2M\u0211\3\2\2\2O\u0213\3\2\2\2Q\u0216\3\2\2\2S\u0219",
"\3\2\2\2U\u021b\3\2\2\2W\u021e\3\2\2\2Y\u0221\3\2\2\2[\u0224\3\2\2\2",
"]\u0226\3\2\2\2_\u0229\3\2\2\2a\u022c\3\2\2\2c\u0234\3\2\2\2e\u023e",
"\3\2\2\2g\u0243\3\2\2\2i\u024b\3\2\2\2k\u0253\3\2\2\2m\u0258\3\2\2\2",
"o\u025d\3\2\2\2q\u0266\3\2\2\2s\u026d\3\2\2\2u\u0274\3\2\2\2w\u0279",
"\3\2\2\2y\u0282\3\2\2\2{\u0287\3\2\2\2}\u028d\3\2\2\2\177\u0292\3\2",
"\2\2\u0081\u029b\3\2\2\2\u0083\u02a2\3\2\2\2\u0085\u02ab\3\2\2\2\u0087",
"\u02af\3\2\2\2\u0089\u02b6\3\2\2\2\u008b\u02ba\3\2\2\2\u008d\u02be\3",
"\2\2\2\u008f\u02cd\3\2\2\2\u0091\u02cf\3\2\2\2\u0093\u02d4\3\2\2\2\u0095",
"\u02de\3\2\2\2\u0097\u02e9\3\2\2\2\u0099\u02f2\3\2\2\2\u009b\u02f8\3",
"\2\2\2\u009d\u02fb\3\2\2\2\u009f\u0300\3\2\2\2\u00a1\u0306\3\2\2\2\u00a3",
"\u030f\3\2\2\2\u00a5\u0315\3\2\2\2\u00a7\u031b\3\2\2\2\u00a9\u0324\3",
"\2\2\2\u00ab\u0328\3\2\2\2\u00ad\u0330\3\2\2\2\u00af\u0337\3\2\2\2\u00b1",
"\u034c\3\2\2\2\u00b3\u034e\3\2\2\2\u00b5\u0351\3\2\2\2\u00b7\u0357\3",
"\2\2\2\u00b9\u035c\3\2\2\2\u00bb\u0361\3\2\2\2\u00bd\u0366\3\2\2\2\u00bf",
"\u0371\3\2\2\2\u00c1\u0378\3\2\2\2\u00c3\u0380\3\2\2\2\u00c5\u038a\3",
"\2\2\2\u00c7\u0392\3\2\2\2\u00c9\u0398\3\2\2\2\u00cb\u03a1\3\2\2\2\u00cd",
"\u03a9\3\2\2\2\u00cf\u03af\3\2\2\2\u00d1\u03b3\3\2\2\2\u00d3\u03b8\3",
"\2\2\2\u00d5\u03bf\3\2\2\2\u00d7\u03c2\3\2\2\2\u00d9\u03c5\3\2\2\2\u00db",
"\u03cb\3\2\2\2\u00dd\u03d2\3\2\2\2\u00df\u03d5\3\2\2\2\u00e1\u03de\3",
"\2\2\2\u00e3\u03e5\3\2\2\2\u00e5\u03ed\3\2\2\2\u00e7\u03f4\3\2\2\2\u00e9",
"\u03fc\3\2\2\2\u00eb\u0403\3\2\2\2\u00ed\u0408\3\2\2\2\u00ef\u041a\3",
"\2\2\2\u00f1\u041c\3\2\2\2\u00f3\u0421\3\2\2\2\u00f5\u0424\3\2\2\2\u00f7",
"\u0428\3\2\2\2\u00f9\u042d\3\2\2\2\u00fb\u0436\3\2\2\2\u00fd\u0439\3",
"\2\2\2\u00ff\u043f\3\2\2\2\u0101\u0449\3\2\2\2\u0103\u044e\3\2\2\2\u0105",
"\u0454\3\2\2\2\u0107\u0459\3\2\2\2\u0109\u0463\3\2\2\2\u010b\u046c\3",
"\2\2\2\u010d\u0473\3\2\2\2\u010f\u047d\3\2\2\2\u0111\u0482\3\2\2\2\u0113",
"\u0487\3\2\2\2\u0115\u048e\3\2\2\2\u0117\u0498\3\2\2\2\u0119\u049f\3",
"\2\2\2\u011b\u04a8\3\2\2\2\u011d\u04ae\3\2\2\2\u011f\u04b5\3\2\2\2\u0121",
"\u04ba\3\2\2\2\u0123\u04bf\3\2\2\2\u0125\u04c5\3\2\2\2\u0127\u04c8\3",
"\2\2\2\u0129\u04cc\3\2\2\2\u012b\u04d6\3\2\2\2\u012d\u04db\3\2\2\2\u012f",
"\u04e0\3\2\2\2\u0131\u04e6\3\2\2\2\u0133\u04ec\3\2\2\2\u0135\u0504\3",
"\2\2\2\u0137\u0506\3\2\2\2\u0139\u050d\3\2\2\2\u013b\u0519\3\2\2\2\u013d",
"\u0525\3\2\2\2\u013f\u052d\3\2\2\2\u0141\u0530\3\2\2\2\u0143\u0533\3",
"\2\2\2\u0145\u0536\3\2\2\2\u0147\u053d\3\2\2\2\u0149\u0540\3\2\2\2\u014b",
"\u0542\3\2\2\2\u014d\u0544\3\2\2\2\u014f\u054e\3\2\2\2\u0151\u0565\3",
"\2\2\2\u0153\u0567\3\2\2\2\u0155\u0569\3\2\2\2\u0157\u0573\3\2\2\2\u0159",
"\u0575\3\2\2\2\u015b\u057f\3\2\2\2\u015d\u058c\3\2\2\2\u015f\u0593\3",
"\2\2\2\u0161\u0595\3\2\2\2\u0163\u059f\3\2\2\2\u0165\u05a8\3\2\2\2\u0167",
"\u05ac\3\2\2\2\u0169\u05c0\3\2\2\2\u016b\u05c4\3\2\2\2\u016d\u05d6\3",
"\2\2\2\u016f\u05d8\3\2\2\2\u0171\u05f7\3\2\2\2\u0173\u05fd\3\2\2\2\u0175",
"\u0603\3\2\2\2\u0177\u0609\3\2\2\2\u0179\u060f\3\2\2\2\u017b\u0615\3",
"\2\2\2\u017d\u0624\3\2\2\2\u017f\u0183\5\7\4\2\u0180\u0182\t\2\2\2\u0181",
"\u0180\3\2\2\2\u0182\u0185\3\2\2\2\u0183\u0181\3\2\2\2\u0183\u0184\3",
"\2\2\2\u0184\4\3\2\2\2\u0185\u0183\3\2\2\2\u0186\u0187\7^\2\2\u0187",
"\u0188\5\3\2\2\u0188\6\3\2\2\2\u0189\u018b\7\17\2\2\u018a\u0189\3\2",
"\2\2\u018a\u018b\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018d\7\f\2\2\u018d",
"\b\3\2\2\2\u018e\u018f\7\13\2\2\u018f\u0190\3\2\2\2\u0190\u0191\b\5",
"\2\2\u0191\n\3\2\2\2\u0192\u0193\7\"\2\2\u0193\u0194\3\2\2\2\u0194\u0195",
"\b\6\2\2\u0195\f\3\2\2\2\u0196\u0197\7\61\2\2\u0197\u0198\7,\2\2\u0198",
"\u019c\3\2\2\2\u0199\u019b\13\2\2\2\u019a\u0199\3\2\2\2\u019b\u019e",
"\3\2\2\2\u019c\u019d\3\2\2\2\u019c\u019a\3\2\2\2\u019d\u019f\3\2\2\2",
"\u019e\u019c\3\2\2\2\u019f\u01a0\7,\2\2\u01a0\u01ab\7\61\2\2\u01a1\u01a2",
"\7\61\2\2\u01a2\u01a3\7\61\2\2\u01a3\u01a7\3\2\2\2\u01a4\u01a6\n\3\2",
"\2\u01a5\u01a4\3\2\2\2\u01a6\u01a9\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7",
"\u01a8\3\2\2\2\u01a8\u01ab\3\2\2\2\u01a9\u01a7\3\2\2\2\u01aa\u0196\3",
"\2\2\2\u01aa\u01a1\3\2\2\2\u01ab\16\3\2\2\2\u01ac\u01ad\7L\2\2\u01ad",
"\u01ae\7c\2\2\u01ae\u01af\7x\2\2\u01af\u01b0\7c\2\2\u01b0\u01b1\7<\2",
"\2\u01b1\20\3\2\2\2\u01b2\u01b3\7E\2\2\u01b3\u01b4\7%\2\2\u01b4\u01b5",
"\7<\2\2\u01b5\22\3\2\2\2\u01b6\u01b7\7R\2\2\u01b7\u01b8\7{\2\2\u01b8",
"\u01b9\7v\2\2\u01b9\u01ba\7j\2\2\u01ba\u01bb\7q\2\2\u01bb\u01bc\7p\2",
"\2\u01bc\u01bd\7\64\2\2\u01bd\u01be\7<\2\2\u01be\24\3\2\2\2\u01bf\u01c0",
"\7R\2\2\u01c0\u01c1\7{\2\2\u01c1\u01c2\7v\2\2\u01c2\u01c3\7j\2\2\u01c3",
"\u01c4\7q\2\2\u01c4\u01c5\7p\2\2\u01c5\u01c6\7\65\2\2\u01c6\u01c7\7",
"<\2\2\u01c7\26\3\2\2\2\u01c8\u01c9\7L\2\2\u01c9\u01ca\7c\2\2\u01ca\u01cb",
"\7x\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd\7U\2\2\u01cd\u01ce\7e\2\2\u01ce",
"\u01cf\7t\2\2\u01cf\u01d0\7k\2\2\u01d0\u01d1\7r\2\2\u01d1\u01d2\7v\2",
"\2\u01d2\u01d3\7<\2\2\u01d3\30\3\2\2\2\u01d4\u01d5\7U\2\2\u01d5\u01d6",
"\7y\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8\7h\2\2\u01d8\u01d9\7v\2\2\u01d9",
"\u01da\7<\2\2\u01da\32\3\2\2\2\u01db\u01dc\7<\2\2\u01dc\34\3\2\2\2\u01dd",
"\u01de\7=\2\2\u01de\36\3\2\2\2\u01df\u01e0\7.\2\2\u01e0 \3\2\2\2\u01e1",
"\u01e2\7\60\2\2\u01e2\u01e3\7\60\2\2\u01e3\"\3\2\2\2\u01e4\u01e5\7\60",
"\2\2\u01e5$\3\2\2\2\u01e6\u01e7\7*\2\2\u01e7&\3\2\2\2\u01e8\u01e9\7",
"+\2\2\u01e9(\3\2\2\2\u01ea\u01eb\7]\2\2\u01eb*\3\2\2\2\u01ec\u01ed\7",
"_\2\2\u01ed,\3\2\2\2\u01ee\u01ef\7}\2\2\u01ef.\3\2\2\2\u01f0\u01f1\7",
"\177\2\2\u01f1\60\3\2\2\2\u01f2\u01f3\7A\2\2\u01f3\62\3\2\2\2\u01f4",
"\u01f5\7#\2\2\u01f5\64\3\2\2\2\u01f6\u01f7\7(\2\2\u01f7\66\3\2\2\2\u01f8",
"\u01f9\7(\2\2\u01f9\u01fa\7(\2\2\u01fa8\3\2\2\2\u01fb\u01fc\7~\2\2\u01fc",
":\3\2\2\2\u01fd\u01fe\7~\2\2\u01fe\u01ff\7~\2\2\u01ff<\3\2\2\2\u0200",
"\u0201\7-\2\2\u0201>\3\2\2\2\u0202\u0203\7/\2\2\u0203@\3\2\2\2\u0204",
"\u0205\7,\2\2\u0205B\3\2\2\2\u0206\u0207\7\61\2\2\u0207D\3\2\2\2\u0208",
"\u0209\7^\2\2\u0209F\3\2\2\2\u020a\u020b\7\'\2\2\u020bH\3\2\2\2\u020c",
"\u020d\7@\2\2\u020dJ\3\2\2\2\u020e\u020f\7@\2\2\u020f\u0210\7?\2\2\u0210",
"L\3\2\2\2\u0211\u0212\7>\2\2\u0212N\3\2\2\2\u0213\u0214\7>\2\2\u0214",
"\u0215\7?\2\2\u0215P\3\2\2\2\u0216\u0217\7>\2\2\u0217\u0218\7@\2\2\u0218",
"R\3\2\2\2\u0219\u021a\7?\2\2\u021aT\3\2\2\2\u021b\u021c\7#\2\2\u021c",
"\u021d\7?\2\2\u021dV\3\2\2\2\u021e\u021f\7?\2\2\u021f\u0220\7?\2\2\u0220",
"X\3\2\2\2\u0221\u0222\7\u0080\2\2\u0222\u0223\7?\2\2\u0223Z\3\2\2\2",
"\u0224\u0225\7\u0080\2\2\u0225\\\3\2\2\2\u0226\u0227\7>\2\2\u0227\u0228",
"\7/\2\2\u0228^\3\2\2\2\u0229\u022a\7/\2\2\u022a\u022b\7@\2\2\u022b`",
"\3\2\2\2\u022c\u022d\7D\2\2\u022d\u022e\7q\2\2\u022e\u022f\7q\2\2\u022f",
"\u0230\7n\2\2\u0230\u0231\7g\2\2\u0231\u0232\7c\2\2\u0232\u0233\7p\2",
"\2\u0233b\3\2\2\2\u0234\u0235\7E\2\2\u0235\u0236\7j\2\2\u0236\u0237",
"\7c\2\2\u0237\u0238\7t\2\2\u0238\u0239\7c\2\2\u0239\u023a\7e\2\2\u023a",
"\u023b\7v\2\2\u023b\u023c\7g\2\2\u023c\u023d\7t\2\2\u023dd\3\2\2\2\u023e",
"\u023f\7V\2\2\u023f\u0240\7g\2\2\u0240\u0241\7z\2\2\u0241\u0242\7v\2",
"\2\u0242f\3\2\2\2\u0243\u0244\7K\2\2\u0244\u0245\7p\2\2\u0245\u0246",
"\7v\2\2\u0246\u0247\7g\2\2\u0247\u0248\7i\2\2\u0248\u0249\7g\2\2\u0249",
"\u024a\7t\2\2\u024ah\3\2\2\2\u024b\u024c\7F\2\2\u024c\u024d\7g\2\2\u024d",
"\u024e\7e\2\2\u024e\u024f\7k\2\2\u024f\u0250\7o\2\2\u0250\u0251\7c\2",
"\2\u0251\u0252\7n\2\2\u0252j\3\2\2\2\u0253\u0254\7F\2\2\u0254\u0255",
"\7c\2\2\u0255\u0256\7v\2\2\u0256\u0257\7g\2\2\u0257l\3\2\2\2\u0258\u0259",
"\7V\2\2\u0259\u025a\7k\2\2\u025a\u025b\7o\2\2\u025b\u025c\7g\2\2\u025c",
"n\3\2\2\2\u025d\u025e\7F\2\2\u025e\u025f\7c\2\2\u025f\u0260\7v\2\2\u0260",
"\u0261\7g\2\2\u0261\u0262\7V\2\2\u0262\u0263\7k\2\2\u0263\u0264\7o\2",
"\2\u0264\u0265\7g\2\2\u0265p\3\2\2\2\u0266\u0267\7R\2\2\u0267\u0268",
"\7g\2\2\u0268\u0269\7t\2\2\u0269\u026a\7k\2\2\u026a\u026b\7q\2\2\u026b",
"\u026c\7f\2\2\u026cr\3\2\2\2\u026d\u026e\7O\2\2\u026e\u026f\7g\2\2\u026f",
"\u0270\7v\2\2\u0270\u0271\7j\2\2\u0271\u0272\7q\2\2\u0272\u0273\7f\2",
"\2\u0273t\3\2\2\2\u0274\u0275\7E\2\2\u0275\u0276\7q\2\2\u0276\u0277",
"\7f\2\2\u0277\u0278\7g\2\2\u0278v\3\2\2\2\u0279\u027a\7F\2\2\u027a\u027b",
"\7q\2\2\u027b\u027c\7e\2\2\u027c\u027d\7w\2\2\u027d\u027e\7o\2\2\u027e",
"\u027f\7g\2\2\u027f\u0280\7p\2\2\u0280\u0281\7v\2\2\u0281x\3\2\2\2\u0282",
"\u0283\7D\2\2\u0283\u0284\7n\2\2\u0284\u0285\7q\2\2\u0285\u0286\7d\2",
"\2\u0286z\3\2\2\2\u0287\u0288\7K\2\2\u0288\u0289\7o\2\2\u0289\u028a",
"\7c\2\2\u028a\u028b\7i\2\2\u028b\u028c\7g\2\2\u028c|\3\2\2\2\u028d\u028e",
"\7W\2\2\u028e\u028f\7W\2\2\u028f\u0290\7K\2\2\u0290\u0291\7F\2\2\u0291",
"~\3\2\2\2\u0292\u0293\7K\2\2\u0293\u0294\7v\2\2\u0294\u0295\7g\2\2\u0295",
"\u0296\7t\2\2\u0296\u0297\7c\2\2\u0297\u0298\7v\2\2\u0298\u0299\7q\2",
"\2\u0299\u029a\7t\2\2\u029a\u0080\3\2\2\2\u029b\u029c\7E\2\2\u029c\u029d",
"\7w\2\2\u029d\u029e\7t\2\2\u029e\u029f\7u\2\2\u029f\u02a0\7q\2\2\u02a0",
"\u02a1\7t\2\2\u02a1\u0082\3\2\2\2\u02a2\u02a3\7c\2\2\u02a3\u02a4\7d",
"\2\2\u02a4\u02a5\7u\2\2\u02a5\u02a6\7v\2\2\u02a6\u02a7\7t\2\2\u02a7",
"\u02a8\7c\2\2\u02a8\u02a9\7e\2\2\u02a9\u02aa\7v\2\2\u02aa\u0084\3\2",
"\2\2\u02ab\u02ac\7c\2\2\u02ac\u02ad\7n\2\2\u02ad\u02ae\7n\2\2\u02ae",
"\u0086\3\2\2\2\u02af\u02b0\7c\2\2\u02b0\u02b1\7n\2\2\u02b1\u02b2\7y",
"\2\2\u02b2\u02b3\7c\2\2\u02b3\u02b4\7{\2\2\u02b4\u02b5\7u\2\2\u02b5",
"\u0088\3\2\2\2\u02b6\u02b7\7c\2\2\u02b7\u02b8\7p\2\2\u02b8\u02b9\7f",
"\2\2\u02b9\u008a\3\2\2\2\u02ba\u02bb\7c\2\2\u02bb\u02bc\7p\2\2\u02bc",
"\u02bd\7{\2\2\u02bd\u008c\3\2\2\2\u02be\u02bf\7c\2\2\u02bf\u02c0\7u",
"\2\2\u02c0\u008e\3\2\2\2\u02c1\u02c2\7c\2\2\u02c2\u02c3\7u\2\2\u02c3",
"\u02ce\7e\2\2\u02c4\u02c5\7c\2\2\u02c5\u02c6\7u\2\2\u02c6\u02c7\7e\2",
"\2\u02c7\u02c8\7g\2\2\u02c8\u02c9\7p\2\2\u02c9\u02ca\7f\2\2\u02ca\u02cb",
"\7k\2\2\u02cb\u02cc\7p\2\2\u02cc\u02ce\7i\2\2\u02cd\u02c1\3\2\2\2\u02cd",
"\u02c4\3\2\2\2\u02ce\u0090\3\2\2\2\u02cf\u02d0\7c\2\2\u02d0\u02d1\7",
"v\2\2\u02d1\u02d2\7v\2\2\u02d2\u02d3\7t\2\2\u02d3\u0092\3\2\2\2\u02d4",
"\u02d5\7c\2\2\u02d5\u02d6\7v\2\2\u02d6\u02d7\7v\2\2\u02d7\u02d8\7t\2",
"\2\u02d8\u02d9\7k\2\2\u02d9\u02da\7d\2\2\u02da\u02db\7w\2\2\u02db\u02dc",
"\7v\2\2\u02dc\u02dd\7g\2\2\u02dd\u0094\3\2\2\2\u02de\u02df\7c\2\2\u02df",
"\u02e0\7v\2\2\u02e0\u02e1\7v\2\2\u02e1\u02e2\7t\2\2\u02e2\u02e3\7k\2",
"\2\u02e3\u02e4\7d\2\2\u02e4\u02e5\7w\2\2\u02e5\u02e6\7v\2\2\u02e6\u02e7",
"\7g\2\2\u02e7\u02e8\7u\2\2\u02e8\u0096\3\2\2\2\u02e9\u02ea\7d\2\2\u02ea",
"\u02eb\7k\2\2\u02eb\u02ec\7p\2\2\u02ec\u02ed\7f\2\2\u02ed\u02ee\7k\2",
"\2\u02ee\u02ef\7p\2\2\u02ef\u02f0\7i\2\2\u02f0\u02f1\7u\2\2\u02f1\u0098",
"\3\2\2\2\u02f2\u02f3\7d\2\2\u02f3\u02f4\7t\2\2\u02f4\u02f5\7g\2\2\u02f5",
"\u02f6\7c\2\2\u02f6\u02f7\7m\2\2\u02f7\u009a\3\2\2\2\u02f8\u02f9\7d",
"\2\2\u02f9\u02fa\7{\2\2\u02fa\u009c\3\2\2\2\u02fb\u02fc\7e\2\2\u02fc",
"\u02fd\7c\2\2\u02fd\u02fe\7u\2\2\u02fe\u02ff\7g\2\2\u02ff\u009e\3\2",
"\2\2\u0300\u0301\7e\2\2\u0301\u0302\7c\2\2\u0302\u0303\7v\2\2\u0303",
"\u0304\7e\2\2\u0304\u0305\7j\2\2\u0305\u00a0\3\2\2\2\u0306\u0307\7e",
"\2\2\u0307\u0308\7c\2\2\u0308\u0309\7v\2\2\u0309\u030a\7g\2\2\u030a",
"\u030b\7i\2\2\u030b\u030c\7q\2\2\u030c\u030d\7t\2\2\u030d\u030e\7{\2",
"\2\u030e\u00a2\3\2\2\2\u030f\u0310\7e\2\2\u0310\u0311\7n\2\2\u0311\u0312",
"\7c\2\2\u0312\u0313\7u\2\2\u0313\u0314\7u\2\2\u0314\u00a4\3\2\2\2\u0315",
"\u0316\7e\2\2\u0316\u0317\7n\2\2\u0317\u0318\7q\2\2\u0318\u0319\7u\2",
"\2\u0319\u031a\7g\2\2\u031a\u00a6\3\2\2\2\u031b\u031c\7e\2\2\u031c\u031d",
"\7q\2\2\u031d\u031e\7p\2\2\u031e\u031f\7v\2\2\u031f\u0320\7c\2\2\u0320",
"\u0321\7k\2\2\u0321\u0322\7p\2\2\u0322\u0323\7u\2\2\u0323\u00a8\3\2",
"\2\2\u0324\u0325\7f\2\2\u0325\u0326\7g\2\2\u0326\u0327\7h\2\2\u0327",
"\u00aa\3\2\2\2\u0328\u0329\7f\2\2\u0329\u032a\7g\2\2\u032a\u032b\7h",
"\2\2\u032b\u032c\7c\2\2\u032c\u032d\7w\2\2\u032d\u032e\7n\2\2\u032e",
"\u032f\7v\2\2\u032f\u00ac\3\2\2\2\u0330\u0331\7f\2\2\u0331\u0332\7g",
"\2\2\u0332\u0333\7h\2\2\u0333\u0334\7k\2\2\u0334\u0335\7p\2\2\u0335",
"\u0336\7g\2\2\u0336\u00ae\3\2\2\2\u0337\u0338\7f\2\2\u0338\u0339\7g",
"\2\2\u0339\u033a\7n\2\2\u033a\u033b\7g\2\2\u033b\u033c\7v\2\2\u033c",
"\u033d\7g\2\2\u033d\u00b0\3\2\2\2\u033e\u033f\7f\2\2\u033f\u0340\7g",
"\2\2\u0340\u0341\7u\2\2\u0341\u034d\7e\2\2\u0342\u0343\7f\2\2\u0343",
"\u0344\7g\2\2\u0344\u0345\7u\2\2\u0345\u0346\7e\2\2\u0346\u0347\7g\2",
"\2\u0347\u0348\7p\2\2\u0348\u0349\7f\2\2\u0349\u034a\7k\2\2\u034a\u034b",
"\7p\2\2\u034b\u034d\7i\2\2\u034c\u033e\3\2\2\2\u034c\u0342\3\2\2\2\u034d",
"\u00b2\3\2\2\2\u034e\u034f\7f\2\2\u034f\u0350\7q\2\2\u0350\u00b4\3\2",
"\2\2\u0351\u0352\7f\2\2\u0352\u0353\7q\2\2\u0353\u0354\7k\2\2\u0354",
"\u0355\7p\2\2\u0355\u0356\7i\2\2\u0356\u00b6\3\2\2\2\u0357\u0358\7g",
"\2\2\u0358\u0359\7c\2\2\u0359\u035a\7e\2\2\u035a\u035b\7j\2\2\u035b",
"\u00b8\3\2\2\2\u035c\u035d\7g\2\2\u035d\u035e\7n\2\2\u035e\u035f\7u",
"\2\2\u035f\u0360\7g\2\2\u0360\u00ba\3\2\2\2\u0361\u0362\7g\2\2\u0362",
"\u0363\7p\2\2\u0363\u0364\7w\2\2\u0364\u0365\7o\2\2\u0365\u00bc\3\2",
"\2\2\u0366\u0367\7g\2\2\u0367\u0368\7p\2\2\u0368\u0369\7w\2\2\u0369",
"\u036a\7o\2\2\u036a\u036b\7g\2\2\u036b\u036c\7t\2\2\u036c\u036d\7c\2",
"\2\u036d\u036e\7v\2\2\u036e\u036f\7g\2\2\u036f\u0370\7f\2\2\u0370\u00be",
"\3\2\2\2\u0371\u0372\7g\2\2\u0372\u0373\7z\2\2\u0373\u0374\7e\2\2\u0374",
"\u0375\7g\2\2\u0375\u0376\7r\2\2\u0376\u0377\7v\2\2\u0377\u00c0\3\2",
"\2\2\u0378\u0379\7g\2\2\u0379\u037a\7z\2\2\u037a\u037b\7g\2\2\u037b",
"\u037c\7e\2\2\u037c\u037d\7w\2\2\u037d\u037e\7v\2\2\u037e\u037f\7g\2",
"\2\u037f\u00c2\3\2\2\2\u0380\u0381\7g\2\2\u0381\u0382\7z\2\2\u0382\u0383",
"\7r\2\2\u0383\u0384\7g\2\2\u0384\u0385\7e\2\2\u0385\u0386\7v\2\2\u0386",
"\u0387\7k\2\2\u0387\u0388\7p\2\2\u0388\u0389\7i\2\2\u0389\u00c4\3\2",
"\2\2\u038a\u038b\7g\2\2\u038b\u038c\7z\2\2\u038c\u038d\7v\2\2\u038d",
"\u038e\7g\2\2\u038e\u038f\7p\2\2\u038f\u0390\7f\2\2\u0390\u0391\7u\2",
"\2\u0391\u00c6\3\2\2\2\u0392\u0393\7h\2\2\u0393\u0394\7g\2\2\u0394\u0395",
"\7v\2\2\u0395\u0396\7e\2\2\u0396\u0397\7j\2\2\u0397\u00c8\3\2\2\2\u0398",
"\u0399\7h\2\2\u0399\u039a\7k\2\2\u039a\u039b\7n\2\2\u039b\u039c\7v\2",
"\2\u039c\u039d\7g\2\2\u039d\u039e\7t\2\2\u039e\u039f\7g\2\2\u039f\u03a0",
"\7f\2\2\u03a0\u00ca\3\2\2\2\u03a1\u03a2\7h\2\2\u03a2\u03a3\7k\2\2\u03a3",
"\u03a4\7p\2\2\u03a4\u03a5\7c\2\2\u03a5\u03a6\7n\2\2\u03a6\u03a7\7n\2",
"\2\u03a7\u03a8\7{\2\2\u03a8\u00cc\3\2\2\2\u03a9\u03aa\7h\2\2\u03aa\u03ab",
"\7n\2\2\u03ab\u03ac\7w\2\2\u03ac\u03ad\7u\2\2\u03ad\u03ae\7j\2\2\u03ae",
"\u00ce\3\2\2\2\u03af\u03b0\7h\2\2\u03b0\u03b1\7q\2\2\u03b1\u03b2\7t",
"\2\2\u03b2\u00d0\3\2\2\2\u03b3\u03b4\7h\2\2\u03b4\u03b5\7t\2\2\u03b5",
"\u03b6\7q\2\2\u03b6\u03b7\7o\2\2\u03b7\u00d2\3\2\2\2\u03b8\u03b9\7i",
"\2\2\u03b9\u03ba\7g\2\2\u03ba\u03bb\7v\2\2\u03bb\u03bc\7v\2\2\u03bc",
"\u03bd\7g\2\2\u03bd\u03be\7t\2\2\u03be\u00d4\3\2\2\2\u03bf\u03c0\7k",
"\2\2\u03c0\u03c1\7h\2\2\u03c1\u00d6\3\2\2\2\u03c2\u03c3\7k\2\2\u03c3",
"\u03c4\7p\2\2\u03c4\u00d8\3\2\2\2\u03c5\u03c6\7k\2\2\u03c6\u03c7\7p",
"\2\2\u03c7\u03c8\7f\2\2\u03c8\u03c9\7g\2\2\u03c9\u03ca\7z\2\2\u03ca",
"\u00da\3\2\2\2\u03cb\u03cc\7k\2\2\u03cc\u03cd\7p\2\2\u03cd\u03ce\7x",
"\2\2\u03ce\u03cf\7q\2\2\u03cf\u03d0\7m\2\2\u03d0\u03d1\7g\2\2\u03d1",
"\u00dc\3\2\2\2\u03d2\u03d3\7k\2\2\u03d3\u03d4\7u\2\2\u03d4\u00de\3\2",
"\2\2\u03d5\u03d6\7o\2\2\u03d6\u03d7\7c\2\2\u03d7\u03d8\7v\2\2\u03d8",
"\u03d9\7e\2\2\u03d9\u03da\7j\2\2\u03da\u03db\7k\2\2\u03db\u03dc\7p\2",
"\2\u03dc\u03dd\7i\2\2\u03dd\u00e0\3\2\2\2\u03de\u03df\7o\2\2\u03df\u03e0",
"\7g\2\2\u03e0\u03e1\7v\2\2\u03e1\u03e2\7j\2\2\u03e2\u03e3\7q\2\2\u03e3",
"\u03e4\7f\2\2\u03e4\u00e2\3\2\2\2\u03e5\u03e6\7o\2\2\u03e6\u03e7\7g",
"\2\2\u03e7\u03e8\7v\2\2\u03e8\u03e9\7j\2\2\u03e9\u03ea\7q\2\2\u03ea",
"\u03eb\7f\2\2\u03eb\u03ec\7u\2\2\u03ec\u00e4\3\2\2\2\u03ed\u03ee\7o",
"\2\2\u03ee\u03ef\7q\2\2\u03ef\u03f0\7f\2\2\u03f0\u03f1\7w\2\2\u03f1",
"\u03f2\7n\2\2\u03f2\u03f3\7q\2\2\u03f3\u00e6\3\2\2\2\u03f4\u03f5\7o",
"\2\2\u03f5\u03f6\7w\2\2\u03f6\u03f7\7v\2\2\u03f7\u03f8\7c\2\2\u03f8",
"\u03f9\7d\2\2\u03f9\u03fa\7n\2\2\u03fa\u03fb\7g\2\2\u03fb\u00e8\3\2",
"\2\2\u03fc\u03fd\7p\2\2\u03fd\u03fe\7c\2\2\u03fe\u03ff\7v\2\2\u03ff",
"\u0400\7k\2\2\u0400\u0401\7x\2\2\u0401\u0402\7g\2\2\u0402\u00ea\3\2",
"\2\2\u0403\u0404\7P\2\2\u0404\u0405\7q\2\2\u0405\u0406\7p\2\2\u0406",
"\u0407\7g\2\2\u0407\u00ec\3\2\2\2\u0408\u0409\7p\2\2\u0409\u040a\7q",
"\2\2\u040a\u040b\7v\2\2\u040b\u00ee\3\2\2\2\u040c\u040d\7p\2\2\u040d",
"\u040e\7q\2\2\u040e\u040f\7v\2\2\u040f\u0410\7j\2\2\u0410\u0411\7k\2",
"\2\u0411\u0412\7p\2\2\u0412\u041b\7i\2\2\u0413\u0414\7P\2\2\u0414\u0415",
"\7q\2\2\u0415\u0416\7v\2\2\u0416\u0417\7j\2\2\u0417\u0418\7k\2\2\u0418",
"\u0419\7p\2\2\u0419\u041b\7i\2\2\u041a\u040c\3\2\2\2\u041a\u0413\3\2",
"\2\2\u041b\u00f0\3\2\2\2\u041c\u041d\7p\2\2\u041d\u041e\7w\2\2\u041e",
"\u041f\7n\2\2\u041f\u0420\7n\2\2\u0420\u00f2\3\2\2\2\u0421\u0422\7q",
"\2\2\u0422\u0423\7p\2\2\u0423\u00f4\3\2\2\2\u0424\u0425\7q\2\2\u0425",
"\u0426\7p\2\2\u0426\u0427\7g\2\2\u0427\u00f6\3\2\2\2\u0428\u0429\7q",
"\2\2\u0429\u042a\7r\2\2\u042a\u042b\7g\2\2\u042b\u042c\7p\2\2\u042c",
"\u00f8\3\2\2\2\u042d\u042e\7q\2\2\u042e\u042f\7r\2\2\u042f\u0430\7g",
"\2\2\u0430\u0431\7t\2\2\u0431\u0432\7c\2\2\u0432\u0433\7v\2\2\u0433",
"\u0434\7q\2\2\u0434\u0435\7t\2\2\u0435\u00fa\3\2\2\2\u0436\u0437\7q",
"\2\2\u0437\u0438\7t\2\2\u0438\u00fc\3\2\2\2\u0439\u043a\7q\2\2\u043a",
"\u043b\7t\2\2\u043b\u043c\7f\2\2\u043c\u043d\7g\2\2\u043d\u043e\7t\2",
"\2\u043e\u00fe\3\2\2\2\u043f\u0440\7q\2\2\u0440\u0441\7v\2\2\u0441\u0442",
"\7j\2\2\u0442\u0443\7g\2\2\u0443\u0444\7t\2\2\u0444\u0445\7y\2\2\u0445",
"\u0446\7k\2\2\u0446\u0447\7u\2\2\u0447\u0448\7g\2\2\u0448\u0100\3\2",
"\2\2\u0449\u044a\7r\2\2\u044a\u044b\7c\2\2\u044b\u044c\7u\2\2\u044c",
"\u044d\7u\2\2\u044d\u0102\3\2\2\2\u044e\u044f\7t\2\2\u044f\u0450\7c",
"\2\2\u0450\u0451\7k\2\2\u0451\u0452\7u\2\2\u0452\u0453\7g\2\2\u0453",
"\u0104\3\2\2\2\u0454\u0455\7t\2\2\u0455\u0456\7g\2\2\u0456\u0457\7c",
"\2\2\u0457\u0458\7f\2\2\u0458\u0106\3\2\2\2\u0459\u045a\7t\2\2\u045a",
"\u045b\7g\2\2\u045b\u045c\7e\2\2\u045c\u045d\7g\2\2\u045d\u045e\7k\2",
"\2\u045e\u045f\7x\2\2\u045f\u0460\7k\2\2\u0460\u0461\7p\2\2\u0461\u0462",
"\7i\2\2\u0462\u0108\3\2\2\2\u0463\u0464\7t\2\2\u0464\u0465\7g\2\2\u0465",
"\u0466\7u\2\2\u0466\u0467\7q\2\2\u0467\u0468\7w\2\2\u0468\u0469\7t\2",
"\2\u0469\u046a\7e\2\2\u046a\u046b\7g\2\2\u046b\u010a\3\2\2\2\u046c\u046d",
"\7t\2\2\u046d\u046e\7g\2\2\u046e\u046f\7v\2\2\u046f\u0470\7w\2\2\u0470",
"\u0471\7t\2\2\u0471\u0472\7p\2\2\u0472\u010c\3\2\2\2\u0473\u0474\7t",
"\2\2\u0474\u0475\7g\2\2\u0475\u0476\7v\2\2\u0476\u0477\7w\2\2\u0477",
"\u0478\7t\2\2\u0478\u0479\7p\2\2\u0479\u047a\7k\2\2\u047a\u047b\7p\2",
"\2\u047b\u047c\7i\2\2\u047c\u010e\3\2\2\2\u047d\u047e\7t\2\2\u047e\u047f",
"\7q\2\2\u047f\u0480\7y\2\2\u0480\u0481\7u\2\2\u0481\u0110\3\2\2\2\u0482",
"\u0483\7u\2\2\u0483\u0484\7g\2\2\u0484\u0485\7n\2\2\u0485\u0486\7h\2",
"\2\u0486\u0112\3\2\2\2\u0487\u0488\7u\2\2\u0488\u0489\7g\2\2\u0489\u048a",
"\7v\2\2\u048a\u048b\7v\2\2\u048b\u048c\7g\2\2\u048c\u048d\7t\2\2\u048d",
"\u0114\3\2\2\2\u048e\u048f\7u\2\2\u048f\u0490\7k\2\2\u0490\u0491\7p",
"\2\2\u0491\u0492\7i\2\2\u0492\u0493\7n\2\2\u0493\u0494\7g\2\2\u0494",
"\u0495\7v\2\2\u0495\u0496\7q\2\2\u0496\u0497\7p\2\2\u0497\u0116\3\2",
"\2\2\u0498\u0499\7u\2\2\u0499\u049a\7q\2\2\u049a\u049b\7t\2\2\u049b",
"\u049c\7v\2\2\u049c\u049d\7g\2\2\u049d\u049e\7f\2\2\u049e\u0118\3\2",
"\2\2\u049f\u04a0\7u\2\2\u04a0\u04a1\7v\2\2\u04a1\u04a2\7q\2\2\u04a2",
"\u04a3\7t\2\2\u04a3\u04a4\7c\2\2\u04a4\u04a5\7d\2\2\u04a5\u04a6\7n\2",
"\2\u04a6\u04a7\7g\2\2\u04a7\u011a\3\2\2\2\u04a8\u04a9\7u\2\2\u04a9\u04aa",
"\7v\2\2\u04aa\u04ab\7q\2\2\u04ab\u04ac\7t\2\2\u04ac\u04ad\7g\2\2\u04ad",
"\u011c\3\2\2\2\u04ae\u04af\7u\2\2\u04af\u04b0\7y\2\2\u04b0\u04b1\7k",
"\2\2\u04b1\u04b2\7v\2\2\u04b2\u04b3\7e\2\2\u04b3\u04b4\7j\2\2\u04b4",
"\u011e\3\2\2\2\u04b5\u04b6\7v\2\2\u04b6\u04b7\7g\2\2\u04b7\u04b8\7u",
"\2\2\u04b8\u04b9\7v\2\2\u04b9\u0120\3\2\2\2\u04ba\u04bb\7v\2\2\u04bb",
"\u04bc\7j\2\2\u04bc\u04bd\7k\2\2\u04bd\u04be\7u\2\2\u04be\u0122\3\2",
"\2\2\u04bf\u04c0\7v\2\2\u04c0\u04c1\7j\2\2\u04c1\u04c2\7t\2\2\u04c2",
"\u04c3\7q\2\2\u04c3\u04c4\7y\2\2\u04c4\u0124\3\2\2\2\u04c5\u04c6\7v",
"\2\2\u04c6\u04c7\7q\2\2\u04c7\u0126\3\2\2\2\u04c8\u04c9\7v\2\2\u04c9",
"\u04ca\7t\2\2\u04ca\u04cb\7{\2\2\u04cb\u0128\3\2\2\2\u04cc\u04cd\7x",
"\2\2\u04cd\u04ce\7g\2\2\u04ce\u04cf\7t\2\2\u04cf\u04d0\7k\2\2\u04d0",
"\u04d1\7h\2\2\u04d1\u04d2\7{\2\2\u04d2\u04d3\7k\2\2\u04d3\u04d4\7p\2",
"\2\u04d4\u04d5\7i\2\2\u04d5\u012a\3\2\2\2\u04d6\u04d7\7y\2\2\u04d7\u04d8",
"\7k\2\2\u04d8\u04d9\7v\2\2\u04d9\u04da\7j\2\2\u04da\u012c\3\2\2\2\u04db",
"\u04dc\7y\2\2\u04dc\u04dd\7j\2\2\u04dd\u04de\7g\2\2\u04de\u04df\7p\2",
"\2\u04df\u012e\3\2\2\2\u04e0\u04e1\7y\2\2\u04e1\u04e2\7j\2\2\u04e2\u04e3",
"\7g\2\2\u04e3\u04e4\7t\2\2\u04e4\u04e5\7g\2\2\u04e5\u0130\3\2\2\2\u04e6",
"\u04e7\7y\2\2\u04e7\u04e8\7j\2\2\u04e8\u04e9\7k\2\2\u04e9\u04ea\7n\2",
"\2\u04ea\u04eb\7g\2\2\u04eb\u0132\3\2\2\2\u04ec\u04ed\7y\2\2\u04ed\u04ee",
"\7t\2\2\u04ee\u04ef\7k\2\2\u04ef\u04f0\7v\2\2\u04f0\u04f1\7g\2\2\u04f1",
"\u0134\3\2\2\2\u04f2\u04f3\7v\2\2\u04f3\u04f4\7t\2\2\u04f4\u04f5\7w",
"\2\2\u04f5\u0505\7g\2\2\u04f6\u04f7\7V\2\2\u04f7\u04f8\7t\2\2\u04f8",
"\u04f9\7w\2\2\u04f9\u0505\7g\2\2\u04fa\u04fb\7h\2\2\u04fb\u04fc\7c\2",
"\2\u04fc\u04fd\7n\2\2\u04fd\u04fe\7u\2\2\u04fe\u0505\7g\2\2\u04ff\u0500",
"\7H\2\2\u0500\u0501\7c\2\2\u0501\u0502\7n\2\2\u0502\u0503\7u\2\2\u0503",
"\u0505\7g\2\2\u0504\u04f2\3\2\2\2\u0504\u04f6\3\2\2\2\u0504\u04fa\3",
"\2\2\2\u0504\u04ff\3\2\2\2\u0505\u0136\3\2\2\2\u0506\u0509\7)\2\2\u0507",
"\u050a\5\u0161\u00b1\2\u0508\u050a\n\4\2\2\u0509\u0507\3\2\2\2\u0509",
"\u0508\3\2\2\2\u050a\u050b\3\2\2\2\u050b\u050c\7)\2\2\u050c\u0138\3",
"\2\2\2\u050d\u050e\7O\2\2\u050e\u050f\7K\2\2\u050f\u0510\7P\2\2\u0510",
"\u0511\7a\2\2\u0511\u0512\7K\2\2\u0512\u0513\7P\2\2\u0513\u0514\7V\2",
"\2\u0514\u0515\7G\2\2\u0515\u0516\7I\2\2\u0516\u0517\7G\2\2\u0517\u0518",
"\7T\2\2\u0518\u013a\3\2\2\2\u0519\u051a\7O\2\2\u051a\u051b\7C\2\2\u051b",
"\u051c\7Z\2\2\u051c\u051d\7a\2\2\u051d\u051e\7K\2\2\u051e\u051f\7P\2",
"\2\u051f\u0520\7V\2\2\u0520\u0521\7G\2\2\u0521\u0522\7I\2\2\u0522\u0523",
"\7G\2\2\u0523\u0524\7T\2\2\u0524\u013c\3\2\2\2\u0525\u052a\4C\\\2\u0526",
"\u0529\t\5\2\2\u0527\u0529\5\u014b\u00a6\2\u0528\u0526\3\2\2\2\u0528",
"\u0527\3\2\2\2\u0529\u052c\3\2\2\2\u052a\u0528\3\2\2\2\u052a\u052b\3",
"\2\2\2\u052b\u013e\3\2\2\2\u052c\u052a\3\2\2\2\u052d\u052e\4C\\\2\u052e",
"\u052f\5\u0147\u00a4\2\u052f\u0140\3\2\2\2\u0530\u0531\4c|\2\u0531\u0532",
"\5\u0147\u00a4\2\u0532\u0142\3\2\2\2\u0533\u0534\5\u0149\u00a5\2\u0534",
"\u0535\5\u0147\u00a4\2\u0535\u0144\3\2\2\2\u0536\u0537\7&\2\2\u0537",
"\u0538\5\u0147\u00a4\2\u0538\u0146\3\2\2\2\u0539\u053c\5\u0149\u00a5",
"\2\u053a\u053c\5\u014b\u00a6\2\u053b\u0539\3\2\2\2\u053b\u053a\3\2\2",
"\2\u053c\u053f\3\2\2\2\u053d\u053b\3\2\2\2\u053d\u053e\3\2\2\2\u053e",
"\u0148\3\2\2\2\u053f\u053d\3\2\2\2\u0540\u0541\t\6\2\2\u0541\u014a\3",
"\2\2\2\u0542\u0543\4\62;\2\u0543\u014c\3\2\2\2\u0544\u0549\7$\2\2\u0545",
"\u0548\5\u0161\u00b1\2\u0546\u0548\n\7\2\2\u0547\u0545\3\2\2\2\u0547",
"\u0546\3\2\2\2\u0548\u054b\3\2\2\2\u0549\u0547\3\2\2\2\u0549\u054a\3",
"\2\2\2\u054a\u054c\3\2\2\2\u054b\u0549\3\2\2\2\u054c\u054d\7$\2\2\u054d",
"\u014e\3\2\2\2\u054e\u054f\7)\2\2\u054f\u0550\5\u017d\u00bf\2\u0550",
"\u0551\5\u017d\u00bf\2\u0551\u0552\5\u017d\u00bf\2\u0552\u0553\5\u017d",
"\u00bf\2\u0553\u0554\7/\2\2\u0554\u0555\5\u017d\u00bf\2\u0555\u0556",
"\5\u017d\u00bf\2\u0556\u0557\7/\2\2\u0557\u0558\5\u017d\u00bf\2\u0558",
"\u0559\5\u017d\u00bf\2\u0559\u055a\7/\2\2\u055a\u055b\5\u017d\u00bf",
"\2\u055b\u055c\5\u017d\u00bf\2\u055c\u055d\7/\2\2\u055d\u055e\5\u017d",
"\u00bf\2\u055e\u055f\5\u017d\u00bf\2\u055f\u0560\5\u017d\u00bf\2\u0560",
"\u0561\5\u017d\u00bf\2\u0561\u0562\5\u017d\u00bf\2\u0562\u0563\5\u017d",
"\u00bf\2\u0563\u0564\7)\2\2\u0564\u0150\3\2\2\2\u0565\u0566\5\u0157",
"\u00ac\2\u0566\u0152\3\2\2\2\u0567\u0568\5\u015d\u00af\2\u0568\u0154",
"\3\2\2\2\u0569\u056a\5\u0159\u00ad\2\u056a\u0156\3\2\2\2\u056b\u0574",
"\7\62\2\2\u056c\u0570\4\63;\2\u056d\u056f\4\62;\2\u056e\u056d\3\2\2",
"\2\u056f\u0572\3\2\2\2\u0570\u056e\3\2\2\2\u0570\u0571\3\2\2\2\u0571",
"\u0574\3\2\2\2\u0572\u0570\3\2\2\2\u0573\u056b\3\2\2\2\u0573\u056c\3",
"\2\2\2\u0574\u0158\3\2\2\2\u0575\u0576\5\u0157\u00ac\2\u0576\u0578\5",
"#\22\2\u0577\u0579\4\62;\2\u0578\u0577\3\2\2\2\u0579\u057a\3\2\2\2\u057a",
"\u0578\3\2\2\2\u057a\u057b\3\2\2\2\u057b\u057d\3\2\2\2\u057c\u057e\5",
"\u015b\u00ae\2\u057d\u057c\3\2\2\2\u057d\u057e\3\2\2\2\u057e\u015a\3",
"\2\2\2\u057f\u0581\t\b\2\2\u0580\u0582\t\t\2\2\u0581\u0580\3\2\2\2\u0581",
"\u0582\3\2\2\2\u0582\u0584\3\2\2\2\u0583\u0585\4\62;\2\u0584\u0583\3",
"\2\2\2\u0585\u0586\3\2\2\2\u0586\u0584\3\2\2\2\u0586\u0587\3\2\2\2\u0587",
"\u015c\3\2\2\2\u0588\u0589\7\62\2\2\u0589\u058d\7z\2\2\u058a\u058b\7",
"\62\2\2\u058b\u058d\7Z\2\2\u058c\u0588\3\2\2\2\u058c\u058a\3\2\2\2\u058d",
"\u058f\3\2\2\2\u058e\u0590\5\u015f\u00b0\2\u058f\u058e\3\2\2\2\u0590",
"\u0591\3\2\2\2\u0591\u058f\3\2\2\2\u0591\u0592\3\2\2\2\u0592\u015e\3",
"\2\2\2\u0593\u0594\t\n\2\2\u0594\u0160\3\2\2\2\u0595\u059d\7^\2\2\u0596",
"\u059e\t\13\2\2\u0597\u0599\7w\2\2\u0598\u059a\t\n\2\2\u0599\u0598\3",
"\2\2\2\u059a\u059b\3\2\2\2\u059b\u0599\3\2\2\2\u059b\u059c\3\2\2\2\u059c",
"\u059e\3\2\2\2\u059d\u0596\3\2\2\2\u059d\u0597\3\2\2\2\u059e\u0162\3",
"\2\2\2\u059f\u05a0\7)\2\2\u05a0\u05a1\5\u016b\u00b6\2\u05a1\u05a2\7",
"V\2\2\u05a2\u05a4\5\u0167\u00b4\2\u05a3\u05a5\5\u016d\u00b7\2\u05a4",
"\u05a3\3\2\2\2\u05a4\u05a5\3\2\2\2\u05a5\u05a6\3\2\2\2\u05a6\u05a7\7",
")\2\2\u05a7\u0164\3\2\2\2\u05a8\u05a9\7)\2\2\u05a9\u05aa\5\u0167\u00b4",
"\2\u05aa\u05ab\7)\2\2\u05ab\u0166\3\2\2\2\u05ac\u05ad\4\62\64\2\u05ad",
"\u05ae\4\62;\2\u05ae\u05af\7<\2\2\u05af\u05b0\4\62\67\2\u05b0\u05be",
"\4\62;\2\u05b1\u05b2\7<\2\2\u05b2\u05b3\4\62\67\2\u05b3\u05bc\4\62;",
"\2\u05b4\u05b5\7\60\2\2\u05b5\u05ba\4\62;\2\u05b6\u05b8\4\62;\2\u05b7",
"\u05b9\4\62;\2\u05b8\u05b7\3\2\2\2\u05b8\u05b9\3\2\2\2\u05b9\u05bb\3",
"\2\2\2\u05ba\u05b6\3\2\2\2\u05ba\u05bb\3\2\2\2\u05bb\u05bd\3\2\2\2\u05bc",
"\u05b4\3\2\2\2\u05bc\u05bd\3\2\2\2\u05bd\u05bf\3\2\2\2\u05be\u05b1\3",
"\2\2\2\u05be\u05bf\3\2\2\2\u05bf\u0168\3\2\2\2\u05c0\u05c1\7)\2\2\u05c1",
"\u05c2\5\u016b\u00b6\2\u05c2\u05c3\7)\2\2\u05c3\u016a\3\2\2\2\u05c4",
"\u05c5\4\62;\2\u05c5\u05c6\4\62;\2\u05c6\u05c7\4\62;\2\u05c7\u05c8\4",
"\62;\2\u05c8\u05c9\7/\2\2\u05c9\u05ca\4\62\63\2\u05ca\u05cb\4\62;\2",
"\u05cb\u05cc\7/\2\2\u05cc\u05cd\4\62\65\2\u05cd\u05ce\4\62;\2\u05ce",
"\u016c\3\2\2\2\u05cf\u05d7\7\\\2\2\u05d0\u05d1\t\t\2\2\u05d1\u05d2\4",
"\62\63\2\u05d2\u05d3\4\62;\2\u05d3\u05d4\7<\2\2\u05d4\u05d5\4\62;\2",
"\u05d5\u05d7\4\62;\2\u05d6\u05cf\3\2\2\2\u05d6\u05d0\3\2\2\2\u05d7\u016e",
"\3\2\2\2\u05d8\u05d9\7)\2\2\u05d9\u05db\7R\2\2\u05da\u05dc\5\u0171\u00b9",
"\2\u05db\u05da\3\2\2\2\u05db\u05dc\3\2\2\2\u05dc\u05de\3\2\2\2\u05dd",
"\u05df\5\u0173\u00ba\2\u05de\u05dd\3\2\2\2\u05de\u05df\3\2\2\2\u05df",
"\u05e1\3\2\2\2\u05e0\u05e2\5\u0175\u00bb\2\u05e1\u05e0\3\2\2\2\u05e1",
"\u05e2\3\2\2\2\u05e2\u05f2\3\2\2\2\u05e3\u05e4\7V\2\2\u05e4\u05e6\5",
"\u0177\u00bc\2\u05e5\u05e7\5\u0179\u00bd\2\u05e6\u05e5\3\2\2\2\u05e6",
"\u05e7\3\2\2\2\u05e7\u05e9\3\2\2\2\u05e8\u05ea\5\u017b\u00be\2\u05e9",
"\u05e8\3\2\2\2\u05e9\u05ea\3\2\2\2\u05ea\u05f3\3\2\2\2\u05eb\u05ec\7",
"V\2\2\u05ec\u05ee\5\u0179\u00bd\2\u05ed\u05ef\5\u017b\u00be\2\u05ee",
"\u05ed\3\2\2\2\u05ee\u05ef\3\2\2\2\u05ef\u05f3\3\2\2\2\u05f0\u05f1\7",
"V\2\2\u05f1\u05f3\5\u017b\u00be\2\u05f2\u05e3\3\2\2\2\u05f2\u05eb\3",
"\2\2\2\u05f2\u05f0\3\2\2\2\u05f2\u05f3\3\2\2\2\u05f3\u05f4\3\2\2\2\u05f4",
"\u05f5\7)\2\2\u05f5\u0170\3\2\2\2\u05f6\u05f8\7/\2\2\u05f7\u05f6\3\2",
"\2\2\u05f7\u05f8\3\2\2\2\u05f8\u05f9\3\2\2\2\u05f9\u05fa\5\u0157\u00ac",
"\2\u05fa\u05fb\7[\2\2\u05fb\u0172\3\2\2\2\u05fc\u05fe\7/\2\2\u05fd\u05fc",
"\3\2\2\2\u05fd\u05fe\3\2\2\2\u05fe\u05ff\3\2\2\2\u05ff\u0600\5\u0157",
"\u00ac\2\u0600\u0601\7O\2\2\u0601\u0174\3\2\2\2\u0602\u0604\7/\2\2\u0603",
"\u0602\3\2\2\2\u0603\u0604\3\2\2\2\u0604\u0605\3\2\2\2\u0605\u0606\5",
"\u0157\u00ac\2\u0606\u0607\7F\2\2\u0607\u0176\3\2\2\2\u0608\u060a\7",
"/\2\2\u0609\u0608\3\2\2\2\u0609\u060a\3\2\2\2\u060a\u060b\3\2\2\2\u060b",
"\u060c\5\u0157\u00ac\2\u060c\u060d\7J\2\2\u060d\u0178\3\2\2\2\u060e",
"\u0610\7/\2\2\u060f\u060e\3\2\2\2\u060f\u0610\3\2\2\2\u0610\u0611\3",
"\2\2\2\u0611\u0612\5\u0157\u00ac\2\u0612\u0613\7O\2\2\u0613\u017a\3",
"\2\2\2\u0614\u0616\7/\2\2\u0615\u0614\3\2\2\2\u0615\u0616\3\2\2\2\u0616",
"\u0617\3\2\2\2\u0617\u0620\5\u0157\u00ac\2\u0618\u061c\7\60\2\2\u0619",
"\u061b\7\62\2\2\u061a\u0619\3\2\2\2\u061b\u061e\3\2\2\2\u061c\u061a",
"\3\2\2\2\u061c\u061d\3\2\2\2\u061d\u061f\3\2\2\2\u061e\u061c\3\2\2\2",
"\u061f\u0621\5\u0157\u00ac\2\u0620\u0618\3\2\2\2\u0620\u0621\3\2\2\2",
"\u0621\u0622\3\2\2\2\u0622\u0623\7U\2\2\u0623\u017c\3\2\2\2\u0624\u0625",
"\5\u015f\u00b0\2\u0625\u0626\5\u015f\u00b0\2\u0626\u017e\3\2\2\2\62",
"\2\u0183\u018a\u019c\u01a7\u01aa\u02cd\u034c\u041a\u0504\u0509\u0528",
"\u052a\u053b\u053d\u0547\u0549\u0570\u0573\u057a\u057d\u0581\u0586\u058c",
"\u0591\u059b\u059d\u05a4\u05b8\u05ba\u05bc\u05be\u05d6\u05db\u05de\u05e1",
"\u05e6\u05e9\u05ee\u05f2\u05f7\u05fd\u0603\u0609\u060f\u0615\u061c\u0620",
"\3\2\3\2"].join("");
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });
function ELexer(input) {
antlr4.Lexer.call(this, input);
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
return this;
}
ELexer.prototype = Object.create(antlr4.Lexer.prototype);
ELexer.prototype.constructor = ELexer;
ELexer.EOF = antlr4.Token.EOF;
ELexer.INDENT = 1;
ELexer.DEDENT = 2;
ELexer.LF_TAB = 3;
ELexer.LF_MORE = 4;
ELexer.LF = 5;
ELexer.TAB = 6;
ELexer.WS = 7;
ELexer.COMMENT = 8;
ELexer.JAVA = 9;
ELexer.CSHARP = 10;
ELexer.PYTHON2 = 11;
ELexer.PYTHON3 = 12;
ELexer.JAVASCRIPT = 13;
ELexer.SWIFT = 14;
ELexer.COLON = 15;
ELexer.SEMI = 16;
ELexer.COMMA = 17;
ELexer.RANGE = 18;
ELexer.DOT = 19;
ELexer.LPAR = 20;
ELexer.RPAR = 21;
ELexer.LBRAK = 22;
ELexer.RBRAK = 23;
ELexer.LCURL = 24;
ELexer.RCURL = 25;
ELexer.QMARK = 26;
ELexer.XMARK = 27;
ELexer.AMP = 28;
ELexer.AMP2 = 29;
ELexer.PIPE = 30;
ELexer.PIPE2 = 31;
ELexer.PLUS = 32;
ELexer.MINUS = 33;
ELexer.STAR = 34;
ELexer.SLASH = 35;
ELexer.BSLASH = 36;
ELexer.PERCENT = 37;
ELexer.GT = 38;
ELexer.GTE = 39;
ELexer.LT = 40;
ELexer.LTE = 41;
ELexer.LTGT = 42;
ELexer.EQ = 43;
ELexer.XEQ = 44;
ELexer.EQ2 = 45;
ELexer.TEQ = 46;
ELexer.TILDE = 47;
ELexer.LARROW = 48;
ELexer.RARROW = 49;
ELexer.BOOLEAN = 50;
ELexer.CHARACTER = 51;
ELexer.TEXT = 52;
ELexer.INTEGER = 53;
ELexer.DECIMAL = 54;
ELexer.DATE = 55;
ELexer.TIME = 56;
ELexer.DATETIME = 57;
ELexer.PERIOD = 58;
ELexer.METHOD_T = 59;
ELexer.CODE = 60;
ELexer.DOCUMENT = 61;
ELexer.BLOB = 62;
ELexer.IMAGE = 63;
ELexer.UUID = 64;
ELexer.ITERATOR = 65;
ELexer.CURSOR = 66;
ELexer.ABSTRACT = 67;
ELexer.ALL = 68;
ELexer.ALWAYS = 69;
ELexer.AND = 70;
ELexer.ANY = 71;
ELexer.AS = 72;
ELexer.ASC = 73;
ELexer.ATTR = 74;
ELexer.ATTRIBUTE = 75;
ELexer.ATTRIBUTES = 76;
ELexer.BINDINGS = 77;
ELexer.BREAK = 78;
ELexer.BY = 79;
ELexer.CASE = 80;
ELexer.CATCH = 81;
ELexer.CATEGORY = 82;
ELexer.CLASS = 83;
ELexer.CLOSE = 84;
ELexer.CONTAINS = 85;
ELexer.DEF = 86;
ELexer.DEFAULT = 87;
ELexer.DEFINE = 88;
ELexer.DELETE = 89;
ELexer.DESC = 90;
ELexer.DO = 91;
ELexer.DOING = 92;
ELexer.EACH = 93;
ELexer.ELSE = 94;
ELexer.ENUM = 95;
ELexer.ENUMERATED = 96;
ELexer.EXCEPT = 97;
ELexer.EXECUTE = 98;
ELexer.EXPECTING = 99;
ELexer.EXTENDS = 100;
ELexer.FETCH = 101;
ELexer.FILTERED = 102;
ELexer.FINALLY = 103;
ELexer.FLUSH = 104;
ELexer.FOR = 105;
ELexer.FROM = 106;
ELexer.GETTER = 107;
ELexer.IF = 108;
ELexer.IN = 109;
ELexer.INDEX = 110;
ELexer.INVOKE = 111;
ELexer.IS = 112;
ELexer.MATCHING = 113;
ELexer.METHOD = 114;
ELexer.METHODS = 115;
ELexer.MODULO = 116;
ELexer.MUTABLE = 117;
ELexer.NATIVE = 118;
ELexer.NONE = 119;
ELexer.NOT = 120;
ELexer.NOTHING = 121;
ELexer.NULL = 122;
ELexer.ON = 123;
ELexer.ONE = 124;
ELexer.OPEN = 125;
ELexer.OPERATOR = 126;
ELexer.OR = 127;
ELexer.ORDER = 128;
ELexer.OTHERWISE = 129;
ELexer.PASS = 130;
ELexer.RAISE = 131;
ELexer.READ = 132;
ELexer.RECEIVING = 133;
ELexer.RESOURCE = 134;
ELexer.RETURN = 135;
ELexer.RETURNING = 136;
ELexer.ROWS = 137;
ELexer.SELF = 138;
ELexer.SETTER = 139;
ELexer.SINGLETON = 140;
ELexer.SORTED = 141;
ELexer.STORABLE = 142;
ELexer.STORE = 143;
ELexer.SWITCH = 144;
ELexer.TEST = 145;
ELexer.THIS = 146;
ELexer.THROW = 147;
ELexer.TO = 148;
ELexer.TRY = 149;
ELexer.VERIFYING = 150;
ELexer.WITH = 151;
ELexer.WHEN = 152;
ELexer.WHERE = 153;
ELexer.WHILE = 154;
ELexer.WRITE = 155;
ELexer.BOOLEAN_LITERAL = 156;
ELexer.CHAR_LITERAL = 157;
ELexer.MIN_INTEGER = 158;
ELexer.MAX_INTEGER = 159;
ELexer.SYMBOL_IDENTIFIER = 160;
ELexer.TYPE_IDENTIFIER = 161;
ELexer.VARIABLE_IDENTIFIER = 162;
ELexer.NATIVE_IDENTIFIER = 163;
ELexer.DOLLAR_IDENTIFIER = 164;
ELexer.TEXT_LITERAL = 165;
ELexer.UUID_LITERAL = 166;
ELexer.INTEGER_LITERAL = 167;
ELexer.HEXA_LITERAL = 168;
ELexer.DECIMAL_LITERAL = 169;
ELexer.DATETIME_LITERAL = 170;
ELexer.TIME_LITERAL = 171;
ELexer.DATE_LITERAL = 172;
ELexer.PERIOD_LITERAL = 173;
ELexer.modeNames = [ "DEFAULT_MODE" ];
ELexer.literalNames = [ 'null', 'null', 'null', 'null', 'null', 'null',
"'\t'", "' '", 'null', "'Java:'", "'C#:'", "'Python2:'",
"'Python3:'", "'JavaScript:'", "'Swift:'", "':'",
"';'", "','", "'..'", "'.'", "'('", "')'", "'['",
"']'", "'{'", "'}'", "'?'", "'!'", "'&'", "'&&'",
"'|'", "'||'", "'+'", "'-'", "'*'", "'/'", "'\\'",
"'%'", "'>'", "'>='", "'<'", "'<='", "'<>'", "'='",
"'!='", "'=='", "'~='", "'~'", "'<-'", "'->'", "'Boolean'",
"'Character'", "'Text'", "'Integer'", "'Decimal'",
"'Date'", "'Time'", "'DateTime'", "'Period'", "'Method'",
"'Code'", "'Document'", "'Blob'", "'Image'", "'UUID'",
"'Iterator'", "'Cursor'", "'abstract'", "'all'",
"'always'", "'and'", "'any'", "'as'", 'null', "'attr'",
"'attribute'", "'attributes'", "'bindings'", "'break'",
"'by'", "'case'", "'catch'", "'category'", "'class'",
"'close'", "'contains'", "'def'", "'default'", "'define'",
"'delete'", 'null', "'do'", "'doing'", "'each'",
"'else'", "'enum'", "'enumerated'", "'except'",
"'execute'", "'expecting'", "'extends'", "'fetch'",
"'filtered'", "'finally'", "'flush'", "'for'", "'from'",
"'getter'", "'if'", "'in'", "'index'", "'invoke'",
"'is'", "'matching'", "'method'", "'methods'", "'modulo'",
"'mutable'", "'native'", "'None'", "'not'", 'null',
"'null'", "'on'", "'one'", "'open'", "'operator'",
"'or'", "'order'", "'otherwise'", "'pass'", "'raise'",
"'read'", "'receiving'", "'resource'", "'return'",
"'returning'", "'rows'", "'self'", "'setter'", "'singleton'",
"'sorted'", "'storable'", "'store'", "'switch'",
"'test'", "'this'", "'throw'", "'to'", "'try'",
"'verifying'", "'with'", "'when'", "'where'", "'while'",
"'write'", 'null', 'null', "'MIN_INTEGER'", "'MAX_INTEGER'" ];
ELexer.symbolicNames = [ 'null', "INDENT", "DEDENT", "LF_TAB", "LF_MORE",
"LF", "TAB", "WS", "COMMENT", "JAVA", "CSHARP",
"PYTHON2", "PYTHON3", "JAVASCRIPT", "SWIFT", "COLON",
"SEMI", "COMMA", "RANGE", "DOT", "LPAR", "RPAR",
"LBRAK", "RBRAK", "LCURL", "RCURL", "QMARK", "XMARK",
"AMP", "AMP2", "PIPE", "PIPE2", "PLUS", "MINUS",
"STAR", "SLASH", "BSLASH", "PERCENT", "GT", "GTE",
"LT", "LTE", "LTGT", "EQ", "XEQ", "EQ2", "TEQ",
"TILDE", "LARROW", "RARROW", "BOOLEAN", "CHARACTER",
"TEXT", "INTEGER", "DECIMAL", "DATE", "TIME", "DATETIME",
"PERIOD", "METHOD_T", "CODE", "DOCUMENT", "BLOB",
"IMAGE", "UUID", "ITERATOR", "CURSOR", "ABSTRACT",
"ALL", "ALWAYS", "AND", "ANY", "AS", "ASC", "ATTR",
"ATTRIBUTE", "ATTRIBUTES", "BINDINGS", "BREAK",
"BY", "CASE", "CATCH", "CATEGORY", "CLASS", "CLOSE",
"CONTAINS", "DEF", "DEFAULT", "DEFINE", "DELETE",
"DESC", "DO", "DOING", "EACH", "ELSE", "ENUM",
"ENUMERATED", "EXCEPT", "EXECUTE", "EXPECTING",
"EXTENDS", "FETCH", "FILTERED", "FINALLY", "FLUSH",
"FOR", "FROM", "GETTER", "IF", "IN", "INDEX", "INVOKE",
"IS", "MATCHING", "METHOD", "METHODS", "MODULO",
"MUTABLE", "NATIVE", "NONE", "NOT", "NOTHING",
"NULL", "ON", "ONE", "OPEN", "OPERATOR", "OR",
"ORDER", "OTHERWISE", "PASS", "RAISE", "READ",
"RECEIVING", "RESOURCE", "RETURN", "RETURNING",
"ROWS", "SELF", "SETTER", "SINGLETON", "SORTED",
"STORABLE", "STORE", "SWITCH", "TEST", "THIS",
"THROW", "TO", "TRY", "VERIFYING", "WITH", "WHEN",
"WHERE", "WHILE", "WRITE", "BOOLEAN_LITERAL", "CHAR_LITERAL",
"MIN_INTEGER", "MAX_INTEGER", "SYMBOL_IDENTIFIER",
"TYPE_IDENTIFIER", "VARIABLE_IDENTIFIER", "NATIVE_IDENTIFIER",
"DOLLAR_IDENTIFIER", "TEXT_LITERAL", "UUID_LITERAL",
"INTEGER_LITERAL", "HEXA_LITERAL", "DECIMAL_LITERAL",
"DATETIME_LITERAL", "TIME_LITERAL", "DATE_LITERAL",
"PERIOD_LITERAL" ];
ELexer.ruleNames = [ "LF_TAB", "LF_MORE", "LF", "TAB", "WS", "COMMENT",
"JAVA", "CSHARP", "PYTHON2", "PYTHON3", "JAVASCRIPT",
"SWIFT", "COLON", "SEMI", "COMMA", "RANGE", "DOT",
"LPAR", "RPAR", "LBRAK", "RBRAK", "LCURL", "RCURL",
"QMARK", "XMARK", "AMP", "AMP2", "PIPE", "PIPE2", "PLUS",
"MINUS", "STAR", "SLASH", "BSLASH", "PERCENT", "GT",
"GTE", "LT", "LTE", "LTGT", "EQ", "XEQ", "EQ2", "TEQ",
"TILDE", "LARROW", "RARROW", "BOOLEAN", "CHARACTER",
"TEXT", "INTEGER", "DECIMAL", "DATE", "TIME", "DATETIME",
"PERIOD", "METHOD_T", "CODE", "DOCUMENT", "BLOB", "IMAGE",
"UUID", "ITERATOR", "CURSOR", "ABSTRACT", "ALL", "ALWAYS",
"AND", "ANY", "AS", "ASC", "ATTR", "ATTRIBUTE", "ATTRIBUTES",
"BINDINGS", "BREAK", "BY", "CASE", "CATCH", "CATEGORY",
"CLASS", "CLOSE", "CONTAINS", "DEF", "DEFAULT", "DEFINE",
"DELETE", "DESC", "DO", "DOING", "EACH", "ELSE", "ENUM",
"ENUMERATED", "EXCEPT", "EXECUTE", "EXPECTING", "EXTENDS",
"FETCH", "FILTERED", "FINALLY", "FLUSH", "FOR", "FROM",
"GETTER", "IF", "IN", "INDEX", "INVOKE", "IS", "MATCHING",
"METHOD", "METHODS", "MODULO", "MUTABLE", "NATIVE",
"NONE", "NOT", "NOTHING", "NULL", "ON", "ONE", "OPEN",
"OPERATOR", "OR", "ORDER", "OTHERWISE", "PASS", "RAISE",
"READ", "RECEIVING", "RESOURCE", "RETURN", "RETURNING",
"ROWS", "SELF", "SETTER", "SINGLETON", "SORTED", "STORABLE",
"STORE", "SWITCH", "TEST", "THIS", "THROW", "TO", "TRY",
"VERIFYING", "WITH", "WHEN", "WHERE", "WHILE", "WRITE",
"BOOLEAN_LITERAL", "CHAR_LITERAL", "MIN_INTEGER", "MAX_INTEGER",
"SYMBOL_IDENTIFIER", "TYPE_IDENTIFIER", "VARIABLE_IDENTIFIER",
"NATIVE_IDENTIFIER", "DOLLAR_IDENTIFIER", "IdentifierSuffix",
"Letter", "Digit", "TEXT_LITERAL", "UUID_LITERAL",
"INTEGER_LITERAL", "HEXA_LITERAL", "DECIMAL_LITERAL",
"Integer", "Decimal", "Exponent", "Hexadecimal", "HexNibble",
"EscapeSequence", "DATETIME_LITERAL", "TIME_LITERAL",
"Time", "DATE_LITERAL", "Date", "TimeZone", "PERIOD_LITERAL",
"Years", "Months", "Days", "Hours", "Minutes", "Seconds",
"HexByte" ];
ELexer.grammarFileName = "ELexer.g4";
exports.ELexer = ELexer;
/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {
var isNodeJs = typeof window === 'undefined' && typeof importScripts === 'undefined';
var fs = isNodeJs ? __webpack_require__(42) : {}; // nodejs only
var antlr4 = __webpack_require__(1);
var EIndentingLexer = __webpack_require__(100).EIndentingLexer;
var EParser = __webpack_require__(103).EParser;
var EPromptoBuilder = __webpack_require__(106).EPromptoBuilder;
function createInput(input) {
if(typeof(input)==='string' || input instanceof String) {
if(isNodeJs && fs.existsSync(input)) {
input = new antlr4.FileStream(input);
} else {
input = new antlr4.InputStream(input);
}
}
if(input instanceof antlr4.InputStream) {
input = new EIndentingLexer(input);
}
if(input instanceof antlr4.Lexer) {
input = new antlr4.CommonTokenStream(input);
}
return input;
}
function ECleverParser(input) {
EParser.call(this,createInput(input));
this.path = "";
return this;
}
ECleverParser.prototype = Object.create(EParser.prototype);
ECleverParser.prototype.constructor = ECleverParser;
ECleverParser.prototype.parse = function() {
return this.parse_declaration_list();
};
ECleverParser.prototype.parse_declaration_list = function() {
var tree = this.declaration_list();
var builder = new EPromptoBuilder(this);
var walker = new antlr4.tree.ParseTreeWalker();
walker.walk(builder, tree);
return builder.getNodeValue(tree);
};
ECleverParser.prototype.parse_standalone_type = function() {
this.getTokenStream().tokenSource.addLF = false;
var tree = this.category_or_any_type();
var builder = new EPromptoBuilder(this);
var walker = new antlr4.tree.ParseTreeWalker();
walker.walk(builder, tree);
return builder.getNodeValue(tree);
};
exports.ECleverParser = ECleverParser;
/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {
// Generated from EParser.g4 by ANTLR 4.5
// jshint ignore: start
var antlr4 = __webpack_require__(1);
var EParserListener = __webpack_require__(104).EParserListener;
var AbstractParser = __webpack_require__(105).AbstractParser;
var grammarFileName = "EParser.g4";
var serializedATN = ["\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd",
"\3\u00af\u0926\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t",
"\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20",
"\t\20\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4",
"\27\t\27\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35",
"\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'",
"\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61",
"\t\61\4\62\t\62\4\63\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\4",
"8\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C",
"\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\t",
"N\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY",
"\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\t",
"d\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to",
"\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4z\tz\4",
"{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080\4\u0081\t\u0081\4",
"\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085\t\u0085\4\u0086",
"\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a",
"\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e\t\u008e\4\u008f",
"\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092\4\u0093\t\u0093",
"\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098",
"\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b\4\u009c\t\u009c",
"\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f\4\u00a0\t\u00a0\4\u00a1",
"\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3\4\u00a4\t\u00a4\4\u00a5\t\u00a5",
"\4\u00a6\t\u00a6\4\u00a7\t\u00a7\4\u00a8\t\u00a8\4\u00a9\t\u00a9\4\u00aa",
"\t\u00aa\4\u00ab\t\u00ab\4\u00ac\t\u00ac\4\u00ad\t\u00ad\4\u00ae\t\u00ae",
"\4\u00af\t\u00af\4\u00b0\t\u00b0\4\u00b1\t\u00b1\4\u00b2\t\u00b2\4\u00b3",
"\t\u00b3\4\u00b4\t\u00b4\4\u00b5\t\u00b5\4\u00b6\t\u00b6\4\u00b7\t\u00b7",
"\4\u00b8\t\u00b8\4\u00b9\t\u00b9\4\u00ba\t\u00ba\4\u00bb\t\u00bb\4\u00bc",
"\t\u00bc\4\u00bd\t\u00bd\4\u00be\t\u00be\4\u00bf\t\u00bf\4\u00c0\t\u00c0",
"\4\u00c1\t\u00c1\4\u00c2\t\u00c2\4\u00c3\t\u00c3\4\u00c4\t\u00c4\4\u00c5",
"\t\u00c5\4\u00c6\t\u00c6\4\u00c7\t\u00c7\4\u00c8\t\u00c8\4\u00c9\t\u00c9",
"\4\u00ca\t\u00ca\4\u00cb\t\u00cb\4\u00cc\t\u00cc\4\u00cd\t\u00cd\4\u00ce",
"\t\u00ce\4\u00cf\t\u00cf\4\u00d0\t\u00d0\4\u00d1\t\u00d1\3\2\3\2\3\2",
"\3\2\3\2\3\2\5\2\u01a9\n\2\3\2\3\2\3\2\3\2\3\2\5\2\u01b0\n\2\3\2\3\2",
"\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4",
"\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\5\5\u01ce\n\5\3\6\3\6\3\6\3\6\5",
"\6\u01d4\n\6\3\6\3\6\3\6\5\6\u01d9\n\6\3\6\3\6\3\6\3\6\5\6\u01df\n\6",
"\5\6\u01e1\n\6\3\6\5\6\u01e4\n\6\3\7\3\7\3\7\3\7\5\7\u01ea\n\7\3\7\3",
"\7\5\7\u01ee\n\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u01f9\n\7\3",
"\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u0202\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b",
"\3\b\3\b\3\b\3\b\3\b\3\b\5\b\u0211\n\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\5",
"\b\u021a\n\b\3\t\3\t\3\t\3\t\3\t\5\t\u0221\n\t\3\n\3\n\3\n\3\n\3\n\3",
"\n\3\n\3\n\5\n\u022b\n\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13",
"\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\5\f\u0241\n\f\3\f\3\f",
"\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3",
"\16\3\16\3\16\5\16\u0258\n\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17",
"\3\17\3\17\3\17\5\17\u0265\n\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3",
"\17\3\17\5\17\u0270\n\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17",
"\3\17\3\17\3\17\5\17\u027e\n\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3",
"\20\3\20\3\20\3\20\3\20\5\20\u028c\n\20\3\20\3\20\3\20\3\20\3\20\3\20",
"\3\20\3\20\3\20\3\20\3\20\3\20\5\20\u029a\n\20\3\21\3\21\3\21\3\21\3",
"\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\7\22\u02ac",
"\n\22\f\22\16\22\u02af\13\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23",
"\5\23\u02b9\n\23\5\23\u02bb\n\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24",
"\5\24\u02c4\n\24\3\24\3\24\5\24\u02c8\n\24\3\25\3\25\3\25\3\25\3\25",
"\3\25\5\25\u02d0\n\25\3\25\3\25\5\25\u02d4\n\25\3\25\3\25\3\25\3\25",
"\3\25\3\25\3\26\3\26\3\26\3\26\5\26\u02e0\n\26\3\26\3\26\3\26\5\26\u02e5",
"\n\26\3\26\3\26\5\26\u02e9\n\26\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3",
"\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27",
"\3\27\3\27\3\27\3\27\5\27\u0304\n\27\3\30\3\30\3\31\3\31\3\31\5\31\u030b",
"\n\31\3\32\3\32\3\32\5\32\u0310\n\32\3\32\3\32\5\32\u0314\n\32\3\33",
"\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3",
"\33\3\33\3\33\3\33\3\33\5\33\u0329\n\33\3\34\3\34\3\35\3\35\3\35\3\35",
"\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u0337\n\35\3\36\3\36\5\36\u033b",
"\n\36\3\36\5\36\u033e\n\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3",
"\37\3 \3 \3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3",
"!\5!\u035f\n!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"",
"\3\"\3\"\3\"\5\"\u0372\n\"\3#\3#\3#\3#\3#\5#\u0379\n#\3#\3#\3#\3#\3",
"#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&",
"\3&\3&\3&\3&\3&\5&\u039b\n&\3&\3&\3&\3&\3&\3&\3&\5&\u03a4\n&\3\'\3\'",
"\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'",
"\7\'\u03b9\n\'\f\'\16\'\u03bc\13\'\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)",
"\3)\3)\5)\u03cb\n)\3)\3)\3)\5)\u03d0\n)\3)\3)\3)\3)\3)\3)\5)\u03d8\n",
")\3)\3)\3)\3)\3)\3)\3)\5)\u03e1\n)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3*\3*",
"\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\5*\u03f8\n*\3+\3+\3,\3,\5,\u03fe\n,\3",
"-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-",
"\3-\3-\3-\3-\3-\5-\u041c\n-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3",
"-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-",
"\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3",
"-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-",
"\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\7",
"-\u0485\n-\f-\16-\u0488\13-\3.\3.\3.\3.\3.\7.\u048f\n.\f.\16.\u0492",
"\13.\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\62\3\62\3\62\3",
"\62\3\62\7\62\u04a4\n\62\f\62\16\62\u04a7\13\62\3\63\3\63\3\63\3\63",
"\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\5\63\u04b6\n\63\3\64\3",
"\64\3\64\5\64\u04bb\n\64\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\5\66",
"\u04c5\n\66\3\66\3\66\3\66\5\66\u04ca\n\66\5\66\u04cc\n\66\3\66\3\66",
"\3\66\3\66\5\66\u04d2\n\66\5\66\u04d4\n\66\5\66\u04d6\n\66\3\67\3\67",
"\3\67\3\67\3\67\38\38\38\38\39\39\39\39\39\39\3:\3:\3:\5:\u04ea\n:\3",
":\3:\3:\3:\3:\5:\u04f1\n:\3:\3:\5:\u04f5\n:\3:\3:\3:\3:\3:\3:\3:\3:",
"\3:\5:\u0500\n:\3:\3:\5:\u0504\n:\3:\3:\3:\5:\u0509\n:\5:\u050b\n:\3",
";\3;\5;\u050f\n;\3;\3;\3;\3;\3;\3;\5;\u0517\n;\3<\3<\3<\3<\3<\5<\u051e",
"\n<\5<\u0520\n<\3<\3<\3<\5<\u0525\n<\5<\u0527\n<\3=\3=\3=\3=\3=\3=\3",
"=\7=\u0530\n=\f=\16=\u0533\13=\3>\3>\3>\3>\3?\3?\3?\3?\3@\3@\3@\3@\3",
"@\3@\3@\3@\5@\u0545\n@\3A\3A\3A\3A\3B\7B\u054c\nB\fB\16B\u054f\13B\3",
"C\6C\u0552\nC\rC\16C\u0553\3D\6D\u0557\nD\rD\16D\u0558\3D\3D\3E\7E\u055e",
"\nE\fE\16E\u0561\13E\3E\3E\3F\3F\3G\5G\u0568\nG\3G\3G\3G\3H\3H\3H\3",
"H\7H\u0571\nH\fH\16H\u0574\13H\3I\3I\3I\7I\u0579\nI\fI\16I\u057c\13",
"I\3I\3I\3I\3I\3I\5I\u0583\nI\3J\3J\3K\3K\5K\u0589\nK\3L\3L\3L\3L\7L",
"\u058f\nL\fL\16L\u0592\13L\3M\3M\3M\3M\7M\u0598\nM\fM\16M\u059b\13M",
"\3N\3N\3N\7N\u05a0\nN\fN\16N\u05a3\13N\3O\3O\3O\3O\3O\3O\3O\3O\3O\3",
"O\5O\u05af\nO\3P\5P\u05b2\nP\3P\3P\5P\u05b6\nP\3P\3P\3Q\5Q\u05bb\nQ",
"\3Q\3Q\5Q\u05bf\nQ\3Q\3Q\3R\3R\3R\7R\u05c6\nR\fR\16R\u05c9\13R\3S\3",
"S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3T\3T\3T\3T\3T\3T\5T\u05dd\nT\3T\3T",
"\3T\3T\3T\3T\3T\3T\7T\u05e7\nT\fT\16T\u05ea\13T\3U\3U\5U\u05ee\nU\3",
"V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\5V\u05fe\nV\3W\3W\3X\5X\u0603",
"\nX\3X\3X\3Y\3Y\3Z\3Z\3Z\5Z\u060c\nZ\3[\3[\3[\7[\u0611\n[\f[\16[\u0614",
"\13[\3\\\3\\\5\\\u0618\n\\\3]\3]\3]\5]\u061d\n]\3^\3^\3_\3_\3`\3`\3",
"a\3a\3b\3b\3b\7b\u062a\nb\fb\16b\u062d\13b\3c\3c\5c\u0631\nc\3c\5c\u0634",
"\nc\3d\3d\5d\u0638\nd\3e\3e\3e\5e\u063d\ne\3f\3f\3f\3g\3g\5g\u0644\n",
"g\3h\3h\3h\3h\3h\3h\3h\3h\3h\7h\u064f\nh\fh\16h\u0652\13h\3i\3i\3i\3",
"i\7i\u0658\ni\fi\16i\u065b\13i\3j\3j\3j\3j\3j\5j\u0662\nj\3k\3k\3k\3",
"k\7k\u0668\nk\fk\16k\u066b\13k\3l\3l\3l\5l\u0670\nl\3m\3m\3m\3m\3m\3",
"m\3m\3m\3m\3m\5m\u067c\nm\3n\3n\5n\u0680\nn\3o\3o\3o\3o\3o\3o\7o\u0688",
"\no\fo\16o\u068b\13o\3p\3p\5p\u068f\np\3q\3q\3q\3q\5q\u0695\nq\3q\3",
"q\3q\7q\u069a\nq\fq\16q\u069d\13q\3q\3q\5q\u06a1\nq\3r\3r\3r\7r\u06a6",
"\nr\fr\16r\u06a9\13r\3s\3s\3s\7s\u06ae\ns\fs\16s\u06b1\13s\3t\3t\3t",
"\3t\5t\u06b7\nt\3u\3u\3v\3v\3v\3v\7v\u06bf\nv\fv\16v\u06c2\13v\3w\3",
"w\3w\3w\3w\3w\3w\3w\3w\3w\5w\u06ce\nw\3x\3x\5x\u06d2\nx\3x\5x\u06d5",
"\nx\3y\3y\5y\u06d9\ny\3y\5y\u06dc\ny\3z\3z\3z\3z\7z\u06e2\nz\fz\16z",
"\u06e5\13z\3{\3{\3{\3{\7{\u06eb\n{\f{\16{\u06ee\13{\3|\3|\3|\3|\7|\u06f4",
"\n|\f|\16|\u06f7\13|\3}\3}\3}\3}\7}\u06fd\n}\f}\16}\u0700\13}\3~\3~",
"\3~\3~\3~\3~\3~\3~\3~\3~\3~\3~\3~\3~\5~\u0710\n~\3\177\3\177\3\177\3",
"\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\5\177",
"\u0720\n\177\3\u0080\3\u0080\3\u0080\7\u0080\u0725\n\u0080\f\u0080\16",
"\u0080\u0728\13\u0080\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081\u072e",
"\n\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0083\3\u0084\3\u0084",
"\5\u0084\u0738\n\u0084\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\5\u0085",
"\u073f\n\u0085\3\u0086\5\u0086\u0742\n\u0086\3\u0086\3\u0086\5\u0086",
"\u0746\n\u0086\3\u0086\3\u0086\3\u0087\5\u0087\u074b\n\u0087\3\u0087",
"\3\u0087\5\u0087\u074f\n\u0087\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088",
"\3\u0088\3\u0088\7\u0088\u0758\n\u0088\f\u0088\16\u0088\u075b\13\u0088",
"\5\u0088\u075d\n\u0088\3\u0089\3\u0089\3\u0089\7\u0089\u0762\n\u0089",
"\f\u0089\16\u0089\u0765\13\u0089\3\u008a\3\u008a\3\u008a\3\u008a\3\u008b",
"\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b\3\u008b\5\u008b",
"\u0774\n\u008b\3\u008c\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d",
"\3\u008d\3\u008d\7\u008d\u077f\n\u008d\f\u008d\16\u008d\u0782\13\u008d",
"\3\u008e\3\u008e\3\u008e\3\u008e\5\u008e\u0788\n\u008e\3\u008f\3\u008f",
"\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\3\u0090\3\u0090\3\u0091",
"\3\u0091\3\u0091\7\u0091\u0797\n\u0091\f\u0091\16\u0091\u079a\13\u0091",
"\3\u0092\3\u0092\3\u0092\7\u0092\u079f\n\u0092\f\u0092\16\u0092\u07a2",
"\13\u0092\3\u0092\5\u0092\u07a5\n\u0092\3\u0093\3\u0093\3\u0093\3\u0093",
"\3\u0093\3\u0093\5\u0093\u07ad\n\u0093\3\u0094\3\u0094\3\u0094\3\u0095",
"\3\u0095\3\u0095\3\u0096\3\u0096\3\u0096\3\u0097\3\u0097\3\u0097\3\u0098",
"\3\u0098\3\u0098\3\u0099\3\u0099\3\u009a\3\u009a\3\u009b\3\u009b\3\u009c",
"\3\u009c\3\u009d\3\u009d\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e\3\u009e",
"\3\u009e\5\u009e\u07cf\n\u009e\3\u009f\3\u009f\3\u009f\3\u009f\3\u009f",
"\7\u009f\u07d6\n\u009f\f\u009f\16\u009f\u07d9\13\u009f\3\u00a0\3\u00a0",
"\3\u00a0\3\u00a0\3\u00a0\3\u00a0\3\u00a0\5\u00a0\u07e2\n\u00a0\3\u00a1",
"\3\u00a1\3\u00a2\3\u00a2\3\u00a2\3\u00a3\3\u00a3\3\u00a3\3\u00a3\3\u00a3",
"\5\u00a3\u07ee\n\u00a3\3\u00a4\3\u00a4\3\u00a4\5\u00a4\u07f3\n\u00a4",
"\3\u00a4\3\u00a4\3\u00a5\3\u00a5\3\u00a5\3\u00a5\3\u00a5\3\u00a5\7\u00a5",
"\u07fd\n\u00a5\f\u00a5\16\u00a5\u0800\13\u00a5\3\u00a6\3\u00a6\3\u00a6",
"\3\u00a6\3\u00a7\3\u00a7\3\u00a7\3\u00a7\3\u00a8\3\u00a8\3\u00a9\3\u00a9",
"\3\u00a9\3\u00a9\3\u00a9\5\u00a9\u0811\n\u00a9\3\u00aa\3\u00aa\3\u00ab",
"\3\u00ab\3\u00ab\5\u00ab\u0818\n\u00ab\3\u00ac\3\u00ac\3\u00ac\3\u00ac",
"\3\u00ac\7\u00ac\u081f\n\u00ac\f\u00ac\16\u00ac\u0822\13\u00ac\3\u00ad",
"\3\u00ad\3\u00ad\3\u00ad\5\u00ad\u0828\n\u00ad\3\u00ae\3\u00ae\3\u00ae",
"\3\u00ae\3\u00ae\3\u00ae\5\u00ae\u0830\n\u00ae\3\u00af\3\u00af\3\u00af",
"\5\u00af\u0835\n\u00af\3\u00af\3\u00af\3\u00b0\3\u00b0\3\u00b0\3\u00b0",
"\3\u00b0\3\u00b0\5\u00b0\u083f\n\u00b0\3\u00b1\3\u00b1\3\u00b1\3\u00b1",
"\3\u00b1\3\u00b1\7\u00b1\u0847\n\u00b1\f\u00b1\16\u00b1\u084a\13\u00b1",
"\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2",
"\3\u00b2\3\u00b2\7\u00b2\u0857\n\u00b2\f\u00b2\16\u00b2\u085a\13\u00b2",
"\3\u00b3\3\u00b3\3\u00b3\3\u00b3\3\u00b4\3\u00b4\3\u00b4\5\u00b4\u0863",
"\n\u00b4\3\u00b4\3\u00b4\3\u00b4\7\u00b4\u0868\n\u00b4\f\u00b4\16\u00b4",
"\u086b\13\u00b4\3\u00b5\3\u00b5\3\u00b5\3\u00b5\3\u00b5\5\u00b5\u0872",
"\n\u00b5\3\u00b6\3\u00b6\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b7",
"\3\u00b7\5\u00b7\u087d\n\u00b7\3\u00b8\3\u00b8\3\u00b8\3\u00b8\3\u00b8",
"\7\u00b8\u0884\n\u00b8\f\u00b8\16\u00b8\u0887\13\u00b8\3\u00b9\3\u00b9",
"\3\u00b9\3\u00b9\3\u00b9\5\u00b9\u088e\n\u00b9\3\u00ba\3\u00ba\3\u00bb",
"\3\u00bb\3\u00bb\3\u00bc\3\u00bc\3\u00bc\5\u00bc\u0898\n\u00bc\3\u00bd",
"\3\u00bd\3\u00bd\5\u00bd\u089d\n\u00bd\3\u00bd\3\u00bd\3\u00be\3\u00be",
"\3\u00be\3\u00be\3\u00be\3\u00be\7\u00be\u08a7\n\u00be\f\u00be\16\u00be",
"\u08aa\13\u00be\3\u00bf\3\u00bf\3\u00bf\3\u00bf\3\u00c0\3\u00c0\3\u00c0",
"\3\u00c0\3\u00c1\3\u00c1\3\u00c1\3\u00c1\3\u00c1\3\u00c1\7\u00c1\u08ba",
"\n\u00c1\f\u00c1\16\u00c1\u08bd\13\u00c1\3\u00c2\3\u00c2\3\u00c2\3\u00c2",
"\3\u00c2\7\u00c2\u08c4\n\u00c2\f\u00c2\16\u00c2\u08c7\13\u00c2\3\u00c3",
"\3\u00c3\3\u00c3\3\u00c3\3\u00c3\5\u00c3\u08ce\n\u00c3\3\u00c4\3\u00c4",
"\3\u00c5\3\u00c5\3\u00c5\3\u00c5\3\u00c5\3\u00c5\3\u00c5\5\u00c5\u08d9",
"\n\u00c5\3\u00c6\3\u00c6\3\u00c6\3\u00c6\3\u00c6\7\u00c6\u08e0\n\u00c6",
"\f\u00c6\16\u00c6\u08e3\13\u00c6\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7",
"\5\u00c7\u08ea\n\u00c7\3\u00c8\3\u00c8\3\u00c9\3\u00c9\3\u00c9\3\u00ca",
"\3\u00ca\3\u00ca\5\u00ca\u08f4\n\u00ca\3\u00cb\3\u00cb\3\u00cb\5\u00cb",
"\u08f9\n\u00cb\3\u00cb\3\u00cb\3\u00cc\3\u00cc\3\u00cc\3\u00cc\3\u00cc",
"\3\u00cc\7\u00cc\u0903\n\u00cc\f\u00cc\16\u00cc\u0906\13\u00cc\3\u00cd",
"\3\u00cd\3\u00cd\3\u00cd\3\u00ce\3\u00ce\3\u00ce\3\u00ce\3\u00cf\3\u00cf",
"\3\u00cf\5\u00cf\u0913\n\u00cf\3\u00cf\3\u00cf\3\u00cf\7\u00cf\u0918",
"\n\u00cf\f\u00cf\16\u00cf\u091b\13\u00cf\3\u00d0\3\u00d0\3\u00d0\3\u00d0",
"\3\u00d0\5\u00d0\u0922\n\u00d0\3\u00d1\3\u00d1\3\u00d1\2\30\"LXZbx\u00a6",
"\u00ce\u0118\u013c\u0148\u0156\u0160\u0162\u0166\u016e\u017a\u0180\u0182",
"\u018a\u0196\u019c\u00d2\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$",
"&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084",
"\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c",
"\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4",
"\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc",
"\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4",
"\u00e6\u00e8\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa\u00fc",
"\u00fe\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114",
"\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c",
"\u012e\u0130\u0132\u0134\u0136\u0138\u013a\u013c\u013e\u0140\u0142\u0144",
"\u0146\u0148\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c",
"\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174",
"\u0176\u0178\u017a\u017c\u017e\u0180\u0182\u0184\u0186\u0188\u018a\u018c",
"\u018e\u0190\u0192\u0194\u0196\u0198\u019a\u019c\u019e\u01a0\2\13\3",
"\2\"#\4\2\u0090\u0090\u00a4\u00a4\4\2\u008c\u008c\u0094\u0094\4\2KK",
"\\\\\4\2\'\'vv\b\2\64<\u0086\u0086\u0093\u0093\u009d\u009d\u00a2\u00a4",
"\u00a6\u00a6\b\2\64<\u0086\u0086\u008c\u008c\u0093\u0094\u009d\u009d",
"\u00a2\u00a4\7\2\64<\u0086\u0086\u0093\u0093\u009d\u009d\u00a2\u00a6",
"\7\2\64<\u0086\u0086\u0093\u0093\u009d\u009d\u00a2\u00a4\u09ad\2\u01a2",
"\3\2\2\2\4\u01b7\3\2\2\2\6\u01c3\3\2\2\2\b\u01c9\3\2\2\2\n\u01cf\3\2",
"\2\2\f\u01e5\3\2\2\2\16\u0203\3\2\2\2\20\u0220\3\2\2\2\22\u0222\3\2",
"\2\2\24\u0232\3\2\2\2\26\u023c\3\2\2\2\30\u0249\3\2\2\2\32\u0253\3\2",
"\2\2\34\u0260\3\2\2\2\36\u027f\3\2\2\2 \u029b\3\2\2\2\"\u02a4\3\2\2",
"\2$\u02ba\3\2\2\2&\u02bc\3\2\2\2(\u02c9\3\2\2\2*\u02db\3\2\2\2,\u02f0",
"\3\2\2\2.\u0305\3\2\2\2\60\u0307\3\2\2\2\62\u030c\3\2\2\2\64\u0328\3",
"\2\2\2\66\u032a\3\2\2\28\u0336\3\2\2\2:\u033d\3\2\2\2<\u033f\3\2\2\2",
">\u0348\3\2\2\2@\u0351\3\2\2\2B\u0371\3\2\2\2D\u0373\3\2\2\2F\u0381",
"\3\2\2\2H\u038a\3\2\2\2J\u0391\3\2\2\2L\u03a5\3\2\2\2N\u03bd\3\2\2\2",
"P\u03c0\3\2\2\2R\u03f7\3\2\2\2T\u03f9\3\2\2\2V\u03fb\3\2\2\2X\u041b",
"\3\2\2\2Z\u0489\3\2\2\2\\\u0493\3\2\2\2^\u0497\3\2\2\2`\u049c\3\2\2",
"\2b\u049e\3\2\2\2d\u04b5\3\2\2\2f\u04b7\3\2\2\2h\u04bc\3\2\2\2j\u04d5",
"\3\2\2\2l\u04d7\3\2\2\2n\u04dc\3\2\2\2p\u04e0\3\2\2\2r\u050a\3\2\2\2",
"t\u050c\3\2\2\2v\u0526\3\2\2\2x\u0528\3\2\2\2z\u0534\3\2\2\2|\u0538",
"\3\2\2\2~\u0544\3\2\2\2\u0080\u0546\3\2\2\2\u0082\u054d\3\2\2\2\u0084",
"\u0551\3\2\2\2\u0086\u0556\3\2\2\2\u0088\u055f\3\2\2\2\u008a\u0564\3",
"\2\2\2\u008c\u0567\3\2\2\2\u008e\u056c\3\2\2\2\u0090\u057a\3\2\2\2\u0092",
"\u0584\3\2\2\2\u0094\u0588\3\2\2\2\u0096\u058a\3\2\2\2\u0098\u0593\3",
"\2\2\2\u009a\u059c\3\2\2\2\u009c\u05ae\3\2\2\2\u009e\u05b1\3\2\2\2\u00a0",
"\u05ba\3\2\2\2\u00a2\u05c2\3\2\2\2\u00a4\u05ca\3\2\2\2\u00a6\u05dc\3",
"\2\2\2\u00a8\u05ed\3\2\2\2\u00aa\u05fd\3\2\2\2\u00ac\u05ff\3\2\2\2\u00ae",
"\u0602\3\2\2\2\u00b0\u0606\3\2\2\2\u00b2\u060b\3\2\2\2\u00b4\u060d\3",
"\2\2\2\u00b6\u0617\3\2\2\2\u00b8\u061c\3\2\2\2\u00ba\u061e\3\2\2\2\u00bc",
"\u0620\3\2\2\2\u00be\u0622\3\2\2\2\u00c0\u0624\3\2\2\2\u00c2\u0626\3",
"\2\2\2\u00c4\u0633\3\2\2\2\u00c6\u0637\3\2\2\2\u00c8\u0639\3\2\2\2\u00ca",
"\u063e\3\2\2\2\u00cc\u0643\3\2\2\2\u00ce\u0645\3\2\2\2\u00d0\u0653\3",
"\2\2\2\u00d2\u0661\3\2\2\2\u00d4\u0663\3\2\2\2\u00d6\u066f\3\2\2\2\u00d8",
"\u067b\3\2\2\2\u00da\u067d\3\2\2\2\u00dc\u0681\3\2\2\2\u00de\u068c\3",
"\2\2\2\u00e0\u0690\3\2\2\2\u00e2\u06a2\3\2\2\2\u00e4\u06aa\3\2\2\2\u00e6",
"\u06b6\3\2\2\2\u00e8\u06b8\3\2\2\2\u00ea\u06ba\3\2\2\2\u00ec\u06cd\3",
"\2\2\2\u00ee\u06cf\3\2\2\2\u00f0\u06d6\3\2\2\2\u00f2\u06dd\3\2\2\2\u00f4",
"\u06e6\3\2\2\2\u00f6\u06ef\3\2\2\2\u00f8\u06f8\3\2\2\2\u00fa\u070f\3",
"\2\2\2\u00fc\u071f\3\2\2\2\u00fe\u0721\3\2\2\2\u0100\u072d\3\2\2\2\u0102",
"\u072f\3\2\2\2\u0104\u0731\3\2\2\2\u0106\u0737\3\2\2\2\u0108\u073e\3",
"\2\2\2\u010a\u0741\3\2\2\2\u010c\u074a\3\2\2\2\u010e\u0752\3\2\2\2\u0110",
"\u075e\3\2\2\2\u0112\u0766\3\2\2\2\u0114\u0773\3\2\2\2\u0116\u0775\3",
"\2\2\2\u0118\u0779\3\2\2\2\u011a\u0787\3\2\2\2\u011c\u0789\3\2\2\2\u011e",
"\u078e\3\2\2\2\u0120\u0793\3\2\2\2\u0122\u079b\3\2\2\2\u0124\u07ac\3",
"\2\2\2\u0126\u07ae\3\2\2\2\u0128\u07b1\3\2\2\2\u012a\u07b4\3\2\2\2\u012c",
"\u07b7\3\2\2\2\u012e\u07ba\3\2\2\2\u0130\u07bd\3\2\2\2\u0132\u07bf\3",
"\2\2\2\u0134\u07c1\3\2\2\2\u0136\u07c3\3\2\2\2\u0138\u07c5\3\2\2\2\u013a",
"\u07ce\3\2\2\2\u013c\u07d0\3\2\2\2\u013e\u07e1\3\2\2\2\u0140\u07e3\3",
"\2\2\2\u0142\u07e5\3\2\2\2\u0144\u07ed\3\2\2\2\u0146\u07ef\3\2\2\2\u0148",
"\u07f6\3\2\2\2\u014a\u0801\3\2\2\2\u014c\u0805\3\2\2\2\u014e\u0809\3",
"\2\2\2\u0150\u0810\3\2\2\2\u0152\u0812\3\2\2\2\u0154\u0817\3\2\2\2\u0156",
"\u0819\3\2\2\2\u0158\u0827\3\2\2\2\u015a\u082f\3\2\2\2\u015c\u0831\3",
"\2\2\2\u015e\u083e\3\2\2\2\u0160\u0840\3\2\2\2\u0162\u084b\3\2\2\2\u0164",
"\u085b\3\2\2\2\u0166\u0862\3\2\2\2\u0168\u0871\3\2\2\2\u016a\u0873\3",
"\2\2\2\u016c\u087c\3\2\2\2\u016e\u087e\3\2\2\2\u0170\u088d\3\2\2\2\u0172",
"\u088f\3\2\2\2\u0174\u0891\3\2\2\2\u0176\u0897\3\2\2\2\u0178\u0899\3",
"\2\2\2\u017a\u08a0\3\2\2\2\u017c\u08ab\3\2\2\2\u017e\u08af\3\2\2\2\u0180",
"\u08b3\3\2\2\2\u0182\u08be\3\2\2\2\u0184\u08cd\3\2\2\2\u0186\u08cf\3",
"\2\2\2\u0188\u08d8\3\2\2\2\u018a\u08da\3\2\2\2\u018c\u08e9\3\2\2\2\u018e",
"\u08eb\3\2\2\2\u0190\u08ed\3\2\2\2\u0192\u08f3\3\2\2\2\u0194\u08f5\3",
"\2\2\2\u0196\u08fc\3\2\2\2\u0198\u0907\3\2\2\2\u019a\u090b\3\2\2\2\u019c",
"\u0912\3\2\2\2\u019e\u0921\3\2\2\2\u01a0\u0923\3\2\2\2\u01a2\u01a3\7",
"Z\2\2\u01a3\u01a4\5\u00be`\2\u01a4\u01a5\7J\2\2\u01a5\u01a8\7b\2\2\u01a6",
"\u01a9\7T\2\2\u01a7\u01a9\5\u00be`\2\u01a8\u01a6\3\2\2\2\u01a8\u01a7",
"\3\2\2\2\u01a9\u01af\3\2\2\2\u01aa\u01ab\5$\23\2\u01ab\u01ac\7\23\2",
"\2\u01ac\u01ad\7H\2\2\u01ad\u01b0\3\2\2\2\u01ae\u01b0\7\u0099\2\2\u01af",
"\u01aa\3\2\2\2\u01af\u01ae\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b2\5",
"\u012e\u0098\2\u01b2\u01b3\7\21\2\2\u01b3\u01b4\5\u0086D\2\u01b4\u01b5",
"\5\u0098M\2\u01b5\u01b6\5\u0088E\2\u01b6\3\3\2\2\2\u01b7\u01b8\7Z\2",
"\2\u01b8\u01b9\5\u00be`\2\u01b9\u01ba\7J\2\2\u01ba\u01bb\7b\2\2\u01bb",
"\u01bc\5\u00aaV\2\u01bc\u01bd\7\u0099\2\2\u01bd\u01be\5\u012e\u0098",
"\2\u01be\u01bf\7\21\2\2\u01bf\u01c0\5\u0086D\2\u01c0\u01c1\5\u0096L",
"\2\u01c1\u01c2\5\u0088E\2\u01c2\5\3\2\2\2\u01c3\u01c4\5\u00c0a\2\u01c4",
"\u01c5\7\u0099\2\2\u01c5\u01c6\5X-\2\u01c6\u01c7\7J\2\2\u01c7\u01c8",
"\5\u012c\u0097\2\u01c8\7\3\2\2\2\u01c9\u01ca\5\u00c0a\2\u01ca\u01cd",
"\5x=\2\u01cb\u01cc\7H\2\2\u01cc\u01ce\5z>\2\u01cd\u01cb\3\2\2\2\u01cd",
"\u01ce\3\2\2\2\u01ce\t\3\2\2\2\u01cf\u01d0\7Z\2\2\u01d0\u01d1\5\u00bc",
"_\2\u01d1\u01d3\7J\2\2\u01d2\u01d4\7\u0090\2\2\u01d3\u01d2\3\2\2\2\u01d3",
"\u01d4\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6\5\u00a6T\2\u01d6\u01d8",
"\7M\2\2\u01d7\u01d9\5\u009cO\2\u01d8\u01d7\3\2\2\2\u01d8\u01d9\3\2\2",
"\2\u01d9\u01e3\3\2\2\2\u01da\u01e0\7\u0099\2\2\u01db\u01de\5\u00e2r",
"\2\u01dc\u01dd\7H\2\2\u01dd\u01df\5\u00ba^\2\u01de\u01dc\3\2\2\2\u01de",
"\u01df\3\2\2\2\u01df\u01e1\3\2\2\2\u01e0\u01db\3\2\2\2\u01e0\u01e1\3",
"\2\2\2\u01e1\u01e2\3\2\2\2\u01e2\u01e4\7p\2\2\u01e3\u01da\3\2\2\2\u01e3",
"\u01e4\3\2\2\2\u01e4\13\3\2\2\2\u01e5\u01e6\7Z\2\2\u01e6\u01e7\5\u00be",
"`\2\u01e7\u01e9\7J\2\2\u01e8\u01ea\7\u0090\2\2\u01e9\u01e8\3\2\2\2\u01e9",
"\u01ea\3\2\2\2\u01ea\u01ed\3\2\2\2\u01eb\u01ee\7T\2\2\u01ec\u01ee\5",
"\20\t\2\u01ed\u01eb\3\2\2\2\u01ed\u01ec\3\2\2\2\u01ee\u0201\3\2\2\2",
"\u01ef\u01f8\5$\23\2\u01f0\u01f1\7\23\2\2\u01f1\u01f2\7H\2\2\u01f2\u01f3",
"\7u\2\2\u01f3\u01f4\7\21\2\2\u01f4\u01f5\5\u0086D\2\u01f5\u01f6\5\u00d0",
"i\2\u01f6\u01f7\5\u0088E\2\u01f7\u01f9\3\2\2\2\u01f8\u01f0\3\2\2\2\u01f8",
"\u01f9\3\2\2\2\u01f9\u0202\3\2\2\2\u01fa\u01fb\7\u0099\2\2\u01fb\u01fc",
"\7u\2\2\u01fc\u01fd\7\21\2\2\u01fd\u01fe\5\u0086D\2\u01fe\u01ff\5\u00d0",
"i\2\u01ff\u0200\5\u0088E\2\u0200\u0202\3\2\2\2\u0201\u01ef\3\2\2\2\u0201",
"\u01fa\3\2\2\2\u0201\u0202\3\2\2\2\u0202\r\3\2\2\2\u0203\u0204\7Z\2",
"\2\u0204\u0205\5\u00be`\2\u0205\u0206\7J\2\2\u0206\u0219\7\u008e\2\2",
"\u0207\u0210\5$\23\2\u0208\u0209\7\23\2\2\u0209\u020a\7H\2\2\u020a\u020b",
"\7u\2\2\u020b\u020c\7\21\2\2\u020c\u020d\5\u0086D\2\u020d\u020e\5\u00d0",
"i\2\u020e\u020f\5\u0088E\2\u020f\u0211\3\2\2\2\u0210\u0208\3\2\2\2\u0210",
"\u0211\3\2\2\2\u0211\u021a\3\2\2\2\u0212\u0213\7\u0099\2\2\u0213\u0214",
"\7u\2\2\u0214\u0215\7\21\2\2\u0215\u0216\5\u0086D\2\u0216\u0217\5\u00d0",
"i\2\u0217\u0218\5\u0088E\2\u0218\u021a\3\2\2\2\u0219\u0207\3\2\2\2\u0219",
"\u0212\3\2\2\2\u0219\u021a\3\2\2\2\u021a\17\3\2\2\2\u021b\u0221\5\u00b4",
"[\2\u021c\u021d\5\u00b4[\2\u021d\u021e\7H\2\2\u021e\u021f\5\u00be`\2",
"\u021f\u0221\3\2\2\2\u0220\u021b\3\2\2\2\u0220\u021c\3\2\2\2\u0221\21",
"\3\2\2\2\u0222\u0223\7Z\2\2\u0223\u0224\5\u0124\u0093\2\u0224\u0225",
"\7J\2\2\u0225\u0226\7\u0080\2\2\u0226\u0227\7\u0087\2\2\u0227\u022a",
"\5\u00c6d\2\u0228\u0229\7\u008a\2\2\u0229\u022b\5\u00a6T\2\u022a\u0228",
"\3\2\2\2\u022a\u022b\3\2\2\2\u022b\u022c\3\2\2\2\u022c\u022d\7^\2\2",
"\u022d\u022e\7\21\2\2\u022e\u022f\5\u0086D\2\u022f\u0230\5\u00f2z\2",
"\u0230\u0231\5\u0088E\2\u0231\23\3\2\2\2\u0232\u0233\7Z\2\2\u0233\u0234",
"\5\u00ba^\2\u0234\u0235\7J\2\2\u0235\u0236\7\u008d\2\2\u0236\u0237\7",
"^\2\2\u0237\u0238\7\21\2\2\u0238\u0239\5\u0086D\2\u0239\u023a\5\u00f2",
"z\2\u023a\u023b\5\u0088E\2\u023b\25\3\2\2\2\u023c\u023d\7Z\2\2\u023d",
"\u023e\5\u00ba^\2\u023e\u0240\7J\2\2\u023f\u0241\7x\2\2\u0240\u023f",
"\3\2\2\2\u0240\u0241\3\2\2\2\u0241\u0242\3\2\2\2\u0242\u0243\7\u008d",
"\2\2\u0243\u0244\7^\2\2\u0244\u0245\7\21\2\2\u0245\u0246\5\u0086D\2",
"\u0246\u0247\5\u00eav\2\u0247\u0248\5\u0088E\2\u0248\27\3\2\2\2\u0249",
"\u024a\7Z\2\2\u024a\u024b\5\u00ba^\2\u024b\u024c\7J\2\2\u024c\u024d",
"\7m\2\2\u024d\u024e\7^\2\2\u024e\u024f\7\21\2\2\u024f\u0250\5\u0086",
"D\2\u0250\u0251\5\u00f2z\2\u0251\u0252\5\u0088E\2\u0252\31\3\2\2\2\u0253",
"\u0254\7Z\2\2\u0254\u0255\5\u00ba^\2\u0255\u0257\7J\2\2\u0256\u0258",
"\7x\2\2\u0257\u0256\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u0259\3\2\2\2",
"\u0259\u025a\7m\2\2\u025a\u025b\7^\2\2\u025b\u025c\7\21\2\2\u025c\u025d",
"\5\u0086D\2\u025d\u025e\5\u00eav\2\u025e\u025f\5\u0088E\2\u025f\33\3",
"\2\2\2\u0260\u0261\7Z\2\2\u0261\u0262\5\u00be`\2\u0262\u0264\7J\2\2",
"\u0263\u0265\7\u0090\2\2\u0264\u0263\3\2\2\2\u0264\u0265\3\2\2\2\u0265",
"\u0266\3\2\2\2\u0266\u0267\7x\2\2\u0267\u026f\7T\2\2\u0268\u0269\5$",
"\23\2\u0269\u026a\7\23\2\2\u026a\u026b\7H\2\2\u026b\u026c\7O\2\2\u026c",
"\u0270\3\2\2\2\u026d\u026e\7\u0099\2\2\u026e\u0270\7O\2\2\u026f\u0268",
"\3\2\2\2\u026f\u026d\3\2\2\2\u0270\u0271\3\2\2\2\u0271\u0272\7\21\2",
"\2\u0272\u0273\5\u0086D\2\u0273\u0274\5 \21\2\u0274\u027d\5\u0088E\2",
"\u0275\u0276\5\u0084C\2\u0276\u0277\7H\2\2\u0277\u0278\7u\2\2\u0278",
"\u0279\7\21\2\2\u0279\u027a\5\u0086D\2\u027a\u027b\5\u00d4k\2\u027b",
"\u027c\5\u0088E\2\u027c\u027e\3\2\2\2\u027d\u0275\3\2\2\2\u027d\u027e",
"\3\2\2\2\u027e\35\3\2\2\2\u027f\u0280\7Z\2\2\u0280\u0281\5\u00be`\2",
"\u0281\u0282\7J\2\2\u0282\u0283\7x\2\2\u0283\u028b\7\u0088\2\2\u0284",
"\u0285\5$\23\2\u0285\u0286\7\23\2\2\u0286\u0287\7H\2\2\u0287\u0288\7",
"O\2\2\u0288\u028c\3\2\2\2\u0289\u028a\7\u0099\2\2\u028a\u028c\7O\2\2",
"\u028b\u0284\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\3\2\2\2\u028d\u028e",
"\7\21\2\2\u028e\u028f\5\u0086D\2\u028f\u0290\5 \21\2\u0290\u0299\5\u0088",
"E\2\u0291\u0292\5\u0084C\2\u0292\u0293\7H\2\2\u0293\u0294\7u\2\2\u0294",
"\u0295\7\21\2\2\u0295\u0296\5\u0086D\2\u0296\u0297\5\u00d4k\2\u0297",
"\u0298\5\u0088E\2\u0298\u029a\3\2\2\2\u0299\u0291\3\2\2\2\u0299\u029a",
"\3\2\2\2\u029a\37\3\2\2\2\u029b\u029c\7Z\2\2\u029c\u029d\7T\2\2\u029d",
"\u029e\7O\2\2\u029e\u029f\7J\2\2\u029f\u02a0\7\21\2\2\u02a0\u02a1\5",
"\u0086D\2\u02a1\u02a2\5\"\22\2\u02a2\u02a3\5\u0088E\2\u02a3!\3\2\2\2",
"\u02a4\u02a5\b\22\1\2\u02a5\u02a6\5\u00d8m\2\u02a6\u02ad\3\2\2\2\u02a7",
"\u02a8\f\3\2\2\u02a8\u02a9\5\u0084C\2\u02a9\u02aa\5\u00d8m\2\u02aa\u02ac",
"\3\2\2\2\u02ab\u02a7\3\2\2\2\u02ac\u02af\3\2\2\2\u02ad\u02ab\3\2\2\2",
"\u02ad\u02ae\3\2\2\2\u02ae#\3\2\2\2\u02af\u02ad\3\2\2\2\u02b0\u02b1",
"\7\u0099\2\2\u02b1\u02b2\7M\2\2\u02b2\u02bb\5\u00bc_\2\u02b3\u02b4\7",
"\u0099\2\2\u02b4\u02b5\7N\2\2\u02b5\u02b8\5\u00e4s\2\u02b6\u02b7\7H",
"\2\2\u02b7\u02b9\5\u00bc_\2\u02b8\u02b6\3\2\2\2\u02b8\u02b9\3\2\2\2",
"\u02b9\u02bb\3\2\2\2\u02ba\u02b0\3\2\2\2\u02ba\u02b3\3\2\2\2\u02bb%",
"\3\2\2\2\u02bc\u02bd\7Z\2\2\u02bd\u02be\5\u00b6\\\2\u02be\u02bf\7J\2",
"\2\u02bf\u02c0\7E\2\2\u02c0\u02c3\7t\2\2\u02c1\u02c2\7\u0087\2\2\u02c2",
"\u02c4\5\60\31\2\u02c3\u02c1\3\2\2\2\u02c3\u02c4\3\2\2\2\u02c4\u02c7",
"\3\2\2\2\u02c5\u02c6\7\u008a\2\2\u02c6\u02c8\5\u00a6T\2\u02c7\u02c5",
"\3\2\2\2\u02c7\u02c8\3\2\2\2\u02c8\'\3\2\2\2\u02c9\u02ca\7Z\2\2\u02ca",
"\u02cb\5\u00b6\\\2\u02cb\u02cc\7J\2\2\u02cc\u02cf\7t\2\2\u02cd\u02ce",
"\7\u0087\2\2\u02ce\u02d0\5\60\31\2\u02cf\u02cd\3\2\2\2\u02cf\u02d0\3",
"\2\2\2\u02d0\u02d3\3\2\2\2\u02d1\u02d2\7\u008a\2\2\u02d2\u02d4\5\u00a6",
"T\2\u02d3\u02d1\3\2\2\2\u02d3\u02d4\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5",
"\u02d6\7^\2\2\u02d6\u02d7\7\21\2\2\u02d7\u02d8\5\u0086D\2\u02d8\u02d9",
"\5\u00f2z\2\u02d9\u02da\5\u0088E\2\u02da)\3\2\2\2\u02db\u02dc\7Z\2\2",
"\u02dc\u02dd\5\u00b6\\\2\u02dd\u02df\7J\2\2\u02de\u02e0\7x\2\2\u02df",
"\u02de\3\2\2\2\u02df\u02e0\3\2\2\2\u02e0\u02e1\3\2\2\2\u02e1\u02e4\7",
"t\2\2\u02e2\u02e3\7\u0087\2\2\u02e3\u02e5\5\60\31\2\u02e4\u02e2\3\2",
"\2\2\u02e4\u02e5\3\2\2\2\u02e5\u02e8\3\2\2\2\u02e6\u02e7\7\u008a\2\2",
"\u02e7\u02e9\5\u00ccg\2\u02e8\u02e6\3\2\2\2\u02e8\u02e9\3\2\2\2\u02e9",
"\u02ea\3\2\2\2\u02ea\u02eb\7^\2\2\u02eb\u02ec\7\21\2\2\u02ec\u02ed\5",
"\u0086D\2\u02ed\u02ee\5\u00eav\2\u02ee\u02ef\5\u0088E\2\u02ef+\3\2\2",
"\2\u02f0\u02f1\7Z\2\2\u02f1\u02f2\7\u00a7\2\2\u02f2\u02f3\7J\2\2\u02f3",
"\u02f4\7\u0093\2\2\u02f4\u02f5\7t\2\2\u02f5\u02f6\7^\2\2\u02f6\u02f7",
"\7\21\2\2\u02f7\u02f8\5\u0086D\2\u02f8\u02f9\5\u00f2z\2\u02f9\u02fa",
"\5\u0088E\2\u02fa\u02fb\5\u0084C\2\u02fb\u02fc\7H\2\2\u02fc\u0303\7",
"\u0098\2\2\u02fd\u02fe\7\21\2\2\u02fe\u02ff\5\u0086D\2\u02ff\u0300\5",
"\u00f4{\2\u0300\u0301\5\u0088E\2\u0301\u0304\3\2\2\2\u0302\u0304\5\u00c0",
"a\2\u0303\u02fd\3\2\2\2\u0303\u0302\3\2\2\2\u0304-\3\2\2\2\u0305\u0306",
"\5X-\2\u0306/\3\2\2\2\u0307\u030a\5\u00c2b\2\u0308\u0309\7H\2\2\u0309",
"\u030b\5\u00c4c\2\u030a\u0308\3\2\2\2\u030a\u030b\3\2\2\2\u030b\61\3",
"\2\2\2\u030c\u030d\5\u00ccg\2\u030d\u030f\5\u00ba^\2\u030e\u0310\5$",
"\23\2\u030f\u030e\3\2\2\2\u030f\u0310\3\2\2\2\u0310\u0313\3\2\2\2\u0311",
"\u0312\7-\2\2\u0312\u0314\5\u0106\u0084\2\u0313\u0311\3\2\2\2\u0313",
"\u0314\3\2\2\2\u0314\63\3\2\2\2\u0315\u0329\5|?\2\u0316\u0329\5:\36",
"\2\u0317\u0329\5\u0080A\2\u0318\u0329\58\35\2\u0319\u0329\5\66\34\2",
"\u031a\u0329\5T+\2\u031b\u0329\5V,\2\u031c\u0329\5J&\2\u031d\u0329\5",
"@!\2\u031e\u0329\5D#\2\u031f\u0329\5H%\2\u0320\u0329\5F$\2\u0321\u0329",
"\5N(\2\u0322\u0329\5P)\2\u0323\u0329\5l\67\2\u0324\u0329\5<\37\2\u0325",
"\u0329\5> \2\u0326\u0329\5(\25\2\u0327\u0329\5\u00e8u\2\u0328\u0315",
"\3\2\2\2\u0328\u0316\3\2\2\2\u0328\u0317\3\2\2\2\u0328\u0318\3\2\2\2",
"\u0328\u0319\3\2\2\2\u0328\u031a\3\2\2\2\u0328\u031b\3\2\2\2\u0328\u031c",
"\3\2\2\2\u0328\u031d\3\2\2\2\u0328\u031e\3\2\2\2\u0328\u031f\3\2\2\2",
"\u0328\u0320\3\2\2\2\u0328\u0321\3\2\2\2\u0328\u0322\3\2\2\2\u0328\u0323",
"\3\2\2\2\u0328\u0324\3\2\2\2\u0328\u0325\3\2\2\2\u0328\u0326\3\2\2\2",
"\u0328\u0327\3\2\2\2\u0329\65\3\2\2\2\u032a\u032b\7j\2\2\u032b\67\3",
"\2\2\2\u032c\u032d\7[\2\2\u032d\u0337\5\u00a2R\2\u032e\u032f\7\u0091",
"\2\2\u032f\u0337\5\u00a2R\2\u0330\u0331\7[\2\2\u0331\u0332\5\u00a2R",
"\2\u0332\u0333\7H\2\2\u0333\u0334\7\u0091\2\2\u0334\u0335\5\u00a2R\2",
"\u0335\u0337\3\2\2\2\u0336\u032c\3\2\2\2\u0336\u032e\3\2\2\2\u0336\u0330",
"\3\2\2\2\u03379\3\2\2\2\u0338\u033a\5Z.\2\u0339\u033b\5v<\2\u033a\u0339",
"\3\2\2\2\u033a\u033b\3\2\2\2\u033b\u033e\3\2\2\2\u033c\u033e\5^\60\2",
"\u033d\u0338\3\2\2\2\u033d\u033c\3\2\2\2\u033e;\3\2\2\2\u033f\u0340",
"\7\u0099\2\2\u0340\u0341\5\u0116\u008c\2\u0341\u0342\7\23\2\2\u0342",
"\u0343\7]\2\2\u0343\u0344\7\21\2\2\u0344\u0345\5\u0086D\2\u0345\u0346",
"\5\u00f2z\2\u0346\u0347\5\u0088E\2\u0347=\3\2\2\2\u0348\u0349\7\u0099",
"\2\2\u0349\u034a\5\u00be`\2\u034a\u034b\7\23\2\2\u034b\u034c\7]\2\2",
"\u034c\u034d\7\21\2\2\u034d\u034e\5\u0086D\2\u034e\u034f\5\u00f2z\2",
"\u034f\u0350\5\u0088E\2\u0350?\3\2\2\2\u0351\u0352\7\u0092\2\2\u0352",
"\u0353\7}\2\2\u0353\u0354\5X-\2\u0354\u0355\7\21\2\2\u0355\u0356\5\u0086",
"D\2\u0356\u035e\5\u00f6|\2\u0357\u0358\5\u0084C\2\u0358\u0359\7\u0083",
"\2\2\u0359\u035a\7\21\2\2\u035a\u035b\5\u0086D\2\u035b\u035c\5\u00f2",
"z\2\u035c\u035d\5\u0088E\2\u035d\u035f\3\2\2\2\u035e\u0357\3\2\2\2\u035e",
"\u035f\3\2\2\2\u035f\u0360\3\2\2\2\u0360\u0361\5\u0088E\2\u0361A\3\2",
"\2\2\u0362\u0363\7\u009a\2\2\u0363\u0364\5\u00fc\177\2\u0364\u0365\7",
"\21\2\2\u0365\u0366\5\u0086D\2\u0366\u0367\5\u00f2z\2\u0367\u0368\5",
"\u0088E\2\u0368\u0372\3\2\2\2\u0369\u036a\7\u009a\2\2\u036a\u036b\7",
"o\2\2\u036b\u036c\5\u00fa~\2\u036c\u036d\7\21\2\2\u036d\u036e\5\u0086",
"D\2\u036e\u036f\5\u00f2z\2\u036f\u0370\5\u0088E\2\u0370\u0372\3\2\2",
"\2\u0371\u0362\3\2\2\2\u0371\u0369\3\2\2\2\u0372C\3\2\2\2\u0373\u0374",
"\7k\2\2\u0374\u0375\7_\2\2\u0375\u0378\5\u00ba^\2\u0376\u0377\7\23\2",
"\2\u0377\u0379\5\u00ba^\2\u0378\u0376\3\2\2\2\u0378\u0379\3\2\2\2\u0379",
"\u037a\3\2\2\2\u037a\u037b\7o\2\2\u037b\u037c\5X-\2\u037c\u037d\7\21",
"\2\2\u037d\u037e\5\u0086D\2\u037e\u037f\5\u00f2z\2\u037f\u0380\5\u0088",
"E\2\u0380E\3\2\2\2\u0381\u0382\7]\2\2\u0382\u0383\7\21\2\2\u0383\u0384",
"\5\u0086D\2\u0384\u0385\5\u00f2z\2\u0385\u0386\5\u0088E\2\u0386\u0387",
"\5\u0084C\2\u0387\u0388\7\u009c\2\2\u0388\u0389\5X-\2\u0389G\3\2\2\2",
"\u038a\u038b\7\u009c\2\2\u038b\u038c\5X-\2\u038c\u038d\7\21\2\2\u038d",
"\u038e\5\u0086D\2\u038e\u038f\5\u00f2z\2\u038f\u0390\5\u0088E\2\u0390",
"I\3\2\2\2\u0391\u0392\7n\2\2\u0392\u0393\5X-\2\u0393\u0394\7\21\2\2",
"\u0394\u0395\5\u0086D\2\u0395\u0396\5\u00f2z\2\u0396\u039a\5\u0088E",
"\2\u0397\u0398\5\u0084C\2\u0398\u0399\5L\'\2\u0399\u039b\3\2\2\2\u039a",
"\u0397\3\2\2\2\u039a\u039b\3\2\2\2\u039b\u03a3\3\2\2\2\u039c\u039d\5",
"\u0084C\2\u039d\u039e\7`\2\2\u039e\u039f\7\21\2\2\u039f\u03a0\5\u0086",
"D\2\u03a0\u03a1\5\u00f2z\2\u03a1\u03a2\5\u0088E\2\u03a2\u03a4\3\2\2",
"\2\u03a3\u039c\3\2\2\2\u03a3\u03a4\3\2\2\2\u03a4K\3\2\2\2\u03a5\u03a6",
"\b\'\1\2\u03a6\u03a7\7`\2\2\u03a7\u03a8\7n\2\2\u03a8\u03a9\5X-\2\u03a9",
"\u03aa\7\21\2\2\u03aa\u03ab\5\u0086D\2\u03ab\u03ac\5\u00f2z\2\u03ac",
"\u03ad\5\u0088E\2\u03ad\u03ba\3\2\2\2\u03ae\u03af\f\3\2\2\u03af\u03b0",
"\5\u0084C\2\u03b0\u03b1\7`\2\2\u03b1\u03b2\7n\2\2\u03b2\u03b3\5X-\2",
"\u03b3\u03b4\7\21\2\2\u03b4\u03b5\5\u0086D\2\u03b5\u03b6\5\u00f2z\2",
"\u03b6\u03b7\5\u0088E\2\u03b7\u03b9\3\2\2\2\u03b8\u03ae\3\2\2\2\u03b9",
"\u03bc\3\2\2\2\u03ba\u03b8\3\2\2\2\u03ba\u03bb\3\2\2\2\u03bbM\3\2\2",
"\2\u03bc\u03ba\3\2\2\2\u03bd\u03be\7\u0085\2\2\u03be\u03bf\5X-\2\u03bf",
"O\3\2\2\2\u03c0\u03c1\7\u0092\2\2\u03c1\u03c2\7}\2\2\u03c2\u03c3\5\u00ba",
"^\2\u03c3\u03c4\7^\2\2\u03c4\u03c5\7\21\2\2\u03c5\u03c6\5\u0086D\2\u03c6",
"\u03c7\5\u00f2z\2\u03c7\u03c8\5\u0088E\2\u03c8\u03ca\5\u0082B\2\u03c9",
"\u03cb\5\u00f8}\2\u03ca\u03c9\3\2\2\2\u03ca\u03cb\3\2\2\2\u03cb\u03d7",
"\3\2\2\2\u03cc\u03d0\7\u0083\2\2\u03cd\u03ce\7\u009a\2\2\u03ce\u03d0",
"\7I\2\2\u03cf\u03cc\3\2\2\2\u03cf\u03cd\3\2\2\2\u03d0\u03d1\3\2\2\2",
"\u03d1\u03d2\7\21\2\2\u03d2\u03d3\5\u0086D\2\u03d3\u03d4\5\u00f2z\2",
"\u03d4\u03d5\5\u0088E\2\u03d5\u03d6\5\u0082B\2\u03d6\u03d8\3\2\2\2\u03d7",
"\u03cf\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8\u03e0\3\2\2\2\u03d9\u03da\7",
"G\2\2\u03da\u03db\7\21\2\2\u03db\u03dc\5\u0086D\2\u03dc\u03dd\5\u00f2",
"z\2\u03dd\u03de\5\u0088E\2\u03de\u03df\5\u0082B\2\u03df\u03e1\3\2\2",
"\2\u03e0\u03d9\3\2\2\2\u03e0\u03e1\3\2\2\2\u03e1\u03e2\3\2\2\2\u03e2",
"\u03e3\5\u0082B\2\u03e3Q\3\2\2\2\u03e4\u03e5\7\u009a\2\2\u03e5\u03e6",
"\5\u00c0a\2\u03e6\u03e7\7\21\2\2\u03e7\u03e8\5\u0086D\2\u03e8\u03e9",
"\5\u00f2z\2\u03e9\u03ea\5\u0088E\2\u03ea\u03eb\5\u0082B\2\u03eb\u03f8",
"\3\2\2\2\u03ec\u03ed\7\u009a\2\2\u03ed\u03ee\7o\2\2\u03ee\u03ef\7\30",
"\2\2\u03ef\u03f0\5\u009aN\2\u03f0\u03f1\7\31\2\2\u03f1\u03f2\7\21\2",
"\2\u03f2\u03f3\5\u0086D\2\u03f3\u03f4\5\u00f2z\2\u03f4\u03f5\5\u0088",
"E\2\u03f5\u03f6\5\u0082B\2\u03f6\u03f8\3\2\2\2\u03f7\u03e4\3\2\2\2\u03f7",
"\u03ec\3\2\2\2\u03f8S\3\2\2\2\u03f9\u03fa\7P\2\2\u03faU\3\2\2\2\u03fb",
"\u03fd\7\u0089\2\2\u03fc\u03fe\5X-\2\u03fd\u03fc\3\2\2\2\u03fd\u03fe",
"\3\2\2\2\u03feW\3\2\2\2\u03ff\u0400\b-\1\2\u0400\u0401\7#\2\2\u0401",
"\u041c\5X-,\u0402\u0403\7z\2\2\u0403\u041c\5X-+\u0404\u0405\7>\2\2\u0405",
"\u0406\7\21\2\2\u0406\u041c\5X-\20\u0407\u041c\5b\62\2\u0408\u041c\5",
"Z.\2\u0409\u040a\5Z.\2\u040a\u040b\5v<\2\u040b\u041c\3\2\2\2\u040c\u040d",
"\7d\2\2\u040d\u040e\7\21\2\2\u040e\u041c\5\u00ba^\2\u040f\u0410\7=\2",
"\2\u0410\u0411\7\21\2\2\u0411\u041c\5\u00b6\\\2\u0412\u041c\5h\65\2",
"\u0413\u041c\5f\64\2\u0414\u041c\5j\66\2\u0415\u041c\5r:\2\u0416\u041c",
"\5\u011c\u008f\2\u0417\u041c\5\u011e\u0090\2\u0418\u041c\5t;\2\u0419",
"\u041c\5n8\2\u041a\u041c\5^\60\2\u041b\u03ff\3\2\2\2\u041b\u0402\3\2",
"\2\2\u041b\u0404\3\2\2\2\u041b\u0407\3\2\2\2\u041b\u0408\3\2\2\2\u041b",
"\u0409\3\2\2\2\u041b\u040c\3\2\2\2\u041b\u040f\3\2\2\2\u041b\u0412\3",
"\2\2\2\u041b\u0413\3\2\2\2\u041b\u0414\3\2\2\2\u041b\u0415\3\2\2\2\u041b",
"\u0416\3\2\2\2\u041b\u0417\3\2\2\2\u041b\u0418\3\2\2\2\u041b\u0419\3",
"\2\2\2\u041b\u041a\3\2\2\2\u041c\u0486\3\2\2\2\u041d\u041e\f*\2\2\u041e",
"\u041f\5\u0132\u009a\2\u041f\u0420\5X-+\u0420\u0485\3\2\2\2\u0421\u0422",
"\f)\2\2\u0422\u0423\5\u0134\u009b\2\u0423\u0424\5X-*\u0424\u0485\3\2",
"\2\2\u0425\u0426\f(\2\2\u0426\u0427\5\u0138\u009d\2\u0427\u0428\5X-",
")\u0428\u0485\3\2\2\2\u0429\u042a\f\'\2\2\u042a\u042b\5\u0136\u009c",
"\2\u042b\u042c\5X-(\u042c\u0485\3\2\2\2\u042d\u042e\f&\2\2\u042e\u042f",
"\t\2\2\2\u042f\u0485\5X-\'\u0430\u0431\f%\2\2\u0431\u0432\7*\2\2\u0432",
"\u0485\5X-&\u0433\u0434\f$\2\2\u0434\u0435\7+\2\2\u0435\u0485\5X-%\u0436",
"\u0437\f#\2\2\u0437\u0438\7(\2\2\u0438\u0485\5X-$\u0439\u043a\f\"\2",
"\2\u043a\u043b\7)\2\2\u043b\u0485\5X-#\u043c\u043d\f\37\2\2\u043d\u043e",
"\7-\2\2\u043e\u0485\5X- \u043f\u0440\f\36\2\2\u0440\u0441\7,\2\2\u0441",
"\u0485\5X-\37\u0442\u0443\f\35\2\2\u0443\u0444\7\61\2\2\u0444\u0485",
"\5X-\36\u0445\u0446\f\34\2\2\u0446\u0447\7\u0081\2\2\u0447\u0485\5X",
"-\35\u0448\u0449\f\33\2\2\u0449\u044a\7H\2\2\u044a\u0485\5X-\34\u044b",
"\u044c\f\32\2\2\u044c\u044d\7n\2\2\u044d\u044e\5X-\2\u044e\u044f\7`",
"\2\2\u044f\u0450\5X-\33\u0450\u0485\3\2\2\2\u0451\u0452\f\30\2\2\u0452",
"\u0453\7o\2\2\u0453\u0485\5X-\31\u0454\u0455\f\27\2\2\u0455\u0456\7",
"W\2\2\u0456\u0485\5X-\30\u0457\u0458\f\26\2\2\u0458\u0459\7W\2\2\u0459",
"\u045a\7F\2\2\u045a\u0485\5X-\27\u045b\u045c\f\25\2\2\u045c\u045d\7",
"W\2\2\u045d\u045e\7I\2\2\u045e\u0485\5X-\26\u045f\u0460\f\24\2\2\u0460",
"\u0461\7z\2\2\u0461\u0462\7o\2\2\u0462\u0485\5X-\25\u0463\u0464\f\23",
"\2\2\u0464\u0465\7z\2\2\u0465\u0466\7W\2\2\u0466\u0485\5X-\24\u0467",
"\u0468\f\22\2\2\u0468\u0469\7z\2\2\u0469\u046a\7W\2\2\u046a\u046b\7",
"F\2\2\u046b\u0485\5X-\23\u046c\u046d\f\21\2\2\u046d\u046e\7z\2\2\u046e",
"\u046f\7W\2\2\u046f\u0470\7I\2\2\u0470\u0485\5X-\22\u0471\u0472\f\3",
"\2\2\u0472\u0473\7k\2\2\u0473\u0474\7_\2\2\u0474\u0475\5\u00ba^\2\u0475",
"\u0476\7o\2\2\u0476\u0477\5X-\4\u0477\u0485\3\2\2\2\u0478\u0479\f!\2",
"\2\u0479\u047a\7r\2\2\u047a\u047b\7z\2\2\u047b\u0485\5\u011a\u008e\2",
"\u047c\u047d\f \2\2\u047d\u047e\7r\2\2\u047e\u0485\5\u011a\u008e\2\u047f",
"\u0480\f\31\2\2\u0480\u0481\7J\2\2\u0481\u0485\5\u00ccg\2\u0482\u0483",
"\f\n\2\2\u0483\u0485\5p9\2\u0484\u041d\3\2\2\2\u0484\u0421\3\2\2\2\u0484",
"\u0425\3\2\2\2\u0484\u0429\3\2\2\2\u0484\u042d\3\2\2\2\u0484\u0430\3",
"\2\2\2\u0484\u0433\3\2\2\2\u0484\u0436\3\2\2\2\u0484\u0439\3\2\2\2\u0484",
"\u043c\3\2\2\2\u0484\u043f\3\2\2\2\u0484\u0442\3\2\2\2\u0484\u0445\3",
"\2\2\2\u0484\u0448\3\2\2\2\u0484\u044b\3\2\2\2\u0484\u0451\3\2\2\2\u0484",
"\u0454\3\2\2\2\u0484\u0457\3\2\2\2\u0484\u045b\3\2\2\2\u0484\u045f\3",
"\2\2\2\u0484\u0463\3\2\2\2\u0484\u0467\3\2\2\2\u0484\u046c\3\2\2\2\u0484",
"\u0471\3\2\2\2\u0484\u0478\3\2\2\2\u0484\u047c\3\2\2\2\u0484\u047f\3",
"\2\2\2\u0484\u0482\3\2\2\2\u0485\u0488\3\2\2\2\u0486\u0484\3\2\2\2\u0486",
"\u0487\3\2\2\2\u0487Y\3\2\2\2\u0488\u0486\3\2\2\2\u0489\u048a\b.\1\2",
"\u048a\u048b\5\u00b8]\2\u048b\u0490\3\2\2\2\u048c\u048d\f\3\2\2\u048d",
"\u048f\5\\/\2\u048e\u048c\3\2\2\2\u048f\u0492\3\2\2\2\u0490\u048e\3",
"\2\2\2\u0490\u0491\3\2\2\2\u0491[\3\2\2\2\u0492\u0490\3\2\2\2\u0493",
"\u0494\6/!\3\u0494\u0495\7\25\2\2\u0495\u0496\5\u00b8]\2\u0496]\3\2",
"\2\2\u0497\u0498\7q\2\2\u0498\u0499\7\21\2\2\u0499\u049a\5\u00ba^\2",
"\u049a\u049b\5`\61\2\u049b_\3\2\2\2\u049c\u049d\6\61\"\3\u049da\3\2",
"\2\2\u049e\u049f\b\62\1\2\u049f\u04a0\5\u0100\u0081\2\u04a0\u04a5\3",
"\2\2\2\u04a1\u04a2\f\3\2\2\u04a2\u04a4\5d\63\2\u04a3\u04a1\3\2\2\2\u04a4",
"\u04a7\3\2\2\2\u04a5\u04a3\3\2\2\2\u04a5\u04a6\3\2\2\2\u04a6c\3\2\2",
"\2\u04a7\u04a5\3\2\2\2\u04a8\u04a9\6\63$\3\u04a9\u04aa\7\25\2\2\u04aa",
"\u04b6\5\u00ba^\2\u04ab\u04ac\6\63%\3\u04ac\u04ad\7\30\2\2\u04ad\u04ae",
"\5\u0114\u008b\2\u04ae\u04af\7\31\2\2\u04af\u04b6\3\2\2\2\u04b0\u04b1",
"\6\63&\3\u04b1\u04b2\7\30\2\2\u04b2\u04b3\5X-\2\u04b3\u04b4\7\31\2\2",
"\u04b4\u04b6\3\2\2\2\u04b5\u04a8\3\2\2\2\u04b5\u04ab\3\2\2\2\u04b5\u04b0",
"\3\2\2\2\u04b6e\3\2\2\2\u04b7\u04ba\7?\2\2\u04b8\u04b9\7l\2\2\u04b9",
"\u04bb\5X-\2\u04ba\u04b8\3\2\2\2\u04ba\u04bb\3\2\2\2\u04bbg\3\2\2\2",
"\u04bc\u04bd\7@\2\2\u04bd\u04be\7l\2\2\u04be\u04bf\5X-\2\u04bfi\3\2",
"\2\2\u04c0\u04c1\5\u00aeX\2\u04c1\u04c2\7l\2\2\u04c2\u04cb\5X-\2\u04c3",
"\u04c5\7\23\2\2\u04c4\u04c3\3\2\2\2\u04c4\u04c5\3\2\2\2\u04c5\u04c6",
"\3\2\2\2\u04c6\u04c9\5x=\2\u04c7\u04c8\7H\2\2\u04c8\u04ca\5z>\2\u04c9",
"\u04c7\3\2\2\2\u04c9\u04ca\3\2\2\2\u04ca\u04cc\3\2\2\2\u04cb\u04c4\3",
"\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d6\3\2\2\2\u04cd\u04d3\5\u00aeX",
"\2\u04ce\u04d1\5x=\2\u04cf\u04d0\7H\2\2\u04d0\u04d2\5z>\2\u04d1\u04cf",
"\3\2\2\2\u04d1\u04d2\3\2\2\2\u04d2\u04d4\3\2\2\2\u04d3\u04ce\3\2\2\2",
"\u04d3\u04d4\3\2\2\2\u04d4\u04d6\3\2\2\2\u04d5\u04c0\3\2\2\2\u04d5\u04cd",
"\3\2\2\2\u04d6k\3\2\2\2\u04d7\u04d8\7\u009d\2\2\u04d8\u04d9\5X-\2\u04d9",
"\u04da\7\u0096\2\2\u04da\u04db\5X-\2\u04dbm\3\2\2\2\u04dc\u04dd\5Z.",
"\2\u04dd\u04de\7#\2\2\u04de\u04df\5X-\2\u04dfo\3\2\2\2\u04e0\u04e1\7",
"h\2\2\u04e1\u04e2\7\u0099\2\2\u04e2\u04e3\5\u00ba^\2\u04e3\u04e4\7\u009b",
"\2\2\u04e4\u04e5\5X-\2\u04e5q\3\2\2\2\u04e6\u04e7\7g\2\2\u04e7\u04e9",
"\7~\2\2\u04e8\u04ea\5\u00aeX\2\u04e9\u04e8\3\2\2\2\u04e9\u04ea\3\2\2",
"\2\u04ea\u04eb\3\2\2\2\u04eb\u04ec\7\u009b\2\2\u04ec\u050b\5X-\2\u04ed",
"\u04ff\7g\2\2\u04ee\u04f0\7F\2\2\u04ef\u04f1\5\u00aeX\2\u04f0\u04ef",
"\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u0500\3\2\2\2\u04f2\u04f4\5\u00ae",
"X\2\u04f3\u04f5\7\u008b\2\2\u04f4\u04f3\3\2\2\2\u04f4\u04f5\3\2\2\2",
"\u04f5\u04f6\3\2\2\2\u04f6\u04f7\5X-\2\u04f7\u04f8\7\u0096\2\2\u04f8",
"\u04f9\5X-\2\u04f9\u0500\3\2\2\2\u04fa\u04fb\7\u008b\2\2\u04fb\u04fc",
"\5X-\2\u04fc\u04fd\7\u0096\2\2\u04fd\u04fe\5X-\2\u04fe\u0500\3\2\2\2",
"\u04ff\u04ee\3\2\2\2\u04ff\u04f2\3\2\2\2\u04ff\u04fa\3\2\2\2\u0500\u0503",
"\3\2\2\2\u0501\u0502\7\u009b\2\2\u0502\u0504\5X-\2\u0503\u0501\3\2\2",
"\2\u0503\u0504\3\2\2\2\u0504\u0508\3\2\2\2\u0505\u0506\7\u0082\2\2\u0506",
"\u0507\7Q\2\2\u0507\u0509\5\u0120\u0091\2\u0508\u0505\3\2\2\2\u0508",
"\u0509\3\2\2\2\u0509\u050b\3\2\2\2\u050a\u04e6\3\2\2\2\u050a\u04ed\3",
"\2\2\2\u050bs\3\2\2\2\u050c\u050e\7\u008f\2\2\u050d\u050f\7\\\2\2\u050e",
"\u050d\3\2\2\2\u050e\u050f\3\2\2\2\u050f\u0510\3\2\2\2\u0510\u0516\5",
"b\62\2\u0511\u0512\7\u0099\2\2\u0512\u0513\5b\62\2\u0513\u0514\7J\2",
"\2\u0514\u0515\5\u0128\u0095\2\u0515\u0517\3\2\2\2\u0516\u0511\3\2\2",
"\2\u0516\u0517\3\2\2\2\u0517u\3\2\2\2\u0518\u0519\6<\'\3\u0519\u051f",
"\5X-\2\u051a\u051d\5x=\2\u051b\u051c\7H\2\2\u051c\u051e\5z>\2\u051d",
"\u051b\3\2\2\2\u051d\u051e\3\2\2\2\u051e\u0520\3\2\2\2\u051f\u051a\3",
"\2\2\2\u051f\u0520\3\2\2\2\u0520\u0527\3\2\2\2\u0521\u0524\5x=\2\u0522",
"\u0523\7H\2\2\u0523\u0525\5z>\2\u0524\u0522\3\2\2\2\u0524\u0525\3\2",
"\2\2\u0525\u0527\3\2\2\2\u0526\u0518\3\2\2\2\u0526\u0521\3\2\2\2\u0527",
"w\3\2\2\2\u0528\u0529\b=\1\2\u0529\u052a\7\u0099\2\2\u052a\u052b\5z",
">\2\u052b\u0531\3\2\2\2\u052c\u052d\f\3\2\2\u052d\u052e\7\23\2\2\u052e",
"\u0530\5z>\2\u052f\u052c\3\2\2\2\u0530\u0533\3\2\2\2\u0531\u052f\3\2",
"\2\2\u0531\u0532\3\2\2\2\u0532y\3\2\2\2\u0533\u0531\3\2\2\2\u0534\u0535",
"\5X-\2\u0535\u0536\7J\2\2\u0536\u0537\5\u00ba^\2\u0537{\3\2\2\2\u0538",
"\u0539\5\u0118\u008d\2\u0539\u053a\5\u0130\u0099\2\u053a\u053b\5X-\2",
"\u053b}\3\2\2\2\u053c\u053d\6@)\3\u053d\u053e\7\25\2\2\u053e\u0545\5",
"\u00ba^\2\u053f\u0540\6@*\3\u0540\u0541\7\30\2\2\u0541\u0542\5X-\2\u0542",
"\u0543\7\31\2\2\u0543\u0545\3\2\2\2\u0544\u053c\3\2\2\2\u0544\u053f",
"\3\2\2\2\u0545\177\3\2\2\2\u0546\u0547\5\u00e2r\2\u0547\u0548\5\u0130",
"\u0099\2\u0548\u0549\5X-\2\u0549\u0081\3\2\2\2\u054a\u054c\7\7\2\2\u054b",
"\u054a\3\2\2\2\u054c\u054f\3\2\2\2\u054d\u054b\3\2\2\2\u054d\u054e\3",
"\2\2\2\u054e\u0083\3\2\2\2\u054f\u054d\3\2\2\2\u0550\u0552\7\7\2\2\u0551",
"\u0550\3\2\2\2\u0552\u0553\3\2\2\2\u0553\u0551\3\2\2\2\u0553\u0554\3",
"\2\2\2\u0554\u0085\3\2\2\2\u0555\u0557\7\7\2\2\u0556\u0555\3\2\2\2\u0557",
"\u0558\3\2\2\2\u0558\u0556\3\2\2\2\u0558\u0559\3\2\2\2\u0559\u055a\3",
"\2\2\2\u055a\u055b\7\3\2\2\u055b\u0087\3\2\2\2\u055c\u055e\7\7\2\2\u055d",
"\u055c\3\2\2\2\u055e\u0561\3\2\2\2\u055f\u055d\3\2\2\2\u055f\u0560\3",
"\2\2\2\u0560\u0562\3\2\2\2\u0561\u055f\3\2\2\2\u0562\u0563\7\4\2\2\u0563",
"\u0089\3\2\2\2\u0564\u0565\7{\2\2\u0565\u008b\3\2\2\2\u0566\u0568\5",
"\u008eH\2\u0567\u0566\3\2\2\2\u0567\u0568\3\2\2\2\u0568\u0569\3\2\2",
"\2\u0569\u056a\5\u0082B\2\u056a\u056b\7\2\2\3\u056b\u008d\3\2\2\2\u056c",
"\u0572\5\u0090I\2\u056d\u056e\5\u0084C\2\u056e\u056f\5\u0090I\2\u056f",
"\u0571\3\2\2\2\u0570\u056d\3\2\2\2\u0571\u0574\3\2\2\2\u0572\u0570\3",
"\2\2\2\u0572\u0573\3\2\2\2\u0573\u008f\3\2\2\2\u0574\u0572\3\2\2\2\u0575",
"\u0576\5\u00e8u\2\u0576\u0577\5\u0084C\2\u0577\u0579\3\2\2\2\u0578\u0575",
"\3\2\2\2\u0579\u057c\3\2\2\2\u057a\u0578\3\2\2\2\u057a\u057b\3\2\2\2",
"\u057b\u0582\3\2\2\2\u057c\u057a\3\2\2\2\u057d\u0583\5\n\6\2\u057e\u0583",
"\5\u00b2Z\2\u057f\u0583\5\u0092J\2\u0580\u0583\5\u0094K\2\u0581\u0583",
"\5\u00e6t\2\u0582\u057d\3\2\2\2\u0582\u057e\3\2\2\2\u0582\u057f\3\2",
"\2\2\u0582\u0580\3\2\2\2\u0582\u0581\3\2\2\2\u0583\u0091\3\2\2\2\u0584",
"\u0585\5\36\20\2\u0585\u0093\3\2\2\2\u0586\u0589\5\2\2\2\u0587\u0589",
"\5\4\3\2\u0588\u0586\3\2\2\2\u0588\u0587\3\2\2\2\u0589\u0095\3\2\2\2",
"\u058a\u0590\5\6\4\2\u058b\u058c\5\u0084C\2\u058c\u058d\5\6\4\2\u058d",
"\u058f\3\2\2\2\u058e\u058b\3\2\2\2\u058f\u0592\3\2\2\2\u0590\u058e\3",
"\2\2\2\u0590\u0591\3\2\2\2\u0591\u0097\3\2\2\2\u0592\u0590\3\2\2\2\u0593",
"\u0599\5\b\5\2\u0594\u0595\5\u0084C\2\u0595\u0596\5\b\5\2\u0596\u0598",
"\3\2\2\2\u0597\u0594\3\2\2\2\u0598\u059b\3\2\2\2\u0599\u0597\3\2\2\2",
"\u0599\u059a\3\2\2\2\u059a\u0099\3\2\2\2\u059b\u0599\3\2\2\2\u059c\u05a1",
"\5\u00c0a\2\u059d\u059e\7\23\2\2\u059e\u05a0\5\u00c0a\2\u059f\u059d",
"\3\2\2\2\u05a0\u05a3\3\2\2\2\u05a1\u059f\3\2\2\2\u05a1\u05a2\3\2\2\2",
"\u05a2\u009b\3\2\2\2\u05a3\u05a1\3\2\2\2\u05a4\u05a5\7o\2\2\u05a5\u05af",
"\5\u009eP\2\u05a6\u05a7\7o\2\2\u05a7\u05af\5\u00a0Q\2\u05a8\u05a9\7",
"o\2\2\u05a9\u05af\5\u00a4S\2\u05aa\u05ab\7s\2\2\u05ab\u05af\7\u00a7",
"\2\2\u05ac\u05ad\7s\2\2\u05ad\u05af\5X-\2\u05ae\u05a4\3\2\2\2\u05ae",
"\u05a6\3\2\2\2\u05ae\u05a8\3\2\2\2\u05ae\u05aa\3\2\2\2\u05ae\u05ac\3",
"\2\2\2\u05af\u009d\3\2\2\2\u05b0\u05b2\7w\2\2\u05b1\u05b0\3\2\2\2\u05b1",
"\u05b2\3\2\2\2\u05b2\u05b3\3\2\2\2\u05b3\u05b5\7\30\2\2\u05b4\u05b6",
"\5\u00a2R\2\u05b5\u05b4\3\2\2\2\u05b5\u05b6\3\2\2\2\u05b6\u05b7\3\2",
"\2\2\u05b7\u05b8\7\31\2\2\u05b8\u009f\3\2\2\2\u05b9\u05bb\7w\2\2\u05ba",
"\u05b9\3\2\2\2\u05ba\u05bb\3\2\2\2\u05bb\u05bc\3\2\2\2\u05bc\u05be\7",
"*\2\2\u05bd\u05bf\5\u00a2R\2\u05be\u05bd\3\2\2\2\u05be\u05bf\3\2\2\2",
"\u05bf\u05c0\3\2\2\2\u05c0\u05c1\7(\2\2\u05c1\u00a1\3\2\2\2\u05c2\u05c7",
"\5X-\2\u05c3\u05c4\7\23\2\2\u05c4\u05c6\5X-\2\u05c5\u05c3\3\2\2\2\u05c6",
"\u05c9\3\2\2\2\u05c7\u05c5\3\2\2\2\u05c7\u05c8\3\2\2\2\u05c8\u00a3\3",
"\2\2\2\u05c9\u05c7\3\2\2\2\u05ca\u05cb\7\30\2\2\u05cb\u05cc\5X-\2\u05cc",
"\u05cd\7\24\2\2\u05cd\u05ce\5X-\2\u05ce\u05cf\7\31\2\2\u05cf\u00a5\3",
"\2\2\2\u05d0\u05d1\bT\1\2\u05d1\u05dd\5\u00a8U\2\u05d2\u05d3\7D\2\2",
"\u05d3\u05d4\7*\2\2\u05d4\u05d5\5\u00a6T\2\u05d5\u05d6\7(\2\2\u05d6",
"\u05dd\3\2\2\2\u05d7\u05d8\7C\2\2\u05d8\u05d9\7*\2\2\u05d9\u05da\5\u00a6",
"T\2\u05da\u05db\7(\2\2\u05db\u05dd\3\2\2\2\u05dc\u05d0\3\2\2\2\u05dc",
"\u05d2\3\2\2\2\u05dc\u05d7\3\2\2\2\u05dd\u05e8\3\2\2\2\u05de\u05df\f",
"\7\2\2\u05df\u05e7\7,\2\2\u05e0\u05e1\f\6\2\2\u05e1\u05e2\7\30\2\2\u05e2",
"\u05e7\7\31\2\2\u05e3\u05e4\f\5\2\2\u05e4\u05e5\7\32\2\2\u05e5\u05e7",
"\7\33\2\2\u05e6\u05de\3\2\2\2\u05e6\u05e0\3\2\2\2\u05e6\u05e3\3\2\2",
"\2\u05e7\u05ea\3\2\2\2\u05e8\u05e6\3\2\2\2\u05e8\u05e9\3\2\2\2\u05e9",
"\u00a7\3\2\2\2\u05ea\u05e8\3\2\2\2\u05eb\u05ee\5\u00aaV\2\u05ec\u05ee",
"\5\u00acW\2\u05ed\u05eb\3\2\2\2\u05ed\u05ec\3\2\2\2\u05ee\u00a9\3\2",
"\2\2\u05ef\u05fe\7\64\2\2\u05f0\u05fe\7\65\2\2\u05f1\u05fe\7\66\2\2",
"\u05f2\u05fe\7A\2\2\u05f3\u05fe\7\67\2\2\u05f4\u05fe\78\2\2\u05f5\u05fe",
"\7?\2\2\u05f6\u05fe\79\2\2\u05f7\u05fe\7;\2\2\u05f8\u05fe\7:\2\2\u05f9",
"\u05fe\7<\2\2\u05fa\u05fe\7>\2\2\u05fb\u05fe\7@\2\2\u05fc\u05fe\7B\2",
"\2\u05fd\u05ef\3\2\2\2\u05fd\u05f0\3\2\2\2\u05fd\u05f1\3\2\2\2\u05fd",
"\u05f2\3\2\2\2\u05fd\u05f3\3\2\2\2\u05fd\u05f4\3\2\2\2\u05fd\u05f5\3",
"\2\2\2\u05fd\u05f6\3\2\2\2\u05fd\u05f7\3\2\2\2\u05fd\u05f8\3\2\2\2\u05fd",
"\u05f9\3\2\2\2\u05fd\u05fa\3\2\2\2\u05fd\u05fb\3\2\2\2\u05fd\u05fc\3",
"\2\2\2\u05fe\u00ab\3\2\2\2\u05ff\u0600\7\u00a3\2\2\u0600\u00ad\3\2\2",
"\2\u0601\u0603\7w\2\2\u0602\u0601\3\2\2\2\u0602\u0603\3\2\2\2\u0603",
"\u0604\3\2\2\2\u0604\u0605\5\u00acW\2\u0605\u00af\3\2\2\2\u0606\u0607",
"\7>\2\2\u0607\u00b1\3\2\2\2\u0608\u060c\5\f\7\2\u0609\u060c\5\34\17",
"\2\u060a\u060c\5\16\b\2\u060b\u0608\3\2\2\2\u060b\u0609\3\2\2\2\u060b",
"\u060a\3\2\2\2\u060c\u00b3\3\2\2\2\u060d\u0612\5\u00be`\2\u060e\u060f",
"\7\23\2\2\u060f\u0611\5\u00be`\2\u0610\u060e\3\2\2\2\u0611\u0614\3\2",
"\2\2\u0612\u0610\3\2\2\2\u0612\u0613\3\2\2\2\u0613\u00b5\3\2\2\2\u0614",
"\u0612\3\2\2\2\u0615\u0618\5\u00ba^\2\u0616\u0618\5\u00be`\2\u0617\u0615",
"\3\2\2\2\u0617\u0616\3\2\2\2\u0618\u00b7\3\2\2\2\u0619\u061d\5\u00ba",
"^\2\u061a\u061d\5\u00be`\2\u061b\u061d\5\u00c0a\2\u061c\u0619\3\2\2",
"\2\u061c\u061a\3\2\2\2\u061c\u061b\3\2\2\2\u061d\u00b9\3\2\2\2\u061e",
"\u061f\7\u00a4\2\2\u061f\u00bb\3\2\2\2\u0620\u0621\t\3\2\2\u0621\u00bd",
"\3\2\2\2\u0622\u0623\7\u00a3\2\2\u0623\u00bf\3\2\2\2\u0624\u0625\7\u00a2",
"\2\2\u0625\u00c1\3\2\2\2\u0626\u062b\5\u00c4c\2\u0627\u0628\7\23\2\2",
"\u0628\u062a\5\u00c4c\2\u0629\u0627\3\2\2\2\u062a\u062d\3\2\2\2\u062b",
"\u0629\3\2\2\2\u062b\u062c\3\2\2\2\u062c\u00c3\3\2\2\2\u062d\u062b\3",
"\2\2\2\u062e\u0634\5\u00caf\2\u062f\u0631\7w\2\2\u0630\u062f\3\2\2\2",
"\u0630\u0631\3\2\2\2\u0631\u0632\3\2\2\2\u0632\u0634\5\u00c6d\2\u0633",
"\u062e\3\2\2\2\u0633\u0630\3\2\2\2\u0634\u00c5\3\2\2\2\u0635\u0638\5",
"\u00c8e\2\u0636\u0638\5\62\32\2\u0637\u0635\3\2\2\2\u0637\u0636\3\2",
"\2\2\u0638\u00c7\3\2\2\2\u0639\u063c\5\u00ba^\2\u063a\u063b\7-\2\2\u063b",
"\u063d\5\u0106\u0084\2\u063c\u063a\3\2\2\2\u063c\u063d\3\2\2\2\u063d",
"\u00c9\3\2\2\2\u063e\u063f\5\u00b0Y\2\u063f\u0640\5\u00ba^\2\u0640\u00cb",
"\3\2\2\2\u0641\u0644\5\u00a6T\2\u0642\u0644\5\u00ceh\2\u0643\u0641\3",
"\2\2\2\u0643\u0642\3\2\2\2\u0644\u00cd\3\2\2\2\u0645\u0646\bh\1\2\u0646",
"\u0647\7I\2\2\u0647\u0650\3\2\2\2\u0648\u0649\f\4\2\2\u0649\u064a\7",
"\30\2\2\u064a\u064f\7\31\2\2\u064b\u064c\f\3\2\2\u064c\u064d\7\32\2",
"\2\u064d\u064f\7\33\2\2\u064e\u0648\3\2\2\2\u064e\u064b\3\2\2\2\u064f",
"\u0652\3\2\2\2\u0650\u064e\3\2\2\2\u0650\u0651\3\2\2\2\u0651\u00cf\3",
"\2\2\2\u0652\u0650\3\2\2\2\u0653\u0659\5\u00d2j\2\u0654\u0655\5\u0084",
"C\2\u0655\u0656\5\u00d2j\2\u0656\u0658\3\2\2\2\u0657\u0654\3\2\2\2\u0658",
"\u065b\3\2\2\2\u0659\u0657\3\2\2\2\u0659\u065a\3\2\2\2\u065a\u00d1\3",
"\2\2\2\u065b\u0659\3\2\2\2\u065c\u0662\5\24\13\2\u065d\u0662\5\30\r",
"\2\u065e\u0662\5(\25\2\u065f\u0662\5&\24\2\u0660\u0662\5\22\n\2\u0661",
"\u065c\3\2\2\2\u0661\u065d\3\2\2\2\u0661\u065e\3\2\2\2\u0661\u065f\3",
"\2\2\2\u0661\u0660\3\2\2\2\u0662\u00d3\3\2\2\2\u0663\u0669\5\u00d6l",
"\2\u0664\u0665\5\u0084C\2\u0665\u0666\5\u00d6l\2\u0666\u0668\3\2\2\2",
"\u0667\u0664\3\2\2\2\u0668\u066b\3\2\2\2\u0669\u0667\3\2\2\2\u0669\u066a",
"\3\2\2\2\u066a\u00d5\3\2\2\2\u066b\u0669\3\2\2\2\u066c\u0670\5\32\16",
"\2\u066d\u0670\5\26\f\2\u066e\u0670\5*\26\2\u066f\u066c\3\2\2\2\u066f",
"\u066d\3\2\2\2\u066f\u066e\3\2\2\2\u0670\u00d7\3\2\2\2\u0671\u0672\7",
"\13\2\2\u0672\u067c\5\u0182\u00c2\2\u0673\u0674\7\f\2\2\u0674\u067c",
"\5\u019c\u00cf\2\u0675\u0676\7\r\2\2\u0676\u067c\5\u00dan\2\u0677\u0678",
"\7\16\2\2\u0678\u067c\5\u00dan\2\u0679\u067a\7\17\2\2\u067a\u067c\5",
"\u00dep\2\u067b\u0671\3\2\2\2\u067b\u0673\3\2\2\2\u067b\u0675\3\2\2",
"\2\u067b\u0677\3\2\2\2\u067b\u0679\3\2\2\2\u067c\u00d9\3\2\2\2\u067d",
"\u067f\5\u00b8]\2\u067e\u0680\5\u00dco\2\u067f\u067e\3\2\2\2\u067f\u0680",
"\3\2\2\2\u0680\u00db\3\2\2\2\u0681\u0682\7l\2\2\u0682\u0683\5\u012a",
"\u0096\2\u0683\u0684\7\21\2\2\u0684\u0689\5\u00b8]\2\u0685\u0686\7\25",
"\2\2\u0686\u0688\5\u00b8]\2\u0687\u0685\3\2\2\2\u0688\u068b\3\2\2\2",
"\u0689\u0687\3\2\2\2\u0689\u068a\3\2\2\2\u068a\u00dd\3\2\2\2\u068b\u0689",
"\3\2\2\2\u068c\u068e\5\u00b8]\2\u068d\u068f\5\u00e0q\2\u068e\u068d\3",
"\2\2\2\u068e\u068f\3\2\2\2\u068f\u00df\3\2\2\2\u0690\u0691\7l\2\2\u0691",
"\u0692\5\u012a\u0096\2\u0692\u0694\7\21\2\2\u0693\u0695\7%\2\2\u0694",
"\u0693\3\2\2\2\u0694\u0695\3\2\2\2\u0695\u0696\3\2\2\2\u0696\u069b\5",
"\u0152\u00aa\2\u0697\u0698\7%\2\2\u0698\u069a\5\u0152\u00aa\2\u0699",
"\u0697\3\2\2\2\u069a\u069d\3\2\2\2\u069b\u0699\3\2\2\2\u069b\u069c\3",
"\2\2\2\u069c\u06a0\3\2\2\2\u069d\u069b\3\2\2\2\u069e\u069f\7\25\2\2",
"\u069f\u06a1\5\u0152\u00aa\2\u06a0\u069e\3\2\2\2\u06a0\u06a1\3\2\2\2",
"\u06a1\u00e1\3\2\2\2\u06a2\u06a7\5\u00ba^\2\u06a3\u06a4\7\23\2\2\u06a4",
"\u06a6\5\u00ba^\2\u06a5\u06a3\3\2\2\2\u06a6\u06a9\3\2\2\2\u06a7\u06a5",
"\3\2\2\2\u06a7\u06a8\3\2\2\2\u06a8\u00e3\3\2\2\2\u06a9\u06a7\3\2\2\2",
"\u06aa\u06af\5\u00bc_\2\u06ab\u06ac\7\23\2\2\u06ac\u06ae\5\u00bc_\2",
"\u06ad\u06ab\3\2\2\2\u06ae\u06b1\3\2\2\2\u06af\u06ad\3\2\2\2\u06af\u06b0",
"\3\2\2\2\u06b0\u00e5\3\2\2\2\u06b1\u06af\3\2\2\2\u06b2\u06b7\5&\24\2",
"\u06b3\u06b7\5(\25\2\u06b4\u06b7\5*\26\2\u06b5\u06b7\5,\27\2\u06b6\u06b2",
"\3\2\2\2\u06b6\u06b3\3\2\2\2\u06b6\u06b4\3\2\2\2\u06b6\u06b5\3\2\2\2",
"\u06b7\u00e7\3\2\2\2\u06b8\u06b9\7\n\2\2\u06b9\u00e9\3\2\2\2\u06ba\u06c0",
"\5\u00ecw\2\u06bb\u06bc\5\u0084C\2\u06bc\u06bd\5\u00ecw\2\u06bd\u06bf",
"\3\2\2\2\u06be\u06bb\3\2\2\2\u06bf\u06c2\3\2\2\2\u06c0\u06be\3\2\2\2",
"\u06c0\u06c1\3\2\2\2\u06c1\u00eb\3\2\2\2\u06c2\u06c0\3\2\2\2\u06c3\u06c4",
"\7\13\2\2\u06c4\u06ce\5\u016c\u00b7\2\u06c5\u06c6\7\f\2\2\u06c6\u06ce",
"\5\u0188\u00c5\2\u06c7\u06c8\7\r\2\2\u06c8\u06ce\5\u00eex\2\u06c9\u06ca",
"\7\16\2\2\u06ca\u06ce\5\u00eex\2\u06cb\u06cc\7\17\2\2\u06cc\u06ce\5",
"\u00f0y\2\u06cd\u06c3\3\2\2\2\u06cd\u06c5\3\2\2\2\u06cd\u06c7\3\2\2",
"\2\u06cd\u06c9\3\2\2\2\u06cd\u06cb\3\2\2\2\u06ce\u00ed\3\2\2\2\u06cf",
"\u06d1\5\u0154\u00ab\2\u06d0\u06d2\7\22\2\2\u06d1\u06d0\3\2\2\2\u06d1",
"\u06d2\3\2\2\2\u06d2\u06d4\3\2\2\2\u06d3\u06d5\5\u00dco\2\u06d4\u06d3",
"\3\2\2\2\u06d4\u06d5\3\2\2\2\u06d5\u00ef\3\2\2\2\u06d6\u06d8\5\u013a",
"\u009e\2\u06d7\u06d9\7\22\2\2\u06d8\u06d7\3\2\2\2\u06d8\u06d9\3\2\2",
"\2\u06d9\u06db\3\2\2\2\u06da\u06dc\5\u00e0q\2\u06db\u06da\3\2\2\2\u06db",
"\u06dc\3\2\2\2\u06dc\u00f1\3\2\2\2\u06dd\u06e3\5\64\33\2\u06de\u06df",
"\5\u0084C\2\u06df\u06e0\5\64\33\2\u06e0\u06e2\3\2\2\2\u06e1\u06de\3",
"\2\2\2\u06e2\u06e5\3\2\2\2\u06e3\u06e1\3\2\2\2\u06e3\u06e4\3\2\2\2\u06e4",
"\u00f3\3\2\2\2\u06e5\u06e3\3\2\2\2\u06e6\u06ec\5.\30\2\u06e7\u06e8\5",
"\u0084C\2\u06e8\u06e9\5.\30\2\u06e9\u06eb\3\2\2\2\u06ea\u06e7\3\2\2",
"\2\u06eb\u06ee\3\2\2\2\u06ec\u06ea\3\2\2\2\u06ec\u06ed\3\2\2\2\u06ed",
"\u00f5\3\2\2\2\u06ee\u06ec\3\2\2\2\u06ef\u06f5\5B\"\2\u06f0\u06f1\5",
"\u0084C\2\u06f1\u06f2\5B\"\2\u06f2\u06f4\3\2\2\2\u06f3\u06f0\3\2\2\2",
"\u06f4\u06f7\3\2\2\2\u06f5\u06f3\3\2\2\2\u06f5\u06f6\3\2\2\2\u06f6\u00f7",
"\3\2\2\2\u06f7\u06f5\3\2\2\2\u06f8\u06fe\5R*\2\u06f9\u06fa\5\u0084C",
"\2\u06fa\u06fb\5R*\2\u06fb\u06fd\3\2\2\2\u06fc\u06f9\3\2\2\2\u06fd\u0700",
"\3\2\2\2\u06fe\u06fc\3\2\2\2\u06fe\u06ff\3\2\2\2\u06ff\u00f9\3\2\2\2",
"\u0700\u06fe\3\2\2\2\u0701\u0702\7\30\2\2\u0702\u0703\5\u00fc\177\2",
"\u0703\u0704\7\24\2\2\u0704\u0705\5\u00fc\177\2\u0705\u0706\7\31\2\2",
"\u0706\u0710\3\2\2\2\u0707\u0708\7\30\2\2\u0708\u0709\5\u00fe\u0080",
"\2\u0709\u070a\7\31\2\2\u070a\u0710\3\2\2\2\u070b\u070c\7*\2\2\u070c",
"\u070d\5\u00fe\u0080\2\u070d\u070e\7(\2\2\u070e\u0710\3\2\2\2\u070f",
"\u0701\3\2\2\2\u070f\u0707\3\2\2\2\u070f\u070b\3\2\2\2\u0710\u00fb\3",
"\2\2\2\u0711\u0720\7\u00a0\2\2\u0712\u0720\7\u00a1\2\2\u0713\u0720\7",
"\u00a9\2\2\u0714\u0720\7\u00aa\2\2\u0715\u0720\7\u009f\2\2\u0716\u0720",
"\7\u00ae\2\2\u0717\u0720\7\u00ad\2\2\u0718\u0720\7\u00a7\2\2\u0719\u0720",
"\7\u00ab\2\2\u071a\u0720\7\u00ac\2\2\u071b\u0720\7\u009e\2\2\u071c\u0720",
"\7\u00af\2\2\u071d\u0720\7\u00a8\2\2\u071e\u0720\5\u008aF\2\u071f\u0711",
"\3\2\2\2\u071f\u0712\3\2\2\2\u071f\u0713\3\2\2\2\u071f\u0714\3\2\2\2",
"\u071f\u0715\3\2\2\2\u071f\u0716\3\2\2\2\u071f\u0717\3\2\2\2\u071f\u0718",
"\3\2\2\2\u071f\u0719\3\2\2\2\u071f\u071a\3\2\2\2\u071f\u071b\3\2\2\2",
"\u071f\u071c\3\2\2\2\u071f\u071d\3\2\2\2\u071f\u071e\3\2\2\2\u0720\u00fd",
"\3\2\2\2\u0721\u0726\5\u00fc\177\2\u0722\u0723\7\23\2\2\u0723\u0725",
"\5\u00fc\177\2\u0724\u0722\3\2\2\2\u0725\u0728\3\2\2\2\u0726\u0724\3",
"\2\2\2\u0726\u0727\3\2\2\2\u0727\u00ff\3\2\2\2\u0728\u0726\3\2\2\2\u0729",
"\u072e\5\u0104\u0083\2\u072a\u072e\5\u0106\u0084\2\u072b\u072e\5\u00b8",
"]\2\u072c\u072e\5\u0102\u0082\2\u072d\u0729\3\2\2\2\u072d\u072a\3\2",
"\2\2\u072d\u072b\3\2\2\2\u072d\u072c\3\2\2\2\u072e\u0101\3\2\2\2\u072f",
"\u0730\t\4\2\2\u0730\u0103\3\2\2\2\u0731\u0732\7\26\2\2\u0732\u0733",
"\5X-\2\u0733\u0734\7\27\2\2\u0734\u0105\3\2\2\2\u0735\u0738\5\u00fc",
"\177\2\u0736\u0738\5\u0108\u0085\2\u0737\u0735\3\2\2\2\u0737\u0736\3",
"\2\2\2\u0738\u0107\3\2\2\2\u0739\u073f\5\u00a4S\2\u073a\u073f\5\u009e",
"P\2\u073b\u073f\5\u00a0Q\2\u073c\u073f\5\u010c\u0087\2\u073d\u073f\5",
"\u010a\u0086\2\u073e\u0739\3\2\2\2\u073e\u073a\3\2\2\2\u073e\u073b\3",
"\2\2\2\u073e\u073c\3\2\2\2\u073e\u073d\3\2\2\2\u073f\u0109\3\2\2\2\u0740",
"\u0742\7w\2\2\u0741\u0740\3\2\2\2\u0741\u0742\3\2\2\2\u0742\u0743\3",
"\2\2\2\u0743\u0745\7\26\2\2\u0744\u0746\5\u010e\u0088\2\u0745\u0744",
"\3\2\2\2\u0745\u0746\3\2\2\2\u0746\u0747\3\2\2\2\u0747\u0748\7\27\2",
"\2\u0748\u010b\3\2\2\2\u0749\u074b\7w\2\2\u074a\u0749\3\2\2\2\u074a",
"\u074b\3\2\2\2\u074b\u074c\3\2\2\2\u074c\u074e\7\32\2\2\u074d\u074f",
"\5\u0110\u0089\2\u074e\u074d\3\2\2\2\u074e\u074f\3\2\2\2\u074f\u0750",
"\3\2\2\2\u0750\u0751\7\33\2\2\u0751\u010d\3\2\2\2\u0752\u0753\5X-\2",
"\u0753\u075c\7\23\2\2\u0754\u0759\5X-\2\u0755\u0756\7\23\2\2\u0756\u0758",
"\5X-\2\u0757\u0755\3\2\2\2\u0758\u075b\3\2\2\2\u0759\u0757\3\2\2\2\u0759",
"\u075a\3\2\2\2\u075a\u075d\3\2\2\2\u075b\u0759\3\2\2\2\u075c\u0754\3",
"\2\2\2\u075c\u075d\3\2\2\2\u075d\u010f\3\2\2\2\u075e\u0763\5\u0112\u008a",
"\2\u075f\u0760\7\23\2\2\u0760\u0762\5\u0112\u008a\2\u0761\u075f\3\2",
"\2\2\u0762\u0765\3\2\2\2\u0763\u0761\3\2\2\2\u0763\u0764\3\2\2\2\u0764",
"\u0111\3\2\2\2\u0765\u0763\3\2\2\2\u0766\u0767\5X-\2\u0767\u0768\7\21",
"\2\2\u0768\u0769\5X-\2\u0769\u0113\3\2\2\2\u076a\u076b\5X-\2\u076b\u076c",
"\7\21\2\2\u076c\u076d\5X-\2\u076d\u0774\3\2\2\2\u076e\u076f\5X-\2\u076f",
"\u0770\7\21\2\2\u0770\u0774\3\2\2\2\u0771\u0772\7\21\2\2\u0772\u0774",
"\5X-\2\u0773\u076a\3\2\2\2\u0773\u076e\3\2\2\2\u0773\u0771\3\2\2\2\u0774",
"\u0115\3\2\2\2\u0775\u0776\5\u00ba^\2\u0776\u0777\5\u0130\u0099\2\u0777",
"\u0778\5X-\2\u0778\u0117\3\2\2\2\u0779\u077a\b\u008d\1\2\u077a\u077b",
"\5\u00ba^\2\u077b\u0780\3\2\2\2\u077c\u077d\f\3\2\2\u077d\u077f\5~@",
"\2\u077e\u077c\3\2\2\2\u077f\u0782\3\2\2\2\u0780\u077e\3\2\2\2\u0780",
"\u0781\3\2\2\2\u0781\u0119\3\2\2\2\u0782\u0780\3\2\2\2\u0783\u0784\6",
"\u008e\61\3\u0784\u0785\7\u00a4\2\2\u0785\u0788\5\u00ccg\2\u0786\u0788",
"\5X-\2\u0787\u0783\3\2\2\2\u0787\u0786\3\2\2\2\u0788\u011b\3\2\2\2\u0789",
"\u078a\7\u0086\2\2\u078a\u078b\7F\2\2\u078b\u078c\7l\2\2\u078c\u078d",
"\5X-\2\u078d\u011d\3\2\2\2\u078e\u078f\7\u0086\2\2\u078f\u0790\7~\2",
"\2\u0790\u0791\7l\2\2\u0791\u0792\5X-\2\u0792\u011f\3\2\2\2\u0793\u0798",
"\5\u0122\u0092\2\u0794\u0795\7\23\2\2\u0795\u0797\5\u0122\u0092\2\u0796",
"\u0794\3\2\2\2\u0797\u079a\3\2\2\2\u0798\u0796\3\2\2\2\u0798\u0799\3",
"\2\2\2\u0799\u0121\3\2\2\2\u079a\u0798\3\2\2\2\u079b\u07a0\5\u00ba^",
"\2\u079c\u079d\7\25\2\2\u079d\u079f\5\u00ba^\2\u079e\u079c\3\2\2\2\u079f",
"\u07a2\3\2\2\2\u07a0\u079e\3\2\2\2\u07a0\u07a1\3\2\2\2\u07a1\u07a4\3",
"\2\2\2\u07a2\u07a0\3\2\2\2\u07a3\u07a5\t\5\2\2\u07a4\u07a3\3\2\2\2\u07a4",
"\u07a5\3\2\2\2\u07a5\u0123\3\2\2\2\u07a6\u07ad\7\"\2\2\u07a7\u07ad\7",
"#\2\2\u07a8\u07ad\5\u0132\u009a\2\u07a9\u07ad\5\u0134\u009b\2\u07aa",
"\u07ad\5\u0136\u009c\2\u07ab\u07ad\5\u0138\u009d\2\u07ac\u07a6\3\2\2",
"\2\u07ac\u07a7\3\2\2\2\u07ac\u07a8\3\2\2\2\u07ac\u07a9\3\2\2\2\u07ac",
"\u07aa\3\2\2\2\u07ac\u07ab\3\2\2\2\u07ad\u0125\3\2\2\2\u07ae\u07af\7",
"\u00a4\2\2\u07af\u07b0\6\u0094\62\3\u07b0\u0127\3\2\2\2\u07b1\u07b2",
"\7\u00a4\2\2\u07b2\u07b3\6\u0095\63\3\u07b3\u0129\3\2\2\2\u07b4\u07b5",
"\7\u00a4\2\2\u07b5\u07b6\6\u0096\64\3\u07b6\u012b\3\2\2\2\u07b7\u07b8",
"\7\u00a4\2\2\u07b8\u07b9\6\u0097\65\3\u07b9\u012d\3\2\2\2\u07ba\u07bb",
"\7\u00a4\2\2\u07bb\u07bc\6\u0098\66\3\u07bc\u012f\3\2\2\2\u07bd\u07be",
"\7-\2\2\u07be\u0131\3\2\2\2\u07bf\u07c0\7$\2\2\u07c0\u0133\3\2\2\2\u07c1",
"\u07c2\7%\2\2\u07c2\u0135\3\2\2\2\u07c3\u07c4\7&\2\2\u07c4\u0137\3\2",
"\2\2\u07c5\u07c6\t\6\2\2\u07c6\u0139\3\2\2\2\u07c7\u07c8\7\u0089\2\2",
"\u07c8\u07c9\5\u013c\u009f\2\u07c9\u07ca\7\22\2\2\u07ca\u07cf\3\2\2",
"\2\u07cb\u07cc\5\u013c\u009f\2\u07cc\u07cd\7\22\2\2\u07cd\u07cf\3\2",
"\2\2\u07ce\u07c7\3\2\2\2\u07ce\u07cb\3\2\2\2\u07cf\u013b\3\2\2\2\u07d0",
"\u07d1\b\u009f\1\2\u07d1\u07d2\5\u013e\u00a0\2\u07d2\u07d7\3\2\2\2\u07d3",
"\u07d4\f\3\2\2\u07d4\u07d6\5\u0144\u00a3\2\u07d5\u07d3\3\2\2\2\u07d6",
"\u07d9\3\2\2\2\u07d7\u07d5\3\2\2\2\u07d7\u07d8\3\2\2\2\u07d8\u013d\3",
"\2\2\2\u07d9\u07d7\3\2\2\2\u07da\u07e2\5\u0140\u00a1\2\u07db\u07e2\5",
"\u0142\u00a2\2\u07dc\u07e2\5\u014c\u00a7\2\u07dd\u07e2\5\u014e\u00a8",
"\2\u07de\u07e2\5\u0150\u00a9\2\u07df\u07e2\5\u0146\u00a4\2\u07e0\u07e2",
"\5\u014a\u00a6\2\u07e1\u07da\3\2\2\2\u07e1\u07db\3\2\2\2\u07e1\u07dc",
"\3\2\2\2\u07e1\u07dd\3\2\2\2\u07e1\u07de\3\2\2\2\u07e1\u07df\3\2\2\2",
"\u07e1\u07e0\3\2\2\2\u07e2\u013f\3\2\2\2\u07e3\u07e4\5\u0102\u0082\2",
"\u07e4\u0141\3\2\2\2\u07e5\u07e6\5\u0126\u0094\2\u07e6\u07e7\5\u0146",
"\u00a4\2\u07e7\u0143\3\2\2\2\u07e8\u07e9\7\25\2\2\u07e9\u07ee\5\u0146",
"\u00a4\2\u07ea\u07eb\7\25\2\2\u07eb\u07ee\5\u0152\u00aa\2\u07ec\u07ee",
"\5\u014a\u00a6\2\u07ed\u07e8\3\2\2\2\u07ed\u07ea\3\2\2\2\u07ed\u07ec",
"\3\2\2\2\u07ee\u0145\3\2\2\2\u07ef\u07f0\5\u0152\u00aa\2\u07f0\u07f2",
"\7\26\2\2\u07f1\u07f3\5\u0148\u00a5\2\u07f2\u07f1\3\2\2\2\u07f2\u07f3",
"\3\2\2\2\u07f3\u07f4\3\2\2\2\u07f4\u07f5\7\27\2\2\u07f5\u0147\3\2\2",
"\2\u07f6\u07f7\b\u00a5\1\2\u07f7\u07f8\5\u013c\u009f\2\u07f8\u07fe\3",
"\2\2\2\u07f9\u07fa\f\3\2\2\u07fa\u07fb\7\23\2\2\u07fb\u07fd\5\u013c",
"\u009f\2\u07fc\u07f9\3\2\2\2\u07fd\u0800\3\2\2\2\u07fe\u07fc\3\2\2\2",
"\u07fe\u07ff\3\2\2\2\u07ff\u0149\3\2\2\2\u0800\u07fe\3\2\2\2\u0801\u0802",
"\7\30\2\2\u0802\u0803\5\u013c\u009f\2\u0803\u0804\7\31\2\2\u0804\u014b",
"\3\2\2\2\u0805\u0806\7\26\2\2\u0806\u0807\5\u013c\u009f\2\u0807\u0808",
"\7\27\2\2\u0808\u014d\3\2\2\2\u0809\u080a\5\u0152\u00aa\2\u080a\u014f",
"\3\2\2\2\u080b\u0811\7\u00a9\2\2\u080c\u0811\7\u00ab\2\2\u080d\u0811",
"\7\u00a7\2\2\u080e\u0811\7\u009e\2\2\u080f\u0811\7\u009f\2\2\u0810\u080b",
"\3\2\2\2\u0810\u080c\3\2\2\2\u0810\u080d\3\2\2\2\u0810\u080e\3\2\2\2",
"\u0810\u080f\3\2\2\2\u0811\u0151\3\2\2\2\u0812\u0813\t\7\2\2\u0813\u0153",
"\3\2\2\2\u0814\u0815\7\u0089\2\2\u0815\u0818\5\u0156\u00ac\2\u0816\u0818",
"\5\u0156\u00ac\2\u0817\u0814\3\2\2\2\u0817\u0816\3\2\2\2\u0818\u0155",
"\3\2\2\2\u0819\u081a\b\u00ac\1\2\u081a\u081b\5\u0158\u00ad\2\u081b\u0820",
"\3\2\2\2\u081c\u081d\f\3\2\2\u081d\u081f\5\u015a\u00ae\2\u081e\u081c",
"\3\2\2\2\u081f\u0822\3\2\2\2\u0820\u081e\3\2\2\2\u0820\u0821\3\2\2\2",
"\u0821\u0157\3\2\2\2\u0822\u0820\3\2\2\2\u0823\u0828\5\u0164\u00b3\2",
"\u0824\u0828\5\u0166\u00b4\2\u0825\u0828\5\u0168\u00b5\2\u0826\u0828",
"\5\u015c\u00af\2\u0827\u0823\3\2\2\2\u0827\u0824\3\2\2\2\u0827\u0825",
"\3\2\2\2\u0827\u0826\3\2\2\2\u0828\u0159\3\2\2\2\u0829\u082a\7\25\2",
"\2\u082a\u0830\5\u015c\u00af\2\u082b\u082c\7\30\2\2\u082c\u082d\5\u0156",
"\u00ac\2\u082d\u082e\7\31\2\2\u082e\u0830\3\2\2\2\u082f\u0829\3\2\2",
"\2\u082f\u082b\3\2\2\2\u0830\u015b\3\2\2\2\u0831\u0832\5\u016a\u00b6",
"\2\u0832\u0834\7\26\2\2\u0833\u0835\5\u015e\u00b0\2\u0834\u0833\3\2",
"\2\2\u0834\u0835\3\2\2\2\u0835\u0836\3\2\2\2\u0836\u0837\7\27\2\2\u0837",
"\u015d\3\2\2\2\u0838\u083f\5\u0160\u00b1\2\u0839\u083f\5\u0162\u00b2",
"\2\u083a\u083b\5\u0160\u00b1\2\u083b\u083c\7\23\2\2\u083c\u083d\5\u0162",
"\u00b2\2\u083d\u083f\3\2\2\2\u083e\u0838\3\2\2\2\u083e\u0839\3\2\2\2",
"\u083e\u083a\3\2\2\2\u083f\u015f\3\2\2\2\u0840\u0841\b\u00b1\1\2\u0841",
"\u0842\5\u0156\u00ac\2\u0842\u0848\3\2\2\2\u0843\u0844\f\3\2\2\u0844",
"\u0845\7\23\2\2\u0845\u0847\5\u0156\u00ac\2\u0846\u0843\3\2\2\2\u0847",
"\u084a\3\2\2\2\u0848\u0846\3\2\2\2\u0848\u0849\3\2\2\2\u0849\u0161\3",
"\2\2\2\u084a\u0848\3\2\2\2\u084b\u084c\b\u00b2\1\2\u084c\u084d\5\u016a",
"\u00b6\2\u084d\u084e\7-\2\2\u084e\u084f\5\u0156\u00ac\2\u084f\u0858",
"\3\2\2\2\u0850\u0851\f\3\2\2\u0851\u0852\7\23\2\2\u0852\u0853\5\u016a",
"\u00b6\2\u0853\u0854\7-\2\2\u0854\u0855\5\u0156\u00ac\2\u0855\u0857",
"\3\2\2\2\u0856\u0850\3\2\2\2\u0857\u085a\3\2\2\2\u0858\u0856\3\2\2\2",
"\u0858\u0859\3\2\2\2\u0859\u0163\3\2\2\2\u085a\u0858\3\2\2\2\u085b\u085c",
"\7\26\2\2\u085c\u085d\5\u0156\u00ac\2\u085d\u085e\7\27\2\2\u085e\u0165",
"\3\2\2\2\u085f\u0860\b\u00b4\1\2\u0860\u0863\7\u00a6\2\2\u0861\u0863",
"\5\u016a\u00b6\2\u0862\u085f\3\2\2\2\u0862\u0861\3\2\2\2\u0863\u0869",
"\3\2\2\2\u0864\u0865\f\3\2\2\u0865\u0866\7\25\2\2\u0866\u0868\5\u016a",
"\u00b6\2\u0867\u0864\3\2\2\2\u0868\u086b\3\2\2\2\u0869\u0867\3\2\2\2",
"\u0869\u086a\3\2\2\2\u086a\u0167\3\2\2\2\u086b\u0869\3\2\2\2\u086c\u0872",
"\7\u00a9\2\2\u086d\u0872\7\u00ab\2\2\u086e\u0872\7\u00a7\2\2\u086f\u0872",
"\7\u009e\2\2\u0870\u0872\7\u009f\2\2\u0871\u086c\3\2\2\2\u0871\u086d",
"\3\2\2\2\u0871\u086e\3\2\2\2\u0871\u086f\3\2\2\2\u0871\u0870\3\2\2\2",
"\u0872\u0169\3\2\2\2\u0873\u0874\t\b\2\2\u0874\u016b\3\2\2\2\u0875\u0876",
"\7\u0089\2\2\u0876\u0877\5\u016e\u00b8\2\u0877\u0878\7\22\2\2\u0878",
"\u087d\3\2\2\2\u0879\u087a\5\u016e\u00b8\2\u087a\u087b\7\22\2\2\u087b",
"\u087d\3\2\2\2\u087c\u0875\3\2\2\2\u087c\u0879\3\2\2\2\u087d\u016d\3",
"\2\2\2\u087e\u087f\b\u00b8\1\2\u087f\u0880\5\u0170\u00b9\2\u0880\u0885",
"\3\2\2\2\u0881\u0882\f\3\2\2\u0882\u0884\5\u0176\u00bc\2\u0883\u0881",
"\3\2\2\2\u0884\u0887\3\2\2\2\u0885\u0883\3\2\2\2\u0885\u0886\3\2\2\2",
"\u0886\u016f\3\2\2\2\u0887\u0885\3\2\2\2\u0888\u088e\5\u0172\u00ba\2",
"\u0889\u088e\5\u0174\u00bb\2\u088a\u088e\5\u017e\u00c0\2\u088b\u088e",
"\5\u0180\u00c1\2\u088c\u088e\5\u0184\u00c3\2\u088d\u0888\3\2\2\2\u088d",
"\u0889\3\2\2\2\u088d\u088a\3\2\2\2\u088d\u088b\3\2\2\2\u088d\u088c\3",
"\2\2\2\u088e\u0171\3\2\2\2\u088f\u0890\5\u0102\u0082\2\u0890\u0173\3",
"\2\2\2\u0891\u0892\5\u0126\u0094\2\u0892\u0893\5\u0178\u00bd\2\u0893",
"\u0175\3\2\2\2\u0894\u0895\7\25\2\2\u0895\u0898\5\u0178\u00bd\2\u0896",
"\u0898\5\u017c\u00bf\2\u0897\u0894\3\2\2\2\u0897\u0896\3\2\2\2\u0898",
"\u0177\3\2\2\2\u0899\u089a\5\u0186\u00c4\2\u089a\u089c\7\26\2\2\u089b",
"\u089d\5\u017a\u00be\2\u089c\u089b\3\2\2\2\u089c\u089d\3\2\2\2\u089d",
"\u089e\3\2\2\2\u089e\u089f\7\27\2\2\u089f\u0179\3\2\2\2\u08a0\u08a1",
"\b\u00be\1\2\u08a1\u08a2\5\u016e\u00b8\2\u08a2\u08a8\3\2\2\2\u08a3\u08a4",
"\f\3\2\2\u08a4\u08a5\7\23\2\2\u08a5\u08a7\5\u016e\u00b8\2\u08a6\u08a3",
"\3\2\2\2\u08a7\u08aa\3\2\2\2\u08a8\u08a6\3\2\2\2\u08a8\u08a9\3\2\2\2",
"\u08a9\u017b\3\2\2\2\u08aa\u08a8\3\2\2\2\u08ab\u08ac\7\30\2\2\u08ac",
"\u08ad\5\u016e\u00b8\2\u08ad\u08ae\7\31\2\2\u08ae\u017d\3\2\2\2\u08af",
"\u08b0\7\26\2\2\u08b0\u08b1\5\u016e\u00b8\2\u08b1\u08b2\7\27\2\2\u08b2",
"\u017f\3\2\2\2\u08b3\u08b4\b\u00c1\1\2\u08b4\u08b5\5\u0186\u00c4\2\u08b5",
"\u08bb\3\2\2\2\u08b6\u08b7\f\3\2\2\u08b7\u08b8\7\25\2\2\u08b8\u08ba",
"\5\u0186\u00c4\2\u08b9\u08b6\3\2\2\2\u08ba\u08bd\3\2\2\2\u08bb\u08b9",
"\3\2\2\2\u08bb\u08bc\3\2\2\2\u08bc\u0181\3\2\2\2\u08bd\u08bb\3\2\2\2",
"\u08be\u08bf\b\u00c2\1\2\u08bf\u08c0\5\u0180\u00c1\2\u08c0\u08c5\3\2",
"\2\2\u08c1\u08c2\f\3\2\2\u08c2\u08c4\7\u00a6\2\2\u08c3\u08c1\3\2\2\2",
"\u08c4\u08c7\3\2\2\2\u08c5\u08c3\3\2\2\2\u08c5\u08c6\3\2\2\2\u08c6\u0183",
"\3\2\2\2\u08c7\u08c5\3\2\2\2\u08c8\u08ce\7\u00a9\2\2\u08c9\u08ce\7\u00ab",
"\2\2\u08ca\u08ce\7\u00a7\2\2\u08cb\u08ce\7\u009e\2\2\u08cc\u08ce\7\u009f",
"\2\2\u08cd\u08c8\3\2\2\2\u08cd\u08c9\3\2\2\2\u08cd\u08ca\3\2\2\2\u08cd",
"\u08cb\3\2\2\2\u08cd\u08cc\3\2\2\2\u08ce\u0185\3\2\2\2\u08cf\u08d0\t",
"\t\2\2\u08d0\u0187\3\2\2\2\u08d1\u08d2\7\u0089\2\2\u08d2\u08d3\5\u018a",
"\u00c6\2\u08d3\u08d4\7\22\2\2\u08d4\u08d9\3\2\2\2\u08d5\u08d6\5\u018a",
"\u00c6\2\u08d6\u08d7\7\22\2\2\u08d7\u08d9\3\2\2\2\u08d8\u08d1\3\2\2",
"\2\u08d8\u08d5\3\2\2\2\u08d9\u0189\3\2\2\2\u08da\u08db\b\u00c6\1\2\u08db",
"\u08dc\5\u018c\u00c7\2\u08dc\u08e1\3\2\2\2\u08dd\u08de\f\3\2\2\u08de",
"\u08e0\5\u0192\u00ca\2\u08df\u08dd\3\2\2\2\u08e0\u08e3\3\2\2\2\u08e1",
"\u08df\3\2\2\2\u08e1\u08e2\3\2\2\2\u08e2\u018b\3\2\2\2\u08e3\u08e1\3",
"\2\2\2\u08e4\u08ea\5\u018e\u00c8\2\u08e5\u08ea\5\u0190\u00c9\2\u08e6",
"\u08ea\5\u019a\u00ce\2\u08e7\u08ea\5\u019c\u00cf\2\u08e8\u08ea\5\u019e",
"\u00d0\2\u08e9\u08e4\3\2\2\2\u08e9\u08e5\3\2\2\2\u08e9\u08e6\3\2\2\2",
"\u08e9\u08e7\3\2\2\2\u08e9\u08e8\3\2\2\2\u08ea\u018d\3\2\2\2\u08eb\u08ec",
"\5\u0102\u0082\2\u08ec\u018f\3\2\2\2\u08ed\u08ee\5\u0126\u0094\2\u08ee",
"\u08ef\5\u0194\u00cb\2\u08ef\u0191\3\2\2\2\u08f0\u08f1\7\25\2\2\u08f1",
"\u08f4\5\u0194\u00cb\2\u08f2\u08f4\5\u0198\u00cd\2\u08f3\u08f0\3\2\2",
"\2\u08f3\u08f2\3\2\2\2\u08f4\u0193\3\2\2\2\u08f5\u08f6\5\u01a0\u00d1",
"\2\u08f6\u08f8\7\26\2\2\u08f7\u08f9\5\u0196\u00cc\2\u08f8\u08f7\3\2",
"\2\2\u08f8\u08f9\3\2\2\2\u08f9\u08fa\3\2\2\2\u08fa\u08fb\7\27\2\2\u08fb",
"\u0195\3\2\2\2\u08fc\u08fd\b\u00cc\1\2\u08fd\u08fe\5\u018a\u00c6\2\u08fe",
"\u0904\3\2\2\2\u08ff\u0900\f\3\2\2\u0900\u0901\7\23\2\2\u0901\u0903",
"\5\u018a\u00c6\2\u0902\u08ff\3\2\2\2\u0903\u0906\3\2\2\2\u0904\u0902",
"\3\2\2\2\u0904\u0905\3\2\2\2\u0905\u0197\3\2\2\2\u0906\u0904\3\2\2\2",
"\u0907\u0908\7\30\2\2\u0908\u0909\5\u018a\u00c6\2\u0909\u090a\7\31\2",
"\2\u090a\u0199\3\2\2\2\u090b\u090c\7\26\2\2\u090c\u090d\5\u018a\u00c6",
"\2\u090d\u090e\7\27\2\2\u090e\u019b\3\2\2\2\u090f\u0910\b\u00cf\1\2",
"\u0910\u0913\7\u00a6\2\2\u0911\u0913\5\u01a0\u00d1\2\u0912\u090f\3\2",
"\2\2\u0912\u0911\3\2\2\2\u0913\u0919\3\2\2\2\u0914\u0915\f\3\2\2\u0915",
"\u0916\7\25\2\2\u0916\u0918\5\u01a0\u00d1\2\u0917\u0914\3\2\2\2\u0918",
"\u091b\3\2\2\2\u0919\u0917\3\2\2\2\u0919\u091a\3\2\2\2\u091a\u019d\3",
"\2\2\2\u091b\u0919\3\2\2\2\u091c\u0922\7\u00a9\2\2\u091d\u0922\7\u00ab",
"\2\2\u091e\u0922\7\u00a7\2\2\u091f\u0922\7\u009e\2\2\u0920\u0922\7\u009f",
"\2\2\u0921\u091c\3\2\2\2\u0921\u091d\3\2\2\2\u0921\u091e\3\2\2\2\u0921",
"\u091f\3\2\2\2\u0921\u0920\3\2\2\2\u0922\u019f\3\2\2\2\u0923\u0924\t",
"\n\2\2\u0924\u01a1\3\2\2\2\u00c7\u01a8\u01af\u01cd\u01d3\u01d8\u01de",
"\u01e0\u01e3\u01e9\u01ed\u01f8\u0201\u0210\u0219\u0220\u022a\u0240\u0257",
"\u0264\u026f\u027d\u028b\u0299\u02ad\u02b8\u02ba\u02c3\u02c7\u02cf\u02d3",
"\u02df\u02e4\u02e8\u0303\u030a\u030f\u0313\u0328\u0336\u033a\u033d\u035e",
"\u0371\u0378\u039a\u03a3\u03ba\u03ca\u03cf\u03d7\u03e0\u03f7\u03fd\u041b",
"\u0484\u0486\u0490\u04a5\u04b5\u04ba\u04c4\u04c9\u04cb\u04d1\u04d3\u04d5",
"\u04e9\u04f0\u04f4\u04ff\u0503\u0508\u050a\u050e\u0516\u051d\u051f\u0524",
"\u0526\u0531\u0544\u054d\u0553\u0558\u055f\u0567\u0572\u057a\u0582\u0588",
"\u0590\u0599\u05a1\u05ae\u05b1\u05b5\u05ba\u05be\u05c7\u05dc\u05e6\u05e8",
"\u05ed\u05fd\u0602\u060b\u0612\u0617\u061c\u062b\u0630\u0633\u0637\u063c",
"\u0643\u064e\u0650\u0659\u0661\u0669\u066f\u067b\u067f\u0689\u068e\u0694",
"\u069b\u06a0\u06a7\u06af\u06b6\u06c0\u06cd\u06d1\u06d4\u06d8\u06db\u06e3",
"\u06ec\u06f5\u06fe\u070f\u071f\u0726\u072d\u0737\u073e\u0741\u0745\u074a",
"\u074e\u0759\u075c\u0763\u0773\u0780\u0787\u0798\u07a0\u07a4\u07ac\u07ce",
"\u07d7\u07e1\u07ed\u07f2\u07fe\u0810\u0817\u0820\u0827\u082f\u0834\u083e",
"\u0848\u0858\u0862\u0869\u0871\u087c\u0885\u088d\u0897\u089c\u08a8\u08bb",
"\u08c5\u08cd\u08d8\u08e1\u08e9\u08f3\u08f8\u0904\u0912\u0919\u0921"].join("");
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });
var sharedContextCache = new antlr4.PredictionContextCache();
var literalNames = [ 'null', 'null', 'null', 'null', 'null', 'null', "'\t'",
"' '", 'null', "'Java:'", "'C#:'", "'Python2:'", "'Python3:'",
"'JavaScript:'", "'Swift:'", "':'", "';'", "','", "'..'",
"'.'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'?'",
"'!'", "'&'", "'&&'", "'|'", "'||'", "'+'", "'-'",
"'*'", "'/'", "'\\'", "'%'", "'>'", "'>='", "'<'",
"'<='", "'<>'", "'='", "'!='", "'=='", "'~='", "'~'",
"'<-'", "'->'", "'Boolean'", "'Character'", "'Text'",
"'Integer'", "'Decimal'", "'Date'", "'Time'", "'DateTime'",
"'Period'", "'Method'", "'Code'", "'Document'", "'Blob'",
"'Image'", "'UUID'", "'Iterator'", "'Cursor'", "'abstract'",
"'all'", "'always'", "'and'", "'any'", "'as'", 'null',
"'attr'", "'attribute'", "'attributes'", "'bindings'",
"'break'", "'by'", "'case'", "'catch'", "'category'",
"'class'", "'close'", "'contains'", "'def'", "'default'",
"'define'", "'delete'", 'null', "'do'", "'doing'",
"'each'", "'else'", "'enum'", "'enumerated'", "'except'",
"'execute'", "'expecting'", "'extends'", "'fetch'",
"'filtered'", "'finally'", "'flush'", "'for'", "'from'",
"'getter'", "'if'", "'in'", "'index'", "'invoke'",
"'is'", "'matching'", "'method'", "'methods'", "'modulo'",
"'mutable'", "'native'", "'None'", "'not'", 'null',
"'null'", "'on'", "'one'", "'open'", "'operator'",
"'or'", "'order'", "'otherwise'", "'pass'", "'raise'",
"'read'", "'receiving'", "'resource'", "'return'",
"'returning'", "'rows'", "'self'", "'setter'", "'singleton'",
"'sorted'", "'storable'", "'store'", "'switch'", "'test'",
"'this'", "'throw'", "'to'", "'try'", "'verifying'",
"'with'", "'when'", "'where'", "'while'", "'write'",
'null', 'null', "'MIN_INTEGER'", "'MAX_INTEGER'" ];
var symbolicNames = [ 'null', "INDENT", "DEDENT", "LF_TAB", "LF_MORE", "LF",
"TAB", "WS", "COMMENT", "JAVA", "CSHARP", "PYTHON2",
"PYTHON3", "JAVASCRIPT", "SWIFT", "COLON", "SEMI",
"COMMA", "RANGE", "DOT", "LPAR", "RPAR", "LBRAK",
"RBRAK", "LCURL", "RCURL", "QMARK", "XMARK", "AMP",
"AMP2", "PIPE", "PIPE2", "PLUS", "MINUS", "STAR",
"SLASH", "BSLASH", "PERCENT", "GT", "GTE", "LT", "LTE",
"LTGT", "EQ", "XEQ", "EQ2", "TEQ", "TILDE", "LARROW",
"RARROW", "BOOLEAN", "CHARACTER", "TEXT", "INTEGER",
"DECIMAL", "DATE", "TIME", "DATETIME", "PERIOD", "METHOD_T",
"CODE", "DOCUMENT", "BLOB", "IMAGE", "UUID", "ITERATOR",
"CURSOR", "ABSTRACT", "ALL", "ALWAYS", "AND", "ANY",
"AS", "ASC", "ATTR", "ATTRIBUTE", "ATTRIBUTES", "BINDINGS",
"BREAK", "BY", "CASE", "CATCH", "CATEGORY", "CLASS",
"CLOSE", "CONTAINS", "DEF", "DEFAULT", "DEFINE", "DELETE",
"DESC", "DO", "DOING", "EACH", "ELSE", "ENUM", "ENUMERATED",
"EXCEPT", "EXECUTE", "EXPECTING", "EXTENDS", "FETCH",
"FILTERED", "FINALLY", "FLUSH", "FOR", "FROM", "GETTER",
"IF", "IN", "INDEX", "INVOKE", "IS", "MATCHING", "METHOD",
"METHODS", "MODULO", "MUTABLE", "NATIVE", "NONE",
"NOT", "NOTHING", "NULL", "ON", "ONE", "OPEN", "OPERATOR",
"OR", "ORDER", "OTHERWISE", "PASS", "RAISE", "READ",
"RECEIVING", "RESOURCE", "RETURN", "RETURNING", "ROWS",
"SELF", "SETTER", "SINGLETON", "SORTED", "STORABLE",
"STORE", "SWITCH", "TEST", "THIS", "THROW", "TO",
"TRY", "VERIFYING", "WITH", "WHEN", "WHERE", "WHILE",
"WRITE", "BOOLEAN_LITERAL", "CHAR_LITERAL", "MIN_INTEGER",
"MAX_INTEGER", "SYMBOL_IDENTIFIER", "TYPE_IDENTIFIER",
"VARIABLE_IDENTIFIER", "NATIVE_IDENTIFIER", "DOLLAR_IDENTIFIER",
"TEXT_LITERAL", "UUID_LITERAL", "INTEGER_LITERAL",
"HEXA_LITERAL", "DECIMAL_LITERAL", "DATETIME_LITERAL",
"TIME_LITERAL", "DATE_LITERAL", "PERIOD_LITERAL" ];
var ruleNames = [ "enum_category_declaration", "enum_native_declaration",
"native_symbol", "category_symbol", "attribute_declaration",
"concrete_category_declaration", "singleton_category_declaration",
"derived_list", "operator_method_declaration", "setter_method_declaration",
"native_setter_declaration", "getter_method_declaration",
"native_getter_declaration", "native_category_declaration",
"native_resource_declaration", "native_category_bindings",
"native_category_binding_list", "attribute_list", "abstract_method_declaration",
"concrete_method_declaration", "native_method_declaration",
"test_method_declaration", "assertion", "full_argument_list",
"typed_argument", "statement", "flush_statement", "store_statement",
"method_call_statement", "with_resource_statement", "with_singleton_statement",
"switch_statement", "switch_case_statement", "for_each_statement",
"do_while_statement", "while_statement", "if_statement",
"else_if_statement_list", "raise_statement", "try_statement",
"catch_statement", "break_statement", "return_statement",
"expression", "unresolved_expression", "unresolved_selector",
"invocation_expression", "invocation_trailer", "instance_expression",
"instance_selector", "document_expression", "blob_expression",
"constructor_expression", "write_statement", "ambiguous_expression",
"filtered_list_suffix", "fetch_store_expression", "sorted_expression",
"argument_assignment_list", "with_argument_assignment_list",
"argument_assignment", "assign_instance_statement", "child_instance",
"assign_tuple_statement", "lfs", "lfp", "indent", "dedent",
"null_literal", "declaration_list", "declarations", "declaration",
"resource_declaration", "enum_declaration", "native_symbol_list",
"category_symbol_list", "symbol_list", "attribute_constraint",
"list_literal", "set_literal", "expression_list", "range_literal",
"typedef", "primary_type", "native_type", "category_type",
"mutable_category_type", "code_type", "category_declaration",
"type_identifier_list", "method_identifier", "identifier",
"variable_identifier", "attribute_identifier", "type_identifier",
"symbol_identifier", "argument_list", "argument", "operator_argument",
"named_argument", "code_argument", "category_or_any_type",
"any_type", "member_method_declaration_list", "member_method_declaration",
"native_member_method_declaration_list", "native_member_method_declaration",
"native_category_binding", "python_category_binding",
"python_module", "javascript_category_binding", "javascript_module",
"variable_identifier_list", "attribute_identifier_list",
"method_declaration", "comment_statement", "native_statement_list",
"native_statement", "python_native_statement", "javascript_native_statement",
"statement_list", "assertion_list", "switch_case_statement_list",
"catch_statement_list", "literal_collection", "atomic_literal",
"literal_list_literal", "selectable_expression", "this_expression",
"parenthesis_expression", "literal_expression", "collection_literal",
"tuple_literal", "dict_literal", "expression_tuple",
"dict_entry_list", "dict_entry", "slice_arguments", "assign_variable_statement",
"assignable_instance", "is_expression", "read_all_expression",
"read_one_expression", "order_by_list", "order_by", "operator",
"new_token", "key_token", "module_token", "value_token",
"symbols_token", "assign", "multiply", "divide", "idivide",
"modulo", "javascript_statement", "javascript_expression",
"javascript_primary_expression", "javascript_this_expression",
"javascript_new_expression", "javascript_selector_expression",
"javascript_method_expression", "javascript_arguments",
"javascript_item_expression", "javascript_parenthesis_expression",
"javascript_identifier_expression", "javascript_literal_expression",
"javascript_identifier", "python_statement", "python_expression",
"python_primary_expression", "python_selector_expression",
"python_method_expression", "python_argument_list", "python_ordinal_argument_list",
"python_named_argument_list", "python_parenthesis_expression",
"python_identifier_expression", "python_literal_expression",
"python_identifier", "java_statement", "java_expression",
"java_primary_expression", "java_this_expression", "java_new_expression",
"java_selector_expression", "java_method_expression",
"java_arguments", "java_item_expression", "java_parenthesis_expression",
"java_identifier_expression", "java_class_identifier_expression",
"java_literal_expression", "java_identifier", "csharp_statement",
"csharp_expression", "csharp_primary_expression", "csharp_this_expression",
"csharp_new_expression", "csharp_selector_expression",
"csharp_method_expression", "csharp_arguments", "csharp_item_expression",
"csharp_parenthesis_expression", "csharp_identifier_expression",
"csharp_literal_expression", "csharp_identifier" ];
function EParser (input) {
AbstractParser.call(this, input);
this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache);
this.ruleNames = ruleNames;
this.literalNames = literalNames;
this.symbolicNames = symbolicNames;
return this;
}
EParser.prototype = Object.create(AbstractParser.prototype);
EParser.prototype.constructor = EParser;
Object.defineProperty(EParser.prototype, "atn", {
get : function() {
return atn;
}
});
EParser.EOF = antlr4.Token.EOF;
EParser.INDENT = 1;
EParser.DEDENT = 2;
EParser.LF_TAB = 3;
EParser.LF_MORE = 4;
EParser.LF = 5;
EParser.TAB = 6;
EParser.WS = 7;
EParser.COMMENT = 8;
EParser.JAVA = 9;
EParser.CSHARP = 10;
EParser.PYTHON2 = 11;
EParser.PYTHON3 = 12;
EParser.JAVASCRIPT = 13;
EParser.SWIFT = 14;
EParser.COLON = 15;
EParser.SEMI = 16;
EParser.COMMA = 17;
EParser.RANGE = 18;
EParser.DOT = 19;
EParser.LPAR = 20;
EParser.RPAR = 21;
EParser.LBRAK = 22;
EParser.RBRAK = 23;
EParser.LCURL = 24;
EParser.RCURL = 25;
EParser.QMARK = 26;
EParser.XMARK = 27;
EParser.AMP = 28;
EParser.AMP2 = 29;
EParser.PIPE = 30;
EParser.PIPE2 = 31;
EParser.PLUS = 32;
EParser.MINUS = 33;
EParser.STAR = 34;
EParser.SLASH = 35;
EParser.BSLASH = 36;
EParser.PERCENT = 37;
EParser.GT = 38;
EParser.GTE = 39;
EParser.LT = 40;
EParser.LTE = 41;
EParser.LTGT = 42;
EParser.EQ = 43;
EParser.XEQ = 44;
EParser.EQ2 = 45;
EParser.TEQ = 46;
EParser.TILDE = 47;
EParser.LARROW = 48;
EParser.RARROW = 49;
EParser.BOOLEAN = 50;
EParser.CHARACTER = 51;
EParser.TEXT = 52;
EParser.INTEGER = 53;
EParser.DECIMAL = 54;
EParser.DATE = 55;
EParser.TIME = 56;
EParser.DATETIME = 57;
EParser.PERIOD = 58;
EParser.METHOD_T = 59;
EParser.CODE = 60;
EParser.DOCUMENT = 61;
EParser.BLOB = 62;
EParser.IMAGE = 63;
EParser.UUID = 64;
EParser.ITERATOR = 65;
EParser.CURSOR = 66;
EParser.ABSTRACT = 67;
EParser.ALL = 68;
EParser.ALWAYS = 69;
EParser.AND = 70;
EParser.ANY = 71;
EParser.AS = 72;
EParser.ASC = 73;
EParser.ATTR = 74;
EParser.ATTRIBUTE = 75;
EParser.ATTRIBUTES = 76;
EParser.BINDINGS = 77;
EParser.BREAK = 78;
EParser.BY = 79;
EParser.CASE = 80;
EParser.CATCH = 81;
EParser.CATEGORY = 82;
EParser.CLASS = 83;
EParser.CLOSE = 84;
EParser.CONTAINS = 85;
EParser.DEF = 86;
EParser.DEFAULT = 87;
EParser.DEFINE = 88;
EParser.DELETE = 89;
EParser.DESC = 90;
EParser.DO = 91;
EParser.DOING = 92;
EParser.EACH = 93;
EParser.ELSE = 94;
EParser.ENUM = 95;
EParser.ENUMERATED = 96;
EParser.EXCEPT = 97;
EParser.EXECUTE = 98;
EParser.EXPECTING = 99;
EParser.EXTENDS = 100;
EParser.FETCH = 101;
EParser.FILTERED = 102;
EParser.FINALLY = 103;
EParser.FLUSH = 104;
EParser.FOR = 105;
EParser.FROM = 106;
EParser.GETTER = 107;
EParser.IF = 108;
EParser.IN = 109;
EParser.INDEX = 110;
EParser.INVOKE = 111;
EParser.IS = 112;
EParser.MATCHING = 113;
EParser.METHOD = 114;
EParser.METHODS = 115;
EParser.MODULO = 116;
EParser.MUTABLE = 117;
EParser.NATIVE = 118;
EParser.NONE = 119;
EParser.NOT = 120;
EParser.NOTHING = 121;
EParser.NULL = 122;
EParser.ON = 123;
EParser.ONE = 124;
EParser.OPEN = 125;
EParser.OPERATOR = 126;
EParser.OR = 127;
EParser.ORDER = 128;
EParser.OTHERWISE = 129;
EParser.PASS = 130;
EParser.RAISE = 131;
EParser.READ = 132;
EParser.RECEIVING = 133;
EParser.RESOURCE = 134;
EParser.RETURN = 135;
EParser.RETURNING = 136;
EParser.ROWS = 137;
EParser.SELF = 138;
EParser.SETTER = 139;
EParser.SINGLETON = 140;
EParser.SORTED = 141;
EParser.STORABLE = 142;
EParser.STORE = 143;
EParser.SWITCH = 144;
EParser.TEST = 145;
EParser.THIS = 146;
EParser.THROW = 147;
EParser.TO = 148;
EParser.TRY = 149;
EParser.VERIFYING = 150;
EParser.WITH = 151;
EParser.WHEN = 152;
EParser.WHERE = 153;
EParser.WHILE = 154;
EParser.WRITE = 155;
EParser.BOOLEAN_LITERAL = 156;
EParser.CHAR_LITERAL = 157;
EParser.MIN_INTEGER = 158;
EParser.MAX_INTEGER = 159;
EParser.SYMBOL_IDENTIFIER = 160;
EParser.TYPE_IDENTIFIER = 161;
EParser.VARIABLE_IDENTIFIER = 162;
EParser.NATIVE_IDENTIFIER = 163;
EParser.DOLLAR_IDENTIFIER = 164;
EParser.TEXT_LITERAL = 165;
EParser.UUID_LITERAL = 166;
EParser.INTEGER_LITERAL = 167;
EParser.HEXA_LITERAL = 168;
EParser.DECIMAL_LITERAL = 169;
EParser.DATETIME_LITERAL = 170;
EParser.TIME_LITERAL = 171;
EParser.DATE_LITERAL = 172;
EParser.PERIOD_LITERAL = 173;
EParser.RULE_enum_category_declaration = 0;
EParser.RULE_enum_native_declaration = 1;
EParser.RULE_native_symbol = 2;
EParser.RULE_category_symbol = 3;
EParser.RULE_attribute_declaration = 4;
EParser.RULE_concrete_category_declaration = 5;
EParser.RULE_singleton_category_declaration = 6;
EParser.RULE_derived_list = 7;
EParser.RULE_operator_method_declaration = 8;
EParser.RULE_setter_method_declaration = 9;
EParser.RULE_native_setter_declaration = 10;
EParser.RULE_getter_method_declaration = 11;
EParser.RULE_native_getter_declaration = 12;
EParser.RULE_native_category_declaration = 13;
EParser.RULE_native_resource_declaration = 14;
EParser.RULE_native_category_bindings = 15;
EParser.RULE_native_category_binding_list = 16;
EParser.RULE_attribute_list = 17;
EParser.RULE_abstract_method_declaration = 18;
EParser.RULE_concrete_method_declaration = 19;
EParser.RULE_native_method_declaration = 20;
EParser.RULE_test_method_declaration = 21;
EParser.RULE_assertion = 22;
EParser.RULE_full_argument_list = 23;
EParser.RULE_typed_argument = 24;
EParser.RULE_statement = 25;
EParser.RULE_flush_statement = 26;
EParser.RULE_store_statement = 27;
EParser.RULE_method_call_statement = 28;
EParser.RULE_with_resource_statement = 29;
EParser.RULE_with_singleton_statement = 30;
EParser.RULE_switch_statement = 31;
EParser.RULE_switch_case_statement = 32;
EParser.RULE_for_each_statement = 33;
EParser.RULE_do_while_statement = 34;
EParser.RULE_while_statement = 35;
EParser.RULE_if_statement = 36;
EParser.RULE_else_if_statement_list = 37;
EParser.RULE_raise_statement = 38;
EParser.RULE_try_statement = 39;
EParser.RULE_catch_statement = 40;
EParser.RULE_break_statement = 41;
EParser.RULE_return_statement = 42;
EParser.RULE_expression = 43;
EParser.RULE_unresolved_expression = 44;
EParser.RULE_unresolved_selector = 45;
EParser.RULE_invocation_expression = 46;
EParser.RULE_invocation_trailer = 47;
EParser.RULE_instance_expression = 48;
EParser.RULE_instance_selector = 49;
EParser.RULE_document_expression = 50;
EParser.RULE_blob_expression = 51;
EParser.RULE_constructor_expression = 52;
EParser.RULE_write_statement = 53;
EParser.RULE_ambiguous_expression = 54;
EParser.RULE_filtered_list_suffix = 55;
EParser.RULE_fetch_store_expression = 56;
EParser.RULE_sorted_expression = 57;
EParser.RULE_argument_assignment_list = 58;
EParser.RULE_with_argument_assignment_list = 59;
EParser.RULE_argument_assignment = 60;
EParser.RULE_assign_instance_statement = 61;
EParser.RULE_child_instance = 62;
EParser.RULE_assign_tuple_statement = 63;
EParser.RULE_lfs = 64;
EParser.RULE_lfp = 65;
EParser.RULE_indent = 66;
EParser.RULE_dedent = 67;
EParser.RULE_null_literal = 68;
EParser.RULE_declaration_list = 69;
EParser.RULE_declarations = 70;
EParser.RULE_declaration = 71;
EParser.RULE_resource_declaration = 72;
EParser.RULE_enum_declaration = 73;
EParser.RULE_native_symbol_list = 74;
EParser.RULE_category_symbol_list = 75;
EParser.RULE_symbol_list = 76;
EParser.RULE_attribute_constraint = 77;
EParser.RULE_list_literal = 78;
EParser.RULE_set_literal = 79;
EParser.RULE_expression_list = 80;
EParser.RULE_range_literal = 81;
EParser.RULE_typedef = 82;
EParser.RULE_primary_type = 83;
EParser.RULE_native_type = 84;
EParser.RULE_category_type = 85;
EParser.RULE_mutable_category_type = 86;
EParser.RULE_code_type = 87;
EParser.RULE_category_declaration = 88;
EParser.RULE_type_identifier_list = 89;
EParser.RULE_method_identifier = 90;
EParser.RULE_identifier = 91;
EParser.RULE_variable_identifier = 92;
EParser.RULE_attribute_identifier = 93;
EParser.RULE_type_identifier = 94;
EParser.RULE_symbol_identifier = 95;
EParser.RULE_argument_list = 96;
EParser.RULE_argument = 97;
EParser.RULE_operator_argument = 98;
EParser.RULE_named_argument = 99;
EParser.RULE_code_argument = 100;
EParser.RULE_category_or_any_type = 101;
EParser.RULE_any_type = 102;
EParser.RULE_member_method_declaration_list = 103;
EParser.RULE_member_method_declaration = 104;
EParser.RULE_native_member_method_declaration_list = 105;
EParser.RULE_native_member_method_declaration = 106;
EParser.RULE_native_category_binding = 107;
EParser.RULE_python_category_binding = 108;
EParser.RULE_python_module = 109;
EParser.RULE_javascript_category_binding = 110;
EParser.RULE_javascript_module = 111;
EParser.RULE_variable_identifier_list = 112;
EParser.RULE_attribute_identifier_list = 113;
EParser.RULE_method_declaration = 114;
EParser.RULE_comment_statement = 115;
EParser.RULE_native_statement_list = 116;
EParser.RULE_native_statement = 117;
EParser.RULE_python_native_statement = 118;
EParser.RULE_javascript_native_statement = 119;
EParser.RULE_statement_list = 120;
EParser.RULE_assertion_list = 121;
EParser.RULE_switch_case_statement_list = 122;
EParser.RULE_catch_statement_list = 123;
EParser.RULE_literal_collection = 124;
EParser.RULE_atomic_literal = 125;
EParser.RULE_literal_list_literal = 126;
EParser.RULE_selectable_expression = 127;
EParser.RULE_this_expression = 128;
EParser.RULE_parenthesis_expression = 129;
EParser.RULE_literal_expression = 130;
EParser.RULE_collection_literal = 131;
EParser.RULE_tuple_literal = 132;
EParser.RULE_dict_literal = 133;
EParser.RULE_expression_tuple = 134;
EParser.RULE_dict_entry_list = 135;
EParser.RULE_dict_entry = 136;
EParser.RULE_slice_arguments = 137;
EParser.RULE_assign_variable_statement = 138;
EParser.RULE_assignable_instance = 139;
EParser.RULE_is_expression = 140;
EParser.RULE_read_all_expression = 141;
EParser.RULE_read_one_expression = 142;
EParser.RULE_order_by_list = 143;
EParser.RULE_order_by = 144;
EParser.RULE_operator = 145;
EParser.RULE_new_token = 146;
EParser.RULE_key_token = 147;
EParser.RULE_module_token = 148;
EParser.RULE_value_token = 149;
EParser.RULE_symbols_token = 150;
EParser.RULE_assign = 151;
EParser.RULE_multiply = 152;
EParser.RULE_divide = 153;
EParser.RULE_idivide = 154;
EParser.RULE_modulo = 155;
EParser.RULE_javascript_statement = 156;
EParser.RULE_javascript_expression = 157;
EParser.RULE_javascript_primary_expression = 158;
EParser.RULE_javascript_this_expression = 159;
EParser.RULE_javascript_new_expression = 160;
EParser.RULE_javascript_selector_expression = 161;
EParser.RULE_javascript_method_expression = 162;
EParser.RULE_javascript_arguments = 163;
EParser.RULE_javascript_item_expression = 164;
EParser.RULE_javascript_parenthesis_expression = 165;
EParser.RULE_javascript_identifier_expression = 166;
EParser.RULE_javascript_literal_expression = 167;
EParser.RULE_javascript_identifier = 168;
EParser.RULE_python_statement = 169;
EParser.RULE_python_expression = 170;
EParser.RULE_python_primary_expression = 171;
EParser.RULE_python_selector_expression = 172;
EParser.RULE_python_method_expression = 173;
EParser.RULE_python_argument_list = 174;
EParser.RULE_python_ordinal_argument_list = 175;
EParser.RULE_python_named_argument_list = 176;
EParser.RULE_python_parenthesis_expression = 177;
EParser.RULE_python_identifier_expression = 178;
EParser.RULE_python_literal_expression = 179;
EParser.RULE_python_identifier = 180;
EParser.RULE_java_statement = 181;
EParser.RULE_java_expression = 182;
EParser.RULE_java_primary_expression = 183;
EParser.RULE_java_this_expression = 184;
EParser.RULE_java_new_expression = 185;
EParser.RULE_java_selector_expression = 186;
EParser.RULE_java_method_expression = 187;
EParser.RULE_java_arguments = 188;
EParser.RULE_java_item_expression = 189;
EParser.RULE_java_parenthesis_expression = 190;
EParser.RULE_java_identifier_expression = 191;
EParser.RULE_java_class_identifier_expression = 192;
EParser.RULE_java_literal_expression = 193;
EParser.RULE_java_identifier = 194;
EParser.RULE_csharp_statement = 195;
EParser.RULE_csharp_expression = 196;
EParser.RULE_csharp_primary_expression = 197;
EParser.RULE_csharp_this_expression = 198;
EParser.RULE_csharp_new_expression = 199;
EParser.RULE_csharp_selector_expression = 200;
EParser.RULE_csharp_method_expression = 201;
EParser.RULE_csharp_arguments = 202;
EParser.RULE_csharp_item_expression = 203;
EParser.RULE_csharp_parenthesis_expression = 204;
EParser.RULE_csharp_identifier_expression = 205;
EParser.RULE_csharp_literal_expression = 206;
EParser.RULE_csharp_identifier = 207;
function Enum_category_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_enum_category_declaration;
this.name = null; // Type_identifierContext
this.derived = null; // Type_identifierContext
this.attrs = null; // Attribute_listContext
this.symbols = null; // Category_symbol_listContext
return this;
}
Enum_category_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Enum_category_declarationContext.prototype.constructor = Enum_category_declarationContext;
Enum_category_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Enum_category_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Enum_category_declarationContext.prototype.ENUMERATED = function() {
return this.getToken(EParser.ENUMERATED, 0);
};
Enum_category_declarationContext.prototype.symbols_token = function() {
return this.getTypedRuleContext(Symbols_tokenContext,0);
};
Enum_category_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Enum_category_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Enum_category_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Enum_category_declarationContext.prototype.type_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Type_identifierContext);
} else {
return this.getTypedRuleContext(Type_identifierContext,i);
}
};
Enum_category_declarationContext.prototype.category_symbol_list = function() {
return this.getTypedRuleContext(Category_symbol_listContext,0);
};
Enum_category_declarationContext.prototype.CATEGORY = function() {
return this.getToken(EParser.CATEGORY, 0);
};
Enum_category_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Enum_category_declarationContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
Enum_category_declarationContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Enum_category_declarationContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Enum_category_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterEnum_category_declaration(this);
}
};
Enum_category_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitEnum_category_declaration(this);
}
};
EParser.prototype.enum_category_declaration = function() {
var localctx = new Enum_category_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 0, EParser.RULE_enum_category_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 416;
this.match(EParser.DEFINE);
this.state = 417;
localctx.name = this.type_identifier();
this.state = 418;
this.match(EParser.AS);
this.state = 419;
this.match(EParser.ENUMERATED);
this.state = 422;
switch(this._input.LA(1)) {
case EParser.CATEGORY:
this.state = 420;
this.match(EParser.CATEGORY);
break;
case EParser.TYPE_IDENTIFIER:
this.state = 421;
localctx.derived = this.type_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 429;
var la_ = this._interp.adaptivePredict(this._input,1,this._ctx);
switch(la_) {
case 1:
this.state = 424;
localctx.attrs = this.attribute_list();
this.state = 425;
this.match(EParser.COMMA);
this.state = 426;
this.match(EParser.AND);
break;
case 2:
this.state = 428;
this.match(EParser.WITH);
break;
}
this.state = 431;
this.symbols_token();
this.state = 432;
this.match(EParser.COLON);
this.state = 433;
this.indent();
this.state = 434;
localctx.symbols = this.category_symbol_list();
this.state = 435;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Enum_native_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_enum_native_declaration;
this.name = null; // Type_identifierContext
this.typ = null; // Native_typeContext
this.symbols = null; // Native_symbol_listContext
return this;
}
Enum_native_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Enum_native_declarationContext.prototype.constructor = Enum_native_declarationContext;
Enum_native_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Enum_native_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Enum_native_declarationContext.prototype.ENUMERATED = function() {
return this.getToken(EParser.ENUMERATED, 0);
};
Enum_native_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Enum_native_declarationContext.prototype.symbols_token = function() {
return this.getTypedRuleContext(Symbols_tokenContext,0);
};
Enum_native_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Enum_native_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Enum_native_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Enum_native_declarationContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Enum_native_declarationContext.prototype.native_type = function() {
return this.getTypedRuleContext(Native_typeContext,0);
};
Enum_native_declarationContext.prototype.native_symbol_list = function() {
return this.getTypedRuleContext(Native_symbol_listContext,0);
};
Enum_native_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterEnum_native_declaration(this);
}
};
Enum_native_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitEnum_native_declaration(this);
}
};
EParser.prototype.enum_native_declaration = function() {
var localctx = new Enum_native_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 2, EParser.RULE_enum_native_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 437;
this.match(EParser.DEFINE);
this.state = 438;
localctx.name = this.type_identifier();
this.state = 439;
this.match(EParser.AS);
this.state = 440;
this.match(EParser.ENUMERATED);
this.state = 441;
localctx.typ = this.native_type();
this.state = 442;
this.match(EParser.WITH);
this.state = 443;
this.symbols_token();
this.state = 444;
this.match(EParser.COLON);
this.state = 445;
this.indent();
this.state = 446;
localctx.symbols = this.native_symbol_list();
this.state = 447;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_symbolContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_symbol;
this.name = null; // Symbol_identifierContext
this.exp = null; // ExpressionContext
return this;
}
Native_symbolContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_symbolContext.prototype.constructor = Native_symbolContext;
Native_symbolContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Native_symbolContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_symbolContext.prototype.value_token = function() {
return this.getTypedRuleContext(Value_tokenContext,0);
};
Native_symbolContext.prototype.symbol_identifier = function() {
return this.getTypedRuleContext(Symbol_identifierContext,0);
};
Native_symbolContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Native_symbolContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_symbol(this);
}
};
Native_symbolContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_symbol(this);
}
};
EParser.prototype.native_symbol = function() {
var localctx = new Native_symbolContext(this, this._ctx, this.state);
this.enterRule(localctx, 4, EParser.RULE_native_symbol);
try {
this.enterOuterAlt(localctx, 1);
this.state = 449;
localctx.name = this.symbol_identifier();
this.state = 450;
this.match(EParser.WITH);
this.state = 451;
localctx.exp = this.expression(0);
this.state = 452;
this.match(EParser.AS);
this.state = 453;
this.value_token();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Category_symbolContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_category_symbol;
this.name = null; // Symbol_identifierContext
this.args = null; // With_argument_assignment_listContext
this.arg = null; // Argument_assignmentContext
return this;
}
Category_symbolContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Category_symbolContext.prototype.constructor = Category_symbolContext;
Category_symbolContext.prototype.symbol_identifier = function() {
return this.getTypedRuleContext(Symbol_identifierContext,0);
};
Category_symbolContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
Category_symbolContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Category_symbolContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
Category_symbolContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCategory_symbol(this);
}
};
Category_symbolContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCategory_symbol(this);
}
};
EParser.prototype.category_symbol = function() {
var localctx = new Category_symbolContext(this, this._ctx, this.state);
this.enterRule(localctx, 6, EParser.RULE_category_symbol);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 455;
localctx.name = this.symbol_identifier();
this.state = 456;
localctx.args = this.with_argument_assignment_list(0);
this.state = 459;
_la = this._input.LA(1);
if(_la===EParser.AND) {
this.state = 457;
this.match(EParser.AND);
this.state = 458;
localctx.arg = this.argument_assignment();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Attribute_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_attribute_declaration;
this.name = null; // Attribute_identifierContext
this.typ = null; // TypedefContext
this.match = null; // Attribute_constraintContext
this.indices = null; // Variable_identifier_listContext
this.index = null; // Variable_identifierContext
return this;
}
Attribute_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Attribute_declarationContext.prototype.constructor = Attribute_declarationContext;
Attribute_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Attribute_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Attribute_declarationContext.prototype.ATTRIBUTE = function() {
return this.getToken(EParser.ATTRIBUTE, 0);
};
Attribute_declarationContext.prototype.attribute_identifier = function() {
return this.getTypedRuleContext(Attribute_identifierContext,0);
};
Attribute_declarationContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
Attribute_declarationContext.prototype.STORABLE = function() {
return this.getToken(EParser.STORABLE, 0);
};
Attribute_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Attribute_declarationContext.prototype.INDEX = function() {
return this.getToken(EParser.INDEX, 0);
};
Attribute_declarationContext.prototype.attribute_constraint = function() {
return this.getTypedRuleContext(Attribute_constraintContext,0);
};
Attribute_declarationContext.prototype.variable_identifier_list = function() {
return this.getTypedRuleContext(Variable_identifier_listContext,0);
};
Attribute_declarationContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Attribute_declarationContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Attribute_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAttribute_declaration(this);
}
};
Attribute_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAttribute_declaration(this);
}
};
EParser.prototype.attribute_declaration = function() {
var localctx = new Attribute_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 8, EParser.RULE_attribute_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 461;
this.match(EParser.DEFINE);
this.state = 462;
localctx.name = this.attribute_identifier();
this.state = 463;
this.match(EParser.AS);
this.state = 465;
_la = this._input.LA(1);
if(_la===EParser.STORABLE) {
this.state = 464;
this.match(EParser.STORABLE);
}
this.state = 467;
localctx.typ = this.typedef(0);
this.state = 468;
this.match(EParser.ATTRIBUTE);
this.state = 470;
_la = this._input.LA(1);
if(_la===EParser.IN || _la===EParser.MATCHING) {
this.state = 469;
localctx.match = this.attribute_constraint();
}
this.state = 481;
_la = this._input.LA(1);
if(_la===EParser.WITH) {
this.state = 472;
this.match(EParser.WITH);
this.state = 478;
_la = this._input.LA(1);
if(_la===EParser.VARIABLE_IDENTIFIER) {
this.state = 473;
localctx.indices = this.variable_identifier_list();
this.state = 476;
_la = this._input.LA(1);
if(_la===EParser.AND) {
this.state = 474;
this.match(EParser.AND);
this.state = 475;
localctx.index = this.variable_identifier();
}
}
this.state = 480;
this.match(EParser.INDEX);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Concrete_category_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_concrete_category_declaration;
this.name = null; // Type_identifierContext
this.derived = null; // Derived_listContext
this.attrs = null; // Attribute_listContext
this.methods = null; // Member_method_declaration_listContext
return this;
}
Concrete_category_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Concrete_category_declarationContext.prototype.constructor = Concrete_category_declarationContext;
Concrete_category_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Concrete_category_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Concrete_category_declarationContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Concrete_category_declarationContext.prototype.CATEGORY = function() {
return this.getToken(EParser.CATEGORY, 0);
};
Concrete_category_declarationContext.prototype.STORABLE = function() {
return this.getToken(EParser.STORABLE, 0);
};
Concrete_category_declarationContext.prototype.derived_list = function() {
return this.getTypedRuleContext(Derived_listContext,0);
};
Concrete_category_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Concrete_category_declarationContext.prototype.METHODS = function() {
return this.getToken(EParser.METHODS, 0);
};
Concrete_category_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Concrete_category_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Concrete_category_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Concrete_category_declarationContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Concrete_category_declarationContext.prototype.member_method_declaration_list = function() {
return this.getTypedRuleContext(Member_method_declaration_listContext,0);
};
Concrete_category_declarationContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
Concrete_category_declarationContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Concrete_category_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConcrete_category_declaration(this);
}
};
Concrete_category_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConcrete_category_declaration(this);
}
};
EParser.prototype.concrete_category_declaration = function() {
var localctx = new Concrete_category_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 10, EParser.RULE_concrete_category_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 483;
this.match(EParser.DEFINE);
this.state = 484;
localctx.name = this.type_identifier();
this.state = 485;
this.match(EParser.AS);
this.state = 487;
_la = this._input.LA(1);
if(_la===EParser.STORABLE) {
this.state = 486;
this.match(EParser.STORABLE);
}
this.state = 491;
switch(this._input.LA(1)) {
case EParser.CATEGORY:
this.state = 489;
this.match(EParser.CATEGORY);
break;
case EParser.TYPE_IDENTIFIER:
this.state = 490;
localctx.derived = this.derived_list();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 511;
var la_ = this._interp.adaptivePredict(this._input,11,this._ctx);
if(la_===1) {
this.state = 493;
localctx.attrs = this.attribute_list();
this.state = 502;
_la = this._input.LA(1);
if(_la===EParser.COMMA) {
this.state = 494;
this.match(EParser.COMMA);
this.state = 495;
this.match(EParser.AND);
this.state = 496;
this.match(EParser.METHODS);
this.state = 497;
this.match(EParser.COLON);
this.state = 498;
this.indent();
this.state = 499;
localctx.methods = this.member_method_declaration_list();
this.state = 500;
this.dedent();
}
} else if(la_===2) {
this.state = 504;
this.match(EParser.WITH);
this.state = 505;
this.match(EParser.METHODS);
this.state = 506;
this.match(EParser.COLON);
this.state = 507;
this.indent();
this.state = 508;
localctx.methods = this.member_method_declaration_list();
this.state = 509;
this.dedent();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Singleton_category_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_singleton_category_declaration;
this.name = null; // Type_identifierContext
this.attrs = null; // Attribute_listContext
this.methods = null; // Member_method_declaration_listContext
return this;
}
Singleton_category_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Singleton_category_declarationContext.prototype.constructor = Singleton_category_declarationContext;
Singleton_category_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Singleton_category_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Singleton_category_declarationContext.prototype.SINGLETON = function() {
return this.getToken(EParser.SINGLETON, 0);
};
Singleton_category_declarationContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Singleton_category_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Singleton_category_declarationContext.prototype.METHODS = function() {
return this.getToken(EParser.METHODS, 0);
};
Singleton_category_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Singleton_category_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Singleton_category_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Singleton_category_declarationContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Singleton_category_declarationContext.prototype.member_method_declaration_list = function() {
return this.getTypedRuleContext(Member_method_declaration_listContext,0);
};
Singleton_category_declarationContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
Singleton_category_declarationContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Singleton_category_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSingleton_category_declaration(this);
}
};
Singleton_category_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSingleton_category_declaration(this);
}
};
EParser.prototype.singleton_category_declaration = function() {
var localctx = new Singleton_category_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 12, EParser.RULE_singleton_category_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 513;
this.match(EParser.DEFINE);
this.state = 514;
localctx.name = this.type_identifier();
this.state = 515;
this.match(EParser.AS);
this.state = 516;
this.match(EParser.SINGLETON);
this.state = 535;
var la_ = this._interp.adaptivePredict(this._input,13,this._ctx);
if(la_===1) {
this.state = 517;
localctx.attrs = this.attribute_list();
this.state = 526;
_la = this._input.LA(1);
if(_la===EParser.COMMA) {
this.state = 518;
this.match(EParser.COMMA);
this.state = 519;
this.match(EParser.AND);
this.state = 520;
this.match(EParser.METHODS);
this.state = 521;
this.match(EParser.COLON);
this.state = 522;
this.indent();
this.state = 523;
localctx.methods = this.member_method_declaration_list();
this.state = 524;
this.dedent();
}
} else if(la_===2) {
this.state = 528;
this.match(EParser.WITH);
this.state = 529;
this.match(EParser.METHODS);
this.state = 530;
this.match(EParser.COLON);
this.state = 531;
this.indent();
this.state = 532;
localctx.methods = this.member_method_declaration_list();
this.state = 533;
this.dedent();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Derived_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_derived_list;
return this;
}
Derived_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Derived_listContext.prototype.constructor = Derived_listContext;
Derived_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function DerivedListItemContext(parser, ctx) {
Derived_listContext.call(this, parser);
this.items = null; // Type_identifier_listContext;
this.item = null; // Type_identifierContext;
Derived_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
DerivedListItemContext.prototype = Object.create(Derived_listContext.prototype);
DerivedListItemContext.prototype.constructor = DerivedListItemContext;
DerivedListItemContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
DerivedListItemContext.prototype.type_identifier_list = function() {
return this.getTypedRuleContext(Type_identifier_listContext,0);
};
DerivedListItemContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
DerivedListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDerivedListItem(this);
}
};
DerivedListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDerivedListItem(this);
}
};
function DerivedListContext(parser, ctx) {
Derived_listContext.call(this, parser);
this.items = null; // Type_identifier_listContext;
Derived_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
DerivedListContext.prototype = Object.create(Derived_listContext.prototype);
DerivedListContext.prototype.constructor = DerivedListContext;
DerivedListContext.prototype.type_identifier_list = function() {
return this.getTypedRuleContext(Type_identifier_listContext,0);
};
DerivedListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDerivedList(this);
}
};
DerivedListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDerivedList(this);
}
};
EParser.prototype.derived_list = function() {
var localctx = new Derived_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 14, EParser.RULE_derived_list);
try {
this.state = 542;
var la_ = this._interp.adaptivePredict(this._input,14,this._ctx);
switch(la_) {
case 1:
localctx = new DerivedListContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 537;
localctx.items = this.type_identifier_list();
break;
case 2:
localctx = new DerivedListItemContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 538;
localctx.items = this.type_identifier_list();
this.state = 539;
this.match(EParser.AND);
this.state = 540;
localctx.item = this.type_identifier();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Operator_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_operator_method_declaration;
this.op = null; // OperatorContext
this.arg = null; // Operator_argumentContext
this.typ = null; // TypedefContext
this.stmts = null; // Statement_listContext
return this;
}
Operator_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Operator_method_declarationContext.prototype.constructor = Operator_method_declarationContext;
Operator_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Operator_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Operator_method_declarationContext.prototype.OPERATOR = function() {
return this.getToken(EParser.OPERATOR, 0);
};
Operator_method_declarationContext.prototype.RECEIVING = function() {
return this.getToken(EParser.RECEIVING, 0);
};
Operator_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Operator_method_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Operator_method_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Operator_method_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Operator_method_declarationContext.prototype.operator = function() {
return this.getTypedRuleContext(OperatorContext,0);
};
Operator_method_declarationContext.prototype.operator_argument = function() {
return this.getTypedRuleContext(Operator_argumentContext,0);
};
Operator_method_declarationContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Operator_method_declarationContext.prototype.RETURNING = function() {
return this.getToken(EParser.RETURNING, 0);
};
Operator_method_declarationContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
Operator_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperator_method_declaration(this);
}
};
Operator_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperator_method_declaration(this);
}
};
EParser.prototype.operator_method_declaration = function() {
var localctx = new Operator_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 16, EParser.RULE_operator_method_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 544;
this.match(EParser.DEFINE);
this.state = 545;
localctx.op = this.operator();
this.state = 546;
this.match(EParser.AS);
this.state = 547;
this.match(EParser.OPERATOR);
this.state = 548;
this.match(EParser.RECEIVING);
this.state = 549;
localctx.arg = this.operator_argument();
this.state = 552;
_la = this._input.LA(1);
if(_la===EParser.RETURNING) {
this.state = 550;
this.match(EParser.RETURNING);
this.state = 551;
localctx.typ = this.typedef(0);
}
this.state = 554;
this.match(EParser.DOING);
this.state = 555;
this.match(EParser.COLON);
this.state = 556;
this.indent();
this.state = 557;
localctx.stmts = this.statement_list();
this.state = 558;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Setter_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_setter_method_declaration;
this.name = null; // Variable_identifierContext
this.stmts = null; // Statement_listContext
return this;
}
Setter_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Setter_method_declarationContext.prototype.constructor = Setter_method_declarationContext;
Setter_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Setter_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Setter_method_declarationContext.prototype.SETTER = function() {
return this.getToken(EParser.SETTER, 0);
};
Setter_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Setter_method_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Setter_method_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Setter_method_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Setter_method_declarationContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Setter_method_declarationContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Setter_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSetter_method_declaration(this);
}
};
Setter_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSetter_method_declaration(this);
}
};
EParser.prototype.setter_method_declaration = function() {
var localctx = new Setter_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 18, EParser.RULE_setter_method_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 560;
this.match(EParser.DEFINE);
this.state = 561;
localctx.name = this.variable_identifier();
this.state = 562;
this.match(EParser.AS);
this.state = 563;
this.match(EParser.SETTER);
this.state = 564;
this.match(EParser.DOING);
this.state = 565;
this.match(EParser.COLON);
this.state = 566;
this.indent();
this.state = 567;
localctx.stmts = this.statement_list();
this.state = 568;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_setter_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_setter_declaration;
this.name = null; // Variable_identifierContext
this.stmts = null; // Native_statement_listContext
return this;
}
Native_setter_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_setter_declarationContext.prototype.constructor = Native_setter_declarationContext;
Native_setter_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_setter_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_setter_declarationContext.prototype.SETTER = function() {
return this.getToken(EParser.SETTER, 0);
};
Native_setter_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Native_setter_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Native_setter_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Native_setter_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Native_setter_declarationContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Native_setter_declarationContext.prototype.native_statement_list = function() {
return this.getTypedRuleContext(Native_statement_listContext,0);
};
Native_setter_declarationContext.prototype.NATIVE = function() {
return this.getToken(EParser.NATIVE, 0);
};
Native_setter_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_setter_declaration(this);
}
};
Native_setter_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_setter_declaration(this);
}
};
EParser.prototype.native_setter_declaration = function() {
var localctx = new Native_setter_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 20, EParser.RULE_native_setter_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 570;
this.match(EParser.DEFINE);
this.state = 571;
localctx.name = this.variable_identifier();
this.state = 572;
this.match(EParser.AS);
this.state = 574;
_la = this._input.LA(1);
if(_la===EParser.NATIVE) {
this.state = 573;
this.match(EParser.NATIVE);
}
this.state = 576;
this.match(EParser.SETTER);
this.state = 577;
this.match(EParser.DOING);
this.state = 578;
this.match(EParser.COLON);
this.state = 579;
this.indent();
this.state = 580;
localctx.stmts = this.native_statement_list();
this.state = 581;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Getter_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_getter_method_declaration;
this.name = null; // Variable_identifierContext
this.stmts = null; // Statement_listContext
return this;
}
Getter_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Getter_method_declarationContext.prototype.constructor = Getter_method_declarationContext;
Getter_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Getter_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Getter_method_declarationContext.prototype.GETTER = function() {
return this.getToken(EParser.GETTER, 0);
};
Getter_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Getter_method_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Getter_method_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Getter_method_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Getter_method_declarationContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Getter_method_declarationContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Getter_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterGetter_method_declaration(this);
}
};
Getter_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitGetter_method_declaration(this);
}
};
EParser.prototype.getter_method_declaration = function() {
var localctx = new Getter_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 22, EParser.RULE_getter_method_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 583;
this.match(EParser.DEFINE);
this.state = 584;
localctx.name = this.variable_identifier();
this.state = 585;
this.match(EParser.AS);
this.state = 586;
this.match(EParser.GETTER);
this.state = 587;
this.match(EParser.DOING);
this.state = 588;
this.match(EParser.COLON);
this.state = 589;
this.indent();
this.state = 590;
localctx.stmts = this.statement_list();
this.state = 591;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_getter_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_getter_declaration;
this.name = null; // Variable_identifierContext
this.stmts = null; // Native_statement_listContext
return this;
}
Native_getter_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_getter_declarationContext.prototype.constructor = Native_getter_declarationContext;
Native_getter_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_getter_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_getter_declarationContext.prototype.GETTER = function() {
return this.getToken(EParser.GETTER, 0);
};
Native_getter_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Native_getter_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Native_getter_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Native_getter_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Native_getter_declarationContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Native_getter_declarationContext.prototype.native_statement_list = function() {
return this.getTypedRuleContext(Native_statement_listContext,0);
};
Native_getter_declarationContext.prototype.NATIVE = function() {
return this.getToken(EParser.NATIVE, 0);
};
Native_getter_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_getter_declaration(this);
}
};
Native_getter_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_getter_declaration(this);
}
};
EParser.prototype.native_getter_declaration = function() {
var localctx = new Native_getter_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 24, EParser.RULE_native_getter_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 593;
this.match(EParser.DEFINE);
this.state = 594;
localctx.name = this.variable_identifier();
this.state = 595;
this.match(EParser.AS);
this.state = 597;
_la = this._input.LA(1);
if(_la===EParser.NATIVE) {
this.state = 596;
this.match(EParser.NATIVE);
}
this.state = 599;
this.match(EParser.GETTER);
this.state = 600;
this.match(EParser.DOING);
this.state = 601;
this.match(EParser.COLON);
this.state = 602;
this.indent();
this.state = 603;
localctx.stmts = this.native_statement_list();
this.state = 604;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_category_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_category_declaration;
this.name = null; // Type_identifierContext
this.attrs = null; // Attribute_listContext
this.bindings = null; // Native_category_bindingsContext
this.methods = null; // Native_member_method_declaration_listContext
return this;
}
Native_category_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_category_declarationContext.prototype.constructor = Native_category_declarationContext;
Native_category_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_category_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_category_declarationContext.prototype.NATIVE = function() {
return this.getToken(EParser.NATIVE, 0);
};
Native_category_declarationContext.prototype.CATEGORY = function() {
return this.getToken(EParser.CATEGORY, 0);
};
Native_category_declarationContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
Native_category_declarationContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
Native_category_declarationContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
Native_category_declarationContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Native_category_declarationContext.prototype.native_category_bindings = function() {
return this.getTypedRuleContext(Native_category_bindingsContext,0);
};
Native_category_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Native_category_declarationContext.prototype.BINDINGS = function() {
return this.getToken(EParser.BINDINGS, 0);
};
Native_category_declarationContext.prototype.STORABLE = function() {
return this.getToken(EParser.STORABLE, 0);
};
Native_category_declarationContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
Native_category_declarationContext.prototype.AND = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.AND);
} else {
return this.getToken(EParser.AND, i);
}
};
Native_category_declarationContext.prototype.METHODS = function() {
return this.getToken(EParser.METHODS, 0);
};
Native_category_declarationContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
Native_category_declarationContext.prototype.native_member_method_declaration_list = function() {
return this.getTypedRuleContext(Native_member_method_declaration_listContext,0);
};
Native_category_declarationContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Native_category_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_category_declaration(this);
}
};
Native_category_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_category_declaration(this);
}
};
EParser.prototype.native_category_declaration = function() {
var localctx = new Native_category_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 26, EParser.RULE_native_category_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 606;
this.match(EParser.DEFINE);
this.state = 607;
localctx.name = this.type_identifier();
this.state = 608;
this.match(EParser.AS);
this.state = 610;
_la = this._input.LA(1);
if(_la===EParser.STORABLE) {
this.state = 609;
this.match(EParser.STORABLE);
}
this.state = 612;
this.match(EParser.NATIVE);
this.state = 613;
this.match(EParser.CATEGORY);
this.state = 621;
var la_ = this._interp.adaptivePredict(this._input,19,this._ctx);
switch(la_) {
case 1:
this.state = 614;
localctx.attrs = this.attribute_list();
this.state = 615;
this.match(EParser.COMMA);
this.state = 616;
this.match(EParser.AND);
this.state = 617;
this.match(EParser.BINDINGS);
break;
case 2:
this.state = 619;
this.match(EParser.WITH);
this.state = 620;
this.match(EParser.BINDINGS);
break;
}
this.state = 623;
this.match(EParser.COLON);
this.state = 624;
this.indent();
this.state = 625;
localctx.bindings = this.native_category_bindings();
this.state = 626;
this.dedent();
this.state = 635;
var la_ = this._interp.adaptivePredict(this._input,20,this._ctx);
if(la_===1) {
this.state = 627;
this.lfp();
this.state = 628;
this.match(EParser.AND);
this.state = 629;
this.match(EParser.METHODS);
this.state = 630;
this.match(EParser.COLON);
this.state = 631;
this.indent();
this.state = 632;
localctx.methods = this.native_member_method_declaration_list();
this.state = 633;
this.dedent();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_resource_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_resource_declaration;
this.name = null; // Type_identifierContext
this.attrs = null; // Attribute_listContext
this.bindings = null; // Native_category_bindingsContext
this.methods = null; // Native_member_method_declaration_listContext
return this;
}
Native_resource_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_resource_declarationContext.prototype.constructor = Native_resource_declarationContext;
Native_resource_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_resource_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_resource_declarationContext.prototype.NATIVE = function() {
return this.getToken(EParser.NATIVE, 0);
};
Native_resource_declarationContext.prototype.RESOURCE = function() {
return this.getToken(EParser.RESOURCE, 0);
};
Native_resource_declarationContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
Native_resource_declarationContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
Native_resource_declarationContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
Native_resource_declarationContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Native_resource_declarationContext.prototype.native_category_bindings = function() {
return this.getTypedRuleContext(Native_category_bindingsContext,0);
};
Native_resource_declarationContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Native_resource_declarationContext.prototype.BINDINGS = function() {
return this.getToken(EParser.BINDINGS, 0);
};
Native_resource_declarationContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
Native_resource_declarationContext.prototype.AND = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.AND);
} else {
return this.getToken(EParser.AND, i);
}
};
Native_resource_declarationContext.prototype.METHODS = function() {
return this.getToken(EParser.METHODS, 0);
};
Native_resource_declarationContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
Native_resource_declarationContext.prototype.native_member_method_declaration_list = function() {
return this.getTypedRuleContext(Native_member_method_declaration_listContext,0);
};
Native_resource_declarationContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Native_resource_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_resource_declaration(this);
}
};
Native_resource_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_resource_declaration(this);
}
};
EParser.prototype.native_resource_declaration = function() {
var localctx = new Native_resource_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 28, EParser.RULE_native_resource_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 637;
this.match(EParser.DEFINE);
this.state = 638;
localctx.name = this.type_identifier();
this.state = 639;
this.match(EParser.AS);
this.state = 640;
this.match(EParser.NATIVE);
this.state = 641;
this.match(EParser.RESOURCE);
this.state = 649;
var la_ = this._interp.adaptivePredict(this._input,21,this._ctx);
switch(la_) {
case 1:
this.state = 642;
localctx.attrs = this.attribute_list();
this.state = 643;
this.match(EParser.COMMA);
this.state = 644;
this.match(EParser.AND);
this.state = 645;
this.match(EParser.BINDINGS);
break;
case 2:
this.state = 647;
this.match(EParser.WITH);
this.state = 648;
this.match(EParser.BINDINGS);
break;
}
this.state = 651;
this.match(EParser.COLON);
this.state = 652;
this.indent();
this.state = 653;
localctx.bindings = this.native_category_bindings();
this.state = 654;
this.dedent();
this.state = 663;
var la_ = this._interp.adaptivePredict(this._input,22,this._ctx);
if(la_===1) {
this.state = 655;
this.lfp();
this.state = 656;
this.match(EParser.AND);
this.state = 657;
this.match(EParser.METHODS);
this.state = 658;
this.match(EParser.COLON);
this.state = 659;
this.indent();
this.state = 660;
localctx.methods = this.native_member_method_declaration_list();
this.state = 661;
this.dedent();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_category_bindingsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_category_bindings;
this.items = null; // Native_category_binding_listContext
return this;
}
Native_category_bindingsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_category_bindingsContext.prototype.constructor = Native_category_bindingsContext;
Native_category_bindingsContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_category_bindingsContext.prototype.CATEGORY = function() {
return this.getToken(EParser.CATEGORY, 0);
};
Native_category_bindingsContext.prototype.BINDINGS = function() {
return this.getToken(EParser.BINDINGS, 0);
};
Native_category_bindingsContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_category_bindingsContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Native_category_bindingsContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Native_category_bindingsContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Native_category_bindingsContext.prototype.native_category_binding_list = function() {
return this.getTypedRuleContext(Native_category_binding_listContext,0);
};
Native_category_bindingsContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_category_bindings(this);
}
};
Native_category_bindingsContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_category_bindings(this);
}
};
EParser.prototype.native_category_bindings = function() {
var localctx = new Native_category_bindingsContext(this, this._ctx, this.state);
this.enterRule(localctx, 30, EParser.RULE_native_category_bindings);
try {
this.enterOuterAlt(localctx, 1);
this.state = 665;
this.match(EParser.DEFINE);
this.state = 666;
this.match(EParser.CATEGORY);
this.state = 667;
this.match(EParser.BINDINGS);
this.state = 668;
this.match(EParser.AS);
this.state = 669;
this.match(EParser.COLON);
this.state = 670;
this.indent();
this.state = 671;
localctx.items = this.native_category_binding_list(0);
this.state = 672;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_category_binding_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_category_binding_list;
return this;
}
Native_category_binding_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_category_binding_listContext.prototype.constructor = Native_category_binding_listContext;
Native_category_binding_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function NativeCategoryBindingListItemContext(parser, ctx) {
Native_category_binding_listContext.call(this, parser);
this.items = null; // Native_category_binding_listContext;
this.item = null; // Native_category_bindingContext;
Native_category_binding_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
NativeCategoryBindingListItemContext.prototype = Object.create(Native_category_binding_listContext.prototype);
NativeCategoryBindingListItemContext.prototype.constructor = NativeCategoryBindingListItemContext;
NativeCategoryBindingListItemContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
NativeCategoryBindingListItemContext.prototype.native_category_binding_list = function() {
return this.getTypedRuleContext(Native_category_binding_listContext,0);
};
NativeCategoryBindingListItemContext.prototype.native_category_binding = function() {
return this.getTypedRuleContext(Native_category_bindingContext,0);
};
NativeCategoryBindingListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNativeCategoryBindingListItem(this);
}
};
NativeCategoryBindingListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNativeCategoryBindingListItem(this);
}
};
function NativeCategoryBindingListContext(parser, ctx) {
Native_category_binding_listContext.call(this, parser);
this.item = null; // Native_category_bindingContext;
Native_category_binding_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
NativeCategoryBindingListContext.prototype = Object.create(Native_category_binding_listContext.prototype);
NativeCategoryBindingListContext.prototype.constructor = NativeCategoryBindingListContext;
NativeCategoryBindingListContext.prototype.native_category_binding = function() {
return this.getTypedRuleContext(Native_category_bindingContext,0);
};
NativeCategoryBindingListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNativeCategoryBindingList(this);
}
};
NativeCategoryBindingListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNativeCategoryBindingList(this);
}
};
EParser.prototype.native_category_binding_list = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Native_category_binding_listContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 32;
this.enterRecursionRule(localctx, 32, EParser.RULE_native_category_binding_list, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new NativeCategoryBindingListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 675;
localctx.item = this.native_category_binding();
this._ctx.stop = this._input.LT(-1);
this.state = 683;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,23,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new NativeCategoryBindingListItemContext(this, new Native_category_binding_listContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_native_category_binding_list);
this.state = 677;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 678;
this.lfp();
this.state = 679;
localctx.item = this.native_category_binding();
}
this.state = 685;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,23,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Attribute_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_attribute_list;
return this;
}
Attribute_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Attribute_listContext.prototype.constructor = Attribute_listContext;
Attribute_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function AttributeListContext(parser, ctx) {
Attribute_listContext.call(this, parser);
this.item = null; // Attribute_identifierContext;
Attribute_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
AttributeListContext.prototype = Object.create(Attribute_listContext.prototype);
AttributeListContext.prototype.constructor = AttributeListContext;
AttributeListContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
AttributeListContext.prototype.ATTRIBUTE = function() {
return this.getToken(EParser.ATTRIBUTE, 0);
};
AttributeListContext.prototype.attribute_identifier = function() {
return this.getTypedRuleContext(Attribute_identifierContext,0);
};
AttributeListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAttributeList(this);
}
};
AttributeListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAttributeList(this);
}
};
function AttributeListItemContext(parser, ctx) {
Attribute_listContext.call(this, parser);
this.items = null; // Attribute_identifier_listContext;
this.item = null; // Attribute_identifierContext;
Attribute_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
AttributeListItemContext.prototype = Object.create(Attribute_listContext.prototype);
AttributeListItemContext.prototype.constructor = AttributeListItemContext;
AttributeListItemContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
AttributeListItemContext.prototype.ATTRIBUTES = function() {
return this.getToken(EParser.ATTRIBUTES, 0);
};
AttributeListItemContext.prototype.attribute_identifier_list = function() {
return this.getTypedRuleContext(Attribute_identifier_listContext,0);
};
AttributeListItemContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
AttributeListItemContext.prototype.attribute_identifier = function() {
return this.getTypedRuleContext(Attribute_identifierContext,0);
};
AttributeListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAttributeListItem(this);
}
};
AttributeListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAttributeListItem(this);
}
};
EParser.prototype.attribute_list = function() {
var localctx = new Attribute_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 34, EParser.RULE_attribute_list);
try {
this.state = 696;
var la_ = this._interp.adaptivePredict(this._input,25,this._ctx);
switch(la_) {
case 1:
localctx = new AttributeListContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 686;
this.match(EParser.WITH);
this.state = 687;
this.match(EParser.ATTRIBUTE);
this.state = 688;
localctx.item = this.attribute_identifier();
break;
case 2:
localctx = new AttributeListItemContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 689;
this.match(EParser.WITH);
this.state = 690;
this.match(EParser.ATTRIBUTES);
this.state = 691;
localctx.items = this.attribute_identifier_list();
this.state = 694;
var la_ = this._interp.adaptivePredict(this._input,24,this._ctx);
if(la_===1) {
this.state = 692;
this.match(EParser.AND);
this.state = 693;
localctx.item = this.attribute_identifier();
}
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Abstract_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_abstract_method_declaration;
this.name = null; // Method_identifierContext
this.args = null; // Full_argument_listContext
this.typ = null; // TypedefContext
return this;
}
Abstract_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Abstract_method_declarationContext.prototype.constructor = Abstract_method_declarationContext;
Abstract_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Abstract_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Abstract_method_declarationContext.prototype.ABSTRACT = function() {
return this.getToken(EParser.ABSTRACT, 0);
};
Abstract_method_declarationContext.prototype.METHOD = function() {
return this.getToken(EParser.METHOD, 0);
};
Abstract_method_declarationContext.prototype.method_identifier = function() {
return this.getTypedRuleContext(Method_identifierContext,0);
};
Abstract_method_declarationContext.prototype.RECEIVING = function() {
return this.getToken(EParser.RECEIVING, 0);
};
Abstract_method_declarationContext.prototype.RETURNING = function() {
return this.getToken(EParser.RETURNING, 0);
};
Abstract_method_declarationContext.prototype.full_argument_list = function() {
return this.getTypedRuleContext(Full_argument_listContext,0);
};
Abstract_method_declarationContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
Abstract_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAbstract_method_declaration(this);
}
};
Abstract_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAbstract_method_declaration(this);
}
};
EParser.prototype.abstract_method_declaration = function() {
var localctx = new Abstract_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 36, EParser.RULE_abstract_method_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 698;
this.match(EParser.DEFINE);
this.state = 699;
localctx.name = this.method_identifier();
this.state = 700;
this.match(EParser.AS);
this.state = 701;
this.match(EParser.ABSTRACT);
this.state = 702;
this.match(EParser.METHOD);
this.state = 705;
_la = this._input.LA(1);
if(_la===EParser.RECEIVING) {
this.state = 703;
this.match(EParser.RECEIVING);
this.state = 704;
localctx.args = this.full_argument_list();
}
this.state = 709;
_la = this._input.LA(1);
if(_la===EParser.RETURNING) {
this.state = 707;
this.match(EParser.RETURNING);
this.state = 708;
localctx.typ = this.typedef(0);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Concrete_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_concrete_method_declaration;
this.name = null; // Method_identifierContext
this.args = null; // Full_argument_listContext
this.typ = null; // TypedefContext
this.stmts = null; // Statement_listContext
return this;
}
Concrete_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Concrete_method_declarationContext.prototype.constructor = Concrete_method_declarationContext;
Concrete_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Concrete_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Concrete_method_declarationContext.prototype.METHOD = function() {
return this.getToken(EParser.METHOD, 0);
};
Concrete_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Concrete_method_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Concrete_method_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Concrete_method_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Concrete_method_declarationContext.prototype.method_identifier = function() {
return this.getTypedRuleContext(Method_identifierContext,0);
};
Concrete_method_declarationContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Concrete_method_declarationContext.prototype.RECEIVING = function() {
return this.getToken(EParser.RECEIVING, 0);
};
Concrete_method_declarationContext.prototype.RETURNING = function() {
return this.getToken(EParser.RETURNING, 0);
};
Concrete_method_declarationContext.prototype.full_argument_list = function() {
return this.getTypedRuleContext(Full_argument_listContext,0);
};
Concrete_method_declarationContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
Concrete_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConcrete_method_declaration(this);
}
};
Concrete_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConcrete_method_declaration(this);
}
};
EParser.prototype.concrete_method_declaration = function() {
var localctx = new Concrete_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 38, EParser.RULE_concrete_method_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 711;
this.match(EParser.DEFINE);
this.state = 712;
localctx.name = this.method_identifier();
this.state = 713;
this.match(EParser.AS);
this.state = 714;
this.match(EParser.METHOD);
this.state = 717;
_la = this._input.LA(1);
if(_la===EParser.RECEIVING) {
this.state = 715;
this.match(EParser.RECEIVING);
this.state = 716;
localctx.args = this.full_argument_list();
}
this.state = 721;
_la = this._input.LA(1);
if(_la===EParser.RETURNING) {
this.state = 719;
this.match(EParser.RETURNING);
this.state = 720;
localctx.typ = this.typedef(0);
}
this.state = 723;
this.match(EParser.DOING);
this.state = 724;
this.match(EParser.COLON);
this.state = 725;
this.indent();
this.state = 726;
localctx.stmts = this.statement_list();
this.state = 727;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_method_declaration;
this.name = null; // Method_identifierContext
this.args = null; // Full_argument_listContext
this.typ = null; // Category_or_any_typeContext
this.stmts = null; // Native_statement_listContext
return this;
}
Native_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_method_declarationContext.prototype.constructor = Native_method_declarationContext;
Native_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Native_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Native_method_declarationContext.prototype.METHOD = function() {
return this.getToken(EParser.METHOD, 0);
};
Native_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Native_method_declarationContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Native_method_declarationContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Native_method_declarationContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Native_method_declarationContext.prototype.method_identifier = function() {
return this.getTypedRuleContext(Method_identifierContext,0);
};
Native_method_declarationContext.prototype.native_statement_list = function() {
return this.getTypedRuleContext(Native_statement_listContext,0);
};
Native_method_declarationContext.prototype.NATIVE = function() {
return this.getToken(EParser.NATIVE, 0);
};
Native_method_declarationContext.prototype.RECEIVING = function() {
return this.getToken(EParser.RECEIVING, 0);
};
Native_method_declarationContext.prototype.RETURNING = function() {
return this.getToken(EParser.RETURNING, 0);
};
Native_method_declarationContext.prototype.full_argument_list = function() {
return this.getTypedRuleContext(Full_argument_listContext,0);
};
Native_method_declarationContext.prototype.category_or_any_type = function() {
return this.getTypedRuleContext(Category_or_any_typeContext,0);
};
Native_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_method_declaration(this);
}
};
Native_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_method_declaration(this);
}
};
EParser.prototype.native_method_declaration = function() {
var localctx = new Native_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 40, EParser.RULE_native_method_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 729;
this.match(EParser.DEFINE);
this.state = 730;
localctx.name = this.method_identifier();
this.state = 731;
this.match(EParser.AS);
this.state = 733;
_la = this._input.LA(1);
if(_la===EParser.NATIVE) {
this.state = 732;
this.match(EParser.NATIVE);
}
this.state = 735;
this.match(EParser.METHOD);
this.state = 738;
_la = this._input.LA(1);
if(_la===EParser.RECEIVING) {
this.state = 736;
this.match(EParser.RECEIVING);
this.state = 737;
localctx.args = this.full_argument_list();
}
this.state = 742;
_la = this._input.LA(1);
if(_la===EParser.RETURNING) {
this.state = 740;
this.match(EParser.RETURNING);
this.state = 741;
localctx.typ = this.category_or_any_type();
}
this.state = 744;
this.match(EParser.DOING);
this.state = 745;
this.match(EParser.COLON);
this.state = 746;
this.indent();
this.state = 747;
localctx.stmts = this.native_statement_list();
this.state = 748;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Test_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_test_method_declaration;
this.name = null; // Token
this.stmts = null; // Statement_listContext
this.exps = null; // Assertion_listContext
this.error = null; // Symbol_identifierContext
return this;
}
Test_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Test_method_declarationContext.prototype.constructor = Test_method_declarationContext;
Test_method_declarationContext.prototype.DEFINE = function() {
return this.getToken(EParser.DEFINE, 0);
};
Test_method_declarationContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Test_method_declarationContext.prototype.TEST = function() {
return this.getToken(EParser.TEST, 0);
};
Test_method_declarationContext.prototype.METHOD = function() {
return this.getToken(EParser.METHOD, 0);
};
Test_method_declarationContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Test_method_declarationContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
Test_method_declarationContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
Test_method_declarationContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
Test_method_declarationContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
Test_method_declarationContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Test_method_declarationContext.prototype.VERIFYING = function() {
return this.getToken(EParser.VERIFYING, 0);
};
Test_method_declarationContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
Test_method_declarationContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Test_method_declarationContext.prototype.symbol_identifier = function() {
return this.getTypedRuleContext(Symbol_identifierContext,0);
};
Test_method_declarationContext.prototype.assertion_list = function() {
return this.getTypedRuleContext(Assertion_listContext,0);
};
Test_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTest_method_declaration(this);
}
};
Test_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTest_method_declaration(this);
}
};
EParser.prototype.test_method_declaration = function() {
var localctx = new Test_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 42, EParser.RULE_test_method_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 750;
this.match(EParser.DEFINE);
this.state = 751;
localctx.name = this.match(EParser.TEXT_LITERAL);
this.state = 752;
this.match(EParser.AS);
this.state = 753;
this.match(EParser.TEST);
this.state = 754;
this.match(EParser.METHOD);
this.state = 755;
this.match(EParser.DOING);
this.state = 756;
this.match(EParser.COLON);
this.state = 757;
this.indent();
this.state = 758;
localctx.stmts = this.statement_list();
this.state = 759;
this.dedent();
this.state = 760;
this.lfp();
this.state = 761;
this.match(EParser.AND);
this.state = 762;
this.match(EParser.VERIFYING);
this.state = 769;
switch(this._input.LA(1)) {
case EParser.COLON:
this.state = 763;
this.match(EParser.COLON);
this.state = 764;
this.indent();
this.state = 765;
localctx.exps = this.assertion_list();
this.state = 766;
this.dedent();
break;
case EParser.SYMBOL_IDENTIFIER:
this.state = 768;
localctx.error = this.symbol_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function AssertionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assertion;
this.exp = null; // ExpressionContext
return this;
}
AssertionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
AssertionContext.prototype.constructor = AssertionContext;
AssertionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
AssertionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssertion(this);
}
};
AssertionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssertion(this);
}
};
EParser.prototype.assertion = function() {
var localctx = new AssertionContext(this, this._ctx, this.state);
this.enterRule(localctx, 44, EParser.RULE_assertion);
try {
this.enterOuterAlt(localctx, 1);
this.state = 771;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Full_argument_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_full_argument_list;
this.items = null; // Argument_listContext
this.item = null; // ArgumentContext
return this;
}
Full_argument_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Full_argument_listContext.prototype.constructor = Full_argument_listContext;
Full_argument_listContext.prototype.argument_list = function() {
return this.getTypedRuleContext(Argument_listContext,0);
};
Full_argument_listContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Full_argument_listContext.prototype.argument = function() {
return this.getTypedRuleContext(ArgumentContext,0);
};
Full_argument_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFull_argument_list(this);
}
};
Full_argument_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFull_argument_list(this);
}
};
EParser.prototype.full_argument_list = function() {
var localctx = new Full_argument_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 46, EParser.RULE_full_argument_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 773;
localctx.items = this.argument_list();
this.state = 776;
_la = this._input.LA(1);
if(_la===EParser.AND) {
this.state = 774;
this.match(EParser.AND);
this.state = 775;
localctx.item = this.argument();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Typed_argumentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_typed_argument;
this.typ = null; // Category_or_any_typeContext
this.name = null; // Variable_identifierContext
this.attrs = null; // Attribute_listContext
this.value = null; // Literal_expressionContext
return this;
}
Typed_argumentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Typed_argumentContext.prototype.constructor = Typed_argumentContext;
Typed_argumentContext.prototype.category_or_any_type = function() {
return this.getTypedRuleContext(Category_or_any_typeContext,0);
};
Typed_argumentContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Typed_argumentContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
Typed_argumentContext.prototype.attribute_list = function() {
return this.getTypedRuleContext(Attribute_listContext,0);
};
Typed_argumentContext.prototype.literal_expression = function() {
return this.getTypedRuleContext(Literal_expressionContext,0);
};
Typed_argumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTyped_argument(this);
}
};
Typed_argumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTyped_argument(this);
}
};
EParser.prototype.typed_argument = function() {
var localctx = new Typed_argumentContext(this, this._ctx, this.state);
this.enterRule(localctx, 48, EParser.RULE_typed_argument);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 778;
localctx.typ = this.category_or_any_type();
this.state = 779;
localctx.name = this.variable_identifier();
this.state = 781;
_la = this._input.LA(1);
if(_la===EParser.WITH) {
this.state = 780;
localctx.attrs = this.attribute_list();
}
this.state = 785;
_la = this._input.LA(1);
if(_la===EParser.EQ) {
this.state = 783;
this.match(EParser.EQ);
this.state = 784;
localctx.value = this.literal_expression();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function StatementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_statement;
return this;
}
StatementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
StatementContext.prototype.constructor = StatementContext;
StatementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CommentStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.decl = null; // Comment_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CommentStatementContext.prototype = Object.create(StatementContext.prototype);
CommentStatementContext.prototype.constructor = CommentStatementContext;
CommentStatementContext.prototype.comment_statement = function() {
return this.getTypedRuleContext(Comment_statementContext,0);
};
CommentStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCommentStatement(this);
}
};
CommentStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCommentStatement(this);
}
};
function StoreStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Store_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
StoreStatementContext.prototype = Object.create(StatementContext.prototype);
StoreStatementContext.prototype.constructor = StoreStatementContext;
StoreStatementContext.prototype.store_statement = function() {
return this.getTypedRuleContext(Store_statementContext,0);
};
StoreStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterStoreStatement(this);
}
};
StoreStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitStoreStatement(this);
}
};
function WithSingletonStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // With_singleton_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
WithSingletonStatementContext.prototype = Object.create(StatementContext.prototype);
WithSingletonStatementContext.prototype.constructor = WithSingletonStatementContext;
WithSingletonStatementContext.prototype.with_singleton_statement = function() {
return this.getTypedRuleContext(With_singleton_statementContext,0);
};
WithSingletonStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWithSingletonStatement(this);
}
};
WithSingletonStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWithSingletonStatement(this);
}
};
function WriteStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Write_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
WriteStatementContext.prototype = Object.create(StatementContext.prototype);
WriteStatementContext.prototype.constructor = WriteStatementContext;
WriteStatementContext.prototype.write_statement = function() {
return this.getTypedRuleContext(Write_statementContext,0);
};
WriteStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWriteStatement(this);
}
};
WriteStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWriteStatement(this);
}
};
function WhileStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // While_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
WhileStatementContext.prototype = Object.create(StatementContext.prototype);
WhileStatementContext.prototype.constructor = WhileStatementContext;
WhileStatementContext.prototype.while_statement = function() {
return this.getTypedRuleContext(While_statementContext,0);
};
WhileStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWhileStatement(this);
}
};
WhileStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWhileStatement(this);
}
};
function WithResourceStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // With_resource_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
WithResourceStatementContext.prototype = Object.create(StatementContext.prototype);
WithResourceStatementContext.prototype.constructor = WithResourceStatementContext;
WithResourceStatementContext.prototype.with_resource_statement = function() {
return this.getTypedRuleContext(With_resource_statementContext,0);
};
WithResourceStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWithResourceStatement(this);
}
};
WithResourceStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWithResourceStatement(this);
}
};
function RaiseStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Raise_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
RaiseStatementContext.prototype = Object.create(StatementContext.prototype);
RaiseStatementContext.prototype.constructor = RaiseStatementContext;
RaiseStatementContext.prototype.raise_statement = function() {
return this.getTypedRuleContext(Raise_statementContext,0);
};
RaiseStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRaiseStatement(this);
}
};
RaiseStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRaiseStatement(this);
}
};
function BreakStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Break_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
BreakStatementContext.prototype = Object.create(StatementContext.prototype);
BreakStatementContext.prototype.constructor = BreakStatementContext;
BreakStatementContext.prototype.break_statement = function() {
return this.getTypedRuleContext(Break_statementContext,0);
};
BreakStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBreakStatement(this);
}
};
BreakStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBreakStatement(this);
}
};
function AssignInstanceStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Assign_instance_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
AssignInstanceStatementContext.prototype = Object.create(StatementContext.prototype);
AssignInstanceStatementContext.prototype.constructor = AssignInstanceStatementContext;
AssignInstanceStatementContext.prototype.assign_instance_statement = function() {
return this.getTypedRuleContext(Assign_instance_statementContext,0);
};
AssignInstanceStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssignInstanceStatement(this);
}
};
AssignInstanceStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssignInstanceStatement(this);
}
};
function IfStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // If_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
IfStatementContext.prototype = Object.create(StatementContext.prototype);
IfStatementContext.prototype.constructor = IfStatementContext;
IfStatementContext.prototype.if_statement = function() {
return this.getTypedRuleContext(If_statementContext,0);
};
IfStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIfStatement(this);
}
};
IfStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIfStatement(this);
}
};
function SwitchStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Switch_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
SwitchStatementContext.prototype = Object.create(StatementContext.prototype);
SwitchStatementContext.prototype.constructor = SwitchStatementContext;
SwitchStatementContext.prototype.switch_statement = function() {
return this.getTypedRuleContext(Switch_statementContext,0);
};
SwitchStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSwitchStatement(this);
}
};
SwitchStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSwitchStatement(this);
}
};
function TryStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Try_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
TryStatementContext.prototype = Object.create(StatementContext.prototype);
TryStatementContext.prototype.constructor = TryStatementContext;
TryStatementContext.prototype.try_statement = function() {
return this.getTypedRuleContext(Try_statementContext,0);
};
TryStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTryStatement(this);
}
};
TryStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTryStatement(this);
}
};
function MethodCallStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Method_call_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
MethodCallStatementContext.prototype = Object.create(StatementContext.prototype);
MethodCallStatementContext.prototype.constructor = MethodCallStatementContext;
MethodCallStatementContext.prototype.method_call_statement = function() {
return this.getTypedRuleContext(Method_call_statementContext,0);
};
MethodCallStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMethodCallStatement(this);
}
};
MethodCallStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMethodCallStatement(this);
}
};
function ReturnStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Return_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
ReturnStatementContext.prototype = Object.create(StatementContext.prototype);
ReturnStatementContext.prototype.constructor = ReturnStatementContext;
ReturnStatementContext.prototype.return_statement = function() {
return this.getTypedRuleContext(Return_statementContext,0);
};
ReturnStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterReturnStatement(this);
}
};
ReturnStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitReturnStatement(this);
}
};
function AssignTupleStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Assign_tuple_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
AssignTupleStatementContext.prototype = Object.create(StatementContext.prototype);
AssignTupleStatementContext.prototype.constructor = AssignTupleStatementContext;
AssignTupleStatementContext.prototype.assign_tuple_statement = function() {
return this.getTypedRuleContext(Assign_tuple_statementContext,0);
};
AssignTupleStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssignTupleStatement(this);
}
};
AssignTupleStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssignTupleStatement(this);
}
};
function ClosureStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.decl = null; // Concrete_method_declarationContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
ClosureStatementContext.prototype = Object.create(StatementContext.prototype);
ClosureStatementContext.prototype.constructor = ClosureStatementContext;
ClosureStatementContext.prototype.concrete_method_declaration = function() {
return this.getTypedRuleContext(Concrete_method_declarationContext,0);
};
ClosureStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterClosureStatement(this);
}
};
ClosureStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitClosureStatement(this);
}
};
function FlushStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Flush_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
FlushStatementContext.prototype = Object.create(StatementContext.prototype);
FlushStatementContext.prototype.constructor = FlushStatementContext;
FlushStatementContext.prototype.flush_statement = function() {
return this.getTypedRuleContext(Flush_statementContext,0);
};
FlushStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFlushStatement(this);
}
};
FlushStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFlushStatement(this);
}
};
function DoWhileStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // Do_while_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
DoWhileStatementContext.prototype = Object.create(StatementContext.prototype);
DoWhileStatementContext.prototype.constructor = DoWhileStatementContext;
DoWhileStatementContext.prototype.do_while_statement = function() {
return this.getTypedRuleContext(Do_while_statementContext,0);
};
DoWhileStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDoWhileStatement(this);
}
};
DoWhileStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDoWhileStatement(this);
}
};
function ForEachStatementContext(parser, ctx) {
StatementContext.call(this, parser);
this.stmt = null; // For_each_statementContext;
StatementContext.prototype.copyFrom.call(this, ctx);
return this;
}
ForEachStatementContext.prototype = Object.create(StatementContext.prototype);
ForEachStatementContext.prototype.constructor = ForEachStatementContext;
ForEachStatementContext.prototype.for_each_statement = function() {
return this.getTypedRuleContext(For_each_statementContext,0);
};
ForEachStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterForEachStatement(this);
}
};
ForEachStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitForEachStatement(this);
}
};
EParser.prototype.statement = function() {
var localctx = new StatementContext(this, this._ctx, this.state);
this.enterRule(localctx, 50, EParser.RULE_statement);
try {
this.state = 806;
var la_ = this._interp.adaptivePredict(this._input,37,this._ctx);
switch(la_) {
case 1:
localctx = new AssignInstanceStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 787;
localctx.stmt = this.assign_instance_statement();
break;
case 2:
localctx = new MethodCallStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 788;
localctx.stmt = this.method_call_statement();
break;
case 3:
localctx = new AssignTupleStatementContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 789;
localctx.stmt = this.assign_tuple_statement();
break;
case 4:
localctx = new StoreStatementContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 790;
localctx.stmt = this.store_statement();
break;
case 5:
localctx = new FlushStatementContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 791;
localctx.stmt = this.flush_statement();
break;
case 6:
localctx = new BreakStatementContext(this, localctx);
this.enterOuterAlt(localctx, 6);
this.state = 792;
localctx.stmt = this.break_statement();
break;
case 7:
localctx = new ReturnStatementContext(this, localctx);
this.enterOuterAlt(localctx, 7);
this.state = 793;
localctx.stmt = this.return_statement();
break;
case 8:
localctx = new IfStatementContext(this, localctx);
this.enterOuterAlt(localctx, 8);
this.state = 794;
localctx.stmt = this.if_statement();
break;
case 9:
localctx = new SwitchStatementContext(this, localctx);
this.enterOuterAlt(localctx, 9);
this.state = 795;
localctx.stmt = this.switch_statement();
break;
case 10:
localctx = new ForEachStatementContext(this, localctx);
this.enterOuterAlt(localctx, 10);
this.state = 796;
localctx.stmt = this.for_each_statement();
break;
case 11:
localctx = new WhileStatementContext(this, localctx);
this.enterOuterAlt(localctx, 11);
this.state = 797;
localctx.stmt = this.while_statement();
break;
case 12:
localctx = new DoWhileStatementContext(this, localctx);
this.enterOuterAlt(localctx, 12);
this.state = 798;
localctx.stmt = this.do_while_statement();
break;
case 13:
localctx = new RaiseStatementContext(this, localctx);
this.enterOuterAlt(localctx, 13);
this.state = 799;
localctx.stmt = this.raise_statement();
break;
case 14:
localctx = new TryStatementContext(this, localctx);
this.enterOuterAlt(localctx, 14);
this.state = 800;
localctx.stmt = this.try_statement();
break;
case 15:
localctx = new WriteStatementContext(this, localctx);
this.enterOuterAlt(localctx, 15);
this.state = 801;
localctx.stmt = this.write_statement();
break;
case 16:
localctx = new WithResourceStatementContext(this, localctx);
this.enterOuterAlt(localctx, 16);
this.state = 802;
localctx.stmt = this.with_resource_statement();
break;
case 17:
localctx = new WithSingletonStatementContext(this, localctx);
this.enterOuterAlt(localctx, 17);
this.state = 803;
localctx.stmt = this.with_singleton_statement();
break;
case 18:
localctx = new ClosureStatementContext(this, localctx);
this.enterOuterAlt(localctx, 18);
this.state = 804;
localctx.decl = this.concrete_method_declaration();
break;
case 19:
localctx = new CommentStatementContext(this, localctx);
this.enterOuterAlt(localctx, 19);
this.state = 805;
localctx.decl = this.comment_statement();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Flush_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_flush_statement;
return this;
}
Flush_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Flush_statementContext.prototype.constructor = Flush_statementContext;
Flush_statementContext.prototype.FLUSH = function() {
return this.getToken(EParser.FLUSH, 0);
};
Flush_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFlush_statement(this);
}
};
Flush_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFlush_statement(this);
}
};
EParser.prototype.flush_statement = function() {
var localctx = new Flush_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 52, EParser.RULE_flush_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 808;
this.match(EParser.FLUSH);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Store_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_store_statement;
this.to_del = null; // Expression_listContext
this.to_add = null; // Expression_listContext
return this;
}
Store_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Store_statementContext.prototype.constructor = Store_statementContext;
Store_statementContext.prototype.DELETE = function() {
return this.getToken(EParser.DELETE, 0);
};
Store_statementContext.prototype.expression_list = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Expression_listContext);
} else {
return this.getTypedRuleContext(Expression_listContext,i);
}
};
Store_statementContext.prototype.STORE = function() {
return this.getToken(EParser.STORE, 0);
};
Store_statementContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
Store_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterStore_statement(this);
}
};
Store_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitStore_statement(this);
}
};
EParser.prototype.store_statement = function() {
var localctx = new Store_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 54, EParser.RULE_store_statement);
try {
this.state = 820;
var la_ = this._interp.adaptivePredict(this._input,38,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 810;
this.match(EParser.DELETE);
this.state = 811;
localctx.to_del = this.expression_list();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 812;
this.match(EParser.STORE);
this.state = 813;
localctx.to_add = this.expression_list();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 814;
this.match(EParser.DELETE);
this.state = 815;
localctx.to_del = this.expression_list();
this.state = 816;
this.match(EParser.AND);
this.state = 817;
this.match(EParser.STORE);
this.state = 818;
localctx.to_add = this.expression_list();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Method_call_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_method_call_statement;
return this;
}
Method_call_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Method_call_statementContext.prototype.constructor = Method_call_statementContext;
Method_call_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function InvokeStatementContext(parser, ctx) {
Method_call_statementContext.call(this, parser);
this.exp = null; // Invocation_expressionContext;
Method_call_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
InvokeStatementContext.prototype = Object.create(Method_call_statementContext.prototype);
InvokeStatementContext.prototype.constructor = InvokeStatementContext;
InvokeStatementContext.prototype.invocation_expression = function() {
return this.getTypedRuleContext(Invocation_expressionContext,0);
};
InvokeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInvokeStatement(this);
}
};
InvokeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInvokeStatement(this);
}
};
function UnresolvedWithArgsStatementContext(parser, ctx) {
Method_call_statementContext.call(this, parser);
this.exp = null; // Unresolved_expressionContext;
this.args = null; // Argument_assignment_listContext;
Method_call_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
UnresolvedWithArgsStatementContext.prototype = Object.create(Method_call_statementContext.prototype);
UnresolvedWithArgsStatementContext.prototype.constructor = UnresolvedWithArgsStatementContext;
UnresolvedWithArgsStatementContext.prototype.unresolved_expression = function() {
return this.getTypedRuleContext(Unresolved_expressionContext,0);
};
UnresolvedWithArgsStatementContext.prototype.argument_assignment_list = function() {
return this.getTypedRuleContext(Argument_assignment_listContext,0);
};
UnresolvedWithArgsStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUnresolvedWithArgsStatement(this);
}
};
UnresolvedWithArgsStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUnresolvedWithArgsStatement(this);
}
};
EParser.prototype.method_call_statement = function() {
var localctx = new Method_call_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 56, EParser.RULE_method_call_statement);
try {
this.state = 827;
switch(this._input.LA(1)) {
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
localctx = new UnresolvedWithArgsStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 822;
localctx.exp = this.unresolved_expression(0);
this.state = 824;
var la_ = this._interp.adaptivePredict(this._input,39,this._ctx);
if(la_===1) {
this.state = 823;
localctx.args = this.argument_assignment_list();
}
break;
case EParser.INVOKE:
localctx = new InvokeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 826;
localctx.exp = this.invocation_expression();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function With_resource_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_with_resource_statement;
this.stmt = null; // Assign_variable_statementContext
this.stmts = null; // Statement_listContext
return this;
}
With_resource_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
With_resource_statementContext.prototype.constructor = With_resource_statementContext;
With_resource_statementContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
With_resource_statementContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
With_resource_statementContext.prototype.DO = function() {
return this.getToken(EParser.DO, 0);
};
With_resource_statementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
With_resource_statementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
With_resource_statementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
With_resource_statementContext.prototype.assign_variable_statement = function() {
return this.getTypedRuleContext(Assign_variable_statementContext,0);
};
With_resource_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
With_resource_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWith_resource_statement(this);
}
};
With_resource_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWith_resource_statement(this);
}
};
EParser.prototype.with_resource_statement = function() {
var localctx = new With_resource_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 58, EParser.RULE_with_resource_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 829;
this.match(EParser.WITH);
this.state = 830;
localctx.stmt = this.assign_variable_statement();
this.state = 831;
this.match(EParser.COMMA);
this.state = 832;
this.match(EParser.DO);
this.state = 833;
this.match(EParser.COLON);
this.state = 834;
this.indent();
this.state = 835;
localctx.stmts = this.statement_list();
this.state = 836;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function With_singleton_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_with_singleton_statement;
this.typ = null; // Type_identifierContext
this.stmts = null; // Statement_listContext
return this;
}
With_singleton_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
With_singleton_statementContext.prototype.constructor = With_singleton_statementContext;
With_singleton_statementContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
With_singleton_statementContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
With_singleton_statementContext.prototype.DO = function() {
return this.getToken(EParser.DO, 0);
};
With_singleton_statementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
With_singleton_statementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
With_singleton_statementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
With_singleton_statementContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
With_singleton_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
With_singleton_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWith_singleton_statement(this);
}
};
With_singleton_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWith_singleton_statement(this);
}
};
EParser.prototype.with_singleton_statement = function() {
var localctx = new With_singleton_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 60, EParser.RULE_with_singleton_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 838;
this.match(EParser.WITH);
this.state = 839;
localctx.typ = this.type_identifier();
this.state = 840;
this.match(EParser.COMMA);
this.state = 841;
this.match(EParser.DO);
this.state = 842;
this.match(EParser.COLON);
this.state = 843;
this.indent();
this.state = 844;
localctx.stmts = this.statement_list();
this.state = 845;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Switch_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_switch_statement;
this.exp = null; // ExpressionContext
this.cases = null; // Switch_case_statement_listContext
this.stmts = null; // Statement_listContext
return this;
}
Switch_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Switch_statementContext.prototype.constructor = Switch_statementContext;
Switch_statementContext.prototype.SWITCH = function() {
return this.getToken(EParser.SWITCH, 0);
};
Switch_statementContext.prototype.ON = function() {
return this.getToken(EParser.ON, 0);
};
Switch_statementContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
Switch_statementContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
Switch_statementContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
Switch_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Switch_statementContext.prototype.switch_case_statement_list = function() {
return this.getTypedRuleContext(Switch_case_statement_listContext,0);
};
Switch_statementContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
Switch_statementContext.prototype.OTHERWISE = function() {
return this.getToken(EParser.OTHERWISE, 0);
};
Switch_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Switch_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSwitch_statement(this);
}
};
Switch_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSwitch_statement(this);
}
};
EParser.prototype.switch_statement = function() {
var localctx = new Switch_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 62, EParser.RULE_switch_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 847;
this.match(EParser.SWITCH);
this.state = 848;
this.match(EParser.ON);
this.state = 849;
localctx.exp = this.expression(0);
this.state = 850;
this.match(EParser.COLON);
this.state = 851;
this.indent();
this.state = 852;
localctx.cases = this.switch_case_statement_list();
this.state = 860;
var la_ = this._interp.adaptivePredict(this._input,41,this._ctx);
if(la_===1) {
this.state = 853;
this.lfp();
this.state = 854;
this.match(EParser.OTHERWISE);
this.state = 855;
this.match(EParser.COLON);
this.state = 856;
this.indent();
this.state = 857;
localctx.stmts = this.statement_list();
this.state = 858;
this.dedent();
}
this.state = 862;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Switch_case_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_switch_case_statement;
return this;
}
Switch_case_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Switch_case_statementContext.prototype.constructor = Switch_case_statementContext;
Switch_case_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function AtomicSwitchCaseContext(parser, ctx) {
Switch_case_statementContext.call(this, parser);
this.exp = null; // Atomic_literalContext;
this.stmts = null; // Statement_listContext;
Switch_case_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
AtomicSwitchCaseContext.prototype = Object.create(Switch_case_statementContext.prototype);
AtomicSwitchCaseContext.prototype.constructor = AtomicSwitchCaseContext;
AtomicSwitchCaseContext.prototype.WHEN = function() {
return this.getToken(EParser.WHEN, 0);
};
AtomicSwitchCaseContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
AtomicSwitchCaseContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
AtomicSwitchCaseContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
AtomicSwitchCaseContext.prototype.atomic_literal = function() {
return this.getTypedRuleContext(Atomic_literalContext,0);
};
AtomicSwitchCaseContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
AtomicSwitchCaseContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAtomicSwitchCase(this);
}
};
AtomicSwitchCaseContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAtomicSwitchCase(this);
}
};
function CollectionSwitchCaseContext(parser, ctx) {
Switch_case_statementContext.call(this, parser);
this.exp = null; // Literal_collectionContext;
this.stmts = null; // Statement_listContext;
Switch_case_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CollectionSwitchCaseContext.prototype = Object.create(Switch_case_statementContext.prototype);
CollectionSwitchCaseContext.prototype.constructor = CollectionSwitchCaseContext;
CollectionSwitchCaseContext.prototype.WHEN = function() {
return this.getToken(EParser.WHEN, 0);
};
CollectionSwitchCaseContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
CollectionSwitchCaseContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
CollectionSwitchCaseContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
CollectionSwitchCaseContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
CollectionSwitchCaseContext.prototype.literal_collection = function() {
return this.getTypedRuleContext(Literal_collectionContext,0);
};
CollectionSwitchCaseContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
CollectionSwitchCaseContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCollectionSwitchCase(this);
}
};
CollectionSwitchCaseContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCollectionSwitchCase(this);
}
};
EParser.prototype.switch_case_statement = function() {
var localctx = new Switch_case_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 64, EParser.RULE_switch_case_statement);
try {
this.state = 879;
var la_ = this._interp.adaptivePredict(this._input,42,this._ctx);
switch(la_) {
case 1:
localctx = new AtomicSwitchCaseContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 864;
this.match(EParser.WHEN);
this.state = 865;
localctx.exp = this.atomic_literal();
this.state = 866;
this.match(EParser.COLON);
this.state = 867;
this.indent();
this.state = 868;
localctx.stmts = this.statement_list();
this.state = 869;
this.dedent();
break;
case 2:
localctx = new CollectionSwitchCaseContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 871;
this.match(EParser.WHEN);
this.state = 872;
this.match(EParser.IN);
this.state = 873;
localctx.exp = this.literal_collection();
this.state = 874;
this.match(EParser.COLON);
this.state = 875;
this.indent();
this.state = 876;
localctx.stmts = this.statement_list();
this.state = 877;
this.dedent();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function For_each_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_for_each_statement;
this.name1 = null; // Variable_identifierContext
this.name2 = null; // Variable_identifierContext
this.source = null; // ExpressionContext
this.stmts = null; // Statement_listContext
return this;
}
For_each_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
For_each_statementContext.prototype.constructor = For_each_statementContext;
For_each_statementContext.prototype.FOR = function() {
return this.getToken(EParser.FOR, 0);
};
For_each_statementContext.prototype.EACH = function() {
return this.getToken(EParser.EACH, 0);
};
For_each_statementContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
For_each_statementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
For_each_statementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
For_each_statementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
For_each_statementContext.prototype.variable_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Variable_identifierContext);
} else {
return this.getTypedRuleContext(Variable_identifierContext,i);
}
};
For_each_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
For_each_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
For_each_statementContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
For_each_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFor_each_statement(this);
}
};
For_each_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFor_each_statement(this);
}
};
EParser.prototype.for_each_statement = function() {
var localctx = new For_each_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 66, EParser.RULE_for_each_statement);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 881;
this.match(EParser.FOR);
this.state = 882;
this.match(EParser.EACH);
this.state = 883;
localctx.name1 = this.variable_identifier();
this.state = 886;
_la = this._input.LA(1);
if(_la===EParser.COMMA) {
this.state = 884;
this.match(EParser.COMMA);
this.state = 885;
localctx.name2 = this.variable_identifier();
}
this.state = 888;
this.match(EParser.IN);
this.state = 889;
localctx.source = this.expression(0);
this.state = 890;
this.match(EParser.COLON);
this.state = 891;
this.indent();
this.state = 892;
localctx.stmts = this.statement_list();
this.state = 893;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Do_while_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_do_while_statement;
this.stmts = null; // Statement_listContext
this.exp = null; // ExpressionContext
return this;
}
Do_while_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Do_while_statementContext.prototype.constructor = Do_while_statementContext;
Do_while_statementContext.prototype.DO = function() {
return this.getToken(EParser.DO, 0);
};
Do_while_statementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Do_while_statementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
Do_while_statementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
Do_while_statementContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
Do_while_statementContext.prototype.WHILE = function() {
return this.getToken(EParser.WHILE, 0);
};
Do_while_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
Do_while_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Do_while_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDo_while_statement(this);
}
};
Do_while_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDo_while_statement(this);
}
};
EParser.prototype.do_while_statement = function() {
var localctx = new Do_while_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 68, EParser.RULE_do_while_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 895;
this.match(EParser.DO);
this.state = 896;
this.match(EParser.COLON);
this.state = 897;
this.indent();
this.state = 898;
localctx.stmts = this.statement_list();
this.state = 899;
this.dedent();
this.state = 900;
this.lfp();
this.state = 901;
this.match(EParser.WHILE);
this.state = 902;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function While_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_while_statement;
this.exp = null; // ExpressionContext
this.stmts = null; // Statement_listContext
return this;
}
While_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
While_statementContext.prototype.constructor = While_statementContext;
While_statementContext.prototype.WHILE = function() {
return this.getToken(EParser.WHILE, 0);
};
While_statementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
While_statementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
While_statementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
While_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
While_statementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
While_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWhile_statement(this);
}
};
While_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWhile_statement(this);
}
};
EParser.prototype.while_statement = function() {
var localctx = new While_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 70, EParser.RULE_while_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 904;
this.match(EParser.WHILE);
this.state = 905;
localctx.exp = this.expression(0);
this.state = 906;
this.match(EParser.COLON);
this.state = 907;
this.indent();
this.state = 908;
localctx.stmts = this.statement_list();
this.state = 909;
this.dedent();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function If_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_if_statement;
this.exp = null; // ExpressionContext
this.stmts = null; // Statement_listContext
this.elseIfs = null; // Else_if_statement_listContext
this.elseStmts = null; // Statement_listContext
return this;
}
If_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
If_statementContext.prototype.constructor = If_statementContext;
If_statementContext.prototype.IF = function() {
return this.getToken(EParser.IF, 0);
};
If_statementContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
If_statementContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
If_statementContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
If_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
If_statementContext.prototype.statement_list = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Statement_listContext);
} else {
return this.getTypedRuleContext(Statement_listContext,i);
}
};
If_statementContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
If_statementContext.prototype.ELSE = function() {
return this.getToken(EParser.ELSE, 0);
};
If_statementContext.prototype.else_if_statement_list = function() {
return this.getTypedRuleContext(Else_if_statement_listContext,0);
};
If_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIf_statement(this);
}
};
If_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIf_statement(this);
}
};
EParser.prototype.if_statement = function() {
var localctx = new If_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 72, EParser.RULE_if_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 911;
this.match(EParser.IF);
this.state = 912;
localctx.exp = this.expression(0);
this.state = 913;
this.match(EParser.COLON);
this.state = 914;
this.indent();
this.state = 915;
localctx.stmts = this.statement_list();
this.state = 916;
this.dedent();
this.state = 920;
var la_ = this._interp.adaptivePredict(this._input,44,this._ctx);
if(la_===1) {
this.state = 917;
this.lfp();
this.state = 918;
localctx.elseIfs = this.else_if_statement_list(0);
}
this.state = 929;
var la_ = this._interp.adaptivePredict(this._input,45,this._ctx);
if(la_===1) {
this.state = 922;
this.lfp();
this.state = 923;
this.match(EParser.ELSE);
this.state = 924;
this.match(EParser.COLON);
this.state = 925;
this.indent();
this.state = 926;
localctx.elseStmts = this.statement_list();
this.state = 927;
this.dedent();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Else_if_statement_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_else_if_statement_list;
return this;
}
Else_if_statement_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Else_if_statement_listContext.prototype.constructor = Else_if_statement_listContext;
Else_if_statement_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ElseIfStatementListContext(parser, ctx) {
Else_if_statement_listContext.call(this, parser);
this.exp = null; // ExpressionContext;
this.stmts = null; // Statement_listContext;
Else_if_statement_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ElseIfStatementListContext.prototype = Object.create(Else_if_statement_listContext.prototype);
ElseIfStatementListContext.prototype.constructor = ElseIfStatementListContext;
ElseIfStatementListContext.prototype.ELSE = function() {
return this.getToken(EParser.ELSE, 0);
};
ElseIfStatementListContext.prototype.IF = function() {
return this.getToken(EParser.IF, 0);
};
ElseIfStatementListContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
ElseIfStatementListContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
ElseIfStatementListContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
ElseIfStatementListContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ElseIfStatementListContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
ElseIfStatementListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterElseIfStatementList(this);
}
};
ElseIfStatementListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitElseIfStatementList(this);
}
};
function ElseIfStatementListItemContext(parser, ctx) {
Else_if_statement_listContext.call(this, parser);
this.items = null; // Else_if_statement_listContext;
this.exp = null; // ExpressionContext;
this.stmts = null; // Statement_listContext;
Else_if_statement_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ElseIfStatementListItemContext.prototype = Object.create(Else_if_statement_listContext.prototype);
ElseIfStatementListItemContext.prototype.constructor = ElseIfStatementListItemContext;
ElseIfStatementListItemContext.prototype.lfp = function() {
return this.getTypedRuleContext(LfpContext,0);
};
ElseIfStatementListItemContext.prototype.ELSE = function() {
return this.getToken(EParser.ELSE, 0);
};
ElseIfStatementListItemContext.prototype.IF = function() {
return this.getToken(EParser.IF, 0);
};
ElseIfStatementListItemContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
ElseIfStatementListItemContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
ElseIfStatementListItemContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
ElseIfStatementListItemContext.prototype.else_if_statement_list = function() {
return this.getTypedRuleContext(Else_if_statement_listContext,0);
};
ElseIfStatementListItemContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ElseIfStatementListItemContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
ElseIfStatementListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterElseIfStatementListItem(this);
}
};
ElseIfStatementListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitElseIfStatementListItem(this);
}
};
EParser.prototype.else_if_statement_list = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Else_if_statement_listContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 74;
this.enterRecursionRule(localctx, 74, EParser.RULE_else_if_statement_list, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new ElseIfStatementListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 932;
this.match(EParser.ELSE);
this.state = 933;
this.match(EParser.IF);
this.state = 934;
localctx.exp = this.expression(0);
this.state = 935;
this.match(EParser.COLON);
this.state = 936;
this.indent();
this.state = 937;
localctx.stmts = this.statement_list();
this.state = 938;
this.dedent();
this._ctx.stop = this._input.LT(-1);
this.state = 952;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,46,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new ElseIfStatementListItemContext(this, new Else_if_statement_listContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_else_if_statement_list);
this.state = 940;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 941;
this.lfp();
this.state = 942;
this.match(EParser.ELSE);
this.state = 943;
this.match(EParser.IF);
this.state = 944;
localctx.exp = this.expression(0);
this.state = 945;
this.match(EParser.COLON);
this.state = 946;
this.indent();
this.state = 947;
localctx.stmts = this.statement_list();
this.state = 948;
this.dedent();
}
this.state = 954;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,46,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Raise_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_raise_statement;
this.exp = null; // ExpressionContext
return this;
}
Raise_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Raise_statementContext.prototype.constructor = Raise_statementContext;
Raise_statementContext.prototype.RAISE = function() {
return this.getToken(EParser.RAISE, 0);
};
Raise_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Raise_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRaise_statement(this);
}
};
Raise_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRaise_statement(this);
}
};
EParser.prototype.raise_statement = function() {
var localctx = new Raise_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 76, EParser.RULE_raise_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 955;
this.match(EParser.RAISE);
this.state = 956;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Try_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_try_statement;
this.name = null; // Variable_identifierContext
this.stmts = null; // Statement_listContext
this.handlers = null; // Catch_statement_listContext
this.anyStmts = null; // Statement_listContext
this.finalStmts = null; // Statement_listContext
return this;
}
Try_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Try_statementContext.prototype.constructor = Try_statementContext;
Try_statementContext.prototype.SWITCH = function() {
return this.getToken(EParser.SWITCH, 0);
};
Try_statementContext.prototype.ON = function() {
return this.getToken(EParser.ON, 0);
};
Try_statementContext.prototype.DOING = function() {
return this.getToken(EParser.DOING, 0);
};
Try_statementContext.prototype.COLON = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COLON);
} else {
return this.getToken(EParser.COLON, i);
}
};
Try_statementContext.prototype.indent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IndentContext);
} else {
return this.getTypedRuleContext(IndentContext,i);
}
};
Try_statementContext.prototype.dedent = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DedentContext);
} else {
return this.getTypedRuleContext(DedentContext,i);
}
};
Try_statementContext.prototype.lfs = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfsContext);
} else {
return this.getTypedRuleContext(LfsContext,i);
}
};
Try_statementContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Try_statementContext.prototype.statement_list = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Statement_listContext);
} else {
return this.getTypedRuleContext(Statement_listContext,i);
}
};
Try_statementContext.prototype.ALWAYS = function() {
return this.getToken(EParser.ALWAYS, 0);
};
Try_statementContext.prototype.catch_statement_list = function() {
return this.getTypedRuleContext(Catch_statement_listContext,0);
};
Try_statementContext.prototype.OTHERWISE = function() {
return this.getToken(EParser.OTHERWISE, 0);
};
Try_statementContext.prototype.WHEN = function() {
return this.getToken(EParser.WHEN, 0);
};
Try_statementContext.prototype.ANY = function() {
return this.getToken(EParser.ANY, 0);
};
Try_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTry_statement(this);
}
};
Try_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTry_statement(this);
}
};
EParser.prototype.try_statement = function() {
var localctx = new Try_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 78, EParser.RULE_try_statement);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 958;
this.match(EParser.SWITCH);
this.state = 959;
this.match(EParser.ON);
this.state = 960;
localctx.name = this.variable_identifier();
this.state = 961;
this.match(EParser.DOING);
this.state = 962;
this.match(EParser.COLON);
this.state = 963;
this.indent();
this.state = 964;
localctx.stmts = this.statement_list();
this.state = 965;
this.dedent();
this.state = 966;
this.lfs();
this.state = 968;
var la_ = this._interp.adaptivePredict(this._input,47,this._ctx);
if(la_===1) {
this.state = 967;
localctx.handlers = this.catch_statement_list();
}
this.state = 981;
_la = this._input.LA(1);
if(_la===EParser.OTHERWISE || _la===EParser.WHEN) {
this.state = 973;
switch(this._input.LA(1)) {
case EParser.OTHERWISE:
this.state = 970;
this.match(EParser.OTHERWISE);
break;
case EParser.WHEN:
this.state = 971;
this.match(EParser.WHEN);
this.state = 972;
this.match(EParser.ANY);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 975;
this.match(EParser.COLON);
this.state = 976;
this.indent();
this.state = 977;
localctx.anyStmts = this.statement_list();
this.state = 978;
this.dedent();
this.state = 979;
this.lfs();
}
this.state = 990;
_la = this._input.LA(1);
if(_la===EParser.ALWAYS) {
this.state = 983;
this.match(EParser.ALWAYS);
this.state = 984;
this.match(EParser.COLON);
this.state = 985;
this.indent();
this.state = 986;
localctx.finalStmts = this.statement_list();
this.state = 987;
this.dedent();
this.state = 988;
this.lfs();
}
this.state = 992;
this.lfs();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Catch_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_catch_statement;
return this;
}
Catch_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Catch_statementContext.prototype.constructor = Catch_statementContext;
Catch_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CatchAtomicStatementContext(parser, ctx) {
Catch_statementContext.call(this, parser);
this.name = null; // Symbol_identifierContext;
this.stmts = null; // Statement_listContext;
Catch_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CatchAtomicStatementContext.prototype = Object.create(Catch_statementContext.prototype);
CatchAtomicStatementContext.prototype.constructor = CatchAtomicStatementContext;
CatchAtomicStatementContext.prototype.WHEN = function() {
return this.getToken(EParser.WHEN, 0);
};
CatchAtomicStatementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
CatchAtomicStatementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
CatchAtomicStatementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
CatchAtomicStatementContext.prototype.lfs = function() {
return this.getTypedRuleContext(LfsContext,0);
};
CatchAtomicStatementContext.prototype.symbol_identifier = function() {
return this.getTypedRuleContext(Symbol_identifierContext,0);
};
CatchAtomicStatementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
CatchAtomicStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCatchAtomicStatement(this);
}
};
CatchAtomicStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCatchAtomicStatement(this);
}
};
function CatchCollectionStatementContext(parser, ctx) {
Catch_statementContext.call(this, parser);
this.exp = null; // Symbol_listContext;
this.stmts = null; // Statement_listContext;
Catch_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CatchCollectionStatementContext.prototype = Object.create(Catch_statementContext.prototype);
CatchCollectionStatementContext.prototype.constructor = CatchCollectionStatementContext;
CatchCollectionStatementContext.prototype.WHEN = function() {
return this.getToken(EParser.WHEN, 0);
};
CatchCollectionStatementContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
CatchCollectionStatementContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
CatchCollectionStatementContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
CatchCollectionStatementContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
CatchCollectionStatementContext.prototype.indent = function() {
return this.getTypedRuleContext(IndentContext,0);
};
CatchCollectionStatementContext.prototype.dedent = function() {
return this.getTypedRuleContext(DedentContext,0);
};
CatchCollectionStatementContext.prototype.lfs = function() {
return this.getTypedRuleContext(LfsContext,0);
};
CatchCollectionStatementContext.prototype.symbol_list = function() {
return this.getTypedRuleContext(Symbol_listContext,0);
};
CatchCollectionStatementContext.prototype.statement_list = function() {
return this.getTypedRuleContext(Statement_listContext,0);
};
CatchCollectionStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCatchCollectionStatement(this);
}
};
CatchCollectionStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCatchCollectionStatement(this);
}
};
EParser.prototype.catch_statement = function() {
var localctx = new Catch_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 80, EParser.RULE_catch_statement);
try {
this.state = 1013;
var la_ = this._interp.adaptivePredict(this._input,51,this._ctx);
switch(la_) {
case 1:
localctx = new CatchAtomicStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 994;
this.match(EParser.WHEN);
this.state = 995;
localctx.name = this.symbol_identifier();
this.state = 996;
this.match(EParser.COLON);
this.state = 997;
this.indent();
this.state = 998;
localctx.stmts = this.statement_list();
this.state = 999;
this.dedent();
this.state = 1000;
this.lfs();
break;
case 2:
localctx = new CatchCollectionStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1002;
this.match(EParser.WHEN);
this.state = 1003;
this.match(EParser.IN);
this.state = 1004;
this.match(EParser.LBRAK);
this.state = 1005;
localctx.exp = this.symbol_list();
this.state = 1006;
this.match(EParser.RBRAK);
this.state = 1007;
this.match(EParser.COLON);
this.state = 1008;
this.indent();
this.state = 1009;
localctx.stmts = this.statement_list();
this.state = 1010;
this.dedent();
this.state = 1011;
this.lfs();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Break_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_break_statement;
return this;
}
Break_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Break_statementContext.prototype.constructor = Break_statementContext;
Break_statementContext.prototype.BREAK = function() {
return this.getToken(EParser.BREAK, 0);
};
Break_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBreak_statement(this);
}
};
Break_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBreak_statement(this);
}
};
EParser.prototype.break_statement = function() {
var localctx = new Break_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 82, EParser.RULE_break_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1015;
this.match(EParser.BREAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Return_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_return_statement;
this.exp = null; // ExpressionContext
return this;
}
Return_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Return_statementContext.prototype.constructor = Return_statementContext;
Return_statementContext.prototype.RETURN = function() {
return this.getToken(EParser.RETURN, 0);
};
Return_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Return_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterReturn_statement(this);
}
};
Return_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitReturn_statement(this);
}
};
EParser.prototype.return_statement = function() {
var localctx = new Return_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 84, EParser.RULE_return_statement);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1017;
this.match(EParser.RETURN);
this.state = 1019;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1018;
localctx.exp = this.expression(0);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function ExpressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_expression;
return this;
}
ExpressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ExpressionContext.prototype.constructor = ExpressionContext;
ExpressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function IntDivideExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IntDivideExpressionContext.prototype = Object.create(ExpressionContext.prototype);
IntDivideExpressionContext.prototype.constructor = IntDivideExpressionContext;
IntDivideExpressionContext.prototype.idivide = function() {
return this.getTypedRuleContext(IdivideContext,0);
};
IntDivideExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
IntDivideExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIntDivideExpression(this);
}
};
IntDivideExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIntDivideExpression(this);
}
};
function TernaryExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.ifTrue = null; // ExpressionContext;
this.test = null; // ExpressionContext;
this.ifFalse = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
TernaryExpressionContext.prototype = Object.create(ExpressionContext.prototype);
TernaryExpressionContext.prototype.constructor = TernaryExpressionContext;
TernaryExpressionContext.prototype.IF = function() {
return this.getToken(EParser.IF, 0);
};
TernaryExpressionContext.prototype.ELSE = function() {
return this.getToken(EParser.ELSE, 0);
};
TernaryExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
TernaryExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTernaryExpression(this);
}
};
TernaryExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTernaryExpression(this);
}
};
function FetchStoreExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Fetch_store_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
FetchStoreExpressionContext.prototype = Object.create(ExpressionContext.prototype);
FetchStoreExpressionContext.prototype.constructor = FetchStoreExpressionContext;
FetchStoreExpressionContext.prototype.fetch_store_expression = function() {
return this.getTypedRuleContext(Fetch_store_expressionContext,0);
};
FetchStoreExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFetchStoreExpression(this);
}
};
FetchStoreExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFetchStoreExpression(this);
}
};
function ContainsAllExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ContainsAllExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ContainsAllExpressionContext.prototype.constructor = ContainsAllExpressionContext;
ContainsAllExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
ContainsAllExpressionContext.prototype.ALL = function() {
return this.getToken(EParser.ALL, 0);
};
ContainsAllExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
ContainsAllExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterContainsAllExpression(this);
}
};
ContainsAllExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitContainsAllExpression(this);
}
};
function NotEqualsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotEqualsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotEqualsExpressionContext.prototype.constructor = NotEqualsExpressionContext;
NotEqualsExpressionContext.prototype.LTGT = function() {
return this.getToken(EParser.LTGT, 0);
};
NotEqualsExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
NotEqualsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotEqualsExpression(this);
}
};
NotEqualsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotEqualsExpression(this);
}
};
function InExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
InExpressionContext.prototype = Object.create(ExpressionContext.prototype);
InExpressionContext.prototype.constructor = InExpressionContext;
InExpressionContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
InExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
InExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInExpression(this);
}
};
InExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInExpression(this);
}
};
function DocumentExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Document_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
DocumentExpressionContext.prototype = Object.create(ExpressionContext.prototype);
DocumentExpressionContext.prototype.constructor = DocumentExpressionContext;
DocumentExpressionContext.prototype.document_expression = function() {
return this.getTypedRuleContext(Document_expressionContext,0);
};
DocumentExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDocumentExpression(this);
}
};
DocumentExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDocumentExpression(this);
}
};
function NotExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotExpressionContext.prototype.constructor = NotExpressionContext;
NotExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
NotExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
NotExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotExpression(this);
}
};
NotExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotExpression(this);
}
};
function GreaterThanExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
GreaterThanExpressionContext.prototype = Object.create(ExpressionContext.prototype);
GreaterThanExpressionContext.prototype.constructor = GreaterThanExpressionContext;
GreaterThanExpressionContext.prototype.GT = function() {
return this.getToken(EParser.GT, 0);
};
GreaterThanExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
GreaterThanExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterGreaterThanExpression(this);
}
};
GreaterThanExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitGreaterThanExpression(this);
}
};
function InvocationExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Invocation_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
InvocationExpressionContext.prototype = Object.create(ExpressionContext.prototype);
InvocationExpressionContext.prototype.constructor = InvocationExpressionContext;
InvocationExpressionContext.prototype.invocation_expression = function() {
return this.getTypedRuleContext(Invocation_expressionContext,0);
};
InvocationExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInvocationExpression(this);
}
};
InvocationExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInvocationExpression(this);
}
};
function OrExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
OrExpressionContext.prototype = Object.create(ExpressionContext.prototype);
OrExpressionContext.prototype.constructor = OrExpressionContext;
OrExpressionContext.prototype.OR = function() {
return this.getToken(EParser.OR, 0);
};
OrExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
OrExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOrExpression(this);
}
};
OrExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOrExpression(this);
}
};
function CodeExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CodeExpressionContext.prototype = Object.create(ExpressionContext.prototype);
CodeExpressionContext.prototype.constructor = CodeExpressionContext;
CodeExpressionContext.prototype.CODE = function() {
return this.getToken(EParser.CODE, 0);
};
CodeExpressionContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
CodeExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
CodeExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCodeExpression(this);
}
};
CodeExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCodeExpression(this);
}
};
function AmbiguousExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Ambiguous_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
AmbiguousExpressionContext.prototype = Object.create(ExpressionContext.prototype);
AmbiguousExpressionContext.prototype.constructor = AmbiguousExpressionContext;
AmbiguousExpressionContext.prototype.ambiguous_expression = function() {
return this.getTypedRuleContext(Ambiguous_expressionContext,0);
};
AmbiguousExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAmbiguousExpression(this);
}
};
AmbiguousExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAmbiguousExpression(this);
}
};
function LessThanOrEqualExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LessThanOrEqualExpressionContext.prototype = Object.create(ExpressionContext.prototype);
LessThanOrEqualExpressionContext.prototype.constructor = LessThanOrEqualExpressionContext;
LessThanOrEqualExpressionContext.prototype.LTE = function() {
return this.getToken(EParser.LTE, 0);
};
LessThanOrEqualExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
LessThanOrEqualExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLessThanOrEqualExpression(this);
}
};
LessThanOrEqualExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLessThanOrEqualExpression(this);
}
};
function ReadOneExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Read_one_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ReadOneExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ReadOneExpressionContext.prototype.constructor = ReadOneExpressionContext;
ReadOneExpressionContext.prototype.read_one_expression = function() {
return this.getTypedRuleContext(Read_one_expressionContext,0);
};
ReadOneExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterReadOneExpression(this);
}
};
ReadOneExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitReadOneExpression(this);
}
};
function AndExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
AndExpressionContext.prototype = Object.create(ExpressionContext.prototype);
AndExpressionContext.prototype.constructor = AndExpressionContext;
AndExpressionContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
AndExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
AndExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAndExpression(this);
}
};
AndExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAndExpression(this);
}
};
function MethodCallExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Unresolved_expressionContext;
this.args = null; // Argument_assignment_listContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
MethodCallExpressionContext.prototype = Object.create(ExpressionContext.prototype);
MethodCallExpressionContext.prototype.constructor = MethodCallExpressionContext;
MethodCallExpressionContext.prototype.unresolved_expression = function() {
return this.getTypedRuleContext(Unresolved_expressionContext,0);
};
MethodCallExpressionContext.prototype.argument_assignment_list = function() {
return this.getTypedRuleContext(Argument_assignment_listContext,0);
};
MethodCallExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMethodCallExpression(this);
}
};
MethodCallExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMethodCallExpression(this);
}
};
function ClosureExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.name = null; // Method_identifierContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ClosureExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ClosureExpressionContext.prototype.constructor = ClosureExpressionContext;
ClosureExpressionContext.prototype.METHOD_T = function() {
return this.getToken(EParser.METHOD_T, 0);
};
ClosureExpressionContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
ClosureExpressionContext.prototype.method_identifier = function() {
return this.getTypedRuleContext(Method_identifierContext,0);
};
ClosureExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterClosureExpression(this);
}
};
ClosureExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitClosureExpression(this);
}
};
function SortedExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Sorted_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
SortedExpressionContext.prototype = Object.create(ExpressionContext.prototype);
SortedExpressionContext.prototype.constructor = SortedExpressionContext;
SortedExpressionContext.prototype.sorted_expression = function() {
return this.getTypedRuleContext(Sorted_expressionContext,0);
};
SortedExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSortedExpression(this);
}
};
SortedExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSortedExpression(this);
}
};
function BlobExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Blob_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
BlobExpressionContext.prototype = Object.create(ExpressionContext.prototype);
BlobExpressionContext.prototype.constructor = BlobExpressionContext;
BlobExpressionContext.prototype.blob_expression = function() {
return this.getTypedRuleContext(Blob_expressionContext,0);
};
BlobExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBlobExpression(this);
}
};
BlobExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBlobExpression(this);
}
};
function NotContainsAnyExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotContainsAnyExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotContainsAnyExpressionContext.prototype.constructor = NotContainsAnyExpressionContext;
NotContainsAnyExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
NotContainsAnyExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
NotContainsAnyExpressionContext.prototype.ANY = function() {
return this.getToken(EParser.ANY, 0);
};
NotContainsAnyExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
NotContainsAnyExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotContainsAnyExpression(this);
}
};
NotContainsAnyExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotContainsAnyExpression(this);
}
};
function ContainsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ContainsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ContainsExpressionContext.prototype.constructor = ContainsExpressionContext;
ContainsExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
ContainsExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
ContainsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterContainsExpression(this);
}
};
ContainsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitContainsExpression(this);
}
};
function FilteredListExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.src = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
FilteredListExpressionContext.prototype = Object.create(ExpressionContext.prototype);
FilteredListExpressionContext.prototype.constructor = FilteredListExpressionContext;
FilteredListExpressionContext.prototype.filtered_list_suffix = function() {
return this.getTypedRuleContext(Filtered_list_suffixContext,0);
};
FilteredListExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
FilteredListExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFilteredListExpression(this);
}
};
FilteredListExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFilteredListExpression(this);
}
};
function ConstructorExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Constructor_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ConstructorExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ConstructorExpressionContext.prototype.constructor = ConstructorExpressionContext;
ConstructorExpressionContext.prototype.constructor_expression = function() {
return this.getTypedRuleContext(Constructor_expressionContext,0);
};
ConstructorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConstructorExpression(this);
}
};
ConstructorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConstructorExpression(this);
}
};
function NotContainsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotContainsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotContainsExpressionContext.prototype.constructor = NotContainsExpressionContext;
NotContainsExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
NotContainsExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
NotContainsExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
NotContainsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotContainsExpression(this);
}
};
NotContainsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotContainsExpression(this);
}
};
function MultiplyExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
MultiplyExpressionContext.prototype = Object.create(ExpressionContext.prototype);
MultiplyExpressionContext.prototype.constructor = MultiplyExpressionContext;
MultiplyExpressionContext.prototype.multiply = function() {
return this.getTypedRuleContext(MultiplyContext,0);
};
MultiplyExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
MultiplyExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMultiplyExpression(this);
}
};
MultiplyExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMultiplyExpression(this);
}
};
function RoughlyEqualsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
RoughlyEqualsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
RoughlyEqualsExpressionContext.prototype.constructor = RoughlyEqualsExpressionContext;
RoughlyEqualsExpressionContext.prototype.TILDE = function() {
return this.getToken(EParser.TILDE, 0);
};
RoughlyEqualsExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
RoughlyEqualsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRoughlyEqualsExpression(this);
}
};
RoughlyEqualsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRoughlyEqualsExpression(this);
}
};
function ExecuteExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.name = null; // Variable_identifierContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ExecuteExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ExecuteExpressionContext.prototype.constructor = ExecuteExpressionContext;
ExecuteExpressionContext.prototype.EXECUTE = function() {
return this.getToken(EParser.EXECUTE, 0);
};
ExecuteExpressionContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
ExecuteExpressionContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
ExecuteExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterExecuteExpression(this);
}
};
ExecuteExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitExecuteExpression(this);
}
};
function GreaterThanOrEqualExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
GreaterThanOrEqualExpressionContext.prototype = Object.create(ExpressionContext.prototype);
GreaterThanOrEqualExpressionContext.prototype.constructor = GreaterThanOrEqualExpressionContext;
GreaterThanOrEqualExpressionContext.prototype.GTE = function() {
return this.getToken(EParser.GTE, 0);
};
GreaterThanOrEqualExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
GreaterThanOrEqualExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterGreaterThanOrEqualExpression(this);
}
};
GreaterThanOrEqualExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitGreaterThanOrEqualExpression(this);
}
};
function NotInExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotInExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotInExpressionContext.prototype.constructor = NotInExpressionContext;
NotInExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
NotInExpressionContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
NotInExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
NotInExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotInExpression(this);
}
};
NotInExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotInExpression(this);
}
};
function IteratorExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // ExpressionContext;
this.name = null; // Variable_identifierContext;
this.source = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IteratorExpressionContext.prototype = Object.create(ExpressionContext.prototype);
IteratorExpressionContext.prototype.constructor = IteratorExpressionContext;
IteratorExpressionContext.prototype.FOR = function() {
return this.getToken(EParser.FOR, 0);
};
IteratorExpressionContext.prototype.EACH = function() {
return this.getToken(EParser.EACH, 0);
};
IteratorExpressionContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
IteratorExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
IteratorExpressionContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
IteratorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIteratorExpression(this);
}
};
IteratorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIteratorExpression(this);
}
};
function UnresolvedExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Unresolved_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
UnresolvedExpressionContext.prototype = Object.create(ExpressionContext.prototype);
UnresolvedExpressionContext.prototype.constructor = UnresolvedExpressionContext;
UnresolvedExpressionContext.prototype.unresolved_expression = function() {
return this.getTypedRuleContext(Unresolved_expressionContext,0);
};
UnresolvedExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUnresolvedExpression(this);
}
};
UnresolvedExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUnresolvedExpression(this);
}
};
function IsNotExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // Is_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IsNotExpressionContext.prototype = Object.create(ExpressionContext.prototype);
IsNotExpressionContext.prototype.constructor = IsNotExpressionContext;
IsNotExpressionContext.prototype.IS = function() {
return this.getToken(EParser.IS, 0);
};
IsNotExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
IsNotExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
IsNotExpressionContext.prototype.is_expression = function() {
return this.getTypedRuleContext(Is_expressionContext,0);
};
IsNotExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIsNotExpression(this);
}
};
IsNotExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIsNotExpression(this);
}
};
function DivideExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
DivideExpressionContext.prototype = Object.create(ExpressionContext.prototype);
DivideExpressionContext.prototype.constructor = DivideExpressionContext;
DivideExpressionContext.prototype.divide = function() {
return this.getTypedRuleContext(DivideContext,0);
};
DivideExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
DivideExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDivideExpression(this);
}
};
DivideExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDivideExpression(this);
}
};
function IsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // Is_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
IsExpressionContext.prototype.constructor = IsExpressionContext;
IsExpressionContext.prototype.IS = function() {
return this.getToken(EParser.IS, 0);
};
IsExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
IsExpressionContext.prototype.is_expression = function() {
return this.getTypedRuleContext(Is_expressionContext,0);
};
IsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIsExpression(this);
}
};
IsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIsExpression(this);
}
};
function MinusExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
MinusExpressionContext.prototype = Object.create(ExpressionContext.prototype);
MinusExpressionContext.prototype.constructor = MinusExpressionContext;
MinusExpressionContext.prototype.MINUS = function() {
return this.getToken(EParser.MINUS, 0);
};
MinusExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
MinusExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMinusExpression(this);
}
};
MinusExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMinusExpression(this);
}
};
function AddExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.op = null; // Token;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
AddExpressionContext.prototype = Object.create(ExpressionContext.prototype);
AddExpressionContext.prototype.constructor = AddExpressionContext;
AddExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
AddExpressionContext.prototype.PLUS = function() {
return this.getToken(EParser.PLUS, 0);
};
AddExpressionContext.prototype.MINUS = function() {
return this.getToken(EParser.MINUS, 0);
};
AddExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAddExpression(this);
}
};
AddExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAddExpression(this);
}
};
function NotContainsAllExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
NotContainsAllExpressionContext.prototype = Object.create(ExpressionContext.prototype);
NotContainsAllExpressionContext.prototype.constructor = NotContainsAllExpressionContext;
NotContainsAllExpressionContext.prototype.NOT = function() {
return this.getToken(EParser.NOT, 0);
};
NotContainsAllExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
NotContainsAllExpressionContext.prototype.ALL = function() {
return this.getToken(EParser.ALL, 0);
};
NotContainsAllExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
NotContainsAllExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNotContainsAllExpression(this);
}
};
NotContainsAllExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNotContainsAllExpression(this);
}
};
function InstanceExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Instance_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
InstanceExpressionContext.prototype = Object.create(ExpressionContext.prototype);
InstanceExpressionContext.prototype.constructor = InstanceExpressionContext;
InstanceExpressionContext.prototype.instance_expression = function() {
return this.getTypedRuleContext(Instance_expressionContext,0);
};
InstanceExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInstanceExpression(this);
}
};
InstanceExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInstanceExpression(this);
}
};
function ReadAllExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.exp = null; // Read_all_expressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ReadAllExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ReadAllExpressionContext.prototype.constructor = ReadAllExpressionContext;
ReadAllExpressionContext.prototype.read_all_expression = function() {
return this.getTypedRuleContext(Read_all_expressionContext,0);
};
ReadAllExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterReadAllExpression(this);
}
};
ReadAllExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitReadAllExpression(this);
}
};
function ContainsAnyExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ContainsAnyExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ContainsAnyExpressionContext.prototype.constructor = ContainsAnyExpressionContext;
ContainsAnyExpressionContext.prototype.CONTAINS = function() {
return this.getToken(EParser.CONTAINS, 0);
};
ContainsAnyExpressionContext.prototype.ANY = function() {
return this.getToken(EParser.ANY, 0);
};
ContainsAnyExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
ContainsAnyExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterContainsAnyExpression(this);
}
};
ContainsAnyExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitContainsAnyExpression(this);
}
};
function CastExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // Category_or_any_typeContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CastExpressionContext.prototype = Object.create(ExpressionContext.prototype);
CastExpressionContext.prototype.constructor = CastExpressionContext;
CastExpressionContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
CastExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
CastExpressionContext.prototype.category_or_any_type = function() {
return this.getTypedRuleContext(Category_or_any_typeContext,0);
};
CastExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCastExpression(this);
}
};
CastExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCastExpression(this);
}
};
function ModuloExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ModuloExpressionContext.prototype = Object.create(ExpressionContext.prototype);
ModuloExpressionContext.prototype.constructor = ModuloExpressionContext;
ModuloExpressionContext.prototype.modulo = function() {
return this.getTypedRuleContext(ModuloContext,0);
};
ModuloExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
ModuloExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterModuloExpression(this);
}
};
ModuloExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitModuloExpression(this);
}
};
function LessThanExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LessThanExpressionContext.prototype = Object.create(ExpressionContext.prototype);
LessThanExpressionContext.prototype.constructor = LessThanExpressionContext;
LessThanExpressionContext.prototype.LT = function() {
return this.getToken(EParser.LT, 0);
};
LessThanExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
LessThanExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLessThanExpression(this);
}
};
LessThanExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLessThanExpression(this);
}
};
function EqualsExpressionContext(parser, ctx) {
ExpressionContext.call(this, parser);
this.left = null; // ExpressionContext;
this.right = null; // ExpressionContext;
ExpressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
EqualsExpressionContext.prototype = Object.create(ExpressionContext.prototype);
EqualsExpressionContext.prototype.constructor = EqualsExpressionContext;
EqualsExpressionContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
EqualsExpressionContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
EqualsExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterEqualsExpression(this);
}
};
EqualsExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitEqualsExpression(this);
}
};
EParser.prototype.expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new ExpressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 86;
this.enterRecursionRule(localctx, 86, EParser.RULE_expression, _p);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1049;
var la_ = this._interp.adaptivePredict(this._input,53,this._ctx);
switch(la_) {
case 1:
localctx = new MinusExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1022;
this.match(EParser.MINUS);
this.state = 1023;
localctx.exp = this.expression(42);
break;
case 2:
localctx = new NotExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1024;
this.match(EParser.NOT);
this.state = 1025;
localctx.exp = this.expression(41);
break;
case 3:
localctx = new CodeExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1026;
this.match(EParser.CODE);
this.state = 1027;
this.match(EParser.COLON);
this.state = 1028;
localctx.exp = this.expression(14);
break;
case 4:
localctx = new InstanceExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1029;
localctx.exp = this.instance_expression(0);
break;
case 5:
localctx = new UnresolvedExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1030;
localctx.exp = this.unresolved_expression(0);
break;
case 6:
localctx = new MethodCallExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1031;
localctx.exp = this.unresolved_expression(0);
this.state = 1032;
localctx.args = this.argument_assignment_list();
break;
case 7:
localctx = new ExecuteExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1034;
this.match(EParser.EXECUTE);
this.state = 1035;
this.match(EParser.COLON);
this.state = 1036;
localctx.name = this.variable_identifier();
break;
case 8:
localctx = new ClosureExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1037;
this.match(EParser.METHOD_T);
this.state = 1038;
this.match(EParser.COLON);
this.state = 1039;
localctx.name = this.method_identifier();
break;
case 9:
localctx = new BlobExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1040;
localctx.exp = this.blob_expression();
break;
case 10:
localctx = new DocumentExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1041;
localctx.exp = this.document_expression();
break;
case 11:
localctx = new ConstructorExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1042;
localctx.exp = this.constructor_expression();
break;
case 12:
localctx = new FetchStoreExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1043;
localctx.exp = this.fetch_store_expression();
break;
case 13:
localctx = new ReadAllExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1044;
localctx.exp = this.read_all_expression();
break;
case 14:
localctx = new ReadOneExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1045;
localctx.exp = this.read_one_expression();
break;
case 15:
localctx = new SortedExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1046;
localctx.exp = this.sorted_expression();
break;
case 16:
localctx = new AmbiguousExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1047;
localctx.exp = this.ambiguous_expression();
break;
case 17:
localctx = new InvocationExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1048;
localctx.exp = this.invocation_expression();
break;
}
this._ctx.stop = this._input.LT(-1);
this.state = 1156;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,55,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
this.state = 1154;
var la_ = this._interp.adaptivePredict(this._input,54,this._ctx);
switch(la_) {
case 1:
localctx = new MultiplyExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1051;
if (!( this.precpred(this._ctx, 40))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 40)");
}
this.state = 1052;
this.multiply();
this.state = 1053;
localctx.right = this.expression(41);
break;
case 2:
localctx = new DivideExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1055;
if (!( this.precpred(this._ctx, 39))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 39)");
}
this.state = 1056;
this.divide();
this.state = 1057;
localctx.right = this.expression(40);
break;
case 3:
localctx = new ModuloExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1059;
if (!( this.precpred(this._ctx, 38))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 38)");
}
this.state = 1060;
this.modulo();
this.state = 1061;
localctx.right = this.expression(39);
break;
case 4:
localctx = new IntDivideExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1063;
if (!( this.precpred(this._ctx, 37))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 37)");
}
this.state = 1064;
this.idivide();
this.state = 1065;
localctx.right = this.expression(38);
break;
case 5:
localctx = new AddExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1067;
if (!( this.precpred(this._ctx, 36))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 36)");
}
this.state = 1068;
localctx.op = this._input.LT(1);
_la = this._input.LA(1);
if(!(_la===EParser.PLUS || _la===EParser.MINUS)) {
localctx.op = this._errHandler.recoverInline(this);
}
this.consume();
this.state = 1069;
localctx.right = this.expression(37);
break;
case 6:
localctx = new LessThanExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1070;
if (!( this.precpred(this._ctx, 35))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 35)");
}
this.state = 1071;
this.match(EParser.LT);
this.state = 1072;
localctx.right = this.expression(36);
break;
case 7:
localctx = new LessThanOrEqualExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1073;
if (!( this.precpred(this._ctx, 34))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 34)");
}
this.state = 1074;
this.match(EParser.LTE);
this.state = 1075;
localctx.right = this.expression(35);
break;
case 8:
localctx = new GreaterThanExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1076;
if (!( this.precpred(this._ctx, 33))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 33)");
}
this.state = 1077;
this.match(EParser.GT);
this.state = 1078;
localctx.right = this.expression(34);
break;
case 9:
localctx = new GreaterThanOrEqualExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1079;
if (!( this.precpred(this._ctx, 32))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 32)");
}
this.state = 1080;
this.match(EParser.GTE);
this.state = 1081;
localctx.right = this.expression(33);
break;
case 10:
localctx = new EqualsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1082;
if (!( this.precpred(this._ctx, 29))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 29)");
}
this.state = 1083;
this.match(EParser.EQ);
this.state = 1084;
localctx.right = this.expression(30);
break;
case 11:
localctx = new NotEqualsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1085;
if (!( this.precpred(this._ctx, 28))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 28)");
}
this.state = 1086;
this.match(EParser.LTGT);
this.state = 1087;
localctx.right = this.expression(29);
break;
case 12:
localctx = new RoughlyEqualsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1088;
if (!( this.precpred(this._ctx, 27))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 27)");
}
this.state = 1089;
this.match(EParser.TILDE);
this.state = 1090;
localctx.right = this.expression(28);
break;
case 13:
localctx = new OrExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1091;
if (!( this.precpred(this._ctx, 26))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 26)");
}
this.state = 1092;
this.match(EParser.OR);
this.state = 1093;
localctx.right = this.expression(27);
break;
case 14:
localctx = new AndExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1094;
if (!( this.precpred(this._ctx, 25))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 25)");
}
this.state = 1095;
this.match(EParser.AND);
this.state = 1096;
localctx.right = this.expression(26);
break;
case 15:
localctx = new TernaryExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.ifTrue = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1097;
if (!( this.precpred(this._ctx, 24))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 24)");
}
this.state = 1098;
this.match(EParser.IF);
this.state = 1099;
localctx.test = this.expression(0);
this.state = 1100;
this.match(EParser.ELSE);
this.state = 1101;
localctx.ifFalse = this.expression(25);
break;
case 16:
localctx = new InExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1103;
if (!( this.precpred(this._ctx, 22))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 22)");
}
this.state = 1104;
this.match(EParser.IN);
this.state = 1105;
localctx.right = this.expression(23);
break;
case 17:
localctx = new ContainsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1106;
if (!( this.precpred(this._ctx, 21))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 21)");
}
this.state = 1107;
this.match(EParser.CONTAINS);
this.state = 1108;
localctx.right = this.expression(22);
break;
case 18:
localctx = new ContainsAllExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1109;
if (!( this.precpred(this._ctx, 20))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 20)");
}
this.state = 1110;
this.match(EParser.CONTAINS);
this.state = 1111;
this.match(EParser.ALL);
this.state = 1112;
localctx.right = this.expression(21);
break;
case 19:
localctx = new ContainsAnyExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1113;
if (!( this.precpred(this._ctx, 19))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 19)");
}
this.state = 1114;
this.match(EParser.CONTAINS);
this.state = 1115;
this.match(EParser.ANY);
this.state = 1116;
localctx.right = this.expression(20);
break;
case 20:
localctx = new NotInExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1117;
if (!( this.precpred(this._ctx, 18))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 18)");
}
this.state = 1118;
this.match(EParser.NOT);
this.state = 1119;
this.match(EParser.IN);
this.state = 1120;
localctx.right = this.expression(19);
break;
case 21:
localctx = new NotContainsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1121;
if (!( this.precpred(this._ctx, 17))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 17)");
}
this.state = 1122;
this.match(EParser.NOT);
this.state = 1123;
this.match(EParser.CONTAINS);
this.state = 1124;
localctx.right = this.expression(18);
break;
case 22:
localctx = new NotContainsAllExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1125;
if (!( this.precpred(this._ctx, 16))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 16)");
}
this.state = 1126;
this.match(EParser.NOT);
this.state = 1127;
this.match(EParser.CONTAINS);
this.state = 1128;
this.match(EParser.ALL);
this.state = 1129;
localctx.right = this.expression(17);
break;
case 23:
localctx = new NotContainsAnyExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1130;
if (!( this.precpred(this._ctx, 15))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 15)");
}
this.state = 1131;
this.match(EParser.NOT);
this.state = 1132;
this.match(EParser.CONTAINS);
this.state = 1133;
this.match(EParser.ANY);
this.state = 1134;
localctx.right = this.expression(16);
break;
case 24:
localctx = new IteratorExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.exp = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1135;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1136;
this.match(EParser.FOR);
this.state = 1137;
this.match(EParser.EACH);
this.state = 1138;
localctx.name = this.variable_identifier();
this.state = 1139;
this.match(EParser.IN);
this.state = 1140;
localctx.source = this.expression(2);
break;
case 25:
localctx = new IsNotExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1142;
if (!( this.precpred(this._ctx, 31))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 31)");
}
this.state = 1143;
this.match(EParser.IS);
this.state = 1144;
this.match(EParser.NOT);
this.state = 1145;
localctx.right = this.is_expression();
break;
case 26:
localctx = new IsExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1146;
if (!( this.precpred(this._ctx, 30))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 30)");
}
this.state = 1147;
this.match(EParser.IS);
this.state = 1148;
localctx.right = this.is_expression();
break;
case 27:
localctx = new CastExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.left = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1149;
if (!( this.precpred(this._ctx, 23))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 23)");
}
this.state = 1150;
this.match(EParser.AS);
this.state = 1151;
localctx.right = this.category_or_any_type();
break;
case 28:
localctx = new FilteredListExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
localctx.src = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_expression);
this.state = 1152;
if (!( this.precpred(this._ctx, 8))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 8)");
}
this.state = 1153;
this.filtered_list_suffix();
break;
}
}
this.state = 1158;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,55,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Unresolved_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_unresolved_expression;
return this;
}
Unresolved_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Unresolved_expressionContext.prototype.constructor = Unresolved_expressionContext;
Unresolved_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function UnresolvedSelectorContext(parser, ctx) {
Unresolved_expressionContext.call(this, parser);
this.parent = null; // Unresolved_expressionContext;
this.selector = null; // Unresolved_selectorContext;
Unresolved_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
UnresolvedSelectorContext.prototype = Object.create(Unresolved_expressionContext.prototype);
UnresolvedSelectorContext.prototype.constructor = UnresolvedSelectorContext;
UnresolvedSelectorContext.prototype.unresolved_expression = function() {
return this.getTypedRuleContext(Unresolved_expressionContext,0);
};
UnresolvedSelectorContext.prototype.unresolved_selector = function() {
return this.getTypedRuleContext(Unresolved_selectorContext,0);
};
UnresolvedSelectorContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUnresolvedSelector(this);
}
};
UnresolvedSelectorContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUnresolvedSelector(this);
}
};
function UnresolvedIdentifierContext(parser, ctx) {
Unresolved_expressionContext.call(this, parser);
this.name = null; // IdentifierContext;
Unresolved_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
UnresolvedIdentifierContext.prototype = Object.create(Unresolved_expressionContext.prototype);
UnresolvedIdentifierContext.prototype.constructor = UnresolvedIdentifierContext;
UnresolvedIdentifierContext.prototype.identifier = function() {
return this.getTypedRuleContext(IdentifierContext,0);
};
UnresolvedIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUnresolvedIdentifier(this);
}
};
UnresolvedIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUnresolvedIdentifier(this);
}
};
EParser.prototype.unresolved_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Unresolved_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 88;
this.enterRecursionRule(localctx, 88, EParser.RULE_unresolved_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new UnresolvedIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1160;
localctx.name = this.identifier();
this._ctx.stop = this._input.LT(-1);
this.state = 1166;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,56,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new UnresolvedSelectorContext(this, new Unresolved_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_unresolved_expression);
this.state = 1162;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1163;
localctx.selector = this.unresolved_selector();
}
this.state = 1168;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,56,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Unresolved_selectorContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_unresolved_selector;
this.name = null; // IdentifierContext
return this;
}
Unresolved_selectorContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Unresolved_selectorContext.prototype.constructor = Unresolved_selectorContext;
Unresolved_selectorContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
Unresolved_selectorContext.prototype.identifier = function() {
return this.getTypedRuleContext(IdentifierContext,0);
};
Unresolved_selectorContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUnresolved_selector(this);
}
};
Unresolved_selectorContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUnresolved_selector(this);
}
};
EParser.prototype.unresolved_selector = function() {
var localctx = new Unresolved_selectorContext(this, this._ctx, this.state);
this.enterRule(localctx, 90, EParser.RULE_unresolved_selector);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1169;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1170;
this.match(EParser.DOT);
this.state = 1171;
localctx.name = this.identifier();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Invocation_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_invocation_expression;
this.name = null; // Variable_identifierContext
return this;
}
Invocation_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Invocation_expressionContext.prototype.constructor = Invocation_expressionContext;
Invocation_expressionContext.prototype.INVOKE = function() {
return this.getToken(EParser.INVOKE, 0);
};
Invocation_expressionContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Invocation_expressionContext.prototype.invocation_trailer = function() {
return this.getTypedRuleContext(Invocation_trailerContext,0);
};
Invocation_expressionContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Invocation_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInvocation_expression(this);
}
};
Invocation_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInvocation_expression(this);
}
};
EParser.prototype.invocation_expression = function() {
var localctx = new Invocation_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 92, EParser.RULE_invocation_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1173;
this.match(EParser.INVOKE);
this.state = 1174;
this.match(EParser.COLON);
this.state = 1175;
localctx.name = this.variable_identifier();
this.state = 1176;
this.invocation_trailer();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Invocation_trailerContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_invocation_trailer;
return this;
}
Invocation_trailerContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Invocation_trailerContext.prototype.constructor = Invocation_trailerContext;
Invocation_trailerContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterInvocation_trailer(this);
}
};
Invocation_trailerContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitInvocation_trailer(this);
}
};
EParser.prototype.invocation_trailer = function() {
var localctx = new Invocation_trailerContext(this, this._ctx, this.state);
this.enterRule(localctx, 94, EParser.RULE_invocation_trailer);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1178;
if (!( this.willBe(EParser.LF))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.willBe(EParser.LF)");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Instance_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_instance_expression;
return this;
}
Instance_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Instance_expressionContext.prototype.constructor = Instance_expressionContext;
Instance_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function SelectorExpressionContext(parser, ctx) {
Instance_expressionContext.call(this, parser);
this.parent = null; // Instance_expressionContext;
this.selector = null; // Instance_selectorContext;
Instance_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
SelectorExpressionContext.prototype = Object.create(Instance_expressionContext.prototype);
SelectorExpressionContext.prototype.constructor = SelectorExpressionContext;
SelectorExpressionContext.prototype.instance_expression = function() {
return this.getTypedRuleContext(Instance_expressionContext,0);
};
SelectorExpressionContext.prototype.instance_selector = function() {
return this.getTypedRuleContext(Instance_selectorContext,0);
};
SelectorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSelectorExpression(this);
}
};
SelectorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSelectorExpression(this);
}
};
function SelectableExpressionContext(parser, ctx) {
Instance_expressionContext.call(this, parser);
this.parent = null; // Selectable_expressionContext;
Instance_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
SelectableExpressionContext.prototype = Object.create(Instance_expressionContext.prototype);
SelectableExpressionContext.prototype.constructor = SelectableExpressionContext;
SelectableExpressionContext.prototype.selectable_expression = function() {
return this.getTypedRuleContext(Selectable_expressionContext,0);
};
SelectableExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSelectableExpression(this);
}
};
SelectableExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSelectableExpression(this);
}
};
EParser.prototype.instance_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Instance_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 96;
this.enterRecursionRule(localctx, 96, EParser.RULE_instance_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new SelectableExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1181;
localctx.parent = this.selectable_expression();
this._ctx.stop = this._input.LT(-1);
this.state = 1187;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,57,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new SelectorExpressionContext(this, new Instance_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_instance_expression);
this.state = 1183;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1184;
localctx.selector = this.instance_selector();
}
this.state = 1189;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,57,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Instance_selectorContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_instance_selector;
return this;
}
Instance_selectorContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Instance_selectorContext.prototype.constructor = Instance_selectorContext;
Instance_selectorContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function SliceSelectorContext(parser, ctx) {
Instance_selectorContext.call(this, parser);
this.xslice = null; // Slice_argumentsContext;
Instance_selectorContext.prototype.copyFrom.call(this, ctx);
return this;
}
SliceSelectorContext.prototype = Object.create(Instance_selectorContext.prototype);
SliceSelectorContext.prototype.constructor = SliceSelectorContext;
SliceSelectorContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
SliceSelectorContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
SliceSelectorContext.prototype.slice_arguments = function() {
return this.getTypedRuleContext(Slice_argumentsContext,0);
};
SliceSelectorContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSliceSelector(this);
}
};
SliceSelectorContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSliceSelector(this);
}
};
function MemberSelectorContext(parser, ctx) {
Instance_selectorContext.call(this, parser);
this.name = null; // Variable_identifierContext;
Instance_selectorContext.prototype.copyFrom.call(this, ctx);
return this;
}
MemberSelectorContext.prototype = Object.create(Instance_selectorContext.prototype);
MemberSelectorContext.prototype.constructor = MemberSelectorContext;
MemberSelectorContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
MemberSelectorContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
MemberSelectorContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMemberSelector(this);
}
};
MemberSelectorContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMemberSelector(this);
}
};
function ItemSelectorContext(parser, ctx) {
Instance_selectorContext.call(this, parser);
this.exp = null; // ExpressionContext;
Instance_selectorContext.prototype.copyFrom.call(this, ctx);
return this;
}
ItemSelectorContext.prototype = Object.create(Instance_selectorContext.prototype);
ItemSelectorContext.prototype.constructor = ItemSelectorContext;
ItemSelectorContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
ItemSelectorContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
ItemSelectorContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ItemSelectorContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterItemSelector(this);
}
};
ItemSelectorContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitItemSelector(this);
}
};
EParser.prototype.instance_selector = function() {
var localctx = new Instance_selectorContext(this, this._ctx, this.state);
this.enterRule(localctx, 98, EParser.RULE_instance_selector);
try {
this.state = 1203;
var la_ = this._interp.adaptivePredict(this._input,58,this._ctx);
switch(la_) {
case 1:
localctx = new MemberSelectorContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1190;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1191;
this.match(EParser.DOT);
this.state = 1192;
localctx.name = this.variable_identifier();
break;
case 2:
localctx = new SliceSelectorContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1193;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1194;
this.match(EParser.LBRAK);
this.state = 1195;
localctx.xslice = this.slice_arguments();
this.state = 1196;
this.match(EParser.RBRAK);
break;
case 3:
localctx = new ItemSelectorContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1198;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1199;
this.match(EParser.LBRAK);
this.state = 1200;
localctx.exp = this.expression(0);
this.state = 1201;
this.match(EParser.RBRAK);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Document_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_document_expression;
return this;
}
Document_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Document_expressionContext.prototype.constructor = Document_expressionContext;
Document_expressionContext.prototype.DOCUMENT = function() {
return this.getToken(EParser.DOCUMENT, 0);
};
Document_expressionContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Document_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Document_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDocument_expression(this);
}
};
Document_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDocument_expression(this);
}
};
EParser.prototype.document_expression = function() {
var localctx = new Document_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 100, EParser.RULE_document_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1205;
this.match(EParser.DOCUMENT);
this.state = 1208;
var la_ = this._interp.adaptivePredict(this._input,59,this._ctx);
if(la_===1) {
this.state = 1206;
this.match(EParser.FROM);
this.state = 1207;
this.expression(0);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Blob_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_blob_expression;
return this;
}
Blob_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Blob_expressionContext.prototype.constructor = Blob_expressionContext;
Blob_expressionContext.prototype.BLOB = function() {
return this.getToken(EParser.BLOB, 0);
};
Blob_expressionContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Blob_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Blob_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBlob_expression(this);
}
};
Blob_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBlob_expression(this);
}
};
EParser.prototype.blob_expression = function() {
var localctx = new Blob_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 102, EParser.RULE_blob_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1210;
this.match(EParser.BLOB);
this.state = 1211;
this.match(EParser.FROM);
this.state = 1212;
this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Constructor_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_constructor_expression;
return this;
}
Constructor_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Constructor_expressionContext.prototype.constructor = Constructor_expressionContext;
Constructor_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ConstructorFromContext(parser, ctx) {
Constructor_expressionContext.call(this, parser);
this.typ = null; // Mutable_category_typeContext;
this.firstArg = null; // ExpressionContext;
this.args = null; // With_argument_assignment_listContext;
this.arg = null; // Argument_assignmentContext;
Constructor_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ConstructorFromContext.prototype = Object.create(Constructor_expressionContext.prototype);
ConstructorFromContext.prototype.constructor = ConstructorFromContext;
ConstructorFromContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
ConstructorFromContext.prototype.mutable_category_type = function() {
return this.getTypedRuleContext(Mutable_category_typeContext,0);
};
ConstructorFromContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ConstructorFromContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
ConstructorFromContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
ConstructorFromContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
ConstructorFromContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ConstructorFromContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConstructorFrom(this);
}
};
ConstructorFromContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConstructorFrom(this);
}
};
function ConstructorNoFromContext(parser, ctx) {
Constructor_expressionContext.call(this, parser);
this.typ = null; // Mutable_category_typeContext;
this.args = null; // With_argument_assignment_listContext;
this.arg = null; // Argument_assignmentContext;
Constructor_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ConstructorNoFromContext.prototype = Object.create(Constructor_expressionContext.prototype);
ConstructorNoFromContext.prototype.constructor = ConstructorNoFromContext;
ConstructorNoFromContext.prototype.mutable_category_type = function() {
return this.getTypedRuleContext(Mutable_category_typeContext,0);
};
ConstructorNoFromContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
ConstructorNoFromContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
ConstructorNoFromContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ConstructorNoFromContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConstructorNoFrom(this);
}
};
ConstructorNoFromContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConstructorNoFrom(this);
}
};
EParser.prototype.constructor_expression = function() {
var localctx = new Constructor_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 104, EParser.RULE_constructor_expression);
var _la = 0; // Token type
try {
this.state = 1235;
var la_ = this._interp.adaptivePredict(this._input,65,this._ctx);
switch(la_) {
case 1:
localctx = new ConstructorFromContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1214;
localctx.typ = this.mutable_category_type();
this.state = 1215;
this.match(EParser.FROM);
this.state = 1216;
localctx.firstArg = this.expression(0);
this.state = 1225;
var la_ = this._interp.adaptivePredict(this._input,62,this._ctx);
if(la_===1) {
this.state = 1218;
_la = this._input.LA(1);
if(_la===EParser.COMMA) {
this.state = 1217;
this.match(EParser.COMMA);
}
this.state = 1220;
localctx.args = this.with_argument_assignment_list(0);
this.state = 1223;
var la_ = this._interp.adaptivePredict(this._input,61,this._ctx);
if(la_===1) {
this.state = 1221;
this.match(EParser.AND);
this.state = 1222;
localctx.arg = this.argument_assignment();
}
}
break;
case 2:
localctx = new ConstructorNoFromContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1227;
localctx.typ = this.mutable_category_type();
this.state = 1233;
var la_ = this._interp.adaptivePredict(this._input,64,this._ctx);
if(la_===1) {
this.state = 1228;
localctx.args = this.with_argument_assignment_list(0);
this.state = 1231;
var la_ = this._interp.adaptivePredict(this._input,63,this._ctx);
if(la_===1) {
this.state = 1229;
this.match(EParser.AND);
this.state = 1230;
localctx.arg = this.argument_assignment();
}
}
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Write_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_write_statement;
this.what = null; // ExpressionContext
this.target = null; // ExpressionContext
return this;
}
Write_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Write_statementContext.prototype.constructor = Write_statementContext;
Write_statementContext.prototype.WRITE = function() {
return this.getToken(EParser.WRITE, 0);
};
Write_statementContext.prototype.TO = function() {
return this.getToken(EParser.TO, 0);
};
Write_statementContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
Write_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterWrite_statement(this);
}
};
Write_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitWrite_statement(this);
}
};
EParser.prototype.write_statement = function() {
var localctx = new Write_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 106, EParser.RULE_write_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1237;
this.match(EParser.WRITE);
this.state = 1238;
localctx.what = this.expression(0);
this.state = 1239;
this.match(EParser.TO);
this.state = 1240;
localctx.target = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Ambiguous_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_ambiguous_expression;
this.method = null; // Unresolved_expressionContext
this.exp = null; // ExpressionContext
return this;
}
Ambiguous_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Ambiguous_expressionContext.prototype.constructor = Ambiguous_expressionContext;
Ambiguous_expressionContext.prototype.MINUS = function() {
return this.getToken(EParser.MINUS, 0);
};
Ambiguous_expressionContext.prototype.unresolved_expression = function() {
return this.getTypedRuleContext(Unresolved_expressionContext,0);
};
Ambiguous_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Ambiguous_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAmbiguous_expression(this);
}
};
Ambiguous_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAmbiguous_expression(this);
}
};
EParser.prototype.ambiguous_expression = function() {
var localctx = new Ambiguous_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 108, EParser.RULE_ambiguous_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1242;
localctx.method = this.unresolved_expression(0);
this.state = 1243;
this.match(EParser.MINUS);
this.state = 1244;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Filtered_list_suffixContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_filtered_list_suffix;
this.name = null; // Variable_identifierContext
this.predicate = null; // ExpressionContext
return this;
}
Filtered_list_suffixContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Filtered_list_suffixContext.prototype.constructor = Filtered_list_suffixContext;
Filtered_list_suffixContext.prototype.FILTERED = function() {
return this.getToken(EParser.FILTERED, 0);
};
Filtered_list_suffixContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Filtered_list_suffixContext.prototype.WHERE = function() {
return this.getToken(EParser.WHERE, 0);
};
Filtered_list_suffixContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Filtered_list_suffixContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Filtered_list_suffixContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFiltered_list_suffix(this);
}
};
Filtered_list_suffixContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFiltered_list_suffix(this);
}
};
EParser.prototype.filtered_list_suffix = function() {
var localctx = new Filtered_list_suffixContext(this, this._ctx, this.state);
this.enterRule(localctx, 110, EParser.RULE_filtered_list_suffix);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1246;
this.match(EParser.FILTERED);
this.state = 1247;
this.match(EParser.WITH);
this.state = 1248;
localctx.name = this.variable_identifier();
this.state = 1249;
this.match(EParser.WHERE);
this.state = 1250;
localctx.predicate = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Fetch_store_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_fetch_store_expression;
return this;
}
Fetch_store_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Fetch_store_expressionContext.prototype.constructor = Fetch_store_expressionContext;
Fetch_store_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function FetchOneContext(parser, ctx) {
Fetch_store_expressionContext.call(this, parser);
this.typ = null; // Mutable_category_typeContext;
this.predicate = null; // ExpressionContext;
Fetch_store_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
FetchOneContext.prototype = Object.create(Fetch_store_expressionContext.prototype);
FetchOneContext.prototype.constructor = FetchOneContext;
FetchOneContext.prototype.FETCH = function() {
return this.getToken(EParser.FETCH, 0);
};
FetchOneContext.prototype.ONE = function() {
return this.getToken(EParser.ONE, 0);
};
FetchOneContext.prototype.WHERE = function() {
return this.getToken(EParser.WHERE, 0);
};
FetchOneContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
FetchOneContext.prototype.mutable_category_type = function() {
return this.getTypedRuleContext(Mutable_category_typeContext,0);
};
FetchOneContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFetchOne(this);
}
};
FetchOneContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFetchOne(this);
}
};
function FetchManyContext(parser, ctx) {
Fetch_store_expressionContext.call(this, parser);
this.typ = null; // Mutable_category_typeContext;
this.xstart = null; // ExpressionContext;
this.xstop = null; // ExpressionContext;
this.predicate = null; // ExpressionContext;
this.orderby = null; // Order_by_listContext;
Fetch_store_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
FetchManyContext.prototype = Object.create(Fetch_store_expressionContext.prototype);
FetchManyContext.prototype.constructor = FetchManyContext;
FetchManyContext.prototype.FETCH = function() {
return this.getToken(EParser.FETCH, 0);
};
FetchManyContext.prototype.WHERE = function() {
return this.getToken(EParser.WHERE, 0);
};
FetchManyContext.prototype.ORDER = function() {
return this.getToken(EParser.ORDER, 0);
};
FetchManyContext.prototype.BY = function() {
return this.getToken(EParser.BY, 0);
};
FetchManyContext.prototype.ALL = function() {
return this.getToken(EParser.ALL, 0);
};
FetchManyContext.prototype.TO = function() {
return this.getToken(EParser.TO, 0);
};
FetchManyContext.prototype.ROWS = function() {
return this.getToken(EParser.ROWS, 0);
};
FetchManyContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
FetchManyContext.prototype.order_by_list = function() {
return this.getTypedRuleContext(Order_by_listContext,0);
};
FetchManyContext.prototype.mutable_category_type = function() {
return this.getTypedRuleContext(Mutable_category_typeContext,0);
};
FetchManyContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFetchMany(this);
}
};
FetchManyContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFetchMany(this);
}
};
EParser.prototype.fetch_store_expression = function() {
var localctx = new Fetch_store_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 112, EParser.RULE_fetch_store_expression);
var _la = 0; // Token type
try {
this.state = 1288;
var la_ = this._interp.adaptivePredict(this._input,72,this._ctx);
switch(la_) {
case 1:
localctx = new FetchOneContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1252;
this.match(EParser.FETCH);
this.state = 1253;
this.match(EParser.ONE);
this.state = 1255;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE || _la===EParser.TYPE_IDENTIFIER) {
this.state = 1254;
localctx.typ = this.mutable_category_type();
}
this.state = 1257;
this.match(EParser.WHERE);
this.state = 1258;
localctx.predicate = this.expression(0);
break;
case 2:
localctx = new FetchManyContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1259;
this.match(EParser.FETCH);
this.state = 1277;
switch(this._input.LA(1)) {
case EParser.ALL:
this.state = 1260;
this.match(EParser.ALL);
this.state = 1262;
var la_ = this._interp.adaptivePredict(this._input,67,this._ctx);
if(la_===1) {
this.state = 1261;
localctx.typ = this.mutable_category_type();
}
break;
case EParser.MUTABLE:
case EParser.TYPE_IDENTIFIER:
this.state = 1264;
localctx.typ = this.mutable_category_type();
this.state = 1266;
_la = this._input.LA(1);
if(_la===EParser.ROWS) {
this.state = 1265;
this.match(EParser.ROWS);
}
this.state = 1268;
localctx.xstart = this.expression(0);
this.state = 1269;
this.match(EParser.TO);
this.state = 1270;
localctx.xstop = this.expression(0);
break;
case EParser.ROWS:
this.state = 1272;
this.match(EParser.ROWS);
this.state = 1273;
localctx.xstart = this.expression(0);
this.state = 1274;
this.match(EParser.TO);
this.state = 1275;
localctx.xstop = this.expression(0);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 1281;
var la_ = this._interp.adaptivePredict(this._input,70,this._ctx);
if(la_===1) {
this.state = 1279;
this.match(EParser.WHERE);
this.state = 1280;
localctx.predicate = this.expression(0);
}
this.state = 1286;
var la_ = this._interp.adaptivePredict(this._input,71,this._ctx);
if(la_===1) {
this.state = 1283;
this.match(EParser.ORDER);
this.state = 1284;
this.match(EParser.BY);
this.state = 1285;
localctx.orderby = this.order_by_list();
}
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Sorted_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_sorted_expression;
this.source = null; // Instance_expressionContext
this.key = null; // Instance_expressionContext
return this;
}
Sorted_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Sorted_expressionContext.prototype.constructor = Sorted_expressionContext;
Sorted_expressionContext.prototype.SORTED = function() {
return this.getToken(EParser.SORTED, 0);
};
Sorted_expressionContext.prototype.instance_expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Instance_expressionContext);
} else {
return this.getTypedRuleContext(Instance_expressionContext,i);
}
};
Sorted_expressionContext.prototype.DESC = function() {
return this.getToken(EParser.DESC, 0);
};
Sorted_expressionContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
Sorted_expressionContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Sorted_expressionContext.prototype.key_token = function() {
return this.getTypedRuleContext(Key_tokenContext,0);
};
Sorted_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSorted_expression(this);
}
};
Sorted_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSorted_expression(this);
}
};
EParser.prototype.sorted_expression = function() {
var localctx = new Sorted_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 114, EParser.RULE_sorted_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1290;
this.match(EParser.SORTED);
this.state = 1292;
_la = this._input.LA(1);
if(_la===EParser.DESC) {
this.state = 1291;
this.match(EParser.DESC);
}
this.state = 1294;
localctx.source = this.instance_expression(0);
this.state = 1300;
var la_ = this._interp.adaptivePredict(this._input,74,this._ctx);
if(la_===1) {
this.state = 1295;
this.match(EParser.WITH);
this.state = 1296;
localctx.key = this.instance_expression(0);
this.state = 1297;
this.match(EParser.AS);
this.state = 1298;
this.key_token();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Argument_assignment_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_argument_assignment_list;
return this;
}
Argument_assignment_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Argument_assignment_listContext.prototype.constructor = Argument_assignment_listContext;
Argument_assignment_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ArgumentAssignmentListExpressionContext(parser, ctx) {
Argument_assignment_listContext.call(this, parser);
this.exp = null; // ExpressionContext;
this.items = null; // With_argument_assignment_listContext;
this.item = null; // Argument_assignmentContext;
Argument_assignment_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ArgumentAssignmentListExpressionContext.prototype = Object.create(Argument_assignment_listContext.prototype);
ArgumentAssignmentListExpressionContext.prototype.constructor = ArgumentAssignmentListExpressionContext;
ArgumentAssignmentListExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ArgumentAssignmentListExpressionContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
ArgumentAssignmentListExpressionContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
ArgumentAssignmentListExpressionContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ArgumentAssignmentListExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgumentAssignmentListExpression(this);
}
};
ArgumentAssignmentListExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgumentAssignmentListExpression(this);
}
};
function ArgumentAssignmentListNoExpressionContext(parser, ctx) {
Argument_assignment_listContext.call(this, parser);
this.items = null; // With_argument_assignment_listContext;
this.item = null; // Argument_assignmentContext;
Argument_assignment_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ArgumentAssignmentListNoExpressionContext.prototype = Object.create(Argument_assignment_listContext.prototype);
ArgumentAssignmentListNoExpressionContext.prototype.constructor = ArgumentAssignmentListNoExpressionContext;
ArgumentAssignmentListNoExpressionContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
ArgumentAssignmentListNoExpressionContext.prototype.AND = function() {
return this.getToken(EParser.AND, 0);
};
ArgumentAssignmentListNoExpressionContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ArgumentAssignmentListNoExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgumentAssignmentListNoExpression(this);
}
};
ArgumentAssignmentListNoExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgumentAssignmentListNoExpression(this);
}
};
EParser.prototype.argument_assignment_list = function() {
var localctx = new Argument_assignment_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 116, EParser.RULE_argument_assignment_list);
try {
this.state = 1316;
var la_ = this._interp.adaptivePredict(this._input,78,this._ctx);
switch(la_) {
case 1:
localctx = new ArgumentAssignmentListExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1302;
if (!( this.was(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.was(EParser.WS)");
}
this.state = 1303;
localctx.exp = this.expression(0);
this.state = 1309;
var la_ = this._interp.adaptivePredict(this._input,76,this._ctx);
if(la_===1) {
this.state = 1304;
localctx.items = this.with_argument_assignment_list(0);
this.state = 1307;
var la_ = this._interp.adaptivePredict(this._input,75,this._ctx);
if(la_===1) {
this.state = 1305;
this.match(EParser.AND);
this.state = 1306;
localctx.item = this.argument_assignment();
}
}
break;
case 2:
localctx = new ArgumentAssignmentListNoExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1311;
localctx.items = this.with_argument_assignment_list(0);
this.state = 1314;
var la_ = this._interp.adaptivePredict(this._input,77,this._ctx);
if(la_===1) {
this.state = 1312;
this.match(EParser.AND);
this.state = 1313;
localctx.item = this.argument_assignment();
}
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function With_argument_assignment_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_with_argument_assignment_list;
return this;
}
With_argument_assignment_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
With_argument_assignment_listContext.prototype.constructor = With_argument_assignment_listContext;
With_argument_assignment_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ArgumentAssignmentListContext(parser, ctx) {
With_argument_assignment_listContext.call(this, parser);
this.item = null; // Argument_assignmentContext;
With_argument_assignment_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ArgumentAssignmentListContext.prototype = Object.create(With_argument_assignment_listContext.prototype);
ArgumentAssignmentListContext.prototype.constructor = ArgumentAssignmentListContext;
ArgumentAssignmentListContext.prototype.WITH = function() {
return this.getToken(EParser.WITH, 0);
};
ArgumentAssignmentListContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ArgumentAssignmentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgumentAssignmentList(this);
}
};
ArgumentAssignmentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgumentAssignmentList(this);
}
};
function ArgumentAssignmentListItemContext(parser, ctx) {
With_argument_assignment_listContext.call(this, parser);
this.items = null; // With_argument_assignment_listContext;
this.item = null; // Argument_assignmentContext;
With_argument_assignment_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
ArgumentAssignmentListItemContext.prototype = Object.create(With_argument_assignment_listContext.prototype);
ArgumentAssignmentListItemContext.prototype.constructor = ArgumentAssignmentListItemContext;
ArgumentAssignmentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
ArgumentAssignmentListItemContext.prototype.with_argument_assignment_list = function() {
return this.getTypedRuleContext(With_argument_assignment_listContext,0);
};
ArgumentAssignmentListItemContext.prototype.argument_assignment = function() {
return this.getTypedRuleContext(Argument_assignmentContext,0);
};
ArgumentAssignmentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgumentAssignmentListItem(this);
}
};
ArgumentAssignmentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgumentAssignmentListItem(this);
}
};
EParser.prototype.with_argument_assignment_list = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new With_argument_assignment_listContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 118;
this.enterRecursionRule(localctx, 118, EParser.RULE_with_argument_assignment_list, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new ArgumentAssignmentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1319;
this.match(EParser.WITH);
this.state = 1320;
localctx.item = this.argument_assignment();
this._ctx.stop = this._input.LT(-1);
this.state = 1327;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,79,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new ArgumentAssignmentListItemContext(this, new With_argument_assignment_listContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_with_argument_assignment_list);
this.state = 1322;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1323;
this.match(EParser.COMMA);
this.state = 1324;
localctx.item = this.argument_assignment();
}
this.state = 1329;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,79,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Argument_assignmentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_argument_assignment;
this.exp = null; // ExpressionContext
this.name = null; // Variable_identifierContext
return this;
}
Argument_assignmentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Argument_assignmentContext.prototype.constructor = Argument_assignmentContext;
Argument_assignmentContext.prototype.AS = function() {
return this.getToken(EParser.AS, 0);
};
Argument_assignmentContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Argument_assignmentContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Argument_assignmentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgument_assignment(this);
}
};
Argument_assignmentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgument_assignment(this);
}
};
EParser.prototype.argument_assignment = function() {
var localctx = new Argument_assignmentContext(this, this._ctx, this.state);
this.enterRule(localctx, 120, EParser.RULE_argument_assignment);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1330;
localctx.exp = this.expression(0);
this.state = 1331;
this.match(EParser.AS);
this.state = 1332;
localctx.name = this.variable_identifier();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Assign_instance_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assign_instance_statement;
this.inst = null; // Assignable_instanceContext
this.exp = null; // ExpressionContext
return this;
}
Assign_instance_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Assign_instance_statementContext.prototype.constructor = Assign_instance_statementContext;
Assign_instance_statementContext.prototype.assign = function() {
return this.getTypedRuleContext(AssignContext,0);
};
Assign_instance_statementContext.prototype.assignable_instance = function() {
return this.getTypedRuleContext(Assignable_instanceContext,0);
};
Assign_instance_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Assign_instance_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssign_instance_statement(this);
}
};
Assign_instance_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssign_instance_statement(this);
}
};
EParser.prototype.assign_instance_statement = function() {
var localctx = new Assign_instance_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 122, EParser.RULE_assign_instance_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1334;
localctx.inst = this.assignable_instance(0);
this.state = 1335;
this.assign();
this.state = 1336;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Child_instanceContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_child_instance;
return this;
}
Child_instanceContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Child_instanceContext.prototype.constructor = Child_instanceContext;
Child_instanceContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function MemberInstanceContext(parser, ctx) {
Child_instanceContext.call(this, parser);
this.name = null; // Variable_identifierContext;
Child_instanceContext.prototype.copyFrom.call(this, ctx);
return this;
}
MemberInstanceContext.prototype = Object.create(Child_instanceContext.prototype);
MemberInstanceContext.prototype.constructor = MemberInstanceContext;
MemberInstanceContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
MemberInstanceContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
MemberInstanceContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMemberInstance(this);
}
};
MemberInstanceContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMemberInstance(this);
}
};
function ItemInstanceContext(parser, ctx) {
Child_instanceContext.call(this, parser);
this.exp = null; // ExpressionContext;
Child_instanceContext.prototype.copyFrom.call(this, ctx);
return this;
}
ItemInstanceContext.prototype = Object.create(Child_instanceContext.prototype);
ItemInstanceContext.prototype.constructor = ItemInstanceContext;
ItemInstanceContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
ItemInstanceContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
ItemInstanceContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ItemInstanceContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterItemInstance(this);
}
};
ItemInstanceContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitItemInstance(this);
}
};
EParser.prototype.child_instance = function() {
var localctx = new Child_instanceContext(this, this._ctx, this.state);
this.enterRule(localctx, 124, EParser.RULE_child_instance);
try {
this.state = 1346;
var la_ = this._interp.adaptivePredict(this._input,80,this._ctx);
switch(la_) {
case 1:
localctx = new MemberInstanceContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1338;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1339;
this.match(EParser.DOT);
this.state = 1340;
localctx.name = this.variable_identifier();
break;
case 2:
localctx = new ItemInstanceContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1341;
if (!( this.wasNot(EParser.WS))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.wasNot(EParser.WS)");
}
this.state = 1342;
this.match(EParser.LBRAK);
this.state = 1343;
localctx.exp = this.expression(0);
this.state = 1344;
this.match(EParser.RBRAK);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Assign_tuple_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assign_tuple_statement;
this.items = null; // Variable_identifier_listContext
this.exp = null; // ExpressionContext
return this;
}
Assign_tuple_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Assign_tuple_statementContext.prototype.constructor = Assign_tuple_statementContext;
Assign_tuple_statementContext.prototype.assign = function() {
return this.getTypedRuleContext(AssignContext,0);
};
Assign_tuple_statementContext.prototype.variable_identifier_list = function() {
return this.getTypedRuleContext(Variable_identifier_listContext,0);
};
Assign_tuple_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Assign_tuple_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssign_tuple_statement(this);
}
};
Assign_tuple_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssign_tuple_statement(this);
}
};
EParser.prototype.assign_tuple_statement = function() {
var localctx = new Assign_tuple_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 126, EParser.RULE_assign_tuple_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1348;
localctx.items = this.variable_identifier_list();
this.state = 1349;
this.assign();
this.state = 1350;
localctx.exp = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function LfsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_lfs;
return this;
}
LfsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
LfsContext.prototype.constructor = LfsContext;
LfsContext.prototype.LF = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.LF);
} else {
return this.getToken(EParser.LF, i);
}
};
LfsContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLfs(this);
}
};
LfsContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLfs(this);
}
};
EParser.prototype.lfs = function() {
var localctx = new LfsContext(this, this._ctx, this.state);
this.enterRule(localctx, 128, EParser.RULE_lfs);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1355;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,81,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1352;
this.match(EParser.LF);
}
this.state = 1357;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,81,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function LfpContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_lfp;
return this;
}
LfpContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
LfpContext.prototype.constructor = LfpContext;
LfpContext.prototype.LF = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.LF);
} else {
return this.getToken(EParser.LF, i);
}
};
LfpContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLfp(this);
}
};
LfpContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLfp(this);
}
};
EParser.prototype.lfp = function() {
var localctx = new LfpContext(this, this._ctx, this.state);
this.enterRule(localctx, 130, EParser.RULE_lfp);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1359;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
this.state = 1358;
this.match(EParser.LF);
this.state = 1361;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while(_la===EParser.LF);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function IndentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_indent;
return this;
}
IndentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
IndentContext.prototype.constructor = IndentContext;
IndentContext.prototype.INDENT = function() {
return this.getToken(EParser.INDENT, 0);
};
IndentContext.prototype.LF = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.LF);
} else {
return this.getToken(EParser.LF, i);
}
};
IndentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIndent(this);
}
};
IndentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIndent(this);
}
};
EParser.prototype.indent = function() {
var localctx = new IndentContext(this, this._ctx, this.state);
this.enterRule(localctx, 132, EParser.RULE_indent);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1364;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
this.state = 1363;
this.match(EParser.LF);
this.state = 1366;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while(_la===EParser.LF);
this.state = 1368;
this.match(EParser.INDENT);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function DedentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_dedent;
return this;
}
DedentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
DedentContext.prototype.constructor = DedentContext;
DedentContext.prototype.DEDENT = function() {
return this.getToken(EParser.DEDENT, 0);
};
DedentContext.prototype.LF = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.LF);
} else {
return this.getToken(EParser.LF, i);
}
};
DedentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDedent(this);
}
};
DedentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDedent(this);
}
};
EParser.prototype.dedent = function() {
var localctx = new DedentContext(this, this._ctx, this.state);
this.enterRule(localctx, 134, EParser.RULE_dedent);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1373;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.LF) {
this.state = 1370;
this.match(EParser.LF);
this.state = 1375;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 1376;
this.match(EParser.DEDENT);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Null_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_null_literal;
return this;
}
Null_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Null_literalContext.prototype.constructor = Null_literalContext;
Null_literalContext.prototype.NOTHING = function() {
return this.getToken(EParser.NOTHING, 0);
};
Null_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNull_literal(this);
}
};
Null_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNull_literal(this);
}
};
EParser.prototype.null_literal = function() {
var localctx = new Null_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 136, EParser.RULE_null_literal);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1378;
this.match(EParser.NOTHING);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Declaration_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_declaration_list;
return this;
}
Declaration_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Declaration_listContext.prototype.constructor = Declaration_listContext;
Declaration_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function FullDeclarationListContext(parser, ctx) {
Declaration_listContext.call(this, parser);
Declaration_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
FullDeclarationListContext.prototype = Object.create(Declaration_listContext.prototype);
FullDeclarationListContext.prototype.constructor = FullDeclarationListContext;
FullDeclarationListContext.prototype.lfs = function() {
return this.getTypedRuleContext(LfsContext,0);
};
FullDeclarationListContext.prototype.EOF = function() {
return this.getToken(EParser.EOF, 0);
};
FullDeclarationListContext.prototype.declarations = function() {
return this.getTypedRuleContext(DeclarationsContext,0);
};
FullDeclarationListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterFullDeclarationList(this);
}
};
FullDeclarationListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitFullDeclarationList(this);
}
};
EParser.prototype.declaration_list = function() {
var localctx = new Declaration_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 138, EParser.RULE_declaration_list);
var _la = 0; // Token type
try {
localctx = new FullDeclarationListContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1381;
_la = this._input.LA(1);
if(_la===EParser.COMMENT || _la===EParser.DEFINE) {
this.state = 1380;
this.declarations();
}
this.state = 1383;
this.lfs();
this.state = 1384;
this.match(EParser.EOF);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function DeclarationsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_declarations;
return this;
}
DeclarationsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
DeclarationsContext.prototype.constructor = DeclarationsContext;
DeclarationsContext.prototype.declaration = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(DeclarationContext);
} else {
return this.getTypedRuleContext(DeclarationContext,i);
}
};
DeclarationsContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
DeclarationsContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDeclarations(this);
}
};
DeclarationsContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDeclarations(this);
}
};
EParser.prototype.declarations = function() {
var localctx = new DeclarationsContext(this, this._ctx, this.state);
this.enterRule(localctx, 140, EParser.RULE_declarations);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1386;
this.declaration();
this.state = 1392;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,86,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1387;
this.lfp();
this.state = 1388;
this.declaration();
}
this.state = 1394;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,86,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function DeclarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_declaration;
return this;
}
DeclarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
DeclarationContext.prototype.constructor = DeclarationContext;
DeclarationContext.prototype.attribute_declaration = function() {
return this.getTypedRuleContext(Attribute_declarationContext,0);
};
DeclarationContext.prototype.category_declaration = function() {
return this.getTypedRuleContext(Category_declarationContext,0);
};
DeclarationContext.prototype.resource_declaration = function() {
return this.getTypedRuleContext(Resource_declarationContext,0);
};
DeclarationContext.prototype.enum_declaration = function() {
return this.getTypedRuleContext(Enum_declarationContext,0);
};
DeclarationContext.prototype.method_declaration = function() {
return this.getTypedRuleContext(Method_declarationContext,0);
};
DeclarationContext.prototype.comment_statement = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Comment_statementContext);
} else {
return this.getTypedRuleContext(Comment_statementContext,i);
}
};
DeclarationContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
DeclarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDeclaration(this);
}
};
DeclarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDeclaration(this);
}
};
EParser.prototype.declaration = function() {
var localctx = new DeclarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 142, EParser.RULE_declaration);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1400;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMENT) {
this.state = 1395;
this.comment_statement();
this.state = 1396;
this.lfp();
this.state = 1402;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 1408;
var la_ = this._interp.adaptivePredict(this._input,88,this._ctx);
switch(la_) {
case 1:
this.state = 1403;
this.attribute_declaration();
break;
case 2:
this.state = 1404;
this.category_declaration();
break;
case 3:
this.state = 1405;
this.resource_declaration();
break;
case 4:
this.state = 1406;
this.enum_declaration();
break;
case 5:
this.state = 1407;
this.method_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Resource_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_resource_declaration;
return this;
}
Resource_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Resource_declarationContext.prototype.constructor = Resource_declarationContext;
Resource_declarationContext.prototype.native_resource_declaration = function() {
return this.getTypedRuleContext(Native_resource_declarationContext,0);
};
Resource_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterResource_declaration(this);
}
};
Resource_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitResource_declaration(this);
}
};
EParser.prototype.resource_declaration = function() {
var localctx = new Resource_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 144, EParser.RULE_resource_declaration);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1410;
this.native_resource_declaration();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Enum_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_enum_declaration;
return this;
}
Enum_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Enum_declarationContext.prototype.constructor = Enum_declarationContext;
Enum_declarationContext.prototype.enum_category_declaration = function() {
return this.getTypedRuleContext(Enum_category_declarationContext,0);
};
Enum_declarationContext.prototype.enum_native_declaration = function() {
return this.getTypedRuleContext(Enum_native_declarationContext,0);
};
Enum_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterEnum_declaration(this);
}
};
Enum_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitEnum_declaration(this);
}
};
EParser.prototype.enum_declaration = function() {
var localctx = new Enum_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 146, EParser.RULE_enum_declaration);
try {
this.state = 1414;
var la_ = this._interp.adaptivePredict(this._input,89,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 1412;
this.enum_category_declaration();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 1413;
this.enum_native_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_symbol_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_symbol_list;
return this;
}
Native_symbol_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_symbol_listContext.prototype.constructor = Native_symbol_listContext;
Native_symbol_listContext.prototype.native_symbol = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Native_symbolContext);
} else {
return this.getTypedRuleContext(Native_symbolContext,i);
}
};
Native_symbol_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Native_symbol_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_symbol_list(this);
}
};
Native_symbol_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_symbol_list(this);
}
};
EParser.prototype.native_symbol_list = function() {
var localctx = new Native_symbol_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 148, EParser.RULE_native_symbol_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1416;
this.native_symbol();
this.state = 1422;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,90,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1417;
this.lfp();
this.state = 1418;
this.native_symbol();
}
this.state = 1424;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,90,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Category_symbol_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_category_symbol_list;
return this;
}
Category_symbol_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Category_symbol_listContext.prototype.constructor = Category_symbol_listContext;
Category_symbol_listContext.prototype.category_symbol = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Category_symbolContext);
} else {
return this.getTypedRuleContext(Category_symbolContext,i);
}
};
Category_symbol_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Category_symbol_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCategory_symbol_list(this);
}
};
Category_symbol_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCategory_symbol_list(this);
}
};
EParser.prototype.category_symbol_list = function() {
var localctx = new Category_symbol_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 150, EParser.RULE_category_symbol_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1425;
this.category_symbol();
this.state = 1431;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,91,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1426;
this.lfp();
this.state = 1427;
this.category_symbol();
}
this.state = 1433;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,91,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Symbol_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_symbol_list;
return this;
}
Symbol_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Symbol_listContext.prototype.constructor = Symbol_listContext;
Symbol_listContext.prototype.symbol_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Symbol_identifierContext);
} else {
return this.getTypedRuleContext(Symbol_identifierContext,i);
}
};
Symbol_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Symbol_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSymbol_list(this);
}
};
Symbol_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSymbol_list(this);
}
};
EParser.prototype.symbol_list = function() {
var localctx = new Symbol_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 152, EParser.RULE_symbol_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1434;
this.symbol_identifier();
this.state = 1439;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1435;
this.match(EParser.COMMA);
this.state = 1436;
this.symbol_identifier();
this.state = 1441;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Attribute_constraintContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_attribute_constraint;
return this;
}
Attribute_constraintContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Attribute_constraintContext.prototype.constructor = Attribute_constraintContext;
Attribute_constraintContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function MatchingSetContext(parser, ctx) {
Attribute_constraintContext.call(this, parser);
this.source = null; // Set_literalContext;
Attribute_constraintContext.prototype.copyFrom.call(this, ctx);
return this;
}
MatchingSetContext.prototype = Object.create(Attribute_constraintContext.prototype);
MatchingSetContext.prototype.constructor = MatchingSetContext;
MatchingSetContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
MatchingSetContext.prototype.set_literal = function() {
return this.getTypedRuleContext(Set_literalContext,0);
};
MatchingSetContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMatchingSet(this);
}
};
MatchingSetContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMatchingSet(this);
}
};
function MatchingPatternContext(parser, ctx) {
Attribute_constraintContext.call(this, parser);
this.text = null; // Token;
Attribute_constraintContext.prototype.copyFrom.call(this, ctx);
return this;
}
MatchingPatternContext.prototype = Object.create(Attribute_constraintContext.prototype);
MatchingPatternContext.prototype.constructor = MatchingPatternContext;
MatchingPatternContext.prototype.MATCHING = function() {
return this.getToken(EParser.MATCHING, 0);
};
MatchingPatternContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
MatchingPatternContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMatchingPattern(this);
}
};
MatchingPatternContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMatchingPattern(this);
}
};
function MatchingListContext(parser, ctx) {
Attribute_constraintContext.call(this, parser);
this.source = null; // List_literalContext;
Attribute_constraintContext.prototype.copyFrom.call(this, ctx);
return this;
}
MatchingListContext.prototype = Object.create(Attribute_constraintContext.prototype);
MatchingListContext.prototype.constructor = MatchingListContext;
MatchingListContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
MatchingListContext.prototype.list_literal = function() {
return this.getTypedRuleContext(List_literalContext,0);
};
MatchingListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMatchingList(this);
}
};
MatchingListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMatchingList(this);
}
};
function MatchingRangeContext(parser, ctx) {
Attribute_constraintContext.call(this, parser);
this.source = null; // Range_literalContext;
Attribute_constraintContext.prototype.copyFrom.call(this, ctx);
return this;
}
MatchingRangeContext.prototype = Object.create(Attribute_constraintContext.prototype);
MatchingRangeContext.prototype.constructor = MatchingRangeContext;
MatchingRangeContext.prototype.IN = function() {
return this.getToken(EParser.IN, 0);
};
MatchingRangeContext.prototype.range_literal = function() {
return this.getTypedRuleContext(Range_literalContext,0);
};
MatchingRangeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMatchingRange(this);
}
};
MatchingRangeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMatchingRange(this);
}
};
function MatchingExpressionContext(parser, ctx) {
Attribute_constraintContext.call(this, parser);
this.exp = null; // ExpressionContext;
Attribute_constraintContext.prototype.copyFrom.call(this, ctx);
return this;
}
MatchingExpressionContext.prototype = Object.create(Attribute_constraintContext.prototype);
MatchingExpressionContext.prototype.constructor = MatchingExpressionContext;
MatchingExpressionContext.prototype.MATCHING = function() {
return this.getToken(EParser.MATCHING, 0);
};
MatchingExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
MatchingExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMatchingExpression(this);
}
};
MatchingExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMatchingExpression(this);
}
};
EParser.prototype.attribute_constraint = function() {
var localctx = new Attribute_constraintContext(this, this._ctx, this.state);
this.enterRule(localctx, 154, EParser.RULE_attribute_constraint);
try {
this.state = 1452;
var la_ = this._interp.adaptivePredict(this._input,93,this._ctx);
switch(la_) {
case 1:
localctx = new MatchingListContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1442;
this.match(EParser.IN);
this.state = 1443;
localctx.source = this.list_literal();
break;
case 2:
localctx = new MatchingSetContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1444;
this.match(EParser.IN);
this.state = 1445;
localctx.source = this.set_literal();
break;
case 3:
localctx = new MatchingRangeContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1446;
this.match(EParser.IN);
this.state = 1447;
localctx.source = this.range_literal();
break;
case 4:
localctx = new MatchingPatternContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1448;
this.match(EParser.MATCHING);
this.state = 1449;
localctx.text = this.match(EParser.TEXT_LITERAL);
break;
case 5:
localctx = new MatchingExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1450;
this.match(EParser.MATCHING);
this.state = 1451;
localctx.exp = this.expression(0);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function List_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_list_literal;
return this;
}
List_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
List_literalContext.prototype.constructor = List_literalContext;
List_literalContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
List_literalContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
List_literalContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
List_literalContext.prototype.expression_list = function() {
return this.getTypedRuleContext(Expression_listContext,0);
};
List_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterList_literal(this);
}
};
List_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitList_literal(this);
}
};
EParser.prototype.list_literal = function() {
var localctx = new List_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 156, EParser.RULE_list_literal);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1455;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1454;
this.match(EParser.MUTABLE);
}
this.state = 1457;
this.match(EParser.LBRAK);
this.state = 1459;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1458;
this.expression_list();
}
this.state = 1461;
this.match(EParser.RBRAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Set_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_set_literal;
return this;
}
Set_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Set_literalContext.prototype.constructor = Set_literalContext;
Set_literalContext.prototype.LT = function() {
return this.getToken(EParser.LT, 0);
};
Set_literalContext.prototype.GT = function() {
return this.getToken(EParser.GT, 0);
};
Set_literalContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
Set_literalContext.prototype.expression_list = function() {
return this.getTypedRuleContext(Expression_listContext,0);
};
Set_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSet_literal(this);
}
};
Set_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSet_literal(this);
}
};
EParser.prototype.set_literal = function() {
var localctx = new Set_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 158, EParser.RULE_set_literal);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1464;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1463;
this.match(EParser.MUTABLE);
}
this.state = 1466;
this.match(EParser.LT);
this.state = 1468;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1467;
this.expression_list();
}
this.state = 1470;
this.match(EParser.GT);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Expression_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_expression_list;
return this;
}
Expression_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Expression_listContext.prototype.constructor = Expression_listContext;
Expression_listContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
Expression_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Expression_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterExpression_list(this);
}
};
Expression_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitExpression_list(this);
}
};
EParser.prototype.expression_list = function() {
var localctx = new Expression_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 160, EParser.RULE_expression_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1472;
this.expression(0);
this.state = 1477;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1473;
this.match(EParser.COMMA);
this.state = 1474;
this.expression(0);
this.state = 1479;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Range_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_range_literal;
this.low = null; // ExpressionContext
this.high = null; // ExpressionContext
return this;
}
Range_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Range_literalContext.prototype.constructor = Range_literalContext;
Range_literalContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
Range_literalContext.prototype.RANGE = function() {
return this.getToken(EParser.RANGE, 0);
};
Range_literalContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
Range_literalContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
Range_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRange_literal(this);
}
};
Range_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRange_literal(this);
}
};
EParser.prototype.range_literal = function() {
var localctx = new Range_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 162, EParser.RULE_range_literal);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1480;
this.match(EParser.LBRAK);
this.state = 1481;
localctx.low = this.expression(0);
this.state = 1482;
this.match(EParser.RANGE);
this.state = 1483;
localctx.high = this.expression(0);
this.state = 1484;
this.match(EParser.RBRAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function TypedefContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_typedef;
return this;
}
TypedefContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
TypedefContext.prototype.constructor = TypedefContext;
TypedefContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function IteratorTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.i = null; // TypedefContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
IteratorTypeContext.prototype = Object.create(TypedefContext.prototype);
IteratorTypeContext.prototype.constructor = IteratorTypeContext;
IteratorTypeContext.prototype.ITERATOR = function() {
return this.getToken(EParser.ITERATOR, 0);
};
IteratorTypeContext.prototype.LT = function() {
return this.getToken(EParser.LT, 0);
};
IteratorTypeContext.prototype.GT = function() {
return this.getToken(EParser.GT, 0);
};
IteratorTypeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
IteratorTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIteratorType(this);
}
};
IteratorTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIteratorType(this);
}
};
function SetTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.s = null; // TypedefContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
SetTypeContext.prototype = Object.create(TypedefContext.prototype);
SetTypeContext.prototype.constructor = SetTypeContext;
SetTypeContext.prototype.LTGT = function() {
return this.getToken(EParser.LTGT, 0);
};
SetTypeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
SetTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSetType(this);
}
};
SetTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSetType(this);
}
};
function ListTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.l = null; // TypedefContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
ListTypeContext.prototype = Object.create(TypedefContext.prototype);
ListTypeContext.prototype.constructor = ListTypeContext;
ListTypeContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
ListTypeContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
ListTypeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
ListTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterListType(this);
}
};
ListTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitListType(this);
}
};
function DictTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.d = null; // TypedefContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
DictTypeContext.prototype = Object.create(TypedefContext.prototype);
DictTypeContext.prototype.constructor = DictTypeContext;
DictTypeContext.prototype.LCURL = function() {
return this.getToken(EParser.LCURL, 0);
};
DictTypeContext.prototype.RCURL = function() {
return this.getToken(EParser.RCURL, 0);
};
DictTypeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
DictTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDictType(this);
}
};
DictTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDictType(this);
}
};
function CursorTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.c = null; // TypedefContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
CursorTypeContext.prototype = Object.create(TypedefContext.prototype);
CursorTypeContext.prototype.constructor = CursorTypeContext;
CursorTypeContext.prototype.CURSOR = function() {
return this.getToken(EParser.CURSOR, 0);
};
CursorTypeContext.prototype.LT = function() {
return this.getToken(EParser.LT, 0);
};
CursorTypeContext.prototype.GT = function() {
return this.getToken(EParser.GT, 0);
};
CursorTypeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
CursorTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCursorType(this);
}
};
CursorTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCursorType(this);
}
};
function PrimaryTypeContext(parser, ctx) {
TypedefContext.call(this, parser);
this.p = null; // Primary_typeContext;
TypedefContext.prototype.copyFrom.call(this, ctx);
return this;
}
PrimaryTypeContext.prototype = Object.create(TypedefContext.prototype);
PrimaryTypeContext.prototype.constructor = PrimaryTypeContext;
PrimaryTypeContext.prototype.primary_type = function() {
return this.getTypedRuleContext(Primary_typeContext,0);
};
PrimaryTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPrimaryType(this);
}
};
PrimaryTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPrimaryType(this);
}
};
EParser.prototype.typedef = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new TypedefContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 164;
this.enterRecursionRule(localctx, 164, EParser.RULE_typedef, _p);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1498;
switch(this._input.LA(1)) {
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.CODE:
case EParser.DOCUMENT:
case EParser.BLOB:
case EParser.IMAGE:
case EParser.UUID:
case EParser.TYPE_IDENTIFIER:
localctx = new PrimaryTypeContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1487;
localctx.p = this.primary_type();
break;
case EParser.CURSOR:
localctx = new CursorTypeContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1488;
this.match(EParser.CURSOR);
this.state = 1489;
this.match(EParser.LT);
this.state = 1490;
localctx.c = this.typedef(0);
this.state = 1491;
this.match(EParser.GT);
break;
case EParser.ITERATOR:
localctx = new IteratorTypeContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1493;
this.match(EParser.ITERATOR);
this.state = 1494;
this.match(EParser.LT);
this.state = 1495;
localctx.i = this.typedef(0);
this.state = 1496;
this.match(EParser.GT);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this._ctx.stop = this._input.LT(-1);
this.state = 1510;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,101,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
this.state = 1508;
var la_ = this._interp.adaptivePredict(this._input,100,this._ctx);
switch(la_) {
case 1:
localctx = new SetTypeContext(this, new TypedefContext(this, _parentctx, _parentState));
localctx.s = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_typedef);
this.state = 1500;
if (!( this.precpred(this._ctx, 5))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 5)");
}
this.state = 1501;
this.match(EParser.LTGT);
break;
case 2:
localctx = new ListTypeContext(this, new TypedefContext(this, _parentctx, _parentState));
localctx.l = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_typedef);
this.state = 1502;
if (!( this.precpred(this._ctx, 4))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 4)");
}
this.state = 1503;
this.match(EParser.LBRAK);
this.state = 1504;
this.match(EParser.RBRAK);
break;
case 3:
localctx = new DictTypeContext(this, new TypedefContext(this, _parentctx, _parentState));
localctx.d = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_typedef);
this.state = 1505;
if (!( this.precpred(this._ctx, 3))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 3)");
}
this.state = 1506;
this.match(EParser.LCURL);
this.state = 1507;
this.match(EParser.RCURL);
break;
}
}
this.state = 1512;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,101,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Primary_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_primary_type;
return this;
}
Primary_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Primary_typeContext.prototype.constructor = Primary_typeContext;
Primary_typeContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function NativeTypeContext(parser, ctx) {
Primary_typeContext.call(this, parser);
this.n = null; // Native_typeContext;
Primary_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
NativeTypeContext.prototype = Object.create(Primary_typeContext.prototype);
NativeTypeContext.prototype.constructor = NativeTypeContext;
NativeTypeContext.prototype.native_type = function() {
return this.getTypedRuleContext(Native_typeContext,0);
};
NativeTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNativeType(this);
}
};
NativeTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNativeType(this);
}
};
function CategoryTypeContext(parser, ctx) {
Primary_typeContext.call(this, parser);
this.c = null; // Category_typeContext;
Primary_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
CategoryTypeContext.prototype = Object.create(Primary_typeContext.prototype);
CategoryTypeContext.prototype.constructor = CategoryTypeContext;
CategoryTypeContext.prototype.category_type = function() {
return this.getTypedRuleContext(Category_typeContext,0);
};
CategoryTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCategoryType(this);
}
};
CategoryTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCategoryType(this);
}
};
EParser.prototype.primary_type = function() {
var localctx = new Primary_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 166, EParser.RULE_primary_type);
try {
this.state = 1515;
switch(this._input.LA(1)) {
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.CODE:
case EParser.DOCUMENT:
case EParser.BLOB:
case EParser.IMAGE:
case EParser.UUID:
localctx = new NativeTypeContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1513;
localctx.n = this.native_type();
break;
case EParser.TYPE_IDENTIFIER:
localctx = new CategoryTypeContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1514;
localctx.c = this.category_type();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_type;
return this;
}
Native_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_typeContext.prototype.constructor = Native_typeContext;
Native_typeContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PeriodTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
PeriodTypeContext.prototype = Object.create(Native_typeContext.prototype);
PeriodTypeContext.prototype.constructor = PeriodTypeContext;
PeriodTypeContext.prototype.PERIOD = function() {
return this.getToken(EParser.PERIOD, 0);
};
PeriodTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPeriodType(this);
}
};
PeriodTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPeriodType(this);
}
};
function BooleanTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
BooleanTypeContext.prototype = Object.create(Native_typeContext.prototype);
BooleanTypeContext.prototype.constructor = BooleanTypeContext;
BooleanTypeContext.prototype.BOOLEAN = function() {
return this.getToken(EParser.BOOLEAN, 0);
};
BooleanTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBooleanType(this);
}
};
BooleanTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBooleanType(this);
}
};
function DocumentTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
DocumentTypeContext.prototype = Object.create(Native_typeContext.prototype);
DocumentTypeContext.prototype.constructor = DocumentTypeContext;
DocumentTypeContext.prototype.DOCUMENT = function() {
return this.getToken(EParser.DOCUMENT, 0);
};
DocumentTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDocumentType(this);
}
};
DocumentTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDocumentType(this);
}
};
function CharacterTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
CharacterTypeContext.prototype = Object.create(Native_typeContext.prototype);
CharacterTypeContext.prototype.constructor = CharacterTypeContext;
CharacterTypeContext.prototype.CHARACTER = function() {
return this.getToken(EParser.CHARACTER, 0);
};
CharacterTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCharacterType(this);
}
};
CharacterTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCharacterType(this);
}
};
function TextTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
TextTypeContext.prototype = Object.create(Native_typeContext.prototype);
TextTypeContext.prototype.constructor = TextTypeContext;
TextTypeContext.prototype.TEXT = function() {
return this.getToken(EParser.TEXT, 0);
};
TextTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTextType(this);
}
};
TextTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTextType(this);
}
};
function ImageTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
ImageTypeContext.prototype = Object.create(Native_typeContext.prototype);
ImageTypeContext.prototype.constructor = ImageTypeContext;
ImageTypeContext.prototype.IMAGE = function() {
return this.getToken(EParser.IMAGE, 0);
};
ImageTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterImageType(this);
}
};
ImageTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitImageType(this);
}
};
function TimeTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
TimeTypeContext.prototype = Object.create(Native_typeContext.prototype);
TimeTypeContext.prototype.constructor = TimeTypeContext;
TimeTypeContext.prototype.TIME = function() {
return this.getToken(EParser.TIME, 0);
};
TimeTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTimeType(this);
}
};
TimeTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTimeType(this);
}
};
function IntegerTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
IntegerTypeContext.prototype = Object.create(Native_typeContext.prototype);
IntegerTypeContext.prototype.constructor = IntegerTypeContext;
IntegerTypeContext.prototype.INTEGER = function() {
return this.getToken(EParser.INTEGER, 0);
};
IntegerTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIntegerType(this);
}
};
IntegerTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIntegerType(this);
}
};
function DateTimeTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
DateTimeTypeContext.prototype = Object.create(Native_typeContext.prototype);
DateTimeTypeContext.prototype.constructor = DateTimeTypeContext;
DateTimeTypeContext.prototype.DATETIME = function() {
return this.getToken(EParser.DATETIME, 0);
};
DateTimeTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDateTimeType(this);
}
};
DateTimeTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDateTimeType(this);
}
};
function BlobTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
BlobTypeContext.prototype = Object.create(Native_typeContext.prototype);
BlobTypeContext.prototype.constructor = BlobTypeContext;
BlobTypeContext.prototype.BLOB = function() {
return this.getToken(EParser.BLOB, 0);
};
BlobTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBlobType(this);
}
};
BlobTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBlobType(this);
}
};
function UUIDTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
UUIDTypeContext.prototype = Object.create(Native_typeContext.prototype);
UUIDTypeContext.prototype.constructor = UUIDTypeContext;
UUIDTypeContext.prototype.UUID = function() {
return this.getToken(EParser.UUID, 0);
};
UUIDTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUUIDType(this);
}
};
UUIDTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUUIDType(this);
}
};
function DecimalTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
DecimalTypeContext.prototype = Object.create(Native_typeContext.prototype);
DecimalTypeContext.prototype.constructor = DecimalTypeContext;
DecimalTypeContext.prototype.DECIMAL = function() {
return this.getToken(EParser.DECIMAL, 0);
};
DecimalTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDecimalType(this);
}
};
DecimalTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDecimalType(this);
}
};
function CodeTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
CodeTypeContext.prototype = Object.create(Native_typeContext.prototype);
CodeTypeContext.prototype.constructor = CodeTypeContext;
CodeTypeContext.prototype.CODE = function() {
return this.getToken(EParser.CODE, 0);
};
CodeTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCodeType(this);
}
};
CodeTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCodeType(this);
}
};
function DateTypeContext(parser, ctx) {
Native_typeContext.call(this, parser);
Native_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
DateTypeContext.prototype = Object.create(Native_typeContext.prototype);
DateTypeContext.prototype.constructor = DateTypeContext;
DateTypeContext.prototype.DATE = function() {
return this.getToken(EParser.DATE, 0);
};
DateTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDateType(this);
}
};
DateTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDateType(this);
}
};
EParser.prototype.native_type = function() {
var localctx = new Native_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 168, EParser.RULE_native_type);
try {
this.state = 1531;
switch(this._input.LA(1)) {
case EParser.BOOLEAN:
localctx = new BooleanTypeContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1517;
this.match(EParser.BOOLEAN);
break;
case EParser.CHARACTER:
localctx = new CharacterTypeContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1518;
this.match(EParser.CHARACTER);
break;
case EParser.TEXT:
localctx = new TextTypeContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1519;
this.match(EParser.TEXT);
break;
case EParser.IMAGE:
localctx = new ImageTypeContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1520;
this.match(EParser.IMAGE);
break;
case EParser.INTEGER:
localctx = new IntegerTypeContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1521;
this.match(EParser.INTEGER);
break;
case EParser.DECIMAL:
localctx = new DecimalTypeContext(this, localctx);
this.enterOuterAlt(localctx, 6);
this.state = 1522;
this.match(EParser.DECIMAL);
break;
case EParser.DOCUMENT:
localctx = new DocumentTypeContext(this, localctx);
this.enterOuterAlt(localctx, 7);
this.state = 1523;
this.match(EParser.DOCUMENT);
break;
case EParser.DATE:
localctx = new DateTypeContext(this, localctx);
this.enterOuterAlt(localctx, 8);
this.state = 1524;
this.match(EParser.DATE);
break;
case EParser.DATETIME:
localctx = new DateTimeTypeContext(this, localctx);
this.enterOuterAlt(localctx, 9);
this.state = 1525;
this.match(EParser.DATETIME);
break;
case EParser.TIME:
localctx = new TimeTypeContext(this, localctx);
this.enterOuterAlt(localctx, 10);
this.state = 1526;
this.match(EParser.TIME);
break;
case EParser.PERIOD:
localctx = new PeriodTypeContext(this, localctx);
this.enterOuterAlt(localctx, 11);
this.state = 1527;
this.match(EParser.PERIOD);
break;
case EParser.CODE:
localctx = new CodeTypeContext(this, localctx);
this.enterOuterAlt(localctx, 12);
this.state = 1528;
this.match(EParser.CODE);
break;
case EParser.BLOB:
localctx = new BlobTypeContext(this, localctx);
this.enterOuterAlt(localctx, 13);
this.state = 1529;
this.match(EParser.BLOB);
break;
case EParser.UUID:
localctx = new UUIDTypeContext(this, localctx);
this.enterOuterAlt(localctx, 14);
this.state = 1530;
this.match(EParser.UUID);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Category_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_category_type;
this.t1 = null; // Token
return this;
}
Category_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Category_typeContext.prototype.constructor = Category_typeContext;
Category_typeContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Category_typeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCategory_type(this);
}
};
Category_typeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCategory_type(this);
}
};
EParser.prototype.category_type = function() {
var localctx = new Category_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 170, EParser.RULE_category_type);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1533;
localctx.t1 = this.match(EParser.TYPE_IDENTIFIER);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Mutable_category_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_mutable_category_type;
return this;
}
Mutable_category_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Mutable_category_typeContext.prototype.constructor = Mutable_category_typeContext;
Mutable_category_typeContext.prototype.category_type = function() {
return this.getTypedRuleContext(Category_typeContext,0);
};
Mutable_category_typeContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
Mutable_category_typeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMutable_category_type(this);
}
};
Mutable_category_typeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMutable_category_type(this);
}
};
EParser.prototype.mutable_category_type = function() {
var localctx = new Mutable_category_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 172, EParser.RULE_mutable_category_type);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1536;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1535;
this.match(EParser.MUTABLE);
}
this.state = 1538;
this.category_type();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Code_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_code_type;
this.t1 = null; // Token
return this;
}
Code_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Code_typeContext.prototype.constructor = Code_typeContext;
Code_typeContext.prototype.CODE = function() {
return this.getToken(EParser.CODE, 0);
};
Code_typeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCode_type(this);
}
};
Code_typeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCode_type(this);
}
};
EParser.prototype.code_type = function() {
var localctx = new Code_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 174, EParser.RULE_code_type);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1540;
localctx.t1 = this.match(EParser.CODE);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Category_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_category_declaration;
return this;
}
Category_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Category_declarationContext.prototype.constructor = Category_declarationContext;
Category_declarationContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ConcreteCategoryDeclarationContext(parser, ctx) {
Category_declarationContext.call(this, parser);
this.decl = null; // Concrete_category_declarationContext;
Category_declarationContext.prototype.copyFrom.call(this, ctx);
return this;
}
ConcreteCategoryDeclarationContext.prototype = Object.create(Category_declarationContext.prototype);
ConcreteCategoryDeclarationContext.prototype.constructor = ConcreteCategoryDeclarationContext;
ConcreteCategoryDeclarationContext.prototype.concrete_category_declaration = function() {
return this.getTypedRuleContext(Concrete_category_declarationContext,0);
};
ConcreteCategoryDeclarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterConcreteCategoryDeclaration(this);
}
};
ConcreteCategoryDeclarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitConcreteCategoryDeclaration(this);
}
};
function NativeCategoryDeclarationContext(parser, ctx) {
Category_declarationContext.call(this, parser);
this.decl = null; // Native_category_declarationContext;
Category_declarationContext.prototype.copyFrom.call(this, ctx);
return this;
}
NativeCategoryDeclarationContext.prototype = Object.create(Category_declarationContext.prototype);
NativeCategoryDeclarationContext.prototype.constructor = NativeCategoryDeclarationContext;
NativeCategoryDeclarationContext.prototype.native_category_declaration = function() {
return this.getTypedRuleContext(Native_category_declarationContext,0);
};
NativeCategoryDeclarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNativeCategoryDeclaration(this);
}
};
NativeCategoryDeclarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNativeCategoryDeclaration(this);
}
};
function SingletonCategoryDeclarationContext(parser, ctx) {
Category_declarationContext.call(this, parser);
this.decl = null; // Singleton_category_declarationContext;
Category_declarationContext.prototype.copyFrom.call(this, ctx);
return this;
}
SingletonCategoryDeclarationContext.prototype = Object.create(Category_declarationContext.prototype);
SingletonCategoryDeclarationContext.prototype.constructor = SingletonCategoryDeclarationContext;
SingletonCategoryDeclarationContext.prototype.singleton_category_declaration = function() {
return this.getTypedRuleContext(Singleton_category_declarationContext,0);
};
SingletonCategoryDeclarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSingletonCategoryDeclaration(this);
}
};
SingletonCategoryDeclarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSingletonCategoryDeclaration(this);
}
};
EParser.prototype.category_declaration = function() {
var localctx = new Category_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 176, EParser.RULE_category_declaration);
try {
this.state = 1545;
var la_ = this._interp.adaptivePredict(this._input,105,this._ctx);
switch(la_) {
case 1:
localctx = new ConcreteCategoryDeclarationContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1542;
localctx.decl = this.concrete_category_declaration();
break;
case 2:
localctx = new NativeCategoryDeclarationContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1543;
localctx.decl = this.native_category_declaration();
break;
case 3:
localctx = new SingletonCategoryDeclarationContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1544;
localctx.decl = this.singleton_category_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Type_identifier_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_type_identifier_list;
return this;
}
Type_identifier_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Type_identifier_listContext.prototype.constructor = Type_identifier_listContext;
Type_identifier_listContext.prototype.type_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Type_identifierContext);
} else {
return this.getTypedRuleContext(Type_identifierContext,i);
}
};
Type_identifier_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Type_identifier_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterType_identifier_list(this);
}
};
Type_identifier_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitType_identifier_list(this);
}
};
EParser.prototype.type_identifier_list = function() {
var localctx = new Type_identifier_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 178, EParser.RULE_type_identifier_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1547;
this.type_identifier();
this.state = 1552;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1548;
this.match(EParser.COMMA);
this.state = 1549;
this.type_identifier();
this.state = 1554;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Method_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_method_identifier;
return this;
}
Method_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Method_identifierContext.prototype.constructor = Method_identifierContext;
Method_identifierContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Method_identifierContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
Method_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMethod_identifier(this);
}
};
Method_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMethod_identifier(this);
}
};
EParser.prototype.method_identifier = function() {
var localctx = new Method_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 180, EParser.RULE_method_identifier);
try {
this.state = 1557;
switch(this._input.LA(1)) {
case EParser.VARIABLE_IDENTIFIER:
this.enterOuterAlt(localctx, 1);
this.state = 1555;
this.variable_identifier();
break;
case EParser.TYPE_IDENTIFIER:
this.enterOuterAlt(localctx, 2);
this.state = 1556;
this.type_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function IdentifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_identifier;
return this;
}
IdentifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
IdentifierContext.prototype.constructor = IdentifierContext;
IdentifierContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function TypeIdentifierContext(parser, ctx) {
IdentifierContext.call(this, parser);
IdentifierContext.prototype.copyFrom.call(this, ctx);
return this;
}
TypeIdentifierContext.prototype = Object.create(IdentifierContext.prototype);
TypeIdentifierContext.prototype.constructor = TypeIdentifierContext;
TypeIdentifierContext.prototype.type_identifier = function() {
return this.getTypedRuleContext(Type_identifierContext,0);
};
TypeIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTypeIdentifier(this);
}
};
TypeIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTypeIdentifier(this);
}
};
function SymbolIdentifierContext(parser, ctx) {
IdentifierContext.call(this, parser);
IdentifierContext.prototype.copyFrom.call(this, ctx);
return this;
}
SymbolIdentifierContext.prototype = Object.create(IdentifierContext.prototype);
SymbolIdentifierContext.prototype.constructor = SymbolIdentifierContext;
SymbolIdentifierContext.prototype.symbol_identifier = function() {
return this.getTypedRuleContext(Symbol_identifierContext,0);
};
SymbolIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSymbolIdentifier(this);
}
};
SymbolIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSymbolIdentifier(this);
}
};
function VariableIdentifierContext(parser, ctx) {
IdentifierContext.call(this, parser);
IdentifierContext.prototype.copyFrom.call(this, ctx);
return this;
}
VariableIdentifierContext.prototype = Object.create(IdentifierContext.prototype);
VariableIdentifierContext.prototype.constructor = VariableIdentifierContext;
VariableIdentifierContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
VariableIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterVariableIdentifier(this);
}
};
VariableIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitVariableIdentifier(this);
}
};
EParser.prototype.identifier = function() {
var localctx = new IdentifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 182, EParser.RULE_identifier);
try {
this.state = 1562;
switch(this._input.LA(1)) {
case EParser.VARIABLE_IDENTIFIER:
localctx = new VariableIdentifierContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1559;
this.variable_identifier();
break;
case EParser.TYPE_IDENTIFIER:
localctx = new TypeIdentifierContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1560;
this.type_identifier();
break;
case EParser.SYMBOL_IDENTIFIER:
localctx = new SymbolIdentifierContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1561;
this.symbol_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Variable_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_variable_identifier;
return this;
}
Variable_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Variable_identifierContext.prototype.constructor = Variable_identifierContext;
Variable_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Variable_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterVariable_identifier(this);
}
};
Variable_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitVariable_identifier(this);
}
};
EParser.prototype.variable_identifier = function() {
var localctx = new Variable_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 184, EParser.RULE_variable_identifier);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1564;
this.match(EParser.VARIABLE_IDENTIFIER);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Attribute_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_attribute_identifier;
return this;
}
Attribute_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Attribute_identifierContext.prototype.constructor = Attribute_identifierContext;
Attribute_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Attribute_identifierContext.prototype.STORABLE = function() {
return this.getToken(EParser.STORABLE, 0);
};
Attribute_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAttribute_identifier(this);
}
};
Attribute_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAttribute_identifier(this);
}
};
EParser.prototype.attribute_identifier = function() {
var localctx = new Attribute_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 186, EParser.RULE_attribute_identifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1566;
_la = this._input.LA(1);
if(!(_la===EParser.STORABLE || _la===EParser.VARIABLE_IDENTIFIER)) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Type_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_type_identifier;
return this;
}
Type_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Type_identifierContext.prototype.constructor = Type_identifierContext;
Type_identifierContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Type_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterType_identifier(this);
}
};
Type_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitType_identifier(this);
}
};
EParser.prototype.type_identifier = function() {
var localctx = new Type_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 188, EParser.RULE_type_identifier);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1568;
this.match(EParser.TYPE_IDENTIFIER);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Symbol_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_symbol_identifier;
return this;
}
Symbol_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Symbol_identifierContext.prototype.constructor = Symbol_identifierContext;
Symbol_identifierContext.prototype.SYMBOL_IDENTIFIER = function() {
return this.getToken(EParser.SYMBOL_IDENTIFIER, 0);
};
Symbol_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSymbol_identifier(this);
}
};
Symbol_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSymbol_identifier(this);
}
};
EParser.prototype.symbol_identifier = function() {
var localctx = new Symbol_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 190, EParser.RULE_symbol_identifier);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1570;
this.match(EParser.SYMBOL_IDENTIFIER);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Argument_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_argument_list;
return this;
}
Argument_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Argument_listContext.prototype.constructor = Argument_listContext;
Argument_listContext.prototype.argument = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ArgumentContext);
} else {
return this.getTypedRuleContext(ArgumentContext,i);
}
};
Argument_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Argument_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterArgument_list(this);
}
};
Argument_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitArgument_list(this);
}
};
EParser.prototype.argument_list = function() {
var localctx = new Argument_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 192, EParser.RULE_argument_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1572;
this.argument();
this.state = 1577;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1573;
this.match(EParser.COMMA);
this.state = 1574;
this.argument();
this.state = 1579;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function ArgumentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_argument;
return this;
}
ArgumentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ArgumentContext.prototype.constructor = ArgumentContext;
ArgumentContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function OperatorArgumentContext(parser, ctx) {
ArgumentContext.call(this, parser);
this.arg = null; // Operator_argumentContext;
ArgumentContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorArgumentContext.prototype = Object.create(ArgumentContext.prototype);
OperatorArgumentContext.prototype.constructor = OperatorArgumentContext;
OperatorArgumentContext.prototype.operator_argument = function() {
return this.getTypedRuleContext(Operator_argumentContext,0);
};
OperatorArgumentContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
OperatorArgumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorArgument(this);
}
};
OperatorArgumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorArgument(this);
}
};
function CodeArgumentContext(parser, ctx) {
ArgumentContext.call(this, parser);
this.arg = null; // Code_argumentContext;
ArgumentContext.prototype.copyFrom.call(this, ctx);
return this;
}
CodeArgumentContext.prototype = Object.create(ArgumentContext.prototype);
CodeArgumentContext.prototype.constructor = CodeArgumentContext;
CodeArgumentContext.prototype.code_argument = function() {
return this.getTypedRuleContext(Code_argumentContext,0);
};
CodeArgumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCodeArgument(this);
}
};
CodeArgumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCodeArgument(this);
}
};
EParser.prototype.argument = function() {
var localctx = new ArgumentContext(this, this._ctx, this.state);
this.enterRule(localctx, 194, EParser.RULE_argument);
var _la = 0; // Token type
try {
this.state = 1585;
var la_ = this._interp.adaptivePredict(this._input,111,this._ctx);
switch(la_) {
case 1:
localctx = new CodeArgumentContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1580;
localctx.arg = this.code_argument();
break;
case 2:
localctx = new OperatorArgumentContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1582;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1581;
this.match(EParser.MUTABLE);
}
this.state = 1584;
localctx.arg = this.operator_argument();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Operator_argumentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_operator_argument;
return this;
}
Operator_argumentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Operator_argumentContext.prototype.constructor = Operator_argumentContext;
Operator_argumentContext.prototype.named_argument = function() {
return this.getTypedRuleContext(Named_argumentContext,0);
};
Operator_argumentContext.prototype.typed_argument = function() {
return this.getTypedRuleContext(Typed_argumentContext,0);
};
Operator_argumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperator_argument(this);
}
};
Operator_argumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperator_argument(this);
}
};
EParser.prototype.operator_argument = function() {
var localctx = new Operator_argumentContext(this, this._ctx, this.state);
this.enterRule(localctx, 196, EParser.RULE_operator_argument);
try {
this.state = 1589;
switch(this._input.LA(1)) {
case EParser.VARIABLE_IDENTIFIER:
this.enterOuterAlt(localctx, 1);
this.state = 1587;
this.named_argument();
break;
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.CODE:
case EParser.DOCUMENT:
case EParser.BLOB:
case EParser.IMAGE:
case EParser.UUID:
case EParser.ITERATOR:
case EParser.CURSOR:
case EParser.ANY:
case EParser.TYPE_IDENTIFIER:
this.enterOuterAlt(localctx, 2);
this.state = 1588;
this.typed_argument();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Named_argumentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_named_argument;
return this;
}
Named_argumentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Named_argumentContext.prototype.constructor = Named_argumentContext;
Named_argumentContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Named_argumentContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
Named_argumentContext.prototype.literal_expression = function() {
return this.getTypedRuleContext(Literal_expressionContext,0);
};
Named_argumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNamed_argument(this);
}
};
Named_argumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNamed_argument(this);
}
};
EParser.prototype.named_argument = function() {
var localctx = new Named_argumentContext(this, this._ctx, this.state);
this.enterRule(localctx, 198, EParser.RULE_named_argument);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1591;
this.variable_identifier();
this.state = 1594;
_la = this._input.LA(1);
if(_la===EParser.EQ) {
this.state = 1592;
this.match(EParser.EQ);
this.state = 1593;
this.literal_expression();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Code_argumentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_code_argument;
this.name = null; // Variable_identifierContext
return this;
}
Code_argumentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Code_argumentContext.prototype.constructor = Code_argumentContext;
Code_argumentContext.prototype.code_type = function() {
return this.getTypedRuleContext(Code_typeContext,0);
};
Code_argumentContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Code_argumentContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCode_argument(this);
}
};
Code_argumentContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCode_argument(this);
}
};
EParser.prototype.code_argument = function() {
var localctx = new Code_argumentContext(this, this._ctx, this.state);
this.enterRule(localctx, 200, EParser.RULE_code_argument);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1596;
this.code_type();
this.state = 1597;
localctx.name = this.variable_identifier();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Category_or_any_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_category_or_any_type;
return this;
}
Category_or_any_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Category_or_any_typeContext.prototype.constructor = Category_or_any_typeContext;
Category_or_any_typeContext.prototype.typedef = function() {
return this.getTypedRuleContext(TypedefContext,0);
};
Category_or_any_typeContext.prototype.any_type = function() {
return this.getTypedRuleContext(Any_typeContext,0);
};
Category_or_any_typeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCategory_or_any_type(this);
}
};
Category_or_any_typeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCategory_or_any_type(this);
}
};
EParser.prototype.category_or_any_type = function() {
var localctx = new Category_or_any_typeContext(this, this._ctx, this.state);
this.enterRule(localctx, 202, EParser.RULE_category_or_any_type);
try {
this.state = 1601;
switch(this._input.LA(1)) {
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.CODE:
case EParser.DOCUMENT:
case EParser.BLOB:
case EParser.IMAGE:
case EParser.UUID:
case EParser.ITERATOR:
case EParser.CURSOR:
case EParser.TYPE_IDENTIFIER:
this.enterOuterAlt(localctx, 1);
this.state = 1599;
this.typedef(0);
break;
case EParser.ANY:
this.enterOuterAlt(localctx, 2);
this.state = 1600;
this.any_type(0);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Any_typeContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_any_type;
return this;
}
Any_typeContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Any_typeContext.prototype.constructor = Any_typeContext;
Any_typeContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function AnyListTypeContext(parser, ctx) {
Any_typeContext.call(this, parser);
Any_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
AnyListTypeContext.prototype = Object.create(Any_typeContext.prototype);
AnyListTypeContext.prototype.constructor = AnyListTypeContext;
AnyListTypeContext.prototype.any_type = function() {
return this.getTypedRuleContext(Any_typeContext,0);
};
AnyListTypeContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
AnyListTypeContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
AnyListTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAnyListType(this);
}
};
AnyListTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAnyListType(this);
}
};
function AnyTypeContext(parser, ctx) {
Any_typeContext.call(this, parser);
Any_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
AnyTypeContext.prototype = Object.create(Any_typeContext.prototype);
AnyTypeContext.prototype.constructor = AnyTypeContext;
AnyTypeContext.prototype.ANY = function() {
return this.getToken(EParser.ANY, 0);
};
AnyTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAnyType(this);
}
};
AnyTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAnyType(this);
}
};
function AnyDictTypeContext(parser, ctx) {
Any_typeContext.call(this, parser);
Any_typeContext.prototype.copyFrom.call(this, ctx);
return this;
}
AnyDictTypeContext.prototype = Object.create(Any_typeContext.prototype);
AnyDictTypeContext.prototype.constructor = AnyDictTypeContext;
AnyDictTypeContext.prototype.any_type = function() {
return this.getTypedRuleContext(Any_typeContext,0);
};
AnyDictTypeContext.prototype.LCURL = function() {
return this.getToken(EParser.LCURL, 0);
};
AnyDictTypeContext.prototype.RCURL = function() {
return this.getToken(EParser.RCURL, 0);
};
AnyDictTypeContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAnyDictType(this);
}
};
AnyDictTypeContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAnyDictType(this);
}
};
EParser.prototype.any_type = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Any_typeContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 204;
this.enterRecursionRule(localctx, 204, EParser.RULE_any_type, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new AnyTypeContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1604;
this.match(EParser.ANY);
this._ctx.stop = this._input.LT(-1);
this.state = 1614;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,116,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
this.state = 1612;
var la_ = this._interp.adaptivePredict(this._input,115,this._ctx);
switch(la_) {
case 1:
localctx = new AnyListTypeContext(this, new Any_typeContext(this, _parentctx, _parentState));
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_any_type);
this.state = 1606;
if (!( this.precpred(this._ctx, 2))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 2)");
}
this.state = 1607;
this.match(EParser.LBRAK);
this.state = 1608;
this.match(EParser.RBRAK);
break;
case 2:
localctx = new AnyDictTypeContext(this, new Any_typeContext(this, _parentctx, _parentState));
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_any_type);
this.state = 1609;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1610;
this.match(EParser.LCURL);
this.state = 1611;
this.match(EParser.RCURL);
break;
}
}
this.state = 1616;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,116,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Member_method_declaration_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_member_method_declaration_list;
return this;
}
Member_method_declaration_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Member_method_declaration_listContext.prototype.constructor = Member_method_declaration_listContext;
Member_method_declaration_listContext.prototype.member_method_declaration = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Member_method_declarationContext);
} else {
return this.getTypedRuleContext(Member_method_declarationContext,i);
}
};
Member_method_declaration_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Member_method_declaration_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMember_method_declaration_list(this);
}
};
Member_method_declaration_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMember_method_declaration_list(this);
}
};
EParser.prototype.member_method_declaration_list = function() {
var localctx = new Member_method_declaration_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 206, EParser.RULE_member_method_declaration_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1617;
this.member_method_declaration();
this.state = 1623;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,117,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1618;
this.lfp();
this.state = 1619;
this.member_method_declaration();
}
this.state = 1625;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,117,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Member_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_member_method_declaration;
return this;
}
Member_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Member_method_declarationContext.prototype.constructor = Member_method_declarationContext;
Member_method_declarationContext.prototype.setter_method_declaration = function() {
return this.getTypedRuleContext(Setter_method_declarationContext,0);
};
Member_method_declarationContext.prototype.getter_method_declaration = function() {
return this.getTypedRuleContext(Getter_method_declarationContext,0);
};
Member_method_declarationContext.prototype.concrete_method_declaration = function() {
return this.getTypedRuleContext(Concrete_method_declarationContext,0);
};
Member_method_declarationContext.prototype.abstract_method_declaration = function() {
return this.getTypedRuleContext(Abstract_method_declarationContext,0);
};
Member_method_declarationContext.prototype.operator_method_declaration = function() {
return this.getTypedRuleContext(Operator_method_declarationContext,0);
};
Member_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMember_method_declaration(this);
}
};
Member_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMember_method_declaration(this);
}
};
EParser.prototype.member_method_declaration = function() {
var localctx = new Member_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 208, EParser.RULE_member_method_declaration);
try {
this.state = 1631;
var la_ = this._interp.adaptivePredict(this._input,118,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 1626;
this.setter_method_declaration();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 1627;
this.getter_method_declaration();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 1628;
this.concrete_method_declaration();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 1629;
this.abstract_method_declaration();
break;
case 5:
this.enterOuterAlt(localctx, 5);
this.state = 1630;
this.operator_method_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_member_method_declaration_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_member_method_declaration_list;
return this;
}
Native_member_method_declaration_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_member_method_declaration_listContext.prototype.constructor = Native_member_method_declaration_listContext;
Native_member_method_declaration_listContext.prototype.native_member_method_declaration = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Native_member_method_declarationContext);
} else {
return this.getTypedRuleContext(Native_member_method_declarationContext,i);
}
};
Native_member_method_declaration_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Native_member_method_declaration_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_member_method_declaration_list(this);
}
};
Native_member_method_declaration_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_member_method_declaration_list(this);
}
};
EParser.prototype.native_member_method_declaration_list = function() {
var localctx = new Native_member_method_declaration_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 210, EParser.RULE_native_member_method_declaration_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1633;
this.native_member_method_declaration();
this.state = 1639;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,119,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1634;
this.lfp();
this.state = 1635;
this.native_member_method_declaration();
}
this.state = 1641;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,119,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_member_method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_member_method_declaration;
return this;
}
Native_member_method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_member_method_declarationContext.prototype.constructor = Native_member_method_declarationContext;
Native_member_method_declarationContext.prototype.native_getter_declaration = function() {
return this.getTypedRuleContext(Native_getter_declarationContext,0);
};
Native_member_method_declarationContext.prototype.native_setter_declaration = function() {
return this.getTypedRuleContext(Native_setter_declarationContext,0);
};
Native_member_method_declarationContext.prototype.native_method_declaration = function() {
return this.getTypedRuleContext(Native_method_declarationContext,0);
};
Native_member_method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_member_method_declaration(this);
}
};
Native_member_method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_member_method_declaration(this);
}
};
EParser.prototype.native_member_method_declaration = function() {
var localctx = new Native_member_method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 212, EParser.RULE_native_member_method_declaration);
try {
this.state = 1645;
var la_ = this._interp.adaptivePredict(this._input,120,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 1642;
this.native_getter_declaration();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 1643;
this.native_setter_declaration();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 1644;
this.native_method_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_category_bindingContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_category_binding;
return this;
}
Native_category_bindingContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_category_bindingContext.prototype.constructor = Native_category_bindingContext;
Native_category_bindingContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function Python2CategoryBindingContext(parser, ctx) {
Native_category_bindingContext.call(this, parser);
this.binding = null; // Python_category_bindingContext;
Native_category_bindingContext.prototype.copyFrom.call(this, ctx);
return this;
}
Python2CategoryBindingContext.prototype = Object.create(Native_category_bindingContext.prototype);
Python2CategoryBindingContext.prototype.constructor = Python2CategoryBindingContext;
Python2CategoryBindingContext.prototype.PYTHON2 = function() {
return this.getToken(EParser.PYTHON2, 0);
};
Python2CategoryBindingContext.prototype.python_category_binding = function() {
return this.getTypedRuleContext(Python_category_bindingContext,0);
};
Python2CategoryBindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython2CategoryBinding(this);
}
};
Python2CategoryBindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython2CategoryBinding(this);
}
};
function Python3CategoryBindingContext(parser, ctx) {
Native_category_bindingContext.call(this, parser);
this.binding = null; // Python_category_bindingContext;
Native_category_bindingContext.prototype.copyFrom.call(this, ctx);
return this;
}
Python3CategoryBindingContext.prototype = Object.create(Native_category_bindingContext.prototype);
Python3CategoryBindingContext.prototype.constructor = Python3CategoryBindingContext;
Python3CategoryBindingContext.prototype.PYTHON3 = function() {
return this.getToken(EParser.PYTHON3, 0);
};
Python3CategoryBindingContext.prototype.python_category_binding = function() {
return this.getTypedRuleContext(Python_category_bindingContext,0);
};
Python3CategoryBindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython3CategoryBinding(this);
}
};
Python3CategoryBindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython3CategoryBinding(this);
}
};
function JavaCategoryBindingContext(parser, ctx) {
Native_category_bindingContext.call(this, parser);
this.binding = null; // Java_class_identifier_expressionContext;
Native_category_bindingContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaCategoryBindingContext.prototype = Object.create(Native_category_bindingContext.prototype);
JavaCategoryBindingContext.prototype.constructor = JavaCategoryBindingContext;
JavaCategoryBindingContext.prototype.JAVA = function() {
return this.getToken(EParser.JAVA, 0);
};
JavaCategoryBindingContext.prototype.java_class_identifier_expression = function() {
return this.getTypedRuleContext(Java_class_identifier_expressionContext,0);
};
JavaCategoryBindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaCategoryBinding(this);
}
};
JavaCategoryBindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaCategoryBinding(this);
}
};
function CSharpCategoryBindingContext(parser, ctx) {
Native_category_bindingContext.call(this, parser);
this.binding = null; // Csharp_identifier_expressionContext;
Native_category_bindingContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpCategoryBindingContext.prototype = Object.create(Native_category_bindingContext.prototype);
CSharpCategoryBindingContext.prototype.constructor = CSharpCategoryBindingContext;
CSharpCategoryBindingContext.prototype.CSHARP = function() {
return this.getToken(EParser.CSHARP, 0);
};
CSharpCategoryBindingContext.prototype.csharp_identifier_expression = function() {
return this.getTypedRuleContext(Csharp_identifier_expressionContext,0);
};
CSharpCategoryBindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpCategoryBinding(this);
}
};
CSharpCategoryBindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpCategoryBinding(this);
}
};
function JavaScriptCategoryBindingContext(parser, ctx) {
Native_category_bindingContext.call(this, parser);
this.binding = null; // Javascript_category_bindingContext;
Native_category_bindingContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaScriptCategoryBindingContext.prototype = Object.create(Native_category_bindingContext.prototype);
JavaScriptCategoryBindingContext.prototype.constructor = JavaScriptCategoryBindingContext;
JavaScriptCategoryBindingContext.prototype.JAVASCRIPT = function() {
return this.getToken(EParser.JAVASCRIPT, 0);
};
JavaScriptCategoryBindingContext.prototype.javascript_category_binding = function() {
return this.getTypedRuleContext(Javascript_category_bindingContext,0);
};
JavaScriptCategoryBindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaScriptCategoryBinding(this);
}
};
JavaScriptCategoryBindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaScriptCategoryBinding(this);
}
};
EParser.prototype.native_category_binding = function() {
var localctx = new Native_category_bindingContext(this, this._ctx, this.state);
this.enterRule(localctx, 214, EParser.RULE_native_category_binding);
try {
this.state = 1657;
switch(this._input.LA(1)) {
case EParser.JAVA:
localctx = new JavaCategoryBindingContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1647;
this.match(EParser.JAVA);
this.state = 1648;
localctx.binding = this.java_class_identifier_expression(0);
break;
case EParser.CSHARP:
localctx = new CSharpCategoryBindingContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1649;
this.match(EParser.CSHARP);
this.state = 1650;
localctx.binding = this.csharp_identifier_expression(0);
break;
case EParser.PYTHON2:
localctx = new Python2CategoryBindingContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1651;
this.match(EParser.PYTHON2);
this.state = 1652;
localctx.binding = this.python_category_binding();
break;
case EParser.PYTHON3:
localctx = new Python3CategoryBindingContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1653;
this.match(EParser.PYTHON3);
this.state = 1654;
localctx.binding = this.python_category_binding();
break;
case EParser.JAVASCRIPT:
localctx = new JavaScriptCategoryBindingContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1655;
this.match(EParser.JAVASCRIPT);
this.state = 1656;
localctx.binding = this.javascript_category_binding();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_category_bindingContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_category_binding;
return this;
}
Python_category_bindingContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_category_bindingContext.prototype.constructor = Python_category_bindingContext;
Python_category_bindingContext.prototype.identifier = function() {
return this.getTypedRuleContext(IdentifierContext,0);
};
Python_category_bindingContext.prototype.python_module = function() {
return this.getTypedRuleContext(Python_moduleContext,0);
};
Python_category_bindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_category_binding(this);
}
};
Python_category_bindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_category_binding(this);
}
};
EParser.prototype.python_category_binding = function() {
var localctx = new Python_category_bindingContext(this, this._ctx, this.state);
this.enterRule(localctx, 216, EParser.RULE_python_category_binding);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1659;
this.identifier();
this.state = 1661;
var la_ = this._interp.adaptivePredict(this._input,122,this._ctx);
if(la_===1) {
this.state = 1660;
this.python_module();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_moduleContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_module;
return this;
}
Python_moduleContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_moduleContext.prototype.constructor = Python_moduleContext;
Python_moduleContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Python_moduleContext.prototype.module_token = function() {
return this.getTypedRuleContext(Module_tokenContext,0);
};
Python_moduleContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Python_moduleContext.prototype.identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IdentifierContext);
} else {
return this.getTypedRuleContext(IdentifierContext,i);
}
};
Python_moduleContext.prototype.DOT = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.DOT);
} else {
return this.getToken(EParser.DOT, i);
}
};
Python_moduleContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_module(this);
}
};
Python_moduleContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_module(this);
}
};
EParser.prototype.python_module = function() {
var localctx = new Python_moduleContext(this, this._ctx, this.state);
this.enterRule(localctx, 218, EParser.RULE_python_module);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1663;
this.match(EParser.FROM);
this.state = 1664;
this.module_token();
this.state = 1665;
this.match(EParser.COLON);
this.state = 1666;
this.identifier();
this.state = 1671;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,123,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1667;
this.match(EParser.DOT);
this.state = 1668;
this.identifier();
}
this.state = 1673;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,123,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_category_bindingContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_category_binding;
return this;
}
Javascript_category_bindingContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_category_bindingContext.prototype.constructor = Javascript_category_bindingContext;
Javascript_category_bindingContext.prototype.identifier = function() {
return this.getTypedRuleContext(IdentifierContext,0);
};
Javascript_category_bindingContext.prototype.javascript_module = function() {
return this.getTypedRuleContext(Javascript_moduleContext,0);
};
Javascript_category_bindingContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_category_binding(this);
}
};
Javascript_category_bindingContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_category_binding(this);
}
};
EParser.prototype.javascript_category_binding = function() {
var localctx = new Javascript_category_bindingContext(this, this._ctx, this.state);
this.enterRule(localctx, 220, EParser.RULE_javascript_category_binding);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1674;
this.identifier();
this.state = 1676;
var la_ = this._interp.adaptivePredict(this._input,124,this._ctx);
if(la_===1) {
this.state = 1675;
this.javascript_module();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_moduleContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_module;
return this;
}
Javascript_moduleContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_moduleContext.prototype.constructor = Javascript_moduleContext;
Javascript_moduleContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Javascript_moduleContext.prototype.module_token = function() {
return this.getTypedRuleContext(Module_tokenContext,0);
};
Javascript_moduleContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Javascript_moduleContext.prototype.javascript_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Javascript_identifierContext);
} else {
return this.getTypedRuleContext(Javascript_identifierContext,i);
}
};
Javascript_moduleContext.prototype.SLASH = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.SLASH);
} else {
return this.getToken(EParser.SLASH, i);
}
};
Javascript_moduleContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
Javascript_moduleContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_module(this);
}
};
Javascript_moduleContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_module(this);
}
};
EParser.prototype.javascript_module = function() {
var localctx = new Javascript_moduleContext(this, this._ctx, this.state);
this.enterRule(localctx, 222, EParser.RULE_javascript_module);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1678;
this.match(EParser.FROM);
this.state = 1679;
this.module_token();
this.state = 1680;
this.match(EParser.COLON);
this.state = 1682;
_la = this._input.LA(1);
if(_la===EParser.SLASH) {
this.state = 1681;
this.match(EParser.SLASH);
}
this.state = 1684;
this.javascript_identifier();
this.state = 1689;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,126,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1685;
this.match(EParser.SLASH);
this.state = 1686;
this.javascript_identifier();
}
this.state = 1691;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,126,this._ctx);
}
this.state = 1694;
var la_ = this._interp.adaptivePredict(this._input,127,this._ctx);
if(la_===1) {
this.state = 1692;
this.match(EParser.DOT);
this.state = 1693;
this.javascript_identifier();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Variable_identifier_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_variable_identifier_list;
return this;
}
Variable_identifier_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Variable_identifier_listContext.prototype.constructor = Variable_identifier_listContext;
Variable_identifier_listContext.prototype.variable_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Variable_identifierContext);
} else {
return this.getTypedRuleContext(Variable_identifierContext,i);
}
};
Variable_identifier_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Variable_identifier_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterVariable_identifier_list(this);
}
};
Variable_identifier_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitVariable_identifier_list(this);
}
};
EParser.prototype.variable_identifier_list = function() {
var localctx = new Variable_identifier_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 224, EParser.RULE_variable_identifier_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1696;
this.variable_identifier();
this.state = 1701;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1697;
this.match(EParser.COMMA);
this.state = 1698;
this.variable_identifier();
this.state = 1703;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Attribute_identifier_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_attribute_identifier_list;
return this;
}
Attribute_identifier_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Attribute_identifier_listContext.prototype.constructor = Attribute_identifier_listContext;
Attribute_identifier_listContext.prototype.attribute_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Attribute_identifierContext);
} else {
return this.getTypedRuleContext(Attribute_identifierContext,i);
}
};
Attribute_identifier_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Attribute_identifier_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAttribute_identifier_list(this);
}
};
Attribute_identifier_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAttribute_identifier_list(this);
}
};
EParser.prototype.attribute_identifier_list = function() {
var localctx = new Attribute_identifier_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 226, EParser.RULE_attribute_identifier_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1704;
this.attribute_identifier();
this.state = 1709;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,129,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1705;
this.match(EParser.COMMA);
this.state = 1706;
this.attribute_identifier();
}
this.state = 1711;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,129,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Method_declarationContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_method_declaration;
return this;
}
Method_declarationContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Method_declarationContext.prototype.constructor = Method_declarationContext;
Method_declarationContext.prototype.abstract_method_declaration = function() {
return this.getTypedRuleContext(Abstract_method_declarationContext,0);
};
Method_declarationContext.prototype.concrete_method_declaration = function() {
return this.getTypedRuleContext(Concrete_method_declarationContext,0);
};
Method_declarationContext.prototype.native_method_declaration = function() {
return this.getTypedRuleContext(Native_method_declarationContext,0);
};
Method_declarationContext.prototype.test_method_declaration = function() {
return this.getTypedRuleContext(Test_method_declarationContext,0);
};
Method_declarationContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMethod_declaration(this);
}
};
Method_declarationContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMethod_declaration(this);
}
};
EParser.prototype.method_declaration = function() {
var localctx = new Method_declarationContext(this, this._ctx, this.state);
this.enterRule(localctx, 228, EParser.RULE_method_declaration);
try {
this.state = 1716;
var la_ = this._interp.adaptivePredict(this._input,130,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 1712;
this.abstract_method_declaration();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 1713;
this.concrete_method_declaration();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 1714;
this.native_method_declaration();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 1715;
this.test_method_declaration();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Comment_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_comment_statement;
return this;
}
Comment_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Comment_statementContext.prototype.constructor = Comment_statementContext;
Comment_statementContext.prototype.COMMENT = function() {
return this.getToken(EParser.COMMENT, 0);
};
Comment_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterComment_statement(this);
}
};
Comment_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitComment_statement(this);
}
};
EParser.prototype.comment_statement = function() {
var localctx = new Comment_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 230, EParser.RULE_comment_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1718;
this.match(EParser.COMMENT);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_statement_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_statement_list;
return this;
}
Native_statement_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_statement_listContext.prototype.constructor = Native_statement_listContext;
Native_statement_listContext.prototype.native_statement = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Native_statementContext);
} else {
return this.getTypedRuleContext(Native_statementContext,i);
}
};
Native_statement_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Native_statement_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNative_statement_list(this);
}
};
Native_statement_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNative_statement_list(this);
}
};
EParser.prototype.native_statement_list = function() {
var localctx = new Native_statement_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 232, EParser.RULE_native_statement_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1720;
this.native_statement();
this.state = 1726;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,131,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1721;
this.lfp();
this.state = 1722;
this.native_statement();
}
this.state = 1728;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,131,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Native_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_native_statement;
return this;
}
Native_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Native_statementContext.prototype.constructor = Native_statementContext;
Native_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpNativeStatementContext(parser, ctx) {
Native_statementContext.call(this, parser);
Native_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpNativeStatementContext.prototype = Object.create(Native_statementContext.prototype);
CSharpNativeStatementContext.prototype.constructor = CSharpNativeStatementContext;
CSharpNativeStatementContext.prototype.CSHARP = function() {
return this.getToken(EParser.CSHARP, 0);
};
CSharpNativeStatementContext.prototype.csharp_statement = function() {
return this.getTypedRuleContext(Csharp_statementContext,0);
};
CSharpNativeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpNativeStatement(this);
}
};
CSharpNativeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpNativeStatement(this);
}
};
function JavaNativeStatementContext(parser, ctx) {
Native_statementContext.call(this, parser);
Native_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaNativeStatementContext.prototype = Object.create(Native_statementContext.prototype);
JavaNativeStatementContext.prototype.constructor = JavaNativeStatementContext;
JavaNativeStatementContext.prototype.JAVA = function() {
return this.getToken(EParser.JAVA, 0);
};
JavaNativeStatementContext.prototype.java_statement = function() {
return this.getTypedRuleContext(Java_statementContext,0);
};
JavaNativeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaNativeStatement(this);
}
};
JavaNativeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaNativeStatement(this);
}
};
function JavaScriptNativeStatementContext(parser, ctx) {
Native_statementContext.call(this, parser);
Native_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaScriptNativeStatementContext.prototype = Object.create(Native_statementContext.prototype);
JavaScriptNativeStatementContext.prototype.constructor = JavaScriptNativeStatementContext;
JavaScriptNativeStatementContext.prototype.JAVASCRIPT = function() {
return this.getToken(EParser.JAVASCRIPT, 0);
};
JavaScriptNativeStatementContext.prototype.javascript_native_statement = function() {
return this.getTypedRuleContext(Javascript_native_statementContext,0);
};
JavaScriptNativeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaScriptNativeStatement(this);
}
};
JavaScriptNativeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaScriptNativeStatement(this);
}
};
function Python2NativeStatementContext(parser, ctx) {
Native_statementContext.call(this, parser);
Native_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
Python2NativeStatementContext.prototype = Object.create(Native_statementContext.prototype);
Python2NativeStatementContext.prototype.constructor = Python2NativeStatementContext;
Python2NativeStatementContext.prototype.PYTHON2 = function() {
return this.getToken(EParser.PYTHON2, 0);
};
Python2NativeStatementContext.prototype.python_native_statement = function() {
return this.getTypedRuleContext(Python_native_statementContext,0);
};
Python2NativeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython2NativeStatement(this);
}
};
Python2NativeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython2NativeStatement(this);
}
};
function Python3NativeStatementContext(parser, ctx) {
Native_statementContext.call(this, parser);
Native_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
Python3NativeStatementContext.prototype = Object.create(Native_statementContext.prototype);
Python3NativeStatementContext.prototype.constructor = Python3NativeStatementContext;
Python3NativeStatementContext.prototype.PYTHON3 = function() {
return this.getToken(EParser.PYTHON3, 0);
};
Python3NativeStatementContext.prototype.python_native_statement = function() {
return this.getTypedRuleContext(Python_native_statementContext,0);
};
Python3NativeStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython3NativeStatement(this);
}
};
Python3NativeStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython3NativeStatement(this);
}
};
EParser.prototype.native_statement = function() {
var localctx = new Native_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 234, EParser.RULE_native_statement);
try {
this.state = 1739;
switch(this._input.LA(1)) {
case EParser.JAVA:
localctx = new JavaNativeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1729;
this.match(EParser.JAVA);
this.state = 1730;
this.java_statement();
break;
case EParser.CSHARP:
localctx = new CSharpNativeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1731;
this.match(EParser.CSHARP);
this.state = 1732;
this.csharp_statement();
break;
case EParser.PYTHON2:
localctx = new Python2NativeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1733;
this.match(EParser.PYTHON2);
this.state = 1734;
this.python_native_statement();
break;
case EParser.PYTHON3:
localctx = new Python3NativeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1735;
this.match(EParser.PYTHON3);
this.state = 1736;
this.python_native_statement();
break;
case EParser.JAVASCRIPT:
localctx = new JavaScriptNativeStatementContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1737;
this.match(EParser.JAVASCRIPT);
this.state = 1738;
this.javascript_native_statement();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_native_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_native_statement;
return this;
}
Python_native_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_native_statementContext.prototype.constructor = Python_native_statementContext;
Python_native_statementContext.prototype.python_statement = function() {
return this.getTypedRuleContext(Python_statementContext,0);
};
Python_native_statementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
Python_native_statementContext.prototype.python_module = function() {
return this.getTypedRuleContext(Python_moduleContext,0);
};
Python_native_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_native_statement(this);
}
};
Python_native_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_native_statement(this);
}
};
EParser.prototype.python_native_statement = function() {
var localctx = new Python_native_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 236, EParser.RULE_python_native_statement);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1741;
this.python_statement();
this.state = 1743;
_la = this._input.LA(1);
if(_la===EParser.SEMI) {
this.state = 1742;
this.match(EParser.SEMI);
}
this.state = 1746;
_la = this._input.LA(1);
if(_la===EParser.FROM) {
this.state = 1745;
this.python_module();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_native_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_native_statement;
return this;
}
Javascript_native_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_native_statementContext.prototype.constructor = Javascript_native_statementContext;
Javascript_native_statementContext.prototype.javascript_statement = function() {
return this.getTypedRuleContext(Javascript_statementContext,0);
};
Javascript_native_statementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
Javascript_native_statementContext.prototype.javascript_module = function() {
return this.getTypedRuleContext(Javascript_moduleContext,0);
};
Javascript_native_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_native_statement(this);
}
};
Javascript_native_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_native_statement(this);
}
};
EParser.prototype.javascript_native_statement = function() {
var localctx = new Javascript_native_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 238, EParser.RULE_javascript_native_statement);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1748;
this.javascript_statement();
this.state = 1750;
_la = this._input.LA(1);
if(_la===EParser.SEMI) {
this.state = 1749;
this.match(EParser.SEMI);
}
this.state = 1753;
_la = this._input.LA(1);
if(_la===EParser.FROM) {
this.state = 1752;
this.javascript_module();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Statement_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_statement_list;
return this;
}
Statement_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Statement_listContext.prototype.constructor = Statement_listContext;
Statement_listContext.prototype.statement = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(StatementContext);
} else {
return this.getTypedRuleContext(StatementContext,i);
}
};
Statement_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Statement_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterStatement_list(this);
}
};
Statement_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitStatement_list(this);
}
};
EParser.prototype.statement_list = function() {
var localctx = new Statement_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 240, EParser.RULE_statement_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1755;
this.statement();
this.state = 1761;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,137,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1756;
this.lfp();
this.state = 1757;
this.statement();
}
this.state = 1763;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,137,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Assertion_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assertion_list;
return this;
}
Assertion_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Assertion_listContext.prototype.constructor = Assertion_listContext;
Assertion_listContext.prototype.assertion = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(AssertionContext);
} else {
return this.getTypedRuleContext(AssertionContext,i);
}
};
Assertion_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Assertion_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssertion_list(this);
}
};
Assertion_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssertion_list(this);
}
};
EParser.prototype.assertion_list = function() {
var localctx = new Assertion_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 242, EParser.RULE_assertion_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1764;
this.assertion();
this.state = 1770;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,138,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1765;
this.lfp();
this.state = 1766;
this.assertion();
}
this.state = 1772;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,138,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Switch_case_statement_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_switch_case_statement_list;
return this;
}
Switch_case_statement_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Switch_case_statement_listContext.prototype.constructor = Switch_case_statement_listContext;
Switch_case_statement_listContext.prototype.switch_case_statement = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Switch_case_statementContext);
} else {
return this.getTypedRuleContext(Switch_case_statementContext,i);
}
};
Switch_case_statement_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Switch_case_statement_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSwitch_case_statement_list(this);
}
};
Switch_case_statement_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSwitch_case_statement_list(this);
}
};
EParser.prototype.switch_case_statement_list = function() {
var localctx = new Switch_case_statement_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 244, EParser.RULE_switch_case_statement_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1773;
this.switch_case_statement();
this.state = 1779;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,139,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1774;
this.lfp();
this.state = 1775;
this.switch_case_statement();
}
this.state = 1781;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,139,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Catch_statement_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_catch_statement_list;
return this;
}
Catch_statement_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Catch_statement_listContext.prototype.constructor = Catch_statement_listContext;
Catch_statement_listContext.prototype.catch_statement = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Catch_statementContext);
} else {
return this.getTypedRuleContext(Catch_statementContext,i);
}
};
Catch_statement_listContext.prototype.lfp = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(LfpContext);
} else {
return this.getTypedRuleContext(LfpContext,i);
}
};
Catch_statement_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCatch_statement_list(this);
}
};
Catch_statement_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCatch_statement_list(this);
}
};
EParser.prototype.catch_statement_list = function() {
var localctx = new Catch_statement_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 246, EParser.RULE_catch_statement_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1782;
this.catch_statement();
this.state = 1788;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,140,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1783;
this.lfp();
this.state = 1784;
this.catch_statement();
}
this.state = 1790;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,140,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Literal_collectionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_literal_collection;
return this;
}
Literal_collectionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Literal_collectionContext.prototype.constructor = Literal_collectionContext;
Literal_collectionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function LiteralListLiteralContext(parser, ctx) {
Literal_collectionContext.call(this, parser);
Literal_collectionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LiteralListLiteralContext.prototype = Object.create(Literal_collectionContext.prototype);
LiteralListLiteralContext.prototype.constructor = LiteralListLiteralContext;
LiteralListLiteralContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
LiteralListLiteralContext.prototype.literal_list_literal = function() {
return this.getTypedRuleContext(Literal_list_literalContext,0);
};
LiteralListLiteralContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
LiteralListLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteralListLiteral(this);
}
};
LiteralListLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteralListLiteral(this);
}
};
function LiteralRangeLiteralContext(parser, ctx) {
Literal_collectionContext.call(this, parser);
this.low = null; // Atomic_literalContext;
this.high = null; // Atomic_literalContext;
Literal_collectionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LiteralRangeLiteralContext.prototype = Object.create(Literal_collectionContext.prototype);
LiteralRangeLiteralContext.prototype.constructor = LiteralRangeLiteralContext;
LiteralRangeLiteralContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
LiteralRangeLiteralContext.prototype.RANGE = function() {
return this.getToken(EParser.RANGE, 0);
};
LiteralRangeLiteralContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
LiteralRangeLiteralContext.prototype.atomic_literal = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Atomic_literalContext);
} else {
return this.getTypedRuleContext(Atomic_literalContext,i);
}
};
LiteralRangeLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteralRangeLiteral(this);
}
};
LiteralRangeLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteralRangeLiteral(this);
}
};
function LiteralSetLiteralContext(parser, ctx) {
Literal_collectionContext.call(this, parser);
Literal_collectionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LiteralSetLiteralContext.prototype = Object.create(Literal_collectionContext.prototype);
LiteralSetLiteralContext.prototype.constructor = LiteralSetLiteralContext;
LiteralSetLiteralContext.prototype.LT = function() {
return this.getToken(EParser.LT, 0);
};
LiteralSetLiteralContext.prototype.literal_list_literal = function() {
return this.getTypedRuleContext(Literal_list_literalContext,0);
};
LiteralSetLiteralContext.prototype.GT = function() {
return this.getToken(EParser.GT, 0);
};
LiteralSetLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteralSetLiteral(this);
}
};
LiteralSetLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteralSetLiteral(this);
}
};
EParser.prototype.literal_collection = function() {
var localctx = new Literal_collectionContext(this, this._ctx, this.state);
this.enterRule(localctx, 248, EParser.RULE_literal_collection);
try {
this.state = 1805;
var la_ = this._interp.adaptivePredict(this._input,141,this._ctx);
switch(la_) {
case 1:
localctx = new LiteralRangeLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1791;
this.match(EParser.LBRAK);
this.state = 1792;
localctx.low = this.atomic_literal();
this.state = 1793;
this.match(EParser.RANGE);
this.state = 1794;
localctx.high = this.atomic_literal();
this.state = 1795;
this.match(EParser.RBRAK);
break;
case 2:
localctx = new LiteralListLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1797;
this.match(EParser.LBRAK);
this.state = 1798;
this.literal_list_literal();
this.state = 1799;
this.match(EParser.RBRAK);
break;
case 3:
localctx = new LiteralSetLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1801;
this.match(EParser.LT);
this.state = 1802;
this.literal_list_literal();
this.state = 1803;
this.match(EParser.GT);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Atomic_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_atomic_literal;
return this;
}
Atomic_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Atomic_literalContext.prototype.constructor = Atomic_literalContext;
Atomic_literalContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function MinIntegerLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
MinIntegerLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
MinIntegerLiteralContext.prototype.constructor = MinIntegerLiteralContext;
MinIntegerLiteralContext.prototype.MIN_INTEGER = function() {
return this.getToken(EParser.MIN_INTEGER, 0);
};
MinIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMinIntegerLiteral(this);
}
};
MinIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMinIntegerLiteral(this);
}
};
function DateLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
DateLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
DateLiteralContext.prototype.constructor = DateLiteralContext;
DateLiteralContext.prototype.DATE_LITERAL = function() {
return this.getToken(EParser.DATE_LITERAL, 0);
};
DateLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDateLiteral(this);
}
};
DateLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDateLiteral(this);
}
};
function BooleanLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
BooleanLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
BooleanLiteralContext.prototype.constructor = BooleanLiteralContext;
BooleanLiteralContext.prototype.BOOLEAN_LITERAL = function() {
return this.getToken(EParser.BOOLEAN_LITERAL, 0);
};
BooleanLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterBooleanLiteral(this);
}
};
BooleanLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitBooleanLiteral(this);
}
};
function HexadecimalLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
HexadecimalLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
HexadecimalLiteralContext.prototype.constructor = HexadecimalLiteralContext;
HexadecimalLiteralContext.prototype.HEXA_LITERAL = function() {
return this.getToken(EParser.HEXA_LITERAL, 0);
};
HexadecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterHexadecimalLiteral(this);
}
};
HexadecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitHexadecimalLiteral(this);
}
};
function UUIDLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
UUIDLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
UUIDLiteralContext.prototype.constructor = UUIDLiteralContext;
UUIDLiteralContext.prototype.UUID_LITERAL = function() {
return this.getToken(EParser.UUID_LITERAL, 0);
};
UUIDLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterUUIDLiteral(this);
}
};
UUIDLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitUUIDLiteral(this);
}
};
function MaxIntegerLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
MaxIntegerLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
MaxIntegerLiteralContext.prototype.constructor = MaxIntegerLiteralContext;
MaxIntegerLiteralContext.prototype.MAX_INTEGER = function() {
return this.getToken(EParser.MAX_INTEGER, 0);
};
MaxIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMaxIntegerLiteral(this);
}
};
MaxIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMaxIntegerLiteral(this);
}
};
function DateTimeLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
DateTimeLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
DateTimeLiteralContext.prototype.constructor = DateTimeLiteralContext;
DateTimeLiteralContext.prototype.DATETIME_LITERAL = function() {
return this.getToken(EParser.DATETIME_LITERAL, 0);
};
DateTimeLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDateTimeLiteral(this);
}
};
DateTimeLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDateTimeLiteral(this);
}
};
function PeriodLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
PeriodLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
PeriodLiteralContext.prototype.constructor = PeriodLiteralContext;
PeriodLiteralContext.prototype.PERIOD_LITERAL = function() {
return this.getToken(EParser.PERIOD_LITERAL, 0);
};
PeriodLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPeriodLiteral(this);
}
};
PeriodLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPeriodLiteral(this);
}
};
function DecimalLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
DecimalLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
DecimalLiteralContext.prototype.constructor = DecimalLiteralContext;
DecimalLiteralContext.prototype.DECIMAL_LITERAL = function() {
return this.getToken(EParser.DECIMAL_LITERAL, 0);
};
DecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDecimalLiteral(this);
}
};
DecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDecimalLiteral(this);
}
};
function TextLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
TextLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
TextLiteralContext.prototype.constructor = TextLiteralContext;
TextLiteralContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
TextLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTextLiteral(this);
}
};
TextLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTextLiteral(this);
}
};
function NullLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.n = null; // Null_literalContext;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
NullLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
NullLiteralContext.prototype.constructor = NullLiteralContext;
NullLiteralContext.prototype.null_literal = function() {
return this.getTypedRuleContext(Null_literalContext,0);
};
NullLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNullLiteral(this);
}
};
NullLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNullLiteral(this);
}
};
function IntegerLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
IntegerLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
IntegerLiteralContext.prototype.constructor = IntegerLiteralContext;
IntegerLiteralContext.prototype.INTEGER_LITERAL = function() {
return this.getToken(EParser.INTEGER_LITERAL, 0);
};
IntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIntegerLiteral(this);
}
};
IntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIntegerLiteral(this);
}
};
function TimeLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
TimeLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
TimeLiteralContext.prototype.constructor = TimeLiteralContext;
TimeLiteralContext.prototype.TIME_LITERAL = function() {
return this.getToken(EParser.TIME_LITERAL, 0);
};
TimeLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTimeLiteral(this);
}
};
TimeLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTimeLiteral(this);
}
};
function CharacterLiteralContext(parser, ctx) {
Atomic_literalContext.call(this, parser);
this.t = null; // Token;
Atomic_literalContext.prototype.copyFrom.call(this, ctx);
return this;
}
CharacterLiteralContext.prototype = Object.create(Atomic_literalContext.prototype);
CharacterLiteralContext.prototype.constructor = CharacterLiteralContext;
CharacterLiteralContext.prototype.CHAR_LITERAL = function() {
return this.getToken(EParser.CHAR_LITERAL, 0);
};
CharacterLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCharacterLiteral(this);
}
};
CharacterLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCharacterLiteral(this);
}
};
EParser.prototype.atomic_literal = function() {
var localctx = new Atomic_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 250, EParser.RULE_atomic_literal);
try {
this.state = 1821;
switch(this._input.LA(1)) {
case EParser.MIN_INTEGER:
localctx = new MinIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1807;
localctx.t = this.match(EParser.MIN_INTEGER);
break;
case EParser.MAX_INTEGER:
localctx = new MaxIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1808;
localctx.t = this.match(EParser.MAX_INTEGER);
break;
case EParser.INTEGER_LITERAL:
localctx = new IntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1809;
localctx.t = this.match(EParser.INTEGER_LITERAL);
break;
case EParser.HEXA_LITERAL:
localctx = new HexadecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1810;
localctx.t = this.match(EParser.HEXA_LITERAL);
break;
case EParser.CHAR_LITERAL:
localctx = new CharacterLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1811;
localctx.t = this.match(EParser.CHAR_LITERAL);
break;
case EParser.DATE_LITERAL:
localctx = new DateLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 6);
this.state = 1812;
localctx.t = this.match(EParser.DATE_LITERAL);
break;
case EParser.TIME_LITERAL:
localctx = new TimeLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 7);
this.state = 1813;
localctx.t = this.match(EParser.TIME_LITERAL);
break;
case EParser.TEXT_LITERAL:
localctx = new TextLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 8);
this.state = 1814;
localctx.t = this.match(EParser.TEXT_LITERAL);
break;
case EParser.DECIMAL_LITERAL:
localctx = new DecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 9);
this.state = 1815;
localctx.t = this.match(EParser.DECIMAL_LITERAL);
break;
case EParser.DATETIME_LITERAL:
localctx = new DateTimeLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 10);
this.state = 1816;
localctx.t = this.match(EParser.DATETIME_LITERAL);
break;
case EParser.BOOLEAN_LITERAL:
localctx = new BooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 11);
this.state = 1817;
localctx.t = this.match(EParser.BOOLEAN_LITERAL);
break;
case EParser.PERIOD_LITERAL:
localctx = new PeriodLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 12);
this.state = 1818;
localctx.t = this.match(EParser.PERIOD_LITERAL);
break;
case EParser.UUID_LITERAL:
localctx = new UUIDLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 13);
this.state = 1819;
localctx.t = this.match(EParser.UUID_LITERAL);
break;
case EParser.NOTHING:
localctx = new NullLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 14);
this.state = 1820;
localctx.n = this.null_literal();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Literal_list_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_literal_list_literal;
return this;
}
Literal_list_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Literal_list_literalContext.prototype.constructor = Literal_list_literalContext;
Literal_list_literalContext.prototype.atomic_literal = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Atomic_literalContext);
} else {
return this.getTypedRuleContext(Atomic_literalContext,i);
}
};
Literal_list_literalContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Literal_list_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteral_list_literal(this);
}
};
Literal_list_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteral_list_literal(this);
}
};
EParser.prototype.literal_list_literal = function() {
var localctx = new Literal_list_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 252, EParser.RULE_literal_list_literal);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1823;
this.atomic_literal();
this.state = 1828;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1824;
this.match(EParser.COMMA);
this.state = 1825;
this.atomic_literal();
this.state = 1830;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Selectable_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_selectable_expression;
return this;
}
Selectable_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Selectable_expressionContext.prototype.constructor = Selectable_expressionContext;
Selectable_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ThisExpressionContext(parser, ctx) {
Selectable_expressionContext.call(this, parser);
this.exp = null; // This_expressionContext;
Selectable_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ThisExpressionContext.prototype = Object.create(Selectable_expressionContext.prototype);
ThisExpressionContext.prototype.constructor = ThisExpressionContext;
ThisExpressionContext.prototype.this_expression = function() {
return this.getTypedRuleContext(This_expressionContext,0);
};
ThisExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterThisExpression(this);
}
};
ThisExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitThisExpression(this);
}
};
function ParenthesisExpressionContext(parser, ctx) {
Selectable_expressionContext.call(this, parser);
this.exp = null; // Parenthesis_expressionContext;
Selectable_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
ParenthesisExpressionContext.prototype = Object.create(Selectable_expressionContext.prototype);
ParenthesisExpressionContext.prototype.constructor = ParenthesisExpressionContext;
ParenthesisExpressionContext.prototype.parenthesis_expression = function() {
return this.getTypedRuleContext(Parenthesis_expressionContext,0);
};
ParenthesisExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterParenthesisExpression(this);
}
};
ParenthesisExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitParenthesisExpression(this);
}
};
function LiteralExpressionContext(parser, ctx) {
Selectable_expressionContext.call(this, parser);
this.exp = null; // Literal_expressionContext;
Selectable_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
LiteralExpressionContext.prototype = Object.create(Selectable_expressionContext.prototype);
LiteralExpressionContext.prototype.constructor = LiteralExpressionContext;
LiteralExpressionContext.prototype.literal_expression = function() {
return this.getTypedRuleContext(Literal_expressionContext,0);
};
LiteralExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteralExpression(this);
}
};
LiteralExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteralExpression(this);
}
};
function IdentifierExpressionContext(parser, ctx) {
Selectable_expressionContext.call(this, parser);
this.exp = null; // IdentifierContext;
Selectable_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IdentifierExpressionContext.prototype = Object.create(Selectable_expressionContext.prototype);
IdentifierExpressionContext.prototype.constructor = IdentifierExpressionContext;
IdentifierExpressionContext.prototype.identifier = function() {
return this.getTypedRuleContext(IdentifierContext,0);
};
IdentifierExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIdentifierExpression(this);
}
};
IdentifierExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIdentifierExpression(this);
}
};
EParser.prototype.selectable_expression = function() {
var localctx = new Selectable_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 254, EParser.RULE_selectable_expression);
try {
this.state = 1835;
var la_ = this._interp.adaptivePredict(this._input,144,this._ctx);
switch(la_) {
case 1:
localctx = new ParenthesisExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1831;
localctx.exp = this.parenthesis_expression();
break;
case 2:
localctx = new LiteralExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1832;
localctx.exp = this.literal_expression();
break;
case 3:
localctx = new IdentifierExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1833;
localctx.exp = this.identifier();
break;
case 4:
localctx = new ThisExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1834;
localctx.exp = this.this_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function This_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_this_expression;
return this;
}
This_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
This_expressionContext.prototype.constructor = This_expressionContext;
This_expressionContext.prototype.SELF = function() {
return this.getToken(EParser.SELF, 0);
};
This_expressionContext.prototype.THIS = function() {
return this.getToken(EParser.THIS, 0);
};
This_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterThis_expression(this);
}
};
This_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitThis_expression(this);
}
};
EParser.prototype.this_expression = function() {
var localctx = new This_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 256, EParser.RULE_this_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1837;
_la = this._input.LA(1);
if(!(_la===EParser.SELF || _la===EParser.THIS)) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Parenthesis_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_parenthesis_expression;
return this;
}
Parenthesis_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Parenthesis_expressionContext.prototype.constructor = Parenthesis_expressionContext;
Parenthesis_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Parenthesis_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Parenthesis_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Parenthesis_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterParenthesis_expression(this);
}
};
Parenthesis_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitParenthesis_expression(this);
}
};
EParser.prototype.parenthesis_expression = function() {
var localctx = new Parenthesis_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 258, EParser.RULE_parenthesis_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1839;
this.match(EParser.LPAR);
this.state = 1840;
this.expression(0);
this.state = 1841;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Literal_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_literal_expression;
return this;
}
Literal_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Literal_expressionContext.prototype.constructor = Literal_expressionContext;
Literal_expressionContext.prototype.atomic_literal = function() {
return this.getTypedRuleContext(Atomic_literalContext,0);
};
Literal_expressionContext.prototype.collection_literal = function() {
return this.getTypedRuleContext(Collection_literalContext,0);
};
Literal_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterLiteral_expression(this);
}
};
Literal_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitLiteral_expression(this);
}
};
EParser.prototype.literal_expression = function() {
var localctx = new Literal_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 260, EParser.RULE_literal_expression);
try {
this.state = 1845;
switch(this._input.LA(1)) {
case EParser.NOTHING:
case EParser.BOOLEAN_LITERAL:
case EParser.CHAR_LITERAL:
case EParser.MIN_INTEGER:
case EParser.MAX_INTEGER:
case EParser.TEXT_LITERAL:
case EParser.UUID_LITERAL:
case EParser.INTEGER_LITERAL:
case EParser.HEXA_LITERAL:
case EParser.DECIMAL_LITERAL:
case EParser.DATETIME_LITERAL:
case EParser.TIME_LITERAL:
case EParser.DATE_LITERAL:
case EParser.PERIOD_LITERAL:
this.enterOuterAlt(localctx, 1);
this.state = 1843;
this.atomic_literal();
break;
case EParser.LPAR:
case EParser.LBRAK:
case EParser.LCURL:
case EParser.LT:
case EParser.MUTABLE:
this.enterOuterAlt(localctx, 2);
this.state = 1844;
this.collection_literal();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Collection_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_collection_literal;
return this;
}
Collection_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Collection_literalContext.prototype.constructor = Collection_literalContext;
Collection_literalContext.prototype.range_literal = function() {
return this.getTypedRuleContext(Range_literalContext,0);
};
Collection_literalContext.prototype.list_literal = function() {
return this.getTypedRuleContext(List_literalContext,0);
};
Collection_literalContext.prototype.set_literal = function() {
return this.getTypedRuleContext(Set_literalContext,0);
};
Collection_literalContext.prototype.dict_literal = function() {
return this.getTypedRuleContext(Dict_literalContext,0);
};
Collection_literalContext.prototype.tuple_literal = function() {
return this.getTypedRuleContext(Tuple_literalContext,0);
};
Collection_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCollection_literal(this);
}
};
Collection_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCollection_literal(this);
}
};
EParser.prototype.collection_literal = function() {
var localctx = new Collection_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 262, EParser.RULE_collection_literal);
try {
this.state = 1852;
var la_ = this._interp.adaptivePredict(this._input,146,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 1847;
this.range_literal();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 1848;
this.list_literal();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 1849;
this.set_literal();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 1850;
this.dict_literal();
break;
case 5:
this.enterOuterAlt(localctx, 5);
this.state = 1851;
this.tuple_literal();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Tuple_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_tuple_literal;
return this;
}
Tuple_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Tuple_literalContext.prototype.constructor = Tuple_literalContext;
Tuple_literalContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Tuple_literalContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Tuple_literalContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
Tuple_literalContext.prototype.expression_tuple = function() {
return this.getTypedRuleContext(Expression_tupleContext,0);
};
Tuple_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterTuple_literal(this);
}
};
Tuple_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitTuple_literal(this);
}
};
EParser.prototype.tuple_literal = function() {
var localctx = new Tuple_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 264, EParser.RULE_tuple_literal);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1855;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1854;
this.match(EParser.MUTABLE);
}
this.state = 1857;
this.match(EParser.LPAR);
this.state = 1859;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1858;
this.expression_tuple();
}
this.state = 1861;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Dict_literalContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_dict_literal;
return this;
}
Dict_literalContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Dict_literalContext.prototype.constructor = Dict_literalContext;
Dict_literalContext.prototype.LCURL = function() {
return this.getToken(EParser.LCURL, 0);
};
Dict_literalContext.prototype.RCURL = function() {
return this.getToken(EParser.RCURL, 0);
};
Dict_literalContext.prototype.MUTABLE = function() {
return this.getToken(EParser.MUTABLE, 0);
};
Dict_literalContext.prototype.dict_entry_list = function() {
return this.getTypedRuleContext(Dict_entry_listContext,0);
};
Dict_literalContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDict_literal(this);
}
};
Dict_literalContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDict_literal(this);
}
};
EParser.prototype.dict_literal = function() {
var localctx = new Dict_literalContext(this, this._ctx, this.state);
this.enterRule(localctx, 266, EParser.RULE_dict_literal);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1864;
_la = this._input.LA(1);
if(_la===EParser.MUTABLE) {
this.state = 1863;
this.match(EParser.MUTABLE);
}
this.state = 1866;
this.match(EParser.LCURL);
this.state = 1868;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1867;
this.dict_entry_list();
}
this.state = 1870;
this.match(EParser.RCURL);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Expression_tupleContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_expression_tuple;
return this;
}
Expression_tupleContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Expression_tupleContext.prototype.constructor = Expression_tupleContext;
Expression_tupleContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
Expression_tupleContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Expression_tupleContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterExpression_tuple(this);
}
};
Expression_tupleContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitExpression_tuple(this);
}
};
EParser.prototype.expression_tuple = function() {
var localctx = new Expression_tupleContext(this, this._ctx, this.state);
this.enterRule(localctx, 268, EParser.RULE_expression_tuple);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1872;
this.expression(0);
this.state = 1873;
this.match(EParser.COMMA);
this.state = 1882;
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << EParser.LPAR) | (1 << EParser.LBRAK) | (1 << EParser.LCURL))) !== 0) || ((((_la - 33)) & ~0x1f) == 0 && ((1 << (_la - 33)) & ((1 << (EParser.MINUS - 33)) | (1 << (EParser.LT - 33)) | (1 << (EParser.METHOD_T - 33)) | (1 << (EParser.CODE - 33)) | (1 << (EParser.DOCUMENT - 33)) | (1 << (EParser.BLOB - 33)))) !== 0) || ((((_la - 98)) & ~0x1f) == 0 && ((1 << (_la - 98)) & ((1 << (EParser.EXECUTE - 98)) | (1 << (EParser.FETCH - 98)) | (1 << (EParser.INVOKE - 98)) | (1 << (EParser.MUTABLE - 98)) | (1 << (EParser.NOT - 98)) | (1 << (EParser.NOTHING - 98)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.SORTED - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.MIN_INTEGER - 132)) | (1 << (EParser.MAX_INTEGER - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 165)) & ~0x1f) == 0 && ((1 << (_la - 165)) & ((1 << (EParser.TEXT_LITERAL - 165)) | (1 << (EParser.UUID_LITERAL - 165)) | (1 << (EParser.INTEGER_LITERAL - 165)) | (1 << (EParser.HEXA_LITERAL - 165)) | (1 << (EParser.DECIMAL_LITERAL - 165)) | (1 << (EParser.DATETIME_LITERAL - 165)) | (1 << (EParser.TIME_LITERAL - 165)) | (1 << (EParser.DATE_LITERAL - 165)) | (1 << (EParser.PERIOD_LITERAL - 165)))) !== 0)) {
this.state = 1874;
this.expression(0);
this.state = 1879;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1875;
this.match(EParser.COMMA);
this.state = 1876;
this.expression(0);
this.state = 1881;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Dict_entry_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_dict_entry_list;
return this;
}
Dict_entry_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Dict_entry_listContext.prototype.constructor = Dict_entry_listContext;
Dict_entry_listContext.prototype.dict_entry = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Dict_entryContext);
} else {
return this.getTypedRuleContext(Dict_entryContext,i);
}
};
Dict_entry_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Dict_entry_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDict_entry_list(this);
}
};
Dict_entry_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDict_entry_list(this);
}
};
EParser.prototype.dict_entry_list = function() {
var localctx = new Dict_entry_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 270, EParser.RULE_dict_entry_list);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1884;
this.dict_entry();
this.state = 1889;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===EParser.COMMA) {
this.state = 1885;
this.match(EParser.COMMA);
this.state = 1886;
this.dict_entry();
this.state = 1891;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Dict_entryContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_dict_entry;
this.key = null; // ExpressionContext
this.value = null; // ExpressionContext
return this;
}
Dict_entryContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Dict_entryContext.prototype.constructor = Dict_entryContext;
Dict_entryContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
Dict_entryContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
Dict_entryContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDict_entry(this);
}
};
Dict_entryContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDict_entry(this);
}
};
EParser.prototype.dict_entry = function() {
var localctx = new Dict_entryContext(this, this._ctx, this.state);
this.enterRule(localctx, 272, EParser.RULE_dict_entry);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1892;
localctx.key = this.expression(0);
this.state = 1893;
this.match(EParser.COLON);
this.state = 1894;
localctx.value = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Slice_argumentsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_slice_arguments;
return this;
}
Slice_argumentsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Slice_argumentsContext.prototype.constructor = Slice_argumentsContext;
Slice_argumentsContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function SliceFirstAndLastContext(parser, ctx) {
Slice_argumentsContext.call(this, parser);
this.first = null; // ExpressionContext;
this.last = null; // ExpressionContext;
Slice_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
SliceFirstAndLastContext.prototype = Object.create(Slice_argumentsContext.prototype);
SliceFirstAndLastContext.prototype.constructor = SliceFirstAndLastContext;
SliceFirstAndLastContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
SliceFirstAndLastContext.prototype.expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
SliceFirstAndLastContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSliceFirstAndLast(this);
}
};
SliceFirstAndLastContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSliceFirstAndLast(this);
}
};
function SliceLastOnlyContext(parser, ctx) {
Slice_argumentsContext.call(this, parser);
this.last = null; // ExpressionContext;
Slice_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
SliceLastOnlyContext.prototype = Object.create(Slice_argumentsContext.prototype);
SliceLastOnlyContext.prototype.constructor = SliceLastOnlyContext;
SliceLastOnlyContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
SliceLastOnlyContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
SliceLastOnlyContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSliceLastOnly(this);
}
};
SliceLastOnlyContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSliceLastOnly(this);
}
};
function SliceFirstOnlyContext(parser, ctx) {
Slice_argumentsContext.call(this, parser);
this.first = null; // ExpressionContext;
Slice_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
SliceFirstOnlyContext.prototype = Object.create(Slice_argumentsContext.prototype);
SliceFirstOnlyContext.prototype.constructor = SliceFirstOnlyContext;
SliceFirstOnlyContext.prototype.COLON = function() {
return this.getToken(EParser.COLON, 0);
};
SliceFirstOnlyContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
SliceFirstOnlyContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSliceFirstOnly(this);
}
};
SliceFirstOnlyContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSliceFirstOnly(this);
}
};
EParser.prototype.slice_arguments = function() {
var localctx = new Slice_argumentsContext(this, this._ctx, this.state);
this.enterRule(localctx, 274, EParser.RULE_slice_arguments);
try {
this.state = 1905;
var la_ = this._interp.adaptivePredict(this._input,154,this._ctx);
switch(la_) {
case 1:
localctx = new SliceFirstAndLastContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1896;
localctx.first = this.expression(0);
this.state = 1897;
this.match(EParser.COLON);
this.state = 1898;
localctx.last = this.expression(0);
break;
case 2:
localctx = new SliceFirstOnlyContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1900;
localctx.first = this.expression(0);
this.state = 1901;
this.match(EParser.COLON);
break;
case 3:
localctx = new SliceLastOnlyContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1903;
this.match(EParser.COLON);
this.state = 1904;
localctx.last = this.expression(0);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Assign_variable_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assign_variable_statement;
return this;
}
Assign_variable_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Assign_variable_statementContext.prototype.constructor = Assign_variable_statementContext;
Assign_variable_statementContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
Assign_variable_statementContext.prototype.assign = function() {
return this.getTypedRuleContext(AssignContext,0);
};
Assign_variable_statementContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Assign_variable_statementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssign_variable_statement(this);
}
};
Assign_variable_statementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssign_variable_statement(this);
}
};
EParser.prototype.assign_variable_statement = function() {
var localctx = new Assign_variable_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 276, EParser.RULE_assign_variable_statement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1907;
this.variable_identifier();
this.state = 1908;
this.assign();
this.state = 1909;
this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Assignable_instanceContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assignable_instance;
return this;
}
Assignable_instanceContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Assignable_instanceContext.prototype.constructor = Assignable_instanceContext;
Assignable_instanceContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function ChildInstanceContext(parser, ctx) {
Assignable_instanceContext.call(this, parser);
Assignable_instanceContext.prototype.copyFrom.call(this, ctx);
return this;
}
ChildInstanceContext.prototype = Object.create(Assignable_instanceContext.prototype);
ChildInstanceContext.prototype.constructor = ChildInstanceContext;
ChildInstanceContext.prototype.assignable_instance = function() {
return this.getTypedRuleContext(Assignable_instanceContext,0);
};
ChildInstanceContext.prototype.child_instance = function() {
return this.getTypedRuleContext(Child_instanceContext,0);
};
ChildInstanceContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterChildInstance(this);
}
};
ChildInstanceContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitChildInstance(this);
}
};
function RootInstanceContext(parser, ctx) {
Assignable_instanceContext.call(this, parser);
Assignable_instanceContext.prototype.copyFrom.call(this, ctx);
return this;
}
RootInstanceContext.prototype = Object.create(Assignable_instanceContext.prototype);
RootInstanceContext.prototype.constructor = RootInstanceContext;
RootInstanceContext.prototype.variable_identifier = function() {
return this.getTypedRuleContext(Variable_identifierContext,0);
};
RootInstanceContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRootInstance(this);
}
};
RootInstanceContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRootInstance(this);
}
};
EParser.prototype.assignable_instance = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Assignable_instanceContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 278;
this.enterRecursionRule(localctx, 278, EParser.RULE_assignable_instance, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new RootInstanceContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1912;
this.variable_identifier();
this._ctx.stop = this._input.LT(-1);
this.state = 1918;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,155,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new ChildInstanceContext(this, new Assignable_instanceContext(this, _parentctx, _parentState));
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_assignable_instance);
this.state = 1914;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 1915;
this.child_instance();
}
this.state = 1920;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,155,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Is_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_is_expression;
return this;
}
Is_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Is_expressionContext.prototype.constructor = Is_expressionContext;
Is_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function IsATypeExpressionContext(parser, ctx) {
Is_expressionContext.call(this, parser);
Is_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IsATypeExpressionContext.prototype = Object.create(Is_expressionContext.prototype);
IsATypeExpressionContext.prototype.constructor = IsATypeExpressionContext;
IsATypeExpressionContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
IsATypeExpressionContext.prototype.category_or_any_type = function() {
return this.getTypedRuleContext(Category_or_any_typeContext,0);
};
IsATypeExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIsATypeExpression(this);
}
};
IsATypeExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIsATypeExpression(this);
}
};
function IsOtherExpressionContext(parser, ctx) {
Is_expressionContext.call(this, parser);
Is_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
IsOtherExpressionContext.prototype = Object.create(Is_expressionContext.prototype);
IsOtherExpressionContext.prototype.constructor = IsOtherExpressionContext;
IsOtherExpressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
IsOtherExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIsOtherExpression(this);
}
};
IsOtherExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIsOtherExpression(this);
}
};
EParser.prototype.is_expression = function() {
var localctx = new Is_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 280, EParser.RULE_is_expression);
try {
this.state = 1925;
var la_ = this._interp.adaptivePredict(this._input,156,this._ctx);
switch(la_) {
case 1:
localctx = new IsATypeExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1921;
if (!( this.willBeAOrAn())) {
throw new antlr4.error.FailedPredicateException(this, "$parser.willBeAOrAn()");
}
this.state = 1922;
this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1923;
this.category_or_any_type();
break;
case 2:
localctx = new IsOtherExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1924;
this.expression(0);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Read_all_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_read_all_expression;
this.source = null; // ExpressionContext
return this;
}
Read_all_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Read_all_expressionContext.prototype.constructor = Read_all_expressionContext;
Read_all_expressionContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Read_all_expressionContext.prototype.ALL = function() {
return this.getToken(EParser.ALL, 0);
};
Read_all_expressionContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Read_all_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Read_all_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRead_all_expression(this);
}
};
Read_all_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRead_all_expression(this);
}
};
EParser.prototype.read_all_expression = function() {
var localctx = new Read_all_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 282, EParser.RULE_read_all_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1927;
this.match(EParser.READ);
this.state = 1928;
this.match(EParser.ALL);
this.state = 1929;
this.match(EParser.FROM);
this.state = 1930;
localctx.source = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Read_one_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_read_one_expression;
this.source = null; // ExpressionContext
return this;
}
Read_one_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Read_one_expressionContext.prototype.constructor = Read_one_expressionContext;
Read_one_expressionContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Read_one_expressionContext.prototype.ONE = function() {
return this.getToken(EParser.ONE, 0);
};
Read_one_expressionContext.prototype.FROM = function() {
return this.getToken(EParser.FROM, 0);
};
Read_one_expressionContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
Read_one_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterRead_one_expression(this);
}
};
Read_one_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitRead_one_expression(this);
}
};
EParser.prototype.read_one_expression = function() {
var localctx = new Read_one_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 284, EParser.RULE_read_one_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1932;
this.match(EParser.READ);
this.state = 1933;
this.match(EParser.ONE);
this.state = 1934;
this.match(EParser.FROM);
this.state = 1935;
localctx.source = this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Order_by_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_order_by_list;
return this;
}
Order_by_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Order_by_listContext.prototype.constructor = Order_by_listContext;
Order_by_listContext.prototype.order_by = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Order_byContext);
} else {
return this.getTypedRuleContext(Order_byContext,i);
}
};
Order_by_listContext.prototype.COMMA = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.COMMA);
} else {
return this.getToken(EParser.COMMA, i);
}
};
Order_by_listContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOrder_by_list(this);
}
};
Order_by_listContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOrder_by_list(this);
}
};
EParser.prototype.order_by_list = function() {
var localctx = new Order_by_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 286, EParser.RULE_order_by_list);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1937;
this.order_by();
this.state = 1942;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,157,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1938;
this.match(EParser.COMMA);
this.state = 1939;
this.order_by();
}
this.state = 1944;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,157,this._ctx);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Order_byContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_order_by;
return this;
}
Order_byContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Order_byContext.prototype.constructor = Order_byContext;
Order_byContext.prototype.variable_identifier = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(Variable_identifierContext);
} else {
return this.getTypedRuleContext(Variable_identifierContext,i);
}
};
Order_byContext.prototype.DOT = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(EParser.DOT);
} else {
return this.getToken(EParser.DOT, i);
}
};
Order_byContext.prototype.ASC = function() {
return this.getToken(EParser.ASC, 0);
};
Order_byContext.prototype.DESC = function() {
return this.getToken(EParser.DESC, 0);
};
Order_byContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOrder_by(this);
}
};
Order_byContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOrder_by(this);
}
};
EParser.prototype.order_by = function() {
var localctx = new Order_byContext(this, this._ctx, this.state);
this.enterRule(localctx, 288, EParser.RULE_order_by);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1945;
this.variable_identifier();
this.state = 1950;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,158,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
this.state = 1946;
this.match(EParser.DOT);
this.state = 1947;
this.variable_identifier();
}
this.state = 1952;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,158,this._ctx);
}
this.state = 1954;
var la_ = this._interp.adaptivePredict(this._input,159,this._ctx);
if(la_===1) {
this.state = 1953;
_la = this._input.LA(1);
if(!(_la===EParser.ASC || _la===EParser.DESC)) {
this._errHandler.recoverInline(this);
}
this.consume();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function OperatorContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_operator;
return this;
}
OperatorContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
OperatorContext.prototype.constructor = OperatorContext;
OperatorContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function OperatorPlusContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorPlusContext.prototype = Object.create(OperatorContext.prototype);
OperatorPlusContext.prototype.constructor = OperatorPlusContext;
OperatorPlusContext.prototype.PLUS = function() {
return this.getToken(EParser.PLUS, 0);
};
OperatorPlusContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorPlus(this);
}
};
OperatorPlusContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorPlus(this);
}
};
function OperatorDivideContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorDivideContext.prototype = Object.create(OperatorContext.prototype);
OperatorDivideContext.prototype.constructor = OperatorDivideContext;
OperatorDivideContext.prototype.divide = function() {
return this.getTypedRuleContext(DivideContext,0);
};
OperatorDivideContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorDivide(this);
}
};
OperatorDivideContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorDivide(this);
}
};
function OperatorIDivideContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorIDivideContext.prototype = Object.create(OperatorContext.prototype);
OperatorIDivideContext.prototype.constructor = OperatorIDivideContext;
OperatorIDivideContext.prototype.idivide = function() {
return this.getTypedRuleContext(IdivideContext,0);
};
OperatorIDivideContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorIDivide(this);
}
};
OperatorIDivideContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorIDivide(this);
}
};
function OperatorMultiplyContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorMultiplyContext.prototype = Object.create(OperatorContext.prototype);
OperatorMultiplyContext.prototype.constructor = OperatorMultiplyContext;
OperatorMultiplyContext.prototype.multiply = function() {
return this.getTypedRuleContext(MultiplyContext,0);
};
OperatorMultiplyContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorMultiply(this);
}
};
OperatorMultiplyContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorMultiply(this);
}
};
function OperatorMinusContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorMinusContext.prototype = Object.create(OperatorContext.prototype);
OperatorMinusContext.prototype.constructor = OperatorMinusContext;
OperatorMinusContext.prototype.MINUS = function() {
return this.getToken(EParser.MINUS, 0);
};
OperatorMinusContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorMinus(this);
}
};
OperatorMinusContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorMinus(this);
}
};
function OperatorModuloContext(parser, ctx) {
OperatorContext.call(this, parser);
OperatorContext.prototype.copyFrom.call(this, ctx);
return this;
}
OperatorModuloContext.prototype = Object.create(OperatorContext.prototype);
OperatorModuloContext.prototype.constructor = OperatorModuloContext;
OperatorModuloContext.prototype.modulo = function() {
return this.getTypedRuleContext(ModuloContext,0);
};
OperatorModuloContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterOperatorModulo(this);
}
};
OperatorModuloContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitOperatorModulo(this);
}
};
EParser.prototype.operator = function() {
var localctx = new OperatorContext(this, this._ctx, this.state);
this.enterRule(localctx, 290, EParser.RULE_operator);
try {
this.state = 1962;
switch(this._input.LA(1)) {
case EParser.PLUS:
localctx = new OperatorPlusContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1956;
this.match(EParser.PLUS);
break;
case EParser.MINUS:
localctx = new OperatorMinusContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1957;
this.match(EParser.MINUS);
break;
case EParser.STAR:
localctx = new OperatorMultiplyContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 1958;
this.multiply();
break;
case EParser.SLASH:
localctx = new OperatorDivideContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 1959;
this.divide();
break;
case EParser.BSLASH:
localctx = new OperatorIDivideContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 1960;
this.idivide();
break;
case EParser.PERCENT:
case EParser.MODULO:
localctx = new OperatorModuloContext(this, localctx);
this.enterOuterAlt(localctx, 6);
this.state = 1961;
this.modulo();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function New_tokenContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_new_token;
this.i1 = null; // Token
return this;
}
New_tokenContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
New_tokenContext.prototype.constructor = New_tokenContext;
New_tokenContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
New_tokenContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterNew_token(this);
}
};
New_tokenContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitNew_token(this);
}
};
EParser.prototype.new_token = function() {
var localctx = new New_tokenContext(this, this._ctx, this.state);
this.enterRule(localctx, 292, EParser.RULE_new_token);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1964;
localctx.i1 = this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1965;
if (!( this.isText(localctx.i1,"new"))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.isText($i1,\"new\")");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Key_tokenContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_key_token;
this.i1 = null; // Token
return this;
}
Key_tokenContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Key_tokenContext.prototype.constructor = Key_tokenContext;
Key_tokenContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Key_tokenContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterKey_token(this);
}
};
Key_tokenContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitKey_token(this);
}
};
EParser.prototype.key_token = function() {
var localctx = new Key_tokenContext(this, this._ctx, this.state);
this.enterRule(localctx, 294, EParser.RULE_key_token);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1967;
localctx.i1 = this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1968;
if (!( this.isText(localctx.i1,"key"))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.isText($i1,\"key\")");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Module_tokenContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_module_token;
this.i1 = null; // Token
return this;
}
Module_tokenContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Module_tokenContext.prototype.constructor = Module_tokenContext;
Module_tokenContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Module_tokenContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterModule_token(this);
}
};
Module_tokenContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitModule_token(this);
}
};
EParser.prototype.module_token = function() {
var localctx = new Module_tokenContext(this, this._ctx, this.state);
this.enterRule(localctx, 296, EParser.RULE_module_token);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1970;
localctx.i1 = this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1971;
if (!( this.isText(localctx.i1,"module"))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.isText($i1,\"module\")");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Value_tokenContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_value_token;
this.i1 = null; // Token
return this;
}
Value_tokenContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Value_tokenContext.prototype.constructor = Value_tokenContext;
Value_tokenContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Value_tokenContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterValue_token(this);
}
};
Value_tokenContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitValue_token(this);
}
};
EParser.prototype.value_token = function() {
var localctx = new Value_tokenContext(this, this._ctx, this.state);
this.enterRule(localctx, 298, EParser.RULE_value_token);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1973;
localctx.i1 = this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1974;
if (!( this.isText(localctx.i1,"value"))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.isText($i1,\"value\")");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Symbols_tokenContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_symbols_token;
this.i1 = null; // Token
return this;
}
Symbols_tokenContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Symbols_tokenContext.prototype.constructor = Symbols_tokenContext;
Symbols_tokenContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Symbols_tokenContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterSymbols_token(this);
}
};
Symbols_tokenContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitSymbols_token(this);
}
};
EParser.prototype.symbols_token = function() {
var localctx = new Symbols_tokenContext(this, this._ctx, this.state);
this.enterRule(localctx, 300, EParser.RULE_symbols_token);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1976;
localctx.i1 = this.match(EParser.VARIABLE_IDENTIFIER);
this.state = 1977;
if (!( this.isText(localctx.i1,"symbols"))) {
throw new antlr4.error.FailedPredicateException(this, "$parser.isText($i1,\"symbols\")");
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function AssignContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_assign;
return this;
}
AssignContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
AssignContext.prototype.constructor = AssignContext;
AssignContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
AssignContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterAssign(this);
}
};
AssignContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitAssign(this);
}
};
EParser.prototype.assign = function() {
var localctx = new AssignContext(this, this._ctx, this.state);
this.enterRule(localctx, 302, EParser.RULE_assign);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1979;
this.match(EParser.EQ);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function MultiplyContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_multiply;
return this;
}
MultiplyContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
MultiplyContext.prototype.constructor = MultiplyContext;
MultiplyContext.prototype.STAR = function() {
return this.getToken(EParser.STAR, 0);
};
MultiplyContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterMultiply(this);
}
};
MultiplyContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitMultiply(this);
}
};
EParser.prototype.multiply = function() {
var localctx = new MultiplyContext(this, this._ctx, this.state);
this.enterRule(localctx, 304, EParser.RULE_multiply);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1981;
this.match(EParser.STAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function DivideContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_divide;
return this;
}
DivideContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
DivideContext.prototype.constructor = DivideContext;
DivideContext.prototype.SLASH = function() {
return this.getToken(EParser.SLASH, 0);
};
DivideContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterDivide(this);
}
};
DivideContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitDivide(this);
}
};
EParser.prototype.divide = function() {
var localctx = new DivideContext(this, this._ctx, this.state);
this.enterRule(localctx, 306, EParser.RULE_divide);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1983;
this.match(EParser.SLASH);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function IdivideContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_idivide;
return this;
}
IdivideContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
IdivideContext.prototype.constructor = IdivideContext;
IdivideContext.prototype.BSLASH = function() {
return this.getToken(EParser.BSLASH, 0);
};
IdivideContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterIdivide(this);
}
};
IdivideContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitIdivide(this);
}
};
EParser.prototype.idivide = function() {
var localctx = new IdivideContext(this, this._ctx, this.state);
this.enterRule(localctx, 308, EParser.RULE_idivide);
try {
this.enterOuterAlt(localctx, 1);
this.state = 1985;
this.match(EParser.BSLASH);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function ModuloContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_modulo;
return this;
}
ModuloContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ModuloContext.prototype.constructor = ModuloContext;
ModuloContext.prototype.PERCENT = function() {
return this.getToken(EParser.PERCENT, 0);
};
ModuloContext.prototype.MODULO = function() {
return this.getToken(EParser.MODULO, 0);
};
ModuloContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterModulo(this);
}
};
ModuloContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitModulo(this);
}
};
EParser.prototype.modulo = function() {
var localctx = new ModuloContext(this, this._ctx, this.state);
this.enterRule(localctx, 310, EParser.RULE_modulo);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 1987;
_la = this._input.LA(1);
if(!(_la===EParser.PERCENT || _la===EParser.MODULO)) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_statement;
return this;
}
Javascript_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_statementContext.prototype.constructor = Javascript_statementContext;
Javascript_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavascriptStatementContext(parser, ctx) {
Javascript_statementContext.call(this, parser);
this.exp = null; // Javascript_expressionContext;
Javascript_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptStatementContext.prototype = Object.create(Javascript_statementContext.prototype);
JavascriptStatementContext.prototype.constructor = JavascriptStatementContext;
JavascriptStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
JavascriptStatementContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
JavascriptStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptStatement(this);
}
};
JavascriptStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptStatement(this);
}
};
function JavascriptReturnStatementContext(parser, ctx) {
Javascript_statementContext.call(this, parser);
this.exp = null; // Javascript_expressionContext;
Javascript_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptReturnStatementContext.prototype = Object.create(Javascript_statementContext.prototype);
JavascriptReturnStatementContext.prototype.constructor = JavascriptReturnStatementContext;
JavascriptReturnStatementContext.prototype.RETURN = function() {
return this.getToken(EParser.RETURN, 0);
};
JavascriptReturnStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
JavascriptReturnStatementContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
JavascriptReturnStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptReturnStatement(this);
}
};
JavascriptReturnStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptReturnStatement(this);
}
};
EParser.prototype.javascript_statement = function() {
var localctx = new Javascript_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 312, EParser.RULE_javascript_statement);
try {
this.state = 1996;
switch(this._input.LA(1)) {
case EParser.RETURN:
localctx = new JavascriptReturnStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 1989;
this.match(EParser.RETURN);
this.state = 1990;
localctx.exp = this.javascript_expression(0);
this.state = 1991;
this.match(EParser.SEMI);
break;
case EParser.LPAR:
case EParser.LBRAK:
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.SELF:
case EParser.TEST:
case EParser.THIS:
case EParser.WRITE:
case EParser.BOOLEAN_LITERAL:
case EParser.CHAR_LITERAL:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
case EParser.DOLLAR_IDENTIFIER:
case EParser.TEXT_LITERAL:
case EParser.INTEGER_LITERAL:
case EParser.DECIMAL_LITERAL:
localctx = new JavascriptStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 1993;
localctx.exp = this.javascript_expression(0);
this.state = 1994;
this.match(EParser.SEMI);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_expression;
return this;
}
Javascript_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_expressionContext.prototype.constructor = Javascript_expressionContext;
Javascript_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavascriptSelectorExpressionContext(parser, ctx) {
Javascript_expressionContext.call(this, parser);
this.parent = null; // Javascript_expressionContext;
this.child = null; // Javascript_selector_expressionContext;
Javascript_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptSelectorExpressionContext.prototype = Object.create(Javascript_expressionContext.prototype);
JavascriptSelectorExpressionContext.prototype.constructor = JavascriptSelectorExpressionContext;
JavascriptSelectorExpressionContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
JavascriptSelectorExpressionContext.prototype.javascript_selector_expression = function() {
return this.getTypedRuleContext(Javascript_selector_expressionContext,0);
};
JavascriptSelectorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptSelectorExpression(this);
}
};
JavascriptSelectorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptSelectorExpression(this);
}
};
function JavascriptPrimaryExpressionContext(parser, ctx) {
Javascript_expressionContext.call(this, parser);
this.exp = null; // Javascript_primary_expressionContext;
Javascript_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptPrimaryExpressionContext.prototype = Object.create(Javascript_expressionContext.prototype);
JavascriptPrimaryExpressionContext.prototype.constructor = JavascriptPrimaryExpressionContext;
JavascriptPrimaryExpressionContext.prototype.javascript_primary_expression = function() {
return this.getTypedRuleContext(Javascript_primary_expressionContext,0);
};
JavascriptPrimaryExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptPrimaryExpression(this);
}
};
JavascriptPrimaryExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptPrimaryExpression(this);
}
};
EParser.prototype.javascript_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Javascript_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 314;
this.enterRecursionRule(localctx, 314, EParser.RULE_javascript_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavascriptPrimaryExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 1999;
localctx.exp = this.javascript_primary_expression();
this._ctx.stop = this._input.LT(-1);
this.state = 2005;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,162,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavascriptSelectorExpressionContext(this, new Javascript_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_javascript_expression);
this.state = 2001;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2002;
localctx.child = this.javascript_selector_expression();
}
this.state = 2007;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,162,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Javascript_primary_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_primary_expression;
return this;
}
Javascript_primary_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_primary_expressionContext.prototype.constructor = Javascript_primary_expressionContext;
Javascript_primary_expressionContext.prototype.javascript_this_expression = function() {
return this.getTypedRuleContext(Javascript_this_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_new_expression = function() {
return this.getTypedRuleContext(Javascript_new_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_parenthesis_expression = function() {
return this.getTypedRuleContext(Javascript_parenthesis_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_identifier_expression = function() {
return this.getTypedRuleContext(Javascript_identifier_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_literal_expression = function() {
return this.getTypedRuleContext(Javascript_literal_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_method_expression = function() {
return this.getTypedRuleContext(Javascript_method_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.javascript_item_expression = function() {
return this.getTypedRuleContext(Javascript_item_expressionContext,0);
};
Javascript_primary_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_primary_expression(this);
}
};
Javascript_primary_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_primary_expression(this);
}
};
EParser.prototype.javascript_primary_expression = function() {
var localctx = new Javascript_primary_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 316, EParser.RULE_javascript_primary_expression);
try {
this.state = 2015;
var la_ = this._interp.adaptivePredict(this._input,163,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 2008;
this.javascript_this_expression();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 2009;
this.javascript_new_expression();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 2010;
this.javascript_parenthesis_expression();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 2011;
this.javascript_identifier_expression();
break;
case 5:
this.enterOuterAlt(localctx, 5);
this.state = 2012;
this.javascript_literal_expression();
break;
case 6:
this.enterOuterAlt(localctx, 6);
this.state = 2013;
this.javascript_method_expression();
break;
case 7:
this.enterOuterAlt(localctx, 7);
this.state = 2014;
this.javascript_item_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_this_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_this_expression;
return this;
}
Javascript_this_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_this_expressionContext.prototype.constructor = Javascript_this_expressionContext;
Javascript_this_expressionContext.prototype.this_expression = function() {
return this.getTypedRuleContext(This_expressionContext,0);
};
Javascript_this_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_this_expression(this);
}
};
Javascript_this_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_this_expression(this);
}
};
EParser.prototype.javascript_this_expression = function() {
var localctx = new Javascript_this_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 318, EParser.RULE_javascript_this_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2017;
this.this_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_new_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_new_expression;
return this;
}
Javascript_new_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_new_expressionContext.prototype.constructor = Javascript_new_expressionContext;
Javascript_new_expressionContext.prototype.new_token = function() {
return this.getTypedRuleContext(New_tokenContext,0);
};
Javascript_new_expressionContext.prototype.javascript_method_expression = function() {
return this.getTypedRuleContext(Javascript_method_expressionContext,0);
};
Javascript_new_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_new_expression(this);
}
};
Javascript_new_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_new_expression(this);
}
};
EParser.prototype.javascript_new_expression = function() {
var localctx = new Javascript_new_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 320, EParser.RULE_javascript_new_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2019;
this.new_token();
this.state = 2020;
this.javascript_method_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_selector_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_selector_expression;
return this;
}
Javascript_selector_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_selector_expressionContext.prototype.constructor = Javascript_selector_expressionContext;
Javascript_selector_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaScriptMemberExpressionContext(parser, ctx) {
Javascript_selector_expressionContext.call(this, parser);
this.name = null; // Javascript_identifierContext;
Javascript_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaScriptMemberExpressionContext.prototype = Object.create(Javascript_selector_expressionContext.prototype);
JavaScriptMemberExpressionContext.prototype.constructor = JavaScriptMemberExpressionContext;
JavaScriptMemberExpressionContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
JavaScriptMemberExpressionContext.prototype.javascript_identifier = function() {
return this.getTypedRuleContext(Javascript_identifierContext,0);
};
JavaScriptMemberExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaScriptMemberExpression(this);
}
};
JavaScriptMemberExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaScriptMemberExpression(this);
}
};
function JavaScriptItemExpressionContext(parser, ctx) {
Javascript_selector_expressionContext.call(this, parser);
this.exp = null; // Javascript_item_expressionContext;
Javascript_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaScriptItemExpressionContext.prototype = Object.create(Javascript_selector_expressionContext.prototype);
JavaScriptItemExpressionContext.prototype.constructor = JavaScriptItemExpressionContext;
JavaScriptItemExpressionContext.prototype.javascript_item_expression = function() {
return this.getTypedRuleContext(Javascript_item_expressionContext,0);
};
JavaScriptItemExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaScriptItemExpression(this);
}
};
JavaScriptItemExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaScriptItemExpression(this);
}
};
function JavaScriptMethodExpressionContext(parser, ctx) {
Javascript_selector_expressionContext.call(this, parser);
this.method = null; // Javascript_method_expressionContext;
Javascript_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaScriptMethodExpressionContext.prototype = Object.create(Javascript_selector_expressionContext.prototype);
JavaScriptMethodExpressionContext.prototype.constructor = JavaScriptMethodExpressionContext;
JavaScriptMethodExpressionContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
JavaScriptMethodExpressionContext.prototype.javascript_method_expression = function() {
return this.getTypedRuleContext(Javascript_method_expressionContext,0);
};
JavaScriptMethodExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaScriptMethodExpression(this);
}
};
JavaScriptMethodExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaScriptMethodExpression(this);
}
};
EParser.prototype.javascript_selector_expression = function() {
var localctx = new Javascript_selector_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 322, EParser.RULE_javascript_selector_expression);
try {
this.state = 2027;
var la_ = this._interp.adaptivePredict(this._input,164,this._ctx);
switch(la_) {
case 1:
localctx = new JavaScriptMethodExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2022;
this.match(EParser.DOT);
this.state = 2023;
localctx.method = this.javascript_method_expression();
break;
case 2:
localctx = new JavaScriptMemberExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2024;
this.match(EParser.DOT);
this.state = 2025;
localctx.name = this.javascript_identifier();
break;
case 3:
localctx = new JavaScriptItemExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2026;
localctx.exp = this.javascript_item_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_method_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_method_expression;
this.name = null; // Javascript_identifierContext
this.args = null; // Javascript_argumentsContext
return this;
}
Javascript_method_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_method_expressionContext.prototype.constructor = Javascript_method_expressionContext;
Javascript_method_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Javascript_method_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Javascript_method_expressionContext.prototype.javascript_identifier = function() {
return this.getTypedRuleContext(Javascript_identifierContext,0);
};
Javascript_method_expressionContext.prototype.javascript_arguments = function() {
return this.getTypedRuleContext(Javascript_argumentsContext,0);
};
Javascript_method_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_method_expression(this);
}
};
Javascript_method_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_method_expression(this);
}
};
EParser.prototype.javascript_method_expression = function() {
var localctx = new Javascript_method_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 324, EParser.RULE_javascript_method_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2029;
localctx.name = this.javascript_identifier();
this.state = 2030;
this.match(EParser.LPAR);
this.state = 2032;
_la = this._input.LA(1);
if(_la===EParser.LPAR || _la===EParser.LBRAK || ((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 164)) & ~0x1f) == 0 && ((1 << (_la - 164)) & ((1 << (EParser.DOLLAR_IDENTIFIER - 164)) | (1 << (EParser.TEXT_LITERAL - 164)) | (1 << (EParser.INTEGER_LITERAL - 164)) | (1 << (EParser.DECIMAL_LITERAL - 164)))) !== 0)) {
this.state = 2031;
localctx.args = this.javascript_arguments(0);
}
this.state = 2034;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_argumentsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_arguments;
return this;
}
Javascript_argumentsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_argumentsContext.prototype.constructor = Javascript_argumentsContext;
Javascript_argumentsContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavascriptArgumentListContext(parser, ctx) {
Javascript_argumentsContext.call(this, parser);
this.item = null; // Javascript_expressionContext;
Javascript_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptArgumentListContext.prototype = Object.create(Javascript_argumentsContext.prototype);
JavascriptArgumentListContext.prototype.constructor = JavascriptArgumentListContext;
JavascriptArgumentListContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
JavascriptArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptArgumentList(this);
}
};
JavascriptArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptArgumentList(this);
}
};
function JavascriptArgumentListItemContext(parser, ctx) {
Javascript_argumentsContext.call(this, parser);
this.items = null; // Javascript_argumentsContext;
this.item = null; // Javascript_expressionContext;
Javascript_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptArgumentListItemContext.prototype = Object.create(Javascript_argumentsContext.prototype);
JavascriptArgumentListItemContext.prototype.constructor = JavascriptArgumentListItemContext;
JavascriptArgumentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
JavascriptArgumentListItemContext.prototype.javascript_arguments = function() {
return this.getTypedRuleContext(Javascript_argumentsContext,0);
};
JavascriptArgumentListItemContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
JavascriptArgumentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptArgumentListItem(this);
}
};
JavascriptArgumentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptArgumentListItem(this);
}
};
EParser.prototype.javascript_arguments = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Javascript_argumentsContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 326;
this.enterRecursionRule(localctx, 326, EParser.RULE_javascript_arguments, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavascriptArgumentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2037;
localctx.item = this.javascript_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2044;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,166,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavascriptArgumentListItemContext(this, new Javascript_argumentsContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_javascript_arguments);
this.state = 2039;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2040;
this.match(EParser.COMMA);
this.state = 2041;
localctx.item = this.javascript_expression(0);
}
this.state = 2046;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,166,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Javascript_item_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_item_expression;
this.exp = null; // Javascript_expressionContext
return this;
}
Javascript_item_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_item_expressionContext.prototype.constructor = Javascript_item_expressionContext;
Javascript_item_expressionContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
Javascript_item_expressionContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
Javascript_item_expressionContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
Javascript_item_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_item_expression(this);
}
};
Javascript_item_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_item_expression(this);
}
};
EParser.prototype.javascript_item_expression = function() {
var localctx = new Javascript_item_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 328, EParser.RULE_javascript_item_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2047;
this.match(EParser.LBRAK);
this.state = 2048;
localctx.exp = this.javascript_expression(0);
this.state = 2049;
this.match(EParser.RBRAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_parenthesis_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_parenthesis_expression;
this.exp = null; // Javascript_expressionContext
return this;
}
Javascript_parenthesis_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_parenthesis_expressionContext.prototype.constructor = Javascript_parenthesis_expressionContext;
Javascript_parenthesis_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Javascript_parenthesis_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Javascript_parenthesis_expressionContext.prototype.javascript_expression = function() {
return this.getTypedRuleContext(Javascript_expressionContext,0);
};
Javascript_parenthesis_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_parenthesis_expression(this);
}
};
Javascript_parenthesis_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_parenthesis_expression(this);
}
};
EParser.prototype.javascript_parenthesis_expression = function() {
var localctx = new Javascript_parenthesis_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 330, EParser.RULE_javascript_parenthesis_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2051;
this.match(EParser.LPAR);
this.state = 2052;
localctx.exp = this.javascript_expression(0);
this.state = 2053;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_identifier_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_identifier_expression;
this.name = null; // Javascript_identifierContext
return this;
}
Javascript_identifier_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_identifier_expressionContext.prototype.constructor = Javascript_identifier_expressionContext;
Javascript_identifier_expressionContext.prototype.javascript_identifier = function() {
return this.getTypedRuleContext(Javascript_identifierContext,0);
};
Javascript_identifier_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_identifier_expression(this);
}
};
Javascript_identifier_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_identifier_expression(this);
}
};
EParser.prototype.javascript_identifier_expression = function() {
var localctx = new Javascript_identifier_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 332, EParser.RULE_javascript_identifier_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2055;
localctx.name = this.javascript_identifier();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_literal_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_literal_expression;
return this;
}
Javascript_literal_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_literal_expressionContext.prototype.constructor = Javascript_literal_expressionContext;
Javascript_literal_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavascriptIntegerLiteralContext(parser, ctx) {
Javascript_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Javascript_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptIntegerLiteralContext.prototype = Object.create(Javascript_literal_expressionContext.prototype);
JavascriptIntegerLiteralContext.prototype.constructor = JavascriptIntegerLiteralContext;
JavascriptIntegerLiteralContext.prototype.INTEGER_LITERAL = function() {
return this.getToken(EParser.INTEGER_LITERAL, 0);
};
JavascriptIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptIntegerLiteral(this);
}
};
JavascriptIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptIntegerLiteral(this);
}
};
function JavascriptBooleanLiteralContext(parser, ctx) {
Javascript_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Javascript_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptBooleanLiteralContext.prototype = Object.create(Javascript_literal_expressionContext.prototype);
JavascriptBooleanLiteralContext.prototype.constructor = JavascriptBooleanLiteralContext;
JavascriptBooleanLiteralContext.prototype.BOOLEAN_LITERAL = function() {
return this.getToken(EParser.BOOLEAN_LITERAL, 0);
};
JavascriptBooleanLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptBooleanLiteral(this);
}
};
JavascriptBooleanLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptBooleanLiteral(this);
}
};
function JavascriptCharacterLiteralContext(parser, ctx) {
Javascript_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Javascript_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptCharacterLiteralContext.prototype = Object.create(Javascript_literal_expressionContext.prototype);
JavascriptCharacterLiteralContext.prototype.constructor = JavascriptCharacterLiteralContext;
JavascriptCharacterLiteralContext.prototype.CHAR_LITERAL = function() {
return this.getToken(EParser.CHAR_LITERAL, 0);
};
JavascriptCharacterLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptCharacterLiteral(this);
}
};
JavascriptCharacterLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptCharacterLiteral(this);
}
};
function JavascriptTextLiteralContext(parser, ctx) {
Javascript_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Javascript_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptTextLiteralContext.prototype = Object.create(Javascript_literal_expressionContext.prototype);
JavascriptTextLiteralContext.prototype.constructor = JavascriptTextLiteralContext;
JavascriptTextLiteralContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
JavascriptTextLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptTextLiteral(this);
}
};
JavascriptTextLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptTextLiteral(this);
}
};
function JavascriptDecimalLiteralContext(parser, ctx) {
Javascript_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Javascript_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavascriptDecimalLiteralContext.prototype = Object.create(Javascript_literal_expressionContext.prototype);
JavascriptDecimalLiteralContext.prototype.constructor = JavascriptDecimalLiteralContext;
JavascriptDecimalLiteralContext.prototype.DECIMAL_LITERAL = function() {
return this.getToken(EParser.DECIMAL_LITERAL, 0);
};
JavascriptDecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascriptDecimalLiteral(this);
}
};
JavascriptDecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascriptDecimalLiteral(this);
}
};
EParser.prototype.javascript_literal_expression = function() {
var localctx = new Javascript_literal_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 334, EParser.RULE_javascript_literal_expression);
try {
this.state = 2062;
switch(this._input.LA(1)) {
case EParser.INTEGER_LITERAL:
localctx = new JavascriptIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2057;
localctx.t = this.match(EParser.INTEGER_LITERAL);
break;
case EParser.DECIMAL_LITERAL:
localctx = new JavascriptDecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2058;
localctx.t = this.match(EParser.DECIMAL_LITERAL);
break;
case EParser.TEXT_LITERAL:
localctx = new JavascriptTextLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2059;
localctx.t = this.match(EParser.TEXT_LITERAL);
break;
case EParser.BOOLEAN_LITERAL:
localctx = new JavascriptBooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 2060;
localctx.t = this.match(EParser.BOOLEAN_LITERAL);
break;
case EParser.CHAR_LITERAL:
localctx = new JavascriptCharacterLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 2061;
localctx.t = this.match(EParser.CHAR_LITERAL);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Javascript_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_javascript_identifier;
return this;
}
Javascript_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Javascript_identifierContext.prototype.constructor = Javascript_identifierContext;
Javascript_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Javascript_identifierContext.prototype.SYMBOL_IDENTIFIER = function() {
return this.getToken(EParser.SYMBOL_IDENTIFIER, 0);
};
Javascript_identifierContext.prototype.DOLLAR_IDENTIFIER = function() {
return this.getToken(EParser.DOLLAR_IDENTIFIER, 0);
};
Javascript_identifierContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Javascript_identifierContext.prototype.BOOLEAN = function() {
return this.getToken(EParser.BOOLEAN, 0);
};
Javascript_identifierContext.prototype.CHARACTER = function() {
return this.getToken(EParser.CHARACTER, 0);
};
Javascript_identifierContext.prototype.TEXT = function() {
return this.getToken(EParser.TEXT, 0);
};
Javascript_identifierContext.prototype.INTEGER = function() {
return this.getToken(EParser.INTEGER, 0);
};
Javascript_identifierContext.prototype.DECIMAL = function() {
return this.getToken(EParser.DECIMAL, 0);
};
Javascript_identifierContext.prototype.DATE = function() {
return this.getToken(EParser.DATE, 0);
};
Javascript_identifierContext.prototype.TIME = function() {
return this.getToken(EParser.TIME, 0);
};
Javascript_identifierContext.prototype.DATETIME = function() {
return this.getToken(EParser.DATETIME, 0);
};
Javascript_identifierContext.prototype.PERIOD = function() {
return this.getToken(EParser.PERIOD, 0);
};
Javascript_identifierContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Javascript_identifierContext.prototype.WRITE = function() {
return this.getToken(EParser.WRITE, 0);
};
Javascript_identifierContext.prototype.TEST = function() {
return this.getToken(EParser.TEST, 0);
};
Javascript_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavascript_identifier(this);
}
};
Javascript_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavascript_identifier(this);
}
};
EParser.prototype.javascript_identifier = function() {
var localctx = new Javascript_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 336, EParser.RULE_javascript_identifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2064;
_la = this._input.LA(1);
if(!(((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || _la===EParser.DOLLAR_IDENTIFIER)) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_statement;
return this;
}
Python_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_statementContext.prototype.constructor = Python_statementContext;
Python_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonStatementContext(parser, ctx) {
Python_statementContext.call(this, parser);
this.exp = null; // Python_expressionContext;
Python_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonStatementContext.prototype = Object.create(Python_statementContext.prototype);
PythonStatementContext.prototype.constructor = PythonStatementContext;
PythonStatementContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonStatement(this);
}
};
PythonStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonStatement(this);
}
};
function PythonReturnStatementContext(parser, ctx) {
Python_statementContext.call(this, parser);
this.exp = null; // Python_expressionContext;
Python_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonReturnStatementContext.prototype = Object.create(Python_statementContext.prototype);
PythonReturnStatementContext.prototype.constructor = PythonReturnStatementContext;
PythonReturnStatementContext.prototype.RETURN = function() {
return this.getToken(EParser.RETURN, 0);
};
PythonReturnStatementContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonReturnStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonReturnStatement(this);
}
};
PythonReturnStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonReturnStatement(this);
}
};
EParser.prototype.python_statement = function() {
var localctx = new Python_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 338, EParser.RULE_python_statement);
try {
this.state = 2069;
switch(this._input.LA(1)) {
case EParser.RETURN:
localctx = new PythonReturnStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2066;
this.match(EParser.RETURN);
this.state = 2067;
localctx.exp = this.python_expression(0);
break;
case EParser.LPAR:
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.SELF:
case EParser.TEST:
case EParser.THIS:
case EParser.WRITE:
case EParser.BOOLEAN_LITERAL:
case EParser.CHAR_LITERAL:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
case EParser.DOLLAR_IDENTIFIER:
case EParser.TEXT_LITERAL:
case EParser.INTEGER_LITERAL:
case EParser.DECIMAL_LITERAL:
localctx = new PythonStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2068;
localctx.exp = this.python_expression(0);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_expression;
return this;
}
Python_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_expressionContext.prototype.constructor = Python_expressionContext;
Python_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonSelectorExpressionContext(parser, ctx) {
Python_expressionContext.call(this, parser);
this.parent = null; // Python_expressionContext;
this.child = null; // Python_selector_expressionContext;
Python_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonSelectorExpressionContext.prototype = Object.create(Python_expressionContext.prototype);
PythonSelectorExpressionContext.prototype.constructor = PythonSelectorExpressionContext;
PythonSelectorExpressionContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonSelectorExpressionContext.prototype.python_selector_expression = function() {
return this.getTypedRuleContext(Python_selector_expressionContext,0);
};
PythonSelectorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonSelectorExpression(this);
}
};
PythonSelectorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonSelectorExpression(this);
}
};
function PythonPrimaryExpressionContext(parser, ctx) {
Python_expressionContext.call(this, parser);
this.exp = null; // Python_primary_expressionContext;
Python_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonPrimaryExpressionContext.prototype = Object.create(Python_expressionContext.prototype);
PythonPrimaryExpressionContext.prototype.constructor = PythonPrimaryExpressionContext;
PythonPrimaryExpressionContext.prototype.python_primary_expression = function() {
return this.getTypedRuleContext(Python_primary_expressionContext,0);
};
PythonPrimaryExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonPrimaryExpression(this);
}
};
PythonPrimaryExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonPrimaryExpression(this);
}
};
EParser.prototype.python_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Python_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 340;
this.enterRecursionRule(localctx, 340, EParser.RULE_python_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new PythonPrimaryExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2072;
localctx.exp = this.python_primary_expression();
this._ctx.stop = this._input.LT(-1);
this.state = 2078;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,169,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new PythonSelectorExpressionContext(this, new Python_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_python_expression);
this.state = 2074;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2075;
localctx.child = this.python_selector_expression();
}
this.state = 2080;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,169,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Python_primary_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_primary_expression;
return this;
}
Python_primary_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_primary_expressionContext.prototype.constructor = Python_primary_expressionContext;
Python_primary_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonParenthesisExpressionContext(parser, ctx) {
Python_primary_expressionContext.call(this, parser);
this.exp = null; // Python_parenthesis_expressionContext;
Python_primary_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonParenthesisExpressionContext.prototype = Object.create(Python_primary_expressionContext.prototype);
PythonParenthesisExpressionContext.prototype.constructor = PythonParenthesisExpressionContext;
PythonParenthesisExpressionContext.prototype.python_parenthesis_expression = function() {
return this.getTypedRuleContext(Python_parenthesis_expressionContext,0);
};
PythonParenthesisExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonParenthesisExpression(this);
}
};
PythonParenthesisExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonParenthesisExpression(this);
}
};
function PythonIdentifierExpressionContext(parser, ctx) {
Python_primary_expressionContext.call(this, parser);
this.exp = null; // Python_identifier_expressionContext;
Python_primary_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonIdentifierExpressionContext.prototype = Object.create(Python_primary_expressionContext.prototype);
PythonIdentifierExpressionContext.prototype.constructor = PythonIdentifierExpressionContext;
PythonIdentifierExpressionContext.prototype.python_identifier_expression = function() {
return this.getTypedRuleContext(Python_identifier_expressionContext,0);
};
PythonIdentifierExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonIdentifierExpression(this);
}
};
PythonIdentifierExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonIdentifierExpression(this);
}
};
function PythonLiteralExpressionContext(parser, ctx) {
Python_primary_expressionContext.call(this, parser);
this.exp = null; // Python_literal_expressionContext;
Python_primary_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonLiteralExpressionContext.prototype = Object.create(Python_primary_expressionContext.prototype);
PythonLiteralExpressionContext.prototype.constructor = PythonLiteralExpressionContext;
PythonLiteralExpressionContext.prototype.python_literal_expression = function() {
return this.getTypedRuleContext(Python_literal_expressionContext,0);
};
PythonLiteralExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonLiteralExpression(this);
}
};
PythonLiteralExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonLiteralExpression(this);
}
};
function PythonGlobalMethodExpressionContext(parser, ctx) {
Python_primary_expressionContext.call(this, parser);
this.exp = null; // Python_method_expressionContext;
Python_primary_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonGlobalMethodExpressionContext.prototype = Object.create(Python_primary_expressionContext.prototype);
PythonGlobalMethodExpressionContext.prototype.constructor = PythonGlobalMethodExpressionContext;
PythonGlobalMethodExpressionContext.prototype.python_method_expression = function() {
return this.getTypedRuleContext(Python_method_expressionContext,0);
};
PythonGlobalMethodExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonGlobalMethodExpression(this);
}
};
PythonGlobalMethodExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonGlobalMethodExpression(this);
}
};
EParser.prototype.python_primary_expression = function() {
var localctx = new Python_primary_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 342, EParser.RULE_python_primary_expression);
try {
this.state = 2085;
var la_ = this._interp.adaptivePredict(this._input,170,this._ctx);
switch(la_) {
case 1:
localctx = new PythonParenthesisExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2081;
localctx.exp = this.python_parenthesis_expression();
break;
case 2:
localctx = new PythonIdentifierExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2082;
localctx.exp = this.python_identifier_expression(0);
break;
case 3:
localctx = new PythonLiteralExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2083;
localctx.exp = this.python_literal_expression();
break;
case 4:
localctx = new PythonGlobalMethodExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 2084;
localctx.exp = this.python_method_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_selector_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_selector_expression;
return this;
}
Python_selector_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_selector_expressionContext.prototype.constructor = Python_selector_expressionContext;
Python_selector_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonMethodExpressionContext(parser, ctx) {
Python_selector_expressionContext.call(this, parser);
this.exp = null; // Python_method_expressionContext;
Python_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonMethodExpressionContext.prototype = Object.create(Python_selector_expressionContext.prototype);
PythonMethodExpressionContext.prototype.constructor = PythonMethodExpressionContext;
PythonMethodExpressionContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
PythonMethodExpressionContext.prototype.python_method_expression = function() {
return this.getTypedRuleContext(Python_method_expressionContext,0);
};
PythonMethodExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonMethodExpression(this);
}
};
PythonMethodExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonMethodExpression(this);
}
};
function PythonItemExpressionContext(parser, ctx) {
Python_selector_expressionContext.call(this, parser);
this.exp = null; // Python_expressionContext;
Python_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonItemExpressionContext.prototype = Object.create(Python_selector_expressionContext.prototype);
PythonItemExpressionContext.prototype.constructor = PythonItemExpressionContext;
PythonItemExpressionContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
PythonItemExpressionContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
PythonItemExpressionContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonItemExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonItemExpression(this);
}
};
PythonItemExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonItemExpression(this);
}
};
EParser.prototype.python_selector_expression = function() {
var localctx = new Python_selector_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 344, EParser.RULE_python_selector_expression);
try {
this.state = 2093;
switch(this._input.LA(1)) {
case EParser.DOT:
localctx = new PythonMethodExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2087;
this.match(EParser.DOT);
this.state = 2088;
localctx.exp = this.python_method_expression();
break;
case EParser.LBRAK:
localctx = new PythonItemExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2089;
this.match(EParser.LBRAK);
this.state = 2090;
localctx.exp = this.python_expression(0);
this.state = 2091;
this.match(EParser.RBRAK);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_method_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_method_expression;
this.name = null; // Python_identifierContext
this.args = null; // Python_argument_listContext
return this;
}
Python_method_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_method_expressionContext.prototype.constructor = Python_method_expressionContext;
Python_method_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Python_method_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Python_method_expressionContext.prototype.python_identifier = function() {
return this.getTypedRuleContext(Python_identifierContext,0);
};
Python_method_expressionContext.prototype.python_argument_list = function() {
return this.getTypedRuleContext(Python_argument_listContext,0);
};
Python_method_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_method_expression(this);
}
};
Python_method_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_method_expression(this);
}
};
EParser.prototype.python_method_expression = function() {
var localctx = new Python_method_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 346, EParser.RULE_python_method_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2095;
localctx.name = this.python_identifier();
this.state = 2096;
this.match(EParser.LPAR);
this.state = 2098;
_la = this._input.LA(1);
if(_la===EParser.LPAR || ((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 164)) & ~0x1f) == 0 && ((1 << (_la - 164)) & ((1 << (EParser.DOLLAR_IDENTIFIER - 164)) | (1 << (EParser.TEXT_LITERAL - 164)) | (1 << (EParser.INTEGER_LITERAL - 164)) | (1 << (EParser.DECIMAL_LITERAL - 164)))) !== 0)) {
this.state = 2097;
localctx.args = this.python_argument_list();
}
this.state = 2100;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_argument_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_argument_list;
return this;
}
Python_argument_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_argument_listContext.prototype.constructor = Python_argument_listContext;
Python_argument_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonOrdinalOnlyArgumentListContext(parser, ctx) {
Python_argument_listContext.call(this, parser);
this.ordinal = null; // Python_ordinal_argument_listContext;
Python_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonOrdinalOnlyArgumentListContext.prototype = Object.create(Python_argument_listContext.prototype);
PythonOrdinalOnlyArgumentListContext.prototype.constructor = PythonOrdinalOnlyArgumentListContext;
PythonOrdinalOnlyArgumentListContext.prototype.python_ordinal_argument_list = function() {
return this.getTypedRuleContext(Python_ordinal_argument_listContext,0);
};
PythonOrdinalOnlyArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonOrdinalOnlyArgumentList(this);
}
};
PythonOrdinalOnlyArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonOrdinalOnlyArgumentList(this);
}
};
function PythonNamedOnlyArgumentListContext(parser, ctx) {
Python_argument_listContext.call(this, parser);
this.named = null; // Python_named_argument_listContext;
Python_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonNamedOnlyArgumentListContext.prototype = Object.create(Python_argument_listContext.prototype);
PythonNamedOnlyArgumentListContext.prototype.constructor = PythonNamedOnlyArgumentListContext;
PythonNamedOnlyArgumentListContext.prototype.python_named_argument_list = function() {
return this.getTypedRuleContext(Python_named_argument_listContext,0);
};
PythonNamedOnlyArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonNamedOnlyArgumentList(this);
}
};
PythonNamedOnlyArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonNamedOnlyArgumentList(this);
}
};
function PythonArgumentListContext(parser, ctx) {
Python_argument_listContext.call(this, parser);
this.ordinal = null; // Python_ordinal_argument_listContext;
this.named = null; // Python_named_argument_listContext;
Python_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonArgumentListContext.prototype = Object.create(Python_argument_listContext.prototype);
PythonArgumentListContext.prototype.constructor = PythonArgumentListContext;
PythonArgumentListContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
PythonArgumentListContext.prototype.python_ordinal_argument_list = function() {
return this.getTypedRuleContext(Python_ordinal_argument_listContext,0);
};
PythonArgumentListContext.prototype.python_named_argument_list = function() {
return this.getTypedRuleContext(Python_named_argument_listContext,0);
};
PythonArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonArgumentList(this);
}
};
PythonArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonArgumentList(this);
}
};
EParser.prototype.python_argument_list = function() {
var localctx = new Python_argument_listContext(this, this._ctx, this.state);
this.enterRule(localctx, 348, EParser.RULE_python_argument_list);
try {
this.state = 2108;
var la_ = this._interp.adaptivePredict(this._input,173,this._ctx);
switch(la_) {
case 1:
localctx = new PythonOrdinalOnlyArgumentListContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2102;
localctx.ordinal = this.python_ordinal_argument_list(0);
break;
case 2:
localctx = new PythonNamedOnlyArgumentListContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2103;
localctx.named = this.python_named_argument_list(0);
break;
case 3:
localctx = new PythonArgumentListContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2104;
localctx.ordinal = this.python_ordinal_argument_list(0);
this.state = 2105;
this.match(EParser.COMMA);
this.state = 2106;
localctx.named = this.python_named_argument_list(0);
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_ordinal_argument_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_ordinal_argument_list;
return this;
}
Python_ordinal_argument_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_ordinal_argument_listContext.prototype.constructor = Python_ordinal_argument_listContext;
Python_ordinal_argument_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonOrdinalArgumentListContext(parser, ctx) {
Python_ordinal_argument_listContext.call(this, parser);
this.item = null; // Python_expressionContext;
Python_ordinal_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonOrdinalArgumentListContext.prototype = Object.create(Python_ordinal_argument_listContext.prototype);
PythonOrdinalArgumentListContext.prototype.constructor = PythonOrdinalArgumentListContext;
PythonOrdinalArgumentListContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonOrdinalArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonOrdinalArgumentList(this);
}
};
PythonOrdinalArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonOrdinalArgumentList(this);
}
};
function PythonOrdinalArgumentListItemContext(parser, ctx) {
Python_ordinal_argument_listContext.call(this, parser);
this.items = null; // Python_ordinal_argument_listContext;
this.item = null; // Python_expressionContext;
Python_ordinal_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonOrdinalArgumentListItemContext.prototype = Object.create(Python_ordinal_argument_listContext.prototype);
PythonOrdinalArgumentListItemContext.prototype.constructor = PythonOrdinalArgumentListItemContext;
PythonOrdinalArgumentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
PythonOrdinalArgumentListItemContext.prototype.python_ordinal_argument_list = function() {
return this.getTypedRuleContext(Python_ordinal_argument_listContext,0);
};
PythonOrdinalArgumentListItemContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonOrdinalArgumentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonOrdinalArgumentListItem(this);
}
};
PythonOrdinalArgumentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonOrdinalArgumentListItem(this);
}
};
EParser.prototype.python_ordinal_argument_list = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Python_ordinal_argument_listContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 350;
this.enterRecursionRule(localctx, 350, EParser.RULE_python_ordinal_argument_list, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new PythonOrdinalArgumentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2111;
localctx.item = this.python_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2118;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,174,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new PythonOrdinalArgumentListItemContext(this, new Python_ordinal_argument_listContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_python_ordinal_argument_list);
this.state = 2113;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2114;
this.match(EParser.COMMA);
this.state = 2115;
localctx.item = this.python_expression(0);
}
this.state = 2120;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,174,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Python_named_argument_listContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_named_argument_list;
return this;
}
Python_named_argument_listContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_named_argument_listContext.prototype.constructor = Python_named_argument_listContext;
Python_named_argument_listContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonNamedArgumentListContext(parser, ctx) {
Python_named_argument_listContext.call(this, parser);
this.name = null; // Python_identifierContext;
this.exp = null; // Python_expressionContext;
Python_named_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonNamedArgumentListContext.prototype = Object.create(Python_named_argument_listContext.prototype);
PythonNamedArgumentListContext.prototype.constructor = PythonNamedArgumentListContext;
PythonNamedArgumentListContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
PythonNamedArgumentListContext.prototype.python_identifier = function() {
return this.getTypedRuleContext(Python_identifierContext,0);
};
PythonNamedArgumentListContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonNamedArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonNamedArgumentList(this);
}
};
PythonNamedArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonNamedArgumentList(this);
}
};
function PythonNamedArgumentListItemContext(parser, ctx) {
Python_named_argument_listContext.call(this, parser);
this.items = null; // Python_named_argument_listContext;
this.name = null; // Python_identifierContext;
this.exp = null; // Python_expressionContext;
Python_named_argument_listContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonNamedArgumentListItemContext.prototype = Object.create(Python_named_argument_listContext.prototype);
PythonNamedArgumentListItemContext.prototype.constructor = PythonNamedArgumentListItemContext;
PythonNamedArgumentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
PythonNamedArgumentListItemContext.prototype.EQ = function() {
return this.getToken(EParser.EQ, 0);
};
PythonNamedArgumentListItemContext.prototype.python_named_argument_list = function() {
return this.getTypedRuleContext(Python_named_argument_listContext,0);
};
PythonNamedArgumentListItemContext.prototype.python_identifier = function() {
return this.getTypedRuleContext(Python_identifierContext,0);
};
PythonNamedArgumentListItemContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
PythonNamedArgumentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonNamedArgumentListItem(this);
}
};
PythonNamedArgumentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonNamedArgumentListItem(this);
}
};
EParser.prototype.python_named_argument_list = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Python_named_argument_listContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 352;
this.enterRecursionRule(localctx, 352, EParser.RULE_python_named_argument_list, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new PythonNamedArgumentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2122;
localctx.name = this.python_identifier();
this.state = 2123;
this.match(EParser.EQ);
this.state = 2124;
localctx.exp = this.python_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2134;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,175,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new PythonNamedArgumentListItemContext(this, new Python_named_argument_listContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_python_named_argument_list);
this.state = 2126;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2127;
this.match(EParser.COMMA);
this.state = 2128;
localctx.name = this.python_identifier();
this.state = 2129;
this.match(EParser.EQ);
this.state = 2130;
localctx.exp = this.python_expression(0);
}
this.state = 2136;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,175,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Python_parenthesis_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_parenthesis_expression;
this.exp = null; // Python_expressionContext
return this;
}
Python_parenthesis_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_parenthesis_expressionContext.prototype.constructor = Python_parenthesis_expressionContext;
Python_parenthesis_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Python_parenthesis_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Python_parenthesis_expressionContext.prototype.python_expression = function() {
return this.getTypedRuleContext(Python_expressionContext,0);
};
Python_parenthesis_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_parenthesis_expression(this);
}
};
Python_parenthesis_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_parenthesis_expression(this);
}
};
EParser.prototype.python_parenthesis_expression = function() {
var localctx = new Python_parenthesis_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 354, EParser.RULE_python_parenthesis_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2137;
this.match(EParser.LPAR);
this.state = 2138;
localctx.exp = this.python_expression(0);
this.state = 2139;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_identifier_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_identifier_expression;
return this;
}
Python_identifier_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_identifier_expressionContext.prototype.constructor = Python_identifier_expressionContext;
Python_identifier_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonChildIdentifierContext(parser, ctx) {
Python_identifier_expressionContext.call(this, parser);
this.parent = null; // Python_identifier_expressionContext;
this.name = null; // Python_identifierContext;
Python_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonChildIdentifierContext.prototype = Object.create(Python_identifier_expressionContext.prototype);
PythonChildIdentifierContext.prototype.constructor = PythonChildIdentifierContext;
PythonChildIdentifierContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
PythonChildIdentifierContext.prototype.python_identifier_expression = function() {
return this.getTypedRuleContext(Python_identifier_expressionContext,0);
};
PythonChildIdentifierContext.prototype.python_identifier = function() {
return this.getTypedRuleContext(Python_identifierContext,0);
};
PythonChildIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonChildIdentifier(this);
}
};
PythonChildIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonChildIdentifier(this);
}
};
function PythonPromptoIdentifierContext(parser, ctx) {
Python_identifier_expressionContext.call(this, parser);
Python_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonPromptoIdentifierContext.prototype = Object.create(Python_identifier_expressionContext.prototype);
PythonPromptoIdentifierContext.prototype.constructor = PythonPromptoIdentifierContext;
PythonPromptoIdentifierContext.prototype.DOLLAR_IDENTIFIER = function() {
return this.getToken(EParser.DOLLAR_IDENTIFIER, 0);
};
PythonPromptoIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonPromptoIdentifier(this);
}
};
PythonPromptoIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonPromptoIdentifier(this);
}
};
function PythonIdentifierContext(parser, ctx) {
Python_identifier_expressionContext.call(this, parser);
this.name = null; // Python_identifierContext;
Python_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonIdentifierContext.prototype = Object.create(Python_identifier_expressionContext.prototype);
PythonIdentifierContext.prototype.constructor = PythonIdentifierContext;
PythonIdentifierContext.prototype.python_identifier = function() {
return this.getTypedRuleContext(Python_identifierContext,0);
};
PythonIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonIdentifier(this);
}
};
PythonIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonIdentifier(this);
}
};
EParser.prototype.python_identifier_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Python_identifier_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 356;
this.enterRecursionRule(localctx, 356, EParser.RULE_python_identifier_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2144;
switch(this._input.LA(1)) {
case EParser.DOLLAR_IDENTIFIER:
localctx = new PythonPromptoIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2142;
this.match(EParser.DOLLAR_IDENTIFIER);
break;
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.SELF:
case EParser.TEST:
case EParser.THIS:
case EParser.WRITE:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
localctx = new PythonIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2143;
localctx.name = this.python_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this._ctx.stop = this._input.LT(-1);
this.state = 2151;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,177,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new PythonChildIdentifierContext(this, new Python_identifier_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_python_identifier_expression);
this.state = 2146;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2147;
this.match(EParser.DOT);
this.state = 2148;
localctx.name = this.python_identifier();
}
this.state = 2153;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,177,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Python_literal_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_literal_expression;
return this;
}
Python_literal_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_literal_expressionContext.prototype.constructor = Python_literal_expressionContext;
Python_literal_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function PythonIntegerLiteralContext(parser, ctx) {
Python_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Python_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonIntegerLiteralContext.prototype = Object.create(Python_literal_expressionContext.prototype);
PythonIntegerLiteralContext.prototype.constructor = PythonIntegerLiteralContext;
PythonIntegerLiteralContext.prototype.INTEGER_LITERAL = function() {
return this.getToken(EParser.INTEGER_LITERAL, 0);
};
PythonIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonIntegerLiteral(this);
}
};
PythonIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonIntegerLiteral(this);
}
};
function PythonBooleanLiteralContext(parser, ctx) {
Python_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Python_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonBooleanLiteralContext.prototype = Object.create(Python_literal_expressionContext.prototype);
PythonBooleanLiteralContext.prototype.constructor = PythonBooleanLiteralContext;
PythonBooleanLiteralContext.prototype.BOOLEAN_LITERAL = function() {
return this.getToken(EParser.BOOLEAN_LITERAL, 0);
};
PythonBooleanLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonBooleanLiteral(this);
}
};
PythonBooleanLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonBooleanLiteral(this);
}
};
function PythonCharacterLiteralContext(parser, ctx) {
Python_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Python_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonCharacterLiteralContext.prototype = Object.create(Python_literal_expressionContext.prototype);
PythonCharacterLiteralContext.prototype.constructor = PythonCharacterLiteralContext;
PythonCharacterLiteralContext.prototype.CHAR_LITERAL = function() {
return this.getToken(EParser.CHAR_LITERAL, 0);
};
PythonCharacterLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonCharacterLiteral(this);
}
};
PythonCharacterLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonCharacterLiteral(this);
}
};
function PythonTextLiteralContext(parser, ctx) {
Python_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Python_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonTextLiteralContext.prototype = Object.create(Python_literal_expressionContext.prototype);
PythonTextLiteralContext.prototype.constructor = PythonTextLiteralContext;
PythonTextLiteralContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
PythonTextLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonTextLiteral(this);
}
};
PythonTextLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonTextLiteral(this);
}
};
function PythonDecimalLiteralContext(parser, ctx) {
Python_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Python_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
PythonDecimalLiteralContext.prototype = Object.create(Python_literal_expressionContext.prototype);
PythonDecimalLiteralContext.prototype.constructor = PythonDecimalLiteralContext;
PythonDecimalLiteralContext.prototype.DECIMAL_LITERAL = function() {
return this.getToken(EParser.DECIMAL_LITERAL, 0);
};
PythonDecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPythonDecimalLiteral(this);
}
};
PythonDecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPythonDecimalLiteral(this);
}
};
EParser.prototype.python_literal_expression = function() {
var localctx = new Python_literal_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 358, EParser.RULE_python_literal_expression);
try {
this.state = 2159;
switch(this._input.LA(1)) {
case EParser.INTEGER_LITERAL:
localctx = new PythonIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2154;
localctx.t = this.match(EParser.INTEGER_LITERAL);
break;
case EParser.DECIMAL_LITERAL:
localctx = new PythonDecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2155;
localctx.t = this.match(EParser.DECIMAL_LITERAL);
break;
case EParser.TEXT_LITERAL:
localctx = new PythonTextLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2156;
localctx.t = this.match(EParser.TEXT_LITERAL);
break;
case EParser.BOOLEAN_LITERAL:
localctx = new PythonBooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 2157;
localctx.t = this.match(EParser.BOOLEAN_LITERAL);
break;
case EParser.CHAR_LITERAL:
localctx = new PythonCharacterLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 2158;
localctx.t = this.match(EParser.CHAR_LITERAL);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Python_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_python_identifier;
return this;
}
Python_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Python_identifierContext.prototype.constructor = Python_identifierContext;
Python_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Python_identifierContext.prototype.SYMBOL_IDENTIFIER = function() {
return this.getToken(EParser.SYMBOL_IDENTIFIER, 0);
};
Python_identifierContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Python_identifierContext.prototype.BOOLEAN = function() {
return this.getToken(EParser.BOOLEAN, 0);
};
Python_identifierContext.prototype.CHARACTER = function() {
return this.getToken(EParser.CHARACTER, 0);
};
Python_identifierContext.prototype.TEXT = function() {
return this.getToken(EParser.TEXT, 0);
};
Python_identifierContext.prototype.INTEGER = function() {
return this.getToken(EParser.INTEGER, 0);
};
Python_identifierContext.prototype.DECIMAL = function() {
return this.getToken(EParser.DECIMAL, 0);
};
Python_identifierContext.prototype.DATE = function() {
return this.getToken(EParser.DATE, 0);
};
Python_identifierContext.prototype.TIME = function() {
return this.getToken(EParser.TIME, 0);
};
Python_identifierContext.prototype.DATETIME = function() {
return this.getToken(EParser.DATETIME, 0);
};
Python_identifierContext.prototype.PERIOD = function() {
return this.getToken(EParser.PERIOD, 0);
};
Python_identifierContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Python_identifierContext.prototype.WRITE = function() {
return this.getToken(EParser.WRITE, 0);
};
Python_identifierContext.prototype.TEST = function() {
return this.getToken(EParser.TEST, 0);
};
Python_identifierContext.prototype.SELF = function() {
return this.getToken(EParser.SELF, 0);
};
Python_identifierContext.prototype.THIS = function() {
return this.getToken(EParser.THIS, 0);
};
Python_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterPython_identifier(this);
}
};
Python_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitPython_identifier(this);
}
};
EParser.prototype.python_identifier = function() {
var localctx = new Python_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 360, EParser.RULE_python_identifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2161;
_la = this._input.LA(1);
if(!(((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0))) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_statement;
return this;
}
Java_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_statementContext.prototype.constructor = Java_statementContext;
Java_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaReturnStatementContext(parser, ctx) {
Java_statementContext.call(this, parser);
this.exp = null; // Java_expressionContext;
Java_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaReturnStatementContext.prototype = Object.create(Java_statementContext.prototype);
JavaReturnStatementContext.prototype.constructor = JavaReturnStatementContext;
JavaReturnStatementContext.prototype.RETURN = function() {
return this.getToken(EParser.RETURN, 0);
};
JavaReturnStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
JavaReturnStatementContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
JavaReturnStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaReturnStatement(this);
}
};
JavaReturnStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaReturnStatement(this);
}
};
function JavaStatementContext(parser, ctx) {
Java_statementContext.call(this, parser);
this.exp = null; // Java_expressionContext;
Java_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaStatementContext.prototype = Object.create(Java_statementContext.prototype);
JavaStatementContext.prototype.constructor = JavaStatementContext;
JavaStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
JavaStatementContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
JavaStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaStatement(this);
}
};
JavaStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaStatement(this);
}
};
EParser.prototype.java_statement = function() {
var localctx = new Java_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 362, EParser.RULE_java_statement);
try {
this.state = 2170;
switch(this._input.LA(1)) {
case EParser.RETURN:
localctx = new JavaReturnStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2163;
this.match(EParser.RETURN);
this.state = 2164;
localctx.exp = this.java_expression(0);
this.state = 2165;
this.match(EParser.SEMI);
break;
case EParser.LPAR:
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.SELF:
case EParser.TEST:
case EParser.THIS:
case EParser.WRITE:
case EParser.BOOLEAN_LITERAL:
case EParser.CHAR_LITERAL:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
case EParser.NATIVE_IDENTIFIER:
case EParser.DOLLAR_IDENTIFIER:
case EParser.TEXT_LITERAL:
case EParser.INTEGER_LITERAL:
case EParser.DECIMAL_LITERAL:
localctx = new JavaStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2167;
localctx.exp = this.java_expression(0);
this.state = 2168;
this.match(EParser.SEMI);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_expression;
return this;
}
Java_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_expressionContext.prototype.constructor = Java_expressionContext;
Java_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaSelectorExpressionContext(parser, ctx) {
Java_expressionContext.call(this, parser);
this.parent = null; // Java_expressionContext;
this.child = null; // Java_selector_expressionContext;
Java_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaSelectorExpressionContext.prototype = Object.create(Java_expressionContext.prototype);
JavaSelectorExpressionContext.prototype.constructor = JavaSelectorExpressionContext;
JavaSelectorExpressionContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
JavaSelectorExpressionContext.prototype.java_selector_expression = function() {
return this.getTypedRuleContext(Java_selector_expressionContext,0);
};
JavaSelectorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaSelectorExpression(this);
}
};
JavaSelectorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaSelectorExpression(this);
}
};
function JavaPrimaryExpressionContext(parser, ctx) {
Java_expressionContext.call(this, parser);
this.exp = null; // Java_primary_expressionContext;
Java_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaPrimaryExpressionContext.prototype = Object.create(Java_expressionContext.prototype);
JavaPrimaryExpressionContext.prototype.constructor = JavaPrimaryExpressionContext;
JavaPrimaryExpressionContext.prototype.java_primary_expression = function() {
return this.getTypedRuleContext(Java_primary_expressionContext,0);
};
JavaPrimaryExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaPrimaryExpression(this);
}
};
JavaPrimaryExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaPrimaryExpression(this);
}
};
EParser.prototype.java_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Java_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 364;
this.enterRecursionRule(localctx, 364, EParser.RULE_java_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavaPrimaryExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2173;
localctx.exp = this.java_primary_expression();
this._ctx.stop = this._input.LT(-1);
this.state = 2179;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,180,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavaSelectorExpressionContext(this, new Java_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_java_expression);
this.state = 2175;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2176;
localctx.child = this.java_selector_expression();
}
this.state = 2181;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,180,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Java_primary_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_primary_expression;
return this;
}
Java_primary_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_primary_expressionContext.prototype.constructor = Java_primary_expressionContext;
Java_primary_expressionContext.prototype.java_this_expression = function() {
return this.getTypedRuleContext(Java_this_expressionContext,0);
};
Java_primary_expressionContext.prototype.java_new_expression = function() {
return this.getTypedRuleContext(Java_new_expressionContext,0);
};
Java_primary_expressionContext.prototype.java_parenthesis_expression = function() {
return this.getTypedRuleContext(Java_parenthesis_expressionContext,0);
};
Java_primary_expressionContext.prototype.java_identifier_expression = function() {
return this.getTypedRuleContext(Java_identifier_expressionContext,0);
};
Java_primary_expressionContext.prototype.java_literal_expression = function() {
return this.getTypedRuleContext(Java_literal_expressionContext,0);
};
Java_primary_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_primary_expression(this);
}
};
Java_primary_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_primary_expression(this);
}
};
EParser.prototype.java_primary_expression = function() {
var localctx = new Java_primary_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 366, EParser.RULE_java_primary_expression);
try {
this.state = 2187;
var la_ = this._interp.adaptivePredict(this._input,181,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 2182;
this.java_this_expression();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 2183;
this.java_new_expression();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 2184;
this.java_parenthesis_expression();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 2185;
this.java_identifier_expression(0);
break;
case 5:
this.enterOuterAlt(localctx, 5);
this.state = 2186;
this.java_literal_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_this_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_this_expression;
return this;
}
Java_this_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_this_expressionContext.prototype.constructor = Java_this_expressionContext;
Java_this_expressionContext.prototype.this_expression = function() {
return this.getTypedRuleContext(This_expressionContext,0);
};
Java_this_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_this_expression(this);
}
};
Java_this_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_this_expression(this);
}
};
EParser.prototype.java_this_expression = function() {
var localctx = new Java_this_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 368, EParser.RULE_java_this_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2189;
this.this_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_new_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_new_expression;
return this;
}
Java_new_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_new_expressionContext.prototype.constructor = Java_new_expressionContext;
Java_new_expressionContext.prototype.new_token = function() {
return this.getTypedRuleContext(New_tokenContext,0);
};
Java_new_expressionContext.prototype.java_method_expression = function() {
return this.getTypedRuleContext(Java_method_expressionContext,0);
};
Java_new_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_new_expression(this);
}
};
Java_new_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_new_expression(this);
}
};
EParser.prototype.java_new_expression = function() {
var localctx = new Java_new_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 370, EParser.RULE_java_new_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2191;
this.new_token();
this.state = 2192;
this.java_method_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_selector_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_selector_expression;
return this;
}
Java_selector_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_selector_expressionContext.prototype.constructor = Java_selector_expressionContext;
Java_selector_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaItemExpressionContext(parser, ctx) {
Java_selector_expressionContext.call(this, parser);
this.exp = null; // Java_item_expressionContext;
Java_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaItemExpressionContext.prototype = Object.create(Java_selector_expressionContext.prototype);
JavaItemExpressionContext.prototype.constructor = JavaItemExpressionContext;
JavaItemExpressionContext.prototype.java_item_expression = function() {
return this.getTypedRuleContext(Java_item_expressionContext,0);
};
JavaItemExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaItemExpression(this);
}
};
JavaItemExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaItemExpression(this);
}
};
function JavaMethodExpressionContext(parser, ctx) {
Java_selector_expressionContext.call(this, parser);
this.exp = null; // Java_method_expressionContext;
Java_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaMethodExpressionContext.prototype = Object.create(Java_selector_expressionContext.prototype);
JavaMethodExpressionContext.prototype.constructor = JavaMethodExpressionContext;
JavaMethodExpressionContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
JavaMethodExpressionContext.prototype.java_method_expression = function() {
return this.getTypedRuleContext(Java_method_expressionContext,0);
};
JavaMethodExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaMethodExpression(this);
}
};
JavaMethodExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaMethodExpression(this);
}
};
EParser.prototype.java_selector_expression = function() {
var localctx = new Java_selector_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 372, EParser.RULE_java_selector_expression);
try {
this.state = 2197;
switch(this._input.LA(1)) {
case EParser.DOT:
localctx = new JavaMethodExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2194;
this.match(EParser.DOT);
this.state = 2195;
localctx.exp = this.java_method_expression();
break;
case EParser.LBRAK:
localctx = new JavaItemExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2196;
localctx.exp = this.java_item_expression();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_method_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_method_expression;
this.name = null; // Java_identifierContext
this.args = null; // Java_argumentsContext
return this;
}
Java_method_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_method_expressionContext.prototype.constructor = Java_method_expressionContext;
Java_method_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Java_method_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Java_method_expressionContext.prototype.java_identifier = function() {
return this.getTypedRuleContext(Java_identifierContext,0);
};
Java_method_expressionContext.prototype.java_arguments = function() {
return this.getTypedRuleContext(Java_argumentsContext,0);
};
Java_method_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_method_expression(this);
}
};
Java_method_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_method_expression(this);
}
};
EParser.prototype.java_method_expression = function() {
var localctx = new Java_method_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 374, EParser.RULE_java_method_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2199;
localctx.name = this.java_identifier();
this.state = 2200;
this.match(EParser.LPAR);
this.state = 2202;
_la = this._input.LA(1);
if(_la===EParser.LPAR || ((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)) | (1 << (EParser.NATIVE_IDENTIFIER - 132)))) !== 0) || ((((_la - 164)) & ~0x1f) == 0 && ((1 << (_la - 164)) & ((1 << (EParser.DOLLAR_IDENTIFIER - 164)) | (1 << (EParser.TEXT_LITERAL - 164)) | (1 << (EParser.INTEGER_LITERAL - 164)) | (1 << (EParser.DECIMAL_LITERAL - 164)))) !== 0)) {
this.state = 2201;
localctx.args = this.java_arguments(0);
}
this.state = 2204;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_argumentsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_arguments;
return this;
}
Java_argumentsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_argumentsContext.prototype.constructor = Java_argumentsContext;
Java_argumentsContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaArgumentListItemContext(parser, ctx) {
Java_argumentsContext.call(this, parser);
this.items = null; // Java_argumentsContext;
this.item = null; // Java_expressionContext;
Java_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaArgumentListItemContext.prototype = Object.create(Java_argumentsContext.prototype);
JavaArgumentListItemContext.prototype.constructor = JavaArgumentListItemContext;
JavaArgumentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
JavaArgumentListItemContext.prototype.java_arguments = function() {
return this.getTypedRuleContext(Java_argumentsContext,0);
};
JavaArgumentListItemContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
JavaArgumentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaArgumentListItem(this);
}
};
JavaArgumentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaArgumentListItem(this);
}
};
function JavaArgumentListContext(parser, ctx) {
Java_argumentsContext.call(this, parser);
this.item = null; // Java_expressionContext;
Java_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaArgumentListContext.prototype = Object.create(Java_argumentsContext.prototype);
JavaArgumentListContext.prototype.constructor = JavaArgumentListContext;
JavaArgumentListContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
JavaArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaArgumentList(this);
}
};
JavaArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaArgumentList(this);
}
};
EParser.prototype.java_arguments = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Java_argumentsContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 376;
this.enterRecursionRule(localctx, 376, EParser.RULE_java_arguments, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavaArgumentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2207;
localctx.item = this.java_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2214;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,184,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavaArgumentListItemContext(this, new Java_argumentsContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_java_arguments);
this.state = 2209;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2210;
this.match(EParser.COMMA);
this.state = 2211;
localctx.item = this.java_expression(0);
}
this.state = 2216;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,184,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Java_item_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_item_expression;
this.exp = null; // Java_expressionContext
return this;
}
Java_item_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_item_expressionContext.prototype.constructor = Java_item_expressionContext;
Java_item_expressionContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
Java_item_expressionContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
Java_item_expressionContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
Java_item_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_item_expression(this);
}
};
Java_item_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_item_expression(this);
}
};
EParser.prototype.java_item_expression = function() {
var localctx = new Java_item_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 378, EParser.RULE_java_item_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2217;
this.match(EParser.LBRAK);
this.state = 2218;
localctx.exp = this.java_expression(0);
this.state = 2219;
this.match(EParser.RBRAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_parenthesis_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_parenthesis_expression;
this.exp = null; // Java_expressionContext
return this;
}
Java_parenthesis_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_parenthesis_expressionContext.prototype.constructor = Java_parenthesis_expressionContext;
Java_parenthesis_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Java_parenthesis_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Java_parenthesis_expressionContext.prototype.java_expression = function() {
return this.getTypedRuleContext(Java_expressionContext,0);
};
Java_parenthesis_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_parenthesis_expression(this);
}
};
Java_parenthesis_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_parenthesis_expression(this);
}
};
EParser.prototype.java_parenthesis_expression = function() {
var localctx = new Java_parenthesis_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 380, EParser.RULE_java_parenthesis_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2221;
this.match(EParser.LPAR);
this.state = 2222;
localctx.exp = this.java_expression(0);
this.state = 2223;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_identifier_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_identifier_expression;
return this;
}
Java_identifier_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_identifier_expressionContext.prototype.constructor = Java_identifier_expressionContext;
Java_identifier_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaIdentifierContext(parser, ctx) {
Java_identifier_expressionContext.call(this, parser);
this.name = null; // Java_identifierContext;
Java_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaIdentifierContext.prototype = Object.create(Java_identifier_expressionContext.prototype);
JavaIdentifierContext.prototype.constructor = JavaIdentifierContext;
JavaIdentifierContext.prototype.java_identifier = function() {
return this.getTypedRuleContext(Java_identifierContext,0);
};
JavaIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaIdentifier(this);
}
};
JavaIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaIdentifier(this);
}
};
function JavaChildIdentifierContext(parser, ctx) {
Java_identifier_expressionContext.call(this, parser);
this.parent = null; // Java_identifier_expressionContext;
this.name = null; // Java_identifierContext;
Java_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaChildIdentifierContext.prototype = Object.create(Java_identifier_expressionContext.prototype);
JavaChildIdentifierContext.prototype.constructor = JavaChildIdentifierContext;
JavaChildIdentifierContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
JavaChildIdentifierContext.prototype.java_identifier_expression = function() {
return this.getTypedRuleContext(Java_identifier_expressionContext,0);
};
JavaChildIdentifierContext.prototype.java_identifier = function() {
return this.getTypedRuleContext(Java_identifierContext,0);
};
JavaChildIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaChildIdentifier(this);
}
};
JavaChildIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaChildIdentifier(this);
}
};
EParser.prototype.java_identifier_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Java_identifier_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 382;
this.enterRecursionRule(localctx, 382, EParser.RULE_java_identifier_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavaIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2226;
localctx.name = this.java_identifier();
this._ctx.stop = this._input.LT(-1);
this.state = 2233;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,185,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavaChildIdentifierContext(this, new Java_identifier_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_java_identifier_expression);
this.state = 2228;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2229;
this.match(EParser.DOT);
this.state = 2230;
localctx.name = this.java_identifier();
}
this.state = 2235;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,185,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Java_class_identifier_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_class_identifier_expression;
return this;
}
Java_class_identifier_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_class_identifier_expressionContext.prototype.constructor = Java_class_identifier_expressionContext;
Java_class_identifier_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaClassIdentifierContext(parser, ctx) {
Java_class_identifier_expressionContext.call(this, parser);
this.klass = null; // Java_identifier_expressionContext;
Java_class_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaClassIdentifierContext.prototype = Object.create(Java_class_identifier_expressionContext.prototype);
JavaClassIdentifierContext.prototype.constructor = JavaClassIdentifierContext;
JavaClassIdentifierContext.prototype.java_identifier_expression = function() {
return this.getTypedRuleContext(Java_identifier_expressionContext,0);
};
JavaClassIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaClassIdentifier(this);
}
};
JavaClassIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaClassIdentifier(this);
}
};
function JavaChildClassIdentifierContext(parser, ctx) {
Java_class_identifier_expressionContext.call(this, parser);
this.parent = null; // Java_class_identifier_expressionContext;
this.name = null; // Token;
Java_class_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaChildClassIdentifierContext.prototype = Object.create(Java_class_identifier_expressionContext.prototype);
JavaChildClassIdentifierContext.prototype.constructor = JavaChildClassIdentifierContext;
JavaChildClassIdentifierContext.prototype.java_class_identifier_expression = function() {
return this.getTypedRuleContext(Java_class_identifier_expressionContext,0);
};
JavaChildClassIdentifierContext.prototype.DOLLAR_IDENTIFIER = function() {
return this.getToken(EParser.DOLLAR_IDENTIFIER, 0);
};
JavaChildClassIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaChildClassIdentifier(this);
}
};
JavaChildClassIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaChildClassIdentifier(this);
}
};
EParser.prototype.java_class_identifier_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Java_class_identifier_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 384;
this.enterRecursionRule(localctx, 384, EParser.RULE_java_class_identifier_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new JavaClassIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2237;
localctx.klass = this.java_identifier_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2243;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,186,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new JavaChildClassIdentifierContext(this, new Java_class_identifier_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_java_class_identifier_expression);
this.state = 2239;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2240;
localctx.name = this.match(EParser.DOLLAR_IDENTIFIER);
}
this.state = 2245;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,186,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Java_literal_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_literal_expression;
return this;
}
Java_literal_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_literal_expressionContext.prototype.constructor = Java_literal_expressionContext;
Java_literal_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function JavaBooleanLiteralContext(parser, ctx) {
Java_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Java_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaBooleanLiteralContext.prototype = Object.create(Java_literal_expressionContext.prototype);
JavaBooleanLiteralContext.prototype.constructor = JavaBooleanLiteralContext;
JavaBooleanLiteralContext.prototype.BOOLEAN_LITERAL = function() {
return this.getToken(EParser.BOOLEAN_LITERAL, 0);
};
JavaBooleanLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaBooleanLiteral(this);
}
};
JavaBooleanLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaBooleanLiteral(this);
}
};
function JavaCharacterLiteralContext(parser, ctx) {
Java_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Java_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaCharacterLiteralContext.prototype = Object.create(Java_literal_expressionContext.prototype);
JavaCharacterLiteralContext.prototype.constructor = JavaCharacterLiteralContext;
JavaCharacterLiteralContext.prototype.CHAR_LITERAL = function() {
return this.getToken(EParser.CHAR_LITERAL, 0);
};
JavaCharacterLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaCharacterLiteral(this);
}
};
JavaCharacterLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaCharacterLiteral(this);
}
};
function JavaIntegerLiteralContext(parser, ctx) {
Java_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Java_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaIntegerLiteralContext.prototype = Object.create(Java_literal_expressionContext.prototype);
JavaIntegerLiteralContext.prototype.constructor = JavaIntegerLiteralContext;
JavaIntegerLiteralContext.prototype.INTEGER_LITERAL = function() {
return this.getToken(EParser.INTEGER_LITERAL, 0);
};
JavaIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaIntegerLiteral(this);
}
};
JavaIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaIntegerLiteral(this);
}
};
function JavaTextLiteralContext(parser, ctx) {
Java_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Java_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaTextLiteralContext.prototype = Object.create(Java_literal_expressionContext.prototype);
JavaTextLiteralContext.prototype.constructor = JavaTextLiteralContext;
JavaTextLiteralContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
JavaTextLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaTextLiteral(this);
}
};
JavaTextLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaTextLiteral(this);
}
};
function JavaDecimalLiteralContext(parser, ctx) {
Java_literal_expressionContext.call(this, parser);
this.t = null; // Token;
Java_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
JavaDecimalLiteralContext.prototype = Object.create(Java_literal_expressionContext.prototype);
JavaDecimalLiteralContext.prototype.constructor = JavaDecimalLiteralContext;
JavaDecimalLiteralContext.prototype.DECIMAL_LITERAL = function() {
return this.getToken(EParser.DECIMAL_LITERAL, 0);
};
JavaDecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJavaDecimalLiteral(this);
}
};
JavaDecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJavaDecimalLiteral(this);
}
};
EParser.prototype.java_literal_expression = function() {
var localctx = new Java_literal_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 386, EParser.RULE_java_literal_expression);
try {
this.state = 2251;
switch(this._input.LA(1)) {
case EParser.INTEGER_LITERAL:
localctx = new JavaIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2246;
localctx.t = this.match(EParser.INTEGER_LITERAL);
break;
case EParser.DECIMAL_LITERAL:
localctx = new JavaDecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2247;
localctx.t = this.match(EParser.DECIMAL_LITERAL);
break;
case EParser.TEXT_LITERAL:
localctx = new JavaTextLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2248;
localctx.t = this.match(EParser.TEXT_LITERAL);
break;
case EParser.BOOLEAN_LITERAL:
localctx = new JavaBooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 2249;
localctx.t = this.match(EParser.BOOLEAN_LITERAL);
break;
case EParser.CHAR_LITERAL:
localctx = new JavaCharacterLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 2250;
localctx.t = this.match(EParser.CHAR_LITERAL);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Java_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_java_identifier;
return this;
}
Java_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Java_identifierContext.prototype.constructor = Java_identifierContext;
Java_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Java_identifierContext.prototype.SYMBOL_IDENTIFIER = function() {
return this.getToken(EParser.SYMBOL_IDENTIFIER, 0);
};
Java_identifierContext.prototype.NATIVE_IDENTIFIER = function() {
return this.getToken(EParser.NATIVE_IDENTIFIER, 0);
};
Java_identifierContext.prototype.DOLLAR_IDENTIFIER = function() {
return this.getToken(EParser.DOLLAR_IDENTIFIER, 0);
};
Java_identifierContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Java_identifierContext.prototype.BOOLEAN = function() {
return this.getToken(EParser.BOOLEAN, 0);
};
Java_identifierContext.prototype.CHARACTER = function() {
return this.getToken(EParser.CHARACTER, 0);
};
Java_identifierContext.prototype.TEXT = function() {
return this.getToken(EParser.TEXT, 0);
};
Java_identifierContext.prototype.INTEGER = function() {
return this.getToken(EParser.INTEGER, 0);
};
Java_identifierContext.prototype.DECIMAL = function() {
return this.getToken(EParser.DECIMAL, 0);
};
Java_identifierContext.prototype.DATE = function() {
return this.getToken(EParser.DATE, 0);
};
Java_identifierContext.prototype.TIME = function() {
return this.getToken(EParser.TIME, 0);
};
Java_identifierContext.prototype.DATETIME = function() {
return this.getToken(EParser.DATETIME, 0);
};
Java_identifierContext.prototype.PERIOD = function() {
return this.getToken(EParser.PERIOD, 0);
};
Java_identifierContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Java_identifierContext.prototype.WRITE = function() {
return this.getToken(EParser.WRITE, 0);
};
Java_identifierContext.prototype.TEST = function() {
return this.getToken(EParser.TEST, 0);
};
Java_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterJava_identifier(this);
}
};
Java_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitJava_identifier(this);
}
};
EParser.prototype.java_identifier = function() {
var localctx = new Java_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 388, EParser.RULE_java_identifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2253;
_la = this._input.LA(1);
if(!(((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)) | (1 << (EParser.NATIVE_IDENTIFIER - 132)))) !== 0) || _la===EParser.DOLLAR_IDENTIFIER)) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_statementContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_statement;
return this;
}
Csharp_statementContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_statementContext.prototype.constructor = Csharp_statementContext;
Csharp_statementContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpReturnStatementContext(parser, ctx) {
Csharp_statementContext.call(this, parser);
this.exp = null; // Csharp_expressionContext;
Csharp_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpReturnStatementContext.prototype = Object.create(Csharp_statementContext.prototype);
CSharpReturnStatementContext.prototype.constructor = CSharpReturnStatementContext;
CSharpReturnStatementContext.prototype.RETURN = function() {
return this.getToken(EParser.RETURN, 0);
};
CSharpReturnStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
CSharpReturnStatementContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
CSharpReturnStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpReturnStatement(this);
}
};
CSharpReturnStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpReturnStatement(this);
}
};
function CSharpStatementContext(parser, ctx) {
Csharp_statementContext.call(this, parser);
this.exp = null; // Csharp_expressionContext;
Csharp_statementContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpStatementContext.prototype = Object.create(Csharp_statementContext.prototype);
CSharpStatementContext.prototype.constructor = CSharpStatementContext;
CSharpStatementContext.prototype.SEMI = function() {
return this.getToken(EParser.SEMI, 0);
};
CSharpStatementContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
CSharpStatementContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpStatement(this);
}
};
CSharpStatementContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpStatement(this);
}
};
EParser.prototype.csharp_statement = function() {
var localctx = new Csharp_statementContext(this, this._ctx, this.state);
this.enterRule(localctx, 390, EParser.RULE_csharp_statement);
try {
this.state = 2262;
switch(this._input.LA(1)) {
case EParser.RETURN:
localctx = new CSharpReturnStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2255;
this.match(EParser.RETURN);
this.state = 2256;
localctx.exp = this.csharp_expression(0);
this.state = 2257;
this.match(EParser.SEMI);
break;
case EParser.LPAR:
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.SELF:
case EParser.TEST:
case EParser.THIS:
case EParser.WRITE:
case EParser.BOOLEAN_LITERAL:
case EParser.CHAR_LITERAL:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
case EParser.DOLLAR_IDENTIFIER:
case EParser.TEXT_LITERAL:
case EParser.INTEGER_LITERAL:
case EParser.DECIMAL_LITERAL:
localctx = new CSharpStatementContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2259;
localctx.exp = this.csharp_expression(0);
this.state = 2260;
this.match(EParser.SEMI);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_expression;
return this;
}
Csharp_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_expressionContext.prototype.constructor = Csharp_expressionContext;
Csharp_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpSelectorExpressionContext(parser, ctx) {
Csharp_expressionContext.call(this, parser);
this.parent = null; // Csharp_expressionContext;
this.child = null; // Csharp_selector_expressionContext;
Csharp_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpSelectorExpressionContext.prototype = Object.create(Csharp_expressionContext.prototype);
CSharpSelectorExpressionContext.prototype.constructor = CSharpSelectorExpressionContext;
CSharpSelectorExpressionContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
CSharpSelectorExpressionContext.prototype.csharp_selector_expression = function() {
return this.getTypedRuleContext(Csharp_selector_expressionContext,0);
};
CSharpSelectorExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpSelectorExpression(this);
}
};
CSharpSelectorExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpSelectorExpression(this);
}
};
function CSharpPrimaryExpressionContext(parser, ctx) {
Csharp_expressionContext.call(this, parser);
this.exp = null; // Csharp_primary_expressionContext;
Csharp_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpPrimaryExpressionContext.prototype = Object.create(Csharp_expressionContext.prototype);
CSharpPrimaryExpressionContext.prototype.constructor = CSharpPrimaryExpressionContext;
CSharpPrimaryExpressionContext.prototype.csharp_primary_expression = function() {
return this.getTypedRuleContext(Csharp_primary_expressionContext,0);
};
CSharpPrimaryExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpPrimaryExpression(this);
}
};
CSharpPrimaryExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpPrimaryExpression(this);
}
};
EParser.prototype.csharp_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Csharp_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 392;
this.enterRecursionRule(localctx, 392, EParser.RULE_csharp_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new CSharpPrimaryExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2265;
localctx.exp = this.csharp_primary_expression();
this._ctx.stop = this._input.LT(-1);
this.state = 2271;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,189,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new CSharpSelectorExpressionContext(this, new Csharp_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_csharp_expression);
this.state = 2267;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2268;
localctx.child = this.csharp_selector_expression();
}
this.state = 2273;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,189,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Csharp_primary_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_primary_expression;
return this;
}
Csharp_primary_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_primary_expressionContext.prototype.constructor = Csharp_primary_expressionContext;
Csharp_primary_expressionContext.prototype.csharp_this_expression = function() {
return this.getTypedRuleContext(Csharp_this_expressionContext,0);
};
Csharp_primary_expressionContext.prototype.csharp_new_expression = function() {
return this.getTypedRuleContext(Csharp_new_expressionContext,0);
};
Csharp_primary_expressionContext.prototype.csharp_parenthesis_expression = function() {
return this.getTypedRuleContext(Csharp_parenthesis_expressionContext,0);
};
Csharp_primary_expressionContext.prototype.csharp_identifier_expression = function() {
return this.getTypedRuleContext(Csharp_identifier_expressionContext,0);
};
Csharp_primary_expressionContext.prototype.csharp_literal_expression = function() {
return this.getTypedRuleContext(Csharp_literal_expressionContext,0);
};
Csharp_primary_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_primary_expression(this);
}
};
Csharp_primary_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_primary_expression(this);
}
};
EParser.prototype.csharp_primary_expression = function() {
var localctx = new Csharp_primary_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 394, EParser.RULE_csharp_primary_expression);
try {
this.state = 2279;
var la_ = this._interp.adaptivePredict(this._input,190,this._ctx);
switch(la_) {
case 1:
this.enterOuterAlt(localctx, 1);
this.state = 2274;
this.csharp_this_expression();
break;
case 2:
this.enterOuterAlt(localctx, 2);
this.state = 2275;
this.csharp_new_expression();
break;
case 3:
this.enterOuterAlt(localctx, 3);
this.state = 2276;
this.csharp_parenthesis_expression();
break;
case 4:
this.enterOuterAlt(localctx, 4);
this.state = 2277;
this.csharp_identifier_expression(0);
break;
case 5:
this.enterOuterAlt(localctx, 5);
this.state = 2278;
this.csharp_literal_expression();
break;
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_this_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_this_expression;
return this;
}
Csharp_this_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_this_expressionContext.prototype.constructor = Csharp_this_expressionContext;
Csharp_this_expressionContext.prototype.this_expression = function() {
return this.getTypedRuleContext(This_expressionContext,0);
};
Csharp_this_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_this_expression(this);
}
};
Csharp_this_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_this_expression(this);
}
};
EParser.prototype.csharp_this_expression = function() {
var localctx = new Csharp_this_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 396, EParser.RULE_csharp_this_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2281;
this.this_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_new_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_new_expression;
return this;
}
Csharp_new_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_new_expressionContext.prototype.constructor = Csharp_new_expressionContext;
Csharp_new_expressionContext.prototype.new_token = function() {
return this.getTypedRuleContext(New_tokenContext,0);
};
Csharp_new_expressionContext.prototype.csharp_method_expression = function() {
return this.getTypedRuleContext(Csharp_method_expressionContext,0);
};
Csharp_new_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_new_expression(this);
}
};
Csharp_new_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_new_expression(this);
}
};
EParser.prototype.csharp_new_expression = function() {
var localctx = new Csharp_new_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 398, EParser.RULE_csharp_new_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2283;
this.new_token();
this.state = 2284;
this.csharp_method_expression();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_selector_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_selector_expression;
return this;
}
Csharp_selector_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_selector_expressionContext.prototype.constructor = Csharp_selector_expressionContext;
Csharp_selector_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpMethodExpressionContext(parser, ctx) {
Csharp_selector_expressionContext.call(this, parser);
this.exp = null; // Csharp_method_expressionContext;
Csharp_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpMethodExpressionContext.prototype = Object.create(Csharp_selector_expressionContext.prototype);
CSharpMethodExpressionContext.prototype.constructor = CSharpMethodExpressionContext;
CSharpMethodExpressionContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
CSharpMethodExpressionContext.prototype.csharp_method_expression = function() {
return this.getTypedRuleContext(Csharp_method_expressionContext,0);
};
CSharpMethodExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpMethodExpression(this);
}
};
CSharpMethodExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpMethodExpression(this);
}
};
function CSharpItemExpressionContext(parser, ctx) {
Csharp_selector_expressionContext.call(this, parser);
this.exp = null; // Csharp_item_expressionContext;
Csharp_selector_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpItemExpressionContext.prototype = Object.create(Csharp_selector_expressionContext.prototype);
CSharpItemExpressionContext.prototype.constructor = CSharpItemExpressionContext;
CSharpItemExpressionContext.prototype.csharp_item_expression = function() {
return this.getTypedRuleContext(Csharp_item_expressionContext,0);
};
CSharpItemExpressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpItemExpression(this);
}
};
CSharpItemExpressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpItemExpression(this);
}
};
EParser.prototype.csharp_selector_expression = function() {
var localctx = new Csharp_selector_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 400, EParser.RULE_csharp_selector_expression);
try {
this.state = 2289;
switch(this._input.LA(1)) {
case EParser.DOT:
localctx = new CSharpMethodExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2286;
this.match(EParser.DOT);
this.state = 2287;
localctx.exp = this.csharp_method_expression();
break;
case EParser.LBRAK:
localctx = new CSharpItemExpressionContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2288;
localctx.exp = this.csharp_item_expression();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_method_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_method_expression;
this.name = null; // Csharp_identifierContext
this.args = null; // Csharp_argumentsContext
return this;
}
Csharp_method_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_method_expressionContext.prototype.constructor = Csharp_method_expressionContext;
Csharp_method_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Csharp_method_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Csharp_method_expressionContext.prototype.csharp_identifier = function() {
return this.getTypedRuleContext(Csharp_identifierContext,0);
};
Csharp_method_expressionContext.prototype.csharp_arguments = function() {
return this.getTypedRuleContext(Csharp_argumentsContext,0);
};
Csharp_method_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_method_expression(this);
}
};
Csharp_method_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_method_expression(this);
}
};
EParser.prototype.csharp_method_expression = function() {
var localctx = new Csharp_method_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 402, EParser.RULE_csharp_method_expression);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2291;
localctx.name = this.csharp_identifier();
this.state = 2292;
this.match(EParser.LPAR);
this.state = 2294;
_la = this._input.LA(1);
if(_la===EParser.LPAR || ((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.SELF - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.THIS - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.BOOLEAN_LITERAL - 132)) | (1 << (EParser.CHAR_LITERAL - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0) || ((((_la - 164)) & ~0x1f) == 0 && ((1 << (_la - 164)) & ((1 << (EParser.DOLLAR_IDENTIFIER - 164)) | (1 << (EParser.TEXT_LITERAL - 164)) | (1 << (EParser.INTEGER_LITERAL - 164)) | (1 << (EParser.DECIMAL_LITERAL - 164)))) !== 0)) {
this.state = 2293;
localctx.args = this.csharp_arguments(0);
}
this.state = 2296;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_argumentsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_arguments;
return this;
}
Csharp_argumentsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_argumentsContext.prototype.constructor = Csharp_argumentsContext;
Csharp_argumentsContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpArgumentListContext(parser, ctx) {
Csharp_argumentsContext.call(this, parser);
this.item = null; // Csharp_expressionContext;
Csharp_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpArgumentListContext.prototype = Object.create(Csharp_argumentsContext.prototype);
CSharpArgumentListContext.prototype.constructor = CSharpArgumentListContext;
CSharpArgumentListContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
CSharpArgumentListContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpArgumentList(this);
}
};
CSharpArgumentListContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpArgumentList(this);
}
};
function CSharpArgumentListItemContext(parser, ctx) {
Csharp_argumentsContext.call(this, parser);
this.items = null; // Csharp_argumentsContext;
this.item = null; // Csharp_expressionContext;
Csharp_argumentsContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpArgumentListItemContext.prototype = Object.create(Csharp_argumentsContext.prototype);
CSharpArgumentListItemContext.prototype.constructor = CSharpArgumentListItemContext;
CSharpArgumentListItemContext.prototype.COMMA = function() {
return this.getToken(EParser.COMMA, 0);
};
CSharpArgumentListItemContext.prototype.csharp_arguments = function() {
return this.getTypedRuleContext(Csharp_argumentsContext,0);
};
CSharpArgumentListItemContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
CSharpArgumentListItemContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpArgumentListItem(this);
}
};
CSharpArgumentListItemContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpArgumentListItem(this);
}
};
EParser.prototype.csharp_arguments = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Csharp_argumentsContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 404;
this.enterRecursionRule(localctx, 404, EParser.RULE_csharp_arguments, _p);
try {
this.enterOuterAlt(localctx, 1);
localctx = new CSharpArgumentListContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2299;
localctx.item = this.csharp_expression(0);
this._ctx.stop = this._input.LT(-1);
this.state = 2306;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,193,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new CSharpArgumentListItemContext(this, new Csharp_argumentsContext(this, _parentctx, _parentState));
localctx.items = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_csharp_arguments);
this.state = 2301;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2302;
this.match(EParser.COMMA);
this.state = 2303;
localctx.item = this.csharp_expression(0);
}
this.state = 2308;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,193,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Csharp_item_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_item_expression;
this.exp = null; // Csharp_expressionContext
return this;
}
Csharp_item_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_item_expressionContext.prototype.constructor = Csharp_item_expressionContext;
Csharp_item_expressionContext.prototype.LBRAK = function() {
return this.getToken(EParser.LBRAK, 0);
};
Csharp_item_expressionContext.prototype.RBRAK = function() {
return this.getToken(EParser.RBRAK, 0);
};
Csharp_item_expressionContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
Csharp_item_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_item_expression(this);
}
};
Csharp_item_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_item_expression(this);
}
};
EParser.prototype.csharp_item_expression = function() {
var localctx = new Csharp_item_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 406, EParser.RULE_csharp_item_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2309;
this.match(EParser.LBRAK);
this.state = 2310;
localctx.exp = this.csharp_expression(0);
this.state = 2311;
this.match(EParser.RBRAK);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_parenthesis_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_parenthesis_expression;
this.exp = null; // Csharp_expressionContext
return this;
}
Csharp_parenthesis_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_parenthesis_expressionContext.prototype.constructor = Csharp_parenthesis_expressionContext;
Csharp_parenthesis_expressionContext.prototype.LPAR = function() {
return this.getToken(EParser.LPAR, 0);
};
Csharp_parenthesis_expressionContext.prototype.RPAR = function() {
return this.getToken(EParser.RPAR, 0);
};
Csharp_parenthesis_expressionContext.prototype.csharp_expression = function() {
return this.getTypedRuleContext(Csharp_expressionContext,0);
};
Csharp_parenthesis_expressionContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_parenthesis_expression(this);
}
};
Csharp_parenthesis_expressionContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_parenthesis_expression(this);
}
};
EParser.prototype.csharp_parenthesis_expression = function() {
var localctx = new Csharp_parenthesis_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 408, EParser.RULE_csharp_parenthesis_expression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2313;
this.match(EParser.LPAR);
this.state = 2314;
localctx.exp = this.csharp_expression(0);
this.state = 2315;
this.match(EParser.RPAR);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_identifier_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_identifier_expression;
return this;
}
Csharp_identifier_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_identifier_expressionContext.prototype.constructor = Csharp_identifier_expressionContext;
Csharp_identifier_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpIdentifierContext(parser, ctx) {
Csharp_identifier_expressionContext.call(this, parser);
this.name = null; // Csharp_identifierContext;
Csharp_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpIdentifierContext.prototype = Object.create(Csharp_identifier_expressionContext.prototype);
CSharpIdentifierContext.prototype.constructor = CSharpIdentifierContext;
CSharpIdentifierContext.prototype.csharp_identifier = function() {
return this.getTypedRuleContext(Csharp_identifierContext,0);
};
CSharpIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpIdentifier(this);
}
};
CSharpIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpIdentifier(this);
}
};
function CSharpChildIdentifierContext(parser, ctx) {
Csharp_identifier_expressionContext.call(this, parser);
this.parent = null; // Csharp_identifier_expressionContext;
this.name = null; // Csharp_identifierContext;
Csharp_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpChildIdentifierContext.prototype = Object.create(Csharp_identifier_expressionContext.prototype);
CSharpChildIdentifierContext.prototype.constructor = CSharpChildIdentifierContext;
CSharpChildIdentifierContext.prototype.DOT = function() {
return this.getToken(EParser.DOT, 0);
};
CSharpChildIdentifierContext.prototype.csharp_identifier_expression = function() {
return this.getTypedRuleContext(Csharp_identifier_expressionContext,0);
};
CSharpChildIdentifierContext.prototype.csharp_identifier = function() {
return this.getTypedRuleContext(Csharp_identifierContext,0);
};
CSharpChildIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpChildIdentifier(this);
}
};
CSharpChildIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpChildIdentifier(this);
}
};
function CSharpPromptoIdentifierContext(parser, ctx) {
Csharp_identifier_expressionContext.call(this, parser);
Csharp_identifier_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpPromptoIdentifierContext.prototype = Object.create(Csharp_identifier_expressionContext.prototype);
CSharpPromptoIdentifierContext.prototype.constructor = CSharpPromptoIdentifierContext;
CSharpPromptoIdentifierContext.prototype.DOLLAR_IDENTIFIER = function() {
return this.getToken(EParser.DOLLAR_IDENTIFIER, 0);
};
CSharpPromptoIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpPromptoIdentifier(this);
}
};
CSharpPromptoIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpPromptoIdentifier(this);
}
};
EParser.prototype.csharp_identifier_expression = function(_p) {
if(_p===undefined) {
_p = 0;
}
var _parentctx = this._ctx;
var _parentState = this.state;
var localctx = new Csharp_identifier_expressionContext(this, this._ctx, _parentState);
var _prevctx = localctx;
var _startState = 410;
this.enterRecursionRule(localctx, 410, EParser.RULE_csharp_identifier_expression, _p);
try {
this.enterOuterAlt(localctx, 1);
this.state = 2320;
switch(this._input.LA(1)) {
case EParser.DOLLAR_IDENTIFIER:
localctx = new CSharpPromptoIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2318;
this.match(EParser.DOLLAR_IDENTIFIER);
break;
case EParser.BOOLEAN:
case EParser.CHARACTER:
case EParser.TEXT:
case EParser.INTEGER:
case EParser.DECIMAL:
case EParser.DATE:
case EParser.TIME:
case EParser.DATETIME:
case EParser.PERIOD:
case EParser.READ:
case EParser.TEST:
case EParser.WRITE:
case EParser.SYMBOL_IDENTIFIER:
case EParser.TYPE_IDENTIFIER:
case EParser.VARIABLE_IDENTIFIER:
localctx = new CSharpIdentifierContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 2319;
localctx.name = this.csharp_identifier();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this._ctx.stop = this._input.LT(-1);
this.state = 2327;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,195,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
if(_alt===1) {
if(this._parseListeners!==null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
localctx = new CSharpChildIdentifierContext(this, new Csharp_identifier_expressionContext(this, _parentctx, _parentState));
localctx.parent = _prevctx;
this.pushNewRecursionContext(localctx, _startState, EParser.RULE_csharp_identifier_expression);
this.state = 2322;
if (!( this.precpred(this._ctx, 1))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)");
}
this.state = 2323;
this.match(EParser.DOT);
this.state = 2324;
localctx.name = this.csharp_identifier();
}
this.state = 2329;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,195,this._ctx);
}
} catch( error) {
if(error instanceof antlr4.error.RecognitionException) {
localctx.exception = error;
this._errHandler.reportError(this, error);
this._errHandler.recover(this, error);
} else {
throw error;
}
} finally {
this.unrollRecursionContexts(_parentctx)
}
return localctx;
};
function Csharp_literal_expressionContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_literal_expression;
return this;
}
Csharp_literal_expressionContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_literal_expressionContext.prototype.constructor = Csharp_literal_expressionContext;
Csharp_literal_expressionContext.prototype.copyFrom = function(ctx) {
antlr4.ParserRuleContext.prototype.copyFrom.call(this, ctx);
};
function CSharpBooleanLiteralContext(parser, ctx) {
Csharp_literal_expressionContext.call(this, parser);
Csharp_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpBooleanLiteralContext.prototype = Object.create(Csharp_literal_expressionContext.prototype);
CSharpBooleanLiteralContext.prototype.constructor = CSharpBooleanLiteralContext;
CSharpBooleanLiteralContext.prototype.BOOLEAN_LITERAL = function() {
return this.getToken(EParser.BOOLEAN_LITERAL, 0);
};
CSharpBooleanLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpBooleanLiteral(this);
}
};
CSharpBooleanLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpBooleanLiteral(this);
}
};
function CSharpIntegerLiteralContext(parser, ctx) {
Csharp_literal_expressionContext.call(this, parser);
Csharp_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpIntegerLiteralContext.prototype = Object.create(Csharp_literal_expressionContext.prototype);
CSharpIntegerLiteralContext.prototype.constructor = CSharpIntegerLiteralContext;
CSharpIntegerLiteralContext.prototype.INTEGER_LITERAL = function() {
return this.getToken(EParser.INTEGER_LITERAL, 0);
};
CSharpIntegerLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpIntegerLiteral(this);
}
};
CSharpIntegerLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpIntegerLiteral(this);
}
};
function CSharpDecimalLiteralContext(parser, ctx) {
Csharp_literal_expressionContext.call(this, parser);
Csharp_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpDecimalLiteralContext.prototype = Object.create(Csharp_literal_expressionContext.prototype);
CSharpDecimalLiteralContext.prototype.constructor = CSharpDecimalLiteralContext;
CSharpDecimalLiteralContext.prototype.DECIMAL_LITERAL = function() {
return this.getToken(EParser.DECIMAL_LITERAL, 0);
};
CSharpDecimalLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpDecimalLiteral(this);
}
};
CSharpDecimalLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpDecimalLiteral(this);
}
};
function CSharpCharacterLiteralContext(parser, ctx) {
Csharp_literal_expressionContext.call(this, parser);
Csharp_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpCharacterLiteralContext.prototype = Object.create(Csharp_literal_expressionContext.prototype);
CSharpCharacterLiteralContext.prototype.constructor = CSharpCharacterLiteralContext;
CSharpCharacterLiteralContext.prototype.CHAR_LITERAL = function() {
return this.getToken(EParser.CHAR_LITERAL, 0);
};
CSharpCharacterLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpCharacterLiteral(this);
}
};
CSharpCharacterLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpCharacterLiteral(this);
}
};
function CSharpTextLiteralContext(parser, ctx) {
Csharp_literal_expressionContext.call(this, parser);
Csharp_literal_expressionContext.prototype.copyFrom.call(this, ctx);
return this;
}
CSharpTextLiteralContext.prototype = Object.create(Csharp_literal_expressionContext.prototype);
CSharpTextLiteralContext.prototype.constructor = CSharpTextLiteralContext;
CSharpTextLiteralContext.prototype.TEXT_LITERAL = function() {
return this.getToken(EParser.TEXT_LITERAL, 0);
};
CSharpTextLiteralContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCSharpTextLiteral(this);
}
};
CSharpTextLiteralContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCSharpTextLiteral(this);
}
};
EParser.prototype.csharp_literal_expression = function() {
var localctx = new Csharp_literal_expressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 412, EParser.RULE_csharp_literal_expression);
try {
this.state = 2335;
switch(this._input.LA(1)) {
case EParser.INTEGER_LITERAL:
localctx = new CSharpIntegerLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 2330;
this.match(EParser.INTEGER_LITERAL);
break;
case EParser.DECIMAL_LITERAL:
localctx = new CSharpDecimalLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 2331;
this.match(EParser.DECIMAL_LITERAL);
break;
case EParser.TEXT_LITERAL:
localctx = new CSharpTextLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 2332;
this.match(EParser.TEXT_LITERAL);
break;
case EParser.BOOLEAN_LITERAL:
localctx = new CSharpBooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 2333;
this.match(EParser.BOOLEAN_LITERAL);
break;
case EParser.CHAR_LITERAL:
localctx = new CSharpCharacterLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 2334;
this.match(EParser.CHAR_LITERAL);
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function Csharp_identifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = EParser.RULE_csharp_identifier;
return this;
}
Csharp_identifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
Csharp_identifierContext.prototype.constructor = Csharp_identifierContext;
Csharp_identifierContext.prototype.VARIABLE_IDENTIFIER = function() {
return this.getToken(EParser.VARIABLE_IDENTIFIER, 0);
};
Csharp_identifierContext.prototype.SYMBOL_IDENTIFIER = function() {
return this.getToken(EParser.SYMBOL_IDENTIFIER, 0);
};
Csharp_identifierContext.prototype.TYPE_IDENTIFIER = function() {
return this.getToken(EParser.TYPE_IDENTIFIER, 0);
};
Csharp_identifierContext.prototype.BOOLEAN = function() {
return this.getToken(EParser.BOOLEAN, 0);
};
Csharp_identifierContext.prototype.CHARACTER = function() {
return this.getToken(EParser.CHARACTER, 0);
};
Csharp_identifierContext.prototype.TEXT = function() {
return this.getToken(EParser.TEXT, 0);
};
Csharp_identifierContext.prototype.INTEGER = function() {
return this.getToken(EParser.INTEGER, 0);
};
Csharp_identifierContext.prototype.DECIMAL = function() {
return this.getToken(EParser.DECIMAL, 0);
};
Csharp_identifierContext.prototype.DATE = function() {
return this.getToken(EParser.DATE, 0);
};
Csharp_identifierContext.prototype.TIME = function() {
return this.getToken(EParser.TIME, 0);
};
Csharp_identifierContext.prototype.DATETIME = function() {
return this.getToken(EParser.DATETIME, 0);
};
Csharp_identifierContext.prototype.PERIOD = function() {
return this.getToken(EParser.PERIOD, 0);
};
Csharp_identifierContext.prototype.READ = function() {
return this.getToken(EParser.READ, 0);
};
Csharp_identifierContext.prototype.WRITE = function() {
return this.getToken(EParser.WRITE, 0);
};
Csharp_identifierContext.prototype.TEST = function() {
return this.getToken(EParser.TEST, 0);
};
Csharp_identifierContext.prototype.enterRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.enterCsharp_identifier(this);
}
};
Csharp_identifierContext.prototype.exitRule = function(listener) {
if(listener instanceof EParserListener ) {
listener.exitCsharp_identifier(this);
}
};
EParser.prototype.csharp_identifier = function() {
var localctx = new Csharp_identifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 414, EParser.RULE_csharp_identifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 2337;
_la = this._input.LA(1);
if(!(((((_la - 50)) & ~0x1f) == 0 && ((1 << (_la - 50)) & ((1 << (EParser.BOOLEAN - 50)) | (1 << (EParser.CHARACTER - 50)) | (1 << (EParser.TEXT - 50)) | (1 << (EParser.INTEGER - 50)) | (1 << (EParser.DECIMAL - 50)) | (1 << (EParser.DATE - 50)) | (1 << (EParser.TIME - 50)) | (1 << (EParser.DATETIME - 50)) | (1 << (EParser.PERIOD - 50)))) !== 0) || ((((_la - 132)) & ~0x1f) == 0 && ((1 << (_la - 132)) & ((1 << (EParser.READ - 132)) | (1 << (EParser.TEST - 132)) | (1 << (EParser.WRITE - 132)) | (1 << (EParser.SYMBOL_IDENTIFIER - 132)) | (1 << (EParser.TYPE_IDENTIFIER - 132)) | (1 << (EParser.VARIABLE_IDENTIFIER - 132)))) !== 0))) {
this._errHandler.recoverInline(this);
}
this.consume();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
EParser.prototype.sempred = function(localctx, ruleIndex, predIndex) {
switch(ruleIndex) {
case 16:
return this.native_category_binding_list_sempred(localctx, predIndex);
case 37:
return this.else_if_statement_list_sempred(localctx, predIndex);
case 43:
return this.expression_sempred(localctx, predIndex);
case 44:
return this.unresolved_expression_sempred(localctx, predIndex);
case 45:
return this.unresolved_selector_sempred(localctx, predIndex);
case 47:
return this.invocation_trailer_sempred(localctx, predIndex);
case 48:
return this.instance_expression_sempred(localctx, predIndex);
case 49:
return this.instance_selector_sempred(localctx, predIndex);
case 58:
return this.argument_assignment_list_sempred(localctx, predIndex);
case 59:
return this.with_argument_assignment_list_sempred(localctx, predIndex);
case 62:
return this.child_instance_sempred(localctx, predIndex);
case 82:
return this.typedef_sempred(localctx, predIndex);
case 102:
return this.any_type_sempred(localctx, predIndex);
case 139:
return this.assignable_instance_sempred(localctx, predIndex);
case 140:
return this.is_expression_sempred(localctx, predIndex);
case 146:
return this.new_token_sempred(localctx, predIndex);
case 147:
return this.key_token_sempred(localctx, predIndex);
case 148:
return this.module_token_sempred(localctx, predIndex);
case 149:
return this.value_token_sempred(localctx, predIndex);
case 150:
return this.symbols_token_sempred(localctx, predIndex);
case 157:
return this.javascript_expression_sempred(localctx, predIndex);
case 163:
return this.javascript_arguments_sempred(localctx, predIndex);
case 170:
return this.python_expression_sempred(localctx, predIndex);
case 175:
return this.python_ordinal_argument_list_sempred(localctx, predIndex);
case 176:
return this.python_named_argument_list_sempred(localctx, predIndex);
case 178:
return this.python_identifier_expression_sempred(localctx, predIndex);
case 182:
return this.java_expression_sempred(localctx, predIndex);
case 188:
return this.java_arguments_sempred(localctx, predIndex);
case 191:
return this.java_identifier_expression_sempred(localctx, predIndex);
case 192:
return this.java_class_identifier_expression_sempred(localctx, predIndex);
case 196:
return this.csharp_expression_sempred(localctx, predIndex);
case 202:
return this.csharp_arguments_sempred(localctx, predIndex);
case 205:
return this.csharp_identifier_expression_sempred(localctx, predIndex);
default:
throw "No predicate with index:" + ruleIndex;
}
};
EParser.prototype.native_category_binding_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 0:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.else_if_statement_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 1:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 2:
return this.precpred(this._ctx, 40);
case 3:
return this.precpred(this._ctx, 39);
case 4:
return this.precpred(this._ctx, 38);
case 5:
return this.precpred(this._ctx, 37);
case 6:
return this.precpred(this._ctx, 36);
case 7:
return this.precpred(this._ctx, 35);
case 8:
return this.precpred(this._ctx, 34);
case 9:
return this.precpred(this._ctx, 33);
case 10:
return this.precpred(this._ctx, 32);
case 11:
return this.precpred(this._ctx, 29);
case 12:
return this.precpred(this._ctx, 28);
case 13:
return this.precpred(this._ctx, 27);
case 14:
return this.precpred(this._ctx, 26);
case 15:
return this.precpred(this._ctx, 25);
case 16:
return this.precpred(this._ctx, 24);
case 17:
return this.precpred(this._ctx, 22);
case 18:
return this.precpred(this._ctx, 21);
case 19:
return this.precpred(this._ctx, 20);
case 20:
return this.precpred(this._ctx, 19);
case 21:
return this.precpred(this._ctx, 18);
case 22:
return this.precpred(this._ctx, 17);
case 23:
return this.precpred(this._ctx, 16);
case 24:
return this.precpred(this._ctx, 15);
case 25:
return this.precpred(this._ctx, 1);
case 26:
return this.precpred(this._ctx, 31);
case 27:
return this.precpred(this._ctx, 30);
case 28:
return this.precpred(this._ctx, 23);
case 29:
return this.precpred(this._ctx, 8);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.unresolved_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 30:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.unresolved_selector_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 31:
return this.wasNot(EParser.WS);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.invocation_trailer_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 32:
return this.willBe(EParser.LF);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.instance_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 33:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.instance_selector_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 34:
return this.wasNot(EParser.WS);
case 35:
return this.wasNot(EParser.WS);
case 36:
return this.wasNot(EParser.WS);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.argument_assignment_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 37:
return this.was(EParser.WS);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.with_argument_assignment_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 38:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.child_instance_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 39:
return this.wasNot(EParser.WS);
case 40:
return this.wasNot(EParser.WS);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.typedef_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 41:
return this.precpred(this._ctx, 5);
case 42:
return this.precpred(this._ctx, 4);
case 43:
return this.precpred(this._ctx, 3);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.any_type_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 44:
return this.precpred(this._ctx, 2);
case 45:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.assignable_instance_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 46:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.is_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 47:
return this.willBeAOrAn();
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.new_token_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 48:
return this.isText(localctx.i1,"new");
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.key_token_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 49:
return this.isText(localctx.i1,"key");
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.module_token_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 50:
return this.isText(localctx.i1,"module");
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.value_token_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 51:
return this.isText(localctx.i1,"value");
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.symbols_token_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 52:
return this.isText(localctx.i1,"symbols");
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.javascript_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 53:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.javascript_arguments_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 54:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.python_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 55:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.python_ordinal_argument_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 56:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.python_named_argument_list_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 57:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.python_identifier_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 58:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.java_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 59:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.java_arguments_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 60:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.java_identifier_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 61:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.java_class_identifier_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 62:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.csharp_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 63:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.csharp_arguments_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 64:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
EParser.prototype.csharp_identifier_expression_sempred = function(localctx, predIndex) {
switch(predIndex) {
case 65:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
exports.EParser = EParser;
/***/ },
/* 104 */
/***/ function(module, exports, __webpack_require__) {
// Generated from EParser.g4 by ANTLR 4.5
// jshint ignore: start
var antlr4 = __webpack_require__(1);
// This class defines a complete listener for a parse tree produced by EParser.
function EParserListener() {
antlr4.tree.ParseTreeListener.call(this);
return this;
}
EParserListener.prototype = Object.create(antlr4.tree.ParseTreeListener.prototype);
EParserListener.prototype.constructor = EParserListener;
// Enter a parse tree produced by EParser#enum_category_declaration.
EParserListener.prototype.enterEnum_category_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#enum_category_declaration.
EParserListener.prototype.exitEnum_category_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#enum_native_declaration.
EParserListener.prototype.enterEnum_native_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#enum_native_declaration.
EParserListener.prototype.exitEnum_native_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_symbol.
EParserListener.prototype.enterNative_symbol = function(ctx) {
};
// Exit a parse tree produced by EParser#native_symbol.
EParserListener.prototype.exitNative_symbol = function(ctx) {
};
// Enter a parse tree produced by EParser#category_symbol.
EParserListener.prototype.enterCategory_symbol = function(ctx) {
};
// Exit a parse tree produced by EParser#category_symbol.
EParserListener.prototype.exitCategory_symbol = function(ctx) {
};
// Enter a parse tree produced by EParser#attribute_declaration.
EParserListener.prototype.enterAttribute_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#attribute_declaration.
EParserListener.prototype.exitAttribute_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#concrete_category_declaration.
EParserListener.prototype.enterConcrete_category_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#concrete_category_declaration.
EParserListener.prototype.exitConcrete_category_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#singleton_category_declaration.
EParserListener.prototype.enterSingleton_category_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#singleton_category_declaration.
EParserListener.prototype.exitSingleton_category_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#DerivedList.
EParserListener.prototype.enterDerivedList = function(ctx) {
};
// Exit a parse tree produced by EParser#DerivedList.
EParserListener.prototype.exitDerivedList = function(ctx) {
};
// Enter a parse tree produced by EParser#DerivedListItem.
EParserListener.prototype.enterDerivedListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#DerivedListItem.
EParserListener.prototype.exitDerivedListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#operator_method_declaration.
EParserListener.prototype.enterOperator_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#operator_method_declaration.
EParserListener.prototype.exitOperator_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#setter_method_declaration.
EParserListener.prototype.enterSetter_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#setter_method_declaration.
EParserListener.prototype.exitSetter_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_setter_declaration.
EParserListener.prototype.enterNative_setter_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_setter_declaration.
EParserListener.prototype.exitNative_setter_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#getter_method_declaration.
EParserListener.prototype.enterGetter_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#getter_method_declaration.
EParserListener.prototype.exitGetter_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_getter_declaration.
EParserListener.prototype.enterNative_getter_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_getter_declaration.
EParserListener.prototype.exitNative_getter_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_category_declaration.
EParserListener.prototype.enterNative_category_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_category_declaration.
EParserListener.prototype.exitNative_category_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_resource_declaration.
EParserListener.prototype.enterNative_resource_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_resource_declaration.
EParserListener.prototype.exitNative_resource_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_category_bindings.
EParserListener.prototype.enterNative_category_bindings = function(ctx) {
};
// Exit a parse tree produced by EParser#native_category_bindings.
EParserListener.prototype.exitNative_category_bindings = function(ctx) {
};
// Enter a parse tree produced by EParser#NativeCategoryBindingListItem.
EParserListener.prototype.enterNativeCategoryBindingListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#NativeCategoryBindingListItem.
EParserListener.prototype.exitNativeCategoryBindingListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#NativeCategoryBindingList.
EParserListener.prototype.enterNativeCategoryBindingList = function(ctx) {
};
// Exit a parse tree produced by EParser#NativeCategoryBindingList.
EParserListener.prototype.exitNativeCategoryBindingList = function(ctx) {
};
// Enter a parse tree produced by EParser#AttributeList.
EParserListener.prototype.enterAttributeList = function(ctx) {
};
// Exit a parse tree produced by EParser#AttributeList.
EParserListener.prototype.exitAttributeList = function(ctx) {
};
// Enter a parse tree produced by EParser#AttributeListItem.
EParserListener.prototype.enterAttributeListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#AttributeListItem.
EParserListener.prototype.exitAttributeListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#abstract_method_declaration.
EParserListener.prototype.enterAbstract_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#abstract_method_declaration.
EParserListener.prototype.exitAbstract_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#concrete_method_declaration.
EParserListener.prototype.enterConcrete_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#concrete_method_declaration.
EParserListener.prototype.exitConcrete_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_method_declaration.
EParserListener.prototype.enterNative_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_method_declaration.
EParserListener.prototype.exitNative_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#test_method_declaration.
EParserListener.prototype.enterTest_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#test_method_declaration.
EParserListener.prototype.exitTest_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#assertion.
EParserListener.prototype.enterAssertion = function(ctx) {
};
// Exit a parse tree produced by EParser#assertion.
EParserListener.prototype.exitAssertion = function(ctx) {
};
// Enter a parse tree produced by EParser#full_argument_list.
EParserListener.prototype.enterFull_argument_list = function(ctx) {
};
// Exit a parse tree produced by EParser#full_argument_list.
EParserListener.prototype.exitFull_argument_list = function(ctx) {
};
// Enter a parse tree produced by EParser#typed_argument.
EParserListener.prototype.enterTyped_argument = function(ctx) {
};
// Exit a parse tree produced by EParser#typed_argument.
EParserListener.prototype.exitTyped_argument = function(ctx) {
};
// Enter a parse tree produced by EParser#AssignInstanceStatement.
EParserListener.prototype.enterAssignInstanceStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#AssignInstanceStatement.
EParserListener.prototype.exitAssignInstanceStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#MethodCallStatement.
EParserListener.prototype.enterMethodCallStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#MethodCallStatement.
EParserListener.prototype.exitMethodCallStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#AssignTupleStatement.
EParserListener.prototype.enterAssignTupleStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#AssignTupleStatement.
EParserListener.prototype.exitAssignTupleStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#StoreStatement.
EParserListener.prototype.enterStoreStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#StoreStatement.
EParserListener.prototype.exitStoreStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#FlushStatement.
EParserListener.prototype.enterFlushStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#FlushStatement.
EParserListener.prototype.exitFlushStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#BreakStatement.
EParserListener.prototype.enterBreakStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#BreakStatement.
EParserListener.prototype.exitBreakStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#ReturnStatement.
EParserListener.prototype.enterReturnStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#ReturnStatement.
EParserListener.prototype.exitReturnStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#IfStatement.
EParserListener.prototype.enterIfStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#IfStatement.
EParserListener.prototype.exitIfStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#SwitchStatement.
EParserListener.prototype.enterSwitchStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#SwitchStatement.
EParserListener.prototype.exitSwitchStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#ForEachStatement.
EParserListener.prototype.enterForEachStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#ForEachStatement.
EParserListener.prototype.exitForEachStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#WhileStatement.
EParserListener.prototype.enterWhileStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#WhileStatement.
EParserListener.prototype.exitWhileStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#DoWhileStatement.
EParserListener.prototype.enterDoWhileStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#DoWhileStatement.
EParserListener.prototype.exitDoWhileStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#RaiseStatement.
EParserListener.prototype.enterRaiseStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#RaiseStatement.
EParserListener.prototype.exitRaiseStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#TryStatement.
EParserListener.prototype.enterTryStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#TryStatement.
EParserListener.prototype.exitTryStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#WriteStatement.
EParserListener.prototype.enterWriteStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#WriteStatement.
EParserListener.prototype.exitWriteStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#WithResourceStatement.
EParserListener.prototype.enterWithResourceStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#WithResourceStatement.
EParserListener.prototype.exitWithResourceStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#WithSingletonStatement.
EParserListener.prototype.enterWithSingletonStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#WithSingletonStatement.
EParserListener.prototype.exitWithSingletonStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#ClosureStatement.
EParserListener.prototype.enterClosureStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#ClosureStatement.
EParserListener.prototype.exitClosureStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#CommentStatement.
EParserListener.prototype.enterCommentStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CommentStatement.
EParserListener.prototype.exitCommentStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#flush_statement.
EParserListener.prototype.enterFlush_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#flush_statement.
EParserListener.prototype.exitFlush_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#store_statement.
EParserListener.prototype.enterStore_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#store_statement.
EParserListener.prototype.exitStore_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#UnresolvedWithArgsStatement.
EParserListener.prototype.enterUnresolvedWithArgsStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#UnresolvedWithArgsStatement.
EParserListener.prototype.exitUnresolvedWithArgsStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#InvokeStatement.
EParserListener.prototype.enterInvokeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#InvokeStatement.
EParserListener.prototype.exitInvokeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#with_resource_statement.
EParserListener.prototype.enterWith_resource_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#with_resource_statement.
EParserListener.prototype.exitWith_resource_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#with_singleton_statement.
EParserListener.prototype.enterWith_singleton_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#with_singleton_statement.
EParserListener.prototype.exitWith_singleton_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#switch_statement.
EParserListener.prototype.enterSwitch_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#switch_statement.
EParserListener.prototype.exitSwitch_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#AtomicSwitchCase.
EParserListener.prototype.enterAtomicSwitchCase = function(ctx) {
};
// Exit a parse tree produced by EParser#AtomicSwitchCase.
EParserListener.prototype.exitAtomicSwitchCase = function(ctx) {
};
// Enter a parse tree produced by EParser#CollectionSwitchCase.
EParserListener.prototype.enterCollectionSwitchCase = function(ctx) {
};
// Exit a parse tree produced by EParser#CollectionSwitchCase.
EParserListener.prototype.exitCollectionSwitchCase = function(ctx) {
};
// Enter a parse tree produced by EParser#for_each_statement.
EParserListener.prototype.enterFor_each_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#for_each_statement.
EParserListener.prototype.exitFor_each_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#do_while_statement.
EParserListener.prototype.enterDo_while_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#do_while_statement.
EParserListener.prototype.exitDo_while_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#while_statement.
EParserListener.prototype.enterWhile_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#while_statement.
EParserListener.prototype.exitWhile_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#if_statement.
EParserListener.prototype.enterIf_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#if_statement.
EParserListener.prototype.exitIf_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#ElseIfStatementList.
EParserListener.prototype.enterElseIfStatementList = function(ctx) {
};
// Exit a parse tree produced by EParser#ElseIfStatementList.
EParserListener.prototype.exitElseIfStatementList = function(ctx) {
};
// Enter a parse tree produced by EParser#ElseIfStatementListItem.
EParserListener.prototype.enterElseIfStatementListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#ElseIfStatementListItem.
EParserListener.prototype.exitElseIfStatementListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#raise_statement.
EParserListener.prototype.enterRaise_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#raise_statement.
EParserListener.prototype.exitRaise_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#try_statement.
EParserListener.prototype.enterTry_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#try_statement.
EParserListener.prototype.exitTry_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#CatchAtomicStatement.
EParserListener.prototype.enterCatchAtomicStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CatchAtomicStatement.
EParserListener.prototype.exitCatchAtomicStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#CatchCollectionStatement.
EParserListener.prototype.enterCatchCollectionStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CatchCollectionStatement.
EParserListener.prototype.exitCatchCollectionStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#break_statement.
EParserListener.prototype.enterBreak_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#break_statement.
EParserListener.prototype.exitBreak_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#return_statement.
EParserListener.prototype.enterReturn_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#return_statement.
EParserListener.prototype.exitReturn_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#IntDivideExpression.
EParserListener.prototype.enterIntDivideExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IntDivideExpression.
EParserListener.prototype.exitIntDivideExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#TernaryExpression.
EParserListener.prototype.enterTernaryExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#TernaryExpression.
EParserListener.prototype.exitTernaryExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#FetchStoreExpression.
EParserListener.prototype.enterFetchStoreExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#FetchStoreExpression.
EParserListener.prototype.exitFetchStoreExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ContainsAllExpression.
EParserListener.prototype.enterContainsAllExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ContainsAllExpression.
EParserListener.prototype.exitContainsAllExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotEqualsExpression.
EParserListener.prototype.enterNotEqualsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotEqualsExpression.
EParserListener.prototype.exitNotEqualsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#InExpression.
EParserListener.prototype.enterInExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#InExpression.
EParserListener.prototype.exitInExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#DocumentExpression.
EParserListener.prototype.enterDocumentExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#DocumentExpression.
EParserListener.prototype.exitDocumentExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotExpression.
EParserListener.prototype.enterNotExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotExpression.
EParserListener.prototype.exitNotExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#GreaterThanExpression.
EParserListener.prototype.enterGreaterThanExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#GreaterThanExpression.
EParserListener.prototype.exitGreaterThanExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#InvocationExpression.
EParserListener.prototype.enterInvocationExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#InvocationExpression.
EParserListener.prototype.exitInvocationExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#OrExpression.
EParserListener.prototype.enterOrExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#OrExpression.
EParserListener.prototype.exitOrExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#CodeExpression.
EParserListener.prototype.enterCodeExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CodeExpression.
EParserListener.prototype.exitCodeExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#AmbiguousExpression.
EParserListener.prototype.enterAmbiguousExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#AmbiguousExpression.
EParserListener.prototype.exitAmbiguousExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#LessThanOrEqualExpression.
EParserListener.prototype.enterLessThanOrEqualExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#LessThanOrEqualExpression.
EParserListener.prototype.exitLessThanOrEqualExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ReadOneExpression.
EParserListener.prototype.enterReadOneExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ReadOneExpression.
EParserListener.prototype.exitReadOneExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#AndExpression.
EParserListener.prototype.enterAndExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#AndExpression.
EParserListener.prototype.exitAndExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#MethodCallExpression.
EParserListener.prototype.enterMethodCallExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#MethodCallExpression.
EParserListener.prototype.exitMethodCallExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ClosureExpression.
EParserListener.prototype.enterClosureExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ClosureExpression.
EParserListener.prototype.exitClosureExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#SortedExpression.
EParserListener.prototype.enterSortedExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#SortedExpression.
EParserListener.prototype.exitSortedExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#BlobExpression.
EParserListener.prototype.enterBlobExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#BlobExpression.
EParserListener.prototype.exitBlobExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotContainsAnyExpression.
EParserListener.prototype.enterNotContainsAnyExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotContainsAnyExpression.
EParserListener.prototype.exitNotContainsAnyExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ContainsExpression.
EParserListener.prototype.enterContainsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ContainsExpression.
EParserListener.prototype.exitContainsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#FilteredListExpression.
EParserListener.prototype.enterFilteredListExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#FilteredListExpression.
EParserListener.prototype.exitFilteredListExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ConstructorExpression.
EParserListener.prototype.enterConstructorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ConstructorExpression.
EParserListener.prototype.exitConstructorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotContainsExpression.
EParserListener.prototype.enterNotContainsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotContainsExpression.
EParserListener.prototype.exitNotContainsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#MultiplyExpression.
EParserListener.prototype.enterMultiplyExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#MultiplyExpression.
EParserListener.prototype.exitMultiplyExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#RoughlyEqualsExpression.
EParserListener.prototype.enterRoughlyEqualsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#RoughlyEqualsExpression.
EParserListener.prototype.exitRoughlyEqualsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ExecuteExpression.
EParserListener.prototype.enterExecuteExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ExecuteExpression.
EParserListener.prototype.exitExecuteExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#GreaterThanOrEqualExpression.
EParserListener.prototype.enterGreaterThanOrEqualExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#GreaterThanOrEqualExpression.
EParserListener.prototype.exitGreaterThanOrEqualExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotInExpression.
EParserListener.prototype.enterNotInExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotInExpression.
EParserListener.prototype.exitNotInExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#IteratorExpression.
EParserListener.prototype.enterIteratorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IteratorExpression.
EParserListener.prototype.exitIteratorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#UnresolvedExpression.
EParserListener.prototype.enterUnresolvedExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#UnresolvedExpression.
EParserListener.prototype.exitUnresolvedExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#IsNotExpression.
EParserListener.prototype.enterIsNotExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IsNotExpression.
EParserListener.prototype.exitIsNotExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#DivideExpression.
EParserListener.prototype.enterDivideExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#DivideExpression.
EParserListener.prototype.exitDivideExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#IsExpression.
EParserListener.prototype.enterIsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IsExpression.
EParserListener.prototype.exitIsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#MinusExpression.
EParserListener.prototype.enterMinusExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#MinusExpression.
EParserListener.prototype.exitMinusExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#AddExpression.
EParserListener.prototype.enterAddExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#AddExpression.
EParserListener.prototype.exitAddExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#NotContainsAllExpression.
EParserListener.prototype.enterNotContainsAllExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#NotContainsAllExpression.
EParserListener.prototype.exitNotContainsAllExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#InstanceExpression.
EParserListener.prototype.enterInstanceExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#InstanceExpression.
EParserListener.prototype.exitInstanceExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ReadAllExpression.
EParserListener.prototype.enterReadAllExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ReadAllExpression.
EParserListener.prototype.exitReadAllExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ContainsAnyExpression.
EParserListener.prototype.enterContainsAnyExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ContainsAnyExpression.
EParserListener.prototype.exitContainsAnyExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#CastExpression.
EParserListener.prototype.enterCastExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CastExpression.
EParserListener.prototype.exitCastExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ModuloExpression.
EParserListener.prototype.enterModuloExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ModuloExpression.
EParserListener.prototype.exitModuloExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#LessThanExpression.
EParserListener.prototype.enterLessThanExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#LessThanExpression.
EParserListener.prototype.exitLessThanExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#EqualsExpression.
EParserListener.prototype.enterEqualsExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#EqualsExpression.
EParserListener.prototype.exitEqualsExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#UnresolvedSelector.
EParserListener.prototype.enterUnresolvedSelector = function(ctx) {
};
// Exit a parse tree produced by EParser#UnresolvedSelector.
EParserListener.prototype.exitUnresolvedSelector = function(ctx) {
};
// Enter a parse tree produced by EParser#UnresolvedIdentifier.
EParserListener.prototype.enterUnresolvedIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#UnresolvedIdentifier.
EParserListener.prototype.exitUnresolvedIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#unresolved_selector.
EParserListener.prototype.enterUnresolved_selector = function(ctx) {
};
// Exit a parse tree produced by EParser#unresolved_selector.
EParserListener.prototype.exitUnresolved_selector = function(ctx) {
};
// Enter a parse tree produced by EParser#invocation_expression.
EParserListener.prototype.enterInvocation_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#invocation_expression.
EParserListener.prototype.exitInvocation_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#invocation_trailer.
EParserListener.prototype.enterInvocation_trailer = function(ctx) {
};
// Exit a parse tree produced by EParser#invocation_trailer.
EParserListener.prototype.exitInvocation_trailer = function(ctx) {
};
// Enter a parse tree produced by EParser#SelectorExpression.
EParserListener.prototype.enterSelectorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#SelectorExpression.
EParserListener.prototype.exitSelectorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#SelectableExpression.
EParserListener.prototype.enterSelectableExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#SelectableExpression.
EParserListener.prototype.exitSelectableExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#MemberSelector.
EParserListener.prototype.enterMemberSelector = function(ctx) {
};
// Exit a parse tree produced by EParser#MemberSelector.
EParserListener.prototype.exitMemberSelector = function(ctx) {
};
// Enter a parse tree produced by EParser#SliceSelector.
EParserListener.prototype.enterSliceSelector = function(ctx) {
};
// Exit a parse tree produced by EParser#SliceSelector.
EParserListener.prototype.exitSliceSelector = function(ctx) {
};
// Enter a parse tree produced by EParser#ItemSelector.
EParserListener.prototype.enterItemSelector = function(ctx) {
};
// Exit a parse tree produced by EParser#ItemSelector.
EParserListener.prototype.exitItemSelector = function(ctx) {
};
// Enter a parse tree produced by EParser#document_expression.
EParserListener.prototype.enterDocument_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#document_expression.
EParserListener.prototype.exitDocument_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#blob_expression.
EParserListener.prototype.enterBlob_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#blob_expression.
EParserListener.prototype.exitBlob_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#ConstructorFrom.
EParserListener.prototype.enterConstructorFrom = function(ctx) {
};
// Exit a parse tree produced by EParser#ConstructorFrom.
EParserListener.prototype.exitConstructorFrom = function(ctx) {
};
// Enter a parse tree produced by EParser#ConstructorNoFrom.
EParserListener.prototype.enterConstructorNoFrom = function(ctx) {
};
// Exit a parse tree produced by EParser#ConstructorNoFrom.
EParserListener.prototype.exitConstructorNoFrom = function(ctx) {
};
// Enter a parse tree produced by EParser#write_statement.
EParserListener.prototype.enterWrite_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#write_statement.
EParserListener.prototype.exitWrite_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#ambiguous_expression.
EParserListener.prototype.enterAmbiguous_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#ambiguous_expression.
EParserListener.prototype.exitAmbiguous_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#filtered_list_suffix.
EParserListener.prototype.enterFiltered_list_suffix = function(ctx) {
};
// Exit a parse tree produced by EParser#filtered_list_suffix.
EParserListener.prototype.exitFiltered_list_suffix = function(ctx) {
};
// Enter a parse tree produced by EParser#FetchOne.
EParserListener.prototype.enterFetchOne = function(ctx) {
};
// Exit a parse tree produced by EParser#FetchOne.
EParserListener.prototype.exitFetchOne = function(ctx) {
};
// Enter a parse tree produced by EParser#FetchMany.
EParserListener.prototype.enterFetchMany = function(ctx) {
};
// Exit a parse tree produced by EParser#FetchMany.
EParserListener.prototype.exitFetchMany = function(ctx) {
};
// Enter a parse tree produced by EParser#sorted_expression.
EParserListener.prototype.enterSorted_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#sorted_expression.
EParserListener.prototype.exitSorted_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#ArgumentAssignmentListExpression.
EParserListener.prototype.enterArgumentAssignmentListExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ArgumentAssignmentListExpression.
EParserListener.prototype.exitArgumentAssignmentListExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ArgumentAssignmentListNoExpression.
EParserListener.prototype.enterArgumentAssignmentListNoExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ArgumentAssignmentListNoExpression.
EParserListener.prototype.exitArgumentAssignmentListNoExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ArgumentAssignmentList.
EParserListener.prototype.enterArgumentAssignmentList = function(ctx) {
};
// Exit a parse tree produced by EParser#ArgumentAssignmentList.
EParserListener.prototype.exitArgumentAssignmentList = function(ctx) {
};
// Enter a parse tree produced by EParser#ArgumentAssignmentListItem.
EParserListener.prototype.enterArgumentAssignmentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#ArgumentAssignmentListItem.
EParserListener.prototype.exitArgumentAssignmentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#argument_assignment.
EParserListener.prototype.enterArgument_assignment = function(ctx) {
};
// Exit a parse tree produced by EParser#argument_assignment.
EParserListener.prototype.exitArgument_assignment = function(ctx) {
};
// Enter a parse tree produced by EParser#assign_instance_statement.
EParserListener.prototype.enterAssign_instance_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#assign_instance_statement.
EParserListener.prototype.exitAssign_instance_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#MemberInstance.
EParserListener.prototype.enterMemberInstance = function(ctx) {
};
// Exit a parse tree produced by EParser#MemberInstance.
EParserListener.prototype.exitMemberInstance = function(ctx) {
};
// Enter a parse tree produced by EParser#ItemInstance.
EParserListener.prototype.enterItemInstance = function(ctx) {
};
// Exit a parse tree produced by EParser#ItemInstance.
EParserListener.prototype.exitItemInstance = function(ctx) {
};
// Enter a parse tree produced by EParser#assign_tuple_statement.
EParserListener.prototype.enterAssign_tuple_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#assign_tuple_statement.
EParserListener.prototype.exitAssign_tuple_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#lfs.
EParserListener.prototype.enterLfs = function(ctx) {
};
// Exit a parse tree produced by EParser#lfs.
EParserListener.prototype.exitLfs = function(ctx) {
};
// Enter a parse tree produced by EParser#lfp.
EParserListener.prototype.enterLfp = function(ctx) {
};
// Exit a parse tree produced by EParser#lfp.
EParserListener.prototype.exitLfp = function(ctx) {
};
// Enter a parse tree produced by EParser#indent.
EParserListener.prototype.enterIndent = function(ctx) {
};
// Exit a parse tree produced by EParser#indent.
EParserListener.prototype.exitIndent = function(ctx) {
};
// Enter a parse tree produced by EParser#dedent.
EParserListener.prototype.enterDedent = function(ctx) {
};
// Exit a parse tree produced by EParser#dedent.
EParserListener.prototype.exitDedent = function(ctx) {
};
// Enter a parse tree produced by EParser#null_literal.
EParserListener.prototype.enterNull_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#null_literal.
EParserListener.prototype.exitNull_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#FullDeclarationList.
EParserListener.prototype.enterFullDeclarationList = function(ctx) {
};
// Exit a parse tree produced by EParser#FullDeclarationList.
EParserListener.prototype.exitFullDeclarationList = function(ctx) {
};
// Enter a parse tree produced by EParser#declarations.
EParserListener.prototype.enterDeclarations = function(ctx) {
};
// Exit a parse tree produced by EParser#declarations.
EParserListener.prototype.exitDeclarations = function(ctx) {
};
// Enter a parse tree produced by EParser#declaration.
EParserListener.prototype.enterDeclaration = function(ctx) {
};
// Exit a parse tree produced by EParser#declaration.
EParserListener.prototype.exitDeclaration = function(ctx) {
};
// Enter a parse tree produced by EParser#resource_declaration.
EParserListener.prototype.enterResource_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#resource_declaration.
EParserListener.prototype.exitResource_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#enum_declaration.
EParserListener.prototype.enterEnum_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#enum_declaration.
EParserListener.prototype.exitEnum_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_symbol_list.
EParserListener.prototype.enterNative_symbol_list = function(ctx) {
};
// Exit a parse tree produced by EParser#native_symbol_list.
EParserListener.prototype.exitNative_symbol_list = function(ctx) {
};
// Enter a parse tree produced by EParser#category_symbol_list.
EParserListener.prototype.enterCategory_symbol_list = function(ctx) {
};
// Exit a parse tree produced by EParser#category_symbol_list.
EParserListener.prototype.exitCategory_symbol_list = function(ctx) {
};
// Enter a parse tree produced by EParser#symbol_list.
EParserListener.prototype.enterSymbol_list = function(ctx) {
};
// Exit a parse tree produced by EParser#symbol_list.
EParserListener.prototype.exitSymbol_list = function(ctx) {
};
// Enter a parse tree produced by EParser#MatchingList.
EParserListener.prototype.enterMatchingList = function(ctx) {
};
// Exit a parse tree produced by EParser#MatchingList.
EParserListener.prototype.exitMatchingList = function(ctx) {
};
// Enter a parse tree produced by EParser#MatchingSet.
EParserListener.prototype.enterMatchingSet = function(ctx) {
};
// Exit a parse tree produced by EParser#MatchingSet.
EParserListener.prototype.exitMatchingSet = function(ctx) {
};
// Enter a parse tree produced by EParser#MatchingRange.
EParserListener.prototype.enterMatchingRange = function(ctx) {
};
// Exit a parse tree produced by EParser#MatchingRange.
EParserListener.prototype.exitMatchingRange = function(ctx) {
};
// Enter a parse tree produced by EParser#MatchingPattern.
EParserListener.prototype.enterMatchingPattern = function(ctx) {
};
// Exit a parse tree produced by EParser#MatchingPattern.
EParserListener.prototype.exitMatchingPattern = function(ctx) {
};
// Enter a parse tree produced by EParser#MatchingExpression.
EParserListener.prototype.enterMatchingExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#MatchingExpression.
EParserListener.prototype.exitMatchingExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#list_literal.
EParserListener.prototype.enterList_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#list_literal.
EParserListener.prototype.exitList_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#set_literal.
EParserListener.prototype.enterSet_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#set_literal.
EParserListener.prototype.exitSet_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#expression_list.
EParserListener.prototype.enterExpression_list = function(ctx) {
};
// Exit a parse tree produced by EParser#expression_list.
EParserListener.prototype.exitExpression_list = function(ctx) {
};
// Enter a parse tree produced by EParser#range_literal.
EParserListener.prototype.enterRange_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#range_literal.
EParserListener.prototype.exitRange_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#IteratorType.
EParserListener.prototype.enterIteratorType = function(ctx) {
};
// Exit a parse tree produced by EParser#IteratorType.
EParserListener.prototype.exitIteratorType = function(ctx) {
};
// Enter a parse tree produced by EParser#SetType.
EParserListener.prototype.enterSetType = function(ctx) {
};
// Exit a parse tree produced by EParser#SetType.
EParserListener.prototype.exitSetType = function(ctx) {
};
// Enter a parse tree produced by EParser#ListType.
EParserListener.prototype.enterListType = function(ctx) {
};
// Exit a parse tree produced by EParser#ListType.
EParserListener.prototype.exitListType = function(ctx) {
};
// Enter a parse tree produced by EParser#DictType.
EParserListener.prototype.enterDictType = function(ctx) {
};
// Exit a parse tree produced by EParser#DictType.
EParserListener.prototype.exitDictType = function(ctx) {
};
// Enter a parse tree produced by EParser#CursorType.
EParserListener.prototype.enterCursorType = function(ctx) {
};
// Exit a parse tree produced by EParser#CursorType.
EParserListener.prototype.exitCursorType = function(ctx) {
};
// Enter a parse tree produced by EParser#PrimaryType.
EParserListener.prototype.enterPrimaryType = function(ctx) {
};
// Exit a parse tree produced by EParser#PrimaryType.
EParserListener.prototype.exitPrimaryType = function(ctx) {
};
// Enter a parse tree produced by EParser#NativeType.
EParserListener.prototype.enterNativeType = function(ctx) {
};
// Exit a parse tree produced by EParser#NativeType.
EParserListener.prototype.exitNativeType = function(ctx) {
};
// Enter a parse tree produced by EParser#CategoryType.
EParserListener.prototype.enterCategoryType = function(ctx) {
};
// Exit a parse tree produced by EParser#CategoryType.
EParserListener.prototype.exitCategoryType = function(ctx) {
};
// Enter a parse tree produced by EParser#BooleanType.
EParserListener.prototype.enterBooleanType = function(ctx) {
};
// Exit a parse tree produced by EParser#BooleanType.
EParserListener.prototype.exitBooleanType = function(ctx) {
};
// Enter a parse tree produced by EParser#CharacterType.
EParserListener.prototype.enterCharacterType = function(ctx) {
};
// Exit a parse tree produced by EParser#CharacterType.
EParserListener.prototype.exitCharacterType = function(ctx) {
};
// Enter a parse tree produced by EParser#TextType.
EParserListener.prototype.enterTextType = function(ctx) {
};
// Exit a parse tree produced by EParser#TextType.
EParserListener.prototype.exitTextType = function(ctx) {
};
// Enter a parse tree produced by EParser#ImageType.
EParserListener.prototype.enterImageType = function(ctx) {
};
// Exit a parse tree produced by EParser#ImageType.
EParserListener.prototype.exitImageType = function(ctx) {
};
// Enter a parse tree produced by EParser#IntegerType.
EParserListener.prototype.enterIntegerType = function(ctx) {
};
// Exit a parse tree produced by EParser#IntegerType.
EParserListener.prototype.exitIntegerType = function(ctx) {
};
// Enter a parse tree produced by EParser#DecimalType.
EParserListener.prototype.enterDecimalType = function(ctx) {
};
// Exit a parse tree produced by EParser#DecimalType.
EParserListener.prototype.exitDecimalType = function(ctx) {
};
// Enter a parse tree produced by EParser#DocumentType.
EParserListener.prototype.enterDocumentType = function(ctx) {
};
// Exit a parse tree produced by EParser#DocumentType.
EParserListener.prototype.exitDocumentType = function(ctx) {
};
// Enter a parse tree produced by EParser#DateType.
EParserListener.prototype.enterDateType = function(ctx) {
};
// Exit a parse tree produced by EParser#DateType.
EParserListener.prototype.exitDateType = function(ctx) {
};
// Enter a parse tree produced by EParser#DateTimeType.
EParserListener.prototype.enterDateTimeType = function(ctx) {
};
// Exit a parse tree produced by EParser#DateTimeType.
EParserListener.prototype.exitDateTimeType = function(ctx) {
};
// Enter a parse tree produced by EParser#TimeType.
EParserListener.prototype.enterTimeType = function(ctx) {
};
// Exit a parse tree produced by EParser#TimeType.
EParserListener.prototype.exitTimeType = function(ctx) {
};
// Enter a parse tree produced by EParser#PeriodType.
EParserListener.prototype.enterPeriodType = function(ctx) {
};
// Exit a parse tree produced by EParser#PeriodType.
EParserListener.prototype.exitPeriodType = function(ctx) {
};
// Enter a parse tree produced by EParser#CodeType.
EParserListener.prototype.enterCodeType = function(ctx) {
};
// Exit a parse tree produced by EParser#CodeType.
EParserListener.prototype.exitCodeType = function(ctx) {
};
// Enter a parse tree produced by EParser#BlobType.
EParserListener.prototype.enterBlobType = function(ctx) {
};
// Exit a parse tree produced by EParser#BlobType.
EParserListener.prototype.exitBlobType = function(ctx) {
};
// Enter a parse tree produced by EParser#UUIDType.
EParserListener.prototype.enterUUIDType = function(ctx) {
};
// Exit a parse tree produced by EParser#UUIDType.
EParserListener.prototype.exitUUIDType = function(ctx) {
};
// Enter a parse tree produced by EParser#category_type.
EParserListener.prototype.enterCategory_type = function(ctx) {
};
// Exit a parse tree produced by EParser#category_type.
EParserListener.prototype.exitCategory_type = function(ctx) {
};
// Enter a parse tree produced by EParser#mutable_category_type.
EParserListener.prototype.enterMutable_category_type = function(ctx) {
};
// Exit a parse tree produced by EParser#mutable_category_type.
EParserListener.prototype.exitMutable_category_type = function(ctx) {
};
// Enter a parse tree produced by EParser#code_type.
EParserListener.prototype.enterCode_type = function(ctx) {
};
// Exit a parse tree produced by EParser#code_type.
EParserListener.prototype.exitCode_type = function(ctx) {
};
// Enter a parse tree produced by EParser#ConcreteCategoryDeclaration.
EParserListener.prototype.enterConcreteCategoryDeclaration = function(ctx) {
};
// Exit a parse tree produced by EParser#ConcreteCategoryDeclaration.
EParserListener.prototype.exitConcreteCategoryDeclaration = function(ctx) {
};
// Enter a parse tree produced by EParser#NativeCategoryDeclaration.
EParserListener.prototype.enterNativeCategoryDeclaration = function(ctx) {
};
// Exit a parse tree produced by EParser#NativeCategoryDeclaration.
EParserListener.prototype.exitNativeCategoryDeclaration = function(ctx) {
};
// Enter a parse tree produced by EParser#SingletonCategoryDeclaration.
EParserListener.prototype.enterSingletonCategoryDeclaration = function(ctx) {
};
// Exit a parse tree produced by EParser#SingletonCategoryDeclaration.
EParserListener.prototype.exitSingletonCategoryDeclaration = function(ctx) {
};
// Enter a parse tree produced by EParser#type_identifier_list.
EParserListener.prototype.enterType_identifier_list = function(ctx) {
};
// Exit a parse tree produced by EParser#type_identifier_list.
EParserListener.prototype.exitType_identifier_list = function(ctx) {
};
// Enter a parse tree produced by EParser#method_identifier.
EParserListener.prototype.enterMethod_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#method_identifier.
EParserListener.prototype.exitMethod_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#VariableIdentifier.
EParserListener.prototype.enterVariableIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#VariableIdentifier.
EParserListener.prototype.exitVariableIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#TypeIdentifier.
EParserListener.prototype.enterTypeIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#TypeIdentifier.
EParserListener.prototype.exitTypeIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#SymbolIdentifier.
EParserListener.prototype.enterSymbolIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#SymbolIdentifier.
EParserListener.prototype.exitSymbolIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#variable_identifier.
EParserListener.prototype.enterVariable_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#variable_identifier.
EParserListener.prototype.exitVariable_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#attribute_identifier.
EParserListener.prototype.enterAttribute_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#attribute_identifier.
EParserListener.prototype.exitAttribute_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#type_identifier.
EParserListener.prototype.enterType_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#type_identifier.
EParserListener.prototype.exitType_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#symbol_identifier.
EParserListener.prototype.enterSymbol_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#symbol_identifier.
EParserListener.prototype.exitSymbol_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#argument_list.
EParserListener.prototype.enterArgument_list = function(ctx) {
};
// Exit a parse tree produced by EParser#argument_list.
EParserListener.prototype.exitArgument_list = function(ctx) {
};
// Enter a parse tree produced by EParser#CodeArgument.
EParserListener.prototype.enterCodeArgument = function(ctx) {
};
// Exit a parse tree produced by EParser#CodeArgument.
EParserListener.prototype.exitCodeArgument = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorArgument.
EParserListener.prototype.enterOperatorArgument = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorArgument.
EParserListener.prototype.exitOperatorArgument = function(ctx) {
};
// Enter a parse tree produced by EParser#operator_argument.
EParserListener.prototype.enterOperator_argument = function(ctx) {
};
// Exit a parse tree produced by EParser#operator_argument.
EParserListener.prototype.exitOperator_argument = function(ctx) {
};
// Enter a parse tree produced by EParser#named_argument.
EParserListener.prototype.enterNamed_argument = function(ctx) {
};
// Exit a parse tree produced by EParser#named_argument.
EParserListener.prototype.exitNamed_argument = function(ctx) {
};
// Enter a parse tree produced by EParser#code_argument.
EParserListener.prototype.enterCode_argument = function(ctx) {
};
// Exit a parse tree produced by EParser#code_argument.
EParserListener.prototype.exitCode_argument = function(ctx) {
};
// Enter a parse tree produced by EParser#category_or_any_type.
EParserListener.prototype.enterCategory_or_any_type = function(ctx) {
};
// Exit a parse tree produced by EParser#category_or_any_type.
EParserListener.prototype.exitCategory_or_any_type = function(ctx) {
};
// Enter a parse tree produced by EParser#AnyListType.
EParserListener.prototype.enterAnyListType = function(ctx) {
};
// Exit a parse tree produced by EParser#AnyListType.
EParserListener.prototype.exitAnyListType = function(ctx) {
};
// Enter a parse tree produced by EParser#AnyType.
EParserListener.prototype.enterAnyType = function(ctx) {
};
// Exit a parse tree produced by EParser#AnyType.
EParserListener.prototype.exitAnyType = function(ctx) {
};
// Enter a parse tree produced by EParser#AnyDictType.
EParserListener.prototype.enterAnyDictType = function(ctx) {
};
// Exit a parse tree produced by EParser#AnyDictType.
EParserListener.prototype.exitAnyDictType = function(ctx) {
};
// Enter a parse tree produced by EParser#member_method_declaration_list.
EParserListener.prototype.enterMember_method_declaration_list = function(ctx) {
};
// Exit a parse tree produced by EParser#member_method_declaration_list.
EParserListener.prototype.exitMember_method_declaration_list = function(ctx) {
};
// Enter a parse tree produced by EParser#member_method_declaration.
EParserListener.prototype.enterMember_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#member_method_declaration.
EParserListener.prototype.exitMember_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#native_member_method_declaration_list.
EParserListener.prototype.enterNative_member_method_declaration_list = function(ctx) {
};
// Exit a parse tree produced by EParser#native_member_method_declaration_list.
EParserListener.prototype.exitNative_member_method_declaration_list = function(ctx) {
};
// Enter a parse tree produced by EParser#native_member_method_declaration.
EParserListener.prototype.enterNative_member_method_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#native_member_method_declaration.
EParserListener.prototype.exitNative_member_method_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaCategoryBinding.
EParserListener.prototype.enterJavaCategoryBinding = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaCategoryBinding.
EParserListener.prototype.exitJavaCategoryBinding = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpCategoryBinding.
EParserListener.prototype.enterCSharpCategoryBinding = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpCategoryBinding.
EParserListener.prototype.exitCSharpCategoryBinding = function(ctx) {
};
// Enter a parse tree produced by EParser#Python2CategoryBinding.
EParserListener.prototype.enterPython2CategoryBinding = function(ctx) {
};
// Exit a parse tree produced by EParser#Python2CategoryBinding.
EParserListener.prototype.exitPython2CategoryBinding = function(ctx) {
};
// Enter a parse tree produced by EParser#Python3CategoryBinding.
EParserListener.prototype.enterPython3CategoryBinding = function(ctx) {
};
// Exit a parse tree produced by EParser#Python3CategoryBinding.
EParserListener.prototype.exitPython3CategoryBinding = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaScriptCategoryBinding.
EParserListener.prototype.enterJavaScriptCategoryBinding = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaScriptCategoryBinding.
EParserListener.prototype.exitJavaScriptCategoryBinding = function(ctx) {
};
// Enter a parse tree produced by EParser#python_category_binding.
EParserListener.prototype.enterPython_category_binding = function(ctx) {
};
// Exit a parse tree produced by EParser#python_category_binding.
EParserListener.prototype.exitPython_category_binding = function(ctx) {
};
// Enter a parse tree produced by EParser#python_module.
EParserListener.prototype.enterPython_module = function(ctx) {
};
// Exit a parse tree produced by EParser#python_module.
EParserListener.prototype.exitPython_module = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_category_binding.
EParserListener.prototype.enterJavascript_category_binding = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_category_binding.
EParserListener.prototype.exitJavascript_category_binding = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_module.
EParserListener.prototype.enterJavascript_module = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_module.
EParserListener.prototype.exitJavascript_module = function(ctx) {
};
// Enter a parse tree produced by EParser#variable_identifier_list.
EParserListener.prototype.enterVariable_identifier_list = function(ctx) {
};
// Exit a parse tree produced by EParser#variable_identifier_list.
EParserListener.prototype.exitVariable_identifier_list = function(ctx) {
};
// Enter a parse tree produced by EParser#attribute_identifier_list.
EParserListener.prototype.enterAttribute_identifier_list = function(ctx) {
};
// Exit a parse tree produced by EParser#attribute_identifier_list.
EParserListener.prototype.exitAttribute_identifier_list = function(ctx) {
};
// Enter a parse tree produced by EParser#method_declaration.
EParserListener.prototype.enterMethod_declaration = function(ctx) {
};
// Exit a parse tree produced by EParser#method_declaration.
EParserListener.prototype.exitMethod_declaration = function(ctx) {
};
// Enter a parse tree produced by EParser#comment_statement.
EParserListener.prototype.enterComment_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#comment_statement.
EParserListener.prototype.exitComment_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#native_statement_list.
EParserListener.prototype.enterNative_statement_list = function(ctx) {
};
// Exit a parse tree produced by EParser#native_statement_list.
EParserListener.prototype.exitNative_statement_list = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaNativeStatement.
EParserListener.prototype.enterJavaNativeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaNativeStatement.
EParserListener.prototype.exitJavaNativeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpNativeStatement.
EParserListener.prototype.enterCSharpNativeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpNativeStatement.
EParserListener.prototype.exitCSharpNativeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#Python2NativeStatement.
EParserListener.prototype.enterPython2NativeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#Python2NativeStatement.
EParserListener.prototype.exitPython2NativeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#Python3NativeStatement.
EParserListener.prototype.enterPython3NativeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#Python3NativeStatement.
EParserListener.prototype.exitPython3NativeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaScriptNativeStatement.
EParserListener.prototype.enterJavaScriptNativeStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaScriptNativeStatement.
EParserListener.prototype.exitJavaScriptNativeStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#python_native_statement.
EParserListener.prototype.enterPython_native_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#python_native_statement.
EParserListener.prototype.exitPython_native_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_native_statement.
EParserListener.prototype.enterJavascript_native_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_native_statement.
EParserListener.prototype.exitJavascript_native_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#statement_list.
EParserListener.prototype.enterStatement_list = function(ctx) {
};
// Exit a parse tree produced by EParser#statement_list.
EParserListener.prototype.exitStatement_list = function(ctx) {
};
// Enter a parse tree produced by EParser#assertion_list.
EParserListener.prototype.enterAssertion_list = function(ctx) {
};
// Exit a parse tree produced by EParser#assertion_list.
EParserListener.prototype.exitAssertion_list = function(ctx) {
};
// Enter a parse tree produced by EParser#switch_case_statement_list.
EParserListener.prototype.enterSwitch_case_statement_list = function(ctx) {
};
// Exit a parse tree produced by EParser#switch_case_statement_list.
EParserListener.prototype.exitSwitch_case_statement_list = function(ctx) {
};
// Enter a parse tree produced by EParser#catch_statement_list.
EParserListener.prototype.enterCatch_statement_list = function(ctx) {
};
// Exit a parse tree produced by EParser#catch_statement_list.
EParserListener.prototype.exitCatch_statement_list = function(ctx) {
};
// Enter a parse tree produced by EParser#LiteralRangeLiteral.
EParserListener.prototype.enterLiteralRangeLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#LiteralRangeLiteral.
EParserListener.prototype.exitLiteralRangeLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#LiteralListLiteral.
EParserListener.prototype.enterLiteralListLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#LiteralListLiteral.
EParserListener.prototype.exitLiteralListLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#LiteralSetLiteral.
EParserListener.prototype.enterLiteralSetLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#LiteralSetLiteral.
EParserListener.prototype.exitLiteralSetLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#MinIntegerLiteral.
EParserListener.prototype.enterMinIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#MinIntegerLiteral.
EParserListener.prototype.exitMinIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#MaxIntegerLiteral.
EParserListener.prototype.enterMaxIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#MaxIntegerLiteral.
EParserListener.prototype.exitMaxIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#IntegerLiteral.
EParserListener.prototype.enterIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#IntegerLiteral.
EParserListener.prototype.exitIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#HexadecimalLiteral.
EParserListener.prototype.enterHexadecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#HexadecimalLiteral.
EParserListener.prototype.exitHexadecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#CharacterLiteral.
EParserListener.prototype.enterCharacterLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CharacterLiteral.
EParserListener.prototype.exitCharacterLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#DateLiteral.
EParserListener.prototype.enterDateLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#DateLiteral.
EParserListener.prototype.exitDateLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#TimeLiteral.
EParserListener.prototype.enterTimeLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#TimeLiteral.
EParserListener.prototype.exitTimeLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#TextLiteral.
EParserListener.prototype.enterTextLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#TextLiteral.
EParserListener.prototype.exitTextLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#DecimalLiteral.
EParserListener.prototype.enterDecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#DecimalLiteral.
EParserListener.prototype.exitDecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#DateTimeLiteral.
EParserListener.prototype.enterDateTimeLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#DateTimeLiteral.
EParserListener.prototype.exitDateTimeLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#BooleanLiteral.
EParserListener.prototype.enterBooleanLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#BooleanLiteral.
EParserListener.prototype.exitBooleanLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#PeriodLiteral.
EParserListener.prototype.enterPeriodLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PeriodLiteral.
EParserListener.prototype.exitPeriodLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#UUIDLiteral.
EParserListener.prototype.enterUUIDLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#UUIDLiteral.
EParserListener.prototype.exitUUIDLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#NullLiteral.
EParserListener.prototype.enterNullLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#NullLiteral.
EParserListener.prototype.exitNullLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#literal_list_literal.
EParserListener.prototype.enterLiteral_list_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#literal_list_literal.
EParserListener.prototype.exitLiteral_list_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#ParenthesisExpression.
EParserListener.prototype.enterParenthesisExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ParenthesisExpression.
EParserListener.prototype.exitParenthesisExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#LiteralExpression.
EParserListener.prototype.enterLiteralExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#LiteralExpression.
EParserListener.prototype.exitLiteralExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#IdentifierExpression.
EParserListener.prototype.enterIdentifierExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IdentifierExpression.
EParserListener.prototype.exitIdentifierExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#ThisExpression.
EParserListener.prototype.enterThisExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#ThisExpression.
EParserListener.prototype.exitThisExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#this_expression.
EParserListener.prototype.enterThis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#this_expression.
EParserListener.prototype.exitThis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#parenthesis_expression.
EParserListener.prototype.enterParenthesis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#parenthesis_expression.
EParserListener.prototype.exitParenthesis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#literal_expression.
EParserListener.prototype.enterLiteral_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#literal_expression.
EParserListener.prototype.exitLiteral_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#collection_literal.
EParserListener.prototype.enterCollection_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#collection_literal.
EParserListener.prototype.exitCollection_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#tuple_literal.
EParserListener.prototype.enterTuple_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#tuple_literal.
EParserListener.prototype.exitTuple_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#dict_literal.
EParserListener.prototype.enterDict_literal = function(ctx) {
};
// Exit a parse tree produced by EParser#dict_literal.
EParserListener.prototype.exitDict_literal = function(ctx) {
};
// Enter a parse tree produced by EParser#expression_tuple.
EParserListener.prototype.enterExpression_tuple = function(ctx) {
};
// Exit a parse tree produced by EParser#expression_tuple.
EParserListener.prototype.exitExpression_tuple = function(ctx) {
};
// Enter a parse tree produced by EParser#dict_entry_list.
EParserListener.prototype.enterDict_entry_list = function(ctx) {
};
// Exit a parse tree produced by EParser#dict_entry_list.
EParserListener.prototype.exitDict_entry_list = function(ctx) {
};
// Enter a parse tree produced by EParser#dict_entry.
EParserListener.prototype.enterDict_entry = function(ctx) {
};
// Exit a parse tree produced by EParser#dict_entry.
EParserListener.prototype.exitDict_entry = function(ctx) {
};
// Enter a parse tree produced by EParser#SliceFirstAndLast.
EParserListener.prototype.enterSliceFirstAndLast = function(ctx) {
};
// Exit a parse tree produced by EParser#SliceFirstAndLast.
EParserListener.prototype.exitSliceFirstAndLast = function(ctx) {
};
// Enter a parse tree produced by EParser#SliceFirstOnly.
EParserListener.prototype.enterSliceFirstOnly = function(ctx) {
};
// Exit a parse tree produced by EParser#SliceFirstOnly.
EParserListener.prototype.exitSliceFirstOnly = function(ctx) {
};
// Enter a parse tree produced by EParser#SliceLastOnly.
EParserListener.prototype.enterSliceLastOnly = function(ctx) {
};
// Exit a parse tree produced by EParser#SliceLastOnly.
EParserListener.prototype.exitSliceLastOnly = function(ctx) {
};
// Enter a parse tree produced by EParser#assign_variable_statement.
EParserListener.prototype.enterAssign_variable_statement = function(ctx) {
};
// Exit a parse tree produced by EParser#assign_variable_statement.
EParserListener.prototype.exitAssign_variable_statement = function(ctx) {
};
// Enter a parse tree produced by EParser#ChildInstance.
EParserListener.prototype.enterChildInstance = function(ctx) {
};
// Exit a parse tree produced by EParser#ChildInstance.
EParserListener.prototype.exitChildInstance = function(ctx) {
};
// Enter a parse tree produced by EParser#RootInstance.
EParserListener.prototype.enterRootInstance = function(ctx) {
};
// Exit a parse tree produced by EParser#RootInstance.
EParserListener.prototype.exitRootInstance = function(ctx) {
};
// Enter a parse tree produced by EParser#IsATypeExpression.
EParserListener.prototype.enterIsATypeExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IsATypeExpression.
EParserListener.prototype.exitIsATypeExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#IsOtherExpression.
EParserListener.prototype.enterIsOtherExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#IsOtherExpression.
EParserListener.prototype.exitIsOtherExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#read_all_expression.
EParserListener.prototype.enterRead_all_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#read_all_expression.
EParserListener.prototype.exitRead_all_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#read_one_expression.
EParserListener.prototype.enterRead_one_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#read_one_expression.
EParserListener.prototype.exitRead_one_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#order_by_list.
EParserListener.prototype.enterOrder_by_list = function(ctx) {
};
// Exit a parse tree produced by EParser#order_by_list.
EParserListener.prototype.exitOrder_by_list = function(ctx) {
};
// Enter a parse tree produced by EParser#order_by.
EParserListener.prototype.enterOrder_by = function(ctx) {
};
// Exit a parse tree produced by EParser#order_by.
EParserListener.prototype.exitOrder_by = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorPlus.
EParserListener.prototype.enterOperatorPlus = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorPlus.
EParserListener.prototype.exitOperatorPlus = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorMinus.
EParserListener.prototype.enterOperatorMinus = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorMinus.
EParserListener.prototype.exitOperatorMinus = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorMultiply.
EParserListener.prototype.enterOperatorMultiply = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorMultiply.
EParserListener.prototype.exitOperatorMultiply = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorDivide.
EParserListener.prototype.enterOperatorDivide = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorDivide.
EParserListener.prototype.exitOperatorDivide = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorIDivide.
EParserListener.prototype.enterOperatorIDivide = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorIDivide.
EParserListener.prototype.exitOperatorIDivide = function(ctx) {
};
// Enter a parse tree produced by EParser#OperatorModulo.
EParserListener.prototype.enterOperatorModulo = function(ctx) {
};
// Exit a parse tree produced by EParser#OperatorModulo.
EParserListener.prototype.exitOperatorModulo = function(ctx) {
};
// Enter a parse tree produced by EParser#new_token.
EParserListener.prototype.enterNew_token = function(ctx) {
};
// Exit a parse tree produced by EParser#new_token.
EParserListener.prototype.exitNew_token = function(ctx) {
};
// Enter a parse tree produced by EParser#key_token.
EParserListener.prototype.enterKey_token = function(ctx) {
};
// Exit a parse tree produced by EParser#key_token.
EParserListener.prototype.exitKey_token = function(ctx) {
};
// Enter a parse tree produced by EParser#module_token.
EParserListener.prototype.enterModule_token = function(ctx) {
};
// Exit a parse tree produced by EParser#module_token.
EParserListener.prototype.exitModule_token = function(ctx) {
};
// Enter a parse tree produced by EParser#value_token.
EParserListener.prototype.enterValue_token = function(ctx) {
};
// Exit a parse tree produced by EParser#value_token.
EParserListener.prototype.exitValue_token = function(ctx) {
};
// Enter a parse tree produced by EParser#symbols_token.
EParserListener.prototype.enterSymbols_token = function(ctx) {
};
// Exit a parse tree produced by EParser#symbols_token.
EParserListener.prototype.exitSymbols_token = function(ctx) {
};
// Enter a parse tree produced by EParser#assign.
EParserListener.prototype.enterAssign = function(ctx) {
};
// Exit a parse tree produced by EParser#assign.
EParserListener.prototype.exitAssign = function(ctx) {
};
// Enter a parse tree produced by EParser#multiply.
EParserListener.prototype.enterMultiply = function(ctx) {
};
// Exit a parse tree produced by EParser#multiply.
EParserListener.prototype.exitMultiply = function(ctx) {
};
// Enter a parse tree produced by EParser#divide.
EParserListener.prototype.enterDivide = function(ctx) {
};
// Exit a parse tree produced by EParser#divide.
EParserListener.prototype.exitDivide = function(ctx) {
};
// Enter a parse tree produced by EParser#idivide.
EParserListener.prototype.enterIdivide = function(ctx) {
};
// Exit a parse tree produced by EParser#idivide.
EParserListener.prototype.exitIdivide = function(ctx) {
};
// Enter a parse tree produced by EParser#modulo.
EParserListener.prototype.enterModulo = function(ctx) {
};
// Exit a parse tree produced by EParser#modulo.
EParserListener.prototype.exitModulo = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptReturnStatement.
EParserListener.prototype.enterJavascriptReturnStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptReturnStatement.
EParserListener.prototype.exitJavascriptReturnStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptStatement.
EParserListener.prototype.enterJavascriptStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptStatement.
EParserListener.prototype.exitJavascriptStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptSelectorExpression.
EParserListener.prototype.enterJavascriptSelectorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptSelectorExpression.
EParserListener.prototype.exitJavascriptSelectorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptPrimaryExpression.
EParserListener.prototype.enterJavascriptPrimaryExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptPrimaryExpression.
EParserListener.prototype.exitJavascriptPrimaryExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_primary_expression.
EParserListener.prototype.enterJavascript_primary_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_primary_expression.
EParserListener.prototype.exitJavascript_primary_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_this_expression.
EParserListener.prototype.enterJavascript_this_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_this_expression.
EParserListener.prototype.exitJavascript_this_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_new_expression.
EParserListener.prototype.enterJavascript_new_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_new_expression.
EParserListener.prototype.exitJavascript_new_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaScriptMethodExpression.
EParserListener.prototype.enterJavaScriptMethodExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaScriptMethodExpression.
EParserListener.prototype.exitJavaScriptMethodExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaScriptMemberExpression.
EParserListener.prototype.enterJavaScriptMemberExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaScriptMemberExpression.
EParserListener.prototype.exitJavaScriptMemberExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaScriptItemExpression.
EParserListener.prototype.enterJavaScriptItemExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaScriptItemExpression.
EParserListener.prototype.exitJavaScriptItemExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_method_expression.
EParserListener.prototype.enterJavascript_method_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_method_expression.
EParserListener.prototype.exitJavascript_method_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptArgumentList.
EParserListener.prototype.enterJavascriptArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptArgumentList.
EParserListener.prototype.exitJavascriptArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptArgumentListItem.
EParserListener.prototype.enterJavascriptArgumentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptArgumentListItem.
EParserListener.prototype.exitJavascriptArgumentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_item_expression.
EParserListener.prototype.enterJavascript_item_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_item_expression.
EParserListener.prototype.exitJavascript_item_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_parenthesis_expression.
EParserListener.prototype.enterJavascript_parenthesis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_parenthesis_expression.
EParserListener.prototype.exitJavascript_parenthesis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_identifier_expression.
EParserListener.prototype.enterJavascript_identifier_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_identifier_expression.
EParserListener.prototype.exitJavascript_identifier_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptIntegerLiteral.
EParserListener.prototype.enterJavascriptIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptIntegerLiteral.
EParserListener.prototype.exitJavascriptIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptDecimalLiteral.
EParserListener.prototype.enterJavascriptDecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptDecimalLiteral.
EParserListener.prototype.exitJavascriptDecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptTextLiteral.
EParserListener.prototype.enterJavascriptTextLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptTextLiteral.
EParserListener.prototype.exitJavascriptTextLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptBooleanLiteral.
EParserListener.prototype.enterJavascriptBooleanLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptBooleanLiteral.
EParserListener.prototype.exitJavascriptBooleanLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavascriptCharacterLiteral.
EParserListener.prototype.enterJavascriptCharacterLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavascriptCharacterLiteral.
EParserListener.prototype.exitJavascriptCharacterLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#javascript_identifier.
EParserListener.prototype.enterJavascript_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#javascript_identifier.
EParserListener.prototype.exitJavascript_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonReturnStatement.
EParserListener.prototype.enterPythonReturnStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonReturnStatement.
EParserListener.prototype.exitPythonReturnStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonStatement.
EParserListener.prototype.enterPythonStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonStatement.
EParserListener.prototype.exitPythonStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonSelectorExpression.
EParserListener.prototype.enterPythonSelectorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonSelectorExpression.
EParserListener.prototype.exitPythonSelectorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonPrimaryExpression.
EParserListener.prototype.enterPythonPrimaryExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonPrimaryExpression.
EParserListener.prototype.exitPythonPrimaryExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonParenthesisExpression.
EParserListener.prototype.enterPythonParenthesisExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonParenthesisExpression.
EParserListener.prototype.exitPythonParenthesisExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonIdentifierExpression.
EParserListener.prototype.enterPythonIdentifierExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonIdentifierExpression.
EParserListener.prototype.exitPythonIdentifierExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonLiteralExpression.
EParserListener.prototype.enterPythonLiteralExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonLiteralExpression.
EParserListener.prototype.exitPythonLiteralExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonGlobalMethodExpression.
EParserListener.prototype.enterPythonGlobalMethodExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonGlobalMethodExpression.
EParserListener.prototype.exitPythonGlobalMethodExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonMethodExpression.
EParserListener.prototype.enterPythonMethodExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonMethodExpression.
EParserListener.prototype.exitPythonMethodExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonItemExpression.
EParserListener.prototype.enterPythonItemExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonItemExpression.
EParserListener.prototype.exitPythonItemExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#python_method_expression.
EParserListener.prototype.enterPython_method_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#python_method_expression.
EParserListener.prototype.exitPython_method_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonOrdinalOnlyArgumentList.
EParserListener.prototype.enterPythonOrdinalOnlyArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonOrdinalOnlyArgumentList.
EParserListener.prototype.exitPythonOrdinalOnlyArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonNamedOnlyArgumentList.
EParserListener.prototype.enterPythonNamedOnlyArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonNamedOnlyArgumentList.
EParserListener.prototype.exitPythonNamedOnlyArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonArgumentList.
EParserListener.prototype.enterPythonArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonArgumentList.
EParserListener.prototype.exitPythonArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonOrdinalArgumentList.
EParserListener.prototype.enterPythonOrdinalArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonOrdinalArgumentList.
EParserListener.prototype.exitPythonOrdinalArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonOrdinalArgumentListItem.
EParserListener.prototype.enterPythonOrdinalArgumentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonOrdinalArgumentListItem.
EParserListener.prototype.exitPythonOrdinalArgumentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonNamedArgumentList.
EParserListener.prototype.enterPythonNamedArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonNamedArgumentList.
EParserListener.prototype.exitPythonNamedArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonNamedArgumentListItem.
EParserListener.prototype.enterPythonNamedArgumentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonNamedArgumentListItem.
EParserListener.prototype.exitPythonNamedArgumentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#python_parenthesis_expression.
EParserListener.prototype.enterPython_parenthesis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#python_parenthesis_expression.
EParserListener.prototype.exitPython_parenthesis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonChildIdentifier.
EParserListener.prototype.enterPythonChildIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonChildIdentifier.
EParserListener.prototype.exitPythonChildIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonPromptoIdentifier.
EParserListener.prototype.enterPythonPromptoIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonPromptoIdentifier.
EParserListener.prototype.exitPythonPromptoIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonIdentifier.
EParserListener.prototype.enterPythonIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonIdentifier.
EParserListener.prototype.exitPythonIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonIntegerLiteral.
EParserListener.prototype.enterPythonIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonIntegerLiteral.
EParserListener.prototype.exitPythonIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonDecimalLiteral.
EParserListener.prototype.enterPythonDecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonDecimalLiteral.
EParserListener.prototype.exitPythonDecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonTextLiteral.
EParserListener.prototype.enterPythonTextLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonTextLiteral.
EParserListener.prototype.exitPythonTextLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonBooleanLiteral.
EParserListener.prototype.enterPythonBooleanLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonBooleanLiteral.
EParserListener.prototype.exitPythonBooleanLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#PythonCharacterLiteral.
EParserListener.prototype.enterPythonCharacterLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#PythonCharacterLiteral.
EParserListener.prototype.exitPythonCharacterLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#python_identifier.
EParserListener.prototype.enterPython_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#python_identifier.
EParserListener.prototype.exitPython_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaReturnStatement.
EParserListener.prototype.enterJavaReturnStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaReturnStatement.
EParserListener.prototype.exitJavaReturnStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaStatement.
EParserListener.prototype.enterJavaStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaStatement.
EParserListener.prototype.exitJavaStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaSelectorExpression.
EParserListener.prototype.enterJavaSelectorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaSelectorExpression.
EParserListener.prototype.exitJavaSelectorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaPrimaryExpression.
EParserListener.prototype.enterJavaPrimaryExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaPrimaryExpression.
EParserListener.prototype.exitJavaPrimaryExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#java_primary_expression.
EParserListener.prototype.enterJava_primary_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_primary_expression.
EParserListener.prototype.exitJava_primary_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#java_this_expression.
EParserListener.prototype.enterJava_this_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_this_expression.
EParserListener.prototype.exitJava_this_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#java_new_expression.
EParserListener.prototype.enterJava_new_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_new_expression.
EParserListener.prototype.exitJava_new_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaMethodExpression.
EParserListener.prototype.enterJavaMethodExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaMethodExpression.
EParserListener.prototype.exitJavaMethodExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaItemExpression.
EParserListener.prototype.enterJavaItemExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaItemExpression.
EParserListener.prototype.exitJavaItemExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#java_method_expression.
EParserListener.prototype.enterJava_method_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_method_expression.
EParserListener.prototype.exitJava_method_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaArgumentListItem.
EParserListener.prototype.enterJavaArgumentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaArgumentListItem.
EParserListener.prototype.exitJavaArgumentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaArgumentList.
EParserListener.prototype.enterJavaArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaArgumentList.
EParserListener.prototype.exitJavaArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#java_item_expression.
EParserListener.prototype.enterJava_item_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_item_expression.
EParserListener.prototype.exitJava_item_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#java_parenthesis_expression.
EParserListener.prototype.enterJava_parenthesis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#java_parenthesis_expression.
EParserListener.prototype.exitJava_parenthesis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaIdentifier.
EParserListener.prototype.enterJavaIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaIdentifier.
EParserListener.prototype.exitJavaIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaChildIdentifier.
EParserListener.prototype.enterJavaChildIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaChildIdentifier.
EParserListener.prototype.exitJavaChildIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaClassIdentifier.
EParserListener.prototype.enterJavaClassIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaClassIdentifier.
EParserListener.prototype.exitJavaClassIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaChildClassIdentifier.
EParserListener.prototype.enterJavaChildClassIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaChildClassIdentifier.
EParserListener.prototype.exitJavaChildClassIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaIntegerLiteral.
EParserListener.prototype.enterJavaIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaIntegerLiteral.
EParserListener.prototype.exitJavaIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaDecimalLiteral.
EParserListener.prototype.enterJavaDecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaDecimalLiteral.
EParserListener.prototype.exitJavaDecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaTextLiteral.
EParserListener.prototype.enterJavaTextLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaTextLiteral.
EParserListener.prototype.exitJavaTextLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaBooleanLiteral.
EParserListener.prototype.enterJavaBooleanLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaBooleanLiteral.
EParserListener.prototype.exitJavaBooleanLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#JavaCharacterLiteral.
EParserListener.prototype.enterJavaCharacterLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#JavaCharacterLiteral.
EParserListener.prototype.exitJavaCharacterLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#java_identifier.
EParserListener.prototype.enterJava_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#java_identifier.
EParserListener.prototype.exitJava_identifier = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpReturnStatement.
EParserListener.prototype.enterCSharpReturnStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpReturnStatement.
EParserListener.prototype.exitCSharpReturnStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpStatement.
EParserListener.prototype.enterCSharpStatement = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpStatement.
EParserListener.prototype.exitCSharpStatement = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpSelectorExpression.
EParserListener.prototype.enterCSharpSelectorExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpSelectorExpression.
EParserListener.prototype.exitCSharpSelectorExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpPrimaryExpression.
EParserListener.prototype.enterCSharpPrimaryExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpPrimaryExpression.
EParserListener.prototype.exitCSharpPrimaryExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_primary_expression.
EParserListener.prototype.enterCsharp_primary_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_primary_expression.
EParserListener.prototype.exitCsharp_primary_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_this_expression.
EParserListener.prototype.enterCsharp_this_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_this_expression.
EParserListener.prototype.exitCsharp_this_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_new_expression.
EParserListener.prototype.enterCsharp_new_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_new_expression.
EParserListener.prototype.exitCsharp_new_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpMethodExpression.
EParserListener.prototype.enterCSharpMethodExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpMethodExpression.
EParserListener.prototype.exitCSharpMethodExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpItemExpression.
EParserListener.prototype.enterCSharpItemExpression = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpItemExpression.
EParserListener.prototype.exitCSharpItemExpression = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_method_expression.
EParserListener.prototype.enterCsharp_method_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_method_expression.
EParserListener.prototype.exitCsharp_method_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpArgumentList.
EParserListener.prototype.enterCSharpArgumentList = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpArgumentList.
EParserListener.prototype.exitCSharpArgumentList = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpArgumentListItem.
EParserListener.prototype.enterCSharpArgumentListItem = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpArgumentListItem.
EParserListener.prototype.exitCSharpArgumentListItem = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_item_expression.
EParserListener.prototype.enterCsharp_item_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_item_expression.
EParserListener.prototype.exitCsharp_item_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_parenthesis_expression.
EParserListener.prototype.enterCsharp_parenthesis_expression = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_parenthesis_expression.
EParserListener.prototype.exitCsharp_parenthesis_expression = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpIdentifier.
EParserListener.prototype.enterCSharpIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpIdentifier.
EParserListener.prototype.exitCSharpIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpChildIdentifier.
EParserListener.prototype.enterCSharpChildIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpChildIdentifier.
EParserListener.prototype.exitCSharpChildIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpPromptoIdentifier.
EParserListener.prototype.enterCSharpPromptoIdentifier = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpPromptoIdentifier.
EParserListener.prototype.exitCSharpPromptoIdentifier = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpIntegerLiteral.
EParserListener.prototype.enterCSharpIntegerLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpIntegerLiteral.
EParserListener.prototype.exitCSharpIntegerLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpDecimalLiteral.
EParserListener.prototype.enterCSharpDecimalLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpDecimalLiteral.
EParserListener.prototype.exitCSharpDecimalLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpTextLiteral.
EParserListener.prototype.enterCSharpTextLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpTextLiteral.
EParserListener.prototype.exitCSharpTextLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpBooleanLiteral.
EParserListener.prototype.enterCSharpBooleanLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpBooleanLiteral.
EParserListener.prototype.exitCSharpBooleanLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#CSharpCharacterLiteral.
EParserListener.prototype.enterCSharpCharacterLiteral = function(ctx) {
};
// Exit a parse tree produced by EParser#CSharpCharacterLiteral.
EParserListener.prototype.exitCSharpCharacterLiteral = function(ctx) {
};
// Enter a parse tree produced by EParser#csharp_identifier.
EParserListener.prototype.enterCsharp_identifier = function(ctx) {
};
// Exit a parse tree produced by EParser#csharp_identifier.
EParserListener.prototype.exitCsharp_identifier = function(ctx) {
};
exports.EParserListener = EParserListener;
/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {
var Parser = __webpack_require__(1).Parser;
function AbstractParser(input) {
Parser.call(this, input);
return this;
}
AbstractParser.prototype = Object.create(Parser.prototype);
AbstractParser.prototype.constructor = AbstractParser;
AbstractParser.prototype.isText = function(token, text) {
return text === token.text;
};
AbstractParser.prototype.was = function(type) {
return this.lastHiddenTokenType()===type;
};
AbstractParser.prototype.wasNot = function(type) {
return this.lastHiddenTokenType()!==type;
};
AbstractParser.prototype.willBe = function(type) {
return this.getTokenStream().LA(1)===type;
};
AbstractParser.prototype.willNotBe = function(type) {
return this.getTokenStream().LA(1)!==type;
};
AbstractParser.prototype.nextHiddenTokenType = function() {
var bts = this.getTokenStream();
var hidden = bts.getHiddenTokensToRight(bts.index-1);
if(hidden===null || hidden.length===0) {
return 0;
} else {
return hidden[0].type;
}
};
AbstractParser.prototype.willBeAOrAn = function() {
return this.willBeText("a") || this.willBeText("an");
};
AbstractParser.prototype.willBeText = function(text) {
return text===this.getTokenStream().LT(1).text;
};
AbstractParser.prototype.lastHiddenTokenType = function() {
var bts = this.getTokenStream();
var hidden = bts.getHiddenTokensToLeft(bts.index);
if(hidden===null || hidden.length===0) {
return 0;
} else {
return hidden[hidden.length-1].type;
}
};
AbstractParser.prototype.removeErrorListeners = function() {
Parser.prototype.removeErrorListeners.call(this);
this._input.tokenSource.removeErrorListeners(); // lexer
};
AbstractParser.prototype.addErrorListener = function(listener) {
Parser.prototype.addErrorListener.call(this, listener);
this._input.tokenSource.addErrorListener(listener); // lexer
};
exports.AbstractParser = AbstractParser;
/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {
var argument = __webpack_require__(107);
var constraint = __webpack_require__(120);
var instance = __webpack_require__(147);
var declaration = __webpack_require__(155);
var expression = __webpack_require__(180);
var javascript = __webpack_require__(355);
var statement = __webpack_require__(393);
var literal = __webpack_require__(423);
var grammar = __webpack_require__(444);
var value = __webpack_require__(452);
var utils = __webpack_require__(47);
var parser = __webpack_require__(455);
var type = __webpack_require__(358);
var java = __webpack_require__(464);
var csharp = __webpack_require__(481);
var python = __webpack_require__(497);
function EPromptoBuilder(eparser) {
parser.EParserListener.call(this);
this.input = eparser.getTokenStream();
this.path = eparser.path;
this.nodeValues = {};
this.nextNodeId = 0;
return this;
}
EPromptoBuilder.prototype = Object.create(parser.EParserListener.prototype);
EPromptoBuilder.prototype.constructor = EPromptoBuilder;
EPromptoBuilder.prototype.setNodeValue = function(node, value) {
if(node["%id"]===undefined)
node["%id"] = this.nextNodeId++;
this.nodeValues[node["%id"]] = value;
if(value instanceof parser.Section) {
this.buildSection(node, value);
}
};
EPromptoBuilder.prototype.getNodeValue = function(node) {
if(node==null || node===undefined || node["%id"]===null || node["%id"]===undefined)
return null;
else
return this.nodeValues[node["%id"]];
};
EPromptoBuilder.prototype.exitIdentifierExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.UnresolvedIdentifier(exp));
};
EPromptoBuilder.prototype.exitTypeIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.type_identifier());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitMethodCallExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var args = this.getNodeValue(ctx.args);
var call = new statement.UnresolvedCall(exp,args);
this.setNodeValue(ctx, call);
};
EPromptoBuilder.prototype.exitUnresolvedExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitUnresolvedIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new expression.UnresolvedIdentifier(name));
};
EPromptoBuilder.prototype.exitUnresolvedSelector = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var selector = this.getNodeValue(ctx.selector);
selector.parent = parent;
this.setNodeValue(ctx, selector);
};
EPromptoBuilder.prototype.exitUnresolved_selector = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new expression.MemberSelector(null, name));
};
EPromptoBuilder.prototype.exitUUIDLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.UUIDLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitUUIDType = function(ctx) {
this.setNodeValue(ctx, type.UUIDType.instance);
};
EPromptoBuilder.prototype.exitCommentStatement = function(ctx) {
this.setNodeValue(ctx, this.getNodeValue(ctx.comment_statement()));
};
EPromptoBuilder.prototype.exitComment_statement = function(ctx) {
this.setNodeValue(ctx, new statement.CommentStatement(ctx.getText()));
};
EPromptoBuilder.prototype.exitBlob_expression = function(ctx) {
var exp = this.getNodeValue(ctx.expression());
this.setNodeValue(ctx, new expression.BlobExpression(exp));
};
EPromptoBuilder.prototype.exitBlobExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitBlobType = function(ctx) {
this.setNodeValue(ctx, type.BlobType.instance);
};
EPromptoBuilder.prototype.exitBooleanLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.BooleanLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitBreakStatement = function(ctx) {
this.setNodeValue(ctx, new statement.BreakStatement());
};
EPromptoBuilder.prototype.exitMinIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.MinIntegerLiteral());
};
EPromptoBuilder.prototype.exitMaxIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.MaxIntegerLiteral());
};
EPromptoBuilder.prototype.exitIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.IntegerLiteral(ctx.t.text, ctx.t.text));
};
EPromptoBuilder.prototype.exitDecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.DecimalLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitHexadecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.HexaLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitCharacterLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.CharacterLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitDateLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.DateLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitDateTimeLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.DateTimeLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitTernaryExpression = function(ctx) {
var condition = this.getNodeValue(ctx.test);
var ifTrue = this.getNodeValue(ctx.ifTrue);
var ifFalse = this.getNodeValue(ctx.ifFalse);
var exp = new expression.TernaryExpression(condition, ifTrue, ifFalse);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitTest_method_declaration = function(ctx) {
var name = new grammar.Identifier(ctx.name.text);
name.setSectionFrom(this.path, ctx.name, ctx.name, parser.Dialect.E);
var stmts = this.getNodeValue(ctx.stmts);
var exps = this.getNodeValue(ctx.exps);
var errorName = this.getNodeValue(ctx.error);
var error = errorName==null ? null : new expression.SymbolExpression(errorName);
this.setNodeValue(ctx, new declaration.TestMethodDeclaration(name, stmts, exps, error));
};
EPromptoBuilder.prototype.exitTextLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.TextLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitTimeLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.TimeLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitPeriodLiteral = function(ctx) {
this.setNodeValue(ctx, new literal.PeriodLiteral(ctx.t.text));
};
EPromptoBuilder.prototype.exitAttribute_identifier = function(ctx) {
var name = new grammar.Identifier(ctx.getText());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitVariable_identifier = function(ctx) {
var name = new grammar.Identifier(ctx.getText());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitList_literal = function(ctx) {
var mutable = ctx.MUTABLE() !== null;
var items = this.getNodeValue(ctx.expression_list()) || null;
var value = new literal.ListLiteral(mutable, items);
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitDict_literal = function(ctx) {
var mutable = ctx.MUTABLE() !== null;
var items = this.getNodeValue(ctx.dict_entry_list()) || null;
var value = new literal.DictLiteral(mutable, items);
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitTuple_literal = function(ctx) {
var mutable = ctx.MUTABLE() !== null;
var items = this.getNodeValue(ctx.expression_tuple()) || null;
var value = new literal.TupleLiteral(mutable, items);
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitRange_literal = function(ctx) {
var low = this.getNodeValue(ctx.low);
var high = this.getNodeValue(ctx.high);
this.setNodeValue(ctx, new literal.RangeLiteral(low, high));
};
EPromptoBuilder.prototype.exitDict_entry_list = function(ctx) {
var self = this;
var items = new literal.DictEntryList(null, null);
ctx.dict_entry().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
})
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitDict_entry = function(ctx) {
var key = this.getNodeValue(ctx.key);
var value = this.getNodeValue(ctx.value);
var entry = new literal.DictEntry(key, value);
this.setNodeValue(ctx, entry);
};
EPromptoBuilder.prototype.exitLiteral_expression = function(ctx) {
var exp = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitLiteralExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitVariableIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.variable_identifier());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitSymbol_identifier = function(ctx) {
var name = new grammar.Identifier(ctx.getText());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitNative_symbol = function(ctx) {
var name = this.getNodeValue(ctx.name);
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.NativeSymbol(name, exp));
};
EPromptoBuilder.prototype.exitSymbolIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.symbol_identifier());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitBlobType = function(ctx) {
this.setNodeValue(ctx, type.BlobType.instance);
};
EPromptoBuilder.prototype.exitBooleanType = function(ctx) {
this.setNodeValue(ctx, type.BooleanType.instance);
};
EPromptoBuilder.prototype.exitCharacterType = function(ctx) {
this.setNodeValue(ctx, type.CharacterType.instance);
};
EPromptoBuilder.prototype.exitImageType = function(ctx) {
this.setNodeValue(ctx, type.ImageType.instance);
};
EPromptoBuilder.prototype.exitTextType = function(ctx) {
this.setNodeValue(ctx, type.TextType.instance);
};
EPromptoBuilder.prototype.exitThisExpression = function(ctx) {
this.setNodeValue(ctx, new expression.ThisExpression());
};
EPromptoBuilder.prototype.exitIntegerType = function(ctx) {
this.setNodeValue(ctx, type.IntegerType.instance);
};
EPromptoBuilder.prototype.exitDecimalType = function(ctx) {
this.setNodeValue(ctx, type.DecimalType.instance);
};
EPromptoBuilder.prototype.exitDateType = function(ctx) {
this.setNodeValue(ctx, type.DateType.instance);
};
EPromptoBuilder.prototype.exitDateTimeType = function(ctx) {
this.setNodeValue(ctx, type.DateTimeType.instance);
};
EPromptoBuilder.prototype.exitTimeType = function(ctx) {
this.setNodeValue(ctx, type.TimeType.instance);
};
EPromptoBuilder.prototype.exitCodeType = function(ctx) {
this.setNodeValue(ctx, type.CodeType.instance);
};
EPromptoBuilder.prototype.exitPrimaryType = function(ctx) {
var type = this.getNodeValue(ctx.p);
this.setNodeValue(ctx, type);
};
EPromptoBuilder.prototype.exitAttribute_declaration = function(ctx) {
var id = this.getNodeValue(ctx.name);
var type = this.getNodeValue(ctx.typ);
var match = this.getNodeValue(ctx.match);
var indices = null;
if (ctx.indices !=null)
indices = indices = this.getNodeValue(ctx.indices);
else if(ctx.INDEX()!=null)
indices = new grammar.IdentifierList();
if (ctx.index !=null)
indices.push(this.getNodeValue(ctx.index))
var decl = new declaration.AttributeDeclaration(id, type, match, indices);
decl.storable = ctx.STORABLE()!=null;
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitNativeType = function(ctx) {
var type = this.getNodeValue(ctx.n);
this.setNodeValue(ctx, type);
};
EPromptoBuilder.prototype.exitCategoryType = function(ctx) {
var type = this.getNodeValue(ctx.c);
this.setNodeValue(ctx, type);
};
EPromptoBuilder.prototype.exitCategory_type = function(ctx) {
var name = new grammar.Identifier(ctx.getText());
this.buildSection(ctx, name);
this.setNodeValue(ctx, new type.CategoryType(name));
};
EPromptoBuilder.prototype.exitListType = function(ctx) {
var typ = this.getNodeValue(ctx.l);
this.setNodeValue(ctx, new type.ListType(typ));
};
EPromptoBuilder.prototype.exitDictType = function(ctx) {
var typ = this.getNodeValue(ctx.d);
this.setNodeValue(ctx, new type.DictType(typ));
};
EPromptoBuilder.prototype.exitAttributeList = function(ctx) {
var item = this.getNodeValue(ctx.item);
this.setNodeValue(ctx, new grammar.IdentifierList(item));
};
EPromptoBuilder.prototype.exitAttributeListItem = function(ctx) {
var items = this.getNodeValue(ctx.items);
var item = this.getNodeValue(ctx.item);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitAttribute_identifier_list = function(ctx) {
var list = new grammar.IdentifierList();
var rules = ctx.attribute_identifier();
rules.forEach(function(rule) {
var item = this.getNodeValue(rule);
list.add(item);
}, this);
this.setNodeValue(ctx, list);
};
EPromptoBuilder.prototype.exitVariable_identifier_list = function(ctx) {
var list = new grammar.IdentifierList();
var rules = ctx.variable_identifier();
rules.forEach(function(rule) {
var item = this.getNodeValue(rule);
list.add(item);
}, this);
this.setNodeValue(ctx, list);
};
EPromptoBuilder.prototype.exitConcrete_category_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs) || null;
var derived = this.getNodeValue(ctx.derived) || null;
var methods = this.getNodeValue(ctx.methods) || null;
var decl = new declaration.ConcreteCategoryDeclaration(name, attrs, derived, methods);
decl.storable = ctx.STORABLE()!=null;
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitConcreteCategoryDeclaration = function(ctx) {
var decl = this.getNodeValue(ctx.decl);
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitDerivedList = function(ctx) {
var items = this.getNodeValue(ctx.items);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitDerivedListItem = function(ctx) {
var items = this.getNodeValue(ctx.items);
var item = this.getNodeValue(ctx.item);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitType_identifier = function(ctx) {
var name = new grammar.Identifier(ctx.getText());
this.setNodeValue(ctx, name);
};
EPromptoBuilder.prototype.exitType_identifier_list = function(ctx) {
var self = this;
var items = new grammar.IdentifierList();
ctx.type_identifier().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitInstanceExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitSelectableExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
this.setNodeValue(ctx, parent);
};
EPromptoBuilder.prototype.exitSelectorExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var selector = this.getNodeValue(ctx.selector);
selector.parent = parent;
this.setNodeValue(ctx, selector);
};
EPromptoBuilder.prototype.exitSet_literal = function(ctx) {
var items = this.getNodeValue(ctx.expression_list());
var set_ = new literal.SetLiteral(items);
this.setNodeValue(ctx, set_);
};
EPromptoBuilder.prototype.exitStoreStatement = function(ctx) {
this.setNodeValue(ctx, this.getNodeValue(ctx.stmt));
};
EPromptoBuilder.prototype.exitStore_statement = function(ctx) {
var del = this.getNodeValue(ctx.to_del);
var add = this.getNodeValue(ctx.to_add);
var stmt = new statement.StoreStatement(del, add);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitMemberSelector = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new expression.UnresolvedSelector(null, name));
};
EPromptoBuilder.prototype.exitItemSelector = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.ItemSelector(null, exp));
};
EPromptoBuilder.prototype.exitSliceSelector = function(ctx) {
var slice = this.getNodeValue(ctx.xslice);
this.setNodeValue(ctx, slice);
};
EPromptoBuilder.prototype.exitTyped_argument = function(ctx) {
var typ = this.getNodeValue(ctx.typ);
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs);
var arg = attrs ?
new argument.ExtendedArgument(typ, name, attrs) :
new argument.CategoryArgument(typ, name);
var exp = this.getNodeValue(ctx.value);
arg.defaultExpression = exp || null;
this.setNodeValue(ctx, arg);
};
EPromptoBuilder.prototype.exitCodeArgument = function(ctx) {
var arg = this.getNodeValue(ctx.arg);
this.setNodeValue(ctx, arg);
};
EPromptoBuilder.prototype.exitArgument_list = function(ctx) {
var self = this;
var items = new grammar.ArgumentList();
ctx.argument().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitFlush_statement = function(ctx) {
this.setNodeValue(ctx, new statement.FlushStatement());
};
EPromptoBuilder.prototype.exitFlushStatement = function(ctx) {
this.setNodeValue(ctx, this.getNodeValue(ctx.stmt));
};
EPromptoBuilder.prototype.exitFull_argument_list = function(ctx) {
var items = this.getNodeValue(ctx.items);
var item = this.getNodeValue(ctx.item) || null;
if(item!==null) {
items.add(item);
}
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitArgument_assignment = function(ctx) {
var name = this.getNodeValue(ctx.name);
var exp = this.getNodeValue(ctx.exp);
var arg = new argument.UnresolvedArgument(name);
this.setNodeValue(ctx, new grammar.ArgumentAssignment(arg, exp));
};
EPromptoBuilder.prototype.exitArgumentAssignmentListExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var items = this.getNodeValue(ctx.items) || null;
if(items===null) {
items = new grammar.ArgumentAssignmentList();
}
items.insert(0, new grammar.ArgumentAssignment(null, exp));
var item = this.getNodeValue(ctx.item) || null;
if(item!==null) {
items.add(item);
}
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitArgumentAssignmentListNoExpression = function(ctx) {
var items = this.getNodeValue(ctx.items);
var item = this.getNodeValue(ctx.item) || null;
if(item!==null) {
items.add(item);
}
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitArgumentAssignmentList = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = new grammar.ArgumentAssignmentList(null, item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitArgumentAssignmentListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = this.getNodeValue(ctx.items);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitUnresolvedWithArgsStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var args = this.getNodeValue(ctx.args);
var call = new statement.UnresolvedCall(exp, args);
this.setNodeValue(ctx, call);
};
EPromptoBuilder.prototype.exitAddExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
var exp = ctx.op.type===parser.EParser.PLUS ? new expression.PlusExpression(left, right) : new expression.SubtractExpression(left, right);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitMember_method_declaration_list = function(ctx) {
var self = this;
var items = new grammar.MethodDeclarationList();
ctx.member_method_declaration().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitNative_member_method_declaration_list = function(ctx) {
var self = this;
var items = new grammar.MethodDeclarationList();
ctx.native_member_method_declaration().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitGetter_method_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new declaration.GetterMethodDeclaration(name, stmts));
};
EPromptoBuilder.prototype.exitNative_setter_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new declaration.NativeSetterMethodDeclaration(name, stmts));
};
EPromptoBuilder.prototype.exitNative_getter_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new declaration.NativeGetterMethodDeclaration(name, stmts));
};
EPromptoBuilder.prototype.exitSetter_method_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new declaration.SetterMethodDeclaration(name, stmts));
};
EPromptoBuilder.prototype.exitMember_method_declaration = function(ctx) {
var decl = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitStatement_list = function(ctx) {
var self = this;
var items = new statement.StatementList();
ctx.statement().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitAbstract_method_declaration = function(ctx) {
var type = this.getNodeValue(ctx.typ);
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
this.setNodeValue(ctx, new declaration.AbstractMethodDeclaration(name, args, type));
};
EPromptoBuilder.prototype.exitConcrete_method_declaration = function(ctx) {
var type = this.getNodeValue(ctx.typ);
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new declaration.ConcreteMethodDeclaration(name, args, type, stmts));
};
EPromptoBuilder.prototype.exitMethod_declaration = function(ctx) {
var value = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitMethodCallStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitMethod_identifier = function(ctx) {
var value = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitConstructorFrom = function(ctx) {
var type = this.getNodeValue(ctx.typ);
var args = this.getNodeValue(ctx.args) || null;
if(args===null) {
args = new grammar.ArgumentAssignmentList();
}
var firstArg = this.getNodeValue(ctx.firstArg);
args.insert(0, new grammar.ArgumentAssignment(null, firstArg));
var arg = this.getNodeValue(ctx.arg) || null;
if(arg!==null) {
args.add(arg);
}
this.setNodeValue(ctx, new expression.ConstructorExpression(type, args));
};
EPromptoBuilder.prototype.exitConstructorNoFrom = function(ctx) {
var type = this.getNodeValue(ctx.typ);
var args = this.getNodeValue(ctx.args) || null;
if(args===null) {
args = new grammar.ArgumentAssignmentList();
}
var arg = this.getNodeValue(ctx.arg) || null;
if(arg!==null) {
args.add(arg);
}
this.setNodeValue(ctx, new expression.ConstructorExpression(type, args));
};
EPromptoBuilder.prototype.exitAssertion = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitAssertion_list = function(ctx) {
var self = this;
var items = new utils.ExpressionList();
ctx.assertion().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitAssignInstanceStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitAssign_instance_statement = function(ctx) {
var inst = this.getNodeValue(ctx.inst);
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new statement.AssignInstanceStatement(inst, exp));
};
EPromptoBuilder.prototype.exitAssign_variable_statement = function(ctx) {
var name = this.getNodeValue(ctx.variable_identifier());
var exp = this.getNodeValue(ctx.expression());
this.setNodeValue(ctx, new statement.AssignVariableStatement(name, exp));
};
EPromptoBuilder.prototype.exitAssign_tuple_statement = function(ctx) {
var items = this.getNodeValue(ctx.items);
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new statement.AssignTupleStatement(items, exp));
};
EPromptoBuilder.prototype.exitRootInstance = function(ctx) {
var name = this.getNodeValue(ctx.variable_identifier());
this.setNodeValue(ctx, new instance.VariableInstance(name));
};
EPromptoBuilder.prototype.exitRoughlyEqualsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.EqualsExpression(left, grammar.EqOp.ROUGHLY, right));
};
EPromptoBuilder.prototype.exitChildInstance = function(ctx) {
var parent = this.getNodeValue(ctx.assignable_instance());
var child = this.getNodeValue(ctx.child_instance());
child.parent = parent;
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitMemberInstance = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new instance.MemberInstance(name));
};
EPromptoBuilder.prototype.exitIsATypeExpression = function(ctx) {
var type = this.getNodeValue(ctx.category_or_any_type());
var exp = new expression.TypeExpression(type);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitIsOtherExpression = function(ctx) {
var exp = this.getNodeValue(ctx.expression());
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitIsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
var op = right instanceof expression.TypeExpression ? grammar.EqOp.IS_A : grammar.EqOp.IS;
this.setNodeValue(ctx, new expression.EqualsExpression(left, op, right));
};
EPromptoBuilder.prototype.exitIsNotExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
var op = right instanceof expression.TypeExpression ? grammar.EqOp.IS_NOT_A : grammar.EqOp.IS_NOT;
this.setNodeValue(ctx, new expression.EqualsExpression(left, op, right));
};
EPromptoBuilder.prototype.exitItemInstance = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new instance.ItemInstance(exp));
};
EPromptoBuilder.prototype.exitConstructorExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitNative_statement_list = function(ctx) {
var self = this;
var items = new statement.StatementList();
ctx.native_statement().forEach(function (r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitJava_identifier = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitJavascript_identifier = function(ctx) {
var id = new grammar.Identifier(ctx.getText());
this.setNodeValue(ctx, id);
};
EPromptoBuilder.prototype.exitJavascript_member_expression = function(ctx) {
var name = ctx.name.getText ();
this.setNodeValue (ctx, new javascript.JavaScriptMemberExpression(name));
};
EPromptoBuilder.prototype.exitJavascript_new_expression = function(ctx) {
var method = this.getNodeValue(ctx.javascript_method_expression());
this.setNodeValue (ctx, new javascript.JavaScriptNewExpression(method));
};
EPromptoBuilder.prototype.exitJavascript_primary_expression = function(ctx) {
var exp = this.getNodeValue (ctx.getChild(0));
this.setNodeValue (ctx, exp);
};
EPromptoBuilder.prototype.exitJavascript_this_expression = function(ctx) {
this.setNodeValue (ctx, new javascript.JavaScriptThisExpression ());
};
EPromptoBuilder.prototype.exitJavaIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new java.JavaIdentifierExpression(null, name));
};
EPromptoBuilder.prototype.exitJavaIdentifierExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJavaChildIdentifier = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var name = this.getNodeValue(ctx.name);
var child = new java.JavaIdentifierExpression(parent, name);
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitJavaClassIdentifier = function(ctx) {
var klass = this.getNodeValue(ctx.klass);
this.setNodeValue(ctx, klass);
};
EPromptoBuilder.prototype.exitJavaChildClassIdentifier = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var child = new java.JavaIdentifierExpression(parent, ctx.name.text);
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitJavaPrimaryExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJavascriptBooleanLiteral = function(ctx) {
this.setNodeValue(ctx, new javascript.JavaScriptBooleanLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavascriptCharacterLiteral = function(ctx) {
this.setNodeValue(ctx, new javascript.JavaScriptCharacterLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavascriptTextLiteral = function(ctx) {
this.setNodeValue(ctx, new javascript.JavaScriptTextLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavascriptIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new javascript.JavaScriptIntegerLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavascriptDecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new javascript.JavaScriptDecimalLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavascriptPrimaryExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJavascript_identifier_expression = function(ctx) {
var id = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new javascript.JavaScriptIdentifierExpression(id));
};
EPromptoBuilder.prototype.exitJavaSelectorExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var child = this.getNodeValue(ctx.child);
child.parent = parent;
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitJavascriptSelectorExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var child = this.getNodeValue(ctx.child);
child.parent = parent;
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitJavaScriptMemberExpression = function(ctx) {
var id = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new javascript.JavaScriptMemberExpression(id));
};
EPromptoBuilder.prototype.exitJava_primary_expression = function(ctx) {
var exp = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJava_item_expression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new java.JavaItemExpression(exp));
};
EPromptoBuilder.prototype.exitJavascript_item_expression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new javascript.JavaScriptItemExpression(exp));
};
EPromptoBuilder.prototype.exitJavaItemExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJavascriptItemExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitJavaStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmt = new java.JavaStatement(exp,false);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitJavascriptStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmt = new javascript.JavaScriptStatement(exp,false);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitJavaReturnStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new java.JavaStatement(exp,true));
};
EPromptoBuilder.prototype.exitJavascriptReturnStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new javascript.JavaScriptStatement(exp,true));
};
EPromptoBuilder.prototype.exitJavaNativeStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.java_statement());
var call = new java.JavaNativeCall(stmt);
this.setNodeValue(ctx, call);
};
EPromptoBuilder.prototype.exitJavaScriptNativeStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.javascript_native_statement());
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitJavascript_native_statement = function(ctx) {
var stmt = this.getNodeValue(ctx.javascript_statement());
var module = this.getNodeValue(ctx.javascript_module());
stmt.module = module || null;
this.setNodeValue(ctx, new javascript.JavaScriptNativeCall(stmt));
};
EPromptoBuilder.prototype.exitNative_method_declaration = function(ctx) {
var type = this.getNodeValue(ctx.typ);
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
var stmts = this.getNodeValue(ctx.stmts);
var decl = new declaration.NativeMethodDeclaration(name, args, type, stmts);
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitJavaArgumentList = function(ctx) {
var item = this.getNodeValue(ctx.item);
this.setNodeValue(ctx, new java.JavaExpressionList(item));
};
EPromptoBuilder.prototype.exitJavascriptArgumentList = function(ctx) {
var item = this.getNodeValue(ctx.item);
this.setNodeValue(ctx, new javascript.JavaScriptExpressionList(item));
};
EPromptoBuilder.prototype.exitJavaArgumentListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = this.getNodeValue(ctx.items);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitJavascriptArgumentListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = this.getNodeValue(ctx.items);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitJava_method_expression = function(ctx) {
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
this.setNodeValue(ctx, new java.JavaMethodExpression(name, args));
};
EPromptoBuilder.prototype.exitJava_this_expression = function(ctx) {
this.setNodeValue(ctx, new java.JavaThisExpression());
};
EPromptoBuilder.prototype.exitJavaScriptMethodExpression = function(ctx) {
var method = this.getNodeValue(ctx.method);
this.setNodeValue(ctx, method);
};
EPromptoBuilder.prototype.exitJavascript_method_expression = function(ctx) {
var id = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
this.setNodeValue(ctx, new javascript.JavaScriptMethodExpression(id, args));
};
EPromptoBuilder.prototype.exitJavaMethodExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitFullDeclarationList = function(ctx) {
var items = this.getNodeValue(ctx.declarations()) || new declaration.DeclarationList();
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitDeclaration = function(ctx) {
var self = this;
var stmts = ctx.comment_statement().map(function(csc) {
return self.getNodeValue(csc);
});
if(stmts.length==0)
stmts = null;
var ctx_ = ctx.attribute_declaration();
if(ctx_==null)
ctx_ = ctx.category_declaration();
if(ctx_==null)
ctx_ = ctx.enum_declaration();
if(ctx_==null)
ctx_ = ctx.method_declaration();
if(ctx_==null)
ctx_ = ctx.resource_declaration();
decl = this.getNodeValue(ctx_);
if(decl!=null) {
decl.comments = stmts;
this.setNodeValue(ctx, decl);
}
};
EPromptoBuilder.prototype.exitDeclarations = function(ctx) {
var self = this;
var items = new declaration.DeclarationList();
ctx.declaration().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitIteratorExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var name = this.getNodeValue(ctx.name);
var source = this.getNodeValue(ctx.source);
this.setNodeValue(ctx, new expression.IteratorExpression(name, source, exp));
};
EPromptoBuilder.prototype.exitIteratorType = function(ctx) {
var typ = this.getNodeValue(ctx.i);
this.setNodeValue(ctx, new type.IteratorType(typ));
};
EPromptoBuilder.prototype.exitJavaBooleanLiteral = function(ctx) {
this.setNodeValue(ctx, new java.JavaBooleanLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavaIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new java.JavaIntegerLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavaDecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new java.JavaDecimalLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavaCharacterLiteral = function(ctx) {
this.setNodeValue(ctx, new java.JavaCharacterLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavaTextLiteral = function(ctx) {
this.setNodeValue(ctx, new java.JavaTextLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitJavaCategoryBinding = function(ctx) {
var map = this.getNodeValue(ctx.binding);
this.setNodeValue(ctx, new java.JavaNativeCategoryBinding(map));
};
EPromptoBuilder.prototype.exitJavaScriptCategoryBinding = function(ctx) {
this.setNodeValue(ctx, this.getNodeValue(ctx.binding));
};
EPromptoBuilder.prototype.exitJavascript_category_binding = function(ctx) {
var identifier = ctx.identifier().getText();
var module = this.getNodeValue(ctx.javascript_module()) || null;
var map = new javascript.JavaScriptNativeCategoryBinding(identifier, module);
this.setNodeValue(ctx, map);
};
EPromptoBuilder.prototype.exitJavascript_module = function(ctx) {
var ids = ctx.javascript_identifier().map(function(rule) {
return rule.getText();
});
var module = new javascript.JavaScriptModule(ids);
this.setNodeValue(ctx, module);
};
EPromptoBuilder.prototype.exitNativeCategoryBindingList = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = new grammar.NativeCategoryBindingList(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitNativeCategoryBindingListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = this.getNodeValue(ctx.items);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitNative_category_bindings = function(ctx) {
var items = this.getNodeValue(ctx.items);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitNative_category_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs);
var bindings = this.getNodeValue(ctx.bindings);
var methods = this.getNodeValue(ctx.methods);
var decl = new declaration.NativeCategoryDeclaration(name, attrs, bindings, null, methods);
decl.storable = ctx.STORABLE()!=null;
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitNativeCategoryDeclaration = function(ctx) {
var decl = this.getNodeValue(ctx.decl);
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitNative_resource_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs);
var bindings = this.getNodeValue(ctx.bindings);
var methods = this.getNodeValue(ctx.methods);
this.setNodeValue(ctx, new declaration.NativeResourceDeclaration(name, attrs, bindings, null, methods));
};
EPromptoBuilder.prototype.exitResource_declaration = function(ctx) {
var decl = this.getNodeValue(ctx.native_resource_declaration());
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitParenthesis_expression = function(ctx) {
var exp = this.getNodeValue(ctx.expression());
this.setNodeValue(ctx, new expression.ParenthesisExpression(exp));
};
EPromptoBuilder.prototype.exitParenthesisExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitNative_symbol_list = function(ctx) {
var self = this;
var items = new grammar.NativeSymbolList();
ctx.native_symbol().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitEnum_native_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var type = this.getNodeValue(ctx.typ);
var symbols = this.getNodeValue(ctx.symbols);
this.setNodeValue(ctx, new declaration.EnumeratedNativeDeclaration(name, type, symbols));
};
EPromptoBuilder.prototype.exitFor_each_statement = function(ctx) {
var name1 = this.getNodeValue(ctx.name1);
var name2 = this.getNodeValue(ctx.name2);
var source = this.getNodeValue(ctx.source);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.ForEachStatement(name1, name2, source, stmts));
};
EPromptoBuilder.prototype.exitForEachStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitSymbols_token = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitKey_token = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitValue_token = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitNamed_argument = function(ctx) {
var name = this.getNodeValue(ctx.variable_identifier());
var arg = new argument.UnresolvedArgument(name);
var exp = this.getNodeValue(ctx.literal_expression());
arg.defaultExpression = exp || null;
this.setNodeValue(ctx, arg);
};
EPromptoBuilder.prototype.exitClosureStatement = function(ctx) {
var decl = this.getNodeValue(ctx.decl);
this.setNodeValue(ctx, new statement.DeclarationStatement(decl));
};
EPromptoBuilder.prototype.exitReturn_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new statement.ReturnStatement(exp));
};
EPromptoBuilder.prototype.exitReturnStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitClosureExpression = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new expression.MethodExpression(name));
};
EPromptoBuilder.prototype.exitIf_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
var elseIfs = this.getNodeValue(ctx.elseIfs);
var elseStmts = this.getNodeValue(ctx.elseStmts);
this.setNodeValue(ctx, new statement.IfStatement(exp, stmts, elseIfs, elseStmts));
};
EPromptoBuilder.prototype.exitElseIfStatementList = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
var elem = new statement.IfElement(exp, stmts);
this.setNodeValue(ctx, new statement.IfElementList(elem));
};
EPromptoBuilder.prototype.exitElseIfStatementListItem = function(ctx) {
var items = this.getNodeValue(ctx.items);
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
var elem = new statement.IfElement(exp, stmts);
items.add(elem);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitIfStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitSwitchStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitAssignTupleStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitRaiseStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitWriteStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitWithResourceStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitWhileStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitDoWhileStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitTryStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitEqualsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.EqualsExpression(left, grammar.EqOp.EQUALS, right));
};
EPromptoBuilder.prototype.exitNotEqualsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.EqualsExpression(left, grammar.EqOp.NOT_EQUALS, right));
};
EPromptoBuilder.prototype.exitGreaterThanExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.CompareExpression(left, grammar.CmpOp.GT, right));
};
EPromptoBuilder.prototype.exitGreaterThanOrEqualExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.CompareExpression(left, grammar.CmpOp.GTE, right));
};
EPromptoBuilder.prototype.exitLessThanExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.CompareExpression(left, grammar.CmpOp.LT, right));
};
EPromptoBuilder.prototype.exitLessThanOrEqualExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.CompareExpression(left, grammar.CmpOp.LTE, right));
};
EPromptoBuilder.prototype.exitAtomicSwitchCase = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.AtomicSwitchCase(exp, stmts));
};
EPromptoBuilder.prototype.exitCollection_literal = function(ctx) {
var value = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitCollectionSwitchCase = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.CollectionSwitchCase(exp, stmts));
};
EPromptoBuilder.prototype.exitSwitch_case_statement_list = function(ctx) {
var self = this;
var items = new statement.SwitchCaseList();
ctx.switch_case_statement().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitSwitch_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var cases = this.getNodeValue(ctx.cases);
var stmts = this.getNodeValue(ctx.stmts);
var stmt = new statement.SwitchStatement(exp, cases, stmts);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitLiteralRangeLiteral = function(ctx) {
var low = this.getNodeValue(ctx.low);
var high = this.getNodeValue(ctx.high);
this.setNodeValue(ctx, new literal.RangeLiteral(low, high));
};
EPromptoBuilder.prototype.exitLiteralListLiteral = function(ctx) {
var exp = this.getNodeValue(ctx.literal_list_literal());
this.setNodeValue(ctx, new literal.ListLiteral(false, exp));
};
EPromptoBuilder.prototype.exitLiteral_list_literal = function(ctx) {
var self = this;
var items = new utils.ExpressionList();
ctx.atomic_literal().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitInExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.IN, right));
};
EPromptoBuilder.prototype.exitNotInExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.NOT_IN, right));
};
EPromptoBuilder.prototype.exitContainsAllExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.CONTAINS_ALL, right));
};
EPromptoBuilder.prototype.exitNotContainsAllExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.NOT_CONTAINS_ALL, right));
};
EPromptoBuilder.prototype.exitContainsAnyExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.CONTAINS_ANY, right));
};
EPromptoBuilder.prototype.exitNotContainsAnyExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.NOT_CONTAINS_ANY, right));
};
EPromptoBuilder.prototype.exitContainsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.CONTAINS, right));
};
EPromptoBuilder.prototype.exitNotContainsExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ContainsExpression(left, grammar.ContOp.NOT_CONTAINS, right));
};
EPromptoBuilder.prototype.exitDivideExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.DivideExpression(left, right));
};
EPromptoBuilder.prototype.exitIntDivideExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.IntDivideExpression(left, right));
};
EPromptoBuilder.prototype.exitModuloExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.ModuloExpression(left, right));
};
EPromptoBuilder.prototype.exitAndExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.AndExpression(left, right));
};
EPromptoBuilder.prototype.exitNullLiteral = function(ctx) {
this.setNodeValue(ctx, literal.NullLiteral.instance);
};
EPromptoBuilder.prototype.exitOperator_argument = function(ctx) {
var value = this.getNodeValue (ctx.getChild (0));
this.setNodeValue (ctx, value);
};
EPromptoBuilder.prototype.exitOperatorArgument = function(ctx) {
var arg = this.getNodeValue(ctx.arg);
arg.mutable = ctx.MUTABLE()!=null;
this.setNodeValue(ctx, arg);
};
EPromptoBuilder.prototype.exitOperatorPlus = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.PLUS);
};
EPromptoBuilder.prototype.exitOperatorMinus = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.MINUS);
};
EPromptoBuilder.prototype.exitOperatorMultiply = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.MULTIPLY);
};
EPromptoBuilder.prototype.exitOperatorDivide = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.DIVIDE);
};
EPromptoBuilder.prototype.exitOperatorIDivide = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.IDIVIDE);
};
EPromptoBuilder.prototype.exitOperatorModulo = function(ctx) {
this.setNodeValue(ctx, grammar.Operator.MODULO);
};
EPromptoBuilder.prototype.exitNative_member_method_declaration = function(ctx) {
var value = this.getNodeValue (ctx.getChild (0));
this.setNodeValue (ctx, value);
};
EPromptoBuilder.prototype.exitOperator_method_declaration= function(ctx) {
var op = this.getNodeValue(ctx.op);
var arg = this.getNodeValue(ctx.arg);
var typ = this.getNodeValue(ctx.typ);
var stmts = this.getNodeValue(ctx.stmts);
var decl = new declaration.OperatorMethodDeclaration(op, arg, typ, stmts);
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitOrder_by = function(ctx) {
var self = this;
var names = new grammar.IdentifierList();
ctx.variable_identifier().map( function(ctx_) {
names.push(self.getNodeValue(ctx_));
});
var clause = new grammar.OrderByClause(names, ctx.DESC()!=null);
this.setNodeValue(ctx, clause);
};
EPromptoBuilder.prototype.exitOrder_by_list = function(ctx) {
var self = this;
var list = new grammar.OrderByClauseList();
ctx.order_by().map( function(ctx_) {
list.add(self.getNodeValue(ctx_));
});
this.setNodeValue(ctx, list);
};
EPromptoBuilder.prototype.exitOrExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.OrExpression(left, right));
};
EPromptoBuilder.prototype.exitMultiplyExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var right = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.MultiplyExpression(left, right));
};
EPromptoBuilder.prototype.exitMutable_category_type = function(ctx) {
var typ = this.getNodeValue (ctx.category_type());
typ.mutable = ctx.MUTABLE()!=null;
this.setNodeValue(ctx, typ);
};
EPromptoBuilder.prototype.exitMinusExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.MinusExpression(exp));
};
EPromptoBuilder.prototype.exitNotExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.NotExpression(exp));
};
EPromptoBuilder.prototype.exitWhile_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.WhileStatement(exp, stmts));
};
EPromptoBuilder.prototype.exitDo_while_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.DoWhileStatement(exp, stmts));
};
EPromptoBuilder.prototype.exitSingleton_category_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs);
var methods = this.getNodeValue(ctx.methods);
this.setNodeValue(ctx, new declaration.SingletonCategoryDeclaration(name, attrs, methods));
};
EPromptoBuilder.prototype.exitSingletonCategoryDeclaration = function(ctx) {
var decl = this.getNodeValue(ctx.decl);
this.setNodeValue(ctx, decl);
};
EPromptoBuilder.prototype.exitSliceFirstAndLast = function(ctx) {
var first = this.getNodeValue(ctx.first);
var last = this.getNodeValue(ctx.last);
this.setNodeValue(ctx, new expression.SliceSelector(null, first, last));
};
EPromptoBuilder.prototype.exitSliceFirstOnly = function(ctx) {
var first = this.getNodeValue(ctx.first);
this.setNodeValue(ctx, new expression.SliceSelector(null, first, null));
};
EPromptoBuilder.prototype.exitSliceLastOnly = function(ctx) {
var last = this.getNodeValue(ctx.last);
this.setNodeValue(ctx, new expression.SliceSelector(null, null, last));
};
EPromptoBuilder.prototype.exitSorted_expression = function(ctx) {
var source = this.getNodeValue(ctx.source);
var desc = ctx.DESC()!=null;
var key = this.getNodeValue(ctx.key);
this.setNodeValue(ctx, new expression.SortedExpression(source, desc, key));
};
EPromptoBuilder.prototype.exitSortedExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitDocumentExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitDocument_expression = function(ctx) {
var exp = this.getNodeValue(ctx.expression());
this.setNodeValue(ctx, new expression.DocumentExpression(exp));
};
EPromptoBuilder.prototype.exitDocumentType = function(ctx) {
this.setNodeValue(ctx, type.DocumentType.instance);
};
EPromptoBuilder.prototype.exitFetchOne = function(ctx) {
var category = this.getNodeValue(ctx.typ);
var predicate = this.getNodeValue(ctx.predicate);
this.setNodeValue(ctx, new expression.FetchOneExpression(category, predicate));
};
EPromptoBuilder.prototype.exitFetchMany = function(ctx) {
var category = this.getNodeValue(ctx.typ);
var predicate = this.getNodeValue(ctx.predicate);
var start = this.getNodeValue(ctx.xstart);
var stop = this.getNodeValue(ctx.xstop);
var orderBy = this.getNodeValue(ctx.orderby);
this.setNodeValue(ctx, new expression.FetchManyExpression(category, start, stop, predicate, orderBy));
};
EPromptoBuilder.prototype.exitFilteredListExpression = function(ctx) {
var filtered = this.getNodeValue(ctx.filtered_list_suffix());
var source = this.getNodeValue(ctx.src);
filtered.source = source;
this.setNodeValue(ctx, filtered);
};
EPromptoBuilder.prototype.exitFiltered_list_suffix = function(ctx) {
var itemName = this.getNodeValue(ctx.name);
var predicate = this.getNodeValue(ctx.predicate);
this.setNodeValue(ctx, new expression.FilteredExpression(itemName, null, predicate));
};
EPromptoBuilder.prototype.exitFetchStoreExpression = function(ctx) {
var exp = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitCode_type = function(ctx) {
this.setNodeValue(ctx, type.CodeType.instance);
};
EPromptoBuilder.prototype.exitExecuteExpression = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new expression.ExecuteExpression(name));
};
EPromptoBuilder.prototype.exitExpression_list = function(ctx) {
var self = this;
var items = new utils.ExpressionList();
ctx.expression().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitExpression_tuple = function(ctx) {
var self = this;
var items = new utils.ExpressionList();
ctx.expression().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitCodeExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new expression.CodeExpression(exp));
};
EPromptoBuilder.prototype.exitCode_argument = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new argument.CodeArgument(name));
};
EPromptoBuilder.prototype.exitCategory_or_any_type = function(ctx) {
var exp = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitCategory_symbol = function(ctx) {
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
var arg = this.getNodeValue(ctx.arg) || null;
if(arg!==null) {
args.add(arg);
}
this.setNodeValue(ctx, new expression.CategorySymbol(name, args));
};
EPromptoBuilder.prototype.exitCategory_symbol_list = function(ctx) {
var self = this;
var items = new grammar.CategorySymbolList();
ctx.category_symbol().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitEnum_category_declaration = function(ctx) {
var name = this.getNodeValue(ctx.name);
var attrs = this.getNodeValue(ctx.attrs);
var parent = this.getNodeValue(ctx.derived);
var derived = parent==null ? null : new grammar.IdentifierList(parent);
var symbols = this.getNodeValue(ctx.symbols);
this.setNodeValue(ctx, new declaration.EnumeratedCategoryDeclaration(name, attrs, derived, symbols));
};
EPromptoBuilder.prototype.exitEnum_declaration = function(ctx) {
var value = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitRead_all_expression = function(ctx) {
var source = this.getNodeValue(ctx.source);
this.setNodeValue(ctx, new expression.ReadAllExpression(source));
};
EPromptoBuilder.prototype.exitRead_one_expression = function(ctx) {
var source = this.getNodeValue(ctx.source);
this.setNodeValue(ctx, new expression.ReadOneExpression(source));
};
EPromptoBuilder.prototype.exitReadAllExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitReadOneExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitWith_singleton_statement = function(ctx) {
var name = this.getNodeValue(ctx.typ);
var typ = new type.CategoryType(name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.WithSingletonStatement(typ, stmts));
};
EPromptoBuilder.prototype.exitWithSingletonStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitWrite_statement = function(ctx) {
var what = this.getNodeValue(ctx.what);
var target = this.getNodeValue(ctx.target);
this.setNodeValue(ctx, new statement.WriteStatement(what, target));
};
EPromptoBuilder.prototype.exitWith_resource_statement = function(ctx) {
var stmt = this.getNodeValue(ctx.stmt);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.WithResourceStatement(stmt, stmts));
};
EPromptoBuilder.prototype.exitAnyType = function(ctx) {
this.setNodeValue(ctx, type.AnyType.instance);
};
EPromptoBuilder.prototype.exitAnyListType = function(ctx) {
var type = this.getNodeValue(ctx.typ);
this.setNodeValue(ctx, new type.ListType(type));
};
EPromptoBuilder.prototype.exitAnyDictType = function(ctx) {
var type = this.getNodeValue(ctx.typ);
this.setNodeValue(ctx, new type.DictType(type));
};
EPromptoBuilder.prototype.exitCastExpression = function(ctx) {
var left = this.getNodeValue(ctx.left);
var type = this.getNodeValue(ctx.right);
this.setNodeValue(ctx, new expression.CastExpression(left, type));
}
EPromptoBuilder.prototype.exitCatchAtomicStatement = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.AtomicSwitchCase(new expression.SymbolExpression(name), stmts));
};
EPromptoBuilder.prototype.exitCatchCollectionStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmts = this.getNodeValue(ctx.stmts);
this.setNodeValue(ctx, new statement.CollectionSwitchCase(exp, stmts));
};
EPromptoBuilder.prototype.exitCatch_statement_list = function(ctx) {
var self = this;
var items = new statement.SwitchCaseList();
ctx.catch_statement().forEach(function(r) {
var item = self.getNodeValue(r);
items.add(item);
});
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitTry_statement = function(ctx) {
var name = this.getNodeValue(ctx.name);
var stmts = this.getNodeValue(ctx.stmts);
var handlers = this.getNodeValue(ctx.handlers);
var anyStmts = this.getNodeValue(ctx.anyStmts);
var finalStmts = this.getNodeValue(ctx.finalStmts);
var stmt = new statement.SwitchErrorStatement(name, stmts, handlers, anyStmts, finalStmts);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitRaise_statement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new statement.RaiseStatement(exp));
};
EPromptoBuilder.prototype.exitMatchingList = function(ctx) {
var exp = this.getNodeValue(ctx.source);
this.setNodeValue(ctx, new constraint.MatchingCollectionConstraint(exp));
};
EPromptoBuilder.prototype.exitMatchingRange = function(ctx) {
var exp = this.getNodeValue(ctx.source);
this.setNodeValue(ctx, new constraint.MatchingCollectionConstraint(exp));
};
EPromptoBuilder.prototype.exitMatchingExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new constraint.MatchingExpressionConstraint(exp));
};
EPromptoBuilder.prototype.exitMatchingPattern = function(ctx) {
this.setNodeValue(ctx, new constraint.MatchingPatternConstraint(new literal.TextLiteral(ctx.text.text)));
};
EPromptoBuilder.prototype.exitLiteralSetLiteral = function(ctx) {
var items = this.getNodeValue(ctx.literal_list_literal());
this.setNodeValue(ctx, new literal.SetLiteral(items));
};
EPromptoBuilder.prototype.exitInvocation_expression = function(ctx) {
var name = this.getNodeValue(ctx.name);
var select = new expression.MethodSelector(null, name);
this.setNodeValue(ctx, new statement.MethodCall(select));
};
EPromptoBuilder.prototype.exitInvocationExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitInvokeStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitCsharp_identifier = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitCSharpIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new csharp.CSharpIdentifierExpression(null, name));
};
EPromptoBuilder.prototype.exitCSharpChildIdentifier = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var name = this.getNodeValue(ctx.name);
var child = new csharp.CSharpIdentifierExpression(parent, name);
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitCSharpBooleanLiteral = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpBooleanLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitCSharpIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpIntegerLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitCSharpDecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpDecimalLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitCSharpCharacterLiteral = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpCharacterLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitCSharpTextLiteral = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpTextLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitCSharpCategoryBinding = function(ctx) {
var binding = this.getNodeValue(ctx.binding);
this.setNodeValue(ctx, new csharp.CSharpNativeCategoryBinding(binding));
};
EPromptoBuilder.prototype.exitCsharp_primary_expression = function(ctx) {
var value = this.getNodeValue(ctx.getChild(0));
this.setNodeValue(ctx, value);
};
EPromptoBuilder.prototype.exitCsharp_this_expression = function(ctx) {
this.setNodeValue(ctx, new csharp.CSharpThisExpression());
};
EPromptoBuilder.prototype.exitCsharp_method_expression = function(ctx) {
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
this.setNodeValue(ctx, new csharp.CSharpMethodExpression(name, args));
};
EPromptoBuilder.prototype.exitCSharpMethodExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitCSharpArgumentList = function(ctx) {
var item = this.getNodeValue(ctx.item);
this.setNodeValue(ctx, new csharp.CSharpExpressionList(item));
};
EPromptoBuilder.prototype.exitCSharpArgumentListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var items = this.getNodeValue(ctx.items);
items.add(item);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitCSharpNativeStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.csharp_statement());
var call = new csharp.CSharpNativeCall(stmt);
this.setNodeValue(ctx, call);
};
EPromptoBuilder.prototype.exitCSharpPromptoIdentifier = function(ctx) {
var name = ctx.DOLLAR_IDENTIFIER().getText();
this.setNodeValue(ctx, new csharp.CSharpIdentifierExpression(null, name));
};
EPromptoBuilder.prototype.exitCSharpPrimaryExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitCSharpSelectorExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var child = this.getNodeValue(ctx.child);
child.parent = parent;
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitCSharpStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
var stmt = new csharp.CSharpStatement(exp,false);
this.setNodeValue(ctx, stmt);
};
EPromptoBuilder.prototype.exitCSharpReturnStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new csharp.CSharpStatement(exp,true));
};
EPromptoBuilder.prototype.exitPythonStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new python.PythonStatement(exp,false));
};
EPromptoBuilder.prototype.exitPythonReturnStatement = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, new python.PythonStatement(exp,true));
};
EPromptoBuilder.prototype.exitPython2CategoryBinding = function(ctx) {
var map = this.getNodeValue(ctx.binding);
this.setNodeValue(ctx, new python.Python2NativeCategoryBinding(map));
};
EPromptoBuilder.prototype.exitPython3CategoryBinding = function(ctx) {
var map = this.getNodeValue(ctx.binding);
this.setNodeValue(ctx, new python.Python3NativeCategoryBinding(map));
};
EPromptoBuilder.prototype.exitPython_category_binding = function(ctx) {
var identifier = ctx.identifier().getText();
var module = this.getNodeValue(ctx.python_module()) || null;
var map = new python.PythonNativeCategoryBinding(identifier, module);
this.setNodeValue(ctx, map);
};
EPromptoBuilder.prototype.exitPython_method_expression = function(ctx) {
var name = this.getNodeValue(ctx.name);
var args = this.getNodeValue(ctx.args);
var method = new python.PythonMethodExpression(name, args);
this.setNodeValue(ctx, method);
};
EPromptoBuilder.prototype.exitPythonGlobalMethodExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitPythonMethodExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitPython_module = function(ctx) {
var ids = ctx.identifier().map(function(rule) {
return rule.getText();
});
var module = new python.PythonModule(ids);
this.setNodeValue(ctx, module);
};
EPromptoBuilder.prototype.exitPython2NativeStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.python_native_statement());
this.setNodeValue(ctx, new python.Python2NativeCall(stmt));
};
EPromptoBuilder.prototype.exitPython3NativeStatement = function(ctx) {
var stmt = this.getNodeValue(ctx.python_native_statement());
this.setNodeValue(ctx, new python.Python3NativeCall(stmt));
};
EPromptoBuilder.prototype.exitPython_native_statement = function(ctx) {
var stmt = this.getNodeValue(ctx.python_statement());
var module = this.getNodeValue(ctx.python_module());
stmt.module = module || null;
this.setNodeValue(ctx, new python.PythonNativeCall(stmt));
}
EPromptoBuilder.prototype.exitPython_identifier = function(ctx) {
this.setNodeValue(ctx, ctx.getText());
};
EPromptoBuilder.prototype.exitPythonIdentifier = function(ctx) {
var name = this.getNodeValue(ctx.name);
this.setNodeValue(ctx, new python.PythonIdentifierExpression(null, name));
};
EPromptoBuilder.prototype.exitPythonIdentifierExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitPythonChildIdentifier = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var name = this.getNodeValue(ctx.name);
var child = new python.PythonIdentifierExpression(parent, name);
this.setNodeValue(ctx, child);
};
EPromptoBuilder.prototype.exitPythonBooleanLiteral = function(ctx) {
this.setNodeValue(ctx, new python.PythonBooleanLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitPythonIntegerLiteral = function(ctx) {
this.setNodeValue(ctx, new python.PythonIntegerLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitPythonDecimalLiteral = function(ctx) {
this.setNodeValue(ctx, new python.PythonDecimalLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitPythonCharacterLiteral = function(ctx) {
this.setNodeValue(ctx, new python.PythonCharacterLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitPythonTextLiteral = function(ctx) {
this.setNodeValue(ctx, new python.PythonTextLiteral(ctx.getText()));
};
EPromptoBuilder.prototype.exitPythonLiteralExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitPythonPromptoIdentifier = function(ctx) {
var name = ctx.DOLLAR_IDENTIFIER().getText();
this.setNodeValue(ctx, new python.PythonIdentifierExpression(null, name));
};
EPromptoBuilder.prototype.exitPythonPrimaryExpression = function(ctx) {
var exp = this.getNodeValue(ctx.exp);
this.setNodeValue(ctx, exp);
};
EPromptoBuilder.prototype.exitPythonArgumentList = function(ctx) {
var ordinal = this.getNodeValue(ctx.ordinal);
var named = this.getNodeValue(ctx.named);
ordinal.addAll(named);
this.setNodeValue(ctx, ordinal);
};
EPromptoBuilder.prototype.exitPythonNamedOnlyArgumentList = function(ctx) {
var named = this.getNodeValue(ctx.named);
this.setNodeValue(ctx, named);
};
EPromptoBuilder.prototype.exitPythonNamedArgumentList = function(ctx) {
var name = this.getNodeValue(ctx.name);
var exp = this.getNodeValue(ctx.exp);
var arg = new python.PythonNamedArgument(name, exp);
this.setNodeValue(ctx, new python.PythonArgumentList(arg));
};
EPromptoBuilder.prototype.exitPythonNamedArgumentListItem = function(ctx) {
var name = this.getNodeValue(ctx.name);
var exp = this.getNodeValue(ctx.exp);
var arg = new python.PythonNamedArgument(name, exp);
var items = this.getNodeValue(ctx.items);
items.add(arg);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitPythonOrdinalOnlyArgumentList = function(ctx) {
var ordinal = this.getNodeValue(ctx.ordinal);
this.setNodeValue(ctx, ordinal);
};
EPromptoBuilder.prototype.exitPythonOrdinalArgumentList = function(ctx) {
var item = this.getNodeValue(ctx.item);
var arg = new python.PythonOrdinalArgument(item);
this.setNodeValue(ctx, new python.PythonArgumentList(arg));
};
EPromptoBuilder.prototype.exitPythonOrdinalArgumentListItem = function(ctx) {
var item = this.getNodeValue(ctx.item);
var arg = new python.PythonOrdinalArgument(item);
var items = this.getNodeValue(ctx.items);
items.add(arg);
this.setNodeValue(ctx, items);
};
EPromptoBuilder.prototype.exitPythonSelectorExpression = function(ctx) {
var parent = this.getNodeValue(ctx.parent);
var selector = this.getNodeValue(ctx.child);
selector.parent = parent;
this.setNodeValue(ctx, selector);
}
EPromptoBuilder.prototype.buildSection = function(node, section) {
var first = this.findFirstValidToken(node.start.tokenIndex);
var last = this.findLastValidToken(node.stop.tokenIndex);
section.setSectionFrom(this.path, first, last, parser.Dialect.E);
};
EPromptoBuilder.prototype.findFirstValidToken = function(idx) {
if(idx===-1) { // happens because input.index() is called before any other read operation (bug?)
idx = 0;
}
do {
var token = this.readValidToken(idx++);
if(token!==null) {
return token;
}
} while(idx=0) {
var token = this.readValidToken(idx--);
if(token!==null) {
return token;
}
}
return null;
};
EPromptoBuilder.prototype.readValidToken = function(idx) {
var token = this.input.get(idx);
var text = token.text;
if(text!==null && text.length>0 && !value.Character.isWhitespace(text[0])) {
return token;
} else {
return null;
}
};
exports.EPromptoBuilder = EPromptoBuilder;
/***/ },
/* 107 */
/***/ function(module, exports, __webpack_require__) {
exports.AttributeArgument = __webpack_require__(108).AttributeArgument;
exports.CategoryArgument = __webpack_require__(110).CategoryArgument;
exports.ExtendedArgument = __webpack_require__(112).ExtendedArgument;
exports.CodeArgument = __webpack_require__(113).CodeArgument;
exports.UnresolvedArgument = __webpack_require__(115).UnresolvedArgument;
__webpack_require__(112).resolve();
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
var Argument = __webpack_require__(109).Argument;
function AttributeArgument(id) {
Argument.call(this, id);
return this;
}
AttributeArgument.prototype = Object.create(Argument.prototype);
AttributeArgument.prototype.constructor = AttributeArgument;
AttributeArgument.prototype.toString = function() {
return this.id.name;
};
AttributeArgument.prototype.getProto = function() {
return this.id.name;
};
AttributeArgument.prototype.register = function(context) {
context.registerValue(this, true);
if(this.defaultExpression!=null) try {
context.setValue(name, this.defaultExpression.interpret(context));
} catch(error) {
throw new SyntaxError("Unable to register default value: "+ this.defaultExpression.toString() + " for argument: " + this.id.name);
}
};
AttributeArgument.prototype.check = function(context) {
var actual = context.getRegisteredDeclaration(this.name);
if(actual==null)
throw new SyntaxError("Unknown attribute: \"" + this.id.name + "\"");
};
AttributeArgument.prototype.getType = function(context) {
var named = context.getRegisteredDeclaration(this.id.name);
return named.getType(context);
};
AttributeArgument.prototype.checkValue = function(context, value) {
var actual = context.getRegisteredDeclaration(this.id.name);
return actual.checkValue(context,value);
};
exports.AttributeArgument = AttributeArgument;
/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {
var Integer = __webpack_require__(78).Integer;
var Decimal = __webpack_require__(79).Decimal;
var IntegerType = __webpack_require__(81).IntegerType;
var DecimalType = __webpack_require__(80).DecimalType;
function Argument(id) {
this.id = id;
this.mutable = false;
this.defaultExpression = null;
return this;
}
Object.defineProperty(Argument.prototype, "name", {
get : function() {
return this.id.name;
}
});
Argument.prototype.checkValue = function(context, expression) {
var value = expression.interpret(context);
if (value instanceof Integer && this.getType(context)==DecimalType.instance) {
return new Decimal(value.DecimalValue());
} else if (value instanceof Decimal && this.getType(context)==IntegerType.instance) {
return new Integer(value.IntegerValue());
} else {
return value;
}
};
Argument.prototype.toDialect = function(writer) {
if(this.mutable)
writer.append("mutable ");
writer.toDialect(this);
if(this.defaultExpression!=null) {
writer.append(" = ");
this.defaultExpression.toDialect(writer);
}
};
exports.Argument = Argument;
/***/ },
/* 110 */
/***/ function(module, exports, __webpack_require__) {
var Argument = __webpack_require__(109).Argument;
var IdentifierList = __webpack_require__(111).IdentifierList;
var SyntaxError = __webpack_require__(66).SyntaxError;
var utils = __webpack_require__(47);
function CategoryArgument(type, id, defaultExpression) {
Argument.call(this, id);
this.type = type;
this.defaultExpression = defaultExpression || null;
return this;
}
CategoryArgument.prototype = Object.create(Argument.prototype);
CategoryArgument.prototype.constructor = CategoryArgument;
CategoryArgument.prototype.getProto = function() {
return this.type.name;
};
CategoryArgument.prototype.equals = function(obj) {
if(obj===this) {
return true;
}
if(obj===null || obj===undefined) {
return false;
}
if(!(obj instanceof CategoryArgument)) {
return false;
}
return utils.equalObjects(this.type, obj.type) && this.name===obj.name;
};
CategoryArgument.prototype.register = function(context) {
var actual = context.getRegisteredValue(this.id.name);
if(actual!==null) {
throw new SyntaxError("Duplicate argument: \"" + this.id.name + "\"");
}
context.registerValue(this);
if(this.defaultExpression!=null)
context.setValue(this.id, this.defaultExpression.interpret(context));
};
CategoryArgument.prototype.check = function(context) {
this.type.checkExists(context);
};
CategoryArgument.prototype.getType = function(context) {
return this.type;
};
CategoryArgument.prototype.toEDialect = function(writer) {
var anonymous = "any"==this.type.name;
this.type.toDialect(writer);
if(anonymous) {
writer.append(' ');
writer.append(this.name);
}
if(!anonymous) {
writer.append(' ');
writer.append(this.name);
}
};
CategoryArgument.prototype.toODialect = function(writer) {
this.type.toDialect(writer);
writer.append(' ');
writer.append(this.name);
};
CategoryArgument.prototype.toMDialect = function(writer) {
writer.append(this.name);
writer.append(':');
this.type.toDialect(writer);
};
exports.CategoryArgument = CategoryArgument;
/***/ },
/* 111 */
/***/ function(module, exports, __webpack_require__) {
var ObjectList = __webpack_require__(49).ObjectList;
var Dialect = __webpack_require__(98).Dialect;
function IdentifierList(item) {
ObjectList.call(this);
item = item || null;
if(item!==null) {
this.add(item);
}
return this;
}
IdentifierList.prototype = Object.create(ObjectList.prototype);
IdentifierList.prototype.constructor = IdentifierList;
IdentifierList.parse = function(ids) {
var result = new IdentifierList();
ids.split(",").forEach(function(part) {
result.add(part);
});
return result;
};
IdentifierList.prototype.names = function() {
return this.map(function(id) { return id.name; } );
};
IdentifierList.prototype.toDialect = function(writer, finalAnd) {
finalAnd = finalAnd || false;
switch(writer.dialect) {
case Dialect.E:
this.toEDialect(writer, finalAnd);
break;
case Dialect.O:
this.toODialect(writer);
break;
case Dialect.M:
this.toMDialect(writer);
break;
}
};
IdentifierList.prototype.toEDialect = function(writer, finalAnd) {
switch(this.length) {
case 0:
return;
case 1:
writer.append(this[0].name);
break;
default:
for(var i=0;i0) {
this.forEach(function(id) {
writer.append(id.name);
writer.append(", ");
});
writer.trimLast(2);
}
};
IdentifierList.prototype.toMDialect = function(writer) {
this.toODialect(writer);
};
exports.IdentifierList = IdentifierList;
/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {
var CategoryArgument = __webpack_require__(110).CategoryArgument;
var IdentifierList = __webpack_require__(111).IdentifierList;
var AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
var ConcreteCategoryDeclaration = null;
var utils = __webpack_require__(47);
exports.resolve = function() {
ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
}
function ExtendedArgument(type, id, attributes) {
CategoryArgument.call(this, type, id);
this.attributes = attributes;
return this;
}
ExtendedArgument.prototype = Object.create(CategoryArgument.prototype);
ExtendedArgument.prototype.constructor = ExtendedArgument;
ExtendedArgument.prototype.getProto = function() {
return this.type.name + '(' + this.attributes.toString() + ')';
};
ExtendedArgument.prototype.equals = function(obj) {
if(obj===this) {
return true;
}
if(obj===null || obj===undefined) {
return false;
}
if(!(obj instanceof ExtendedArgument)) {
return false;
}
return utils.equalObjects(this.type, obj.type) &&
this.name===obj.name &&
utils.equalArrays(this.attributes, obj.attributes);
};
ExtendedArgument.prototype.register = function(context) {
var actual = context.getRegisteredValue(this.name);
if(actual!==null) {
throw new SyntaxError("Duplicate argument: \"" + this.id.name + "\"");
}
var declaration = new ConcreteCategoryDeclaration(this.id, this.attributes, new IdentifierList(this.type.id), null);
context.registerDeclaration(declaration);
context.registerValue(this);
if(this.defaultExpression!=null)
context.setValue(this.id, this.defaultExpression.interpret(context));
};
ExtendedArgument.prototype.check = function(context) {
this.type.checkExists(context);
if(this.attributes!==null) {
this.attributes.forEach(function(attr) {
var actual = context.getRegisteredDeclaration(attr);
if (!actual instanceof AttributeDeclaration) {
throw new SyntaxError("Unknown attribute: \"" + attr + "\"");
}
});
}
};
ExtendedArgument.prototype.getType = function(context) {
return context.getRegisteredDeclaration(this.name).getType(context);
};
ExtendedArgument.prototype.toEDialect = function(writer) {
this.type.toDialect(writer);
writer.append(' ');
writer.append(this.name);
switch(this.attributes.length) {
case 0:
break;
case 1:
writer.append(" with attribute ");
this.attributes.toDialect(writer, false);
break;
default:
writer.append(" with attributes ");
this.attributes.toDialect(writer, true);
break;
}
};
ExtendedArgument.prototype.toODialect = function(writer) {
this.type.toDialect(writer);
writer.append('(');
this.attributes.toDialect(writer, false);
writer.append(')');
writer.append(' ');
writer.append(this.name);
};
ExtendedArgument.prototype.toMDialect = function(writer) {
writer.append(this.name);
writer.append(':');
this.type.toDialect(writer);
writer.append('(');
this.attributes.toDialect(writer, false);
writer.append(')');
};
exports.ExtendedArgument = ExtendedArgument;
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
var CodeType = __webpack_require__(114).CodeType;
var Argument = __webpack_require__(109).Argument;
function CodeArgument(id) {
Argument.call(this, id);
return this;
}
CodeArgument.prototype = Object.create(Argument.prototype);
CodeArgument.prototype.constructor = CodeArgument;
CodeArgument.prototype.getProto = function() {
return CodeType.instance.name;
};
CodeArgument.prototype.register = function(context) {
var actual = context.getRegisteredValue(this.name);
if(actual!=null) {
throw new SyntaxError("Duplicate argument: \"" + this.name + "\"");
}
context.registerValue(this);
};
CodeArgument.prototype.check = function(context) {
// ok
};
CodeArgument.prototype.getType = function(context) {
return CodeType.instance;
};
CodeArgument.prototype.toDialect = function(writer) {
writer.append(CodeType.instance.name);
writer.append(" ");
writer.append(this.name);
};
exports.CodeArgument = CodeArgument;
/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
function CodeType() {
NativeType.call(this, new Identifier("Code"));
return this;
}
CodeType.prototype = Object.create(NativeType.prototype);
CodeType.prototype.constructor = CodeType;
CodeType.instance = new CodeType();
/*
@Override
public Class> toJavaClass() {
return null;
}
*/
exports.CodeType = CodeType;
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
var ProblemCollector = __webpack_require__(116).ProblemCollector;
var AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
var AttributeArgument = __webpack_require__(108).AttributeArgument;
var MethodDeclarationMap = __webpack_require__(52).MethodDeclarationMap;
var MethodArgument = __webpack_require__(118).MethodArgument;
function UnresolvedArgument(id) {
this.id = id;
this.resolved = null;
return this;
}
Object.defineProperty(UnresolvedArgument.prototype, "name", {
get : function() {
return this.id.name;
}
});
UnresolvedArgument.prototype.toDialect = function(writer) {
writer.append(this.name);
};
UnresolvedArgument.prototype.check = function(context) {
this.resolveAndCheck(context);
};
UnresolvedArgument.prototype.getProto = function() {
return this.name;
};
UnresolvedArgument.prototype.getType = function(context) {
this.resolveAndCheck(context);
return this.resolved.getType(context);
};
UnresolvedArgument.prototype.register = function(context) {
this.resolveAndCheck(context);
this.resolved.register(context);
if(this.defaultExpression!=null)
context.setValue(this.name, this.defaultExpression.interpret(context));
};
UnresolvedArgument.prototype.checkValue = function(context, value) {
this.resolveAndCheck(context);
return this.resolved.checkValue(context, value);
}
UnresolvedArgument.prototype.resolveAndCheck = function(context) {
if(this.resolved!=null)
return;
// ignore problems during resolution
var listener = context.problemListener;
context.problemListener = new ProblemCollector();
// try out various solutions
var named = context.getRegisteredDeclaration(this.name);
if(named instanceof AttributeDeclaration) {
this.resolved = new AttributeArgument(this.id);
} else if(named instanceof MethodDeclarationMap) {
this.resolved = new MethodArgument(this.id);
}
// restore listener
context.problemListener = listener;
if(this.resolved==null)
context.problemListener.reportUnknownVariable(this.id);
};
exports.UnresolvedArgument = UnresolvedArgument;
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
/**
* Created by ericvergnaud on 14/09/15.
*/
var ProblemListener = __webpack_require__(117).ProblemListener;
function ProblemCollector() {
ProblemListener.call(this);
this.problems = [];
return this;
}
ProblemCollector.prototype = Object.create(ProblemListener.prototype);
ProblemCollector.prototype.constructor = ProblemCollector;
ProblemCollector.prototype.collectProblem = function(problem) {
this.problems.push(problem);
};
ProblemCollector.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
var problem = {
startLine: line,
startColumn: column,
endLine: line,
endColumn: column + ( offendingSymbol ? offendingSymbol.text.length : 0 ),
type: "error",
message: msg
};
;
this.collectProblem(problem);
};
ProblemCollector.prototype.reportDuplicate = function(name, declaration) {
var problem = this.readSection(declaration.id);
problem.type = "error";
problem.message = "Duplicate name: " + name;
this.collectProblem(problem);
};
ProblemCollector.prototype.reportUnknownAttribute = function(id) {
this.reportUnknown(id, "attribute");
};
ProblemCollector.prototype.reportUnknownCategory = function(id) {
this.reportUnknown(id, "category");
};
ProblemCollector.prototype.reportUnknownMethod = function(id) {
this.reportUnknown(id, "method");
};
ProblemCollector.prototype.reportUnknownVariable = function(id) {
this.reportUnknown(id, "variable");
};
ProblemCollector.prototype.reportUnknown = function(id, type) {
var problem = this.readSection(id);
problem.type = "error";
problem.message = "Unknown " + type + ": " + id.name;
this.collectProblem(problem);
};
ProblemCollector.prototype.reportNoMatchingPrototype = function(method) {
var problem = this.readSection(method);
problem.type = "error";
problem.message = "No matching prototype for: " + method.toString();
this.collectProblem(problem);
};
ProblemCollector.prototype.reportInvalidCast = function(expression, target, actual) {
var problem = this.readSection(expression);
problem.type = "error";
problem.message = "Cannot cast " + actual.toString() + " to " + target.toString();
this.collectProblem(problem);
};
ProblemCollector.prototype.readSection = function(section) {
/*if(!section.end)
return null;*/
return {
path : section.path,
startLine : section.start.line,
startColumn : section.start.column,
endLine : section.end.line,
endColumn : section.end.column
};
}
exports.ProblemCollector = ProblemCollector;
/***/ },
/* 117 */
/***/ function(module, exports, __webpack_require__) {
var antlr4 = __webpack_require__(1);
var SyntaxError = __webpack_require__(66).SyntaxError;
function ProblemListener() {
antlr4.error.ErrorListener.call(this);
return this;
}
ProblemListener.prototype = Object.create(antlr4.error.ErrorListener.prototype);
ProblemListener.prototype.constructor = ProblemListener;
ProblemListener.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
throw new SyntaxError(msg);
};
ProblemListener.prototype.reportDuplicate = function(name, declaration) {
throw new SyntaxError("Duplicate name: " + name);
};
ProblemListener.prototype.reportUnknownAttribute = function(id) {
throw new SyntaxError("Unknown attribute: " + id.name);
};
ProblemListener.prototype.reportUnknownCategory = function(id) {
throw new SyntaxError("Unknown category: " + id.name);
};
ProblemListener.prototype.reportUnknownIdentifier = function(id) {
throw new SyntaxError("Unknown identifier: " + id.name);
};
ProblemListener.prototype.reportUnknownMethod = function(id) {
throw new SyntaxError("Unknown method: " + id.name);
};
ProblemListener.prototype.reportUnknownVariable = function(id) {
throw new SyntaxError("Unknown variable: " + id.name);
};
ProblemListener.prototype.reportNoMatchingPrototype = function(method) {
throw new SyntaxError("No matching prototype for: " + method.toString());
};
ProblemListener.prototype.reportNotAResource = function(method) {
throw new SyntaxError("Not a resource");
};
ProblemListener.prototype.reportNotAResourceContext = function(method) {
throw new SyntaxError("Not a resource context");
};
ProblemListener.prototype.reportInvalidCast = function(expression, target, actual) {
throw new SyntaxError("Cannot cast " + actual.toString() + " to " + target.toString());
};
exports.ProblemListener = ProblemListener;
/***/ },
/* 118 */
/***/ function(module, exports, __webpack_require__) {
var Argument = __webpack_require__(109).Argument;
var MethodType = __webpack_require__(119).MethodType;
function MethodArgument(id) {
Argument.call(this, id);
return this;
}
MethodArgument.prototype = Object.create(Argument.prototype);
MethodArgument.prototype.constructor = MethodArgument;
MethodArgument.prototype.getSignature = function(dialect) {
return this.name;
};
MethodArgument.prototype.toString = function() {
return this.name;
};
MethodArgument.prototype.getProto = function() {
return this.name;
};
MethodArgument.prototype.register = function(context) {
var actual = context.getRegisteredValue(this.name);
if(actual!=null) {
throw new SyntaxError("Duplicate argument: \"" + this.name + "\"");
}
context.registerValue(this);
};
MethodArgument.prototype.check = function(context) {
var actual = context.getRegisteredDeclaration(this.name);
if(actual==null) {
throw new SyntaxError("Unknown method: \"" + this.name + "\"");
}
};
MethodArgument.prototype.getType = function(context) {
var method = this.getDeclaration(context);
return new MethodType(method);
};
MethodArgument.prototype.getDeclaration = function(context) {
var methods = context.getRegisteredDeclaration(this.name);
if (methods)
return methods.getFirst();
else
return null;
};
exports.MethodArgument = MethodArgument;
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
function MethodType(method) {
BaseType.call(this, method.id);
this.method = method;
return this;
}
MethodType.prototype = Object.create(BaseType.prototype);
MethodType.prototype.constructor = MethodType;
MethodType.prototype.equals = function(other) {
return (other==this) ||
((other instanceof MethodType) && (this.method.getProto()==other.method.getProto()));
};
MethodType.prototype.checkUnique = function(context) {
var actual = context.getRegisteredDeclaration(this.name);
if (actual != null) {
throw new SyntaxError("Duplicate name: \"" + this.name + "\"");
}
};
exports.MethodType = MethodType;
/***/ },
/* 120 */
/***/ function(module, exports, __webpack_require__) {
exports.MatchingPatternConstraint = __webpack_require__(121).MatchingPatternConstraint;
exports.MatchingCollectionConstraint = __webpack_require__(145).MatchingCollectionConstraint;
exports.MatchingExpressionConstraint = __webpack_require__(146).MatchingExpressionConstraint;
/***/ },
/* 121 */
/***/ function(module, exports, __webpack_require__) {
var InvalidDataError = __webpack_require__(122).InvalidDataError;
function MatchingPatternConstraint(expression) {
this.expression = expression;
this.pattern = null;
return this;
}
MatchingPatternConstraint.prototype.checkValue = function(context, value) {
if(this.pattern==null) {
var toMatch = this.expression.interpret(context);
this.pattern = new RegExp(toMatch);
}
if(!this.pattern.test(value.toString())) {
throw new InvalidDataError(value.toString() + " does not match:" + this.pattern.toString());
}
};
MatchingPatternConstraint.prototype.toDialect = function(writer) {
writer.append(" matching ");
this.expression.toDialect(writer);
}
exports.MatchingPatternConstraint = MatchingPatternConstraint;
/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {
var ExecutionError = __webpack_require__(86).ExecutionError;
var TextLiteral = __webpack_require__(123).TextLiteral;
function InvalidDataError(message) {
ExecutionError.call(this, message);
return this;
}
InvalidDataError.prototype = Object.create(ExecutionError.prototype);
InvalidDataError.prototype.constructor = InvalidDataError;
InvalidDataError.prototype.getExpression = function(context) {
return new TextLiteral("'" + this.message + "'");
};
exports.InvalidDataError = InvalidDataError;
/***/ },
/* 123 */
/***/ function(module, exports, __webpack_require__) {
var Literal = __webpack_require__(124).Literal;
var Text = __webpack_require__(76).Text;
var TextType = __webpack_require__(125).TextType;
/*jshint evil:true*/
function unescape(text) {
return eval(text);
}
function TextLiteral(text) {
Literal.call(this, text, new Text(unescape(text)));
return this;
}
TextLiteral.prototype = Object.create(Literal.prototype);
TextLiteral.prototype.constructor = TextLiteral;
TextLiteral.prototype.check = function(context) {
return TextType.instance;
};
exports.TextLiteral = TextLiteral;
/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
function Literal(text, value) {
Section.call(this);
this.text = text;
this.value = value;
return this;
}
Literal.prototype = Object.create(Section.prototype);
Literal.prototype.constructor = Section;
Literal.prototype.toDialect = function(writer) {
writer.append(this.text);
};
Literal.prototype.toString = function() {
return this.text;
};
Literal.prototype.getValue = function() {
return this.value;
};
Literal.prototype.interpret = function(context) {
return this.value;
};
exports.Literal = Literal;
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
var BuiltInMethodDeclaration = null;
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
var CharacterType = null;
var ListType = null;
var IntegerType = __webpack_require__(81).IntegerType;
var BooleanType = __webpack_require__(69).BooleanType;
var AnyType = __webpack_require__(71).AnyType;
var Identifier = __webpack_require__(70).Identifier;
var Text = null; // circular dependency
var CategoryArgument = __webpack_require__(110).CategoryArgument;
var TextLiteral = null;
var ListValue = null;
exports.resolve = function() {
CharacterType = __webpack_require__(126).CharacterType;
ListType = __webpack_require__(68).ListType;
TextLiteral = __webpack_require__(123).TextLiteral;
ListValue = __webpack_require__(128).ListValue;
Text = __webpack_require__(76).Text;
resolveBuiltInMethodDeclaration();
}
function TextType() {
NativeType.call(this, new Identifier("Text"));
return this;
}
TextType.prototype = Object.create(NativeType.prototype);
TextType.prototype.constructor = TextType;
TextType.instance = new TextType();
TextType.prototype.isAssignableFrom = function(context, other) {
return NativeType.prototype.isAssignableFrom.call(this, context, other)
|| (other == CharacterType.instance);
};
TextType.prototype.checkAdd = function(context, other, tryReverse) {
// can add anything to text
return this;
};
TextType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return TextType.instance;
}
return NativeType.prototype.checkMultiply.call(this, context, other, tryReverse);
};
TextType.prototype.checkCompare = function(context, other) {
if(other instanceof TextType || other instanceof CharacterType) {
return BooleanType.instance;
}
return NativeType.prototype.checkCompare.call(this, context, other);
};
TextType.prototype.checkItem = function(context, other) {
if(other==IntegerType.instance) {
return CharacterType.instance;
} else {
return NativeType.prototype.checkItem.call(this, context, other);
}
};
TextType.prototype.checkMember = function(context, name) {
if ("count"==name) {
return IntegerType.instance;
} else {
return NativeType.prototype.checkMember.call(this, context, name);
}
};
TextType.prototype.checkContains = function(context, other) {
if(other instanceof TextType || other instanceof CharacterType) {
return BooleanType.instance;
}
return NativeType.prototype.checkContains.call(this, context, other);
};
TextType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
};
TextType.prototype.checkSlice = function(context) {
return this;
};
TextType.prototype.convertJavaScriptValueToPromptoValue = function(context, value, returnType) {
if (typeof(value) == 'string') {
return new Text(value);
} else {
return value; // TODO for now
}
}
TextType.prototype.getMemberMethods = function(context, name) {
switch (name) {
case "toLowerCase":
return [new ToLowerCaseMethodDeclaration()];
case "toUpperCase":
return [new ToUpperCaseMethodDeclaration()];
case "toCapitalized":
return [new ToCapitalizedMethodDeclaration()];
case "trim":
return [new TrimMethodDeclaration()];
case "split":
return [new SplitMethodDeclaration()];
default:
return NativeType.prototype.getMemberMethods.call(context, name);
}
};
function ToLowerCaseMethodDeclaration() {
BuiltInMethodDeclaration.call(this, "toLowerCase");
return this;
}
function ToUpperCaseMethodDeclaration() {
BuiltInMethodDeclaration.call(this, "toUpperCase");
return this;
}
function TrimMethodDeclaration() {
BuiltInMethodDeclaration.call(this, "trim");
return this;
}
function ToCapitalizedMethodDeclaration() {
BuiltInMethodDeclaration.call(this, "toCapitalized");
return this;
}
function SplitMethodDeclaration() {
BuiltInMethodDeclaration.call(this, "split", new CategoryArgument(TextType.instance, new Identifier("separator"), new TextLiteral('" "')));
return this;
}
function resolveBuiltInMethodDeclaration() {
BuiltInMethodDeclaration = __webpack_require__(132).BuiltInMethodDeclaration;
ToLowerCaseMethodDeclaration.prototype = Object.create(BuiltInMethodDeclaration.prototype);
ToLowerCaseMethodDeclaration.prototype.constructor = ToLowerCaseMethodDeclaration;
ToLowerCaseMethodDeclaration.prototype.interpret = function(context) {
var value = this.getValue(context).getStorableData();
return new Text(value.toLowerCase());
};
ToLowerCaseMethodDeclaration.prototype.check = function(context) {
return TextType.instance;
};
ToUpperCaseMethodDeclaration.prototype = Object.create(BuiltInMethodDeclaration.prototype);
ToUpperCaseMethodDeclaration.prototype.constructor = ToUpperCaseMethodDeclaration;
ToUpperCaseMethodDeclaration.prototype.interpret = function(context) {
var value = this.getValue(context).getStorableData();
return new Text(value.toUpperCase());
};
ToUpperCaseMethodDeclaration.prototype.check = function(context) {
return TextType.instance;
};
ToCapitalizedMethodDeclaration.prototype = Object.create(BuiltInMethodDeclaration.prototype);
ToCapitalizedMethodDeclaration.prototype.constructor = ToCapitalizedMethodDeclaration;
ToCapitalizedMethodDeclaration.prototype.interpret = function(context) {
var value = this.getValue(context).getStorableData();
value = value.replace( /(^|\s)([a-z])/g , function(m, p1, p2){ return p1 + p2.toUpperCase(); } );
return new Text(value);
};
ToCapitalizedMethodDeclaration.prototype.check = function(context) {
return TextType.instance;
};
TrimMethodDeclaration.prototype = Object.create(BuiltInMethodDeclaration.prototype);
TrimMethodDeclaration.prototype.constructor = TrimMethodDeclaration;
TrimMethodDeclaration.prototype.interpret = function(context) {
var value = this.getValue(context).getStorableData();
value = value.trim();
return new Text(value);
};
TrimMethodDeclaration.prototype.check = function(context) {
return TextType.instance;
};
SplitMethodDeclaration.prototype = Object.create(BuiltInMethodDeclaration.prototype);
SplitMethodDeclaration.prototype.constructor = SplitMethodDeclaration;
SplitMethodDeclaration.prototype.interpret = function(context) {
var value = this.getValue(context).getStorableData();
var sep = context.getValue(new Identifier("separator")).getStorableData();
var list = value.split(sep);
var texts = list.map(function(s) { return new Text(s); });
return new ListValue(TextType.instance, texts);
};
SplitMethodDeclaration.prototype.check = function(context) {
return new ListType(TextType.instance);
};
}
exports.TextType = TextType;
/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var BooleanType = __webpack_require__(69).BooleanType;
var IntegerType = __webpack_require__(81).IntegerType;
var TextType = __webpack_require__(125).TextType;
var AnyType = __webpack_require__(71).AnyType;
var Character = null;
var RangeType = __webpack_require__(82).RangeType;
var CharacterRange = __webpack_require__(127).CharacterRange;
var Identifier = __webpack_require__(70).Identifier;
exports.resolve = function() {
Character = __webpack_require__(77).Character;
};
function CharacterType() {
NativeType.call(this, new Identifier("Character"));
return this;
}
CharacterType.prototype = Object.create(NativeType.prototype);
CharacterType.prototype.constructor = CharacterType;
CharacterType.instance = new CharacterType();
CharacterType.prototype.nativeCast = function(context, value) {
if(value.type instanceof TextType && value.value.length>=1)
return new Character(value.value.substring(0, 1));
else
throw new InvalidDataError("Cannot convert " + value.toString() + " to Character");
};
CharacterType.prototype.checkMember = function(context, name) {
if ("codePoint"==name) {
return IntegerType.instance;
} else {
return NativeType.prototype.checkMember.call(this, context, name);
}
};
CharacterType.prototype.checkAdd = function(context, other, tryReverse) {
return TextType.instance;
};
CharacterType.prototype.checkMultiply = function(context, other, tryReverse) {
if(other instanceof IntegerType) {
return TextType.instance;
}
return NativeType.prototype.checkMultiply.apply(this, context, other, tryReverse);
};
CharacterType.prototype.checkCompare = function(context, other) {
if(other instanceof CharacterType || other instanceof TextType) {
return BooleanType.instance;
}
return NativeType.prototype.checkCompare.apply(this, context, other);
};
CharacterType.prototype.checkRange = function(context, other) {
if(other instanceof CharacterType) {
return new RangeType(this);
} else {
return NativeType.prototype.checkRange.call(this, context, other);
}
};
CharacterType.prototype.newRange = function(left, right) {
if(left instanceof Character && right instanceof Character) {
return new CharacterRange(left, right);
} else {
return CharacterType.prototype.newRange.call(this, left, right);
}
};
exports.CharacterType = CharacterType;
/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {
var Range = __webpack_require__(84).Range;
var Integer = __webpack_require__(78).Integer;
var Character = null;
var CharacterType = null;
exports.resolve = function() {
Character = __webpack_require__(77).Character;
CharacterType = __webpack_require__(126).CharacterType;
}
function CharacterRange(left, right) {
Range.call(this, CharacterType.instance, left, right);
return this;
}
CharacterRange.prototype = Object.create(Range.prototype);
CharacterRange.prototype.constructor = CharacterRange;
CharacterRange.prototype.size = function() {
return 1 + this.high.value.charCodeAt(0) - this.low.value.charCodeAt(0);
};
CharacterRange.prototype.getItem = function(index) {
var result = this.low.value.charCodeAt(0) + index - 1;
if(result>this.high.value.charCodeAt(0)) {
throw new IndexOutOfBoundsException();
} else {
return new Character(String.fromCharCode(result));
}
};
/*
@Override
public Range newInstance(Character left, Character right) {
return new CharacterRange(left, right);
}
*/
exports.CharacterRange = CharacterRange;
/***/ },
/* 128 */
/***/ function(module, exports, __webpack_require__) {
var BaseValueList = __webpack_require__(129).BaseValueList;
var Bool = __webpack_require__(72).Bool;
var Integer = __webpack_require__(78).Integer;
var ListType = null;
var SetValue = null;
exports.resolve = function() {
ListType = __webpack_require__(68).ListType;
SetValue = __webpack_require__(130).SetValue;
};
function ListValue(itemType, items, item, mutable) {
BaseValueList.call(this, new ListType(itemType), items, item, mutable);
this.storables = null;
return this;
}
ListValue.prototype = Object.create(BaseValueList.prototype);
ListValue.prototype.constructor = ListValue;
ListValue.prototype.newInstance = function(items) {
return new ListValue(this.type.itemType, items);
};
ListValue.prototype.getStorableData = function() {
if(this.storables == null)
this.storables = this.items.map(function(item) {
return item.getStorableData();
});
return this.storables;
};
ListValue.prototype.collectStorables = function(list) {
this.items.map(function(item) {
item.collectStorables(list);
});
};
ListValue.prototype.Add = function(context, value) {
if (value instanceof ListValue) {
var items = this.items.concat(value.items);
return new ListValue(this.type.itemType, items);
} else if(value instanceof SetValue) {
var items = this.items.concat([]);
for(var name in value.items) {
items.push(value.items[name]);
}
return new ListValue(this.type.itemType, items);
} else {
return BaseValueList.prototype.Add.apply(this, context, value);
}
};
ListValue.prototype.Multiply = function(context, value) {
if (value instanceof Integer) {
var count = value.value;
if (count < 0) {
throw new SyntaxError("Negative repeat count:" + count);
} else if (count == 0) {
return new ListValue(this.type.itemType);
} else if (count == 1) {
return this;
} else {
var items = [];
while(--count>=0) {
items = items.concat(this.items);
}
return new ListValue(this.type.itemType, items);
}
} else {
return BaseValueList.prototype.Multiply.apply(this, context, value);
}
};
ListValue.prototype.toDialect = function(writer) {
writer.append('[');
BaseValueList.prototype.toDialect.call(this, writer);
writer.append(']');
};
ListValue.prototype.filter = function(context, itemId, filter) {
var result = new ListValue(this.type.itemType);
var iter = this.getIterator(context);
while(iter.hasNext()) {
var o = iter.next();
context.setValue(itemId, o);
var test = filter.interpret(context);
if(!(test instanceof Bool)) {
throw new InternalError("Illegal test result: " + test);
}
if(test.value) {
result.add(o);
}
}
return result;
}
exports.ListValue = ListValue;
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var Container = __webpack_require__(73).Container;
var Integer = __webpack_require__(78).Integer;
var PromptoError = __webpack_require__(61).PromptoError;
var InternalError = __webpack_require__(60).InternalError;
var IndexOutOfRangeError = __webpack_require__(85).IndexOutOfRangeError;
/* an abstract list of values, common to ListValue and TupleValue */
function BaseValueList(type, items, item, mutable) {
Container.call(this, type);
this.items = items || [];
item = item || null;
if(item!==null) {
this.add(item);
}
this.mutable = mutable || false;
return this;
}
BaseValueList.prototype = Object.create(Container.prototype);
BaseValueList.prototype.constructor = BaseValueList;
BaseValueList.prototype.toString = function() {
return "[" + this.items.join(", ") + "]";
};
BaseValueList.prototype.add = function(o) {
this.items.push(o);
};
BaseValueList.prototype.setItem = function(index, value) {
this.items[index] = value;
};
BaseValueList.prototype.setItemInContext = function(context, index, value) {
if (index instanceof Integer) {
var idx = index.IntegerValue() - 1;
if (idx > this.items.length) {
throw new IndexOutOfRangeError();
}
this.items[idx] = value;
} else
throw new SyntaxError("No such item:" + index.toString())
};
BaseValueList.prototype.get = function(index) {
return this.items[index];
};
BaseValueList.prototype.size = function() {
return this.items.length;
};
BaseValueList.prototype.isEmpty = function() {
return this.items.length===0;
};
BaseValueList.prototype.slice = function(fi, li) {
var first = this.checkFirst(fi);
var last = this.checkLast(li);
var items = this.items.slice(first-1,last);
return this.newInstance(items);
};
BaseValueList.prototype.checkFirst = function(fi) {
var value = (fi == null) ? 1 : fi.IntegerValue();
if (value < 1 || value > this.items.length) {
throw new IndexOutOfRangeError();
}
return value;
};
BaseValueList.prototype.checkLast = function(li) {
var value = (li == null) ? this.items.length : li.IntegerValue();
if (value < 0) {
value = this.items.length + 1 + li.IntegerValue();
}
if (value < 1 || value > this.items.length) {
throw new IndexOutOfRangeError();
}
return value;
};
BaseValueList.prototype.hasItem = function(context, lval) {
for (var i=0;ithis.items.length) {
throw new IndexOutOfRangeError();
}
var value = this.items[idx] || null;
if(value==null) {
return null;
}
if (value instanceof Value) {
return value;
} else {
throw new InternalError("Item not a value!");
}
} catch (e) {
if(e instanceof PromptoError) {
throw e;
} else {
throw new InternalError(e.toString());
}
}
} else
throw new SyntaxError("No such item:" + index.toString());
};
BaseValueList.prototype.equals = function(obj) {
if(obj instanceof BaseValueList) {
if(this.items.length!=obj.items.length) {
return false;
} else {
for(var i=0;i0) {
this.items.forEach(function(o) {
if(o.toDialect)
o.toDialect(writer);
else
writer.append(o.toString());
writer.append(", ");
});
writer.trimLast(2);
}
};
BaseValueList.prototype.toJson = function(context, json, instanceId, fieldName, withType, binaries) {
var values = [];
this.items.map(function(item) {
item.toJson(context, values, instanceId, fieldName, withType, binaries);
});
if(Array.isArray(json))
json.push(values);
else
json[fieldName] = values;
};
exports.BaseValueList = BaseValueList;
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
var Bool = __webpack_require__(72).Bool;
var Value = __webpack_require__(73).Value;
var Integer = __webpack_require__(78).Integer;
var SetType = __webpack_require__(131).SetType;
var ListValue = null;
exports.resolve = function() {
SetType = __webpack_require__(131).SetType;
ListValue = __webpack_require__(128).ListValue;
};
function SetValue(itemType, items) {
Value.call(this, new SetType(itemType));
this.itemType = null;
this.items = items || {};
return this;
}
SetValue.prototype = Object.create(Value.prototype);
SetValue.prototype.constructor = SetValue;
SetValue.prototype.addAll = function(items) {
for(var p in items) {
this.add(items[p]);
}
};
SetValue.prototype.toString = function() {
var names = Object.getOwnPropertyNames(this.items);
var values = names.map(function(name) { return this.items[name]; }, this);
return "<" + values.join(", ") + ">";
};
SetValue.prototype.add = function(item) {
var key = item.type.id.name + ":" + item.toString();
this.items[key] = item;
};
SetValue.prototype.size = function() {
var n = 0;
for(var p in this.items) {
n += 1;
}
return n;
};
SetValue.prototype.getMemberValue = function(context, name) {
if ("count"==name) {
return new Integer(this.size());
} else {
return Value.prototype.getMemberValue.call(this, context, name);
}
};
SetValue.prototype.isEmpty = function() {
for(var p in this.items) {
return false;
}
return true;
};
SetValue.prototype.hasItem = function(context, item) {
var key = item.type.id.name + ":" + item.toString();
return key in this.items;
};
SetValue.prototype.getItemInContext = function(context, index) {
if (index instanceof Integer) {
try {
var idx = index.IntegerValue();
for(var p in this.items) {
if(--idx==0)
return this.items[p];
}
throw new IndexOutOfRangeError();
} catch (e) {
if(e instanceof PromptoError) {
throw e;
} else {
throw new InternalError(e.toString());
}
}
} else
throw new SyntaxError("No such item:" + index.toString());
};
SetValue.prototype.Add = function(context, value) {
if (value instanceof SetValue || value instanceof ListValue) {
var result = new SetValue(this.type.itemType);
result.addAll(this.items);
result.addAll(value.items);
return result;
} else {
return Value.prototype.Add.apply(this, context, value);
}
};
SetValue.prototype.filter = function(context, itemId, filter) {
var result = new SetValue(this.type.itemType);
var iter = this.getIterator(context);
while(iter.hasNext()) {
var o = iter.next();
context.setValue(itemId, o);
var test = filter.interpret(context);
if(!(test instanceof Bool)) {
throw new InternalError("Illegal test result: " + test);
}
if(test.value) {
result.add(o);
}
}
return result;
}
SetValue.prototype.getIterator = function(context) {
return new SetIterator(this.items, context);
};
SetValue.prototype.equals = function(obj) {
if(obj instanceof SetValue) {
for(var p in this.items) {
var v1 = this.items[p];
var v2 = obj.items[p];
if(v1==v2) {
continue;
} else if(v1==null || v2==null) {
return false;
} else {
if(v1.equals) {
if(!v1.equals(v2)) {
return false;
}
} else if(v2.equals) {
if(!v2.equals(v1)) {
return false;
}
} else {
return false;
}
}
}
return true;
} else {
return false;
}
};
function SetIterator(items, context) {
this.items = items;
this.names = Object.getOwnPropertyNames(items);
this.context = context;
this.index = -1;
return this;
}
SetIterator.prototype.hasNext = function () {
return this.index < this.names.length - 1;
}
SetIterator.prototype.next = function() {
return this.items[this.names[++this.index]];
};
exports.SetValue = SetValue;
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
var ContainerType = __webpack_require__(62).ContainerType;
var ListType = __webpack_require__(68).ListType;
var IntegerType = __webpack_require__(81).IntegerType;
var BooleanType = __webpack_require__(69).BooleanType;
var Identifier = __webpack_require__(70).Identifier;
function SetType(itemType) {
ContainerType.call(this, new Identifier(itemType.name+"<>"), itemType);
this.itemType = itemType;
return this;
}
SetType.prototype = Object.create(ContainerType.prototype);
SetType.prototype.constructor = SetType;
SetType.prototype.equals = function(obj) {
if(obj===this) {
return true;
}
if(obj===null) {
return false;
}
if(!(obj instanceof SetType)) {
return false;
}
return this.itemType.equals(obj.itemType);
};
SetType.prototype.checkAdd = function(context, other, tryReverse) {
if((other instanceof SetType || other instanceof ListType)
&& this.itemType.equals(other.itemType, tryReverse)) {
return this;
} else {
return ContainerType.prototype.checkAdd.call(this, context, other);
}
};
SetType.prototype.checkItem = function(context, other) {
if(other==IntegerType.instance) {
return this.itemType;
} else {
return ContainerType.prototype.checkItem.call(this, context, other);
}
};
SetType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
}
SetType.prototype.checkIterator = function(context) {
return this.itemType;
}
SetType.prototype.checkMember = function(context, name) {
if ("count" == name) {
return IntegerType.instance;
} else {
return ContainerType.prototype.checkMember.call(this, context, name);
}
};
SetType.prototype.isAssignableFrom = function(context, other) {
return ContainerType.prototype.isAssignableFrom.call(this, context, other)
|| ((other instanceof SetType) && this.itemType.isAssignableFrom(context, other.itemType));
};
exports.SetType = SetType;
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
var BaseMethodDeclaration = __webpack_require__(133).BaseMethodDeclaration;
var ArgumentList = __webpack_require__(134).ArgumentList;
var BuiltInContext = __webpack_require__(52).BuiltInContext;
function BuiltInMethodDeclaration(name, arg) {
var args = arg ? new ArgumentList(arg) : null;
BaseMethodDeclaration.call(this, name, args);
return this;
}
BuiltInMethodDeclaration.prototype = Object.create(BaseMethodDeclaration.prototype);
BuiltInMethodDeclaration.prototype.constructor = BuiltInMethodDeclaration;
BuiltInMethodDeclaration.prototype.getValue = function(context) {
while (context) {
if (context instanceof BuiltInContext)
return context.value;
context = context.getParentContext();
}
throw new InternalError("Could not locate context for built-in value!");
};
exports.BuiltInMethodDeclaration = BuiltInMethodDeclaration;
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
var BaseDeclaration = __webpack_require__(57).BaseDeclaration;
var ArgumentList = __webpack_require__(134).ArgumentList;
var CategoryType = null;
var PromptoError = __webpack_require__(61).PromptoError;
var ArgumentAssignmentList = __webpack_require__(97).ArgumentAssignmentList;
var ArgumentAssignment = __webpack_require__(135).ArgumentAssignment;
var Specificity = __webpack_require__(144).Specificity;
exports.resolve = function() {
CategoryType = __webpack_require__(90).CategoryType;
}
function BaseMethodDeclaration(id, args, returnType) {
BaseDeclaration.call(this, id);
this.memberOf = null;
this.args = args || new ArgumentList();
this.returnType = returnType || null;
return this;
}
BaseMethodDeclaration.prototype = Object.create(BaseDeclaration.prototype);
BaseMethodDeclaration.prototype.constructor = BaseMethodDeclaration;
BaseMethodDeclaration.prototype.getDeclarationType = function() {
return "Method";
};
BaseMethodDeclaration.prototype.getSignature = function(context) {
var s = [];
this.args.map(function(arg) {
s.push(arg.getProto());
});
return "(" + s.join(", ") + ")";
};
BaseMethodDeclaration.prototype.getProto = function(context) {
return this.args.map(function(arg) {
return arg.getProto(context);
}).join("/");
};
BaseMethodDeclaration.prototype.unregister = function(context) {
context.unregisterMethodDeclaration (this, this.getProto(context));
};
BaseMethodDeclaration.prototype.register = function(context) {
context.registerMethodDeclaration(this);
};
BaseMethodDeclaration.prototype.registerArguments = function(context) {
if(this.args!=null) {
this.args.register(context);
}
};
BaseMethodDeclaration.prototype.isAssignableTo = function(context, assignments, checkInstance) {
try {
var local = context.newLocalContext();
this.registerArguments(local);
var assignmentsList = new ArgumentAssignmentList(assignments);
for(var i=0;i=0 ? assignmentsList[idx] : null;
if(assignment==null) { // missing argument
if(argument.defaultExpression!=null)
assignment = new ArgumentAssignment(argument, argument.defaultExpression);
else
return false;
}
if(!this.isAssignableToArgument(local, argument, assignment, checkInstance)) {
return false;
}
if(idx>=0)
assignmentsList.remove(idx);
}
return assignmentsList.length===0;
} catch (e) {
if(e instanceof SyntaxError) {
return false;
} else {
throw e;
}
}
};
BaseMethodDeclaration.prototype.isAssignableToArgument = function(context, argument, assignment, checkInstance) {
return this.computeSpecificity(context, argument, assignment, checkInstance)!==Specificity.INCOMPATIBLE;
};
BaseMethodDeclaration.prototype.computeSpecificity = function(context, argument, assignment, checkInstance) {
try {
var required = argument.getType(context);
var actual = assignment.expression.check(context);
// retrieve actual runtime type
if(checkInstance && (actual instanceof CategoryType)) {
var value = assignment.expression.interpret(context.getCallingContext());
if(value && value.getType) {
actual = value.getType();
}
}
if(actual.equals(required)) {
return Specificity.EXACT;
} else if(required.isAssignableFrom(context, actual)) {
return Specificity.INHERITED;
}
actual = assignment.resolve(context,this,checkInstance).check(context);
if(required.isAssignableFrom(context, actual)) {
return Specificity.RESOLVED;
}
} catch(error) {
if(!(error instanceof PromptoError )) {
throw error;
}
}
return Specificity.INCOMPATIBLE;
};
BaseMethodDeclaration.prototype.isEligibleAsMain = function() {
return false;
};
exports.BaseMethodDeclaration = BaseMethodDeclaration;
/***/ },
/* 134 */
/***/ function(module, exports, __webpack_require__) {
var ObjectList = __webpack_require__(49).ObjectList;
function ArgumentList(item) {
ObjectList.call(this);
item = item || null;
if(item!==null) {
this.add(item);
}
return this;
}
ArgumentList.prototype = Object.create(ObjectList.prototype);
ArgumentList.prototype.constructor = ArgumentList;
ArgumentList.prototype.register = function(context) {
this.forEach(function(arg) {
arg.register(context);
});
};
ArgumentList.prototype.check = function(context) {
this.forEach(function(arg) {
arg.check(context);
});
};
ArgumentList.prototype.find = function(name) {
for(var i=0;i1) {
writer.trimLast(2);
writer.append(" and ");
}
this[this.length-1].toDialect(writer);
writer.append(" ");
};
ArgumentList.prototype.toODialect = function(writer) {
if(this.length>0) {
this.forEach(function(arg) {
arg.toDialect(writer);
writer.append(", ");
});
writer.trimLast(2);
}
};
ArgumentList.prototype.toMDialect = function(writer) {
this.toODialect(writer);
};
exports.ArgumentList = ArgumentList;
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
var ContextualExpression = __webpack_require__(136).ContextualExpression;
var CategoryType = null;
var MemberSelector = __webpack_require__(137).MemberSelector;
var Variable = __webpack_require__(88).Variable;
var VoidType = __webpack_require__(143).VoidType;
exports.resolve = function() {
CategoryType = __webpack_require__(90).CategoryType;
}
function ArgumentAssignment(argument, expression) {
this.argument = argument;
this.expression = expression;
return this;
}
Object.defineProperty(ArgumentAssignment.prototype, "id", {
get : function() {
return this.argument.id;
}
});
Object.defineProperty(ArgumentAssignment.prototype, "name", {
get : function() {
return this.argument.name;
}
});
// needed for error reporting
Object.defineProperty(ArgumentAssignment.prototype, "end", {
get : function() {
return this.expression.end;
}
});
ArgumentAssignment.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
ArgumentAssignment.prototype.toODialect = function(writer) {
if(this.argument!=null) {
writer.append(this.argument.name);
writer.append(" = ");
}
this.expression.toDialect(writer);
};
ArgumentAssignment.prototype.toMDialect = function(writer) {
if(this.argument!=null) {
writer.append(this.argument.name);
writer.append(" = ");
}
this.expression.toDialect(writer);
};
ArgumentAssignment.prototype.toEDialect = function(writer) {
this.expression.toDialect(writer);
if(this.argument!=null) {
writer.append(" as ");
writer.append(this.argument.name);
}
};
ArgumentAssignment.prototype.toString = function() {
if(this.argument===null) {
return this.expression.toString();
} else {
return this.name + " = " + this.expression.toString();
}
};
ArgumentAssignment.prototype.equals = function(obj) {
if(obj==this) {
return true;
} else if(obj==null) {
return false;
} else if(!(obj instanceof ArgumentAssignment)) {
return false;
} else {
return this.argument.equals(obj.argument) &&
this.expression.equals(other.expression);
}
};
ArgumentAssignment.prototype.check = function(context) {
var actual = context.getRegisteredValue(this.argument.name);
if(actual==null) {
var actualType = this.expression.check(context);
context.registerValue(new Variable(this.argument.id, actualType));
} else {
// need to check type compatibility
var actualType = actual.getType(context);
var newType = this.expression.check(context);
actualType.checkAssignableFrom(context, newType);
}
return VoidType.instance;
};
ArgumentAssignment.prototype.evaluate = function(context) {
if(context.getRegisteredValue(this.argument.name)==null) {
context.registerValue(new Variable(this.argument.name, this.expression));
}
context.setValue(this.argument.name, this.expression.interpret(context));
return null;
};
ArgumentAssignment.prototype.resolve = function(context, methodDeclaration, checkInstance) {
// since we support implicit members, it's time to resolve them
var name = this.argument.name;
var expression = this.expression;
var argument = methodDeclaration.args.find(name);
var required = argument.getType(context);
var actual = expression.check(context.getCallingContext());
if(checkInstance && actual instanceof CategoryType) {
var value = expression.interpret(context.getCallingContext());
if(value && value.getType) {
actual = value.getType();
}
}
if(!required.isAssignableFrom(context, actual) && (actual instanceof CategoryType)) {
expression = new MemberSelector(expression, this.argument.id);
}
return expression;
};
ArgumentAssignment.prototype.makeAssignment = function(context, declaration) {
var argument = this.argument;
// when 1st argument, can be unnamed
if(argument===null) {
if(declaration.args.length==0) {
throw new SyntaxError("Method has no argument");
}
argument = declaration.args[0];
} else {
argument = declaration.args.find(this.name);
}
if(argument==null) {
throw new SyntaxError("Method has no argument:" + this.name);
}
var expression = new ContextualExpression(context,this.expression);
return new ArgumentAssignment(argument,expression);
};
exports.ArgumentAssignment = ArgumentAssignment;
/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function ContextualExpression(calling, expression) {
Value.call(this, null); // TODO check that this is not a problem
this.calling = calling;
this.expression = expression;
return this;
}
ContextualExpression.prototype = Object.create(Value.prototype);
ContextualExpression.prototype.constructor = ContextualExpression;
ContextualExpression.prototype.toDialect = function(dialect) {
return this.expression.toDialect(dialect);
};
ContextualExpression.prototype.check = function(context) {
return this.expression.check(this.calling);
};
ContextualExpression.prototype.interpret = function(context) {
return this.expression.interpret(this.calling);
};
exports.ContextualExpression = ContextualExpression;
/***/ },
/* 137 */
/***/ function(module, exports, __webpack_require__) {
var SelectorExpression = __webpack_require__(138).SelectorExpression;
var UnresolvedIdentifier = null;
var SymbolExpression = __webpack_require__(139).SymbolExpression;
var TypeExpression = __webpack_require__(140).TypeExpression;
var NullReferenceError = __webpack_require__(142).NullReferenceError;
var EnumeratedCategoryType = null;
var CategoryType = null;
var NullValue = __webpack_require__(74).NullValue;
var Value = __webpack_require__(73).Value;
var Text = __webpack_require__(76).Text;
exports.resolve = function() {
UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
EnumeratedCategoryType = __webpack_require__(89).EnumeratedCategoryType;
CategoryType = __webpack_require__(90).CategoryType;
}
function MemberSelector(parent, id) {
SelectorExpression.call(this, parent);
this.id = id;
return this;
}
MemberSelector.prototype = Object.create(SelectorExpression.prototype);
MemberSelector.prototype.constructor = MemberSelector;
Object.defineProperty(MemberSelector.prototype, "name", {
get : function() {
return this.id.name;
}
});
MemberSelector.prototype.toDialect = function(writer) {
// ensure singletons are not treated as constructors
try {
this.resolveParent(writer.context);
} catch(e) {
// ignore
}
this.parent.toDialect(writer);
writer.append(".");
writer.append(this.name);
};
MemberSelector.prototype.toString = function() {
return this.parent.toString() + "." + this.name;
};
MemberSelector.prototype.check = function(context) {
var parentType = this.checkParent(context);
return parentType.checkMember(context, this.name);
};
MemberSelector.prototype.interpret = function(context) {
// resolve parent to keep clarity
var parent = this.resolveParent(context);
// special case for Symbol which evaluates as value
var value = this.interpretSymbol(context, parent);
if(value!=null)
return value;
// special case for singletons
value = this.interpretSingleton(context, parent);
if(value!=null)
return value;
// special case for 'static' type members (like Enum.symbols, Type.name etc...)
value = this.interpretTypeMember(context, parent);
if(value!=null)
return value;
// finally resolve instance member
return this.interpretInstanceMember(context, parent);
};
MemberSelector.prototype.interpretInstanceMember = function(context, parent) {
var instance = this.parent.interpret(context);
if (instance == null || instance == NullValue.instance)
throw new NullReferenceError();
else
return instance.getMemberValue(context, this.name, true);
};
MemberSelector.prototype.interpretTypeMember = function(context, parent) {
if(parent instanceof TypeExpression)
return parent.getMemberValue(context, this.name);
else
return null;
};
MemberSelector.prototype.interpretSingleton = function(context, parent) {
if(parent instanceof TypeExpression && parent.value instanceof CategoryType && !(parent.value instanceof EnumeratedCategoryType)) {
var instance = context.loadSingleton(parent.value);
if(instance!=null)
return instance.getMemberValue(context, this.name);
}
return null;
};
MemberSelector.prototype.interpretSymbol = function(context, parent) {
if (parent instanceof SymbolExpression)
{
if ("name"==this.name)
return new Text(parent.name);
else if("value"==this.name)
return parent.interpret(context);
}
return null;
};
MemberSelector.prototype.resolveParent = function(context) {
if(this.parent instanceof UnresolvedIdentifier) {
this.parent.checkMember(context);
return this.parent.resolved;
} else
return this.parent;
};
exports.MemberSelector = MemberSelector;
/***/ },
/* 138 */
/***/ function(module, exports, __webpack_require__) {
var UnresolvedIdentifier;
exports.resolve = function() {
UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
}
function SelectorExpression(parent) {
this.parent = parent || null;
return this;
}
SelectorExpression.prototype.checkParent = function(context) {
if (this.parent instanceof UnresolvedIdentifier)
return this.parent.checkMember(context);
else
return this.parent.check(context);
};
exports.SelectorExpression = SelectorExpression;
/***/ },
/* 139 */
/***/ function(module, exports) {
function SymbolExpression(id) {
this.id = id;
return this;
}
Object.defineProperty(SymbolExpression.prototype, "name", {
get : function() {
return this.id.name;
}
});
SymbolExpression.prototype.toDialect = function(writer) {
writer.append(this.name);
};
SymbolExpression.prototype.check = function(context) {
var symbol = context.getRegisteredValue(this.name);
if(symbol==null) {
throw new SyntaxError("Unknown symbol:" + this.name);
}
return symbol.check(context);
};
SymbolExpression.prototype.interpret = function(context) {
var symbol = context.getRegisteredValue(this.name);
if(symbol==null) {
throw new SyntaxError("Unknown symbol:" + this.name);
}
return symbol.interpret(context);
};
exports.SymbolExpression = SymbolExpression;
/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {
var TypeValue = __webpack_require__(141).TypeValue;
function TypeExpression(value) {
this.value = value;
return this;
}
TypeExpression.prototype.toDialect = function(writer) {
writer.append(this.value.toString());
};
TypeExpression.prototype.check = function(context) {
return this.value;
};
TypeExpression.prototype.toString = function() {
return this.value.toString();
};
TypeExpression.prototype.interpret = function(context) {
return new TypeValue(this.value);
};
TypeExpression.prototype.getMemberValue = function(context, name) {
return this.value.getMemberValue(context, name);
};
exports.TypeExpression = TypeExpression;
/***/ },
/* 141 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function TypeValue(value) {
Value.call(this, null); // TODO type of type
this.value = value;
return this;
};
TypeValue.prototype.toString = function() {
return this.value.toString();
};
exports.TypeValue = TypeValue;
/***/ },
/* 142 */
/***/ function(module, exports, __webpack_require__) {
var ExecutionError = __webpack_require__(86).ExecutionError;
function NullReferenceError() {
ExecutionError.call(this);
return this;
}
NullReferenceError.prototype = Object.create(ExecutionError.prototype);
NullReferenceError.prototype.constructor = NullReferenceError;
NullReferenceError.prototype.getExpression = function(context) {
return context.getRegisteredValue("NULL_REFERENCE");
};
exports.NullReferenceError = NullReferenceError;
/***/ },
/* 143 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
function VoidType() {
NativeType.call(this, new Identifier("Void"));
return this;
}
VoidType.prototype = Object.create(NativeType.prototype);
VoidType.prototype.constructor = VoidType;
VoidType.prototype.isAssignableFrom = function(context, other) {
throw new Error("Should never get there!");
};
VoidType.instance = new VoidType();
exports.VoidType = VoidType;
/***/ },
/* 144 */
/***/ function(module, exports) {
function Specificity(ordinal) {
this.ordinal = ordinal;
return this;
}
Specificity.INCOMPATIBLE = new Specificity(0);
Specificity.RESOLVED = new Specificity(1);
Specificity.INHERITED = new Specificity(2);
Specificity.EXACT = new Specificity(3);
Specificity.prototype.greaterThan = function(other) {
return this.ordinal > other.ordinal;
}
exports.Specificity = Specificity;
/***/ },
/* 145 */
/***/ function(module, exports, __webpack_require__) {
var InvalidDataError = __webpack_require__(122).InvalidDataError;
function MatchingCollectionConstraint(collection) {
this.collection = collection;
return this;
}
MatchingCollectionConstraint.prototype.checkValue = function(context, value) {
var container = this.collection.interpret(context);
if(container.hasItem) {
if(!(container.hasItem(context, value))) {
throw new InvalidDataError("Value:" + value.toString() + " is not in range: " + this.collection.toString());
}
} else {
throw new InvalidDataError("Not a collection: " + this.collection.toString());
}
};
MatchingCollectionConstraint.prototype.toDialect = function(writer) {
writer.append(" in ");
this.collection.toDialect(writer);
};
exports.MatchingCollectionConstraint = MatchingCollectionConstraint;
/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {
var InvalidDataError = __webpack_require__(122).InvalidDataError;
var Identifier = __webpack_require__(70).Identifier;
var Variable = __webpack_require__(88).Variable;
var AnyType = __webpack_require__(71).AnyType;
function MatchingExpressionConstraint(expression) {
this.expression = expression;
return this;
}
MatchingExpressionConstraint.prototype.checkValue = function(context, value) {
var child = context.newChildContext();
var id = new Identifier("value");
child.registerValue(new Variable(id, AnyType.instance));
child.setValue(id, value);
var test = this.expression.interpret(child);
if(!test.value) {
throw new InvalidDataError((value == null ? "null" : value.toString()) + " does not match:" + this.expression.toString());
}
};
MatchingExpressionConstraint.prototype.toDialect = function(writer) {
writer.append(" matching ");
this.expression.toDialect(writer);
}
exports.MatchingExpressionConstraint = MatchingExpressionConstraint;
/***/ },
/* 147 */
/***/ function(module, exports, __webpack_require__) {
exports.VariableInstance = __webpack_require__(148).VariableInstance;
exports.MemberInstance = __webpack_require__(152).MemberInstance;
exports.ItemInstance = __webpack_require__(154).ItemInstance;
/***/ },
/* 148 */
/***/ function(module, exports, __webpack_require__) {
var Variable = __webpack_require__(88).Variable;
var NullValue = __webpack_require__(74).NullValue;
var DocumentType = __webpack_require__(149).DocumentType;
function VariableInstance(id) {
this.id = id;
return this;
}
Object.defineProperty(VariableInstance.prototype, "name", {
get : function() {
return this.id.name;
}
});
VariableInstance.prototype.toDialect = function(writer, expression) {
if(expression!=null) try {
var type = expression.check(writer.context);
var actual = writer.context.getRegisteredValue(this.name);
if(actual==null)
writer.context.registerValue(new Variable(this.id, type));
} catch(e) {
// TODO warning
}
writer.append(this.name);
};
VariableInstance.prototype.toString = function() {
return this.name;
};
VariableInstance.prototype.checkAssignValue = function(context, valueType) {
var actual = context.getRegisteredValue(this.id);
if(actual==null) {
context.registerValue(new Variable(this.id, valueType));
return valueType;
} else {
// need to check type compatibility
actual.type.checkAssignableFrom(context, valueType);
return actual.type;
}
};
VariableInstance.prototype.checkAssignMember = function(context, name, valueType) {
var actual = context.getRegisteredValue(this.id);
if(actual==null) {
throw new SyntaxError("Unknown variable:" + this.id);
}
return valueType;
};
VariableInstance.prototype.checkAssignItem = function(context, itemType, valueType) {
var actual = context.getRegisteredValue(this.id);
if(actual==null) {
throw new SyntaxError("Unknown variable:" + this.id);
}
var parentType = actual.getType(context);
return parentType.checkItem(context, itemType);
};
VariableInstance.prototype.assign = function(context, expression) {
var value = expression.interpret(context);
if(context.getRegisteredValue(this.name)==null) {
var type = value!=NullValue.instance ? value.type : expression.check(context);
context.registerValue(new Variable(this.id, type));
}
context.setValue(this.id, value);
};
VariableInstance.prototype.interpret = function(context) {
return context.getValue(this.id);
};
exports.VariableInstance = VariableInstance;
/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {
var MissingType = __webpack_require__(150).MissingType;
var NativeType = __webpack_require__(64).NativeType;
var TextType = __webpack_require__(125).TextType;
var NullType = __webpack_require__(75).NullType;
var AnyType = __webpack_require__(71).AnyType;
var Identifier = __webpack_require__(70).Identifier;
var Text = __webpack_require__(76).Text;
var Integer = __webpack_require__(78).Integer;
function DocumentType() {
NativeType.call(this, new Identifier("Document"));
return this;
}
DocumentType.prototype = Object.create(NativeType.prototype);
DocumentType.prototype.constructor = DocumentType;
DocumentType.instance = new DocumentType();
DocumentType.prototype.isMoreSpecificThan = function(context, other) {
if ((other instanceof NullType) || (other instanceof AnyType) || (other instanceof MissingType))
return true;
else
return NativeType.isMoreSpecificThan.call(this, context, other);
};
DocumentType.prototype.checkMember = function(context, name) {
return AnyType.instance;
};
DocumentType.prototype.checkItem = function(context, itemType) {
if(itemType===TextType.instance)
return AnyType.instance;
else
throw ("text");
};
DocumentType.prototype.readJSONValue = function(context, node, parts) {
var Document = __webpack_require__(151).Document;
var instance = new Document();
for(key in node) {
var value = this.readJSONField(context, node[key], parts);
instance.setMember(context, key, value);
}
return instance;
};
DocumentType.prototype.readJSONField = function(context, node, parts) {
if(!node)
return NullValue.instance;
else if(typeof(node)===typeof(true))
return Boolean.ValueOf(node);
else if(typeof(node)===typeof(1))
return new Integer(node);
else if(typeof(node)===typeof(1.0))
return new Decimal(node)
else if(typeof(node)===typeof(""))
return new Text(node)
else if(typeof(node)===typeof([]))
throw new Error("list");
else if(typeof(node)===typeof({}))
throw new Error("dict/object");
else
throw new Error(typeof(node).toString());
};
exports.DocumentType = DocumentType;
/***/ },
/* 150 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var Identifier = __webpack_require__(70).Identifier;
function MissingType() {
NativeType.call(this, new Identifier("*"));
return this;
}
MissingType.prototype = Object.create(NativeType.prototype);
MissingType.prototype.constructor = MissingType;
MissingType.instance = new MissingType();
MissingType.prototype.isAssignableFrom = function(context, other) {
return true;
};
exports.MissingType = MissingType;
/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {
var NullValue = __webpack_require__(74).NullValue;
var Value = __webpack_require__(73).Value;
var Text = __webpack_require__(76).Text;
var DocumentType = __webpack_require__(149).DocumentType;
function Document(value) {
Value.call(this, DocumentType.instance);
this.mutable = true;
this.values = {};
return this;
}
Document.prototype = Object.create(Value.prototype);
Document.prototype.constructor = Document;
Document.prototype.getMemberNames = function() {
return Object.getOwnPropertyNames(this.values);
};
Document.prototype.getStorableData = function() {
return this.values;
};
Document.prototype.hasMember = function(name) {
return this.values.hasOwnProperty(name);
}
Document.prototype.getMemberValue = function(context, name, autoCreate) {
var result = this.values[name] || null;
if(result)
return result;
else if("text" == name)
return new Text(this.toString());
else if(autoCreate) {
result = new Document();
this.values[name] = result;
return result;
} else
return NullValue.instance;
};
Document.prototype.setMember = function(context, name, value) {
this.values[name] = value;
};
Document.prototype.getItemInContext = function(context, index) {
if (index instanceof Text) {
// TODO autocreate
return this.values[index.value] || NullValue.instance;
} else {
throw new SyntaxError("No such item:" + index.toString())
}
};
Document.prototype.setItemInContext = function(context, index, value) {
if (index instanceof Text) {
this.values[index.value] = value
} else {
throw new SyntaxError("No such item:" + index.toString());
}
};
Document.prototype.equals = function(other) {
return other==this;
};
Document.prototype.toString = function() {
var binaries = {};
// create json type-aware object graph and collect binaries
var values = {}; // need a temporary parent
for (var key in this.values) {
var value = this.values[key];
if (value == null || value == undefined)
values[key] = null;
else {
var id = this; // TODO create identifier
value.toJson(null, values, id, key, false, binaries);
}
}
return JSON.stringify(values);
};
Document.prototype.toJson = function(context, json, instanceId, fieldName, withType, binaries) {
var values = {};
for (var key in this.values) {
var value = this.values[key];
if (value == null || value == undefined)
values[key] = null;
else {
var id = this; // TODO create identifier
value.toJson(context, values, id, key, withType, binaries);
}
}
var doc = withType ? { type: DocumentType.instance.name, value: values} : values;
if(Array.isArray(json))
json.push(doc);
else
json[fieldName] = doc;
};
exports.Document = Document;
/***/ },
/* 152 */
/***/ function(module, exports, __webpack_require__) {
var Document = __webpack_require__(151).Document;
var NotMutableError = __webpack_require__(153).NotMutableError;
function MemberInstance(id) {
this.parent = null;
this.id = id;
return this;
}
Object.defineProperty(MemberInstance.prototype, "name", {
get : function() {
return this.id.name;
}
});
MemberInstance.prototype.toString = function() {
return this.parent.toString() + "." + this.name;
};
MemberInstance.prototype.toDialect = function(writer) {
this.parent.toDialect(writer);
writer.append(".");
writer.append(this.name);
};
MemberInstance.prototype.checkAssignValue = function(context, valueType) {
return this.parent.checkAssignMember(context, this.name, valueType);
};
MemberInstance.prototype.checkAssignMember = function(context, name, valueType) {
this.parent.checkAssignMember(context, this.name);
return valueType; // TODO
};
MemberInstance.prototype.checkAssignItem = function(context, itemType, valueType) {
return valueType; // TODO
};
MemberInstance.prototype.assign = function(context, expression) {
var root = this.parent.interpret(context);
if(!root.mutable)
throw new NotMutableError();
var value = expression.interpret(context);
root.setMember(context, this.name, value);
};
MemberInstance.prototype.interpret = function(context) {
var root = this.parent.interpret(context);
return root.getMemberValue(context, this.name, true);
};
exports.MemberInstance = MemberInstance;
/***/ },
/* 153 */
/***/ function(module, exports, __webpack_require__) {
var ExecutionError = __webpack_require__(86).ExecutionError;
function NotMutableError() {
ExecutionError.call(this);
return this;
}
NotMutableError.prototype = Object.create(ExecutionError.prototype);
NotMutableError.prototype.constructor = NotMutableError;
NotMutableError.prototype.getExpression = function(context) {
return context.getRegisteredValue("NOT_MUTABLE");
};
exports.NotMutableError = NotMutableError;
/***/ },
/* 154 */
/***/ function(module, exports, __webpack_require__) {
var InvalidDataError = __webpack_require__(122).InvalidDataError;
var NotMutableError = __webpack_require__(153).NotMutableError;
var IntegerType = __webpack_require__(81).IntegerType;
var AnyType = __webpack_require__(71).AnyType;
var BaseValueList = __webpack_require__(129).BaseValueList;
var Integer = __webpack_require__(78).Integer;
var Value = __webpack_require__(73).Value;
function ItemInstance(item) {
this.parent = null;
this.item = item;
return this;
}
ItemInstance.prototype.toString = function() {
return this.parent.toString() + "[" + this.item.toString() + "]";
};
ItemInstance.prototype.toDialect = function(writer) {
this.parent.toDialect(writer);
writer.append('[');
this.item.toDialect(writer);
writer.append(']');
}
ItemInstance.prototype.checkAssignValue = function(context, valueType) {
var itemType = this.item.check(context);
return this.parent.checkAssignItem(context, itemType, valueType);
};
ItemInstance.prototype.checkAssignMember = function(context, name, valueType) {
return AnyType.instance
};
ItemInstance.prototype.checkAssignItem = function(context, itemType, valueType) {
return AnyType.instance
};
ItemInstance.prototype.assign = function(context, expression) {
var root = this.parent.interpret(context);
if(!root.mutable)
throw new NotMutableError();
var item = this.item.interpret(context);
var value = expression.interpret(context);
if (root.setItemInContext) {
root.setItemInContext(context, item, value);
} else {
throw new SyntaxError("Unknown item/key: " + typeof(item));
}
};
ItemInstance.prototype.interpret = function(context) {
var root = this.parent.interpret(context);
var item = this.item.interpret(context);
if (root.getItemInContext) {
return root.getItemInContext(context, item);
} else {
throw new SyntaxError("Unknown item/key: " + typeof(item));
}
};
exports.ItemInstance = ItemInstance;
/***/ },
/* 155 */
/***/ function(module, exports, __webpack_require__) {
exports.AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
exports.CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
exports.ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
exports.DeclarationList = __webpack_require__(156).DeclarationList;
exports.AbstractMethodDeclaration = __webpack_require__(160).AbstractMethodDeclaration;
exports.ConcreteMethodDeclaration = __webpack_require__(161).ConcreteMethodDeclaration;
exports.NativeMethodDeclaration = __webpack_require__(164).NativeMethodDeclaration;
exports.TestMethodDeclaration = __webpack_require__(158).TestMethodDeclaration;
exports.EnumeratedCategoryDeclaration = __webpack_require__(53).EnumeratedCategoryDeclaration;
exports.SingletonCategoryDeclaration = __webpack_require__(165).SingletonCategoryDeclaration;
exports.NativeCategoryDeclaration = __webpack_require__(166).NativeCategoryDeclaration;
exports.NativeResourceDeclaration = __webpack_require__(172).NativeResourceDeclaration;
exports.EnumeratedNativeDeclaration = __webpack_require__(157).EnumeratedNativeDeclaration;
exports.OperatorMethodDeclaration = __webpack_require__(175).OperatorMethodDeclaration;
exports.GetterMethodDeclaration = __webpack_require__(176).GetterMethodDeclaration;
exports.SetterMethodDeclaration = __webpack_require__(177).SetterMethodDeclaration;
exports.NativeGetterMethodDeclaration = __webpack_require__(178).NativeGetterMethodDeclaration;
exports.NativeSetterMethodDeclaration = __webpack_require__(179).NativeSetterMethodDeclaration;
__webpack_require__(133).resolve();
__webpack_require__(54).resolve();
/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {
var ObjectList = __webpack_require__(49).ObjectList;
var AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
var CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
var EnumeratedNativeDeclaration = __webpack_require__(157).EnumeratedNativeDeclaration;
var BaseMethodDeclaration = __webpack_require__(133).BaseMethodDeclaration;
var TestMethodDeclaration = __webpack_require__(158).TestMethodDeclaration;
function DeclarationList(items, item) {
items = items || [];
ObjectList.call(this, items);
item = item || null;
if(item!==null) {
this.add(item);
}
return this;
}
DeclarationList.prototype = Object.create(ObjectList.prototype);
DeclarationList.prototype.constructor = DeclarationList;
DeclarationList.prototype.register = function(context) {
this.registerAttributes(context);
this.registerCategories(context);
this.registerEnumerated(context);
this.registerMethods(context);
this.registerTests(context);
};
DeclarationList.prototype.registerAttributes = function(context) {
this.forEach(function (decl) {
if(decl instanceof AttributeDeclaration)
decl.register(context);
});
};
DeclarationList.prototype.registerCategories = function(context) {
this.forEach(function (decl) {
if(decl instanceof CategoryDeclaration)
decl.register(context);
});
};
DeclarationList.prototype.registerEnumerated = function(context) {
this.forEach(function (decl) {
if(decl instanceof EnumeratedNativeDeclaration)
decl.register(context);
});
};
DeclarationList.prototype.registerMethods = function(context) {
this.forEach(function (decl) {
if(decl instanceof BaseMethodDeclaration)
decl.register(context);
});
};
DeclarationList.prototype.registerTests = function(context) {
this.forEach(function (decl) {
if(decl instanceof TestMethodDeclaration)
decl.register(context);
});
};
DeclarationList.prototype.unregister = function(context) {
this.forEach(function(decl) {
decl.unregister(context);
});
};
DeclarationList.prototype.check = function(context) {
this.forEach(function(decl) {
decl.check(context);
});
};
DeclarationList.prototype.toDialect = function(writer) {
this.forEach(function(decl) {
if(decl.comments) {
decl.comments.forEach(function (cmt) {
cmt.toDialect(writer);
});
}
decl.toDialect(writer);
writer.append("\n");
});
};
exports.DeclarationList = DeclarationList;
/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {
var BaseDeclaration = __webpack_require__(57).BaseDeclaration;
var EnumeratedNativeType = __webpack_require__(67).EnumeratedNativeType;
function EnumeratedNativeDeclaration(id, derivedFrom, symbols) {
BaseDeclaration.call(this, id);
this.type = new EnumeratedNativeType(id, derivedFrom);
this.symbols = symbols;
this.symbols.forEach(function(symbol) {
symbol.type = this.type;
}, this);
return this;
}
EnumeratedNativeDeclaration.prototype = Object.create(BaseDeclaration.prototype);
EnumeratedNativeDeclaration.prototype.constructor = EnumeratedNativeDeclaration;
EnumeratedNativeDeclaration.prototype.getDeclarationType = function() {
return "Enumerated";
};
EnumeratedNativeDeclaration.prototype.unregister = function(context) {
context.unregisterDeclaration (this);
this.symbols.forEach(function(symbol) {
symbol.unregister(context);
});
};
EnumeratedNativeDeclaration.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
EnumeratedNativeDeclaration.prototype.toMDialect = function(writer) {
writer.append("enum ");
writer.append(this.name);
writer.append('(');
this.type.derivedFrom.toDialect(writer);
writer.append("):\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append("\n");
});
writer.dedent();
}
EnumeratedNativeDeclaration.prototype.toODialect = function(writer) {
writer.append("enumerated ");
writer.append(this.name);
writer.append('(');
this.type.derivedFrom.toDialect(writer);
writer.append(") {\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append(";\n");
});
writer.dedent();
writer.append("}\n");
}
EnumeratedNativeDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as enumerated ");
this.type.derivedFrom.toDialect(writer);
writer.append(" with symbols:\n");
writer.indent();
this.symbols.forEach(function(symbol) {
symbol.toDialect(writer);
writer.append("\n");
});
writer.dedent();
};
EnumeratedNativeDeclaration.prototype.register = function(context) {
context.registerDeclaration(this);
this.symbols.forEach(function(symbol) {
symbol.register(context);
});
};
EnumeratedNativeDeclaration.prototype.check = function(context) {
this.symbols.forEach(function(symbol) {
symbol.check(context);
});
return this.type;
};
EnumeratedNativeDeclaration.prototype.getType = function(context) {
return this.type;
};
exports.EnumeratedNativeDeclaration = EnumeratedNativeDeclaration;
/***/ },
/* 158 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {var isNodeJs = typeof window === 'undefined' && typeof importScripts === 'undefined';
var BaseDeclaration = __webpack_require__(57).BaseDeclaration;
var Identifier = __webpack_require__(70).Identifier;
var PromptoError = __webpack_require__(61).PromptoError;
var VoidType = __webpack_require__(143).VoidType;
function TestMethodDeclaration(id, stmts, exps, error) {
BaseDeclaration.call(this, id);
this.statements = stmts;
this.assertions = exps;
this.error = error;
return this;
}
TestMethodDeclaration.prototype = Object.create(BaseDeclaration.prototype);
TestMethodDeclaration.prototype.constructor = TestMethodDeclaration;
TestMethodDeclaration.prototype.getDeclarationType = function() {
return "Test";
};
TestMethodDeclaration.prototype.check = function(context) {
// TODO
return VoidType.instance;
};
TestMethodDeclaration.prototype.register = function(context) {
context.registerTestDeclaration (this);
};
TestMethodDeclaration.prototype.unregister = function(context) {
context.unregisterTestDeclaration (this);
};
TestMethodDeclaration.prototype.getType = function(context)
{
return VoidType.instance;
};
TestMethodDeclaration.prototype.interpret = function(context)
{
if (this.interpretBody (context)) {
this.interpretNoError (context);
this.interpretAsserts (context);
}
};
TestMethodDeclaration.prototype.interpretNoError = function(context)
{
// we land here only if no error was raised
if (this.error != null)
this.printMissingError (context, this.error.name, "no error");
};
TestMethodDeclaration.prototype.interpretAsserts = function(context)
{
if (this.assertions == null)
return;
context.enterMethod (this);
try {
var self = this;
var success = true;
this.assertions.forEach(function(a) {
success &= a.interpretAssert (context, self);
});
if (success)
this.printSuccess (context);
} finally {
context.leaveMethod (this);
}
};
TestMethodDeclaration.print = function(msg) {
if(isNodeJs)
process.stdout.write(msg);
else
console.log(msg);
};
TestMethodDeclaration.prototype.printMissingError = function(context, expected, actual)
{
var msg = this.name + " test failed while expecting: " + expected + ", found: " + actual
TestMethodDeclaration.print(msg);
};
TestMethodDeclaration.prototype.printFailedAssertion = function(context, expected, actual)
{
var msg = this.name + " test failed while verifying: " + expected + ", found: " + actual
TestMethodDeclaration.print(msg);
};
TestMethodDeclaration.prototype.printSuccess = function(context)
{
var msg = this.name + " test successful";
TestMethodDeclaration.print(msg);
};
TestMethodDeclaration.prototype.interpretBody = function(context)
{
context.enterMethod (this);
try {
this.statements.interpret (context);
return true;
} catch (e) {
if(e instanceof PromptoError) {
this.interpretError(context, e);
// no more to execute
return false;
} else
throw e;
} finally {
context.leaveMethod (this);
}
};
TestMethodDeclaration.prototype.interpretError = function(context, ex)
{
var expectedError = this.error == null ? null : this.error.interpret (context);
var actual = ex.interpret (context, new Identifier("__test_error__"));
if (expectedError!=null && expectedError.equals (actual))
this.printSuccess (context);
else {
var actualName = actual.getMemberValue (context, "name").toString ();
var expectedName = this.error == null ? "SUCCESS" : this.error.name;
this.printMissingError (context, expectedName, actualName);
}
};
TestMethodDeclaration.prototype.toDialect = function(writer)
{
if (writer.isGlobalContext ())
writer = writer.newLocalWriter ();
writer.toDialect(this);
};
TestMethodDeclaration.prototype.toMDialect = function(writer)
{
writer.append ("def test ");
writer.append (this.name);
writer.append (" ():\n");
writer.indent ();
if(this.statements!=null)
this.statements.toDialect (writer);
writer.dedent ();
writer.append ("verifying:");
if (this.error != null) {
writer.append (" ");
this.error.toDialect (writer);
writer.append ("\n");
} else if(this.assertions!=null) {
writer.append ("\n");
writer.indent ();
this.assertions.forEach(function(a) {
a.toDialect (writer);
writer.append ("\n");
});
writer.dedent ();
}
};
TestMethodDeclaration.prototype.toEDialect = function(writer)
{
writer.append ("define ");
writer.append (this.name);
writer.append (" as test method doing:\n");
writer.indent ();
if(this.statements!=null)
this.statements.toDialect (writer);
writer.dedent ();
writer.append ("and verifying");
if (this.error != null) {
writer.append (" ");
this.error.toDialect (writer);
writer.append ("\n");
} else if(this.assertions!=null) {
writer.append (":\n");
writer.indent ();
this.assertions.forEach(function(a) {
a.toDialect (writer);
writer.append ("\n");
});
writer.dedent ();
}
};
TestMethodDeclaration.prototype.toODialect = function(writer)
{
writer.append ("test method ");
writer.append (this.name);
writer.append (" () {\n");
writer.indent ();
if(this.statements!=null)
this.statements.toDialect (writer);
writer.dedent ();
writer.append ("} verifying ");
if (this.error != null) {
this.error.toDialect (writer);
writer.append (";\n");
} else if(this.assertions!=null) {
writer.append ("{\n");
writer.indent ();
this.assertions.forEach(function(a) {
a.toDialect (writer);
writer.append (";\n");
});
writer.dedent ();
writer.append ("}\n");
}
};
exports.TestMethodDeclaration = TestMethodDeclaration;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(159)))
/***/ },
/* 159 */
/***/ function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = setTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
clearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ },
/* 160 */
/***/ function(module, exports, __webpack_require__) {
var BaseMethodDeclaration = __webpack_require__(133).BaseMethodDeclaration;
var VoidType = __webpack_require__(143).VoidType;
var CodeArgument = __webpack_require__(113).CodeArgument;
function AbstractMethodDeclaration(id, args, returnType) {
BaseMethodDeclaration.call(this, id, args, returnType);
this.returnType = returnType || VoidType.instance;
return this;
}
AbstractMethodDeclaration.prototype = Object.create(BaseMethodDeclaration.prototype);
AbstractMethodDeclaration.prototype.constructor = AbstractMethodDeclaration;
AbstractMethodDeclaration.prototype.memberCheck = function(declaration, context) {
// TODO Auto-generated method stub
};
AbstractMethodDeclaration.prototype.check = function(context) {
if(this.arguments!=null) {
this.arguments.check(context);
}
var local = context.newLocalContext();
this.registerArguments(local);
return this.returnType;
};
AbstractMethodDeclaration.prototype.toMDialect = function(writer) {
writer.append("abstract def ");
writer.append(this.name);
writer.append(" (");
this.args.toDialect(writer);
writer.append(")");
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("->");
this.returnType.toDialect(writer);
}
}
AbstractMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as abstract method ");
this.args.toDialect(writer);
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("returning ");
this.returnType.toDialect(writer);
}
};
AbstractMethodDeclaration.prototype.toODialect = function(writer) {
writer.append("abstract ");
if(this.returnType!=null && this.returnType!=VoidType.instance) {
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("method ");
writer.append(this.name);
writer.append(" (");
this.args.toDialect(writer);
writer.append(");");
}
exports.AbstractMethodDeclaration = AbstractMethodDeclaration;
/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {
var BaseMethodDeclaration = __webpack_require__(133).BaseMethodDeclaration;
var VoidType = __webpack_require__(143).VoidType;
var DictType = __webpack_require__(162).DictType;
var TextType = __webpack_require__(125).TextType;
var CodeArgument = __webpack_require__(113).CodeArgument;
var CategoryArgument = __webpack_require__(110).CategoryArgument;
function ConcreteMethodDeclaration(id, args, returnType, statements) {
BaseMethodDeclaration.call(this, id, args, returnType);
this.statements = statements;
this.returnType = returnType || null;
return this;
}
ConcreteMethodDeclaration.prototype = Object.create(BaseMethodDeclaration.prototype);
ConcreteMethodDeclaration.prototype.constructor = ConcreteMethodDeclaration;
ConcreteMethodDeclaration.prototype.memberCheck = function(declaration, context) {
// TODO Auto-generated method stub
};
ConcreteMethodDeclaration.prototype.check = function(context) {
if(this.canBeChecked(context)) {
return this.fullCheck(context, false);
} else {
return VoidType.instance;
}
};
ConcreteMethodDeclaration.prototype.canBeChecked = function(context) {
if(context.isGlobalContext()) {
return !this.mustBeBeCheckedInCallContext(context);
} else {
return true;
}
};
ConcreteMethodDeclaration.prototype.mustBeBeCheckedInCallContext = function(context) {
// if at least one argument is 'Code'
if(this.args===null) {
return false;
}
for(var i=0;i");
this.returnType.toDialect(writer);
}
writer.append(":\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
ConcreteMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as method ");
this.args.toDialect(writer);
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("returning ");
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("doing:\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
ConcreteMethodDeclaration.prototype.toODialect = function(writer) {
if(this.returnType!=null && this.returnType!=VoidType.instance) {
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("method ");
writer.append(this.name);
writer.append(" (");
this.args.toDialect(writer);
writer.append(") {\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
writer.append("}\n");
};
exports.ConcreteMethodDeclaration = ConcreteMethodDeclaration;
/***/ },
/* 162 */
/***/ function(module, exports, __webpack_require__) {
var Identifier = __webpack_require__(70).Identifier;
var ContainerType = __webpack_require__(62).ContainerType;
var BooleanType = __webpack_require__(69).BooleanType;
var IntegerType = __webpack_require__(81).IntegerType;
var TextType = __webpack_require__(125).TextType;
var SetType = __webpack_require__(131).SetType;
var ListType = __webpack_require__(68).ListType;
var EntryType = __webpack_require__(163).EntryType;
function DictType(itemType) {
ContainerType.call(this, new Identifier(itemType.name+"{}"), itemType);
this.itemType = itemType;
return this;
}
DictType.prototype = Object.create(ContainerType.prototype);
DictType.prototype.constructor = DictType;
DictType.prototype.isAssignableFrom = function(context, other) {
return ContainerType.prototype.isAssignableFrom.call(this, context, other)
|| ((other instanceof DictType) && this.itemType.isAssignableFrom(context, other.itemType));
};
DictType.prototype.equals = function(obj) {
if (obj == null) {
return false;
} else if (obj == this) {
return true;
} else if (!(obj instanceof DictType)) {
return false;
} else {
return this.itemType.equals(obj.itemType);
}
};
DictType.prototype.checkAdd = function(context, other, tryReverse) {
if(other instanceof DictType && this.itemType.equals(other.itemType)) {
return this;
} else {
return ContainerType.prototype.checkAdd.call(this, context, other, tryReverse);
}
};
DictType.prototype.checkContains = function(context, other) {
if(other==TextType.instance) {
return BooleanType.instance;
} else {
return ContainerType.prototype.checkContains.call(this, context, other);
}
};
DictType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
};
DictType.prototype.checkItem = function(context, other) {
if(other==TextType.instance) {
return this.itemType;
} else {
return ContainerType.prototype.checkItem.call(this, context, other);
}
};
DictType.prototype.checkIterator = function(context) {
return new EntryType(this.itemType);
};
DictType.prototype.checkMember = function(context, name) {
if ("count"==name) {
return IntegerType.instance;
} else if("keys"==name) {
return new SetType(TextType.instance);
} else if ("values"==name) {
return new ListType(this.itemType);
} else {
return ContainerType.prototype.checkMember.call(this, context, name);
}
};
exports.DictType = DictType;
/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {
var BaseType = __webpack_require__(65).BaseType;
var BooleanType = __webpack_require__(69).BooleanType;
var TextType = __webpack_require__(125).TextType;
var Identifier = __webpack_require__(70).Identifier;
function EntryType(itemType) {
BaseType.call(this, new Identifier(itemType.name + "{}[]"));
this.itemType = itemType;
return this;
}
EntryType.prototype = Object.create(BaseType.prototype);
EntryType.prototype.constructor = EntryType;
EntryType.prototype.checkMember = function(context, name) {
if ("key"==name) {
return TextType.instance;
} else if ("value"==name) {
return this.itemType;
} else {
return BaseType.prototype.checkMember.call(this, context, name);
}
};
exports.EntryType = EntryType;
/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteMethodDeclaration = __webpack_require__(161).ConcreteMethodDeclaration;
var IntegerType = __webpack_require__(81).IntegerType;
var DecimalType = __webpack_require__(80).DecimalType;
var VoidType = __webpack_require__(143).VoidType;
var Decimal = __webpack_require__(79).Decimal;
var Integer = __webpack_require__(78).Integer;
function NativeMethodDeclaration(id, args, returnType, statements) {
ConcreteMethodDeclaration.call(this, id, args,returnType, statements);
return this;
}
NativeMethodDeclaration.prototype = Object.create(ConcreteMethodDeclaration.prototype);
NativeMethodDeclaration.prototype.constructor = NativeMethodDeclaration;
NativeMethodDeclaration.prototype.check = function(context) {
var checked = this.fullCheck(context, true);
return this.returnType != null ? this.returnType : checked;
};
NativeMethodDeclaration.prototype.interpret = function(context) {
context.enterMethod(this);
try {
var result = this.statements.interpretNative(context, this.returnType);
return this.castToReturnType(context, result);
} finally {
context.leaveMethod(this);
}
};
NativeMethodDeclaration.prototype.castToReturnType = function(context, value) {
// can only cast to specified type, and if required
if(this.returnType==IntegerType.instance && value instanceof Decimal)
value = new Integer(value.IntegerValue());
else if(this.returnType==DecimalType.instance && value instanceof Integer)
value = new Decimal(value.DecimalValue());
else if(this.returnType!=null && !(this.returnType.isAssignableFrom(context, value.type))) {
// only cast if implemented, on a per type basis
if(this.returnType.nativeCast)
value = this.returnType.nativeCast(context, value);
}
return value;
};
NativeMethodDeclaration.prototype.toMDialect = function(writer) {
writer.append("def native ");
writer.append(this.name);
writer.append(" (");
this.args.toDialect(writer);
writer.append(")");
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("->");
this.returnType.toDialect(writer);
}
writer.append(":\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
NativeMethodDeclaration.prototype.toODialect = function(writer) {
if(this.returnType!=null && this.returnType!=VoidType.instance) {
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("native method ");
writer.append(this.name);
writer.append(" (");
this.args.toDialect(writer);
writer.append(") {\n");
writer.indent();
this.statements.forEach(function(stmt) {
stmt.toDialect(writer);
writer.newLine();
});
writer.dedent();
writer.append("}\n");
};
NativeMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as native method ");
this.args.toDialect(writer);
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("returning ");
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("doing:\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
writer.append("\n");
};
exports.NativeMethodDeclaration = NativeMethodDeclaration;
/***/ },
/* 165 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
function SingletonCategoryDeclaration(id, attributes, methods) {
ConcreteCategoryDeclaration.call(this, id, attributes, null, methods);
return this;
}
SingletonCategoryDeclaration.prototype = Object.create(ConcreteCategoryDeclaration.prototype);
SingletonCategoryDeclaration.prototype.constructor = SingletonCategoryDeclaration;
SingletonCategoryDeclaration.prototype.categoryTypeToEDialect = function(writer) {
writer.append("singleton");
};
SingletonCategoryDeclaration.prototype.categoryTypeToODialect = function(writer) {
writer.append("singleton");
};
SingletonCategoryDeclaration.prototype.categoryTypeToMDialect = function(writer) {
writer.append("singleton");
};
exports.SingletonCategoryDeclaration = SingletonCategoryDeclaration;
/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteCategoryDeclaration = __webpack_require__(54).ConcreteCategoryDeclaration;
var getTypeName = __webpack_require__(167).getTypeName;
var NativeInstance = __webpack_require__(168).NativeInstance;
var JavaScriptNativeCategoryBinding = __webpack_require__(170).JavaScriptNativeCategoryBinding;
function NativeCategoryDeclaration(id, attributes, categoryBindings, attributeBindings, methods) {
ConcreteCategoryDeclaration.call(this, id, attributes, null, methods);
this.categoryBindings = categoryBindings;
this.attributeBindings = attributeBindings;
this.bound = null;
return this;
}
NativeCategoryDeclaration.prototype = Object.create(ConcreteCategoryDeclaration.prototype);
NativeCategoryDeclaration.prototype.constructor = NativeCategoryDeclaration;
NativeCategoryDeclaration.prototype.register = function(context) {
context.registerDeclaration(this);
var bound = this.getBoundFunction(false);
if(bound!=null) {
var name = getTypeName(bound);
context.registerNativeBinding(name, this);
}
};
NativeCategoryDeclaration.prototype.toEDialect = function(writer) {
this.protoToEDialect(writer, false, true);
this.bindingsToEDialect(writer);
if(this.methods!=null && this.methods.length>0) {
writer.append("and methods:");
writer.newLine();
this.methodsToEDialect(writer, this.methods);
}
};
NativeCategoryDeclaration.prototype.categoryTypeToEDialect = function(writer) {
writer.append("native category");
};
NativeCategoryDeclaration.prototype.bindingsToEDialect = function(writer) {
writer.indent();
this.categoryBindings.toDialect(writer);
writer.dedent();
writer.newLine();
};
NativeCategoryDeclaration.prototype.toODialect = function(writer) {
var hasBody = true; // always one
this.allToODialect(writer, hasBody);
};
NativeCategoryDeclaration.prototype.categoryTypeToODialect = function(writer) {
writer.append("native category");
};
NativeCategoryDeclaration.prototype.bodyToODialect = function(writer) {
this.categoryBindings.toDialect(writer);
if(this.methods!=null && this.methods.length>0) {
writer.newLine();
writer.newLine();
this.methodsToODialect(writer, this.methods);
}
};
NativeCategoryDeclaration.prototype.toMDialect = function(writer) {
this.protoToMDialect(writer, null);
writer.indent();
writer.newLine();
this.categoryBindings.toDialect(writer);
if(this.methods!=null && this.methods.length>0) {
this.methods.forEach(function(method) {
var w = writer.newMemberWriter();
method.toDialect(w);
writer.newLine();
});
}
writer.dedent();
writer.newLine();
};
NativeCategoryDeclaration.prototype.categoryTypeToMDialect = function(writer) {
writer.append("native category");
};
NativeCategoryDeclaration.prototype.newInstance = function() {
return new NativeInstance(this);
};
NativeCategoryDeclaration.prototype.getBoundFunction = function(fail) {
if(this.bound==null) {
var binding = this.getBinding(fail);
if(binding!=null) {
this.bound = binding.resolve();
if(fail && this.bound==null)
throw new SyntaxError("No JavaScript function:" + binding.toString());
}
}
return this.bound;
};
NativeCategoryDeclaration.prototype.getBinding = function(fail) {
for(var i=0;i the regex below does not match
var match = value.constructor.toString().match(/^function (.+)\(.*$/);
if (match) {
return match[1];
}
}
}
// fallback, for nameless constructors etc.
return Object.prototype.toString.call(value).match(/^\[object (.+)\]$/)[1];
default:
return t;
}
}
/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {
var CategoryType = __webpack_require__(90).CategoryType;
var TypeUtils = __webpack_require__(169);
var Instance = __webpack_require__(73).Instance;
function NativeInstance(declaration, instance) {
Instance.call(this,new CategoryType(declaration.id));
this.declaration = declaration;
this.storable = declaration.storable ? new StorableDocument() : null;
this.instance = instance || this.makeInstance();
return this;
}
NativeInstance.prototype = Object.create(Instance.prototype);
NativeInstance.prototype.constructor = NativeInstance;
NativeInstance.prototype.makeInstance = function() {
var bound = this.declaration.getBoundFunction(true);
return new bound();
};
NativeInstance.prototype.getType = function() {
return new CategoryType(this.declaration.id);
};
// don't call getters from getters, so register them
// TODO: thread local storage
var activeGetters = {};
function getActiveGetters() {
return activeGetters;
}
NativeInstance.prototype.getMemberValue = function(context, attrName) {
var stacked = getActiveGetters()[attrName] || null;
var first = stacked==null;
if(first)
getActiveGetters()[attrName] = context;
try {
return this.doGetMember(context, attrName, first);
} finally {
if(first) {
delete getActiveGetters()[attrName];
}
}
};
NativeInstance.prototype.doGetMember = function(context, attrName, allowGetter) {
var getter = allowGetter ? this.declaration.findGetter(context,attrName) : null;
if(getter!=null) {
context = context.newInstanceContext(this, null).newChildContext();
return getter.interpret(context);
} else {
var value = this.instance[attrName];
return TypeUtils.convertFromJavaScript(value);
}
};
// don't call setters from setters, so register them
// TODO: thread local storage
var activeSetters = {};
function getActiveSetters() {
return activeSetters;
}
NativeInstance.prototype.setMember = function(context, attrName, value) {
if(!this.mutable)
throw new NotMutableError();
var stacked = getActiveSetters()[attrName] || null;
var first = stacked==null;
if(first)
getActiveSetters()[attrName] = context;
try {
this.doSetMember(context, attrName, value, first);
} finally {
if(first) {
delete getActiveSetters()[attrName];
}
}
};
NativeInstance.prototype.doSetMember = function(context, attrName, value, allowSetter) {
var decl = context.getRegisteredDeclaration(attrName);
var setter = allowSetter ? this.declaration.findSetter(context,attrName) : null;
if(setter!=null) {
// use attribute name as parameter name for incoming value
context = context.newInstanceContext(this, null).newChildContext();
context.registerValue(new Variable(attrName, decl.getType()));
context.setValue(attrName, value);
value = setter.interpret(context);
}
if (this.storable && decl.storable) // TODO convert object graph if(value instanceof IInstance)
this.storable.SetMember(context, attrName, value);
value = value.convertToJavaScript();
this.instance[attrName] = value;
};
exports.NativeInstance = NativeInstance;
/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {
var MissingType = __webpack_require__(150).MissingType;
var NullValue = __webpack_require__(74).NullValue;
var Integer = __webpack_require__(78).Integer;
var Decimal = __webpack_require__(79).Decimal;
var Text = __webpack_require__(76).Text;
convertFromJavaScript = function(value) {
if(value==null) {
return NullValue.instance;
} else if(typeof(value)=='string') {
return new Text(value);
} else if(typeof(value)=='number') {
if(value == Math.floor(value))
return new Integer(value);
else
return new Decimal(value);
} else {
throw "Not implemented yet in convertFromJavaScript:" + typeof(value);
}
};
inferExpressionsType = function(context, expressions) {
if (expressions.length == 0)
return MissingType.instance;
var types = expressions.map(function(e) { return e.check(context); });
return inferElementType(context, types);
}
inferElementType = function(context, types) {
if (types.length == 0)
return MissingType.instance;
var lastType = null;
for (var i = 0; i < types.length; i++) {
var elemType = types[i];
if (lastType == null) {
lastType = elemType;
} else if (!lastType.equals(elemType)) {
if (lastType.isAssignableFrom(context, elemType)) {
; // lastType is less specific
} else if (elemType.isAssignableFrom(context, lastType)) {
lastType = elemType; // elemType is less specific
} else {
var common = inferCommonRootType(context, lastType, elemType);
if(common!=null)
lastType = common;
else
throw new SyntaxError("Incompatible types: " + elemType.toString() + " and " + lastType.toString());
}
}
}
return lastType;
};
function inferCommonRootType(context, type1, type2) {
var CategoryType = __webpack_require__(90).CategoryType;
if ((type1 instanceof CategoryType) && (type2 instanceof CategoryType))
return inferCommonCategoryType(context, type1, type2, true);
else
return null;
}
function inferCommonCategoryType(context, type1, type2, trySwap) {
var CategoryType = __webpack_require__(90).CategoryType;
var CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
var decl1 = context.getRegisteredDeclaration(type1.id.name);
if (decl1.derivedFrom != null) {
for (var i = 0; i < decl1.derivedFrom.length; i++) {
var parentType = new CategoryType(decl1.derivedFrom[i]);
if (parentType.isAssignableFrom(context, type2))
return parentType;
}
// climb up the tree
for (var i = 0; i < decl1.derivedFrom.length; i++) {
var parentType = new CategoryType(decl1.derivedFrom[i]);
var commonType = inferCommonCategoryType(context, parentType, type2, false)
if (commonType != null)
return commonType;
}
}
if (trySwap)
return inferCommonCategoryType(context, type2, type1, false);
else
return null;
}
exports.convertFromJavaScript = convertFromJavaScript;
exports.inferExpressionsType = inferExpressionsType;
exports.inferElementType = inferElementType;
/***/ },
/* 170 */
/***/ function(module, exports, __webpack_require__) {
var NativeCategoryBinding = __webpack_require__(171).NativeCategoryBinding;
function JavaScriptNativeCategoryBinding(identifier, module) {
NativeCategoryBinding.call(this);
this.identifier = identifier;
this.module = module || null;
return this;
}
JavaScriptNativeCategoryBinding.prototype = Object.create(NativeCategoryBinding.prototype);
JavaScriptNativeCategoryBinding.prototype.creator = JavaScriptNativeCategoryBinding;
JavaScriptNativeCategoryBinding.prototype.resolve = function() {
var m = this.resolve_module();
if(m==null) {
return eval(this.identifier);
} else {
return m[this.identifier] || null;
}
};
JavaScriptNativeCategoryBinding.prototype.resolve_module = function(context) {
if (this.module == null) {
return null;
} else {
return this.module.resolve();
}
};
JavaScriptNativeCategoryBinding.prototype.toDialect = function(writer) {
writer.append("JavaScript: ");
writer.append(this.identifier);
if(this.module!=null)
this.module.toDialect(writer);
};
exports.JavaScriptNativeCategoryBinding = JavaScriptNativeCategoryBinding;
/***/ },
/* 171 */
/***/ function(module, exports) {
function NativeCategoryBinding() {
return this;
}
exports.NativeCategoryBinding = NativeCategoryBinding;
/***/ },
/* 172 */
/***/ function(module, exports, __webpack_require__) {
var NativeCategoryDeclaration = __webpack_require__(166).NativeCategoryDeclaration;
var ResourceType = __webpack_require__(173).ResourceType;
var NativeResource = __webpack_require__(174).NativeResource;
var ResourceContext = __webpack_require__(52).ResourceContext;
function NativeResourceDeclaration(id, attributes, categoryBindings, attributeBindings, methods) {
NativeCategoryDeclaration.call(this, id, attributes, categoryBindings, attributeBindings, methods);
return this;
}
NativeResourceDeclaration.prototype = Object.create(NativeCategoryDeclaration.prototype);
NativeResourceDeclaration.prototype.constructor = NativeResourceDeclaration;
NativeResourceDeclaration.prototype.getType = function(context) {
return new ResourceType(this.id);
};
NativeResourceDeclaration.prototype.newInstance = function() {
return new NativeResource(this);
};
NativeResourceDeclaration.prototype.checkConstructorContext = function(context) {
if(!(context instanceof ResourceContext))
context.problemListener.reportNotAResourceContext(this);
};
NativeResourceDeclaration.prototype.categoryTypeToEDialect = function(writer) {
writer.append("native resource");
};
NativeResourceDeclaration.prototype.categoryTypeToODialect = function(writer) {
writer.append("native resource");
};
NativeResourceDeclaration.prototype.categoryTypeToMDialect = function(writer) {
writer.append("native resource");
};
exports.NativeResourceDeclaration = NativeResourceDeclaration;
/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {
var CategoryType = __webpack_require__(90).CategoryType;
function ResourceType(name) {
CategoryType.call(this, name);
return this;
}
ResourceType.prototype = Object.create(CategoryType.prototype);
ResourceType.prototype.constructor = ResourceType;
ResourceType.prototype.equals = function(obj) {
if(obj==this) {
return true;
}
if(!(obj instanceof ResourceType)) {
return false;
}
return this.name==obj.name;
};
exports.ResourceType = ResourceType;
/***/ },
/* 174 */
/***/ function(module, exports, __webpack_require__) {
var NativeInstance = __webpack_require__(168).NativeInstance;
function NativeResource(declaration) {
NativeInstance.call(this, declaration);
return this;
}
NativeResource.prototype = Object.create(NativeInstance.prototype);
NativeResource.prototype.constructor = NativeResource;
NativeResource.prototype.isReadable = function() {
return this.instance.isReadable();
};
NativeResource.prototype.isWritable = function() {
return this.instance.isWritable();
};
NativeResource.prototype.readFully = function() {
return this.instance.readFully();
};
NativeResource.prototype.writeFully = function(data) {
this.instance.writeFully(data);
};
NativeResource.prototype.readLine = function() {
return this.instance.readLine();
};
NativeResource.prototype.writeLine = function(data) {
this.instance.writeLine(data);
};
NativeResource.prototype.close = function() {
this.instance.close();
};
exports.NativeResource = NativeResource;
/***/ },
/* 175 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteMethodDeclaration = __webpack_require__(161).ConcreteMethodDeclaration;
var ArgumentList = __webpack_require__(134).ArgumentList;
var Identifier = __webpack_require__(70).Identifier;
var VoidType = __webpack_require__(143).VoidType;
function OperatorMethodDeclaration(op, arg, returnType, stmts) {
ConcreteMethodDeclaration.call(this, new Identifier("operator_" + op.name), new ArgumentList(arg), returnType, stmts);
this.operator = op;
return this;
}
OperatorMethodDeclaration.prototype = Object.create(ConcreteMethodDeclaration.prototype);
OperatorMethodDeclaration.prototype.constructor = OperatorMethodDeclaration;
OperatorMethodDeclaration.prototype.memberCheck = function(declaration, context) {
// TODO Auto-generated method stub
};
OperatorMethodDeclaration.prototype.toMDialect = function(writer) {
writer.append("def operator ");
writer.append(this.operator.token);
writer.append(" (");
this.args.toDialect(writer);
writer.append(")");
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("->");
this.returnType.toDialect(writer);
}
writer.append(":\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
OperatorMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.operator.token);
writer.append(" as operator ");
this.args.toDialect(writer);
if(this.returnType!=null && this.returnType!=VoidType.instance) {
writer.append("returning ");
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("doing:\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
OperatorMethodDeclaration.prototype.toODialect = function(writer) {
if(this.returnType!=null && this.returnType!=VoidType.instance) {
this.returnType.toDialect(writer);
writer.append(" ");
}
writer.append("operator ");
writer.append(this.operator.token);
writer.append(" (");
this.args.toDialect(writer);
writer.append(") {\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
writer.append("}\n");
};
exports.OperatorMethodDeclaration = OperatorMethodDeclaration;
/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteMethodDeclaration = __webpack_require__(161).ConcreteMethodDeclaration;
function GetterMethodDeclaration(id, statements) {
ConcreteMethodDeclaration.call(this, id, null, null, statements);
return this;
}
GetterMethodDeclaration.prototype = Object.create(ConcreteMethodDeclaration.prototype);
GetterMethodDeclaration.prototype.contructor = GetterMethodDeclaration;
GetterMethodDeclaration.prototype.toODialect = function(writer) {
writer.append("getter ");
writer.append(this.name);
writer.append(" {\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
writer.append("}\n");
};
GetterMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as getter doing:\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
GetterMethodDeclaration.prototype.toMDialect = function(writer) {
writer.append("def ");
writer.append(this.name);
writer.append(" getter():\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
};
exports.GetterMethodDeclaration = GetterMethodDeclaration;
/***/ },
/* 177 */
/***/ function(module, exports, __webpack_require__) {
var ConcreteMethodDeclaration = __webpack_require__(161).ConcreteMethodDeclaration;
function SetterMethodDeclaration(id, statements) {
ConcreteMethodDeclaration.call(this, id, null, null, statements);
return this;
}
SetterMethodDeclaration.prototype = Object.create(ConcreteMethodDeclaration.prototype);
SetterMethodDeclaration.prototype.contructor = SetterMethodDeclaration;
SetterMethodDeclaration.prototype.toODialect = function(writer) {
writer.append("setter ");
writer.append(this.name);
writer.append(" {\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
writer.append("}\n");
}
SetterMethodDeclaration.prototype.toEDialect = function(writer) {
writer.append("define ");
writer.append(this.name);
writer.append(" as setter doing:\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
}
SetterMethodDeclaration.prototype.toMDialect = function(writer) {
writer.append("def ");
writer.append(this.name);
writer.append(" setter():\n");
writer.indent();
this.statements.toDialect(writer);
writer.dedent();
}
exports.SetterMethodDeclaration = SetterMethodDeclaration;
/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {
var GetterMethodDeclaration = __webpack_require__(176).GetterMethodDeclaration;
function NativeGetterMethodDeclaration(id, statements) {
GetterMethodDeclaration.call(this, id, statements);
return this;
}
NativeGetterMethodDeclaration.prototype = Object.create(GetterMethodDeclaration.prototype);
NativeGetterMethodDeclaration.prototype.contructor = NativeGetterMethodDeclaration;
NativeGetterMethodDeclaration.prototype.interpret = function(context) {
context.enterMethod(this);
try {
var result = this.statements.interpretNative(context, this.returnType);
return this.castToReturnType(context, result);
} finally {
context.leaveMethod(this);
}
};
NativeGetterMethodDeclaration.prototype.castToReturnType = function(context, value) {
// can only cast to specified type, and if required
if(this.returnType!=null && !(this.returnType.isAssignableFrom(context, value.type))) {
// only cast if implemented, on a per type basis
if(this.returnType.nativeCast)
value = this.returnType.nativeCast(context, value);
}
return value;
};
exports.NativeGetterMethodDeclaration = NativeGetterMethodDeclaration;
/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {
var SetterMethodDeclaration = __webpack_require__(177).SetterMethodDeclaration;
function NativeSetterMethodDeclaration(id, statements) {
SetterMethodDeclaration.call(this, id, statements);
return this;
}
NativeSetterMethodDeclaration.prototype = Object.create(SetterMethodDeclaration.prototype);
NativeSetterMethodDeclaration.prototype.contructor = NativeSetterMethodDeclaration;
exports.NativeSetterMethodDeclaration = NativeSetterMethodDeclaration;
/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {
exports.UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
exports.ItemSelector = __webpack_require__(181).ItemSelector;
exports.SliceSelector = __webpack_require__(182).SliceSelector;
exports.MemberSelector = __webpack_require__(137).MemberSelector;
exports.MethodSelector = __webpack_require__(183).MethodSelector;
exports.SelectorExpression = __webpack_require__(138).SelectorExpression;
exports.PlusExpression = __webpack_require__(201).PlusExpression;
exports.SubtractExpression = __webpack_require__(202).SubtractExpression;
exports.EqualsExpression = __webpack_require__(203).EqualsExpression;
exports.FetchOneExpression = __webpack_require__(206).FetchOneExpression;
exports.FetchManyExpression = __webpack_require__(209).FetchManyExpression;
exports.ContainsExpression = __webpack_require__(212).ContainsExpression;
exports.DivideExpression = __webpack_require__(214).DivideExpression;
exports.IntDivideExpression = __webpack_require__(215).IntDivideExpression;
exports.ModuloExpression = __webpack_require__(216).ModuloExpression;
exports.MinusExpression = __webpack_require__(217).MinusExpression;
exports.MultiplyExpression = __webpack_require__(218).MultiplyExpression;
exports.AndExpression = __webpack_require__(219).AndExpression;
exports.OrExpression = __webpack_require__(220).OrExpression;
exports.NotExpression = __webpack_require__(221).NotExpression;
exports.CompareExpression = __webpack_require__(222).CompareExpression;
exports.MethodExpression = __webpack_require__(224).MethodExpression;
exports.SymbolExpression = __webpack_require__(139).SymbolExpression;
exports.FilteredExpression = __webpack_require__(225).FilteredExpression;
exports.CodeExpression = __webpack_require__(228).CodeExpression;
exports.ExecuteExpression = __webpack_require__(230).ExecuteExpression;
exports.InstanceExpression = __webpack_require__(184).InstanceExpression;
exports.BlobExpression = __webpack_require__(231).BlobExpression;
exports.DocumentExpression = __webpack_require__(337).DocumentExpression;
exports.ConstructorExpression = __webpack_require__(338).ConstructorExpression;
exports.ParenthesisExpression = __webpack_require__(339).ParenthesisExpression;
exports.IteratorExpression = __webpack_require__(340).IteratorExpression;
exports.SortedExpression = __webpack_require__(343).SortedExpression;
exports.TernaryExpression = __webpack_require__(344).TernaryExpression;
exports.ReadAllExpression = __webpack_require__(345).ReadAllExpression;
exports.ReadOneExpression = __webpack_require__(347).ReadOneExpression;
exports.TypeExpression = __webpack_require__(140).TypeExpression;
exports.CastExpression = __webpack_require__(348).CastExpression;
exports.ThisExpression = __webpack_require__(349).ThisExpression;
exports.NativeSymbol = __webpack_require__(350).NativeSymbol;
exports.CategorySymbol = __webpack_require__(352).CategorySymbol;
exports.UnresolvedSelector = __webpack_require__(353).UnresolvedSelector;
__webpack_require__(183).resolve();
__webpack_require__(137).resolve();
__webpack_require__(224).resolve();
__webpack_require__(184).resolve();
__webpack_require__(138).resolve();
__webpack_require__(338).resolve();
__webpack_require__(91).resolve();
__webpack_require__(353).resolve();
/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {
var SelectorExpression = __webpack_require__(138).SelectorExpression;
var Value = __webpack_require__(73).Value;
var NullValue = __webpack_require__(74).NullValue;
var NullReferenceError = __webpack_require__(142).NullReferenceError;
function ItemSelector(parent, item) {
SelectorExpression.call(this, parent);
this.item = item;
}
ItemSelector.prototype = Object.create(SelectorExpression.prototype);
ItemSelector.prototype.constructor = ItemSelector;
ItemSelector.prototype.toString = function() {
return this.parent.toString() + "[" + this.item.toString() + "]";
};
ItemSelector.prototype.toDialect = function(writer) {
this.parent.toDialect(writer);
writer.append("[");
this.item.toDialect(writer);
writer.append("]");
};
ItemSelector.prototype.check = function(context) {
var parentType = this.parent.check(context);
var itemType = this.item.check(context);
return parentType.checkItem(context,itemType);
};
ItemSelector.prototype.interpret = function(context) {
var o = this.parent.interpret(context);
if (o == null || o == NullValue.instance) {
throw new NullReferenceError();
}
var i = this.item.interpret(context);
if (i == null || i == NullValue.instance) {
throw new NullReferenceError();
}
if (o.getItemInContext && i instanceof Value) {
return o.getItemInContext(context, i);
} else {
throw new SyntaxError("Unknown container: " + this.parent);
}
};
exports.ItemSelector = ItemSelector;
/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {
var SelectorExpression = __webpack_require__(138).SelectorExpression;
var NullReferenceError = __webpack_require__(142).NullReferenceError;
var IntegerType = __webpack_require__(81).IntegerType;
var Integer = __webpack_require__(78).Integer;
function SliceSelector(parent, first, last) {
SelectorExpression.call(this, parent);
this.first = first || null;
this.last = last || null;
return this;
}
SliceSelector.prototype = Object.create(SelectorExpression.prototype);
SliceSelector.prototype.constructor = SliceSelector;
SliceSelector.prototype.toString = function() {
return this.parent.toString() + "[" +
(this.first==null?"":this.first.toString()) + ":" +
(this.last==null?"":this.last.toString()) + "]";
};
SliceSelector.prototype.toDialect = function(writer) {
this.parent.toDialect(writer);
writer.append('[');
if (this.first != null)
this.first.toDialect(writer);
writer.append(':');
if (this.last != null)
this.last.toDialect(writer);
writer.append(']');
};
SliceSelector.prototype.check = function(context) {
var firstType = this.first!=null ? this.first.check(context) : null;
var lastType = this.last!=null ? this.last.check(context) : null;
if(this.firstType!=null && !(this.firstType instanceof IntegerType)) {
throw new SyntaxError(this.firstType.toString() + " is not an integer");
}
if(this.lastType!=null && !(this.lastType instanceof IntegerType)) {
throw new SyntaxError(this.lastType.toString() + " is not an integer");
}
var parentType = this.parent.check(context);
return parentType.checkSlice(context);
};
SliceSelector.prototype.interpret = function(context) {
var o = this.parent.interpret(context);
if (o == null) {
throw new NullReferenceError();
}
if (o.sliceable)
o = o.sliceable;
if (o.slice) {
var fi = this.first != null ? this.first.interpret(context) : null;
if (fi != null && !(fi instanceof Integer)) {
throw new SyntaxError("Illegal slice value type: " + fi);
}
var li = this.last != null ? this.last.interpret(context) : null;
if (li != null && !(li instanceof Integer)) {
throw new SyntaxError("Illegal slice value type: " + li);
}
return o.slice(fi, li);
} else {
throw new SyntaxError("Illegal sliced object: " + this.parent);
}
};
exports.SliceSelector = SliceSelector;
/***/ },
/* 183 */
/***/ function(module, exports, __webpack_require__) {
var MemberSelector = __webpack_require__(137).MemberSelector;
var InvalidDataError = __webpack_require__(122).InvalidDataError;
var NullReferenceError = __webpack_require__(142).NullReferenceError;
var UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
var InstanceExpression = __webpack_require__(184).InstanceExpression;
var NullValue = __webpack_require__(74).NullValue;
var TypeValue = __webpack_require__(141).TypeValue;
var InstanceContext = null;
var ConcreteInstance = __webpack_require__(187).ConcreteInstance;
var CategoryType = null;
exports.resolve = function() {
CategoryType = __webpack_require__(90).CategoryType;
InstanceContext = __webpack_require__(52).InstanceContext;
};
function MethodSelector(parent, id) {
MemberSelector.call(this, parent, id);
return this;
}
MethodSelector.prototype = Object.create(MemberSelector.prototype);
MethodSelector.prototype.constructor = MethodSelector;
MethodSelector.prototype.toDialect = function(writer) {
if(this.parent==null)
writer.append(this.name);
else
MemberSelector.prototype.toDialect.call(this, writer);
};
MethodSelector.prototype.toString = function() {
if(this.parent==null) {
return this.name;
} else {
return MemberSelector.prototype.toString.call(this) + "." + this.name;
}
};
MethodSelector.prototype.getCandidates = function(context, checkInstance) {
if(this.parent===null) {
return this.getGlobalCandidates(context);
} else {
return this.getMemberCandidates(context, checkInstance);
}
};
MethodSelector.prototype.getGlobalCandidates = function(context) {
var methods = []
// if called from a member method, could be a member method called without this/self
if(context.parent instanceof InstanceContext) {
var type = context.parent.instanceType;
var cd = context.getRegisteredDeclaration(type.name);
if(cd!=null) {
var members = cd.getMemberMethods(context, this.name);
if(members!=null) {
Object.keys(members).forEach(function (key) {
methods.push(members[key])
});
}
}
}
var methodsMap = context.getRegisteredDeclaration(this.name);
if(methodsMap!=null && methodsMap.protos != null)
Object.keys(methodsMap.protos).forEach(function (proto) {
methods.push(methodsMap.protos[proto])
});
return methods;
};
MethodSelector.prototype.getMemberCandidates = function(context, checkInstance) {
var parentType = this.checkParentType(context, checkInstance);
return parentType.getMemberMethods(context, this.name);
};
MethodSelector.prototype.checkParentType = function(context, checkInstance) {
if(checkInstance)
return this.checkParentInstance(context);
else
return this.checkParent(context);
};
MethodSelector.prototype.checkParentInstance = function(context) {
var id = null;
if(this.parent instanceof UnresolvedIdentifier)
id = this.parent.id;
else if(this.parent instanceof InstanceExpression)
id = this.parent.id;
if(id!=null) {
// don't get Singleton values
var first = id.name.substring(0, 1);
if(first.toLowerCase()==first) {
var value = context.getValue(id);
if(value!=null && value!=NullValue.instance)
return value.type;
}
}
// TODO check result instance
return this.checkParent(context);
};
MethodSelector.prototype.getCategoryCandidates = function(context) {
var parentType = this.checkParent(context);
if(!(parentType instanceof CategoryType)) {
throw new SyntaxError(parent.toString() + " is not a category");
}
var cd = context.getRegisteredDeclaration(parentType.name);
if(cd===null) {
throw new SyntaxError("Unknown category:" + parentType.name);
}
return cd.getMemberMethods(context, this.name);
};
MethodSelector.prototype.newLocalContext = function(context, decl) {
if(this.parent!=null) {
return this.newInstanceContext(context);
} else if(decl.memberOf!=null) {
return this.newLocalInstanceContext(context);
} else {
return context.newLocalContext();
}
};
MethodSelector.prototype.newLocalInstanceContext = function(context) {
var parent = context.parent;
if(!(parent instanceof InstanceContext))
throw new SyntaxError("Not in instance context !");
context = context.newLocalContext();
context.parent = parent; // make local context child of the existing instance
return context;
};
MethodSelector.prototype.newLocalCheckContext = function(context, decl) {
if (this.parent != null) {
return this.newInstanceCheckContext(context);
} else if(decl.memberOf!=null) {
return this.newLocalInstanceContext(context);
} else {
return context.newLocalContext();
}
};
MethodSelector.prototype.newInstanceCheckContext = function(context) {
var type = this.parent.check (context);
if (type instanceof CategoryType) {
context = context.newInstanceContext(null, type);
return context.newChildContext();
} else
return context.newChildContext();
};
MethodSelector.prototype.newInstanceContext = function(context) {
var value = this.parent.interpret(context);
if(value==null || value==NullValue.instance) {
throw new NullReferenceError();
}
if(value instanceof TypeValue && value.value instanceof CategoryType)
value = context.loadSingleton(value.value);
if(value instanceof ConcreteInstance) {
context = context.newInstanceContext(value, null);
return context.newChildContext();
} else {
context = context.newBuiltInContext(value);
return context.newChildContext();
}
};
exports.MethodSelector = MethodSelector;
/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {
var Variable = __webpack_require__(88).Variable;
var LinkedVariable = __webpack_require__(185).LinkedVariable;
var Identifier = __webpack_require__(70).Identifier;
var Argument = __webpack_require__(109).Argument;
var Dialect = __webpack_require__(98).Dialect;
var CategoryDeclaration = null;
var MethodType = __webpack_require__(119).MethodType;
var ClosureValue = __webpack_require__(186).ClosureValue;
var AttributeDeclaration = __webpack_require__(56).AttributeDeclaration;
var MethodDeclarationMap = null;
exports.resolve = function() {
CategoryDeclaration = __webpack_require__(55).CategoryDeclaration;
MethodDeclarationMap = __webpack_require__(52).MethodDeclarationMap;
}
function InstanceExpression(id) {
this.id = id;
return this;
}
Object.defineProperty(InstanceExpression.prototype, "name", {
get : function() {
return this.id.name;
}
});
InstanceExpression.prototype.toString = function() {
return this.name;
};
InstanceExpression.prototype.toDialect = function(writer, requireMethod) {
if(requireMethod === undefined)
requireMethod = true;
if(requireMethod && this.requiresMethod(writer))
writer.append("Method: ");
writer.append(this.name);
};
InstanceExpression.prototype.requiresMethod = function(writer) {
if(writer.dialect!=Dialect.E)
return false;
var o = writer.context.getRegistered(this.name);
if(o instanceof MethodDeclarationMap)
return true;
return false;
};
InstanceExpression.prototype.check = function(context) {
var named = context.getRegistered(this.id.name);
if (named == null) {
throw new SyntaxError("Unknown identifier:" + this.id.name);
} else if (named instanceof Variable) { // local variable
return named.getType(context);
} else if(named instanceof LinkedVariable) { // local variable
return named.getType(context);
} else if (named instanceof Argument) { // named argument
return named.getType(context);
} else if(named instanceof CategoryDeclaration) { // any p with x
return named.getType(context);
} else if(named instanceof AttributeDeclaration) { // in category method
return named.getType(context);
} else if(named instanceof MethodDeclarationMap) { // global method or closure
return new MethodType(named.getFirst());
} else
context.problemListener.reportUnknownVariable(this.id);
};
InstanceExpression.prototype.interpret = function(context) {
if(context.hasValue(this.id)) {
return context.getValue(this.id);
} else {
var named = context.getRegistered(this.id);
if (named instanceof MethodDeclarationMap) {
var decl = named.getFirst();
return new ClosureValue(context, new MethodType(decl))
} else {
throw new SyntaxError("No method with name:" + this.name);
}
}
};
exports.InstanceExpression = InstanceExpression;
/***/ },
/* 185 */
/***/ function(module, exports) {
/* used for downcast */
function LinkedVariable (type, linked) {
this.type = type;
this.linked = linked;
return this;
}
LinkedVariable.prototype.getType = function(context) {
return this.type;
};
Object.defineProperty(LinkedVariable.prototype, "name", {
get : function() {
return this.linked.name;
}
});
exports.LinkedVariable = LinkedVariable;
/***/ },
/* 186 */
/***/ function(module, exports, __webpack_require__) {
var MethodType = __webpack_require__(119).MethodType;
var Value = __webpack_require__(73).Value;
function ClosureValue(context, type) {
Value.call(this, type);
this.context = context;
return this;
}
ClosureValue.prototype = Object.create(Value.prototype);
ClosureValue.prototype.constructor = ClosureValue;
ClosureValue.prototype.interpret = function(context) {
var parentMost = this.context.getParentMostContext();
parentMost.setParentContext(context);
var result = this.type.method.interpret(this.context);
parentMost.setParentContext(null);
return result;
};
exports.ClosureValue = ClosureValue;
/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {
var CategoryType = null;
var ContextualExpression = __webpack_require__(136).ContextualExpression;
var NotMutableError = __webpack_require__(153).NotMutableError;
var StorableDocument = __webpack_require__(188).StorableDocument;
var ExpressionValue = __webpack_require__(199).ExpressionValue;
var DecimalType = __webpack_require__(80).DecimalType;
var Variable = __webpack_require__(88).Variable;
var Identifier = __webpack_require__(70).Identifier;
var Operator = __webpack_require__(200).Operator;
var NullValue = __webpack_require__(74).NullValue;
var Decimal = __webpack_require__(79).Decimal;
var Integer = __webpack_require__(78).Integer;
var Text = __webpack_require__(76).Text;
var Instance = __webpack_require__(73).Instance;
var DataStore = __webpack_require__(189).DataStore;
var TypeUtils = __webpack_require__(169);
exports.resolve = function() {
CategoryType = __webpack_require__(90).CategoryType;
};
function ConcreteInstance(context, declaration) {
Instance.call(this, new CategoryType(declaration.id));
this.declaration = declaration;
this.storable = false;
if(declaration.storable) {
var categories = declaration.collectCategories(context);
this.storable = DataStore.instance.newStorableDocument(categories);
}
this.mutable = false;
this.values = {};
return this;
}
ConcreteInstance.prototype = Object.create(Instance.prototype);
ConcreteInstance.prototype.constructor = ConcreteInstance;
ConcreteInstance.prototype.getType = function() {
return this.type;
};
ConcreteInstance.prototype.convertToJavaScript = function() {
return this; // TODO, until we have a translator
};
ConcreteInstance.prototype.getDbId = function() {
var dbId = this.values["dbId"] || null;
return dbId == null ? null : dbId.getStorableData();
};
ConcreteInstance.prototype.getOrCreateDbId = function() {
var dbId = this.getDbId();
if(dbId==null) {
dbId = this.storable.getOrCreateDbId();
var value = TypeUtils.convertFromJavaScript(dbId);
this.values["dbId"] = value;
}
return dbId;
};
ConcreteInstance.prototype.getStorableData = function() {
// this is called when storing the instance as a field value, so we just return the dbId
// the instance data itself will be collected as part of collectStorables
if (this.storable == null)
throw new NotStorableError();
else
return this.getOrCreateDbId();
};
ConcreteInstance.prototype.getMemberNames = function() {
return Object.getOwnPropertyNames(this.values);
};
ConcreteInstance.prototype.collectStorables = function(list) {
if (this.storable==null)
throw new NotStorableError();
if (this.storable.dirty) {
this.getOrCreateDbId();
list.push(this.storable);
}
for(var field in this.values) {
this.values[field].collectStorables(list);
}
};
// don't call getters from getters, so register them
// TODO: thread local storage
var activeGetters = {};
function getActiveGetters() {
return activeGetters;
}
ConcreteInstance.prototype.getMemberValue = function(context, attrName) {
/* if(typeof(attrName) != typeof(""))
throw "What?"; */
var stacked = getActiveGetters()[attrName] || null;
var first = stacked==null;
if(first)
getActiveGetters()[attrName] = context;
try {
return this.doGetMember(context, attrName, first);
} finally {
if(first) {
delete getActiveGetters()[attrName];
}
}
};
ConcreteInstance.prototype.doGetMember = function(context, attrName, allowGetter) {
var getter = allowGetter ? this.declaration.findGetter(context, attrName) : null;
if (getter != null) {
context = context.newInstanceContext(this, null).newChildContext();
return getter.interpret(context);
} else if (this.declaration.hasAttribute(context, attrName) || "dbId" == attrName) {
return this.values[attrName] || NullValue.instance;
} else if ("text" == attrName) {
return new Text(this.toString());
} else
return NullValue.instance;
};
// don't call setters from setters, so register them
var activeSetters = {};
function getActiveSetters() {
return activeSetters;
}
ConcreteInstance.prototype.setMember = function(context, attrName, value) {
/* if(typeof(attrName) != typeof(""))
throw "What?"; */
if(!this.mutable)
throw new NotMutableError();
var stacked = getActiveSetters()[attrName] || null;
var first = stacked==null;
if(first)
getActiveSetters()[attrName] = context;
try {
this.doSetMember(context, attrName, value, first);
} finally {
if(first) {
delete getActiveSetters()[attrName];
}
}
};
ConcreteInstance.prototype.doSetMember = function(context, attrName, value, allowSetter) {
var decl = context.getRegisteredDeclaration(attrName);
var setter = allowSetter ? this.declaration.findSetter(context,attrName) : null;
if(setter!=null) {
// use attribute name as parameter name for incoming value
context = context.newInstanceContext(this, null).newChildContext();
var id = new Identifier(attrName);
context.registerValue(new Variable(id, decl.getType()));
context.setValue(id, value);
value = setter.interpret(context);
}
value = this.autocast(decl, value);
this.values[attrName] = value;
if (this.storable && decl.storable) // TODO convert object graph if(value instanceof IInstance)
this.storable.setData(attrName, value.getStorableData());
};
ConcreteInstance.prototype.autocast = function(decl, value) {
if(value instanceof Integer && decl.getType()==DecimalType.instance)
value = new Decimal(value.DecimalValue());
return value;
};
ConcreteInstance.prototype.equals = function(obj) {
if(obj==this) {
return true;
} else if(!(obj instanceof ConcreteInstance)) {
return false;
} else {
var names = Object.getOwnPropertyNames(this.values);
var otherNames = Object.getOwnPropertyNames(obj.values);
if(names.length!=otherNames.length) {
return false;
}
for(var i=0;idocs.length)
lastValue = docs.length;
if(firstValue>docs.length || firstValue > lastValue)
return [];
return docs.slice(firstValue - 1, lastValue);
};
MemStore.prototype.sort = function(query, docs) {
if(!query.orderBys || docs.length<2)
return docs;
var self = this;
docs.sort( function(doc1, doc2) {
var tuple1 = self.readTuple(doc1, query.orderBys);
var tuple2 = self.readTuple(doc2, query.orderBys);
return self.compareTuples(tuple1, tuple2, query.orderBys);
});
return docs;
};
MemStore.prototype.compareTuples = function(tuple1, tuple2, orderBys) {
for(var i=0;i=tuple2.length)
return descending ? -1 : 1;
var val1 = tuple1[i];
var val2 = tuple2[i];
if(val1==null && val2==null)
continue;
else if(val1==null)
return descending ? 1 : -1;
else if(val2==null)
return descending ? -1 : 1;
var res = val1 < val2 ? -1 : val2 < val1 ? 1 : 0;
if(res)
return descending ? -res : res;
}
return 0;
};
MemStore.prototype.readTuple = function(doc, orderBys) {
return orderBys.map(function(ob) {
return this.readValue(doc, ob);
}, this);
};
MemStore.prototype.readValue = function(doc, orderBy) {
// TODO drill-down
return doc[orderBy.info.name];
};
MemStore.prototype.fetchMatching = function(query) {
var docs = [];
for (dbId in this.iterDocuments) {
doc = this.iterDocuments[dbId];
if(doc.matches(query.predicate))
docs.push(doc);
}
return docs;
};
MemStore.prototype.newQueryBuilder = function() {
return new MemQueryBuilder();
};
MemStore.prototype.newStorableDocument = function(categories) {
if(!StorableDocument)
StorableDocument = __webpack_require__(188).StorableDocument;
return new StorableDocument(categories);
};
function StoredIterator(docs, totalCount) {
this.index = 0;
this.count = function() { return docs.length; };
this.totalCount = function() { return totalCount; };
this.hasNext = function() { return this.index < docs.length; };
this.next = function() { return docs[this.index++]; };
return this;
}
exports.MemStore = MemStore;
/***/ },
/* 191 */
/***/ function(module, exports) {
function Store() {
return this;
}
Store.prototype.newQueryBuilder = function() {
throw new Error("Must override newQueryBuilder!");
};
Store.prototype.newStorableDocument = function() {
throw new Error("Must override newStorableDocument!");
};
Store.prototype.store = function(add, del) {
throw new Error("Must override store!");
};
Store.prototype.fetchUnique = function(dbId) {
throw new Error("Must override fetchUnique!");
};
Store.prototype.fetchOne = function(query) {
throw new Error("Must override fetchOne!");
};
Store.prototype.fetchMany = function(query) {
throw new Error("Must override fetchMany!");
};
function QueryBuilder() {
return this;
};
QueryBuilder.prototype.verify = function(fieldName, matchOp, value) {
throw new Error("Must override verify!");
};
QueryBuilder.prototype.and = function() {
throw new Error("Must override and!");
};
QueryBuilder.prototype.or = function() {
throw new Error("Must override or!");
};
QueryBuilder.prototype.not = function() {
throw new Error("Must override not!");
};
QueryBuilder.prototype.build = function() {
throw new Error("Must override build!");
};
QueryBuilder.prototype.setFirst = function(value) {
throw new Error("Must override setFirst!");
};
QueryBuilder.prototype.setLast = function(value) {
throw new Error("Must override setLast!");
};
QueryBuilder.prototype.addOrderByClause = function(field, descending) {
throw new Error("Must override addOrderByClause!");
};
exports.Store = Store;
exports.QueryBuilder = QueryBuilder;
/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {
var QueryBuilder = __webpack_require__(191).QueryBuilder;
var AndPredicate = __webpack_require__(193).AndPredicate;
var OrPredicate = __webpack_require__(194).OrPredicate;
var NotPredicate = __webpack_require__(195).NotPredicate;
var MatchPredicate = __webpack_require__(196).MatchPredicate;
function MemQueryBuilder() {
QueryBuilder.call(this);
this.orderBys = null;
this.predicates = null;
this.first = null;
this.last = null;
return this;
}
MemQueryBuilder.prototype = Object.create(QueryBuilder.prototype);
MemQueryBuilder.prototype.constructor = MemQueryBuilder;
MemQueryBuilder.prototype.verify = function(fieldName, matchOp, value) {
if(this.predicates==null)
this.predicates = [];
this.predicates.push(new MatchPredicate(fieldName, matchOp, value));
};
MemQueryBuilder.prototype.and = function() {
var right = this.predicates.pop();
var left = this.predicates.pop();
this.predicates.push(new AndPredicate(left, right));
};
MemQueryBuilder.prototype.or = function() {
var right = this.predicates.pop();
var left = this.predicates.pop();
this.predicates.push(new OrPredicate(left, right));
};
MemQueryBuilder.prototype.not = function() {
var top = this.predicates.pop();
this.predicates.push(new NotPredicate(top));
};
MemQueryBuilder.prototype.setFirst = function(value) {
this.first = value;
};
MemQueryBuilder.prototype.setLast = function(value) {
this.last = value;
};
MemQueryBuilder.prototype.build = function() {
return {
predicate: this.predicates==null ? null : this.predicates.pop(),
first: this.first,
last: this.last,
orderBys : this.orderBys
};
};
MemQueryBuilder.prototype.addOrderByClause = function(info, descending) {
if (this.orderBys == null)
this.orderBys = [];
this.orderBys.push({info: info, descending: descending});
};
exports.MemQueryBuilder = MemQueryBuilder;
/***/ },
/* 193 */
/***/ function(module, exports) {
function AndPredicate(left, right) {
this.left = left;
this.right = right;
return this;
}
AndPredicate.prototype.matches = function(stored) {
return this.left.matches(stored) && this.right.matches(stored);
};
exports.AndPredicate = AndPredicate;
/***/ },
/* 194 */
/***/ function(module, exports) {
function OrPredicate(left, right) {
this.left = left;
this.right = right;
return this;
}
OrPredicate.prototype.matches = function(stored) {
return this.left.matches(stored) || this.right.matches(stored);
};
exports.OrPredicate = OrPredicate;
/***/ },
/* 195 */
/***/ function(module, exports) {
function NotPredicate(pred) {
this.pred = pred;
return this;
}
NotPredicate.prototype.matches = function(stored) {
return !this.pred.matches(stored);
};
exports.NotPredicate = NotPredicate;
/***/ },
/* 196 */
/***/ function(module, exports, __webpack_require__) {
var MatchOp = __webpack_require__(197).MatchOp;
function MatchPredicate(info, matchOp, value) {
this.info = info;
this.matchOp = matchOp;
this.value = value;
return this;
}
MatchPredicate.prototype.matches = function(stored) {
var data = stored.getData(this.info.name);
switch(this.matchOp) {
case MatchOp.ROUGHLY:
if(typeof(data)==typeof(this.value) && typeof(data)==typeof(""))
return data.toLowerCase()==this.value.toLowerCase();
case MatchOp.EQUALS:
return this.value==data;
case MatchOp.CONTAINS:
return data==null ? false: data.indexOf(this.value)>=0;
case MatchOp.CONTAINED:
return this.value.indexOf(data)>=0;
case MatchOp.LESSER:
return this.value>data;
case MatchOp.GREATER:
return this.value=0)
writer.append("n");
}
writer.append(" ");
this.right.toDialect(writer);
};
EqualsExpression.prototype.check = function(context) {
this.left.check(context);
this.right.check(context);
return BooleanType.instance; // can compare all objects
};
EqualsExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context) || NullValue.instance;
var rval = this.right.interpret(context) || NullValue.instance;
return this.interpretValues(context, lval, rval);
};
EqualsExpression.prototype.interpretValues = function(context, lval, rval) {
var equal = false;
switch(this.operator) {
case EqOp.IS:
equal = lval==rval;
break;
case EqOp.IS_NOT:
equal = lval!=rval;
break;
case EqOp.IS_A:
equal = this.isA(context,lval,rval);
break;
case EqOp.IS_NOT_A:
equal = !this.isA(context,lval,rval);
break;
case EqOp.EQUALS:
equal = this.areEqual(context,lval,rval);
break;
case EqOp.NOT_EQUALS:
equal = !this.areEqual(context,lval,rval);
break;
case EqOp.ROUGHLY:
equal = this.roughly(context,lval,rval);
break;
}
return Bool.ValueOf(equal);
};
EqualsExpression.prototype.roughly = function(context, lval, rval) {
if(lval!=null && rval!=null && lval.Roughly) {
return lval.Roughly(context, rval);
} else {
return this.areEqual(context, lval, rval);
}
};
EqualsExpression.prototype.areEqual = function(context, lval, rval) {
if(lval==rval) {
return true;
} else if(lval==NullValue.instance || rval==NullValue.instance) {
return false;
} else {
return lval.equals(rval);
}
};
EqualsExpression.prototype.isA = function(context, lval, rval) {
if(lval instanceof Value && rval instanceof TypeValue) {
var actual = lval.type;
var toCheck = rval.value;
return toCheck.isAssignableFrom(context, actual);
} else
return false;
};
EqualsExpression.prototype.downCast = function(context, setValue) {
if(this.operator==EqOp.IS_A) {
var id = this.readLeftId();
if(id!=null) {
var value = context.getRegisteredValue(id.name);
var type = this.right.value;
var local = context.newChildContext();
value = new LinkedVariable(type, value);
local.registerValue(value, false);
if(setValue)
local.setValue(id, new LinkedValue(context));
context = local;
}
}
return context;
};
EqualsExpression.prototype.readLeftId = function() {
if(this.left instanceof InstanceExpression)
return this.left.id;
else if(this.left instanceof UnresolvedIdentifier)
return this.left.id;
else
return null;
};
EqualsExpression.prototype.interpretAssert = function(context, test) {
var lval = this.left.interpret(context) || NullValue.instance;
var rval = this.right.interpret(context) || NullValue.instance;
var result = this.interpretValues(context, lval, rval);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = lval.toString() + " " + this.operator.toString(test.dialect) + " " + rval.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
EqualsExpression.prototype.interpretQuery = function(context, query) {
var value = null;
var name = this.readFieldName(this.left);
if (name != null)
value = this.right.interpret(context);
else {
name = this.readFieldName(this.right);
if (name != null)
value = this.left.interpret(context);
else
throw new SyntaxError("Unable to interpret predicate");
}
if (value instanceof Instance)
value = value.getMemberValue(context, "dbId", false);
var decl = context.findAttribute(name);
var info = decl == null ? null : decl.getAttributeInfo();
var data = value == null ? null : value.getStorableData();
var match = this.getMatchOp();
query.verify(info, match, data);
if (this.operator == EqOp.NOT_EQUALS)
query.not();
};
EqualsExpression.prototype.getMatchOp = function() {
switch (this.operator) {
case EqOp.EQUALS:
return MatchOp.EQUALS;
case EqOp.ROUGHLY:
return MatchOp.ROUGHLY;
case EqOp.NOT_EQUALS:
return MatchOp.EQUALS
default:
throw new Exception("Not supported:" + this.operator.toString());
}
};
EqualsExpression.prototype.readFieldName = function(exp) {
if (exp instanceof UnresolvedIdentifier || exp instanceof InstanceExpression || exp instanceof MemberSelector)
return exp.toString();
else
return null;
};
exports.EqualsExpression = EqualsExpression;
/***/ },
/* 204 */
/***/ function(module, exports) {
/* used to ensure downcast local resolves to actual value */
function LinkedValue(context) {
this.context = context;
return this;
}
exports.LinkedValue = LinkedValue;
/***/ },
/* 205 */
/***/ function(module, exports) {
function EqOp(name) {
this.name = name
return this;
}
EqOp.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
EqOp.prototype.toString = function(dialect) {
if(dialect)
return dialect.toString(this);
else
return this.name;
};
EqOp.IS = new EqOp("IS");
EqOp.IS.toDialect = function(writer) {
writer.append('is');
};
EqOp.IS.toEString = function(dialect) {
return 'is';
};
EqOp.IS.toOString = EqOp.IS.toEString;
EqOp.IS.toMString = EqOp.IS.toEString;
EqOp.IS_NOT = new EqOp("IS_NOT");
EqOp.IS_NOT.toDialect = function(writer) {
writer.append('is not');
};
EqOp.IS_NOT.toEString = function(dialect) {
return 'is not';
};
EqOp.IS_NOT.toOString = EqOp.IS_NOT.toEString;
EqOp.IS_NOT.toMString = EqOp.IS_NOT.toEString;
EqOp.IS_A = new EqOp("IS_A");
EqOp.IS_A.toDialect = function(writer) {
writer.append('is a');
};
EqOp.IS_A.toEString = function(dialect) {
return 'is a';
};
EqOp.IS_A.toOString = EqOp.IS_A.toEString;
EqOp.IS_A.toMString = EqOp.IS_A.toEString;
EqOp.IS_NOT_A = new EqOp("IS_NOT_A");
EqOp.IS_NOT_A.toDialect = function(writer) {
writer.append('is not a');
};
EqOp.IS_NOT_A.toEString = function(dialect) {
return 'is not a';
};
EqOp.IS_NOT_A.toOString = EqOp.IS_NOT_A.toEString;
EqOp.IS_NOT_A.toMString = EqOp.IS_NOT_A.toEString;
EqOp.EQUALS = new EqOp("EQUALS");
EqOp.EQUALS.toEDialect = function(writer) {
writer.append('=');
};
EqOp.EQUALS.toODialect = function(writer) {
writer.append('==');
};
EqOp.EQUALS.toMDialect = function(writer) {
writer.append('==');
};
EqOp.EQUALS.toEString = function() {
return '=';
};
EqOp.EQUALS.toOString = function() {
return '==';
};
EqOp.EQUALS.toMString = function() {
return '==';
};
EqOp.NOT_EQUALS = new EqOp("NOT_EQUALS");
EqOp.NOT_EQUALS.toEDialect = function(writer) {
writer.append('<>');
};
EqOp.NOT_EQUALS.toODialect = function(writer) {
writer.append('!=');
};
EqOp.NOT_EQUALS.toMDialect = function(writer) {
writer.append('!=');
};
EqOp.NOT_EQUALS.toEString = function() {
return '<>';
};
EqOp.NOT_EQUALS.toOString = function() {
return '!=';
};
EqOp.NOT_EQUALS.toMString = function() {
return '!=';
};
EqOp.ROUGHLY = new EqOp("ROUGHLY");
EqOp.ROUGHLY.toEDialect = function(writer) {
writer.append('~');
};
EqOp.ROUGHLY.toODialect = function(writer) {
writer.append('~=');
};
EqOp.ROUGHLY.toMDialect = function(writer) {
writer.append('~=');
};
EqOp.ROUGHLY.toEString = function() {
return '~';
};
EqOp.ROUGHLY.toOString = function() {
return '~=';
};
EqOp.ROUGHLY.toMString = function() {
return '~=';
};
exports.EqOp = EqOp;
/***/ },
/* 206 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
var Identifier = __webpack_require__(70).Identifier;
var AnyType = __webpack_require__(71).AnyType;
var BooleanType = __webpack_require__(69).BooleanType;
var CategoryType = __webpack_require__(90).CategoryType;
var NullValue = __webpack_require__(74).NullValue;
var DataStore = __webpack_require__(189).DataStore;
var MatchOp = __webpack_require__(197).MatchOp;
var TypeFamily = __webpack_require__(207).TypeFamily;
var AttributeInfo = __webpack_require__(208).AttributeInfo;
function FetchOneExpression(typ, predicate, start, end) {
Section.call(this);
this.typ = typ;
this.predicate = predicate;
this.start = start;
this.end = end;
return this;
}
FetchOneExpression.prototype = Object.create(Section.prototype);
FetchOneExpression.prototype.constructor = FetchOneExpression;
FetchOneExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
FetchOneExpression.prototype.toEDialect = function(writer) {
writer.append("fetch one ");
if(this.typ!=null) {
writer.append(this.typ.name);
writer.append(" ");
}
writer.append("where ");
this.predicate.toDialect(writer);
};
FetchOneExpression.prototype.toODialect = function(writer) {
writer.append("fetch one ");
if(this.typ!=null) {
writer.append("(");
writer.append(this.typ.name);
writer.append(") ");
}
writer.append("where (");
this.predicate.toDialect(writer);
writer.append(")");
};
FetchOneExpression.prototype.toMDialect = function(writer) {
writer.append("fetch one ");
if(this.typ!=null) {
writer.append(this.typ.name);
writer.append(" ");
}
writer.append("where ");
this.predicate.toDialect(writer);
};
FetchOneExpression.prototype.check = function(context) {
if(this.typ!=null) {
var decl = context.getRegisteredDeclaration(this.typ.name);
if (decl == null)
throw new SyntaxError("Unknown category: " + this.typ.name);
}
var filterType = this.predicate.check(context);
if (filterType != BooleanType.instance)
throw new SyntaxError("Filtering expression must return a boolean !");
return this.typ || AnyType.instance;
};
FetchOneExpression.prototype.interpret = function(context) {
var store = DataStore.instance;
var query = this.buildFetchOneQuery(context, store);
var stored = store.fetchOne (query);
if (stored == null)
return NullValue.instance;
else {
var typeName = stored.getData("category").slice(-1)[0];
var typ = new CategoryType(new Identifier(typeName));
if (this.typ != null)
typ.mutable = this.typ.mutable;
return typ.newInstanceFromStored(context, stored);
}
};
FetchOneExpression.prototype.buildFetchOneQuery = function(context, store) {
var builder = store.newQueryBuilder();
if (this.typ != null) {
var info = AttributeInfo("category", TypeFamily.TEXT, true, null);
builder.verify(info, MatchOp.CONTAINS, this.typ.name);
}
if (this.predicate != null) {
this.predicate.interpretQuery(context, builder);
}
if (this.typ != null && this.predicate != null) {
builder.and();
}
return builder.build();
};
exports.FetchOneExpression = FetchOneExpression;
/***/ },
/* 207 */
/***/ function(module, exports) {
function TypeFamily(name) {
this.name = name;
return this;
};
// non storable
TypeFamily.BOOLEAN = new TypeFamily("BOOLEAN");
TypeFamily.CHARACTER = new TypeFamily("CHARACTER");
TypeFamily.INTEGER = new TypeFamily("INTEGER");
TypeFamily.DECIMAL = new TypeFamily("DECIMAL");
TypeFamily.TEXT = new TypeFamily("TEXT");
TypeFamily.UUID = new TypeFamily("UUID");
TypeFamily.DATE = new TypeFamily("DATE");
TypeFamily.TIME = new TypeFamily("TIME");
TypeFamily.DATETIME = new TypeFamily("DATETIME");
TypeFamily.PERIOD = new TypeFamily("PERIOD");
TypeFamily.LIST = new TypeFamily("LIST");
TypeFamily.SET = new TypeFamily("SET");
TypeFamily.TUPLE = new TypeFamily("TUPLE");
TypeFamily.RANGE = new TypeFamily("RANGE");
TypeFamily.BLOB = new TypeFamily("BLOB");
TypeFamily.IMAGE = new TypeFamily("IMAGE");
TypeFamily.DOCUMENT = new TypeFamily("DOCUMENT");
TypeFamily.CATEGORY = new TypeFamily("CATEGORY");
TypeFamily.RESOURCE = new TypeFamily("RESOURCE");
TypeFamily.DICTIONARY = new TypeFamily("DICTIONARY");
TypeFamily.ENUMERATED = new TypeFamily("ENUMERATED");
// non storable
TypeFamily.VOID = new TypeFamily("VOID");
TypeFamily.NULL = new TypeFamily("NULL");
TypeFamily.ANY = new TypeFamily("ANY");
TypeFamily.METHOD = new TypeFamily("METHOD");
TypeFamily.CURSOR = new TypeFamily("CURSOR");
TypeFamily.ITERATOR = new TypeFamily("ITERATOR");
TypeFamily.CLASS = new TypeFamily("CLASS");
TypeFamily.TYPE = new TypeFamily("TYPE");
TypeFamily.CODE = new TypeFamily("CODE");
// volatile
TypeFamily.MISSING = new TypeFamily("MISSING");
exports.TypeFamily = TypeFamily;
/***/ },
/* 208 */
/***/ function(module, exports) {
function AttributeInfo(name, family, collection, indexTypes) {
this.name = name
this.family = family
this.collection = collection
this.key = indexTypes == null ? false : indexTypes.indexOf("key")>=0;
this.value = indexTypes == null ? false : indexTypes.indexOf("value")>=0;
this.words = indexTypes == null ? false : indexTypes.indexOf("words")>=0;
return this;
};
exports.AttributeInfo = AttributeInfo;
/***/ },
/* 209 */
/***/ function(module, exports, __webpack_require__) {
var IntegerType = __webpack_require__(81).IntegerType;
var BooleanType = __webpack_require__(69).BooleanType;
var AnyType = __webpack_require__(71).AnyType;
var CursorType = __webpack_require__(210).CursorType;
var Section = __webpack_require__(58).Section;
var DataStore = __webpack_require__(189).DataStore;
var AttributeInfo = __webpack_require__(208).AttributeInfo;
var TypeFamily = __webpack_require__(207).TypeFamily;
var MatchOp = __webpack_require__(197).MatchOp;
var Cursor = __webpack_require__(211).Cursor;
var Store = __webpack_require__(191).Store;
function FetchManyExpression(typ, first, last, predicate, orderBy) {
Section.call(this);
this.typ = typ;
this.predicate = predicate;
this.first = first;
this.last = last;
this.orderBy = orderBy;
return this;
}
FetchManyExpression.prototype = Object.create(Section.prototype);
FetchManyExpression.prototype.constructor = FetchManyExpression;
FetchManyExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
FetchManyExpression.prototype.toEDialect = function(writer) {
writer.append("fetch ");
if(this.first==null)
writer.append("all ");
if(this.typ!=null) {
writer.append(this.typ.name);
writer.append(" ");
}
if(this.first!=null) {
this.first.toDialect(writer);
writer.append(" to ");
this.last.toDialect(writer);
writer.append(" ");
}
if(this.predicate!=null) {
writer.append("where ");
this.predicate.toDialect(writer);
writer.append(" ");
}
if(this.orderBy!=null) {
this.orderBy.toDialect(writer);
}
};
FetchManyExpression.prototype.toODialect = function(writer) {
writer.append("fetch ");
if(this.first==null)
writer.append("all ");
if(this.typ!=null) {
writer.append("( ");
writer.append(this.typ.name);
writer.append(" ) ");
}
if(this.first!=null) {
writer.append("rows ( ");
this.first.toDialect(writer);
writer.append(" to ");
this.last.toDialect(writer);
writer.append(") ");
}
if(this.predicate!=null) {
writer.append("where ( ");
this.predicate.toDialect(writer);
writer.append(") ");
}
if(this.orderBy!=null)
this.orderBy.toDialect(writer);
};
FetchManyExpression.prototype.toMDialect = function(writer) {
writer.append("fetch ");
if(this.first!=null) {
writer.append("rows ");
this.first.toDialect(writer);
writer.append(" to ");
this.last.toDialect(writer);
writer.append(" ");
} else
writer.append("all ");
writer.append("( ");
if(this.typ!=null) {
writer.append(this.typ.name);
writer.append(" ");
}
writer.append(") ");
if(this.predicate!=null) {
writer.append(" where ");
this.predicate.toDialect(writer);
writer.append(" ");
}
if(this.orderBy!=null)
this.orderBy.toDialect(writer);
};
FetchManyExpression.prototype.check = function(context) {
var typ = this.typ
if (typ==null)
typ = AnyType.instance;
else {
var decl = context.getRegisteredDeclaration(this.typ.name);
if (decl == null)
throw new SyntaxError("Unknown category: " + this.typ.name);
}
this.checkFilter(context);
this.checkOrderBy(context);
this.checkSlice(context);
return new CursorType(typ);
};
FetchManyExpression.prototype.checkFilter = function(context) {
if(!this.predicate)
return;
var filterType = this.predicate.check(context);
if (filterType != BooleanType.instance)
throw new SyntaxError("Filtering expression must return a boolean !");
};
FetchManyExpression.prototype.checkOrderBy = function(context) {
}
FetchManyExpression.prototype.checkSlice = function(context) {
}
FetchManyExpression.prototype.interpret = function(context) {
var store = DataStore.instance;
var query = this.buildFetchManyQuery(context, store);
var results = store.fetchMany(query);
typ = this.typ==null ? AnyType.instance : this.typ;
return new Cursor(context, typ, results);
};
FetchManyExpression.prototype.buildFetchManyQuery = function(context, store) {
var builder = store.newQueryBuilder();
builder.setFirst(this.interpretLimit(context, this.first));
builder.setLast(this.interpretLimit(context, this.last));
if (this.typ != null) {
var info = new AttributeInfo("category", TypeFamily.TEXT, true, null);
builder.verify(info, MatchOp.CONTAINS, this.typ.name);
}
if (this.predicate != null)
this.predicate.interpretQuery(context, builder);
if (this.typ != null && this.predicate != null)
builder.and();
if (this.orderBy != null)
this.orderBy.interpretQuery(context, builder);
return builder.build();
};
FetchManyExpression.prototype.interpretLimit = function(context, exp) {
if (exp == null)
return null;
var value = exp.interpret(context);
if(value.type!=IntegerType.instance)
throw new InvalidValueError("Expecting an Integer, got:" + value.type.name);
return value.getStorableData();
};
function DocumentIterator(docs) {
return this;
if (doc == null)
return NullValue.instance;
else
return this.typ.newInstanceFromDocument(context, doc);
}
exports.FetchManyExpression = FetchManyExpression;
/***/ },
/* 210 */
/***/ function(module, exports, __webpack_require__) {
var IterableType = __webpack_require__(63).IterableType;
var IntegerType = __webpack_require__(81).IntegerType;
var Identifier = __webpack_require__(70).Identifier;
function CursorType(itemType) {
IterableType.call(this, new Identifier("Cursor<" + itemType.name + ">"), itemType);
return this;
}
CursorType.prototype = Object.create(IterableType.prototype);
CursorType.prototype.constructor = CursorType;
CursorType.prototype.isAssignableFrom = function(context, other) {
return IterableType.prototype.isAssignableFrom.call(this, context, other)
|| ((other instanceof CursorType) && this.itemType.isAssignableFrom(context, other.itemType));
};
CursorType.prototype.equals = function(obj) {
if(obj==this)
return true;
if(!(obj instanceof CursorType))
return false;
return this.itemType.equals(other.itemType);
};
CursorType.prototype.checkIterator = function(context) {
return this.itemType;
};
CursorType.prototype.checkMember = function(context, name) {
if ("count"===name)
return IntegerType.instance;
else if ("totalCount"===name)
return IntegerType.instance;
else
return IterableType.prototype.checkMember.call(this, context, name);
};
exports.CursorType = CursorType;
/***/ },
/* 211 */
/***/ function(module, exports, __webpack_require__) {
var CategoryType = __webpack_require__(90).CategoryType;
var CursorType = __webpack_require__(210).CursorType;
var Identifier = __webpack_require__(70).Identifier;
var Integer = __webpack_require__(78).Integer;
var Value = __webpack_require__(73).Value;
function Cursor(context, itemType, iterDocs) {
Value.call(this, new CursorType(itemType));
this.context = context;
this.iterDocuments = iterDocs;
this.mutable = itemType.mutable || false;
return this;
};
Cursor.prototype = Object.create(Value.prototype);
Cursor.prototype.constructor = Cursor;
Cursor.prototype.isEmpty = function() {
return this.length()==0;
};
Cursor.prototype.count = function() {
return this.iterDocuments.count();
};
Cursor.prototype.totalCount = function() {
return this.iterDocuments.totalCount();
};
Cursor.prototype.getIterator = function() {
return this;
};
Cursor.prototype.hasNext = function() {
return this.iterDocuments.hasNext();
};
Cursor.prototype.next = function() {
var stored = this.iterDocuments.next();
var itemType = this.readItemType(stored);
return itemType.newInstanceFromStored(this.context, stored);
};
Cursor.prototype.readItemType = function(stored) {
var categories = stored["category"] || null;
var category = categories[categories.length-1];
var typ = new CategoryType(new Identifier(category));
typ.mutable = this.mutable;
return typ;
};
Cursor.prototype.getMemberValue = function(context, name) {
if ("count" == name)
return new Integer(this.count());
else if ("totalCount" == name)
return new Integer(this.totalCount());
else
throw new InvalidDataError("No such member:" + name);
};
exports.Cursor = Cursor;
/***/ },
/* 212 */
/***/ function(module, exports, __webpack_require__) {
var UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
var InstanceExpression = __webpack_require__(184).InstanceExpression;
var MemberSelector = __webpack_require__(137).MemberSelector;
var CharacterType = __webpack_require__(126).CharacterType;
var ContainerType = __webpack_require__(62).ContainerType;
var TextType = __webpack_require__(125).TextType;
var NullValue = __webpack_require__(74).NullValue;
var CodeWriter = __webpack_require__(51).CodeWriter;
var MatchOp = __webpack_require__(197).MatchOp;
var ContOp = __webpack_require__(213).ContOp;
var Instance = __webpack_require__(73).Instance;
var Value = __webpack_require__(73).Value;
var Bool = __webpack_require__(72).Bool;
function ContainsExpression(left, operator, right) {
this.left = left;
this.operator = operator;
this.right = right;
return this;
}
ContainsExpression.prototype.toString = function() {
return this.left.toString() + " " + this.operator.toString() + " " + this.right.toString();
};
ContainsExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" ");
this.operator.toDialect(writer);
writer.append(" ");
this.right.toDialect(writer);
};
ContainsExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
switch(this.operator) {
case ContOp.IN:
case ContOp.NOT_IN:
return rt.checkContains(context,lt);
case ContOp.CONTAINS:
case ContOp.NOT_CONTAINS:
return lt.checkContains(context, rt);
default:
return lt.checkContainsAllOrAny(context, rt);
}
};
ContainsExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return this.interpretValues(context, lval, rval);
};
ContainsExpression.prototype.interpretValues = function(context, lval, rval) {
var result = null;
switch (this.operator) {
case ContOp.IN:
case ContOp.NOT_IN:
if(rval==NullValue.instance)
result = false;
else if(rval.hasItem)
result = rval.hasItem(context, lval);
break;
case ContOp.CONTAINS:
case ContOp.NOT_CONTAINS:
if(lval==NullValue.instance)
result = false;
else if(lval.hasItem)
result = lval.hasItem(context, rval);
break;
case ContOp.CONTAINS_ALL:
case ContOp.NOT_CONTAINS_ALL:
if(lval==NullValue.instance || rval==NullValue.instance)
result = false;
else if (lval.hasItem && rval.hasItem)
result = this.containsAll(context, lval, rval);
break;
case ContOp.CONTAINS_ANY:
case ContOp.NOT_CONTAINS_ANY:
if(lval==NullValue.instance || rval==NullValue.instance)
result = false;
else if (lval.hasItem && rval.hasItem)
result = this.containsAny(context, lval, rval);
break;
}
if (result != null)
{
if (this.operator.name.indexOf("NOT_")==0) {
result = !result;
}
return Bool.ValueOf(result);
}
// error management
if (this.operator.name.lastIndexOf("IN")==this.operator.name.length-"IN".length) {
var tmp = lval;
lval = rval;
rval = tmp;
}
var lowerName = this.operator.name.toLowerCase().replace('_', ' ');
throw new SyntaxError("Illegal comparison: " + lval.type.toString() + " " + lowerName + " " + rval.type.toString());
};
ContainsExpression.prototype.containsAll = function(context, container, items) {
var iterItems = items.getIterator(context);
while(iterItems.hasNext()) {
var item = iterItems.next();
if (item instanceof Value) {
if (!container.hasItem(context, item)) {
return false;
}
} else
context.problemListener.reportIllegalContains();
// throw new SyntaxError("Illegal contains: " + typeof(container) + " + " + typeof(item));
}
return true;
};
ContainsExpression.prototype.containsAny = function(context, container, items) {
var iterItems = items.getIterator(context);
while(iterItems.hasNext()) {
var item = iterItems.next();
if (item instanceof Value)
{
if (container.hasItem(context, item)) {
return true;
}
} else
context.problemListener.reportIllegalContains();
// throw new SyntaxError("Illegal contains: " + typeof(container) + " + " + typeof(item));
}
return false;
};
ContainsExpression.prototype.interpretAssert = function(context, test) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
var result = this.interpretValues(context, lval, rval);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = lval.toString() + " " + this.operator.toString() + " " + rval.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
ContainsExpression.prototype.interpretQuery = function(context, query) {
var value = null;
var name = this.readFieldName(this.left);
var reverse = name == null;
if ( name != null )
value = this.right.interpret(context);
else {
name = this.readFieldName(this.right);
if (name != null)
value = this.left.interpret(context);
else
throw new SyntaxError("Unable to interpret predicate");
}
var matchOp = this.getMatchOp(context, this.getAttributeType(context, name), value.type, this.operator, reverse);
if (value instanceof Instance)
value = value.getMemberValue(context, "dbId", false);
var info = context.findAttribute(name).getAttributeInfo();
var data = value == null ? null : value.getStorableData();
query.verify(info, matchOp, data);
if (this.operator.name.indexOf("NOT_")==0)
query.not();
};
ContainsExpression.prototype.getAttributeType = function(context, name) {
return context.getRegisteredDeclaration(name).getType();
};
ContainsExpression.prototype.getMatchOp = function(context, fieldType, valueType, operator, reverse) {
if (reverse) {
var reversed = operator.reverse();
if (reversed == null)
throw new SyntaxError("Cannot reverse " + this.operator.toString());
else
return this.getMatchOp(context, valueType, fieldType, reversed, false);
}
if ((fieldType == TextType.instance || valueType == CharacterType.instance) &&
(valueType == TextType.instance || valueType == CharacterType.instance)) {
if (operator == ContOp.CONTAINS || operator == ContOp.NOT_CONTAINS)
return MatchOp.CONTAINS;
}
if (valueType instanceof ContainerType) {
if (operator == ContOp.IN || operator == ContOp.NOT_IN)
return MatchOp.CONTAINED;
}
if (fieldType instanceof ContainerType) {
if (operator == ContOp.CONTAINS || operator == ContOp.NOT_CONTAINS)
return MatchOp.CONTAINS;
}
throw new SyntaxError("Unsupported operator: " + operator.toString());
};
ContainsExpression.prototype.readFieldName = function(exp) {
if (exp instanceof UnresolvedIdentifier || exp instanceof InstanceExpression || exp instanceof MemberSelector)
return exp.toString();
else
return null;
};
exports.ContainsExpression = ContainsExpression;
/***/ },
/* 213 */
/***/ function(module, exports) {
function ContOp(name) {
this.name = name;
return this;
}
ContOp.prototype.toString = function() {
return this.name.toLowerCase().replace('_', ' ');
};
ContOp.prototype.toDialect = function(writer) {
writer.append(this.toString());
};
ContOp.IN = new ContOp("IN");
ContOp.CONTAINS = new ContOp("CONTAINS");
ContOp.CONTAINS_ALL = new ContOp("CONTAINS_ALL");
ContOp.CONTAINS_ANY = new ContOp("CONTAINS_ANY");
ContOp.NOT_IN = new ContOp("NOT_IN");
ContOp.NOT_CONTAINS = new ContOp("NOT_CONTAINS");
ContOp.NOT_CONTAINS_ALL = new ContOp("NOT_CONTAINS_ALL");
ContOp.NOT_CONTAINS_ANY = new ContOp("NOT_CONTAINS_ANY");
exports.ContOp = ContOp;
/***/ },
/* 214 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function DivideExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
DivideExpression.prototype.toString = function() {
return this.left.toString() + " / " + this.right.toString();
};
DivideExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" / ");
this.right.toDialect(writer);
};
DivideExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkDivide(context,rt);
};
DivideExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.Divide(context, rval);
};
exports.DivideExpression = DivideExpression;
/***/ },
/* 215 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function IntDivideExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
IntDivideExpression.prototype.toString = function() {
return this.left.toString() + " \\ " + this.right.toString();
};
IntDivideExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" \\ ");
this.right.toDialect(writer);
};
IntDivideExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkIntDivide(context,rt);
};
IntDivideExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.IntDivide(context, rval);
};
exports.IntDivideExpression = IntDivideExpression;
/***/ },
/* 216 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function ModuloExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
ModuloExpression.prototype.toString = function() {
return this.left.toString() + " % " + this.right.toString();
};
ModuloExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" % ");
this.right.toDialect(writer);
};
ModuloExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkModulo(context, rt);
};
ModuloExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.Modulo(context, rval);
};
exports.ModuloExpression = ModuloExpression;
/***/ },
/* 217 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function MinusExpression(expression) {
this.expression = expression;
return this;
}
MinusExpression.prototype.toString = function() {
return "-" + this.expression.toString();
};
MinusExpression.prototype.toDialect = function(writer) {
writer.append("-");
this.expression.toDialect(writer);
};
MinusExpression.prototype.check = function(context) {
var type = this.expression.check(context);
return type.checkMinus(context);
};
MinusExpression.prototype.interpret = function(context){
var val = this.expression.interpret(context);
return val.Minus(context);
};
exports.MinusExpression = MinusExpression;
/***/ },
/* 218 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function MultiplyExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
MultiplyExpression.prototype.toString = function() {
return this.left.toString() + " * " + this.right.toString();
};
MultiplyExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" * ");
this.right.toDialect(writer);
};
MultiplyExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkMultiply(context,rt, true);
};
MultiplyExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.Multiply(context, rval);
};
exports.MultiplyExpression = MultiplyExpression;
/***/ },
/* 219 */
/***/ function(module, exports, __webpack_require__) {
var CodeWriter = __webpack_require__(51).CodeWriter;
var Dialect = __webpack_require__(98).Dialect;
var Value = __webpack_require__(73).Value;
var Bool = __webpack_require__(72).Bool;
function AndExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
AndExpression.prototype.toString = function() {
return this.left.toString() + " and " + this.right.toString();
};
AndExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
AndExpression.prototype.operatorToDialect = function(dialect) {
switch(dialect) {
case Dialect.E:
case Dialect.M:
return " and ";
case Dialect.O:
return " && ";
default:
throw new Exception("Unsupported: " + dialect.name);
}
};
AndExpression.prototype.toEDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" and ");
this.right.toDialect(writer);
};
AndExpression.prototype.toODialect = function(writer) {
this.left.toDialect(writer);
writer.append(" && ");
this.right.toDialect(writer);
};
AndExpression.prototype.toMDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" and ");
this.right.toDialect(writer);
};
AndExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkAnd(context, rt);
};
AndExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.And(rval);
};
AndExpression.prototype.interpretAssert = function(context, test) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
var result = lval.And(rval);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = lval.toString() + this.operatorToDialect(test.dialect) + rval.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
exports.AndExpression = AndExpression;
/***/ },
/* 220 */
/***/ function(module, exports, __webpack_require__) {
var CodeWriter = __webpack_require__(51).CodeWriter;
var Dialect = __webpack_require__(98).Dialect;
var Value = __webpack_require__(73).Value;
var Bool = __webpack_require__(72).Bool;
function OrExpression(left, right) {
this.left = left;
this.right = right;
return this;
}
OrExpression.prototype.toString = function() {
return this.left.toString() + " or " + this.right.toString();
};
OrExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
OrExpression.prototype.operatorToDialect = function(dialect) {
switch(dialect) {
case Dialect.E:
case Dialect.M:
return " or ";
case Dialect.O:
return " || ";
default:
throw new Exception("Unsupported: " + dialect.name);
}
};
OrExpression.prototype.toEDialect = function(writer) {
this.left.toDialect(writer);
writer.append(this.operatorToDialect(writer.dialect));
this.right.toDialect(writer);
};
OrExpression.prototype.toODialect = function(writer) {
this.left.toDialect(writer);
writer.append(this.operatorToDialect(writer.dialect));
this.right.toDialect(writer);
};
OrExpression.prototype.toMDialect = function(writer) {
this.left.toDialect(writer);
writer.append(this.operatorToDialect(writer.dialect));
this.right.toDialect(writer);
};
OrExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkOr(context, rt);
};
OrExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return lval.Or(rval);
};
OrExpression.prototype.interpretAssert = function(context, test) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
var result = lval.Or(rval);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = lval.toString() + this.operatorToDialect(test.dialect) + rval.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
OrExpression.prototype.interpretQuery = function(context, query) {
if (!this.left["interpretQuery"])
throw new SyntaxError("Not a predicate: " + this.left.toString());
this.left.interpretQuery(context, query);
if (!this.right["interpretQuery"])
throw new SyntaxError("Not a predicate: " + this.right.toString());
this.right.interpretQuery(context, query);
query.or();
};
exports.OrExpression = OrExpression;
/***/ },
/* 221 */
/***/ function(module, exports, __webpack_require__) {
var CodeWriter = __webpack_require__(51).CodeWriter;
var Dialect = __webpack_require__(98).Dialect;
var Value = __webpack_require__(73).Value;
var Bool = __webpack_require__(72).Bool;
function NotExpression(expression) {
this.expression = expression;
return this;
}
NotExpression.prototype.toString = function() {
return "not " + this.expression.toString();
};
NotExpression.prototype.operatorToDialect = function(dialect) {
switch(dialect) {
case Dialect.E:
case Dialect.M:
return "not ";
case Dialect.O:
return "! ";
default:
throw new Exception("Unsupported: " + dialect.name);
}
};
NotExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
this.expression.toDialect(writer);
};
NotExpression.prototype.toEDialect = function(writer) {
writer.append("not ");
};
NotExpression.prototype.toMDialect = function(writer) {
writer.append("not ");
};
NotExpression.prototype.toODialect = function(writer) {
writer.append("!");
};
NotExpression.prototype.check = function(context) {
var type = this.expression.check(context);
return type.checkNot(context);
};
NotExpression.prototype.interpret = function(context) {
var val = this.expression.interpret(context);
return val.Not();
};
NotExpression.prototype.interpretAssert = function(context, test) {
var result = this.interpret(context);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = this.operatorToDialect(test.dialect) + val.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
exports.NotExpression = NotExpression;
/***/ },
/* 222 */
/***/ function(module, exports, __webpack_require__) {
var UnresolvedIdentifier = __webpack_require__(91).UnresolvedIdentifier;
var InstanceExpression = __webpack_require__(184).InstanceExpression;
var MemberSelector = __webpack_require__(137).MemberSelector;
var Instance = __webpack_require__(73).Instance;
var Value = __webpack_require__(73).Value;
var Bool = __webpack_require__(72).Bool;
var MatchOp = __webpack_require__(197).MatchOp;
var CmpOp = __webpack_require__(223).CmpOp;
function CompareExpression(left, operator, right) {
this.left = left;
this.operator = operator;
this.right = right;
return this;
}
CompareExpression.prototype.toString = function() {
return this.left.toString() + " " + this.operator.toString() + " " + this.right.toString();
};
CompareExpression.prototype.toDialect = function(writer) {
this.left.toDialect(writer);
writer.append(" ");
this.operator.toDialect(writer);
writer.append(" ");
this.right.toDialect(writer);
};
CompareExpression.prototype.check = function(context) {
var lt = this.left.check(context);
var rt = this.right.check(context);
return lt.checkCompare(context,rt);
};
CompareExpression.prototype.interpret = function(context) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
return this.compare(context, lval, rval);
};
CompareExpression.prototype.compare = function(context, lval, rval) {
var cmp = lval.CompareTo(context, rval);
switch (this.operator) {
case CmpOp.GT:
return Bool.ValueOf(cmp > 0);
case CmpOp.LT:
return Bool.ValueOf(cmp < 0);
case CmpOp.GTE:
return Bool.ValueOf(cmp >= 0);
case CmpOp.LTE:
return Bool.ValueOf(cmp <= 0);
default:
context.problemListener.reportIllegalOperand();
// throw new SyntaxError("Illegal operand: " + this.operator.toString());
}
};
CompareExpression.prototype.interpretAssert = function(context, test) {
var lval = this.left.interpret(context);
var rval = this.right.interpret(context);
var result = this.compare(context, lval, rval);
if(result==Bool.TRUE)
return true;
var writer = new CodeWriter(test.dialect, context);
this.toDialect(writer);
var expected = writer.toString();
var actual = lval.toString() + this.operator.toString() + rval.toString();
test.printFailedAssertion(context, expected, actual);
return false;
};
CompareExpression.prototype.interpretQuery = function(context, query) {
var name = null;
var value = null;
if (this.left instanceof UnresolvedIdentifier || this.left instanceof InstanceExpression || this.left instanceof MemberSelector) {
name = this.left.name;
value = this.right.interpret(context);
} else if (this.right instanceof UnresolvedIdentifier || this.right instanceof InstanceExpression || this.right instanceof MemberSelector) {
name = this.right.name;
value = this.left.interpret(context);
}
if (name == null)
throw new SyntaxError("Unable to interpret predicate");
else {
var decl = context.findAttribute(name);
var info = decl == null ? null : decl.getAttributeInfo();
if (value instanceof Instance)
value = value.getMemberValue(context, "dbId", False)
var matchOp = this.getMatchOp();
query.verify(info, matchOp, value == null ? null : value.getStorableData());
if (this.operator == CmpOp.GTE || this.operator==CmpOp.LTE)
query.not();
}
};
CompareExpression.prototype.getMatchOp = function() {
if (this.operator == CmpOp.GT || this.operator == CmpOp.LTE)
return MatchOp.GREATER;
else if (this.operator == CmpOp.GTE || this.operator == CmpOp.LT)
return MatchOp.LESSER;
else
throw new InvalidValueError(this.operator.toString());
};
exports.CompareExpression = CompareExpression;
/***/ },
/* 223 */
/***/ function(module, exports) {
function CmpOp() {
return this;
}
CmpOp.prototype.toDialect = function(writer) {
writer.append(this.toString());
};
CmpOp.GT = new CmpOp();
CmpOp.GT.toString = function() {
return ">";
}
CmpOp.GTE = new CmpOp();
CmpOp.GTE.toString = function() {
return ">=";
}
CmpOp.LT = new CmpOp();
CmpOp.LT.toString = function() {
return "<";
}
CmpOp.LTE = new CmpOp();
CmpOp.LTE.toString = function() {
return "<=";
}
exports.CmpOp = CmpOp;
/***/ },
/* 224 */
/***/ function(module, exports, __webpack_require__) {
var MethodType = __webpack_require__(119).MethodType;
var MethodDeclarationMap = null; // circular dependency
var Dialect = __webpack_require__(98).Dialect;
var ClosureValue = __webpack_require__(186).ClosureValue;
exports.resolve = function() {
MethodDeclarationMap = __webpack_require__(52).MethodDeclarationMap;
};
function MethodExpression(id) {
this.id = id;
return this;
}
Object.defineProperty(MethodExpression.prototype, "name", {
get : function() {
return this.id.name;
}
});
MethodExpression.prototype.toString = function() {
return "Method: " + this.name;
};
MethodExpression.prototype.toDialect = function(writer) {
if(writer.dialect==Dialect.E)
writer.append("Method: ");
writer.append(this.name);
};
MethodExpression.prototype.check = function(context) {
var named = context.getRegistered(this.name);
if(named instanceof MethodDeclarationMap) { // global method or closure
var decl = named.getFirst();
return new MethodType(decl);
} else {
throw new SyntaxError("No method with name:" + this.name);
}
};
MethodExpression.prototype.interpret = function(context, asMethod) {
if(context.hasValue(this.id)) {
return context.getValue(this.id);
} else {
var named = context.getRegistered(this.id);
if (named instanceof MethodDeclarationMap) {
var decl = named.getFirst();
return new ClosureValue(context, new MethodType(decl))
} else {
throw new SyntaxError("No method with name:" + this.name);
}
}
};
exports.MethodExpression = MethodExpression;
/***/ },
/* 225 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
var BooleanType = __webpack_require__(69).BooleanType;
var ListType = __webpack_require__(68).ListType;
var TupleType = __webpack_require__(226).TupleType;
var SetType = __webpack_require__(131).SetType;
var Variable = __webpack_require__(88).Variable;
var NullReferenceError = __webpack_require__(142).NullReferenceError;
var ListValue = __webpack_require__(128).ListValue;
var TupleValue = __webpack_require__(227).TupleValue;
var SetValue = __webpack_require__(130).SetValue;
var Bool = __webpack_require__(72).Bool;
function FilteredExpression(itemId, source, predicate) {
Section.call(this);
this.itemId = itemId;
this.source = source;
this.predicate = predicate;
return this;
}
FilteredExpression.prototype = Object.create(Section.prototype);
FilteredExpression.prototype.constructor = FilteredExpression;
FilteredExpression.prototype.toDialect = function(dialect) {
return this.source.toString() + " filtered with " + this.itemId + " where " + this.predicate.toString();
};
FilteredExpression.prototype.check = function(context) {
var listType = this.source.check(context);
if(!(listType instanceof ListType || listType instanceof TupleType || listType instanceof SetType)) {
throw new SyntaxError("Expecting a list type as data source !");
}
var local = context.newLocalContext();
local.registerValue(new Variable(this.itemId,listType.itemType));
var filterType = this.predicate.check(local);
if(filterType!=BooleanType.instance) {
throw new SyntaxError("Filtering expresion must return a boolean !");
}
return listType;
};
FilteredExpression.prototype.interpret = function(context) {
var listType = this.source.check(context);
if(!(listType instanceof ListType || listType instanceof TupleType || listType instanceof SetType)) {
throw new InternalError("Illegal source type: " + listType.getName());
}
var list = this.source.interpret(context);
if(list==null) {
throw new NullReferenceError();
}
if(!(list instanceof ListValue || list instanceof TupleValue || list instanceof SetValue)) {
throw new InternalError("Illegal fetch source: " + this.source);
}
var itemType = listType.itemType;
var local = context.newLocalContext();
var item = new Variable(this.itemId, itemType);
local.registerValue(item);
return list.filter(local, this.itemId, this.predicate)
};
FilteredExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
FilteredExpression.prototype.toEDialect = function(writer) {
this.source.toDialect(writer);
writer.append(" filtered with ");
writer.append(this.itemId.name);
writer.append(" where ");
this.predicate.toDialect(writer);
};
FilteredExpression.prototype.toODialect = function(writer) {
writer.append("filtered (");
this.source.toDialect(writer);
writer.append(") with (");
writer.append(this.itemId.name);
writer.append(") where (");
this.predicate.toDialect(writer);
writer.append(")");
};
FilteredExpression.prototype.toMDialect = function(writer) {
this.toEDialect(writer);
};
exports.FilteredExpression = FilteredExpression;
/***/ },
/* 226 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
var BooleanType = __webpack_require__(69).BooleanType;
var SetType = __webpack_require__(131).SetType;
var ListType = __webpack_require__(68).ListType;
var IntegerType = __webpack_require__(81).IntegerType;
var AnyType = __webpack_require__(71).AnyType;
var Identifier = __webpack_require__(70).Identifier;
function TupleType() {
NativeType.call(this, new Identifier("Tuple"));
return this;
}
TupleType.prototype = Object.create(NativeType.prototype);
TupleType.prototype.constructor = TupleType;
TupleType.instance = new TupleType();
TupleType.prototype.isAssignableFrom = function(context, other) {
return ContainerType.prototype.isAssignableFrom.call(this, context, other)
|| (other instanceof ListType) || (other instanceof SetType);
};
TupleType.prototype.checkItem = function(context, other) {
if(other==IntegerType.instance) {
return AnyType.instance;
} else {
return NativeType.prototype.checkItem.call(this, context, other);
}
};
TupleType.prototype.checkMember = function(context, name) {
if ("count"==name) {
return IntegerType.instance;
} else {
return NativeType.prototype.checkMember.call(this, context, name);
}
};
TupleType.prototype.checkAdd = function(context, other, tryReverse) {
if(other instanceof TupleType || other instanceof ListType || other instanceof SetType) {
return this;
} else {
return NativeType.prototype.checkAdd.call(this, context, other, tryReverse);
}
};
TupleType.prototype.checkContains = function(context, other) {
return BooleanType.instance;
};
TupleType.prototype.checkContainsAllOrAny = function(context, other) {
return BooleanType.instance;
};
exports.TupleType = TupleType;
/***/ },
/* 227 */
/***/ function(module, exports, __webpack_require__) {
var BaseValueList = __webpack_require__(129).BaseValueList;
var TupleType = null;
var SetValue = null;
exports.resolve = function() {
TupleType = __webpack_require__(226).TupleType;
SetValue = __webpack_require__(130).SetValue;
};
function TupleValue(items, item, mutable) {
BaseValueList.call(this, TupleType.instance, items, item, mutable);
return this;
}
TupleValue.prototype = Object.create(BaseValueList.prototype);
TupleValue.prototype.constructor = TupleValue;
TupleValue.prototype.toString = function() {
return "(" + this.items.join(", ") + ")";
};
TupleValue.prototype.toDialect = function(writer) {
writer.append('(');
BaseValueList.prototype.toDialect.call(this, writer);
writer.append(')');
};
/*
@Override
protected TupleValue newInstance(List items) {
return new TupleValue(items);
}
*/
TupleValue.prototype.Add = function(context, value) {
if (value instanceof BaseValueList) {
var items = this.items.concat(value.items);
return new TupleValue(items);
} else if(value instanceof SetValue) {
var items = this.items.concat([]);
for(var name in value.items) {
items.push(value.items[name]);
}
return new TupleValue(items);
} else {
throw new SyntaxError("Illegal: Tuple + " + typeof(value));
}
};
TupleValue.prototype.filter = function(context, itemId, filter) {
var result = new TupleValue();
var iter = this.getIterator(context);
while(iter.hasNext()) {
var o = iter.next();
context.setValue(itemId, o);
var test = filter.interpret(context);
if(!(test instanceof Bool)) {
throw new InternalError("Illegal test result: " + test);
}
if(test.value) {
result.add(o);
}
}
return result;
}
exports.TupleValue = TupleValue;
/***/ },
/* 228 */
/***/ function(module, exports, __webpack_require__) {
var CodeValue = __webpack_require__(229).CodeValue;
var CodeType = __webpack_require__(114).CodeType;
function CodeExpression(expression) {
this.expression = expression;
return this;
}
CodeExpression.prototype.toString = function() {
return "Code: " + this.expression.toString();
};
CodeExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
CodeExpression.prototype.toEDialect = function(writer) {
writer.append("Code: ");
this.expression.toDialect(writer);
};
CodeExpression.prototype.toODialect = function(writer) {
writer.append("Code(");
this.expression.toDialect(writer);
writer.append(")");
};
CodeExpression.prototype.toMDialect = function(writer) {
this.toODialect(writer);
};
CodeExpression.prototype.check = function(context) {
return CodeType.instance;
};
CodeExpression.prototype.interpret = function(context) {
return new CodeValue(this);
};
// expression can only be checked and evaluated in the context of an execute:
CodeExpression.prototype.checkCode = function(context) {
return this.expression.check(context);
};
CodeExpression.prototype.interpretCode = function(context) {
return this.expression.interpret(context);
};
exports.CodeExpression = CodeExpression;
/***/ },
/* 229 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
var CodeType = __webpack_require__(114).CodeType;
function CodeValue(expression) {
Value.call(this, CodeType.instance);
this.expression = expression;
return this;
}
CodeValue.prototype = Object.create(Value.prototype);
CodeValue.prototype.constructor = CodeValue;
CodeValue.prototype.check = function(context) {
return this.expression.checkCode (context);
};
CodeValue.prototype.interpret = function(context) {
return this.expression.interpretCode (context);
};
exports.CodeValue = CodeValue;
/***/ },
/* 230 */
/***/ function(module, exports, __webpack_require__) {
var Section = __webpack_require__(58).Section;
var CodeValue = __webpack_require__(229).CodeValue;
var PromptoError = __webpack_require__(61).PromptoError;
function ExecuteExpression(id) {
Section.call(this);
this.id = id;
return this;
}
ExecuteExpression.prototype = Object.create(Section.prototype);
ExecuteExpression.prototype.constructor = ExecuteExpression;
Object.defineProperty(ExecuteExpression.prototype, "name", {
get : function() {
return this.id.name;
}
});
ExecuteExpression.prototype.toString = function() {
return "execute: " + this.name;
};
ExecuteExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
ExecuteExpression.prototype.toEDialect = function(writer) {
writer.append("execute: ");
writer.append(this.name);
};
ExecuteExpression.prototype.toODialect = function(writer) {
writer.append("execute(");
writer.append(this.name);
writer.append(")");
};
ExecuteExpression.prototype.toMDialect = function(writer) {
this.toODialect(writer);
};
ExecuteExpression.prototype.check = function(context) {
try {
var value = context.getValue(this.id);
if(value instanceof CodeValue) {
return value.checkCode(context);
} else {
throw new SyntaxError("Expected code, got:" + value.toString());
}
} catch(e) {
if(e instanceof PromptoError) {
throw new SyntaxError(e.message);
}
}
};
ExecuteExpression.prototype.interpret = function(context) {
var value = context.getValue(this.id);
if(value instanceof CodeValue) {
return value.interpret(context);
} else {
throw new SyntaxError("Expected code, got:" + value.toString());
}
};
exports.ExecuteExpression = ExecuteExpression;
/***/ },
/* 231 */
/***/ function(module, exports, __webpack_require__) {
var BlobType = __webpack_require__(232).BlobType;
var Document = __webpack_require__(151).Document;
var Blob = __webpack_require__(234).Blob;
var Dialect = __webpack_require__(98).Dialect;
var ReadWriteError = __webpack_require__(236).ReadWriteError;
var stringToUtf8Buffer = __webpack_require__(48).stringToUtf8Buffer;
function BlobExpression(source) {
this.source = source;
return this;
}
BlobExpression.prototype.check = function(context) {
this.source.check(context);
return BlobType.instance;
};
BlobExpression.prototype.interpret = function(context) {
var value = this.source.interpret(context);
// try {
var datas = BlobExpression.collectDatas(context, value);
var zipped = BlobExpression.zipDatas(datas);
return new Blob("application/zip", zipped);
// } catch (e) {
// throw new ReadWriteError(e.message);
// }
};
BlobExpression.collectDatas = function(context, value) {
var binaries = {};
// create json type-aware object graph and collect binaries
var values = {}; // need a temporary parent
value.toJson(context, values, null, "value", true, binaries);
var json = JSON.stringify(values["value"]);
// add it
binaries["value.json"] = stringToUtf8Buffer(json);
return binaries;
};
BlobExpression.zipDatas = function(datas) {
var JSZip = __webpack_require__(237);
var zip = new JSZip();
return zip.sync(function() {
for (var key in datas)
zip.file(key, datas[key]);
var result = null;
zip.generateAsync({type: "arraybuffer", compression: "DEFLATE"}).
then(function(value) {
result = value;
});
return result;
});
};
BlobExpression.prototype.toDialect = function(writer) {
writer.toDialect(this);
};
BlobExpression.prototype.toEDialect = function(writer) {
writer.append("Blob from ");
this.source.toDialect(writer);
};
BlobExpression.prototype.toODialect = function(writer) {
writer.append("Blob(");
this.source.toDialect(writer);
writer.append(')');
};
BlobExpression.prototype.toMDialect = function(writer) {
writer.append("Blob(");
this.source.toDialect(writer);
writer.append(')');
};
exports.BlobExpression = BlobExpression;
/***/ },
/* 232 */
/***/ function(module, exports, __webpack_require__) {
var BinaryType = __webpack_require__(233).BinaryType;
var Identifier = __webpack_require__(70).Identifier;
function BlobType() {
BinaryType.call(this, new Identifier("Blob"));
return this;
}
BlobType.prototype = Object.create(BinaryType.prototype);
BlobType.prototype.constructor = BlobType;
BlobType.instance = new BlobType();
exports.BlobType = BlobType;
/***/ },
/* 233 */
/***/ function(module, exports, __webpack_require__) {
var NativeType = __webpack_require__(64).NativeType;
function BinaryType(name) {
NativeType.call(this, name);
return this;
}
BinaryType.prototype = Object.create(NativeType.prototype);
BinaryType.prototype.constructor = BinaryType;
BinaryType.prototype.checkMember = function(context, id) {
var name = id.name;
if ("name" === name) {
return TextType.instance;
} else if ("format" === name ) {
return TextType.instance;
} else
return BinaryType.prototype.checkMember.call(context, id);
};
exports.BinaryType = BinaryType;
/***/ },
/* 234 */
/***/ function(module, exports, __webpack_require__) {
var BinaryValue = __webpack_require__(235).BinaryValue;
var BlobType = __webpack_require__(232).BlobType;
function Blob(mimeType, data) {
BinaryValue.call(this, BlobType.instance, mimeType, data);
return this;
}
Blob.prototype = Object.create(BinaryValue.prototype);
Blob.prototype.constructor = Blob;
exports.Blob = Blob;
/***/ },
/* 235 */
/***/ function(module, exports, __webpack_require__) {
var Value = __webpack_require__(73).Value;
function BinaryValue(itype, mimeType, data) {
Value.call(this, itype);
this.mimeType = mimeType;
this.data = data;
return this;
}
BinaryValue.prototype = Object.create(Value.prototype);
BinaryValue.prototype.constructor = BinaryValue;
exports.BinaryValue = BinaryValue;
/***/ },
/* 236 */
/***/ function(module, exports, __webpack_require__) {
var ExecutionError = __webpack_require__(86).ExecutionError;
function ReadWriteError(message) {
ExecutionError.call(this, message);
return this;
}
ReadWriteError.prototype = Object.create(ExecutionError.prototype);
ReadWriteError.prototype.constructor = ReadWriteError;
ReadWriteError.prototype.getExpression = function(context) {
return context.getRegisteredValue("READ_WRITE");
};
exports.ReadWriteError = ReadWriteError;
/***/ },
/* 237 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
/**
* Representation a of zip file in js
* @constructor
*/
function JSZip() {
// if this constructor is used without `new`, it adds `new` before itself:
if(!(this instanceof JSZip)) {
return new JSZip();
}
if(arguments.length) {
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
}
// object containing the files :
// {
// "folder/" : {...},
// "folder/data.txt" : {...}
// }
this.files = {};
this.comment = null;
// Where we are in the hierarchy
this.root = "";
this.clone = function() {
var newObj = new JSZip();
for (var i in this) {
if (typeof this[i] !== "function") {
newObj[i] = this[i];
}
}
return newObj;
};
}
JSZip.prototype = __webpack_require__(238);
JSZip.prototype.loadAsync = __webpack_require__(328);
JSZip.support = __webpack_require__(241);
JSZip.defaults = __webpack_require__(298);
// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.1.3";
JSZip.loadAsync = function (content, options) {
return new JSZip().loadAsync(content, options);
};
JSZip.external = __webpack_require__(288);
module.exports = JSZip;
/***/ },
/* 238 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var utf8 = __webpack_require__(239);
var utils = __webpack_require__(240);
var GenericWorker = __webpack_require__(291);
var StreamHelper = __webpack_require__(292);
var defaults = __webpack_require__(298);
var CompressedObject = __webpack_require__(299);
var ZipObject = __webpack_require__(304);
var generate = __webpack_require__(305);
var external = __webpack_require__(288);
var nodejsUtils = __webpack_require__(266);
var NodejsStreamInputAdapter = __webpack_require__(326);
var SyncPromise = __webpack_require__(327).SyncPromise;
/**
* Add a file in the current folder.
* @private
* @param {string} name the name of the file
* @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
* @param {Object} originalOptions the options of the file
* @return {Object} the new file.
*/
var fileAdd = function(name, data, originalOptions) {
// be sure sub folders exist
var dataType = utils.getTypeOf(data),
parent;
/*
* Correct options.
*/
var o = utils.extend(originalOptions || {}, defaults);
o.date = o.date || new Date();
if (o.compression !== null) {
o.compression = o.compression.toUpperCase();
}
if (typeof o.unixPermissions === "string") {
o.unixPermissions = parseInt(o.unixPermissions, 8);
}
// UNX_IFDIR 0040000 see zipinfo.c
if (o.unixPermissions && (o.unixPermissions & 0x4000)) {
o.dir = true;
}
// Bit 4 Directory
if (o.dosPermissions && (o.dosPermissions & 0x0010)) {
o.dir = true;
}
if (o.dir) {
name = forceTrailingSlash(name);
}
if (o.createFolders && (parent = parentFolder(name))) {
folderAdd.call(this, parent, true);
}
var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
if (!originalOptions || typeof originalOptions.binary === "undefined") {
o.binary = !isUnicodeString;
}
var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;
if (isCompressedEmpty || o.dir || !data || data.length === 0) {
o.base64 = false;
o.binary = true;
data = "";
o.compression = "STORE";
dataType = "string";
}
/*
* Convert content to fit.
*/
var zipObjectContent = null;
if (data instanceof CompressedObject || data instanceof GenericWorker) {
zipObjectContent = data;
} else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
zipObjectContent = new NodejsStreamInputAdapter(name, data);
} else {
zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
}
var object = new ZipObject(name, zipObjectContent, o);
this.files[name] = object;
/*
TODO: we can't throw an exception because we have async promises
(we can have a promise of a Date() for example) but returning a
promise is useless because file(name, data) returns the JSZip
object for chaining. Should we break that to allow the user
to catch the error ?
return external.Promise.resolve(zipObjectContent)
.then(function () {
return object;
});
*/
};
/**
* Find the parent folder of the path.
* @private
* @param {string} path the path to use
* @return {string} the parent folder, or ""
*/
var parentFolder = function (path) {
if (path.slice(-1) === '/') {
path = path.substring(0, path.length - 1);
}
var lastSlash = path.lastIndexOf('/');
return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
};
/**
* Returns the path with a slash at the end.
* @private
* @param {String} path the path to check.
* @return {String} the path with a trailing slash.
*/
var forceTrailingSlash = function(path) {
// Check the name ends with a /
if (path.slice(-1) !== "/") {
path += "/"; // IE doesn't like substr(-1)
}
return path;
};
/**
* Add a (sub) folder in the current folder.
* @private
* @param {string} name the folder's name
* @param {boolean=} [createFolders] If true, automatically create sub
* folders. Defaults to false.
* @return {Object} the new folder.
*/
var folderAdd = function(name, createFolders) {
createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;
name = forceTrailingSlash(name);
// Does this folder already exist?
if (!this.files[name]) {
fileAdd.call(this, name, null, {
dir: true,
createFolders: createFolders
});
}
return this.files[name];
};
/**
* Cross-window, cross-Node-context regular expression detection
* @param {Object} object Anything
* @return {Boolean} true if the object is a regular expression,
* false otherwise
*/
function isRegExp(object) {
return Object.prototype.toString.call(object) === "[object RegExp]";
}
// return the actual prototype of JSZip
var out = {
sync: function(cb) {
var saved_promise = external.Promise;
var saved_delay = external.delay;
try {
// convert async stuff to sync stuff
external.Promise = SyncPromise;
external.delay = function(callback, args, self) {
callback.apply(self || null, args || []);
};
// execute
return cb.call();
} finally {
external.delay = saved_delay;
external.Promise = saved_promise;
};
},
/**
* @see loadAsync
*/
load: function() {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
},
/**
* Call a callback function for each entry at this folder level.
* @param {Function} cb the callback function:
* function (relativePath, file) {...}
* It takes 2 arguments : the relative path and the file.
*/
forEach: function(cb) {
var filename, relativePath, file;
for (filename in this.files) {
if (!this.files.hasOwnProperty(filename)) {
continue;
}
file = this.files[filename];
relativePath = filename.slice(this.root.length, filename.length);
if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
}
}
},
/**
* Filter nested files/folders with the specified function.
* @param {Function} search the predicate to use :
* function (relativePath, file) {...}
* It takes 2 arguments : the relative path and the file.
* @return {Array} An array of matching elements.
*/
filter: function(search) {
var result = [];
this.forEach(function (relativePath, entry) {
if (search(relativePath, entry)) { // the file matches the function
result.push(entry);
}
});
return result;
},
/**
* Add a file to the zip file, or search a file.
* @param {string|RegExp} name The name of the file to add (if data is defined),
* the name of the file to find (if no data) or a regex to match files.
* @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded
* @param {Object} o File options
* @return {JSZip|Object|Array} this JSZip object (when adding a file),
* a file (when searching by string) or an array of files (when searching by regex).
*/
file: function(name, data, o) {
if (arguments.length === 1) {
if (isRegExp(name)) {
var regexp = name;
return this.filter(function(relativePath, file) {
return !file.dir && regexp.test(relativePath);
});
}
else { // text
var obj = this.files[this.root + name];
if (obj && !obj.dir) {
return obj;
} else {
return null;
}
}
}
else { // more than one argument : we have data !
name = this.root + name;
fileAdd.call(this, name, data, o);
}
return this;
},
/**
* Add a directory to the zip file, or search.
* @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.
* @return {JSZip} an object with the new directory as the root, or an array containing matching folders.
*/
folder: function(arg) {
if (!arg) {
return this;
}
if (isRegExp(arg)) {
return this.filter(function(relativePath, file) {
return file.dir && arg.test(relativePath);
});
}
// else, name is a new folder
var name = this.root + arg;
var newFolder = folderAdd.call(this, name);
// Allow chaining by returning a new object with this folder as the root
var ret = this.clone();
ret.root = newFolder.name;
return ret;
},
/**
* Delete a file, or a directory and all sub-files, from the zip
* @param {string} name the name of the file to delete
* @return {JSZip} this JSZip object
*/
remove: function(name) {
name = this.root + name;
var file = this.files[name];
if (!file) {
// Look for any folders
if (name.slice(-1) !== "/") {
name += "/";
}
file = this.files[name];
}
if (file && !file.dir) {
// file
delete this.files[name];
} else {
// maybe a folder, delete recursively
var kids = this.filter(function(relativePath, file) {
return file.name.slice(0, name.length) === name;
});
for (var i = 0; i < kids.length; i++) {
delete this.files[kids[i].name];
}
}
return this;
},
/**
* Generate the complete zip file
* @param {Object} options the options to generate the zip file :
* - compression, "STORE" by default.
* - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
* @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file
*/
generate: function(options) {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
},
/**
* Generate the complete zip file as an internal stream.
* @param {Object} options the options to generate the zip file :
* - compression, "STORE" by default.
* - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
* @return {StreamHelper} the streamed zip file.
*/
generateInternalStream: function(options) {
var worker, opts = {};
try {
opts = utils.extend(options || {}, {
streamFiles: false,
compression: "STORE",
compressionOptions : null,
type: "",
platform: "DOS",
comment: null,
mimeType: 'application/zip',
encodeFileName: utf8.utf8encode
});
opts.type = opts.type.toLowerCase();
opts.compression = opts.compression.toUpperCase();
// "binarystring" is prefered but the internals use "string".
if(opts.type === "binarystring") {
opts.type = "string";
}
if (!opts.type) {
throw new Error("No output type specified.");
}
utils.checkSupport(opts.type);
// accept nodejs `process.platform`
if(
opts.platform === 'darwin' ||
opts.platform === 'freebsd' ||
opts.platform === 'linux' ||
opts.platform === 'sunos'
) {
opts.platform = "UNIX";
}
if (opts.platform === 'win32') {
opts.platform = "DOS";
}
var comment = opts.comment || this.comment || "";
worker = generate.generateWorker(this, opts, comment);
} catch (e) {
worker = new GenericWorker("error");
worker.error(e);
}
return new StreamHelper(worker, opts.type || "string", opts.mimeType);
},
/**
* Generate the complete zip file asynchronously.
* @see generateInternalStream
*/
generateAsync: function(options, onUpdate) {
return this.generateInternalStream(options).accumulate(onUpdate);
},
/**
* Generate the complete zip file asynchronously.
* @see generateInternalStream
*/
generateNodeStream: function(options, onUpdate) {
options = options || {};
if (!options.type) {
options.type = "nodebuffer";
}
return this.generateInternalStream(options).toNodejsStream(onUpdate);
}
};
module.exports = out;
/***/ },
/* 239 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var utils = __webpack_require__(240);
var support = __webpack_require__(241);
var nodejsUtils = __webpack_require__(266);
var GenericWorker = __webpack_require__(291);
/**
* The following functions come from pako, from pako/lib/utils/strings
* released under the MIT license, see pako https://github.com/nodeca/pako/
*/
// Table with utf8 lengths (calculated by first byte of sequence)
// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
// because max possible codepoint is 0x10ffff
var _utf8len = new Array(256);
for (var i=0; i<256; i++) {
_utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
}
_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
// convert string to array (typed, when possible)
var string2buf = function (str) {
var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
// count binary size
for (m_pos = 0; m_pos < str_len; m_pos++) {
c = str.charCodeAt(m_pos);
if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
c2 = str.charCodeAt(m_pos+1);
if ((c2 & 0xfc00) === 0xdc00) {
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
m_pos++;
}
}
buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
}
// allocate buffer
if (support.uint8array) {
buf = new Uint8Array(buf_len);
} else {
buf = new Array(buf_len);
}
// convert
for (i=0, m_pos = 0; i < buf_len; m_pos++) {
c = str.charCodeAt(m_pos);
if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
c2 = str.charCodeAt(m_pos+1);
if ((c2 & 0xfc00) === 0xdc00) {
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
m_pos++;
}
}
if (c < 0x80) {
/* one byte */
buf[i++] = c;
} else if (c < 0x800) {
/* two bytes */
buf[i++] = 0xC0 | (c >>> 6);
buf[i++] = 0x80 | (c & 0x3f);
} else if (c < 0x10000) {
/* three bytes */
buf[i++] = 0xE0 | (c >>> 12);
buf[i++] = 0x80 | (c >>> 6 & 0x3f);
buf[i++] = 0x80 | (c & 0x3f);
} else {
/* four bytes */
buf[i++] = 0xf0 | (c >>> 18);
buf[i++] = 0x80 | (c >>> 12 & 0x3f);
buf[i++] = 0x80 | (c >>> 6 & 0x3f);
buf[i++] = 0x80 | (c & 0x3f);
}
}
return buf;
};
// Calculate max possible position in utf8 buffer,
// that will not break sequence. If that's not possible
// - (very small limits) return max size as is.
//
// buf[] - utf8 bytes array
// max - length limit (mandatory);
var utf8border = function(buf, max) {
var pos;
max = max || buf.length;
if (max > buf.length) { max = buf.length; }
// go back from last position, until start of sequence found
pos = max-1;
while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
// Fuckup - very small and broken sequence,
// return max, because we should return something anyway.
if (pos < 0) { return max; }
// If we came to start of buffer - that means vuffer is too small,
// return max too.
if (pos === 0) { return max; }
return (pos + _utf8len[buf[pos]] > max) ? pos : max;
};
// convert array to string
var buf2string = function (buf) {
var str, i, out, c, c_len;
var len = buf.length;
// Reserve max possible length (2 words per char)
// NB: by unknown reasons, Array is significantly faster for
// String.fromCharCode.apply than Uint16Array.
var utf16buf = new Array(len*2);
for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
// apply mask on first byte
c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
// join the rest
while (c_len > 1 && i < len) {
c = (c << 6) | (buf[i++] & 0x3f);
c_len--;
}
// terminated by end of string?
if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
if (c < 0x10000) {
utf16buf[out++] = c;
} else {
c -= 0x10000;
utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
utf16buf[out++] = 0xdc00 | (c & 0x3ff);
}
}
// shrinkBuf(utf16buf, out)
if (utf16buf.length !== out) {
if(utf16buf.subarray) {
utf16buf = utf16buf.subarray(0, out);
} else {
utf16buf.length = out;
}
}
// return String.fromCharCode.apply(null, utf16buf);
return utils.applyFromCharCode(utf16buf);
};
// That's all for the pako functions.
/**
* Transform a javascript string into an array (typed if possible) of bytes,
* UTF-8 encoded.
* @param {String} str the string to encode
* @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.
*/
exports.utf8encode = function utf8encode(str) {
if (support.nodebuffer) {
return nodejsUtils.newBuffer(str, "utf-8");
}
return string2buf(str);
};
/**
* Transform a bytes array (or a representation) representing an UTF-8 encoded
* string into a javascript string.
* @param {Array|Uint8Array|Buffer} buf the data de decode
* @return {String} the decoded string.
*/
exports.utf8decode = function utf8decode(buf) {
if (support.nodebuffer) {
return utils.transformTo("nodebuffer", buf).toString("utf-8");
}
buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);
return buf2string(buf);
};
/**
* A worker to decode utf8 encoded binary chunks into string chunks.
* @constructor
*/
function Utf8DecodeWorker() {
GenericWorker.call(this, "utf-8 decode");
// the last bytes if a chunk didn't end with a complete codepoint.
this.leftOver = null;
}
utils.inherits(Utf8DecodeWorker, GenericWorker);
/**
* @see GenericWorker.processChunk
*/
Utf8DecodeWorker.prototype.processChunk = function (chunk) {
var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data);
// 1st step, re-use what's left of the previous chunk
if (this.leftOver && this.leftOver.length) {
if(support.uint8array) {
var previousData = data;
data = new Uint8Array(previousData.length + this.leftOver.length);
data.set(this.leftOver, 0);
data.set(previousData, this.leftOver.length);
} else {
data = this.leftOver.concat(data);
}
this.leftOver = null;
}
var nextBoundary = utf8border(data);
var usableData = data;
if (nextBoundary !== data.length) {
if (support.uint8array) {
usableData = data.subarray(0, nextBoundary);
this.leftOver = data.subarray(nextBoundary, data.length);
} else {
usableData = data.slice(0, nextBoundary);
this.leftOver = data.slice(nextBoundary, data.length);
}
}
this.push({
data : exports.utf8decode(usableData),
meta : chunk.meta
});
};
/**
* @see GenericWorker.flush
*/
Utf8DecodeWorker.prototype.flush = function () {
if(this.leftOver && this.leftOver.length) {
this.push({
data : exports.utf8decode(this.leftOver),
meta : {}
});
this.leftOver = null;
}
};
exports.Utf8DecodeWorker = Utf8DecodeWorker;
/**
* A worker to endcode string chunks into utf8 encoded binary chunks.
* @constructor
*/
function Utf8EncodeWorker() {
GenericWorker.call(this, "utf-8 encode");
}
utils.inherits(Utf8EncodeWorker, GenericWorker);
/**
* @see GenericWorker.processChunk
*/
Utf8EncodeWorker.prototype.processChunk = function (chunk) {
this.push({
data : exports.utf8encode(chunk.data),
meta : chunk.meta
});
};
exports.Utf8EncodeWorker = Utf8EncodeWorker;
/***/ },
/* 240 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var support = __webpack_require__(241);
var base64 = __webpack_require__(265);
var nodejsUtils = __webpack_require__(266);
var setImmediate = __webpack_require__(267);
var external = __webpack_require__(288);
/**
* Convert a string that pass as a "binary string": it should represent a byte
* array but may have > 255 char codes. Be sure to take only the first byte
* and returns the byte array.
* @param {String} str the string to transform.
* @return {Array|Uint8Array} the string in a binary format.
*/
function string2binary(str) {
var result = null;
if (support.uint8array) {
result = new Uint8Array(str.length);
} else {
result = new Array(str.length);
}
return stringToArrayLike(str, result);
}
/**
* Create a new blob with the given content and the given type.
* @param {Array[String|ArrayBuffer]} parts the content to put in the blob. DO NOT use
* an Uint8Array because the stock browser of android 4 won't accept it (it
* will be silently converted to a string, "[object Uint8Array]").
* @param {String} type the mime type of the blob.
* @return {Blob} the created blob.
*/
exports.newBlob = function(parts, type) {
exports.checkSupport("blob");
try {
// Blob constructor
return new Blob(parts, {
type: type
});
}
catch (e) {
try {
// deprecated, browser only, old way
var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
var builder = new Builder();
for (var i = 0; i < parts.length; i++) {
builder.append(parts[i]);
}
return builder.getBlob(type);
}
catch (e) {
// well, fuck ?!
throw new Error("Bug : can't construct the Blob.");
}
}
};
/**
* The identity function.
* @param {Object} input the input.
* @return {Object} the same input.
*/
function identity(input) {
return input;
}
/**
* Fill in an array with a string.
* @param {String} str the string to use.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).
* @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
*/
function stringToArrayLike(str, array) {
for (var i = 0; i < str.length; ++i) {
array[i] = str.charCodeAt(i) & 0xFF;
}
return array;
}
/**
* An helper for the function arrayLikeToString.
* This contains static informations and functions that
* can be optimized by the browser JIT compiler.
*/
var arrayToStringHelper = {
/**
* Transform an array of int into a string, chunk by chunk.
* See the performances notes on arrayLikeToString.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
* @param {String} type the type of the array.
* @param {Integer} chunk the chunk size.
* @return {String} the resulting string.
* @throws Error if the chunk is too big for the stack.
*/
stringifyByChunk: function(array, type, chunk) {
var result = [], k = 0, len = array.length;
// shortcut
if (len <= chunk) {
return String.fromCharCode.apply(null, array);
}
while (k < len) {
if (type === "array" || type === "nodebuffer") {
result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
}
else {
result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
}
k += chunk;
}
return result.join("");
},
/**
* Call String.fromCharCode on every item in the array.
* This is the naive implementation, which generate A LOT of intermediate string.
* This should be used when everything else fail.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
* @return {String} the result.
*/
stringifyByChar: function(array){
var resultStr = "";
for(var i = 0; i < array.length; i++) {
resultStr += String.fromCharCode(array[i]);
}
return resultStr;
},
applyCanBeUsed : {
/**
* true if the browser accepts to use String.fromCharCode on Uint8Array
*/
uint8array : (function () {
try {
return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
} catch (e) {
return false;
}
})(),
/**
* true if the browser accepts to use String.fromCharCode on nodejs Buffer.
*/
nodebuffer : (function () {
try {
return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.newBuffer(1)).length === 1;
} catch (e) {
return false;
}
})()
}
};
/**
* Transform an array-like object to a string.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
* @return {String} the result.
*/
function arrayLikeToString(array) {
// Performances notes :
// --------------------
// String.fromCharCode.apply(null, array) is the fastest, see
// see http://jsperf.com/converting-a-uint8array-to-a-string/2
// but the stack is limited (and we can get huge arrays !).
//
// result += String.fromCharCode(array[i]); generate too many strings !
//
// This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
// TODO : we now have workers that split the work. Do we still need that ?
var chunk = 65536,
type = exports.getTypeOf(array),
canUseApply = true;
if (type === "uint8array") {
canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;
} else if (type === "nodebuffer") {
canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;
}
if (canUseApply) {
while (chunk > 1) {
try {
return arrayToStringHelper.stringifyByChunk(array, type, chunk);
} catch (e) {
chunk = Math.floor(chunk / 2);
}
}
}
// no apply or chunk error : slow and painful algorithm
// default browser on android 4.*
return arrayToStringHelper.stringifyByChar(array);
}
exports.applyFromCharCode = arrayLikeToString;
/**
* Copy the data from an array-like to an other array-like.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.
* @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.
* @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.
*/
function arrayLikeToArrayLike(arrayFrom, arrayTo) {
for (var i = 0; i < arrayFrom.length; i++) {
arrayTo[i] = arrayFrom[i];
}
return arrayTo;
}
// a matrix containing functions to transform everything into everything.
var transform = {};
// string to ?
transform["string"] = {
"string": identity,
"array": function(input) {
return stringToArrayLike(input, new Array(input.length));
},
"arraybuffer": function(input) {
return transform["string"]["uint8array"](input).buffer;
},
"uint8array": function(input) {
return stringToArrayLike(input, new Uint8Array(input.length));
},
"nodebuffer": function(input) {
return stringToArrayLike(input, nodejsUtils.newBuffer(input.length));
}
};
// array to ?
transform["array"] = {
"string": arrayLikeToString,
"array": identity,
"arraybuffer": function(input) {
return (new Uint8Array(input)).buffer;
},
"uint8array": function(input) {
return new Uint8Array(input);
},
"nodebuffer": function(input) {
return nodejsUtils.newBuffer(input);
}
};
// arraybuffer to ?
transform["arraybuffer"] = {
"string": function(input) {
return arrayLikeToString(new Uint8Array(input));
},
"array": function(input) {
return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));
},
"arraybuffer": identity,
"uint8array": function(input) {
return new Uint8Array(input);
},
"nodebuffer": function(input) {
return nodejsUtils.newBuffer(new Uint8Array(input));
}
};
// uint8array to ?
transform["uint8array"] = {
"string": arrayLikeToString,
"array": function(input) {
return arrayLikeToArrayLike(input, new Array(input.length));
},
"arraybuffer": function(input) {
// copy the uint8array: DO NOT propagate the original ArrayBuffer, it
// can be way larger (the whole zip file for example).
var copy = new Uint8Array(input.length);
if (input.length) {
copy.set(input, 0);
}
return copy.buffer;
},
"uint8array": identity,
"nodebuffer": function(input) {
return nodejsUtils.newBuffer(input);
}
};
// nodebuffer to ?
transform["nodebuffer"] = {
"string": arrayLikeToString,
"array": function(input) {
return arrayLikeToArrayLike(input, new Array(input.length));
},
"arraybuffer": function(input) {
return transform["nodebuffer"]["uint8array"](input).buffer;
},
"uint8array": function(input) {
return arrayLikeToArrayLike(input, new Uint8Array(input.length));
},
"nodebuffer": identity
};
/**
* Transform an input into any type.
* The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.
* If no output type is specified, the unmodified input will be returned.
* @param {String} outputType the output type.
* @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.
* @throws {Error} an Error if the browser doesn't support the requested output type.
*/
exports.transformTo = function(outputType, input) {
if (!input) {
// undefined, null, etc
// an empty string won't harm.
input = "";
}
if (!outputType) {
return input;
}
exports.checkSupport(outputType);
var inputType = exports.getTypeOf(input);
var result = transform[inputType][outputType](input);
return result;
};
/**
* Return the type of the input.
* The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
* @param {Object} input the input to identify.
* @return {String} the (lowercase) type of the input.
*/
exports.getTypeOf = function(input) {
if (typeof input === "string") {
return "string";
}
if (Object.prototype.toString.call(input) === "[object Array]") {
return "array";
}
if (support.nodebuffer && nodejsUtils.isBuffer(input)) {
return "nodebuffer";
}
if (support.uint8array && input instanceof Uint8Array) {
return "uint8array";
}
if (support.arraybuffer && input instanceof ArrayBuffer) {
return "arraybuffer";
}
};
/**
* Throw an exception if the type is not supported.
* @param {String} type the type to check.
* @throws {Error} an Error if the browser doesn't support the requested type.
*/
exports.checkSupport = function(type) {
var supported = support[type.toLowerCase()];
if (!supported) {
throw new Error(type + " is not supported by this platform");
}
};
exports.MAX_VALUE_16BITS = 65535;
exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1
/**
* Prettify a string read as binary.
* @param {string} str the string to prettify.
* @return {string} a pretty string.
*/
exports.pretty = function(str) {
var res = '',
code, i;
for (i = 0; i < (str || "").length; i++) {
code = str.charCodeAt(i);
res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
}
return res;
};
/**
* Defer the call of a function.
* @param {Function} callback the function to call asynchronously.
* @param {Array} args the arguments to give to the callback.
*/
exports.delay = function(callback, args, self) {
setImmediate(function () {
callback.apply(self || null, args || []);
});
};
/**
* Extends a prototype with an other, without calling a constructor with
* side effects. Inspired by nodejs' `utils.inherits`
* @param {Function} ctor the constructor to augment
* @param {Function} superCtor the parent constructor to use
*/
exports.inherits = function (ctor, superCtor) {
var Obj = function() {};
Obj.prototype = superCtor.prototype;
ctor.prototype = new Obj();
};
/**
* Merge the objects passed as parameters into a new one.
* @private
* @param {...Object} var_args All objects to merge.
* @return {Object} a new object with the data of the others.
*/
exports.extend = function() {
var result = {}, i, attr;
for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
for (attr in arguments[i]) {
if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") {
result[attr] = arguments[i][attr];
}
}
}
return result;
};
/**
* Transform arbitrary content into a Promise.
* @param {String} name a name for the content being processed.
* @param {Object} inputData the content to process.
* @param {Boolean} isBinary true if the content is not an unicode string
* @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.
* @param {Boolean} isBase64 true if the string content is encoded with base64.
* @return {Promise} a promise in a format usable by JSZip.
*/
exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {
// if inputData is already a promise, this flatten it.
var promise = external.Promise.resolve(inputData).then(function(data) {
var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);
if (isBlob && typeof FileReader !== "undefined") {
return new external.Promise(function (resolve, reject) {
var reader = new FileReader();
reader.onload = function(e) {
resolve(e.target.result);
};
reader.onerror = function(e) {
reject(e.target.error);
};
reader.readAsArrayBuffer(data);
});
} else {
return data;
}
});
return promise.then(function(data) {
var dataType = exports.getTypeOf(data);
if (!dataType) {
return external.Promise.reject(
new Error("The data of '" + name + "' is in an unsupported format !")
);
}
// special case : it's way easier to work with Uint8Array than with ArrayBuffer
if (dataType === "arraybuffer") {
data = exports.transformTo("uint8array", data);
} else if (dataType === "string") {
if (isBase64) {
data = base64.decode(data);
}
else if (isBinary) {
// optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask
if (isOptimizedBinaryString !== true) {
// this is a string, not in a base64 format.
// Be sure that this is a correct "binary string"
data = string2binary(data);
}
}
}
return data;
});
};
/***/ },
/* 241 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';
exports.base64 = true;
exports.array = true;
exports.string = true;
exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
exports.nodebuffer = typeof Buffer !== "undefined";
// contains true if JSZip can read/generate Uint8Array, false otherwise.
exports.uint8array = typeof Uint8Array !== "undefined";
if (typeof ArrayBuffer === "undefined") {
exports.blob = false;
}
else {
var buffer = new ArrayBuffer(0);
try {
exports.blob = new Blob([buffer], {
type: "application/zip"
}).size === 0;
}
catch (e) {
try {
var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
var builder = new Builder();
builder.append(buffer);
exports.blob = builder.getBlob('application/zip').size === 0;
}
catch (e) {
exports.blob = false;
}
}
}
try {
exports.nodestream = !!__webpack_require__(246).Readable;
} catch(e) {
exports.nodestream = false;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(242).Buffer))
/***/ },
/* 242 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/
/* eslint-disable no-proto */
'use strict'
var base64 = __webpack_require__(243)
var ieee754 = __webpack_require__(244)
var isArray = __webpack_require__(245)
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
Buffer.poolSize = 8192 // not used by this implementation
var rootParent = {}
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property
* on objects.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
function typedArraySupport () {
function Bar () {}
try {
var arr = new Uint8Array(1)
arr.foo = function () { return 42 }
arr.constructor = Bar
return arr.foo() === 42 && // typed array instances can be augmented
arr.constructor === Bar && // constructor can be set
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
/**
* Class: Buffer
* =============
*
* The Buffer constructor returns instances of `Uint8Array` that are augmented
* with function properties for all the node `Buffer` API functions. We use
* `Uint8Array` so that square bracket notation works as expected -- it returns
* a single octet.
*
* By augmenting the instances, we can avoid modifying the `Uint8Array`
* prototype.
*/
function Buffer (arg) {
if (!(this instanceof Buffer)) {
// Avoid going through an ArgumentsAdaptorTrampoline in the common case.
if (arguments.length > 1) return new Buffer(arg, arguments[1])
return new Buffer(arg)
}
if (!Buffer.TYPED_ARRAY_SUPPORT) {
this.length = 0
this.parent = undefined
}
// Common case.
if (typeof arg === 'number') {
return fromNumber(this, arg)
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
}
// Unusual.
return fromObject(this, arg)
}
function fromNumber (that, length) {
that = allocate(that, length < 0 ? 0 : checked(length) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < length; i++) {
that[i] = 0
}
}
return that
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
// Assumption: byteLength() return value is always < kMaxLength.
var length = byteLength(string, encoding) | 0
that = allocate(that, length)
that.write(string, encoding)
return that
}
function fromObject (that, object) {
if (Buffer.isBuffer(object)) return fromBuffer(that, object)
if (isArray(object)) return fromArray(that, object)
if (object == null) {
throw new TypeError('must start with number, buffer, array or string')
}
if (typeof ArrayBuffer !== 'undefined') {
if (object.buffer instanceof ArrayBuffer) {
return fromTypedArray(that, object)
}
if (object instanceof ArrayBuffer) {
return fromArrayBuffer(that, object)
}
}
if (object.length) return fromArrayLike(that, object)
return fromJsonObject(that, object)
}
function fromBuffer (that, buffer) {
var length = checked(buffer.length) | 0
that = allocate(that, length)
buffer.copy(that, 0, 0, length)
return that
}
function fromArray (that, array) {
var length = checked(array.length) | 0
that = allocate(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
// Duplicate of fromArray() to keep fromArray() monomorphic.
function fromTypedArray (that, array) {
var length = checked(array.length) | 0
that = allocate(that, length)
// Truncating the elements is probably not what people expect from typed
// arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
// of the old Buffer constructor.
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array) {
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
array.byteLength
that = Buffer._augment(new Uint8Array(array))
} else {
// Fallback: Return an object instance of the Buffer class
that = fromTypedArray(that, new Uint8Array(array))
}
return that
}
function fromArrayLike (that, array) {
var length = checked(array.length) | 0
that = allocate(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
// Returns a zero-length buffer for inputs that don't conform to the spec.
function fromJsonObject (that, object) {
var array
var length = 0
if (object.type === 'Buffer' && isArray(object.data)) {
array = object.data
length = checked(array.length) | 0
}
that = allocate(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
} else {
// pre-set for values that may exist in the future
Buffer.prototype.length = undefined
Buffer.prototype.parent = undefined
}
function allocate (that, length) {
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = Buffer._augment(new Uint8Array(length))
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that.length = length
that._isBuffer = true
}
var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
if (fromPool) that.parent = rootParent
return that
}
function checked (length) {
// Note: cannot use `length < kMaxLength` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (subject, encoding) {
if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
var buf = new Buffer(subject, encoding)
delete buf.parent
return buf
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
var i = 0
var len = Math.min(x, y)
while (i < len) {
if (a[i] !== b[i]) break
++i
}
if (i !== len) {
x = a[i]
y = b[i]
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'binary':
case 'base64':
case 'raw':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
if (list.length === 0) {
return new Buffer(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; i++) {
length += list[i].length
}
}
var buf = new Buffer(length)
var pos = 0
for (i = 0; i < list.length; i++) {
var item = list[i]
item.copy(buf, pos)
pos += item.length
}
return buf
}
function byteLength (string, encoding) {
if (typeof string !== 'string') string = '' + string
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'binary':
// Deprecated
case 'raw':
case 'raws':
return len
case 'utf8':
case 'utf-8':
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
start = start | 0
end = end === undefined || end === Infinity ? this.length : end | 0
if (!encoding) encoding = 'utf8'
if (start < 0) start = 0
if (end > this.length) end = this.length
if (end <= start) return ''
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'binary':
return binarySlice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return ''
}
Buffer.prototype.compare = function compare (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return 0
return Buffer.compare(this, b)
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
else if (byteOffset < -0x80000000) byteOffset = -0x80000000
byteOffset >>= 0
if (this.length === 0) return -1
if (byteOffset >= this.length) return -1
// Negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
if (typeof val === 'string') {
if (val.length === 0) return -1 // special case: looking for empty string always fails
return String.prototype.indexOf.call(this, val, byteOffset)
}
if (Buffer.isBuffer(val)) {
return arrayIndexOf(this, val, byteOffset)
}
if (typeof val === 'number') {
if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
}
return arrayIndexOf(this, [ val ], byteOffset)
}
function arrayIndexOf (arr, val, byteOffset) {
var foundIndex = -1
for (var i = 0; byteOffset + i < arr.length; i++) {
if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
} else {
foundIndex = -1
}
}
return -1
}
throw new TypeError('val must be string, number or Buffer')
}
// `get` is deprecated
Buffer.prototype.get = function get (offset) {
console.log('.get() is deprecated. Access using array indexes instead.')
return this.readUInt8(offset)
}
// `set` is deprecated
Buffer.prototype.set = function set (v, offset) {
console.log('.set() is deprecated. Access using array indexes instead.')
return this.writeUInt8(v, offset)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new Error('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; i++) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) throw new Error('Invalid hex string')
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function binaryWrite (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0
if (isFinite(length)) {
length = length | 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
var swap = encoding
encoding = offset
offset = length | 0
length = swap
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'binary':
return binaryWrite(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function binarySlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; i++) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = Buffer._augment(this.subarray(start, end))
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
for (var i = 0; i < sliceLen; i++) {
newBuf[i] = this[i + start]
}
}
if (newBuf.length) newBuf.parent = this.parent || this
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = (value & 0xff)
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
if (offset < 0) throw new RangeError('index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; i--) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; i++) {
target[i + targetStart] = this[i + start]
}
} else {
target._set(this.subarray(start, start + len), targetStart)
}
return len
}
// fill(value, start=0, end=buffer.length)
Buffer.prototype.fill = function fill (value, start, end) {
if (!value) value = 0
if (!start) start = 0
if (!end) end = this.length
if (end < start) throw new RangeError('end < start')
// Fill 0 bytes; we're done
if (end === start) return
if (this.length === 0) return
if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
var i
if (typeof value === 'number') {
for (i = start; i < end; i++) {
this[i] = value
}
} else {
var bytes = utf8ToBytes(value.toString())
var len = bytes.length
for (i = start; i < end; i++) {
this[i] = bytes[i % len]
}
}
return this
}
/**
* Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
* Added in Node 0.12. Only available in browsers that support ArrayBuffer.
*/
Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
if (typeof Uint8Array !== 'undefined') {
if (Buffer.TYPED_ARRAY_SUPPORT) {
return (new Buffer(this)).buffer
} else {
var buf = new Uint8Array(this.length)
for (var i = 0, len = buf.length; i < len; i += 1) {
buf[i] = this[i]
}
return buf.buffer
}
} else {
throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
}
}
// HELPER FUNCTIONS
// ================
var BP = Buffer.prototype
/**
* Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
*/
Buffer._augment = function _augment (arr) {
arr.constructor = Buffer
arr._isBuffer = true
// save reference to original Uint8Array set method before overwriting
arr._set = arr.set
// deprecated
arr.get = BP.get
arr.set = BP.set
arr.write = BP.write
arr.toString = BP.toString
arr.toLocaleString = BP.toString
arr.toJSON = BP.toJSON
arr.equals = BP.equals
arr.compare = BP.compare
arr.indexOf = BP.indexOf
arr.copy = BP.copy
arr.slice = BP.slice
arr.readUIntLE = BP.readUIntLE
arr.readUIntBE = BP.readUIntBE
arr.readUInt8 = BP.readUInt8
arr.readUInt16LE = BP.readUInt16LE
arr.readUInt16BE = BP.readUInt16BE
arr.readUInt32LE = BP.readUInt32LE
arr.readUInt32BE = BP.readUInt32BE
arr.readIntLE = BP.readIntLE
arr.readIntBE = BP.readIntBE
arr.readInt8 = BP.readInt8
arr.readInt16LE = BP.readInt16LE
arr.readInt16BE = BP.readInt16BE
arr.readInt32LE = BP.readInt32LE
arr.readInt32BE = BP.readInt32BE
arr.readFloatLE = BP.readFloatLE
arr.readFloatBE = BP.readFloatBE
arr.readDoubleLE = BP.readDoubleLE
arr.readDoubleBE = BP.readDoubleBE
arr.writeUInt8 = BP.writeUInt8
arr.writeUIntLE = BP.writeUIntLE
arr.writeUIntBE = BP.writeUIntBE
arr.writeUInt16LE = BP.writeUInt16LE
arr.writeUInt16BE = BP.writeUInt16BE
arr.writeUInt32LE = BP.writeUInt32LE
arr.writeUInt32BE = BP.writeUInt32BE
arr.writeIntLE = BP.writeIntLE
arr.writeIntBE = BP.writeIntBE
arr.writeInt8 = BP.writeInt8
arr.writeInt16LE = BP.writeInt16LE
arr.writeInt16BE = BP.writeInt16BE
arr.writeInt32LE = BP.writeInt32LE
arr.writeInt32BE = BP.writeInt32BE
arr.writeFloatLE = BP.writeFloatLE
arr.writeFloatBE = BP.writeFloatBE
arr.writeDoubleLE = BP.writeDoubleLE
arr.writeDoubleBE = BP.writeDoubleBE
arr.fill = BP.fill
arr.inspect = BP.inspect
arr.toArrayBuffer = BP.toArrayBuffer
return arr
}
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; i++) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; i++) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; i++) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; i++) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(242).Buffer, (function() { return this; }())))
/***/ },
/* 243 */
/***/ function(module, exports, __webpack_require__) {
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 (code < NUMBER)
return -1 //no match
if (code < NUMBER + 10)
return code - NUMBER + 26 + 26
if (code < UPPER + 26)
return code - UPPER
if (code < LOWER + 26)
return code - LOWER + 26
}
function b64ToByteArray (b64) {
var i, j, l, tmp, placeHolders, arr
if (b64.length % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
var len = b64.length
placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
// base64 is 4/3 + up to two characters of the original data
arr = new Arr(b64.length * 3 / 4 - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? b64.length - 4 : b64.length
var L = 0
function push (v) {
arr[L++] = v
}
for (i = 0, j = 0; i < l; i += 4, j += 3) {
tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
push((tmp & 0xFF0000) >> 16)
push((tmp & 0xFF00) >> 8)
push(tmp & 0xFF)
}
if (placeHolders === 2) {
tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
push(tmp & 0xFF)
} 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) & 0xFF)
push(tmp & 0xFF)
}
return arr
}
function uint8ToBase64 (uint8) {
var i,
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
output = "",
temp, length
function encode (num) {
return lookup.charAt(num)
}
function tripletToBase64 (num) {
return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
}
// go through the array every three bytes, we'll deal with trailing stuff later
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output += tripletToBase64(temp)
}
// pad the end with zeros, but make sure to not forget the extra bytes
switch (extraBytes) {
case 1:
temp = uint8[uint8.length - 1]
output += encode(temp >> 2)
output += encode((temp << 4) & 0x3F)
output += '=='
break
case 2:
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
output += encode(temp >> 10)
output += encode((temp >> 4) & 0x3F)
output += encode((temp << 2) & 0x3F)
output += '='
break
}
return output
}
exports.toByteArray = b64ToByteArray
exports.fromByteArray = uint8ToBase64
}( false ? (this.base64js = {}) : exports))
/***/ },
/* 244 */
/***/ function(module, exports) {
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
/***/ },
/* 245 */
/***/ function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ },
/* 246 */
/***/ function(module, exports, __webpack_require__) {
/*
* This file is used by module bundlers (browserify/webpack/etc) when
* including a stream implementation. We use "readable-stream" to get a
* consistent behavior between nodejs versions but bundlers often have a shim
* for "stream". Using this shim greatly improve the compatibility and greatly
* reduce the final size of the bundle (only one stream implementation, not
* two).
*/
module.exports = __webpack_require__(247);
/***/ },
/* 247 */
/***/ function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
module.exports = Stream;
var EE = __webpack_require__(248).EventEmitter;
var inherits = __webpack_require__(249);
inherits(Stream, EE);
Stream.Readable = __webpack_require__(250);
Stream.Writable = __webpack_require__(261);
Stream.Duplex = __webpack_require__(262);
Stream.Transform = __webpack_require__(263);
Stream.PassThrough = __webpack_require__(264);
// Backwards-compat with node 0.4.x
Stream.Stream = Stream;
// old-style streams. Note that the pipe method (the only relevant
// part of this class) is overridden in the Readable class.
function Stream() {
EE.call(this);
}
Stream.prototype.pipe = function(dest, options) {
var source = this;
function ondata(chunk) {
if (dest.writable) {
if (false === dest.write(chunk) && source.pause) {
source.pause();
}
}
}
source.on('data', ondata);
function ondrain() {
if (source.readable && source.resume) {
source.resume();
}
}
dest.on('drain', ondrain);
// If the 'end' option is not supplied, dest.end() will be called when
// source gets the 'end' or 'close' events. Only dest.end() once.
if (!dest._isStdio && (!options || options.end !== false)) {
source.on('end', onend);
source.on('close', onclose);
}
var didOnEnd = false;
function onend() {
if (didOnEnd) return;
didOnEnd = true;
dest.end();
}
function onclose() {
if (didOnEnd) return;
didOnEnd = true;
if (typeof dest.destroy === 'function') dest.destroy();
}
// don't leave dangling pipes when there are errors.
function onerror(er) {
cleanup();
if (EE.listenerCount(this, 'error') === 0) {
throw er; // Unhandled stream error in pipe.
}
}
source.on('error', onerror);
dest.on('error', onerror);
// remove all the event listeners that were added.
function cleanup() {
source.removeListener('data', ondata);
dest.removeListener('drain', ondrain);
source.removeListener('end', onend);
source.removeListener('close', onclose);
source.removeListener('error', onerror);
dest.removeListener('error', onerror);
source.removeListener('end', cleanup);
source.removeListener('close', cleanup);
dest.removeListener('close', cleanup);
}
source.on('end', cleanup);
source.on('close', cleanup);
dest.on('close', cleanup);
dest.emit('pipe', source);
// Allow for unix-like usage: A.pipe(B).pipe(C)
return dest;
};
/***/ },
/* 248 */
/***/ function(module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
function EventEmitter() {
this._events = this._events || {};
this._maxListeners = this._maxListeners || undefined;
}
module.exports = EventEmitter;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._maxListeners = undefined;
// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
EventEmitter.defaultMaxListeners = 10;
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function(n) {
if (!isNumber(n) || n < 0 || isNaN(n))
throw TypeError('n must be a positive number');
this._maxListeners = n;
return this;
};
EventEmitter.prototype.emit = function(type) {
var er, handler, len, args, i, listeners;
if (!this._events)
this._events = {};
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._events.error ||
(isObject(this._events.error) && !this._events.error.length)) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
}
throw TypeError('Uncaught, unspecified "error" event.');
}
}
handler = this._events[type];
if (isUndefined(handler))
return false;
if (isFunction(handler)) {
switch (arguments.length) {
// fast cases
case 1:
handler.call(this);
break;
case 2:
handler.call(this, arguments[1]);
break;
case 3:
handler.call(this, arguments[1], arguments[2]);
break;
// slower
default:
args = Array.prototype.slice.call(arguments, 1);
handler.apply(this, args);
}
} else if (isObject(handler)) {
args = Array.prototype.slice.call(arguments, 1);
listeners = handler.slice();
len = listeners.length;
for (i = 0; i < len; i++)
listeners[i].apply(this, args);
}
return true;
};
EventEmitter.prototype.addListener = function(type, listener) {
var m;
if (!isFunction(listener))
throw TypeError('listener must be a function');
if (!this._events)
this._events = {};
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
this.emit('newListener', type,
isFunction(listener.listener) ?
listener.listener : listener);
if (!this._events[type])
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
else if (isObject(this._events[type]))
// If we've already got an array, just append.
this._events[type].push(listener);
else
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
// Check for listener leak
if (isObject(this._events[type]) && !this._events[type].warned) {
if (!isUndefined(this._maxListeners)) {
m = this._maxListeners;
} else {
m = EventEmitter.defaultMaxListeners;
}
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
if (typeof console.trace === 'function') {
// not supported in IE 10
console.trace();
}
}
}
return this;
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.once = function(type, listener) {
if (!isFunction(listener))
throw TypeError('listener must be a function');
var fired = false;
function g() {
this.removeListener(type, g);
if (!fired) {
fired = true;
listener.apply(this, arguments);
}
}
g.listener = listener;
this.on(type, g);
return this;
};
// emits a 'removeListener' event iff the listener was removed
EventEmitter.prototype.removeListener = function(type, listener) {
var list, position, length, i;
if (!isFunction(listener))
throw TypeError('listener must be a function');
if (!this._events || !this._events[type])
return this;
list = this._events[type];
length = list.length;
position = -1;
if (list === listener ||
(isFunction(list.listener) && list.listener === listener)) {
delete this._events[type];
if (this._events.removeListener)
this.emit('removeListener', type, listener);
} else if (isObject(list)) {
for (i = length; i-- > 0;) {
if (list[i] === listener ||
(list[i].listener && list[i].listener === listener)) {
position = i;
break;
}
}
if (position < 0)
return this;
if (list.length === 1) {
list.length = 0;
delete this._events[type];
} else {
list.splice(position, 1);
}
if (this._events.removeListener)
this.emit('removeListener', type, listener);
}
return this;
};
EventEmitter.prototype.removeAllListeners = function(type) {
var key, listeners;
if (!this._events)
return this;
// not listening for removeListener, no need to emit
if (!this._events.removeListener) {
if (arguments.length === 0)
this._events = {};
else if (this._events[type])
delete this._events[type];
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
for (key in this._events) {
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = {};
return this;
}
listeners = this._events[type];
if (isFunction(listeners)) {
this.removeListener(type, listeners);
} else if (listeners) {
// LIFO order
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
}
delete this._events[type];
return this;
};
EventEmitter.prototype.listeners = function(type) {
var ret;
if (!this._events || !this._events[type])
ret = [];
else if (isFunction(this._events[type]))
ret = [this._events[type]];
else
ret = this._events[type].slice();
return ret;
};
EventEmitter.prototype.listenerCount = function(type) {
if (this._events) {
var evlistener = this._events[type];
if (isFunction(evlistener))
return 1;
else if (evlistener)
return evlistener.length;
}
return 0;
};
EventEmitter.listenerCount = function(emitter, type) {
return emitter.listenerCount(type);
};
function isFunction(arg) {
return typeof arg === 'function';
}
function isNumber(arg) {
return typeof arg === 'number';
}
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
function isUndefined(arg) {
return arg === void 0;
}
/***/ },
/* 249 */
/***/ function(module, exports) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
/***/ },
/* 250 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {exports = module.exports = __webpack_require__(251);
exports.Stream = __webpack_require__(247);
exports.Readable = exports;
exports.Writable = __webpack_require__(257);
exports.Duplex = __webpack_require__(256);
exports.Transform = __webpack_require__(259);
exports.PassThrough = __webpack_require__(260);
if (!process.browser && process.env.READABLE_STREAM === 'disable') {
module.exports = __webpack_require__(247);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(159)))
/***/ },
/* 251 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
module.exports = Readable;
/**/
var isArray = __webpack_require__(252);
/* */
/**/
var Buffer = __webpack_require__(242).Buffer;
/* */
Readable.ReadableState = ReadableState;
var EE = __webpack_require__(248).EventEmitter;
/**/
if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
return emitter.listeners(type).length;
};
/* */
var Stream = __webpack_require__(247);
/**/
var util = __webpack_require__(253);
util.inherits = __webpack_require__(254);
/* */
var StringDecoder;
/**/
var debug = __webpack_require__(255);
if (debug && debug.debuglog) {
debug = debug.debuglog('stream');
} else {
debug = function () {};
}
/* */
util.inherits(Readable, Stream);
function ReadableState(options, stream) {
var Duplex = __webpack_require__(256);
options = options || {};
// the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
var hwm = options.highWaterMark;
var defaultHwm = options.objectMode ? 16 : 16 * 1024;
this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
this.buffer = [];
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
this.flowing = null;
this.ended = false;
this.endEmitted = false;
this.reading = false;
// a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// whenever we return null, then we set a flag to say
// that we're awaiting a 'readable' event emission.
this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex)
this.objectMode = this.objectMode || !!options.readableObjectMode;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// when piping, we only care about 'readable' events that happen
// after read()ing all the bytes and not getting any pushback.
this.ranOut = false;
// the number of writers that are awaiting a drain event in .pipe()s
this.awaitDrain = 0;
// if true, a maybeReadMore has been scheduled
this.readingMore = false;
this.decoder = null;
this.encoding = null;
if (options.encoding) {
if (!StringDecoder)
StringDecoder = __webpack_require__(258).StringDecoder;
this.decoder = new StringDecoder(options.encoding);
this.encoding = options.encoding;
}
}
function Readable(options) {
var Duplex = __webpack_require__(256);
if (!(this instanceof Readable))
return new Readable(options);
this._readableState = new ReadableState(options, this);
// legacy
this.readable = true;
Stream.call(this);
}
// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function(chunk, encoding) {
var state = this._readableState;
if (util.isString(chunk) && !state.objectMode) {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
chunk = new Buffer(chunk, encoding);
encoding = '';
}
}
return readableAddChunk(this, state, chunk, encoding, false);
};
// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
var state = this._readableState;
return readableAddChunk(this, state, chunk, '', true);
};
function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
} else if (util.isNullOrUndefined(chunk)) {
state.reading = false;
if (!state.ended)
onEofChunk(stream, state);
} else if (state.objectMode || chunk && chunk.length > 0) {
if (state.ended && !addToFront) {
var e = new Error('stream.push() after EOF');
stream.emit('error', e);
} else if (state.endEmitted && addToFront) {
var e = new Error('stream.unshift() after end event');
stream.emit('error', e);
} else {
if (state.decoder && !addToFront && !encoding)
chunk = state.decoder.write(chunk);
if (!addToFront)
state.reading = false;
// if we want the data now, just emit it.
if (state.flowing && state.length === 0 && !state.sync) {
stream.emit('data', chunk);
stream.read(0);
} else {
// update the buffer info.
state.length += state.objectMode ? 1 : chunk.length;
if (addToFront)
state.buffer.unshift(chunk);
else
state.buffer.push(chunk);
if (state.needReadable)
emitReadable(stream);
}
maybeReadMore(stream, state);
}
} else if (!addToFront) {
state.reading = false;
}
return needMoreData(state);
}
// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes. This is to work around cases where hwm=0,
// such as the repl. Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
return !state.ended &&
(state.needReadable ||
state.length < state.highWaterMark ||
state.length === 0);
}
// backwards compatibility.
Readable.prototype.setEncoding = function(enc) {
if (!StringDecoder)
StringDecoder = __webpack_require__(258).StringDecoder;
this._readableState.decoder = new StringDecoder(enc);
this._readableState.encoding = enc;
return this;
};
// Don't raise the hwm > 128MB
var MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
} else {
// Get the next highest power of 2
n--;
for (var p = 1; p < 32; p <<= 1) n |= n >> p;
n++;
}
return n;
}
function howMuchToRead(n, state) {
if (state.length === 0 && state.ended)
return 0;
if (state.objectMode)
return n === 0 ? 0 : 1;
if (isNaN(n) || util.isNull(n)) {
// only flow one buffer at a time
if (state.flowing && state.buffer.length)
return state.buffer[0].length;
else
return state.length;
}
if (n <= 0)
return 0;
// If we're asking for more than the target buffer level,
// then raise the water mark. Bump up to the next highest
// power of 2, to prevent increasing it excessively in tiny
// amounts.
if (n > state.highWaterMark)
state.highWaterMark = roundUpToNextPowerOf2(n);
// don't have that much. return null, unless we've ended.
if (n > state.length) {
if (!state.ended) {
state.needReadable = true;
return 0;
} else
return state.length;
}
return n;
}
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
debug('read', n);
var state = this._readableState;
var nOrig = n;
if (!util.isNumber(n) || n > 0)
state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
// the 'readable' event and move on.
if (n === 0 &&
state.needReadable &&
(state.length >= state.highWaterMark || state.ended)) {
debug('read: emitReadable', state.length, state.ended);
if (state.length === 0 && state.ended)
endReadable(this);
else
emitReadable(this);
return null;
}
n = howMuchToRead(n, state);
// if we've ended, and we're now clear, then finish it up.
if (n === 0 && state.ended) {
if (state.length === 0)
endReadable(this);
return null;
}
// All the actual chunk generation logic needs to be
// *below* the call to _read. The reason is that in certain
// synthetic stream cases, such as passthrough streams, _read
// may be a completely synchronous operation which may change
// the state of the read buffer, providing enough data when
// before there was *not* enough.
//
// So, the steps are:
// 1. Figure out what the state of things will be after we do
// a read from the buffer.
//
// 2. If that resulting state will trigger a _read, then call _read.
// Note that this may be asynchronous, or synchronous. Yes, it is
// deeply ugly to write APIs this way, but that still doesn't mean
// that the Readable class should behave improperly, as streams are
// designed to be sync/async agnostic.
// Take note if the _read call is sync or async (ie, if the read call
// has returned yet), so that we know whether or not it's safe to emit
// 'readable' etc.
//
// 3. Actually pull the requested chunks out of the buffer and return.
// if we need a readable event, then we need to do some reading.
var doRead = state.needReadable;
debug('need readable', doRead);
// if we currently have less than the highWaterMark, then also read some
if (state.length === 0 || state.length - n < state.highWaterMark) {
doRead = true;
debug('length less than watermark', doRead);
}
// however, if we've ended, then there's no point, and if we're already
// reading, then it's unnecessary.
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
}
if (doRead) {
debug('do read');
state.reading = true;
state.sync = true;
// if the length is currently zero, then we *need* a readable event.
if (state.length === 0)
state.needReadable = true;
// call internal read method
this._read(state.highWaterMark);
state.sync = false;
}
// If _read pushed data synchronously, then `reading` will be false,
// and we need to re-evaluate how much data we can return to the user.
if (doRead && !state.reading)
n = howMuchToRead(nOrig, state);
var ret;
if (n > 0)
ret = fromList(n, state);
else
ret = null;
if (util.isNull(ret)) {
state.needReadable = true;
n = 0;
}
state.length -= n;
// If we have nothing in the buffer, then we want to know
// as soon as we *do* get something into the buffer.
if (state.length === 0 && !state.ended)
state.needReadable = true;
// If we tried to read() past the EOF, then emit end on the next tick.
if (nOrig !== n && state.ended && state.length === 0)
endReadable(this);
if (!util.isNull(ret))
this.emit('data', ret);
return ret;
};
function chunkInvalid(state, chunk) {
var er = null;
if (!util.isBuffer(chunk) &&
!util.isString(chunk) &&
!util.isNullOrUndefined(chunk) &&
!state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
return er;
}
function onEofChunk(stream, state) {
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
}
}
state.ended = true;
// emit 'readable' now to make sure it gets picked up.
emitReadable(stream);
}
// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow. This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
var state = stream._readableState;
state.needReadable = false;
if (!state.emittedReadable) {
debug('emitReadable', state.flowing);
state.emittedReadable = true;
if (state.sync)
process.nextTick(function() {
emitReadable_(stream);
});
else
emitReadable_(stream);
}
}
function emitReadable_(stream) {
debug('emit readable');
stream.emit('readable');
flow(stream);
}
// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data. that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
if (!state.readingMore) {
state.readingMore = true;
process.nextTick(function() {
maybeReadMore_(stream, state);
});
}
}
function maybeReadMore_(stream, state) {
var len = state.length;
while (!state.reading && !state.flowing && !state.ended &&
state.length < state.highWaterMark) {
debug('maybeReadMore read 0');
stream.read(0);
if (len === state.length)
// didn't get any data, stop spinning.
break;
else
len = state.length;
}
state.readingMore = false;
}
// abstract method. to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function(n) {
this.emit('error', new Error('not implemented'));
};
Readable.prototype.pipe = function(dest, pipeOpts) {
var src = this;
var state = this._readableState;
switch (state.pipesCount) {
case 0:
state.pipes = dest;
break;
case 1:
state.pipes = [state.pipes, dest];
break;
default:
state.pipes.push(dest);
break;
}
state.pipesCount += 1;
debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
dest !== process.stdout &&
dest !== process.stderr;
var endFn = doEnd ? onend : cleanup;
if (state.endEmitted)
process.nextTick(endFn);
else
src.once('end', endFn);
dest.on('unpipe', onunpipe);
function onunpipe(readable) {
debug('onunpipe');
if (readable === src) {
cleanup();
}
}
function onend() {
debug('onend');
dest.end();
}
// when the dest drains, it reduces the awaitDrain counter
// on the source. This would be more elegant with a .once()
// handler in flow(), but adding and removing repeatedly is
// too slow.
var ondrain = pipeOnDrain(src);
dest.on('drain', ondrain);
function cleanup() {
debug('cleanup');
// cleanup event handlers once the pipe is broken
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
dest.removeListener('drain', ondrain);
dest.removeListener('error', onerror);
dest.removeListener('unpipe', onunpipe);
src.removeListener('end', onend);
src.removeListener('end', cleanup);
src.removeListener('data', ondata);
// if the reader is waiting for a drain event from this
// specific writer, then it would cause it to never start
// flowing again.
// So, if this is awaiting a drain, then we just call it now.
// If we don't know, then assume that we are waiting for one.
if (state.awaitDrain &&
(!dest._writableState || dest._writableState.needDrain))
ondrain();
}
src.on('data', ondata);
function ondata(chunk) {
debug('ondata');
var ret = dest.write(chunk);
if (false === ret) {
debug('false write response, pause',
src._readableState.awaitDrain);
src._readableState.awaitDrain++;
src.pause();
}
}
// if the dest has an error, then stop piping into it.
// however, don't suppress the throwing behavior for this.
function onerror(er) {
debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
if (EE.listenerCount(dest, 'error') === 0)
dest.emit('error', er);
}
// This is a brutally ugly hack to make sure that our error handler
// is attached before any userland ones. NEVER DO THIS.
if (!dest._events || !dest._events.error)
dest.on('error', onerror);
else if (isArray(dest._events.error))
dest._events.error.unshift(onerror);
else
dest._events.error = [onerror, dest._events.error];
// Both close and finish should trigger unpipe, but only once.
function onclose() {
dest.removeListener('finish', onfinish);
unpipe();
}
dest.once('close', onclose);
function onfinish() {
debug('onfinish');
dest.removeListener('close', onclose);
unpipe();
}
dest.once('finish', onfinish);
function unpipe() {
debug('unpipe');
src.unpipe(dest);
}
// tell the dest that it's being piped to
dest.emit('pipe', src);
// start the flow if it hasn't been started already.
if (!state.flowing) {
debug('pipe resume');
src.resume();
}
return dest;
};
function pipeOnDrain(src) {
return function() {
var state = src._readableState;
debug('pipeOnDrain', state.awaitDrain);
if (state.awaitDrain)
state.awaitDrain--;
if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
state.flowing = true;
flow(src);
}
};
}
Readable.prototype.unpipe = function(dest) {
var state = this._readableState;
// if we're not piping anywhere, then do nothing.
if (state.pipesCount === 0)
return this;
// just one destination. most common case.
if (state.pipesCount === 1) {
// passed in one, but it's not the right one.
if (dest && dest !== state.pipes)
return this;
if (!dest)
dest = state.pipes;
// got a match.
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
if (dest)
dest.emit('unpipe', this);
return this;
}
// slow case. multiple pipe destinations.
if (!dest) {
// remove all.
var dests = state.pipes;
var len = state.pipesCount;
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
for (var i = 0; i < len; i++)
dests[i].emit('unpipe', this);
return this;
}
// try to find the right one.
var i = indexOf(state.pipes, dest);
if (i === -1)
return this;
state.pipes.splice(i, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1)
state.pipes = state.pipes[0];
dest.emit('unpipe', this);
return this;
};
// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
// If listening to data, and it has not explicitly been paused,
// then call resume to start the flow of data on the next tick.
if (ev === 'data' && false !== this._readableState.flowing) {
this.resume();
}
if (ev === 'readable' && this.readable) {
var state = this._readableState;
if (!state.readableListening) {
state.readableListening = true;
state.emittedReadable = false;
state.needReadable = true;
if (!state.reading) {
var self = this;
process.nextTick(function() {
debug('readable nexttick read 0');
self.read(0);
});
} else if (state.length) {
emitReadable(this, state);
}
}
}
return res;
};
Readable.prototype.addListener = Readable.prototype.on;
// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
var state = this._readableState;
if (!state.flowing) {
debug('resume');
state.flowing = true;
if (!state.reading) {
debug('resume read 0');
this.read(0);
}
resume(this, state);
}
return this;
};
function resume(stream, state) {
if (!state.resumeScheduled) {
state.resumeScheduled = true;
process.nextTick(function() {
resume_(stream, state);
});
}
}
function resume_(stream, state) {
state.resumeScheduled = false;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading)
stream.read(0);
}
Readable.prototype.pause = function() {
debug('call pause flowing=%j', this._readableState.flowing);
if (false !== this._readableState.flowing) {
debug('pause');
this._readableState.flowing = false;
this.emit('pause');
}
return this;
};
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
if (state.flowing) {
do {
var chunk = stream.read();
} while (null !== chunk && state.flowing);
}
}
// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function(stream) {
var state = this._readableState;
var paused = false;
var self = this;
stream.on('end', function() {
debug('wrapped end');
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length)
self.push(chunk);
}
self.push(null);
});
stream.on('data', function(chunk) {
debug('wrapped data');
if (state.decoder)
chunk = state.decoder.write(chunk);
if (!chunk || !state.objectMode && !chunk.length)
return;
var ret = self.push(chunk);
if (!ret) {
paused = true;
stream.pause();
}
});
// proxy all the other methods.
// important when wrapping filters and duplexes.
for (var i in stream) {
if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
this[i] = function(method) { return function() {
return stream[method].apply(stream, arguments);
}}(i);
}
}
// proxy certain important events.
var events = ['error', 'close', 'destroy', 'pause', 'resume'];
forEach(events, function(ev) {
stream.on(ev, self.emit.bind(self, ev));
});
// when we try to consume some more bytes, simply unpause the
// underlying stream.
self._read = function(n) {
debug('wrapped _read', n);
if (paused) {
paused = false;
stream.resume();
}
};
return self;
};
// exposed for testing purposes only.
Readable._fromList = fromList;
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
function fromList(n, state) {
var list = state.buffer;
var length = state.length;
var stringMode = !!state.decoder;
var objectMode = !!state.objectMode;
var ret;
// nothing in the list, definitely empty.
if (list.length === 0)
return null;
if (length === 0)
ret = null;
else if (objectMode)
ret = list.shift();
else if (!n || n >= length) {
// read it all, truncate the array.
if (stringMode)
ret = list.join('');
else
ret = Buffer.concat(list, length);
list.length = 0;
} else {
// read just some of it.
if (n < list[0].length) {
// just take a part of the first list item.
// slice is the same for buffers and strings.
var buf = list[0];
ret = buf.slice(0, n);
list[0] = buf.slice(n);
} else if (n === list[0].length) {
// first list is a perfect match
ret = list.shift();
} else {
// complex case.
// we have enough to cover it, but it spans past the first buffer.
if (stringMode)
ret = '';
else
ret = new Buffer(n);
var c = 0;
for (var i = 0, l = list.length; i < l && c < n; i++) {
var buf = list[0];
var cpy = Math.min(n - c, buf.length);
if (stringMode)
ret += buf.slice(0, cpy);
else
buf.copy(ret, c, 0, cpy);
if (cpy < buf.length)
list[0] = buf.slice(cpy);
else
list.shift();
c += cpy;
}
}
}
return ret;
}
function endReadable(stream) {
var state = stream._readableState;
// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
if (state.length > 0)
throw new Error('endReadable called on non-empty stream');
if (!state.endEmitted) {
state.ended = true;
process.nextTick(function() {
// Check that we didn't get one last unshift.
if (!state.endEmitted && state.length === 0) {
state.endEmitted = true;
stream.readable = false;
stream.emit('end');
}
});
}
}
function forEach (xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
function indexOf (xs, x) {
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
}
return -1;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(159)))
/***/ },
/* 252 */
/***/ function(module, exports) {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
/***/ },
/* 253 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(arg) {
if (Array.isArray) {
return Array.isArray(arg);
}
return objectToString(arg) === '[object Array]';
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = Buffer.isBuffer;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(242).Buffer))
/***/ },
/* 254 */
/***/ function(module, exports) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
/***/ },
/* 255 */
/***/ function(module, exports) {
/* (ignored) */
/***/ },
/* 256 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
module.exports = Duplex;
/**/
var objectKeys = Object.keys || function (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
/* */
/**/
var util = __webpack_require__(253);
util.inherits = __webpack_require__(254);
/* */
var Readable = __webpack_require__(251);
var Writable = __webpack_require__(257);
util.inherits(Duplex, Readable);
forEach(objectKeys(Writable.prototype), function(method) {
if (!Duplex.prototype[method])
Duplex.prototype[method] = Writable.prototype[method];
});
function Duplex(options) {
if (!(this instanceof Duplex))
return new Duplex(options);
Readable.call(this, options);
Writable.call(this, options);
if (options && options.readable === false)
this.readable = false;
if (options && options.writable === false)
this.writable = false;
this.allowHalfOpen = true;
if (options && options.allowHalfOpen === false)
this.allowHalfOpen = false;
this.once('end', onend);
}
// the no-half-open enforcer
function onend() {
// if we allow half-open state, or if the writable side ended,
// then we're ok.
if (this.allowHalfOpen || this._writableState.ended)
return;
// no more data can be written.
// But allow more writes to happen in this tick.
process.nextTick(this.end.bind(this));
}
function forEach (xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(159)))
/***/ },
/* 257 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// A bit simpler than readable streams.
// Implement an async ._write(chunk, cb), and it'll handle all
// the drain event emission and buffering.
module.exports = Writable;
/**/
var Buffer = __webpack_require__(242).Buffer;
/* */
Writable.WritableState = WritableState;
/**/
var util = __webpack_require__(253);
util.inherits = __webpack_require__(254);
/* */
var Stream = __webpack_require__(247);
util.inherits(Writable, Stream);
function WriteReq(chunk, encoding, cb) {
this.chunk = chunk;
this.encoding = encoding;
this.callback = cb;
}
function WritableState(options, stream) {
var Duplex = __webpack_require__(256);
options = options || {};
// the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
var hwm = options.highWaterMark;
var defaultHwm = options.objectMode ? 16 : 16 * 1024;
this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex)
this.objectMode = this.objectMode || !!options.writableObjectMode;
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
this.needDrain = false;
// at the start of calling end()
this.ending = false;
// when end() has been called, and returned
this.ended = false;
// when 'finish' is emitted
this.finished = false;
// should we decode strings into buffers before passing to _write?
// this is here so that some node-core streams can optimize string
// handling at a lower level.
var noDecode = options.decodeStrings === false;
this.decodeStrings = !noDecode;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
this.length = 0;
// a flag to see when we're in the middle of a write.
this.writing = false;
// when true all writes will be buffered until .uncork() call
this.corked = 0;
// a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// a flag to know if we're processing previously buffered items, which
// may call the _write() callback in the same tick, so that we don't
// end up in an overlapped onwrite situation.
this.bufferProcessing = false;
// the callback that's passed to _write(chunk,cb)
this.onwrite = function(er) {
onwrite(stream, er);
};
// the callback that the user supplies to write(chunk,encoding,cb)
this.writecb = null;
// the amount that is being written when _write is called.
this.writelen = 0;
this.buffer = [];
// number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
this.pendingcb = 0;
// emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
this.prefinished = false;
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false;
}
function Writable(options) {
var Duplex = __webpack_require__(256);
// Writable ctor is applied to Duplexes, though they're not
// instanceof Writable, they're instanceof Readable.
if (!(this instanceof Writable) && !(this instanceof Duplex))
return new Writable(options);
this._writableState = new WritableState(options, this);
// legacy.
this.writable = true;
Stream.call(this);
}
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
this.emit('error', new Error('Cannot pipe. Not readable.'));
};
function writeAfterEnd(stream, state, cb) {
var er = new Error('write after end');
// TODO: defer error events consistently everywhere, not just the cb
stream.emit('error', er);
process.nextTick(function() {
cb(er);
});
}
// If we get something that is not a buffer, string, null, or undefined,
// and we're not in objectMode, then that's an error.
// Otherwise stream chunks are all considered to be of length=1, and the
// watermarks determine how many objects to keep in the buffer, rather than
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
var valid = true;
if (!util.isBuffer(chunk) &&
!util.isString(chunk) &&
!util.isNullOrUndefined(chunk) &&
!state.objectMode) {
var er = new TypeError('Invalid non-string/buffer chunk');
stream.emit('error', er);
process.nextTick(function() {
cb(er);
});
valid = false;
}
return valid;
}
Writable.prototype.write = function(chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
if (util.isBuffer(chunk))
encoding = 'buffer';
else if (!encoding)
encoding = state.defaultEncoding;
if (!util.isFunction(cb))
cb = function() {};
if (state.ended)
writeAfterEnd(this, state, cb);
else if (validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, chunk, encoding, cb);
}
return ret;
};
Writable.prototype.cork = function() {
var state = this._writableState;
state.corked++;
};
Writable.prototype.uncork = function() {
var state = this._writableState;
if (state.corked) {
state.corked--;
if (!state.writing &&
!state.corked &&
!state.finished &&
!state.bufferProcessing &&
state.buffer.length)
clearBuffer(this, state);
}
};
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode &&
state.decodeStrings !== false &&
util.isString(chunk)) {
chunk = new Buffer(chunk, encoding);
}
return chunk;
}
// if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
chunk = decodeChunk(state, chunk, encoding);
if (util.isBuffer(chunk))
encoding = 'buffer';
var len = state.objectMode ? 1 : chunk.length;
state.length += len;
var ret = state.length < state.highWaterMark;
// we must ensure that previous needDrain will not be reset to false.
if (!ret)
state.needDrain = true;
if (state.writing || state.corked)
state.buffer.push(new WriteReq(chunk, encoding, cb));
else
doWrite(stream, state, false, len, chunk, encoding, cb);
return ret;
}
function doWrite(stream, state, writev, len, chunk, encoding, cb) {
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
if (writev)
stream._writev(chunk, state.onwrite);
else
stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}
function onwriteError(stream, state, sync, er, cb) {
if (sync)
process.nextTick(function() {
state.pendingcb--;
cb(er);
});
else {
state.pendingcb--;
cb(er);
}
stream._writableState.errorEmitted = true;
stream.emit('error', er);
}
function onwriteStateUpdate(state) {
state.writing = false;
state.writecb = null;
state.length -= state.writelen;
state.writelen = 0;
}
function onwrite(stream, er) {
var state = stream._writableState;
var sync = state.sync;
var cb = state.writecb;
onwriteStateUpdate(state);
if (er)
onwriteError(stream, state, sync, er, cb);
else {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(stream, state);
if (!finished &&
!state.corked &&
!state.bufferProcessing &&
state.buffer.length) {
clearBuffer(stream, state);
}
if (sync) {
process.nextTick(function() {
afterWrite(stream, state, finished, cb);
});
} else {
afterWrite(stream, state, finished, cb);
}
}
}
function afterWrite(stream, state, finished, cb) {
if (!finished)
onwriteDrain(stream, state);
state.pendingcb--;
cb();
finishMaybe(stream, state);
}
// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
if (state.length === 0 && state.needDrain) {
state.needDrain = false;
stream.emit('drain');
}
}
// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
state.bufferProcessing = true;
if (stream._writev && state.buffer.length > 1) {
// Fast case, write everything using _writev()
var cbs = [];
for (var c = 0; c < state.buffer.length; c++)
cbs.push(state.buffer[c].callback);
// count the one we are adding, as well.
// TODO(isaacs) clean this up
state.pendingcb++;
doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
for (var i = 0; i < cbs.length; i++) {
state.pendingcb--;
cbs[i](err);
}
});
// Clear buffer
state.buffer = [];
} else {
// Slow case, write chunks one-by-one
for (var c = 0; c < state.buffer.length; c++) {
var entry = state.buffer[c];
var chunk = entry.chunk;
var encoding = entry.encoding;
var cb = entry.callback;
var len = state.objectMode ? 1 : chunk.length;
doWrite(stream, state, false, len, chunk, encoding, cb);
// if we didn't call the onwrite immediately, then
// it means that we need to wait until it does.
// also, that means that the chunk and cb are currently
// being processed, so move the buffer counter past them.
if (state.writing) {
c++;
break;
}
}
if (c < state.buffer.length)
state.buffer = state.buffer.slice(c);
else
state.buffer.length = 0;
}
state.bufferProcessing = false;
}
Writable.prototype._write = function(chunk, encoding, cb) {
cb(new Error('not implemented'));
};
Writable.prototype._writev = null;
Writable.prototype.end = function(chunk, encoding, cb) {
var state = this._writableState;
if (util.isFunction(chunk)) {
cb = chunk;
chunk = null;
encoding = null;
} else if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
if (!util.isNullOrUndefined(chunk))
this.write(chunk, encoding);
// .end() fully uncorks
if (state.corked) {
state.corked = 1;
this.uncork();
}
// ignore unnecessary end() calls.
if (!state.ending && !state.finished)
endWritable(this, state, cb);
};
function needFinish(stream, state) {
return (state.ending &&
state.length === 0 &&
!state.finished &&
!state.writing);
}
function prefinish(stream, state) {
if (!state.prefinished) {
state.prefinished = true;
stream.emit('prefinish');
}
}
function finishMaybe(stream, state) {
var need = needFinish(stream, state);
if (need) {
if (state.pendingcb === 0) {
prefinish(stream, state);
state.finished = true;
stream.emit('finish');
} else
prefinish(stream, state);
}
return need;
}
function endWritable(stream, state, cb) {
state.ending = true;
finishMaybe(stream, state);
if (cb) {
if (state.finished)
process.nextTick(cb);
else
stream.once('finish', cb);
}
state.ended = true;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(159)))
/***/ },
/* 258 */
/***/ function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var Buffer = __webpack_require__(242).Buffer;
var isBufferEncoding = Buffer.isEncoding
|| function(encoding) {
switch (encoding && encoding.toLowerCase()) {
case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
default: return false;
}
}
function assertEncoding(encoding) {
if (encoding && !isBufferEncoding(encoding)) {
throw new Error('Unknown encoding: ' + encoding);
}
}
// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters. CESU-8 is handled as part of the UTF-8 encoding.
//
// @TODO Handling all encodings inside a single object makes it very difficult
// to reason about this code, so it should be split up in the future.
// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
// points as used by CESU-8.
var StringDecoder = exports.StringDecoder = function(encoding) {
this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
assertEncoding(encoding);
switch (this.encoding) {
case 'utf8':
// CESU-8 represents each of Surrogate Pair by 3-bytes
this.surrogateSize = 3;
break;
case 'ucs2':
case 'utf16le':
// UTF-16 represents each of Surrogate Pair by 2-bytes
this.surrogateSize = 2;
this.detectIncompleteChar = utf16DetectIncompleteChar;
break;
case 'base64':
// Base-64 stores 3 bytes in 4 chars, and pads the remainder.
this.surrogateSize = 3;
this.detectIncompleteChar = base64DetectIncompleteChar;
break;
default:
this.write = passThroughWrite;
return;
}
// Enough space to store all bytes of a single character. UTF-8 needs 4
// bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
this.charBuffer = new Buffer(6);
// Number of bytes received for the current incomplete multi-byte character.
this.charReceived = 0;
// Number of bytes expected for the current incomplete multi-byte character.
this.charLength = 0;
};
// write decodes the given buffer and returns it as JS string that is
// guaranteed to not contain any partial multi-byte characters. Any partial
// character found at the end of the buffer is buffered up, and will be
// returned when calling write again with the remaining bytes.
//
// Note: Converting a Buffer containing an orphan surrogate to a String
// currently works, but converting a String to a Buffer (via `new Buffer`, or
// Buffer#write) will replace incomplete surrogates with the unicode
// replacement character. See https://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
var charStr = '';
// if our last write ended with an incomplete multibyte character
while (this.charLength) {
// determine how many remaining bytes this buffer has to offer for this char
var available = (buffer.length >= this.charLength - this.charReceived) ?
this.charLength - this.charReceived :
buffer.length;
// add the new bytes to the char buffer
buffer.copy(this.charBuffer, this.charReceived, 0, available);
this.charReceived += available;
if (this.charReceived < this.charLength) {
// still not enough chars in this buffer? wait for more ...
return '';
}
// remove bytes belonging to the current character from the buffer
buffer = buffer.slice(available, buffer.length);
// get the character that was split
charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
// CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
var charCode = charStr.charCodeAt(charStr.length - 1);
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
this.charLength += this.surrogateSize;
charStr = '';
continue;
}
this.charReceived = this.charLength = 0;
// if there are no more bytes in this buffer, just emit our char
if (buffer.length === 0) {
return charStr;
}
break;
}
// determine and set charLength / charReceived
this.detectIncompleteChar(buffer);
var end = buffer.length;
if (this.charLength) {
// buffer the incomplete character bytes we got
buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
end -= this.charReceived;
}
charStr += buffer.toString(this.encoding, 0, end);
var end = charStr.length - 1;
var charCode = charStr.charCodeAt(end);
// CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
var size = this.surrogateSize;
this.charLength += size;
this.charReceived += size;
this.charBuffer.copy(this.charBuffer, size, 0, size);
buffer.copy(this.charBuffer, 0, 0, size);
return charStr.substring(0, end);
}
// or just emit the charStr
return charStr;
};
// detectIncompleteChar determines if there is an incomplete UTF-8 character at
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
// that are available for this character.
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
// determine how many bytes we have to check at the end of this buffer
var i = (buffer.length >= 3) ? 3 : buffer.length;
// Figure out if one of the last i bytes of our buffer announces an
// incomplete char.
for (; i > 0; i--) {
var c = buffer[buffer.length - i];
// See http://en.wikipedia.org/wiki/UTF-8#Description
// 110XXXXX
if (i == 1 && c >> 5 == 0x06) {
this.charLength = 2;
break;
}
// 1110XXXX
if (i <= 2 && c >> 4 == 0x0E) {
this.charLength = 3;
break;
}
// 11110XXX
if (i <= 3 && c >> 3 == 0x1E) {
this.charLength = 4;
break;
}
}
this.charReceived = i;
};
StringDecoder.prototype.end = function(buffer) {
var res = '';
if (buffer && buffer.length)
res = this.write(buffer);
if (this.charReceived) {
var cr = this.charReceived;
var buf = this.charBuffer;
var enc = this.encoding;
res += buf.slice(0, cr).toString(enc);
}
return res;
};
function passThroughWrite(buffer) {
return buffer.toString(this.encoding);
}
function utf16DetectIncompleteChar(buffer) {
this.charReceived = buffer.length % 2;
this.charLength = this.charReceived ? 2 : 0;
}
function base64DetectIncompleteChar(buffer) {
this.charReceived = buffer.length % 3;
this.charLength = this.charReceived ? 3 : 0;
}
/***/ },
/* 259 */
/***/ function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored. (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation. For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes. When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up. When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer. When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks. If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk. However,
// a pathological inflate type of transform can cause excessive buffering
// here. For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output. In this case, you could write a very small
// amount of input, and end up with a very large amount of output. In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform. A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.
module.exports = Transform;
var Duplex = __webpack_require__(256);
/**/
var util = __webpack_require__(253);
util.inherits = __webpack_require__(254);
/* */
util.inherits(Transform, Duplex);
function TransformState(options, stream) {
this.afterTransform = function(er, data) {
return afterTransform(stream, er, data);
};
this.needTransform = false;
this.transforming = false;
this.writecb = null;
this.writechunk = null;
}
function afterTransform(stream, er, data) {
var ts = stream._transformState;
ts.transforming = false;
var cb = ts.writecb;
if (!cb)
return stream.emit('error', new Error('no writecb in Transform class'));
ts.writechunk = null;
ts.writecb = null;
if (!util.isNullOrUndefined(data))
stream.push(data);
if (cb)
cb(er);
var rs = stream._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
stream._read(rs.highWaterMark);
}
}
function Transform(options) {
if (!(this instanceof Transform))
return new Transform(options);
Duplex.call(this, options);
this._transformState = new TransformState(options, this);
// when the writable side finishes, then flush out anything remaining.
var stream = this;
// start out asking for a readable event once data is transformed.
this._readableState.needReadable = true;
// we have implemented the _read method, and done the other things
// that Readable wants before the first _read call, so unset the
// sync guard flag.
this._readableState.sync = false;
this.once('prefinish', function() {
if (util.isFunction(this._flush))
this._flush(function(er) {
done(stream, er);
});
else
done(stream);
});
}
Transform.prototype.push = function(chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
};
// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side. You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function(chunk, encoding, cb) {
throw new Error('not implemented');
};
Transform.prototype._write = function(chunk, encoding, cb) {
var ts = this._transformState;
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
if (!ts.transforming) {
var rs = this._readableState;
if (ts.needTransform ||
rs.needReadable ||
rs.length < rs.highWaterMark)
this._read(rs.highWaterMark);
}
};
// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
var ts = this._transformState;
if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
// mark that we need a transform, so that any data that comes in
// will get processed, now that we've asked for it.
ts.needTransform = true;
}
};
function done(stream, er) {
if (er)
return stream.emit('error', er);
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
var ws = stream._writableState;
var ts = stream._transformState;
if (ws.length)
throw new Error('calling transform done when ws.length != 0');
if (ts.transforming)
throw new Error('calling transform done when still transforming');
return stream.push(null);
}
/***/ },
/* 260 */
/***/ function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
module.exports = PassThrough;
var Transform = __webpack_require__(259);
/**/
var util = __webpack_require__(253);
util.inherits = __webpack_require__(254);
/* */
util.inherits(PassThrough, Transform);
function PassThrough(options) {
if (!(this instanceof PassThrough))
return new PassThrough(options);
Transform.call(this, options);
}
PassThrough.prototype._transform = function(chunk, encoding, cb) {
cb(null, chunk);
};
/***/ },
/* 261 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(257)
/***/ },
/* 262 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(256)
/***/ },
/* 263 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(259)
/***/ },
/* 264 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(260)
/***/ },
/* 265 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var utils = __webpack_require__(240);
var support = __webpack_require__(241);
// private property
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
// public method for encoding
exports.encode = function(input) {
var output = [];
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0, len = input.length, remainingBytes = len;
var isArray = utils.getTypeOf(input) !== "string";
while (i < input.length) {
remainingBytes = len - i;
if (!isArray) {
chr1 = input.charCodeAt(i++);
chr2 = i < len ? input.charCodeAt(i++) : 0;
chr3 = i < len ? input.charCodeAt(i++) : 0;
} else {
chr1 = input[i++];
chr2 = i < len ? input[i++] : 0;
chr3 = i < len ? input[i++] : 0;
}
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;
enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;
output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));
}
return output.join("");
};
// public method for decoding
exports.decode = function(input) {
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0, resultIndex = 0;
var dataUrlPrefix = "data:";
if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {
// This is a common error: people give a data url
// (data:image/png;base64,iVBOR...) with a {base64: true} and
// wonders why things don't work.
// We can detect that the string input looks like a data url but we
// *can't* be sure it is one: removing everything up to the comma would
// be too dangerous.
throw new Error("Invalid base64 input, it looks like a data url.");
}
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
var totalLength = input.length * 3 / 4;
if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {
totalLength--;
}
if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {
totalLength--;
}
if (totalLength % 1 !== 0) {
// totalLength is not an integer, the length does not match a valid
// base64 content. That can happen if:
// - the input is not a base64 content
// - the input is *almost* a base64 content, with a extra chars at the
// beginning or at the end
// - the input uses a base64 variant (base64url for example)
throw new Error("Invalid base64 input, bad content length.");
}
var output;
if (support.uint8array) {
output = new Uint8Array(totalLength|0);
} else {
output = new Array(totalLength|0);
}
while (i < input.length) {
enc1 = _keyStr.indexOf(input.charAt(i++));
enc2 = _keyStr.indexOf(input.charAt(i++));
enc3 = _keyStr.indexOf(input.charAt(i++));
enc4 = _keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output[resultIndex++] = chr1;
if (enc3 !== 64) {
output[resultIndex++] = chr2;
}
if (enc4 !== 64) {
output[resultIndex++] = chr3;
}
}
return output;
};
/***/ },
/* 266 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';
module.exports = {
/**
* True if this is running in Nodejs, will be undefined in a browser.
* In a browser, browserify won't include this file and the whole module
* will be resolved an empty object.
*/
isNode : typeof Buffer !== "undefined",
/**
* Create a new nodejs Buffer.
* @param {Object} data the data to pass to the constructor.
* @param {String} encoding the encoding to use.
* @return {Buffer} a new Buffer.
*/
newBuffer : function(data, encoding){
return new Buffer(data, encoding);
},
/**
* Find out if an object is a Buffer.
* @param {Object} b the object to test.
* @return {Boolean} true if the object is a Buffer, false otherwise.
*/
isBuffer : function(b){
return Buffer.isBuffer(b);
},
isStream : function (obj) {
return obj &&
typeof obj.on === "function" &&
typeof obj.pause === "function" &&
typeof obj.resume === "function";
}
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(242).Buffer))
/***/ },
/* 267 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(268);
module.exports = __webpack_require__(271).setImmediate;
/***/ },
/* 268 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(269)
, $task = __webpack_require__(284);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ },
/* 269 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(270)
, core = __webpack_require__(271)
, ctx = __webpack_require__(272)
, hide = __webpack_require__(274)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
var IS_FORCED = type & $export.F
, IS_GLOBAL = type & $export.G
, IS_STATIC = type & $export.S
, IS_PROTO = type & $export.P
, IS_BIND = type & $export.B
, IS_WRAP = type & $export.W
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
, expProto = exports[PROTOTYPE]
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
, key, own, out;
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if(own && key in exports)continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function(C){
var F = function(a, b, c){
if(this instanceof C){
switch(arguments.length){
case 0: return new C;
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if(IS_PROTO){
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ },
/* 270 */
/***/ function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
/***/ },
/* 271 */
/***/ function(module, exports) {
var core = module.exports = {version: '2.3.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
/* 272 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(273);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};
}
return function(/* ...args */){
return fn.apply(that, arguments);
};
};
/***/ },
/* 273 */
/***/ function(module, exports) {
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
/***/ },
/* 274 */
/***/ function(module, exports, __webpack_require__) {
var dP = __webpack_require__(275)
, createDesc = __webpack_require__(283);
module.exports = __webpack_require__(279) ? function(object, key, value){
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ },
/* 275 */
/***/ function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(276)
, IE8_DOM_DEFINE = __webpack_require__(278)
, toPrimitive = __webpack_require__(282)
, dP = Object.defineProperty;
exports.f = __webpack_require__(279) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)O[P] = Attributes.value;
return O;
};
/***/ },
/* 276 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(277);
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
/***/ },
/* 277 */
/***/ function(module, exports) {
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ },
/* 278 */
/***/ function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(279) && !__webpack_require__(280)(function(){
return Object.defineProperty(__webpack_require__(281)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
/* 279 */
/***/ function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(280)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
/* 280 */
/***/ function(module, exports) {
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};
/***/ },
/* 281 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(277)
, document = __webpack_require__(270).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
};
/***/ },
/* 282 */
/***/ function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(277);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ },
/* 283 */
/***/ function(module, exports) {
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};
/***/ },
/* 284 */
/***/ function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(272)
, invoke = __webpack_require__(285)
, html = __webpack_require__(286)
, cel = __webpack_require__(281)
, global = __webpack_require__(270)
, process = global.process
, setTask = global.setImmediate
, clearTask = global.clearImmediate
, MessageChannel = global.MessageChannel
, counter = 0
, queue = {}
, ONREADYSTATECHANGE = 'onreadystatechange'
, defer, channel, port;
var run = function(){
var id = +this;
if(queue.hasOwnProperty(id)){
var fn = queue[id];
delete queue[id];
fn();
}
};
var listener = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if(!setTask || !clearTask){
setTask = function setImmediate(fn){
var args = [], i = 1;
while(arguments.length > i)args.push(arguments[i++]);
queue[++counter] = function(){
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
clearTask = function clearImmediate(id){
delete queue[id];
};
// Node.js 0.8-
if(__webpack_require__(287)(process) == 'process'){
defer = function(id){
process.nextTick(ctx(run, id, 1));
};
// Browsers with MessageChannel, includes WebWorkers
} else if(MessageChannel){
channel = new MessageChannel;
port = channel.port2;
channel.port1.onmessage = listener;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
defer = function(id){
global.postMessage(id + '', '*');
};
global.addEventListener('message', listener, false);
// IE8-
} else if(ONREADYSTATECHANGE in cel('script')){
defer = function(id){
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
defer = function(id){
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
set: setTask,
clear: clearTask
};
/***/ },
/* 285 */
/***/ function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function(fn, args, that){
var un = that === undefined;
switch(args.length){
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
: fn.call(that, args[0]);
case 2: return un ? fn(args[0], args[1])
: fn.call(that, args[0], args[1]);
case 3: return un ? fn(args[0], args[1], args[2])
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
/***/ },
/* 286 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(270).document && document.documentElement;
/***/ },
/* 287 */
/***/ function(module, exports) {
var toString = {}.toString;
module.exports = function(it){
return toString.call(it).slice(8, -1);
};
/***/ },
/* 288 */
/***/ function(module, exports, __webpack_require__) {
/* global Promise */
'use strict';
// load the global object first:
// - it should be better integrated in the system (unhandledRejection in node)
// - the environment may have a custom Promise implementation (see zone.js)
var ES6Promise = null;
if (typeof Promise !== "undefined") {
ES6Promise = Promise;
} else {
ES6Promise = __webpack_require__(289);
}
var delay = __webpack_require__(240).delay;
/**
* Let the user use/change some implementations.
*/
module.exports = {
Promise: ES6Promise,
delay: delay
};
/***/ },
/* 289 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var immediate = __webpack_require__(290);
/* istanbul ignore next */
function INTERNAL() {}
var handlers = {};
var REJECTED = ['REJECTED'];
var FULFILLED = ['FULFILLED'];
var PENDING = ['PENDING'];
module.exports = Promise;
function Promise(resolver) {
if (typeof resolver !== 'function') {
throw new TypeError('resolver must be a function');
}
this.state = PENDING;
this.queue = [];
this.outcome = void 0;
if (resolver !== INTERNAL) {
safelyResolveThenable(this, resolver);
}
}
Promise.prototype["catch"] = function (onRejected) {
return this.then(null, onRejected);
};
Promise.prototype.then = function (onFulfilled, onRejected) {
if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||
typeof onRejected !== 'function' && this.state === REJECTED) {
return this;
}
var promise = new this.constructor(INTERNAL);
if (this.state !== PENDING) {
var resolver = this.state === FULFILLED ? onFulfilled : onRejected;
unwrap(promise, resolver, this.outcome);
} else {
this.queue.push(new QueueItem(promise, onFulfilled, onRejected));
}
return promise;
};
function QueueItem(promise, onFulfilled, onRejected) {
this.promise = promise;
if (typeof onFulfilled === 'function') {
this.onFulfilled = onFulfilled;
this.callFulfilled = this.otherCallFulfilled;
}
if (typeof onRejected === 'function') {
this.onRejected = onRejected;
this.callRejected = this.otherCallRejected;
}
}
QueueItem.prototype.callFulfilled = function (value) {
handlers.resolve(this.promise, value);
};
QueueItem.prototype.otherCallFulfilled = function (value) {
unwrap(this.promise, this.onFulfilled, value);
};
QueueItem.prototype.callRejected = function (value) {
handlers.reject(this.promise, value);
};
QueueItem.prototype.otherCallRejected = function (value) {
unwrap(this.promise, this.onRejected, value);
};
function unwrap(promise, func, value) {
immediate(function () {
var returnValue;
try {
returnValue = func(value);
} catch (e) {
return handlers.reject(promise, e);
}
if (returnValue === promise) {
handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));
} else {
handlers.resolve(promise, returnValue);
}
});
}
handlers.resolve = function (self, value) {
var result = tryCatch(getThen, value);
if (result.status === 'error') {
return handlers.reject(self, result.value);
}
var thenable = result.value;
if (thenable) {
safelyResolveThenable(self, thenable);
} else {
self.state = FULFILLED;
self.outcome = value;
var i = -1;
var len = self.queue.length;
while (++i < len) {
self.queue[i].callFulfilled(value);
}
}
return self;
};
handlers.reject = function (self, error) {
self.state = REJECTED;
self.outcome = error;
var i = -1;
var len = self.queue.length;
while (++i < len) {
self.queue[i].callRejected(error);
}
return self;
};
function getThen(obj) {
// Make sure we only access the accessor once as required by the spec
var then = obj && obj.then;
if (obj && typeof obj === 'object' && typeof then === 'function') {
return function appyThen() {
then.apply(obj, arguments);
};
}
}
function safelyResolveThenable(self, thenable) {
// Either fulfill, reject or reject with error
var called = false;
function onError(value) {
if (called) {
return;
}
called = true;
handlers.reject(self, value);
}
function onSuccess(value) {
if (called) {
return;
}
called = true;
handlers.resolve(self, value);
}
function tryToUnwrap() {
thenable(onSuccess, onError);
}
var result = tryCatch(tryToUnwrap);
if (result.status === 'error') {
onError(result.value);
}
}
function tryCatch(func, value) {
var out = {};
try {
out.value = func(value);
out.status = 'success';
} catch (e) {
out.status = 'error';
out.value = e;
}
return out;
}
Promise.resolve = resolve;
function resolve(value) {
if (value instanceof this) {
return value;
}
return handlers.resolve(new this(INTERNAL), value);
}
Promise.reject = reject;
function reject(reason) {
var promise = new this(INTERNAL);
return handlers.reject(promise, reason);
}
Promise.all = all;
function all(iterable) {
var self = this;
if (Object.prototype.toString.call(iterable) !== '[object Array]') {
return this.reject(new TypeError('must be an array'));
}
var len = iterable.length;
var called = false;
if (!len) {
return this.resolve([]);
}
var values = new Array(len);
var resolved = 0;
var i = -1;
var promise = new this(INTERNAL);
while (++i < len) {
allResolver(iterable[i], i);
}
return promise;
function allResolver(value, i) {
self.resolve(value).then(resolveFromAll, function (error) {
if (!called) {
called = true;
handlers.reject(promise, error);
}
});
function resolveFromAll(outValue) {
values[i] = outValue;
if (++resolved === len && !called) {
called = true;
handlers.resolve(promise, values);
}
}
}
}
Promise.race = race;
function race(iterable) {
var self = this;
if (Object.prototype.toString.call(iterable) !== '[object Array]') {
return this.reject(new TypeError('must be an array'));
}
var len = iterable.length;
var called = false;
if (!len) {
return this.resolve([]);
}
var i = -1;
var promise = new this(INTERNAL);
while (++i < len) {
resolver(iterable[i]);
}
return promise;
function resolver(value) {
self.resolve(value).then(function (response) {
if (!called) {
called = true;
handlers.resolve(promise, response);
}
}, function (error) {
if (!called) {
called = true;
handlers.reject(promise, error);
}
});
}
}
/***/ },
/* 290 */
/***/ function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
var Mutation = global.MutationObserver || global.WebKitMutationObserver;
var scheduleDrain;
{
if (Mutation) {
var called = 0;
var observer = new Mutation(nextTick);
var element = global.document.createTextNode('');
observer.observe(element, {
characterData: true
});
scheduleDrain = function () {
element.data = (called = ++called % 2);
};
} else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {
var channel = new global.MessageChannel();
channel.port1.onmessage = nextTick;
scheduleDrain = function () {
channel.port2.postMessage(0);
};
} else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {
scheduleDrain = function () {
// Create a