@iotize/tap-scripts
Version:
IoTize Tap scripts
1,224 lines • 244 kB
JavaScript
"use strict";
// @ts-nocheck
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RestOfLineContext = exports.StringContext = exports.NumberContext = exports.HexIntegerContext = exports.EndErrorContext = exports.EndContext = exports.ObjectParameterContext = exports.SizeOfContext = exports.HexArrayContext = exports.Lwm2mParameterContext = exports.Lwm2mPathContext = exports.Lwm2mMethodContext = exports.ResponseLengthContext = exports.FWMaxCheckInstructionContext = exports.FWMinCheckInstructionContext = exports.Lwm2mInstructionContext = exports.WaitInstructionContext = exports.ConnectionInstructionsContext = exports.OutputInstructionContext = exports.LogoutInstructionContext = exports.LoginInstructionContext = exports.DisplayInstructionsContext = exports.Comp_opContext = exports.NumberArrayContext = exports.ComparisonRightOperandContext = exports.ComparisonContext = exports.CheckInstructionContext = exports.GotoTypeContext = exports.GotoInstructionContext = exports.CcomInstructionContext = exports.InstructionContext = exports.InstructionLineContext = exports.LabelNameContext = exports.LabelLineContext = exports.LineContext = exports.ProgContext = exports.IoTizeTestParser = void 0;
const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer");
const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException");
const NoViableAltException_1 = require("antlr4ts/NoViableAltException");
const Parser_1 = require("antlr4ts/Parser");
const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext");
const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator");
const RecognitionException_1 = require("antlr4ts/RecognitionException");
const Token_1 = require("antlr4ts/Token");
const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
const Utils = __importStar(require("antlr4ts/misc/Utils"));
class IoTizeTestParser extends Parser_1.Parser {
constructor(input) {
super(input);
this._interp = new ParserATNSimulator_1.ParserATNSimulator(IoTizeTestParser._ATN, this);
}
// @Override
// @NotNull
get vocabulary() {
return IoTizeTestParser.VOCABULARY;
}
// tslint:enable:no-trailing-whitespace
// @Override
get grammarFileName() { return "IoTizeTest.g4"; }
// @Override
get ruleNames() { return IoTizeTestParser.ruleNames; }
// @Override
get serializedATN() { return IoTizeTestParser._serializedATN; }
createFailedPredicateException(predicate, message) {
return new FailedPredicateException_1.FailedPredicateException(this, predicate, message);
}
// @RuleVersion(0)
prog() {
let _localctx = new ProgContext(this._ctx, this.state);
this.enterRule(_localctx, 0, IoTizeTestParser.RULE_prog);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 77;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << IoTizeTestParser.COLON) | (1 << IoTizeTestParser.END_ERROR) | (1 << IoTizeTestParser.END) | (1 << IoTizeTestParser.CHECK) | (1 << IoTizeTestParser.LOGIN) | (1 << IoTizeTestParser.LOGOUT) | (1 << IoTizeTestParser.OUTPUT) | (1 << IoTizeTestParser.DISCONNECT) | (1 << IoTizeTestParser.DISPLAY_VERBOSE) | (1 << IoTizeTestParser.DISPLAY_ERROR) | (1 << IoTizeTestParser.DISPLAY_INFO) | (1 << IoTizeTestParser.DISPLAY))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (IoTizeTestParser.CONNECT - 32)) | (1 << (IoTizeTestParser.CONNECT_RETRY - 32)) | (1 << (IoTizeTestParser.WAIT_INSTRUCTION - 32)) | (1 << (IoTizeTestParser.GET - 32)) | (1 << (IoTizeTestParser.PUT - 32)) | (1 << (IoTizeTestParser.POST - 32)) | (1 << (IoTizeTestParser.GETP - 32)) | (1 << (IoTizeTestParser.GOTO_NOK - 32)) | (1 << (IoTizeTestParser.GOTO_OK - 32)) | (1 << (IoTizeTestParser.GOTOPREFIX - 32)) | (1 << (IoTizeTestParser.CCOM_RAND_START - 32)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_ON - 32)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_OFF - 32)) | (1 << (IoTizeTestParser.CCOM_ENABLE - 32)) | (1 << (IoTizeTestParser.CCOM_DISABLE - 32)) | (1 << (IoTizeTestParser.LABEL_NAME - 32)))) !== 0)) {
{
{
this.state = 72;
this.line();
this.state = 73;
_la = this._input.LA(1);
if (!(_la === IoTizeTestParser.EOF || _la === IoTizeTestParser.EOL)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
this.state = 79;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
line() {
let _localctx = new LineContext(this._ctx, this.state);
this.enterRule(_localctx, 2, IoTizeTestParser.RULE_line);
try {
this.state = 82;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case IoTizeTestParser.COLON:
this.enterOuterAlt(_localctx, 1);
{
this.state = 80;
this.instructionLine();
}
break;
case IoTizeTestParser.END_ERROR:
case IoTizeTestParser.END:
case IoTizeTestParser.CHECK:
case IoTizeTestParser.LOGIN:
case IoTizeTestParser.LOGOUT:
case IoTizeTestParser.OUTPUT:
case IoTizeTestParser.DISCONNECT:
case IoTizeTestParser.DISPLAY_VERBOSE:
case IoTizeTestParser.DISPLAY_ERROR:
case IoTizeTestParser.DISPLAY_INFO:
case IoTizeTestParser.DISPLAY:
case IoTizeTestParser.CONNECT:
case IoTizeTestParser.CONNECT_RETRY:
case IoTizeTestParser.WAIT_INSTRUCTION:
case IoTizeTestParser.GET:
case IoTizeTestParser.PUT:
case IoTizeTestParser.POST:
case IoTizeTestParser.GETP:
case IoTizeTestParser.GOTO_NOK:
case IoTizeTestParser.GOTO_OK:
case IoTizeTestParser.GOTOPREFIX:
case IoTizeTestParser.CCOM_RAND_START:
case IoTizeTestParser.CCOM_AUTO_RAND_START_ON:
case IoTizeTestParser.CCOM_AUTO_RAND_START_OFF:
case IoTizeTestParser.CCOM_ENABLE:
case IoTizeTestParser.CCOM_DISABLE:
case IoTizeTestParser.LABEL_NAME:
this.enterOuterAlt(_localctx, 2);
{
this.state = 81;
this.labelLine();
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
labelLine() {
let _localctx = new LabelLineContext(this._ctx, this.state);
this.enterRule(_localctx, 4, IoTizeTestParser.RULE_labelLine);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 84;
this.labelName();
this.state = 85;
this.match(IoTizeTestParser.COLON);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
labelName() {
let _localctx = new LabelNameContext(this._ctx, this.state);
this.enterRule(_localctx, 6, IoTizeTestParser.RULE_labelName);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 87;
_la = this._input.LA(1);
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << IoTizeTestParser.END_ERROR) | (1 << IoTizeTestParser.END) | (1 << IoTizeTestParser.CHECK) | (1 << IoTizeTestParser.LOGIN) | (1 << IoTizeTestParser.LOGOUT) | (1 << IoTizeTestParser.OUTPUT) | (1 << IoTizeTestParser.DISCONNECT) | (1 << IoTizeTestParser.DISPLAY_VERBOSE) | (1 << IoTizeTestParser.DISPLAY_ERROR) | (1 << IoTizeTestParser.DISPLAY_INFO) | (1 << IoTizeTestParser.DISPLAY))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (IoTizeTestParser.CONNECT - 32)) | (1 << (IoTizeTestParser.CONNECT_RETRY - 32)) | (1 << (IoTizeTestParser.WAIT_INSTRUCTION - 32)) | (1 << (IoTizeTestParser.GET - 32)) | (1 << (IoTizeTestParser.PUT - 32)) | (1 << (IoTizeTestParser.POST - 32)) | (1 << (IoTizeTestParser.GETP - 32)) | (1 << (IoTizeTestParser.GOTO_NOK - 32)) | (1 << (IoTizeTestParser.GOTO_OK - 32)) | (1 << (IoTizeTestParser.GOTOPREFIX - 32)) | (1 << (IoTizeTestParser.CCOM_RAND_START - 32)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_ON - 32)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_OFF - 32)) | (1 << (IoTizeTestParser.CCOM_ENABLE - 32)) | (1 << (IoTizeTestParser.CCOM_DISABLE - 32)) | (1 << (IoTizeTestParser.LABEL_NAME - 32)))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
instructionLine() {
let _localctx = new InstructionLineContext(this._ctx, this.state);
this.enterRule(_localctx, 8, IoTizeTestParser.RULE_instructionLine);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 89;
this.match(IoTizeTestParser.COLON);
this.state = 91;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (((((_la - 17)) & ~0x1F) === 0 && ((1 << (_la - 17)) & ((1 << (IoTizeTestParser.END_ERROR - 17)) | (1 << (IoTizeTestParser.END - 17)) | (1 << (IoTizeTestParser.CHECK - 17)) | (1 << (IoTizeTestParser.LOGIN - 17)) | (1 << (IoTizeTestParser.LOGOUT - 17)) | (1 << (IoTizeTestParser.OUTPUT - 17)) | (1 << (IoTizeTestParser.DISCONNECT - 17)) | (1 << (IoTizeTestParser.DISPLAY_VERBOSE_INSTRUCTION - 17)) | (1 << (IoTizeTestParser.DISPLAY_ERROR_INSTRUCTION - 17)) | (1 << (IoTizeTestParser.DISPLAY_INFO_INSTRUCTION - 17)) | (1 << (IoTizeTestParser.DISPLAY_INSTRUCTION - 17)) | (1 << (IoTizeTestParser.CONNECT - 17)) | (1 << (IoTizeTestParser.CONNECT_RETRY - 17)) | (1 << (IoTizeTestParser.WAIT_INSTRUCTION - 17)) | (1 << (IoTizeTestParser.GET - 17)) | (1 << (IoTizeTestParser.PUT - 17)) | (1 << (IoTizeTestParser.POST - 17)) | (1 << (IoTizeTestParser.GETP - 17)) | (1 << (IoTizeTestParser.GOTOPREFIX - 17)) | (1 << (IoTizeTestParser.CCOM_RAND_START - 17)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_ON - 17)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_OFF - 17)) | (1 << (IoTizeTestParser.CCOM_ENABLE - 17)) | (1 << (IoTizeTestParser.CCOM_DISABLE - 17)) | (1 << (IoTizeTestParser.FW_MIN_CHECK - 17)) | (1 << (IoTizeTestParser.FW_MAX_CHECK - 17)))) !== 0)) {
{
this.state = 90;
this.instruction();
}
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
instruction() {
let _localctx = new InstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 10, IoTizeTestParser.RULE_instruction);
try {
this.state = 107;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case IoTizeTestParser.END:
this.enterOuterAlt(_localctx, 1);
{
this.state = 93;
this.end();
}
break;
case IoTizeTestParser.END_ERROR:
this.enterOuterAlt(_localctx, 2);
{
this.state = 94;
this.endError();
}
break;
case IoTizeTestParser.GOTOPREFIX:
this.enterOuterAlt(_localctx, 3);
{
this.state = 95;
this.gotoInstruction();
}
break;
case IoTizeTestParser.CHECK:
this.enterOuterAlt(_localctx, 4);
{
this.state = 96;
this.checkInstruction();
}
break;
case IoTizeTestParser.GET:
case IoTizeTestParser.PUT:
case IoTizeTestParser.POST:
case IoTizeTestParser.GETP:
this.enterOuterAlt(_localctx, 5);
{
this.state = 97;
this.lwm2mInstruction();
}
break;
case IoTizeTestParser.LOGIN:
this.enterOuterAlt(_localctx, 6);
{
this.state = 98;
this.loginInstruction();
}
break;
case IoTizeTestParser.LOGOUT:
this.enterOuterAlt(_localctx, 7);
{
this.state = 99;
this.logoutInstruction();
}
break;
case IoTizeTestParser.DISCONNECT:
case IoTizeTestParser.CONNECT:
case IoTizeTestParser.CONNECT_RETRY:
this.enterOuterAlt(_localctx, 8);
{
this.state = 100;
this.connectionInstructions();
}
break;
case IoTizeTestParser.DISPLAY_VERBOSE_INSTRUCTION:
case IoTizeTestParser.DISPLAY_ERROR_INSTRUCTION:
case IoTizeTestParser.DISPLAY_INFO_INSTRUCTION:
case IoTizeTestParser.DISPLAY_INSTRUCTION:
this.enterOuterAlt(_localctx, 9);
{
this.state = 101;
this.displayInstructions();
}
break;
case IoTizeTestParser.OUTPUT:
this.enterOuterAlt(_localctx, 10);
{
this.state = 102;
this.outputInstruction();
}
break;
case IoTizeTestParser.WAIT_INSTRUCTION:
this.enterOuterAlt(_localctx, 11);
{
this.state = 103;
this.waitInstruction();
}
break;
case IoTizeTestParser.CCOM_RAND_START:
case IoTizeTestParser.CCOM_AUTO_RAND_START_ON:
case IoTizeTestParser.CCOM_AUTO_RAND_START_OFF:
case IoTizeTestParser.CCOM_ENABLE:
case IoTizeTestParser.CCOM_DISABLE:
this.enterOuterAlt(_localctx, 12);
{
this.state = 104;
this.ccomInstruction();
}
break;
case IoTizeTestParser.FW_MIN_CHECK:
this.enterOuterAlt(_localctx, 13);
{
this.state = 105;
this.fWMinCheckInstruction();
}
break;
case IoTizeTestParser.FW_MAX_CHECK:
this.enterOuterAlt(_localctx, 14);
{
this.state = 106;
this.fWMaxCheckInstruction();
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
ccomInstruction() {
let _localctx = new CcomInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 12, IoTizeTestParser.RULE_ccomInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 109;
_la = this._input.LA(1);
if (!(((((_la - 42)) & ~0x1F) === 0 && ((1 << (_la - 42)) & ((1 << (IoTizeTestParser.CCOM_RAND_START - 42)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_ON - 42)) | (1 << (IoTizeTestParser.CCOM_AUTO_RAND_START_OFF - 42)) | (1 << (IoTizeTestParser.CCOM_ENABLE - 42)) | (1 << (IoTizeTestParser.CCOM_DISABLE - 42)))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
gotoInstruction() {
let _localctx = new GotoInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 14, IoTizeTestParser.RULE_gotoInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 111;
this.match(IoTizeTestParser.GOTOPREFIX);
this.state = 114;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.POINT) {
{
this.state = 112;
this.match(IoTizeTestParser.POINT);
this.state = 113;
this.gotoType();
}
}
this.state = 116;
this.labelName();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
gotoType() {
let _localctx = new GotoTypeContext(this._ctx, this.state);
this.enterRule(_localctx, 16, IoTizeTestParser.RULE_gotoType);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 118;
_la = this._input.LA(1);
if (!(_la === IoTizeTestParser.GOTO_NOK || _la === IoTizeTestParser.GOTO_OK)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
checkInstruction() {
let _localctx = new CheckInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 18, IoTizeTestParser.RULE_checkInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 120;
this.match(IoTizeTestParser.CHECK);
this.state = 122;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.POINT) {
{
this.state = 121;
this.sizeOf();
}
}
this.state = 124;
this.comparison();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
comparison() {
let _localctx = new ComparisonContext(this._ctx, this.state);
this.enterRule(_localctx, 20, IoTizeTestParser.RULE_comparison);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 128;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case IoTizeTestParser.HEX_INTEGER:
case IoTizeTestParser.DECIMAL_INTEGER:
{
this.state = 126;
this.number();
}
break;
case IoTizeTestParser.STRING:
{
this.state = 127;
this.string();
}
break;
case IoTizeTestParser.OP_GTE:
case IoTizeTestParser.OP_LTE:
case IoTizeTestParser.OPP_NQ:
case IoTizeTestParser.OP_EQ:
case IoTizeTestParser.OPP_NQ2:
case IoTizeTestParser.OP_LT:
case IoTizeTestParser.OP_GT:
break;
default:
break;
}
this.state = 130;
this.comp_op();
this.state = 131;
this.comparisonRightOperand();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
comparisonRightOperand() {
let _localctx = new ComparisonRightOperandContext(this._ctx, this.state);
this.enterRule(_localctx, 22, IoTizeTestParser.RULE_comparisonRightOperand);
try {
this.state = 135;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case IoTizeTestParser.STRING:
this.enterOuterAlt(_localctx, 1);
{
this.state = 133;
this.string();
}
break;
case IoTizeTestParser.HEX_INTEGER:
case IoTizeTestParser.DECIMAL_INTEGER:
this.enterOuterAlt(_localctx, 2);
{
this.state = 134;
this.numberArray();
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
numberArray() {
let _localctx = new NumberArrayContext(this._ctx, this.state);
this.enterRule(_localctx, 24, IoTizeTestParser.RULE_numberArray);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 138;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 137;
this.number();
}
}
this.state = 140;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === IoTizeTestParser.HEX_INTEGER || _la === IoTizeTestParser.DECIMAL_INTEGER);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
comp_op() {
let _localctx = new Comp_opContext(this._ctx, this.state);
this.enterRule(_localctx, 26, IoTizeTestParser.RULE_comp_op);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 142;
_la = this._input.LA(1);
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << IoTizeTestParser.OP_GTE) | (1 << IoTizeTestParser.OP_LTE) | (1 << IoTizeTestParser.OPP_NQ) | (1 << IoTizeTestParser.OP_EQ) | (1 << IoTizeTestParser.OPP_NQ2) | (1 << IoTizeTestParser.OP_LT) | (1 << IoTizeTestParser.OP_GT))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
displayInstructions() {
let _localctx = new DisplayInstructionsContext(this._ctx, this.state);
this.enterRule(_localctx, 28, IoTizeTestParser.RULE_displayInstructions);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 144;
_la = this._input.LA(1);
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << IoTizeTestParser.DISPLAY_VERBOSE_INSTRUCTION) | (1 << IoTizeTestParser.DISPLAY_ERROR_INSTRUCTION) | (1 << IoTizeTestParser.DISPLAY_INFO_INSTRUCTION) | (1 << IoTizeTestParser.DISPLAY_INSTRUCTION))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
loginInstruction() {
let _localctx = new LoginInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 30, IoTizeTestParser.RULE_loginInstruction);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 146;
this.match(IoTizeTestParser.LOGIN);
this.state = 147;
this.string();
this.state = 148;
this.string();
this.state = 149;
this.match(IoTizeTestParser.COLON);
this.state = 150;
this.number();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
logoutInstruction() {
let _localctx = new LogoutInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 32, IoTizeTestParser.RULE_logoutInstruction);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 152;
this.match(IoTizeTestParser.LOGOUT);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
outputInstruction() {
let _localctx = new OutputInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 34, IoTizeTestParser.RULE_outputInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 154;
this.match(IoTizeTestParser.OUTPUT);
this.state = 156;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.POINT) {
{
this.state = 155;
this.sizeOf();
}
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
connectionInstructions() {
let _localctx = new ConnectionInstructionsContext(this._ctx, this.state);
this.enterRule(_localctx, 36, IoTizeTestParser.RULE_connectionInstructions);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 158;
_la = this._input.LA(1);
if (!(((((_la - 23)) & ~0x1F) === 0 && ((1 << (_la - 23)) & ((1 << (IoTizeTestParser.DISCONNECT - 23)) | (1 << (IoTizeTestParser.CONNECT - 23)) | (1 << (IoTizeTestParser.CONNECT_RETRY - 23)))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
waitInstruction() {
let _localctx = new WaitInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 38, IoTizeTestParser.RULE_waitInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 160;
this.match(IoTizeTestParser.WAIT_INSTRUCTION);
this.state = 162;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.DECIMAL_INTEGER) {
{
this.state = 161;
this.match(IoTizeTestParser.DECIMAL_INTEGER);
}
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
lwm2mInstruction() {
let _localctx = new Lwm2mInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 40, IoTizeTestParser.RULE_lwm2mInstruction);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 164;
this.lwm2mMethod();
this.state = 165;
this.lwm2mPath();
this.state = 167;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 11, this._ctx)) {
case 1:
{
this.state = 166;
this.responseLength();
}
break;
}
this.state = 170;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.BRACKET_OPEN || ((((_la - 49)) & ~0x1F) === 0 && ((1 << (_la - 49)) & ((1 << (IoTizeTestParser.HEX_ARRAY - 49)) | (1 << (IoTizeTestParser.HEX_INTEGER - 49)) | (1 << (IoTizeTestParser.DECIMAL_INTEGER - 49)) | (1 << (IoTizeTestParser.STRING - 49)))) !== 0)) {
{
this.state = 169;
this.lwm2mParameter();
}
}
this.state = 172;
this.match(IoTizeTestParser.COLON);
this.state = 173;
this.number();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
fWMinCheckInstruction() {
let _localctx = new FWMinCheckInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 42, IoTizeTestParser.RULE_fWMinCheckInstruction);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 175;
this.match(IoTizeTestParser.FW_MIN_CHECK);
this.state = 176;
this.match(IoTizeTestParser.FLOAT);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
fWMaxCheckInstruction() {
let _localctx = new FWMaxCheckInstructionContext(this._ctx, this.state);
this.enterRule(_localctx, 44, IoTizeTestParser.RULE_fWMaxCheckInstruction);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 178;
this.match(IoTizeTestParser.FW_MAX_CHECK);
this.state = 179;
this.match(IoTizeTestParser.FLOAT);
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
responseLength() {
let _localctx = new ResponseLengthContext(this._ctx, this.state);
this.enterRule(_localctx, 46, IoTizeTestParser.RULE_responseLength);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 181;
this.number();
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
lwm2mMethod() {
let _localctx = new Lwm2mMethodContext(this._ctx, this.state);
this.enterRule(_localctx, 48, IoTizeTestParser.RULE_lwm2mMethod);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 183;
_la = this._input.LA(1);
if (!(((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (IoTizeTestParser.GET - 35)) | (1 << (IoTizeTestParser.PUT - 35)) | (1 << (IoTizeTestParser.POST - 35)) | (1 << (IoTizeTestParser.GETP - 35)))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token_1.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
lwm2mPath() {
let _localctx = new Lwm2mPathContext(this._ctx, this.state);
this.enterRule(_localctx, 50, IoTizeTestParser.RULE_lwm2mPath);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 185;
this.match(IoTizeTestParser.SLASH);
this.state = 186;
this.match(IoTizeTestParser.DECIMAL_INTEGER);
this.state = 189;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 13, this._ctx)) {
case 1:
{
this.state = 187;
this.match(IoTizeTestParser.SLASH);
this.state = 188;
this.match(IoTizeTestParser.DECIMAL_INTEGER);
}
break;
}
this.state = 193;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
{
this.state = 191;
this.match(IoTizeTestParser.SLASH);
this.state = 192;
this.match(IoTizeTestParser.DECIMAL_INTEGER);
}
break;
}
this.state = 197;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.SLASH) {
{
this.state = 195;
this.match(IoTizeTestParser.SLASH);
this.state = 196;
this.match(IoTizeTestParser.DECIMAL_INTEGER);
}
}
}
}
catch (re) {
if (re instanceof RecognitionException_1.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}
// @RuleVersion(0)
lwm2mParameter() {
let _localctx = new Lwm2mParameterContext(this._ctx, this.state);
this.enterRule(_localctx, 52, IoTizeTestParser.RULE_lwm2mParameter);
let _la;
try {
this.state = 206;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case IoTizeTestParser.HEX_ARRAY:
this.enterOuterAlt(_localctx, 1);
{
this.state = 199;
this.hexArray();
}
break;
case IoTizeTestParser.HEX_INTEGER:
case IoTizeTestParser.DECIMAL_INTEGER:
this.enterOuterAlt(_localctx, 2);
{
this.state = 200;
this.number();
this.state = 202;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === IoTizeTestParser.POINT) {
{
this.state = 201;
this.sizeOf();
}
}
}
break;
case IoTizeTestParser.BRACKET_OPEN:
this.enterOuterAlt(_localctx, 3);
{
this.state = 204;
this.objectParameter();
}
break;
case IoTizeTestParser.STRING:
this.enterOuterAlt(_localctx, 4);
{
this.state = 205;
this.