# Generated from D:/Documents/pycharm_workspace/Qrogue/qrogue/game/world/dungeon_generator\QrogueDungeon.g4 by ANTLR 4.10.1
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys

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

class QrogueDungeonParser ( Parser ):

    grammarFileName = "QrogueDungeon.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ u"<INVALID>", u"'Name'", u"'='", u"'Description'", 
                     u"'qubits'", u"'['", u"']'", u"'o'", u"'t'", u"'m'", 
                     u"'c'", u"'e'", u"'r'", u"'!'", u"'$'", u"'_'", u"'custom'", 
                     u"'default'", u"'rewards'", u"':'", u"'('", u"')'", 
                     u"'one way'", u"'pos'", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"'[Robot]'", u"'[StateVector Pools]'", 
                     u"'[Reward Pools]'", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"'key'", u"'coin'", u"'energy'", u"'gate'", 
                     u"'qubit'", u"'none'", u"'LevelEvent'", u"'GlobalAchievement'", 
                     u"<INVALID>", u"'tunnel'", u"'teleport'", u"'ordered'", 
                     u"'random'", u"<INVALID>", u"'tutorial'", u"'trigger'", 
                     u"'Qrogue<'", u"'>Qrogue'", u"'~'", u"'|'", u"','", 
                     u"'#'", u"'..'", u"'__'", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                     u"<INVALID>", u"<INVALID>", u"'[Layout]'", u"<INVALID>", 
                     u"'[Hallways]'", u"'visible'", u"'foggy'", u"'World'", 
                     u"'Level'", u"'Spawn'", u"'Wild'", u"'Shop'", u"'Riddle'", 
                     u"'Boss'", u"'Gate'", u"'Treasure'", u"'Challenge'", 
                     u"'Pause'", u"'Story'", u"'open'", u"'closed'", u"'locked'", 
                     u"'event'", u"'permanent'", u"'entangled'", u"'[Messages]'", 
                     u"'when'" ]

    symbolicNames = [ u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"SR_TELEPORTER", u"NO_TELEPORTER", u"WITH_TELEPORTER", 
                      u"ROBOT", u"STV_POOLS", u"REWARD_POOLS", u"MAX_ENERGY", 
                      u"START_ENERGY", u"CIRCUIT_SPACE", u"BACKPACK_SPACE", 
                      u"KEY_LITERAL", u"COIN_LITERAL", u"ENERGY_LITERAL", 
                      u"GATE_LITERAL", u"QUBIT_LITERAL", u"NONE_LITERAL", 
                      u"LEVEL_EVENT", u"GLOBAL_ACHIEVEMENT", u"GLOBAL_EVENT_REFERENCE", 
                      u"LOCAL_TUNNEL", u"GLOBAL_TELEPORT", u"ORDERED_DRAW", 
                      u"RANDOM_DRAW", u"DIRECTION", u"TUTORIAL_LITERAL", 
                      u"TRIGGER_LITERAL", u"HEADER", u"ENDER", u"HORIZONTAL_SEPARATOR", 
                      u"VERTICAL_SEPARATOR", u"LIST_SEPARATOR", u"WALL", 
                      u"EMPTY_HALLWAY", u"EMPTY_ROOM", u"DIGIT", u"INTEGER", 
                      u"FLOAT", u"IMAG_NUMBER", u"SIGN", u"CHARACTER_LOW", 
                      u"CHARACTER_UP", u"CHARACTER", u"TEXT", u"ROOM_ID", 
                      u"HALLWAY_ID", u"REFERENCE", u"WS", u"UNIVERSAL_SEPARATOR", 
                      u"COMMENT", u"LINE_COMMENT", u"LAYOUT", u"ROOMS", 
                      u"HALLWAYS", u"VISIBLE_LITERAL", u"FOGGY_LITERAL", 
                      u"WORLD_LITERAL", u"LEVEL_LITERAL", u"SPAWN_LITERAL", 
                      u"WILD_LITERAL", u"SHOP_LITERAL", u"RIDDLE_LITERAL", 
                      u"BOSS_LITERAL", u"GATE_ROOM_LITERAL", u"TREASURE_LITERAL", 
                      u"CHALLENGE_LITERAL", u"PAUSE_LITERAL", u"STORY_LITERAL", 
                      u"OPEN_LITERAL", u"CLOSED_LITERAL", u"LOCKED_LITERAL", 
                      u"EVENT_LITERAL", u"PERMANENT_LITERAL", u"ENTANGLED_LITERAL", 
                      u"MESSAGES", u"MSG_EVENT", u"MSG_ALTERNATIVE", u"MSG_SPEAKER", 
                      u"MSG_PRIORITY" ]

    RULE_start = 0
    RULE_meta = 1
    RULE_robot = 2
    RULE_room_content = 3
    RULE_r_row = 4
    RULE_tile = 5
    RULE_tile_descriptor = 6
    RULE_t_descriptor = 7
    RULE_trigger_descriptor = 8
    RULE_teleport_descriptor = 9
    RULE_message_descriptor = 10
    RULE_collectible_descriptor = 11
    RULE_energy_descriptor = 12
    RULE_shop_descriptor = 13
    RULE_enemy_descriptor = 14
    RULE_riddle_descriptor = 15
    RULE_challenge_descriptor = 16
    RULE_puzzle_parameter = 17
    RULE_draw_strategy = 18
    RULE_stv_pools = 19
    RULE_default_stv_pool = 20
    RULE_stv_pool = 21
    RULE_stvs = 22
    RULE_stv_ref = 23
    RULE_stv = 24
    RULE_reward_pools = 25
    RULE_default_reward_pool = 26
    RULE_reward_pool = 27
    RULE_collectibles = 28
    RULE_collectible = 29
    RULE_integer = 30
    RULE_complex_number = 31
    RULE_layout = 32
    RULE_l_room_row = 33
    RULE_l_hallway_row = 34
    RULE_rooms = 35
    RULE_room = 36
    RULE_r_attributes = 37
    RULE_r_visibility = 38
    RULE_r_type = 39
    RULE_hallways = 40
    RULE_hallway = 41
    RULE_h_attributes = 42
    RULE_messages = 43
    RULE_message = 44
    RULE_message_body = 45

    ruleNames =  [ u"start", u"meta", u"robot", u"room_content", u"r_row", 
                   u"tile", u"tile_descriptor", u"t_descriptor", u"trigger_descriptor", 
                   u"teleport_descriptor", u"message_descriptor", u"collectible_descriptor", 
                   u"energy_descriptor", u"shop_descriptor", u"enemy_descriptor", 
                   u"riddle_descriptor", u"challenge_descriptor", u"puzzle_parameter", 
                   u"draw_strategy", u"stv_pools", u"default_stv_pool", 
                   u"stv_pool", u"stvs", u"stv_ref", u"stv", u"reward_pools", 
                   u"default_reward_pool", u"reward_pool", u"collectibles", 
                   u"collectible", u"integer", u"complex_number", u"layout", 
                   u"l_room_row", u"l_hallway_row", u"rooms", u"room", u"r_attributes", 
                   u"r_visibility", u"r_type", u"hallways", u"hallway", 
                   u"h_attributes", u"messages", u"message", u"message_body" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    SR_TELEPORTER=24
    NO_TELEPORTER=25
    WITH_TELEPORTER=26
    ROBOT=27
    STV_POOLS=28
    REWARD_POOLS=29
    MAX_ENERGY=30
    START_ENERGY=31
    CIRCUIT_SPACE=32
    BACKPACK_SPACE=33
    KEY_LITERAL=34
    COIN_LITERAL=35
    ENERGY_LITERAL=36
    GATE_LITERAL=37
    QUBIT_LITERAL=38
    NONE_LITERAL=39
    LEVEL_EVENT=40
    GLOBAL_ACHIEVEMENT=41
    GLOBAL_EVENT_REFERENCE=42
    LOCAL_TUNNEL=43
    GLOBAL_TELEPORT=44
    ORDERED_DRAW=45
    RANDOM_DRAW=46
    DIRECTION=47
    TUTORIAL_LITERAL=48
    TRIGGER_LITERAL=49
    HEADER=50
    ENDER=51
    HORIZONTAL_SEPARATOR=52
    VERTICAL_SEPARATOR=53
    LIST_SEPARATOR=54
    WALL=55
    EMPTY_HALLWAY=56
    EMPTY_ROOM=57
    DIGIT=58
    INTEGER=59
    FLOAT=60
    IMAG_NUMBER=61
    SIGN=62
    CHARACTER_LOW=63
    CHARACTER_UP=64
    CHARACTER=65
    TEXT=66
    ROOM_ID=67
    HALLWAY_ID=68
    REFERENCE=69
    WS=70
    UNIVERSAL_SEPARATOR=71
    COMMENT=72
    LINE_COMMENT=73
    LAYOUT=74
    ROOMS=75
    HALLWAYS=76
    VISIBLE_LITERAL=77
    FOGGY_LITERAL=78
    WORLD_LITERAL=79
    LEVEL_LITERAL=80
    SPAWN_LITERAL=81
    WILD_LITERAL=82
    SHOP_LITERAL=83
    RIDDLE_LITERAL=84
    BOSS_LITERAL=85
    GATE_ROOM_LITERAL=86
    TREASURE_LITERAL=87
    CHALLENGE_LITERAL=88
    PAUSE_LITERAL=89
    STORY_LITERAL=90
    OPEN_LITERAL=91
    CLOSED_LITERAL=92
    LOCKED_LITERAL=93
    EVENT_LITERAL=94
    PERMANENT_LITERAL=95
    ENTANGLED_LITERAL=96
    MESSAGES=97
    MSG_EVENT=98
    MSG_ALTERNATIVE=99
    MSG_SPEAKER=100
    MSG_PRIORITY=101

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




    class StartContext(ParserRuleContext):

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

        def HEADER(self):
            return self.getToken(QrogueDungeonParser.HEADER, 0)

        def meta(self):
            return self.getTypedRuleContext(QrogueDungeonParser.MetaContext,0)


        def robot(self):
            return self.getTypedRuleContext(QrogueDungeonParser.RobotContext,0)


        def layout(self):
            return self.getTypedRuleContext(QrogueDungeonParser.LayoutContext,0)


        def rooms(self):
            return self.getTypedRuleContext(QrogueDungeonParser.RoomsContext,0)


        def hallways(self):
            return self.getTypedRuleContext(QrogueDungeonParser.HallwaysContext,0)


        def stv_pools(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Stv_poolsContext,0)


        def reward_pools(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Reward_poolsContext,0)


        def messages(self):
            return self.getTypedRuleContext(QrogueDungeonParser.MessagesContext,0)


        def ENDER(self):
            return self.getToken(QrogueDungeonParser.ENDER, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_start

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

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

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




    def start(self):

        localctx = QrogueDungeonParser.StartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_start)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 92
            self.match(QrogueDungeonParser.HEADER)
            self.state = 93
            self.meta()
            self.state = 94
            self.robot()
            self.state = 95
            self.layout()
            self.state = 96
            self.rooms()
            self.state = 97
            self.hallways()
            self.state = 98
            self.stv_pools()
            self.state = 99
            self.reward_pools()
            self.state = 100
            self.messages()
            self.state = 101
            self.match(QrogueDungeonParser.ENDER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MetaContext(ParserRuleContext):

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

        def TEXT(self):
            return self.getToken(QrogueDungeonParser.TEXT, 0)

        def NO_TELEPORTER(self):
            return self.getToken(QrogueDungeonParser.NO_TELEPORTER, 0)

        def WITH_TELEPORTER(self):
            return self.getToken(QrogueDungeonParser.WITH_TELEPORTER, 0)

        def message_body(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Message_bodyContext,0)


        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_meta

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

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

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




    def meta(self):

        localctx = QrogueDungeonParser.MetaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_meta)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 106
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__0:
                self.state = 103
                self.match(QrogueDungeonParser.T__0)
                self.state = 104
                self.match(QrogueDungeonParser.T__1)
                self.state = 105
                self.match(QrogueDungeonParser.TEXT)


            self.state = 114
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__2:
                self.state = 108
                self.match(QrogueDungeonParser.T__2)
                self.state = 109
                self.match(QrogueDungeonParser.T__1)
                self.state = 112
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [QrogueDungeonParser.T__22, QrogueDungeonParser.TEXT, QrogueDungeonParser.MSG_SPEAKER, QrogueDungeonParser.MSG_PRIORITY]:
                    self.state = 110
                    self.message_body()
                    pass
                elif token in [QrogueDungeonParser.REFERENCE]:
                    self.state = 111
                    self.match(QrogueDungeonParser.REFERENCE)
                    pass
                else:
                    raise NoViableAltException(self)



            self.state = 117
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.NO_TELEPORTER or _la==QrogueDungeonParser.WITH_TELEPORTER:
                self.state = 116
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.NO_TELEPORTER or _la==QrogueDungeonParser.WITH_TELEPORTER):
                    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 RobotContext(ParserRuleContext):

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

        def ROBOT(self):
            return self.getToken(QrogueDungeonParser.ROBOT, 0)

        def DIGIT(self):
            return self.getToken(QrogueDungeonParser.DIGIT, 0)

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def LIST_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.LIST_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.LIST_SEPARATOR, i)

        def CIRCUIT_SPACE(self):
            return self.getToken(QrogueDungeonParser.CIRCUIT_SPACE, 0)

        def integer(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.IntegerContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,i)


        def BACKPACK_SPACE(self):
            return self.getToken(QrogueDungeonParser.BACKPACK_SPACE, 0)

        def MAX_ENERGY(self):
            return self.getToken(QrogueDungeonParser.MAX_ENERGY, 0)

        def START_ENERGY(self):
            return self.getToken(QrogueDungeonParser.START_ENERGY, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_robot

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

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

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




    def robot(self):

        localctx = QrogueDungeonParser.RobotContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_robot)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 119
            self.match(QrogueDungeonParser.ROBOT)
            self.state = 120
            self.match(QrogueDungeonParser.DIGIT)
            self.state = 121
            self.match(QrogueDungeonParser.T__3)
            self.state = 122
            self.match(QrogueDungeonParser.T__4)
            self.state = 123
            self.match(QrogueDungeonParser.REFERENCE)
            self.state = 128
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.LIST_SEPARATOR:
                self.state = 124
                self.match(QrogueDungeonParser.LIST_SEPARATOR)
                self.state = 125
                self.match(QrogueDungeonParser.REFERENCE)
                self.state = 130
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 131
            self.match(QrogueDungeonParser.T__5)
            self.state = 135
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.CIRCUIT_SPACE:
                self.state = 132
                self.match(QrogueDungeonParser.CIRCUIT_SPACE)
                self.state = 133
                self.match(QrogueDungeonParser.T__1)
                self.state = 134
                self.integer()


            self.state = 140
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.BACKPACK_SPACE:
                self.state = 137
                self.match(QrogueDungeonParser.BACKPACK_SPACE)
                self.state = 138
                self.match(QrogueDungeonParser.T__1)
                self.state = 139
                self.integer()


            self.state = 150
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.MAX_ENERGY:
                self.state = 142
                self.match(QrogueDungeonParser.MAX_ENERGY)
                self.state = 143
                self.match(QrogueDungeonParser.T__1)
                self.state = 144
                self.integer()
                self.state = 148
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.START_ENERGY:
                    self.state = 145
                    self.match(QrogueDungeonParser.START_ENERGY)
                    self.state = 146
                    self.match(QrogueDungeonParser.T__1)
                    self.state = 147
                    self.integer()




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


    class Room_contentContext(ParserRuleContext):

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

        def WALL(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.WALL)
            else:
                return self.getToken(QrogueDungeonParser.WALL, i)

        def r_row(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.R_rowContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.R_rowContext,i)


        def tile_descriptor(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.Tile_descriptorContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.Tile_descriptorContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_room_content

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

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

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




    def room_content(self):

        localctx = QrogueDungeonParser.Room_contentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_room_content)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 155
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,9,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 152
                    self.match(QrogueDungeonParser.WALL) 
                self.state = 157
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,9,self._ctx)

            self.state = 159 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 158
                    self.r_row()

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

            self.state = 166
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.WALL:
                self.state = 163
                self.match(QrogueDungeonParser.WALL)
                self.state = 168
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 172
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << QrogueDungeonParser.T__7) | (1 << QrogueDungeonParser.T__8) | (1 << QrogueDungeonParser.T__9) | (1 << QrogueDungeonParser.T__10) | (1 << QrogueDungeonParser.T__11) | (1 << QrogueDungeonParser.T__12) | (1 << QrogueDungeonParser.T__13) | (1 << QrogueDungeonParser.DIGIT))) != 0):
                self.state = 169
                self.tile_descriptor()
                self.state = 174
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class R_rowContext(ParserRuleContext):

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

        def WALL(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.WALL)
            else:
                return self.getToken(QrogueDungeonParser.WALL, i)

        def tile(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.TileContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.TileContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_r_row

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

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

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




    def r_row(self):

        localctx = QrogueDungeonParser.R_rowContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_r_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 175
            self.match(QrogueDungeonParser.WALL)
            self.state = 177 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 176
                self.tile()
                self.state = 179 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << QrogueDungeonParser.T__6) | (1 << QrogueDungeonParser.T__7) | (1 << QrogueDungeonParser.T__8) | (1 << QrogueDungeonParser.T__9) | (1 << QrogueDungeonParser.T__10) | (1 << QrogueDungeonParser.T__11) | (1 << QrogueDungeonParser.T__12) | (1 << QrogueDungeonParser.T__13) | (1 << QrogueDungeonParser.T__14) | (1 << QrogueDungeonParser.DIGIT))) != 0)):
                    break

            self.state = 181
            self.match(QrogueDungeonParser.WALL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TileContext(ParserRuleContext):

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

        def DIGIT(self):
            return self.getToken(QrogueDungeonParser.DIGIT, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_tile

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

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

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




    def tile(self):

        localctx = QrogueDungeonParser.TileContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_tile)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 183
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << QrogueDungeonParser.T__6) | (1 << QrogueDungeonParser.T__7) | (1 << QrogueDungeonParser.T__8) | (1 << QrogueDungeonParser.T__9) | (1 << QrogueDungeonParser.T__10) | (1 << QrogueDungeonParser.T__11) | (1 << QrogueDungeonParser.T__12) | (1 << QrogueDungeonParser.T__13) | (1 << QrogueDungeonParser.T__14) | (1 << QrogueDungeonParser.DIGIT))) != 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 Tile_descriptorContext(ParserRuleContext):

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

        def t_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.T_descriptorContext,0)


        def message_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Message_descriptorContext,0)


        def enemy_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Enemy_descriptorContext,0)


        def collectible_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Collectible_descriptorContext,0)


        def energy_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Energy_descriptorContext,0)


        def riddle_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Riddle_descriptorContext,0)


        def challenge_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Challenge_descriptorContext,0)


        def shop_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Shop_descriptorContext,0)


        def TUTORIAL_LITERAL(self):
            return self.getToken(QrogueDungeonParser.TUTORIAL_LITERAL, 0)

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def TRIGGER_LITERAL(self):
            return self.getToken(QrogueDungeonParser.TRIGGER_LITERAL, 0)

        def GLOBAL_EVENT_REFERENCE(self):
            return self.getToken(QrogueDungeonParser.GLOBAL_EVENT_REFERENCE, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_tile_descriptor

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

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

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




    def tile_descriptor(self):

        localctx = QrogueDungeonParser.Tile_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_tile_descriptor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 193
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.T__7]:
                self.state = 185
                self.t_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__8]:
                self.state = 186
                self.message_descriptor()
                pass
            elif token in [QrogueDungeonParser.DIGIT]:
                self.state = 187
                self.enemy_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__9]:
                self.state = 188
                self.collectible_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__10]:
                self.state = 189
                self.energy_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__11]:
                self.state = 190
                self.riddle_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__12]:
                self.state = 191
                self.challenge_descriptor()
                pass
            elif token in [QrogueDungeonParser.T__13]:
                self.state = 192
                self.shop_descriptor()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 197
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.TUTORIAL_LITERAL:
                self.state = 195
                self.match(QrogueDungeonParser.TUTORIAL_LITERAL)
                self.state = 196
                self.match(QrogueDungeonParser.REFERENCE)


            self.state = 201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.TRIGGER_LITERAL:
                self.state = 199
                self.match(QrogueDungeonParser.TRIGGER_LITERAL)
                self.state = 200
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.GLOBAL_EVENT_REFERENCE or _la==QrogueDungeonParser.REFERENCE):
                    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 T_descriptorContext(ParserRuleContext):

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

        def trigger_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Trigger_descriptorContext,0)


        def teleport_descriptor(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Teleport_descriptorContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_t_descriptor

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

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

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




    def t_descriptor(self):

        localctx = QrogueDungeonParser.T_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_t_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 203
            self.match(QrogueDungeonParser.T__7)
            self.state = 206
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.LEVEL_EVENT, QrogueDungeonParser.GLOBAL_ACHIEVEMENT, QrogueDungeonParser.REFERENCE]:
                self.state = 204
                self.trigger_descriptor()
                pass
            elif token in [QrogueDungeonParser.LOCAL_TUNNEL, QrogueDungeonParser.GLOBAL_TELEPORT]:
                self.state = 205
                self.teleport_descriptor()
                pass
            else:
                raise NoViableAltException(self)

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


    class Trigger_descriptorContext(ParserRuleContext):

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

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def LEVEL_EVENT(self):
            return self.getToken(QrogueDungeonParser.LEVEL_EVENT, 0)

        def GLOBAL_ACHIEVEMENT(self):
            return self.getToken(QrogueDungeonParser.GLOBAL_ACHIEVEMENT, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_trigger_descriptor

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

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

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




    def trigger_descriptor(self):

        localctx = QrogueDungeonParser.Trigger_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_trigger_descriptor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.LEVEL_EVENT or _la==QrogueDungeonParser.GLOBAL_ACHIEVEMENT:
                self.state = 208
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.LEVEL_EVENT or _la==QrogueDungeonParser.GLOBAL_ACHIEVEMENT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 211
            self.match(QrogueDungeonParser.REFERENCE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Teleport_descriptorContext(ParserRuleContext):

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

        def LOCAL_TUNNEL(self):
            return self.getToken(QrogueDungeonParser.LOCAL_TUNNEL, 0)

        def ROOM_ID(self):
            return self.getToken(QrogueDungeonParser.ROOM_ID, 0)

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def GLOBAL_TELEPORT(self):
            return self.getToken(QrogueDungeonParser.GLOBAL_TELEPORT, 0)

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_teleport_descriptor

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

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

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




    def teleport_descriptor(self):

        localctx = QrogueDungeonParser.Teleport_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_teleport_descriptor)
        try:
            self.state = 220
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.LOCAL_TUNNEL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 213
                self.match(QrogueDungeonParser.LOCAL_TUNNEL)
                self.state = 214
                self.match(QrogueDungeonParser.ROOM_ID)
                self.state = 216
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 215
                    self.integer()


                pass
            elif token in [QrogueDungeonParser.GLOBAL_TELEPORT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 218
                self.match(QrogueDungeonParser.GLOBAL_TELEPORT)
                self.state = 219
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            else:
                raise NoViableAltException(self)

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


    class Message_descriptorContext(ParserRuleContext):

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

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_message_descriptor

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

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

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




    def message_descriptor(self):

        localctx = QrogueDungeonParser.Message_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_message_descriptor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 222
            self.match(QrogueDungeonParser.T__8)
            self.state = 224
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & ((1 << (QrogueDungeonParser.DIGIT - 58)) | (1 << (QrogueDungeonParser.INTEGER - 58)) | (1 << (QrogueDungeonParser.HALLWAY_ID - 58)))) != 0):
                self.state = 223
                self.integer()


            self.state = 226
            self.match(QrogueDungeonParser.REFERENCE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Collectible_descriptorContext(ParserRuleContext):

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

        def collectible(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectibleContext,0)


        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_collectible_descriptor

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

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

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




    def collectible_descriptor(self):

        localctx = QrogueDungeonParser.Collectible_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_collectible_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 228
            self.match(QrogueDungeonParser.T__9)
            self.state = 234
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 229
                self.match(QrogueDungeonParser.REFERENCE)
                self.state = 231
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,22,self._ctx)
                if la_ == 1:
                    self.state = 230
                    self.integer()


                pass
            elif token in [QrogueDungeonParser.KEY_LITERAL, QrogueDungeonParser.COIN_LITERAL, QrogueDungeonParser.ENERGY_LITERAL, QrogueDungeonParser.GATE_LITERAL, QrogueDungeonParser.QUBIT_LITERAL, QrogueDungeonParser.NONE_LITERAL]:
                self.state = 233
                self.collectible()
                pass
            else:
                raise NoViableAltException(self)

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


    class Energy_descriptorContext(ParserRuleContext):

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

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_energy_descriptor

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

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

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




    def energy_descriptor(self):

        localctx = QrogueDungeonParser.Energy_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_energy_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236
            self.match(QrogueDungeonParser.T__10)
            self.state = 237
            self.integer()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Shop_descriptorContext(ParserRuleContext):

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

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def collectibles(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectiblesContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_shop_descriptor

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

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

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




    def shop_descriptor(self):

        localctx = QrogueDungeonParser.Shop_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_shop_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 239
            self.match(QrogueDungeonParser.T__13)
            self.state = 240
            self.integer()
            self.state = 243
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 241
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.T__4]:
                self.state = 242
                self.collectibles()
                pass
            else:
                raise NoViableAltException(self)

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


    class Enemy_descriptorContext(ParserRuleContext):

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

        def DIGIT(self):
            return self.getToken(QrogueDungeonParser.DIGIT, 0)

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def stv(self):
            return self.getTypedRuleContext(QrogueDungeonParser.StvContext,0)


        def collectible(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectibleContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_enemy_descriptor

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

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

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




    def enemy_descriptor(self):

        localctx = QrogueDungeonParser.Enemy_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_enemy_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 245
            self.match(QrogueDungeonParser.DIGIT)
            self.state = 248
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 246
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.T__4]:
                self.state = 247
                self.stv()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 252
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 250
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.KEY_LITERAL, QrogueDungeonParser.COIN_LITERAL, QrogueDungeonParser.ENERGY_LITERAL, QrogueDungeonParser.GATE_LITERAL, QrogueDungeonParser.QUBIT_LITERAL, QrogueDungeonParser.NONE_LITERAL]:
                self.state = 251
                self.collectible()
                pass
            elif token in [QrogueDungeonParser.T__7, QrogueDungeonParser.T__8, QrogueDungeonParser.T__9, QrogueDungeonParser.T__10, QrogueDungeonParser.T__11, QrogueDungeonParser.T__12, QrogueDungeonParser.T__13, QrogueDungeonParser.TUTORIAL_LITERAL, QrogueDungeonParser.TRIGGER_LITERAL, QrogueDungeonParser.DIGIT, QrogueDungeonParser.ROOM_ID, QrogueDungeonParser.HALLWAYS]:
                pass
            else:
                pass
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Riddle_descriptorContext(ParserRuleContext):

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

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def puzzle_parameter(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Puzzle_parameterContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_riddle_descriptor

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

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

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




    def riddle_descriptor(self):

        localctx = QrogueDungeonParser.Riddle_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_riddle_descriptor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 254
            self.match(QrogueDungeonParser.T__11)
            self.state = 255
            self.integer()
            self.state = 256
            self.puzzle_parameter()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Challenge_descriptorContext(ParserRuleContext):

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

        def integer(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.IntegerContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,i)


        def puzzle_parameter(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Puzzle_parameterContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_challenge_descriptor

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

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

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




    def challenge_descriptor(self):

        localctx = QrogueDungeonParser.Challenge_descriptorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_challenge_descriptor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            self.match(QrogueDungeonParser.T__12)
            self.state = 259
            self.integer()
            self.state = 261
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & ((1 << (QrogueDungeonParser.DIGIT - 58)) | (1 << (QrogueDungeonParser.INTEGER - 58)) | (1 << (QrogueDungeonParser.HALLWAY_ID - 58)))) != 0):
                self.state = 260
                self.integer()


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


    class Puzzle_parameterContext(ParserRuleContext):

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

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def stv(self):
            return self.getTypedRuleContext(QrogueDungeonParser.StvContext,0)


        def collectible(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectibleContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_puzzle_parameter

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

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

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




    def puzzle_parameter(self):

        localctx = QrogueDungeonParser.Puzzle_parameterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_puzzle_parameter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 267
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 265
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.T__4]:
                self.state = 266
                self.stv()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 271
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.state = 269
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.KEY_LITERAL, QrogueDungeonParser.COIN_LITERAL, QrogueDungeonParser.ENERGY_LITERAL, QrogueDungeonParser.GATE_LITERAL, QrogueDungeonParser.QUBIT_LITERAL, QrogueDungeonParser.NONE_LITERAL]:
                self.state = 270
                self.collectible()
                pass
            else:
                raise NoViableAltException(self)

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


    class Draw_strategyContext(ParserRuleContext):

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

        def RANDOM_DRAW(self):
            return self.getToken(QrogueDungeonParser.RANDOM_DRAW, 0)

        def ORDERED_DRAW(self):
            return self.getToken(QrogueDungeonParser.ORDERED_DRAW, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_draw_strategy

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

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

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




    def draw_strategy(self):

        localctx = QrogueDungeonParser.Draw_strategyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_draw_strategy)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 273
            _la = self._input.LA(1)
            if not(_la==QrogueDungeonParser.ORDERED_DRAW or _la==QrogueDungeonParser.RANDOM_DRAW):
                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 Stv_poolsContext(ParserRuleContext):

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

        def STV_POOLS(self):
            return self.getToken(QrogueDungeonParser.STV_POOLS, 0)

        def default_stv_pool(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Default_stv_poolContext,0)


        def stv_pool(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.Stv_poolContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.Stv_poolContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_stv_pools

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

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

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




    def stv_pools(self):

        localctx = QrogueDungeonParser.Stv_poolsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_stv_pools)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 275
            self.match(QrogueDungeonParser.STV_POOLS)
            self.state = 282
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__15:
                self.state = 276
                self.match(QrogueDungeonParser.T__15)
                self.state = 278 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 277
                    self.stv_pool()
                    self.state = 280 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==QrogueDungeonParser.REFERENCE):
                        break



            self.state = 284
            self.match(QrogueDungeonParser.T__16)
            self.state = 285
            self.default_stv_pool()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Default_stv_poolContext(ParserRuleContext):

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

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def stvs(self):
            return self.getTypedRuleContext(QrogueDungeonParser.StvsContext,0)


        def draw_strategy(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Draw_strategyContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_default_stv_pool

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

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

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




    def default_stv_pool(self):

        localctx = QrogueDungeonParser.Default_stv_poolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_default_stv_pool)
        self._la = 0 # Token type
        try:
            self.state = 292
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 287
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.T__4, QrogueDungeonParser.ORDERED_DRAW, QrogueDungeonParser.RANDOM_DRAW]:
                self.enterOuterAlt(localctx, 2)
                self.state = 289
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.ORDERED_DRAW or _la==QrogueDungeonParser.RANDOM_DRAW:
                    self.state = 288
                    self.draw_strategy()


                self.state = 291
                self.stvs()
                pass
            else:
                raise NoViableAltException(self)

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


    class Stv_poolContext(ParserRuleContext):

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

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def stvs(self):
            return self.getTypedRuleContext(QrogueDungeonParser.StvsContext,0)


        def draw_strategy(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Draw_strategyContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_stv_pool

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

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

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




    def stv_pool(self):

        localctx = QrogueDungeonParser.Stv_poolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_stv_pool)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 294
            self.match(QrogueDungeonParser.REFERENCE)
            self.state = 296
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.ORDERED_DRAW or _la==QrogueDungeonParser.RANDOM_DRAW:
                self.state = 295
                self.draw_strategy()


            self.state = 298
            self.stvs()
            self.state = 303
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,35,self._ctx)
            if la_ == 1:
                self.state = 299
                self.match(QrogueDungeonParser.T__16)
                self.state = 300
                self.match(QrogueDungeonParser.T__17)
                self.state = 301
                self.match(QrogueDungeonParser.T__18)
                self.state = 302
                self.match(QrogueDungeonParser.REFERENCE)


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


    class StvsContext(ParserRuleContext):

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

        def stv_ref(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.Stv_refContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.Stv_refContext,i)


        def LIST_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.LIST_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.LIST_SEPARATOR, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_stvs

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

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

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




    def stvs(self):

        localctx = QrogueDungeonParser.StvsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_stvs)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 305
            self.match(QrogueDungeonParser.T__4)
            self.state = 306
            self.stv_ref()
            self.state = 311
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.LIST_SEPARATOR:
                self.state = 307
                self.match(QrogueDungeonParser.LIST_SEPARATOR)
                self.state = 308
                self.stv_ref()
                self.state = 313
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 314
            self.match(QrogueDungeonParser.T__5)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Stv_refContext(ParserRuleContext):

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

        def stv(self):
            return self.getTypedRuleContext(QrogueDungeonParser.StvContext,0)


        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_stv_ref

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

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

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




    def stv_ref(self):

        localctx = QrogueDungeonParser.Stv_refContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_stv_ref)
        try:
            self.state = 318
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.T__4]:
                self.enterOuterAlt(localctx, 1)
                self.state = 316
                self.stv()
                pass
            elif token in [QrogueDungeonParser.REFERENCE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 317
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            else:
                raise NoViableAltException(self)

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


    class StvContext(ParserRuleContext):

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

        def complex_number(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.Complex_numberContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.Complex_numberContext,i)


        def LIST_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.LIST_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.LIST_SEPARATOR, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_stv

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

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

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




    def stv(self):

        localctx = QrogueDungeonParser.StvContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_stv)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 320
            self.match(QrogueDungeonParser.T__4)
            self.state = 321
            self.complex_number()
            self.state = 326
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.LIST_SEPARATOR:
                self.state = 322
                self.match(QrogueDungeonParser.LIST_SEPARATOR)
                self.state = 323
                self.complex_number()
                self.state = 328
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 329
            self.match(QrogueDungeonParser.T__5)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Reward_poolsContext(ParserRuleContext):

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

        def REWARD_POOLS(self):
            return self.getToken(QrogueDungeonParser.REWARD_POOLS, 0)

        def default_reward_pool(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Default_reward_poolContext,0)


        def reward_pool(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.Reward_poolContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.Reward_poolContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_reward_pools

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

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

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




    def reward_pools(self):

        localctx = QrogueDungeonParser.Reward_poolsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_reward_pools)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 331
            self.match(QrogueDungeonParser.REWARD_POOLS)
            self.state = 338
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__15:
                self.state = 332
                self.match(QrogueDungeonParser.T__15)
                self.state = 334 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 333
                    self.reward_pool()
                    self.state = 336 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==QrogueDungeonParser.REFERENCE):
                        break



            self.state = 340
            self.match(QrogueDungeonParser.T__16)
            self.state = 341
            self.default_reward_pool()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Default_reward_poolContext(ParserRuleContext):

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

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def collectibles(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectiblesContext,0)


        def draw_strategy(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Draw_strategyContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_default_reward_pool

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

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

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




    def default_reward_pool(self):

        localctx = QrogueDungeonParser.Default_reward_poolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_default_reward_pool)
        self._la = 0 # Token type
        try:
            self.state = 348
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.REFERENCE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 343
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.T__4, QrogueDungeonParser.ORDERED_DRAW, QrogueDungeonParser.RANDOM_DRAW]:
                self.enterOuterAlt(localctx, 2)
                self.state = 345
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.ORDERED_DRAW or _la==QrogueDungeonParser.RANDOM_DRAW:
                    self.state = 344
                    self.draw_strategy()


                self.state = 347
                self.collectibles()
                pass
            else:
                raise NoViableAltException(self)

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


    class Reward_poolContext(ParserRuleContext):

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

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def collectibles(self):
            return self.getTypedRuleContext(QrogueDungeonParser.CollectiblesContext,0)


        def draw_strategy(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Draw_strategyContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_reward_pool

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

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

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




    def reward_pool(self):

        localctx = QrogueDungeonParser.Reward_poolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_reward_pool)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 350
            self.match(QrogueDungeonParser.REFERENCE)
            self.state = 352
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.ORDERED_DRAW or _la==QrogueDungeonParser.RANDOM_DRAW:
                self.state = 351
                self.draw_strategy()


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


    class CollectiblesContext(ParserRuleContext):

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

        def collectible(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.CollectibleContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.CollectibleContext,i)


        def LIST_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.LIST_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.LIST_SEPARATOR, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_collectibles

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

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

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




    def collectibles(self):

        localctx = QrogueDungeonParser.CollectiblesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_collectibles)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 356
            self.match(QrogueDungeonParser.T__4)
            self.state = 357
            self.collectible()
            self.state = 362
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.LIST_SEPARATOR:
                self.state = 358
                self.match(QrogueDungeonParser.LIST_SEPARATOR)
                self.state = 359
                self.collectible()
                self.state = 364
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 365
            self.match(QrogueDungeonParser.T__5)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CollectibleContext(ParserRuleContext):

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

        def KEY_LITERAL(self):
            return self.getToken(QrogueDungeonParser.KEY_LITERAL, 0)

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def COIN_LITERAL(self):
            return self.getToken(QrogueDungeonParser.COIN_LITERAL, 0)

        def ENERGY_LITERAL(self):
            return self.getToken(QrogueDungeonParser.ENERGY_LITERAL, 0)

        def GATE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.GATE_LITERAL, 0)

        def REFERENCE(self):
            return self.getToken(QrogueDungeonParser.REFERENCE, 0)

        def QUBIT_LITERAL(self):
            return self.getToken(QrogueDungeonParser.QUBIT_LITERAL, 0)

        def NONE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.NONE_LITERAL, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_collectible

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

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

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




    def collectible(self):

        localctx = QrogueDungeonParser.CollectibleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_collectible)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.KEY_LITERAL]:
                self.state = 367
                self.match(QrogueDungeonParser.KEY_LITERAL)
                self.state = 368
                self.integer()
                pass
            elif token in [QrogueDungeonParser.COIN_LITERAL]:
                self.state = 369
                self.match(QrogueDungeonParser.COIN_LITERAL)
                self.state = 370
                self.integer()
                pass
            elif token in [QrogueDungeonParser.ENERGY_LITERAL]:
                self.state = 371
                self.match(QrogueDungeonParser.ENERGY_LITERAL)
                self.state = 372
                self.integer()
                pass
            elif token in [QrogueDungeonParser.GATE_LITERAL]:
                self.state = 373
                self.match(QrogueDungeonParser.GATE_LITERAL)
                self.state = 374
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            elif token in [QrogueDungeonParser.QUBIT_LITERAL]:
                self.state = 375
                self.match(QrogueDungeonParser.QUBIT_LITERAL)
                self.state = 377
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
                if la_ == 1:
                    self.state = 376
                    self.integer()


                pass
            elif token in [QrogueDungeonParser.NONE_LITERAL]:
                self.state = 379
                self.match(QrogueDungeonParser.NONE_LITERAL)
                pass
            else:
                raise NoViableAltException(self)

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


    class IntegerContext(ParserRuleContext):

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

        def DIGIT(self):
            return self.getToken(QrogueDungeonParser.DIGIT, 0)

        def HALLWAY_ID(self):
            return self.getToken(QrogueDungeonParser.HALLWAY_ID, 0)

        def INTEGER(self):
            return self.getToken(QrogueDungeonParser.INTEGER, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_integer

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

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

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




    def integer(self):

        localctx = QrogueDungeonParser.IntegerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_integer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            _la = self._input.LA(1)
            if not(((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & ((1 << (QrogueDungeonParser.DIGIT - 58)) | (1 << (QrogueDungeonParser.INTEGER - 58)) | (1 << (QrogueDungeonParser.HALLWAY_ID - 58)))) != 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 Complex_numberContext(ParserRuleContext):

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

        def IMAG_NUMBER(self):
            return self.getToken(QrogueDungeonParser.IMAG_NUMBER, 0)

        def SIGN(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.SIGN)
            else:
                return self.getToken(QrogueDungeonParser.SIGN, i)

        def integer(self):
            return self.getTypedRuleContext(QrogueDungeonParser.IntegerContext,0)


        def FLOAT(self):
            return self.getToken(QrogueDungeonParser.FLOAT, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_complex_number

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

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

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




    def complex_number(self):

        localctx = QrogueDungeonParser.Complex_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_complex_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 385
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.SIGN:
                self.state = 384
                self.match(QrogueDungeonParser.SIGN)


            self.state = 396
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.IMAG_NUMBER]:
                self.state = 387
                self.match(QrogueDungeonParser.IMAG_NUMBER)
                pass
            elif token in [QrogueDungeonParser.DIGIT, QrogueDungeonParser.INTEGER, QrogueDungeonParser.FLOAT, QrogueDungeonParser.HALLWAY_ID]:
                self.state = 390
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [QrogueDungeonParser.DIGIT, QrogueDungeonParser.INTEGER, QrogueDungeonParser.HALLWAY_ID]:
                    self.state = 388
                    self.integer()
                    pass
                elif token in [QrogueDungeonParser.FLOAT]:
                    self.state = 389
                    self.match(QrogueDungeonParser.FLOAT)
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 394
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.SIGN:
                    self.state = 392
                    self.match(QrogueDungeonParser.SIGN)
                    self.state = 393
                    self.match(QrogueDungeonParser.IMAG_NUMBER)


                pass
            else:
                raise NoViableAltException(self)

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


    class LayoutContext(ParserRuleContext):

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

        def LAYOUT(self):
            return self.getToken(QrogueDungeonParser.LAYOUT, 0)

        def l_room_row(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.L_room_rowContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.L_room_rowContext,i)


        def HORIZONTAL_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.HORIZONTAL_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.HORIZONTAL_SEPARATOR, i)

        def l_hallway_row(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.L_hallway_rowContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.L_hallway_rowContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_layout

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

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

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




    def layout(self):

        localctx = QrogueDungeonParser.LayoutContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_layout)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 398
            self.match(QrogueDungeonParser.LAYOUT)
            self.state = 402
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.HORIZONTAL_SEPARATOR:
                self.state = 399
                self.match(QrogueDungeonParser.HORIZONTAL_SEPARATOR)
                self.state = 404
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 405
            self.l_room_row()
            self.state = 411
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.VERTICAL_SEPARATOR:
                self.state = 406
                self.l_hallway_row()
                self.state = 407
                self.l_room_row()
                self.state = 413
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 417
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.HORIZONTAL_SEPARATOR:
                self.state = 414
                self.match(QrogueDungeonParser.HORIZONTAL_SEPARATOR)
                self.state = 419
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class L_room_rowContext(ParserRuleContext):

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

        def VERTICAL_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.VERTICAL_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.VERTICAL_SEPARATOR, i)

        def ROOM_ID(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.ROOM_ID)
            else:
                return self.getToken(QrogueDungeonParser.ROOM_ID, i)

        def EMPTY_ROOM(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.EMPTY_ROOM)
            else:
                return self.getToken(QrogueDungeonParser.EMPTY_ROOM, i)

        def HALLWAY_ID(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.HALLWAY_ID)
            else:
                return self.getToken(QrogueDungeonParser.HALLWAY_ID, i)

        def EMPTY_HALLWAY(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.EMPTY_HALLWAY)
            else:
                return self.getToken(QrogueDungeonParser.EMPTY_HALLWAY, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_l_room_row

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

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

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




    def l_room_row(self):

        localctx = QrogueDungeonParser.L_room_rowContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_l_room_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 420
            self.match(QrogueDungeonParser.VERTICAL_SEPARATOR)
            self.state = 421
            _la = self._input.LA(1)
            if not(_la==QrogueDungeonParser.EMPTY_ROOM or _la==QrogueDungeonParser.ROOM_ID):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 426
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.EMPTY_HALLWAY or _la==QrogueDungeonParser.HALLWAY_ID:
                self.state = 422
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.EMPTY_HALLWAY or _la==QrogueDungeonParser.HALLWAY_ID):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 423
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.EMPTY_ROOM or _la==QrogueDungeonParser.ROOM_ID):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 428
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 429
            self.match(QrogueDungeonParser.VERTICAL_SEPARATOR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class L_hallway_rowContext(ParserRuleContext):

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

        def VERTICAL_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.VERTICAL_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.VERTICAL_SEPARATOR, i)

        def HALLWAY_ID(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.HALLWAY_ID)
            else:
                return self.getToken(QrogueDungeonParser.HALLWAY_ID, i)

        def EMPTY_HALLWAY(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.EMPTY_HALLWAY)
            else:
                return self.getToken(QrogueDungeonParser.EMPTY_HALLWAY, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_l_hallway_row

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

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

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




    def l_hallway_row(self):

        localctx = QrogueDungeonParser.L_hallway_rowContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_l_hallway_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 431
            self.match(QrogueDungeonParser.VERTICAL_SEPARATOR)
            self.state = 433 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 432
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.EMPTY_HALLWAY or _la==QrogueDungeonParser.HALLWAY_ID):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 435 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==QrogueDungeonParser.EMPTY_HALLWAY or _la==QrogueDungeonParser.HALLWAY_ID):
                    break

            self.state = 437
            self.match(QrogueDungeonParser.VERTICAL_SEPARATOR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RoomsContext(ParserRuleContext):

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

        def ROOMS(self):
            return self.getToken(QrogueDungeonParser.ROOMS, 0)

        def room(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.RoomContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.RoomContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_rooms

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

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

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




    def rooms(self):

        localctx = QrogueDungeonParser.RoomsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_rooms)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 439
            self.match(QrogueDungeonParser.ROOMS)
            self.state = 443
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.ROOM_ID:
                self.state = 440
                self.room()
                self.state = 445
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class RoomContext(ParserRuleContext):

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

        def ROOM_ID(self):
            return self.getToken(QrogueDungeonParser.ROOM_ID, 0)

        def r_attributes(self):
            return self.getTypedRuleContext(QrogueDungeonParser.R_attributesContext,0)


        def room_content(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Room_contentContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_room

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

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

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




    def room(self):

        localctx = QrogueDungeonParser.RoomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_room)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 446
            self.match(QrogueDungeonParser.ROOM_ID)
            self.state = 447
            self.r_attributes()
            self.state = 448
            self.match(QrogueDungeonParser.T__18)
            self.state = 449
            self.room_content()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class R_attributesContext(ParserRuleContext):

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

        def r_visibility(self):
            return self.getTypedRuleContext(QrogueDungeonParser.R_visibilityContext,0)


        def r_type(self):
            return self.getTypedRuleContext(QrogueDungeonParser.R_typeContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_r_attributes

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

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

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




    def r_attributes(self):

        localctx = QrogueDungeonParser.R_attributesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_r_attributes)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 451
            self.match(QrogueDungeonParser.T__19)
            self.state = 452
            self.r_visibility()
            self.state = 453
            self.r_type()
            self.state = 454
            self.match(QrogueDungeonParser.T__20)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class R_visibilityContext(ParserRuleContext):

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

        def VISIBLE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.VISIBLE_LITERAL, 0)

        def FOGGY_LITERAL(self):
            return self.getToken(QrogueDungeonParser.FOGGY_LITERAL, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_r_visibility

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

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

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




    def r_visibility(self):

        localctx = QrogueDungeonParser.R_visibilityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_r_visibility)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 457
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.VISIBLE_LITERAL or _la==QrogueDungeonParser.FOGGY_LITERAL:
                self.state = 456
                _la = self._input.LA(1)
                if not(_la==QrogueDungeonParser.VISIBLE_LITERAL or _la==QrogueDungeonParser.FOGGY_LITERAL):
                    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 R_typeContext(ParserRuleContext):

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

        def SPAWN_LITERAL(self):
            return self.getToken(QrogueDungeonParser.SPAWN_LITERAL, 0)

        def BOSS_LITERAL(self):
            return self.getToken(QrogueDungeonParser.BOSS_LITERAL, 0)

        def WILD_LITERAL(self):
            return self.getToken(QrogueDungeonParser.WILD_LITERAL, 0)

        def SHOP_LITERAL(self):
            return self.getToken(QrogueDungeonParser.SHOP_LITERAL, 0)

        def RIDDLE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.RIDDLE_LITERAL, 0)

        def GATE_ROOM_LITERAL(self):
            return self.getToken(QrogueDungeonParser.GATE_ROOM_LITERAL, 0)

        def TREASURE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.TREASURE_LITERAL, 0)

        def CHALLENGE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.CHALLENGE_LITERAL, 0)

        def PAUSE_LITERAL(self):
            return self.getToken(QrogueDungeonParser.PAUSE_LITERAL, 0)

        def STORY_LITERAL(self):
            return self.getToken(QrogueDungeonParser.STORY_LITERAL, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_r_type

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

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

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




    def r_type(self):

        localctx = QrogueDungeonParser.R_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_r_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 459
            _la = self._input.LA(1)
            if not(((((_la - 81)) & ~0x3f) == 0 and ((1 << (_la - 81)) & ((1 << (QrogueDungeonParser.SPAWN_LITERAL - 81)) | (1 << (QrogueDungeonParser.WILD_LITERAL - 81)) | (1 << (QrogueDungeonParser.SHOP_LITERAL - 81)) | (1 << (QrogueDungeonParser.RIDDLE_LITERAL - 81)) | (1 << (QrogueDungeonParser.BOSS_LITERAL - 81)) | (1 << (QrogueDungeonParser.GATE_ROOM_LITERAL - 81)) | (1 << (QrogueDungeonParser.TREASURE_LITERAL - 81)) | (1 << (QrogueDungeonParser.CHALLENGE_LITERAL - 81)) | (1 << (QrogueDungeonParser.PAUSE_LITERAL - 81)) | (1 << (QrogueDungeonParser.STORY_LITERAL - 81)))) != 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 HallwaysContext(ParserRuleContext):

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

        def HALLWAYS(self):
            return self.getToken(QrogueDungeonParser.HALLWAYS, 0)

        def hallway(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.HallwayContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.HallwayContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_hallways

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

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

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




    def hallways(self):

        localctx = QrogueDungeonParser.HallwaysContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_hallways)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 461
            self.match(QrogueDungeonParser.HALLWAYS)
            self.state = 465
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.HALLWAY_ID:
                self.state = 462
                self.hallway()
                self.state = 467
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class HallwayContext(ParserRuleContext):

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

        def HALLWAY_ID(self):
            return self.getToken(QrogueDungeonParser.HALLWAY_ID, 0)

        def h_attributes(self):
            return self.getTypedRuleContext(QrogueDungeonParser.H_attributesContext,0)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_hallway

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

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

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




    def hallway(self):

        localctx = QrogueDungeonParser.HallwayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_hallway)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self.match(QrogueDungeonParser.HALLWAY_ID)
            self.state = 469
            self.h_attributes()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class H_attributesContext(ParserRuleContext):

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

        def OPEN_LITERAL(self):
            return self.getToken(QrogueDungeonParser.OPEN_LITERAL, 0)

        def CLOSED_LITERAL(self):
            return self.getToken(QrogueDungeonParser.CLOSED_LITERAL, 0)

        def LOCKED_LITERAL(self):
            return self.getToken(QrogueDungeonParser.LOCKED_LITERAL, 0)

        def EVENT_LITERAL(self):
            return self.getToken(QrogueDungeonParser.EVENT_LITERAL, 0)

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def DIRECTION(self):
            return self.getToken(QrogueDungeonParser.DIRECTION, 0)

        def ENTANGLED_LITERAL(self):
            return self.getToken(QrogueDungeonParser.ENTANGLED_LITERAL, 0)

        def HALLWAY_ID(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.HALLWAY_ID)
            else:
                return self.getToken(QrogueDungeonParser.HALLWAY_ID, i)

        def TUTORIAL_LITERAL(self):
            return self.getToken(QrogueDungeonParser.TUTORIAL_LITERAL, 0)

        def TRIGGER_LITERAL(self):
            return self.getToken(QrogueDungeonParser.TRIGGER_LITERAL, 0)

        def PERMANENT_LITERAL(self):
            return self.getToken(QrogueDungeonParser.PERMANENT_LITERAL, 0)

        def LIST_SEPARATOR(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.LIST_SEPARATOR)
            else:
                return self.getToken(QrogueDungeonParser.LIST_SEPARATOR, i)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_h_attributes

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

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

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




    def h_attributes(self):

        localctx = QrogueDungeonParser.H_attributesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_h_attributes)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 471
            self.match(QrogueDungeonParser.T__19)
            self.state = 477
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [QrogueDungeonParser.OPEN_LITERAL]:
                self.state = 472
                self.match(QrogueDungeonParser.OPEN_LITERAL)
                pass
            elif token in [QrogueDungeonParser.CLOSED_LITERAL]:
                self.state = 473
                self.match(QrogueDungeonParser.CLOSED_LITERAL)
                pass
            elif token in [QrogueDungeonParser.LOCKED_LITERAL]:
                self.state = 474
                self.match(QrogueDungeonParser.LOCKED_LITERAL)
                pass
            elif token in [QrogueDungeonParser.EVENT_LITERAL]:
                self.state = 475
                self.match(QrogueDungeonParser.EVENT_LITERAL)
                self.state = 476
                self.match(QrogueDungeonParser.REFERENCE)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 484
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__21:
                self.state = 479
                self.match(QrogueDungeonParser.T__21)
                self.state = 480
                self.match(QrogueDungeonParser.DIRECTION)
                self.state = 482
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.PERMANENT_LITERAL:
                    self.state = 481
                    self.match(QrogueDungeonParser.PERMANENT_LITERAL)




            self.state = 497
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.ENTANGLED_LITERAL:
                self.state = 486
                self.match(QrogueDungeonParser.ENTANGLED_LITERAL)
                self.state = 487
                self.match(QrogueDungeonParser.T__4)
                self.state = 488
                self.match(QrogueDungeonParser.HALLWAY_ID)
                self.state = 493
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==QrogueDungeonParser.LIST_SEPARATOR:
                    self.state = 489
                    self.match(QrogueDungeonParser.LIST_SEPARATOR)
                    self.state = 490
                    self.match(QrogueDungeonParser.HALLWAY_ID)
                    self.state = 495
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 496
                self.match(QrogueDungeonParser.T__5)


            self.state = 499
            self.match(QrogueDungeonParser.T__20)
            self.state = 502
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.TUTORIAL_LITERAL:
                self.state = 500
                self.match(QrogueDungeonParser.TUTORIAL_LITERAL)
                self.state = 501
                self.match(QrogueDungeonParser.REFERENCE)


            self.state = 506
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.TRIGGER_LITERAL:
                self.state = 504
                self.match(QrogueDungeonParser.TRIGGER_LITERAL)
                self.state = 505
                self.match(QrogueDungeonParser.REFERENCE)


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


    class MessagesContext(ParserRuleContext):

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

        def MESSAGES(self):
            return self.getToken(QrogueDungeonParser.MESSAGES, 0)

        def MSG_SPEAKER(self):
            return self.getToken(QrogueDungeonParser.MSG_SPEAKER, 0)

        def TEXT(self):
            return self.getToken(QrogueDungeonParser.TEXT, 0)

        def message(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(QrogueDungeonParser.MessageContext)
            else:
                return self.getTypedRuleContext(QrogueDungeonParser.MessageContext,i)


        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_messages

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

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

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




    def messages(self):

        localctx = QrogueDungeonParser.MessagesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_messages)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 508
            self.match(QrogueDungeonParser.MESSAGES)
            self.state = 512
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__16:
                self.state = 509
                self.match(QrogueDungeonParser.T__16)
                self.state = 510
                self.match(QrogueDungeonParser.MSG_SPEAKER)
                self.state = 511
                self.match(QrogueDungeonParser.TEXT)


            self.state = 517
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==QrogueDungeonParser.REFERENCE:
                self.state = 514
                self.message()
                self.state = 519
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class MessageContext(ParserRuleContext):

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

        def REFERENCE(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.REFERENCE)
            else:
                return self.getToken(QrogueDungeonParser.REFERENCE, i)

        def message_body(self):
            return self.getTypedRuleContext(QrogueDungeonParser.Message_bodyContext,0)


        def MSG_EVENT(self):
            return self.getToken(QrogueDungeonParser.MSG_EVENT, 0)

        def MSG_ALTERNATIVE(self):
            return self.getToken(QrogueDungeonParser.MSG_ALTERNATIVE, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_message

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

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

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




    def message(self):

        localctx = QrogueDungeonParser.MessageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_message)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 520
            self.match(QrogueDungeonParser.REFERENCE)
            self.state = 521
            self.message_body()
            self.state = 526
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.MSG_EVENT:
                self.state = 522
                self.match(QrogueDungeonParser.MSG_EVENT)
                self.state = 523
                self.match(QrogueDungeonParser.REFERENCE)
                self.state = 524
                self.match(QrogueDungeonParser.MSG_ALTERNATIVE)
                self.state = 525
                self.match(QrogueDungeonParser.REFERENCE)


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


    class Message_bodyContext(ParserRuleContext):

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

        def MSG_SPEAKER(self):
            return self.getToken(QrogueDungeonParser.MSG_SPEAKER, 0)

        def TEXT(self, i=None):
            if i is None:
                return self.getTokens(QrogueDungeonParser.TEXT)
            else:
                return self.getToken(QrogueDungeonParser.TEXT, i)

        def MSG_PRIORITY(self):
            return self.getToken(QrogueDungeonParser.MSG_PRIORITY, 0)

        def DIGIT(self):
            return self.getToken(QrogueDungeonParser.DIGIT, 0)

        def getRuleIndex(self):
            return QrogueDungeonParser.RULE_message_body

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

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

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




    def message_body(self):

        localctx = QrogueDungeonParser.Message_bodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_message_body)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 530
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.MSG_SPEAKER:
                self.state = 528
                self.match(QrogueDungeonParser.MSG_SPEAKER)
                self.state = 529
                self.match(QrogueDungeonParser.TEXT)


            self.state = 533
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.MSG_PRIORITY:
                self.state = 532
                self.match(QrogueDungeonParser.MSG_PRIORITY)


            self.state = 540
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==QrogueDungeonParser.T__22:
                self.state = 535
                self.match(QrogueDungeonParser.T__22)
                self.state = 537
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==QrogueDungeonParser.T__1:
                    self.state = 536
                    self.match(QrogueDungeonParser.T__1)


                self.state = 539
                self.match(QrogueDungeonParser.DIGIT)


            self.state = 543 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 542
                self.match(QrogueDungeonParser.TEXT)
                self.state = 545 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==QrogueDungeonParser.TEXT):
                    break

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





