# flake8: noqa
# type: ignore
# Generated from Protobuf3.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\3=")
        buf.write("\u01d2\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\3\2\3\2\7\2e\n\2\f\2\16\2h\13")
        buf.write("\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\5\4")
        buf.write("v\n\4\3\5\3\5\5\5z\n\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7")
        buf.write("\3\7\3\7\3\7\3\7\5\7\u0088\n\7\3\7\3\7\3\b\3\b\3\b\3\b")
        buf.write("\3\b\5\b\u0091\n\b\3\b\3\b\3\b\5\b\u0096\n\b\7\b\u0098")
        buf.write("\n\b\f\b\16\b\u009b\13\b\3\t\3\t\7\t\u009f\n\t\f\t\16")
        buf.write("\t\u00a2\13\t\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3")
        buf.write("\13\5\13\u00ae\n\13\3\f\3\f\3\f\3\f\3\r\3\r\7\r\u00b6")
        buf.write("\n\r\f\r\16\r\u00b9\13\r\3\r\3\r\3\16\3\16\3\16\3\16\3")
        buf.write("\16\3\16\3\16\3\16\3\16\5\16\u00c6\n\16\3\17\3\17\3\17")
        buf.write("\3\17\3\20\3\20\3\20\3\20\7\20\u00d0\n\20\f\20\16\20\u00d3")
        buf.write("\13\20\3\20\3\20\3\21\3\21\3\21\5\21\u00da\n\21\3\21\3")
        buf.write("\21\3\21\3\21\3\21\7\21\u00e1\n\21\f\21\16\21\u00e4\13")
        buf.write("\21\3\21\3\21\5\21\u00e8\n\21\3\21\3\21\3\22\3\22\3\22")
        buf.write("\3\22\3\23\3\23\3\23\3\23\3\23\5\23\u00f5\n\23\3\23\3")
        buf.write("\23\3\24\3\24\3\24\3\24\3\24\3\24\7\24\u00ff\n\24\f\24")
        buf.write("\16\24\u0102\13\24\3\24\3\24\3\25\3\25\3\25\3\25\5\25")
        buf.write("\u010a\n\25\3\25\3\25\3\25\3\25\3\25\5\25\u0111\n\25\3")
        buf.write("\25\3\25\3\25\3\25\3\25\7\25\u0118\n\25\f\25\16\25\u011b")
        buf.write("\13\25\3\25\3\25\5\25\u011f\n\25\3\26\3\26\3\26\5\26\u0124")
        buf.write("\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u012b\n\27\f\27\16")
        buf.write("\27\u012e\13\27\3\30\3\30\3\30\3\30\5\30\u0134\n\30\3")
        buf.write("\31\3\31\3\31\7\31\u0139\n\31\f\31\16\31\u013c\13\31\3")
        buf.write("\32\3\32\5\32\u0140\n\32\3\33\3\33\3\34\3\34\3\35\5\35")
        buf.write("\u0147\n\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5")
        buf.write("\35\u0151\n\35\3\35\3\35\3\36\3\36\3\36\7\36\u0158\n\36")
        buf.write("\f\36\16\36\u015b\13\36\3\37\3\37\3\37\3\37\3 \3 \3 \3")
        buf.write(" \3 \7 \u0166\n \f \16 \u0169\13 \3 \3 \3!\3!\3!\3!\3")
        buf.write("!\3!\3!\3!\5!\u0175\n!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3")
        buf.write("\"\3\"\3\"\3\"\3\"\3\"\3\"\5\"\u0186\n\"\3\"\3\"\3#\3")
        buf.write("#\3$\3$\3%\3%\3%\7%\u0191\n%\f%\16%\u0194\13%\3&\3&\3")
        buf.write("\'\3\'\3(\3(\3)\3)\5)\u019e\n)\3*\3*\3+\3+\3,\3,\3-\3")
        buf.write("-\3.\5.\u01a9\n.\3.\3.\7.\u01ad\n.\f.\16.\u01b0\13.\3")
        buf.write(".\3.\3/\5/\u01b5\n/\3/\3/\5/\u01b9\n/\3/\7/\u01bc\n/\f")
        buf.write("/\16/\u01bf\13/\3/\3/\3\60\3\60\3\61\3\61\5\61\u01c7\n")
        buf.write("\61\3\61\3\61\5\61\u01cb\n\61\3\61\3\61\3\61\5\61\u01d0")
        buf.write("\n\61\3\61\2\2\62\2\4\6\b\n\f\16\20\22\24\26\30\32\34")
        buf.write("\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`\2\b\3\2")
        buf.write("\"#\4\2$$\64\64\b\2\22\24\27\31\33\34*-//\62\63\b\2\22")
        buf.write("\22\27\30\33\34*-//\62\63\b\2\26\26\36\36 !().\60\64\64")
        buf.write("\4\2\13\13\21\21\2\u01e0\2b\3\2\2\2\4k\3\2\2\2\6u\3\2")
        buf.write("\2\2\bw\3\2\2\2\n~\3\2\2\2\f\u0082\3\2\2\2\16\u0090\3")
        buf.write("\2\2\2\20\u009c\3\2\2\2\22\u00a5\3\2\2\2\24\u00ad\3\2")
        buf.write("\2\2\26\u00af\3\2\2\2\30\u00b3\3\2\2\2\32\u00c5\3\2\2")
        buf.write("\2\34\u00c7\3\2\2\2\36\u00cb\3\2\2\2 \u00d6\3\2\2\2\"")
        buf.write("\u00eb\3\2\2\2$\u00ef\3\2\2\2&\u00f8\3\2\2\2(\u0105\3")
        buf.write("\2\2\2*\u0120\3\2\2\2,\u0127\3\2\2\2.\u0133\3\2\2\2\60")
        buf.write("\u0135\3\2\2\2\62\u013f\3\2\2\2\64\u0141\3\2\2\2\66\u0143")
        buf.write("\3\2\2\28\u0146\3\2\2\2:\u0154\3\2\2\2<\u015c\3\2\2\2")
        buf.write(">\u0160\3\2\2\2@\u016c\3\2\2\2B\u0178\3\2\2\2D\u0189\3")
        buf.write("\2\2\2F\u018b\3\2\2\2H\u018d\3\2\2\2J\u0195\3\2\2\2L\u0197")
        buf.write("\3\2\2\2N\u0199\3\2\2\2P\u019d\3\2\2\2R\u019f\3\2\2\2")
        buf.write("T\u01a1\3\2\2\2V\u01a3\3\2\2\2X\u01a5\3\2\2\2Z\u01a8\3")
        buf.write("\2\2\2\\\u01b4\3\2\2\2^\u01c2\3\2\2\2`\u01cf\3\2\2\2b")
        buf.write("f\5\4\3\2ce\5\6\4\2dc\3\2\2\2eh\3\2\2\2fd\3\2\2\2fg\3")
        buf.write("\2\2\2gi\3\2\2\2hf\3\2\2\2ij\7\2\2\3j\3\3\2\2\2kl\7\60")
        buf.write("\2\2lm\7\3\2\2mn\t\2\2\2no\7\4\2\2o\5\3\2\2\2pv\5\b\5")
        buf.write("\2qv\5\n\6\2rv\5\f\7\2sv\5\24\13\2tv\5^\60\2up\3\2\2\2")
        buf.write("uq\3\2\2\2ur\3\2\2\2us\3\2\2\2ut\3\2\2\2v\7\3\2\2\2wy")
        buf.write("\7\32\2\2xz\t\3\2\2yx\3\2\2\2yz\3\2\2\2z{\3\2\2\2{|\7")
        buf.write("9\2\2|}\7\4\2\2}\t\3\2\2\2~\177\7!\2\2\177\u0080\5H%\2")
        buf.write("\u0080\u0081\7\4\2\2\u0081\13\3\2\2\2\u0082\u0083\7 \2")
        buf.write("\2\u0083\u0084\5\16\b\2\u0084\u0087\7\3\2\2\u0085\u0088")
        buf.write("\5`\61\2\u0086\u0088\5\20\t\2\u0087\u0085\3\2\2\2\u0087")
        buf.write("\u0086\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008a\7\4\2\2")
        buf.write("\u008a\r\3\2\2\2\u008b\u0091\7\65\2\2\u008c\u008d\7\5")
        buf.write("\2\2\u008d\u008e\5H%\2\u008e\u008f\7\6\2\2\u008f\u0091")
        buf.write("\3\2\2\2\u0090\u008b\3\2\2\2\u0090\u008c\3\2\2\2\u0091")
        buf.write("\u0099\3\2\2\2\u0092\u0095\7\7\2\2\u0093\u0096\7\65\2")
        buf.write("\2\u0094\u0096\5F$\2\u0095\u0093\3\2\2\2\u0095\u0094\3")
        buf.write("\2\2\2\u0096\u0098\3\2\2\2\u0097\u0092\3\2\2\2\u0098\u009b")
        buf.write("\3\2\2\2\u0099\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a")
        buf.write("\17\3\2\2\2\u009b\u0099\3\2\2\2\u009c\u00a0\7\b\2\2\u009d")
        buf.write("\u009f\5\22\n\2\u009e\u009d\3\2\2\2\u009f\u00a2\3\2\2")
        buf.write("\2\u00a0\u009e\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1\u00a3")
        buf.write("\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a3\u00a4\7\t\2\2\u00a4")
        buf.write("\21\3\2\2\2\u00a5\u00a6\5\16\b\2\u00a6\u00a7\7\n\2\2\u00a7")
        buf.write("\u00a8\5`\61\2\u00a8\23\3\2\2\2\u00a9\u00ae\5\26\f\2\u00aa")
        buf.write("\u00ae\5\34\17\2\u00ab\u00ae\5$\23\2\u00ac\u00ae\5&\24")
        buf.write("\2\u00ad\u00a9\3\2\2\2\u00ad\u00aa\3\2\2\2\u00ad\u00ab")
        buf.write("\3\2\2\2\u00ad\u00ac\3\2\2\2\u00ae\25\3\2\2\2\u00af\u00b0")
        buf.write("\7\36\2\2\u00b0\u00b1\5J&\2\u00b1\u00b2\5\30\r\2\u00b2")
        buf.write("\27\3\2\2\2\u00b3\u00b7\7\b\2\2\u00b4\u00b6\5\32\16\2")
        buf.write("\u00b5\u00b4\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7\u00b5\3")
        buf.write("\2\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00ba\3\2\2\2\u00b9\u00b7")
        buf.write("\3\2\2\2\u00ba\u00bb\7\t\2\2\u00bb\31\3\2\2\2\u00bc\u00c6")
        buf.write("\58\35\2\u00bd\u00c6\5\34\17\2\u00be\u00c6\5\26\f\2\u00bf")
        buf.write("\u00c6\5$\23\2\u00c0\u00c6\5\f\7\2\u00c1\u00c6\5> \2\u00c2")
        buf.write("\u00c6\5B\"\2\u00c3\u00c6\5*\26\2\u00c4\u00c6\5^\60\2")
        buf.write("\u00c5\u00bc\3\2\2\2\u00c5\u00bd\3\2\2\2\u00c5\u00be\3")
        buf.write("\2\2\2\u00c5\u00bf\3\2\2\2\u00c5\u00c0\3\2\2\2\u00c5\u00c1")
        buf.write("\3\2\2\2\u00c5\u00c2\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c5")
        buf.write("\u00c4\3\2\2\2\u00c6\33\3\2\2\2\u00c7\u00c8\7\25\2\2\u00c8")
        buf.write("\u00c9\5L\'\2\u00c9\u00ca\5\36\20\2\u00ca\35\3\2\2\2\u00cb")
        buf.write("\u00d1\7\b\2\2\u00cc\u00d0\5\f\7\2\u00cd\u00d0\5 \21\2")
        buf.write("\u00ce\u00d0\5^\60\2\u00cf\u00cc\3\2\2\2\u00cf\u00cd\3")
        buf.write("\2\2\2\u00cf\u00ce\3\2\2\2\u00d0\u00d3\3\2\2\2\u00d1\u00cf")
        buf.write("\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d4\3\2\2\2\u00d3")
        buf.write("\u00d1\3\2\2\2\u00d4\u00d5\7\t\2\2\u00d5\37\3\2\2\2\u00d6")
        buf.write("\u00d7\7\65\2\2\u00d7\u00d9\7\3\2\2\u00d8\u00da\7\13\2")
        buf.write("\2\u00d9\u00d8\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00db")
        buf.write("\3\2\2\2\u00db\u00e7\7\66\2\2\u00dc\u00dd\7\f\2\2\u00dd")
        buf.write("\u00e2\5\"\22\2\u00de\u00df\7\r\2\2\u00df\u00e1\5\"\22")
        buf.write("\2\u00e0\u00de\3\2\2\2\u00e1\u00e4\3\2\2\2\u00e2\u00e0")
        buf.write("\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\u00e5\3\2\2\2\u00e4")
        buf.write("\u00e2\3\2\2\2\u00e5\u00e6\7\16\2\2\u00e6\u00e8\3\2\2")
        buf.write("\2\u00e7\u00dc\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\u00e9")
        buf.write("\3\2\2\2\u00e9\u00ea\7\4\2\2\u00ea!\3\2\2\2\u00eb\u00ec")
        buf.write("\5\16\b\2\u00ec\u00ed\7\3\2\2\u00ed\u00ee\5`\61\2\u00ee")
        buf.write("#\3\2\2\2\u00ef\u00f0\7\26\2\2\u00f0\u00f1\5Z.\2\u00f1")
        buf.write("\u00f4\7\b\2\2\u00f2\u00f5\58\35\2\u00f3\u00f5\5^\60\2")
        buf.write("\u00f4\u00f2\3\2\2\2\u00f4\u00f3\3\2\2\2\u00f5\u00f6\3")
        buf.write("\2\2\2\u00f6\u00f7\7\t\2\2\u00f7%\3\2\2\2\u00f8\u00f9")
        buf.write("\7)\2\2\u00f9\u00fa\5V,\2\u00fa\u0100\7\b\2\2\u00fb\u00ff")
        buf.write("\5\f\7\2\u00fc\u00ff\5(\25\2\u00fd\u00ff\5^\60\2\u00fe")
        buf.write("\u00fb\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00fd\3\2\2\2")
        buf.write("\u00ff\u0102\3\2\2\2\u0100\u00fe\3\2\2\2\u0100\u0101\3")
        buf.write("\2\2\2\u0101\u0103\3\2\2\2\u0102\u0100\3\2\2\2\u0103\u0104")
        buf.write("\7\t\2\2\u0104\'\3\2\2\2\u0105\u0106\7(\2\2\u0106\u0107")
        buf.write("\5X-\2\u0107\u0109\7\5\2\2\u0108\u010a\7.\2\2\u0109\u0108")
        buf.write("\3\2\2\2\u0109\u010a\3\2\2\2\u010a\u010b\3\2\2\2\u010b")
        buf.write("\u010c\5Z.\2\u010c\u010d\7\6\2\2\u010d\u010e\7\'\2\2\u010e")
        buf.write("\u0110\7\5\2\2\u010f\u0111\7.\2\2\u0110\u010f\3\2\2\2")
        buf.write("\u0110\u0111\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0113\5")
        buf.write("Z.\2\u0113\u011e\7\6\2\2\u0114\u0119\7\b\2\2\u0115\u0118")
        buf.write("\5\f\7\2\u0116\u0118\5^\60\2\u0117\u0115\3\2\2\2\u0117")
        buf.write("\u0116\3\2\2\2\u0118\u011b\3\2\2\2\u0119\u0117\3\2\2\2")
        buf.write("\u0119\u011a\3\2\2\2\u011a\u011c\3\2\2\2\u011b\u0119\3")
        buf.write("\2\2\2\u011c\u011f\7\t\2\2\u011d\u011f\7\4\2\2\u011e\u0114")
        buf.write("\3\2\2\2\u011e\u011d\3\2\2\2\u011f)\3\2\2\2\u0120\u0123")
        buf.write("\7&\2\2\u0121\u0124\5,\27\2\u0122\u0124\5\60\31\2\u0123")
        buf.write("\u0121\3\2\2\2\u0123\u0122\3\2\2\2\u0124\u0125\3\2\2\2")
        buf.write("\u0125\u0126\7\4\2\2\u0126+\3\2\2\2\u0127\u012c\5.\30")
        buf.write("\2\u0128\u0129\7\r\2\2\u0129\u012b\5.\30\2\u012a\u0128")
        buf.write("\3\2\2\2\u012b\u012e\3\2\2\2\u012c\u012a\3\2\2\2\u012c")
        buf.write("\u012d\3\2\2\2\u012d-\3\2\2\2\u012e\u012c\3\2\2\2\u012f")
        buf.write("\u0134\7\66\2\2\u0130\u0131\7\66\2\2\u0131\u0132\7\61")
        buf.write("\2\2\u0132\u0134\7\66\2\2\u0133\u012f\3\2\2\2\u0133\u0130")
        buf.write("\3\2\2\2\u0134/\3\2\2\2\u0135\u013a\79\2\2\u0136\u0137")
        buf.write("\7\r\2\2\u0137\u0139\79\2\2\u0138\u0136\3\2\2\2\u0139")
        buf.write("\u013c\3\2\2\2\u013a\u0138\3\2\2\2\u013a\u013b\3\2\2\2")
        buf.write("\u013b\61\3\2\2\2\u013c\u013a\3\2\2\2\u013d\u0140\5\64")
        buf.write("\33\2\u013e\u0140\5\\/\2\u013f\u013d\3\2\2\2\u013f\u013e")
        buf.write("\3\2\2\2\u0140\63\3\2\2\2\u0141\u0142\t\4\2\2\u0142\65")
        buf.write("\3\2\2\2\u0143\u0144\7\66\2\2\u0144\67\3\2\2\2\u0145\u0147")
        buf.write("\7%\2\2\u0146\u0145\3\2\2\2\u0146\u0147\3\2\2\2\u0147")
        buf.write("\u0148\3\2\2\2\u0148\u0149\5\62\32\2\u0149\u014a\5P)\2")
        buf.write("\u014a\u014b\7\3\2\2\u014b\u0150\5\66\34\2\u014c\u014d")
        buf.write("\7\f\2\2\u014d\u014e\5:\36\2\u014e\u014f\7\16\2\2\u014f")
        buf.write("\u0151\3\2\2\2\u0150\u014c\3\2\2\2\u0150\u0151\3\2\2\2")
        buf.write("\u0151\u0152\3\2\2\2\u0152\u0153\7\4\2\2\u01539\3\2\2")
        buf.write("\2\u0154\u0159\5<\37\2\u0155\u0156\7\r\2\2\u0156\u0158")
        buf.write("\5<\37\2\u0157\u0155\3\2\2\2\u0158\u015b\3\2\2\2\u0159")
        buf.write("\u0157\3\2\2\2\u0159\u015a\3\2\2\2\u015a;\3\2\2\2\u015b")
        buf.write("\u0159\3\2\2\2\u015c\u015d\5\16\b\2\u015d\u015e\7\3\2")
        buf.write("\2\u015e\u015f\5`\61\2\u015f=\3\2\2\2\u0160\u0161\7\37")
        buf.write("\2\2\u0161\u0162\5R*\2\u0162\u0167\7\b\2\2\u0163\u0166")
        buf.write("\5@!\2\u0164\u0166\5^\60\2\u0165\u0163\3\2\2\2\u0165\u0164")
        buf.write("\3\2\2\2\u0166\u0169\3\2\2\2\u0167\u0165\3\2\2\2\u0167")
        buf.write("\u0168\3\2\2\2\u0168\u016a\3\2\2\2\u0169\u0167\3\2\2\2")
        buf.write("\u016a\u016b\7\t\2\2\u016b?\3\2\2\2\u016c\u016d\5\62\32")
        buf.write("\2\u016d\u016e\5P)\2\u016e\u016f\7\3\2\2\u016f\u0174\5")
        buf.write("\66\34\2\u0170\u0171\7\f\2\2\u0171\u0172\5:\36\2\u0172")
        buf.write("\u0173\7\16\2\2\u0173\u0175\3\2\2\2\u0174\u0170\3\2\2")
        buf.write("\2\u0174\u0175\3\2\2\2\u0175\u0176\3\2\2\2\u0176\u0177")
        buf.write("\7\4\2\2\u0177A\3\2\2\2\u0178\u0179\7\35\2\2\u0179\u017a")
        buf.write("\7\17\2\2\u017a\u017b\5D#\2\u017b\u017c\7\r\2\2\u017c")
        buf.write("\u017d\5\62\32\2\u017d\u017e\7\20\2\2\u017e\u017f\5T+")
        buf.write("\2\u017f\u0180\7\3\2\2\u0180\u0185\5\66\34\2\u0181\u0182")
        buf.write("\7\f\2\2\u0182\u0183\5:\36\2\u0183\u0184\7\16\2\2\u0184")
        buf.write("\u0186\3\2\2\2\u0185\u0181\3\2\2\2\u0185\u0186\3\2\2\2")
        buf.write("\u0186\u0187\3\2\2\2\u0187\u0188\7\4\2\2\u0188C\3\2\2")
        buf.write("\2\u0189\u018a\t\5\2\2\u018aE\3\2\2\2\u018b\u018c\t\6")
        buf.write("\2\2\u018cG\3\2\2\2\u018d\u0192\7\65\2\2\u018e\u018f\7")
        buf.write("\7\2\2\u018f\u0191\7\65\2\2\u0190\u018e\3\2\2\2\u0191")
        buf.write("\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2")
        buf.write("\u0193I\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7\65\2")
        buf.write("\2\u0196K\3\2\2\2\u0197\u0198\7\65\2\2\u0198M\3\2\2\2")
        buf.write("\u0199\u019a\7\65\2\2\u019aO\3\2\2\2\u019b\u019e\7\65")
        buf.write("\2\2\u019c\u019e\5F$\2\u019d\u019b\3\2\2\2\u019d\u019c")
        buf.write("\3\2\2\2\u019eQ\3\2\2\2\u019f\u01a0\7\65\2\2\u01a0S\3")
        buf.write("\2\2\2\u01a1\u01a2\7\65\2\2\u01a2U\3\2\2\2\u01a3\u01a4")
        buf.write("\7\65\2\2\u01a4W\3\2\2\2\u01a5\u01a6\7\65\2\2\u01a6Y\3")
        buf.write("\2\2\2\u01a7\u01a9\7\7\2\2\u01a8\u01a7\3\2\2\2\u01a8\u01a9")
        buf.write("\3\2\2\2\u01a9\u01ae\3\2\2\2\u01aa\u01ab\7\65\2\2\u01ab")
        buf.write("\u01ad\7\7\2\2\u01ac\u01aa\3\2\2\2\u01ad\u01b0\3\2\2\2")
        buf.write("\u01ae\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b1\3")
        buf.write("\2\2\2\u01b0\u01ae\3\2\2\2\u01b1\u01b2\5J&\2\u01b2[\3")
        buf.write("\2\2\2\u01b3\u01b5\7\7\2\2\u01b4\u01b3\3\2\2\2\u01b4\u01b5")
        buf.write("\3\2\2\2\u01b5\u01bd\3\2\2\2\u01b6\u01b9\7\65\2\2\u01b7")
        buf.write("\u01b9\5F$\2\u01b8\u01b6\3\2\2\2\u01b8\u01b7\3\2\2\2\u01b9")
        buf.write("\u01ba\3\2\2\2\u01ba\u01bc\7\7\2\2\u01bb\u01b8\3\2\2\2")
        buf.write("\u01bc\u01bf\3\2\2\2\u01bd\u01bb\3\2\2\2\u01bd\u01be\3")
        buf.write("\2\2\2\u01be\u01c0\3\2\2\2\u01bf\u01bd\3\2\2\2\u01c0\u01c1")
        buf.write("\5N(\2\u01c1]\3\2\2\2\u01c2\u01c3\7\4\2\2\u01c3_\3\2\2")
        buf.write("\2\u01c4\u01d0\5H%\2\u01c5\u01c7\t\7\2\2\u01c6\u01c5\3")
        buf.write("\2\2\2\u01c6\u01c7\3\2\2\2\u01c7\u01c8\3\2\2\2\u01c8\u01d0")
        buf.write("\7\66\2\2\u01c9\u01cb\t\7\2\2\u01ca\u01c9\3\2\2\2\u01ca")
        buf.write("\u01cb\3\2\2\2\u01cb\u01cc\3\2\2\2\u01cc\u01d0\7\67\2")
        buf.write("\2\u01cd\u01d0\79\2\2\u01ce\u01d0\78\2\2\u01cf\u01c4\3")
        buf.write("\2\2\2\u01cf\u01c6\3\2\2\2\u01cf\u01ca\3\2\2\2\u01cf\u01cd")
        buf.write("\3\2\2\2\u01cf\u01ce\3\2\2\2\u01d0a\3\2\2\2\60fuy\u0087")
        buf.write("\u0090\u0095\u0099\u00a0\u00ad\u00b7\u00c5\u00cf\u00d1")
        buf.write("\u00d9\u00e2\u00e7\u00f4\u00fe\u0100\u0109\u0110\u0117")
        buf.write("\u0119\u011e\u0123\u012c\u0133\u013a\u013f\u0146\u0150")
        buf.write("\u0159\u0165\u0167\u0174\u0185\u0192\u019d\u01a8\u01ae")
        buf.write("\u01b4\u01b8\u01bd\u01c6\u01ca\u01cf")
        return buf.getvalue()


class Protobuf3Parser ( Parser ):

    grammarFileName = "Protobuf3.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'='", "';'", "'('", "')'", "'.'", "'{'", 
                     "'}'", "':'", "'-'", "'['", "','", "']'", "'<'", "'>'", 
                     "'+'", "'bool'", "'bytes'", "'double'", "'enum'", "'extend'", 
                     "'fixed32'", "'fixed64'", "'float'", "'import'", "'int32'", 
                     "'int64'", "'map'", "'message'", "'oneof'", "'option'", 
                     "'package'", "'\"proto3\"'", "''proto3''", "'public'", 
                     "'repeated'", "'reserved'", "'returns'", "'rpc'", "'service'", 
                     "'sfixed32'", "'sfixed64'", "'sint32'", "'sint64'", 
                     "'stream'", "'string'", "'syntax'", "'to'", "'uint32'", 
                     "'uint64'", "'weak'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "BOOL", "BYTES", "DOUBLE", "ENUM", "EXTEND", "FIXED32", 
                      "FIXED64", "FLOAT", "IMPORT", "INT32", "INT64", "MAP", 
                      "MESSAGE", "ONEOF", "OPTION", "PACKAGE", "PROTO3_DOUBLE", 
                      "PROTO3_SINGLE", "PUBLIC", "REPEATED", "RESERVED", 
                      "RETURNS", "RPC", "SERVICE", "SFIXED32", "SFIXED64", 
                      "SINT32", "SINT64", "STREAM", "STRING", "SYNTAX", 
                      "TO", "UINT32", "UINT64", "WEAK", "IDENT", "INT_LIT", 
                      "FLOAT_LIT", "BOOL_LIT", "STR_LIT", "QUOTE", "WS", 
                      "COMMENT", "LINE_COMMENT" ]

    RULE_proto = 0
    RULE_syntax = 1
    RULE_syntaxExtra = 2
    RULE_importStatement = 3
    RULE_packageStatement = 4
    RULE_option = 5
    RULE_optionName = 6
    RULE_optionBody = 7
    RULE_optionBodyVariable = 8
    RULE_topLevelDef = 9
    RULE_message = 10
    RULE_messageBody = 11
    RULE_messageBodyContent = 12
    RULE_enumDefinition = 13
    RULE_enumBody = 14
    RULE_enumField = 15
    RULE_enumValueOption = 16
    RULE_extend = 17
    RULE_service = 18
    RULE_rpc = 19
    RULE_reserved = 20
    RULE_ranges = 21
    RULE_rangeRule = 22
    RULE_fieldNames = 23
    RULE_typeRule = 24
    RULE_simpleType = 25
    RULE_fieldNumber = 26
    RULE_field = 27
    RULE_fieldOptions = 28
    RULE_fieldOption = 29
    RULE_oneof = 30
    RULE_oneofField = 31
    RULE_mapField = 32
    RULE_keyType = 33
    RULE_reservedWord = 34
    RULE_fullIdent = 35
    RULE_messageName = 36
    RULE_enumName = 37
    RULE_messageOrEnumName = 38
    RULE_fieldName = 39
    RULE_oneofName = 40
    RULE_mapName = 41
    RULE_serviceName = 42
    RULE_rpcName = 43
    RULE_messageType = 44
    RULE_messageOrEnumType = 45
    RULE_emptyStatement = 46
    RULE_constant = 47

    ruleNames =  [ "proto", "syntax", "syntaxExtra", "importStatement", 
                   "packageStatement", "option", "optionName", "optionBody", 
                   "optionBodyVariable", "topLevelDef", "message", "messageBody", 
                   "messageBodyContent", "enumDefinition", "enumBody", "enumField", 
                   "enumValueOption", "extend", "service", "rpc", "reserved", 
                   "ranges", "rangeRule", "fieldNames", "typeRule", "simpleType", 
                   "fieldNumber", "field", "fieldOptions", "fieldOption", 
                   "oneof", "oneofField", "mapField", "keyType", "reservedWord", 
                   "fullIdent", "messageName", "enumName", "messageOrEnumName", 
                   "fieldName", "oneofName", "mapName", "serviceName", "rpcName", 
                   "messageType", "messageOrEnumType", "emptyStatement", 
                   "constant" ]

    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
    BOOL=16
    BYTES=17
    DOUBLE=18
    ENUM=19
    EXTEND=20
    FIXED32=21
    FIXED64=22
    FLOAT=23
    IMPORT=24
    INT32=25
    INT64=26
    MAP=27
    MESSAGE=28
    ONEOF=29
    OPTION=30
    PACKAGE=31
    PROTO3_DOUBLE=32
    PROTO3_SINGLE=33
    PUBLIC=34
    REPEATED=35
    RESERVED=36
    RETURNS=37
    RPC=38
    SERVICE=39
    SFIXED32=40
    SFIXED64=41
    SINT32=42
    SINT64=43
    STREAM=44
    STRING=45
    SYNTAX=46
    TO=47
    UINT32=48
    UINT64=49
    WEAK=50
    IDENT=51
    INT_LIT=52
    FLOAT_LIT=53
    BOOL_LIT=54
    STR_LIT=55
    QUOTE=56
    WS=57
    COMMENT=58
    LINE_COMMENT=59

    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 ProtoContext(ParserRuleContext):

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

        def syntax(self):
            return self.getTypedRuleContext(Protobuf3Parser.SyntaxContext,0)


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

        def syntaxExtra(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.SyntaxExtraContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.SyntaxExtraContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_proto

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

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

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




    def proto(self):

        localctx = Protobuf3Parser.ProtoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_proto)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 96
            self.syntax()
            self.state = 100
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.T__1) | (1 << Protobuf3Parser.ENUM) | (1 << Protobuf3Parser.EXTEND) | (1 << Protobuf3Parser.IMPORT) | (1 << Protobuf3Parser.MESSAGE) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.PACKAGE) | (1 << Protobuf3Parser.SERVICE))) != 0):
                self.state = 97
                self.syntaxExtra()
                self.state = 102
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class SyntaxContext(ParserRuleContext):

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

        def SYNTAX(self):
            return self.getToken(Protobuf3Parser.SYNTAX, 0)

        def PROTO3_DOUBLE(self):
            return self.getToken(Protobuf3Parser.PROTO3_DOUBLE, 0)

        def PROTO3_SINGLE(self):
            return self.getToken(Protobuf3Parser.PROTO3_SINGLE, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_syntax

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

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

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




    def syntax(self):

        localctx = Protobuf3Parser.SyntaxContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_syntax)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 105
            self.match(Protobuf3Parser.SYNTAX)
            self.state = 106
            self.match(Protobuf3Parser.T__0)
            self.state = 107
            _la = self._input.LA(1)
            if not(_la==Protobuf3Parser.PROTO3_DOUBLE or _la==Protobuf3Parser.PROTO3_SINGLE):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 108
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SyntaxExtraContext(ParserRuleContext):

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

        def importStatement(self):
            return self.getTypedRuleContext(Protobuf3Parser.ImportStatementContext,0)


        def packageStatement(self):
            return self.getTypedRuleContext(Protobuf3Parser.PackageStatementContext,0)


        def option(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionContext,0)


        def topLevelDef(self):
            return self.getTypedRuleContext(Protobuf3Parser.TopLevelDefContext,0)


        def emptyStatement(self):
            return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_syntaxExtra

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

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

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




    def syntaxExtra(self):

        localctx = Protobuf3Parser.SyntaxExtraContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_syntaxExtra)
        try:
            self.state = 115
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.IMPORT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 110
                self.importStatement()
                pass
            elif token in [Protobuf3Parser.PACKAGE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 111
                self.packageStatement()
                pass
            elif token in [Protobuf3Parser.OPTION]:
                self.enterOuterAlt(localctx, 3)
                self.state = 112
                self.option()
                pass
            elif token in [Protobuf3Parser.ENUM, Protobuf3Parser.EXTEND, Protobuf3Parser.MESSAGE, Protobuf3Parser.SERVICE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 113
                self.topLevelDef()
                pass
            elif token in [Protobuf3Parser.T__1]:
                self.enterOuterAlt(localctx, 5)
                self.state = 114
                self.emptyStatement()
                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 ImportStatementContext(ParserRuleContext):

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

        def IMPORT(self):
            return self.getToken(Protobuf3Parser.IMPORT, 0)

        def STR_LIT(self):
            return self.getToken(Protobuf3Parser.STR_LIT, 0)

        def WEAK(self):
            return self.getToken(Protobuf3Parser.WEAK, 0)

        def PUBLIC(self):
            return self.getToken(Protobuf3Parser.PUBLIC, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_importStatement

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

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

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




    def importStatement(self):

        localctx = Protobuf3Parser.ImportStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_importStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 117
            self.match(Protobuf3Parser.IMPORT)
            self.state = 119
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.PUBLIC or _la==Protobuf3Parser.WEAK:
                self.state = 118
                _la = self._input.LA(1)
                if not(_la==Protobuf3Parser.PUBLIC or _la==Protobuf3Parser.WEAK):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 121
            self.match(Protobuf3Parser.STR_LIT)
            self.state = 122
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PackageStatementContext(ParserRuleContext):

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

        def PACKAGE(self):
            return self.getToken(Protobuf3Parser.PACKAGE, 0)

        def fullIdent(self):
            return self.getTypedRuleContext(Protobuf3Parser.FullIdentContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_packageStatement

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

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

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




    def packageStatement(self):

        localctx = Protobuf3Parser.PackageStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_packageStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 124
            self.match(Protobuf3Parser.PACKAGE)
            self.state = 125
            self.fullIdent()
            self.state = 126
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OptionContext(ParserRuleContext):

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

        def OPTION(self):
            return self.getToken(Protobuf3Parser.OPTION, 0)

        def optionName(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionNameContext,0)


        def constant(self):
            return self.getTypedRuleContext(Protobuf3Parser.ConstantContext,0)


        def optionBody(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionBodyContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_option

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

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

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




    def option(self):

        localctx = Protobuf3Parser.OptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_option)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 128
            self.match(Protobuf3Parser.OPTION)
            self.state = 129
            self.optionName()
            self.state = 130
            self.match(Protobuf3Parser.T__0)
            self.state = 133
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.T__8, Protobuf3Parser.T__14, Protobuf3Parser.IDENT, Protobuf3Parser.INT_LIT, Protobuf3Parser.FLOAT_LIT, Protobuf3Parser.BOOL_LIT, Protobuf3Parser.STR_LIT]:
                self.state = 131
                self.constant()
                pass
            elif token in [Protobuf3Parser.T__5]:
                self.state = 132
                self.optionBody()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 135
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OptionNameContext(ParserRuleContext):

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

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

        def fullIdent(self):
            return self.getTypedRuleContext(Protobuf3Parser.FullIdentContext,0)


        def reservedWord(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.ReservedWordContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.ReservedWordContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_optionName

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

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

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




    def optionName(self):

        localctx = Protobuf3Parser.OptionNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_optionName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 142
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.IDENT]:
                self.state = 137
                self.match(Protobuf3Parser.IDENT)
                pass
            elif token in [Protobuf3Parser.T__2]:
                self.state = 138
                self.match(Protobuf3Parser.T__2)
                self.state = 139
                self.fullIdent()
                self.state = 140
                self.match(Protobuf3Parser.T__3)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 151
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__4:
                self.state = 144
                self.match(Protobuf3Parser.T__4)
                self.state = 147
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [Protobuf3Parser.IDENT]:
                    self.state = 145
                    self.match(Protobuf3Parser.IDENT)
                    pass
                elif token in [Protobuf3Parser.EXTEND, Protobuf3Parser.MESSAGE, Protobuf3Parser.OPTION, Protobuf3Parser.PACKAGE, Protobuf3Parser.RPC, Protobuf3Parser.SERVICE, Protobuf3Parser.STREAM, Protobuf3Parser.STRING, Protobuf3Parser.SYNTAX, Protobuf3Parser.WEAK]:
                    self.state = 146
                    self.reservedWord()
                    pass
                else:
                    raise NoViableAltException(self)

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

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


    class OptionBodyContext(ParserRuleContext):

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

        def optionBodyVariable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.OptionBodyVariableContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.OptionBodyVariableContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_optionBody

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

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

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




    def optionBody(self):

        localctx = Protobuf3Parser.OptionBodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_optionBody)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 154
            self.match(Protobuf3Parser.T__5)
            self.state = 158
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__2 or _la==Protobuf3Parser.IDENT:
                self.state = 155
                self.optionBodyVariable()
                self.state = 160
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 161
            self.match(Protobuf3Parser.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 OptionBodyVariableContext(ParserRuleContext):

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

        def optionName(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionNameContext,0)


        def constant(self):
            return self.getTypedRuleContext(Protobuf3Parser.ConstantContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_optionBodyVariable

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

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

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




    def optionBodyVariable(self):

        localctx = Protobuf3Parser.OptionBodyVariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_optionBodyVariable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 163
            self.optionName()
            self.state = 164
            self.match(Protobuf3Parser.T__7)
            self.state = 165
            self.constant()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TopLevelDefContext(ParserRuleContext):

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

        def message(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageContext,0)


        def enumDefinition(self):
            return self.getTypedRuleContext(Protobuf3Parser.EnumDefinitionContext,0)


        def extend(self):
            return self.getTypedRuleContext(Protobuf3Parser.ExtendContext,0)


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


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_topLevelDef

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

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

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




    def topLevelDef(self):

        localctx = Protobuf3Parser.TopLevelDefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_topLevelDef)
        try:
            self.state = 171
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.MESSAGE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 167
                self.message()
                pass
            elif token in [Protobuf3Parser.ENUM]:
                self.enterOuterAlt(localctx, 2)
                self.state = 168
                self.enumDefinition()
                pass
            elif token in [Protobuf3Parser.EXTEND]:
                self.enterOuterAlt(localctx, 3)
                self.state = 169
                self.extend()
                pass
            elif token in [Protobuf3Parser.SERVICE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 170
                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 MessageContext(ParserRuleContext):

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

        def MESSAGE(self):
            return self.getToken(Protobuf3Parser.MESSAGE, 0)

        def messageName(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageNameContext,0)


        def messageBody(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageBodyContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_message

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

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

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




    def message(self):

        localctx = Protobuf3Parser.MessageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_message)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 173
            self.match(Protobuf3Parser.MESSAGE)
            self.state = 174
            self.messageName()
            self.state = 175
            self.messageBody()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MessageBodyContext(ParserRuleContext):

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

        def messageBodyContent(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.MessageBodyContentContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.MessageBodyContentContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageBody

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

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

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




    def messageBody(self):

        localctx = Protobuf3Parser.MessageBodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_messageBody)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 177
            self.match(Protobuf3Parser.T__5)
            self.state = 181
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.T__1) | (1 << Protobuf3Parser.T__4) | (1 << Protobuf3Parser.BOOL) | (1 << Protobuf3Parser.BYTES) | (1 << Protobuf3Parser.DOUBLE) | (1 << Protobuf3Parser.ENUM) | (1 << Protobuf3Parser.EXTEND) | (1 << Protobuf3Parser.FIXED32) | (1 << Protobuf3Parser.FIXED64) | (1 << Protobuf3Parser.FLOAT) | (1 << Protobuf3Parser.INT32) | (1 << Protobuf3Parser.INT64) | (1 << Protobuf3Parser.MAP) | (1 << Protobuf3Parser.MESSAGE) | (1 << Protobuf3Parser.ONEOF) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.PACKAGE) | (1 << Protobuf3Parser.REPEATED) | (1 << Protobuf3Parser.RESERVED) | (1 << Protobuf3Parser.RPC) | (1 << Protobuf3Parser.SERVICE) | (1 << Protobuf3Parser.SFIXED32) | (1 << Protobuf3Parser.SFIXED64) | (1 << Protobuf3Parser.SINT32) | (1 << Protobuf3Parser.SINT64) | (1 << Protobuf3Parser.STREAM) | (1 << Protobuf3Parser.STRING) | (1 << Protobuf3Parser.SYNTAX) | (1 << Protobuf3Parser.UINT32) | (1 << Protobuf3Parser.UINT64) | (1 << Protobuf3Parser.WEAK) | (1 << Protobuf3Parser.IDENT))) != 0):
                self.state = 178
                self.messageBodyContent()
                self.state = 183
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 184
            self.match(Protobuf3Parser.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 MessageBodyContentContext(ParserRuleContext):

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

        def field(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldContext,0)


        def enumDefinition(self):
            return self.getTypedRuleContext(Protobuf3Parser.EnumDefinitionContext,0)


        def message(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageContext,0)


        def extend(self):
            return self.getTypedRuleContext(Protobuf3Parser.ExtendContext,0)


        def option(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionContext,0)


        def oneof(self):
            return self.getTypedRuleContext(Protobuf3Parser.OneofContext,0)


        def mapField(self):
            return self.getTypedRuleContext(Protobuf3Parser.MapFieldContext,0)


        def reserved(self):
            return self.getTypedRuleContext(Protobuf3Parser.ReservedContext,0)


        def emptyStatement(self):
            return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageBodyContent

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

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

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




    def messageBodyContent(self):

        localctx = Protobuf3Parser.MessageBodyContentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_messageBodyContent)
        try:
            self.state = 195
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 186
                self.field()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 187
                self.enumDefinition()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 188
                self.message()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 189
                self.extend()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 190
                self.option()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 191
                self.oneof()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 192
                self.mapField()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 193
                self.reserved()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 194
                self.emptyStatement()
                pass


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


    class EnumDefinitionContext(ParserRuleContext):

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

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

        def enumName(self):
            return self.getTypedRuleContext(Protobuf3Parser.EnumNameContext,0)


        def enumBody(self):
            return self.getTypedRuleContext(Protobuf3Parser.EnumBodyContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_enumDefinition

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

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

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




    def enumDefinition(self):

        localctx = Protobuf3Parser.EnumDefinitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_enumDefinition)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 197
            self.match(Protobuf3Parser.ENUM)
            self.state = 198
            self.enumName()
            self.state = 199
            self.enumBody()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumBodyContext(ParserRuleContext):

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

        def option(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.OptionContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.OptionContext,i)


        def enumField(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EnumFieldContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EnumFieldContext,i)


        def emptyStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EmptyStatementContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_enumBody

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

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

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




    def enumBody(self):

        localctx = Protobuf3Parser.EnumBodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_enumBody)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 201
            self.match(Protobuf3Parser.T__5)
            self.state = 207
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.T__1) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.IDENT))) != 0):
                self.state = 205
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [Protobuf3Parser.OPTION]:
                    self.state = 202
                    self.option()
                    pass
                elif token in [Protobuf3Parser.IDENT]:
                    self.state = 203
                    self.enumField()
                    pass
                elif token in [Protobuf3Parser.T__1]:
                    self.state = 204
                    self.emptyStatement()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 210
            self.match(Protobuf3Parser.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 EnumFieldContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def INT_LIT(self):
            return self.getToken(Protobuf3Parser.INT_LIT, 0)

        def enumValueOption(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EnumValueOptionContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EnumValueOptionContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_enumField

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

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

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




    def enumField(self):

        localctx = Protobuf3Parser.EnumFieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_enumField)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 212
            self.match(Protobuf3Parser.IDENT)
            self.state = 213
            self.match(Protobuf3Parser.T__0)
            self.state = 215
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__8:
                self.state = 214
                self.match(Protobuf3Parser.T__8)


            self.state = 217
            self.match(Protobuf3Parser.INT_LIT)
            self.state = 229
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__9:
                self.state = 218
                self.match(Protobuf3Parser.T__9)
                self.state = 219
                self.enumValueOption()
                self.state = 224
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==Protobuf3Parser.T__10:
                    self.state = 220
                    self.match(Protobuf3Parser.T__10)
                    self.state = 221
                    self.enumValueOption()
                    self.state = 226
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 227
                self.match(Protobuf3Parser.T__11)


            self.state = 231
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumValueOptionContext(ParserRuleContext):

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

        def optionName(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionNameContext,0)


        def constant(self):
            return self.getTypedRuleContext(Protobuf3Parser.ConstantContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_enumValueOption

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

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

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




    def enumValueOption(self):

        localctx = Protobuf3Parser.EnumValueOptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_enumValueOption)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 233
            self.optionName()
            self.state = 234
            self.match(Protobuf3Parser.T__0)
            self.state = 235
            self.constant()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExtendContext(ParserRuleContext):

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

        def EXTEND(self):
            return self.getToken(Protobuf3Parser.EXTEND, 0)

        def messageType(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageTypeContext,0)


        def field(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldContext,0)


        def emptyStatement(self):
            return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_extend

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

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

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




    def extend(self):

        localctx = Protobuf3Parser.ExtendContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_extend)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 237
            self.match(Protobuf3Parser.EXTEND)
            self.state = 238
            self.messageType()
            self.state = 239
            self.match(Protobuf3Parser.T__5)
            self.state = 242
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.T__4, Protobuf3Parser.BOOL, Protobuf3Parser.BYTES, Protobuf3Parser.DOUBLE, Protobuf3Parser.EXTEND, Protobuf3Parser.FIXED32, Protobuf3Parser.FIXED64, Protobuf3Parser.FLOAT, Protobuf3Parser.INT32, Protobuf3Parser.INT64, Protobuf3Parser.MESSAGE, Protobuf3Parser.OPTION, Protobuf3Parser.PACKAGE, Protobuf3Parser.REPEATED, Protobuf3Parser.RPC, Protobuf3Parser.SERVICE, Protobuf3Parser.SFIXED32, Protobuf3Parser.SFIXED64, Protobuf3Parser.SINT32, Protobuf3Parser.SINT64, Protobuf3Parser.STREAM, Protobuf3Parser.STRING, Protobuf3Parser.SYNTAX, Protobuf3Parser.UINT32, Protobuf3Parser.UINT64, Protobuf3Parser.WEAK, Protobuf3Parser.IDENT]:
                self.state = 240
                self.field()
                pass
            elif token in [Protobuf3Parser.T__1]:
                self.state = 241
                self.emptyStatement()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 244
            self.match(Protobuf3Parser.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 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(Protobuf3Parser.SERVICE, 0)

        def serviceName(self):
            return self.getTypedRuleContext(Protobuf3Parser.ServiceNameContext,0)


        def option(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.OptionContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.OptionContext,i)


        def rpc(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.RpcContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.RpcContext,i)


        def emptyStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EmptyStatementContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.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 = Protobuf3Parser.ServiceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_service)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 246
            self.match(Protobuf3Parser.SERVICE)
            self.state = 247
            self.serviceName()
            self.state = 248
            self.match(Protobuf3Parser.T__5)
            self.state = 254
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.T__1) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.RPC))) != 0):
                self.state = 252
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [Protobuf3Parser.OPTION]:
                    self.state = 249
                    self.option()
                    pass
                elif token in [Protobuf3Parser.RPC]:
                    self.state = 250
                    self.rpc()
                    pass
                elif token in [Protobuf3Parser.T__1]:
                    self.state = 251
                    self.emptyStatement()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 257
            self.match(Protobuf3Parser.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 RpcContext(ParserRuleContext):

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

        def RPC(self):
            return self.getToken(Protobuf3Parser.RPC, 0)

        def rpcName(self):
            return self.getTypedRuleContext(Protobuf3Parser.RpcNameContext,0)


        def messageType(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.MessageTypeContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.MessageTypeContext,i)


        def RETURNS(self):
            return self.getToken(Protobuf3Parser.RETURNS, 0)

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

        def option(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.OptionContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.OptionContext,i)


        def emptyStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EmptyStatementContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_rpc

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

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

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




    def rpc(self):

        localctx = Protobuf3Parser.RpcContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_rpc)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 259
            self.match(Protobuf3Parser.RPC)
            self.state = 260
            self.rpcName()
            self.state = 261
            self.match(Protobuf3Parser.T__2)
            self.state = 263
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.STREAM:
                self.state = 262
                self.match(Protobuf3Parser.STREAM)


            self.state = 265
            self.messageType()
            self.state = 266
            self.match(Protobuf3Parser.T__3)
            self.state = 267
            self.match(Protobuf3Parser.RETURNS)
            self.state = 268
            self.match(Protobuf3Parser.T__2)
            self.state = 270
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.STREAM:
                self.state = 269
                self.match(Protobuf3Parser.STREAM)


            self.state = 272
            self.messageType()
            self.state = 273
            self.match(Protobuf3Parser.T__3)
            self.state = 284
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.T__5]:
                self.state = 274
                self.match(Protobuf3Parser.T__5)
                self.state = 279
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==Protobuf3Parser.T__1 or _la==Protobuf3Parser.OPTION:
                    self.state = 277
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [Protobuf3Parser.OPTION]:
                        self.state = 275
                        self.option()
                        pass
                    elif token in [Protobuf3Parser.T__1]:
                        self.state = 276
                        self.emptyStatement()
                        pass
                    else:
                        raise NoViableAltException(self)

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

                self.state = 282
                self.match(Protobuf3Parser.T__6)
                pass
            elif token in [Protobuf3Parser.T__1]:
                self.state = 283
                self.match(Protobuf3Parser.T__1)
                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 ReservedContext(ParserRuleContext):

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

        def RESERVED(self):
            return self.getToken(Protobuf3Parser.RESERVED, 0)

        def ranges(self):
            return self.getTypedRuleContext(Protobuf3Parser.RangesContext,0)


        def fieldNames(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNamesContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_reserved

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

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

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




    def reserved(self):

        localctx = Protobuf3Parser.ReservedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_reserved)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 286
            self.match(Protobuf3Parser.RESERVED)
            self.state = 289
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.INT_LIT]:
                self.state = 287
                self.ranges()
                pass
            elif token in [Protobuf3Parser.STR_LIT]:
                self.state = 288
                self.fieldNames()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 291
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RangesContext(ParserRuleContext):

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

        def rangeRule(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.RangeRuleContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.RangeRuleContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_ranges

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

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

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




    def ranges(self):

        localctx = Protobuf3Parser.RangesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_ranges)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            self.rangeRule()
            self.state = 298
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__10:
                self.state = 294
                self.match(Protobuf3Parser.T__10)
                self.state = 295
                self.rangeRule()
                self.state = 300
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class RangeRuleContext(ParserRuleContext):

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

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

        def TO(self):
            return self.getToken(Protobuf3Parser.TO, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_rangeRule

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

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

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




    def rangeRule(self):

        localctx = Protobuf3Parser.RangeRuleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_rangeRule)
        try:
            self.state = 305
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 301
                self.match(Protobuf3Parser.INT_LIT)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 302
                self.match(Protobuf3Parser.INT_LIT)
                self.state = 303
                self.match(Protobuf3Parser.TO)
                self.state = 304
                self.match(Protobuf3Parser.INT_LIT)
                pass


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


    class FieldNamesContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fieldNames

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

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

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




    def fieldNames(self):

        localctx = Protobuf3Parser.FieldNamesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_fieldNames)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 307
            self.match(Protobuf3Parser.STR_LIT)
            self.state = 312
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__10:
                self.state = 308
                self.match(Protobuf3Parser.T__10)
                self.state = 309
                self.match(Protobuf3Parser.STR_LIT)
                self.state = 314
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class TypeRuleContext(ParserRuleContext):

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

        def simpleType(self):
            return self.getTypedRuleContext(Protobuf3Parser.SimpleTypeContext,0)


        def messageOrEnumType(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageOrEnumTypeContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_typeRule

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

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

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




    def typeRule(self):

        localctx = Protobuf3Parser.TypeRuleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_typeRule)
        try:
            self.state = 317
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,28,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 315
                self.simpleType()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 316
                self.messageOrEnumType()
                pass


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


    class SimpleTypeContext(ParserRuleContext):

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

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

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

        def INT32(self):
            return self.getToken(Protobuf3Parser.INT32, 0)

        def INT64(self):
            return self.getToken(Protobuf3Parser.INT64, 0)

        def UINT32(self):
            return self.getToken(Protobuf3Parser.UINT32, 0)

        def UINT64(self):
            return self.getToken(Protobuf3Parser.UINT64, 0)

        def SINT32(self):
            return self.getToken(Protobuf3Parser.SINT32, 0)

        def SINT64(self):
            return self.getToken(Protobuf3Parser.SINT64, 0)

        def FIXED32(self):
            return self.getToken(Protobuf3Parser.FIXED32, 0)

        def FIXED64(self):
            return self.getToken(Protobuf3Parser.FIXED64, 0)

        def SFIXED32(self):
            return self.getToken(Protobuf3Parser.SFIXED32, 0)

        def SFIXED64(self):
            return self.getToken(Protobuf3Parser.SFIXED64, 0)

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

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

        def BYTES(self):
            return self.getToken(Protobuf3Parser.BYTES, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_simpleType

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

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

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




    def simpleType(self):

        localctx = Protobuf3Parser.SimpleTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_simpleType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 319
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.BOOL) | (1 << Protobuf3Parser.BYTES) | (1 << Protobuf3Parser.DOUBLE) | (1 << Protobuf3Parser.FIXED32) | (1 << Protobuf3Parser.FIXED64) | (1 << Protobuf3Parser.FLOAT) | (1 << Protobuf3Parser.INT32) | (1 << Protobuf3Parser.INT64) | (1 << Protobuf3Parser.SFIXED32) | (1 << Protobuf3Parser.SFIXED64) | (1 << Protobuf3Parser.SINT32) | (1 << Protobuf3Parser.SINT64) | (1 << Protobuf3Parser.STRING) | (1 << Protobuf3Parser.UINT32) | (1 << Protobuf3Parser.UINT64))) != 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 FieldNumberContext(ParserRuleContext):

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

        def INT_LIT(self):
            return self.getToken(Protobuf3Parser.INT_LIT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fieldNumber

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

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

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




    def fieldNumber(self):

        localctx = Protobuf3Parser.FieldNumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_fieldNumber)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 321
            self.match(Protobuf3Parser.INT_LIT)
        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 typeRule(self):
            return self.getTypedRuleContext(Protobuf3Parser.TypeRuleContext,0)


        def fieldName(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNameContext,0)


        def fieldNumber(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNumberContext,0)


        def REPEATED(self):
            return self.getToken(Protobuf3Parser.REPEATED, 0)

        def fieldOptions(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldOptionsContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.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 = Protobuf3Parser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_field)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 324
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.REPEATED:
                self.state = 323
                self.match(Protobuf3Parser.REPEATED)


            self.state = 326
            self.typeRule()
            self.state = 327
            self.fieldName()
            self.state = 328
            self.match(Protobuf3Parser.T__0)
            self.state = 329
            self.fieldNumber()
            self.state = 334
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__9:
                self.state = 330
                self.match(Protobuf3Parser.T__9)
                self.state = 331
                self.fieldOptions()
                self.state = 332
                self.match(Protobuf3Parser.T__11)


            self.state = 336
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FieldOptionsContext(ParserRuleContext):

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

        def fieldOption(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.FieldOptionContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.FieldOptionContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fieldOptions

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

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

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




    def fieldOptions(self):

        localctx = Protobuf3Parser.FieldOptionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_fieldOptions)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 338
            self.fieldOption()
            self.state = 343
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__10:
                self.state = 339
                self.match(Protobuf3Parser.T__10)
                self.state = 340
                self.fieldOption()
                self.state = 345
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class FieldOptionContext(ParserRuleContext):

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

        def optionName(self):
            return self.getTypedRuleContext(Protobuf3Parser.OptionNameContext,0)


        def constant(self):
            return self.getTypedRuleContext(Protobuf3Parser.ConstantContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fieldOption

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

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

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




    def fieldOption(self):

        localctx = Protobuf3Parser.FieldOptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_fieldOption)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 346
            self.optionName()
            self.state = 347
            self.match(Protobuf3Parser.T__0)
            self.state = 348
            self.constant()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OneofContext(ParserRuleContext):

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

        def ONEOF(self):
            return self.getToken(Protobuf3Parser.ONEOF, 0)

        def oneofName(self):
            return self.getTypedRuleContext(Protobuf3Parser.OneofNameContext,0)


        def oneofField(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.OneofFieldContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.OneofFieldContext,i)


        def emptyStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.EmptyStatementContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.EmptyStatementContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_oneof

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

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

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




    def oneof(self):

        localctx = Protobuf3Parser.OneofContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_oneof)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 350
            self.match(Protobuf3Parser.ONEOF)
            self.state = 351
            self.oneofName()
            self.state = 352
            self.match(Protobuf3Parser.T__5)
            self.state = 357
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.T__1) | (1 << Protobuf3Parser.T__4) | (1 << Protobuf3Parser.BOOL) | (1 << Protobuf3Parser.BYTES) | (1 << Protobuf3Parser.DOUBLE) | (1 << Protobuf3Parser.EXTEND) | (1 << Protobuf3Parser.FIXED32) | (1 << Protobuf3Parser.FIXED64) | (1 << Protobuf3Parser.FLOAT) | (1 << Protobuf3Parser.INT32) | (1 << Protobuf3Parser.INT64) | (1 << Protobuf3Parser.MESSAGE) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.PACKAGE) | (1 << Protobuf3Parser.RPC) | (1 << Protobuf3Parser.SERVICE) | (1 << Protobuf3Parser.SFIXED32) | (1 << Protobuf3Parser.SFIXED64) | (1 << Protobuf3Parser.SINT32) | (1 << Protobuf3Parser.SINT64) | (1 << Protobuf3Parser.STREAM) | (1 << Protobuf3Parser.STRING) | (1 << Protobuf3Parser.SYNTAX) | (1 << Protobuf3Parser.UINT32) | (1 << Protobuf3Parser.UINT64) | (1 << Protobuf3Parser.WEAK) | (1 << Protobuf3Parser.IDENT))) != 0):
                self.state = 355
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [Protobuf3Parser.T__4, Protobuf3Parser.BOOL, Protobuf3Parser.BYTES, Protobuf3Parser.DOUBLE, Protobuf3Parser.EXTEND, Protobuf3Parser.FIXED32, Protobuf3Parser.FIXED64, Protobuf3Parser.FLOAT, Protobuf3Parser.INT32, Protobuf3Parser.INT64, Protobuf3Parser.MESSAGE, Protobuf3Parser.OPTION, Protobuf3Parser.PACKAGE, Protobuf3Parser.RPC, Protobuf3Parser.SERVICE, Protobuf3Parser.SFIXED32, Protobuf3Parser.SFIXED64, Protobuf3Parser.SINT32, Protobuf3Parser.SINT64, Protobuf3Parser.STREAM, Protobuf3Parser.STRING, Protobuf3Parser.SYNTAX, Protobuf3Parser.UINT32, Protobuf3Parser.UINT64, Protobuf3Parser.WEAK, Protobuf3Parser.IDENT]:
                    self.state = 353
                    self.oneofField()
                    pass
                elif token in [Protobuf3Parser.T__1]:
                    self.state = 354
                    self.emptyStatement()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 360
            self.match(Protobuf3Parser.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 OneofFieldContext(ParserRuleContext):

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

        def typeRule(self):
            return self.getTypedRuleContext(Protobuf3Parser.TypeRuleContext,0)


        def fieldName(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNameContext,0)


        def fieldNumber(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNumberContext,0)


        def fieldOptions(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldOptionsContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_oneofField

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

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

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




    def oneofField(self):

        localctx = Protobuf3Parser.OneofFieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_oneofField)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.typeRule()
            self.state = 363
            self.fieldName()
            self.state = 364
            self.match(Protobuf3Parser.T__0)
            self.state = 365
            self.fieldNumber()
            self.state = 370
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__9:
                self.state = 366
                self.match(Protobuf3Parser.T__9)
                self.state = 367
                self.fieldOptions()
                self.state = 368
                self.match(Protobuf3Parser.T__11)


            self.state = 372
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MapFieldContext(ParserRuleContext):

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

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

        def keyType(self):
            return self.getTypedRuleContext(Protobuf3Parser.KeyTypeContext,0)


        def typeRule(self):
            return self.getTypedRuleContext(Protobuf3Parser.TypeRuleContext,0)


        def mapName(self):
            return self.getTypedRuleContext(Protobuf3Parser.MapNameContext,0)


        def fieldNumber(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldNumberContext,0)


        def fieldOptions(self):
            return self.getTypedRuleContext(Protobuf3Parser.FieldOptionsContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_mapField

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

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

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




    def mapField(self):

        localctx = Protobuf3Parser.MapFieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_mapField)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 374
            self.match(Protobuf3Parser.MAP)
            self.state = 375
            self.match(Protobuf3Parser.T__12)
            self.state = 376
            self.keyType()
            self.state = 377
            self.match(Protobuf3Parser.T__10)
            self.state = 378
            self.typeRule()
            self.state = 379
            self.match(Protobuf3Parser.T__13)
            self.state = 380
            self.mapName()
            self.state = 381
            self.match(Protobuf3Parser.T__0)
            self.state = 382
            self.fieldNumber()
            self.state = 387
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__9:
                self.state = 383
                self.match(Protobuf3Parser.T__9)
                self.state = 384
                self.fieldOptions()
                self.state = 385
                self.match(Protobuf3Parser.T__11)


            self.state = 389
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeyTypeContext(ParserRuleContext):

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

        def INT32(self):
            return self.getToken(Protobuf3Parser.INT32, 0)

        def INT64(self):
            return self.getToken(Protobuf3Parser.INT64, 0)

        def UINT32(self):
            return self.getToken(Protobuf3Parser.UINT32, 0)

        def UINT64(self):
            return self.getToken(Protobuf3Parser.UINT64, 0)

        def SINT32(self):
            return self.getToken(Protobuf3Parser.SINT32, 0)

        def SINT64(self):
            return self.getToken(Protobuf3Parser.SINT64, 0)

        def FIXED32(self):
            return self.getToken(Protobuf3Parser.FIXED32, 0)

        def FIXED64(self):
            return self.getToken(Protobuf3Parser.FIXED64, 0)

        def SFIXED32(self):
            return self.getToken(Protobuf3Parser.SFIXED32, 0)

        def SFIXED64(self):
            return self.getToken(Protobuf3Parser.SFIXED64, 0)

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

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

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_keyType

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

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

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




    def keyType(self):

        localctx = Protobuf3Parser.KeyTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_keyType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 391
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.BOOL) | (1 << Protobuf3Parser.FIXED32) | (1 << Protobuf3Parser.FIXED64) | (1 << Protobuf3Parser.INT32) | (1 << Protobuf3Parser.INT64) | (1 << Protobuf3Parser.SFIXED32) | (1 << Protobuf3Parser.SFIXED64) | (1 << Protobuf3Parser.SINT32) | (1 << Protobuf3Parser.SINT64) | (1 << Protobuf3Parser.STRING) | (1 << Protobuf3Parser.UINT32) | (1 << Protobuf3Parser.UINT64))) != 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 ReservedWordContext(ParserRuleContext):

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

        def EXTEND(self):
            return self.getToken(Protobuf3Parser.EXTEND, 0)

        def MESSAGE(self):
            return self.getToken(Protobuf3Parser.MESSAGE, 0)

        def OPTION(self):
            return self.getToken(Protobuf3Parser.OPTION, 0)

        def PACKAGE(self):
            return self.getToken(Protobuf3Parser.PACKAGE, 0)

        def RPC(self):
            return self.getToken(Protobuf3Parser.RPC, 0)

        def SERVICE(self):
            return self.getToken(Protobuf3Parser.SERVICE, 0)

        def STREAM(self):
            return self.getToken(Protobuf3Parser.STREAM, 0)

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

        def SYNTAX(self):
            return self.getToken(Protobuf3Parser.SYNTAX, 0)

        def WEAK(self):
            return self.getToken(Protobuf3Parser.WEAK, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_reservedWord

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

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

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




    def reservedWord(self):

        localctx = Protobuf3Parser.ReservedWordContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_reservedWord)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 393
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << Protobuf3Parser.EXTEND) | (1 << Protobuf3Parser.MESSAGE) | (1 << Protobuf3Parser.OPTION) | (1 << Protobuf3Parser.PACKAGE) | (1 << Protobuf3Parser.RPC) | (1 << Protobuf3Parser.SERVICE) | (1 << Protobuf3Parser.STREAM) | (1 << Protobuf3Parser.STRING) | (1 << Protobuf3Parser.SYNTAX) | (1 << Protobuf3Parser.WEAK))) != 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 FullIdentContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fullIdent

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

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

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




    def fullIdent(self):

        localctx = Protobuf3Parser.FullIdentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_fullIdent)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 395
            self.match(Protobuf3Parser.IDENT)
            self.state = 400
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==Protobuf3Parser.T__4:
                self.state = 396
                self.match(Protobuf3Parser.T__4)
                self.state = 397
                self.match(Protobuf3Parser.IDENT)
                self.state = 402
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class MessageNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageName

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

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

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




    def messageName(self):

        localctx = Protobuf3Parser.MessageNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_messageName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 403
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_enumName

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

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

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




    def enumName(self):

        localctx = Protobuf3Parser.EnumNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_enumName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 405
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MessageOrEnumNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageOrEnumName

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

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

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




    def messageOrEnumName(self):

        localctx = Protobuf3Parser.MessageOrEnumNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_messageOrEnumName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 407
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FieldNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def reservedWord(self):
            return self.getTypedRuleContext(Protobuf3Parser.ReservedWordContext,0)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_fieldName

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

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

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




    def fieldName(self):

        localctx = Protobuf3Parser.FieldNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_fieldName)
        try:
            self.state = 411
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [Protobuf3Parser.IDENT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 409
                self.match(Protobuf3Parser.IDENT)
                pass
            elif token in [Protobuf3Parser.EXTEND, Protobuf3Parser.MESSAGE, Protobuf3Parser.OPTION, Protobuf3Parser.PACKAGE, Protobuf3Parser.RPC, Protobuf3Parser.SERVICE, Protobuf3Parser.STREAM, Protobuf3Parser.STRING, Protobuf3Parser.SYNTAX, Protobuf3Parser.WEAK]:
                self.enterOuterAlt(localctx, 2)
                self.state = 410
                self.reservedWord()
                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 OneofNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_oneofName

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

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

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




    def oneofName(self):

        localctx = Protobuf3Parser.OneofNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_oneofName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 413
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MapNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_mapName

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

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

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




    def mapName(self):

        localctx = Protobuf3Parser.MapNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_mapName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 415
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ServiceNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_serviceName

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

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

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




    def serviceName(self):

        localctx = Protobuf3Parser.ServiceNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_serviceName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 417
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RpcNameContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(Protobuf3Parser.IDENT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_rpcName

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

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

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




    def rpcName(self):

        localctx = Protobuf3Parser.RpcNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_rpcName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 419
            self.match(Protobuf3Parser.IDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MessageTypeContext(ParserRuleContext):

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

        def messageName(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageNameContext,0)


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

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageType

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

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

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




    def messageType(self):

        localctx = Protobuf3Parser.MessageTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_messageType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 422
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__4:
                self.state = 421
                self.match(Protobuf3Parser.T__4)


            self.state = 428
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,39,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 424
                    self.match(Protobuf3Parser.IDENT)
                    self.state = 425
                    self.match(Protobuf3Parser.T__4) 
                self.state = 430
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,39,self._ctx)

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


    class MessageOrEnumTypeContext(ParserRuleContext):

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

        def messageOrEnumName(self):
            return self.getTypedRuleContext(Protobuf3Parser.MessageOrEnumNameContext,0)


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

        def reservedWord(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Protobuf3Parser.ReservedWordContext)
            else:
                return self.getTypedRuleContext(Protobuf3Parser.ReservedWordContext,i)


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_messageOrEnumType

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

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

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




    def messageOrEnumType(self):

        localctx = Protobuf3Parser.MessageOrEnumTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_messageOrEnumType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==Protobuf3Parser.T__4:
                self.state = 433
                self.match(Protobuf3Parser.T__4)


            self.state = 443
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,42,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 438
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [Protobuf3Parser.IDENT]:
                        self.state = 436
                        self.match(Protobuf3Parser.IDENT)
                        pass
                    elif token in [Protobuf3Parser.EXTEND, Protobuf3Parser.MESSAGE, Protobuf3Parser.OPTION, Protobuf3Parser.PACKAGE, Protobuf3Parser.RPC, Protobuf3Parser.SERVICE, Protobuf3Parser.STREAM, Protobuf3Parser.STRING, Protobuf3Parser.SYNTAX, Protobuf3Parser.WEAK]:
                        self.state = 437
                        self.reservedWord()
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 440
                    self.match(Protobuf3Parser.T__4) 
                self.state = 445
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,42,self._ctx)

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


    class EmptyStatementContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return Protobuf3Parser.RULE_emptyStatement

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

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

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




    def emptyStatement(self):

        localctx = Protobuf3Parser.EmptyStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_emptyStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.match(Protobuf3Parser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConstantContext(ParserRuleContext):

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

        def fullIdent(self):
            return self.getTypedRuleContext(Protobuf3Parser.FullIdentContext,0)


        def INT_LIT(self):
            return self.getToken(Protobuf3Parser.INT_LIT, 0)

        def FLOAT_LIT(self):
            return self.getToken(Protobuf3Parser.FLOAT_LIT, 0)

        def STR_LIT(self):
            return self.getToken(Protobuf3Parser.STR_LIT, 0)

        def BOOL_LIT(self):
            return self.getToken(Protobuf3Parser.BOOL_LIT, 0)

        def getRuleIndex(self):
            return Protobuf3Parser.RULE_constant

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

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

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




    def constant(self):

        localctx = Protobuf3Parser.ConstantContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_constant)
        self._la = 0 # Token type
        try:
            self.state = 461
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 450
                self.fullIdent()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 452
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==Protobuf3Parser.T__8 or _la==Protobuf3Parser.T__14:
                    self.state = 451
                    _la = self._input.LA(1)
                    if not(_la==Protobuf3Parser.T__8 or _la==Protobuf3Parser.T__14):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                self.state = 454
                self.match(Protobuf3Parser.INT_LIT)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 456
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==Protobuf3Parser.T__8 or _la==Protobuf3Parser.T__14:
                    self.state = 455
                    _la = self._input.LA(1)
                    if not(_la==Protobuf3Parser.T__8 or _la==Protobuf3Parser.T__14):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                self.state = 458
                self.match(Protobuf3Parser.FLOAT_LIT)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 459
                self.match(Protobuf3Parser.STR_LIT)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 460
                self.match(Protobuf3Parser.BOOL_LIT)
                pass


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