# Generated from C:/Users/freyermu/Documents/GitHub/IEC61131-3-Parser\StructuredText.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,154,996,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,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,
        46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,
        52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,
        59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,
        65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,
        72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,
        78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,
        85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,1,0,1,0,3,0,183,
        8,0,1,1,1,1,1,1,3,1,188,8,1,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,4,3,
        198,8,3,11,3,12,3,199,1,4,1,4,1,5,1,5,3,5,206,8,5,1,6,1,6,1,6,5,
        6,211,8,6,10,6,12,6,214,9,6,1,6,1,6,1,7,1,7,1,8,3,8,221,8,8,1,8,
        1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,5,8,235,8,8,10,8,12,
        8,238,9,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,
        1,10,1,10,1,10,5,10,255,8,10,10,10,12,10,258,9,10,1,10,1,10,1,10,
        1,10,1,11,1,11,3,11,266,8,11,1,12,1,12,1,12,5,12,271,8,12,10,12,
        12,12,274,9,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,3,15,283,8,15,
        1,15,1,15,3,15,287,8,15,1,15,1,15,1,15,3,15,292,8,15,1,15,1,15,1,
        15,1,15,5,15,298,8,15,10,15,12,15,301,9,15,3,15,303,8,15,1,15,1,
        15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,5,
        15,319,8,15,10,15,12,15,322,9,15,1,15,1,15,1,15,5,15,327,8,15,10,
        15,12,15,330,9,15,1,15,5,15,333,8,15,10,15,12,15,336,9,15,1,16,1,
        16,1,17,1,17,3,17,342,8,17,1,18,1,18,1,19,1,19,1,20,1,20,1,20,5,
        20,351,8,20,10,20,12,20,354,9,20,1,20,1,20,5,20,358,8,20,10,20,12,
        20,361,9,20,1,21,1,21,1,21,1,21,3,21,367,8,21,1,21,5,21,370,8,21,
        10,21,12,21,373,9,21,1,21,1,21,1,22,3,22,378,8,22,1,22,1,22,1,22,
        1,22,3,22,384,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,
        1,22,1,22,1,22,1,22,1,22,5,22,400,8,22,10,22,12,22,403,9,22,1,22,
        1,22,1,23,3,23,408,8,23,1,23,1,23,1,23,1,23,3,23,414,8,23,1,23,1,
        23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,5,
        23,430,8,23,10,23,12,23,433,9,23,1,23,1,23,1,23,1,24,3,24,439,8,
        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,456,8,24,10,24,12,24,459,9,24,1,24,1,24,1,24,1,
        25,3,25,465,8,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,
        25,1,25,1,25,1,25,1,25,1,25,5,25,482,8,25,10,25,12,25,485,9,25,1,
        25,1,25,1,25,1,26,3,26,491,8,26,1,26,1,26,1,26,1,26,3,26,497,8,26,
        1,26,3,26,500,8,26,1,26,3,26,503,8,26,1,26,1,26,1,27,1,27,1,27,3,
        27,510,8,27,1,28,1,28,1,28,5,28,515,8,28,10,28,12,28,518,9,28,1,
        29,1,29,1,30,1,30,1,30,5,30,525,8,30,10,30,12,30,528,9,30,1,30,1,
        30,1,31,1,31,1,32,1,32,1,33,1,33,5,33,538,8,33,10,33,12,33,541,9,
        33,1,33,1,33,1,34,1,34,1,34,5,34,548,8,34,10,34,12,34,551,9,34,1,
        34,1,34,1,35,1,35,1,35,5,35,558,8,35,10,35,12,35,561,9,35,1,35,1,
        35,1,36,1,36,1,36,5,36,568,8,36,10,36,12,36,571,9,36,1,36,1,36,1,
        37,1,37,5,37,577,8,37,10,37,12,37,580,9,37,1,37,1,37,1,38,1,38,1,
        38,5,38,587,8,38,10,38,12,38,590,9,38,1,38,1,38,1,39,1,39,1,39,5,
        39,597,8,39,10,39,12,39,600,9,39,1,39,1,39,1,40,1,40,5,40,606,8,
        40,10,40,12,40,609,9,40,1,40,1,40,1,41,1,41,1,41,5,41,616,8,41,10,
        41,12,41,619,9,41,1,41,1,41,1,42,1,42,1,42,5,42,626,8,42,10,42,12,
        42,629,9,42,1,42,1,42,1,43,1,43,5,43,635,8,43,10,43,12,43,638,9,
        43,1,43,1,43,1,44,1,44,5,44,644,8,44,10,44,12,44,647,9,44,1,44,1,
        44,1,45,1,45,5,45,653,8,45,10,45,12,45,656,9,45,1,45,1,45,1,46,1,
        46,1,46,5,46,663,8,46,10,46,12,46,666,9,46,1,46,1,46,1,47,1,47,1,
        47,1,47,1,47,1,47,1,47,5,47,677,8,47,10,47,12,47,680,9,47,1,47,1,
        47,1,47,3,47,685,8,47,1,47,1,47,1,48,1,48,1,49,1,49,1,49,1,49,1,
        49,1,49,1,49,1,49,3,49,699,8,49,1,49,1,49,1,49,1,49,1,49,1,49,1,
        49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,
        49,1,49,1,49,1,49,1,49,5,49,725,8,49,10,49,12,49,728,9,49,1,50,1,
        50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,3,50,739,8,50,1,51,1,51,1,
        52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,55,3,55,752,8,55,1,56,1,
        56,3,56,756,8,56,1,57,1,57,1,57,1,57,1,57,4,57,763,8,57,11,57,12,
        57,764,3,57,767,8,57,1,57,1,57,3,57,771,8,57,1,58,1,58,1,59,1,59,
        1,60,1,60,4,60,779,8,60,11,60,12,60,780,1,61,1,61,1,61,1,61,5,61,
        787,8,61,10,61,12,61,790,9,61,1,61,1,61,1,62,1,62,1,63,1,63,1,64,
        1,64,3,64,800,8,64,1,64,1,64,1,64,5,64,805,8,64,10,64,12,64,808,
        9,64,1,64,1,64,1,65,1,65,1,65,1,65,1,66,1,66,1,66,5,66,819,8,66,
        10,66,12,66,822,9,66,1,66,1,66,1,66,3,66,827,8,66,1,67,1,67,1,67,
        1,68,1,68,1,68,3,68,835,8,68,1,68,1,68,1,68,5,68,840,8,68,10,68,
        12,68,843,9,68,1,69,1,69,1,70,1,70,3,70,849,8,70,1,71,1,71,1,71,
        1,71,1,71,5,71,856,8,71,10,71,12,71,859,9,71,3,71,861,8,71,1,71,
        1,71,1,72,3,72,866,8,72,1,72,5,72,869,8,72,10,72,12,72,872,9,72,
        1,73,1,73,1,73,1,73,3,73,878,8,73,1,74,1,74,1,74,1,74,1,75,1,75,
        1,75,1,75,1,75,3,75,889,8,75,1,76,1,76,1,76,3,76,894,8,76,1,76,1,
        76,3,76,898,8,76,1,76,1,76,1,76,1,76,3,76,904,8,76,1,77,1,77,3,77,
        908,8,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,5,78,919,8,
        78,10,78,12,78,922,9,78,1,78,1,78,3,78,926,8,78,1,78,1,78,1,79,1,
        79,1,79,1,79,4,79,934,8,79,11,79,12,79,935,1,79,1,79,3,79,940,8,
        79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,81,1,81,5,81,951,8,81,10,
        81,12,81,954,9,81,1,82,1,82,1,83,1,83,1,83,1,83,1,83,3,83,963,8,
        83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,86,1,86,1,
        86,1,86,1,86,3,86,980,8,86,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,
        88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,0,1,98,90,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,80,82,84,86,88,90,92,94,96,98,100,
        102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,
        134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,
        166,168,170,172,174,176,178,0,11,1,0,117,120,2,0,78,106,108,108,
        2,0,67,67,71,71,1,0,63,66,2,0,110,110,142,143,2,0,131,132,134,136,
        1,0,139,140,2,0,113,113,139,140,1,0,147,151,2,0,61,61,68,68,1,0,
        152,154,1091,0,182,1,0,0,0,2,187,1,0,0,0,4,191,1,0,0,0,6,197,1,0,
        0,0,8,201,1,0,0,0,10,205,1,0,0,0,12,212,1,0,0,0,14,217,1,0,0,0,16,
        220,1,0,0,0,18,242,1,0,0,0,20,244,1,0,0,0,22,265,1,0,0,0,24,272,
        1,0,0,0,26,277,1,0,0,0,28,279,1,0,0,0,30,282,1,0,0,0,32,337,1,0,
        0,0,34,341,1,0,0,0,36,343,1,0,0,0,38,345,1,0,0,0,40,352,1,0,0,0,
        42,362,1,0,0,0,44,377,1,0,0,0,46,407,1,0,0,0,48,438,1,0,0,0,50,464,
        1,0,0,0,52,490,1,0,0,0,54,509,1,0,0,0,56,511,1,0,0,0,58,519,1,0,
        0,0,60,526,1,0,0,0,62,531,1,0,0,0,64,533,1,0,0,0,66,535,1,0,0,0,
        68,544,1,0,0,0,70,554,1,0,0,0,72,564,1,0,0,0,74,574,1,0,0,0,76,583,
        1,0,0,0,78,593,1,0,0,0,80,603,1,0,0,0,82,612,1,0,0,0,84,622,1,0,
        0,0,86,632,1,0,0,0,88,641,1,0,0,0,90,650,1,0,0,0,92,659,1,0,0,0,
        94,669,1,0,0,0,96,688,1,0,0,0,98,698,1,0,0,0,100,738,1,0,0,0,102,
        740,1,0,0,0,104,742,1,0,0,0,106,744,1,0,0,0,108,746,1,0,0,0,110,
        748,1,0,0,0,112,755,1,0,0,0,114,766,1,0,0,0,116,772,1,0,0,0,118,
        774,1,0,0,0,120,776,1,0,0,0,122,782,1,0,0,0,124,793,1,0,0,0,126,
        795,1,0,0,0,128,797,1,0,0,0,130,811,1,0,0,0,132,826,1,0,0,0,134,
        828,1,0,0,0,136,831,1,0,0,0,138,844,1,0,0,0,140,846,1,0,0,0,142,
        850,1,0,0,0,144,870,1,0,0,0,146,877,1,0,0,0,148,879,1,0,0,0,150,
        888,1,0,0,0,152,903,1,0,0,0,154,907,1,0,0,0,156,909,1,0,0,0,158,
        929,1,0,0,0,160,943,1,0,0,0,162,947,1,0,0,0,164,955,1,0,0,0,166,
        962,1,0,0,0,168,964,1,0,0,0,170,972,1,0,0,0,172,974,1,0,0,0,174,
        981,1,0,0,0,176,987,1,0,0,0,178,993,1,0,0,0,180,183,3,4,2,0,181,
        183,3,2,1,0,182,180,1,0,0,0,182,181,1,0,0,0,183,1,1,0,0,0,184,185,
        3,18,9,0,185,186,5,128,0,0,186,188,1,0,0,0,187,184,1,0,0,0,187,188,
        1,0,0,0,188,189,1,0,0,0,189,190,3,4,2,0,190,3,1,0,0,0,191,192,7,
        0,0,0,192,5,1,0,0,0,193,198,3,128,64,0,194,198,3,16,8,0,195,198,
        3,30,15,0,196,198,3,42,21,0,197,193,1,0,0,0,197,194,1,0,0,0,197,
        195,1,0,0,0,197,196,1,0,0,0,198,199,1,0,0,0,199,197,1,0,0,0,199,
        200,1,0,0,0,200,7,1,0,0,0,201,202,5,125,0,0,202,9,1,0,0,0,203,206,
        5,27,0,0,204,206,3,14,7,0,205,203,1,0,0,0,205,204,1,0,0,0,206,11,
        1,0,0,0,207,208,3,8,4,0,208,209,5,126,0,0,209,211,1,0,0,0,210,207,
        1,0,0,0,211,214,1,0,0,0,212,210,1,0,0,0,212,213,1,0,0,0,213,215,
        1,0,0,0,214,212,1,0,0,0,215,216,3,10,5,0,216,13,1,0,0,0,217,218,
        5,125,0,0,218,15,1,0,0,0,219,221,5,29,0,0,220,219,1,0,0,0,220,221,
        1,0,0,0,221,222,1,0,0,0,222,223,5,36,0,0,223,224,3,14,7,0,224,225,
        5,129,0,0,225,236,3,32,16,0,226,235,3,66,33,0,227,235,3,68,34,0,
        228,235,3,74,37,0,229,235,3,80,40,0,230,235,3,86,43,0,231,235,3,
        88,44,0,232,235,3,90,45,0,233,235,3,92,46,0,234,226,1,0,0,0,234,
        227,1,0,0,0,234,228,1,0,0,0,234,229,1,0,0,0,234,230,1,0,0,0,234,
        231,1,0,0,0,234,232,1,0,0,0,234,233,1,0,0,0,235,238,1,0,0,0,236,
        234,1,0,0,0,236,237,1,0,0,0,237,239,1,0,0,0,238,236,1,0,0,0,239,
        240,3,178,89,0,240,241,5,37,0,0,241,17,1,0,0,0,242,243,7,1,0,0,243,
        19,1,0,0,0,244,245,5,107,0,0,245,246,5,1,0,0,246,247,3,0,0,0,247,
        248,5,2,0,0,248,256,3,0,0,0,249,250,5,127,0,0,250,251,3,0,0,0,251,
        252,5,2,0,0,252,253,3,0,0,0,253,255,1,0,0,0,254,249,1,0,0,0,255,
        258,1,0,0,0,256,254,1,0,0,0,256,257,1,0,0,0,257,259,1,0,0,0,258,
        256,1,0,0,0,259,260,5,3,0,0,260,261,5,12,0,0,261,262,3,18,9,0,262,
        21,1,0,0,0,263,266,5,28,0,0,264,266,3,26,13,0,265,263,1,0,0,0,265,
        264,1,0,0,0,266,23,1,0,0,0,267,268,3,8,4,0,268,269,5,126,0,0,269,
        271,1,0,0,0,270,267,1,0,0,0,271,274,1,0,0,0,272,270,1,0,0,0,272,
        273,1,0,0,0,273,275,1,0,0,0,274,272,1,0,0,0,275,276,3,22,11,0,276,
        25,1,0,0,0,277,278,5,125,0,0,278,27,1,0,0,0,279,280,5,125,0,0,280,
        29,1,0,0,0,281,283,5,29,0,0,282,281,1,0,0,0,282,283,1,0,0,0,283,
        284,1,0,0,0,284,286,5,38,0,0,285,287,7,2,0,0,286,285,1,0,0,0,286,
        287,1,0,0,0,287,288,1,0,0,0,288,291,3,26,13,0,289,290,5,69,0,0,290,
        292,3,28,14,0,291,289,1,0,0,0,291,292,1,0,0,0,292,302,1,0,0,0,293,
        294,5,74,0,0,294,299,3,60,30,0,295,296,5,127,0,0,296,298,3,60,30,
        0,297,295,1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299,300,1,0,0,
        0,300,303,1,0,0,0,301,299,1,0,0,0,302,293,1,0,0,0,302,303,1,0,0,
        0,303,320,1,0,0,0,304,319,3,66,33,0,305,319,3,68,34,0,306,319,3,
        70,35,0,307,319,3,72,36,0,308,319,3,74,37,0,309,319,3,76,38,0,310,
        319,3,78,39,0,311,319,3,80,40,0,312,319,3,82,41,0,313,319,3,84,42,
        0,314,319,3,86,43,0,315,319,3,88,44,0,316,319,3,90,45,0,317,319,
        3,92,46,0,318,304,1,0,0,0,318,305,1,0,0,0,318,306,1,0,0,0,318,307,
        1,0,0,0,318,308,1,0,0,0,318,309,1,0,0,0,318,310,1,0,0,0,318,311,
        1,0,0,0,318,312,1,0,0,0,318,313,1,0,0,0,318,314,1,0,0,0,318,315,
        1,0,0,0,318,316,1,0,0,0,318,317,1,0,0,0,319,322,1,0,0,0,320,318,
        1,0,0,0,320,321,1,0,0,0,321,323,1,0,0,0,322,320,1,0,0,0,323,324,
        3,178,89,0,324,328,6,15,-1,0,325,327,3,46,23,0,326,325,1,0,0,0,327,
        330,1,0,0,0,328,326,1,0,0,0,328,329,1,0,0,0,329,334,1,0,0,0,330,
        328,1,0,0,0,331,333,3,52,26,0,332,331,1,0,0,0,333,336,1,0,0,0,334,
        332,1,0,0,0,334,335,1,0,0,0,335,31,1,0,0,0,336,334,1,0,0,0,337,338,
        3,34,17,0,338,33,1,0,0,0,339,342,3,18,9,0,340,342,3,20,10,0,341,
        339,1,0,0,0,341,340,1,0,0,0,342,35,1,0,0,0,343,344,5,125,0,0,344,
        37,1,0,0,0,345,346,5,125,0,0,346,39,1,0,0,0,347,348,3,8,4,0,348,
        349,5,126,0,0,349,351,1,0,0,0,350,347,1,0,0,0,351,354,1,0,0,0,352,
        350,1,0,0,0,352,353,1,0,0,0,353,355,1,0,0,0,354,352,1,0,0,0,355,
        359,3,26,13,0,356,358,5,144,0,0,357,356,1,0,0,0,358,361,1,0,0,0,
        359,357,1,0,0,0,359,360,1,0,0,0,360,41,1,0,0,0,361,359,1,0,0,0,362,
        363,5,40,0,0,363,366,3,58,29,0,364,365,5,69,0,0,365,367,3,56,28,
        0,366,364,1,0,0,0,366,367,1,0,0,0,367,371,1,0,0,0,368,370,3,44,22,
        0,369,368,1,0,0,0,370,373,1,0,0,0,371,369,1,0,0,0,371,372,1,0,0,
        0,372,374,1,0,0,0,373,371,1,0,0,0,374,375,5,41,0,0,375,43,1,0,0,
        0,376,378,5,29,0,0,377,376,1,0,0,0,377,378,1,0,0,0,378,379,1,0,0,
        0,379,380,5,42,0,0,380,383,3,36,18,0,381,382,5,129,0,0,382,384,3,
        32,16,0,383,381,1,0,0,0,383,384,1,0,0,0,384,401,1,0,0,0,385,400,
        3,66,33,0,386,400,3,68,34,0,387,400,3,70,35,0,388,400,3,72,36,0,
        389,400,3,74,37,0,390,400,3,76,38,0,391,400,3,78,39,0,392,400,3,
        80,40,0,393,400,3,82,41,0,394,400,3,84,42,0,395,400,3,86,43,0,396,
        400,3,88,44,0,397,400,3,90,45,0,398,400,3,92,46,0,399,385,1,0,0,
        0,399,386,1,0,0,0,399,387,1,0,0,0,399,388,1,0,0,0,399,389,1,0,0,
        0,399,390,1,0,0,0,399,391,1,0,0,0,399,392,1,0,0,0,399,393,1,0,0,
        0,399,394,1,0,0,0,399,395,1,0,0,0,399,396,1,0,0,0,399,397,1,0,0,
        0,399,398,1,0,0,0,400,403,1,0,0,0,401,399,1,0,0,0,401,402,1,0,0,
        0,402,404,1,0,0,0,403,401,1,0,0,0,404,405,5,43,0,0,405,45,1,0,0,
        0,406,408,5,29,0,0,407,406,1,0,0,0,407,408,1,0,0,0,408,409,1,0,0,
        0,409,410,5,42,0,0,410,413,3,36,18,0,411,412,5,129,0,0,412,414,3,
        32,16,0,413,411,1,0,0,0,413,414,1,0,0,0,414,431,1,0,0,0,415,430,
        3,66,33,0,416,430,3,68,34,0,417,430,3,70,35,0,418,430,3,72,36,0,
        419,430,3,74,37,0,420,430,3,76,38,0,421,430,3,78,39,0,422,430,3,
        80,40,0,423,430,3,82,41,0,424,430,3,84,42,0,425,430,3,86,43,0,426,
        430,3,88,44,0,427,430,3,90,45,0,428,430,3,92,46,0,429,415,1,0,0,
        0,429,416,1,0,0,0,429,417,1,0,0,0,429,418,1,0,0,0,429,419,1,0,0,
        0,429,420,1,0,0,0,429,421,1,0,0,0,429,422,1,0,0,0,429,423,1,0,0,
        0,429,424,1,0,0,0,429,425,1,0,0,0,429,426,1,0,0,0,429,427,1,0,0,
        0,429,428,1,0,0,0,430,433,1,0,0,0,431,429,1,0,0,0,431,432,1,0,0,
        0,432,434,1,0,0,0,433,431,1,0,0,0,434,435,3,178,89,0,435,436,5,43,
        0,0,436,47,1,0,0,0,437,439,5,29,0,0,438,437,1,0,0,0,438,439,1,0,
        0,0,439,440,1,0,0,0,440,457,5,46,0,0,441,456,3,66,33,0,442,456,3,
        68,34,0,443,456,3,70,35,0,444,456,3,72,36,0,445,456,3,74,37,0,446,
        456,3,76,38,0,447,456,3,78,39,0,448,456,3,80,40,0,449,456,3,82,41,
        0,450,456,3,84,42,0,451,456,3,86,43,0,452,456,3,88,44,0,453,456,
        3,90,45,0,454,456,3,92,46,0,455,441,1,0,0,0,455,442,1,0,0,0,455,
        443,1,0,0,0,455,444,1,0,0,0,455,445,1,0,0,0,455,446,1,0,0,0,455,
        447,1,0,0,0,455,448,1,0,0,0,455,449,1,0,0,0,455,450,1,0,0,0,455,
        451,1,0,0,0,455,452,1,0,0,0,455,453,1,0,0,0,455,454,1,0,0,0,456,
        459,1,0,0,0,457,455,1,0,0,0,457,458,1,0,0,0,458,460,1,0,0,0,459,
        457,1,0,0,0,460,461,3,178,89,0,461,462,5,47,0,0,462,49,1,0,0,0,463,
        465,5,29,0,0,464,463,1,0,0,0,464,465,1,0,0,0,465,466,1,0,0,0,466,
        483,5,48,0,0,467,482,3,66,33,0,468,482,3,68,34,0,469,482,3,70,35,
        0,470,482,3,72,36,0,471,482,3,74,37,0,472,482,3,76,38,0,473,482,
        3,78,39,0,474,482,3,80,40,0,475,482,3,82,41,0,476,482,3,84,42,0,
        477,482,3,86,43,0,478,482,3,88,44,0,479,482,3,90,45,0,480,482,3,
        92,46,0,481,467,1,0,0,0,481,468,1,0,0,0,481,469,1,0,0,0,481,470,
        1,0,0,0,481,471,1,0,0,0,481,472,1,0,0,0,481,473,1,0,0,0,481,474,
        1,0,0,0,481,475,1,0,0,0,481,476,1,0,0,0,481,477,1,0,0,0,481,478,
        1,0,0,0,481,479,1,0,0,0,481,480,1,0,0,0,482,485,1,0,0,0,483,481,
        1,0,0,0,483,484,1,0,0,0,484,486,1,0,0,0,485,483,1,0,0,0,486,487,
        3,178,89,0,487,488,5,49,0,0,488,51,1,0,0,0,489,491,5,29,0,0,490,
        489,1,0,0,0,490,491,1,0,0,0,491,492,1,0,0,0,492,493,5,44,0,0,493,
        496,3,38,19,0,494,495,5,129,0,0,495,497,3,32,16,0,496,494,1,0,0,
        0,496,497,1,0,0,0,497,499,1,0,0,0,498,500,3,48,24,0,499,498,1,0,
        0,0,499,500,1,0,0,0,500,502,1,0,0,0,501,503,3,50,25,0,502,501,1,
        0,0,0,502,503,1,0,0,0,503,504,1,0,0,0,504,505,5,45,0,0,505,53,1,
        0,0,0,506,510,3,114,57,0,507,510,3,40,20,0,508,510,5,50,0,0,509,
        506,1,0,0,0,509,507,1,0,0,0,509,508,1,0,0,0,510,55,1,0,0,0,511,516,
        3,60,30,0,512,513,5,127,0,0,513,515,3,60,30,0,514,512,1,0,0,0,515,
        518,1,0,0,0,516,514,1,0,0,0,516,517,1,0,0,0,517,57,1,0,0,0,518,516,
        1,0,0,0,519,520,5,125,0,0,520,59,1,0,0,0,521,522,3,8,4,0,522,523,
        5,126,0,0,523,525,1,0,0,0,524,521,1,0,0,0,525,528,1,0,0,0,526,524,
        1,0,0,0,526,527,1,0,0,0,527,529,1,0,0,0,528,526,1,0,0,0,529,530,
        3,58,29,0,530,61,1,0,0,0,531,532,5,125,0,0,532,63,1,0,0,0,533,534,
        7,3,0,0,534,65,1,0,0,0,535,539,5,51,0,0,536,538,3,94,47,0,537,536,
        1,0,0,0,538,541,1,0,0,0,539,537,1,0,0,0,539,540,1,0,0,0,540,542,
        1,0,0,0,541,539,1,0,0,0,542,543,5,60,0,0,543,67,1,0,0,0,544,545,
        5,51,0,0,545,549,5,68,0,0,546,548,3,94,47,0,547,546,1,0,0,0,548,
        551,1,0,0,0,549,547,1,0,0,0,549,550,1,0,0,0,550,552,1,0,0,0,551,
        549,1,0,0,0,552,553,5,60,0,0,553,69,1,0,0,0,554,555,5,51,0,0,555,
        559,5,61,0,0,556,558,3,94,47,0,557,556,1,0,0,0,558,561,1,0,0,0,559,
        557,1,0,0,0,559,560,1,0,0,0,560,562,1,0,0,0,561,559,1,0,0,0,562,
        563,5,60,0,0,563,71,1,0,0,0,564,565,5,51,0,0,565,569,5,62,0,0,566,
        568,3,94,47,0,567,566,1,0,0,0,568,571,1,0,0,0,569,567,1,0,0,0,569,
        570,1,0,0,0,570,572,1,0,0,0,571,569,1,0,0,0,572,573,5,60,0,0,573,
        73,1,0,0,0,574,578,5,52,0,0,575,577,3,94,47,0,576,575,1,0,0,0,577,
        580,1,0,0,0,578,576,1,0,0,0,578,579,1,0,0,0,579,581,1,0,0,0,580,
        578,1,0,0,0,581,582,5,60,0,0,582,75,1,0,0,0,583,584,5,52,0,0,584,
        588,5,61,0,0,585,587,3,94,47,0,586,585,1,0,0,0,587,590,1,0,0,0,588,
        586,1,0,0,0,588,589,1,0,0,0,589,591,1,0,0,0,590,588,1,0,0,0,591,
        592,5,60,0,0,592,77,1,0,0,0,593,594,5,52,0,0,594,598,5,62,0,0,595,
        597,3,94,47,0,596,595,1,0,0,0,597,600,1,0,0,0,598,596,1,0,0,0,598,
        599,1,0,0,0,599,601,1,0,0,0,600,598,1,0,0,0,601,602,5,60,0,0,602,
        79,1,0,0,0,603,607,5,53,0,0,604,606,3,94,47,0,605,604,1,0,0,0,606,
        609,1,0,0,0,607,605,1,0,0,0,607,608,1,0,0,0,608,610,1,0,0,0,609,
        607,1,0,0,0,610,611,5,60,0,0,611,81,1,0,0,0,612,613,5,53,0,0,613,
        617,5,61,0,0,614,616,3,94,47,0,615,614,1,0,0,0,616,619,1,0,0,0,617,
        615,1,0,0,0,617,618,1,0,0,0,618,620,1,0,0,0,619,617,1,0,0,0,620,
        621,5,60,0,0,621,83,1,0,0,0,622,623,5,53,0,0,623,627,5,62,0,0,624,
        626,3,94,47,0,625,624,1,0,0,0,626,629,1,0,0,0,627,625,1,0,0,0,627,
        628,1,0,0,0,628,630,1,0,0,0,629,627,1,0,0,0,630,631,5,60,0,0,631,
        85,1,0,0,0,632,636,5,54,0,0,633,635,3,94,47,0,634,633,1,0,0,0,635,
        638,1,0,0,0,636,634,1,0,0,0,636,637,1,0,0,0,637,639,1,0,0,0,638,
        636,1,0,0,0,639,640,5,60,0,0,640,87,1,0,0,0,641,645,5,58,0,0,642,
        644,3,94,47,0,643,642,1,0,0,0,644,647,1,0,0,0,645,643,1,0,0,0,645,
        646,1,0,0,0,646,648,1,0,0,0,647,645,1,0,0,0,648,649,5,60,0,0,649,
        89,1,0,0,0,650,654,5,55,0,0,651,653,3,94,47,0,652,651,1,0,0,0,653,
        656,1,0,0,0,654,652,1,0,0,0,654,655,1,0,0,0,655,657,1,0,0,0,656,
        654,1,0,0,0,657,658,5,60,0,0,658,91,1,0,0,0,659,660,5,55,0,0,660,
        664,5,68,0,0,661,663,3,94,47,0,662,661,1,0,0,0,663,666,1,0,0,0,664,
        662,1,0,0,0,664,665,1,0,0,0,665,667,1,0,0,0,666,664,1,0,0,0,667,
        668,5,60,0,0,668,93,1,0,0,0,669,670,5,125,0,0,670,678,5,129,0,0,
        671,672,3,8,4,0,672,673,5,126,0,0,673,677,1,0,0,0,674,675,5,116,
        0,0,675,677,5,126,0,0,676,671,1,0,0,0,676,674,1,0,0,0,677,680,1,
        0,0,0,678,676,1,0,0,0,678,679,1,0,0,0,679,681,1,0,0,0,680,678,1,
        0,0,0,681,684,3,34,17,0,682,683,5,9,0,0,683,685,3,96,48,0,684,682,
        1,0,0,0,684,685,1,0,0,0,685,686,1,0,0,0,686,687,5,130,0,0,687,95,
        1,0,0,0,688,689,3,98,49,0,689,97,1,0,0,0,690,691,6,49,-1,0,691,699,
        3,100,50,0,692,699,5,125,0,0,693,694,5,125,0,0,694,699,5,144,0,0,
        695,696,3,108,54,0,696,697,3,98,49,8,697,699,1,0,0,0,698,690,1,0,
        0,0,698,692,1,0,0,0,698,693,1,0,0,0,698,695,1,0,0,0,699,726,1,0,
        0,0,700,701,10,7,0,0,701,702,5,141,0,0,702,725,3,98,49,8,703,704,
        10,6,0,0,704,705,3,102,51,0,705,706,3,98,49,7,706,725,1,0,0,0,707,
        708,10,5,0,0,708,709,3,106,53,0,709,710,3,98,49,6,710,725,1,0,0,
        0,711,712,10,4,0,0,712,713,3,104,52,0,713,714,3,98,49,5,714,725,
        1,0,0,0,715,716,10,3,0,0,716,717,5,111,0,0,717,725,3,98,49,4,718,
        719,10,2,0,0,719,720,5,109,0,0,720,725,3,98,49,3,721,722,10,1,0,
        0,722,723,5,112,0,0,723,725,3,98,49,2,724,700,1,0,0,0,724,703,1,
        0,0,0,724,707,1,0,0,0,724,711,1,0,0,0,724,715,1,0,0,0,724,718,1,
        0,0,0,724,721,1,0,0,0,725,728,1,0,0,0,726,724,1,0,0,0,726,727,1,
        0,0,0,727,99,1,0,0,0,728,726,1,0,0,0,729,739,3,0,0,0,730,739,5,114,
        0,0,731,739,5,115,0,0,732,739,3,140,70,0,733,739,3,142,71,0,734,
        735,5,137,0,0,735,736,3,98,49,0,736,737,5,138,0,0,737,739,1,0,0,
        0,738,729,1,0,0,0,738,730,1,0,0,0,738,731,1,0,0,0,738,732,1,0,0,
        0,738,733,1,0,0,0,738,734,1,0,0,0,739,101,1,0,0,0,740,741,7,4,0,
        0,741,103,1,0,0,0,742,743,7,5,0,0,743,105,1,0,0,0,744,745,7,6,0,
        0,745,107,1,0,0,0,746,747,7,7,0,0,747,109,1,0,0,0,748,749,5,126,
        0,0,749,751,5,145,0,0,750,752,7,8,0,0,751,750,1,0,0,0,751,752,1,
        0,0,0,752,111,1,0,0,0,753,756,3,136,68,0,754,756,3,114,57,0,755,
        753,1,0,0,0,755,754,1,0,0,0,756,113,1,0,0,0,757,758,5,72,0,0,758,
        767,5,126,0,0,759,760,3,8,4,0,760,761,5,126,0,0,761,763,1,0,0,0,
        762,759,1,0,0,0,763,764,1,0,0,0,764,762,1,0,0,0,764,765,1,0,0,0,
        765,767,1,0,0,0,766,757,1,0,0,0,766,762,1,0,0,0,766,767,1,0,0,0,
        767,770,1,0,0,0,768,771,3,116,58,0,769,771,3,120,60,0,770,768,1,
        0,0,0,770,769,1,0,0,0,771,115,1,0,0,0,772,773,3,118,59,0,773,117,
        1,0,0,0,774,775,5,125,0,0,775,119,1,0,0,0,776,778,3,116,58,0,777,
        779,3,122,61,0,778,777,1,0,0,0,779,780,1,0,0,0,780,778,1,0,0,0,780,
        781,1,0,0,0,781,121,1,0,0,0,782,783,5,1,0,0,783,788,3,124,62,0,784,
        785,5,127,0,0,785,787,3,124,62,0,786,784,1,0,0,0,787,790,1,0,0,0,
        788,786,1,0,0,0,788,789,1,0,0,0,789,791,1,0,0,0,790,788,1,0,0,0,
        791,792,5,3,0,0,792,123,1,0,0,0,793,794,3,98,49,0,794,125,1,0,0,
        0,795,796,5,125,0,0,796,127,1,0,0,0,797,799,5,56,0,0,798,800,7,9,
        0,0,799,798,1,0,0,0,799,800,1,0,0,0,800,806,1,0,0,0,801,802,3,130,
        65,0,802,803,5,130,0,0,803,805,1,0,0,0,804,801,1,0,0,0,805,808,1,
        0,0,0,806,804,1,0,0,0,806,807,1,0,0,0,807,809,1,0,0,0,808,806,1,
        0,0,0,809,810,5,60,0,0,810,129,1,0,0,0,811,812,3,132,66,0,812,813,
        5,129,0,0,813,814,3,24,12,0,814,131,1,0,0,0,815,820,3,126,63,0,816,
        817,5,127,0,0,817,819,3,126,63,0,818,816,1,0,0,0,819,822,1,0,0,0,
        820,818,1,0,0,0,820,821,1,0,0,0,821,827,1,0,0,0,822,820,1,0,0,0,
        823,824,3,126,63,0,824,825,3,134,67,0,825,827,1,0,0,0,826,815,1,
        0,0,0,826,823,1,0,0,0,827,133,1,0,0,0,828,829,5,75,0,0,829,830,3,
        136,68,0,830,135,1,0,0,0,831,832,5,145,0,0,832,834,7,10,0,0,833,
        835,7,8,0,0,834,833,1,0,0,0,834,835,1,0,0,0,835,836,1,0,0,0,836,
        841,3,4,2,0,837,838,5,126,0,0,838,840,3,4,2,0,839,837,1,0,0,0,840,
        843,1,0,0,0,841,839,1,0,0,0,841,842,1,0,0,0,842,137,1,0,0,0,843,
        841,1,0,0,0,844,845,3,98,49,0,845,139,1,0,0,0,846,848,3,112,56,0,
        847,849,3,110,55,0,848,847,1,0,0,0,848,849,1,0,0,0,849,141,1,0,0,
        0,850,851,3,12,6,0,851,860,5,137,0,0,852,857,3,152,76,0,853,854,
        5,127,0,0,854,856,3,152,76,0,855,853,1,0,0,0,856,859,1,0,0,0,857,
        855,1,0,0,0,857,858,1,0,0,0,858,861,1,0,0,0,859,857,1,0,0,0,860,
        852,1,0,0,0,860,861,1,0,0,0,861,862,1,0,0,0,862,863,5,138,0,0,863,
        143,1,0,0,0,864,866,3,146,73,0,865,864,1,0,0,0,865,866,1,0,0,0,866,
        867,1,0,0,0,867,869,5,130,0,0,868,865,1,0,0,0,869,872,1,0,0,0,870,
        868,1,0,0,0,870,871,1,0,0,0,871,145,1,0,0,0,872,870,1,0,0,0,873,
        878,3,148,74,0,874,878,3,150,75,0,875,878,3,154,77,0,876,878,3,166,
        83,0,877,873,1,0,0,0,877,874,1,0,0,0,877,875,1,0,0,0,877,876,1,0,
        0,0,878,147,1,0,0,0,879,880,3,112,56,0,880,881,5,9,0,0,881,882,3,
        98,49,0,882,149,1,0,0,0,883,889,3,142,71,0,884,885,5,73,0,0,885,
        886,5,137,0,0,886,889,5,138,0,0,887,889,5,14,0,0,888,883,1,0,0,0,
        888,884,1,0,0,0,888,887,1,0,0,0,889,151,1,0,0,0,890,891,3,118,59,
        0,891,892,5,9,0,0,892,894,1,0,0,0,893,890,1,0,0,0,893,894,1,0,0,
        0,894,895,1,0,0,0,895,904,3,98,49,0,896,898,5,113,0,0,897,896,1,
        0,0,0,897,898,1,0,0,0,898,899,1,0,0,0,899,900,3,118,59,0,900,901,
        5,10,0,0,901,902,3,112,56,0,902,904,1,0,0,0,903,893,1,0,0,0,903,
        897,1,0,0,0,904,153,1,0,0,0,905,908,3,156,78,0,906,908,3,158,79,
        0,907,905,1,0,0,0,907,906,1,0,0,0,908,155,1,0,0,0,909,910,5,4,0,
        0,910,911,3,98,49,0,911,912,5,5,0,0,912,920,3,144,72,0,913,914,5,
        6,0,0,914,915,3,98,49,0,915,916,5,5,0,0,916,917,3,144,72,0,917,919,
        1,0,0,0,918,913,1,0,0,0,919,922,1,0,0,0,920,918,1,0,0,0,920,921,
        1,0,0,0,921,925,1,0,0,0,922,920,1,0,0,0,923,924,5,7,0,0,924,926,
        3,144,72,0,925,923,1,0,0,0,925,926,1,0,0,0,926,927,1,0,0,0,927,928,
        5,8,0,0,928,157,1,0,0,0,929,930,5,11,0,0,930,931,3,98,49,0,931,933,
        5,12,0,0,932,934,3,160,80,0,933,932,1,0,0,0,934,935,1,0,0,0,935,
        933,1,0,0,0,935,936,1,0,0,0,936,939,1,0,0,0,937,938,5,7,0,0,938,
        940,3,144,72,0,939,937,1,0,0,0,939,940,1,0,0,0,940,941,1,0,0,0,941,
        942,5,13,0,0,942,159,1,0,0,0,943,944,3,162,81,0,944,945,5,129,0,
        0,945,946,3,144,72,0,946,161,1,0,0,0,947,952,3,164,82,0,948,949,
        5,127,0,0,949,951,3,164,82,0,950,948,1,0,0,0,951,954,1,0,0,0,952,
        950,1,0,0,0,952,953,1,0,0,0,953,163,1,0,0,0,954,952,1,0,0,0,955,
        956,3,138,69,0,956,165,1,0,0,0,957,963,3,168,84,0,958,963,3,174,
        87,0,959,963,3,176,88,0,960,963,5,20,0,0,961,963,5,19,0,0,962,957,
        1,0,0,0,962,958,1,0,0,0,962,959,1,0,0,0,962,960,1,0,0,0,962,961,
        1,0,0,0,963,167,1,0,0,0,964,965,5,15,0,0,965,966,3,170,85,0,966,
        967,5,9,0,0,967,968,3,172,86,0,968,969,5,16,0,0,969,970,3,144,72,
        0,970,971,5,21,0,0,971,169,1,0,0,0,972,973,5,125,0,0,973,171,1,0,
        0,0,974,975,3,98,49,0,975,976,5,17,0,0,976,979,3,98,49,0,977,978,
        5,18,0,0,978,980,3,98,49,0,979,977,1,0,0,0,979,980,1,0,0,0,980,173,
        1,0,0,0,981,982,5,22,0,0,982,983,3,98,49,0,983,984,5,16,0,0,984,
        985,3,144,72,0,985,986,5,23,0,0,986,175,1,0,0,0,987,988,5,24,0,0,
        988,989,3,144,72,0,989,990,5,25,0,0,990,991,3,98,49,0,991,992,5,
        26,0,0,992,177,1,0,0,0,993,994,3,144,72,0,994,179,1,0,0,0,99,182,
        187,197,199,205,212,220,234,236,256,265,272,282,286,291,299,302,
        318,320,328,334,341,352,359,366,371,377,383,399,401,407,413,429,
        431,438,455,457,464,481,483,490,496,499,502,509,516,526,539,549,
        559,569,578,588,598,607,617,627,636,645,654,664,676,678,684,698,
        724,726,738,751,755,764,766,770,780,788,799,806,820,826,834,841,
        848,857,860,865,870,877,888,893,897,903,907,920,925,935,939,952,
        962,979
    ]

class StructuredTextParser ( Parser ):

    grammarFileName = "StructuredText.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>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'\\n'", "<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>", "<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>", 
                     "<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>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'.'", "','", "'#'", "':'", 
                     "';'", "'>'", "'>='", "'<>'", "'<'", "'<='", "'='", 
                     "'('", "')'", "'+'", "'-'", "'**'", "'*'", "'/'", "'^'", 
                     "'%'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "IF", "THEN", "ELSIF", "ELSE", "END_IF", "ASSIGNE", 
                      "OUTPUT_ARROW", "CASE", "OF", "END_CASE", "RETURN", 
                      "FOR", "DO", "TO", "BY", "CONTINUE", "EXIT", "END_FOR", 
                      "WHILE", "END_WHILE", "REPEAT", "UNTIL", "END_REPEAT", 
                      "STD_FUNC_NAME", "STD_FB_NAME", "DOC_STRING", "PRAGMA", 
                      "Comment", "WS", "EOL", "PROGRAM", "END_PROGRAM", 
                      "FUNCTION", "END_FUNCTION", "FUNCTION_BLOCK", "END_FUNCTION_BLOCK", 
                      "INTERFACE", "END_INTERFACE", "METHOD", "END_METHOD", 
                      "PROPERTY", "END_PROPERTY", "PROPERTY_GETTER", "END_PROPERTY_GETTER", 
                      "PROPERTY_SETTER", "END_PROPERTY_SETTER", "NULL", 
                      "VAR", "VAR_INPUT", "VAR_OUTPUT", "VAR_IN_OUT", "VAR_EXTERNAL", 
                      "VAR_GLOBAL", "VAR_ACCESS", "VAR_TEMP", "VAR_CONFIG", 
                      "END_VAR", "RETAIN", "NON_RETAIN", "PROTECTED", "PUBLIC", 
                      "PRIVATE", "INTERNAL", "FINAL", "CONSTANT", "EXTENDS", 
                      "OVERRIDE", "ABSTRACT", "THIS", "SUPER", "IMPLEMENTS", 
                      "AT", "REF", "REF_TO", "BOOL", "SINT", "INT", "DINT", 
                      "LINT", "USINT", "UINT", "UDINT", "ULINT", "REAL", 
                      "LREAL", "TIME", "LTIME", "DATE", "LDATE", "TIME_OF_DAY", 
                      "TOD", "LTIME_OF_DAY", "LTOD", "DATE_AND_TIME", "DT", 
                      "LDATE_AND_TIME", "LDT", "STRING", "WSTRING", "BYTE", 
                      "WORD", "DWORD", "LWORD", "ARRAY", "ANY", "XOR", "MOD", 
                      "AND", "OR", "NOT", "TRUE", "FALSE", "TWINCAT_SYSTEM", 
                      "HEX_NUMBER", "DEZ_NUMBER", "OCT_NUMBER", "BIN_NUMBER", 
                      "HEX_CHAR", "DIGIT_CHAR", "OCTAL_CHAR", "BIT", "IDENTIFIER", 
                      "DOT", "COMMA", "HASH", "COLON", "SEMICOLON", "GT", 
                      "GE", "UE", "LT", "LE", "EQ", "L_PAREN", "R_PAREN", 
                      "PLUS", "MINUS", "POWER", "MULTIPLY", "DIVIDE", "DEREFERENCE", 
                      "PERCENT", "COMMON_CHAR_VALUE", "X", "B", "W", "D", 
                      "L", "I", "Q", "M" ]

    RULE_number = 0
    RULE_typed_number = 1
    RULE_row_number = 2
    RULE_pou_declaration = 3
    RULE_namespace_Name = 4
    RULE_function_name = 5
    RULE_func_Access = 6
    RULE_derived_Func_Name = 7
    RULE_function_declaration = 8
    RULE_elementary_data_types = 9
    RULE_array_data_type = 10
    RULE_fb_Type_Name = 11
    RULE_fb_Type_Access = 12
    RULE_function_block_name = 13
    RULE_parent_function_block_name = 14
    RULE_function_block_declaration = 15
    RULE_return_data_type = 16
    RULE_data_type = 17
    RULE_method_Name = 18
    RULE_property_Name = 19
    RULE_fb_Instance_Name = 20
    RULE_interface_Decl = 21
    RULE_method_Prototype = 22
    RULE_method_declaration = 23
    RULE_property_getter_declaration = 24
    RULE_property_setter_declaration = 25
    RULE_property_declaration = 26
    RULE_interface_Value = 27
    RULE_interface_Name_List = 28
    RULE_interface_Type_Name = 29
    RULE_interface_Type_Access = 30
    RULE_interface_Name = 31
    RULE_access_Spec = 32
    RULE_var_block = 33
    RULE_var_const_block = 34
    RULE_var_retain_block = 35
    RULE_var_non_retain_block = 36
    RULE_var_in_block = 37
    RULE_var_in_retain_block = 38
    RULE_var_in_non_retain_block = 39
    RULE_var_out_block = 40
    RULE_var_out_retain_block = 41
    RULE_var_out_non_retain_block = 42
    RULE_var_inout_block = 43
    RULE_var_temp_block = 44
    RULE_var_external_block = 45
    RULE_var_external_const_block = 46
    RULE_declaration_stmt = 47
    RULE_constant_expression = 48
    RULE_expression = 49
    RULE_primary_Expr = 50
    RULE_term = 51
    RULE_comparator = 52
    RULE_add_sub = 53
    RULE_unary = 54
    RULE_multibit_Part_Access = 55
    RULE_variable = 56
    RULE_symbolic_Variable = 57
    RULE_var_Access = 58
    RULE_variable_Name = 59
    RULE_multi_Elem_Var = 60
    RULE_subscript_List = 61
    RULE_subscript = 62
    RULE_global_Var_Name = 63
    RULE_global_Var_Decls = 64
    RULE_global_Var_Decl = 65
    RULE_global_Var_Spec = 66
    RULE_located_At = 67
    RULE_direct_Variable = 68
    RULE_constant_Expr = 69
    RULE_variable_Access = 70
    RULE_func_Call = 71
    RULE_stmt_List = 72
    RULE_stmt = 73
    RULE_assign_Stmt = 74
    RULE_subprog_Ctrl_Stmt = 75
    RULE_param_Assign = 76
    RULE_selection_Stmt = 77
    RULE_if_Stmt = 78
    RULE_case_Stmt = 79
    RULE_case_Selection = 80
    RULE_case_List = 81
    RULE_case_List_Elem = 82
    RULE_iteration_Stmt = 83
    RULE_for_Stmt = 84
    RULE_control_Variable = 85
    RULE_for_List = 86
    RULE_while_Stmt = 87
    RULE_repeat_Stmt = 88
    RULE_function_body = 89

    ruleNames =  [ "number", "typed_number", "row_number", "pou_declaration", 
                   "namespace_Name", "function_name", "func_Access", "derived_Func_Name", 
                   "function_declaration", "elementary_data_types", "array_data_type", 
                   "fb_Type_Name", "fb_Type_Access", "function_block_name", 
                   "parent_function_block_name", "function_block_declaration", 
                   "return_data_type", "data_type", "method_Name", "property_Name", 
                   "fb_Instance_Name", "interface_Decl", "method_Prototype", 
                   "method_declaration", "property_getter_declaration", 
                   "property_setter_declaration", "property_declaration", 
                   "interface_Value", "interface_Name_List", "interface_Type_Name", 
                   "interface_Type_Access", "interface_Name", "access_Spec", 
                   "var_block", "var_const_block", "var_retain_block", "var_non_retain_block", 
                   "var_in_block", "var_in_retain_block", "var_in_non_retain_block", 
                   "var_out_block", "var_out_retain_block", "var_out_non_retain_block", 
                   "var_inout_block", "var_temp_block", "var_external_block", 
                   "var_external_const_block", "declaration_stmt", "constant_expression", 
                   "expression", "primary_Expr", "term", "comparator", "add_sub", 
                   "unary", "multibit_Part_Access", "variable", "symbolic_Variable", 
                   "var_Access", "variable_Name", "multi_Elem_Var", "subscript_List", 
                   "subscript", "global_Var_Name", "global_Var_Decls", "global_Var_Decl", 
                   "global_Var_Spec", "located_At", "direct_Variable", "constant_Expr", 
                   "variable_Access", "func_Call", "stmt_List", "stmt", 
                   "assign_Stmt", "subprog_Ctrl_Stmt", "param_Assign", "selection_Stmt", 
                   "if_Stmt", "case_Stmt", "case_Selection", "case_List", 
                   "case_List_Elem", "iteration_Stmt", "for_Stmt", "control_Variable", 
                   "for_List", "while_Stmt", "repeat_Stmt", "function_body" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    IF=4
    THEN=5
    ELSIF=6
    ELSE=7
    END_IF=8
    ASSIGNE=9
    OUTPUT_ARROW=10
    CASE=11
    OF=12
    END_CASE=13
    RETURN=14
    FOR=15
    DO=16
    TO=17
    BY=18
    CONTINUE=19
    EXIT=20
    END_FOR=21
    WHILE=22
    END_WHILE=23
    REPEAT=24
    UNTIL=25
    END_REPEAT=26
    STD_FUNC_NAME=27
    STD_FB_NAME=28
    DOC_STRING=29
    PRAGMA=30
    Comment=31
    WS=32
    EOL=33
    PROGRAM=34
    END_PROGRAM=35
    FUNCTION=36
    END_FUNCTION=37
    FUNCTION_BLOCK=38
    END_FUNCTION_BLOCK=39
    INTERFACE=40
    END_INTERFACE=41
    METHOD=42
    END_METHOD=43
    PROPERTY=44
    END_PROPERTY=45
    PROPERTY_GETTER=46
    END_PROPERTY_GETTER=47
    PROPERTY_SETTER=48
    END_PROPERTY_SETTER=49
    NULL=50
    VAR=51
    VAR_INPUT=52
    VAR_OUTPUT=53
    VAR_IN_OUT=54
    VAR_EXTERNAL=55
    VAR_GLOBAL=56
    VAR_ACCESS=57
    VAR_TEMP=58
    VAR_CONFIG=59
    END_VAR=60
    RETAIN=61
    NON_RETAIN=62
    PROTECTED=63
    PUBLIC=64
    PRIVATE=65
    INTERNAL=66
    FINAL=67
    CONSTANT=68
    EXTENDS=69
    OVERRIDE=70
    ABSTRACT=71
    THIS=72
    SUPER=73
    IMPLEMENTS=74
    AT=75
    REF=76
    REF_TO=77
    BOOL=78
    SINT=79
    INT=80
    DINT=81
    LINT=82
    USINT=83
    UINT=84
    UDINT=85
    ULINT=86
    REAL=87
    LREAL=88
    TIME=89
    LTIME=90
    DATE=91
    LDATE=92
    TIME_OF_DAY=93
    TOD=94
    LTIME_OF_DAY=95
    LTOD=96
    DATE_AND_TIME=97
    DT=98
    LDATE_AND_TIME=99
    LDT=100
    STRING=101
    WSTRING=102
    BYTE=103
    WORD=104
    DWORD=105
    LWORD=106
    ARRAY=107
    ANY=108
    XOR=109
    MOD=110
    AND=111
    OR=112
    NOT=113
    TRUE=114
    FALSE=115
    TWINCAT_SYSTEM=116
    HEX_NUMBER=117
    DEZ_NUMBER=118
    OCT_NUMBER=119
    BIN_NUMBER=120
    HEX_CHAR=121
    DIGIT_CHAR=122
    OCTAL_CHAR=123
    BIT=124
    IDENTIFIER=125
    DOT=126
    COMMA=127
    HASH=128
    COLON=129
    SEMICOLON=130
    GT=131
    GE=132
    UE=133
    LT=134
    LE=135
    EQ=136
    L_PAREN=137
    R_PAREN=138
    PLUS=139
    MINUS=140
    POWER=141
    MULTIPLY=142
    DIVIDE=143
    DEREFERENCE=144
    PERCENT=145
    COMMON_CHAR_VALUE=146
    X=147
    B=148
    W=149
    D=150
    L=151
    I=152
    Q=153
    M=154

    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 NumberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def row_number(self):
            return self.getTypedRuleContext(StructuredTextParser.Row_numberContext,0)


        def typed_number(self):
            return self.getTypedRuleContext(StructuredTextParser.Typed_numberContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_number

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNumber" ):
                listener.enterNumber(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNumber" ):
                listener.exitNumber(self)

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




    def number(self):

        localctx = StructuredTextParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_number)
        try:
            self.state = 182
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 180
                self.row_number()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 181
                self.typed_number()
                pass


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


    class Typed_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def row_number(self):
            return self.getTypedRuleContext(StructuredTextParser.Row_numberContext,0)


        def elementary_data_types(self):
            return self.getTypedRuleContext(StructuredTextParser.Elementary_data_typesContext,0)


        def HASH(self):
            return self.getToken(StructuredTextParser.HASH, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_typed_number

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterTyped_number" ):
                listener.enterTyped_number(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitTyped_number" ):
                listener.exitTyped_number(self)

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




    def typed_number(self):

        localctx = StructuredTextParser.Typed_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_typed_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 187
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & 1610612735) != 0:
                self.state = 184
                self.elementary_data_types()
                self.state = 185
                self.match(StructuredTextParser.HASH)


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


    class Row_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEZ_NUMBER(self):
            return self.getToken(StructuredTextParser.DEZ_NUMBER, 0)

        def HEX_NUMBER(self):
            return self.getToken(StructuredTextParser.HEX_NUMBER, 0)

        def OCT_NUMBER(self):
            return self.getToken(StructuredTextParser.OCT_NUMBER, 0)

        def BIN_NUMBER(self):
            return self.getToken(StructuredTextParser.BIN_NUMBER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_row_number

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRow_number" ):
                listener.enterRow_number(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRow_number" ):
                listener.exitRow_number(self)

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




    def row_number(self):

        localctx = StructuredTextParser.Row_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_row_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 191
            _la = self._input.LA(1)
            if not((((_la - 117)) & ~0x3f) == 0 and ((1 << (_la - 117)) & 15) != 0):
                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 Pou_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def global_Var_Decls(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Global_Var_DeclsContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Global_Var_DeclsContext,i)


        def function_declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Function_declarationContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Function_declarationContext,i)


        def function_block_declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Function_block_declarationContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Function_block_declarationContext,i)


        def interface_Decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Interface_DeclContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Interface_DeclContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_pou_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterPou_declaration" ):
                listener.enterPou_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitPou_declaration" ):
                listener.exitPou_declaration(self)

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




    def pou_declaration(self):

        localctx = StructuredTextParser.Pou_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_pou_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 197 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 197
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,2,self._ctx)
                if la_ == 1:
                    self.state = 193
                    self.global_Var_Decls()
                    pass

                elif la_ == 2:
                    self.state = 194
                    self.function_declaration()
                    pass

                elif la_ == 3:
                    self.state = 195
                    self.function_block_declaration()
                    pass

                elif la_ == 4:
                    self.state = 196
                    self.interface_Decl()
                    pass


                self.state = 199 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (((_la) & ~0x3f) == 0 and ((1 << _la) & 72059037683810304) != 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 Namespace_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_namespace_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNamespace_Name" ):
                listener.enterNamespace_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNamespace_Name" ):
                listener.exitNamespace_Name(self)

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




    def namespace_Name(self):

        localctx = StructuredTextParser.Namespace_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_namespace_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 201
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Function_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def STD_FUNC_NAME(self):
            return self.getToken(StructuredTextParser.STD_FUNC_NAME, 0)

        def derived_Func_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Derived_Func_NameContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_function_name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunction_name" ):
                listener.enterFunction_name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunction_name" ):
                listener.exitFunction_name(self)

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




    def function_name(self):

        localctx = StructuredTextParser.Function_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_function_name)
        try:
            self.state = 205
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [27]:
                self.enterOuterAlt(localctx, 1)
                self.state = 203
                self.match(StructuredTextParser.STD_FUNC_NAME)
                pass
            elif token in [125]:
                self.enterOuterAlt(localctx, 2)
                self.state = 204
                self.derived_Func_Name()
                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 Func_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def function_name(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_nameContext,0)


        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_func_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunc_Access" ):
                listener.enterFunc_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunc_Access" ):
                listener.exitFunc_Access(self)

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




    def func_Access(self):

        localctx = StructuredTextParser.Func_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_func_Access)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 212
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,5,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 207
                    self.namespace_Name()
                    self.state = 208
                    self.match(StructuredTextParser.DOT) 
                self.state = 214
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,self._ctx)

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


    class Derived_Func_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_derived_Func_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDerived_Func_Name" ):
                listener.enterDerived_Func_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDerived_Func_Name" ):
                listener.exitDerived_Func_Name(self)

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




    def derived_Func_Name(self):

        localctx = StructuredTextParser.Derived_Func_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_derived_Func_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 217
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Function_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNCTION(self):
            return self.getToken(StructuredTextParser.FUNCTION, 0)

        def derived_Func_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Derived_Func_NameContext,0)


        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def return_data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Return_data_typeContext,0)


        def function_body(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_bodyContext,0)


        def END_FUNCTION(self):
            return self.getToken(StructuredTextParser.END_FUNCTION, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_function_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunction_declaration" ):
                listener.enterFunction_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunction_declaration" ):
                listener.exitFunction_declaration(self)

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




    def function_declaration(self):

        localctx = StructuredTextParser.Function_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_function_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 220
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 219
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 222
            self.match(StructuredTextParser.FUNCTION)
            self.state = 223
            self.derived_Func_Name()
            self.state = 224
            self.match(StructuredTextParser.COLON)
            self.state = 225
            self.return_data_type()
            self.state = 236
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 234
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
                if la_ == 1:
                    self.state = 226
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 227
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 228
                    self.var_in_block()
                    pass

                elif la_ == 4:
                    self.state = 229
                    self.var_out_block()
                    pass

                elif la_ == 5:
                    self.state = 230
                    self.var_inout_block()
                    pass

                elif la_ == 6:
                    self.state = 231
                    self.var_temp_block()
                    pass

                elif la_ == 7:
                    self.state = 232
                    self.var_external_block()
                    pass

                elif la_ == 8:
                    self.state = 233
                    self.var_external_const_block()
                    pass


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

            self.state = 239
            self.function_body()
            self.state = 240
            self.match(StructuredTextParser.END_FUNCTION)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Elementary_data_typesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BOOL(self):
            return self.getToken(StructuredTextParser.BOOL, 0)

        def SINT(self):
            return self.getToken(StructuredTextParser.SINT, 0)

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

        def DINT(self):
            return self.getToken(StructuredTextParser.DINT, 0)

        def LINT(self):
            return self.getToken(StructuredTextParser.LINT, 0)

        def USINT(self):
            return self.getToken(StructuredTextParser.USINT, 0)

        def UINT(self):
            return self.getToken(StructuredTextParser.UINT, 0)

        def UDINT(self):
            return self.getToken(StructuredTextParser.UDINT, 0)

        def ULINT(self):
            return self.getToken(StructuredTextParser.ULINT, 0)

        def REAL(self):
            return self.getToken(StructuredTextParser.REAL, 0)

        def LREAL(self):
            return self.getToken(StructuredTextParser.LREAL, 0)

        def TIME(self):
            return self.getToken(StructuredTextParser.TIME, 0)

        def LTIME(self):
            return self.getToken(StructuredTextParser.LTIME, 0)

        def DATE(self):
            return self.getToken(StructuredTextParser.DATE, 0)

        def LDATE(self):
            return self.getToken(StructuredTextParser.LDATE, 0)

        def TIME_OF_DAY(self):
            return self.getToken(StructuredTextParser.TIME_OF_DAY, 0)

        def TOD(self):
            return self.getToken(StructuredTextParser.TOD, 0)

        def LTIME_OF_DAY(self):
            return self.getToken(StructuredTextParser.LTIME_OF_DAY, 0)

        def LTOD(self):
            return self.getToken(StructuredTextParser.LTOD, 0)

        def DATE_AND_TIME(self):
            return self.getToken(StructuredTextParser.DATE_AND_TIME, 0)

        def DT(self):
            return self.getToken(StructuredTextParser.DT, 0)

        def LDATE_AND_TIME(self):
            return self.getToken(StructuredTextParser.LDATE_AND_TIME, 0)

        def LDT(self):
            return self.getToken(StructuredTextParser.LDT, 0)

        def STRING(self):
            return self.getToken(StructuredTextParser.STRING, 0)

        def WSTRING(self):
            return self.getToken(StructuredTextParser.WSTRING, 0)

        def BYTE(self):
            return self.getToken(StructuredTextParser.BYTE, 0)

        def WORD(self):
            return self.getToken(StructuredTextParser.WORD, 0)

        def DWORD(self):
            return self.getToken(StructuredTextParser.DWORD, 0)

        def LWORD(self):
            return self.getToken(StructuredTextParser.LWORD, 0)

        def ANY(self):
            return self.getToken(StructuredTextParser.ANY, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_elementary_data_types

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterElementary_data_types" ):
                listener.enterElementary_data_types(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitElementary_data_types" ):
                listener.exitElementary_data_types(self)

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




    def elementary_data_types(self):

        localctx = StructuredTextParser.Elementary_data_typesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_elementary_data_types)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 242
            _la = self._input.LA(1)
            if not((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & 1610612735) != 0):
                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 Array_data_typeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ARRAY(self):
            return self.getToken(StructuredTextParser.ARRAY, 0)

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.NumberContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.NumberContext,i)


        def OF(self):
            return self.getToken(StructuredTextParser.OF, 0)

        def elementary_data_types(self):
            return self.getTypedRuleContext(StructuredTextParser.Elementary_data_typesContext,0)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_array_data_type

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterArray_data_type" ):
                listener.enterArray_data_type(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitArray_data_type" ):
                listener.exitArray_data_type(self)

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




    def array_data_type(self):

        localctx = StructuredTextParser.Array_data_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_array_data_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 244
            self.match(StructuredTextParser.ARRAY)
            self.state = 245
            self.match(StructuredTextParser.T__0)
            self.state = 246
            self.number()
            self.state = 247
            self.match(StructuredTextParser.T__1)
            self.state = 248
            self.number()
            self.state = 256
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==127:
                self.state = 249
                self.match(StructuredTextParser.COMMA)
                self.state = 250
                self.number()
                self.state = 251
                self.match(StructuredTextParser.T__1)
                self.state = 252
                self.number()
                self.state = 258
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 259
            self.match(StructuredTextParser.T__2)
            self.state = 260
            self.match(StructuredTextParser.OF)
            self.state = 261
            self.elementary_data_types()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Fb_Type_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def STD_FB_NAME(self):
            return self.getToken(StructuredTextParser.STD_FB_NAME, 0)

        def function_block_name(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_block_nameContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_fb_Type_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFb_Type_Name" ):
                listener.enterFb_Type_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFb_Type_Name" ):
                listener.exitFb_Type_Name(self)

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




    def fb_Type_Name(self):

        localctx = StructuredTextParser.Fb_Type_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_fb_Type_Name)
        try:
            self.state = 265
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [28]:
                self.enterOuterAlt(localctx, 1)
                self.state = 263
                self.match(StructuredTextParser.STD_FB_NAME)
                pass
            elif token in [125]:
                self.enterOuterAlt(localctx, 2)
                self.state = 264
                self.function_block_name()
                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 Fb_Type_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def fb_Type_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Fb_Type_NameContext,0)


        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_fb_Type_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFb_Type_Access" ):
                listener.enterFb_Type_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFb_Type_Access" ):
                listener.exitFb_Type_Access(self)

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




    def fb_Type_Access(self):

        localctx = StructuredTextParser.Fb_Type_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_fb_Type_Access)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,11,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 267
                    self.namespace_Name()
                    self.state = 268
                    self.match(StructuredTextParser.DOT) 
                self.state = 274
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,11,self._ctx)

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


    class Function_block_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_function_block_name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunction_block_name" ):
                listener.enterFunction_block_name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunction_block_name" ):
                listener.exitFunction_block_name(self)

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




    def function_block_name(self):

        localctx = StructuredTextParser.Function_block_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_function_block_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 277
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Parent_function_block_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_parent_function_block_name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterParent_function_block_name" ):
                listener.enterParent_function_block_name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitParent_function_block_name" ):
                listener.exitParent_function_block_name(self)

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




    def parent_function_block_name(self):

        localctx = StructuredTextParser.Parent_function_block_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_parent_function_block_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 279
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Function_block_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNCTION_BLOCK(self):
            return self.getToken(StructuredTextParser.FUNCTION_BLOCK, 0)

        def function_block_name(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_block_nameContext,0)


        def function_body(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_bodyContext,0)


        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def EXTENDS(self):
            return self.getToken(StructuredTextParser.EXTENDS, 0)

        def parent_function_block_name(self):
            return self.getTypedRuleContext(StructuredTextParser.Parent_function_block_nameContext,0)


        def IMPLEMENTS(self):
            return self.getToken(StructuredTextParser.IMPLEMENTS, 0)

        def interface_Type_Access(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Interface_Type_AccessContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Interface_Type_AccessContext,i)


        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_retain_blockContext,i)


        def var_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_non_retain_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_in_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_retain_blockContext,i)


        def var_in_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_non_retain_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_out_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_retain_blockContext,i)


        def var_out_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_non_retain_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def method_declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Method_declarationContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Method_declarationContext,i)


        def property_declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Property_declarationContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Property_declarationContext,i)


        def FINAL(self):
            return self.getToken(StructuredTextParser.FINAL, 0)

        def ABSTRACT(self):
            return self.getToken(StructuredTextParser.ABSTRACT, 0)

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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_function_block_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunction_block_declaration" ):
                listener.enterFunction_block_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunction_block_declaration" ):
                listener.exitFunction_block_declaration(self)

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




    def function_block_declaration(self):

        localctx = StructuredTextParser.Function_block_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_function_block_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 282
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 281
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 284
            self.match(StructuredTextParser.FUNCTION_BLOCK)
            self.state = 286
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==67 or _la==71:
                self.state = 285
                _la = self._input.LA(1)
                if not(_la==67 or _la==71):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 288
            self.function_block_name()
            self.state = 291
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==69:
                self.state = 289
                self.match(StructuredTextParser.EXTENDS)
                self.state = 290
                self.parent_function_block_name()


            self.state = 302
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==74:
                self.state = 293
                self.match(StructuredTextParser.IMPLEMENTS)
                self.state = 294
                self.interface_Type_Access()
                self.state = 299
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==127:
                    self.state = 295
                    self.match(StructuredTextParser.COMMA)
                    self.state = 296
                    self.interface_Type_Access()
                    self.state = 301
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 320
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 318
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
                if la_ == 1:
                    self.state = 304
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 305
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 306
                    self.var_retain_block()
                    pass

                elif la_ == 4:
                    self.state = 307
                    self.var_non_retain_block()
                    pass

                elif la_ == 5:
                    self.state = 308
                    self.var_in_block()
                    pass

                elif la_ == 6:
                    self.state = 309
                    self.var_in_retain_block()
                    pass

                elif la_ == 7:
                    self.state = 310
                    self.var_in_non_retain_block()
                    pass

                elif la_ == 8:
                    self.state = 311
                    self.var_out_block()
                    pass

                elif la_ == 9:
                    self.state = 312
                    self.var_out_retain_block()
                    pass

                elif la_ == 10:
                    self.state = 313
                    self.var_out_non_retain_block()
                    pass

                elif la_ == 11:
                    self.state = 314
                    self.var_inout_block()
                    pass

                elif la_ == 12:
                    self.state = 315
                    self.var_temp_block()
                    pass

                elif la_ == 13:
                    self.state = 316
                    self.var_external_block()
                    pass

                elif la_ == 14:
                    self.state = 317
                    self.var_external_const_block()
                    pass


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

            self.state = 323
            self.function_body()
            1
            self.state = 328
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,19,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 325
                    self.method_declaration() 
                self.state = 330
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,self._ctx)

            self.state = 334
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,20,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 331
                    self.property_declaration() 
                self.state = 336
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,20,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 Return_data_typeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Data_typeContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_return_data_type

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterReturn_data_type" ):
                listener.enterReturn_data_type(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitReturn_data_type" ):
                listener.exitReturn_data_type(self)

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




    def return_data_type(self):

        localctx = StructuredTextParser.Return_data_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_return_data_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 337
            self.data_type()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Data_typeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def elementary_data_types(self):
            return self.getTypedRuleContext(StructuredTextParser.Elementary_data_typesContext,0)


        def array_data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Array_data_typeContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_data_type

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterData_type" ):
                listener.enterData_type(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitData_type" ):
                listener.exitData_type(self)

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




    def data_type(self):

        localctx = StructuredTextParser.Data_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_data_type)
        try:
            self.state = 341
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108]:
                self.enterOuterAlt(localctx, 1)
                self.state = 339
                self.elementary_data_types()
                pass
            elif token in [107]:
                self.enterOuterAlt(localctx, 2)
                self.state = 340
                self.array_data_type()
                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 Method_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_method_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_Name" ):
                listener.enterMethod_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_Name" ):
                listener.exitMethod_Name(self)

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




    def method_Name(self):

        localctx = StructuredTextParser.Method_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_method_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 343
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Property_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_property_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterProperty_Name" ):
                listener.enterProperty_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitProperty_Name" ):
                listener.exitProperty_Name(self)

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




    def property_Name(self):

        localctx = StructuredTextParser.Property_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_property_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 345
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Fb_Instance_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def function_block_name(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_block_nameContext,0)


        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


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

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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_fb_Instance_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFb_Instance_Name" ):
                listener.enterFb_Instance_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFb_Instance_Name" ):
                listener.exitFb_Instance_Name(self)

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




    def fb_Instance_Name(self):

        localctx = StructuredTextParser.Fb_Instance_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_fb_Instance_Name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 352
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,22,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 347
                    self.namespace_Name()
                    self.state = 348
                    self.match(StructuredTextParser.DOT) 
                self.state = 354
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,22,self._ctx)

            self.state = 355
            self.function_block_name()
            self.state = 359
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==144:
                self.state = 356
                self.match(StructuredTextParser.DEREFERENCE)
                self.state = 361
                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 Interface_DeclContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INTERFACE(self):
            return self.getToken(StructuredTextParser.INTERFACE, 0)

        def interface_Type_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Interface_Type_NameContext,0)


        def END_INTERFACE(self):
            return self.getToken(StructuredTextParser.END_INTERFACE, 0)

        def EXTENDS(self):
            return self.getToken(StructuredTextParser.EXTENDS, 0)

        def interface_Name_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Interface_Name_ListContext,0)


        def method_Prototype(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Method_PrototypeContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Method_PrototypeContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Decl

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Decl" ):
                listener.enterInterface_Decl(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Decl" ):
                listener.exitInterface_Decl(self)

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




    def interface_Decl(self):

        localctx = StructuredTextParser.Interface_DeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_interface_Decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.match(StructuredTextParser.INTERFACE)
            self.state = 363
            self.interface_Type_Name()
            self.state = 366
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==69:
                self.state = 364
                self.match(StructuredTextParser.EXTENDS)
                self.state = 365
                self.interface_Name_List()


            self.state = 371
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==29 or _la==42:
                self.state = 368
                self.method_Prototype()
                self.state = 373
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 374
            self.match(StructuredTextParser.END_INTERFACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_PrototypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def METHOD(self):
            return self.getToken(StructuredTextParser.METHOD, 0)

        def method_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Method_NameContext,0)


        def END_METHOD(self):
            return self.getToken(StructuredTextParser.END_METHOD, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def return_data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Return_data_typeContext,0)


        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_retain_blockContext,i)


        def var_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_non_retain_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_in_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_retain_blockContext,i)


        def var_in_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_non_retain_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_out_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_retain_blockContext,i)


        def var_out_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_non_retain_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_method_Prototype

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_Prototype" ):
                listener.enterMethod_Prototype(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_Prototype" ):
                listener.exitMethod_Prototype(self)

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




    def method_Prototype(self):

        localctx = StructuredTextParser.Method_PrototypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_method_Prototype)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 377
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 376
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 379
            self.match(StructuredTextParser.METHOD)
            self.state = 380
            self.method_Name()
            self.state = 383
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==129:
                self.state = 381
                self.match(StructuredTextParser.COLON)
                self.state = 382
                self.return_data_type()


            self.state = 401
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 399
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,28,self._ctx)
                if la_ == 1:
                    self.state = 385
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 386
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 387
                    self.var_retain_block()
                    pass

                elif la_ == 4:
                    self.state = 388
                    self.var_non_retain_block()
                    pass

                elif la_ == 5:
                    self.state = 389
                    self.var_in_block()
                    pass

                elif la_ == 6:
                    self.state = 390
                    self.var_in_retain_block()
                    pass

                elif la_ == 7:
                    self.state = 391
                    self.var_in_non_retain_block()
                    pass

                elif la_ == 8:
                    self.state = 392
                    self.var_out_block()
                    pass

                elif la_ == 9:
                    self.state = 393
                    self.var_out_retain_block()
                    pass

                elif la_ == 10:
                    self.state = 394
                    self.var_out_non_retain_block()
                    pass

                elif la_ == 11:
                    self.state = 395
                    self.var_inout_block()
                    pass

                elif la_ == 12:
                    self.state = 396
                    self.var_temp_block()
                    pass

                elif la_ == 13:
                    self.state = 397
                    self.var_external_block()
                    pass

                elif la_ == 14:
                    self.state = 398
                    self.var_external_const_block()
                    pass


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

            self.state = 404
            self.match(StructuredTextParser.END_METHOD)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def METHOD(self):
            return self.getToken(StructuredTextParser.METHOD, 0)

        def method_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Method_NameContext,0)


        def function_body(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_bodyContext,0)


        def END_METHOD(self):
            return self.getToken(StructuredTextParser.END_METHOD, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def return_data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Return_data_typeContext,0)


        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_retain_blockContext,i)


        def var_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_non_retain_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_in_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_retain_blockContext,i)


        def var_in_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_non_retain_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_out_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_retain_blockContext,i)


        def var_out_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_non_retain_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_method_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_declaration" ):
                listener.enterMethod_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_declaration" ):
                listener.exitMethod_declaration(self)

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




    def method_declaration(self):

        localctx = StructuredTextParser.Method_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_method_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 407
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 406
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 409
            self.match(StructuredTextParser.METHOD)
            self.state = 410
            self.method_Name()
            self.state = 413
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==129:
                self.state = 411
                self.match(StructuredTextParser.COLON)
                self.state = 412
                self.return_data_type()


            self.state = 431
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 429
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
                if la_ == 1:
                    self.state = 415
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 416
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 417
                    self.var_retain_block()
                    pass

                elif la_ == 4:
                    self.state = 418
                    self.var_non_retain_block()
                    pass

                elif la_ == 5:
                    self.state = 419
                    self.var_in_block()
                    pass

                elif la_ == 6:
                    self.state = 420
                    self.var_in_retain_block()
                    pass

                elif la_ == 7:
                    self.state = 421
                    self.var_in_non_retain_block()
                    pass

                elif la_ == 8:
                    self.state = 422
                    self.var_out_block()
                    pass

                elif la_ == 9:
                    self.state = 423
                    self.var_out_retain_block()
                    pass

                elif la_ == 10:
                    self.state = 424
                    self.var_out_non_retain_block()
                    pass

                elif la_ == 11:
                    self.state = 425
                    self.var_inout_block()
                    pass

                elif la_ == 12:
                    self.state = 426
                    self.var_temp_block()
                    pass

                elif la_ == 13:
                    self.state = 427
                    self.var_external_block()
                    pass

                elif la_ == 14:
                    self.state = 428
                    self.var_external_const_block()
                    pass


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

            self.state = 434
            self.function_body()
            self.state = 435
            self.match(StructuredTextParser.END_METHOD)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Property_getter_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PROPERTY_GETTER(self):
            return self.getToken(StructuredTextParser.PROPERTY_GETTER, 0)

        def function_body(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_bodyContext,0)


        def END_PROPERTY_GETTER(self):
            return self.getToken(StructuredTextParser.END_PROPERTY_GETTER, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_retain_blockContext,i)


        def var_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_non_retain_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_in_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_retain_blockContext,i)


        def var_in_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_non_retain_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_out_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_retain_blockContext,i)


        def var_out_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_non_retain_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_property_getter_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterProperty_getter_declaration" ):
                listener.enterProperty_getter_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitProperty_getter_declaration" ):
                listener.exitProperty_getter_declaration(self)

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




    def property_getter_declaration(self):

        localctx = StructuredTextParser.Property_getter_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_property_getter_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 438
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 437
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 440
            self.match(StructuredTextParser.PROPERTY_GETTER)
            self.state = 457
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 455
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,35,self._ctx)
                if la_ == 1:
                    self.state = 441
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 442
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 443
                    self.var_retain_block()
                    pass

                elif la_ == 4:
                    self.state = 444
                    self.var_non_retain_block()
                    pass

                elif la_ == 5:
                    self.state = 445
                    self.var_in_block()
                    pass

                elif la_ == 6:
                    self.state = 446
                    self.var_in_retain_block()
                    pass

                elif la_ == 7:
                    self.state = 447
                    self.var_in_non_retain_block()
                    pass

                elif la_ == 8:
                    self.state = 448
                    self.var_out_block()
                    pass

                elif la_ == 9:
                    self.state = 449
                    self.var_out_retain_block()
                    pass

                elif la_ == 10:
                    self.state = 450
                    self.var_out_non_retain_block()
                    pass

                elif la_ == 11:
                    self.state = 451
                    self.var_inout_block()
                    pass

                elif la_ == 12:
                    self.state = 452
                    self.var_temp_block()
                    pass

                elif la_ == 13:
                    self.state = 453
                    self.var_external_block()
                    pass

                elif la_ == 14:
                    self.state = 454
                    self.var_external_const_block()
                    pass


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

            self.state = 460
            self.function_body()
            self.state = 461
            self.match(StructuredTextParser.END_PROPERTY_GETTER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Property_setter_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PROPERTY_SETTER(self):
            return self.getToken(StructuredTextParser.PROPERTY_SETTER, 0)

        def function_body(self):
            return self.getTypedRuleContext(StructuredTextParser.Function_bodyContext,0)


        def END_PROPERTY_SETTER(self):
            return self.getToken(StructuredTextParser.END_PROPERTY_SETTER, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def var_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_blockContext,i)


        def var_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_const_blockContext,i)


        def var_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_retain_blockContext,i)


        def var_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_non_retain_blockContext,i)


        def var_in_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_blockContext,i)


        def var_in_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_retain_blockContext,i)


        def var_in_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_in_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_in_non_retain_blockContext,i)


        def var_out_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_blockContext,i)


        def var_out_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_retain_blockContext,i)


        def var_out_non_retain_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_out_non_retain_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_out_non_retain_blockContext,i)


        def var_inout_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_inout_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_inout_blockContext,i)


        def var_temp_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_temp_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_temp_blockContext,i)


        def var_external_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_blockContext,i)


        def var_external_const_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Var_external_const_blockContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Var_external_const_blockContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_property_setter_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterProperty_setter_declaration" ):
                listener.enterProperty_setter_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitProperty_setter_declaration" ):
                listener.exitProperty_setter_declaration(self)

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




    def property_setter_declaration(self):

        localctx = StructuredTextParser.Property_setter_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_property_setter_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 464
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 463
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 466
            self.match(StructuredTextParser.PROPERTY_SETTER)
            self.state = 483
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 358036170375954432) != 0:
                self.state = 481
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,38,self._ctx)
                if la_ == 1:
                    self.state = 467
                    self.var_block()
                    pass

                elif la_ == 2:
                    self.state = 468
                    self.var_const_block()
                    pass

                elif la_ == 3:
                    self.state = 469
                    self.var_retain_block()
                    pass

                elif la_ == 4:
                    self.state = 470
                    self.var_non_retain_block()
                    pass

                elif la_ == 5:
                    self.state = 471
                    self.var_in_block()
                    pass

                elif la_ == 6:
                    self.state = 472
                    self.var_in_retain_block()
                    pass

                elif la_ == 7:
                    self.state = 473
                    self.var_in_non_retain_block()
                    pass

                elif la_ == 8:
                    self.state = 474
                    self.var_out_block()
                    pass

                elif la_ == 9:
                    self.state = 475
                    self.var_out_retain_block()
                    pass

                elif la_ == 10:
                    self.state = 476
                    self.var_out_non_retain_block()
                    pass

                elif la_ == 11:
                    self.state = 477
                    self.var_inout_block()
                    pass

                elif la_ == 12:
                    self.state = 478
                    self.var_temp_block()
                    pass

                elif la_ == 13:
                    self.state = 479
                    self.var_external_block()
                    pass

                elif la_ == 14:
                    self.state = 480
                    self.var_external_const_block()
                    pass


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

            self.state = 486
            self.function_body()
            self.state = 487
            self.match(StructuredTextParser.END_PROPERTY_SETTER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Property_declarationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PROPERTY(self):
            return self.getToken(StructuredTextParser.PROPERTY, 0)

        def property_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Property_NameContext,0)


        def END_PROPERTY(self):
            return self.getToken(StructuredTextParser.END_PROPERTY, 0)

        def DOC_STRING(self):
            return self.getToken(StructuredTextParser.DOC_STRING, 0)

        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def return_data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Return_data_typeContext,0)


        def property_getter_declaration(self):
            return self.getTypedRuleContext(StructuredTextParser.Property_getter_declarationContext,0)


        def property_setter_declaration(self):
            return self.getTypedRuleContext(StructuredTextParser.Property_setter_declarationContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_property_declaration

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterProperty_declaration" ):
                listener.enterProperty_declaration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitProperty_declaration" ):
                listener.exitProperty_declaration(self)

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




    def property_declaration(self):

        localctx = StructuredTextParser.Property_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_property_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 490
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 489
                self.match(StructuredTextParser.DOC_STRING)


            self.state = 492
            self.match(StructuredTextParser.PROPERTY)
            self.state = 493
            self.property_Name()
            self.state = 496
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==129:
                self.state = 494
                self.match(StructuredTextParser.COLON)
                self.state = 495
                self.return_data_type()


            self.state = 499
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,42,self._ctx)
            if la_ == 1:
                self.state = 498
                self.property_getter_declaration()


            self.state = 502
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29 or _la==48:
                self.state = 501
                self.property_setter_declaration()


            self.state = 504
            self.match(StructuredTextParser.END_PROPERTY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Interface_ValueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def symbolic_Variable(self):
            return self.getTypedRuleContext(StructuredTextParser.Symbolic_VariableContext,0)


        def fb_Instance_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Fb_Instance_NameContext,0)


        def NULL(self):
            return self.getToken(StructuredTextParser.NULL, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Value

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Value" ):
                listener.enterInterface_Value(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Value" ):
                listener.exitInterface_Value(self)

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




    def interface_Value(self):

        localctx = StructuredTextParser.Interface_ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_interface_Value)
        try:
            self.state = 509
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,44,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 506
                self.symbolic_Variable()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 507
                self.fb_Instance_Name()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 508
                self.match(StructuredTextParser.NULL)
                pass


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


    class Interface_Name_ListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def interface_Type_Access(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Interface_Type_AccessContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Interface_Type_AccessContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Name_List

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Name_List" ):
                listener.enterInterface_Name_List(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Name_List" ):
                listener.exitInterface_Name_List(self)

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




    def interface_Name_List(self):

        localctx = StructuredTextParser.Interface_Name_ListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_interface_Name_List)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 511
            self.interface_Type_Access()
            self.state = 516
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==127:
                self.state = 512
                self.match(StructuredTextParser.COMMA)
                self.state = 513
                self.interface_Type_Access()
                self.state = 518
                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 Interface_Type_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Type_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Type_Name" ):
                listener.enterInterface_Type_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Type_Name" ):
                listener.exitInterface_Type_Name(self)

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




    def interface_Type_Name(self):

        localctx = StructuredTextParser.Interface_Type_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_interface_Type_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 519
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Interface_Type_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def interface_Type_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Interface_Type_NameContext,0)


        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Type_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Type_Access" ):
                listener.enterInterface_Type_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Type_Access" ):
                listener.exitInterface_Type_Access(self)

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




    def interface_Type_Access(self):

        localctx = StructuredTextParser.Interface_Type_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_interface_Type_Access)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 526
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,46,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 521
                    self.namespace_Name()
                    self.state = 522
                    self.match(StructuredTextParser.DOT) 
                self.state = 528
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,46,self._ctx)

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


    class Interface_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_interface_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInterface_Name" ):
                listener.enterInterface_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInterface_Name" ):
                listener.exitInterface_Name(self)

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




    def interface_Name(self):

        localctx = StructuredTextParser.Interface_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_interface_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 531
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Access_SpecContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PUBLIC(self):
            return self.getToken(StructuredTextParser.PUBLIC, 0)

        def PROTECTED(self):
            return self.getToken(StructuredTextParser.PROTECTED, 0)

        def PRIVATE(self):
            return self.getToken(StructuredTextParser.PRIVATE, 0)

        def INTERNAL(self):
            return self.getToken(StructuredTextParser.INTERNAL, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_access_Spec

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAccess_Spec" ):
                listener.enterAccess_Spec(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAccess_Spec" ):
                listener.exitAccess_Spec(self)

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




    def access_Spec(self):

        localctx = StructuredTextParser.Access_SpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_access_Spec)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 533
            _la = self._input.LA(1)
            if not((((_la - 63)) & ~0x3f) == 0 and ((1 << (_la - 63)) & 15) != 0):
                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 Var_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR(self):
            return self.getToken(StructuredTextParser.VAR, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_block" ):
                listener.enterVar_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_block" ):
                listener.exitVar_block(self)

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




    def var_block(self):

        localctx = StructuredTextParser.Var_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_var_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 535
            self.match(StructuredTextParser.VAR)
            self.state = 539
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 536
                self.declaration_stmt()
                self.state = 541
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 542
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_const_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR(self):
            return self.getToken(StructuredTextParser.VAR, 0)

        def CONSTANT(self):
            return self.getToken(StructuredTextParser.CONSTANT, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_const_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_const_block" ):
                listener.enterVar_const_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_const_block" ):
                listener.exitVar_const_block(self)

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




    def var_const_block(self):

        localctx = StructuredTextParser.Var_const_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_var_const_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 544
            self.match(StructuredTextParser.VAR)
            self.state = 545
            self.match(StructuredTextParser.CONSTANT)
            self.state = 549
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 546
                self.declaration_stmt()
                self.state = 551
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 552
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR(self):
            return self.getToken(StructuredTextParser.VAR, 0)

        def RETAIN(self):
            return self.getToken(StructuredTextParser.RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_retain_block" ):
                listener.enterVar_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_retain_block" ):
                listener.exitVar_retain_block(self)

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




    def var_retain_block(self):

        localctx = StructuredTextParser.Var_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_var_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 554
            self.match(StructuredTextParser.VAR)
            self.state = 555
            self.match(StructuredTextParser.RETAIN)
            self.state = 559
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 556
                self.declaration_stmt()
                self.state = 561
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 562
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_non_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR(self):
            return self.getToken(StructuredTextParser.VAR, 0)

        def NON_RETAIN(self):
            return self.getToken(StructuredTextParser.NON_RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_non_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_non_retain_block" ):
                listener.enterVar_non_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_non_retain_block" ):
                listener.exitVar_non_retain_block(self)

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




    def var_non_retain_block(self):

        localctx = StructuredTextParser.Var_non_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_var_non_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 564
            self.match(StructuredTextParser.VAR)
            self.state = 565
            self.match(StructuredTextParser.NON_RETAIN)
            self.state = 569
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 566
                self.declaration_stmt()
                self.state = 571
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 572
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_in_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_INPUT(self):
            return self.getToken(StructuredTextParser.VAR_INPUT, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_in_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_in_block" ):
                listener.enterVar_in_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_in_block" ):
                listener.exitVar_in_block(self)

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




    def var_in_block(self):

        localctx = StructuredTextParser.Var_in_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_var_in_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 574
            self.match(StructuredTextParser.VAR_INPUT)
            self.state = 578
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 575
                self.declaration_stmt()
                self.state = 580
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 581
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_in_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_INPUT(self):
            return self.getToken(StructuredTextParser.VAR_INPUT, 0)

        def RETAIN(self):
            return self.getToken(StructuredTextParser.RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_in_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_in_retain_block" ):
                listener.enterVar_in_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_in_retain_block" ):
                listener.exitVar_in_retain_block(self)

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




    def var_in_retain_block(self):

        localctx = StructuredTextParser.Var_in_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_var_in_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 583
            self.match(StructuredTextParser.VAR_INPUT)
            self.state = 584
            self.match(StructuredTextParser.RETAIN)
            self.state = 588
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 585
                self.declaration_stmt()
                self.state = 590
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 591
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_in_non_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_INPUT(self):
            return self.getToken(StructuredTextParser.VAR_INPUT, 0)

        def NON_RETAIN(self):
            return self.getToken(StructuredTextParser.NON_RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_in_non_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_in_non_retain_block" ):
                listener.enterVar_in_non_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_in_non_retain_block" ):
                listener.exitVar_in_non_retain_block(self)

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




    def var_in_non_retain_block(self):

        localctx = StructuredTextParser.Var_in_non_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_var_in_non_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 593
            self.match(StructuredTextParser.VAR_INPUT)
            self.state = 594
            self.match(StructuredTextParser.NON_RETAIN)
            self.state = 598
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 595
                self.declaration_stmt()
                self.state = 600
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 601
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_out_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_OUTPUT(self):
            return self.getToken(StructuredTextParser.VAR_OUTPUT, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_out_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_out_block" ):
                listener.enterVar_out_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_out_block" ):
                listener.exitVar_out_block(self)

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




    def var_out_block(self):

        localctx = StructuredTextParser.Var_out_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_var_out_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 603
            self.match(StructuredTextParser.VAR_OUTPUT)
            self.state = 607
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 604
                self.declaration_stmt()
                self.state = 609
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 610
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_out_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_OUTPUT(self):
            return self.getToken(StructuredTextParser.VAR_OUTPUT, 0)

        def RETAIN(self):
            return self.getToken(StructuredTextParser.RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_out_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_out_retain_block" ):
                listener.enterVar_out_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_out_retain_block" ):
                listener.exitVar_out_retain_block(self)

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




    def var_out_retain_block(self):

        localctx = StructuredTextParser.Var_out_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_var_out_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 612
            self.match(StructuredTextParser.VAR_OUTPUT)
            self.state = 613
            self.match(StructuredTextParser.RETAIN)
            self.state = 617
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 614
                self.declaration_stmt()
                self.state = 619
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 620
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_out_non_retain_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_OUTPUT(self):
            return self.getToken(StructuredTextParser.VAR_OUTPUT, 0)

        def NON_RETAIN(self):
            return self.getToken(StructuredTextParser.NON_RETAIN, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_out_non_retain_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_out_non_retain_block" ):
                listener.enterVar_out_non_retain_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_out_non_retain_block" ):
                listener.exitVar_out_non_retain_block(self)

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




    def var_out_non_retain_block(self):

        localctx = StructuredTextParser.Var_out_non_retain_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_var_out_non_retain_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 622
            self.match(StructuredTextParser.VAR_OUTPUT)
            self.state = 623
            self.match(StructuredTextParser.NON_RETAIN)
            self.state = 627
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 624
                self.declaration_stmt()
                self.state = 629
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 630
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_inout_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_IN_OUT(self):
            return self.getToken(StructuredTextParser.VAR_IN_OUT, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_inout_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_inout_block" ):
                listener.enterVar_inout_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_inout_block" ):
                listener.exitVar_inout_block(self)

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




    def var_inout_block(self):

        localctx = StructuredTextParser.Var_inout_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_var_inout_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 632
            self.match(StructuredTextParser.VAR_IN_OUT)
            self.state = 636
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 633
                self.declaration_stmt()
                self.state = 638
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 639
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_temp_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_TEMP(self):
            return self.getToken(StructuredTextParser.VAR_TEMP, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_temp_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_temp_block" ):
                listener.enterVar_temp_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_temp_block" ):
                listener.exitVar_temp_block(self)

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




    def var_temp_block(self):

        localctx = StructuredTextParser.Var_temp_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_var_temp_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 641
            self.match(StructuredTextParser.VAR_TEMP)
            self.state = 645
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 642
                self.declaration_stmt()
                self.state = 647
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 648
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_external_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_EXTERNAL(self):
            return self.getToken(StructuredTextParser.VAR_EXTERNAL, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_external_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_external_block" ):
                listener.enterVar_external_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_external_block" ):
                listener.exitVar_external_block(self)

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




    def var_external_block(self):

        localctx = StructuredTextParser.Var_external_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_var_external_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 650
            self.match(StructuredTextParser.VAR_EXTERNAL)
            self.state = 654
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 651
                self.declaration_stmt()
                self.state = 656
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 657
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_external_const_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_EXTERNAL(self):
            return self.getToken(StructuredTextParser.VAR_EXTERNAL, 0)

        def CONSTANT(self):
            return self.getToken(StructuredTextParser.CONSTANT, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def declaration_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Declaration_stmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Declaration_stmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_external_const_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_external_const_block" ):
                listener.enterVar_external_const_block(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_external_const_block" ):
                listener.exitVar_external_const_block(self)

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




    def var_external_const_block(self):

        localctx = StructuredTextParser.Var_external_const_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_var_external_const_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 659
            self.match(StructuredTextParser.VAR_EXTERNAL)
            self.state = 660
            self.match(StructuredTextParser.CONSTANT)
            self.state = 664
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 661
                self.declaration_stmt()
                self.state = 666
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 667
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Declaration_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def data_type(self):
            return self.getTypedRuleContext(StructuredTextParser.Data_typeContext,0)


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

        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


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

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

        def ASSIGNE(self):
            return self.getToken(StructuredTextParser.ASSIGNE, 0)

        def constant_expression(self):
            return self.getTypedRuleContext(StructuredTextParser.Constant_expressionContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_declaration_stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDeclaration_stmt" ):
                listener.enterDeclaration_stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDeclaration_stmt" ):
                listener.exitDeclaration_stmt(self)

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




    def declaration_stmt(self):

        localctx = StructuredTextParser.Declaration_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_declaration_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 669
            self.match(StructuredTextParser.IDENTIFIER)
            self.state = 670
            self.match(StructuredTextParser.COLON)
            self.state = 678
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==116 or _la==125:
                self.state = 676
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [125]:
                    self.state = 671
                    self.namespace_Name()
                    self.state = 672
                    self.match(StructuredTextParser.DOT)
                    pass
                elif token in [116]:
                    self.state = 674
                    self.match(StructuredTextParser.TWINCAT_SYSTEM)
                    self.state = 675
                    self.match(StructuredTextParser.DOT)
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 681
            self.data_type()
            self.state = 684
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==9:
                self.state = 682
                self.match(StructuredTextParser.ASSIGNE)
                self.state = 683
                self.constant_expression()


            self.state = 686
            self.match(StructuredTextParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Constant_expressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_constant_expression

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterConstant_expression" ):
                listener.enterConstant_expression(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitConstant_expression" ):
                listener.exitConstant_expression(self)

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




    def constant_expression(self):

        localctx = StructuredTextParser.Constant_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_constant_expression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 688
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def primary_Expr(self):
            return self.getTypedRuleContext(StructuredTextParser.Primary_ExprContext,0)


        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def DEREFERENCE(self):
            return self.getToken(StructuredTextParser.DEREFERENCE, 0)

        def unary(self):
            return self.getTypedRuleContext(StructuredTextParser.UnaryContext,0)


        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,i)


        def POWER(self):
            return self.getToken(StructuredTextParser.POWER, 0)

        def term(self):
            return self.getTypedRuleContext(StructuredTextParser.TermContext,0)


        def add_sub(self):
            return self.getTypedRuleContext(StructuredTextParser.Add_subContext,0)


        def comparator(self):
            return self.getTypedRuleContext(StructuredTextParser.ComparatorContext,0)


        def AND(self):
            return self.getToken(StructuredTextParser.AND, 0)

        def XOR(self):
            return self.getToken(StructuredTextParser.XOR, 0)

        def OR(self):
            return self.getToken(StructuredTextParser.OR, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_expression

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterExpression" ):
                listener.enterExpression(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitExpression" ):
                listener.exitExpression(self)

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



    def expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = StructuredTextParser.ExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 98
        self.enterRecursionRule(localctx, 98, self.RULE_expression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 698
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
            if la_ == 1:
                self.state = 691
                self.primary_Expr()
                pass

            elif la_ == 2:
                self.state = 692
                self.match(StructuredTextParser.IDENTIFIER)
                pass

            elif la_ == 3:
                self.state = 693
                self.match(StructuredTextParser.IDENTIFIER)
                self.state = 694
                self.match(StructuredTextParser.DEREFERENCE)
                pass

            elif la_ == 4:
                self.state = 695
                self.unary()
                self.state = 696
                self.expression(8)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 726
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,66,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 724
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,65,self._ctx)
                    if la_ == 1:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 700
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 701
                        self.match(StructuredTextParser.POWER)
                        self.state = 702
                        self.expression(8)
                        pass

                    elif la_ == 2:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 703
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 704
                        self.term()
                        self.state = 705
                        localctx.right = self.expression(7)
                        pass

                    elif la_ == 3:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 707
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 708
                        self.add_sub()
                        self.state = 709
                        localctx.right = self.expression(6)
                        pass

                    elif la_ == 4:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 711
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 712
                        self.comparator()
                        self.state = 713
                        localctx.right = self.expression(5)
                        pass

                    elif la_ == 5:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 715
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 716
                        self.match(StructuredTextParser.AND)
                        self.state = 717
                        localctx.right = self.expression(4)
                        pass

                    elif la_ == 6:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 718
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 719
                        self.match(StructuredTextParser.XOR)
                        self.state = 720
                        localctx.right = self.expression(3)
                        pass

                    elif la_ == 7:
                        localctx = StructuredTextParser.ExpressionContext(self, _parentctx, _parentState)
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 721
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 722
                        self.match(StructuredTextParser.OR)
                        self.state = 723
                        localctx.right = self.expression(2)
                        pass

             
                self.state = 728
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,66,self._ctx)

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


    class Primary_ExprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def number(self):
            return self.getTypedRuleContext(StructuredTextParser.NumberContext,0)


        def TRUE(self):
            return self.getToken(StructuredTextParser.TRUE, 0)

        def FALSE(self):
            return self.getToken(StructuredTextParser.FALSE, 0)

        def variable_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Variable_AccessContext,0)


        def func_Call(self):
            return self.getTypedRuleContext(StructuredTextParser.Func_CallContext,0)


        def L_PAREN(self):
            return self.getToken(StructuredTextParser.L_PAREN, 0)

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def R_PAREN(self):
            return self.getToken(StructuredTextParser.R_PAREN, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_primary_Expr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterPrimary_Expr" ):
                listener.enterPrimary_Expr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitPrimary_Expr" ):
                listener.exitPrimary_Expr(self)

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




    def primary_Expr(self):

        localctx = StructuredTextParser.Primary_ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_primary_Expr)
        try:
            self.state = 738
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,67,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 729
                self.number()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 730
                self.match(StructuredTextParser.TRUE)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 731
                self.match(StructuredTextParser.FALSE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 732
                self.variable_Access()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 733
                self.func_Call()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 734
                self.match(StructuredTextParser.L_PAREN)
                self.state = 735
                self.expression(0)
                self.state = 736
                self.match(StructuredTextParser.R_PAREN)
                pass


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


    class TermContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def MULTIPLY(self):
            return self.getToken(StructuredTextParser.MULTIPLY, 0)

        def DIVIDE(self):
            return self.getToken(StructuredTextParser.DIVIDE, 0)

        def MOD(self):
            return self.getToken(StructuredTextParser.MOD, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_term

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterTerm" ):
                listener.enterTerm(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitTerm" ):
                listener.exitTerm(self)

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




    def term(self):

        localctx = StructuredTextParser.TermContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_term)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 740
            _la = self._input.LA(1)
            if not((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & 12884901889) != 0):
                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 ComparatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GT(self):
            return self.getToken(StructuredTextParser.GT, 0)

        def GE(self):
            return self.getToken(StructuredTextParser.GE, 0)

        def LT(self):
            return self.getToken(StructuredTextParser.LT, 0)

        def LE(self):
            return self.getToken(StructuredTextParser.LE, 0)

        def EQ(self):
            return self.getToken(StructuredTextParser.EQ, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_comparator

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterComparator" ):
                listener.enterComparator(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitComparator" ):
                listener.exitComparator(self)

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




    def comparator(self):

        localctx = StructuredTextParser.ComparatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_comparator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 742
            _la = self._input.LA(1)
            if not((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 59) != 0):
                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 Add_subContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PLUS(self):
            return self.getToken(StructuredTextParser.PLUS, 0)

        def MINUS(self):
            return self.getToken(StructuredTextParser.MINUS, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_add_sub

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAdd_sub" ):
                listener.enterAdd_sub(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAdd_sub" ):
                listener.exitAdd_sub(self)

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




    def add_sub(self):

        localctx = StructuredTextParser.Add_subContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_add_sub)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 744
            _la = self._input.LA(1)
            if not(_la==139 or _la==140):
                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 UnaryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PLUS(self):
            return self.getToken(StructuredTextParser.PLUS, 0)

        def MINUS(self):
            return self.getToken(StructuredTextParser.MINUS, 0)

        def NOT(self):
            return self.getToken(StructuredTextParser.NOT, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_unary

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterUnary" ):
                listener.enterUnary(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitUnary" ):
                listener.exitUnary(self)

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




    def unary(self):

        localctx = StructuredTextParser.UnaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_unary)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 746
            _la = self._input.LA(1)
            if not((((_la - 113)) & ~0x3f) == 0 and ((1 << (_la - 113)) & 201326593) != 0):
                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 Multibit_Part_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DOT(self):
            return self.getToken(StructuredTextParser.DOT, 0)

        def PERCENT(self):
            return self.getToken(StructuredTextParser.PERCENT, 0)

        def X(self):
            return self.getToken(StructuredTextParser.X, 0)

        def B(self):
            return self.getToken(StructuredTextParser.B, 0)

        def W(self):
            return self.getToken(StructuredTextParser.W, 0)

        def D(self):
            return self.getToken(StructuredTextParser.D, 0)

        def L(self):
            return self.getToken(StructuredTextParser.L, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_multibit_Part_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMultibit_Part_Access" ):
                listener.enterMultibit_Part_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMultibit_Part_Access" ):
                listener.exitMultibit_Part_Access(self)

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




    def multibit_Part_Access(self):

        localctx = StructuredTextParser.Multibit_Part_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_multibit_Part_Access)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 748
            self.match(StructuredTextParser.DOT)

            self.state = 749
            self.match(StructuredTextParser.PERCENT)
            self.state = 751
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,68,self._ctx)
            if la_ == 1:
                self.state = 750
                _la = self._input.LA(1)
                if not((((_la - 147)) & ~0x3f) == 0 and ((1 << (_la - 147)) & 31) != 0):
                    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 VariableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def direct_Variable(self):
            return self.getTypedRuleContext(StructuredTextParser.Direct_VariableContext,0)


        def symbolic_Variable(self):
            return self.getTypedRuleContext(StructuredTextParser.Symbolic_VariableContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_variable

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVariable" ):
                listener.enterVariable(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVariable" ):
                listener.exitVariable(self)

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




    def variable(self):

        localctx = StructuredTextParser.VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_variable)
        try:
            self.state = 755
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [145]:
                self.enterOuterAlt(localctx, 1)
                self.state = 753
                self.direct_Variable()
                pass
            elif token in [72, 125]:
                self.enterOuterAlt(localctx, 2)
                self.state = 754
                self.symbolic_Variable()
                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 Symbolic_VariableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Var_AccessContext,0)


        def multi_Elem_Var(self):
            return self.getTypedRuleContext(StructuredTextParser.Multi_Elem_VarContext,0)


        def THIS(self):
            return self.getToken(StructuredTextParser.THIS, 0)

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

        def namespace_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Namespace_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Namespace_NameContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_symbolic_Variable

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSymbolic_Variable" ):
                listener.enterSymbolic_Variable(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSymbolic_Variable" ):
                listener.exitSymbolic_Variable(self)

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




    def symbolic_Variable(self):

        localctx = StructuredTextParser.Symbolic_VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_symbolic_Variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 766
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,71,self._ctx)
            if la_ == 1:
                self.state = 757
                self.match(StructuredTextParser.THIS)
                self.state = 758
                self.match(StructuredTextParser.DOT)

            elif la_ == 2:
                self.state = 762 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 759
                        self.namespace_Name()
                        self.state = 760
                        self.match(StructuredTextParser.DOT)

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



            self.state = 770
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,72,self._ctx)
            if la_ == 1:
                self.state = 768
                self.var_Access()
                pass

            elif la_ == 2:
                self.state = 769
                self.multi_Elem_Var()
                pass


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


    class Var_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def variable_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Variable_NameContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_var_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_Access" ):
                listener.enterVar_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_Access" ):
                listener.exitVar_Access(self)

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




    def var_Access(self):

        localctx = StructuredTextParser.Var_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_var_Access)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 772
            self.variable_Name()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Variable_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_variable_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVariable_Name" ):
                listener.enterVariable_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVariable_Name" ):
                listener.exitVariable_Name(self)

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




    def variable_Name(self):

        localctx = StructuredTextParser.Variable_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_variable_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 774
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Multi_Elem_VarContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Var_AccessContext,0)


        def subscript_List(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Subscript_ListContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Subscript_ListContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_multi_Elem_Var

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMulti_Elem_Var" ):
                listener.enterMulti_Elem_Var(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMulti_Elem_Var" ):
                listener.exitMulti_Elem_Var(self)

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




    def multi_Elem_Var(self):

        localctx = StructuredTextParser.Multi_Elem_VarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_multi_Elem_Var)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 776
            self.var_Access()
            self.state = 778 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 777
                    self.subscript_List()

                else:
                    raise NoViableAltException(self)
                self.state = 780 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,73,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 Subscript_ListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def subscript(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.SubscriptContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.SubscriptContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_subscript_List

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSubscript_List" ):
                listener.enterSubscript_List(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSubscript_List" ):
                listener.exitSubscript_List(self)

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




    def subscript_List(self):

        localctx = StructuredTextParser.Subscript_ListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_subscript_List)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 782
            self.match(StructuredTextParser.T__0)
            self.state = 783
            self.subscript()
            self.state = 788
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==127:
                self.state = 784
                self.match(StructuredTextParser.COMMA)
                self.state = 785
                self.subscript()
                self.state = 790
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 791
            self.match(StructuredTextParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SubscriptContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_subscript

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSubscript" ):
                listener.enterSubscript(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSubscript" ):
                listener.exitSubscript(self)

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




    def subscript(self):

        localctx = StructuredTextParser.SubscriptContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_subscript)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 793
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Global_Var_NameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_global_Var_Name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterGlobal_Var_Name" ):
                listener.enterGlobal_Var_Name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitGlobal_Var_Name" ):
                listener.exitGlobal_Var_Name(self)

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




    def global_Var_Name(self):

        localctx = StructuredTextParser.Global_Var_NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_global_Var_Name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 795
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Global_Var_DeclsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR_GLOBAL(self):
            return self.getToken(StructuredTextParser.VAR_GLOBAL, 0)

        def END_VAR(self):
            return self.getToken(StructuredTextParser.END_VAR, 0)

        def global_Var_Decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Global_Var_DeclContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Global_Var_DeclContext,i)


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

        def CONSTANT(self):
            return self.getToken(StructuredTextParser.CONSTANT, 0)

        def RETAIN(self):
            return self.getToken(StructuredTextParser.RETAIN, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_global_Var_Decls

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterGlobal_Var_Decls" ):
                listener.enterGlobal_Var_Decls(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitGlobal_Var_Decls" ):
                listener.exitGlobal_Var_Decls(self)

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




    def global_Var_Decls(self):

        localctx = StructuredTextParser.Global_Var_DeclsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_global_Var_Decls)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 797
            self.match(StructuredTextParser.VAR_GLOBAL)
            self.state = 799
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==61 or _la==68:
                self.state = 798
                _la = self._input.LA(1)
                if not(_la==61 or _la==68):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 806
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==125:
                self.state = 801
                self.global_Var_Decl()
                self.state = 802
                self.match(StructuredTextParser.SEMICOLON)
                self.state = 808
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 809
            self.match(StructuredTextParser.END_VAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Global_Var_DeclContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def global_Var_Spec(self):
            return self.getTypedRuleContext(StructuredTextParser.Global_Var_SpecContext,0)


        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def fb_Type_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Fb_Type_AccessContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_global_Var_Decl

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterGlobal_Var_Decl" ):
                listener.enterGlobal_Var_Decl(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitGlobal_Var_Decl" ):
                listener.exitGlobal_Var_Decl(self)

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




    def global_Var_Decl(self):

        localctx = StructuredTextParser.Global_Var_DeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_global_Var_Decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 811
            self.global_Var_Spec()
            self.state = 812
            self.match(StructuredTextParser.COLON)

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


    class Global_Var_SpecContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def global_Var_Name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Global_Var_NameContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Global_Var_NameContext,i)


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

        def located_At(self):
            return self.getTypedRuleContext(StructuredTextParser.Located_AtContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_global_Var_Spec

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterGlobal_Var_Spec" ):
                listener.enterGlobal_Var_Spec(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitGlobal_Var_Spec" ):
                listener.exitGlobal_Var_Spec(self)

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




    def global_Var_Spec(self):

        localctx = StructuredTextParser.Global_Var_SpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_global_Var_Spec)
        self._la = 0 # Token type
        try:
            self.state = 826
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,78,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 815
                self.global_Var_Name()
                self.state = 820
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==127:
                    self.state = 816
                    self.match(StructuredTextParser.COMMA)
                    self.state = 817
                    self.global_Var_Name()
                    self.state = 822
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 823
                self.global_Var_Name()
                self.state = 824
                self.located_At()
                pass


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


    class Located_AtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def AT(self):
            return self.getToken(StructuredTextParser.AT, 0)

        def direct_Variable(self):
            return self.getTypedRuleContext(StructuredTextParser.Direct_VariableContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_located_At

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocated_At" ):
                listener.enterLocated_At(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocated_At" ):
                listener.exitLocated_At(self)

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




    def located_At(self):

        localctx = StructuredTextParser.Located_AtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_located_At)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 828
            self.match(StructuredTextParser.AT)
            self.state = 829
            self.direct_Variable()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Direct_VariableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PERCENT(self):
            return self.getToken(StructuredTextParser.PERCENT, 0)

        def row_number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Row_numberContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Row_numberContext,i)


        def I(self):
            return self.getToken(StructuredTextParser.I, 0)

        def Q(self):
            return self.getToken(StructuredTextParser.Q, 0)

        def M(self):
            return self.getToken(StructuredTextParser.M, 0)

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

        def X(self):
            return self.getToken(StructuredTextParser.X, 0)

        def B(self):
            return self.getToken(StructuredTextParser.B, 0)

        def W(self):
            return self.getToken(StructuredTextParser.W, 0)

        def D(self):
            return self.getToken(StructuredTextParser.D, 0)

        def L(self):
            return self.getToken(StructuredTextParser.L, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_direct_Variable

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDirect_Variable" ):
                listener.enterDirect_Variable(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDirect_Variable" ):
                listener.exitDirect_Variable(self)

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




    def direct_Variable(self):

        localctx = StructuredTextParser.Direct_VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_direct_Variable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 831
            self.match(StructuredTextParser.PERCENT)
            self.state = 832
            _la = self._input.LA(1)
            if not((((_la - 152)) & ~0x3f) == 0 and ((1 << (_la - 152)) & 7) != 0):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 834
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 147)) & ~0x3f) == 0 and ((1 << (_la - 147)) & 31) != 0:
                self.state = 833
                _la = self._input.LA(1)
                if not((((_la - 147)) & ~0x3f) == 0 and ((1 << (_la - 147)) & 31) != 0):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 836
            self.row_number()
            self.state = 841
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,80,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 837
                    self.match(StructuredTextParser.DOT)
                    self.state = 838
                    self.row_number() 
                self.state = 843
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,80,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 Constant_ExprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_constant_Expr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterConstant_Expr" ):
                listener.enterConstant_Expr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitConstant_Expr" ):
                listener.exitConstant_Expr(self)

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




    def constant_Expr(self):

        localctx = StructuredTextParser.Constant_ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_constant_Expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 844
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Variable_AccessContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def variable(self):
            return self.getTypedRuleContext(StructuredTextParser.VariableContext,0)


        def multibit_Part_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Multibit_Part_AccessContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_variable_Access

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVariable_Access" ):
                listener.enterVariable_Access(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVariable_Access" ):
                listener.exitVariable_Access(self)

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




    def variable_Access(self):

        localctx = StructuredTextParser.Variable_AccessContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_variable_Access)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 846
            self.variable()
            self.state = 848
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,81,self._ctx)
            if la_ == 1:
                self.state = 847
                self.multibit_Part_Access()


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


    class Func_CallContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def func_Access(self):
            return self.getTypedRuleContext(StructuredTextParser.Func_AccessContext,0)


        def L_PAREN(self):
            return self.getToken(StructuredTextParser.L_PAREN, 0)

        def R_PAREN(self):
            return self.getToken(StructuredTextParser.R_PAREN, 0)

        def param_Assign(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Param_AssignContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Param_AssignContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_func_Call

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunc_Call" ):
                listener.enterFunc_Call(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunc_Call" ):
                listener.exitFunc_Call(self)

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




    def func_Call(self):

        localctx = StructuredTextParser.Func_CallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_func_Call)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 850
            self.func_Access()
            self.state = 851
            self.match(StructuredTextParser.L_PAREN)
            self.state = 860
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 27)) & ~0x3f) == 0 and ((1 << (_la - 27)) & -2216615441596415) != 0 or (((_la - 91)) & ~0x3f) == 0 and ((1 << (_la - 91)) & 18929210399850495) != 0:
                self.state = 852
                self.param_Assign()
                self.state = 857
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==127:
                    self.state = 853
                    self.match(StructuredTextParser.COMMA)
                    self.state = 854
                    self.param_Assign()
                    self.state = 859
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 862
            self.match(StructuredTextParser.R_PAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Stmt_ListContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.StmtContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.StmtContext,i)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_stmt_List

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterStmt_List" ):
                listener.enterStmt_List(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitStmt_List" ):
                listener.exitStmt_List(self)

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




    def stmt_List(self):

        localctx = StructuredTextParser.Stmt_ListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_stmt_List)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 870
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,85,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 865
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((_la) & ~0x3f) == 0 and ((1 << _la) & 156813328) != 0 or (((_la - 72)) & ~0x3f) == 0 and ((1 << (_la - 72)) & 9007199254740995) != 0 or _la==145:
                        self.state = 864
                        self.stmt()


                    self.state = 867
                    self.match(StructuredTextParser.SEMICOLON) 
                self.state = 872
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,85,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 StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def assign_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Assign_StmtContext,0)


        def subprog_Ctrl_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Subprog_Ctrl_StmtContext,0)


        def selection_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Selection_StmtContext,0)


        def iteration_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Iteration_StmtContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterStmt" ):
                listener.enterStmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitStmt" ):
                listener.exitStmt(self)

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




    def stmt(self):

        localctx = StructuredTextParser.StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_stmt)
        try:
            self.state = 877
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,86,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 873
                self.assign_Stmt()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 874
                self.subprog_Ctrl_Stmt()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 875
                self.selection_Stmt()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 876
                self.iteration_Stmt()
                pass


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


    class Assign_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def variable(self):
            return self.getTypedRuleContext(StructuredTextParser.VariableContext,0)


        def ASSIGNE(self):
            return self.getToken(StructuredTextParser.ASSIGNE, 0)

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_assign_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAssign_Stmt" ):
                listener.enterAssign_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAssign_Stmt" ):
                listener.exitAssign_Stmt(self)

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




    def assign_Stmt(self):

        localctx = StructuredTextParser.Assign_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_assign_Stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 879
            self.variable()
            self.state = 880
            self.match(StructuredTextParser.ASSIGNE)
            self.state = 881
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Subprog_Ctrl_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def func_Call(self):
            return self.getTypedRuleContext(StructuredTextParser.Func_CallContext,0)


        def SUPER(self):
            return self.getToken(StructuredTextParser.SUPER, 0)

        def L_PAREN(self):
            return self.getToken(StructuredTextParser.L_PAREN, 0)

        def R_PAREN(self):
            return self.getToken(StructuredTextParser.R_PAREN, 0)

        def RETURN(self):
            return self.getToken(StructuredTextParser.RETURN, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_subprog_Ctrl_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSubprog_Ctrl_Stmt" ):
                listener.enterSubprog_Ctrl_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSubprog_Ctrl_Stmt" ):
                listener.exitSubprog_Ctrl_Stmt(self)

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




    def subprog_Ctrl_Stmt(self):

        localctx = StructuredTextParser.Subprog_Ctrl_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_subprog_Ctrl_Stmt)
        try:
            self.state = 888
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [27, 125]:
                self.enterOuterAlt(localctx, 1)
                self.state = 883
                self.func_Call()
                pass
            elif token in [73]:
                self.enterOuterAlt(localctx, 2)
                self.state = 884
                self.match(StructuredTextParser.SUPER)
                self.state = 885
                self.match(StructuredTextParser.L_PAREN)
                self.state = 886
                self.match(StructuredTextParser.R_PAREN)
                pass
            elif token in [14]:
                self.enterOuterAlt(localctx, 3)
                self.state = 887
                self.match(StructuredTextParser.RETURN)
                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 Param_AssignContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def variable_Name(self):
            return self.getTypedRuleContext(StructuredTextParser.Variable_NameContext,0)


        def ASSIGNE(self):
            return self.getToken(StructuredTextParser.ASSIGNE, 0)

        def OUTPUT_ARROW(self):
            return self.getToken(StructuredTextParser.OUTPUT_ARROW, 0)

        def variable(self):
            return self.getTypedRuleContext(StructuredTextParser.VariableContext,0)


        def NOT(self):
            return self.getToken(StructuredTextParser.NOT, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_param_Assign

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterParam_Assign" ):
                listener.enterParam_Assign(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitParam_Assign" ):
                listener.exitParam_Assign(self)

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




    def param_Assign(self):

        localctx = StructuredTextParser.Param_AssignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_param_Assign)
        self._la = 0 # Token type
        try:
            self.state = 903
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,90,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 893
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,88,self._ctx)
                if la_ == 1:
                    self.state = 890
                    self.variable_Name()
                    self.state = 891
                    self.match(StructuredTextParser.ASSIGNE)


                self.state = 895
                self.expression(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 897
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==113:
                    self.state = 896
                    self.match(StructuredTextParser.NOT)


                self.state = 899
                self.variable_Name()
                self.state = 900
                self.match(StructuredTextParser.OUTPUT_ARROW)
                self.state = 901
                self.variable()
                pass


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


    class Selection_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def if_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.If_StmtContext,0)


        def case_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Case_StmtContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_selection_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSelection_Stmt" ):
                listener.enterSelection_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSelection_Stmt" ):
                listener.exitSelection_Stmt(self)

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




    def selection_Stmt(self):

        localctx = StructuredTextParser.Selection_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_selection_Stmt)
        try:
            self.state = 907
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [4]:
                self.enterOuterAlt(localctx, 1)
                self.state = 905
                self.if_Stmt()
                pass
            elif token in [11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 906
                self.case_Stmt()
                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 If_StmtContext(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(StructuredTextParser.IF, 0)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,i)


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

        def stmt_List(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Stmt_ListContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,i)


        def END_IF(self):
            return self.getToken(StructuredTextParser.END_IF, 0)

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

        def ELSE(self):
            return self.getToken(StructuredTextParser.ELSE, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_if_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterIf_Stmt" ):
                listener.enterIf_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitIf_Stmt" ):
                listener.exitIf_Stmt(self)

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




    def if_Stmt(self):

        localctx = StructuredTextParser.If_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_if_Stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 909
            self.match(StructuredTextParser.IF)
            self.state = 910
            self.expression(0)
            self.state = 911
            self.match(StructuredTextParser.THEN)
            self.state = 912
            self.stmt_List()
            self.state = 920
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==6:
                self.state = 913
                self.match(StructuredTextParser.ELSIF)
                self.state = 914
                self.expression(0)
                self.state = 915
                self.match(StructuredTextParser.THEN)
                self.state = 916
                self.stmt_List()
                self.state = 922
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 925
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 923
                self.match(StructuredTextParser.ELSE)
                self.state = 924
                self.stmt_List()


            self.state = 927
            self.match(StructuredTextParser.END_IF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Case_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CASE(self):
            return self.getToken(StructuredTextParser.CASE, 0)

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def OF(self):
            return self.getToken(StructuredTextParser.OF, 0)

        def END_CASE(self):
            return self.getToken(StructuredTextParser.END_CASE, 0)

        def case_Selection(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Case_SelectionContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Case_SelectionContext,i)


        def ELSE(self):
            return self.getToken(StructuredTextParser.ELSE, 0)

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_case_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCase_Stmt" ):
                listener.enterCase_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCase_Stmt" ):
                listener.exitCase_Stmt(self)

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




    def case_Stmt(self):

        localctx = StructuredTextParser.Case_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_case_Stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 929
            self.match(StructuredTextParser.CASE)
            self.state = 930
            self.expression(0)
            self.state = 931
            self.match(StructuredTextParser.OF)
            self.state = 933 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 932
                self.case_Selection()
                self.state = 935 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la - 27)) & ~0x3f) == 0 and ((1 << (_la - 27)) & -2216615441596415) != 0 or (((_la - 91)) & ~0x3f) == 0 and ((1 << (_la - 91)) & 18929210399850495) != 0):
                    break

            self.state = 939
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 937
                self.match(StructuredTextParser.ELSE)
                self.state = 938
                self.stmt_List()


            self.state = 941
            self.match(StructuredTextParser.END_CASE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Case_SelectionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def case_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Case_ListContext,0)


        def COLON(self):
            return self.getToken(StructuredTextParser.COLON, 0)

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_case_Selection

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCase_Selection" ):
                listener.enterCase_Selection(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCase_Selection" ):
                listener.exitCase_Selection(self)

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




    def case_Selection(self):

        localctx = StructuredTextParser.Case_SelectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_case_Selection)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 943
            self.case_List()
            self.state = 944
            self.match(StructuredTextParser.COLON)
            self.state = 945
            self.stmt_List()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Case_ListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def case_List_Elem(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.Case_List_ElemContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.Case_List_ElemContext,i)


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

        def getRuleIndex(self):
            return StructuredTextParser.RULE_case_List

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCase_List" ):
                listener.enterCase_List(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCase_List" ):
                listener.exitCase_List(self)

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




    def case_List(self):

        localctx = StructuredTextParser.Case_ListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_case_List)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 947
            self.case_List_Elem()
            self.state = 952
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==127:
                self.state = 948
                self.match(StructuredTextParser.COMMA)
                self.state = 949
                self.case_List_Elem()
                self.state = 954
                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 Case_List_ElemContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def constant_Expr(self):
            return self.getTypedRuleContext(StructuredTextParser.Constant_ExprContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_case_List_Elem

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCase_List_Elem" ):
                listener.enterCase_List_Elem(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCase_List_Elem" ):
                listener.exitCase_List_Elem(self)

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




    def case_List_Elem(self):

        localctx = StructuredTextParser.Case_List_ElemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_case_List_Elem)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 955
            self.constant_Expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Iteration_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def for_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.For_StmtContext,0)


        def while_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.While_StmtContext,0)


        def repeat_Stmt(self):
            return self.getTypedRuleContext(StructuredTextParser.Repeat_StmtContext,0)


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

        def CONTINUE(self):
            return self.getToken(StructuredTextParser.CONTINUE, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_iteration_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterIteration_Stmt" ):
                listener.enterIteration_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitIteration_Stmt" ):
                listener.exitIteration_Stmt(self)

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




    def iteration_Stmt(self):

        localctx = StructuredTextParser.Iteration_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_iteration_Stmt)
        try:
            self.state = 962
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [15]:
                self.enterOuterAlt(localctx, 1)
                self.state = 957
                self.for_Stmt()
                pass
            elif token in [22]:
                self.enterOuterAlt(localctx, 2)
                self.state = 958
                self.while_Stmt()
                pass
            elif token in [24]:
                self.enterOuterAlt(localctx, 3)
                self.state = 959
                self.repeat_Stmt()
                pass
            elif token in [20]:
                self.enterOuterAlt(localctx, 4)
                self.state = 960
                self.match(StructuredTextParser.EXIT)
                pass
            elif token in [19]:
                self.enterOuterAlt(localctx, 5)
                self.state = 961
                self.match(StructuredTextParser.CONTINUE)
                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 For_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FOR(self):
            return self.getToken(StructuredTextParser.FOR, 0)

        def control_Variable(self):
            return self.getTypedRuleContext(StructuredTextParser.Control_VariableContext,0)


        def ASSIGNE(self):
            return self.getToken(StructuredTextParser.ASSIGNE, 0)

        def for_List(self):
            return self.getTypedRuleContext(StructuredTextParser.For_ListContext,0)


        def DO(self):
            return self.getToken(StructuredTextParser.DO, 0)

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def END_FOR(self):
            return self.getToken(StructuredTextParser.END_FOR, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_for_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFor_Stmt" ):
                listener.enterFor_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFor_Stmt" ):
                listener.exitFor_Stmt(self)

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




    def for_Stmt(self):

        localctx = StructuredTextParser.For_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_for_Stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 964
            self.match(StructuredTextParser.FOR)
            self.state = 965
            self.control_Variable()
            self.state = 966
            self.match(StructuredTextParser.ASSIGNE)
            self.state = 967
            self.for_List()
            self.state = 968
            self.match(StructuredTextParser.DO)
            self.state = 969
            self.stmt_List()
            self.state = 970
            self.match(StructuredTextParser.END_FOR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Control_VariableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER(self):
            return self.getToken(StructuredTextParser.IDENTIFIER, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_control_Variable

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterControl_Variable" ):
                listener.enterControl_Variable(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitControl_Variable" ):
                listener.exitControl_Variable(self)

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




    def control_Variable(self):

        localctx = StructuredTextParser.Control_VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_control_Variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 972
            self.match(StructuredTextParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class For_ListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(StructuredTextParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,i)


        def TO(self):
            return self.getToken(StructuredTextParser.TO, 0)

        def BY(self):
            return self.getToken(StructuredTextParser.BY, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_for_List

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFor_List" ):
                listener.enterFor_List(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFor_List" ):
                listener.exitFor_List(self)

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




    def for_List(self):

        localctx = StructuredTextParser.For_ListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_for_List)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 974
            self.expression(0)
            self.state = 975
            self.match(StructuredTextParser.TO)
            self.state = 976
            self.expression(0)
            self.state = 979
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 977
                self.match(StructuredTextParser.BY)
                self.state = 978
                self.expression(0)


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


    class While_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WHILE(self):
            return self.getToken(StructuredTextParser.WHILE, 0)

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def DO(self):
            return self.getToken(StructuredTextParser.DO, 0)

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def END_WHILE(self):
            return self.getToken(StructuredTextParser.END_WHILE, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_while_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterWhile_Stmt" ):
                listener.enterWhile_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitWhile_Stmt" ):
                listener.exitWhile_Stmt(self)

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




    def while_Stmt(self):

        localctx = StructuredTextParser.While_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_while_Stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 981
            self.match(StructuredTextParser.WHILE)
            self.state = 982
            self.expression(0)
            self.state = 983
            self.match(StructuredTextParser.DO)
            self.state = 984
            self.stmt_List()
            self.state = 985
            self.match(StructuredTextParser.END_WHILE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Repeat_StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def REPEAT(self):
            return self.getToken(StructuredTextParser.REPEAT, 0)

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def UNTIL(self):
            return self.getToken(StructuredTextParser.UNTIL, 0)

        def expression(self):
            return self.getTypedRuleContext(StructuredTextParser.ExpressionContext,0)


        def END_REPEAT(self):
            return self.getToken(StructuredTextParser.END_REPEAT, 0)

        def getRuleIndex(self):
            return StructuredTextParser.RULE_repeat_Stmt

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRepeat_Stmt" ):
                listener.enterRepeat_Stmt(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRepeat_Stmt" ):
                listener.exitRepeat_Stmt(self)

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




    def repeat_Stmt(self):

        localctx = StructuredTextParser.Repeat_StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_repeat_Stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 987
            self.match(StructuredTextParser.REPEAT)
            self.state = 988
            self.stmt_List()
            self.state = 989
            self.match(StructuredTextParser.UNTIL)
            self.state = 990
            self.expression(0)
            self.state = 991
            self.match(StructuredTextParser.END_REPEAT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Function_bodyContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def stmt_List(self):
            return self.getTypedRuleContext(StructuredTextParser.Stmt_ListContext,0)


        def getRuleIndex(self):
            return StructuredTextParser.RULE_function_body

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunction_body" ):
                listener.enterFunction_body(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunction_body" ):
                listener.exitFunction_body(self)

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




    def function_body(self):

        localctx = StructuredTextParser.Function_bodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_function_body)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 993
            self.stmt_List()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[49] = self.expression_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def expression_sempred(self, localctx:ExpressionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 7)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 6)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 5)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 2)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 1)
         




