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

class AmberMRParser ( Parser ):

    grammarFileName = "AmberMRParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "'&RST'", "'IAT'", "'RSTWT'", 
                     "'RESTRAINT'", "<INVALID>", "<INVALID>", "'IRESID'", 
                     "'NSTEP1'", "'NSTEP2'", "'IRSTYP'", "'IALTD'", "'IFVARI'", 
                     "'NINC'", "'IMULT'", "'R1'", "'R2'", "'R3'", "'R4'", 
                     "'RK2'", "'RK3'", "'R1A'", "'R2A'", "'R3A'", "'R4A'", 
                     "'RK2A'", "'RK3A'", "'R0'", "'K0'", "'R0A'", "'K0A'", 
                     "'RJCOEF'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'FXYZ'", "'OUTXYZ'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'IR6'", "'IFNTYP'", "'IXPK'", 
                     "'NXPK'", "'ICONSTR'", "'&NOEEXP'", "'NPEAK'", "'EMIX'", 
                     "'IHP'", "'JHP'", "'AEXP'", "'ARANGE'", "'AWT'", "'INVWT1'", 
                     "'INVWT2'", "'OMEGA'", "'TAUROT'", "'TAUMET'", "'ID2O'", 
                     "'OSCALE'", "'&SHF'", "'NRING'", "'NATR'", "'IATR'", 
                     "'NAMR'", "'STR'", "'IPROT'", "'OBS'", "'SHRANG'", 
                     "'WT'", "'NPROT'", "'SHCUT'", "'NTER'", "'CTER'", "'&PCSHF'", 
                     "'NME'", "'NMPMC'", "'OPTPHI'", "'OPTTET'", "'OPTOMG'", 
                     "'OPTA1'", "'OPTA2'", "'OPTKON'", "'TOLPRO'", "'MLTPRO'", 
                     "'&ALIGN'", "'NDIP'", "'ID'", "'JD'", "'DOBSL'", "'DOBSU'", 
                     "'DWT'", "'DATASET'", "'NUM_DATASETS'", "'S11'", "'S12'", 
                     "'S13'", "'S22'", "'S23'", "'GIGJ'", "'DIJ'", "'DCUT'", 
                     "'FREEZEMOL'", "'&CSA'", "'NCSA'", "'ICSA'", "'JCSA'", 
                     "'KCSA'", "'COBSL'", "'COBSU'", "'CWT'", "'DATASETC'", 
                     "'FIELD'", "'SIGMA11'", "'SIGMA12'", "'SIGMA13'", "'SIGMA22'", 
                     "'SIGMA23'", "'CCUT'", "<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>", "'DISTANCE'", "'ANGLE'", 
                     "'TORSION'", "'COORDINATE'", "'PLANE'", "'COM'" ]

    symbolicNames = [ "<INVALID>", "END", "RST", "IAT", "RSTWT", "RESTRAINT", 
                      "ATNAM_Lp", "ATNAM", "IRESID", "NSTEP1", "NSTEP2", 
                      "IRSTYP", "IALTD", "IFVARI", "NINC", "IMULT", "R1", 
                      "R2", "R3", "R4", "RK2", "RK3", "R1A", "R2A", "R3A", 
                      "R4A", "RK2A", "RK3A", "R0", "K0", "R0A", "K0A", "RJCOEF", 
                      "IGR1", "IGR2", "IGR3", "IGR4", "IGR5", "IGR6", "IGR7", 
                      "IGR8", "FXYZ", "OUTXYZ", "GRNAM1_Lp", "GRNAM2_Lp", 
                      "GRNAM3_Lp", "GRNAM4_Lp", "GRNAM5_Lp", "GRNAM6_Lp", 
                      "GRNAM7_Lp", "GRNAM8_Lp", "GRNAM1", "GRNAM2", "GRNAM3", 
                      "GRNAM4", "GRNAM5", "GRNAM6", "GRNAM7", "GRNAM8", 
                      "IR6", "IFNTYP", "IXPK", "NXPK", "ICONSTR", "NOEEXP", 
                      "NPEAK", "EMIX", "IHP", "JHP", "AEXP", "ARANGE", "AWT", 
                      "INVWT1", "INVWT2", "OMEGA", "TAUROT", "TAUMET", "ID2O", 
                      "OSCALE", "SHF", "NRING", "NATR", "IATR", "NAMR", 
                      "STR", "IPROT", "OBS", "SHRANG", "WT", "NPROT", "SHCUT", 
                      "NTER", "CTER", "PCSHF", "NME", "NMPMC", "OPTPHI", 
                      "OPTTET", "OPTOMG", "OPTA1", "OPTA2", "OPTKON", "TOLPRO", 
                      "MLTPRO", "ALIGN", "NDIP", "ID", "JD", "DOBSL", "DOBSU", 
                      "DWT", "DATASET", "NUM_DATASETS", "S11", "S12", "S13", 
                      "S22", "S23", "GIGJ", "DIJ", "DCUT", "FREEZEMOL", 
                      "CSA", "NCSA", "ICSA", "JCSA", "KCSA", "COBSL", "COBSU", 
                      "CWT", "DATASETC", "FIELD", "SIGMA11", "SIGMA12", 
                      "SIGMA13", "SIGMA22", "SIGMA23", "CCUT", "Comma", 
                      "SHARP_COMMENT", "EXCLM_COMMENT", "SMCLN_COMMENT", 
                      "COMMENT", "Logical", "L_paren", "R_paren", "L_brace", 
                      "R_brace", "L_brakt", "R_brakt", "Equ_op", "L_QUOT", 
                      "SPACE", "SECTION_COMMENT", "Any_name", "SPACE_C", 
                      "RETURN_C", "Equ_op_IP", "L_paren_IP", "Integer", 
                      "SPACE_IP", "Equ_op_RP", "L_paren_RP", "Real", "SPACE_RP", 
                      "Equ_op_BP", "BoolInt", "SPACE_BP", "L_paren_QP", 
                      "Equ_op_QP", "Qstring", "Decimal_AQP", "R_paren_AQP", 
                      "Equ_op_AQP", "SPACE_AQP", "Qstring_AQP", "L_paren_IA", 
                      "Equ_op_IA", "Comma_IA", "End_IA", "Asterisk_IA", 
                      "Integers", "MultiplicativeInt", "COMMENT_IA", "L_paren_RA", 
                      "Equ_op_RA", "Comma_RA", "End_RA", "Asterisk_RA", 
                      "Reals", "MultiplicativeReal", "COMMENT_RA", "Equ_op_BA", 
                      "Comma_BA", "End_BA", "BoolInts", "COMMENT_BA", "L_paren_QA", 
                      "Equ_op_QA", "Comma_QA", "End_QA", "Qstrings", "COMMENT_QA", 
                      "Comma_A", "R_paren_A", "Decimal", "SPACE_A", "DISTANCE_F", 
                      "ANGLE_F", "TORSION_F", "COORDINATE_F", "PLANE_F", 
                      "COM_F", "Integer_F", "Real_F", "Ambmask_F", "Comma_F", 
                      "L_paren_F", "R_paren_F", "L_brace_F", "R_brace_F", 
                      "L_brakt_F", "R_brakt_F", "R_QUOT", "SPACE_F" ]

    RULE_amber_mr = 0
    RULE_comment = 1
    RULE_nmr_restraint = 2
    RULE_noesy_volume_restraint = 3
    RULE_chemical_shift_restraint = 4
    RULE_pcs_restraint = 5
    RULE_dipolar_coupling_restraint = 6
    RULE_csa_restraint = 7
    RULE_restraint_statement = 8
    RULE_restraint_factor = 9
    RULE_noeexp_statement = 10
    RULE_noeexp_factor = 11
    RULE_shf_statement = 12
    RULE_shf_factor = 13
    RULE_pcshf_statement = 14
    RULE_pcshf_factor = 15
    RULE_align_statement = 16
    RULE_align_factor = 17
    RULE_csa_statement = 18
    RULE_csa_factor = 19
    RULE_distance_rst_func_call = 20
    RULE_angle_rst_func_call = 21
    RULE_plane_point_angle_rst_func_call = 22
    RULE_plane_plane_angle_rst_func_call = 23
    RULE_torsion_rst_func_call = 24
    RULE_coordinate2_rst_func_call = 25
    RULE_coordinate3_rst_func_call = 26
    RULE_coordinate4_rst_func_call = 27
    RULE_restraint_func_expr = 28
    RULE_plane_rst_func_call = 29
    RULE_com_rst_func_call = 30

    ruleNames =  [ "amber_mr", "comment", "nmr_restraint", "noesy_volume_restraint", 
                   "chemical_shift_restraint", "pcs_restraint", "dipolar_coupling_restraint", 
                   "csa_restraint", "restraint_statement", "restraint_factor", 
                   "noeexp_statement", "noeexp_factor", "shf_statement", 
                   "shf_factor", "pcshf_statement", "pcshf_factor", "align_statement", 
                   "align_factor", "csa_statement", "csa_factor", "distance_rst_func_call", 
                   "angle_rst_func_call", "plane_point_angle_rst_func_call", 
                   "plane_plane_angle_rst_func_call", "torsion_rst_func_call", 
                   "coordinate2_rst_func_call", "coordinate3_rst_func_call", 
                   "coordinate4_rst_func_call", "restraint_func_expr", "plane_rst_func_call", 
                   "com_rst_func_call" ]

    EOF = Token.EOF
    END=1
    RST=2
    IAT=3
    RSTWT=4
    RESTRAINT=5
    ATNAM_Lp=6
    ATNAM=7
    IRESID=8
    NSTEP1=9
    NSTEP2=10
    IRSTYP=11
    IALTD=12
    IFVARI=13
    NINC=14
    IMULT=15
    R1=16
    R2=17
    R3=18
    R4=19
    RK2=20
    RK3=21
    R1A=22
    R2A=23
    R3A=24
    R4A=25
    RK2A=26
    RK3A=27
    R0=28
    K0=29
    R0A=30
    K0A=31
    RJCOEF=32
    IGR1=33
    IGR2=34
    IGR3=35
    IGR4=36
    IGR5=37
    IGR6=38
    IGR7=39
    IGR8=40
    FXYZ=41
    OUTXYZ=42
    GRNAM1_Lp=43
    GRNAM2_Lp=44
    GRNAM3_Lp=45
    GRNAM4_Lp=46
    GRNAM5_Lp=47
    GRNAM6_Lp=48
    GRNAM7_Lp=49
    GRNAM8_Lp=50
    GRNAM1=51
    GRNAM2=52
    GRNAM3=53
    GRNAM4=54
    GRNAM5=55
    GRNAM6=56
    GRNAM7=57
    GRNAM8=58
    IR6=59
    IFNTYP=60
    IXPK=61
    NXPK=62
    ICONSTR=63
    NOEEXP=64
    NPEAK=65
    EMIX=66
    IHP=67
    JHP=68
    AEXP=69
    ARANGE=70
    AWT=71
    INVWT1=72
    INVWT2=73
    OMEGA=74
    TAUROT=75
    TAUMET=76
    ID2O=77
    OSCALE=78
    SHF=79
    NRING=80
    NATR=81
    IATR=82
    NAMR=83
    STR=84
    IPROT=85
    OBS=86
    SHRANG=87
    WT=88
    NPROT=89
    SHCUT=90
    NTER=91
    CTER=92
    PCSHF=93
    NME=94
    NMPMC=95
    OPTPHI=96
    OPTTET=97
    OPTOMG=98
    OPTA1=99
    OPTA2=100
    OPTKON=101
    TOLPRO=102
    MLTPRO=103
    ALIGN=104
    NDIP=105
    ID=106
    JD=107
    DOBSL=108
    DOBSU=109
    DWT=110
    DATASET=111
    NUM_DATASETS=112
    S11=113
    S12=114
    S13=115
    S22=116
    S23=117
    GIGJ=118
    DIJ=119
    DCUT=120
    FREEZEMOL=121
    CSA=122
    NCSA=123
    ICSA=124
    JCSA=125
    KCSA=126
    COBSL=127
    COBSU=128
    CWT=129
    DATASETC=130
    FIELD=131
    SIGMA11=132
    SIGMA12=133
    SIGMA13=134
    SIGMA22=135
    SIGMA23=136
    CCUT=137
    Comma=138
    SHARP_COMMENT=139
    EXCLM_COMMENT=140
    SMCLN_COMMENT=141
    COMMENT=142
    Logical=143
    L_paren=144
    R_paren=145
    L_brace=146
    R_brace=147
    L_brakt=148
    R_brakt=149
    Equ_op=150
    L_QUOT=151
    SPACE=152
    SECTION_COMMENT=153
    Any_name=154
    SPACE_C=155
    RETURN_C=156
    Equ_op_IP=157
    L_paren_IP=158
    Integer=159
    SPACE_IP=160
    Equ_op_RP=161
    L_paren_RP=162
    Real=163
    SPACE_RP=164
    Equ_op_BP=165
    BoolInt=166
    SPACE_BP=167
    L_paren_QP=168
    Equ_op_QP=169
    Qstring=170
    Decimal_AQP=171
    R_paren_AQP=172
    Equ_op_AQP=173
    SPACE_AQP=174
    Qstring_AQP=175
    L_paren_IA=176
    Equ_op_IA=177
    Comma_IA=178
    End_IA=179
    Asterisk_IA=180
    Integers=181
    MultiplicativeInt=182
    COMMENT_IA=183
    L_paren_RA=184
    Equ_op_RA=185
    Comma_RA=186
    End_RA=187
    Asterisk_RA=188
    Reals=189
    MultiplicativeReal=190
    COMMENT_RA=191
    Equ_op_BA=192
    Comma_BA=193
    End_BA=194
    BoolInts=195
    COMMENT_BA=196
    L_paren_QA=197
    Equ_op_QA=198
    Comma_QA=199
    End_QA=200
    Qstrings=201
    COMMENT_QA=202
    Comma_A=203
    R_paren_A=204
    Decimal=205
    SPACE_A=206
    DISTANCE_F=207
    ANGLE_F=208
    TORSION_F=209
    COORDINATE_F=210
    PLANE_F=211
    COM_F=212
    Integer_F=213
    Real_F=214
    Ambmask_F=215
    Comma_F=216
    L_paren_F=217
    R_paren_F=218
    L_brace_F=219
    R_brace_F=220
    L_brakt_F=221
    R_brakt_F=222
    R_QUOT=223
    SPACE_F=224

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




    class Amber_mrContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def comment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.CommentContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.CommentContext,i)


        def nmr_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Nmr_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Nmr_restraintContext,i)


        def noesy_volume_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Noesy_volume_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Noesy_volume_restraintContext,i)


        def chemical_shift_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Chemical_shift_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Chemical_shift_restraintContext,i)


        def pcs_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Pcs_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Pcs_restraintContext,i)


        def dipolar_coupling_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Dipolar_coupling_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Dipolar_coupling_restraintContext,i)


        def csa_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Csa_restraintContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Csa_restraintContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_amber_mr

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

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




    def amber_mr(self):

        localctx = AmberMRParser.Amber_mrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_amber_mr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 71
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AmberMRParser.RST or _la==AmberMRParser.NOEEXP or ((((_la - 79)) & ~0x3f) == 0 and ((1 << (_la - 79)) & ((1 << (AmberMRParser.SHF - 79)) | (1 << (AmberMRParser.PCSHF - 79)) | (1 << (AmberMRParser.ALIGN - 79)) | (1 << (AmberMRParser.CSA - 79)) | (1 << (AmberMRParser.COMMENT - 79)))) != 0):
                self.state = 69
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [AmberMRParser.COMMENT]:
                    self.state = 62
                    self.comment()
                    pass
                elif token in [AmberMRParser.RST]:
                    self.state = 63
                    self.nmr_restraint()
                    pass
                elif token in [AmberMRParser.NOEEXP]:
                    self.state = 64
                    self.noesy_volume_restraint()
                    pass
                elif token in [AmberMRParser.SHF]:
                    self.state = 65
                    self.chemical_shift_restraint()
                    pass
                elif token in [AmberMRParser.PCSHF]:
                    self.state = 66
                    self.pcs_restraint()
                    pass
                elif token in [AmberMRParser.ALIGN]:
                    self.state = 67
                    self.dipolar_coupling_restraint()
                    pass
                elif token in [AmberMRParser.CSA]:
                    self.state = 68
                    self.csa_restraint()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 74
            self.match(AmberMRParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CommentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COMMENT(self):
            return self.getToken(AmberMRParser.COMMENT, 0)

        def RETURN_C(self):
            return self.getToken(AmberMRParser.RETURN_C, 0)

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

        def getRuleIndex(self):
            return AmberMRParser.RULE_comment

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

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




    def comment(self):

        localctx = AmberMRParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 76
            self.match(AmberMRParser.COMMENT)
            self.state = 80
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AmberMRParser.Any_name:
                self.state = 77
                self.match(AmberMRParser.Any_name)
                self.state = 82
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 83
            self.match(AmberMRParser.RETURN_C)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Nmr_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def RST(self):
            return self.getToken(AmberMRParser.RST, 0)

        def restraint_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Restraint_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_nmr_restraint

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

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




    def nmr_restraint(self):

        localctx = AmberMRParser.Nmr_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_nmr_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 85
            self.match(AmberMRParser.RST)
            self.state = 86
            self.restraint_statement()
            self.state = 88
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 87
                self.match(AmberMRParser.END)


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


    class Noesy_volume_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NOEEXP(self):
            return self.getToken(AmberMRParser.NOEEXP, 0)

        def noeexp_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Noeexp_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_noesy_volume_restraint

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

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




    def noesy_volume_restraint(self):

        localctx = AmberMRParser.Noesy_volume_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_noesy_volume_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 90
            self.match(AmberMRParser.NOEEXP)
            self.state = 91
            self.noeexp_statement()
            self.state = 93
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 92
                self.match(AmberMRParser.END)


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


    class Chemical_shift_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SHF(self):
            return self.getToken(AmberMRParser.SHF, 0)

        def shf_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Shf_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_chemical_shift_restraint

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

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




    def chemical_shift_restraint(self):

        localctx = AmberMRParser.Chemical_shift_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_chemical_shift_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 95
            self.match(AmberMRParser.SHF)
            self.state = 96
            self.shf_statement()
            self.state = 98
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 97
                self.match(AmberMRParser.END)


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


    class Pcs_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PCSHF(self):
            return self.getToken(AmberMRParser.PCSHF, 0)

        def pcshf_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Pcshf_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_pcs_restraint

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

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




    def pcs_restraint(self):

        localctx = AmberMRParser.Pcs_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_pcs_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 100
            self.match(AmberMRParser.PCSHF)
            self.state = 101
            self.pcshf_statement()
            self.state = 103
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 102
                self.match(AmberMRParser.END)


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


    class Dipolar_coupling_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ALIGN(self):
            return self.getToken(AmberMRParser.ALIGN, 0)

        def align_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Align_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_dipolar_coupling_restraint

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

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




    def dipolar_coupling_restraint(self):

        localctx = AmberMRParser.Dipolar_coupling_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_dipolar_coupling_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 105
            self.match(AmberMRParser.ALIGN)
            self.state = 106
            self.align_statement()
            self.state = 108
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 107
                self.match(AmberMRParser.END)


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


    class Csa_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CSA(self):
            return self.getToken(AmberMRParser.CSA, 0)

        def csa_statement(self):
            return self.getTypedRuleContext(AmberMRParser.Csa_statementContext,0)


        def END(self):
            return self.getToken(AmberMRParser.END, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_csa_restraint

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

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




    def csa_restraint(self):

        localctx = AmberMRParser.Csa_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_csa_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 110
            self.match(AmberMRParser.CSA)
            self.state = 111
            self.csa_statement()
            self.state = 113
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AmberMRParser.END:
                self.state = 112
                self.match(AmberMRParser.END)


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


    class Restraint_statementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def restraint_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_restraint_statement

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

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




    def restraint_statement(self):

        localctx = AmberMRParser.Restraint_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_restraint_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 118
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.IAT) | (1 << AmberMRParser.RSTWT) | (1 << AmberMRParser.RESTRAINT) | (1 << AmberMRParser.ATNAM_Lp) | (1 << AmberMRParser.ATNAM) | (1 << AmberMRParser.IRESID) | (1 << AmberMRParser.NSTEP1) | (1 << AmberMRParser.NSTEP2) | (1 << AmberMRParser.IRSTYP) | (1 << AmberMRParser.IALTD) | (1 << AmberMRParser.IFVARI) | (1 << AmberMRParser.NINC) | (1 << AmberMRParser.IMULT) | (1 << AmberMRParser.R1) | (1 << AmberMRParser.R2) | (1 << AmberMRParser.R3) | (1 << AmberMRParser.R4) | (1 << AmberMRParser.RK2) | (1 << AmberMRParser.RK3) | (1 << AmberMRParser.R1A) | (1 << AmberMRParser.R2A) | (1 << AmberMRParser.R3A) | (1 << AmberMRParser.R4A) | (1 << AmberMRParser.RK2A) | (1 << AmberMRParser.RK3A) | (1 << AmberMRParser.R0) | (1 << AmberMRParser.K0) | (1 << AmberMRParser.R0A) | (1 << AmberMRParser.K0A) | (1 << AmberMRParser.RJCOEF) | (1 << AmberMRParser.IGR1) | (1 << AmberMRParser.IGR2) | (1 << AmberMRParser.IGR3) | (1 << AmberMRParser.IGR4) | (1 << AmberMRParser.IGR5) | (1 << AmberMRParser.IGR6) | (1 << AmberMRParser.IGR7) | (1 << AmberMRParser.IGR8) | (1 << AmberMRParser.FXYZ) | (1 << AmberMRParser.OUTXYZ) | (1 << AmberMRParser.GRNAM1_Lp) | (1 << AmberMRParser.GRNAM2_Lp) | (1 << AmberMRParser.GRNAM3_Lp) | (1 << AmberMRParser.GRNAM4_Lp) | (1 << AmberMRParser.GRNAM5_Lp) | (1 << AmberMRParser.GRNAM6_Lp) | (1 << AmberMRParser.GRNAM7_Lp) | (1 << AmberMRParser.GRNAM8_Lp) | (1 << AmberMRParser.GRNAM1) | (1 << AmberMRParser.GRNAM2) | (1 << AmberMRParser.GRNAM3) | (1 << AmberMRParser.GRNAM4) | (1 << AmberMRParser.GRNAM5) | (1 << AmberMRParser.GRNAM6) | (1 << AmberMRParser.GRNAM7) | (1 << AmberMRParser.GRNAM8) | (1 << AmberMRParser.IR6) | (1 << AmberMRParser.IFNTYP) | (1 << AmberMRParser.IXPK) | (1 << AmberMRParser.NXPK) | (1 << AmberMRParser.ICONSTR))) != 0):
                self.state = 115
                self.restraint_factor()
                self.state = 120
                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 Restraint_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Equ_op_IA(self):
            return self.getToken(AmberMRParser.Equ_op_IA, 0)

        def IAT(self):
            return self.getToken(AmberMRParser.IAT, 0)

        def IGR1(self):
            return self.getToken(AmberMRParser.IGR1, 0)

        def IGR2(self):
            return self.getToken(AmberMRParser.IGR2, 0)

        def IGR3(self):
            return self.getToken(AmberMRParser.IGR3, 0)

        def IGR4(self):
            return self.getToken(AmberMRParser.IGR4, 0)

        def IGR5(self):
            return self.getToken(AmberMRParser.IGR5, 0)

        def IGR6(self):
            return self.getToken(AmberMRParser.IGR6, 0)

        def IGR7(self):
            return self.getToken(AmberMRParser.IGR7, 0)

        def IGR8(self):
            return self.getToken(AmberMRParser.IGR8, 0)

        def Integers(self):
            return self.getToken(AmberMRParser.Integers, 0)

        def MultiplicativeInt(self):
            return self.getToken(AmberMRParser.MultiplicativeInt, 0)

        def Comma_IA(self):
            return self.getToken(AmberMRParser.Comma_IA, 0)

        def End_IA(self):
            return self.getToken(AmberMRParser.End_IA, 0)

        def Equ_op_RA(self):
            return self.getToken(AmberMRParser.Equ_op_RA, 0)

        def RSTWT(self):
            return self.getToken(AmberMRParser.RSTWT, 0)

        def RJCOEF(self):
            return self.getToken(AmberMRParser.RJCOEF, 0)

        def Reals(self):
            return self.getToken(AmberMRParser.Reals, 0)

        def MultiplicativeReal(self):
            return self.getToken(AmberMRParser.MultiplicativeReal, 0)

        def Comma_RA(self):
            return self.getToken(AmberMRParser.Comma_RA, 0)

        def End_RA(self):
            return self.getToken(AmberMRParser.End_RA, 0)

        def RESTRAINT(self):
            return self.getToken(AmberMRParser.RESTRAINT, 0)

        def Equ_op(self):
            return self.getToken(AmberMRParser.Equ_op, 0)

        def L_QUOT(self):
            return self.getToken(AmberMRParser.L_QUOT, 0)

        def R_QUOT(self):
            return self.getToken(AmberMRParser.R_QUOT, 0)

        def distance_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Distance_rst_func_callContext,0)


        def angle_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Angle_rst_func_callContext,0)


        def torsion_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Torsion_rst_func_callContext,0)


        def plane_point_angle_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Plane_point_angle_rst_func_callContext,0)


        def plane_plane_angle_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Plane_plane_angle_rst_func_callContext,0)


        def coordinate2_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Coordinate2_rst_func_callContext,0)


        def coordinate3_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Coordinate3_rst_func_callContext,0)


        def coordinate4_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Coordinate4_rst_func_callContext,0)


        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def Decimal_AQP(self):
            return self.getToken(AmberMRParser.Decimal_AQP, 0)

        def R_paren_AQP(self):
            return self.getToken(AmberMRParser.R_paren_AQP, 0)

        def Equ_op_AQP(self):
            return self.getToken(AmberMRParser.Equ_op_AQP, 0)

        def Qstring_AQP(self):
            return self.getToken(AmberMRParser.Qstring_AQP, 0)

        def ATNAM_Lp(self):
            return self.getToken(AmberMRParser.ATNAM_Lp, 0)

        def GRNAM1_Lp(self):
            return self.getToken(AmberMRParser.GRNAM1_Lp, 0)

        def GRNAM2_Lp(self):
            return self.getToken(AmberMRParser.GRNAM2_Lp, 0)

        def GRNAM3_Lp(self):
            return self.getToken(AmberMRParser.GRNAM3_Lp, 0)

        def GRNAM4_Lp(self):
            return self.getToken(AmberMRParser.GRNAM4_Lp, 0)

        def GRNAM5_Lp(self):
            return self.getToken(AmberMRParser.GRNAM5_Lp, 0)

        def GRNAM6_Lp(self):
            return self.getToken(AmberMRParser.GRNAM6_Lp, 0)

        def GRNAM7_Lp(self):
            return self.getToken(AmberMRParser.GRNAM7_Lp, 0)

        def GRNAM8_Lp(self):
            return self.getToken(AmberMRParser.GRNAM8_Lp, 0)

        def Equ_op_QA(self):
            return self.getToken(AmberMRParser.Equ_op_QA, 0)

        def Qstrings(self):
            return self.getToken(AmberMRParser.Qstrings, 0)

        def ATNAM(self):
            return self.getToken(AmberMRParser.ATNAM, 0)

        def GRNAM1(self):
            return self.getToken(AmberMRParser.GRNAM1, 0)

        def GRNAM2(self):
            return self.getToken(AmberMRParser.GRNAM2, 0)

        def GRNAM3(self):
            return self.getToken(AmberMRParser.GRNAM3, 0)

        def GRNAM4(self):
            return self.getToken(AmberMRParser.GRNAM4, 0)

        def GRNAM5(self):
            return self.getToken(AmberMRParser.GRNAM5, 0)

        def GRNAM6(self):
            return self.getToken(AmberMRParser.GRNAM6, 0)

        def GRNAM7(self):
            return self.getToken(AmberMRParser.GRNAM7, 0)

        def GRNAM8(self):
            return self.getToken(AmberMRParser.GRNAM8, 0)

        def Comma_QA(self):
            return self.getToken(AmberMRParser.Comma_QA, 0)

        def End_QA(self):
            return self.getToken(AmberMRParser.End_QA, 0)

        def Equ_op_BP(self):
            return self.getToken(AmberMRParser.Equ_op_BP, 0)

        def BoolInt(self):
            return self.getToken(AmberMRParser.BoolInt, 0)

        def IRESID(self):
            return self.getToken(AmberMRParser.IRESID, 0)

        def IRSTYP(self):
            return self.getToken(AmberMRParser.IRSTYP, 0)

        def IALTD(self):
            return self.getToken(AmberMRParser.IALTD, 0)

        def IMULT(self):
            return self.getToken(AmberMRParser.IMULT, 0)

        def OUTXYZ(self):
            return self.getToken(AmberMRParser.OUTXYZ, 0)

        def IR6(self):
            return self.getToken(AmberMRParser.IR6, 0)

        def IFNTYP(self):
            return self.getToken(AmberMRParser.IFNTYP, 0)

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def NSTEP1(self):
            return self.getToken(AmberMRParser.NSTEP1, 0)

        def NSTEP2(self):
            return self.getToken(AmberMRParser.NSTEP2, 0)

        def IFVARI(self):
            return self.getToken(AmberMRParser.IFVARI, 0)

        def NINC(self):
            return self.getToken(AmberMRParser.NINC, 0)

        def IXPK(self):
            return self.getToken(AmberMRParser.IXPK, 0)

        def NXPK(self):
            return self.getToken(AmberMRParser.NXPK, 0)

        def ICONSTR(self):
            return self.getToken(AmberMRParser.ICONSTR, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def R1(self):
            return self.getToken(AmberMRParser.R1, 0)

        def R2(self):
            return self.getToken(AmberMRParser.R2, 0)

        def R3(self):
            return self.getToken(AmberMRParser.R3, 0)

        def R4(self):
            return self.getToken(AmberMRParser.R4, 0)

        def RK2(self):
            return self.getToken(AmberMRParser.RK2, 0)

        def RK3(self):
            return self.getToken(AmberMRParser.RK3, 0)

        def R1A(self):
            return self.getToken(AmberMRParser.R1A, 0)

        def R2A(self):
            return self.getToken(AmberMRParser.R2A, 0)

        def R3A(self):
            return self.getToken(AmberMRParser.R3A, 0)

        def R4A(self):
            return self.getToken(AmberMRParser.R4A, 0)

        def RK2A(self):
            return self.getToken(AmberMRParser.RK2A, 0)

        def RK3A(self):
            return self.getToken(AmberMRParser.RK3A, 0)

        def R0(self):
            return self.getToken(AmberMRParser.R0, 0)

        def K0(self):
            return self.getToken(AmberMRParser.K0, 0)

        def R0A(self):
            return self.getToken(AmberMRParser.R0A, 0)

        def K0A(self):
            return self.getToken(AmberMRParser.K0A, 0)

        def FXYZ(self):
            return self.getToken(AmberMRParser.FXYZ, 0)

        def Equ_op_BA(self):
            return self.getToken(AmberMRParser.Equ_op_BA, 0)

        def BoolInts(self):
            return self.getToken(AmberMRParser.BoolInts, 0)

        def Comma_BA(self):
            return self.getToken(AmberMRParser.Comma_BA, 0)

        def End_BA(self):
            return self.getToken(AmberMRParser.End_BA, 0)

        def L_paren_IA(self):
            return self.getToken(AmberMRParser.L_paren_IA, 0)

        def Decimal(self):
            return self.getToken(AmberMRParser.Decimal, 0)

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_restraint_factor

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

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




    def restraint_factor(self):

        localctx = AmberMRParser.Restraint_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_restraint_factor)
        self._la = 0 # Token type
        try:
            self.state = 196
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 121
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.IAT) | (1 << AmberMRParser.IGR1) | (1 << AmberMRParser.IGR2) | (1 << AmberMRParser.IGR3) | (1 << AmberMRParser.IGR4) | (1 << AmberMRParser.IGR5) | (1 << AmberMRParser.IGR6) | (1 << AmberMRParser.IGR7) | (1 << AmberMRParser.IGR8))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 122
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 123
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Integers or _la==AmberMRParser.MultiplicativeInt):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 124
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_IA or _la==AmberMRParser.End_IA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 125
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.RSTWT or _la==AmberMRParser.RJCOEF):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 126
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 127
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Reals or _la==AmberMRParser.MultiplicativeReal):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 128
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 129
                self.match(AmberMRParser.RESTRAINT)
                self.state = 130
                self.match(AmberMRParser.Equ_op)
                self.state = 131
                self.match(AmberMRParser.L_QUOT)
                self.state = 140
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
                if la_ == 1:
                    self.state = 132
                    self.distance_rst_func_call()
                    pass

                elif la_ == 2:
                    self.state = 133
                    self.angle_rst_func_call()
                    pass

                elif la_ == 3:
                    self.state = 134
                    self.torsion_rst_func_call()
                    pass

                elif la_ == 4:
                    self.state = 135
                    self.plane_point_angle_rst_func_call()
                    pass

                elif la_ == 5:
                    self.state = 136
                    self.plane_plane_angle_rst_func_call()
                    pass

                elif la_ == 6:
                    self.state = 137
                    self.coordinate2_rst_func_call()
                    pass

                elif la_ == 7:
                    self.state = 138
                    self.coordinate3_rst_func_call()
                    pass

                elif la_ == 8:
                    self.state = 139
                    self.coordinate4_rst_func_call()
                    pass


                self.state = 142
                self.match(AmberMRParser.R_QUOT)
                self.state = 144
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 143
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 146
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.ATNAM_Lp) | (1 << AmberMRParser.GRNAM1_Lp) | (1 << AmberMRParser.GRNAM2_Lp) | (1 << AmberMRParser.GRNAM3_Lp) | (1 << AmberMRParser.GRNAM4_Lp) | (1 << AmberMRParser.GRNAM5_Lp) | (1 << AmberMRParser.GRNAM6_Lp) | (1 << AmberMRParser.GRNAM7_Lp) | (1 << AmberMRParser.GRNAM8_Lp))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 147
                self.match(AmberMRParser.Decimal_AQP)
                self.state = 148
                self.match(AmberMRParser.R_paren_AQP)
                self.state = 149
                self.match(AmberMRParser.Equ_op_AQP)
                self.state = 150
                self.match(AmberMRParser.Qstring_AQP)
                self.state = 152
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 151
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 154
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.ATNAM) | (1 << AmberMRParser.GRNAM1) | (1 << AmberMRParser.GRNAM2) | (1 << AmberMRParser.GRNAM3) | (1 << AmberMRParser.GRNAM4) | (1 << AmberMRParser.GRNAM5) | (1 << AmberMRParser.GRNAM6) | (1 << AmberMRParser.GRNAM7) | (1 << AmberMRParser.GRNAM8))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 155
                self.match(AmberMRParser.Equ_op_QA)
                self.state = 156
                self.match(AmberMRParser.Qstrings)
                self.state = 157
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_QA or _la==AmberMRParser.End_QA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 158
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.IRESID) | (1 << AmberMRParser.IRSTYP) | (1 << AmberMRParser.IALTD) | (1 << AmberMRParser.IMULT) | (1 << AmberMRParser.OUTXYZ) | (1 << AmberMRParser.IR6) | (1 << AmberMRParser.IFNTYP))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 159
                self.match(AmberMRParser.Equ_op_BP)
                self.state = 160
                self.match(AmberMRParser.BoolInt)
                self.state = 162
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 161
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 164
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.NSTEP1) | (1 << AmberMRParser.NSTEP2) | (1 << AmberMRParser.IFVARI) | (1 << AmberMRParser.NINC) | (1 << AmberMRParser.IXPK) | (1 << AmberMRParser.NXPK) | (1 << AmberMRParser.ICONSTR))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 165
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 166
                self.match(AmberMRParser.Integer)
                self.state = 168
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 167
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 170
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.R1) | (1 << AmberMRParser.R2) | (1 << AmberMRParser.R3) | (1 << AmberMRParser.R4) | (1 << AmberMRParser.RK2) | (1 << AmberMRParser.RK3) | (1 << AmberMRParser.R1A) | (1 << AmberMRParser.R2A) | (1 << AmberMRParser.R3A) | (1 << AmberMRParser.R4A) | (1 << AmberMRParser.RK2A) | (1 << AmberMRParser.RK3A) | (1 << AmberMRParser.R0) | (1 << AmberMRParser.K0) | (1 << AmberMRParser.R0A) | (1 << AmberMRParser.K0A))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 171
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 172
                self.match(AmberMRParser.Real)
                self.state = 174
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 173
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 176
                self.match(AmberMRParser.FXYZ)
                self.state = 177
                self.match(AmberMRParser.Equ_op_BA)
                self.state = 178
                self.match(AmberMRParser.BoolInts)
                self.state = 179
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_BA or _la==AmberMRParser.End_BA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 180
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AmberMRParser.IAT) | (1 << AmberMRParser.IGR1) | (1 << AmberMRParser.IGR2) | (1 << AmberMRParser.IGR3) | (1 << AmberMRParser.IGR4) | (1 << AmberMRParser.IGR5) | (1 << AmberMRParser.IGR6) | (1 << AmberMRParser.IGR7) | (1 << AmberMRParser.IGR8))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 181
                self.match(AmberMRParser.L_paren_IA)
                self.state = 182
                self.match(AmberMRParser.Decimal)
                self.state = 183
                self.match(AmberMRParser.R_paren_A)
                self.state = 184
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 185
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Integers or _la==AmberMRParser.MultiplicativeInt):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 186
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_IA or _la==AmberMRParser.End_IA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 187
                self.match(AmberMRParser.RSTWT)
                self.state = 188
                self.match(AmberMRParser.L_paren_RP)
                self.state = 189
                self.match(AmberMRParser.Decimal)
                self.state = 190
                self.match(AmberMRParser.R_paren_A)
                self.state = 191
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 192
                self.match(AmberMRParser.Real)
                self.state = 194
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 193
                    self.match(AmberMRParser.Comma)


                pass


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


    class Noeexp_statementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def noeexp_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Noeexp_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Noeexp_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_noeexp_statement

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

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




    def noeexp_statement(self):

        localctx = AmberMRParser.Noeexp_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_noeexp_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (AmberMRParser.NPEAK - 65)) | (1 << (AmberMRParser.EMIX - 65)) | (1 << (AmberMRParser.IHP - 65)) | (1 << (AmberMRParser.JHP - 65)) | (1 << (AmberMRParser.AEXP - 65)) | (1 << (AmberMRParser.ARANGE - 65)) | (1 << (AmberMRParser.AWT - 65)) | (1 << (AmberMRParser.INVWT1 - 65)) | (1 << (AmberMRParser.INVWT2 - 65)) | (1 << (AmberMRParser.OMEGA - 65)) | (1 << (AmberMRParser.TAUROT - 65)) | (1 << (AmberMRParser.TAUMET - 65)) | (1 << (AmberMRParser.ID2O - 65)) | (1 << (AmberMRParser.OSCALE - 65)))) != 0):
                self.state = 198
                self.noeexp_factor()
                self.state = 203
                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 Noeexp_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NPEAK(self):
            return self.getToken(AmberMRParser.NPEAK, 0)

        def L_paren_IP(self):
            return self.getToken(AmberMRParser.L_paren_IP, 0)

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

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def EMIX(self):
            return self.getToken(AmberMRParser.EMIX, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def Comma_A(self):
            return self.getToken(AmberMRParser.Comma_A, 0)

        def IHP(self):
            return self.getToken(AmberMRParser.IHP, 0)

        def JHP(self):
            return self.getToken(AmberMRParser.JHP, 0)

        def AEXP(self):
            return self.getToken(AmberMRParser.AEXP, 0)

        def ARANGE(self):
            return self.getToken(AmberMRParser.ARANGE, 0)

        def AWT(self):
            return self.getToken(AmberMRParser.AWT, 0)

        def INVWT1(self):
            return self.getToken(AmberMRParser.INVWT1, 0)

        def INVWT2(self):
            return self.getToken(AmberMRParser.INVWT2, 0)

        def OMEGA(self):
            return self.getToken(AmberMRParser.OMEGA, 0)

        def TAUROT(self):
            return self.getToken(AmberMRParser.TAUROT, 0)

        def TAUMET(self):
            return self.getToken(AmberMRParser.TAUMET, 0)

        def OSCALE(self):
            return self.getToken(AmberMRParser.OSCALE, 0)

        def ID2O(self):
            return self.getToken(AmberMRParser.ID2O, 0)

        def Equ_op_BP(self):
            return self.getToken(AmberMRParser.Equ_op_BP, 0)

        def BoolInt(self):
            return self.getToken(AmberMRParser.BoolInt, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_noeexp_factor

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

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




    def noeexp_factor(self):

        localctx = AmberMRParser.Noeexp_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_noeexp_factor)
        self._la = 0 # Token type
        try:
            self.state = 256
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AmberMRParser.NPEAK]:
                self.enterOuterAlt(localctx, 1)
                self.state = 204
                self.match(AmberMRParser.NPEAK)
                self.state = 205
                self.match(AmberMRParser.L_paren_IP)
                self.state = 206
                self.match(AmberMRParser.Decimal)
                self.state = 207
                self.match(AmberMRParser.R_paren_A)
                self.state = 208
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 209
                self.match(AmberMRParser.Integer)
                self.state = 211
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 210
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.EMIX]:
                self.enterOuterAlt(localctx, 2)
                self.state = 213
                self.match(AmberMRParser.EMIX)
                self.state = 214
                self.match(AmberMRParser.L_paren_RP)
                self.state = 215
                self.match(AmberMRParser.Decimal)
                self.state = 216
                self.match(AmberMRParser.R_paren_A)
                self.state = 217
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 218
                self.match(AmberMRParser.Real)
                self.state = 220
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 219
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.IHP, AmberMRParser.JHP]:
                self.enterOuterAlt(localctx, 3)
                self.state = 222
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.IHP or _la==AmberMRParser.JHP):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 223
                self.match(AmberMRParser.L_paren_IP)
                self.state = 224
                self.match(AmberMRParser.Decimal)
                self.state = 225
                self.match(AmberMRParser.Comma_A)
                self.state = 226
                self.match(AmberMRParser.Decimal)
                self.state = 227
                self.match(AmberMRParser.R_paren_A)
                self.state = 228
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 229
                self.match(AmberMRParser.Integer)
                self.state = 231
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 230
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.AEXP, AmberMRParser.ARANGE, AmberMRParser.AWT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 233
                _la = self._input.LA(1)
                if not(((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & ((1 << (AmberMRParser.AEXP - 69)) | (1 << (AmberMRParser.ARANGE - 69)) | (1 << (AmberMRParser.AWT - 69)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 234
                self.match(AmberMRParser.L_paren_RP)
                self.state = 235
                self.match(AmberMRParser.Decimal)
                self.state = 236
                self.match(AmberMRParser.Comma_A)
                self.state = 237
                self.match(AmberMRParser.Decimal)
                self.state = 238
                self.match(AmberMRParser.R_paren_A)
                self.state = 239
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 240
                self.match(AmberMRParser.Real)
                self.state = 242
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 241
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.INVWT1, AmberMRParser.INVWT2, AmberMRParser.OMEGA, AmberMRParser.TAUROT, AmberMRParser.TAUMET, AmberMRParser.OSCALE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 244
                _la = self._input.LA(1)
                if not(((((_la - 72)) & ~0x3f) == 0 and ((1 << (_la - 72)) & ((1 << (AmberMRParser.INVWT1 - 72)) | (1 << (AmberMRParser.INVWT2 - 72)) | (1 << (AmberMRParser.OMEGA - 72)) | (1 << (AmberMRParser.TAUROT - 72)) | (1 << (AmberMRParser.TAUMET - 72)) | (1 << (AmberMRParser.OSCALE - 72)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 245
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 246
                self.match(AmberMRParser.Real)
                self.state = 248
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 247
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.ID2O]:
                self.enterOuterAlt(localctx, 6)
                self.state = 250
                self.match(AmberMRParser.ID2O)
                self.state = 251
                self.match(AmberMRParser.Equ_op_BP)
                self.state = 252
                self.match(AmberMRParser.BoolInt)
                self.state = 254
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 253
                    self.match(AmberMRParser.Comma)


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

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

        def shf_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Shf_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Shf_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_shf_statement

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

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




    def shf_statement(self):

        localctx = AmberMRParser.Shf_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_shf_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 261
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 80)) & ~0x3f) == 0 and ((1 << (_la - 80)) & ((1 << (AmberMRParser.NRING - 80)) | (1 << (AmberMRParser.NATR - 80)) | (1 << (AmberMRParser.IATR - 80)) | (1 << (AmberMRParser.NAMR - 80)) | (1 << (AmberMRParser.STR - 80)) | (1 << (AmberMRParser.IPROT - 80)) | (1 << (AmberMRParser.OBS - 80)) | (1 << (AmberMRParser.SHRANG - 80)) | (1 << (AmberMRParser.WT - 80)) | (1 << (AmberMRParser.NPROT - 80)) | (1 << (AmberMRParser.SHCUT - 80)) | (1 << (AmberMRParser.NTER - 80)) | (1 << (AmberMRParser.CTER - 80)))) != 0):
                self.state = 258
                self.shf_factor()
                self.state = 263
                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 Shf_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def NRING(self):
            return self.getToken(AmberMRParser.NRING, 0)

        def NPROT(self):
            return self.getToken(AmberMRParser.NPROT, 0)

        def NTER(self):
            return self.getToken(AmberMRParser.NTER, 0)

        def CTER(self):
            return self.getToken(AmberMRParser.CTER, 0)

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def L_paren_IP(self):
            return self.getToken(AmberMRParser.L_paren_IP, 0)

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

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def NATR(self):
            return self.getToken(AmberMRParser.NATR, 0)

        def IPROT(self):
            return self.getToken(AmberMRParser.IPROT, 0)

        def IATR(self):
            return self.getToken(AmberMRParser.IATR, 0)

        def Comma_A(self):
            return self.getToken(AmberMRParser.Comma_A, 0)

        def OBS(self):
            return self.getToken(AmberMRParser.OBS, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def L_paren_RA(self):
            return self.getToken(AmberMRParser.L_paren_RA, 0)

        def Equ_op_RA(self):
            return self.getToken(AmberMRParser.Equ_op_RA, 0)

        def STR(self):
            return self.getToken(AmberMRParser.STR, 0)

        def SHRANG(self):
            return self.getToken(AmberMRParser.SHRANG, 0)

        def WT(self):
            return self.getToken(AmberMRParser.WT, 0)

        def Reals(self):
            return self.getToken(AmberMRParser.Reals, 0)

        def MultiplicativeReal(self):
            return self.getToken(AmberMRParser.MultiplicativeReal, 0)

        def Comma_RA(self):
            return self.getToken(AmberMRParser.Comma_RA, 0)

        def End_RA(self):
            return self.getToken(AmberMRParser.End_RA, 0)

        def NAMR(self):
            return self.getToken(AmberMRParser.NAMR, 0)

        def L_paren_QP(self):
            return self.getToken(AmberMRParser.L_paren_QP, 0)

        def Equ_op_QP(self):
            return self.getToken(AmberMRParser.Equ_op_QP, 0)

        def Qstring(self):
            return self.getToken(AmberMRParser.Qstring, 0)

        def SHCUT(self):
            return self.getToken(AmberMRParser.SHCUT, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_shf_factor

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

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




    def shf_factor(self):

        localctx = AmberMRParser.Shf_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_shf_factor)
        self._la = 0 # Token type
        try:
            self.state = 321
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AmberMRParser.NRING, AmberMRParser.NPROT, AmberMRParser.NTER, AmberMRParser.CTER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 264
                _la = self._input.LA(1)
                if not(((((_la - 80)) & ~0x3f) == 0 and ((1 << (_la - 80)) & ((1 << (AmberMRParser.NRING - 80)) | (1 << (AmberMRParser.NPROT - 80)) | (1 << (AmberMRParser.NTER - 80)) | (1 << (AmberMRParser.CTER - 80)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 265
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 266
                self.match(AmberMRParser.Integer)
                self.state = 268
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 267
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.NATR, AmberMRParser.IPROT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 270
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.NATR or _la==AmberMRParser.IPROT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 271
                self.match(AmberMRParser.L_paren_IP)
                self.state = 272
                self.match(AmberMRParser.Decimal)
                self.state = 273
                self.match(AmberMRParser.R_paren_A)
                self.state = 274
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 275
                self.match(AmberMRParser.Integer)
                self.state = 277
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 276
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.IATR]:
                self.enterOuterAlt(localctx, 3)
                self.state = 279
                self.match(AmberMRParser.IATR)
                self.state = 280
                self.match(AmberMRParser.L_paren_IP)
                self.state = 281
                self.match(AmberMRParser.Decimal)
                self.state = 282
                self.match(AmberMRParser.Comma_A)
                self.state = 283
                self.match(AmberMRParser.Decimal)
                self.state = 284
                self.match(AmberMRParser.R_paren_A)
                self.state = 285
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 286
                self.match(AmberMRParser.Integer)
                self.state = 288
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 287
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.OBS]:
                self.enterOuterAlt(localctx, 4)
                self.state = 290
                self.match(AmberMRParser.OBS)
                self.state = 291
                self.match(AmberMRParser.L_paren_RP)
                self.state = 292
                self.match(AmberMRParser.Decimal)
                self.state = 293
                self.match(AmberMRParser.R_paren_A)
                self.state = 294
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 295
                self.match(AmberMRParser.Real)
                self.state = 297
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 296
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.STR, AmberMRParser.SHRANG, AmberMRParser.WT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 299
                _la = self._input.LA(1)
                if not(((((_la - 84)) & ~0x3f) == 0 and ((1 << (_la - 84)) & ((1 << (AmberMRParser.STR - 84)) | (1 << (AmberMRParser.SHRANG - 84)) | (1 << (AmberMRParser.WT - 84)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 300
                self.match(AmberMRParser.L_paren_RA)
                self.state = 301
                self.match(AmberMRParser.Decimal)
                self.state = 302
                self.match(AmberMRParser.R_paren_A)
                self.state = 303
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 304
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Reals or _la==AmberMRParser.MultiplicativeReal):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 305
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [AmberMRParser.NAMR]:
                self.enterOuterAlt(localctx, 6)
                self.state = 306
                self.match(AmberMRParser.NAMR)
                self.state = 307
                self.match(AmberMRParser.L_paren_QP)
                self.state = 308
                self.match(AmberMRParser.Decimal)
                self.state = 309
                self.match(AmberMRParser.R_paren_A)
                self.state = 310
                self.match(AmberMRParser.Equ_op_QP)
                self.state = 311
                self.match(AmberMRParser.Qstring)
                self.state = 313
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 312
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.SHCUT]:
                self.enterOuterAlt(localctx, 7)
                self.state = 315
                self.match(AmberMRParser.SHCUT)
                self.state = 316
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 317
                self.match(AmberMRParser.Real)
                self.state = 319
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 318
                    self.match(AmberMRParser.Comma)


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

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

        def pcshf_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Pcshf_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Pcshf_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_pcshf_statement

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

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




    def pcshf_statement(self):

        localctx = AmberMRParser.Pcshf_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_pcshf_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 85)) & ~0x3f) == 0 and ((1 << (_la - 85)) & ((1 << (AmberMRParser.IPROT - 85)) | (1 << (AmberMRParser.OBS - 85)) | (1 << (AmberMRParser.WT - 85)) | (1 << (AmberMRParser.NPROT - 85)) | (1 << (AmberMRParser.NME - 85)) | (1 << (AmberMRParser.NMPMC - 85)) | (1 << (AmberMRParser.OPTPHI - 85)) | (1 << (AmberMRParser.OPTTET - 85)) | (1 << (AmberMRParser.OPTOMG - 85)) | (1 << (AmberMRParser.OPTA1 - 85)) | (1 << (AmberMRParser.OPTA2 - 85)) | (1 << (AmberMRParser.OPTKON - 85)) | (1 << (AmberMRParser.TOLPRO - 85)) | (1 << (AmberMRParser.MLTPRO - 85)))) != 0):
                self.state = 323
                self.pcshf_factor()
                self.state = 328
                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 Pcshf_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def NPROT(self):
            return self.getToken(AmberMRParser.NPROT, 0)

        def NME(self):
            return self.getToken(AmberMRParser.NME, 0)

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def NMPMC(self):
            return self.getToken(AmberMRParser.NMPMC, 0)

        def Equ_op_QP(self):
            return self.getToken(AmberMRParser.Equ_op_QP, 0)

        def Qstring(self):
            return self.getToken(AmberMRParser.Qstring, 0)

        def L_paren_IP(self):
            return self.getToken(AmberMRParser.L_paren_IP, 0)

        def Decimal(self):
            return self.getToken(AmberMRParser.Decimal, 0)

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def IPROT(self):
            return self.getToken(AmberMRParser.IPROT, 0)

        def MLTPRO(self):
            return self.getToken(AmberMRParser.MLTPRO, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def OPTPHI(self):
            return self.getToken(AmberMRParser.OPTPHI, 0)

        def OPTTET(self):
            return self.getToken(AmberMRParser.OPTTET, 0)

        def OPTOMG(self):
            return self.getToken(AmberMRParser.OPTOMG, 0)

        def OPTA1(self):
            return self.getToken(AmberMRParser.OPTA1, 0)

        def OPTA2(self):
            return self.getToken(AmberMRParser.OPTA2, 0)

        def OBS(self):
            return self.getToken(AmberMRParser.OBS, 0)

        def L_paren_RA(self):
            return self.getToken(AmberMRParser.L_paren_RA, 0)

        def Equ_op_RA(self):
            return self.getToken(AmberMRParser.Equ_op_RA, 0)

        def WT(self):
            return self.getToken(AmberMRParser.WT, 0)

        def TOLPRO(self):
            return self.getToken(AmberMRParser.TOLPRO, 0)

        def Reals(self):
            return self.getToken(AmberMRParser.Reals, 0)

        def MultiplicativeReal(self):
            return self.getToken(AmberMRParser.MultiplicativeReal, 0)

        def Comma_RA(self):
            return self.getToken(AmberMRParser.Comma_RA, 0)

        def End_RA(self):
            return self.getToken(AmberMRParser.End_RA, 0)

        def OPTKON(self):
            return self.getToken(AmberMRParser.OPTKON, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_pcshf_factor

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

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




    def pcshf_factor(self):

        localctx = AmberMRParser.Pcshf_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_pcshf_factor)
        self._la = 0 # Token type
        try:
            self.state = 372
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AmberMRParser.NPROT, AmberMRParser.NME]:
                self.enterOuterAlt(localctx, 1)
                self.state = 329
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.NPROT or _la==AmberMRParser.NME):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 330
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 331
                self.match(AmberMRParser.Integer)
                self.state = 333
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 332
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.NMPMC]:
                self.enterOuterAlt(localctx, 2)
                self.state = 335
                self.match(AmberMRParser.NMPMC)
                self.state = 336
                self.match(AmberMRParser.Equ_op_QP)
                self.state = 337
                self.match(AmberMRParser.Qstring)
                self.state = 339
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 338
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.IPROT, AmberMRParser.MLTPRO]:
                self.enterOuterAlt(localctx, 3)
                self.state = 341
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.IPROT or _la==AmberMRParser.MLTPRO):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 342
                self.match(AmberMRParser.L_paren_IP)
                self.state = 343
                self.match(AmberMRParser.Decimal)
                self.state = 344
                self.match(AmberMRParser.R_paren_A)
                self.state = 345
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 346
                self.match(AmberMRParser.Integer)
                self.state = 348
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 347
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.OBS, AmberMRParser.OPTPHI, AmberMRParser.OPTTET, AmberMRParser.OPTOMG, AmberMRParser.OPTA1, AmberMRParser.OPTA2]:
                self.enterOuterAlt(localctx, 4)
                self.state = 350
                _la = self._input.LA(1)
                if not(((((_la - 86)) & ~0x3f) == 0 and ((1 << (_la - 86)) & ((1 << (AmberMRParser.OBS - 86)) | (1 << (AmberMRParser.OPTPHI - 86)) | (1 << (AmberMRParser.OPTTET - 86)) | (1 << (AmberMRParser.OPTOMG - 86)) | (1 << (AmberMRParser.OPTA1 - 86)) | (1 << (AmberMRParser.OPTA2 - 86)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 351
                self.match(AmberMRParser.L_paren_RP)
                self.state = 352
                self.match(AmberMRParser.Decimal)
                self.state = 353
                self.match(AmberMRParser.R_paren_A)
                self.state = 354
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 355
                self.match(AmberMRParser.Real)
                self.state = 357
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 356
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.WT, AmberMRParser.TOLPRO]:
                self.enterOuterAlt(localctx, 5)
                self.state = 359
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.WT or _la==AmberMRParser.TOLPRO):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 360
                self.match(AmberMRParser.L_paren_RA)
                self.state = 361
                self.match(AmberMRParser.Decimal)
                self.state = 362
                self.match(AmberMRParser.R_paren_A)
                self.state = 363
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 364
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Reals or _la==AmberMRParser.MultiplicativeReal):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 365
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [AmberMRParser.OPTKON]:
                self.enterOuterAlt(localctx, 6)
                self.state = 366
                self.match(AmberMRParser.OPTKON)
                self.state = 367
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 368
                self.match(AmberMRParser.Real)
                self.state = 370
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 369
                    self.match(AmberMRParser.Comma)


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

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

        def align_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Align_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Align_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_align_statement

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

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




    def align_statement(self):

        localctx = AmberMRParser.Align_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_align_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 377
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 105)) & ~0x3f) == 0 and ((1 << (_la - 105)) & ((1 << (AmberMRParser.NDIP - 105)) | (1 << (AmberMRParser.ID - 105)) | (1 << (AmberMRParser.JD - 105)) | (1 << (AmberMRParser.DOBSL - 105)) | (1 << (AmberMRParser.DOBSU - 105)) | (1 << (AmberMRParser.DWT - 105)) | (1 << (AmberMRParser.DATASET - 105)) | (1 << (AmberMRParser.NUM_DATASETS - 105)) | (1 << (AmberMRParser.S11 - 105)) | (1 << (AmberMRParser.S12 - 105)) | (1 << (AmberMRParser.S13 - 105)) | (1 << (AmberMRParser.S22 - 105)) | (1 << (AmberMRParser.S23 - 105)) | (1 << (AmberMRParser.GIGJ - 105)) | (1 << (AmberMRParser.DIJ - 105)) | (1 << (AmberMRParser.DCUT - 105)) | (1 << (AmberMRParser.FREEZEMOL - 105)))) != 0):
                self.state = 374
                self.align_factor()
                self.state = 379
                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 Align_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def NDIP(self):
            return self.getToken(AmberMRParser.NDIP, 0)

        def DATASET(self):
            return self.getToken(AmberMRParser.DATASET, 0)

        def NUM_DATASETS(self):
            return self.getToken(AmberMRParser.NUM_DATASETS, 0)

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def L_paren_IP(self):
            return self.getToken(AmberMRParser.L_paren_IP, 0)

        def Decimal(self):
            return self.getToken(AmberMRParser.Decimal, 0)

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def ID(self):
            return self.getToken(AmberMRParser.ID, 0)

        def JD(self):
            return self.getToken(AmberMRParser.JD, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def DOBSL(self):
            return self.getToken(AmberMRParser.DOBSL, 0)

        def DOBSU(self):
            return self.getToken(AmberMRParser.DOBSU, 0)

        def L_paren_RA(self):
            return self.getToken(AmberMRParser.L_paren_RA, 0)

        def Equ_op_RA(self):
            return self.getToken(AmberMRParser.Equ_op_RA, 0)

        def Reals(self):
            return self.getToken(AmberMRParser.Reals, 0)

        def DWT(self):
            return self.getToken(AmberMRParser.DWT, 0)

        def GIGJ(self):
            return self.getToken(AmberMRParser.GIGJ, 0)

        def DIJ(self):
            return self.getToken(AmberMRParser.DIJ, 0)

        def Comma_RA(self):
            return self.getToken(AmberMRParser.Comma_RA, 0)

        def End_RA(self):
            return self.getToken(AmberMRParser.End_RA, 0)

        def MultiplicativeReal(self):
            return self.getToken(AmberMRParser.MultiplicativeReal, 0)

        def S11(self):
            return self.getToken(AmberMRParser.S11, 0)

        def S12(self):
            return self.getToken(AmberMRParser.S12, 0)

        def S13(self):
            return self.getToken(AmberMRParser.S13, 0)

        def S22(self):
            return self.getToken(AmberMRParser.S22, 0)

        def S23(self):
            return self.getToken(AmberMRParser.S23, 0)

        def DCUT(self):
            return self.getToken(AmberMRParser.DCUT, 0)

        def FREEZEMOL(self):
            return self.getToken(AmberMRParser.FREEZEMOL, 0)

        def Equ_op(self):
            return self.getToken(AmberMRParser.Equ_op, 0)

        def Logical(self):
            return self.getToken(AmberMRParser.Logical, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_align_factor

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

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




    def align_factor(self):

        localctx = AmberMRParser.Align_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_align_factor)
        self._la = 0 # Token type
        try:
            self.state = 431
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,47,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 380
                _la = self._input.LA(1)
                if not(((((_la - 105)) & ~0x3f) == 0 and ((1 << (_la - 105)) & ((1 << (AmberMRParser.NDIP - 105)) | (1 << (AmberMRParser.DATASET - 105)) | (1 << (AmberMRParser.NUM_DATASETS - 105)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 381
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 382
                self.match(AmberMRParser.Integer)
                self.state = 384
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 383
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 386
                _la = self._input.LA(1)
                if not(((((_la - 106)) & ~0x3f) == 0 and ((1 << (_la - 106)) & ((1 << (AmberMRParser.ID - 106)) | (1 << (AmberMRParser.JD - 106)) | (1 << (AmberMRParser.DATASET - 106)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 387
                self.match(AmberMRParser.L_paren_IP)
                self.state = 388
                self.match(AmberMRParser.Decimal)
                self.state = 389
                self.match(AmberMRParser.R_paren_A)
                self.state = 390
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 391
                self.match(AmberMRParser.Integer)
                self.state = 393
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 392
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 395
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.DOBSL or _la==AmberMRParser.DOBSU):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 396
                self.match(AmberMRParser.L_paren_RP)
                self.state = 397
                self.match(AmberMRParser.Decimal)
                self.state = 398
                self.match(AmberMRParser.R_paren_A)
                self.state = 399
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 400
                self.match(AmberMRParser.Real)
                self.state = 402
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 401
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 404
                _la = self._input.LA(1)
                if not(((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & ((1 << (AmberMRParser.DWT - 110)) | (1 << (AmberMRParser.GIGJ - 110)) | (1 << (AmberMRParser.DIJ - 110)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 405
                self.match(AmberMRParser.L_paren_RA)
                self.state = 406
                self.match(AmberMRParser.Decimal)
                self.state = 407
                self.match(AmberMRParser.R_paren_A)
                self.state = 408
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 409
                self.match(AmberMRParser.Reals)
                self.state = 410
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 411
                _la = self._input.LA(1)
                if not(((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & ((1 << (AmberMRParser.DWT - 110)) | (1 << (AmberMRParser.GIGJ - 110)) | (1 << (AmberMRParser.DIJ - 110)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 412
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 413
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Reals or _la==AmberMRParser.MultiplicativeReal):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 414
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 415
                _la = self._input.LA(1)
                if not(((((_la - 113)) & ~0x3f) == 0 and ((1 << (_la - 113)) & ((1 << (AmberMRParser.S11 - 113)) | (1 << (AmberMRParser.S12 - 113)) | (1 << (AmberMRParser.S13 - 113)) | (1 << (AmberMRParser.S22 - 113)) | (1 << (AmberMRParser.S23 - 113)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 416
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 417
                self.match(AmberMRParser.Reals)
                self.state = 418
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 419
                self.match(AmberMRParser.DCUT)
                self.state = 420
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 421
                self.match(AmberMRParser.Real)
                self.state = 423
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 422
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 425
                self.match(AmberMRParser.FREEZEMOL)
                self.state = 426
                self.match(AmberMRParser.Equ_op)
                self.state = 427
                self.match(AmberMRParser.Logical)
                self.state = 429
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 428
                    self.match(AmberMRParser.Comma)


                pass


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


    class Csa_statementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def csa_factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Csa_factorContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Csa_factorContext,i)


        def getRuleIndex(self):
            return AmberMRParser.RULE_csa_statement

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

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




    def csa_statement(self):

        localctx = AmberMRParser.Csa_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_csa_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 436
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 123)) & ~0x3f) == 0 and ((1 << (_la - 123)) & ((1 << (AmberMRParser.NCSA - 123)) | (1 << (AmberMRParser.ICSA - 123)) | (1 << (AmberMRParser.JCSA - 123)) | (1 << (AmberMRParser.KCSA - 123)) | (1 << (AmberMRParser.COBSL - 123)) | (1 << (AmberMRParser.COBSU - 123)) | (1 << (AmberMRParser.CWT - 123)) | (1 << (AmberMRParser.DATASETC - 123)) | (1 << (AmberMRParser.FIELD - 123)) | (1 << (AmberMRParser.SIGMA11 - 123)) | (1 << (AmberMRParser.SIGMA12 - 123)) | (1 << (AmberMRParser.SIGMA13 - 123)) | (1 << (AmberMRParser.SIGMA22 - 123)) | (1 << (AmberMRParser.SIGMA23 - 123)) | (1 << (AmberMRParser.CCUT - 123)))) != 0):
                self.state = 433
                self.csa_factor()
                self.state = 438
                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 Csa_factorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Equ_op_IP(self):
            return self.getToken(AmberMRParser.Equ_op_IP, 0)

        def Integer(self):
            return self.getToken(AmberMRParser.Integer, 0)

        def NCSA(self):
            return self.getToken(AmberMRParser.NCSA, 0)

        def DATASETC(self):
            return self.getToken(AmberMRParser.DATASETC, 0)

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 0)

        def L_paren_IP(self):
            return self.getToken(AmberMRParser.L_paren_IP, 0)

        def Decimal(self):
            return self.getToken(AmberMRParser.Decimal, 0)

        def R_paren_A(self):
            return self.getToken(AmberMRParser.R_paren_A, 0)

        def ICSA(self):
            return self.getToken(AmberMRParser.ICSA, 0)

        def JCSA(self):
            return self.getToken(AmberMRParser.JCSA, 0)

        def KCSA(self):
            return self.getToken(AmberMRParser.KCSA, 0)

        def L_paren_RP(self):
            return self.getToken(AmberMRParser.L_paren_RP, 0)

        def Equ_op_RP(self):
            return self.getToken(AmberMRParser.Equ_op_RP, 0)

        def Real(self):
            return self.getToken(AmberMRParser.Real, 0)

        def COBSL(self):
            return self.getToken(AmberMRParser.COBSL, 0)

        def COBSU(self):
            return self.getToken(AmberMRParser.COBSU, 0)

        def CWT(self):
            return self.getToken(AmberMRParser.CWT, 0)

        def Equ_op_RA(self):
            return self.getToken(AmberMRParser.Equ_op_RA, 0)

        def Reals(self):
            return self.getToken(AmberMRParser.Reals, 0)

        def MultiplicativeReal(self):
            return self.getToken(AmberMRParser.MultiplicativeReal, 0)

        def Comma_RA(self):
            return self.getToken(AmberMRParser.Comma_RA, 0)

        def End_RA(self):
            return self.getToken(AmberMRParser.End_RA, 0)

        def SIGMA11(self):
            return self.getToken(AmberMRParser.SIGMA11, 0)

        def SIGMA12(self):
            return self.getToken(AmberMRParser.SIGMA12, 0)

        def SIGMA13(self):
            return self.getToken(AmberMRParser.SIGMA13, 0)

        def SIGMA22(self):
            return self.getToken(AmberMRParser.SIGMA22, 0)

        def SIGMA23(self):
            return self.getToken(AmberMRParser.SIGMA23, 0)

        def FIELD(self):
            return self.getToken(AmberMRParser.FIELD, 0)

        def CCUT(self):
            return self.getToken(AmberMRParser.CCUT, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_csa_factor

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

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




    def csa_factor(self):

        localctx = AmberMRParser.Csa_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_csa_factor)
        self._la = 0 # Token type
        try:
            self.state = 473
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AmberMRParser.NCSA, AmberMRParser.DATASETC]:
                self.enterOuterAlt(localctx, 1)
                self.state = 439
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.NCSA or _la==AmberMRParser.DATASETC):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 440
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 441
                self.match(AmberMRParser.Integer)
                self.state = 443
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 442
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.ICSA, AmberMRParser.JCSA, AmberMRParser.KCSA]:
                self.enterOuterAlt(localctx, 2)
                self.state = 445
                _la = self._input.LA(1)
                if not(((((_la - 124)) & ~0x3f) == 0 and ((1 << (_la - 124)) & ((1 << (AmberMRParser.ICSA - 124)) | (1 << (AmberMRParser.JCSA - 124)) | (1 << (AmberMRParser.KCSA - 124)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 446
                self.match(AmberMRParser.L_paren_IP)
                self.state = 447
                self.match(AmberMRParser.Decimal)
                self.state = 448
                self.match(AmberMRParser.R_paren_A)
                self.state = 449
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 450
                self.match(AmberMRParser.Integer)
                self.state = 452
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 451
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.COBSL, AmberMRParser.COBSU]:
                self.enterOuterAlt(localctx, 3)
                self.state = 454
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.COBSL or _la==AmberMRParser.COBSU):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 455
                self.match(AmberMRParser.L_paren_RP)
                self.state = 456
                self.match(AmberMRParser.Decimal)
                self.state = 457
                self.match(AmberMRParser.R_paren_A)
                self.state = 458
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 459
                self.match(AmberMRParser.Real)
                self.state = 461
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 460
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [AmberMRParser.CWT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 463
                self.match(AmberMRParser.CWT)
                self.state = 464
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 465
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Reals or _la==AmberMRParser.MultiplicativeReal):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 466
                _la = self._input.LA(1)
                if not(_la==AmberMRParser.Comma_RA or _la==AmberMRParser.End_RA):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [AmberMRParser.FIELD, AmberMRParser.SIGMA11, AmberMRParser.SIGMA12, AmberMRParser.SIGMA13, AmberMRParser.SIGMA22, AmberMRParser.SIGMA23, AmberMRParser.CCUT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 467
                _la = self._input.LA(1)
                if not(((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & ((1 << (AmberMRParser.FIELD - 131)) | (1 << (AmberMRParser.SIGMA11 - 131)) | (1 << (AmberMRParser.SIGMA12 - 131)) | (1 << (AmberMRParser.SIGMA13 - 131)) | (1 << (AmberMRParser.SIGMA22 - 131)) | (1 << (AmberMRParser.SIGMA23 - 131)) | (1 << (AmberMRParser.CCUT - 131)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 468
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 469
                self.match(AmberMRParser.Real)
                self.state = 471
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma:
                    self.state = 470
                    self.match(AmberMRParser.Comma)


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

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

        def DISTANCE_F(self):
            return self.getToken(AmberMRParser.DISTANCE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_func_exprContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

        def Comma_F(self):
            return self.getToken(AmberMRParser.Comma_F, 0)

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_distance_rst_func_call

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

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




    def distance_rst_func_call(self):

        localctx = AmberMRParser.Distance_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_distance_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 502
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,57,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 475
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 476
                self.match(AmberMRParser.L_paren_F)
                self.state = 477
                self.restraint_func_expr()
                self.state = 479
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 478
                    self.match(AmberMRParser.Comma_F)


                self.state = 481
                self.restraint_func_expr()
                self.state = 482
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 484
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 485
                self.match(AmberMRParser.L_brace_F)
                self.state = 486
                self.restraint_func_expr()
                self.state = 488
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 487
                    self.match(AmberMRParser.Comma_F)


                self.state = 490
                self.restraint_func_expr()
                self.state = 491
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 493
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 494
                self.match(AmberMRParser.L_brakt_F)
                self.state = 495
                self.restraint_func_expr()
                self.state = 497
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 496
                    self.match(AmberMRParser.Comma_F)


                self.state = 499
                self.restraint_func_expr()
                self.state = 500
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Angle_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ANGLE_F(self):
            return self.getToken(AmberMRParser.ANGLE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_func_exprContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_angle_rst_func_call

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

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




    def angle_rst_func_call(self):

        localctx = AmberMRParser.Angle_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_angle_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 543
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 504
                self.match(AmberMRParser.ANGLE_F)
                self.state = 505
                self.match(AmberMRParser.L_paren_F)
                self.state = 506
                self.restraint_func_expr()
                self.state = 508
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 507
                    self.match(AmberMRParser.Comma_F)


                self.state = 510
                self.restraint_func_expr()
                self.state = 512
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 511
                    self.match(AmberMRParser.Comma_F)


                self.state = 514
                self.restraint_func_expr()
                self.state = 515
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 517
                self.match(AmberMRParser.ANGLE_F)
                self.state = 518
                self.match(AmberMRParser.L_brace_F)
                self.state = 519
                self.restraint_func_expr()
                self.state = 521
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 520
                    self.match(AmberMRParser.Comma_F)


                self.state = 523
                self.restraint_func_expr()
                self.state = 525
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 524
                    self.match(AmberMRParser.Comma_F)


                self.state = 527
                self.restraint_func_expr()
                self.state = 528
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 530
                self.match(AmberMRParser.ANGLE_F)
                self.state = 531
                self.match(AmberMRParser.L_brakt_F)
                self.state = 532
                self.restraint_func_expr()
                self.state = 534
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 533
                    self.match(AmberMRParser.Comma_F)


                self.state = 536
                self.restraint_func_expr()
                self.state = 538
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 537
                    self.match(AmberMRParser.Comma_F)


                self.state = 540
                self.restraint_func_expr()
                self.state = 541
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Plane_point_angle_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ANGLE_F(self):
            return self.getToken(AmberMRParser.ANGLE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self):
            return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,0)


        def plane_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Plane_rst_func_callContext,0)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

        def Comma_F(self):
            return self.getToken(AmberMRParser.Comma_F, 0)

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_plane_point_angle_rst_func_call

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

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




    def plane_point_angle_rst_func_call(self):

        localctx = AmberMRParser.Plane_point_angle_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_plane_point_angle_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 599
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,71,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 545
                self.match(AmberMRParser.ANGLE_F)
                self.state = 546
                self.match(AmberMRParser.L_paren_F)
                self.state = 547
                self.restraint_func_expr()
                self.state = 549
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 548
                    self.match(AmberMRParser.Comma_F)


                self.state = 551
                self.plane_rst_func_call()
                self.state = 552
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 554
                self.match(AmberMRParser.ANGLE_F)
                self.state = 555
                self.match(AmberMRParser.L_brace_F)
                self.state = 556
                self.restraint_func_expr()
                self.state = 558
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 557
                    self.match(AmberMRParser.Comma_F)


                self.state = 560
                self.plane_rst_func_call()
                self.state = 561
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 563
                self.match(AmberMRParser.ANGLE_F)
                self.state = 564
                self.match(AmberMRParser.L_brakt_F)
                self.state = 565
                self.restraint_func_expr()
                self.state = 567
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 566
                    self.match(AmberMRParser.Comma_F)


                self.state = 569
                self.plane_rst_func_call()
                self.state = 570
                self.match(AmberMRParser.R_brakt_F)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 572
                self.match(AmberMRParser.ANGLE_F)
                self.state = 573
                self.match(AmberMRParser.L_paren_F)
                self.state = 574
                self.plane_rst_func_call()
                self.state = 576
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 575
                    self.match(AmberMRParser.Comma_F)


                self.state = 578
                self.restraint_func_expr()
                self.state = 579
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 581
                self.match(AmberMRParser.ANGLE_F)
                self.state = 582
                self.match(AmberMRParser.L_brace_F)
                self.state = 583
                self.plane_rst_func_call()
                self.state = 585
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 584
                    self.match(AmberMRParser.Comma_F)


                self.state = 587
                self.restraint_func_expr()
                self.state = 588
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 590
                self.match(AmberMRParser.ANGLE_F)
                self.state = 591
                self.match(AmberMRParser.L_brakt_F)
                self.state = 592
                self.plane_rst_func_call()
                self.state = 594
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 593
                    self.match(AmberMRParser.Comma_F)


                self.state = 596
                self.restraint_func_expr()
                self.state = 597
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Plane_plane_angle_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ANGLE_F(self):
            return self.getToken(AmberMRParser.ANGLE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def plane_rst_func_call(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Plane_rst_func_callContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Plane_rst_func_callContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

        def Comma_F(self):
            return self.getToken(AmberMRParser.Comma_F, 0)

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_plane_plane_angle_rst_func_call

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

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




    def plane_plane_angle_rst_func_call(self):

        localctx = AmberMRParser.Plane_plane_angle_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_plane_plane_angle_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 628
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 601
                self.match(AmberMRParser.ANGLE_F)
                self.state = 602
                self.match(AmberMRParser.L_paren_F)
                self.state = 603
                self.plane_rst_func_call()
                self.state = 605
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 604
                    self.match(AmberMRParser.Comma_F)


                self.state = 607
                self.plane_rst_func_call()
                self.state = 608
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 610
                self.match(AmberMRParser.ANGLE_F)
                self.state = 611
                self.match(AmberMRParser.L_brace_F)
                self.state = 612
                self.plane_rst_func_call()
                self.state = 614
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 613
                    self.match(AmberMRParser.Comma_F)


                self.state = 616
                self.plane_rst_func_call()
                self.state = 617
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 619
                self.match(AmberMRParser.ANGLE_F)
                self.state = 620
                self.match(AmberMRParser.L_brakt_F)
                self.state = 621
                self.plane_rst_func_call()
                self.state = 623
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 622
                    self.match(AmberMRParser.Comma_F)


                self.state = 625
                self.plane_rst_func_call()
                self.state = 626
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Torsion_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def TORSION_F(self):
            return self.getToken(AmberMRParser.TORSION_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_func_exprContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_torsion_rst_func_call

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

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




    def torsion_rst_func_call(self):

        localctx = AmberMRParser.Torsion_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_torsion_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 681
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,85,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 630
                self.match(AmberMRParser.TORSION_F)
                self.state = 631
                self.match(AmberMRParser.L_paren_F)
                self.state = 632
                self.restraint_func_expr()
                self.state = 634
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 633
                    self.match(AmberMRParser.Comma_F)


                self.state = 636
                self.restraint_func_expr()
                self.state = 638
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 637
                    self.match(AmberMRParser.Comma_F)


                self.state = 640
                self.restraint_func_expr()
                self.state = 642
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 641
                    self.match(AmberMRParser.Comma_F)


                self.state = 644
                self.restraint_func_expr()
                self.state = 645
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 647
                self.match(AmberMRParser.TORSION_F)
                self.state = 648
                self.match(AmberMRParser.L_brace_F)
                self.state = 649
                self.restraint_func_expr()
                self.state = 651
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 650
                    self.match(AmberMRParser.Comma_F)


                self.state = 653
                self.restraint_func_expr()
                self.state = 655
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 654
                    self.match(AmberMRParser.Comma_F)


                self.state = 657
                self.restraint_func_expr()
                self.state = 659
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 658
                    self.match(AmberMRParser.Comma_F)


                self.state = 661
                self.restraint_func_expr()
                self.state = 662
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 664
                self.match(AmberMRParser.TORSION_F)
                self.state = 665
                self.match(AmberMRParser.L_brakt_F)
                self.state = 666
                self.restraint_func_expr()
                self.state = 668
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 667
                    self.match(AmberMRParser.Comma_F)


                self.state = 670
                self.restraint_func_expr()
                self.state = 672
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 671
                    self.match(AmberMRParser.Comma_F)


                self.state = 674
                self.restraint_func_expr()
                self.state = 676
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 675
                    self.match(AmberMRParser.Comma_F)


                self.state = 678
                self.restraint_func_expr()
                self.state = 679
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Coordinate2_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COORDINATE_F(self):
            return self.getToken(AmberMRParser.COORDINATE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def distance_rst_func_call(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Distance_rst_func_callContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Distance_rst_func_callContext,i)


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

        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_coordinate2_rst_func_call

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

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




    def coordinate2_rst_func_call(self):

        localctx = AmberMRParser.Coordinate2_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_coordinate2_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 734
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,95,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 683
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 684
                self.match(AmberMRParser.L_paren_F)
                self.state = 685
                self.distance_rst_func_call()
                self.state = 687
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 686
                    self.match(AmberMRParser.Comma_F)


                self.state = 689
                self.match(AmberMRParser.Real_F)
                self.state = 691
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 690
                    self.match(AmberMRParser.Comma_F)


                self.state = 693
                self.distance_rst_func_call()
                self.state = 695
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 694
                    self.match(AmberMRParser.Comma_F)


                self.state = 697
                self.match(AmberMRParser.Real_F)
                self.state = 698
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 700
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 701
                self.match(AmberMRParser.L_brace_F)
                self.state = 702
                self.distance_rst_func_call()
                self.state = 704
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 703
                    self.match(AmberMRParser.Comma_F)


                self.state = 706
                self.match(AmberMRParser.Real_F)
                self.state = 708
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 707
                    self.match(AmberMRParser.Comma_F)


                self.state = 710
                self.distance_rst_func_call()
                self.state = 712
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 711
                    self.match(AmberMRParser.Comma_F)


                self.state = 714
                self.match(AmberMRParser.Real_F)
                self.state = 715
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 717
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 718
                self.match(AmberMRParser.L_brakt_F)
                self.state = 719
                self.distance_rst_func_call()
                self.state = 721
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 720
                    self.match(AmberMRParser.Comma_F)


                self.state = 723
                self.match(AmberMRParser.Real_F)
                self.state = 725
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 724
                    self.match(AmberMRParser.Comma_F)


                self.state = 727
                self.distance_rst_func_call()
                self.state = 729
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 728
                    self.match(AmberMRParser.Comma_F)


                self.state = 731
                self.match(AmberMRParser.Real_F)
                self.state = 732
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Coordinate3_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COORDINATE_F(self):
            return self.getToken(AmberMRParser.COORDINATE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def distance_rst_func_call(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Distance_rst_func_callContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Distance_rst_func_callContext,i)


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

        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_coordinate3_rst_func_call

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

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




    def coordinate3_rst_func_call(self):

        localctx = AmberMRParser.Coordinate3_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_coordinate3_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 811
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,111,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 736
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 737
                self.match(AmberMRParser.L_paren_F)
                self.state = 738
                self.distance_rst_func_call()
                self.state = 740
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 739
                    self.match(AmberMRParser.Comma_F)


                self.state = 742
                self.match(AmberMRParser.Real_F)
                self.state = 744
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 743
                    self.match(AmberMRParser.Comma_F)


                self.state = 746
                self.distance_rst_func_call()
                self.state = 748
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 747
                    self.match(AmberMRParser.Comma_F)


                self.state = 750
                self.match(AmberMRParser.Real_F)
                self.state = 752
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 751
                    self.match(AmberMRParser.Comma_F)


                self.state = 754
                self.distance_rst_func_call()
                self.state = 756
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 755
                    self.match(AmberMRParser.Comma_F)


                self.state = 758
                self.match(AmberMRParser.Real_F)
                self.state = 759
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 761
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 762
                self.match(AmberMRParser.L_brace_F)
                self.state = 763
                self.distance_rst_func_call()
                self.state = 765
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 764
                    self.match(AmberMRParser.Comma_F)


                self.state = 767
                self.match(AmberMRParser.Real_F)
                self.state = 769
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 768
                    self.match(AmberMRParser.Comma_F)


                self.state = 771
                self.distance_rst_func_call()
                self.state = 773
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 772
                    self.match(AmberMRParser.Comma_F)


                self.state = 775
                self.match(AmberMRParser.Real_F)
                self.state = 777
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 776
                    self.match(AmberMRParser.Comma_F)


                self.state = 779
                self.distance_rst_func_call()
                self.state = 781
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 780
                    self.match(AmberMRParser.Comma_F)


                self.state = 783
                self.match(AmberMRParser.Real_F)
                self.state = 784
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 786
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 787
                self.match(AmberMRParser.L_brakt_F)
                self.state = 788
                self.distance_rst_func_call()
                self.state = 790
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 789
                    self.match(AmberMRParser.Comma_F)


                self.state = 792
                self.match(AmberMRParser.Real_F)
                self.state = 794
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 793
                    self.match(AmberMRParser.Comma_F)


                self.state = 796
                self.distance_rst_func_call()
                self.state = 798
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 797
                    self.match(AmberMRParser.Comma_F)


                self.state = 800
                self.match(AmberMRParser.Real_F)
                self.state = 802
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 801
                    self.match(AmberMRParser.Comma_F)


                self.state = 804
                self.distance_rst_func_call()
                self.state = 806
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 805
                    self.match(AmberMRParser.Comma_F)


                self.state = 808
                self.match(AmberMRParser.Real_F)
                self.state = 809
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Coordinate4_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COORDINATE_F(self):
            return self.getToken(AmberMRParser.COORDINATE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def distance_rst_func_call(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Distance_rst_func_callContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Distance_rst_func_callContext,i)


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

        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_coordinate4_rst_func_call

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

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




    def coordinate4_rst_func_call(self):

        localctx = AmberMRParser.Coordinate4_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_coordinate4_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 912
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,133,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 813
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 814
                self.match(AmberMRParser.L_paren_F)
                self.state = 815
                self.distance_rst_func_call()
                self.state = 817
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 816
                    self.match(AmberMRParser.Comma_F)


                self.state = 819
                self.match(AmberMRParser.Real_F)
                self.state = 821
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 820
                    self.match(AmberMRParser.Comma_F)


                self.state = 823
                self.distance_rst_func_call()
                self.state = 825
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 824
                    self.match(AmberMRParser.Comma_F)


                self.state = 827
                self.match(AmberMRParser.Real_F)
                self.state = 829
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 828
                    self.match(AmberMRParser.Comma_F)


                self.state = 831
                self.distance_rst_func_call()
                self.state = 833
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 832
                    self.match(AmberMRParser.Comma_F)


                self.state = 835
                self.match(AmberMRParser.Real_F)
                self.state = 837
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 836
                    self.match(AmberMRParser.Comma_F)


                self.state = 839
                self.distance_rst_func_call()
                self.state = 841
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 840
                    self.match(AmberMRParser.Comma_F)


                self.state = 843
                self.match(AmberMRParser.Real_F)
                self.state = 844
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 846
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 847
                self.match(AmberMRParser.L_brace_F)
                self.state = 848
                self.distance_rst_func_call()
                self.state = 850
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 849
                    self.match(AmberMRParser.Comma_F)


                self.state = 852
                self.match(AmberMRParser.Real_F)
                self.state = 854
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 853
                    self.match(AmberMRParser.Comma_F)


                self.state = 856
                self.distance_rst_func_call()
                self.state = 858
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 857
                    self.match(AmberMRParser.Comma_F)


                self.state = 860
                self.match(AmberMRParser.Real_F)
                self.state = 862
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 861
                    self.match(AmberMRParser.Comma_F)


                self.state = 864
                self.distance_rst_func_call()
                self.state = 866
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 865
                    self.match(AmberMRParser.Comma_F)


                self.state = 868
                self.match(AmberMRParser.Real_F)
                self.state = 870
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 869
                    self.match(AmberMRParser.Comma_F)


                self.state = 872
                self.distance_rst_func_call()
                self.state = 874
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 873
                    self.match(AmberMRParser.Comma_F)


                self.state = 876
                self.match(AmberMRParser.Real_F)
                self.state = 877
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 879
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 880
                self.match(AmberMRParser.L_brakt_F)
                self.state = 881
                self.distance_rst_func_call()
                self.state = 883
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 882
                    self.match(AmberMRParser.Comma_F)


                self.state = 885
                self.match(AmberMRParser.Real_F)
                self.state = 887
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 886
                    self.match(AmberMRParser.Comma_F)


                self.state = 889
                self.distance_rst_func_call()
                self.state = 891
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 890
                    self.match(AmberMRParser.Comma_F)


                self.state = 893
                self.match(AmberMRParser.Real_F)
                self.state = 895
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 894
                    self.match(AmberMRParser.Comma_F)


                self.state = 897
                self.distance_rst_func_call()
                self.state = 899
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 898
                    self.match(AmberMRParser.Comma_F)


                self.state = 901
                self.match(AmberMRParser.Real_F)
                self.state = 903
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 902
                    self.match(AmberMRParser.Comma_F)


                self.state = 905
                self.distance_rst_func_call()
                self.state = 907
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 906
                    self.match(AmberMRParser.Comma_F)


                self.state = 909
                self.match(AmberMRParser.Real_F)
                self.state = 910
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Restraint_func_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Integer_F(self):
            return self.getToken(AmberMRParser.Integer_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def Ambmask_F(self):
            return self.getToken(AmberMRParser.Ambmask_F, 0)

        def com_rst_func_call(self):
            return self.getTypedRuleContext(AmberMRParser.Com_rst_func_callContext,0)


        def getRuleIndex(self):
            return AmberMRParser.RULE_restraint_func_expr

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

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




    def restraint_func_expr(self):

        localctx = AmberMRParser.Restraint_func_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_restraint_func_expr)
        try:
            self.state = 935
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,134,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 914
                self.match(AmberMRParser.Integer_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 915
                self.match(AmberMRParser.L_paren_F)
                self.state = 916
                self.match(AmberMRParser.Integer_F)
                self.state = 917
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 918
                self.match(AmberMRParser.L_brace_F)
                self.state = 919
                self.match(AmberMRParser.Integer_F)
                self.state = 920
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 921
                self.match(AmberMRParser.L_brakt_F)
                self.state = 922
                self.match(AmberMRParser.Integer_F)
                self.state = 923
                self.match(AmberMRParser.R_brakt_F)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 924
                self.match(AmberMRParser.Ambmask_F)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 925
                self.match(AmberMRParser.L_paren_F)
                self.state = 926
                self.match(AmberMRParser.Ambmask_F)
                self.state = 927
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 928
                self.match(AmberMRParser.L_brace_F)
                self.state = 929
                self.match(AmberMRParser.Ambmask_F)
                self.state = 930
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 931
                self.match(AmberMRParser.L_brakt_F)
                self.state = 932
                self.match(AmberMRParser.Ambmask_F)
                self.state = 933
                self.match(AmberMRParser.R_brakt_F)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 934
                self.com_rst_func_call()
                pass


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


    class Plane_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PLANE_F(self):
            return self.getToken(AmberMRParser.PLANE_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_func_exprContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_plane_rst_func_call

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

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




    def plane_rst_func_call(self):

        localctx = AmberMRParser.Plane_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_plane_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 988
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,144,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 937
                self.match(AmberMRParser.PLANE_F)
                self.state = 938
                self.match(AmberMRParser.L_paren_F)
                self.state = 939
                self.restraint_func_expr()
                self.state = 941
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 940
                    self.match(AmberMRParser.Comma_F)


                self.state = 943
                self.restraint_func_expr()
                self.state = 945
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 944
                    self.match(AmberMRParser.Comma_F)


                self.state = 947
                self.restraint_func_expr()
                self.state = 949
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 948
                    self.match(AmberMRParser.Comma_F)


                self.state = 951
                self.restraint_func_expr()
                self.state = 952
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 954
                self.match(AmberMRParser.PLANE_F)
                self.state = 955
                self.match(AmberMRParser.L_brace_F)
                self.state = 956
                self.restraint_func_expr()
                self.state = 958
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 957
                    self.match(AmberMRParser.Comma_F)


                self.state = 960
                self.restraint_func_expr()
                self.state = 962
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 961
                    self.match(AmberMRParser.Comma_F)


                self.state = 964
                self.restraint_func_expr()
                self.state = 966
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 965
                    self.match(AmberMRParser.Comma_F)


                self.state = 968
                self.restraint_func_expr()
                self.state = 969
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 971
                self.match(AmberMRParser.PLANE_F)
                self.state = 972
                self.match(AmberMRParser.L_brakt_F)
                self.state = 973
                self.restraint_func_expr()
                self.state = 975
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 974
                    self.match(AmberMRParser.Comma_F)


                self.state = 977
                self.restraint_func_expr()
                self.state = 979
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 978
                    self.match(AmberMRParser.Comma_F)


                self.state = 981
                self.restraint_func_expr()
                self.state = 983
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AmberMRParser.Comma_F:
                    self.state = 982
                    self.match(AmberMRParser.Comma_F)


                self.state = 985
                self.restraint_func_expr()
                self.state = 986
                self.match(AmberMRParser.R_brakt_F)
                pass


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


    class Com_rst_func_callContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COM_F(self):
            return self.getToken(AmberMRParser.COM_F, 0)

        def L_paren_F(self):
            return self.getToken(AmberMRParser.L_paren_F, 0)

        def restraint_func_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Restraint_func_exprContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Restraint_func_exprContext,i)


        def R_paren_F(self):
            return self.getToken(AmberMRParser.R_paren_F, 0)

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

        def L_brace_F(self):
            return self.getToken(AmberMRParser.L_brace_F, 0)

        def R_brace_F(self):
            return self.getToken(AmberMRParser.R_brace_F, 0)

        def L_brakt_F(self):
            return self.getToken(AmberMRParser.L_brakt_F, 0)

        def R_brakt_F(self):
            return self.getToken(AmberMRParser.R_brakt_F, 0)

        def getRuleIndex(self):
            return AmberMRParser.RULE_com_rst_func_call

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

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




    def com_rst_func_call(self):

        localctx = AmberMRParser.Com_rst_func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_com_rst_func_call)
        self._la = 0 # Token type
        try:
            self.state = 1032
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,151,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 990
                self.match(AmberMRParser.COM_F)
                self.state = 991
                self.match(AmberMRParser.L_paren_F)
                self.state = 992
                self.restraint_func_expr()
                self.state = 999
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 212)) & ~0x3f) == 0 and ((1 << (_la - 212)) & ((1 << (AmberMRParser.COM_F - 212)) | (1 << (AmberMRParser.Integer_F - 212)) | (1 << (AmberMRParser.Ambmask_F - 212)) | (1 << (AmberMRParser.Comma_F - 212)) | (1 << (AmberMRParser.L_paren_F - 212)) | (1 << (AmberMRParser.L_brace_F - 212)) | (1 << (AmberMRParser.L_brakt_F - 212)))) != 0):
                    self.state = 994
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==AmberMRParser.Comma_F:
                        self.state = 993
                        self.match(AmberMRParser.Comma_F)


                    self.state = 996
                    self.restraint_func_expr()
                    self.state = 1001
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1002
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1004
                self.match(AmberMRParser.COM_F)
                self.state = 1005
                self.match(AmberMRParser.L_brace_F)
                self.state = 1006
                self.restraint_func_expr()
                self.state = 1013
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 212)) & ~0x3f) == 0 and ((1 << (_la - 212)) & ((1 << (AmberMRParser.COM_F - 212)) | (1 << (AmberMRParser.Integer_F - 212)) | (1 << (AmberMRParser.Ambmask_F - 212)) | (1 << (AmberMRParser.Comma_F - 212)) | (1 << (AmberMRParser.L_paren_F - 212)) | (1 << (AmberMRParser.L_brace_F - 212)) | (1 << (AmberMRParser.L_brakt_F - 212)))) != 0):
                    self.state = 1008
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==AmberMRParser.Comma_F:
                        self.state = 1007
                        self.match(AmberMRParser.Comma_F)


                    self.state = 1010
                    self.restraint_func_expr()
                    self.state = 1015
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1016
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1018
                self.match(AmberMRParser.COM_F)
                self.state = 1019
                self.match(AmberMRParser.L_brakt_F)
                self.state = 1020
                self.restraint_func_expr()
                self.state = 1027
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 212)) & ~0x3f) == 0 and ((1 << (_la - 212)) & ((1 << (AmberMRParser.COM_F - 212)) | (1 << (AmberMRParser.Integer_F - 212)) | (1 << (AmberMRParser.Ambmask_F - 212)) | (1 << (AmberMRParser.Comma_F - 212)) | (1 << (AmberMRParser.L_paren_F - 212)) | (1 << (AmberMRParser.L_brace_F - 212)) | (1 << (AmberMRParser.L_brakt_F - 212)))) != 0):
                    self.state = 1022
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==AmberMRParser.Comma_F:
                        self.state = 1021
                        self.match(AmberMRParser.Comma_F)


                    self.state = 1024
                    self.restraint_func_expr()
                    self.state = 1029
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1030
                self.match(AmberMRParser.R_brakt_F)
                pass


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





