# Generated from Thrift.g4 by ANTLR 4.7.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys

def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\67")
        buf.write("\u01ac\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\3\2\7\2V\n\2\f\2\16\2Y\13")
        buf.write("\2\3\2\7\2\\\n\2\f\2\16\2_\13\2\3\2\3\2\3\3\3\3\3\3\3")
        buf.write("\3\3\3\5\3h\n\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3")
        buf.write("\5\3\5\3\5\3\5\5\5w\n\5\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3")
        buf.write("\7\3\7\3\7\3\7\3\7\3\7\5\7\u0086\n\7\3\b\3\b\3\b\3\b\3")
        buf.write("\b\5\b\u008d\n\b\3\b\5\b\u0090\n\b\3\t\3\t\3\t\3\t\5\t")
        buf.write("\u0096\n\t\3\n\3\n\3\n\3\n\7\n\u009c\n\n\f\n\16\n\u009f")
        buf.write("\13\n\3\n\3\n\5\n\u00a3\n\n\3\13\3\13\3\13\5\13\u00a8")
        buf.write("\n\13\3\13\5\13\u00ab\n\13\3\13\5\13\u00ae\n\13\3\f\3")
        buf.write("\f\3\f\3\f\3\f\5\f\u00b5\n\f\7\f\u00b7\n\f\f\f\16\f\u00ba")
        buf.write("\13\f\3\f\3\f\5\f\u00be\n\f\3\r\3\r\3\r\3\r\3\r\3\r\7")
        buf.write("\r\u00c6\n\r\f\r\16\r\u00c9\13\r\3\r\3\r\5\r\u00cd\n\r")
        buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\7\16\u00d5\n\16\f\16\16")
        buf.write("\16\u00d8\13\16\3\16\3\16\5\16\u00dc\n\16\3\17\3\17\3")
        buf.write("\17\3\17\3\17\3\17\7\17\u00e4\n\17\f\17\16\17\u00e7\13")
        buf.write("\17\3\17\3\17\5\17\u00eb\n\17\3\20\3\20\3\20\3\20\5\20")
        buf.write("\u00f1\n\20\3\20\3\20\3\20\3\20\7\20\u00f7\n\20\f\20\16")
        buf.write("\20\u00fa\13\20\3\20\3\20\5\20\u00fe\n\20\3\21\5\21\u0101")
        buf.write("\n\21\3\21\5\21\u0104\n\21\3\21\3\21\3\21\3\21\5\21\u010a")
        buf.write("\n\21\3\21\5\21\u010d\n\21\3\21\5\21\u0110\n\21\3\22\3")
        buf.write("\22\3\22\3\23\3\23\3\24\5\24\u0118\n\24\3\24\3\24\3\24")
        buf.write("\3\24\7\24\u011e\n\24\f\24\16\24\u0121\13\24\3\24\3\24")
        buf.write("\5\24\u0125\n\24\3\24\5\24\u0128\n\24\3\24\5\24\u012b")
        buf.write("\n\24\3\25\3\25\3\26\3\26\5\26\u0131\n\26\3\27\3\27\3")
        buf.write("\27\7\27\u0136\n\27\f\27\16\27\u0139\13\27\3\27\3\27\3")
        buf.write("\30\3\30\7\30\u013f\n\30\f\30\16\30\u0142\13\30\3\30\3")
        buf.write("\30\3\31\3\31\3\31\5\31\u0149\n\31\3\31\5\31\u014c\n\31")
        buf.write("\3\32\3\32\5\32\u0150\n\32\3\33\3\33\3\33\5\33\u0155\n")
        buf.write("\33\3\34\3\34\5\34\u0159\n\34\3\35\3\35\3\35\5\35\u015e")
        buf.write("\n\35\3\35\5\35\u0161\n\35\3\36\3\36\5\36\u0165\n\36\3")
        buf.write("\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\5\37\u016f\n\37")
        buf.write("\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \5 \u017a\n \3!\3!")
        buf.write("\3!\3\"\3\"\3\"\3\"\3\"\3\"\5\"\u0185\n\"\3#\3#\3$\3$")
        buf.write("\3$\5$\u018c\n$\7$\u018e\n$\f$\16$\u0191\13$\3$\3$\3%")
        buf.write("\3%\3%\3%\5%\u0199\n%\3&\3&\7&\u019d\n&\f&\16&\u01a0\13")
        buf.write("&\3&\3&\3\'\3\'\3(\3(\3)\3)\3*\3*\3*\2\2+\2\4\6\b\n\f")
        buf.write("\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@")
        buf.write("BDFHJLNPR\2\b\3\2\62\63\3\2\26\27\3\2\32\33\3\2\'(\4\2")
        buf.write("&&\64\64\3\2*\61\2\u01d2\2W\3\2\2\2\4g\3\2\2\2\6i\3\2")
        buf.write("\2\2\bv\3\2\2\2\nx\3\2\2\2\f\u0085\3\2\2\2\16\u0087\3")
        buf.write("\2\2\2\20\u0091\3\2\2\2\22\u0097\3\2\2\2\24\u00a4\3\2")
        buf.write("\2\2\26\u00af\3\2\2\2\30\u00bf\3\2\2\2\32\u00ce\3\2\2")
        buf.write("\2\34\u00dd\3\2\2\2\36\u00ec\3\2\2\2 \u0100\3\2\2\2\"")
        buf.write("\u0111\3\2\2\2$\u0114\3\2\2\2&\u0117\3\2\2\2(\u012c\3")
        buf.write("\2\2\2*\u0130\3\2\2\2,\u0132\3\2\2\2.\u013c\3\2\2\2\60")
        buf.write("\u0145\3\2\2\2\62\u014f\3\2\2\2\64\u0154\3\2\2\2\66\u0156")
        buf.write("\3\2\2\28\u015d\3\2\2\2:\u0162\3\2\2\2<\u016c\3\2\2\2")
        buf.write(">\u0174\3\2\2\2@\u017b\3\2\2\2B\u0184\3\2\2\2D\u0186\3")
        buf.write("\2\2\2F\u0188\3\2\2\2H\u0194\3\2\2\2J\u019a\3\2\2\2L\u01a3")
        buf.write("\3\2\2\2N\u01a5\3\2\2\2P\u01a7\3\2\2\2R\u01a9\3\2\2\2")
        buf.write("TV\5\4\3\2UT\3\2\2\2VY\3\2\2\2WU\3\2\2\2WX\3\2\2\2X]\3")
        buf.write("\2\2\2YW\3\2\2\2Z\\\5\f\7\2[Z\3\2\2\2\\_\3\2\2\2][\3\2")
        buf.write("\2\2]^\3\2\2\2^`\3\2\2\2_]\3\2\2\2`a\7\2\2\3a\3\3\2\2")
        buf.write("\2bh\5\6\4\2ch\5\b\5\2dh\5\n\6\2eh\5P)\2fh\5R*\2gb\3\2")
        buf.write("\2\2gc\3\2\2\2gd\3\2\2\2ge\3\2\2\2gf\3\2\2\2h\5\3\2\2")
        buf.write("\2ij\7\3\2\2jk\7\62\2\2k\7\3\2\2\2lm\7\4\2\2mn\7\5\2\2")
        buf.write("nw\t\2\2\2op\7\4\2\2pq\7\63\2\2qw\t\2\2\2rs\7\6\2\2sw")
        buf.write("\7\63\2\2tu\7\7\2\2uw\7\63\2\2vl\3\2\2\2vo\3\2\2\2vr\3")
        buf.write("\2\2\2vt\3\2\2\2w\t\3\2\2\2xy\7\b\2\2yz\7\62\2\2z\13\3")
        buf.write("\2\2\2{\u0086\5\16\b\2|\u0086\5\20\t\2}\u0086\5\22\n\2")
        buf.write("~\u0086\5\26\f\2\177\u0086\5\30\r\2\u0080\u0086\5\32\16")
        buf.write("\2\u0081\u0086\5\34\17\2\u0082\u0086\5\36\20\2\u0083\u0086")
        buf.write("\5P)\2\u0084\u0086\5R*\2\u0085{\3\2\2\2\u0085|\3\2\2\2")
        buf.write("\u0085}\3\2\2\2\u0085~\3\2\2\2\u0085\177\3\2\2\2\u0085")
        buf.write("\u0080\3\2\2\2\u0085\u0081\3\2\2\2\u0085\u0082\3\2\2\2")
        buf.write("\u0085\u0083\3\2\2\2\u0085\u0084\3\2\2\2\u0086\r\3\2\2")
        buf.write("\2\u0087\u0088\7\t\2\2\u0088\u0089\5\64\33\2\u0089\u008c")
        buf.write("\7\63\2\2\u008a\u008b\7\n\2\2\u008b\u008d\5B\"\2\u008c")
        buf.write("\u008a\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008f\3\2\2\2")
        buf.write("\u008e\u0090\5L\'\2\u008f\u008e\3\2\2\2\u008f\u0090\3")
        buf.write("\2\2\2\u0090\17\3\2\2\2\u0091\u0092\7\13\2\2\u0092\u0093")
        buf.write("\5\64\33\2\u0093\u0095\7\63\2\2\u0094\u0096\5.\30\2\u0095")
        buf.write("\u0094\3\2\2\2\u0095\u0096\3\2\2\2\u0096\21\3\2\2\2\u0097")
        buf.write("\u0098\7\f\2\2\u0098\u0099\7\63\2\2\u0099\u009d\7\r\2")
        buf.write("\2\u009a\u009c\5\24\13\2\u009b\u009a\3\2\2\2\u009c\u009f")
        buf.write("\3\2\2\2\u009d\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e")
        buf.write("\u00a0\3\2\2\2\u009f\u009d\3\2\2\2\u00a0\u00a2\7\16\2")
        buf.write("\2\u00a1\u00a3\5.\30\2\u00a2\u00a1\3\2\2\2\u00a2\u00a3")
        buf.write("\3\2\2\2\u00a3\23\3\2\2\2\u00a4\u00a7\7\63\2\2\u00a5\u00a6")
        buf.write("\7\n\2\2\u00a6\u00a8\5D#\2\u00a7\u00a5\3\2\2\2\u00a7\u00a8")
        buf.write("\3\2\2\2\u00a8\u00aa\3\2\2\2\u00a9\u00ab\5.\30\2\u00aa")
        buf.write("\u00a9\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\u00ad\3\2\2\2")
        buf.write("\u00ac\u00ae\5L\'\2\u00ad\u00ac\3\2\2\2\u00ad\u00ae\3")
        buf.write("\2\2\2\u00ae\25\3\2\2\2\u00af\u00b0\7\17\2\2\u00b0\u00b1")
        buf.write("\7\63\2\2\u00b1\u00b8\7\r\2\2\u00b2\u00b4\7\62\2\2\u00b3")
        buf.write("\u00b5\5L\'\2\u00b4\u00b3\3\2\2\2\u00b4\u00b5\3\2\2\2")
        buf.write("\u00b5\u00b7\3\2\2\2\u00b6\u00b2\3\2\2\2\u00b7\u00ba\3")
        buf.write("\2\2\2\u00b8\u00b6\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b9\u00bb")
        buf.write("\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u00bd\7\16\2\2\u00bc")
        buf.write("\u00be\5.\30\2\u00bd\u00bc\3\2\2\2\u00bd\u00be\3\2\2\2")
        buf.write("\u00be\27\3\2\2\2\u00bf\u00c0\7\20\2\2\u00c0\u00c1\7\63")
        buf.write("\2\2\u00c1\u00c7\7\r\2\2\u00c2\u00c6\5R*\2\u00c3\u00c6")
        buf.write("\5P)\2\u00c4\u00c6\5 \21\2\u00c5\u00c2\3\2\2\2\u00c5\u00c3")
        buf.write("\3\2\2\2\u00c5\u00c4\3\2\2\2\u00c6\u00c9\3\2\2\2\u00c7")
        buf.write("\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00ca\3\2\2\2")
        buf.write("\u00c9\u00c7\3\2\2\2\u00ca\u00cc\7\16\2\2\u00cb\u00cd")
        buf.write("\5.\30\2\u00cc\u00cb\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd")
        buf.write("\31\3\2\2\2\u00ce\u00cf\7\21\2\2\u00cf\u00d0\7\63\2\2")
        buf.write("\u00d0\u00d6\7\r\2\2\u00d1\u00d5\5R*\2\u00d2\u00d5\5P")
        buf.write(")\2\u00d3\u00d5\5 \21\2\u00d4\u00d1\3\2\2\2\u00d4\u00d2")
        buf.write("\3\2\2\2\u00d4\u00d3\3\2\2\2\u00d5\u00d8\3\2\2\2\u00d6")
        buf.write("\u00d4\3\2\2\2\u00d6\u00d7\3\2\2\2\u00d7\u00d9\3\2\2\2")
        buf.write("\u00d8\u00d6\3\2\2\2\u00d9\u00db\7\16\2\2\u00da\u00dc")
        buf.write("\5.\30\2\u00db\u00da\3\2\2\2\u00db\u00dc\3\2\2\2\u00dc")
        buf.write("\33\3\2\2\2\u00dd\u00de\7\22\2\2\u00de\u00df\7\63\2\2")
        buf.write("\u00df\u00e5\7\r\2\2\u00e0\u00e4\5R*\2\u00e1\u00e4\5P")
        buf.write(")\2\u00e2\u00e4\5 \21\2\u00e3\u00e0\3\2\2\2\u00e3\u00e1")
        buf.write("\3\2\2\2\u00e3\u00e2\3\2\2\2\u00e4\u00e7\3\2\2\2\u00e5")
        buf.write("\u00e3\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00e8\3\2\2\2")
        buf.write("\u00e7\u00e5\3\2\2\2\u00e8\u00ea\7\16\2\2\u00e9\u00eb")
        buf.write("\5.\30\2\u00ea\u00e9\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb")
        buf.write("\35\3\2\2\2\u00ec\u00ed\7\23\2\2\u00ed\u00f0\7\63\2\2")
        buf.write("\u00ee\u00ef\7\24\2\2\u00ef\u00f1\7\63\2\2\u00f0\u00ee")
        buf.write("\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f2\3\2\2\2\u00f2")
        buf.write("\u00f8\7\r\2\2\u00f3\u00f7\5&\24\2\u00f4\u00f7\5R*\2\u00f5")
        buf.write("\u00f7\5P)\2\u00f6\u00f3\3\2\2\2\u00f6\u00f4\3\2\2\2\u00f6")
        buf.write("\u00f5\3\2\2\2\u00f7\u00fa\3\2\2\2\u00f8\u00f6\3\2\2\2")
        buf.write("\u00f8\u00f9\3\2\2\2\u00f9\u00fb\3\2\2\2\u00fa\u00f8\3")
        buf.write("\2\2\2\u00fb\u00fd\7\16\2\2\u00fc\u00fe\5.\30\2\u00fd")
        buf.write("\u00fc\3\2\2\2\u00fd\u00fe\3\2\2\2\u00fe\37\3\2\2\2\u00ff")
        buf.write("\u0101\5\"\22\2\u0100\u00ff\3\2\2\2\u0100\u0101\3\2\2")
        buf.write("\2\u0101\u0103\3\2\2\2\u0102\u0104\5$\23\2\u0103\u0102")
        buf.write("\3\2\2\2\u0103\u0104\3\2\2\2\u0104\u0105\3\2\2\2\u0105")
        buf.write("\u0106\5\64\33\2\u0106\u0109\7\63\2\2\u0107\u0108\7\n")
        buf.write("\2\2\u0108\u010a\5B\"\2\u0109\u0107\3\2\2\2\u0109\u010a")
        buf.write("\3\2\2\2\u010a\u010c\3\2\2\2\u010b\u010d\5.\30\2\u010c")
        buf.write("\u010b\3\2\2\2\u010c\u010d\3\2\2\2\u010d\u010f\3\2\2\2")
        buf.write("\u010e\u0110\5L\'\2\u010f\u010e\3\2\2\2\u010f\u0110\3")
        buf.write("\2\2\2\u0110!\3\2\2\2\u0111\u0112\5D#\2\u0112\u0113\7")
        buf.write("\25\2\2\u0113#\3\2\2\2\u0114\u0115\t\3\2\2\u0115%\3\2")
        buf.write("\2\2\u0116\u0118\5(\25\2\u0117\u0116\3\2\2\2\u0117\u0118")
        buf.write("\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\5*\26\2\u011a")
        buf.write("\u011b\7\63\2\2\u011b\u011f\7\30\2\2\u011c\u011e\5 \21")
        buf.write("\2\u011d\u011c\3\2\2\2\u011e\u0121\3\2\2\2\u011f\u011d")
        buf.write("\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0122\3\2\2\2\u0121")
        buf.write("\u011f\3\2\2\2\u0122\u0124\7\31\2\2\u0123\u0125\5,\27")
        buf.write("\2\u0124\u0123\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0127")
        buf.write("\3\2\2\2\u0126\u0128\5.\30\2\u0127\u0126\3\2\2\2\u0127")
        buf.write("\u0128\3\2\2\2\u0128\u012a\3\2\2\2\u0129\u012b\5L\'\2")
        buf.write("\u012a\u0129\3\2\2\2\u012a\u012b\3\2\2\2\u012b\'\3\2\2")
        buf.write("\2\u012c\u012d\t\4\2\2\u012d)\3\2\2\2\u012e\u0131\5\64")
        buf.write("\33\2\u012f\u0131\7\34\2\2\u0130\u012e\3\2\2\2\u0130\u012f")
        buf.write("\3\2\2\2\u0131+\3\2\2\2\u0132\u0133\7\35\2\2\u0133\u0137")
        buf.write("\7\30\2\2\u0134\u0136\5 \21\2\u0135\u0134\3\2\2\2\u0136")
        buf.write("\u0139\3\2\2\2\u0137\u0135\3\2\2\2\u0137\u0138\3\2\2\2")
        buf.write("\u0138\u013a\3\2\2\2\u0139\u0137\3\2\2\2\u013a\u013b\7")
        buf.write("\31\2\2\u013b-\3\2\2\2\u013c\u0140\7\30\2\2\u013d\u013f")
        buf.write("\5\60\31\2\u013e\u013d\3\2\2\2\u013f\u0142\3\2\2\2\u0140")
        buf.write("\u013e\3\2\2\2\u0140\u0141\3\2\2\2\u0141\u0143\3\2\2\2")
        buf.write("\u0142\u0140\3\2\2\2\u0143\u0144\7\31\2\2\u0144/\3\2\2")
        buf.write("\2\u0145\u0148\7\63\2\2\u0146\u0147\7\n\2\2\u0147\u0149")
        buf.write("\5\62\32\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149")
        buf.write("\u014b\3\2\2\2\u014a\u014c\5L\'\2\u014b\u014a\3\2\2\2")
        buf.write("\u014b\u014c\3\2\2\2\u014c\61\3\2\2\2\u014d\u0150\5D#")
        buf.write("\2\u014e\u0150\7\62\2\2\u014f\u014d\3\2\2\2\u014f\u014e")
        buf.write("\3\2\2\2\u0150\63\3\2\2\2\u0151\u0155\5\66\34\2\u0152")
        buf.write("\u0155\7\63\2\2\u0153\u0155\58\35\2\u0154\u0151\3\2\2")
        buf.write("\2\u0154\u0152\3\2\2\2\u0154\u0153\3\2\2\2\u0155\65\3")
        buf.write("\2\2\2\u0156\u0158\5N(\2\u0157\u0159\5.\30\2\u0158\u0157")
        buf.write("\3\2\2\2\u0158\u0159\3\2\2\2\u0159\67\3\2\2\2\u015a\u015e")
        buf.write("\5:\36\2\u015b\u015e\5<\37\2\u015c\u015e\5> \2\u015d\u015a")
        buf.write("\3\2\2\2\u015d\u015b\3\2\2\2\u015d\u015c\3\2\2\2\u015e")
        buf.write("\u0160\3\2\2\2\u015f\u0161\5.\30\2\u0160\u015f\3\2\2\2")
        buf.write("\u0160\u0161\3\2\2\2\u01619\3\2\2\2\u0162\u0164\7\36\2")
        buf.write("\2\u0163\u0165\5@!\2\u0164\u0163\3\2\2\2\u0164\u0165\3")
        buf.write("\2\2\2\u0165\u0166\3\2\2\2\u0166\u0167\7\37\2\2\u0167")
        buf.write("\u0168\5\64\33\2\u0168\u0169\7\64\2\2\u0169\u016a\5\64")
        buf.write("\33\2\u016a\u016b\7 \2\2\u016b;\3\2\2\2\u016c\u016e\7")
        buf.write("!\2\2\u016d\u016f\5@!\2\u016e\u016d\3\2\2\2\u016e\u016f")
        buf.write("\3\2\2\2\u016f\u0170\3\2\2\2\u0170\u0171\7\37\2\2\u0171")
        buf.write("\u0172\5\64\33\2\u0172\u0173\7 \2\2\u0173=\3\2\2\2\u0174")
        buf.write("\u0175\7\"\2\2\u0175\u0176\7\37\2\2\u0176\u0177\5\64\33")
        buf.write("\2\u0177\u0179\7 \2\2\u0178\u017a\5@!\2\u0179\u0178\3")
        buf.write("\2\2\2\u0179\u017a\3\2\2\2\u017a?\3\2\2\2\u017b\u017c")
        buf.write("\7#\2\2\u017c\u017d\7\62\2\2\u017dA\3\2\2\2\u017e\u0185")
        buf.write("\5D#\2\u017f\u0185\7)\2\2\u0180\u0185\7\62\2\2\u0181\u0185")
        buf.write("\7\63\2\2\u0182\u0185\5F$\2\u0183\u0185\5J&\2\u0184\u017e")
        buf.write("\3\2\2\2\u0184\u017f\3\2\2\2\u0184\u0180\3\2\2\2\u0184")
        buf.write("\u0181\3\2\2\2\u0184\u0182\3\2\2\2\u0184\u0183\3\2\2\2")
        buf.write("\u0185C\3\2\2\2\u0186\u0187\t\5\2\2\u0187E\3\2\2\2\u0188")
        buf.write("\u018f\7$\2\2\u0189\u018b\5B\"\2\u018a\u018c\5L\'\2\u018b")
        buf.write("\u018a\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018e\3\2\2\2")
        buf.write("\u018d\u0189\3\2\2\2\u018e\u0191\3\2\2\2\u018f\u018d\3")
        buf.write("\2\2\2\u018f\u0190\3\2\2\2\u0190\u0192\3\2\2\2\u0191\u018f")
        buf.write("\3\2\2\2\u0192\u0193\7%\2\2\u0193G\3\2\2\2\u0194\u0195")
        buf.write("\5B\"\2\u0195\u0196\7\25\2\2\u0196\u0198\5B\"\2\u0197")
        buf.write("\u0199\5L\'\2\u0198\u0197\3\2\2\2\u0198\u0199\3\2\2\2")
        buf.write("\u0199I\3\2\2\2\u019a\u019e\7\r\2\2\u019b\u019d\5H%\2")
        buf.write("\u019c\u019b\3\2\2\2\u019d\u01a0\3\2\2\2\u019e\u019c\3")
        buf.write("\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a1\3\2\2\2\u01a0\u019e")
        buf.write("\3\2\2\2\u01a1\u01a2\7\16\2\2\u01a2K\3\2\2\2\u01a3\u01a4")
        buf.write("\t\6\2\2\u01a4M\3\2\2\2\u01a5\u01a6\t\7\2\2\u01a6O\3\2")
        buf.write("\2\2\u01a7\u01a8\7\67\2\2\u01a8Q\3\2\2\2\u01a9\u01aa\7")
        buf.write("\66\2\2\u01aaS\3\2\2\2;W]gv\u0085\u008c\u008f\u0095\u009d")
        buf.write("\u00a2\u00a7\u00aa\u00ad\u00b4\u00b8\u00bd\u00c5\u00c7")
        buf.write("\u00cc\u00d4\u00d6\u00db\u00e3\u00e5\u00ea\u00f0\u00f6")
        buf.write("\u00f8\u00fd\u0100\u0103\u0109\u010c\u010f\u0117\u011f")
        buf.write("\u0124\u0127\u012a\u0130\u0137\u0140\u0148\u014b\u014f")
        buf.write("\u0154\u0158\u015d\u0160\u0164\u016e\u0179\u0184\u018b")
        buf.write("\u018f\u0198\u019e")
        return buf.getvalue()


class ThriftParser ( Parser ):

    grammarFileName = "Thrift.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'include'", "'namespace'", "'*'", "'cpp_namespace'", 
                     "'php_namespace'", "'cpp_include'", "'const'", "'='", 
                     "'typedef'", "'enum'", "'{'", "'}'", "'senum'", "'struct'", 
                     "'union'", "'exception'", "'service'", "'extends'", 
                     "':'", "'required'", "'optional'", "'('", "')'", "'oneway'", 
                     "'async'", "'void'", "'throws'", "'map'", "'<'", "'>'", 
                     "'set'", "'list'", "'cpp_type'", "'['", "']'", "';'", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "'bool'", "'byte'", 
                     "'i16'", "'i32'", "'i64'", "'double'", "'string'", 
                     "'binary'", "<INVALID>", "<INVALID>", "','" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "INTEGER", "HEX_INTEGER", "DOUBLE", "TYPE_BOOL", 
                      "TYPE_BYTE", "TYPE_I16", "TYPE_I32", "TYPE_I64", "TYPE_DOUBLE", 
                      "TYPE_STRING", "TYPE_BINARY", "LITERAL", "IDENTIFIER", 
                      "COMMA", "WS", "SL_COMMENT", "ML_COMMENT" ]

    RULE_document = 0
    RULE_header = 1
    RULE_include = 2
    RULE_namespace = 3
    RULE_cpp_include = 4
    RULE_definition = 5
    RULE_const_rule = 6
    RULE_typedef = 7
    RULE_enum_rule = 8
    RULE_enum_field = 9
    RULE_senum = 10
    RULE_struct = 11
    RULE_union = 12
    RULE_exception = 13
    RULE_service = 14
    RULE_field = 15
    RULE_field_id = 16
    RULE_field_req = 17
    RULE_function = 18
    RULE_oneway = 19
    RULE_function_type = 20
    RULE_throws_list = 21
    RULE_type_annotations = 22
    RULE_type_annotation = 23
    RULE_annotation_value = 24
    RULE_field_type = 25
    RULE_base_type = 26
    RULE_container_type = 27
    RULE_map_type = 28
    RULE_set_type = 29
    RULE_list_type = 30
    RULE_cpp_type = 31
    RULE_const_value = 32
    RULE_integer = 33
    RULE_const_list = 34
    RULE_const_map_entry = 35
    RULE_const_map = 36
    RULE_list_separator = 37
    RULE_real_base_type = 38
    RULE_comment_multiline = 39
    RULE_comment_singleline = 40

    ruleNames =  [ "document", "header", "include", "namespace", "cpp_include", 
                   "definition", "const_rule", "typedef", "enum_rule", "enum_field", 
                   "senum", "struct", "union", "exception", "service", "field", 
                   "field_id", "field_req", "function", "oneway", "function_type", 
                   "throws_list", "type_annotations", "type_annotation", 
                   "annotation_value", "field_type", "base_type", "container_type", 
                   "map_type", "set_type", "list_type", "cpp_type", "const_value", 
                   "integer", "const_list", "const_map_entry", "const_map", 
                   "list_separator", "real_base_type", "comment_multiline", 
                   "comment_singleline" ]

    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
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    T__28=29
    T__29=30
    T__30=31
    T__31=32
    T__32=33
    T__33=34
    T__34=35
    T__35=36
    INTEGER=37
    HEX_INTEGER=38
    DOUBLE=39
    TYPE_BOOL=40
    TYPE_BYTE=41
    TYPE_I16=42
    TYPE_I32=43
    TYPE_I64=44
    TYPE_DOUBLE=45
    TYPE_STRING=46
    TYPE_BINARY=47
    LITERAL=48
    IDENTIFIER=49
    COMMA=50
    WS=51
    SL_COMMENT=52
    ML_COMMENT=53

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



    class DocumentContext(ParserRuleContext):

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

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

        def header(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.HeaderContext)
            else:
                return self.getTypedRuleContext(ThriftParser.HeaderContext,i)


        def definition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.DefinitionContext)
            else:
                return self.getTypedRuleContext(ThriftParser.DefinitionContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_document

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

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




    def document(self):

        localctx = ThriftParser.DocumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_document)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 85
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,0,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 82
                    self.header() 
                self.state = 87
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,0,self._ctx)

            self.state = 91
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__6) | (1 << ThriftParser.T__8) | (1 << ThriftParser.T__9) | (1 << ThriftParser.T__12) | (1 << ThriftParser.T__13) | (1 << ThriftParser.T__14) | (1 << ThriftParser.T__15) | (1 << ThriftParser.T__16) | (1 << ThriftParser.SL_COMMENT) | (1 << ThriftParser.ML_COMMENT))) != 0):
                self.state = 88
                self.definition()
                self.state = 93
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

    class HeaderContext(ParserRuleContext):

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

        def include(self):
            return self.getTypedRuleContext(ThriftParser.IncludeContext,0)


        def namespace(self):
            return self.getTypedRuleContext(ThriftParser.NamespaceContext,0)


        def cpp_include(self):
            return self.getTypedRuleContext(ThriftParser.Cpp_includeContext,0)


        def comment_multiline(self):
            return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,0)


        def comment_singleline(self):
            return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_header

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

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




    def header(self):

        localctx = ThriftParser.HeaderContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_header)
        try:
            self.state = 101
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.T__0]:
                self.enterOuterAlt(localctx, 1)
                self.state = 96
                self.include()
                pass
            elif token in [ThriftParser.T__1, ThriftParser.T__3, ThriftParser.T__4]:
                self.enterOuterAlt(localctx, 2)
                self.state = 97
                self.namespace()
                pass
            elif token in [ThriftParser.T__5]:
                self.enterOuterAlt(localctx, 3)
                self.state = 98
                self.cpp_include()
                pass
            elif token in [ThriftParser.ML_COMMENT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 99
                self.comment_multiline()
                pass
            elif token in [ThriftParser.SL_COMMENT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 100
                self.comment_singleline()
                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 IncludeContext(ParserRuleContext):

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

        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_include

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

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




    def include(self):

        localctx = ThriftParser.IncludeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_include)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.match(ThriftParser.T__0)
            self.state = 104
            self.match(ThriftParser.LITERAL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NamespaceContext(ParserRuleContext):

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

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

        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_namespace

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

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




    def namespace(self):

        localctx = ThriftParser.NamespaceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_namespace)
        self._la = 0 # Token type
        try:
            self.state = 116
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 106
                self.match(ThriftParser.T__1)
                self.state = 107
                self.match(ThriftParser.T__2)
                self.state = 108
                _la = self._input.LA(1)
                if not(_la==ThriftParser.LITERAL or _la==ThriftParser.IDENTIFIER):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 109
                self.match(ThriftParser.T__1)
                self.state = 110
                self.match(ThriftParser.IDENTIFIER)
                self.state = 111
                _la = self._input.LA(1)
                if not(_la==ThriftParser.LITERAL or _la==ThriftParser.IDENTIFIER):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 112
                self.match(ThriftParser.T__3)
                self.state = 113
                self.match(ThriftParser.IDENTIFIER)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 114
                self.match(ThriftParser.T__4)
                self.state = 115
                self.match(ThriftParser.IDENTIFIER)
                pass


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

    class Cpp_includeContext(ParserRuleContext):

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

        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_cpp_include

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

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




    def cpp_include(self):

        localctx = ThriftParser.Cpp_includeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_cpp_include)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 118
            self.match(ThriftParser.T__5)
            self.state = 119
            self.match(ThriftParser.LITERAL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class DefinitionContext(ParserRuleContext):

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

        def const_rule(self):
            return self.getTypedRuleContext(ThriftParser.Const_ruleContext,0)


        def typedef(self):
            return self.getTypedRuleContext(ThriftParser.TypedefContext,0)


        def enum_rule(self):
            return self.getTypedRuleContext(ThriftParser.Enum_ruleContext,0)


        def senum(self):
            return self.getTypedRuleContext(ThriftParser.SenumContext,0)


        def struct(self):
            return self.getTypedRuleContext(ThriftParser.StructContext,0)


        def union(self):
            return self.getTypedRuleContext(ThriftParser.UnionContext,0)


        def exception(self):
            return self.getTypedRuleContext(ThriftParser.ExceptionContext,0)


        def service(self):
            return self.getTypedRuleContext(ThriftParser.ServiceContext,0)


        def comment_multiline(self):
            return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,0)


        def comment_singleline(self):
            return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_definition

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

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




    def definition(self):

        localctx = ThriftParser.DefinitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_definition)
        try:
            self.state = 131
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.T__6]:
                self.enterOuterAlt(localctx, 1)
                self.state = 121
                self.const_rule()
                pass
            elif token in [ThriftParser.T__8]:
                self.enterOuterAlt(localctx, 2)
                self.state = 122
                self.typedef()
                pass
            elif token in [ThriftParser.T__9]:
                self.enterOuterAlt(localctx, 3)
                self.state = 123
                self.enum_rule()
                pass
            elif token in [ThriftParser.T__12]:
                self.enterOuterAlt(localctx, 4)
                self.state = 124
                self.senum()
                pass
            elif token in [ThriftParser.T__13]:
                self.enterOuterAlt(localctx, 5)
                self.state = 125
                self.struct()
                pass
            elif token in [ThriftParser.T__14]:
                self.enterOuterAlt(localctx, 6)
                self.state = 126
                self.union()
                pass
            elif token in [ThriftParser.T__15]:
                self.enterOuterAlt(localctx, 7)
                self.state = 127
                self.exception()
                pass
            elif token in [ThriftParser.T__16]:
                self.enterOuterAlt(localctx, 8)
                self.state = 128
                self.service()
                pass
            elif token in [ThriftParser.ML_COMMENT]:
                self.enterOuterAlt(localctx, 9)
                self.state = 129
                self.comment_multiline()
                pass
            elif token in [ThriftParser.SL_COMMENT]:
                self.enterOuterAlt(localctx, 10)
                self.state = 130
                self.comment_singleline()
                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 Const_ruleContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def const_value(self):
            return self.getTypedRuleContext(ThriftParser.Const_valueContext,0)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_const_rule

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

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




    def const_rule(self):

        localctx = ThriftParser.Const_ruleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_const_rule)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 133
            self.match(ThriftParser.T__6)
            self.state = 134
            self.field_type()
            self.state = 135
            self.match(ThriftParser.IDENTIFIER)
            self.state = 138
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__7:
                self.state = 136
                self.match(ThriftParser.T__7)
                self.state = 137
                self.const_value()


            self.state = 141
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 140
                self.list_separator()


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

    class TypedefContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_typedef

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

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




    def typedef(self):

        localctx = ThriftParser.TypedefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_typedef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 143
            self.match(ThriftParser.T__8)
            self.state = 144
            self.field_type()
            self.state = 145
            self.match(ThriftParser.IDENTIFIER)
            self.state = 147
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 146
                self.type_annotations()


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

    class Enum_ruleContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def enum_field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Enum_fieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Enum_fieldContext,i)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_enum_rule

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

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




    def enum_rule(self):

        localctx = ThriftParser.Enum_ruleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_enum_rule)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 149
            self.match(ThriftParser.T__9)
            self.state = 150
            self.match(ThriftParser.IDENTIFIER)
            self.state = 151
            self.match(ThriftParser.T__10)
            self.state = 155
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ThriftParser.IDENTIFIER:
                self.state = 152
                self.enum_field()
                self.state = 157
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 158
            self.match(ThriftParser.T__11)
            self.state = 160
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 159
                self.type_annotations()


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

    class Enum_fieldContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

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


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_enum_field

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

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




    def enum_field(self):

        localctx = ThriftParser.Enum_fieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_enum_field)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 162
            self.match(ThriftParser.IDENTIFIER)
            self.state = 165
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__7:
                self.state = 163
                self.match(ThriftParser.T__7)
                self.state = 164
                self.integer()


            self.state = 168
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 167
                self.type_annotations()


            self.state = 171
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 170
                self.list_separator()


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

    class SenumContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

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

        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def list_separator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.List_separatorContext)
            else:
                return self.getTypedRuleContext(ThriftParser.List_separatorContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_senum

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

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




    def senum(self):

        localctx = ThriftParser.SenumContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_senum)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 173
            self.match(ThriftParser.T__12)
            self.state = 174
            self.match(ThriftParser.IDENTIFIER)
            self.state = 175
            self.match(ThriftParser.T__10)
            self.state = 182
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ThriftParser.LITERAL:
                self.state = 176
                self.match(ThriftParser.LITERAL)
                self.state = 178
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                    self.state = 177
                    self.list_separator()


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

            self.state = 185
            self.match(ThriftParser.T__11)
            self.state = 187
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 186
                self.type_annotations()


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

    class StructContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def comment_singleline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_singlelineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,i)


        def comment_multiline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_multilineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,i)


        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FieldContext,i)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_struct

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

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




    def struct(self):

        localctx = ThriftParser.StructContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_struct)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 189
            self.match(ThriftParser.T__13)
            self.state = 190
            self.match(ThriftParser.IDENTIFIER)
            self.state = 191
            self.match(ThriftParser.T__10)
            self.state = 197
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__19) | (1 << ThriftParser.T__20) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER) | (1 << ThriftParser.SL_COMMENT) | (1 << ThriftParser.ML_COMMENT))) != 0):
                self.state = 195
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [ThriftParser.SL_COMMENT]:
                    self.state = 192
                    self.comment_singleline()
                    pass
                elif token in [ThriftParser.ML_COMMENT]:
                    self.state = 193
                    self.comment_multiline()
                    pass
                elif token in [ThriftParser.T__19, ThriftParser.T__20, ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31, ThriftParser.INTEGER, ThriftParser.HEX_INTEGER, ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY, ThriftParser.IDENTIFIER]:
                    self.state = 194
                    self.field()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 200
            self.match(ThriftParser.T__11)
            self.state = 202
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 201
                self.type_annotations()


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

    class UnionContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def comment_singleline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_singlelineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,i)


        def comment_multiline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_multilineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,i)


        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FieldContext,i)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_union

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

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




    def union(self):

        localctx = ThriftParser.UnionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_union)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 204
            self.match(ThriftParser.T__14)
            self.state = 205
            self.match(ThriftParser.IDENTIFIER)
            self.state = 206
            self.match(ThriftParser.T__10)
            self.state = 212
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__19) | (1 << ThriftParser.T__20) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER) | (1 << ThriftParser.SL_COMMENT) | (1 << ThriftParser.ML_COMMENT))) != 0):
                self.state = 210
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [ThriftParser.SL_COMMENT]:
                    self.state = 207
                    self.comment_singleline()
                    pass
                elif token in [ThriftParser.ML_COMMENT]:
                    self.state = 208
                    self.comment_multiline()
                    pass
                elif token in [ThriftParser.T__19, ThriftParser.T__20, ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31, ThriftParser.INTEGER, ThriftParser.HEX_INTEGER, ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY, ThriftParser.IDENTIFIER]:
                    self.state = 209
                    self.field()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 215
            self.match(ThriftParser.T__11)
            self.state = 217
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 216
                self.type_annotations()


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

    class ExceptionContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def comment_singleline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_singlelineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,i)


        def comment_multiline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_multilineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,i)


        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FieldContext,i)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_exception

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

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




    def exception(self):

        localctx = ThriftParser.ExceptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_exception)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 219
            self.match(ThriftParser.T__15)
            self.state = 220
            self.match(ThriftParser.IDENTIFIER)
            self.state = 221
            self.match(ThriftParser.T__10)
            self.state = 227
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__19) | (1 << ThriftParser.T__20) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER) | (1 << ThriftParser.SL_COMMENT) | (1 << ThriftParser.ML_COMMENT))) != 0):
                self.state = 225
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [ThriftParser.SL_COMMENT]:
                    self.state = 222
                    self.comment_singleline()
                    pass
                elif token in [ThriftParser.ML_COMMENT]:
                    self.state = 223
                    self.comment_multiline()
                    pass
                elif token in [ThriftParser.T__19, ThriftParser.T__20, ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31, ThriftParser.INTEGER, ThriftParser.HEX_INTEGER, ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY, ThriftParser.IDENTIFIER]:
                    self.state = 224
                    self.field()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 230
            self.match(ThriftParser.T__11)
            self.state = 232
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 231
                self.type_annotations()


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

    class ServiceContext(ParserRuleContext):

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

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

        def function(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FunctionContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FunctionContext,i)


        def comment_singleline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_singlelineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_singlelineContext,i)


        def comment_multiline(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Comment_multilineContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Comment_multilineContext,i)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_service

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

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




    def service(self):

        localctx = ThriftParser.ServiceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_service)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 234
            self.match(ThriftParser.T__16)
            self.state = 235
            self.match(ThriftParser.IDENTIFIER)
            self.state = 238
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__17:
                self.state = 236
                self.match(ThriftParser.T__17)
                self.state = 237
                self.match(ThriftParser.IDENTIFIER)


            self.state = 240
            self.match(ThriftParser.T__10)
            self.state = 246
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__23) | (1 << ThriftParser.T__24) | (1 << ThriftParser.T__25) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER) | (1 << ThriftParser.SL_COMMENT) | (1 << ThriftParser.ML_COMMENT))) != 0):
                self.state = 244
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [ThriftParser.T__23, ThriftParser.T__24, ThriftParser.T__25, ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31, ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY, ThriftParser.IDENTIFIER]:
                    self.state = 241
                    self.function()
                    pass
                elif token in [ThriftParser.SL_COMMENT]:
                    self.state = 242
                    self.comment_singleline()
                    pass
                elif token in [ThriftParser.ML_COMMENT]:
                    self.state = 243
                    self.comment_multiline()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 249
            self.match(ThriftParser.T__11)
            self.state = 251
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 250
                self.type_annotations()


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

    class FieldContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def field_id(self):
            return self.getTypedRuleContext(ThriftParser.Field_idContext,0)


        def field_req(self):
            return self.getTypedRuleContext(ThriftParser.Field_reqContext,0)


        def const_value(self):
            return self.getTypedRuleContext(ThriftParser.Const_valueContext,0)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_field

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

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




    def field(self):

        localctx = ThriftParser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_field)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 254
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.INTEGER or _la==ThriftParser.HEX_INTEGER:
                self.state = 253
                self.field_id()


            self.state = 257
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__19 or _la==ThriftParser.T__20:
                self.state = 256
                self.field_req()


            self.state = 259
            self.field_type()
            self.state = 260
            self.match(ThriftParser.IDENTIFIER)
            self.state = 263
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__7:
                self.state = 261
                self.match(ThriftParser.T__7)
                self.state = 262
                self.const_value()


            self.state = 266
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 265
                self.type_annotations()


            self.state = 269
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 268
                self.list_separator()


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

    class Field_idContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ThriftParser.RULE_field_id

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

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




    def field_id(self):

        localctx = ThriftParser.Field_idContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_field_id)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 271
            self.integer()
            self.state = 272
            self.match(ThriftParser.T__18)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Field_reqContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ThriftParser.RULE_field_req

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

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




    def field_req(self):

        localctx = ThriftParser.Field_reqContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_field_req)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            _la = self._input.LA(1)
            if not(_la==ThriftParser.T__19 or _la==ThriftParser.T__20):
                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 FunctionContext(ParserRuleContext):

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

        def function_type(self):
            return self.getTypedRuleContext(ThriftParser.Function_typeContext,0)


        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def oneway(self):
            return self.getTypedRuleContext(ThriftParser.OnewayContext,0)


        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FieldContext,i)


        def throws_list(self):
            return self.getTypedRuleContext(ThriftParser.Throws_listContext,0)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_function

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

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




    def function(self):

        localctx = ThriftParser.FunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_function)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 277
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__23 or _la==ThriftParser.T__24:
                self.state = 276
                self.oneway()


            self.state = 279
            self.function_type()
            self.state = 280
            self.match(ThriftParser.IDENTIFIER)
            self.state = 281
            self.match(ThriftParser.T__21)
            self.state = 285
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__19) | (1 << ThriftParser.T__20) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER))) != 0):
                self.state = 282
                self.field()
                self.state = 287
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 288
            self.match(ThriftParser.T__22)
            self.state = 290
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__26:
                self.state = 289
                self.throws_list()


            self.state = 293
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 292
                self.type_annotations()


            self.state = 296
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 295
                self.list_separator()


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

    class OnewayContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ThriftParser.RULE_oneway

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

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




    def oneway(self):

        localctx = ThriftParser.OnewayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_oneway)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 298
            _la = self._input.LA(1)
            if not(_la==ThriftParser.T__23 or _la==ThriftParser.T__24):
                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 Function_typeContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_function_type

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

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




    def function_type(self):

        localctx = ThriftParser.Function_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_function_type)
        try:
            self.state = 302
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31, ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY, ThriftParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 300
                self.field_type()
                pass
            elif token in [ThriftParser.T__25]:
                self.enterOuterAlt(localctx, 2)
                self.state = 301
                self.match(ThriftParser.T__25)
                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 Throws_listContext(ParserRuleContext):

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

        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.FieldContext)
            else:
                return self.getTypedRuleContext(ThriftParser.FieldContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_throws_list

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

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




    def throws_list(self):

        localctx = ThriftParser.Throws_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_throws_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 304
            self.match(ThriftParser.T__26)
            self.state = 305
            self.match(ThriftParser.T__21)
            self.state = 309
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__19) | (1 << ThriftParser.T__20) | (1 << ThriftParser.T__27) | (1 << ThriftParser.T__30) | (1 << ThriftParser.T__31) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY) | (1 << ThriftParser.IDENTIFIER))) != 0):
                self.state = 306
                self.field()
                self.state = 311
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 312
            self.match(ThriftParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Type_annotationsContext(ParserRuleContext):

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

        def type_annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Type_annotationContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Type_annotationContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_type_annotations

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

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




    def type_annotations(self):

        localctx = ThriftParser.Type_annotationsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_type_annotations)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 314
            self.match(ThriftParser.T__21)
            self.state = 318
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ThriftParser.IDENTIFIER:
                self.state = 315
                self.type_annotation()
                self.state = 320
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 321
            self.match(ThriftParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Type_annotationContext(ParserRuleContext):

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

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def annotation_value(self):
            return self.getTypedRuleContext(ThriftParser.Annotation_valueContext,0)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_type_annotation

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

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




    def type_annotation(self):

        localctx = ThriftParser.Type_annotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_type_annotation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 323
            self.match(ThriftParser.IDENTIFIER)
            self.state = 326
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__7:
                self.state = 324
                self.match(ThriftParser.T__7)
                self.state = 325
                self.annotation_value()


            self.state = 329
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 328
                self.list_separator()


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

    class Annotation_valueContext(ParserRuleContext):

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

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


        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_annotation_value

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

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




    def annotation_value(self):

        localctx = ThriftParser.Annotation_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_annotation_value)
        try:
            self.state = 333
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.INTEGER, ThriftParser.HEX_INTEGER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 331
                self.integer()
                pass
            elif token in [ThriftParser.LITERAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 332
                self.match(ThriftParser.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 Field_typeContext(ParserRuleContext):

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

        def base_type(self):
            return self.getTypedRuleContext(ThriftParser.Base_typeContext,0)


        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def container_type(self):
            return self.getTypedRuleContext(ThriftParser.Container_typeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_field_type

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

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




    def field_type(self):

        localctx = ThriftParser.Field_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_field_type)
        try:
            self.state = 338
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.TYPE_BOOL, ThriftParser.TYPE_BYTE, ThriftParser.TYPE_I16, ThriftParser.TYPE_I32, ThriftParser.TYPE_I64, ThriftParser.TYPE_DOUBLE, ThriftParser.TYPE_STRING, ThriftParser.TYPE_BINARY]:
                self.enterOuterAlt(localctx, 1)
                self.state = 335
                self.base_type()
                pass
            elif token in [ThriftParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 2)
                self.state = 336
                self.match(ThriftParser.IDENTIFIER)
                pass
            elif token in [ThriftParser.T__27, ThriftParser.T__30, ThriftParser.T__31]:
                self.enterOuterAlt(localctx, 3)
                self.state = 337
                self.container_type()
                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 Base_typeContext(ParserRuleContext):

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

        def real_base_type(self):
            return self.getTypedRuleContext(ThriftParser.Real_base_typeContext,0)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_base_type

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

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




    def base_type(self):

        localctx = ThriftParser.Base_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_base_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 340
            self.real_base_type()
            self.state = 342
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 341
                self.type_annotations()


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

    class Container_typeContext(ParserRuleContext):

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

        def map_type(self):
            return self.getTypedRuleContext(ThriftParser.Map_typeContext,0)


        def set_type(self):
            return self.getTypedRuleContext(ThriftParser.Set_typeContext,0)


        def list_type(self):
            return self.getTypedRuleContext(ThriftParser.List_typeContext,0)


        def type_annotations(self):
            return self.getTypedRuleContext(ThriftParser.Type_annotationsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_container_type

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

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




    def container_type(self):

        localctx = ThriftParser.Container_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_container_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 347
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.T__27]:
                self.state = 344
                self.map_type()
                pass
            elif token in [ThriftParser.T__30]:
                self.state = 345
                self.set_type()
                pass
            elif token in [ThriftParser.T__31]:
                self.state = 346
                self.list_type()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 350
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__21:
                self.state = 349
                self.type_annotations()


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

    class Map_typeContext(ParserRuleContext):

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

        def field_type(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Field_typeContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Field_typeContext,i)


        def COMMA(self):
            return self.getToken(ThriftParser.COMMA, 0)

        def cpp_type(self):
            return self.getTypedRuleContext(ThriftParser.Cpp_typeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_map_type

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

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




    def map_type(self):

        localctx = ThriftParser.Map_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_map_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 352
            self.match(ThriftParser.T__27)
            self.state = 354
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__32:
                self.state = 353
                self.cpp_type()


            self.state = 356
            self.match(ThriftParser.T__28)
            self.state = 357
            self.field_type()
            self.state = 358
            self.match(ThriftParser.COMMA)
            self.state = 359
            self.field_type()
            self.state = 360
            self.match(ThriftParser.T__29)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Set_typeContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def cpp_type(self):
            return self.getTypedRuleContext(ThriftParser.Cpp_typeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_set_type

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

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




    def set_type(self):

        localctx = ThriftParser.Set_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_set_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.match(ThriftParser.T__30)
            self.state = 364
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__32:
                self.state = 363
                self.cpp_type()


            self.state = 366
            self.match(ThriftParser.T__28)
            self.state = 367
            self.field_type()
            self.state = 368
            self.match(ThriftParser.T__29)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class List_typeContext(ParserRuleContext):

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

        def field_type(self):
            return self.getTypedRuleContext(ThriftParser.Field_typeContext,0)


        def cpp_type(self):
            return self.getTypedRuleContext(ThriftParser.Cpp_typeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_list_type

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

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




    def list_type(self):

        localctx = ThriftParser.List_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_list_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            self.match(ThriftParser.T__31)
            self.state = 371
            self.match(ThriftParser.T__28)
            self.state = 372
            self.field_type()
            self.state = 373
            self.match(ThriftParser.T__29)
            self.state = 375
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__32:
                self.state = 374
                self.cpp_type()


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

    class Cpp_typeContext(ParserRuleContext):

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

        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_cpp_type

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

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




    def cpp_type(self):

        localctx = ThriftParser.Cpp_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_cpp_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 377
            self.match(ThriftParser.T__32)
            self.state = 378
            self.match(ThriftParser.LITERAL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Const_valueContext(ParserRuleContext):

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

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


        def DOUBLE(self):
            return self.getToken(ThriftParser.DOUBLE, 0)

        def LITERAL(self):
            return self.getToken(ThriftParser.LITERAL, 0)

        def IDENTIFIER(self):
            return self.getToken(ThriftParser.IDENTIFIER, 0)

        def const_list(self):
            return self.getTypedRuleContext(ThriftParser.Const_listContext,0)


        def const_map(self):
            return self.getTypedRuleContext(ThriftParser.Const_mapContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_const_value

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

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




    def const_value(self):

        localctx = ThriftParser.Const_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_const_value)
        try:
            self.state = 386
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.INTEGER, ThriftParser.HEX_INTEGER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 380
                self.integer()
                pass
            elif token in [ThriftParser.DOUBLE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 381
                self.match(ThriftParser.DOUBLE)
                pass
            elif token in [ThriftParser.LITERAL]:
                self.enterOuterAlt(localctx, 3)
                self.state = 382
                self.match(ThriftParser.LITERAL)
                pass
            elif token in [ThriftParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 4)
                self.state = 383
                self.match(ThriftParser.IDENTIFIER)
                pass
            elif token in [ThriftParser.T__33]:
                self.enterOuterAlt(localctx, 5)
                self.state = 384
                self.const_list()
                pass
            elif token in [ThriftParser.T__10]:
                self.enterOuterAlt(localctx, 6)
                self.state = 385
                self.const_map()
                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:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

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

        def HEX_INTEGER(self):
            return self.getToken(ThriftParser.HEX_INTEGER, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_integer

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

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




    def integer(self):

        localctx = ThriftParser.IntegerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_integer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 388
            _la = self._input.LA(1)
            if not(_la==ThriftParser.INTEGER or _la==ThriftParser.HEX_INTEGER):
                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 Const_listContext(ParserRuleContext):

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

        def const_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Const_valueContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Const_valueContext,i)


        def list_separator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.List_separatorContext)
            else:
                return self.getTypedRuleContext(ThriftParser.List_separatorContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_const_list

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

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




    def const_list(self):

        localctx = ThriftParser.Const_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_const_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 390
            self.match(ThriftParser.T__33)
            self.state = 397
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__10) | (1 << ThriftParser.T__33) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.DOUBLE) | (1 << ThriftParser.LITERAL) | (1 << ThriftParser.IDENTIFIER))) != 0):
                self.state = 391
                self.const_value()
                self.state = 393
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                    self.state = 392
                    self.list_separator()


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

            self.state = 400
            self.match(ThriftParser.T__34)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Const_map_entryContext(ParserRuleContext):

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

        def const_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Const_valueContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Const_valueContext,i)


        def list_separator(self):
            return self.getTypedRuleContext(ThriftParser.List_separatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_const_map_entry

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

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




    def const_map_entry(self):

        localctx = ThriftParser.Const_map_entryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_const_map_entry)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 402
            self.const_value()
            self.state = 403
            self.match(ThriftParser.T__18)
            self.state = 404
            self.const_value()
            self.state = 406
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__35 or _la==ThriftParser.COMMA:
                self.state = 405
                self.list_separator()


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

    class Const_mapContext(ParserRuleContext):

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

        def const_map_entry(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.Const_map_entryContext)
            else:
                return self.getTypedRuleContext(ThriftParser.Const_map_entryContext,i)


        def getRuleIndex(self):
            return ThriftParser.RULE_const_map

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

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




    def const_map(self):

        localctx = ThriftParser.Const_mapContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_const_map)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 408
            self.match(ThriftParser.T__10)
            self.state = 412
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__10) | (1 << ThriftParser.T__33) | (1 << ThriftParser.INTEGER) | (1 << ThriftParser.HEX_INTEGER) | (1 << ThriftParser.DOUBLE) | (1 << ThriftParser.LITERAL) | (1 << ThriftParser.IDENTIFIER))) != 0):
                self.state = 409
                self.const_map_entry()
                self.state = 414
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 415
            self.match(ThriftParser.T__11)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class List_separatorContext(ParserRuleContext):

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

        def COMMA(self):
            return self.getToken(ThriftParser.COMMA, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_list_separator

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

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




    def list_separator(self):

        localctx = ThriftParser.List_separatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_list_separator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 417
            _la = self._input.LA(1)
            if not(_la==ThriftParser.T__35 or _la==ThriftParser.COMMA):
                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 Real_base_typeContext(ParserRuleContext):

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

        def TYPE_BOOL(self):
            return self.getToken(ThriftParser.TYPE_BOOL, 0)

        def TYPE_BYTE(self):
            return self.getToken(ThriftParser.TYPE_BYTE, 0)

        def TYPE_I16(self):
            return self.getToken(ThriftParser.TYPE_I16, 0)

        def TYPE_I32(self):
            return self.getToken(ThriftParser.TYPE_I32, 0)

        def TYPE_I64(self):
            return self.getToken(ThriftParser.TYPE_I64, 0)

        def TYPE_DOUBLE(self):
            return self.getToken(ThriftParser.TYPE_DOUBLE, 0)

        def TYPE_STRING(self):
            return self.getToken(ThriftParser.TYPE_STRING, 0)

        def TYPE_BINARY(self):
            return self.getToken(ThriftParser.TYPE_BINARY, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_real_base_type

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

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




    def real_base_type(self):

        localctx = ThriftParser.Real_base_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_real_base_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 419
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.TYPE_BOOL) | (1 << ThriftParser.TYPE_BYTE) | (1 << ThriftParser.TYPE_I16) | (1 << ThriftParser.TYPE_I32) | (1 << ThriftParser.TYPE_I64) | (1 << ThriftParser.TYPE_DOUBLE) | (1 << ThriftParser.TYPE_STRING) | (1 << ThriftParser.TYPE_BINARY))) != 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 Comment_multilineContext(ParserRuleContext):

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

        def ML_COMMENT(self):
            return self.getToken(ThriftParser.ML_COMMENT, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_comment_multiline

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

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




    def comment_multiline(self):

        localctx = ThriftParser.Comment_multilineContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_comment_multiline)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 421
            self.match(ThriftParser.ML_COMMENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Comment_singlelineContext(ParserRuleContext):

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

        def SL_COMMENT(self):
            return self.getToken(ThriftParser.SL_COMMENT, 0)

        def getRuleIndex(self):
            return ThriftParser.RULE_comment_singleline

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

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




    def comment_singleline(self):

        localctx = ThriftParser.Comment_singlelineContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_comment_singleline)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.match(ThriftParser.SL_COMMENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx





