# Generated from BarePKParser.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,22,421,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,1,0,3,0,50,8,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,65,8,0,10,0,12,0,68,9,
        0,1,0,1,0,1,1,4,1,73,8,1,11,1,12,1,74,1,2,1,2,1,2,1,2,1,2,1,2,1,
        2,1,2,1,2,1,2,1,2,5,2,88,8,2,10,2,12,2,91,9,2,1,2,1,2,1,3,4,3,96,
        8,3,11,3,12,3,97,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
        1,4,1,4,1,4,1,4,5,4,116,8,4,10,4,12,4,119,9,4,1,4,1,4,1,5,4,5,124,
        8,5,11,5,12,5,125,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
        6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6,149,8,6,10,6,12,6,152,
        9,6,1,6,1,6,1,7,4,7,157,8,7,11,7,12,7,158,1,8,1,8,1,8,1,8,1,8,1,
        8,1,8,1,8,1,8,5,8,170,8,8,10,8,12,8,173,9,8,1,8,1,8,1,9,4,9,178,
        8,9,11,9,12,9,179,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,
        10,1,10,1,10,1,10,5,10,195,8,10,10,10,12,10,198,9,10,1,10,1,10,1,
        11,4,11,203,8,11,11,11,12,11,204,1,12,1,12,1,12,1,12,1,12,1,12,1,
        12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,5,12,224,8,
        12,10,12,12,12,227,9,12,1,12,1,12,1,13,1,13,1,13,1,13,3,13,235,8,
        13,1,13,3,13,238,8,13,1,13,3,13,241,8,13,1,13,3,13,244,8,13,1,13,
        1,13,4,13,248,8,13,11,13,12,13,249,1,14,1,14,1,14,1,14,1,14,3,14,
        257,8,14,1,14,3,14,260,8,14,1,14,3,14,263,8,14,1,14,3,14,266,8,14,
        1,14,1,14,4,14,270,8,14,11,14,12,14,271,1,15,1,15,1,15,1,15,1,15,
        1,15,3,15,280,8,15,1,15,3,15,283,8,15,1,15,3,15,286,8,15,1,15,3,
        15,289,8,15,1,15,1,15,4,15,293,8,15,11,15,12,15,294,1,16,1,16,1,
        16,1,16,3,16,301,8,16,1,16,3,16,304,8,16,1,16,3,16,307,8,16,1,16,
        3,16,310,8,16,1,16,1,16,4,16,314,8,16,11,16,12,16,315,1,17,1,17,
        1,17,1,17,1,17,3,17,323,8,17,1,17,3,17,326,8,17,1,17,3,17,329,8,
        17,1,17,3,17,332,8,17,1,17,1,17,4,17,336,8,17,11,17,12,17,337,1,
        18,1,18,1,18,1,18,1,18,1,18,3,18,346,8,18,1,18,3,18,349,8,18,1,18,
        3,18,352,8,18,1,18,3,18,355,8,18,1,18,1,18,4,18,359,8,18,11,18,12,
        18,360,1,19,1,19,1,19,1,19,5,19,367,8,19,10,19,12,19,370,9,19,1,
        19,5,19,373,8,19,10,19,12,19,376,9,19,1,19,1,19,1,20,1,20,1,20,1,
        20,1,20,5,20,385,8,20,10,20,12,20,388,9,20,1,20,5,20,391,8,20,10,
        20,12,20,394,9,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,5,21,404,
        8,21,10,21,12,21,407,9,21,1,21,5,21,410,8,21,10,21,12,21,413,9,21,
        1,21,1,21,1,22,1,22,1,23,1,23,1,23,0,0,24,0,2,4,6,8,10,12,14,16,
        18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,0,3,1,1,10,10,2,0,2,
        3,5,5,1,0,2,4,458,0,49,1,0,0,0,2,72,1,0,0,0,4,76,1,0,0,0,6,95,1,
        0,0,0,8,99,1,0,0,0,10,123,1,0,0,0,12,127,1,0,0,0,14,156,1,0,0,0,
        16,160,1,0,0,0,18,177,1,0,0,0,20,181,1,0,0,0,22,202,1,0,0,0,24,206,
        1,0,0,0,26,230,1,0,0,0,28,251,1,0,0,0,30,273,1,0,0,0,32,296,1,0,
        0,0,34,317,1,0,0,0,36,339,1,0,0,0,38,362,1,0,0,0,40,379,1,0,0,0,
        42,397,1,0,0,0,44,416,1,0,0,0,46,418,1,0,0,0,48,50,5,10,0,0,49,48,
        1,0,0,0,49,50,1,0,0,0,50,66,1,0,0,0,51,65,3,2,1,0,52,65,3,6,3,0,
        53,65,3,10,5,0,54,65,3,14,7,0,55,65,3,18,9,0,56,65,3,22,11,0,57,
        65,3,26,13,0,58,65,3,28,14,0,59,65,3,30,15,0,60,65,3,32,16,0,61,
        65,3,34,17,0,62,65,3,36,18,0,63,65,5,10,0,0,64,51,1,0,0,0,64,52,
        1,0,0,0,64,53,1,0,0,0,64,54,1,0,0,0,64,55,1,0,0,0,64,56,1,0,0,0,
        64,57,1,0,0,0,64,58,1,0,0,0,64,59,1,0,0,0,64,60,1,0,0,0,64,61,1,
        0,0,0,64,62,1,0,0,0,64,63,1,0,0,0,65,68,1,0,0,0,66,64,1,0,0,0,66,
        67,1,0,0,0,67,69,1,0,0,0,68,66,1,0,0,0,69,70,5,0,0,1,70,1,1,0,0,
        0,71,73,3,4,2,0,72,71,1,0,0,0,73,74,1,0,0,0,74,72,1,0,0,0,74,75,
        1,0,0,0,75,3,1,0,0,0,76,77,5,8,0,0,77,78,5,2,0,0,78,79,5,8,0,0,79,
        80,5,8,0,0,80,81,3,44,22,0,81,82,5,8,0,0,82,83,5,2,0,0,83,84,5,8,
        0,0,84,85,5,8,0,0,85,89,3,44,22,0,86,88,3,46,23,0,87,86,1,0,0,0,
        88,91,1,0,0,0,89,87,1,0,0,0,89,90,1,0,0,0,90,92,1,0,0,0,91,89,1,
        0,0,0,92,93,7,0,0,0,93,5,1,0,0,0,94,96,3,8,4,0,95,94,1,0,0,0,96,
        97,1,0,0,0,97,95,1,0,0,0,97,98,1,0,0,0,98,7,1,0,0,0,99,100,5,8,0,
        0,100,101,5,2,0,0,101,102,5,8,0,0,102,103,5,8,0,0,103,104,3,44,22,
        0,104,105,5,8,0,0,105,106,5,2,0,0,106,107,5,8,0,0,107,108,5,8,0,
        0,108,109,3,44,22,0,109,110,5,8,0,0,110,111,5,2,0,0,111,112,5,8,
        0,0,112,113,5,8,0,0,113,117,3,44,22,0,114,116,3,46,23,0,115,114,
        1,0,0,0,116,119,1,0,0,0,117,115,1,0,0,0,117,118,1,0,0,0,118,120,
        1,0,0,0,119,117,1,0,0,0,120,121,7,0,0,0,121,9,1,0,0,0,122,124,3,
        12,6,0,123,122,1,0,0,0,124,125,1,0,0,0,125,123,1,0,0,0,125,126,1,
        0,0,0,126,11,1,0,0,0,127,128,5,8,0,0,128,129,5,2,0,0,129,130,5,8,
        0,0,130,131,5,8,0,0,131,132,3,44,22,0,132,133,5,8,0,0,133,134,5,
        2,0,0,134,135,5,8,0,0,135,136,5,8,0,0,136,137,3,44,22,0,137,138,
        5,8,0,0,138,139,5,2,0,0,139,140,5,8,0,0,140,141,5,8,0,0,141,142,
        3,44,22,0,142,143,5,8,0,0,143,144,5,2,0,0,144,145,5,8,0,0,145,146,
        5,8,0,0,146,150,3,44,22,0,147,149,3,46,23,0,148,147,1,0,0,0,149,
        152,1,0,0,0,150,148,1,0,0,0,150,151,1,0,0,0,151,153,1,0,0,0,152,
        150,1,0,0,0,153,154,7,0,0,0,154,13,1,0,0,0,155,157,3,16,8,0,156,
        155,1,0,0,0,157,158,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0,159,
        15,1,0,0,0,160,161,5,2,0,0,161,162,5,8,0,0,162,163,5,8,0,0,163,164,
        3,44,22,0,164,165,5,2,0,0,165,166,5,8,0,0,166,167,5,8,0,0,167,171,
        3,44,22,0,168,170,3,46,23,0,169,168,1,0,0,0,170,173,1,0,0,0,171,
        169,1,0,0,0,171,172,1,0,0,0,172,174,1,0,0,0,173,171,1,0,0,0,174,
        175,7,0,0,0,175,17,1,0,0,0,176,178,3,20,10,0,177,176,1,0,0,0,178,
        179,1,0,0,0,179,177,1,0,0,0,179,180,1,0,0,0,180,19,1,0,0,0,181,182,
        5,2,0,0,182,183,5,8,0,0,183,184,5,8,0,0,184,185,3,44,22,0,185,186,
        5,2,0,0,186,187,5,8,0,0,187,188,5,8,0,0,188,189,3,44,22,0,189,190,
        5,2,0,0,190,191,5,8,0,0,191,192,5,8,0,0,192,196,3,44,22,0,193,195,
        3,46,23,0,194,193,1,0,0,0,195,198,1,0,0,0,196,194,1,0,0,0,196,197,
        1,0,0,0,197,199,1,0,0,0,198,196,1,0,0,0,199,200,7,0,0,0,200,21,1,
        0,0,0,201,203,3,24,12,0,202,201,1,0,0,0,203,204,1,0,0,0,204,202,
        1,0,0,0,204,205,1,0,0,0,205,23,1,0,0,0,206,207,5,2,0,0,207,208,5,
        8,0,0,208,209,5,8,0,0,209,210,3,44,22,0,210,211,5,2,0,0,211,212,
        5,8,0,0,212,213,5,8,0,0,213,214,3,44,22,0,214,215,5,2,0,0,215,216,
        5,8,0,0,216,217,5,8,0,0,217,218,3,44,22,0,218,219,5,2,0,0,219,220,
        5,8,0,0,220,221,5,8,0,0,221,225,3,44,22,0,222,224,3,46,23,0,223,
        222,1,0,0,0,224,227,1,0,0,0,225,223,1,0,0,0,225,226,1,0,0,0,226,
        228,1,0,0,0,227,225,1,0,0,0,228,229,7,0,0,0,229,25,1,0,0,0,230,231,
        5,1,0,0,231,232,5,13,0,0,232,234,5,14,0,0,233,235,5,17,0,0,234,233,
        1,0,0,0,234,235,1,0,0,0,235,237,1,0,0,0,236,238,5,18,0,0,237,236,
        1,0,0,0,237,238,1,0,0,0,238,240,1,0,0,0,239,241,5,19,0,0,240,239,
        1,0,0,0,240,241,1,0,0,0,241,243,1,0,0,0,242,244,5,20,0,0,243,242,
        1,0,0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,247,5,22,0,0,246,248,
        3,38,19,0,247,246,1,0,0,0,248,249,1,0,0,0,249,247,1,0,0,0,249,250,
        1,0,0,0,250,27,1,0,0,0,251,252,5,1,0,0,252,253,5,13,0,0,253,254,
        5,14,0,0,254,256,5,15,0,0,255,257,5,17,0,0,256,255,1,0,0,0,256,257,
        1,0,0,0,257,259,1,0,0,0,258,260,5,18,0,0,259,258,1,0,0,0,259,260,
        1,0,0,0,260,262,1,0,0,0,261,263,5,19,0,0,262,261,1,0,0,0,262,263,
        1,0,0,0,263,265,1,0,0,0,264,266,5,20,0,0,265,264,1,0,0,0,265,266,
        1,0,0,0,266,267,1,0,0,0,267,269,5,22,0,0,268,270,3,40,20,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,29,1,
        0,0,0,273,274,5,1,0,0,274,275,5,13,0,0,275,276,5,14,0,0,276,277,
        5,15,0,0,277,279,5,16,0,0,278,280,5,17,0,0,279,278,1,0,0,0,279,280,
        1,0,0,0,280,282,1,0,0,0,281,283,5,18,0,0,282,281,1,0,0,0,282,283,
        1,0,0,0,283,285,1,0,0,0,284,286,5,19,0,0,285,284,1,0,0,0,285,286,
        1,0,0,0,286,288,1,0,0,0,287,289,5,20,0,0,288,287,1,0,0,0,288,289,
        1,0,0,0,289,290,1,0,0,0,290,292,5,22,0,0,291,293,3,42,21,0,292,291,
        1,0,0,0,293,294,1,0,0,0,294,292,1,0,0,0,294,295,1,0,0,0,295,31,1,
        0,0,0,296,297,5,1,0,0,297,298,5,14,0,0,298,300,5,13,0,0,299,301,
        5,17,0,0,300,299,1,0,0,0,300,301,1,0,0,0,301,303,1,0,0,0,302,304,
        5,18,0,0,303,302,1,0,0,0,303,304,1,0,0,0,304,306,1,0,0,0,305,307,
        5,19,0,0,306,305,1,0,0,0,306,307,1,0,0,0,307,309,1,0,0,0,308,310,
        5,20,0,0,309,308,1,0,0,0,309,310,1,0,0,0,310,311,1,0,0,0,311,313,
        5,22,0,0,312,314,3,38,19,0,313,312,1,0,0,0,314,315,1,0,0,0,315,313,
        1,0,0,0,315,316,1,0,0,0,316,33,1,0,0,0,317,318,5,1,0,0,318,319,5,
        15,0,0,319,320,5,14,0,0,320,322,5,13,0,0,321,323,5,17,0,0,322,321,
        1,0,0,0,322,323,1,0,0,0,323,325,1,0,0,0,324,326,5,18,0,0,325,324,
        1,0,0,0,325,326,1,0,0,0,326,328,1,0,0,0,327,329,5,19,0,0,328,327,
        1,0,0,0,328,329,1,0,0,0,329,331,1,0,0,0,330,332,5,20,0,0,331,330,
        1,0,0,0,331,332,1,0,0,0,332,333,1,0,0,0,333,335,5,22,0,0,334,336,
        3,40,20,0,335,334,1,0,0,0,336,337,1,0,0,0,337,335,1,0,0,0,337,338,
        1,0,0,0,338,35,1,0,0,0,339,340,5,1,0,0,340,341,5,16,0,0,341,342,
        5,15,0,0,342,343,5,14,0,0,343,345,5,13,0,0,344,346,5,17,0,0,345,
        344,1,0,0,0,345,346,1,0,0,0,346,348,1,0,0,0,347,349,5,18,0,0,348,
        347,1,0,0,0,348,349,1,0,0,0,349,351,1,0,0,0,350,352,5,19,0,0,351,
        350,1,0,0,0,351,352,1,0,0,0,352,354,1,0,0,0,353,355,5,20,0,0,354,
        353,1,0,0,0,354,355,1,0,0,0,355,356,1,0,0,0,356,358,5,22,0,0,357,
        359,3,42,21,0,358,357,1,0,0,0,359,360,1,0,0,0,360,358,1,0,0,0,360,
        361,1,0,0,0,361,37,1,0,0,0,362,363,5,2,0,0,363,364,3,44,22,0,364,
        368,3,44,22,0,365,367,3,46,23,0,366,365,1,0,0,0,367,370,1,0,0,0,
        368,366,1,0,0,0,368,369,1,0,0,0,369,374,1,0,0,0,370,368,1,0,0,0,
        371,373,5,8,0,0,372,371,1,0,0,0,373,376,1,0,0,0,374,372,1,0,0,0,
        374,375,1,0,0,0,375,377,1,0,0,0,376,374,1,0,0,0,377,378,7,0,0,0,
        378,39,1,0,0,0,379,380,5,2,0,0,380,381,3,44,22,0,381,382,3,44,22,
        0,382,386,3,44,22,0,383,385,3,46,23,0,384,383,1,0,0,0,385,388,1,
        0,0,0,386,384,1,0,0,0,386,387,1,0,0,0,387,392,1,0,0,0,388,386,1,
        0,0,0,389,391,5,8,0,0,390,389,1,0,0,0,391,394,1,0,0,0,392,390,1,
        0,0,0,392,393,1,0,0,0,393,395,1,0,0,0,394,392,1,0,0,0,395,396,7,
        0,0,0,396,41,1,0,0,0,397,398,5,2,0,0,398,399,3,44,22,0,399,400,3,
        44,22,0,400,401,3,44,22,0,401,405,3,44,22,0,402,404,3,46,23,0,403,
        402,1,0,0,0,404,407,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406,
        411,1,0,0,0,407,405,1,0,0,0,408,410,5,8,0,0,409,408,1,0,0,0,410,
        413,1,0,0,0,411,409,1,0,0,0,411,412,1,0,0,0,412,414,1,0,0,0,413,
        411,1,0,0,0,414,415,7,0,0,0,415,43,1,0,0,0,416,417,7,1,0,0,417,45,
        1,0,0,0,418,419,7,2,0,0,419,47,1,0,0,0,51,49,64,66,74,89,97,117,
        125,150,158,171,179,196,204,225,234,237,240,243,249,256,259,262,
        265,271,279,282,285,288,294,300,303,306,309,315,322,325,328,331,
        337,345,348,351,354,360,368,374,386,392,405,411
    ]

class BarePKParser ( Parser ):

    grammarFileName = "BarePKParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'Volume'" ]

    symbolicNames = [ "<INVALID>", "Peak", "Integer", "Float", "Real", "Ambig_float", 
                      "SHARP_COMMENT", "EXCLM_COMMENT", "Simple_name", "SPACE", 
                      "RETURN", "SECTION_COMMENT", "LINE_COMMENT", "X_ppm", 
                      "Y_ppm", "Z_ppm", "A_ppm", "Amplitude", "Volume", 
                      "Label", "Comment", "SPACE_FO", "RETURN_FO" ]

    RULE_bare_pk = 0
    RULE_peak_list_2d = 1
    RULE_peak_2d = 2
    RULE_peak_list_3d = 3
    RULE_peak_3d = 4
    RULE_peak_list_4d = 5
    RULE_peak_4d = 6
    RULE_peak_list_wo_chain_2d = 7
    RULE_peak_wo_chain_2d = 8
    RULE_peak_list_wo_chain_3d = 9
    RULE_peak_wo_chain_3d = 10
    RULE_peak_list_wo_chain_4d = 11
    RULE_peak_wo_chain_4d = 12
    RULE_raw_format_2d = 13
    RULE_raw_format_3d = 14
    RULE_raw_format_4d = 15
    RULE_rev_raw_format_2d = 16
    RULE_rev_raw_format_3d = 17
    RULE_rev_raw_format_4d = 18
    RULE_peak_list_raw_2d = 19
    RULE_peak_list_raw_3d = 20
    RULE_peak_list_raw_4d = 21
    RULE_position = 22
    RULE_number = 23

    ruleNames =  [ "bare_pk", "peak_list_2d", "peak_2d", "peak_list_3d", 
                   "peak_3d", "peak_list_4d", "peak_4d", "peak_list_wo_chain_2d", 
                   "peak_wo_chain_2d", "peak_list_wo_chain_3d", "peak_wo_chain_3d", 
                   "peak_list_wo_chain_4d", "peak_wo_chain_4d", "raw_format_2d", 
                   "raw_format_3d", "raw_format_4d", "rev_raw_format_2d", 
                   "rev_raw_format_3d", "rev_raw_format_4d", "peak_list_raw_2d", 
                   "peak_list_raw_3d", "peak_list_raw_4d", "position", "number" ]

    EOF = Token.EOF
    Peak=1
    Integer=2
    Float=3
    Real=4
    Ambig_float=5
    SHARP_COMMENT=6
    EXCLM_COMMENT=7
    Simple_name=8
    SPACE=9
    RETURN=10
    SECTION_COMMENT=11
    LINE_COMMENT=12
    X_ppm=13
    Y_ppm=14
    Z_ppm=15
    A_ppm=16
    Amplitude=17
    Volume=18
    Label=19
    Comment=20
    SPACE_FO=21
    RETURN_FO=22

    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 Bare_pkContext(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(BarePKParser.EOF, 0)

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

        def peak_list_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_2dContext,i)


        def peak_list_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_3dContext,i)


        def peak_list_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_4dContext,i)


        def peak_list_wo_chain_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_wo_chain_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_wo_chain_2dContext,i)


        def peak_list_wo_chain_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_wo_chain_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_wo_chain_3dContext,i)


        def peak_list_wo_chain_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_wo_chain_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_wo_chain_4dContext,i)


        def raw_format_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Raw_format_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Raw_format_2dContext,i)


        def raw_format_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Raw_format_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Raw_format_3dContext,i)


        def raw_format_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Raw_format_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Raw_format_4dContext,i)


        def rev_raw_format_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Rev_raw_format_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Rev_raw_format_2dContext,i)


        def rev_raw_format_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Rev_raw_format_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Rev_raw_format_3dContext,i)


        def rev_raw_format_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Rev_raw_format_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Rev_raw_format_4dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_bare_pk

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

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




    def bare_pk(self):

        localctx = BarePKParser.Bare_pkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_bare_pk)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 49
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.state = 48
                self.match(BarePKParser.RETURN)


            self.state = 66
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 1286) != 0):
                self.state = 64
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
                if la_ == 1:
                    self.state = 51
                    self.peak_list_2d()
                    pass

                elif la_ == 2:
                    self.state = 52
                    self.peak_list_3d()
                    pass

                elif la_ == 3:
                    self.state = 53
                    self.peak_list_4d()
                    pass

                elif la_ == 4:
                    self.state = 54
                    self.peak_list_wo_chain_2d()
                    pass

                elif la_ == 5:
                    self.state = 55
                    self.peak_list_wo_chain_3d()
                    pass

                elif la_ == 6:
                    self.state = 56
                    self.peak_list_wo_chain_4d()
                    pass

                elif la_ == 7:
                    self.state = 57
                    self.raw_format_2d()
                    pass

                elif la_ == 8:
                    self.state = 58
                    self.raw_format_3d()
                    pass

                elif la_ == 9:
                    self.state = 59
                    self.raw_format_4d()
                    pass

                elif la_ == 10:
                    self.state = 60
                    self.rev_raw_format_2d()
                    pass

                elif la_ == 11:
                    self.state = 61
                    self.rev_raw_format_3d()
                    pass

                elif la_ == 12:
                    self.state = 62
                    self.rev_raw_format_4d()
                    pass

                elif la_ == 13:
                    self.state = 63
                    self.match(BarePKParser.RETURN)
                    pass


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

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


    class Peak_list_2dContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def peak_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_2dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_2d

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

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




    def peak_list_2d(self):

        localctx = BarePKParser.Peak_list_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_peak_list_2d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 72 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 71
                    self.peak_2d()

                else:
                    raise NoViableAltException(self)
                self.state = 74 
                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 Peak_2dContext(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(BarePKParser.Simple_name)
            else:
                return self.getToken(BarePKParser.Simple_name, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_2d

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

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




    def peak_2d(self):

        localctx = BarePKParser.Peak_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_peak_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 76
            self.match(BarePKParser.Simple_name)
            self.state = 77
            self.match(BarePKParser.Integer)
            self.state = 78
            self.match(BarePKParser.Simple_name)
            self.state = 79
            self.match(BarePKParser.Simple_name)
            self.state = 80
            self.position()
            self.state = 81
            self.match(BarePKParser.Simple_name)
            self.state = 82
            self.match(BarePKParser.Integer)
            self.state = 83
            self.match(BarePKParser.Simple_name)
            self.state = 84
            self.match(BarePKParser.Simple_name)
            self.state = 85
            self.position()
            self.state = 89
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 86
                self.number()
                self.state = 91
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def peak_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_3dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_3d

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

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




    def peak_list_3d(self):

        localctx = BarePKParser.Peak_list_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_peak_list_3d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 95 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 94
                    self.peak_3d()

                else:
                    raise NoViableAltException(self)
                self.state = 97 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,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 Peak_3dContext(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(BarePKParser.Simple_name)
            else:
                return self.getToken(BarePKParser.Simple_name, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_3d

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

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




    def peak_3d(self):

        localctx = BarePKParser.Peak_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_peak_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            self.match(BarePKParser.Simple_name)
            self.state = 100
            self.match(BarePKParser.Integer)
            self.state = 101
            self.match(BarePKParser.Simple_name)
            self.state = 102
            self.match(BarePKParser.Simple_name)
            self.state = 103
            self.position()
            self.state = 104
            self.match(BarePKParser.Simple_name)
            self.state = 105
            self.match(BarePKParser.Integer)
            self.state = 106
            self.match(BarePKParser.Simple_name)
            self.state = 107
            self.match(BarePKParser.Simple_name)
            self.state = 108
            self.position()
            self.state = 109
            self.match(BarePKParser.Simple_name)
            self.state = 110
            self.match(BarePKParser.Integer)
            self.state = 111
            self.match(BarePKParser.Simple_name)
            self.state = 112
            self.match(BarePKParser.Simple_name)
            self.state = 113
            self.position()
            self.state = 117
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 114
                self.number()
                self.state = 119
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def peak_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_4dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_4d

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

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




    def peak_list_4d(self):

        localctx = BarePKParser.Peak_list_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_peak_list_4d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 123 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 122
                    self.peak_4d()

                else:
                    raise NoViableAltException(self)
                self.state = 125 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,7,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 Peak_4dContext(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(BarePKParser.Simple_name)
            else:
                return self.getToken(BarePKParser.Simple_name, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_4d

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

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




    def peak_4d(self):

        localctx = BarePKParser.Peak_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_peak_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127
            self.match(BarePKParser.Simple_name)
            self.state = 128
            self.match(BarePKParser.Integer)
            self.state = 129
            self.match(BarePKParser.Simple_name)
            self.state = 130
            self.match(BarePKParser.Simple_name)
            self.state = 131
            self.position()
            self.state = 132
            self.match(BarePKParser.Simple_name)
            self.state = 133
            self.match(BarePKParser.Integer)
            self.state = 134
            self.match(BarePKParser.Simple_name)
            self.state = 135
            self.match(BarePKParser.Simple_name)
            self.state = 136
            self.position()
            self.state = 137
            self.match(BarePKParser.Simple_name)
            self.state = 138
            self.match(BarePKParser.Integer)
            self.state = 139
            self.match(BarePKParser.Simple_name)
            self.state = 140
            self.match(BarePKParser.Simple_name)
            self.state = 141
            self.position()
            self.state = 142
            self.match(BarePKParser.Simple_name)
            self.state = 143
            self.match(BarePKParser.Integer)
            self.state = 144
            self.match(BarePKParser.Simple_name)
            self.state = 145
            self.match(BarePKParser.Simple_name)
            self.state = 146
            self.position()
            self.state = 150
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 147
                self.number()
                self.state = 152
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def peak_wo_chain_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_wo_chain_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_wo_chain_2dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_wo_chain_2d

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

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




    def peak_list_wo_chain_2d(self):

        localctx = BarePKParser.Peak_list_wo_chain_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_peak_list_wo_chain_2d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 156 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 155
                    self.peak_wo_chain_2d()

                else:
                    raise NoViableAltException(self)
                self.state = 158 
                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 Peak_wo_chain_2dContext(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(BarePKParser.Integer)
            else:
                return self.getToken(BarePKParser.Integer, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_wo_chain_2d

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

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




    def peak_wo_chain_2d(self):

        localctx = BarePKParser.Peak_wo_chain_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_peak_wo_chain_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 160
            self.match(BarePKParser.Integer)
            self.state = 161
            self.match(BarePKParser.Simple_name)
            self.state = 162
            self.match(BarePKParser.Simple_name)
            self.state = 163
            self.position()
            self.state = 164
            self.match(BarePKParser.Integer)
            self.state = 165
            self.match(BarePKParser.Simple_name)
            self.state = 166
            self.match(BarePKParser.Simple_name)
            self.state = 167
            self.position()
            self.state = 171
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 168
                self.number()
                self.state = 173
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def peak_wo_chain_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_wo_chain_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_wo_chain_3dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_wo_chain_3d

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

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




    def peak_list_wo_chain_3d(self):

        localctx = BarePKParser.Peak_list_wo_chain_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_peak_list_wo_chain_3d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 177 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 176
                    self.peak_wo_chain_3d()

                else:
                    raise NoViableAltException(self)
                self.state = 179 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,11,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 Peak_wo_chain_3dContext(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(BarePKParser.Integer)
            else:
                return self.getToken(BarePKParser.Integer, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_wo_chain_3d

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

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




    def peak_wo_chain_3d(self):

        localctx = BarePKParser.Peak_wo_chain_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_peak_wo_chain_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 181
            self.match(BarePKParser.Integer)
            self.state = 182
            self.match(BarePKParser.Simple_name)
            self.state = 183
            self.match(BarePKParser.Simple_name)
            self.state = 184
            self.position()
            self.state = 185
            self.match(BarePKParser.Integer)
            self.state = 186
            self.match(BarePKParser.Simple_name)
            self.state = 187
            self.match(BarePKParser.Simple_name)
            self.state = 188
            self.position()
            self.state = 189
            self.match(BarePKParser.Integer)
            self.state = 190
            self.match(BarePKParser.Simple_name)
            self.state = 191
            self.match(BarePKParser.Simple_name)
            self.state = 192
            self.position()
            self.state = 196
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 193
                self.number()
                self.state = 198
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def peak_wo_chain_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_wo_chain_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_wo_chain_4dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_wo_chain_4d

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

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




    def peak_list_wo_chain_4d(self):

        localctx = BarePKParser.Peak_list_wo_chain_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_peak_list_wo_chain_4d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 202 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 201
                    self.peak_wo_chain_4d()

                else:
                    raise NoViableAltException(self)
                self.state = 204 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,13,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 Peak_wo_chain_4dContext(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(BarePKParser.Integer)
            else:
                return self.getToken(BarePKParser.Integer, i)

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

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


        def getRuleIndex(self):
            return BarePKParser.RULE_peak_wo_chain_4d

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

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




    def peak_wo_chain_4d(self):

        localctx = BarePKParser.Peak_wo_chain_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_peak_wo_chain_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 206
            self.match(BarePKParser.Integer)
            self.state = 207
            self.match(BarePKParser.Simple_name)
            self.state = 208
            self.match(BarePKParser.Simple_name)
            self.state = 209
            self.position()
            self.state = 210
            self.match(BarePKParser.Integer)
            self.state = 211
            self.match(BarePKParser.Simple_name)
            self.state = 212
            self.match(BarePKParser.Simple_name)
            self.state = 213
            self.position()
            self.state = 214
            self.match(BarePKParser.Integer)
            self.state = 215
            self.match(BarePKParser.Simple_name)
            self.state = 216
            self.match(BarePKParser.Simple_name)
            self.state = 217
            self.position()
            self.state = 218
            self.match(BarePKParser.Integer)
            self.state = 219
            self.match(BarePKParser.Simple_name)
            self.state = 220
            self.match(BarePKParser.Simple_name)
            self.state = 221
            self.position()
            self.state = 225
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 222
                self.number()
                self.state = 227
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_2dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_raw_format_2d

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

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




    def raw_format_2d(self):

        localctx = BarePKParser.Raw_format_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_raw_format_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 230
            self.match(BarePKParser.Peak)
            self.state = 231
            self.match(BarePKParser.X_ppm)
            self.state = 232
            self.match(BarePKParser.Y_ppm)
            self.state = 234
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 233
                self.match(BarePKParser.Amplitude)


            self.state = 237
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 236
                self.match(BarePKParser.Volume)


            self.state = 240
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 239
                self.match(BarePKParser.Label)


            self.state = 243
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 242
                self.match(BarePKParser.Comment)


            self.state = 245
            self.match(BarePKParser.RETURN_FO)
            self.state = 247 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 246
                    self.peak_list_raw_2d()

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def Z_ppm(self):
            return self.getToken(BarePKParser.Z_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_3dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_raw_format_3d

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

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




    def raw_format_3d(self):

        localctx = BarePKParser.Raw_format_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_raw_format_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 251
            self.match(BarePKParser.Peak)
            self.state = 252
            self.match(BarePKParser.X_ppm)
            self.state = 253
            self.match(BarePKParser.Y_ppm)
            self.state = 254
            self.match(BarePKParser.Z_ppm)
            self.state = 256
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 255
                self.match(BarePKParser.Amplitude)


            self.state = 259
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 258
                self.match(BarePKParser.Volume)


            self.state = 262
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 261
                self.match(BarePKParser.Label)


            self.state = 265
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 264
                self.match(BarePKParser.Comment)


            self.state = 267
            self.match(BarePKParser.RETURN_FO)
            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.peak_list_raw_3d()

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def Z_ppm(self):
            return self.getToken(BarePKParser.Z_ppm, 0)

        def A_ppm(self):
            return self.getToken(BarePKParser.A_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_4dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_raw_format_4d

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

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




    def raw_format_4d(self):

        localctx = BarePKParser.Raw_format_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_raw_format_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 273
            self.match(BarePKParser.Peak)
            self.state = 274
            self.match(BarePKParser.X_ppm)
            self.state = 275
            self.match(BarePKParser.Y_ppm)
            self.state = 276
            self.match(BarePKParser.Z_ppm)
            self.state = 277
            self.match(BarePKParser.A_ppm)
            self.state = 279
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 278
                self.match(BarePKParser.Amplitude)


            self.state = 282
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 281
                self.match(BarePKParser.Volume)


            self.state = 285
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 284
                self.match(BarePKParser.Label)


            self.state = 288
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 287
                self.match(BarePKParser.Comment)


            self.state = 290
            self.match(BarePKParser.RETURN_FO)
            self.state = 292 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 291
                    self.peak_list_raw_4d()

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_2dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_2dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_rev_raw_format_2d

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

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




    def rev_raw_format_2d(self):

        localctx = BarePKParser.Rev_raw_format_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_rev_raw_format_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 296
            self.match(BarePKParser.Peak)
            self.state = 297
            self.match(BarePKParser.Y_ppm)
            self.state = 298
            self.match(BarePKParser.X_ppm)
            self.state = 300
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 299
                self.match(BarePKParser.Amplitude)


            self.state = 303
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 302
                self.match(BarePKParser.Volume)


            self.state = 306
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 305
                self.match(BarePKParser.Label)


            self.state = 309
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 308
                self.match(BarePKParser.Comment)


            self.state = 311
            self.match(BarePKParser.RETURN_FO)
            self.state = 313 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 312
                    self.peak_list_raw_2d()

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def Z_ppm(self):
            return self.getToken(BarePKParser.Z_ppm, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_3dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_3dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_rev_raw_format_3d

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

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




    def rev_raw_format_3d(self):

        localctx = BarePKParser.Rev_raw_format_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_rev_raw_format_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 317
            self.match(BarePKParser.Peak)
            self.state = 318
            self.match(BarePKParser.Z_ppm)
            self.state = 319
            self.match(BarePKParser.Y_ppm)
            self.state = 320
            self.match(BarePKParser.X_ppm)
            self.state = 322
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 321
                self.match(BarePKParser.Amplitude)


            self.state = 325
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 324
                self.match(BarePKParser.Volume)


            self.state = 328
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 327
                self.match(BarePKParser.Label)


            self.state = 331
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 330
                self.match(BarePKParser.Comment)


            self.state = 333
            self.match(BarePKParser.RETURN_FO)
            self.state = 335 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 334
                    self.peak_list_raw_3d()

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

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

        def Peak(self):
            return self.getToken(BarePKParser.Peak, 0)

        def A_ppm(self):
            return self.getToken(BarePKParser.A_ppm, 0)

        def Z_ppm(self):
            return self.getToken(BarePKParser.Z_ppm, 0)

        def Y_ppm(self):
            return self.getToken(BarePKParser.Y_ppm, 0)

        def X_ppm(self):
            return self.getToken(BarePKParser.X_ppm, 0)

        def RETURN_FO(self):
            return self.getToken(BarePKParser.RETURN_FO, 0)

        def Amplitude(self):
            return self.getToken(BarePKParser.Amplitude, 0)

        def Volume(self):
            return self.getToken(BarePKParser.Volume, 0)

        def Label(self):
            return self.getToken(BarePKParser.Label, 0)

        def Comment(self):
            return self.getToken(BarePKParser.Comment, 0)

        def peak_list_raw_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.Peak_list_raw_4dContext)
            else:
                return self.getTypedRuleContext(BarePKParser.Peak_list_raw_4dContext,i)


        def getRuleIndex(self):
            return BarePKParser.RULE_rev_raw_format_4d

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

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




    def rev_raw_format_4d(self):

        localctx = BarePKParser.Rev_raw_format_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_rev_raw_format_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 339
            self.match(BarePKParser.Peak)
            self.state = 340
            self.match(BarePKParser.A_ppm)
            self.state = 341
            self.match(BarePKParser.Z_ppm)
            self.state = 342
            self.match(BarePKParser.Y_ppm)
            self.state = 343
            self.match(BarePKParser.X_ppm)
            self.state = 345
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 344
                self.match(BarePKParser.Amplitude)


            self.state = 348
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 347
                self.match(BarePKParser.Volume)


            self.state = 351
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 350
                self.match(BarePKParser.Label)


            self.state = 354
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 353
                self.match(BarePKParser.Comment)


            self.state = 356
            self.match(BarePKParser.RETURN_FO)
            self.state = 358 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 357
                    self.peak_list_raw_4d()

                else:
                    raise NoViableAltException(self)
                self.state = 360 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,44,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 Peak_list_raw_2dContext(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(BarePKParser.Integer, 0)

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


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

        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_raw_2d

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

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




    def peak_list_raw_2d(self):

        localctx = BarePKParser.Peak_list_raw_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_peak_list_raw_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.match(BarePKParser.Integer)
            self.state = 363
            self.position()
            self.state = 364
            self.position()
            self.state = 368
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 365
                self.number()
                self.state = 370
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 374
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==8:
                self.state = 371
                self.match(BarePKParser.Simple_name)
                self.state = 376
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 377
            _la = self._input.LA(1)
            if not(_la==-1 or _la==10):
                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 Peak_list_raw_3dContext(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(BarePKParser.Integer, 0)

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


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

        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_raw_3d

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

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




    def peak_list_raw_3d(self):

        localctx = BarePKParser.Peak_list_raw_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_peak_list_raw_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 379
            self.match(BarePKParser.Integer)
            self.state = 380
            self.position()
            self.state = 381
            self.position()
            self.state = 382
            self.position()
            self.state = 386
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 383
                self.number()
                self.state = 388
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 392
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==8:
                self.state = 389
                self.match(BarePKParser.Simple_name)
                self.state = 394
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 395
            _la = self._input.LA(1)
            if not(_la==-1 or _la==10):
                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 Peak_list_raw_4dContext(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(BarePKParser.Integer, 0)

        def position(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BarePKParser.PositionContext)
            else:
                return self.getTypedRuleContext(BarePKParser.PositionContext,i)


        def RETURN(self):
            return self.getToken(BarePKParser.RETURN, 0)

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

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


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

        def getRuleIndex(self):
            return BarePKParser.RULE_peak_list_raw_4d

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

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




    def peak_list_raw_4d(self):

        localctx = BarePKParser.Peak_list_raw_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_peak_list_raw_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 397
            self.match(BarePKParser.Integer)
            self.state = 398
            self.position()
            self.state = 399
            self.position()
            self.state = 400
            self.position()
            self.state = 401
            self.position()
            self.state = 405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0):
                self.state = 402
                self.number()
                self.state = 407
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 411
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==8:
                self.state = 408
                self.match(BarePKParser.Simple_name)
                self.state = 413
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 414
            _la = self._input.LA(1)
            if not(_la==-1 or _la==10):
                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 PositionContext(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(BarePKParser.Float, 0)

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

        def Ambig_float(self):
            return self.getToken(BarePKParser.Ambig_float, 0)

        def getRuleIndex(self):
            return BarePKParser.RULE_position

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

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




    def position(self):

        localctx = BarePKParser.PositionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_position)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 416
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 44) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class 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(BarePKParser.Float, 0)

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

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

        def getRuleIndex(self):
            return BarePKParser.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 = BarePKParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 418
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 28) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx





