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

class CyanaMRParser ( Parser ):

    grammarFileName = "CyanaMRParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'NOEUPP'", "'NOELOW'", "'TYPE'", "<INVALID>", "'OR'", 
                     "'SSBOND'", "<INVALID>", "'HBOND'", "'LINK'", "<INVALID>", 
                     "'VAR'", "'UNSET'", "<INVALID>", "'PRINT'", "'RESIDUE'", 
                     "'MAPPING'", "'AMBIG'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'ATOM1'", "'ATOM2'", "'RESIDUE1'", "'RESIDUE2'" ]

    symbolicNames = [ "<INVALID>", "Ambig_code", "Integer", "Float", "Orientation_header", 
                      "Tensor_header", "SMCLN_COMMENT", "COMMENT", "NoeUpp", 
                      "NoeLow", "Type", "Equ_op", "Or", "Ssbond", "Ssbond_resids", 
                      "Hbond", "Link", "Atom_stereo", "Var", "Unset", "SetVar", 
                      "Print", "Residue", "Mapping", "Ambig", "Simple_name", 
                      "SPACE", "ENCLOSE_COMMENT", "SECTION_COMMENT", "LINE_COMMENT", 
                      "Any_name", "SPACE_CM", "RETURN_CM", "Atom1", "Atom2", 
                      "Residue1", "Residue2", "Equ_op_HB", "Integer_HB", 
                      "Simple_name_HB", "SPACE_HB", "RETURN_HB", "LINE_COMMENT_HB", 
                      "Double_quote_string", "SPACE_PR", "RETURN_PR", "LINE_COMMENT_PR", 
                      "Simple_name_VA", "SPACE_VA", "RETURN_VA", "LINE_COMMENT_VA", 
                      "Ambig_code_MP", "Integer_MP", "Simple_name_MP", "Equ_op_MP", 
                      "SPACE_MP", "RETURN_MP", "LINE_COMMENT_MP" ]

    RULE_cyana_mr = 0
    RULE_comment = 1
    RULE_distance_restraints = 2
    RULE_distance_restraint = 3
    RULE_torsion_angle_restraints = 4
    RULE_torsion_angle_restraint = 5
    RULE_rdc_restraints = 6
    RULE_rdc_parameter = 7
    RULE_rdc_restraint = 8
    RULE_pcs_restraints = 9
    RULE_pcs_parameter = 10
    RULE_pcs_restraint = 11
    RULE_fixres_distance_restraints = 12
    RULE_fixres_distance_restraint = 13
    RULE_fixresw_distance_restraints = 14
    RULE_fixresw_distance_restraint = 15
    RULE_fixresw2_distance_restraints = 16
    RULE_fixresw2_distance_restraint = 17
    RULE_fixatm_distance_restraints = 18
    RULE_fixatm_distance_restraint = 19
    RULE_fixatmw_distance_restraints = 20
    RULE_fixatmw_distance_restraint = 21
    RULE_fixatmw2_distance_restraints = 22
    RULE_fixatmw2_distance_restraint = 23
    RULE_qconvr_distance_restraints = 24
    RULE_qconvr_distance_restraint = 25
    RULE_distance_w_chain_restraints = 26
    RULE_distance_w_chain_restraint = 27
    RULE_distance_w_chain2_restraints = 28
    RULE_distance_w_chain2_restraint = 29
    RULE_distance_w_chain3_restraints = 30
    RULE_distance_w_chain3_restraint = 31
    RULE_torsion_angle_w_chain_restraints = 32
    RULE_torsion_angle_w_chain_restraint = 33
    RULE_cco_restraints = 34
    RULE_cco_restraint = 35
    RULE_ssbond_macro = 36
    RULE_hbond_macro = 37
    RULE_link_statement = 38
    RULE_stereoassign_macro = 39
    RULE_declare_variable = 40
    RULE_set_variable = 41
    RULE_unset_variable = 42
    RULE_print_macro = 43
    RULE_unambig_atom_name_mapping = 44
    RULE_mapping_list = 45
    RULE_ambig_atom_name_mapping = 46
    RULE_ambig_list = 47
    RULE_number = 48
    RULE_gen_atom_name = 49

    ruleNames =  [ "cyana_mr", "comment", "distance_restraints", "distance_restraint", 
                   "torsion_angle_restraints", "torsion_angle_restraint", 
                   "rdc_restraints", "rdc_parameter", "rdc_restraint", "pcs_restraints", 
                   "pcs_parameter", "pcs_restraint", "fixres_distance_restraints", 
                   "fixres_distance_restraint", "fixresw_distance_restraints", 
                   "fixresw_distance_restraint", "fixresw2_distance_restraints", 
                   "fixresw2_distance_restraint", "fixatm_distance_restraints", 
                   "fixatm_distance_restraint", "fixatmw_distance_restraints", 
                   "fixatmw_distance_restraint", "fixatmw2_distance_restraints", 
                   "fixatmw2_distance_restraint", "qconvr_distance_restraints", 
                   "qconvr_distance_restraint", "distance_w_chain_restraints", 
                   "distance_w_chain_restraint", "distance_w_chain2_restraints", 
                   "distance_w_chain2_restraint", "distance_w_chain3_restraints", 
                   "distance_w_chain3_restraint", "torsion_angle_w_chain_restraints", 
                   "torsion_angle_w_chain_restraint", "cco_restraints", 
                   "cco_restraint", "ssbond_macro", "hbond_macro", "link_statement", 
                   "stereoassign_macro", "declare_variable", "set_variable", 
                   "unset_variable", "print_macro", "unambig_atom_name_mapping", 
                   "mapping_list", "ambig_atom_name_mapping", "ambig_list", 
                   "number", "gen_atom_name" ]

    EOF = Token.EOF
    Ambig_code=1
    Integer=2
    Float=3
    Orientation_header=4
    Tensor_header=5
    SMCLN_COMMENT=6
    COMMENT=7
    NoeUpp=8
    NoeLow=9
    Type=10
    Equ_op=11
    Or=12
    Ssbond=13
    Ssbond_resids=14
    Hbond=15
    Link=16
    Atom_stereo=17
    Var=18
    Unset=19
    SetVar=20
    Print=21
    Residue=22
    Mapping=23
    Ambig=24
    Simple_name=25
    SPACE=26
    ENCLOSE_COMMENT=27
    SECTION_COMMENT=28
    LINE_COMMENT=29
    Any_name=30
    SPACE_CM=31
    RETURN_CM=32
    Atom1=33
    Atom2=34
    Residue1=35
    Residue2=36
    Equ_op_HB=37
    Integer_HB=38
    Simple_name_HB=39
    SPACE_HB=40
    RETURN_HB=41
    LINE_COMMENT_HB=42
    Double_quote_string=43
    SPACE_PR=44
    RETURN_PR=45
    LINE_COMMENT_PR=46
    Simple_name_VA=47
    SPACE_VA=48
    RETURN_VA=49
    LINE_COMMENT_VA=50
    Ambig_code_MP=51
    Integer_MP=52
    Simple_name_MP=53
    Equ_op_MP=54
    SPACE_MP=55
    RETURN_MP=56
    LINE_COMMENT_MP=57

    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 Cyana_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(CyanaMRParser.EOF, 0)

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

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

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


        def distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_restraintsContext,i)


        def fixres_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixres_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixres_distance_restraintsContext,i)


        def fixresw_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixresw_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixresw_distance_restraintsContext,i)


        def fixresw2_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixresw2_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixresw2_distance_restraintsContext,i)


        def fixatm_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatm_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatm_distance_restraintsContext,i)


        def fixatmw_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatmw_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatmw_distance_restraintsContext,i)


        def fixatmw2_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatmw2_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatmw2_distance_restraintsContext,i)


        def qconvr_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Qconvr_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Qconvr_distance_restraintsContext,i)


        def distance_w_chain_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain_restraintsContext,i)


        def distance_w_chain2_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain2_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain2_restraintsContext,i)


        def distance_w_chain3_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain3_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain3_restraintsContext,i)


        def torsion_angle_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Torsion_angle_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Torsion_angle_restraintsContext,i)


        def torsion_angle_w_chain_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Torsion_angle_w_chain_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Torsion_angle_w_chain_restraintsContext,i)


        def rdc_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Rdc_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Rdc_restraintsContext,i)


        def pcs_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Pcs_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Pcs_restraintsContext,i)


        def cco_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Cco_restraintsContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Cco_restraintsContext,i)


        def ssbond_macro(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Ssbond_macroContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Ssbond_macroContext,i)


        def hbond_macro(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Hbond_macroContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Hbond_macroContext,i)


        def link_statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Link_statementContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Link_statementContext,i)


        def stereoassign_macro(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Stereoassign_macroContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Stereoassign_macroContext,i)


        def declare_variable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Declare_variableContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Declare_variableContext,i)


        def set_variable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Set_variableContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Set_variableContext,i)


        def unset_variable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Unset_variableContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Unset_variableContext,i)


        def print_macro(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Print_macroContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Print_macroContext,i)


        def unambig_atom_name_mapping(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Unambig_atom_name_mappingContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Unambig_atom_name_mappingContext,i)


        def ambig_atom_name_mapping(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Ambig_atom_name_mappingContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Ambig_atom_name_mappingContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_cyana_mr

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

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




    def cyana_mr(self):

        localctx = CyanaMRParser.Cyana_mrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_cyana_mr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 131
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 41919412) != 0):
                self.state = 129
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
                if la_ == 1:
                    self.state = 100
                    self.match(CyanaMRParser.Orientation_header)
                    pass

                elif la_ == 2:
                    self.state = 101
                    self.match(CyanaMRParser.Tensor_header)
                    pass

                elif la_ == 3:
                    self.state = 102
                    self.comment()
                    pass

                elif la_ == 4:
                    self.state = 103
                    self.distance_restraints()
                    pass

                elif la_ == 5:
                    self.state = 104
                    self.fixres_distance_restraints()
                    pass

                elif la_ == 6:
                    self.state = 105
                    self.fixresw_distance_restraints()
                    pass

                elif la_ == 7:
                    self.state = 106
                    self.fixresw2_distance_restraints()
                    pass

                elif la_ == 8:
                    self.state = 107
                    self.fixatm_distance_restraints()
                    pass

                elif la_ == 9:
                    self.state = 108
                    self.fixatmw_distance_restraints()
                    pass

                elif la_ == 10:
                    self.state = 109
                    self.fixatmw2_distance_restraints()
                    pass

                elif la_ == 11:
                    self.state = 110
                    self.qconvr_distance_restraints()
                    pass

                elif la_ == 12:
                    self.state = 111
                    self.distance_w_chain_restraints()
                    pass

                elif la_ == 13:
                    self.state = 112
                    self.distance_w_chain2_restraints()
                    pass

                elif la_ == 14:
                    self.state = 113
                    self.distance_w_chain3_restraints()
                    pass

                elif la_ == 15:
                    self.state = 114
                    self.torsion_angle_restraints()
                    pass

                elif la_ == 16:
                    self.state = 115
                    self.torsion_angle_w_chain_restraints()
                    pass

                elif la_ == 17:
                    self.state = 116
                    self.rdc_restraints()
                    pass

                elif la_ == 18:
                    self.state = 117
                    self.pcs_restraints()
                    pass

                elif la_ == 19:
                    self.state = 118
                    self.cco_restraints()
                    pass

                elif la_ == 20:
                    self.state = 119
                    self.ssbond_macro()
                    pass

                elif la_ == 21:
                    self.state = 120
                    self.hbond_macro()
                    pass

                elif la_ == 22:
                    self.state = 121
                    self.link_statement()
                    pass

                elif la_ == 23:
                    self.state = 122
                    self.stereoassign_macro()
                    pass

                elif la_ == 24:
                    self.state = 123
                    self.declare_variable()
                    pass

                elif la_ == 25:
                    self.state = 124
                    self.set_variable()
                    pass

                elif la_ == 26:
                    self.state = 125
                    self.unset_variable()
                    pass

                elif la_ == 27:
                    self.state = 126
                    self.print_macro()
                    pass

                elif la_ == 28:
                    self.state = 127
                    self.unambig_atom_name_mapping()
                    pass

                elif la_ == 29:
                    self.state = 128
                    self.ambig_atom_name_mapping()
                    pass


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

            self.state = 134
            self.match(CyanaMRParser.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(CyanaMRParser.COMMENT, 0)

        def RETURN_CM(self):
            return self.getToken(CyanaMRParser.RETURN_CM, 0)

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

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

        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.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 = 136
            self.match(CyanaMRParser.COMMENT)
            self.state = 140
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==30:
                self.state = 137
                self.match(CyanaMRParser.Any_name)
                self.state = 142
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 143
            _la = self._input.LA(1)
            if not(_la==-1 or _la==32):
                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 Distance_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_restraints

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

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




    def distance_restraints(self):

        localctx = CyanaMRParser.Distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 145
                    self.distance_restraint()

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

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

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

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

        def gen_atom_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Gen_atom_nameContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Gen_atom_nameContext,i)


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_restraint

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

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




    def distance_restraint(self):

        localctx = CyanaMRParser.Distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 150
            self.match(CyanaMRParser.Integer)
            self.state = 151
            self.match(CyanaMRParser.Simple_name)
            self.state = 152
            self.gen_atom_name()
            self.state = 153
            self.match(CyanaMRParser.Integer)
            self.state = 154
            self.match(CyanaMRParser.Simple_name)
            self.state = 155
            self.gen_atom_name()
            self.state = 156
            self.number()
            self.state = 158
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,4,self._ctx)
            if la_ == 1:
                self.state = 157
                self.number()


            self.state = 161
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.state = 160
                self.number()


            self.state = 164
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 163
                self.number()


            self.state = 167
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 166
                self.number()


            self.state = 170
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.state = 169
                self.number()


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


    class Torsion_angle_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def torsion_angle_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Torsion_angle_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Torsion_angle_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_torsion_angle_restraints

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

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




    def torsion_angle_restraints(self):

        localctx = CyanaMRParser.Torsion_angle_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_torsion_angle_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 173 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 172
                    self.torsion_angle_restraint()

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

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


    class Torsion_angle_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


        def Type(self):
            return self.getToken(CyanaMRParser.Type, 0)

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

        def Or(self):
            return self.getToken(CyanaMRParser.Or, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_torsion_angle_restraint

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

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




    def torsion_angle_restraint(self):

        localctx = CyanaMRParser.Torsion_angle_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_torsion_angle_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 177
            self.match(CyanaMRParser.Integer)
            self.state = 178
            self.match(CyanaMRParser.Simple_name)
            self.state = 179
            self.match(CyanaMRParser.Simple_name)
            self.state = 180
            self.number()
            self.state = 181
            self.number()
            self.state = 183
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.state = 182
                self.number()


            self.state = 188
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==10:
                self.state = 185
                self.match(CyanaMRParser.Type)
                self.state = 186
                self.match(CyanaMRParser.Equ_op)
                self.state = 187
                self.match(CyanaMRParser.Integer)


            self.state = 191
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==12:
                self.state = 190
                self.match(CyanaMRParser.Or)


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


    class Rdc_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def rdc_parameter(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Rdc_parameterContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Rdc_parameterContext,i)


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


        def rdc_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Rdc_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Rdc_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_rdc_restraints

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

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




    def rdc_restraints(self):

        localctx = CyanaMRParser.Rdc_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_rdc_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 194 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 193
                    self.rdc_parameter()

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

            self.state = 201
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,14,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 198
                    self.comment() 
                self.state = 203
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,14,self._ctx)

            self.state = 205 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 204
                    self.rdc_restraint()

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

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_rdc_parameter

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

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




    def rdc_parameter(self):

        localctx = CyanaMRParser.Rdc_parameterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_rdc_parameter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            self.match(CyanaMRParser.Integer)
            self.state = 210
            self.number()
            self.state = 211
            self.number()
            self.state = 212
            self.match(CyanaMRParser.Integer)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Rdc_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_rdc_restraint

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

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




    def rdc_restraint(self):

        localctx = CyanaMRParser.Rdc_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_rdc_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 217
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==7:
                self.state = 214
                self.comment()
                self.state = 219
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 220
            self.match(CyanaMRParser.Integer)
            self.state = 221
            self.match(CyanaMRParser.Simple_name)
            self.state = 222
            self.match(CyanaMRParser.Simple_name)
            self.state = 223
            self.match(CyanaMRParser.Integer)
            self.state = 224
            self.match(CyanaMRParser.Simple_name)
            self.state = 225
            self.match(CyanaMRParser.Simple_name)
            self.state = 226
            self.number()
            self.state = 227
            self.number()
            self.state = 228
            self.number()
            self.state = 229
            self.match(CyanaMRParser.Integer)
            self.state = 231
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                self.state = 230
                self.number()


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


    class Pcs_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pcs_parameter(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Pcs_parameterContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Pcs_parameterContext,i)


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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_pcs_restraints

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

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




    def pcs_restraints(self):

        localctx = CyanaMRParser.Pcs_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_pcs_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 234 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 233
                    self.pcs_parameter()

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

            self.state = 241
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,19,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 238
                    self.comment() 
                self.state = 243
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,self._ctx)

            self.state = 245 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 244
                    self.pcs_restraint()

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

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


    class Pcs_parameterContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_pcs_parameter

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

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




    def pcs_parameter(self):

        localctx = CyanaMRParser.Pcs_parameterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_pcs_parameter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 249
            self.match(CyanaMRParser.Integer)
            self.state = 250
            self.number()
            self.state = 251
            self.number()
            self.state = 252
            self.match(CyanaMRParser.Integer)
        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 Integer(self, i:int=None):
            if i is None:
                return self.getTokens(CyanaMRParser.Integer)
            else:
                return self.getToken(CyanaMRParser.Integer, i)

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.Pcs_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_pcs_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 257
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==7:
                self.state = 254
                self.comment()
                self.state = 259
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 260
            self.match(CyanaMRParser.Integer)
            self.state = 261
            self.match(CyanaMRParser.Simple_name)
            self.state = 262
            self.match(CyanaMRParser.Simple_name)
            self.state = 263
            self.number()
            self.state = 264
            self.number()
            self.state = 265
            self.number()
            self.state = 266
            self.match(CyanaMRParser.Integer)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Fixres_distance_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def fixres_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixres_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixres_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixres_distance_restraints

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

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




    def fixres_distance_restraints(self):

        localctx = CyanaMRParser.Fixres_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_fixres_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 269 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 268
                    self.fixres_distance_restraint()

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

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixres_distance_restraint

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

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




    def fixres_distance_restraint(self):

        localctx = CyanaMRParser.Fixres_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_fixres_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 273
            self.match(CyanaMRParser.Integer)
            self.state = 274
            self.match(CyanaMRParser.Simple_name)
            self.state = 276
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
            if la_ == 1:
                self.state = 275
                self.comment()


            self.state = 284 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 284
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [25]:
                        self.state = 278
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 279
                        self.match(CyanaMRParser.Integer)
                        self.state = 280
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 281
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 282
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 283
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


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

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

        def fixresw_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixresw_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixresw_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixresw_distance_restraints

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

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




    def fixresw_distance_restraints(self):

        localctx = CyanaMRParser.Fixresw_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_fixresw_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 289 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 288
                    self.fixresw_distance_restraint()

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

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixresw_distance_restraint

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

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




    def fixresw_distance_restraint(self):

        localctx = CyanaMRParser.Fixresw_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_fixresw_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            self.match(CyanaMRParser.Integer)
            self.state = 294
            self.match(CyanaMRParser.Simple_name)
            self.state = 296
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 295
                self.comment()


            self.state = 306 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 306
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [25]:
                        self.state = 298
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 299
                        self.match(CyanaMRParser.Integer)
                        self.state = 300
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 301
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 302
                        self.number()
                        self.state = 303
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 305
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


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

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

        def fixresw2_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixresw2_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixresw2_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixresw2_distance_restraints

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

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




    def fixresw2_distance_restraints(self):

        localctx = CyanaMRParser.Fixresw2_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_fixresw2_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 311 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 310
                    self.fixresw2_distance_restraint()

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

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixresw2_distance_restraint

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

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




    def fixresw2_distance_restraint(self):

        localctx = CyanaMRParser.Fixresw2_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_fixresw2_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 315
            self.match(CyanaMRParser.Integer)
            self.state = 316
            self.match(CyanaMRParser.Simple_name)
            self.state = 318
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,31,self._ctx)
            if la_ == 1:
                self.state = 317
                self.comment()


            self.state = 329 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 329
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [25]:
                        self.state = 320
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 321
                        self.match(CyanaMRParser.Integer)
                        self.state = 322
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 323
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 324
                        self.number()
                        self.state = 325
                        self.number()
                        self.state = 326
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 328
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


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

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

        def fixatm_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatm_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatm_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatm_distance_restraints

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

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




    def fixatm_distance_restraints(self):

        localctx = CyanaMRParser.Fixatm_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_fixatm_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 334 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 333
                    self.fixatm_distance_restraint()

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

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatm_distance_restraint

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

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




    def fixatm_distance_restraint(self):

        localctx = CyanaMRParser.Fixatm_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_fixatm_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 338
            self.match(CyanaMRParser.Integer)
            self.state = 339
            self.match(CyanaMRParser.Simple_name)
            self.state = 340
            self.match(CyanaMRParser.Simple_name)
            self.state = 342
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,35,self._ctx)
            if la_ == 1:
                self.state = 341
                self.comment()


            self.state = 349 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 349
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [2]:
                        self.state = 344
                        self.match(CyanaMRParser.Integer)
                        self.state = 345
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 346
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 347
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 348
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


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

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

        def fixatmw_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatmw_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatmw_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatmw_distance_restraints

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

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




    def fixatmw_distance_restraints(self):

        localctx = CyanaMRParser.Fixatmw_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_fixatmw_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 354 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 353
                    self.fixatmw_distance_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 356 
                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 Fixatmw_distance_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatmw_distance_restraint

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

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




    def fixatmw_distance_restraint(self):

        localctx = CyanaMRParser.Fixatmw_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_fixatmw_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 358
            self.match(CyanaMRParser.Integer)
            self.state = 359
            self.match(CyanaMRParser.Simple_name)
            self.state = 360
            self.match(CyanaMRParser.Simple_name)
            self.state = 362
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,39,self._ctx)
            if la_ == 1:
                self.state = 361
                self.comment()


            self.state = 371 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 371
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [2]:
                        self.state = 364
                        self.match(CyanaMRParser.Integer)
                        self.state = 365
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 366
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 367
                        self.number()
                        self.state = 368
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 370
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


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

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

        def fixatmw2_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Fixatmw2_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Fixatmw2_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatmw2_distance_restraints

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

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




    def fixatmw2_distance_restraints(self):

        localctx = CyanaMRParser.Fixatmw2_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_fixatmw2_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 376 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 375
                    self.fixatmw2_distance_restraint()

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

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

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

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_fixatmw2_distance_restraint

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

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




    def fixatmw2_distance_restraint(self):

        localctx = CyanaMRParser.Fixatmw2_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_fixatmw2_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self.match(CyanaMRParser.Integer)
            self.state = 381
            self.match(CyanaMRParser.Simple_name)
            self.state = 382
            self.match(CyanaMRParser.Simple_name)
            self.state = 384
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
            if la_ == 1:
                self.state = 383
                self.comment()


            self.state = 394 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 394
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [2]:
                        self.state = 386
                        self.match(CyanaMRParser.Integer)
                        self.state = 387
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 388
                        self.match(CyanaMRParser.Simple_name)
                        self.state = 389
                        self.number()
                        self.state = 390
                        self.number()
                        self.state = 391
                        self.number()
                        pass
                    elif token in [7]:
                        self.state = 393
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


                else:
                    raise NoViableAltException(self)
                self.state = 396 
                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 Qconvr_distance_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def qconvr_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Qconvr_distance_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Qconvr_distance_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_qconvr_distance_restraints

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

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




    def qconvr_distance_restraints(self):

        localctx = CyanaMRParser.Qconvr_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_qconvr_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 399 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 398
                    self.qconvr_distance_restraint()

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

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

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

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

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


        def NoeUpp(self):
            return self.getToken(CyanaMRParser.NoeUpp, 0)

        def NoeLow(self):
            return self.getToken(CyanaMRParser.NoeLow, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_qconvr_distance_restraint

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

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




    def qconvr_distance_restraint(self):

        localctx = CyanaMRParser.Qconvr_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_qconvr_distance_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 403
            _la = self._input.LA(1)
            if not(_la==8 or _la==9):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 404
            self.match(CyanaMRParser.Simple_name)
            self.state = 405
            self.match(CyanaMRParser.Integer)
            self.state = 406
            self.match(CyanaMRParser.Simple_name)
            self.state = 407
            self.match(CyanaMRParser.Simple_name)
            self.state = 408
            self.match(CyanaMRParser.Integer)
            self.state = 409
            self.match(CyanaMRParser.Simple_name)
            self.state = 410
            self.number()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Distance_w_chain_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def distance_w_chain_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain_restraints

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

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




    def distance_w_chain_restraints(self):

        localctx = CyanaMRParser.Distance_w_chain_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_distance_w_chain_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 413 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 412
                    self.distance_w_chain_restraint()

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

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

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain_restraint

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

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




    def distance_w_chain_restraint(self):

        localctx = CyanaMRParser.Distance_w_chain_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_distance_w_chain_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 417
            self.match(CyanaMRParser.Integer)
            self.state = 418
            self.match(CyanaMRParser.Simple_name)
            self.state = 419
            self.match(CyanaMRParser.Simple_name)
            self.state = 420
            self.match(CyanaMRParser.Simple_name)
            self.state = 421
            self.match(CyanaMRParser.Integer)
            self.state = 422
            self.match(CyanaMRParser.Simple_name)
            self.state = 423
            self.match(CyanaMRParser.Simple_name)
            self.state = 424
            self.match(CyanaMRParser.Simple_name)
            self.state = 425
            self.number()
            self.state = 427
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.state = 426
                self.number()


            self.state = 430
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,49,self._ctx)
            if la_ == 1:
                self.state = 429
                self.number()


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


    class Distance_w_chain2_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def distance_w_chain2_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain2_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain2_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain2_restraints

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

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




    def distance_w_chain2_restraints(self):

        localctx = CyanaMRParser.Distance_w_chain2_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_distance_w_chain2_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 433 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 432
                    self.distance_w_chain2_restraint()

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

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

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain2_restraint

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

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




    def distance_w_chain2_restraint(self):

        localctx = CyanaMRParser.Distance_w_chain2_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_distance_w_chain2_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 437
            self.match(CyanaMRParser.Simple_name)
            self.state = 438
            self.match(CyanaMRParser.Integer)
            self.state = 439
            self.match(CyanaMRParser.Simple_name)
            self.state = 440
            self.match(CyanaMRParser.Simple_name)
            self.state = 441
            self.match(CyanaMRParser.Simple_name)
            self.state = 442
            self.match(CyanaMRParser.Integer)
            self.state = 443
            self.match(CyanaMRParser.Simple_name)
            self.state = 444
            self.match(CyanaMRParser.Simple_name)
            self.state = 445
            self.number()
            self.state = 447
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,51,self._ctx)
            if la_ == 1:
                self.state = 446
                self.number()


            self.state = 450
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,52,self._ctx)
            if la_ == 1:
                self.state = 449
                self.number()


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


    class Distance_w_chain3_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def distance_w_chain3_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Distance_w_chain3_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Distance_w_chain3_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain3_restraints

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

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




    def distance_w_chain3_restraints(self):

        localctx = CyanaMRParser.Distance_w_chain3_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_distance_w_chain3_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 453 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 452
                    self.distance_w_chain3_restraint()

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

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

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_distance_w_chain3_restraint

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

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




    def distance_w_chain3_restraint(self):

        localctx = CyanaMRParser.Distance_w_chain3_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_distance_w_chain3_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 457
            self.match(CyanaMRParser.Simple_name)
            self.state = 458
            self.match(CyanaMRParser.Simple_name)
            self.state = 459
            self.match(CyanaMRParser.Integer)
            self.state = 460
            self.match(CyanaMRParser.Simple_name)
            self.state = 461
            self.match(CyanaMRParser.Simple_name)
            self.state = 462
            self.match(CyanaMRParser.Simple_name)
            self.state = 463
            self.match(CyanaMRParser.Integer)
            self.state = 464
            self.match(CyanaMRParser.Simple_name)
            self.state = 465
            self.number()
            self.state = 467
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,54,self._ctx)
            if la_ == 1:
                self.state = 466
                self.number()


            self.state = 470
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
            if la_ == 1:
                self.state = 469
                self.number()


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


    class Torsion_angle_w_chain_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def torsion_angle_w_chain_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Torsion_angle_w_chain_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Torsion_angle_w_chain_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_torsion_angle_w_chain_restraints

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

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




    def torsion_angle_w_chain_restraints(self):

        localctx = CyanaMRParser.Torsion_angle_w_chain_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_torsion_angle_w_chain_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 473 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 472
                    self.torsion_angle_w_chain_restraint()

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

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

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

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

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


        def Type(self):
            return self.getToken(CyanaMRParser.Type, 0)

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

        def Or(self):
            return self.getToken(CyanaMRParser.Or, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_torsion_angle_w_chain_restraint

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

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




    def torsion_angle_w_chain_restraint(self):

        localctx = CyanaMRParser.Torsion_angle_w_chain_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_torsion_angle_w_chain_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 477
            self.match(CyanaMRParser.Simple_name)
            self.state = 478
            self.match(CyanaMRParser.Integer)
            self.state = 479
            self.match(CyanaMRParser.Simple_name)
            self.state = 480
            self.match(CyanaMRParser.Simple_name)
            self.state = 481
            self.number()
            self.state = 482
            self.number()
            self.state = 484
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,57,self._ctx)
            if la_ == 1:
                self.state = 483
                self.number()


            self.state = 489
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==10:
                self.state = 486
                self.match(CyanaMRParser.Type)
                self.state = 487
                self.match(CyanaMRParser.Equ_op)
                self.state = 488
                self.match(CyanaMRParser.Integer)


            self.state = 492
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==12:
                self.state = 491
                self.match(CyanaMRParser.Or)


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


    class Cco_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def cco_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(CyanaMRParser.Cco_restraintContext)
            else:
                return self.getTypedRuleContext(CyanaMRParser.Cco_restraintContext,i)


        def getRuleIndex(self):
            return CyanaMRParser.RULE_cco_restraints

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

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




    def cco_restraints(self):

        localctx = CyanaMRParser.Cco_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_cco_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 495 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 494
                    self.cco_restraint()

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

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

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

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

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


        def getRuleIndex(self):
            return CyanaMRParser.RULE_cco_restraint

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

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




    def cco_restraint(self):

        localctx = CyanaMRParser.Cco_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_cco_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 499
            self.match(CyanaMRParser.Integer)
            self.state = 500
            self.match(CyanaMRParser.Simple_name)
            self.state = 501
            self.match(CyanaMRParser.Simple_name)
            self.state = 502
            self.match(CyanaMRParser.Simple_name)
            self.state = 503
            self.number()
            self.state = 505
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,61,self._ctx)
            if la_ == 1:
                self.state = 504
                self.number()


            self.state = 508
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,62,self._ctx)
            if la_ == 1:
                self.state = 507
                self.number()


            self.state = 511
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,63,self._ctx)
            if la_ == 1:
                self.state = 510
                self.number()


            self.state = 514
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
            if la_ == 1:
                self.state = 513
                self.number()


            self.state = 517
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,65,self._ctx)
            if la_ == 1:
                self.state = 516
                self.number()


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


    class Ssbond_macroContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Ssbond(self):
            return self.getToken(CyanaMRParser.Ssbond, 0)

        def Ssbond_resids(self):
            return self.getToken(CyanaMRParser.Ssbond_resids, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_ssbond_macro

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

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




    def ssbond_macro(self):

        localctx = CyanaMRParser.Ssbond_macroContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_ssbond_macro)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 519
            self.match(CyanaMRParser.Ssbond)
            self.state = 520
            self.match(CyanaMRParser.Ssbond_resids)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Hbond_macroContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Hbond(self):
            return self.getToken(CyanaMRParser.Hbond, 0)

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

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

        def RETURN_HB(self):
            return self.getToken(CyanaMRParser.RETURN_HB, 0)

        def Atom1(self):
            return self.getToken(CyanaMRParser.Atom1, 0)

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

        def Residue1(self):
            return self.getToken(CyanaMRParser.Residue1, 0)

        def Atom2(self):
            return self.getToken(CyanaMRParser.Atom2, 0)

        def Residue2(self):
            return self.getToken(CyanaMRParser.Residue2, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_hbond_macro

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

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




    def hbond_macro(self):

        localctx = CyanaMRParser.Hbond_macroContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_hbond_macro)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 522
            self.match(CyanaMRParser.Hbond)
            self.state = 525
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==33:
                self.state = 523
                self.match(CyanaMRParser.Atom1)
                self.state = 524
                self.match(CyanaMRParser.Equ_op_HB)


            self.state = 527
            self.match(CyanaMRParser.Simple_name_HB)
            self.state = 530
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==35:
                self.state = 528
                self.match(CyanaMRParser.Residue1)
                self.state = 529
                self.match(CyanaMRParser.Equ_op_HB)


            self.state = 532
            self.match(CyanaMRParser.Integer_HB)
            self.state = 535
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==34:
                self.state = 533
                self.match(CyanaMRParser.Atom2)
                self.state = 534
                self.match(CyanaMRParser.Equ_op_HB)


            self.state = 537
            self.match(CyanaMRParser.Simple_name_HB)
            self.state = 540
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==36:
                self.state = 538
                self.match(CyanaMRParser.Residue2)
                self.state = 539
                self.match(CyanaMRParser.Equ_op_HB)


            self.state = 542
            self.match(CyanaMRParser.Integer_HB)
            self.state = 543
            self.match(CyanaMRParser.RETURN_HB)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Link_statementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Link(self):
            return self.getToken(CyanaMRParser.Link, 0)

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

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

        def getRuleIndex(self):
            return CyanaMRParser.RULE_link_statement

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

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




    def link_statement(self):

        localctx = CyanaMRParser.Link_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_link_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 545
            self.match(CyanaMRParser.Link)
            self.state = 546
            self.match(CyanaMRParser.Simple_name)
            self.state = 547
            self.match(CyanaMRParser.Integer)
            self.state = 548
            self.match(CyanaMRParser.Simple_name)
            self.state = 549
            self.match(CyanaMRParser.Integer)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Stereoassign_macroContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Atom_stereo(self):
            return self.getToken(CyanaMRParser.Atom_stereo, 0)

        def Double_quote_string(self):
            return self.getToken(CyanaMRParser.Double_quote_string, 0)

        def RETURN_PR(self):
            return self.getToken(CyanaMRParser.RETURN_PR, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_stereoassign_macro

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

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




    def stereoassign_macro(self):

        localctx = CyanaMRParser.Stereoassign_macroContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_stereoassign_macro)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 551
            self.match(CyanaMRParser.Atom_stereo)
            self.state = 552
            self.match(CyanaMRParser.Double_quote_string)
            self.state = 553
            self.match(CyanaMRParser.RETURN_PR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Declare_variableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Var(self):
            return self.getToken(CyanaMRParser.Var, 0)

        def RETURN_VA(self):
            return self.getToken(CyanaMRParser.RETURN_VA, 0)

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

        def getRuleIndex(self):
            return CyanaMRParser.RULE_declare_variable

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

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




    def declare_variable(self):

        localctx = CyanaMRParser.Declare_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_declare_variable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 555
            self.match(CyanaMRParser.Var)
            self.state = 559
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==47:
                self.state = 556
                self.match(CyanaMRParser.Simple_name_VA)
                self.state = 561
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class Set_variableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SetVar(self):
            return self.getToken(CyanaMRParser.SetVar, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_set_variable

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

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




    def set_variable(self):

        localctx = CyanaMRParser.Set_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_set_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 564
            self.match(CyanaMRParser.SetVar)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Unset_variableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Unset(self):
            return self.getToken(CyanaMRParser.Unset, 0)

        def RETURN_VA(self):
            return self.getToken(CyanaMRParser.RETURN_VA, 0)

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

        def getRuleIndex(self):
            return CyanaMRParser.RULE_unset_variable

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

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




    def unset_variable(self):

        localctx = CyanaMRParser.Unset_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_unset_variable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 566
            self.match(CyanaMRParser.Unset)
            self.state = 570
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==47:
                self.state = 567
                self.match(CyanaMRParser.Simple_name_VA)
                self.state = 572
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 573
            self.match(CyanaMRParser.RETURN_VA)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Print_macroContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Print(self):
            return self.getToken(CyanaMRParser.Print, 0)

        def Double_quote_string(self):
            return self.getToken(CyanaMRParser.Double_quote_string, 0)

        def RETURN_PR(self):
            return self.getToken(CyanaMRParser.RETURN_PR, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_print_macro

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

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




    def print_macro(self):

        localctx = CyanaMRParser.Print_macroContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_print_macro)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 575
            self.match(CyanaMRParser.Print)
            self.state = 576
            self.match(CyanaMRParser.Double_quote_string)
            self.state = 577
            self.match(CyanaMRParser.RETURN_PR)
        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(CyanaMRParser.Residue, 0)

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.Unambig_atom_name_mappingContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_unambig_atom_name_mapping)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 579
            self.match(CyanaMRParser.Residue)
            self.state = 580
            self.match(CyanaMRParser.Simple_name)
            self.state = 582
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,72,self._ctx)
            if la_ == 1:
                self.state = 581
                self.comment()


            self.state = 586 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 586
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [23]:
                        self.state = 584
                        self.mapping_list()
                        pass
                    elif token in [7]:
                        self.state = 585
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


                else:
                    raise NoViableAltException(self)
                self.state = 588 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,74,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 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(CyanaMRParser.Mapping, 0)

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

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

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

        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.Mapping_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_mapping_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 590
            self.match(CyanaMRParser.Mapping)
            self.state = 591
            self.match(CyanaMRParser.Simple_name_MP)
            self.state = 592
            self.match(CyanaMRParser.Equ_op_MP)
            self.state = 594 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 593
                self.match(CyanaMRParser.Simple_name_MP)
                self.state = 596 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==53):
                    break

            self.state = 598
            self.match(CyanaMRParser.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(CyanaMRParser.Residue, 0)

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

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


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


        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.Ambig_atom_name_mappingContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_ambig_atom_name_mapping)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 600
            self.match(CyanaMRParser.Residue)
            self.state = 601
            self.match(CyanaMRParser.Simple_name)
            self.state = 603
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,76,self._ctx)
            if la_ == 1:
                self.state = 602
                self.comment()


            self.state = 607 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 607
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [24]:
                        self.state = 605
                        self.ambig_list()
                        pass
                    elif token in [7]:
                        self.state = 606
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)


                else:
                    raise NoViableAltException(self)
                self.state = 609 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,78,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 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(CyanaMRParser.Ambig, 0)

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

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

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

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

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

        def getRuleIndex(self):
            return CyanaMRParser.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 = CyanaMRParser.Ambig_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_ambig_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 611
            self.match(CyanaMRParser.Ambig)
            self.state = 612
            _la = self._input.LA(1)
            if not(_la==51 or _la==53):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 613
            self.match(CyanaMRParser.Equ_op_MP)
            self.state = 616 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 614
                self.match(CyanaMRParser.Simple_name_MP)
                self.state = 615
                self.match(CyanaMRParser.Integer_MP)
                self.state = 618 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==53):
                    break

            self.state = 620
            self.match(CyanaMRParser.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 NumberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Float(self):
            return self.getToken(CyanaMRParser.Float, 0)

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

        def getRuleIndex(self):
            return CyanaMRParser.RULE_number

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

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




    def number(self):

        localctx = CyanaMRParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 622
            _la = self._input.LA(1)
            if not(_la==2 or _la==3):
                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 Gen_atom_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def Ambig_code(self):
            return self.getToken(CyanaMRParser.Ambig_code, 0)

        def getRuleIndex(self):
            return CyanaMRParser.RULE_gen_atom_name

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

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




    def gen_atom_name(self):

        localctx = CyanaMRParser.Gen_atom_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_gen_atom_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 624
            _la = self._input.LA(1)
            if not(_la==1 or _la==25):
                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





