# flake8: noqa
# type: ignore
# Generated from Thrift.g4 by ANTLR 4.8
# encoding: utf-8
from ..._vendor.antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3N")
        buf.write("\u01a5\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(\3\2\7\2R\n\2\f\2\16\2U\13\2\3\2\7\2X\n")
        buf.write("\2\f\2\16\2[\13\2\3\2\3\2\3\3\3\3\3\3\5\3b\n\3\3\4\3\4")
        buf.write("\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\b\3")
        buf.write("\b\3\b\3\b\3\b\3\b\5\bx\n\b\3\t\3\t\3\t\3\t\3\t\3\t\5")
        buf.write("\t\u0080\n\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\5\13\u008c\n\13\3\13\5\13\u008f\n\13\7\13\u0091")
        buf.write("\n\13\f\13\16\13\u0094\13\13\3\13\3\13\3\f\3\f\3\f\3\f")
        buf.write("\3\f\5\f\u009d\n\f\7\f\u009f\n\f\f\f\16\f\u00a2\13\f\3")
        buf.write("\f\3\f\3\r\3\r\3\r\5\r\u00a9\n\r\3\r\3\r\7\r\u00ad\n\r")
        buf.write("\f\r\16\r\u00b0\13\r\3\r\3\r\3\16\3\16\3\16\5\16\u00b7")
        buf.write("\n\16\3\16\3\16\7\16\u00bb\n\16\f\16\16\16\u00be\13\16")
        buf.write("\3\16\3\16\3\17\3\17\3\17\3\17\7\17\u00c6\n\17\f\17\16")
        buf.write("\17\u00c9\13\17\3\17\3\17\3\20\3\20\3\20\3\20\5\20\u00d1")
        buf.write("\n\20\3\20\3\20\7\20\u00d5\n\20\f\20\16\20\u00d8\13\20")
        buf.write("\3\20\3\20\3\21\5\21\u00dd\n\21\3\21\5\21\u00e0\n\21\3")
        buf.write("\21\3\21\3\21\3\21\5\21\u00e6\n\21\3\21\3\21\5\21\u00ea")
        buf.write("\n\21\3\22\3\22\3\22\3\23\3\23\3\24\5\24\u00f2\n\24\3")
        buf.write("\24\5\24\u00f5\n\24\3\24\5\24\u00f8\n\24\3\25\3\25\3\25")
        buf.write("\7\25\u00fd\n\25\f\25\16\25\u0100\13\25\3\25\3\25\3\26")
        buf.write("\5\26\u0105\n\26\3\26\3\26\3\26\3\26\7\26\u010b\n\26\f")
        buf.write("\26\16\26\u010e\13\26\3\26\3\26\5\26\u0112\n\26\3\26\5")
        buf.write("\26\u0115\n\26\3\27\3\27\5\27\u0119\n\27\3\30\3\30\3\30")
        buf.write("\7\30\u011e\n\30\f\30\16\30\u0121\13\30\3\30\3\30\3\31")
        buf.write("\3\31\3\31\5\31\u0128\n\31\3\32\3\32\5\32\u012c\n\32\3")
        buf.write("\33\3\33\3\34\3\34\3\34\5\34\u0133\n\34\3\35\3\35\5\35")
        buf.write("\u0137\n\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\5")
        buf.write("\36\u0141\n\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37")
        buf.write("\3\37\5\37\u014c\n\37\3 \3 \3 \3!\3!\3!\3!\3!\3!\5!\u0157")
        buf.write("\n!\3\"\5\"\u015a\n\"\3\"\6\"\u015d\n\"\r\"\16\"\u015e")
        buf.write("\3#\5#\u0162\n#\3#\6#\u0165\n#\r#\16#\u0166\3#\3#\6#\u016b")
        buf.write("\n#\r#\16#\u016c\5#\u016f\n#\3#\3#\5#\u0173\n#\3$\3$\3")
        buf.write("$\5$\u0178\n$\7$\u017a\n$\f$\16$\u017d\13$\3$\3$\3%\3")
        buf.write("%\3%\3%\3%\5%\u0186\n%\7%\u0188\n%\f%\16%\u018b\13%\3")
        buf.write("%\3%\3&\3&\7&\u0191\n&\f&\16&\u0194\13&\3&\3&\3&\7&\u0199")
        buf.write("\n&\f&\16&\u019c\13&\3&\5&\u019f\n&\3\'\3\'\3(\3(\3(\2")
        buf.write("\2)\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60")
        buf.write("\62\64\668:<>@BDFHJLN\2\n\r\2\3\3\32\32\34\34\37 %%+,")
        buf.write("..\61\61\648>>EE\4\2\63\6399\7\2\27\31!!&)==??\3\2\r\16")
        buf.write("\3\2\20\21\3\2\24\24\3\2\25\25\4\2\13\13\26\26\2\u01be")
        buf.write("\2S\3\2\2\2\4a\3\2\2\2\6c\3\2\2\2\bf\3\2\2\2\ni\3\2\2")
        buf.write("\2\fm\3\2\2\2\16w\3\2\2\2\20y\3\2\2\2\22\u0081\3\2\2\2")
        buf.write("\24\u0085\3\2\2\2\26\u0097\3\2\2\2\30\u00a5\3\2\2\2\32")
        buf.write("\u00b3\3\2\2\2\34\u00c1\3\2\2\2\36\u00cc\3\2\2\2 \u00dc")
        buf.write("\3\2\2\2\"\u00eb\3\2\2\2$\u00ee\3\2\2\2&\u00f1\3\2\2\2")
        buf.write("(\u00f9\3\2\2\2*\u0104\3\2\2\2,\u0118\3\2\2\2.\u011a\3")
        buf.write("\2\2\2\60\u0127\3\2\2\2\62\u012b\3\2\2\2\64\u012d\3\2")
        buf.write("\2\2\66\u0132\3\2\2\28\u0134\3\2\2\2:\u013e\3\2\2\2<\u0146")
        buf.write("\3\2\2\2>\u014d\3\2\2\2@\u0156\3\2\2\2B\u0159\3\2\2\2")
        buf.write("D\u0161\3\2\2\2F\u0174\3\2\2\2H\u0180\3\2\2\2J\u019e\3")
        buf.write("\2\2\2L\u01a0\3\2\2\2N\u01a2\3\2\2\2PR\5\4\3\2QP\3\2\2")
        buf.write("\2RU\3\2\2\2SQ\3\2\2\2ST\3\2\2\2TY\3\2\2\2US\3\2\2\2V")
        buf.write("X\5\16\b\2WV\3\2\2\2X[\3\2\2\2YW\3\2\2\2YZ\3\2\2\2Z\\")
        buf.write("\3\2\2\2[Y\3\2\2\2\\]\7\2\2\3]\3\3\2\2\2^b\5\6\4\2_b\5")
        buf.write("\b\5\2`b\5\n\6\2a^\3\2\2\2a_\3\2\2\2a`\3\2\2\2b\5\3\2")
        buf.write("\2\2cd\7*\2\2de\5J&\2e\7\3\2\2\2fg\7\35\2\2gh\5J&\2h\t")
        buf.write("\3\2\2\2ij\7\60\2\2jk\5\f\7\2kl\5N(\2l\13\3\2\2\2mn\t")
        buf.write("\2\2\2n\r\3\2\2\2ox\5\20\t\2px\5\22\n\2qx\5\24\13\2rx")
        buf.write("\5\26\f\2sx\5\30\r\2tx\5\32\16\2ux\5\34\17\2vx\5\36\20")
        buf.write("\2wo\3\2\2\2wp\3\2\2\2wq\3\2\2\2wr\3\2\2\2ws\3\2\2\2w")
        buf.write("t\3\2\2\2wu\3\2\2\2wv\3\2\2\2x\17\3\2\2\2yz\7\33\2\2z")
        buf.write("{\5\60\31\2{|\5N(\2|}\7\4\2\2}\177\5@!\2~\u0080\5L\'\2")
        buf.write("\177~\3\2\2\2\177\u0080\3\2\2\2\u0080\21\3\2\2\2\u0081")
        buf.write("\u0082\7B\2\2\u0082\u0083\5\62\32\2\u0083\u0084\5N(\2")
        buf.write("\u0084\23\3\2\2\2\u0085\u0086\7\"\2\2\u0086\u0087\5N(")
        buf.write("\2\u0087\u0092\7\5\2\2\u0088\u008b\5N(\2\u0089\u008a\7")
        buf.write("\4\2\2\u008a\u008c\5B\"\2\u008b\u0089\3\2\2\2\u008b\u008c")
        buf.write("\3\2\2\2\u008c\u008e\3\2\2\2\u008d\u008f\5L\'\2\u008e")
        buf.write("\u008d\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0091\3\2\2\2")
        buf.write("\u0090\u0088\3\2\2\2\u0091\u0094\3\2\2\2\u0092\u0090\3")
        buf.write("\2\2\2\u0092\u0093\3\2\2\2\u0093\u0095\3\2\2\2\u0094\u0092")
        buf.write("\3\2\2\2\u0095\u0096\7\6\2\2\u0096\25\3\2\2\2\u0097\u0098")
        buf.write("\7:\2\2\u0098\u0099\5N(\2\u0099\u00a0\7\5\2\2\u009a\u009c")
        buf.write("\5J&\2\u009b\u009d\5L\'\2\u009c\u009b\3\2\2\2\u009c\u009d")
        buf.write("\3\2\2\2\u009d\u009f\3\2\2\2\u009e\u009a\3\2\2\2\u009f")
        buf.write("\u00a2\3\2\2\2\u00a0\u009e\3\2\2\2\u00a0\u00a1\3\2\2\2")
        buf.write("\u00a1\u00a3\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a3\u00a4\7")
        buf.write("\6\2\2\u00a4\27\3\2\2\2\u00a5\u00a6\7@\2\2\u00a6\u00a8")
        buf.write("\5N(\2\u00a7\u00a9\7F\2\2\u00a8\u00a7\3\2\2\2\u00a8\u00a9")
        buf.write("\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\u00ae\7\5\2\2\u00ab")
        buf.write("\u00ad\5 \21\2\u00ac\u00ab\3\2\2\2\u00ad\u00b0\3\2\2\2")
        buf.write("\u00ae\u00ac\3\2\2\2\u00ae\u00af\3\2\2\2\u00af\u00b1\3")
        buf.write("\2\2\2\u00b0\u00ae\3\2\2\2\u00b1\u00b2\7\6\2\2\u00b2\31")
        buf.write("\3\2\2\2\u00b3\u00b4\7C\2\2\u00b4\u00b6\5N(\2\u00b5\u00b7")
        buf.write("\7F\2\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7")
        buf.write("\u00b8\3\2\2\2\u00b8\u00bc\7\5\2\2\u00b9\u00bb\5 \21\2")
        buf.write("\u00ba\u00b9\3\2\2\2\u00bb\u00be\3\2\2\2\u00bc\u00ba\3")
        buf.write("\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00bf\3\2\2\2\u00be\u00bc")
        buf.write("\3\2\2\2\u00bf\u00c0\7\6\2\2\u00c0\33\3\2\2\2\u00c1\u00c2")
        buf.write("\7#\2\2\u00c2\u00c3\5N(\2\u00c3\u00c7\7\5\2\2\u00c4\u00c6")
        buf.write("\5 \21\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\u00cb\7\6\2\2\u00cb\35\3\2")
        buf.write("\2\2\u00cc\u00cd\7;\2\2\u00cd\u00d0\5N(\2\u00ce\u00cf")
        buf.write("\7$\2\2\u00cf\u00d1\5N(\2\u00d0\u00ce\3\2\2\2\u00d0\u00d1")
        buf.write("\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d6\7\5\2\2\u00d3")
        buf.write("\u00d5\5*\26\2\u00d4\u00d3\3\2\2\2\u00d5\u00d8\3\2\2\2")
        buf.write("\u00d6\u00d4\3\2\2\2\u00d6\u00d7\3\2\2\2\u00d7\u00d9\3")
        buf.write("\2\2\2\u00d8\u00d6\3\2\2\2\u00d9\u00da\7\6\2\2\u00da\37")
        buf.write("\3\2\2\2\u00db\u00dd\5\"\22\2\u00dc\u00db\3\2\2\2\u00dc")
        buf.write("\u00dd\3\2\2\2\u00dd\u00df\3\2\2\2\u00de\u00e0\5$\23\2")
        buf.write("\u00df\u00de\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e1\3")
        buf.write("\2\2\2\u00e1\u00e2\5\60\31\2\u00e2\u00e5\5N(\2\u00e3\u00e4")
        buf.write("\7\4\2\2\u00e4\u00e6\5@!\2\u00e5\u00e3\3\2\2\2\u00e5\u00e6")
        buf.write("\3\2\2\2\u00e6\u00e7\3\2\2\2\u00e7\u00e9\5&\24\2\u00e8")
        buf.write("\u00ea\5L\'\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2")
        buf.write("\u00ea!\3\2\2\2\u00eb\u00ec\5B\"\2\u00ec\u00ed\7\7\2\2")
        buf.write("\u00ed#\3\2\2\2\u00ee\u00ef\t\3\2\2\u00ef%\3\2\2\2\u00f0")
        buf.write("\u00f2\7I\2\2\u00f1\u00f0\3\2\2\2\u00f1\u00f2\3\2\2\2")
        buf.write("\u00f2\u00f4\3\2\2\2\u00f3\u00f5\7H\2\2\u00f4\u00f3\3")
        buf.write("\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u00f7\3\2\2\2\u00f6\u00f8")
        buf.write("\5(\25\2\u00f7\u00f6\3\2\2\2\u00f7\u00f8\3\2\2\2\u00f8")
        buf.write("\'\3\2\2\2\u00f9\u00fa\7G\2\2\u00fa\u00fe\7\5\2\2\u00fb")
        buf.write("\u00fd\5 \21\2\u00fc\u00fb\3\2\2\2\u00fd\u0100\3\2\2\2")
        buf.write("\u00fe\u00fc\3\2\2\2\u00fe\u00ff\3\2\2\2\u00ff\u0101\3")
        buf.write("\2\2\2\u0100\u00fe\3\2\2\2\u0101\u0102\7\6\2\2\u0102)")
        buf.write("\3\2\2\2\u0103\u0105\7\62\2\2\u0104\u0103\3\2\2\2\u0104")
        buf.write("\u0105\3\2\2\2\u0105\u0106\3\2\2\2\u0106\u0107\5,\27\2")
        buf.write("\u0107\u0108\5N(\2\u0108\u010c\7\b\2\2\u0109\u010b\5 ")
        buf.write("\21\2\u010a\u0109\3\2\2\2\u010b\u010e\3\2\2\2\u010c\u010a")
        buf.write("\3\2\2\2\u010c\u010d\3\2\2\2\u010d\u010f\3\2\2\2\u010e")
        buf.write("\u010c\3\2\2\2\u010f\u0111\7\t\2\2\u0110\u0112\5.\30\2")
        buf.write("\u0111\u0110\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0114\3")
        buf.write("\2\2\2\u0113\u0115\5L\'\2\u0114\u0113\3\2\2\2\u0114\u0115")
        buf.write("\3\2\2\2\u0115+\3\2\2\2\u0116\u0119\5\60\31\2\u0117\u0119")
        buf.write("\7D\2\2\u0118\u0116\3\2\2\2\u0118\u0117\3\2\2\2\u0119")
        buf.write("-\3\2\2\2\u011a\u011b\7A\2\2\u011b\u011f\7\b\2\2\u011c")
        buf.write("\u011e\5 \21\2\u011d\u011c\3\2\2\2\u011e\u0121\3\2\2\2")
        buf.write("\u011f\u011d\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0122\3")
        buf.write("\2\2\2\u0121\u011f\3\2\2\2\u0122\u0123\7\t\2\2\u0123/")
        buf.write("\3\2\2\2\u0124\u0128\5N(\2\u0125\u0128\5\64\33\2\u0126")
        buf.write("\u0128\5\66\34\2\u0127\u0124\3\2\2\2\u0127\u0125\3\2\2")
        buf.write("\2\u0127\u0126\3\2\2\2\u0128\61\3\2\2\2\u0129\u012c\5")
        buf.write("\64\33\2\u012a\u012c\5\66\34\2\u012b\u0129\3\2\2\2\u012b")
        buf.write("\u012a\3\2\2\2\u012c\63\3\2\2\2\u012d\u012e\t\4\2\2\u012e")
        buf.write("\65\3\2\2\2\u012f\u0133\58\35\2\u0130\u0133\5:\36\2\u0131")
        buf.write("\u0133\5<\37\2\u0132\u012f\3\2\2\2\u0132\u0130\3\2\2\2")
        buf.write("\u0132\u0131\3\2\2\2\u0133\67\3\2\2\2\u0134\u0136\7/\2")
        buf.write("\2\u0135\u0137\5> \2\u0136\u0135\3\2\2\2\u0136\u0137\3")
        buf.write("\2\2\2\u0137\u0138\3\2\2\2\u0138\u0139\7\n\2\2\u0139\u013a")
        buf.write("\5\60\31\2\u013a\u013b\7\13\2\2\u013b\u013c\5\60\31\2")
        buf.write("\u013c\u013d\7\f\2\2\u013d9\3\2\2\2\u013e\u0140\7<\2\2")
        buf.write("\u013f\u0141\5> \2\u0140\u013f\3\2\2\2\u0140\u0141\3\2")
        buf.write("\2\2\u0141\u0142\3\2\2\2\u0142\u0143\7\n\2\2\u0143\u0144")
        buf.write("\5\60\31\2\u0144\u0145\7\f\2\2\u0145;\3\2\2\2\u0146\u0147")
        buf.write("\7-\2\2\u0147\u0148\7\n\2\2\u0148\u0149\5\60\31\2\u0149")
        buf.write("\u014b\7\f\2\2\u014a\u014c\5> \2\u014b\u014a\3\2\2\2\u014b")
        buf.write("\u014c\3\2\2\2\u014c=\3\2\2\2\u014d\u014e\7\36\2\2\u014e")
        buf.write("\u014f\5J&\2\u014f?\3\2\2\2\u0150\u0157\5B\"\2\u0151\u0157")
        buf.write("\5D#\2\u0152\u0157\5J&\2\u0153\u0157\5N(\2\u0154\u0157")
        buf.write("\5F$\2\u0155\u0157\5H%\2\u0156\u0150\3\2\2\2\u0156\u0151")
        buf.write("\3\2\2\2\u0156\u0152\3\2\2\2\u0156\u0153\3\2\2\2\u0156")
        buf.write("\u0154\3\2\2\2\u0156\u0155\3\2\2\2\u0157A\3\2\2\2\u0158")
        buf.write("\u015a\t\5\2\2\u0159\u0158\3\2\2\2\u0159\u015a\3\2\2\2")
        buf.write("\u015a\u015c\3\2\2\2\u015b\u015d\7K\2\2\u015c\u015b\3")
        buf.write("\2\2\2\u015d\u015e\3\2\2\2\u015e\u015c\3\2\2\2\u015e\u015f")
        buf.write("\3\2\2\2\u015fC\3\2\2\2\u0160\u0162\t\5\2\2\u0161\u0160")
        buf.write("\3\2\2\2\u0161\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163")
        buf.write("\u0165\7K\2\2\u0164\u0163\3\2\2\2\u0165\u0166\3\2\2\2")
        buf.write("\u0166\u0164\3\2\2\2\u0166\u0167\3\2\2\2\u0167\u016e\3")
        buf.write("\2\2\2\u0168\u016a\7\17\2\2\u0169\u016b\7K\2\2\u016a\u0169")
        buf.write("\3\2\2\2\u016b\u016c\3\2\2\2\u016c\u016a\3\2\2\2\u016c")
        buf.write("\u016d\3\2\2\2\u016d\u016f\3\2\2\2\u016e\u0168\3\2\2\2")
        buf.write("\u016e\u016f\3\2\2\2\u016f\u0172\3\2\2\2\u0170\u0171\t")
        buf.write("\6\2\2\u0171\u0173\5B\"\2\u0172\u0170\3\2\2\2\u0172\u0173")
        buf.write("\3\2\2\2\u0173E\3\2\2\2\u0174\u017b\7\22\2\2\u0175\u0177")
        buf.write("\5@!\2\u0176\u0178\5L\'\2\u0177\u0176\3\2\2\2\u0177\u0178")
        buf.write("\3\2\2\2\u0178\u017a\3\2\2\2\u0179\u0175\3\2\2\2\u017a")
        buf.write("\u017d\3\2\2\2\u017b\u0179\3\2\2\2\u017b\u017c\3\2\2\2")
        buf.write("\u017c\u017e\3\2\2\2\u017d\u017b\3\2\2\2\u017e\u017f\7")
        buf.write("\23\2\2\u017fG\3\2\2\2\u0180\u0189\7\5\2\2\u0181\u0182")
        buf.write("\5@!\2\u0182\u0183\7\7\2\2\u0183\u0185\5@!\2\u0184\u0186")
        buf.write("\5L\'\2\u0185\u0184\3\2\2\2\u0185\u0186\3\2\2\2\u0186")
        buf.write("\u0188\3\2\2\2\u0187\u0181\3\2\2\2\u0188\u018b\3\2\2\2")
        buf.write("\u0189\u0187\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018c\3")
        buf.write("\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7\6\2\2\u018dI")
        buf.write("\3\2\2\2\u018e\u0192\7\24\2\2\u018f\u0191\n\7\2\2\u0190")
        buf.write("\u018f\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2")
        buf.write("\u0192\u0193\3\2\2\2\u0193\u0195\3\2\2\2\u0194\u0192\3")
        buf.write("\2\2\2\u0195\u019f\7\24\2\2\u0196\u019a\7\25\2\2\u0197")
        buf.write("\u0199\n\b\2\2\u0198\u0197\3\2\2\2\u0199\u019c\3\2\2\2")
        buf.write("\u019a\u0198\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u019d\3")
        buf.write("\2\2\2\u019c\u019a\3\2\2\2\u019d\u019f\7\25\2\2\u019e")
        buf.write("\u018e\3\2\2\2\u019e\u0196\3\2\2\2\u019fK\3\2\2\2\u01a0")
        buf.write("\u01a1\t\t\2\2\u01a1M\3\2\2\2\u01a2\u01a3\7J\2\2\u01a3")
        buf.write("O\3\2\2\2\66SYaw\177\u008b\u008e\u0092\u009c\u00a0\u00a8")
        buf.write("\u00ae\u00b6\u00bc\u00c7\u00d0\u00d6\u00dc\u00df\u00e5")
        buf.write("\u00e9\u00f1\u00f4\u00f7\u00fe\u0104\u010c\u0111\u0114")
        buf.write("\u0118\u011f\u0127\u012b\u0132\u0136\u0140\u014b\u0156")
        buf.write("\u0159\u015e\u0161\u0166\u016c\u016e\u0172\u0177\u017b")
        buf.write("\u0185\u0189\u0192\u019a\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>", "'*'", "'='", "'{'", "'}'", "':'", "'('", 
                     "')'", "'<'", "','", "'>'", "'+'", "'-'", "'.'", "'E'", 
                     "'e'", "'['", "']'", "'\"'", "'''", "';'", "'binary'", 
                     "'bool'", "'byte'", "'c_glib'", "'const'", "'cpp'", 
                     "'cpp_include'", "'cpp_type'", "'csharp'", "'delphi'", 
                     "'double'", "'enum'", "'exception'", "'extends'", "'go'", 
                     "'i16'", "'i32'", "'i64'", "'i8'", "'include'", "'java'", 
                     "'js'", "'list'", "'lua'", "'map'", "'namespace'", 
                     "'netcore'", "'oneway'", "'optional'", "'perl'", "'php'", 
                     "'py'", "'py.twisted'", "'rb'", "'required'", "'senum'", 
                     "'service'", "'set'", "'slist'", "'st'", "'string'", 
                     "'struct'", "'throws'", "'typedef'", "'union'", "'void'", 
                     "'xsd'", "'xsd_all'", "'xsd_attrs'", "'xsd_nillable'", 
                     "'xsd_optional'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "BINARY", "BOOL", "BYTE", "C_GLIB", "CONST", 
                      "CPP", "CPP_INCLUDE", "CPP_TYPE", "CSHARP", "DELPHI", 
                      "DOUBLE", "ENUM", "EXCEPTION", "EXTENDS", "GO", "I16", 
                      "I32", "I64", "I8", "INCLUDE", "JAVA", "JS", "LIST", 
                      "LUA", "MAP", "NAMESPACE", "NETCORE", "ONEWAY", "OPTIONAL", 
                      "PERL", "PHP", "PY", "PY_TWISTED", "RB", "REQUIRED", 
                      "SENUM", "SERVICE", "SET", "SLIST", "ST", "STRING", 
                      "STRUCT", "THROWS", "TYPEDEF", "UNION", "VOID", "XSD", 
                      "XSD_ALL", "XSD_ATTRS", "XSD_NILLABLE", "XSD_OPTIONAL", 
                      "IDENTIFIER", "DIGIT", "WS", "COMMENT", "LINE_COMMENT" ]

    RULE_document = 0
    RULE_header = 1
    RULE_include = 2
    RULE_cppInclude = 3
    RULE_namespace = 4
    RULE_namespaceScope = 5
    RULE_definition = 6
    RULE_const = 7
    RULE_typedef = 8
    RULE_enum = 9
    RULE_senum = 10
    RULE_struct = 11
    RULE_union = 12
    RULE_exception = 13
    RULE_service = 14
    RULE_field = 15
    RULE_fieldID = 16
    RULE_fieldReq = 17
    RULE_xsdFieldOptions = 18
    RULE_xsdAttrs = 19
    RULE_function = 20
    RULE_functionType = 21
    RULE_throws_ = 22
    RULE_fieldType = 23
    RULE_definitionType = 24
    RULE_baseType = 25
    RULE_containerType = 26
    RULE_mapType = 27
    RULE_setType = 28
    RULE_listType = 29
    RULE_cppType = 30
    RULE_constValue = 31
    RULE_intConstant = 32
    RULE_doubleConstant = 33
    RULE_constList = 34
    RULE_constMap = 35
    RULE_literal = 36
    RULE_listSeparator = 37
    RULE_identifier = 38

    ruleNames =  [ "document", "header", "include", "cppInclude", "namespace", 
                   "namespaceScope", "definition", "const", "typedef", "enum", 
                   "senum", "struct", "union", "exception", "service", "field", 
                   "fieldID", "fieldReq", "xsdFieldOptions", "xsdAttrs", 
                   "function", "functionType", "throws_", "fieldType", "definitionType", 
                   "baseType", "containerType", "mapType", "setType", "listType", 
                   "cppType", "constValue", "intConstant", "doubleConstant", 
                   "constList", "constMap", "literal", "listSeparator", 
                   "identifier" ]

    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
    BINARY=21
    BOOL=22
    BYTE=23
    C_GLIB=24
    CONST=25
    CPP=26
    CPP_INCLUDE=27
    CPP_TYPE=28
    CSHARP=29
    DELPHI=30
    DOUBLE=31
    ENUM=32
    EXCEPTION=33
    EXTENDS=34
    GO=35
    I16=36
    I32=37
    I64=38
    I8=39
    INCLUDE=40
    JAVA=41
    JS=42
    LIST=43
    LUA=44
    MAP=45
    NAMESPACE=46
    NETCORE=47
    ONEWAY=48
    OPTIONAL=49
    PERL=50
    PHP=51
    PY=52
    PY_TWISTED=53
    RB=54
    REQUIRED=55
    SENUM=56
    SERVICE=57
    SET=58
    SLIST=59
    ST=60
    STRING=61
    STRUCT=62
    THROWS=63
    TYPEDEF=64
    UNION=65
    VOID=66
    XSD=67
    XSD_ALL=68
    XSD_ATTRS=69
    XSD_NILLABLE=70
    XSD_OPTIONAL=71
    IDENTIFIER=72
    DIGIT=73
    WS=74
    COMMENT=75
    LINE_COMMENT=76

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.8")
        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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDocument" ):
                return visitor.visitDocument(self)
            else:
                return visitor.visitChildren(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 = 81
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.CPP_INCLUDE) | (1 << ThriftParser.INCLUDE) | (1 << ThriftParser.NAMESPACE))) != 0):
                self.state = 78
                self.header()
                self.state = 83
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 87
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 25)) & ~0x3f) == 0 and ((1 << (_la - 25)) & ((1 << (ThriftParser.CONST - 25)) | (1 << (ThriftParser.ENUM - 25)) | (1 << (ThriftParser.EXCEPTION - 25)) | (1 << (ThriftParser.SENUM - 25)) | (1 << (ThriftParser.SERVICE - 25)) | (1 << (ThriftParser.STRUCT - 25)) | (1 << (ThriftParser.TYPEDEF - 25)) | (1 << (ThriftParser.UNION - 25)))) != 0):
                self.state = 84
                self.definition()
                self.state = 89
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 90
            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 cppInclude(self):
            return self.getTypedRuleContext(ThriftParser.CppIncludeContext,0)


        def namespace(self):
            return self.getTypedRuleContext(ThriftParser.NamespaceContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHeader" ):
                return visitor.visitHeader(self)
            else:
                return visitor.visitChildren(self)




    def header(self):

        localctx = ThriftParser.HeaderContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_header)
        try:
            self.state = 95
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.INCLUDE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 92
                self.include()
                pass
            elif token in [ThriftParser.CPP_INCLUDE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 93
                self.cppInclude()
                pass
            elif token in [ThriftParser.NAMESPACE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 94
                self.namespace()
                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 INCLUDE(self):
            return self.getToken(ThriftParser.INCLUDE, 0)

        def literal(self):
            return self.getTypedRuleContext(ThriftParser.LiteralContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitInclude" ):
                return visitor.visitInclude(self)
            else:
                return visitor.visitChildren(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 = 97
            self.match(ThriftParser.INCLUDE)
            self.state = 98
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CppIncludeContext(ParserRuleContext):

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

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

        def literal(self):
            return self.getTypedRuleContext(ThriftParser.LiteralContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_cppInclude

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

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

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




    def cppInclude(self):

        localctx = ThriftParser.CppIncludeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_cppInclude)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 100
            self.match(ThriftParser.CPP_INCLUDE)
            self.state = 101
            self.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 NAMESPACE(self):
            return self.getToken(ThriftParser.NAMESPACE, 0)

        def namespaceScope(self):
            return self.getTypedRuleContext(ThriftParser.NamespaceScopeContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNamespace" ):
                return visitor.visitNamespace(self)
            else:
                return visitor.visitChildren(self)




    def namespace(self):

        localctx = ThriftParser.NamespaceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_namespace)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.match(ThriftParser.NAMESPACE)
            self.state = 104
            self.namespaceScope()
            self.state = 105
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NamespaceScopeContext(ParserRuleContext):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return ThriftParser.RULE_namespaceScope

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

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

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




    def namespaceScope(self):

        localctx = ThriftParser.NamespaceScopeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_namespaceScope)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 107
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__0) | (1 << ThriftParser.C_GLIB) | (1 << ThriftParser.CPP) | (1 << ThriftParser.CSHARP) | (1 << ThriftParser.DELPHI) | (1 << ThriftParser.GO) | (1 << ThriftParser.JAVA) | (1 << ThriftParser.JS) | (1 << ThriftParser.LUA) | (1 << ThriftParser.NETCORE) | (1 << ThriftParser.PERL) | (1 << ThriftParser.PHP) | (1 << ThriftParser.PY) | (1 << ThriftParser.PY_TWISTED) | (1 << ThriftParser.RB) | (1 << ThriftParser.ST))) != 0) or _la==ThriftParser.XSD):
                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 DefinitionContext(ParserRuleContext):

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

        def const(self):
            return self.getTypedRuleContext(ThriftParser.ConstContext,0)


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


        def enum(self):
            return self.getTypedRuleContext(ThriftParser.EnumContext,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 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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDefinition" ):
                return visitor.visitDefinition(self)
            else:
                return visitor.visitChildren(self)




    def definition(self):

        localctx = ThriftParser.DefinitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_definition)
        try:
            self.state = 117
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.CONST]:
                self.enterOuterAlt(localctx, 1)
                self.state = 109
                self.const()
                pass
            elif token in [ThriftParser.TYPEDEF]:
                self.enterOuterAlt(localctx, 2)
                self.state = 110
                self.typedef()
                pass
            elif token in [ThriftParser.ENUM]:
                self.enterOuterAlt(localctx, 3)
                self.state = 111
                self.enum()
                pass
            elif token in [ThriftParser.SENUM]:
                self.enterOuterAlt(localctx, 4)
                self.state = 112
                self.senum()
                pass
            elif token in [ThriftParser.STRUCT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 113
                self.struct()
                pass
            elif token in [ThriftParser.UNION]:
                self.enterOuterAlt(localctx, 6)
                self.state = 114
                self.union()
                pass
            elif token in [ThriftParser.EXCEPTION]:
                self.enterOuterAlt(localctx, 7)
                self.state = 115
                self.exception()
                pass
            elif token in [ThriftParser.SERVICE]:
                self.enterOuterAlt(localctx, 8)
                self.state = 116
                self.service()
                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 ConstContext(ParserRuleContext):

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

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

        def fieldType(self):
            return self.getTypedRuleContext(ThriftParser.FieldTypeContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        def constValue(self):
            return self.getTypedRuleContext(ThriftParser.ConstValueContext,0)


        def listSeparator(self):
            return self.getTypedRuleContext(ThriftParser.ListSeparatorContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_const

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

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

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




    def const(self):

        localctx = ThriftParser.ConstContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_const)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 119
            self.match(ThriftParser.CONST)
            self.state = 120
            self.fieldType()
            self.state = 121
            self.identifier()
            self.state = 122
            self.match(ThriftParser.T__1)
            self.state = 123
            self.constValue()
            self.state = 125
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                self.state = 124
                self.listSeparator()


        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 TYPEDEF(self):
            return self.getToken(ThriftParser.TYPEDEF, 0)

        def definitionType(self):
            return self.getTypedRuleContext(ThriftParser.DefinitionTypeContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTypedef" ):
                return visitor.visitTypedef(self)
            else:
                return visitor.visitChildren(self)




    def typedef(self):

        localctx = ThriftParser.TypedefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_typedef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127
            self.match(ThriftParser.TYPEDEF)
            self.state = 128
            self.definitionType()
            self.state = 129
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumContext(ParserRuleContext):

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

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

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


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


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


        def getRuleIndex(self):
            return ThriftParser.RULE_enum

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

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

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




    def enum(self):

        localctx = ThriftParser.EnumContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_enum)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 131
            self.match(ThriftParser.ENUM)
            self.state = 132
            self.identifier()
            self.state = 133
            self.match(ThriftParser.T__2)
            self.state = 144
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ThriftParser.IDENTIFIER:
                self.state = 134
                self.identifier()
                self.state = 137
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__1:
                    self.state = 135
                    self.match(ThriftParser.T__1)
                    self.state = 136
                    self.intConstant()


                self.state = 140
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                    self.state = 139
                    self.listSeparator()


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

            self.state = 147
            self.match(ThriftParser.T__3)
        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 SENUM(self):
            return self.getToken(ThriftParser.SENUM, 0)

        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


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


        def listSeparator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ThriftParser.ListSeparatorContext)
            else:
                return self.getTypedRuleContext(ThriftParser.ListSeparatorContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSenum" ):
                return visitor.visitSenum(self)
            else:
                return visitor.visitChildren(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 = 149
            self.match(ThriftParser.SENUM)
            self.state = 150
            self.identifier()
            self.state = 151
            self.match(ThriftParser.T__2)
            self.state = 158
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ThriftParser.T__17 or _la==ThriftParser.T__18:
                self.state = 152
                self.literal()
                self.state = 154
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                    self.state = 153
                    self.listSeparator()


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

            self.state = 161
            self.match(ThriftParser.T__3)
        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 STRUCT(self):
            return self.getToken(ThriftParser.STRUCT, 0)

        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


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

        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_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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStruct" ):
                return visitor.visitStruct(self)
            else:
                return visitor.visitChildren(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 = 163
            self.match(ThriftParser.STRUCT)
            self.state = 164
            self.identifier()
            self.state = 166
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.XSD_ALL:
                self.state = 165
                self.match(ThriftParser.XSD_ALL)


            self.state = 168
            self.match(ThriftParser.T__2)
            self.state = 172
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 169
                self.field()
                self.state = 174
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 175
            self.match(ThriftParser.T__3)
        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 UNION(self):
            return self.getToken(ThriftParser.UNION, 0)

        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


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

        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_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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitUnion" ):
                return visitor.visitUnion(self)
            else:
                return visitor.visitChildren(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 = 177
            self.match(ThriftParser.UNION)
            self.state = 178
            self.identifier()
            self.state = 180
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.XSD_ALL:
                self.state = 179
                self.match(ThriftParser.XSD_ALL)


            self.state = 182
            self.match(ThriftParser.T__2)
            self.state = 186
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 183
                self.field()
                self.state = 188
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 189
            self.match(ThriftParser.T__3)
        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 EXCEPTION(self):
            return self.getToken(ThriftParser.EXCEPTION, 0)

        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        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_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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitException" ):
                return visitor.visitException(self)
            else:
                return visitor.visitChildren(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 = 191
            self.match(ThriftParser.EXCEPTION)
            self.state = 192
            self.identifier()
            self.state = 193
            self.match(ThriftParser.T__2)
            self.state = 197
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 194
                self.field()
                self.state = 199
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 200
            self.match(ThriftParser.T__3)
        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 SERVICE(self):
            return self.getToken(ThriftParser.SERVICE, 0)

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


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

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


        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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitService" ):
                return visitor.visitService(self)
            else:
                return visitor.visitChildren(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 = 202
            self.match(ThriftParser.SERVICE)
            self.state = 203
            self.identifier()
            self.state = 206
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.EXTENDS:
                self.state = 204
                self.match(ThriftParser.EXTENDS)
                self.state = 205
                self.identifier()


            self.state = 208
            self.match(ThriftParser.T__2)
            self.state = 212
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 21)) & ~0x3f) == 0 and ((1 << (_la - 21)) & ((1 << (ThriftParser.BINARY - 21)) | (1 << (ThriftParser.BOOL - 21)) | (1 << (ThriftParser.BYTE - 21)) | (1 << (ThriftParser.DOUBLE - 21)) | (1 << (ThriftParser.I16 - 21)) | (1 << (ThriftParser.I32 - 21)) | (1 << (ThriftParser.I64 - 21)) | (1 << (ThriftParser.I8 - 21)) | (1 << (ThriftParser.LIST - 21)) | (1 << (ThriftParser.MAP - 21)) | (1 << (ThriftParser.ONEWAY - 21)) | (1 << (ThriftParser.SET - 21)) | (1 << (ThriftParser.SLIST - 21)) | (1 << (ThriftParser.STRING - 21)) | (1 << (ThriftParser.VOID - 21)) | (1 << (ThriftParser.IDENTIFIER - 21)))) != 0):
                self.state = 209
                self.function()
                self.state = 214
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 215
            self.match(ThriftParser.T__3)
        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 fieldType(self):
            return self.getTypedRuleContext(ThriftParser.FieldTypeContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        def xsdFieldOptions(self):
            return self.getTypedRuleContext(ThriftParser.XsdFieldOptionsContext,0)


        def fieldID(self):
            return self.getTypedRuleContext(ThriftParser.FieldIDContext,0)


        def fieldReq(self):
            return self.getTypedRuleContext(ThriftParser.FieldReqContext,0)


        def constValue(self):
            return self.getTypedRuleContext(ThriftParser.ConstValueContext,0)


        def listSeparator(self):
            return self.getTypedRuleContext(ThriftParser.ListSeparatorContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitField" ):
                return visitor.visitField(self)
            else:
                return visitor.visitChildren(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 = 218
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 217
                self.fieldID()


            self.state = 221
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.OPTIONAL or _la==ThriftParser.REQUIRED:
                self.state = 220
                self.fieldReq()


            self.state = 223
            self.fieldType()
            self.state = 224
            self.identifier()
            self.state = 227
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__1:
                self.state = 225
                self.match(ThriftParser.T__1)
                self.state = 226
                self.constValue()


            self.state = 229
            self.xsdFieldOptions()
            self.state = 231
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                self.state = 230
                self.listSeparator()


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


    class FieldIDContext(ParserRuleContext):

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

        def intConstant(self):
            return self.getTypedRuleContext(ThriftParser.IntConstantContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_fieldID

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

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

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




    def fieldID(self):

        localctx = ThriftParser.FieldIDContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_fieldID)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 233
            self.intConstant()
            self.state = 234
            self.match(ThriftParser.T__4)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FieldReqContext(ParserRuleContext):

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

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

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

        def getRuleIndex(self):
            return ThriftParser.RULE_fieldReq

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

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

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




    def fieldReq(self):

        localctx = ThriftParser.FieldReqContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_fieldReq)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236
            _la = self._input.LA(1)
            if not(_la==ThriftParser.OPTIONAL or _la==ThriftParser.REQUIRED):
                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 XsdFieldOptionsContext(ParserRuleContext):

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

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

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

        def xsdAttrs(self):
            return self.getTypedRuleContext(ThriftParser.XsdAttrsContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_xsdFieldOptions

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

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

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




    def xsdFieldOptions(self):

        localctx = ThriftParser.XsdFieldOptionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_xsdFieldOptions)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 239
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.XSD_OPTIONAL:
                self.state = 238
                self.match(ThriftParser.XSD_OPTIONAL)


            self.state = 242
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.XSD_NILLABLE:
                self.state = 241
                self.match(ThriftParser.XSD_NILLABLE)


            self.state = 245
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.XSD_ATTRS:
                self.state = 244
                self.xsdAttrs()


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


    class XsdAttrsContext(ParserRuleContext):

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

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

        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_xsdAttrs

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

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

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




    def xsdAttrs(self):

        localctx = ThriftParser.XsdAttrsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_xsdAttrs)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 247
            self.match(ThriftParser.XSD_ATTRS)
            self.state = 248
            self.match(ThriftParser.T__2)
            self.state = 252
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 249
                self.field()
                self.state = 254
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 255
            self.match(ThriftParser.T__3)
        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 functionType(self):
            return self.getTypedRuleContext(ThriftParser.FunctionTypeContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        def ONEWAY(self):
            return self.getToken(ThriftParser.ONEWAY, 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_(self):
            return self.getTypedRuleContext(ThriftParser.Throws_Context,0)


        def listSeparator(self):
            return self.getTypedRuleContext(ThriftParser.ListSeparatorContext,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 accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFunction" ):
                return visitor.visitFunction(self)
            else:
                return visitor.visitChildren(self)




    def function(self):

        localctx = ThriftParser.FunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_function)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.ONEWAY:
                self.state = 257
                self.match(ThriftParser.ONEWAY)


            self.state = 260
            self.functionType()
            self.state = 261
            self.identifier()
            self.state = 262
            self.match(ThriftParser.T__5)
            self.state = 266
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 0):
                self.state = 263
                self.field()
                self.state = 268
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 269
            self.match(ThriftParser.T__6)
            self.state = 271
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.THROWS:
                self.state = 270
                self.throws_()


            self.state = 274
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                self.state = 273
                self.listSeparator()


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


    class FunctionTypeContext(ParserRuleContext):

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

        def fieldType(self):
            return self.getTypedRuleContext(ThriftParser.FieldTypeContext,0)


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

        def getRuleIndex(self):
            return ThriftParser.RULE_functionType

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

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

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




    def functionType(self):

        localctx = ThriftParser.FunctionTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_functionType)
        try:
            self.state = 278
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.BINARY, ThriftParser.BOOL, ThriftParser.BYTE, ThriftParser.DOUBLE, ThriftParser.I16, ThriftParser.I32, ThriftParser.I64, ThriftParser.I8, ThriftParser.LIST, ThriftParser.MAP, ThriftParser.SET, ThriftParser.SLIST, ThriftParser.STRING, ThriftParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 276
                self.fieldType()
                pass
            elif token in [ThriftParser.VOID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 277
                self.match(ThriftParser.VOID)
                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_Context(ParserRuleContext):

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

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

        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_

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

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

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




    def throws_(self):

        localctx = ThriftParser.Throws_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_throws_)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 280
            self.match(ThriftParser.THROWS)
            self.state = 281
            self.match(ThriftParser.T__5)
            self.state = 285
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 11)) & ~0x3f) == 0 and ((1 << (_la - 11)) & ((1 << (ThriftParser.T__10 - 11)) | (1 << (ThriftParser.T__11 - 11)) | (1 << (ThriftParser.BINARY - 11)) | (1 << (ThriftParser.BOOL - 11)) | (1 << (ThriftParser.BYTE - 11)) | (1 << (ThriftParser.DOUBLE - 11)) | (1 << (ThriftParser.I16 - 11)) | (1 << (ThriftParser.I32 - 11)) | (1 << (ThriftParser.I64 - 11)) | (1 << (ThriftParser.I8 - 11)) | (1 << (ThriftParser.LIST - 11)) | (1 << (ThriftParser.MAP - 11)) | (1 << (ThriftParser.OPTIONAL - 11)) | (1 << (ThriftParser.REQUIRED - 11)) | (1 << (ThriftParser.SET - 11)) | (1 << (ThriftParser.SLIST - 11)) | (1 << (ThriftParser.STRING - 11)) | (1 << (ThriftParser.IDENTIFIER - 11)) | (1 << (ThriftParser.DIGIT - 11)))) != 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__6)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FieldTypeContext(ParserRuleContext):

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

        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        def baseType(self):
            return self.getTypedRuleContext(ThriftParser.BaseTypeContext,0)


        def containerType(self):
            return self.getTypedRuleContext(ThriftParser.ContainerTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_fieldType

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

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

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




    def fieldType(self):

        localctx = ThriftParser.FieldTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_fieldType)
        try:
            self.state = 293
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 290
                self.identifier()
                pass
            elif token in [ThriftParser.BINARY, ThriftParser.BOOL, ThriftParser.BYTE, ThriftParser.DOUBLE, ThriftParser.I16, ThriftParser.I32, ThriftParser.I64, ThriftParser.I8, ThriftParser.SLIST, ThriftParser.STRING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 291
                self.baseType()
                pass
            elif token in [ThriftParser.LIST, ThriftParser.MAP, ThriftParser.SET]:
                self.enterOuterAlt(localctx, 3)
                self.state = 292
                self.containerType()
                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 DefinitionTypeContext(ParserRuleContext):

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

        def baseType(self):
            return self.getTypedRuleContext(ThriftParser.BaseTypeContext,0)


        def containerType(self):
            return self.getTypedRuleContext(ThriftParser.ContainerTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_definitionType

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

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

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




    def definitionType(self):

        localctx = ThriftParser.DefinitionTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_definitionType)
        try:
            self.state = 297
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.BINARY, ThriftParser.BOOL, ThriftParser.BYTE, ThriftParser.DOUBLE, ThriftParser.I16, ThriftParser.I32, ThriftParser.I64, ThriftParser.I8, ThriftParser.SLIST, ThriftParser.STRING]:
                self.enterOuterAlt(localctx, 1)
                self.state = 295
                self.baseType()
                pass
            elif token in [ThriftParser.LIST, ThriftParser.MAP, ThriftParser.SET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 296
                self.containerType()
                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 BaseTypeContext(ParserRuleContext):

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

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

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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return ThriftParser.RULE_baseType

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

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

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




    def baseType(self):

        localctx = ThriftParser.BaseTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_baseType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.BINARY) | (1 << ThriftParser.BOOL) | (1 << ThriftParser.BYTE) | (1 << ThriftParser.DOUBLE) | (1 << ThriftParser.I16) | (1 << ThriftParser.I32) | (1 << ThriftParser.I64) | (1 << ThriftParser.I8) | (1 << ThriftParser.SLIST) | (1 << ThriftParser.STRING))) != 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 ContainerTypeContext(ParserRuleContext):

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

        def mapType(self):
            return self.getTypedRuleContext(ThriftParser.MapTypeContext,0)


        def setType(self):
            return self.getTypedRuleContext(ThriftParser.SetTypeContext,0)


        def listType(self):
            return self.getTypedRuleContext(ThriftParser.ListTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_containerType

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

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

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




    def containerType(self):

        localctx = ThriftParser.ContainerTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_containerType)
        try:
            self.state = 304
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.MAP]:
                self.enterOuterAlt(localctx, 1)
                self.state = 301
                self.mapType()
                pass
            elif token in [ThriftParser.SET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 302
                self.setType()
                pass
            elif token in [ThriftParser.LIST]:
                self.enterOuterAlt(localctx, 3)
                self.state = 303
                self.listType()
                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 MapTypeContext(ParserRuleContext):

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

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

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


        def cppType(self):
            return self.getTypedRuleContext(ThriftParser.CppTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_mapType

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

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

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




    def mapType(self):

        localctx = ThriftParser.MapTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_mapType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 306
            self.match(ThriftParser.MAP)
            self.state = 308
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.CPP_TYPE:
                self.state = 307
                self.cppType()


            self.state = 310
            self.match(ThriftParser.T__7)
            self.state = 311
            self.fieldType()
            self.state = 312
            self.match(ThriftParser.T__8)
            self.state = 313
            self.fieldType()
            self.state = 314
            self.match(ThriftParser.T__9)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SetTypeContext(ParserRuleContext):

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

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

        def fieldType(self):
            return self.getTypedRuleContext(ThriftParser.FieldTypeContext,0)


        def cppType(self):
            return self.getTypedRuleContext(ThriftParser.CppTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_setType

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

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

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




    def setType(self):

        localctx = ThriftParser.SetTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_setType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 316
            self.match(ThriftParser.SET)
            self.state = 318
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.CPP_TYPE:
                self.state = 317
                self.cppType()


            self.state = 320
            self.match(ThriftParser.T__7)
            self.state = 321
            self.fieldType()
            self.state = 322
            self.match(ThriftParser.T__9)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ListTypeContext(ParserRuleContext):

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

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

        def fieldType(self):
            return self.getTypedRuleContext(ThriftParser.FieldTypeContext,0)


        def cppType(self):
            return self.getTypedRuleContext(ThriftParser.CppTypeContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_listType

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

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

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




    def listType(self):

        localctx = ThriftParser.ListTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_listType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 324
            self.match(ThriftParser.LIST)
            self.state = 325
            self.match(ThriftParser.T__7)
            self.state = 326
            self.fieldType()
            self.state = 327
            self.match(ThriftParser.T__9)
            self.state = 329
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.CPP_TYPE:
                self.state = 328
                self.cppType()


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


    class CppTypeContext(ParserRuleContext):

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

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

        def literal(self):
            return self.getTypedRuleContext(ThriftParser.LiteralContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_cppType

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

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

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




    def cppType(self):

        localctx = ThriftParser.CppTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_cppType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 331
            self.match(ThriftParser.CPP_TYPE)
            self.state = 332
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConstValueContext(ParserRuleContext):

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

        def intConstant(self):
            return self.getTypedRuleContext(ThriftParser.IntConstantContext,0)


        def doubleConstant(self):
            return self.getTypedRuleContext(ThriftParser.DoubleConstantContext,0)


        def literal(self):
            return self.getTypedRuleContext(ThriftParser.LiteralContext,0)


        def identifier(self):
            return self.getTypedRuleContext(ThriftParser.IdentifierContext,0)


        def constList(self):
            return self.getTypedRuleContext(ThriftParser.ConstListContext,0)


        def constMap(self):
            return self.getTypedRuleContext(ThriftParser.ConstMapContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_constValue

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

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

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




    def constValue(self):

        localctx = ThriftParser.ConstValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_constValue)
        try:
            self.state = 340
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,37,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 334
                self.intConstant()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 335
                self.doubleConstant()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 336
                self.literal()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 337
                self.identifier()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 338
                self.constList()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 339
                self.constMap()
                pass


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


    class IntConstantContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ThriftParser.RULE_intConstant

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

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

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




    def intConstant(self):

        localctx = ThriftParser.IntConstantContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_intConstant)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 343
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__10 or _la==ThriftParser.T__11:
                self.state = 342
                _la = self._input.LA(1)
                if not(_la==ThriftParser.T__10 or _la==ThriftParser.T__11):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 346 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 345
                    self.match(ThriftParser.DIGIT)

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

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


    class DoubleConstantContext(ParserRuleContext):

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

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

        def intConstant(self):
            return self.getTypedRuleContext(ThriftParser.IntConstantContext,0)


        def getRuleIndex(self):
            return ThriftParser.RULE_doubleConstant

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

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

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




    def doubleConstant(self):

        localctx = ThriftParser.DoubleConstantContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_doubleConstant)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 351
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__10 or _la==ThriftParser.T__11:
                self.state = 350
                _la = self._input.LA(1)
                if not(_la==ThriftParser.T__10 or _la==ThriftParser.T__11):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 354 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 353
                    self.match(ThriftParser.DIGIT)

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

            self.state = 364
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__12:
                self.state = 358
                self.match(ThriftParser.T__12)
                self.state = 360 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 359
                        self.match(ThriftParser.DIGIT)

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



            self.state = 368
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ThriftParser.T__13 or _la==ThriftParser.T__14:
                self.state = 366
                _la = self._input.LA(1)
                if not(_la==ThriftParser.T__13 or _la==ThriftParser.T__14):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 367
                self.intConstant()


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


    class ConstListContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return ThriftParser.RULE_constList

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

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

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




    def constList(self):

        localctx = ThriftParser.ConstListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_constList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            self.match(ThriftParser.T__15)
            self.state = 377
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__2) | (1 << ThriftParser.T__10) | (1 << ThriftParser.T__11) | (1 << ThriftParser.T__15) | (1 << ThriftParser.T__17) | (1 << ThriftParser.T__18))) != 0) or _la==ThriftParser.IDENTIFIER or _la==ThriftParser.DIGIT:
                self.state = 371
                self.constValue()
                self.state = 373
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                    self.state = 372
                    self.listSeparator()


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

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


    class ConstMapContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return ThriftParser.RULE_constMap

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

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

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




    def constMap(self):

        localctx = ThriftParser.ConstMapContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_constMap)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            self.match(ThriftParser.T__2)
            self.state = 391
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__2) | (1 << ThriftParser.T__10) | (1 << ThriftParser.T__11) | (1 << ThriftParser.T__15) | (1 << ThriftParser.T__17) | (1 << ThriftParser.T__18))) != 0) or _la==ThriftParser.IDENTIFIER or _la==ThriftParser.DIGIT:
                self.state = 383
                self.constValue()
                self.state = 384
                self.match(ThriftParser.T__4)
                self.state = 385
                self.constValue()
                self.state = 387
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ThriftParser.T__8 or _la==ThriftParser.T__19:
                    self.state = 386
                    self.listSeparator()


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

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


    class LiteralContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ThriftParser.RULE_literal

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

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

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




    def literal(self):

        localctx = ThriftParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_literal)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 412
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ThriftParser.T__17]:
                self.state = 396
                self.match(ThriftParser.T__17)
                self.state = 400
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__0) | (1 << ThriftParser.T__1) | (1 << ThriftParser.T__2) | (1 << ThriftParser.T__3) | (1 << ThriftParser.T__4) | (1 << ThriftParser.T__5) | (1 << ThriftParser.T__6) | (1 << ThriftParser.T__7) | (1 << ThriftParser.T__8) | (1 << ThriftParser.T__9) | (1 << ThriftParser.T__10) | (1 << ThriftParser.T__11) | (1 << ThriftParser.T__12) | (1 << ThriftParser.T__13) | (1 << ThriftParser.T__14) | (1 << ThriftParser.T__15) | (1 << ThriftParser.T__16) | (1 << ThriftParser.T__18) | (1 << ThriftParser.T__19) | (1 << ThriftParser.BINARY) | (1 << ThriftParser.BOOL) | (1 << ThriftParser.BYTE) | (1 << ThriftParser.C_GLIB) | (1 << ThriftParser.CONST) | (1 << ThriftParser.CPP) | (1 << ThriftParser.CPP_INCLUDE) | (1 << ThriftParser.CPP_TYPE) | (1 << ThriftParser.CSHARP) | (1 << ThriftParser.DELPHI) | (1 << ThriftParser.DOUBLE) | (1 << ThriftParser.ENUM) | (1 << ThriftParser.EXCEPTION) | (1 << ThriftParser.EXTENDS) | (1 << ThriftParser.GO) | (1 << ThriftParser.I16) | (1 << ThriftParser.I32) | (1 << ThriftParser.I64) | (1 << ThriftParser.I8) | (1 << ThriftParser.INCLUDE) | (1 << ThriftParser.JAVA) | (1 << ThriftParser.JS) | (1 << ThriftParser.LIST) | (1 << ThriftParser.LUA) | (1 << ThriftParser.MAP) | (1 << ThriftParser.NAMESPACE) | (1 << ThriftParser.NETCORE) | (1 << ThriftParser.ONEWAY) | (1 << ThriftParser.OPTIONAL) | (1 << ThriftParser.PERL) | (1 << ThriftParser.PHP) | (1 << ThriftParser.PY) | (1 << ThriftParser.PY_TWISTED) | (1 << ThriftParser.RB) | (1 << ThriftParser.REQUIRED) | (1 << ThriftParser.SENUM) | (1 << ThriftParser.SERVICE) | (1 << ThriftParser.SET) | (1 << ThriftParser.SLIST) | (1 << ThriftParser.ST) | (1 << ThriftParser.STRING) | (1 << ThriftParser.STRUCT) | (1 << ThriftParser.THROWS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (ThriftParser.TYPEDEF - 64)) | (1 << (ThriftParser.UNION - 64)) | (1 << (ThriftParser.VOID - 64)) | (1 << (ThriftParser.XSD - 64)) | (1 << (ThriftParser.XSD_ALL - 64)) | (1 << (ThriftParser.XSD_ATTRS - 64)) | (1 << (ThriftParser.XSD_NILLABLE - 64)) | (1 << (ThriftParser.XSD_OPTIONAL - 64)) | (1 << (ThriftParser.IDENTIFIER - 64)) | (1 << (ThriftParser.DIGIT - 64)) | (1 << (ThriftParser.WS - 64)) | (1 << (ThriftParser.COMMENT - 64)) | (1 << (ThriftParser.LINE_COMMENT - 64)))) != 0):
                    self.state = 397
                    _la = self._input.LA(1)
                    if _la <= 0 or _la==ThriftParser.T__17:
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 402
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 403
                self.match(ThriftParser.T__17)
                pass
            elif token in [ThriftParser.T__18]:
                self.state = 404
                self.match(ThriftParser.T__18)
                self.state = 408
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ThriftParser.T__0) | (1 << ThriftParser.T__1) | (1 << ThriftParser.T__2) | (1 << ThriftParser.T__3) | (1 << ThriftParser.T__4) | (1 << ThriftParser.T__5) | (1 << ThriftParser.T__6) | (1 << ThriftParser.T__7) | (1 << ThriftParser.T__8) | (1 << ThriftParser.T__9) | (1 << ThriftParser.T__10) | (1 << ThriftParser.T__11) | (1 << ThriftParser.T__12) | (1 << ThriftParser.T__13) | (1 << ThriftParser.T__14) | (1 << ThriftParser.T__15) | (1 << ThriftParser.T__16) | (1 << ThriftParser.T__17) | (1 << ThriftParser.T__19) | (1 << ThriftParser.BINARY) | (1 << ThriftParser.BOOL) | (1 << ThriftParser.BYTE) | (1 << ThriftParser.C_GLIB) | (1 << ThriftParser.CONST) | (1 << ThriftParser.CPP) | (1 << ThriftParser.CPP_INCLUDE) | (1 << ThriftParser.CPP_TYPE) | (1 << ThriftParser.CSHARP) | (1 << ThriftParser.DELPHI) | (1 << ThriftParser.DOUBLE) | (1 << ThriftParser.ENUM) | (1 << ThriftParser.EXCEPTION) | (1 << ThriftParser.EXTENDS) | (1 << ThriftParser.GO) | (1 << ThriftParser.I16) | (1 << ThriftParser.I32) | (1 << ThriftParser.I64) | (1 << ThriftParser.I8) | (1 << ThriftParser.INCLUDE) | (1 << ThriftParser.JAVA) | (1 << ThriftParser.JS) | (1 << ThriftParser.LIST) | (1 << ThriftParser.LUA) | (1 << ThriftParser.MAP) | (1 << ThriftParser.NAMESPACE) | (1 << ThriftParser.NETCORE) | (1 << ThriftParser.ONEWAY) | (1 << ThriftParser.OPTIONAL) | (1 << ThriftParser.PERL) | (1 << ThriftParser.PHP) | (1 << ThriftParser.PY) | (1 << ThriftParser.PY_TWISTED) | (1 << ThriftParser.RB) | (1 << ThriftParser.REQUIRED) | (1 << ThriftParser.SENUM) | (1 << ThriftParser.SERVICE) | (1 << ThriftParser.SET) | (1 << ThriftParser.SLIST) | (1 << ThriftParser.ST) | (1 << ThriftParser.STRING) | (1 << ThriftParser.STRUCT) | (1 << ThriftParser.THROWS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (ThriftParser.TYPEDEF - 64)) | (1 << (ThriftParser.UNION - 64)) | (1 << (ThriftParser.VOID - 64)) | (1 << (ThriftParser.XSD - 64)) | (1 << (ThriftParser.XSD_ALL - 64)) | (1 << (ThriftParser.XSD_ATTRS - 64)) | (1 << (ThriftParser.XSD_NILLABLE - 64)) | (1 << (ThriftParser.XSD_OPTIONAL - 64)) | (1 << (ThriftParser.IDENTIFIER - 64)) | (1 << (ThriftParser.DIGIT - 64)) | (1 << (ThriftParser.WS - 64)) | (1 << (ThriftParser.COMMENT - 64)) | (1 << (ThriftParser.LINE_COMMENT - 64)))) != 0):
                    self.state = 405
                    _la = self._input.LA(1)
                    if _la <= 0 or _la==ThriftParser.T__18:
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 410
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 411
                self.match(ThriftParser.T__18)
                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 ListSeparatorContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ThriftParser.RULE_listSeparator

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

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

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




    def listSeparator(self):

        localctx = ThriftParser.ListSeparatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_listSeparator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 414
            _la = self._input.LA(1)
            if not(_la==ThriftParser.T__8 or _la==ThriftParser.T__19):
                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 IdentifierContext(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 getRuleIndex(self):
            return ThriftParser.RULE_identifier

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

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

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




    def identifier(self):

        localctx = ThriftParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_identifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 416
            self.match(ThriftParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx
