# Generated from APIParser.g4 by ANTLR 4.11.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO

def serializedATN():
    return [
        4,1,214,569,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,
        7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,
        13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,
        20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,
        26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,
        33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,
        39,1,0,1,0,1,0,1,1,1,1,1,1,3,1,87,8,1,1,2,1,2,5,2,91,8,2,10,2,12,
        2,94,9,2,1,2,1,2,1,2,1,3,1,3,1,3,3,3,102,8,3,1,4,1,4,1,4,1,5,1,5,
        1,6,1,6,1,7,5,7,112,8,7,10,7,12,7,115,9,7,1,8,1,8,1,8,1,8,1,9,1,
        9,1,10,1,10,1,10,1,11,1,11,4,11,128,8,11,11,11,12,11,129,1,12,4,
        12,133,8,12,11,12,12,12,134,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,
        14,1,15,1,15,4,15,147,8,15,11,15,12,15,148,1,16,1,16,1,17,4,17,154,
        8,17,11,17,12,17,155,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,
        1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,
        179,8,18,1,19,1,19,3,19,183,8,19,1,19,3,19,186,8,19,1,19,3,19,189,
        8,19,1,20,1,20,3,20,193,8,20,1,20,3,20,196,8,20,1,20,3,20,199,8,
        20,1,21,1,21,1,21,3,21,204,8,21,1,21,3,21,207,8,21,1,22,1,22,1,22,
        3,22,212,8,22,1,22,3,22,215,8,22,1,23,1,23,4,23,219,8,23,11,23,12,
        23,220,1,23,3,23,224,8,23,1,23,3,23,227,8,23,1,24,1,24,1,24,1,24,
        1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,
        1,24,1,24,1,24,1,24,5,24,250,8,24,10,24,12,24,253,9,24,3,24,255,
        8,24,1,24,3,24,258,8,24,1,24,3,24,261,8,24,1,25,1,25,1,25,1,25,3,
        25,267,8,25,1,25,3,25,270,8,25,1,25,3,25,273,8,25,1,26,1,26,1,26,
        3,26,278,8,26,1,26,3,26,281,8,26,1,27,1,27,1,27,1,27,1,27,1,27,1,
        27,3,27,290,8,27,1,27,3,27,293,8,27,1,27,3,27,296,8,27,1,28,1,28,
        1,28,3,28,301,8,28,1,28,3,28,304,8,28,1,29,1,29,3,29,308,8,29,1,
        29,3,29,311,8,29,1,30,1,30,1,30,1,30,1,30,3,30,318,8,30,1,30,3,30,
        321,8,30,1,30,3,30,324,8,30,1,31,1,31,1,31,3,31,329,8,31,1,31,3,
        31,332,8,31,1,32,1,32,1,32,3,32,337,8,32,1,33,1,33,1,33,3,33,342,
        8,33,1,34,1,34,3,34,346,8,34,1,34,5,34,349,8,34,10,34,12,34,352,
        9,34,1,34,3,34,355,8,34,1,34,3,34,358,8,34,1,35,1,35,1,35,1,35,1,
        35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,3,35,375,8,
        35,1,35,1,35,4,35,379,8,35,11,35,12,35,380,1,35,1,35,1,35,1,35,1,
        35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,
        35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,
        35,1,35,1,35,1,35,1,35,3,35,418,8,35,3,35,420,8,35,1,35,3,35,423,
        8,35,1,35,3,35,426,8,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,
        1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,
        1,36,1,36,1,36,1,36,1,36,4,36,454,8,36,11,36,12,36,455,1,36,1,36,
        1,36,1,36,1,36,5,36,463,8,36,10,36,12,36,466,9,36,3,36,468,8,36,
        1,36,3,36,471,8,36,1,36,3,36,474,8,36,1,37,1,37,1,37,1,37,5,37,480,
        8,37,10,37,12,37,483,9,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,
        1,37,1,37,1,37,5,37,496,8,37,10,37,12,37,499,9,37,1,37,1,37,1,37,
        4,37,504,8,37,11,37,12,37,505,1,37,1,37,1,37,1,37,1,37,1,37,1,37,
        3,37,515,8,37,1,37,3,37,518,8,37,1,37,3,37,521,8,37,1,38,1,38,1,
        38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,4,38,534,8,38,11,38,12,
        38,535,1,38,1,38,1,38,3,38,541,8,38,1,38,1,38,1,38,1,38,1,38,1,38,
        1,38,1,38,3,38,551,8,38,1,38,3,38,554,8,38,1,38,3,38,557,8,38,1,
        39,1,39,3,39,561,8,39,1,39,3,39,564,8,39,1,39,3,39,567,8,39,1,39,
        0,0,40,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,
        42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,0,10,1,
        1,47,47,2,0,5,5,42,42,1,0,113,114,1,1,5,5,1,0,160,161,2,0,170,171,
        174,179,1,0,183,184,1,0,181,182,1,0,190,191,1,0,188,189,662,0,80,
        1,0,0,0,2,86,1,0,0,0,4,88,1,0,0,0,6,98,1,0,0,0,8,103,1,0,0,0,10,
        106,1,0,0,0,12,108,1,0,0,0,14,113,1,0,0,0,16,116,1,0,0,0,18,120,
        1,0,0,0,20,122,1,0,0,0,22,127,1,0,0,0,24,132,1,0,0,0,26,138,1,0,
        0,0,28,142,1,0,0,0,30,146,1,0,0,0,32,150,1,0,0,0,34,153,1,0,0,0,
        36,178,1,0,0,0,38,180,1,0,0,0,40,190,1,0,0,0,42,200,1,0,0,0,44,208,
        1,0,0,0,46,216,1,0,0,0,48,228,1,0,0,0,50,262,1,0,0,0,52,274,1,0,
        0,0,54,282,1,0,0,0,56,297,1,0,0,0,58,305,1,0,0,0,60,312,1,0,0,0,
        62,325,1,0,0,0,64,333,1,0,0,0,66,338,1,0,0,0,68,343,1,0,0,0,70,359,
        1,0,0,0,72,427,1,0,0,0,74,475,1,0,0,0,76,522,1,0,0,0,78,558,1,0,
        0,0,80,81,3,2,1,0,81,82,5,0,0,1,82,1,1,0,0,0,83,87,3,36,18,0,84,
        87,3,4,2,0,85,87,5,0,0,1,86,83,1,0,0,0,86,84,1,0,0,0,86,85,1,0,0,
        0,87,3,1,0,0,0,88,92,5,1,0,0,89,91,5,5,0,0,90,89,1,0,0,0,91,94,1,
        0,0,0,92,90,1,0,0,0,92,93,1,0,0,0,93,95,1,0,0,0,94,92,1,0,0,0,95,
        96,3,6,3,0,96,97,7,0,0,0,97,5,1,0,0,0,98,99,3,8,4,0,99,101,3,14,
        7,0,100,102,3,22,11,0,101,100,1,0,0,0,101,102,1,0,0,0,102,7,1,0,
        0,0,103,104,3,10,5,0,104,105,3,12,6,0,105,9,1,0,0,0,106,107,5,46,
        0,0,107,11,1,0,0,0,108,109,5,48,0,0,109,13,1,0,0,0,110,112,3,16,
        8,0,111,110,1,0,0,0,112,115,1,0,0,0,113,111,1,0,0,0,113,114,1,0,
        0,0,114,15,1,0,0,0,115,113,1,0,0,0,116,117,3,18,9,0,117,118,5,50,
        0,0,118,119,3,20,10,0,119,17,1,0,0,0,120,121,5,49,0,0,121,19,1,0,
        0,0,122,123,5,52,0,0,123,124,5,53,0,0,124,21,1,0,0,0,125,128,3,24,
        12,0,126,128,3,30,15,0,127,125,1,0,0,0,127,126,1,0,0,0,128,129,1,
        0,0,0,129,127,1,0,0,0,129,130,1,0,0,0,130,23,1,0,0,0,131,133,3,26,
        13,0,132,131,1,0,0,0,133,134,1,0,0,0,134,132,1,0,0,0,134,135,1,0,
        0,0,135,136,1,0,0,0,136,137,5,54,0,0,137,25,1,0,0,0,138,139,3,28,
        14,0,139,140,3,14,7,0,140,141,3,30,15,0,141,27,1,0,0,0,142,143,5,
        55,0,0,143,29,1,0,0,0,144,147,3,32,16,0,145,147,3,34,17,0,146,144,
        1,0,0,0,146,145,1,0,0,0,147,148,1,0,0,0,148,146,1,0,0,0,148,149,
        1,0,0,0,149,31,1,0,0,0,150,151,5,57,0,0,151,33,1,0,0,0,152,154,7,
        1,0,0,153,152,1,0,0,0,154,155,1,0,0,0,155,153,1,0,0,0,155,156,1,
        0,0,0,156,35,1,0,0,0,157,179,3,50,25,0,158,179,3,48,24,0,159,179,
        3,52,26,0,160,179,3,46,23,0,161,179,3,54,27,0,162,179,3,56,28,0,
        163,179,3,58,29,0,164,179,3,60,30,0,165,179,3,68,34,0,166,179,3,
        42,21,0,167,179,3,38,19,0,168,179,3,40,20,0,169,179,3,44,22,0,170,
        179,3,62,31,0,171,179,3,66,33,0,172,179,3,64,32,0,173,179,3,70,35,
        0,174,179,3,72,36,0,175,179,3,74,37,0,176,179,3,76,38,0,177,179,
        3,78,39,0,178,157,1,0,0,0,178,158,1,0,0,0,178,159,1,0,0,0,178,160,
        1,0,0,0,178,161,1,0,0,0,178,162,1,0,0,0,178,163,1,0,0,0,178,164,
        1,0,0,0,178,165,1,0,0,0,178,166,1,0,0,0,178,167,1,0,0,0,178,168,
        1,0,0,0,178,169,1,0,0,0,178,170,1,0,0,0,178,171,1,0,0,0,178,172,
        1,0,0,0,178,173,1,0,0,0,178,174,1,0,0,0,178,175,1,0,0,0,178,176,
        1,0,0,0,178,177,1,0,0,0,179,37,1,0,0,0,180,182,5,20,0,0,181,183,
        5,40,0,0,182,181,1,0,0,0,182,183,1,0,0,0,183,185,1,0,0,0,184,186,
        5,7,0,0,185,184,1,0,0,0,185,186,1,0,0,0,186,188,1,0,0,0,187,189,
        5,5,0,0,188,187,1,0,0,0,188,189,1,0,0,0,189,39,1,0,0,0,190,192,5,
        21,0,0,191,193,5,40,0,0,192,191,1,0,0,0,192,193,1,0,0,0,193,195,
        1,0,0,0,194,196,5,7,0,0,195,194,1,0,0,0,195,196,1,0,0,0,196,198,
        1,0,0,0,197,199,5,5,0,0,198,197,1,0,0,0,198,199,1,0,0,0,199,41,1,
        0,0,0,200,201,5,24,0,0,201,203,7,2,0,0,202,204,5,116,0,0,203,202,
        1,0,0,0,203,204,1,0,0,0,204,206,1,0,0,0,205,207,5,5,0,0,206,205,
        1,0,0,0,206,207,1,0,0,0,207,43,1,0,0,0,208,209,5,23,0,0,209,211,
        5,40,0,0,210,212,5,7,0,0,211,210,1,0,0,0,211,212,1,0,0,0,212,214,
        1,0,0,0,213,215,5,5,0,0,214,213,1,0,0,0,214,215,1,0,0,0,215,45,1,
        0,0,0,216,218,5,27,0,0,217,219,5,81,0,0,218,217,1,0,0,0,219,220,
        1,0,0,0,220,218,1,0,0,0,220,221,1,0,0,0,221,223,1,0,0,0,222,224,
        5,7,0,0,223,222,1,0,0,0,223,224,1,0,0,0,224,226,1,0,0,0,225,227,
        5,5,0,0,226,225,1,0,0,0,226,227,1,0,0,0,227,47,1,0,0,0,228,254,5,
        28,0,0,229,230,5,70,0,0,230,255,5,78,0,0,231,232,5,71,0,0,232,255,
        5,78,0,0,233,251,5,72,0,0,234,235,5,74,0,0,235,236,5,69,0,0,236,
        250,5,78,0,0,237,238,5,73,0,0,238,239,5,69,0,0,239,250,5,78,0,0,
        240,241,5,75,0,0,241,242,5,69,0,0,242,250,5,78,0,0,243,244,5,76,
        0,0,244,245,5,69,0,0,245,250,5,78,0,0,246,247,5,77,0,0,247,248,5,
        69,0,0,248,250,5,78,0,0,249,234,1,0,0,0,249,237,1,0,0,0,249,240,
        1,0,0,0,249,243,1,0,0,0,249,246,1,0,0,0,250,253,1,0,0,0,251,249,
        1,0,0,0,251,252,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,254,229,
        1,0,0,0,254,231,1,0,0,0,254,233,1,0,0,0,255,257,1,0,0,0,256,258,
        5,7,0,0,257,256,1,0,0,0,257,258,1,0,0,0,258,260,1,0,0,0,259,261,
        5,5,0,0,260,259,1,0,0,0,260,261,1,0,0,0,261,49,1,0,0,0,262,263,5,
        26,0,0,263,266,5,64,0,0,264,265,5,66,0,0,265,267,5,65,0,0,266,264,
        1,0,0,0,266,267,1,0,0,0,267,269,1,0,0,0,268,270,5,67,0,0,269,268,
        1,0,0,0,269,270,1,0,0,0,270,272,1,0,0,0,271,273,5,5,0,0,272,271,
        1,0,0,0,272,273,1,0,0,0,273,51,1,0,0,0,274,275,5,29,0,0,275,277,
        5,84,0,0,276,278,5,7,0,0,277,276,1,0,0,0,277,278,1,0,0,0,278,280,
        1,0,0,0,279,281,5,5,0,0,280,279,1,0,0,0,280,281,1,0,0,0,281,53,1,
        0,0,0,282,289,5,34,0,0,283,290,5,96,0,0,284,290,5,97,0,0,285,290,
        5,98,0,0,286,287,5,92,0,0,287,288,5,93,0,0,288,290,5,99,0,0,289,
        283,1,0,0,0,289,284,1,0,0,0,289,285,1,0,0,0,289,286,1,0,0,0,290,
        292,1,0,0,0,291,293,5,90,0,0,292,291,1,0,0,0,292,293,1,0,0,0,293,
        295,1,0,0,0,294,296,5,5,0,0,295,294,1,0,0,0,295,296,1,0,0,0,296,
        55,1,0,0,0,297,298,5,31,0,0,298,300,5,89,0,0,299,301,5,7,0,0,300,
        299,1,0,0,0,300,301,1,0,0,0,301,303,1,0,0,0,302,304,5,5,0,0,303,
        302,1,0,0,0,303,304,1,0,0,0,304,57,1,0,0,0,305,307,5,32,0,0,306,
        308,5,7,0,0,307,306,1,0,0,0,307,308,1,0,0,0,308,310,1,0,0,0,309,
        311,5,5,0,0,310,309,1,0,0,0,310,311,1,0,0,0,311,59,1,0,0,0,312,313,
        5,35,0,0,313,317,5,103,0,0,314,318,5,105,0,0,315,316,5,106,0,0,316,
        318,5,102,0,0,317,314,1,0,0,0,317,315,1,0,0,0,318,320,1,0,0,0,319,
        321,5,104,0,0,320,319,1,0,0,0,320,321,1,0,0,0,321,323,1,0,0,0,322,
        324,5,5,0,0,323,322,1,0,0,0,323,324,1,0,0,0,324,61,1,0,0,0,325,326,
        5,22,0,0,326,328,5,42,0,0,327,329,5,7,0,0,328,327,1,0,0,0,328,329,
        1,0,0,0,329,331,1,0,0,0,330,332,5,5,0,0,331,330,1,0,0,0,331,332,
        1,0,0,0,332,63,1,0,0,0,333,334,5,25,0,0,334,336,5,59,0,0,335,337,
        7,3,0,0,336,335,1,0,0,0,336,337,1,0,0,0,337,65,1,0,0,0,338,339,5,
        2,0,0,339,341,5,58,0,0,340,342,5,5,0,0,341,340,1,0,0,0,341,342,1,
        0,0,0,342,67,1,0,0,0,343,345,5,33,0,0,344,346,5,111,0,0,345,344,
        1,0,0,0,345,346,1,0,0,0,346,350,1,0,0,0,347,349,5,109,0,0,348,347,
        1,0,0,0,349,352,1,0,0,0,350,348,1,0,0,0,350,351,1,0,0,0,351,354,
        1,0,0,0,352,350,1,0,0,0,353,355,5,110,0,0,354,353,1,0,0,0,354,355,
        1,0,0,0,355,357,1,0,0,0,356,358,5,5,0,0,357,356,1,0,0,0,357,358,
        1,0,0,0,358,69,1,0,0,0,359,419,5,36,0,0,360,361,5,118,0,0,361,362,
        5,143,0,0,362,363,5,119,0,0,363,364,5,120,0,0,364,365,5,143,0,0,
        365,366,5,121,0,0,366,420,5,143,0,0,367,368,5,118,0,0,368,369,5,
        143,0,0,369,370,5,119,0,0,370,371,5,120,0,0,371,374,5,143,0,0,372,
        373,5,122,0,0,373,375,5,143,0,0,374,372,1,0,0,0,374,375,1,0,0,0,
        375,420,1,0,0,0,376,378,5,123,0,0,377,379,5,143,0,0,378,377,1,0,
        0,0,379,380,1,0,0,0,380,378,1,0,0,0,380,381,1,0,0,0,381,420,1,0,
        0,0,382,420,5,124,0,0,383,384,5,125,0,0,384,420,5,143,0,0,385,386,
        5,126,0,0,386,420,5,143,0,0,387,417,5,128,0,0,388,389,5,129,0,0,
        389,390,5,143,0,0,390,418,5,127,0,0,391,418,5,130,0,0,392,393,5,
        131,0,0,393,418,5,143,0,0,394,395,5,132,0,0,395,396,5,143,0,0,396,
        397,5,127,0,0,397,418,5,127,0,0,398,399,5,133,0,0,399,400,5,143,
        0,0,400,418,5,127,0,0,401,402,5,134,0,0,402,403,5,143,0,0,403,418,
        5,143,0,0,404,405,5,135,0,0,405,406,5,143,0,0,406,418,5,143,0,0,
        407,408,5,136,0,0,408,418,5,143,0,0,409,410,5,137,0,0,410,411,5,
        143,0,0,411,418,5,143,0,0,412,413,5,138,0,0,413,418,5,143,0,0,414,
        415,5,139,0,0,415,416,5,143,0,0,416,418,5,127,0,0,417,388,1,0,0,
        0,417,391,1,0,0,0,417,392,1,0,0,0,417,394,1,0,0,0,417,398,1,0,0,
        0,417,401,1,0,0,0,417,404,1,0,0,0,417,407,1,0,0,0,417,409,1,0,0,
        0,417,412,1,0,0,0,417,414,1,0,0,0,418,420,1,0,0,0,419,360,1,0,0,
        0,419,367,1,0,0,0,419,376,1,0,0,0,419,382,1,0,0,0,419,383,1,0,0,
        0,419,385,1,0,0,0,419,387,1,0,0,0,420,422,1,0,0,0,421,423,5,141,
        0,0,422,421,1,0,0,0,422,423,1,0,0,0,423,425,1,0,0,0,424,426,5,5,
        0,0,425,424,1,0,0,0,425,426,1,0,0,0,426,71,1,0,0,0,427,467,5,37,
        0,0,428,429,5,159,0,0,429,468,7,4,0,0,430,431,5,152,0,0,431,468,
        5,163,0,0,432,433,5,149,0,0,433,468,5,163,0,0,434,435,5,154,0,0,
        435,468,5,163,0,0,436,437,5,153,0,0,437,468,5,163,0,0,438,439,5,
        155,0,0,439,468,5,163,0,0,440,441,5,151,0,0,441,468,5,163,0,0,442,
        443,5,157,0,0,443,468,5,158,0,0,444,445,5,156,0,0,445,446,5,158,
        0,0,446,447,5,162,0,0,447,468,5,163,0,0,448,449,5,150,0,0,449,453,
        5,163,0,0,450,451,5,163,0,0,451,452,5,146,0,0,452,454,5,163,0,0,
        453,450,1,0,0,0,454,455,1,0,0,0,455,453,1,0,0,0,455,456,1,0,0,0,
        456,468,1,0,0,0,457,458,5,148,0,0,458,464,5,163,0,0,459,460,5,163,
        0,0,460,461,5,146,0,0,461,463,5,163,0,0,462,459,1,0,0,0,463,466,
        1,0,0,0,464,462,1,0,0,0,464,465,1,0,0,0,465,468,1,0,0,0,466,464,
        1,0,0,0,467,428,1,0,0,0,467,430,1,0,0,0,467,432,1,0,0,0,467,434,
        1,0,0,0,467,436,1,0,0,0,467,438,1,0,0,0,467,440,1,0,0,0,467,442,
        1,0,0,0,467,444,1,0,0,0,467,448,1,0,0,0,467,457,1,0,0,0,468,470,
        1,0,0,0,469,471,5,145,0,0,470,469,1,0,0,0,470,471,1,0,0,0,471,473,
        1,0,0,0,472,474,5,5,0,0,473,472,1,0,0,0,473,474,1,0,0,0,474,73,1,
        0,0,0,475,514,5,38,0,0,476,477,5,192,0,0,477,481,5,192,0,0,478,480,
        7,5,0,0,479,478,1,0,0,0,480,483,1,0,0,0,481,479,1,0,0,0,481,482,
        1,0,0,0,482,515,1,0,0,0,483,481,1,0,0,0,484,485,7,6,0,0,485,515,
        5,192,0,0,486,487,5,172,0,0,487,488,5,192,0,0,488,489,5,166,0,0,
        489,515,5,192,0,0,490,491,5,173,0,0,491,515,5,192,0,0,492,515,5,
        185,0,0,493,497,5,168,0,0,494,496,7,5,0,0,495,494,1,0,0,0,496,499,
        1,0,0,0,497,495,1,0,0,0,497,498,1,0,0,0,498,515,1,0,0,0,499,497,
        1,0,0,0,500,501,5,168,0,0,501,503,5,180,0,0,502,504,7,7,0,0,503,
        502,1,0,0,0,504,505,1,0,0,0,505,503,1,0,0,0,505,506,1,0,0,0,506,
        515,1,0,0,0,507,508,5,168,0,0,508,509,5,186,0,0,509,515,7,8,0,0,
        510,511,5,168,0,0,511,512,7,9,0,0,512,513,5,187,0,0,513,515,5,192,
        0,0,514,476,1,0,0,0,514,484,1,0,0,0,514,486,1,0,0,0,514,490,1,0,
        0,0,514,492,1,0,0,0,514,493,1,0,0,0,514,500,1,0,0,0,514,507,1,0,
        0,0,514,510,1,0,0,0,515,517,1,0,0,0,516,518,5,165,0,0,517,516,1,
        0,0,0,517,518,1,0,0,0,518,520,1,0,0,0,519,521,5,5,0,0,520,519,1,
        0,0,0,520,521,1,0,0,0,521,75,1,0,0,0,522,550,5,39,0,0,523,524,5,
        195,0,0,524,525,5,196,0,0,525,526,5,197,0,0,526,551,5,207,0,0,527,
        528,5,198,0,0,528,529,5,200,0,0,529,530,5,199,0,0,530,531,5,207,
        0,0,531,533,5,204,0,0,532,534,5,208,0,0,533,532,1,0,0,0,534,535,
        1,0,0,0,535,533,1,0,0,0,535,536,1,0,0,0,536,537,1,0,0,0,537,540,
        5,210,0,0,538,539,5,201,0,0,539,541,5,202,0,0,540,538,1,0,0,0,540,
        541,1,0,0,0,541,551,1,0,0,0,542,543,5,205,0,0,543,544,5,200,0,0,
        544,545,5,199,0,0,545,546,5,207,0,0,546,547,5,206,0,0,547,548,5,
        200,0,0,548,549,5,199,0,0,549,551,5,207,0,0,550,523,1,0,0,0,550,
        527,1,0,0,0,550,542,1,0,0,0,551,553,1,0,0,0,552,554,5,194,0,0,553,
        552,1,0,0,0,553,554,1,0,0,0,554,556,1,0,0,0,555,557,5,5,0,0,556,
        555,1,0,0,0,556,557,1,0,0,0,557,77,1,0,0,0,558,560,5,30,0,0,559,
        561,5,212,0,0,560,559,1,0,0,0,560,561,1,0,0,0,561,563,1,0,0,0,562,
        564,5,214,0,0,563,562,1,0,0,0,563,564,1,0,0,0,564,566,1,0,0,0,565,
        567,5,5,0,0,566,565,1,0,0,0,566,567,1,0,0,0,567,79,1,0,0,0,77,86,
        92,101,113,127,129,134,146,148,155,178,182,185,188,192,195,198,203,
        206,211,214,220,223,226,249,251,254,257,260,266,269,272,277,280,
        289,292,295,300,303,307,310,317,320,323,328,331,336,341,345,350,
        354,357,374,380,417,419,422,425,455,464,467,470,473,481,497,505,
        514,517,520,535,540,550,553,556,560,563,566
    ]

class APIParser ( Parser ):

    grammarFileName = "APIParser.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "'> {%'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'.'", "<INVALID>", "'('", "')'", "<INVALID>", 
                     "<INVALID>", "'\"'", "'''", "'\\'", "<INVALID>", "'_EXIT'", 
                     "'_QUIT'", "'_SPOOL'", "'_SLEEP'", "'_USE'", "<INVALID>", 
                     "'_ASSERT'", "'_START'", "'_LOAD'", "'_HOST'", "'_HELP'", 
                     "'_IF'", "'_ENDIF'", "'_SET'", "'_LOOP'", "'_WHENEVER'", 
                     "'_SSH'", "'_JOB'", "'_COMPARE'", "'_DATA'", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'###'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'PLUGIN'", "'MAP'", "'JDBCDRIVER'", "<INVALID>", "'CLASS'", 
                     "'NAME'", "'PROPS'", "'URL'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'BEGIN'", "'UNTIL'", "<INVALID>", "<INVALID>", "'BREAK'", 
                     "'END'", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'ERROR'", "<INVALID>", "<INVALID>", "'EXIT'", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'API'", "'SQL'", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'CONNECT'", "'WITH'", "'USER'", 
                     "'KEYFILE'", "'PASSWORD'", "'EXECUTE'", "'DISCONNECT'", 
                     "'SAVE'", "'RESTORE'", "<INVALID>", "'SFTP'", "'CHMOD'", 
                     "'GETCWD'", "'CHDIR'", "'CHOWN'", "'MKDIR'", "'GET'", 
                     "'PUT'", "'REMOVE'", "'RENAME'", "'LISTDIR'", "'TRUNCATE'", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'SHOW'", "<INVALID>", "'START'", "'WAIT'", 
                     "'SHUTDOWN'", "'ABORT'", "'TIMER'", "'REGISTER'", "'DEREGISTER'", 
                     "'WORKER'", "'JOBMANAGER'", "'ON'", "'OFF'", "'TO'", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "'=>'", "<INVALID>", 
                     "<INVALID>", "'UNSET'", "'MASK'", "'NOMASK'", "'MASKLINE'", 
                     "'NOMASKLINE'", "'CASE'", "'NOCASE'", "'IGBLANK'", 
                     "'NOIGBLANK'", "'TRIM'", "'NOTRIM'", "'OUTPUT'", "'CONSOLE'", 
                     "'DIFFFILE'", "'SKIPLINE'", "'NOSKIPLINE'", "'RESET'", 
                     "'ALGORITHM'", "'ENCODING'", "'WORK'", "'REFERENCE'", 
                     "'LCS'", "'MYERS'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'SEEDFILE'", "'DIR'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'ROWS'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'CONVERT'", "'FROM'" ]

    symbolicNames = [ "<INVALID>", "HTTP_OPEN", "SCRIPT_OPEN", "COMMENT1", 
                      "COMMENT2", "CRLF", "COMMA", "SEMICOLON", "COLON", 
                      "AT", "DOT", "SLASH", "BRACKET_OPEN", "BRACKET_CLOSE", 
                      "SQUARE_OPEN", "SQUARE_CLOSE", "DOUBLE_QUOTE", "SINGLE_QUOTE", 
                      "ESCAPE", "SPACE", "EXIT", "QUIT", "SPOOL", "SLEEP", 
                      "USE", "ECHO_OPEN", "ASSERT", "START", "LOAD", "HOST", 
                      "HELP", "IF", "ENDIF", "SET", "LOOP", "WHENEVER", 
                      "SSH", "JOB", "COMPARE", "DATA", "INT", "DECIMAL", 
                      "String", "HTTP_COMMENT", "DIVIDE", "SP", "HttpMethod", 
                      "HTTP_CLOSE", "HttpRequestTarget", "HttpHeaderFieldName", 
                      "FIELD_COLON", "FIELD_CRLF", "HttpHeaderFieldValue", 
                      "HttpHeaderFieldValueEnd", "HttpMultipartBoundaryEnd", 
                      "HttpMultipartBoundary", "HttpMessageBodyComment", 
                      "HttpMessageBodyOperate", "ScriptBlock", "EchoBlock", 
                      "ASSERT_SPACE", "ASSERT_OPEN", "ASSERT_CLOSE", "ASSERT_CRLF", 
                      "ASSERT_EXPRESSION", "ASSERT_NAME", "ASSERT_COMMA", 
                      "ASSERT_SEMICOLON", "LOAD_SPACE", "LOAD_EQUAL", "LOAD_PLUGIN", 
                      "LOAD_MAP", "LOAD_JDBCDRIVER", "LOAD_JDBCFILE", "LOAD_JDBCCLASS", 
                      "LOAD_JDBCNAME", "LOAD_JDBCPROP", "LOAD_JDBCURL", 
                      "LOAD_EXPRESSION", "LOAD_CRLF", "START_SPACE", "START_EXPRESSION", 
                      "START_CRLF", "HOST_SPACE", "HOST_EXPRESSION", "HOST_CRLF", 
                      "IF_SPACE", "IF_OPEN", "IF_CLOSE", "IF_EXPRESSION", 
                      "LOOP_SEMICOLON", "LOOP_SPACE", "LOOP_BEGIN", "LOOP_UNTIL", 
                      "LOOP_OPEN", "LOOP_CLOSE", "LOOP_BREAK", "LOOP_END", 
                      "LOOP_CONTINUE", "LOOP_EXPRESSION", "LOOP_CRLF", "WHENEVER_SPACE", 
                      "WHENEVER_EXITCODE", "WHENEVER_ERROR", "WHENEVER_SEMICOLON", 
                      "WHENEVER_CONTINUE", "WHENEVER_EXIT", "WHENEVER_CRLF", 
                      "SET_SPACE", "SET_EXPRESSION", "SET_SEMICOLON", "SET_AT", 
                      "SET_CRLF", "USE_API", "USE_SQL", "USE_SPACE", "USE_SEMICOLON", 
                      "USE_CRLF", "SSH_CONNECT", "SSH_WITH", "SSH_USER", 
                      "SSH_KEYFILE", "SSH_PASSWORD", "SSH_EXECUTE", "SSH_DISCONNECT", 
                      "SSH_SAVE", "SSH_RESTORE", "SSH_INT", "SFTP", "SFTP_CHMOD", 
                      "SFTP_GETCWD", "SFTP_CHDIR", "SFTP_CHOWN", "SFTP_MKDIR", 
                      "SFTP_GET", "SFTP_PUT", "SFTP_REMOVE", "SFTP_RENAME", 
                      "SFTP_LISTDIR", "SFTP_TRUNCATE", "SSH_SPACE", "SSH_SEMICOLON", 
                      "SSH_CRLF", "SSH_EXPRESSION", "JOB_SPACE", "JOB_SEMICOLON", 
                      "JOB_EQUAL", "JOB_CRLF", "JOB_CREATE", "JOB_SHOW", 
                      "JOB_SET", "JOB_START", "JOB_WAIT", "JOB_SHUTDOWN", 
                      "JOB_ABORT", "JOB_TIMER", "JOB_REGISTER", "JOB_DEREGISTER", 
                      "JOB_WORKER", "JOB_MANGER", "JOB_ON", "JOB_OFF", "JOB_TO", 
                      "JOB_EXPRESSION", "COMPARE_SPACE", "COMPARE_SEMICOLON", 
                      "COMPARE_EQUAL", "COMPARE_CRLF", "COMPARE_SET", "COMPARE_UNSET", 
                      "COMPARE_MASK", "COMPARE_NOMASK", "COMPARE_MASKLINE", 
                      "COMPARE_NOMASKLINE", "COMPARE_CASE", "COMPARE_NOCASE", 
                      "COMPARE_IGBLANK", "COMPARE_NOIGBLANK", "COMPARE_TRIM", 
                      "COMPARE_NOTRIM", "COMPARE_OUTPUT", "COMPARE_CONSOLE", 
                      "COMPARE_DIFFFILE", "COMPARE_SKIPLINE", "COMPARE_NOSKIPLINE", 
                      "COMPARE_RESET", "COMPARE_ALGORITHM", "COMPARE_ENCODING", 
                      "COMPARE_WORK", "COMPARE_REFERENCE", "COMPARE_LCS", 
                      "COMPARE_MYERS", "COMPARE_EXPRESSION", "DATA_SPACE", 
                      "DATA_SEMICOLON", "DATA_SET", "DATA_SEEDFILE", "DATA_DIR", 
                      "DATA_CREATE", "DATA_FILE", "DATA_FILETYPE", "DATA_ROWS", 
                      "DATA_INT", "DATA_COMMA", "DATACOLUMN_OPEN", "DATA_CONVERT", 
                      "DATA_FROM", "DATA_EXPRESSION", "DATACOLUMN_EXPRESSION", 
                      "DATACOLUMN_SPACE", "DATACOLUMN_CLOSE", "HELP_SPACE", 
                      "HELP_COMMAND", "HELP_CRLF", "HELP_SEMICOLON" ]

    RULE_prog = 0
    RULE_command = 1
    RULE_http = 2
    RULE_httpMessage = 3
    RULE_httpRequestLine = 4
    RULE_httpMethod = 5
    RULE_httpRequestTarget = 6
    RULE_httpHeaderFields = 7
    RULE_httpHeaderField = 8
    RULE_httpHeaderFieldName = 9
    RULE_httpHeaderFieldValue = 10
    RULE_httpMessageBody = 11
    RULE_httpMultipart = 12
    RULE_httpMultipartBoundary = 13
    RULE_httpBoundaryDelimiter = 14
    RULE_httpMessageBodyContent = 15
    RULE_httpMessageBodyOperate = 16
    RULE_httpMessageBodyOther = 17
    RULE_baseCommand = 18
    RULE_exit = 19
    RULE_quit = 20
    RULE_use = 21
    RULE_sleep = 22
    RULE_start = 23
    RULE_load = 24
    RULE_assert = 25
    RULE_host = 26
    RULE_loop = 27
    RULE_if = 28
    RULE_endif = 29
    RULE_whenever = 30
    RULE_spool = 31
    RULE_echo = 32
    RULE_script = 33
    RULE_set = 34
    RULE_ssh = 35
    RULE_job = 36
    RULE_compare = 37
    RULE_data = 38
    RULE_help = 39

    ruleNames =  [ "prog", "command", "http", "httpMessage", "httpRequestLine", 
                   "httpMethod", "httpRequestTarget", "httpHeaderFields", 
                   "httpHeaderField", "httpHeaderFieldName", "httpHeaderFieldValue", 
                   "httpMessageBody", "httpMultipart", "httpMultipartBoundary", 
                   "httpBoundaryDelimiter", "httpMessageBodyContent", "httpMessageBodyOperate", 
                   "httpMessageBodyOther", "baseCommand", "exit", "quit", 
                   "use", "sleep", "start", "load", "assert", "host", "loop", 
                   "if", "endif", "whenever", "spool", "echo", "script", 
                   "set", "ssh", "job", "compare", "data", "help" ]

    EOF = Token.EOF
    HTTP_OPEN=1
    SCRIPT_OPEN=2
    COMMENT1=3
    COMMENT2=4
    CRLF=5
    COMMA=6
    SEMICOLON=7
    COLON=8
    AT=9
    DOT=10
    SLASH=11
    BRACKET_OPEN=12
    BRACKET_CLOSE=13
    SQUARE_OPEN=14
    SQUARE_CLOSE=15
    DOUBLE_QUOTE=16
    SINGLE_QUOTE=17
    ESCAPE=18
    SPACE=19
    EXIT=20
    QUIT=21
    SPOOL=22
    SLEEP=23
    USE=24
    ECHO_OPEN=25
    ASSERT=26
    START=27
    LOAD=28
    HOST=29
    HELP=30
    IF=31
    ENDIF=32
    SET=33
    LOOP=34
    WHENEVER=35
    SSH=36
    JOB=37
    COMPARE=38
    DATA=39
    INT=40
    DECIMAL=41
    String=42
    HTTP_COMMENT=43
    DIVIDE=44
    SP=45
    HttpMethod=46
    HTTP_CLOSE=47
    HttpRequestTarget=48
    HttpHeaderFieldName=49
    FIELD_COLON=50
    FIELD_CRLF=51
    HttpHeaderFieldValue=52
    HttpHeaderFieldValueEnd=53
    HttpMultipartBoundaryEnd=54
    HttpMultipartBoundary=55
    HttpMessageBodyComment=56
    HttpMessageBodyOperate=57
    ScriptBlock=58
    EchoBlock=59
    ASSERT_SPACE=60
    ASSERT_OPEN=61
    ASSERT_CLOSE=62
    ASSERT_CRLF=63
    ASSERT_EXPRESSION=64
    ASSERT_NAME=65
    ASSERT_COMMA=66
    ASSERT_SEMICOLON=67
    LOAD_SPACE=68
    LOAD_EQUAL=69
    LOAD_PLUGIN=70
    LOAD_MAP=71
    LOAD_JDBCDRIVER=72
    LOAD_JDBCFILE=73
    LOAD_JDBCCLASS=74
    LOAD_JDBCNAME=75
    LOAD_JDBCPROP=76
    LOAD_JDBCURL=77
    LOAD_EXPRESSION=78
    LOAD_CRLF=79
    START_SPACE=80
    START_EXPRESSION=81
    START_CRLF=82
    HOST_SPACE=83
    HOST_EXPRESSION=84
    HOST_CRLF=85
    IF_SPACE=86
    IF_OPEN=87
    IF_CLOSE=88
    IF_EXPRESSION=89
    LOOP_SEMICOLON=90
    LOOP_SPACE=91
    LOOP_BEGIN=92
    LOOP_UNTIL=93
    LOOP_OPEN=94
    LOOP_CLOSE=95
    LOOP_BREAK=96
    LOOP_END=97
    LOOP_CONTINUE=98
    LOOP_EXPRESSION=99
    LOOP_CRLF=100
    WHENEVER_SPACE=101
    WHENEVER_EXITCODE=102
    WHENEVER_ERROR=103
    WHENEVER_SEMICOLON=104
    WHENEVER_CONTINUE=105
    WHENEVER_EXIT=106
    WHENEVER_CRLF=107
    SET_SPACE=108
    SET_EXPRESSION=109
    SET_SEMICOLON=110
    SET_AT=111
    SET_CRLF=112
    USE_API=113
    USE_SQL=114
    USE_SPACE=115
    USE_SEMICOLON=116
    USE_CRLF=117
    SSH_CONNECT=118
    SSH_WITH=119
    SSH_USER=120
    SSH_KEYFILE=121
    SSH_PASSWORD=122
    SSH_EXECUTE=123
    SSH_DISCONNECT=124
    SSH_SAVE=125
    SSH_RESTORE=126
    SSH_INT=127
    SFTP=128
    SFTP_CHMOD=129
    SFTP_GETCWD=130
    SFTP_CHDIR=131
    SFTP_CHOWN=132
    SFTP_MKDIR=133
    SFTP_GET=134
    SFTP_PUT=135
    SFTP_REMOVE=136
    SFTP_RENAME=137
    SFTP_LISTDIR=138
    SFTP_TRUNCATE=139
    SSH_SPACE=140
    SSH_SEMICOLON=141
    SSH_CRLF=142
    SSH_EXPRESSION=143
    JOB_SPACE=144
    JOB_SEMICOLON=145
    JOB_EQUAL=146
    JOB_CRLF=147
    JOB_CREATE=148
    JOB_SHOW=149
    JOB_SET=150
    JOB_START=151
    JOB_WAIT=152
    JOB_SHUTDOWN=153
    JOB_ABORT=154
    JOB_TIMER=155
    JOB_REGISTER=156
    JOB_DEREGISTER=157
    JOB_WORKER=158
    JOB_MANGER=159
    JOB_ON=160
    JOB_OFF=161
    JOB_TO=162
    JOB_EXPRESSION=163
    COMPARE_SPACE=164
    COMPARE_SEMICOLON=165
    COMPARE_EQUAL=166
    COMPARE_CRLF=167
    COMPARE_SET=168
    COMPARE_UNSET=169
    COMPARE_MASK=170
    COMPARE_NOMASK=171
    COMPARE_MASKLINE=172
    COMPARE_NOMASKLINE=173
    COMPARE_CASE=174
    COMPARE_NOCASE=175
    COMPARE_IGBLANK=176
    COMPARE_NOIGBLANK=177
    COMPARE_TRIM=178
    COMPARE_NOTRIM=179
    COMPARE_OUTPUT=180
    COMPARE_CONSOLE=181
    COMPARE_DIFFFILE=182
    COMPARE_SKIPLINE=183
    COMPARE_NOSKIPLINE=184
    COMPARE_RESET=185
    COMPARE_ALGORITHM=186
    COMPARE_ENCODING=187
    COMPARE_WORK=188
    COMPARE_REFERENCE=189
    COMPARE_LCS=190
    COMPARE_MYERS=191
    COMPARE_EXPRESSION=192
    DATA_SPACE=193
    DATA_SEMICOLON=194
    DATA_SET=195
    DATA_SEEDFILE=196
    DATA_DIR=197
    DATA_CREATE=198
    DATA_FILE=199
    DATA_FILETYPE=200
    DATA_ROWS=201
    DATA_INT=202
    DATA_COMMA=203
    DATACOLUMN_OPEN=204
    DATA_CONVERT=205
    DATA_FROM=206
    DATA_EXPRESSION=207
    DATACOLUMN_EXPRESSION=208
    DATACOLUMN_SPACE=209
    DATACOLUMN_CLOSE=210
    HELP_SPACE=211
    HELP_COMMAND=212
    HELP_CRLF=213
    HELP_SEMICOLON=214

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.11.1")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None




    class ProgContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def command(self):
            return self.getTypedRuleContext(APIParser.CommandContext,0)


        def EOF(self):
            return self.getToken(APIParser.EOF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_prog

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitProg" ):
                return visitor.visitProg(self)
            else:
                return visitor.visitChildren(self)




    def prog(self):

        localctx = APIParser.ProgContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_prog)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 80
            self.command()
            self.state = 81
            self.match(APIParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CommandContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def baseCommand(self):
            return self.getTypedRuleContext(APIParser.BaseCommandContext,0)


        def http(self):
            return self.getTypedRuleContext(APIParser.HttpContext,0)


        def EOF(self):
            return self.getToken(APIParser.EOF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_command

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitCommand" ):
                return visitor.visitCommand(self)
            else:
                return visitor.visitChildren(self)




    def command(self):

        localctx = APIParser.CommandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_command)
        try:
            self.state = 86
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]:
                self.enterOuterAlt(localctx, 1)
                self.state = 83
                self.baseCommand()
                pass
            elif token in [1]:
                self.enterOuterAlt(localctx, 2)
                self.state = 84
                self.http()
                pass
            elif token in [-1]:
                self.enterOuterAlt(localctx, 3)
                self.state = 85
                self.match(APIParser.EOF)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HTTP_OPEN(self):
            return self.getToken(APIParser.HTTP_OPEN, 0)

        def httpMessage(self):
            return self.getTypedRuleContext(APIParser.HttpMessageContext,0)


        def HTTP_CLOSE(self):
            return self.getToken(APIParser.HTTP_CLOSE, 0)

        def EOF(self):
            return self.getToken(APIParser.EOF, 0)

        def CRLF(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.CRLF)
            else:
                return self.getToken(APIParser.CRLF, i)

        def getRuleIndex(self):
            return APIParser.RULE_http

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttp" ):
                return visitor.visitHttp(self)
            else:
                return visitor.visitChildren(self)




    def http(self):

        localctx = APIParser.HttpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_http)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 88
            self.match(APIParser.HTTP_OPEN)
            self.state = 92
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==5:
                self.state = 89
                self.match(APIParser.CRLF)
                self.state = 94
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 95
            self.httpMessage()
            self.state = 96
            _la = self._input.LA(1)
            if not(_la==-1 or _la==47):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMessageContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpRequestLine(self):
            return self.getTypedRuleContext(APIParser.HttpRequestLineContext,0)


        def httpHeaderFields(self):
            return self.getTypedRuleContext(APIParser.HttpHeaderFieldsContext,0)


        def httpMessageBody(self):
            return self.getTypedRuleContext(APIParser.HttpMessageBodyContext,0)


        def getRuleIndex(self):
            return APIParser.RULE_httpMessage

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMessage" ):
                return visitor.visitHttpMessage(self)
            else:
                return visitor.visitChildren(self)




    def httpMessage(self):

        localctx = APIParser.HttpMessageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_httpMessage)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 98
            self.httpRequestLine()
            self.state = 99
            self.httpHeaderFields()
            self.state = 101
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180148383141330976) != 0:
                self.state = 100
                self.httpMessageBody()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpRequestLineContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpMethod(self):
            return self.getTypedRuleContext(APIParser.HttpMethodContext,0)


        def httpRequestTarget(self):
            return self.getTypedRuleContext(APIParser.HttpRequestTargetContext,0)


        def getRuleIndex(self):
            return APIParser.RULE_httpRequestLine

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpRequestLine" ):
                return visitor.visitHttpRequestLine(self)
            else:
                return visitor.visitChildren(self)




    def httpRequestLine(self):

        localctx = APIParser.HttpRequestLineContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_httpRequestLine)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.httpMethod()
            self.state = 104
            self.httpRequestTarget()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMethodContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpMethod(self):
            return self.getToken(APIParser.HttpMethod, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpMethod

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMethod" ):
                return visitor.visitHttpMethod(self)
            else:
                return visitor.visitChildren(self)




    def httpMethod(self):

        localctx = APIParser.HttpMethodContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_httpMethod)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 106
            self.match(APIParser.HttpMethod)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpRequestTargetContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpRequestTarget(self):
            return self.getToken(APIParser.HttpRequestTarget, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpRequestTarget

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpRequestTarget" ):
                return visitor.visitHttpRequestTarget(self)
            else:
                return visitor.visitChildren(self)




    def httpRequestTarget(self):

        localctx = APIParser.HttpRequestTargetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_httpRequestTarget)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 108
            self.match(APIParser.HttpRequestTarget)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpHeaderFieldsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpHeaderField(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpHeaderFieldContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpHeaderFieldContext,i)


        def getRuleIndex(self):
            return APIParser.RULE_httpHeaderFields

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpHeaderFields" ):
                return visitor.visitHttpHeaderFields(self)
            else:
                return visitor.visitChildren(self)




    def httpHeaderFields(self):

        localctx = APIParser.HttpHeaderFieldsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_httpHeaderFields)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 113
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==49:
                self.state = 110
                self.httpHeaderField()
                self.state = 115
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpHeaderFieldContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpHeaderFieldName(self):
            return self.getTypedRuleContext(APIParser.HttpHeaderFieldNameContext,0)


        def FIELD_COLON(self):
            return self.getToken(APIParser.FIELD_COLON, 0)

        def httpHeaderFieldValue(self):
            return self.getTypedRuleContext(APIParser.HttpHeaderFieldValueContext,0)


        def getRuleIndex(self):
            return APIParser.RULE_httpHeaderField

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpHeaderField" ):
                return visitor.visitHttpHeaderField(self)
            else:
                return visitor.visitChildren(self)




    def httpHeaderField(self):

        localctx = APIParser.HttpHeaderFieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_httpHeaderField)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 116
            self.httpHeaderFieldName()
            self.state = 117
            self.match(APIParser.FIELD_COLON)
            self.state = 118
            self.httpHeaderFieldValue()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpHeaderFieldNameContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpHeaderFieldName(self):
            return self.getToken(APIParser.HttpHeaderFieldName, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpHeaderFieldName

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpHeaderFieldName" ):
                return visitor.visitHttpHeaderFieldName(self)
            else:
                return visitor.visitChildren(self)




    def httpHeaderFieldName(self):

        localctx = APIParser.HttpHeaderFieldNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_httpHeaderFieldName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 120
            self.match(APIParser.HttpHeaderFieldName)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpHeaderFieldValueContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpHeaderFieldValue(self):
            return self.getToken(APIParser.HttpHeaderFieldValue, 0)

        def HttpHeaderFieldValueEnd(self):
            return self.getToken(APIParser.HttpHeaderFieldValueEnd, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpHeaderFieldValue

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpHeaderFieldValue" ):
                return visitor.visitHttpHeaderFieldValue(self)
            else:
                return visitor.visitChildren(self)




    def httpHeaderFieldValue(self):

        localctx = APIParser.HttpHeaderFieldValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_httpHeaderFieldValue)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 122
            self.match(APIParser.HttpHeaderFieldValue)
            self.state = 123
            self.match(APIParser.HttpHeaderFieldValueEnd)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMessageBodyContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpMultipart(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpMultipartContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpMultipartContext,i)


        def httpMessageBodyContent(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpMessageBodyContentContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpMessageBodyContentContext,i)


        def getRuleIndex(self):
            return APIParser.RULE_httpMessageBody

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMessageBody" ):
                return visitor.visitHttpMessageBody(self)
            else:
                return visitor.visitChildren(self)




    def httpMessageBody(self):

        localctx = APIParser.HttpMessageBodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_httpMessageBody)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 127
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [55]:
                    self.state = 125
                    self.httpMultipart()
                    pass
                elif token in [5, 42, 57]:
                    self.state = 126
                    self.httpMessageBodyContent()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 129 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (((_la) & ~0x3f) == 0 and ((1 << _la) & 180148383141330976) != 0):
                    break

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMultipartContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpMultipartBoundaryEnd(self):
            return self.getToken(APIParser.HttpMultipartBoundaryEnd, 0)

        def httpMultipartBoundary(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpMultipartBoundaryContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpMultipartBoundaryContext,i)


        def getRuleIndex(self):
            return APIParser.RULE_httpMultipart

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMultipart" ):
                return visitor.visitHttpMultipart(self)
            else:
                return visitor.visitChildren(self)




    def httpMultipart(self):

        localctx = APIParser.HttpMultipartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_httpMultipart)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 132 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 131
                self.httpMultipartBoundary()
                self.state = 134 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==55):
                    break

            self.state = 136
            self.match(APIParser.HttpMultipartBoundaryEnd)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMultipartBoundaryContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpBoundaryDelimiter(self):
            return self.getTypedRuleContext(APIParser.HttpBoundaryDelimiterContext,0)


        def httpHeaderFields(self):
            return self.getTypedRuleContext(APIParser.HttpHeaderFieldsContext,0)


        def httpMessageBodyContent(self):
            return self.getTypedRuleContext(APIParser.HttpMessageBodyContentContext,0)


        def getRuleIndex(self):
            return APIParser.RULE_httpMultipartBoundary

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMultipartBoundary" ):
                return visitor.visitHttpMultipartBoundary(self)
            else:
                return visitor.visitChildren(self)




    def httpMultipartBoundary(self):

        localctx = APIParser.HttpMultipartBoundaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_httpMultipartBoundary)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 138
            self.httpBoundaryDelimiter()
            self.state = 139
            self.httpHeaderFields()
            self.state = 140
            self.httpMessageBodyContent()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpBoundaryDelimiterContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpMultipartBoundary(self):
            return self.getToken(APIParser.HttpMultipartBoundary, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpBoundaryDelimiter

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpBoundaryDelimiter" ):
                return visitor.visitHttpBoundaryDelimiter(self)
            else:
                return visitor.visitChildren(self)




    def httpBoundaryDelimiter(self):

        localctx = APIParser.HttpBoundaryDelimiterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_httpBoundaryDelimiter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 142
            self.match(APIParser.HttpMultipartBoundary)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMessageBodyContentContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def httpMessageBodyOperate(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpMessageBodyOperateContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpMessageBodyOperateContext,i)


        def httpMessageBodyOther(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(APIParser.HttpMessageBodyOtherContext)
            else:
                return self.getTypedRuleContext(APIParser.HttpMessageBodyOtherContext,i)


        def getRuleIndex(self):
            return APIParser.RULE_httpMessageBodyContent

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMessageBodyContent" ):
                return visitor.visitHttpMessageBodyContent(self)
            else:
                return visitor.visitChildren(self)




    def httpMessageBodyContent(self):

        localctx = APIParser.HttpMessageBodyContentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_httpMessageBodyContent)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 146
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [57]:
                        self.state = 144
                        self.httpMessageBodyOperate()
                        pass
                    elif token in [5, 42]:
                        self.state = 145
                        self.httpMessageBodyOther()
                        pass
                    else:
                        raise NoViableAltException(self)


                else:
                    raise NoViableAltException(self)
                self.state = 148 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,8,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMessageBodyOperateContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HttpMessageBodyOperate(self):
            return self.getToken(APIParser.HttpMessageBodyOperate, 0)

        def getRuleIndex(self):
            return APIParser.RULE_httpMessageBodyOperate

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMessageBodyOperate" ):
                return visitor.visitHttpMessageBodyOperate(self)
            else:
                return visitor.visitChildren(self)




    def httpMessageBodyOperate(self):

        localctx = APIParser.HttpMessageBodyOperateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_httpMessageBodyOperate)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 150
            self.match(APIParser.HttpMessageBodyOperate)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HttpMessageBodyOtherContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def String(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.String)
            else:
                return self.getToken(APIParser.String, i)

        def CRLF(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.CRLF)
            else:
                return self.getToken(APIParser.CRLF, i)

        def getRuleIndex(self):
            return APIParser.RULE_httpMessageBodyOther

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHttpMessageBodyOther" ):
                return visitor.visitHttpMessageBodyOther(self)
            else:
                return visitor.visitChildren(self)




    def httpMessageBodyOther(self):

        localctx = APIParser.HttpMessageBodyOtherContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_httpMessageBodyOther)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 153 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 152
                    _la = self._input.LA(1)
                    if not(_la==5 or _la==42):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()

                else:
                    raise NoViableAltException(self)
                self.state = 155 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,9,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BaseCommandContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def assert_(self):
            return self.getTypedRuleContext(APIParser.AssertContext,0)


        def load(self):
            return self.getTypedRuleContext(APIParser.LoadContext,0)


        def host(self):
            return self.getTypedRuleContext(APIParser.HostContext,0)


        def start(self):
            return self.getTypedRuleContext(APIParser.StartContext,0)


        def loop(self):
            return self.getTypedRuleContext(APIParser.LoopContext,0)


        def if_(self):
            return self.getTypedRuleContext(APIParser.IfContext,0)


        def endif(self):
            return self.getTypedRuleContext(APIParser.EndifContext,0)


        def whenever(self):
            return self.getTypedRuleContext(APIParser.WheneverContext,0)


        def set_(self):
            return self.getTypedRuleContext(APIParser.SetContext,0)


        def use(self):
            return self.getTypedRuleContext(APIParser.UseContext,0)


        def exit(self):
            return self.getTypedRuleContext(APIParser.ExitContext,0)


        def quit(self):
            return self.getTypedRuleContext(APIParser.QuitContext,0)


        def sleep(self):
            return self.getTypedRuleContext(APIParser.SleepContext,0)


        def spool(self):
            return self.getTypedRuleContext(APIParser.SpoolContext,0)


        def script(self):
            return self.getTypedRuleContext(APIParser.ScriptContext,0)


        def echo(self):
            return self.getTypedRuleContext(APIParser.EchoContext,0)


        def ssh(self):
            return self.getTypedRuleContext(APIParser.SshContext,0)


        def job(self):
            return self.getTypedRuleContext(APIParser.JobContext,0)


        def compare(self):
            return self.getTypedRuleContext(APIParser.CompareContext,0)


        def data(self):
            return self.getTypedRuleContext(APIParser.DataContext,0)


        def help_(self):
            return self.getTypedRuleContext(APIParser.HelpContext,0)


        def getRuleIndex(self):
            return APIParser.RULE_baseCommand

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBaseCommand" ):
                return visitor.visitBaseCommand(self)
            else:
                return visitor.visitChildren(self)




    def baseCommand(self):

        localctx = APIParser.BaseCommandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_baseCommand)
        try:
            self.state = 178
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [26]:
                self.enterOuterAlt(localctx, 1)
                self.state = 157
                self.assert_()
                pass
            elif token in [28]:
                self.enterOuterAlt(localctx, 2)
                self.state = 158
                self.load()
                pass
            elif token in [29]:
                self.enterOuterAlt(localctx, 3)
                self.state = 159
                self.host()
                pass
            elif token in [27]:
                self.enterOuterAlt(localctx, 4)
                self.state = 160
                self.start()
                pass
            elif token in [34]:
                self.enterOuterAlt(localctx, 5)
                self.state = 161
                self.loop()
                pass
            elif token in [31]:
                self.enterOuterAlt(localctx, 6)
                self.state = 162
                self.if_()
                pass
            elif token in [32]:
                self.enterOuterAlt(localctx, 7)
                self.state = 163
                self.endif()
                pass
            elif token in [35]:
                self.enterOuterAlt(localctx, 8)
                self.state = 164
                self.whenever()
                pass
            elif token in [33]:
                self.enterOuterAlt(localctx, 9)
                self.state = 165
                self.set_()
                pass
            elif token in [24]:
                self.enterOuterAlt(localctx, 10)
                self.state = 166
                self.use()
                pass
            elif token in [20]:
                self.enterOuterAlt(localctx, 11)
                self.state = 167
                self.exit()
                pass
            elif token in [21]:
                self.enterOuterAlt(localctx, 12)
                self.state = 168
                self.quit()
                pass
            elif token in [23]:
                self.enterOuterAlt(localctx, 13)
                self.state = 169
                self.sleep()
                pass
            elif token in [22]:
                self.enterOuterAlt(localctx, 14)
                self.state = 170
                self.spool()
                pass
            elif token in [2]:
                self.enterOuterAlt(localctx, 15)
                self.state = 171
                self.script()
                pass
            elif token in [25]:
                self.enterOuterAlt(localctx, 16)
                self.state = 172
                self.echo()
                pass
            elif token in [36]:
                self.enterOuterAlt(localctx, 17)
                self.state = 173
                self.ssh()
                pass
            elif token in [37]:
                self.enterOuterAlt(localctx, 18)
                self.state = 174
                self.job()
                pass
            elif token in [38]:
                self.enterOuterAlt(localctx, 19)
                self.state = 175
                self.compare()
                pass
            elif token in [39]:
                self.enterOuterAlt(localctx, 20)
                self.state = 176
                self.data()
                pass
            elif token in [30]:
                self.enterOuterAlt(localctx, 21)
                self.state = 177
                self.help_()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExitContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EXIT(self):
            return self.getToken(APIParser.EXIT, 0)

        def INT(self):
            return self.getToken(APIParser.INT, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_exit

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExit" ):
                return visitor.visitExit(self)
            else:
                return visitor.visitChildren(self)




    def exit(self):

        localctx = APIParser.ExitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_exit)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 180
            self.match(APIParser.EXIT)
            self.state = 182
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==40:
                self.state = 181
                self.match(APIParser.INT)


            self.state = 185
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 184
                self.match(APIParser.SEMICOLON)


            self.state = 188
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 187
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QuitContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def QUIT(self):
            return self.getToken(APIParser.QUIT, 0)

        def INT(self):
            return self.getToken(APIParser.INT, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_quit

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitQuit" ):
                return visitor.visitQuit(self)
            else:
                return visitor.visitChildren(self)




    def quit(self):

        localctx = APIParser.QuitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_quit)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 190
            self.match(APIParser.QUIT)
            self.state = 192
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==40:
                self.state = 191
                self.match(APIParser.INT)


            self.state = 195
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 194
                self.match(APIParser.SEMICOLON)


            self.state = 198
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 197
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class UseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def USE(self):
            return self.getToken(APIParser.USE, 0)

        def USE_API(self):
            return self.getToken(APIParser.USE_API, 0)

        def USE_SQL(self):
            return self.getToken(APIParser.USE_SQL, 0)

        def USE_SEMICOLON(self):
            return self.getToken(APIParser.USE_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_use

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitUse" ):
                return visitor.visitUse(self)
            else:
                return visitor.visitChildren(self)




    def use(self):

        localctx = APIParser.UseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_use)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 200
            self.match(APIParser.USE)
            self.state = 201
            _la = self._input.LA(1)
            if not(_la==113 or _la==114):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 203
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==116:
                self.state = 202
                self.match(APIParser.USE_SEMICOLON)


            self.state = 206
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 205
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SleepContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SLEEP(self):
            return self.getToken(APIParser.SLEEP, 0)

        def INT(self):
            return self.getToken(APIParser.INT, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_sleep

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSleep" ):
                return visitor.visitSleep(self)
            else:
                return visitor.visitChildren(self)




    def sleep(self):

        localctx = APIParser.SleepContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_sleep)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 208
            self.match(APIParser.SLEEP)
            self.state = 209
            self.match(APIParser.INT)
            self.state = 211
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 210
                self.match(APIParser.SEMICOLON)


            self.state = 214
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 213
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StartContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def START(self):
            return self.getToken(APIParser.START, 0)

        def START_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.START_EXPRESSION)
            else:
                return self.getToken(APIParser.START_EXPRESSION, i)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_start

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStart" ):
                return visitor.visitStart(self)
            else:
                return visitor.visitChildren(self)




    def start(self):

        localctx = APIParser.StartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_start)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 216
            self.match(APIParser.START)
            self.state = 218 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 217
                self.match(APIParser.START_EXPRESSION)
                self.state = 220 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==81):
                    break

            self.state = 223
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 222
                self.match(APIParser.SEMICOLON)


            self.state = 226
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 225
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LoadContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LOAD(self):
            return self.getToken(APIParser.LOAD, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def LOAD_PLUGIN(self):
            return self.getToken(APIParser.LOAD_PLUGIN, 0)

        def LOAD_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_EXPRESSION)
            else:
                return self.getToken(APIParser.LOAD_EXPRESSION, i)

        def LOAD_MAP(self):
            return self.getToken(APIParser.LOAD_MAP, 0)

        def LOAD_JDBCDRIVER(self):
            return self.getToken(APIParser.LOAD_JDBCDRIVER, 0)

        def LOAD_JDBCCLASS(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_JDBCCLASS)
            else:
                return self.getToken(APIParser.LOAD_JDBCCLASS, i)

        def LOAD_EQUAL(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_EQUAL)
            else:
                return self.getToken(APIParser.LOAD_EQUAL, i)

        def LOAD_JDBCFILE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_JDBCFILE)
            else:
                return self.getToken(APIParser.LOAD_JDBCFILE, i)

        def LOAD_JDBCNAME(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_JDBCNAME)
            else:
                return self.getToken(APIParser.LOAD_JDBCNAME, i)

        def LOAD_JDBCPROP(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_JDBCPROP)
            else:
                return self.getToken(APIParser.LOAD_JDBCPROP, i)

        def LOAD_JDBCURL(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.LOAD_JDBCURL)
            else:
                return self.getToken(APIParser.LOAD_JDBCURL, i)

        def getRuleIndex(self):
            return APIParser.RULE_load

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLoad" ):
                return visitor.visitLoad(self)
            else:
                return visitor.visitChildren(self)




    def load(self):

        localctx = APIParser.LoadContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_load)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 228
            self.match(APIParser.LOAD)
            self.state = 254
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [70]:
                self.state = 229
                self.match(APIParser.LOAD_PLUGIN)
                self.state = 230
                self.match(APIParser.LOAD_EXPRESSION)
                pass
            elif token in [71]:
                self.state = 231
                self.match(APIParser.LOAD_MAP)
                self.state = 232
                self.match(APIParser.LOAD_EXPRESSION)
                pass
            elif token in [72]:
                self.state = 233
                self.match(APIParser.LOAD_JDBCDRIVER)
                self.state = 251
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 31) != 0:
                    self.state = 249
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [74]:
                        self.state = 234
                        self.match(APIParser.LOAD_JDBCCLASS)
                        self.state = 235
                        self.match(APIParser.LOAD_EQUAL)
                        self.state = 236
                        self.match(APIParser.LOAD_EXPRESSION)
                        pass
                    elif token in [73]:
                        self.state = 237
                        self.match(APIParser.LOAD_JDBCFILE)
                        self.state = 238
                        self.match(APIParser.LOAD_EQUAL)
                        self.state = 239
                        self.match(APIParser.LOAD_EXPRESSION)
                        pass
                    elif token in [75]:
                        self.state = 240
                        self.match(APIParser.LOAD_JDBCNAME)
                        self.state = 241
                        self.match(APIParser.LOAD_EQUAL)
                        self.state = 242
                        self.match(APIParser.LOAD_EXPRESSION)
                        pass
                    elif token in [76]:
                        self.state = 243
                        self.match(APIParser.LOAD_JDBCPROP)
                        self.state = 244
                        self.match(APIParser.LOAD_EQUAL)
                        self.state = 245
                        self.match(APIParser.LOAD_EXPRESSION)
                        pass
                    elif token in [77]:
                        self.state = 246
                        self.match(APIParser.LOAD_JDBCURL)
                        self.state = 247
                        self.match(APIParser.LOAD_EQUAL)
                        self.state = 248
                        self.match(APIParser.LOAD_EXPRESSION)
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 253
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            else:
                raise NoViableAltException(self)

            self.state = 257
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 256
                self.match(APIParser.SEMICOLON)


            self.state = 260
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 259
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AssertContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ASSERT(self):
            return self.getToken(APIParser.ASSERT, 0)

        def ASSERT_EXPRESSION(self):
            return self.getToken(APIParser.ASSERT_EXPRESSION, 0)

        def ASSERT_COMMA(self):
            return self.getToken(APIParser.ASSERT_COMMA, 0)

        def ASSERT_NAME(self):
            return self.getToken(APIParser.ASSERT_NAME, 0)

        def ASSERT_SEMICOLON(self):
            return self.getToken(APIParser.ASSERT_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_assert

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAssert" ):
                return visitor.visitAssert(self)
            else:
                return visitor.visitChildren(self)




    def assert_(self):

        localctx = APIParser.AssertContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_assert)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 262
            self.match(APIParser.ASSERT)
            self.state = 263
            self.match(APIParser.ASSERT_EXPRESSION)
            self.state = 266
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==66:
                self.state = 264
                self.match(APIParser.ASSERT_COMMA)
                self.state = 265
                self.match(APIParser.ASSERT_NAME)


            self.state = 269
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==67:
                self.state = 268
                self.match(APIParser.ASSERT_SEMICOLON)


            self.state = 272
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 271
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HostContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HOST(self):
            return self.getToken(APIParser.HOST, 0)

        def HOST_EXPRESSION(self):
            return self.getToken(APIParser.HOST_EXPRESSION, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_host

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHost" ):
                return visitor.visitHost(self)
            else:
                return visitor.visitChildren(self)




    def host(self):

        localctx = APIParser.HostContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_host)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self.match(APIParser.HOST)
            self.state = 275
            self.match(APIParser.HOST_EXPRESSION)
            self.state = 277
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 276
                self.match(APIParser.SEMICOLON)


            self.state = 280
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 279
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LoopContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LOOP(self):
            return self.getToken(APIParser.LOOP, 0)

        def LOOP_BREAK(self):
            return self.getToken(APIParser.LOOP_BREAK, 0)

        def LOOP_END(self):
            return self.getToken(APIParser.LOOP_END, 0)

        def LOOP_CONTINUE(self):
            return self.getToken(APIParser.LOOP_CONTINUE, 0)

        def LOOP_BEGIN(self):
            return self.getToken(APIParser.LOOP_BEGIN, 0)

        def LOOP_UNTIL(self):
            return self.getToken(APIParser.LOOP_UNTIL, 0)

        def LOOP_EXPRESSION(self):
            return self.getToken(APIParser.LOOP_EXPRESSION, 0)

        def LOOP_SEMICOLON(self):
            return self.getToken(APIParser.LOOP_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_loop

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLoop" ):
                return visitor.visitLoop(self)
            else:
                return visitor.visitChildren(self)




    def loop(self):

        localctx = APIParser.LoopContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_loop)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 282
            self.match(APIParser.LOOP)
            self.state = 289
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [96]:
                self.state = 283
                self.match(APIParser.LOOP_BREAK)
                pass
            elif token in [97]:
                self.state = 284
                self.match(APIParser.LOOP_END)
                pass
            elif token in [98]:
                self.state = 285
                self.match(APIParser.LOOP_CONTINUE)
                pass
            elif token in [92]:
                self.state = 286
                self.match(APIParser.LOOP_BEGIN)
                self.state = 287
                self.match(APIParser.LOOP_UNTIL)
                self.state = 288
                self.match(APIParser.LOOP_EXPRESSION)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 292
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==90:
                self.state = 291
                self.match(APIParser.LOOP_SEMICOLON)


            self.state = 295
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 294
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IfContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IF(self):
            return self.getToken(APIParser.IF, 0)

        def IF_EXPRESSION(self):
            return self.getToken(APIParser.IF_EXPRESSION, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_if

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIf" ):
                return visitor.visitIf(self)
            else:
                return visitor.visitChildren(self)




    def if_(self):

        localctx = APIParser.IfContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_if)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 297
            self.match(APIParser.IF)
            self.state = 298
            self.match(APIParser.IF_EXPRESSION)
            self.state = 300
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 299
                self.match(APIParser.SEMICOLON)


            self.state = 303
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 302
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EndifContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ENDIF(self):
            return self.getToken(APIParser.ENDIF, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_endif

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEndif" ):
                return visitor.visitEndif(self)
            else:
                return visitor.visitChildren(self)




    def endif(self):

        localctx = APIParser.EndifContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_endif)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 305
            self.match(APIParser.ENDIF)
            self.state = 307
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 306
                self.match(APIParser.SEMICOLON)


            self.state = 310
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 309
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WheneverContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WHENEVER(self):
            return self.getToken(APIParser.WHENEVER, 0)

        def WHENEVER_ERROR(self):
            return self.getToken(APIParser.WHENEVER_ERROR, 0)

        def WHENEVER_CONTINUE(self):
            return self.getToken(APIParser.WHENEVER_CONTINUE, 0)

        def WHENEVER_SEMICOLON(self):
            return self.getToken(APIParser.WHENEVER_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def WHENEVER_EXIT(self):
            return self.getToken(APIParser.WHENEVER_EXIT, 0)

        def WHENEVER_EXITCODE(self):
            return self.getToken(APIParser.WHENEVER_EXITCODE, 0)

        def getRuleIndex(self):
            return APIParser.RULE_whenever

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhenever" ):
                return visitor.visitWhenever(self)
            else:
                return visitor.visitChildren(self)




    def whenever(self):

        localctx = APIParser.WheneverContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_whenever)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 312
            self.match(APIParser.WHENEVER)
            self.state = 313
            self.match(APIParser.WHENEVER_ERROR)
            self.state = 317
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [105]:
                self.state = 314
                self.match(APIParser.WHENEVER_CONTINUE)
                pass
            elif token in [106]:
                self.state = 315
                self.match(APIParser.WHENEVER_EXIT)
                self.state = 316
                self.match(APIParser.WHENEVER_EXITCODE)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 320
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==104:
                self.state = 319
                self.match(APIParser.WHENEVER_SEMICOLON)


            self.state = 323
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 322
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SpoolContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SPOOL(self):
            return self.getToken(APIParser.SPOOL, 0)

        def String(self):
            return self.getToken(APIParser.String, 0)

        def SEMICOLON(self):
            return self.getToken(APIParser.SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_spool

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSpool" ):
                return visitor.visitSpool(self)
            else:
                return visitor.visitChildren(self)




    def spool(self):

        localctx = APIParser.SpoolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_spool)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 325
            self.match(APIParser.SPOOL)
            self.state = 326
            self.match(APIParser.String)
            self.state = 328
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 327
                self.match(APIParser.SEMICOLON)


            self.state = 331
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 330
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EchoContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ECHO_OPEN(self):
            return self.getToken(APIParser.ECHO_OPEN, 0)

        def EchoBlock(self):
            return self.getToken(APIParser.EchoBlock, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def EOF(self):
            return self.getToken(APIParser.EOF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_echo

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEcho" ):
                return visitor.visitEcho(self)
            else:
                return visitor.visitChildren(self)




    def echo(self):

        localctx = APIParser.EchoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_echo)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 333
            self.match(APIParser.ECHO_OPEN)
            self.state = 334
            self.match(APIParser.EchoBlock)
            self.state = 336
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
            if la_ == 1:
                self.state = 335
                _la = self._input.LA(1)
                if not(_la==-1 or _la==5):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ScriptContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SCRIPT_OPEN(self):
            return self.getToken(APIParser.SCRIPT_OPEN, 0)

        def ScriptBlock(self):
            return self.getToken(APIParser.ScriptBlock, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_script

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitScript" ):
                return visitor.visitScript(self)
            else:
                return visitor.visitChildren(self)




    def script(self):

        localctx = APIParser.ScriptContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_script)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 338
            self.match(APIParser.SCRIPT_OPEN)
            self.state = 339
            self.match(APIParser.ScriptBlock)
            self.state = 341
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 340
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SetContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SET(self):
            return self.getToken(APIParser.SET, 0)

        def SET_AT(self):
            return self.getToken(APIParser.SET_AT, 0)

        def SET_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.SET_EXPRESSION)
            else:
                return self.getToken(APIParser.SET_EXPRESSION, i)

        def SET_SEMICOLON(self):
            return self.getToken(APIParser.SET_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_set

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSet" ):
                return visitor.visitSet(self)
            else:
                return visitor.visitChildren(self)




    def set_(self):

        localctx = APIParser.SetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_set)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 343
            self.match(APIParser.SET)
            self.state = 345
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==111:
                self.state = 344
                self.match(APIParser.SET_AT)


            self.state = 350
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==109:
                self.state = 347
                self.match(APIParser.SET_EXPRESSION)
                self.state = 352
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 354
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==110:
                self.state = 353
                self.match(APIParser.SET_SEMICOLON)


            self.state = 357
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 356
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SshContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SSH(self):
            return self.getToken(APIParser.SSH, 0)

        def SSH_SEMICOLON(self):
            return self.getToken(APIParser.SSH_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def SSH_CONNECT(self):
            return self.getToken(APIParser.SSH_CONNECT, 0)

        def SSH_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.SSH_EXPRESSION)
            else:
                return self.getToken(APIParser.SSH_EXPRESSION, i)

        def SSH_WITH(self):
            return self.getToken(APIParser.SSH_WITH, 0)

        def SSH_USER(self):
            return self.getToken(APIParser.SSH_USER, 0)

        def SSH_KEYFILE(self):
            return self.getToken(APIParser.SSH_KEYFILE, 0)

        def SSH_EXECUTE(self):
            return self.getToken(APIParser.SSH_EXECUTE, 0)

        def SSH_DISCONNECT(self):
            return self.getToken(APIParser.SSH_DISCONNECT, 0)

        def SSH_SAVE(self):
            return self.getToken(APIParser.SSH_SAVE, 0)

        def SSH_RESTORE(self):
            return self.getToken(APIParser.SSH_RESTORE, 0)

        def SFTP(self):
            return self.getToken(APIParser.SFTP, 0)

        def SSH_PASSWORD(self):
            return self.getToken(APIParser.SSH_PASSWORD, 0)

        def SFTP_CHMOD(self):
            return self.getToken(APIParser.SFTP_CHMOD, 0)

        def SSH_INT(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.SSH_INT)
            else:
                return self.getToken(APIParser.SSH_INT, i)

        def SFTP_GETCWD(self):
            return self.getToken(APIParser.SFTP_GETCWD, 0)

        def SFTP_CHDIR(self):
            return self.getToken(APIParser.SFTP_CHDIR, 0)

        def SFTP_CHOWN(self):
            return self.getToken(APIParser.SFTP_CHOWN, 0)

        def SFTP_MKDIR(self):
            return self.getToken(APIParser.SFTP_MKDIR, 0)

        def SFTP_GET(self):
            return self.getToken(APIParser.SFTP_GET, 0)

        def SFTP_PUT(self):
            return self.getToken(APIParser.SFTP_PUT, 0)

        def SFTP_REMOVE(self):
            return self.getToken(APIParser.SFTP_REMOVE, 0)

        def SFTP_RENAME(self):
            return self.getToken(APIParser.SFTP_RENAME, 0)

        def SFTP_LISTDIR(self):
            return self.getToken(APIParser.SFTP_LISTDIR, 0)

        def SFTP_TRUNCATE(self):
            return self.getToken(APIParser.SFTP_TRUNCATE, 0)

        def getRuleIndex(self):
            return APIParser.RULE_ssh

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSsh" ):
                return visitor.visitSsh(self)
            else:
                return visitor.visitChildren(self)




    def ssh(self):

        localctx = APIParser.SshContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_ssh)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 359
            self.match(APIParser.SSH)
            self.state = 419
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
            if la_ == 1:
                self.state = 360
                self.match(APIParser.SSH_CONNECT)
                self.state = 361
                self.match(APIParser.SSH_EXPRESSION)
                self.state = 362
                self.match(APIParser.SSH_WITH)
                self.state = 363
                self.match(APIParser.SSH_USER)
                self.state = 364
                self.match(APIParser.SSH_EXPRESSION)
                self.state = 365
                self.match(APIParser.SSH_KEYFILE)
                self.state = 366
                self.match(APIParser.SSH_EXPRESSION)
                pass

            elif la_ == 2:
                self.state = 367
                self.match(APIParser.SSH_CONNECT)
                self.state = 368
                self.match(APIParser.SSH_EXPRESSION)
                self.state = 369
                self.match(APIParser.SSH_WITH)
                self.state = 370
                self.match(APIParser.SSH_USER)
                self.state = 371
                self.match(APIParser.SSH_EXPRESSION)
                self.state = 374
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==122:
                    self.state = 372
                    self.match(APIParser.SSH_PASSWORD)
                    self.state = 373
                    self.match(APIParser.SSH_EXPRESSION)


                pass

            elif la_ == 3:
                self.state = 376
                self.match(APIParser.SSH_EXECUTE)
                self.state = 378 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 377
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 380 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==143):
                        break

                pass

            elif la_ == 4:
                self.state = 382
                self.match(APIParser.SSH_DISCONNECT)
                pass

            elif la_ == 5:
                self.state = 383
                self.match(APIParser.SSH_SAVE)
                self.state = 384
                self.match(APIParser.SSH_EXPRESSION)
                pass

            elif la_ == 6:
                self.state = 385
                self.match(APIParser.SSH_RESTORE)
                self.state = 386
                self.match(APIParser.SSH_EXPRESSION)
                pass

            elif la_ == 7:
                self.state = 387
                self.match(APIParser.SFTP)
                self.state = 417
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [129]:
                    self.state = 388
                    self.match(APIParser.SFTP_CHMOD)
                    self.state = 389
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 390
                    self.match(APIParser.SSH_INT)
                    pass
                elif token in [130]:
                    self.state = 391
                    self.match(APIParser.SFTP_GETCWD)
                    pass
                elif token in [131]:
                    self.state = 392
                    self.match(APIParser.SFTP_CHDIR)
                    self.state = 393
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [132]:
                    self.state = 394
                    self.match(APIParser.SFTP_CHOWN)
                    self.state = 395
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 396
                    self.match(APIParser.SSH_INT)
                    self.state = 397
                    self.match(APIParser.SSH_INT)
                    pass
                elif token in [133]:
                    self.state = 398
                    self.match(APIParser.SFTP_MKDIR)
                    self.state = 399
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 400
                    self.match(APIParser.SSH_INT)
                    pass
                elif token in [134]:
                    self.state = 401
                    self.match(APIParser.SFTP_GET)
                    self.state = 402
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 403
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [135]:
                    self.state = 404
                    self.match(APIParser.SFTP_PUT)
                    self.state = 405
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 406
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [136]:
                    self.state = 407
                    self.match(APIParser.SFTP_REMOVE)
                    self.state = 408
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [137]:
                    self.state = 409
                    self.match(APIParser.SFTP_RENAME)
                    self.state = 410
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 411
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [138]:
                    self.state = 412
                    self.match(APIParser.SFTP_LISTDIR)
                    self.state = 413
                    self.match(APIParser.SSH_EXPRESSION)
                    pass
                elif token in [139]:
                    self.state = 414
                    self.match(APIParser.SFTP_TRUNCATE)
                    self.state = 415
                    self.match(APIParser.SSH_EXPRESSION)
                    self.state = 416
                    self.match(APIParser.SSH_INT)
                    pass
                else:
                    raise NoViableAltException(self)

                pass


            self.state = 422
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==141:
                self.state = 421
                self.match(APIParser.SSH_SEMICOLON)


            self.state = 425
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 424
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JobContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def JOB(self):
            return self.getToken(APIParser.JOB, 0)

        def JOB_SEMICOLON(self):
            return self.getToken(APIParser.JOB_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def JOB_MANGER(self):
            return self.getToken(APIParser.JOB_MANGER, 0)

        def JOB_WAIT(self):
            return self.getToken(APIParser.JOB_WAIT, 0)

        def JOB_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.JOB_EXPRESSION)
            else:
                return self.getToken(APIParser.JOB_EXPRESSION, i)

        def JOB_SHOW(self):
            return self.getToken(APIParser.JOB_SHOW, 0)

        def JOB_ABORT(self):
            return self.getToken(APIParser.JOB_ABORT, 0)

        def JOB_SHUTDOWN(self):
            return self.getToken(APIParser.JOB_SHUTDOWN, 0)

        def JOB_TIMER(self):
            return self.getToken(APIParser.JOB_TIMER, 0)

        def JOB_START(self):
            return self.getToken(APIParser.JOB_START, 0)

        def JOB_DEREGISTER(self):
            return self.getToken(APIParser.JOB_DEREGISTER, 0)

        def JOB_WORKER(self):
            return self.getToken(APIParser.JOB_WORKER, 0)

        def JOB_REGISTER(self):
            return self.getToken(APIParser.JOB_REGISTER, 0)

        def JOB_TO(self):
            return self.getToken(APIParser.JOB_TO, 0)

        def JOB_SET(self):
            return self.getToken(APIParser.JOB_SET, 0)

        def JOB_CREATE(self):
            return self.getToken(APIParser.JOB_CREATE, 0)

        def JOB_ON(self):
            return self.getToken(APIParser.JOB_ON, 0)

        def JOB_OFF(self):
            return self.getToken(APIParser.JOB_OFF, 0)

        def JOB_EQUAL(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.JOB_EQUAL)
            else:
                return self.getToken(APIParser.JOB_EQUAL, i)

        def getRuleIndex(self):
            return APIParser.RULE_job

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJob" ):
                return visitor.visitJob(self)
            else:
                return visitor.visitChildren(self)




    def job(self):

        localctx = APIParser.JobContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_job)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 427
            self.match(APIParser.JOB)
            self.state = 467
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [159]:
                self.state = 428
                self.match(APIParser.JOB_MANGER)
                self.state = 429
                _la = self._input.LA(1)
                if not(_la==160 or _la==161):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [152]:
                self.state = 430
                self.match(APIParser.JOB_WAIT)
                self.state = 431
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [149]:
                self.state = 432
                self.match(APIParser.JOB_SHOW)
                self.state = 433
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [154]:
                self.state = 434
                self.match(APIParser.JOB_ABORT)
                self.state = 435
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [153]:
                self.state = 436
                self.match(APIParser.JOB_SHUTDOWN)
                self.state = 437
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [155]:
                self.state = 438
                self.match(APIParser.JOB_TIMER)
                self.state = 439
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [151]:
                self.state = 440
                self.match(APIParser.JOB_START)
                self.state = 441
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [157]:
                self.state = 442
                self.match(APIParser.JOB_DEREGISTER)
                self.state = 443
                self.match(APIParser.JOB_WORKER)
                pass
            elif token in [156]:
                self.state = 444
                self.match(APIParser.JOB_REGISTER)
                self.state = 445
                self.match(APIParser.JOB_WORKER)
                self.state = 446
                self.match(APIParser.JOB_TO)
                self.state = 447
                self.match(APIParser.JOB_EXPRESSION)
                pass
            elif token in [150]:
                self.state = 448
                self.match(APIParser.JOB_SET)
                self.state = 449
                self.match(APIParser.JOB_EXPRESSION)
                self.state = 453 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 450
                    self.match(APIParser.JOB_EXPRESSION)
                    self.state = 451
                    self.match(APIParser.JOB_EQUAL)
                    self.state = 452
                    self.match(APIParser.JOB_EXPRESSION)
                    self.state = 455 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==163):
                        break

                pass
            elif token in [148]:
                self.state = 457
                self.match(APIParser.JOB_CREATE)
                self.state = 458
                self.match(APIParser.JOB_EXPRESSION)
                self.state = 464
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==163:
                    self.state = 459
                    self.match(APIParser.JOB_EXPRESSION)
                    self.state = 460
                    self.match(APIParser.JOB_EQUAL)
                    self.state = 461
                    self.match(APIParser.JOB_EXPRESSION)
                    self.state = 466
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            else:
                raise NoViableAltException(self)

            self.state = 470
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==145:
                self.state = 469
                self.match(APIParser.JOB_SEMICOLON)


            self.state = 473
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 472
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CompareContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def COMPARE(self):
            return self.getToken(APIParser.COMPARE, 0)

        def COMPARE_RESET(self):
            return self.getToken(APIParser.COMPARE_RESET, 0)

        def COMPARE_SEMICOLON(self):
            return self.getToken(APIParser.COMPARE_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def COMPARE_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_EXPRESSION)
            else:
                return self.getToken(APIParser.COMPARE_EXPRESSION, i)

        def COMPARE_MASKLINE(self):
            return self.getToken(APIParser.COMPARE_MASKLINE, 0)

        def COMPARE_EQUAL(self):
            return self.getToken(APIParser.COMPARE_EQUAL, 0)

        def COMPARE_NOMASKLINE(self):
            return self.getToken(APIParser.COMPARE_NOMASKLINE, 0)

        def COMPARE_SET(self):
            return self.getToken(APIParser.COMPARE_SET, 0)

        def COMPARE_OUTPUT(self):
            return self.getToken(APIParser.COMPARE_OUTPUT, 0)

        def COMPARE_ALGORITHM(self):
            return self.getToken(APIParser.COMPARE_ALGORITHM, 0)

        def COMPARE_ENCODING(self):
            return self.getToken(APIParser.COMPARE_ENCODING, 0)

        def COMPARE_SKIPLINE(self):
            return self.getToken(APIParser.COMPARE_SKIPLINE, 0)

        def COMPARE_NOSKIPLINE(self):
            return self.getToken(APIParser.COMPARE_NOSKIPLINE, 0)

        def COMPARE_LCS(self):
            return self.getToken(APIParser.COMPARE_LCS, 0)

        def COMPARE_MYERS(self):
            return self.getToken(APIParser.COMPARE_MYERS, 0)

        def COMPARE_WORK(self):
            return self.getToken(APIParser.COMPARE_WORK, 0)

        def COMPARE_REFERENCE(self):
            return self.getToken(APIParser.COMPARE_REFERENCE, 0)

        def COMPARE_MASK(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_MASK)
            else:
                return self.getToken(APIParser.COMPARE_MASK, i)

        def COMPARE_NOMASK(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_NOMASK)
            else:
                return self.getToken(APIParser.COMPARE_NOMASK, i)

        def COMPARE_CASE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_CASE)
            else:
                return self.getToken(APIParser.COMPARE_CASE, i)

        def COMPARE_NOCASE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_NOCASE)
            else:
                return self.getToken(APIParser.COMPARE_NOCASE, i)

        def COMPARE_IGBLANK(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_IGBLANK)
            else:
                return self.getToken(APIParser.COMPARE_IGBLANK, i)

        def COMPARE_NOIGBLANK(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_NOIGBLANK)
            else:
                return self.getToken(APIParser.COMPARE_NOIGBLANK, i)

        def COMPARE_TRIM(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_TRIM)
            else:
                return self.getToken(APIParser.COMPARE_TRIM, i)

        def COMPARE_NOTRIM(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_NOTRIM)
            else:
                return self.getToken(APIParser.COMPARE_NOTRIM, i)

        def COMPARE_CONSOLE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_CONSOLE)
            else:
                return self.getToken(APIParser.COMPARE_CONSOLE, i)

        def COMPARE_DIFFFILE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.COMPARE_DIFFFILE)
            else:
                return self.getToken(APIParser.COMPARE_DIFFFILE, i)

        def getRuleIndex(self):
            return APIParser.RULE_compare

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitCompare" ):
                return visitor.visitCompare(self)
            else:
                return visitor.visitChildren(self)




    def compare(self):

        localctx = APIParser.CompareContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_compare)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 475
            self.match(APIParser.COMPARE)
            self.state = 514
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,66,self._ctx)
            if la_ == 1:
                self.state = 476
                self.match(APIParser.COMPARE_EXPRESSION)
                self.state = 477
                self.match(APIParser.COMPARE_EXPRESSION)
                self.state = 481
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la - 170)) & ~0x3f) == 0 and ((1 << (_la - 170)) & 1011) != 0:
                    self.state = 478
                    _la = self._input.LA(1)
                    if not((((_la - 170)) & ~0x3f) == 0 and ((1 << (_la - 170)) & 1011) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 483
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 2:
                self.state = 484
                _la = self._input.LA(1)
                if not(_la==183 or _la==184):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 485
                self.match(APIParser.COMPARE_EXPRESSION)
                pass

            elif la_ == 3:
                self.state = 486
                self.match(APIParser.COMPARE_MASKLINE)
                self.state = 487
                self.match(APIParser.COMPARE_EXPRESSION)
                self.state = 488
                self.match(APIParser.COMPARE_EQUAL)
                self.state = 489
                self.match(APIParser.COMPARE_EXPRESSION)
                pass

            elif la_ == 4:
                self.state = 490
                self.match(APIParser.COMPARE_NOMASKLINE)
                self.state = 491
                self.match(APIParser.COMPARE_EXPRESSION)
                pass

            elif la_ == 5:
                self.state = 492
                self.match(APIParser.COMPARE_RESET)
                pass

            elif la_ == 6:
                self.state = 493
                self.match(APIParser.COMPARE_SET)
                self.state = 497
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la - 170)) & ~0x3f) == 0 and ((1 << (_la - 170)) & 1011) != 0:
                    self.state = 494
                    _la = self._input.LA(1)
                    if not((((_la - 170)) & ~0x3f) == 0 and ((1 << (_la - 170)) & 1011) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 499
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 7:
                self.state = 500
                self.match(APIParser.COMPARE_SET)
                self.state = 501
                self.match(APIParser.COMPARE_OUTPUT)
                self.state = 503 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 502
                    _la = self._input.LA(1)
                    if not(_la==181 or _la==182):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 505 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==181 or _la==182):
                        break

                pass

            elif la_ == 8:
                self.state = 507
                self.match(APIParser.COMPARE_SET)
                self.state = 508
                self.match(APIParser.COMPARE_ALGORITHM)
                self.state = 509
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 9:
                self.state = 510
                self.match(APIParser.COMPARE_SET)
                self.state = 511
                _la = self._input.LA(1)
                if not(_la==188 or _la==189):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 512
                self.match(APIParser.COMPARE_ENCODING)
                self.state = 513
                self.match(APIParser.COMPARE_EXPRESSION)
                pass


            self.state = 517
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==165:
                self.state = 516
                self.match(APIParser.COMPARE_SEMICOLON)


            self.state = 520
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 519
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DataContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DATA(self):
            return self.getToken(APIParser.DATA, 0)

        def DATA_SEMICOLON(self):
            return self.getToken(APIParser.DATA_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def DATA_SET(self):
            return self.getToken(APIParser.DATA_SET, 0)

        def DATA_SEEDFILE(self):
            return self.getToken(APIParser.DATA_SEEDFILE, 0)

        def DATA_DIR(self):
            return self.getToken(APIParser.DATA_DIR, 0)

        def DATA_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.DATA_EXPRESSION)
            else:
                return self.getToken(APIParser.DATA_EXPRESSION, i)

        def DATA_CREATE(self):
            return self.getToken(APIParser.DATA_CREATE, 0)

        def DATA_FILETYPE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.DATA_FILETYPE)
            else:
                return self.getToken(APIParser.DATA_FILETYPE, i)

        def DATA_FILE(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.DATA_FILE)
            else:
                return self.getToken(APIParser.DATA_FILE, i)

        def DATACOLUMN_OPEN(self):
            return self.getToken(APIParser.DATACOLUMN_OPEN, 0)

        def DATACOLUMN_CLOSE(self):
            return self.getToken(APIParser.DATACOLUMN_CLOSE, 0)

        def DATA_CONVERT(self):
            return self.getToken(APIParser.DATA_CONVERT, 0)

        def DATA_FROM(self):
            return self.getToken(APIParser.DATA_FROM, 0)

        def DATACOLUMN_EXPRESSION(self, i:int=None):
            if i is None:
                return self.getTokens(APIParser.DATACOLUMN_EXPRESSION)
            else:
                return self.getToken(APIParser.DATACOLUMN_EXPRESSION, i)

        def DATA_ROWS(self):
            return self.getToken(APIParser.DATA_ROWS, 0)

        def DATA_INT(self):
            return self.getToken(APIParser.DATA_INT, 0)

        def getRuleIndex(self):
            return APIParser.RULE_data

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitData" ):
                return visitor.visitData(self)
            else:
                return visitor.visitChildren(self)




    def data(self):

        localctx = APIParser.DataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_data)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 522
            self.match(APIParser.DATA)
            self.state = 550
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [195]:
                self.state = 523
                self.match(APIParser.DATA_SET)
                self.state = 524
                self.match(APIParser.DATA_SEEDFILE)
                self.state = 525
                self.match(APIParser.DATA_DIR)
                self.state = 526
                self.match(APIParser.DATA_EXPRESSION)
                pass
            elif token in [198]:
                self.state = 527
                self.match(APIParser.DATA_CREATE)
                self.state = 528
                self.match(APIParser.DATA_FILETYPE)
                self.state = 529
                self.match(APIParser.DATA_FILE)
                self.state = 530
                self.match(APIParser.DATA_EXPRESSION)
                self.state = 531
                self.match(APIParser.DATACOLUMN_OPEN)
                self.state = 533 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 532
                    self.match(APIParser.DATACOLUMN_EXPRESSION)
                    self.state = 535 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==208):
                        break

                self.state = 537
                self.match(APIParser.DATACOLUMN_CLOSE)
                self.state = 540
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==201:
                    self.state = 538
                    self.match(APIParser.DATA_ROWS)
                    self.state = 539
                    self.match(APIParser.DATA_INT)


                pass
            elif token in [205]:
                self.state = 542
                self.match(APIParser.DATA_CONVERT)
                self.state = 543
                self.match(APIParser.DATA_FILETYPE)
                self.state = 544
                self.match(APIParser.DATA_FILE)
                self.state = 545
                self.match(APIParser.DATA_EXPRESSION)
                self.state = 546
                self.match(APIParser.DATA_FROM)
                self.state = 547
                self.match(APIParser.DATA_FILETYPE)
                self.state = 548
                self.match(APIParser.DATA_FILE)
                self.state = 549
                self.match(APIParser.DATA_EXPRESSION)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 553
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==194:
                self.state = 552
                self.match(APIParser.DATA_SEMICOLON)


            self.state = 556
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 555
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HelpContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HELP(self):
            return self.getToken(APIParser.HELP, 0)

        def HELP_COMMAND(self):
            return self.getToken(APIParser.HELP_COMMAND, 0)

        def HELP_SEMICOLON(self):
            return self.getToken(APIParser.HELP_SEMICOLON, 0)

        def CRLF(self):
            return self.getToken(APIParser.CRLF, 0)

        def getRuleIndex(self):
            return APIParser.RULE_help

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHelp" ):
                return visitor.visitHelp(self)
            else:
                return visitor.visitChildren(self)




    def help_(self):

        localctx = APIParser.HelpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_help)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 558
            self.match(APIParser.HELP)
            self.state = 560
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==212:
                self.state = 559
                self.match(APIParser.HELP_COMMAND)


            self.state = 563
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==214:
                self.state = 562
                self.match(APIParser.HELP_SEMICOLON)


            self.state = 566
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==5:
                self.state = 565
                self.match(APIParser.CRLF)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx





