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

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'", 
                     "'DOBS'", "'DWT'", "'DATASET'", "'NUM_DATASETS'", "'S11'", 
                     "'S12'", "'S13'", "'S22'", "'S23'", "'GIGJ'", "'DIJ'", 
                     "'DCUT'", "'FREEZEMOL'", "'&CSA'", "'NCSA'", "'ICSA'", 
                     "'JCSA'", "'KCSA'", "'COBSL'", "'COBSU'", "'COBS'", 
                     "'CWT'", "'DATASETC'", "'FIELD'", "'SIGMA11'", "'SIGMA12'", 
                     "'SIGMA13'", "'SIGMA22'", "'SIGMA23'", "'CCUT'", "<INVALID>", 
                     "'RESIDUE'", "'MAPPING'", "'AMBIG'", "<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", 
                      "DOBS", "DWT", "DATASET", "NUM_DATASETS", "S11", "S12", 
                      "S13", "S22", "S23", "GIGJ", "DIJ", "DCUT", "FREEZEMOL", 
                      "CSA", "NCSA", "ICSA", "JCSA", "KCSA", "COBSL", "COBSU", 
                      "COBS", "CWT", "DATASETC", "FIELD", "SIGMA11", "SIGMA12", 
                      "SIGMA13", "SIGMA22", "SIGMA23", "CCUT", "Comma", 
                      "Residue", "Mapping", "Ambig", "SMCLN_COMMENT", "COMMENT", 
                      "Logical", "L_paren", "R_paren", "L_brace", "R_brace", 
                      "L_brakt", "R_brakt", "Equ_op", "L_quot", "Simple_name", 
                      "SPACE", "SECTION_COMMENT", "Any_name", "SPACE_CM", 
                      "RETURN_CM", "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_AP", "R_paren_AP", 
                      "Equ_op_AP", "SPACE_AP", "Qstring_AP", "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_AR", "R_paren_AR", "Decimal", "SPACE_AR", "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", "Ambig_code_MP", 
                      "Integer_MP", "Simple_name_MP", "Equ_op_MP", "SPACE_MP", 
                      "RETURN_MP", "LINE_COMMENT_MP" ]

    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
    RULE_unambig_atom_name_mapping = 31
    RULE_mapping_list = 32
    RULE_ambig_atom_name_mapping = 33
    RULE_ambig_list = 34

    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", "unambig_atom_name_mapping", "mapping_list", 
                   "ambig_atom_name_mapping", "ambig_list" ]

    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
    DOBS=110
    DWT=111
    DATASET=112
    NUM_DATASETS=113
    S11=114
    S12=115
    S13=116
    S22=117
    S23=118
    GIGJ=119
    DIJ=120
    DCUT=121
    FREEZEMOL=122
    CSA=123
    NCSA=124
    ICSA=125
    JCSA=126
    KCSA=127
    COBSL=128
    COBSU=129
    COBS=130
    CWT=131
    DATASETC=132
    FIELD=133
    SIGMA11=134
    SIGMA12=135
    SIGMA13=136
    SIGMA22=137
    SIGMA23=138
    CCUT=139
    Comma=140
    Residue=141
    Mapping=142
    Ambig=143
    SMCLN_COMMENT=144
    COMMENT=145
    Logical=146
    L_paren=147
    R_paren=148
    L_brace=149
    R_brace=150
    L_brakt=151
    R_brakt=152
    Equ_op=153
    L_quot=154
    Simple_name=155
    SPACE=156
    SECTION_COMMENT=157
    Any_name=158
    SPACE_CM=159
    RETURN_CM=160
    Equ_op_IP=161
    L_paren_IP=162
    Integer=163
    SPACE_IP=164
    Equ_op_RP=165
    L_paren_RP=166
    Real=167
    SPACE_RP=168
    Equ_op_BP=169
    BoolInt=170
    SPACE_BP=171
    L_paren_QP=172
    Equ_op_QP=173
    Qstring=174
    Decimal_AP=175
    R_paren_AP=176
    Equ_op_AP=177
    SPACE_AP=178
    Qstring_AP=179
    L_paren_IA=180
    Equ_op_IA=181
    Comma_IA=182
    End_IA=183
    Asterisk_IA=184
    Integers=185
    MultiplicativeInt=186
    COMMENT_IA=187
    L_paren_RA=188
    Equ_op_RA=189
    Comma_RA=190
    End_RA=191
    Asterisk_RA=192
    Reals=193
    MultiplicativeReal=194
    COMMENT_RA=195
    Equ_op_BA=196
    Comma_BA=197
    End_BA=198
    BoolInts=199
    COMMENT_BA=200
    L_paren_QA=201
    Equ_op_QA=202
    Comma_QA=203
    End_QA=204
    Qstrings=205
    COMMENT_QA=206
    Comma_AR=207
    R_paren_AR=208
    Decimal=209
    SPACE_AR=210
    DISTANCE_F=211
    ANGLE_F=212
    TORSION_F=213
    COORDINATE_F=214
    PLANE_F=215
    COM_F=216
    Integer_F=217
    Real_F=218
    Ambmask_F=219
    Comma_F=220
    L_paren_F=221
    R_paren_F=222
    L_brace_F=223
    R_brace_F=224
    L_brakt_F=225
    R_brakt_F=226
    R_quot=227
    SPACE_F=228
    Ambig_code_MP=229
    Integer_MP=230
    Simple_name_MP=231
    Equ_op_MP=232
    SPACE_MP=233
    RETURN_MP=234
    LINE_COMMENT_MP=235

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.13.0")
        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 unambig_atom_name_mapping(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Unambig_atom_name_mappingContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Unambig_atom_name_mappingContext,i)


        def ambig_atom_name_mapping(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AmberMRParser.Ambig_atom_name_mappingContext)
            else:
                return self.getTypedRuleContext(AmberMRParser.Ambig_atom_name_mappingContext,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 = 81
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==2 or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 576461852351954945) != 0) or _la==141 or _la==145:
                self.state = 79
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
                if la_ == 1:
                    self.state = 70
                    self.comment()
                    pass

                elif la_ == 2:
                    self.state = 71
                    self.nmr_restraint()
                    pass

                elif la_ == 3:
                    self.state = 72
                    self.noesy_volume_restraint()
                    pass

                elif la_ == 4:
                    self.state = 73
                    self.chemical_shift_restraint()
                    pass

                elif la_ == 5:
                    self.state = 74
                    self.pcs_restraint()
                    pass

                elif la_ == 6:
                    self.state = 75
                    self.dipolar_coupling_restraint()
                    pass

                elif la_ == 7:
                    self.state = 76
                    self.csa_restraint()
                    pass

                elif la_ == 8:
                    self.state = 77
                    self.unambig_atom_name_mapping()
                    pass

                elif la_ == 9:
                    self.state = 78
                    self.ambig_atom_name_mapping()
                    pass


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

            self.state = 84
            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_CM(self):
            return self.getToken(AmberMRParser.RETURN_CM, 0)

        def EOF(self):
            return self.getToken(AmberMRParser.EOF, 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 = 86
            self.match(AmberMRParser.COMMENT)
            self.state = 90
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==158:
                self.state = 87
                self.match(AmberMRParser.Any_name)
                self.state = 92
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class 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 = 95
            self.match(AmberMRParser.RST)
            self.state = 96
            self.restraint_statement()
            self.state = 98
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                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 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 = 100
            self.match(AmberMRParser.NOEEXP)
            self.state = 101
            self.noeexp_statement()
            self.state = 103
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                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 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 = 105
            self.match(AmberMRParser.SHF)
            self.state = 106
            self.shf_statement()
            self.state = 108
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                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 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 = 110
            self.match(AmberMRParser.PCSHF)
            self.state = 111
            self.pcshf_statement()
            self.state = 113
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                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 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 = 115
            self.match(AmberMRParser.ALIGN)
            self.state = 116
            self.align_statement()
            self.state = 118
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                self.state = 117
                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 = 120
            self.match(AmberMRParser.CSA)
            self.state = 121
            self.csa_statement()
            self.state = 123
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==1:
                self.state = 122
                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 = 128
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -8) != 0):
                self.state = 125
                self.restraint_factor()
                self.state = 130
                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_AP(self):
            return self.getToken(AmberMRParser.Decimal_AP, 0)

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

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

        def Qstring_AP(self):
            return self.getToken(AmberMRParser.Qstring_AP, 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_AR(self):
            return self.getToken(AmberMRParser.R_paren_AR, 0)

        def L_paren_RA(self):
            return self.getToken(AmberMRParser.L_paren_RA, 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 = 204
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 131
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 2190433320968) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 132
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 133
                _la = self._input.LA(1)
                if not(_la==185 or _la==186):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 134
                _la = self._input.LA(1)
                if not(_la==182 or _la==183):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 135
                _la = self._input.LA(1)
                if not(_la==4 or _la==32):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 136
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 137
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 138
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 139
                self.match(AmberMRParser.RESTRAINT)
                self.state = 140
                self.match(AmberMRParser.Equ_op)
                self.state = 141
                self.match(AmberMRParser.L_quot)
                self.state = 150
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
                if la_ == 1:
                    self.state = 142
                    self.distance_rst_func_call()
                    pass

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

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

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

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

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

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

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


                self.state = 152
                self.match(AmberMRParser.R_quot)
                self.state = 154
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 153
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 156
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 2243003720663104) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 157
                self.match(AmberMRParser.Decimal_AP)
                self.state = 158
                self.match(AmberMRParser.R_paren_AP)
                self.state = 159
                self.match(AmberMRParser.Equ_op_AP)
                self.state = 160
                self.match(AmberMRParser.Qstring_AP)
                self.state = 162
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 161
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 164
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 574208952489738368) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 165
                self.match(AmberMRParser.Equ_op_QA)
                self.state = 166
                self.match(AmberMRParser.Qstrings)
                self.state = 167
                _la = self._input.LA(1)
                if not(_la==203 or _la==204):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 168
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1729386654956820736) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 169
                self.match(AmberMRParser.Equ_op_BP)
                self.state = 170
                self.match(AmberMRParser.BoolInt)
                self.state = 172
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 171
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 174
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & -2305843009213667840) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 175
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 176
                self.match(AmberMRParser.Integer)
                self.state = 178
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 177
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 180
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4294901760) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 181
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 182
                self.match(AmberMRParser.Real)
                self.state = 184
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 183
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 186
                self.match(AmberMRParser.FXYZ)
                self.state = 187
                self.match(AmberMRParser.Equ_op_BA)
                self.state = 188
                self.match(AmberMRParser.BoolInts)
                self.state = 189
                _la = self._input.LA(1)
                if not(_la==197 or _la==198):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 190
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 2190433320968) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 191
                self.match(AmberMRParser.L_paren_IA)
                self.state = 192
                self.match(AmberMRParser.Decimal)
                self.state = 193
                self.match(AmberMRParser.R_paren_AR)
                self.state = 194
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 195
                self.match(AmberMRParser.Integers)
                self.state = 196
                _la = self._input.LA(1)
                if not(_la==182 or _la==183):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 197
                self.match(AmberMRParser.RSTWT)
                self.state = 198
                self.match(AmberMRParser.L_paren_RA)
                self.state = 199
                self.match(AmberMRParser.Decimal)
                self.state = 200
                self.match(AmberMRParser.R_paren_AR)
                self.state = 201
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 202
                self.match(AmberMRParser.Reals)
                self.state = 203
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,17,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 206
                    self.noeexp_factor() 
                self.state = 211
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

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


    class 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 Equ_op_IA(self):
            return self.getToken(AmberMRParser.Equ_op_IA, 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 EMIX(self):
            return self.getToken(AmberMRParser.EMIX, 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 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 Comma_AR(self):
            return self.getToken(AmberMRParser.Comma_AR, 0)

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

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

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

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

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

        def Comma(self):
            return self.getToken(AmberMRParser.Comma, 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 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 L_paren_IA(self):
            return self.getToken(AmberMRParser.L_paren_IA, 0)

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

        def comment(self):
            return self.getTypedRuleContext(AmberMRParser.CommentContext,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 = 269
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,22,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 212
                self.match(AmberMRParser.NPEAK)
                self.state = 213
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 214
                _la = self._input.LA(1)
                if not(_la==185 or _la==186):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 215
                _la = self._input.LA(1)
                if not(_la==182 or _la==183):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 216
                self.match(AmberMRParser.EMIX)
                self.state = 217
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 218
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 219
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 220
                _la = self._input.LA(1)
                if not(_la==67 or _la==68):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 221
                self.match(AmberMRParser.L_paren_IP)
                self.state = 222
                self.match(AmberMRParser.Decimal)
                self.state = 223
                self.match(AmberMRParser.Comma_AR)
                self.state = 224
                self.match(AmberMRParser.Decimal)
                self.state = 225
                self.match(AmberMRParser.R_paren_AR)
                self.state = 226
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 227
                self.match(AmberMRParser.Integer)
                self.state = 229
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 228
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 231
                _la = self._input.LA(1)
                if not(((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & 7) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 232
                self.match(AmberMRParser.L_paren_RP)
                self.state = 233
                self.match(AmberMRParser.Decimal)
                self.state = 234
                self.match(AmberMRParser.Comma_AR)
                self.state = 235
                self.match(AmberMRParser.Decimal)
                self.state = 236
                self.match(AmberMRParser.R_paren_AR)
                self.state = 237
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 238
                self.match(AmberMRParser.Real)
                self.state = 240
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 239
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 242
                _la = self._input.LA(1)
                if not(((((_la - 72)) & ~0x3f) == 0 and ((1 << (_la - 72)) & 95) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 243
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 244
                self.match(AmberMRParser.Real)
                self.state = 246
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 245
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 248
                self.match(AmberMRParser.ID2O)
                self.state = 249
                self.match(AmberMRParser.Equ_op_BP)
                self.state = 250
                self.match(AmberMRParser.BoolInt)
                self.state = 252
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 251
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 254
                self.match(AmberMRParser.NPEAK)
                self.state = 255
                self.match(AmberMRParser.L_paren_IA)
                self.state = 256
                self.match(AmberMRParser.Decimal)
                self.state = 257
                self.match(AmberMRParser.R_paren_AR)
                self.state = 258
                self.match(AmberMRParser.Equ_op_IA)
                self.state = 259
                self.match(AmberMRParser.Integers)
                self.state = 260
                _la = self._input.LA(1)
                if not(_la==182 or _la==183):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 261
                self.match(AmberMRParser.EMIX)
                self.state = 262
                self.match(AmberMRParser.L_paren_RA)
                self.state = 263
                self.match(AmberMRParser.Decimal)
                self.state = 264
                self.match(AmberMRParser.R_paren_AR)
                self.state = 265
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 266
                self.match(AmberMRParser.Reals)
                self.state = 267
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 268
                self.comment()
                pass


        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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,23,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 271
                    self.shf_factor() 
                self.state = 276
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,23,self._ctx)

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


    class 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_AR(self):
            return self.getToken(AmberMRParser.R_paren_AR, 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_AR(self):
            return self.getToken(AmberMRParser.Comma_AR, 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 comment(self):
            return self.getTypedRuleContext(AmberMRParser.CommentContext,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 = 335
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [80, 89, 91, 92]:
                self.enterOuterAlt(localctx, 1)
                self.state = 277
                _la = self._input.LA(1)
                if not(((((_la - 80)) & ~0x3f) == 0 and ((1 << (_la - 80)) & 6657) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 278
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 279
                self.match(AmberMRParser.Integer)
                self.state = 281
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 280
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [81, 85]:
                self.enterOuterAlt(localctx, 2)
                self.state = 283
                _la = self._input.LA(1)
                if not(_la==81 or _la==85):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 284
                self.match(AmberMRParser.L_paren_IP)
                self.state = 285
                self.match(AmberMRParser.Decimal)
                self.state = 286
                self.match(AmberMRParser.R_paren_AR)
                self.state = 287
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 288
                self.match(AmberMRParser.Integer)
                self.state = 290
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 289
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [82]:
                self.enterOuterAlt(localctx, 3)
                self.state = 292
                self.match(AmberMRParser.IATR)
                self.state = 293
                self.match(AmberMRParser.L_paren_IP)
                self.state = 294
                self.match(AmberMRParser.Decimal)
                self.state = 295
                self.match(AmberMRParser.Comma_AR)
                self.state = 296
                self.match(AmberMRParser.Decimal)
                self.state = 297
                self.match(AmberMRParser.R_paren_AR)
                self.state = 298
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 299
                self.match(AmberMRParser.Integer)
                self.state = 301
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 300
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [86]:
                self.enterOuterAlt(localctx, 4)
                self.state = 303
                self.match(AmberMRParser.OBS)
                self.state = 304
                self.match(AmberMRParser.L_paren_RP)
                self.state = 305
                self.match(AmberMRParser.Decimal)
                self.state = 306
                self.match(AmberMRParser.R_paren_AR)
                self.state = 307
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 308
                self.match(AmberMRParser.Real)
                self.state = 310
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 309
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [84, 87, 88]:
                self.enterOuterAlt(localctx, 5)
                self.state = 312
                _la = self._input.LA(1)
                if not(((((_la - 84)) & ~0x3f) == 0 and ((1 << (_la - 84)) & 25) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 313
                self.match(AmberMRParser.L_paren_RA)
                self.state = 314
                self.match(AmberMRParser.Decimal)
                self.state = 315
                self.match(AmberMRParser.R_paren_AR)
                self.state = 316
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 317
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 318
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [83]:
                self.enterOuterAlt(localctx, 6)
                self.state = 319
                self.match(AmberMRParser.NAMR)
                self.state = 320
                self.match(AmberMRParser.L_paren_QP)
                self.state = 321
                self.match(AmberMRParser.Decimal)
                self.state = 322
                self.match(AmberMRParser.R_paren_AR)
                self.state = 323
                self.match(AmberMRParser.Equ_op_QP)
                self.state = 324
                self.match(AmberMRParser.Qstring)
                self.state = 326
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 325
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [90]:
                self.enterOuterAlt(localctx, 7)
                self.state = 328
                self.match(AmberMRParser.SHCUT)
                self.state = 329
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 330
                self.match(AmberMRParser.Real)
                self.state = 332
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 331
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [145]:
                self.enterOuterAlt(localctx, 8)
                self.state = 334
                self.comment()
                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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 340
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,31,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 337
                    self.pcshf_factor() 
                self.state = 342
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,31,self._ctx)

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


    class 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_AR(self):
            return self.getToken(AmberMRParser.R_paren_AR, 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 comment(self):
            return self.getTypedRuleContext(AmberMRParser.CommentContext,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 = 387
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [89, 94]:
                self.enterOuterAlt(localctx, 1)
                self.state = 343
                _la = self._input.LA(1)
                if not(_la==89 or _la==94):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 344
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 345
                self.match(AmberMRParser.Integer)
                self.state = 347
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 346
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [95]:
                self.enterOuterAlt(localctx, 2)
                self.state = 349
                self.match(AmberMRParser.NMPMC)
                self.state = 350
                self.match(AmberMRParser.Equ_op_QP)
                self.state = 351
                self.match(AmberMRParser.Qstring)
                self.state = 353
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 352
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [85, 103]:
                self.enterOuterAlt(localctx, 3)
                self.state = 355
                _la = self._input.LA(1)
                if not(_la==85 or _la==103):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 356
                self.match(AmberMRParser.L_paren_IP)
                self.state = 357
                self.match(AmberMRParser.Decimal)
                self.state = 358
                self.match(AmberMRParser.R_paren_AR)
                self.state = 359
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 360
                self.match(AmberMRParser.Integer)
                self.state = 362
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 361
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [86, 96, 97, 98, 99, 100]:
                self.enterOuterAlt(localctx, 4)
                self.state = 364
                _la = self._input.LA(1)
                if not(((((_la - 86)) & ~0x3f) == 0 and ((1 << (_la - 86)) & 31745) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 365
                self.match(AmberMRParser.L_paren_RP)
                self.state = 366
                self.match(AmberMRParser.Decimal)
                self.state = 367
                self.match(AmberMRParser.R_paren_AR)
                self.state = 368
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 369
                self.match(AmberMRParser.Real)
                self.state = 371
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 370
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [88, 102]:
                self.enterOuterAlt(localctx, 5)
                self.state = 373
                _la = self._input.LA(1)
                if not(_la==88 or _la==102):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 374
                self.match(AmberMRParser.L_paren_RA)
                self.state = 375
                self.match(AmberMRParser.Decimal)
                self.state = 376
                self.match(AmberMRParser.R_paren_AR)
                self.state = 377
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 378
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 379
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [101]:
                self.enterOuterAlt(localctx, 6)
                self.state = 380
                self.match(AmberMRParser.OPTKON)
                self.state = 381
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 382
                self.match(AmberMRParser.Real)
                self.state = 384
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 383
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [145]:
                self.enterOuterAlt(localctx, 7)
                self.state = 386
                self.comment()
                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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 392
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,38,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 389
                    self.align_factor() 
                self.state = 394
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,38,self._ctx)

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


    class 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_AR(self):
            return self.getToken(AmberMRParser.R_paren_AR, 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 DOBS(self):
            return self.getToken(AmberMRParser.DOBS, 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 comment(self):
            return self.getTypedRuleContext(AmberMRParser.CommentContext,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 = 447
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,44,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 395
                _la = self._input.LA(1)
                if not(((((_la - 105)) & ~0x3f) == 0 and ((1 << (_la - 105)) & 385) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 396
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 397
                self.match(AmberMRParser.Integer)
                self.state = 399
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 398
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 401
                _la = self._input.LA(1)
                if not(((((_la - 106)) & ~0x3f) == 0 and ((1 << (_la - 106)) & 67) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 402
                self.match(AmberMRParser.L_paren_IP)
                self.state = 403
                self.match(AmberMRParser.Decimal)
                self.state = 404
                self.match(AmberMRParser.R_paren_AR)
                self.state = 405
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 406
                self.match(AmberMRParser.Integer)
                self.state = 408
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 407
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 410
                _la = self._input.LA(1)
                if not(((((_la - 108)) & ~0x3f) == 0 and ((1 << (_la - 108)) & 7) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 411
                self.match(AmberMRParser.L_paren_RP)
                self.state = 412
                self.match(AmberMRParser.Decimal)
                self.state = 413
                self.match(AmberMRParser.R_paren_AR)
                self.state = 414
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 415
                self.match(AmberMRParser.Real)
                self.state = 417
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 416
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 419
                _la = self._input.LA(1)
                if not(((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 769) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 420
                self.match(AmberMRParser.L_paren_RA)
                self.state = 421
                self.match(AmberMRParser.Decimal)
                self.state = 422
                self.match(AmberMRParser.R_paren_AR)
                self.state = 423
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 424
                self.match(AmberMRParser.Reals)
                self.state = 425
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 426
                _la = self._input.LA(1)
                if not(((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 769) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 427
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 428
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 429
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 430
                _la = self._input.LA(1)
                if not(((((_la - 114)) & ~0x3f) == 0 and ((1 << (_la - 114)) & 31) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 431
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 432
                self.match(AmberMRParser.Reals)
                self.state = 433
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 434
                self.match(AmberMRParser.DCUT)
                self.state = 435
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 436
                self.match(AmberMRParser.Real)
                self.state = 438
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 437
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 440
                self.match(AmberMRParser.FREEZEMOL)
                self.state = 441
                self.match(AmberMRParser.Equ_op)
                self.state = 442
                self.match(AmberMRParser.Logical)
                self.state = 444
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 443
                    self.match(AmberMRParser.Comma)


                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 446
                self.comment()
                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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 452
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,45,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 449
                    self.csa_factor() 
                self.state = 454
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,45,self._ctx)

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


    class 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_AR(self):
            return self.getToken(AmberMRParser.R_paren_AR, 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 COBS(self):
            return self.getToken(AmberMRParser.COBS, 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 comment(self):
            return self.getTypedRuleContext(AmberMRParser.CommentContext,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 = 490
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [124, 132]:
                self.enterOuterAlt(localctx, 1)
                self.state = 455
                _la = self._input.LA(1)
                if not(_la==124 or _la==132):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 456
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 457
                self.match(AmberMRParser.Integer)
                self.state = 459
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 458
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [125, 126, 127]:
                self.enterOuterAlt(localctx, 2)
                self.state = 461
                _la = self._input.LA(1)
                if not(((((_la - 125)) & ~0x3f) == 0 and ((1 << (_la - 125)) & 7) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 462
                self.match(AmberMRParser.L_paren_IP)
                self.state = 463
                self.match(AmberMRParser.Decimal)
                self.state = 464
                self.match(AmberMRParser.R_paren_AR)
                self.state = 465
                self.match(AmberMRParser.Equ_op_IP)
                self.state = 466
                self.match(AmberMRParser.Integer)
                self.state = 468
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 467
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [128, 129, 130]:
                self.enterOuterAlt(localctx, 3)
                self.state = 470
                _la = self._input.LA(1)
                if not(((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 7) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 471
                self.match(AmberMRParser.L_paren_RP)
                self.state = 472
                self.match(AmberMRParser.Decimal)
                self.state = 473
                self.match(AmberMRParser.R_paren_AR)
                self.state = 474
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 475
                self.match(AmberMRParser.Real)
                self.state = 477
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 476
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [131]:
                self.enterOuterAlt(localctx, 4)
                self.state = 479
                self.match(AmberMRParser.CWT)
                self.state = 480
                self.match(AmberMRParser.Equ_op_RA)
                self.state = 481
                _la = self._input.LA(1)
                if not(_la==193 or _la==194):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 482
                _la = self._input.LA(1)
                if not(_la==190 or _la==191):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [133, 134, 135, 136, 137, 138, 139]:
                self.enterOuterAlt(localctx, 5)
                self.state = 483
                _la = self._input.LA(1)
                if not(((((_la - 133)) & ~0x3f) == 0 and ((1 << (_la - 133)) & 127) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 484
                self.match(AmberMRParser.Equ_op_RP)
                self.state = 485
                self.match(AmberMRParser.Real)
                self.state = 487
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==140:
                    self.state = 486
                    self.match(AmberMRParser.Comma)


                pass
            elif token in [145]:
                self.enterOuterAlt(localctx, 6)
                self.state = 489
                self.comment()
                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 = 519
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,54,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 492
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 493
                self.match(AmberMRParser.L_paren_F)
                self.state = 494
                self.restraint_func_expr()
                self.state = 496
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 495
                    self.match(AmberMRParser.Comma_F)


                self.state = 498
                self.restraint_func_expr()
                self.state = 499
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 501
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 502
                self.match(AmberMRParser.L_brace_F)
                self.state = 503
                self.restraint_func_expr()
                self.state = 505
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 504
                    self.match(AmberMRParser.Comma_F)


                self.state = 507
                self.restraint_func_expr()
                self.state = 508
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 510
                self.match(AmberMRParser.DISTANCE_F)
                self.state = 511
                self.match(AmberMRParser.L_brakt_F)
                self.state = 512
                self.restraint_func_expr()
                self.state = 514
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 513
                    self.match(AmberMRParser.Comma_F)


                self.state = 516
                self.restraint_func_expr()
                self.state = 517
                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 = 560
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,61,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 521
                self.match(AmberMRParser.ANGLE_F)
                self.state = 522
                self.match(AmberMRParser.L_paren_F)
                self.state = 523
                self.restraint_func_expr()
                self.state = 525
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 524
                    self.match(AmberMRParser.Comma_F)


                self.state = 527
                self.restraint_func_expr()
                self.state = 529
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 528
                    self.match(AmberMRParser.Comma_F)


                self.state = 531
                self.restraint_func_expr()
                self.state = 532
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 534
                self.match(AmberMRParser.ANGLE_F)
                self.state = 535
                self.match(AmberMRParser.L_brace_F)
                self.state = 536
                self.restraint_func_expr()
                self.state = 538
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 537
                    self.match(AmberMRParser.Comma_F)


                self.state = 540
                self.restraint_func_expr()
                self.state = 542
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 541
                    self.match(AmberMRParser.Comma_F)


                self.state = 544
                self.restraint_func_expr()
                self.state = 545
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 547
                self.match(AmberMRParser.ANGLE_F)
                self.state = 548
                self.match(AmberMRParser.L_brakt_F)
                self.state = 549
                self.restraint_func_expr()
                self.state = 551
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 550
                    self.match(AmberMRParser.Comma_F)


                self.state = 553
                self.restraint_func_expr()
                self.state = 555
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 554
                    self.match(AmberMRParser.Comma_F)


                self.state = 557
                self.restraint_func_expr()
                self.state = 558
                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 = 616
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,68,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 562
                self.match(AmberMRParser.ANGLE_F)
                self.state = 563
                self.match(AmberMRParser.L_paren_F)
                self.state = 564
                self.restraint_func_expr()
                self.state = 566
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 565
                    self.match(AmberMRParser.Comma_F)


                self.state = 568
                self.plane_rst_func_call()
                self.state = 569
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 571
                self.match(AmberMRParser.ANGLE_F)
                self.state = 572
                self.match(AmberMRParser.L_brace_F)
                self.state = 573
                self.restraint_func_expr()
                self.state = 575
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 574
                    self.match(AmberMRParser.Comma_F)


                self.state = 577
                self.plane_rst_func_call()
                self.state = 578
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 580
                self.match(AmberMRParser.ANGLE_F)
                self.state = 581
                self.match(AmberMRParser.L_brakt_F)
                self.state = 582
                self.restraint_func_expr()
                self.state = 584
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 583
                    self.match(AmberMRParser.Comma_F)


                self.state = 586
                self.plane_rst_func_call()
                self.state = 587
                self.match(AmberMRParser.R_brakt_F)
                pass

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


                self.state = 595
                self.restraint_func_expr()
                self.state = 596
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 598
                self.match(AmberMRParser.ANGLE_F)
                self.state = 599
                self.match(AmberMRParser.L_brace_F)
                self.state = 600
                self.plane_rst_func_call()
                self.state = 602
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 601
                    self.match(AmberMRParser.Comma_F)


                self.state = 604
                self.restraint_func_expr()
                self.state = 605
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 607
                self.match(AmberMRParser.ANGLE_F)
                self.state = 608
                self.match(AmberMRParser.L_brakt_F)
                self.state = 609
                self.plane_rst_func_call()
                self.state = 611
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 610
                    self.match(AmberMRParser.Comma_F)


                self.state = 613
                self.restraint_func_expr()
                self.state = 614
                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 = 645
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,72,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 618
                self.match(AmberMRParser.ANGLE_F)
                self.state = 619
                self.match(AmberMRParser.L_paren_F)
                self.state = 620
                self.plane_rst_func_call()
                self.state = 622
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 621
                    self.match(AmberMRParser.Comma_F)


                self.state = 624
                self.plane_rst_func_call()
                self.state = 625
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 627
                self.match(AmberMRParser.ANGLE_F)
                self.state = 628
                self.match(AmberMRParser.L_brace_F)
                self.state = 629
                self.plane_rst_func_call()
                self.state = 631
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 630
                    self.match(AmberMRParser.Comma_F)


                self.state = 633
                self.plane_rst_func_call()
                self.state = 634
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 636
                self.match(AmberMRParser.ANGLE_F)
                self.state = 637
                self.match(AmberMRParser.L_brakt_F)
                self.state = 638
                self.plane_rst_func_call()
                self.state = 640
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 639
                    self.match(AmberMRParser.Comma_F)


                self.state = 642
                self.plane_rst_func_call()
                self.state = 643
                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 = 698
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,82,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 647
                self.match(AmberMRParser.TORSION_F)
                self.state = 648
                self.match(AmberMRParser.L_paren_F)
                self.state = 649
                self.restraint_func_expr()
                self.state = 651
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 658
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 664
                self.match(AmberMRParser.TORSION_F)
                self.state = 665
                self.match(AmberMRParser.L_brace_F)
                self.state = 666
                self.restraint_func_expr()
                self.state = 668
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 675
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 681
                self.match(AmberMRParser.TORSION_F)
                self.state = 682
                self.match(AmberMRParser.L_brakt_F)
                self.state = 683
                self.restraint_func_expr()
                self.state = 685
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 684
                    self.match(AmberMRParser.Comma_F)


                self.state = 687
                self.restraint_func_expr()
                self.state = 689
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 688
                    self.match(AmberMRParser.Comma_F)


                self.state = 691
                self.restraint_func_expr()
                self.state = 693
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 692
                    self.match(AmberMRParser.Comma_F)


                self.state = 695
                self.restraint_func_expr()
                self.state = 696
                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 = 751
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,92,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 700
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 701
                self.match(AmberMRParser.L_paren_F)
                self.state = 702
                self.distance_rst_func_call()
                self.state = 704
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 711
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 717
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 718
                self.match(AmberMRParser.L_brace_F)
                self.state = 719
                self.distance_rst_func_call()
                self.state = 721
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 728
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 734
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 735
                self.match(AmberMRParser.L_brakt_F)
                self.state = 736
                self.distance_rst_func_call()
                self.state = 738
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 737
                    self.match(AmberMRParser.Comma_F)


                self.state = 740
                self.match(AmberMRParser.Real_F)
                self.state = 742
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 741
                    self.match(AmberMRParser.Comma_F)


                self.state = 744
                self.distance_rst_func_call()
                self.state = 746
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 745
                    self.match(AmberMRParser.Comma_F)


                self.state = 748
                self.match(AmberMRParser.Real_F)
                self.state = 749
                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 = 828
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,108,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 753
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 754
                self.match(AmberMRParser.L_paren_F)
                self.state = 755
                self.distance_rst_func_call()
                self.state = 757
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 756
                    self.match(AmberMRParser.Comma_F)


                self.state = 759
                self.match(AmberMRParser.Real_F)
                self.state = 761
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 760
                    self.match(AmberMRParser.Comma_F)


                self.state = 763
                self.distance_rst_func_call()
                self.state = 765
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 772
                    self.match(AmberMRParser.Comma_F)


                self.state = 775
                self.match(AmberMRParser.Real_F)
                self.state = 776
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 778
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 779
                self.match(AmberMRParser.L_brace_F)
                self.state = 780
                self.distance_rst_func_call()
                self.state = 782
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 781
                    self.match(AmberMRParser.Comma_F)


                self.state = 784
                self.match(AmberMRParser.Real_F)
                self.state = 786
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 785
                    self.match(AmberMRParser.Comma_F)


                self.state = 788
                self.distance_rst_func_call()
                self.state = 790
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 797
                    self.match(AmberMRParser.Comma_F)


                self.state = 800
                self.match(AmberMRParser.Real_F)
                self.state = 801
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 803
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 804
                self.match(AmberMRParser.L_brakt_F)
                self.state = 805
                self.distance_rst_func_call()
                self.state = 807
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 806
                    self.match(AmberMRParser.Comma_F)


                self.state = 809
                self.match(AmberMRParser.Real_F)
                self.state = 811
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 810
                    self.match(AmberMRParser.Comma_F)


                self.state = 813
                self.distance_rst_func_call()
                self.state = 815
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 814
                    self.match(AmberMRParser.Comma_F)


                self.state = 817
                self.match(AmberMRParser.Real_F)
                self.state = 819
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 818
                    self.match(AmberMRParser.Comma_F)


                self.state = 821
                self.distance_rst_func_call()
                self.state = 823
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 822
                    self.match(AmberMRParser.Comma_F)


                self.state = 825
                self.match(AmberMRParser.Real_F)
                self.state = 826
                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 = 929
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,130,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 830
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 831
                self.match(AmberMRParser.L_paren_F)
                self.state = 832
                self.distance_rst_func_call()
                self.state = 834
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 833
                    self.match(AmberMRParser.Comma_F)


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


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


                self.state = 844
                self.match(AmberMRParser.Real_F)
                self.state = 846
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 845
                    self.match(AmberMRParser.Comma_F)


                self.state = 848
                self.distance_rst_func_call()
                self.state = 850
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 857
                    self.match(AmberMRParser.Comma_F)


                self.state = 860
                self.match(AmberMRParser.Real_F)
                self.state = 861
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 863
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 864
                self.match(AmberMRParser.L_brace_F)
                self.state = 865
                self.distance_rst_func_call()
                self.state = 867
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 866
                    self.match(AmberMRParser.Comma_F)


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


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


                self.state = 877
                self.match(AmberMRParser.Real_F)
                self.state = 879
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 878
                    self.match(AmberMRParser.Comma_F)


                self.state = 881
                self.distance_rst_func_call()
                self.state = 883
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 890
                    self.match(AmberMRParser.Comma_F)


                self.state = 893
                self.match(AmberMRParser.Real_F)
                self.state = 894
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 896
                self.match(AmberMRParser.COORDINATE_F)
                self.state = 897
                self.match(AmberMRParser.L_brakt_F)
                self.state = 898
                self.distance_rst_func_call()
                self.state = 900
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 899
                    self.match(AmberMRParser.Comma_F)


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


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


                self.state = 910
                self.match(AmberMRParser.Real_F)
                self.state = 912
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 911
                    self.match(AmberMRParser.Comma_F)


                self.state = 914
                self.distance_rst_func_call()
                self.state = 916
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 915
                    self.match(AmberMRParser.Comma_F)


                self.state = 918
                self.match(AmberMRParser.Real_F)
                self.state = 920
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 919
                    self.match(AmberMRParser.Comma_F)


                self.state = 922
                self.distance_rst_func_call()
                self.state = 924
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 923
                    self.match(AmberMRParser.Comma_F)


                self.state = 926
                self.match(AmberMRParser.Real_F)
                self.state = 927
                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 = 952
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,131,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 931
                self.match(AmberMRParser.Integer_F)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 932
                self.match(AmberMRParser.L_paren_F)
                self.state = 933
                self.match(AmberMRParser.Integer_F)
                self.state = 934
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 935
                self.match(AmberMRParser.L_brace_F)
                self.state = 936
                self.match(AmberMRParser.Integer_F)
                self.state = 937
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 938
                self.match(AmberMRParser.L_brakt_F)
                self.state = 939
                self.match(AmberMRParser.Integer_F)
                self.state = 940
                self.match(AmberMRParser.R_brakt_F)
                pass

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

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 942
                self.match(AmberMRParser.L_paren_F)
                self.state = 943
                self.match(AmberMRParser.Ambmask_F)
                self.state = 944
                self.match(AmberMRParser.R_paren_F)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 945
                self.match(AmberMRParser.L_brace_F)
                self.state = 946
                self.match(AmberMRParser.Ambmask_F)
                self.state = 947
                self.match(AmberMRParser.R_brace_F)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 948
                self.match(AmberMRParser.L_brakt_F)
                self.state = 949
                self.match(AmberMRParser.Ambmask_F)
                self.state = 950
                self.match(AmberMRParser.R_brakt_F)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 951
                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 = 1005
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,141,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 954
                self.match(AmberMRParser.PLANE_F)
                self.state = 955
                self.match(AmberMRParser.L_paren_F)
                self.state = 956
                self.restraint_func_expr()
                self.state = 958
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 965
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 971
                self.match(AmberMRParser.PLANE_F)
                self.state = 972
                self.match(AmberMRParser.L_brace_F)
                self.state = 973
                self.restraint_func_expr()
                self.state = 975
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    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==220:
                    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==220:
                    self.state = 982
                    self.match(AmberMRParser.Comma_F)


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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 988
                self.match(AmberMRParser.PLANE_F)
                self.state = 989
                self.match(AmberMRParser.L_brakt_F)
                self.state = 990
                self.restraint_func_expr()
                self.state = 992
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 991
                    self.match(AmberMRParser.Comma_F)


                self.state = 994
                self.restraint_func_expr()
                self.state = 996
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 995
                    self.match(AmberMRParser.Comma_F)


                self.state = 998
                self.restraint_func_expr()
                self.state = 1000
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==220:
                    self.state = 999
                    self.match(AmberMRParser.Comma_F)


                self.state = 1002
                self.restraint_func_expr()
                self.state = 1003
                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 = 1049
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,148,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1007
                self.match(AmberMRParser.COM_F)
                self.state = 1008
                self.match(AmberMRParser.L_paren_F)
                self.state = 1009
                self.restraint_func_expr()
                self.state = 1016
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 216)) & ~0x3f) == 0 and ((1 << (_la - 216)) & 699) != 0):
                    self.state = 1011
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==220:
                        self.state = 1010
                        self.match(AmberMRParser.Comma_F)


                    self.state = 1013
                    self.restraint_func_expr()
                    self.state = 1018
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1021
                self.match(AmberMRParser.COM_F)
                self.state = 1022
                self.match(AmberMRParser.L_brace_F)
                self.state = 1023
                self.restraint_func_expr()
                self.state = 1030
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 216)) & ~0x3f) == 0 and ((1 << (_la - 216)) & 699) != 0):
                    self.state = 1025
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==220:
                        self.state = 1024
                        self.match(AmberMRParser.Comma_F)


                    self.state = 1027
                    self.restraint_func_expr()
                    self.state = 1032
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1035
                self.match(AmberMRParser.COM_F)
                self.state = 1036
                self.match(AmberMRParser.L_brakt_F)
                self.state = 1037
                self.restraint_func_expr()
                self.state = 1044
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 216)) & ~0x3f) == 0 and ((1 << (_la - 216)) & 699) != 0):
                    self.state = 1039
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==220:
                        self.state = 1038
                        self.match(AmberMRParser.Comma_F)


                    self.state = 1041
                    self.restraint_func_expr()
                    self.state = 1046
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1047
                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 Unambig_atom_name_mappingContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


        def getRuleIndex(self):
            return AmberMRParser.RULE_unambig_atom_name_mapping

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

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




    def unambig_atom_name_mapping(self):

        localctx = AmberMRParser.Unambig_atom_name_mappingContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_unambig_atom_name_mapping)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1051
            self.match(AmberMRParser.Residue)
            self.state = 1052
            self.match(AmberMRParser.Simple_name)
            self.state = 1054 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1053
                self.mapping_list()
                self.state = 1056 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==142):
                    break

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


    class Mapping_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

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

        def getRuleIndex(self):
            return AmberMRParser.RULE_mapping_list

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

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




    def mapping_list(self):

        localctx = AmberMRParser.Mapping_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_mapping_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1058
            self.match(AmberMRParser.Mapping)
            self.state = 1059
            self.match(AmberMRParser.Simple_name_MP)
            self.state = 1060
            self.match(AmberMRParser.Equ_op_MP)
            self.state = 1062 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1061
                self.match(AmberMRParser.Simple_name_MP)
                self.state = 1064 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==231):
                    break

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


    class Ambig_atom_name_mappingContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


        def getRuleIndex(self):
            return AmberMRParser.RULE_ambig_atom_name_mapping

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

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




    def ambig_atom_name_mapping(self):

        localctx = AmberMRParser.Ambig_atom_name_mappingContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_ambig_atom_name_mapping)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1068
            self.match(AmberMRParser.Residue)
            self.state = 1069
            self.match(AmberMRParser.Simple_name)
            self.state = 1071 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1070
                self.ambig_list()
                self.state = 1073 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==143):
                    break

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


    class Ambig_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return AmberMRParser.RULE_ambig_list

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

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




    def ambig_list(self):

        localctx = AmberMRParser.Ambig_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_ambig_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1075
            self.match(AmberMRParser.Ambig)
            self.state = 1076
            _la = self._input.LA(1)
            if not(_la==229 or _la==231):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 1077
            self.match(AmberMRParser.Equ_op_MP)
            self.state = 1080 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1078
                self.match(AmberMRParser.Simple_name_MP)
                self.state = 1079
                self.match(AmberMRParser.Integer_MP)
                self.state = 1082 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==231):
                    break

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





