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

def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3+")
        buf.write("\u0152\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\3\2\3\2\7\2;\n\2\f")
        buf.write("\2\16\2>\13\2\3\3\3\3\7\3B\n\3\f\3\16\3E\13\3\3\4\3\4")
        buf.write("\3\4\3\4\5\4K\n\4\3\5\5\5N\n\5\3\5\7\5Q\n\5\f\5\16\5T")
        buf.write("\13\5\3\5\3\5\3\5\3\5\5\5Z\n\5\3\6\3\6\3\6\5\6_\n\6\3")
        buf.write("\7\5\7b\n\7\3\7\7\7e\n\7\f\7\16\7h\13\7\3\7\3\7\3\7\3")
        buf.write("\7\5\7n\n\7\3\7\3\7\7\7r\n\7\f\7\16\7u\13\7\3\7\3\7\5")
        buf.write("\7y\n\7\3\b\3\b\3\b\5\b~\n\b\3\t\5\t\u0081\n\t\3\t\7\t")
        buf.write("\u0084\n\t\f\t\16\t\u0087\13\t\3\t\3\t\5\t\u008b\n\t\3")
        buf.write("\t\3\t\3\t\7\t\u0090\n\t\f\t\16\t\u0093\13\t\3\t\3\t\5")
        buf.write("\t\u0097\n\t\3\t\5\t\u009a\n\t\3\n\3\n\3\13\5\13\u009f")
        buf.write("\n\13\3\13\7\13\u00a2\n\13\f\13\16\13\u00a5\13\13\3\13")
        buf.write("\3\13\3\13\3\13\7\13\u00ab\n\13\f\13\16\13\u00ae\13\13")
        buf.write("\3\13\3\13\5\13\u00b2\n\13\3\f\5\f\u00b5\n\f\3\f\7\f\u00b8")
        buf.write("\n\f\f\f\16\f\u00bb\13\f\3\f\5\f\u00be\n\f\3\f\3\f\3\f")
        buf.write("\3\f\5\f\u00c4\n\f\3\f\5\f\u00c7\n\f\3\r\3\r\5\r\u00cb")
        buf.write("\n\r\3\16\3\16\3\16\5\16\u00d0\n\16\3\17\3\17\3\20\3\20")
        buf.write("\3\20\5\20\u00d7\n\20\3\20\5\20\u00da\n\20\3\21\3\21\3")
        buf.write("\21\3\21\3\21\5\21\u00e1\n\21\3\22\3\22\3\23\3\23\3\23")
        buf.write("\3\23\3\23\5\23\u00ea\n\23\3\24\3\24\3\24\3\24\3\24\3")
        buf.write("\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\27")
        buf.write("\5\27\u00fc\n\27\3\27\7\27\u00ff\n\27\f\27\16\27\u0102")
        buf.write("\13\27\3\27\3\27\3\27\3\27\7\27\u0108\n\27\f\27\16\27")
        buf.write("\u010b\13\27\3\27\3\27\5\27\u010f\n\27\3\30\5\30\u0112")
        buf.write("\n\30\3\30\7\30\u0115\n\30\f\30\16\30\u0118\13\30\3\30")
        buf.write("\3\30\3\30\3\30\5\30\u011e\n\30\3\30\5\30\u0121\n\30\3")
        buf.write("\31\5\31\u0124\n\31\3\31\7\31\u0127\n\31\f\31\16\31\u012a")
        buf.write("\13\31\3\31\3\31\3\31\3\31\7\31\u0130\n\31\f\31\16\31")
        buf.write("\u0133\13\31\3\31\3\31\5\31\u0137\n\31\3\32\3\32\5\32")
        buf.write("\u013b\n\32\3\33\5\33\u013e\n\33\3\33\7\33\u0141\n\33")
        buf.write("\f\33\16\33\u0144\13\33\3\33\3\33\3\33\5\33\u0149\n\33")
        buf.write("\3\33\5\33\u014c\n\33\3\34\3\34\5\34\u0150\n\34\3\34\2")
        buf.write("\2\35\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.")
        buf.write("\60\62\64\66\2\2\2\u0172\28\3\2\2\2\4?\3\2\2\2\6F\3\2")
        buf.write("\2\2\bM\3\2\2\2\n^\3\2\2\2\fa\3\2\2\2\16}\3\2\2\2\20\u0080")
        buf.write("\3\2\2\2\22\u009b\3\2\2\2\24\u009e\3\2\2\2\26\u00b4\3")
        buf.write("\2\2\2\30\u00ca\3\2\2\2\32\u00cc\3\2\2\2\34\u00d1\3\2")
        buf.write("\2\2\36\u00d3\3\2\2\2 \u00e0\3\2\2\2\"\u00e2\3\2\2\2$")
        buf.write("\u00e9\3\2\2\2&\u00eb\3\2\2\2(\u00f0\3\2\2\2*\u00f5\3")
        buf.write("\2\2\2,\u00fb\3\2\2\2.\u0111\3\2\2\2\60\u0123\3\2\2\2")
        buf.write("\62\u013a\3\2\2\2\64\u013d\3\2\2\2\66\u014f\3\2\2\28<")
        buf.write("\5\4\3\29;\5\n\6\2:9\3\2\2\2;>\3\2\2\2<:\3\2\2\2<=\3\2")
        buf.write("\2\2=\3\3\2\2\2><\3\2\2\2?C\5\b\5\2@B\5\6\4\2A@\3\2\2")
        buf.write("\2BE\3\2\2\2CA\3\2\2\2CD\3\2\2\2D\5\3\2\2\2EC\3\2\2\2")
        buf.write("FG\7\3\2\2GH\7&\2\2HJ\7\'\2\2IK\7\4\2\2JI\3\2\2\2JK\3")
        buf.write("\2\2\2K\7\3\2\2\2LN\7(\2\2ML\3\2\2\2MN\3\2\2\2NR\3\2\2")
        buf.write("\2OQ\5\34\17\2PO\3\2\2\2QT\3\2\2\2RP\3\2\2\2RS\3\2\2\2")
        buf.write("SU\3\2\2\2TR\3\2\2\2UV\7\5\2\2VW\7&\2\2WY\7\'\2\2XZ\7")
        buf.write("\4\2\2YX\3\2\2\2YZ\3\2\2\2Z\t\3\2\2\2[_\5\f\7\2\\_\5,")
        buf.write("\27\2]_\5\60\31\2^[\3\2\2\2^\\\3\2\2\2^]\3\2\2\2_\13\3")
        buf.write("\2\2\2`b\7(\2\2a`\3\2\2\2ab\3\2\2\2bf\3\2\2\2ce\5\34\17")
        buf.write("\2dc\3\2\2\2eh\3\2\2\2fd\3\2\2\2fg\3\2\2\2gi\3\2\2\2h")
        buf.write("f\3\2\2\2ij\7\6\2\2jm\7&\2\2kl\7\7\2\2ln\7&\2\2mk\3\2")
        buf.write("\2\2mn\3\2\2\2no\3\2\2\2os\7\b\2\2pr\5\16\b\2qp\3\2\2")
        buf.write("\2ru\3\2\2\2sq\3\2\2\2st\3\2\2\2tv\3\2\2\2us\3\2\2\2v")
        buf.write("x\7\t\2\2wy\7\4\2\2xw\3\2\2\2xy\3\2\2\2y\r\3\2\2\2z~\5")
        buf.write("\20\t\2{~\5\26\f\2|~\5\24\13\2}z\3\2\2\2}{\3\2\2\2}|\3")
        buf.write("\2\2\2~\17\3\2\2\2\177\u0081\7(\2\2\u0080\177\3\2\2\2")
        buf.write("\u0080\u0081\3\2\2\2\u0081\u0085\3\2\2\2\u0082\u0084\5")
        buf.write("\34\17\2\u0083\u0082\3\2\2\2\u0084\u0087\3\2\2\2\u0085")
        buf.write("\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u008a\3\2\2\2")
        buf.write("\u0087\u0085\3\2\2\2\u0088\u008b\5 \21\2\u0089\u008b\7")
        buf.write("\n\2\2\u008a\u0088\3\2\2\2\u008a\u0089\3\2\2\2\u008b\u008c")
        buf.write("\3\2\2\2\u008c\u008d\7&\2\2\u008d\u0091\7\13\2\2\u008e")
        buf.write("\u0090\5\32\16\2\u008f\u008e\3\2\2\2\u0090\u0093\3\2\2")
        buf.write("\2\u0091\u008f\3\2\2\2\u0091\u0092\3\2\2\2\u0092\u0094")
        buf.write("\3\2\2\2\u0093\u0091\3\2\2\2\u0094\u0096\7\f\2\2\u0095")
        buf.write("\u0097\5\22\n\2\u0096\u0095\3\2\2\2\u0096\u0097\3\2\2")
        buf.write("\2\u0097\u0099\3\2\2\2\u0098\u009a\7\4\2\2\u0099\u0098")
        buf.write("\3\2\2\2\u0099\u009a\3\2\2\2\u009a\21\3\2\2\2\u009b\u009c")
        buf.write("\7\r\2\2\u009c\23\3\2\2\2\u009d\u009f\7(\2\2\u009e\u009d")
        buf.write("\3\2\2\2\u009e\u009f\3\2\2\2\u009f\u00a3\3\2\2\2\u00a0")
        buf.write("\u00a2\5\34\17\2\u00a1\u00a0\3\2\2\2\u00a2\u00a5\3\2\2")
        buf.write("\2\u00a3\u00a1\3\2\2\2\u00a3\u00a4\3\2\2\2\u00a4\u00a6")
        buf.write("\3\2\2\2\u00a5\u00a3\3\2\2\2\u00a6\u00a7\7\16\2\2\u00a7")
        buf.write("\u00a8\7&\2\2\u00a8\u00ac\7\13\2\2\u00a9\u00ab\5\32\16")
        buf.write("\2\u00aa\u00a9\3\2\2\2\u00ab\u00ae\3\2\2\2\u00ac\u00aa")
        buf.write("\3\2\2\2\u00ac\u00ad\3\2\2\2\u00ad\u00af\3\2\2\2\u00ae")
        buf.write("\u00ac\3\2\2\2\u00af\u00b1\7\f\2\2\u00b0\u00b2\7\4\2\2")
        buf.write("\u00b1\u00b0\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\25\3\2")
        buf.write("\2\2\u00b3\u00b5\7(\2\2\u00b4\u00b3\3\2\2\2\u00b4\u00b5")
        buf.write("\3\2\2\2\u00b5\u00b9\3\2\2\2\u00b6\u00b8\5\34\17\2\u00b7")
        buf.write("\u00b6\3\2\2\2\u00b8\u00bb\3\2\2\2\u00b9\u00b7\3\2\2\2")
        buf.write("\u00b9\u00ba\3\2\2\2\u00ba\u00bd\3\2\2\2\u00bb\u00b9\3")
        buf.write("\2\2\2\u00bc\u00be\5\30\r\2\u00bd\u00bc\3\2\2\2\u00bd")
        buf.write("\u00be\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c0\5 \21\2")
        buf.write("\u00c0\u00c3\7&\2\2\u00c1\u00c2\7\17\2\2\u00c2\u00c4\7")
        buf.write("\37\2\2\u00c3\u00c1\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4")
        buf.write("\u00c6\3\2\2\2\u00c5\u00c7\7\4\2\2\u00c6\u00c5\3\2\2\2")
        buf.write("\u00c6\u00c7\3\2\2\2\u00c7\27\3\2\2\2\u00c8\u00cb\7\20")
        buf.write("\2\2\u00c9\u00cb\7\r\2\2\u00ca\u00c8\3\2\2\2\u00ca\u00c9")
        buf.write("\3\2\2\2\u00cb\31\3\2\2\2\u00cc\u00cd\5 \21\2\u00cd\u00cf")
        buf.write("\7&\2\2\u00ce\u00d0\7\21\2\2\u00cf\u00ce\3\2\2\2\u00cf")
        buf.write("\u00d0\3\2\2\2\u00d0\33\3\2\2\2\u00d1\u00d2\7\"\2\2\u00d2")
        buf.write("\35\3\2\2\2\u00d3\u00d6\7&\2\2\u00d4\u00d5\7\17\2\2\u00d5")
        buf.write("\u00d7\7&\2\2\u00d6\u00d4\3\2\2\2\u00d6\u00d7\3\2\2\2")
        buf.write("\u00d7\u00d9\3\2\2\2\u00d8\u00da\7\21\2\2\u00d9\u00d8")
        buf.write("\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\37\3\2\2\2\u00db\u00e1")
        buf.write("\5$\23\2\u00dc\u00e1\5\"\22\2\u00dd\u00e1\5&\24\2\u00de")
        buf.write("\u00e1\5(\25\2\u00df\u00e1\5*\26\2\u00e0\u00db\3\2\2\2")
        buf.write("\u00e0\u00dc\3\2\2\2\u00e0\u00dd\3\2\2\2\u00e0\u00de\3")
        buf.write("\2\2\2\u00e0\u00df\3\2\2\2\u00e1!\3\2\2\2\u00e2\u00e3")
        buf.write("\7&\2\2\u00e3#\3\2\2\2\u00e4\u00ea\7\22\2\2\u00e5\u00ea")
        buf.write("\7\23\2\2\u00e6\u00ea\7\24\2\2\u00e7\u00ea\7\25\2\2\u00e8")
        buf.write("\u00ea\7\26\2\2\u00e9\u00e4\3\2\2\2\u00e9\u00e5\3\2\2")
        buf.write("\2\u00e9\u00e6\3\2\2\2\u00e9\u00e7\3\2\2\2\u00e9\u00e8")
        buf.write("\3\2\2\2\u00ea%\3\2\2\2\u00eb\u00ec\7\27\2\2\u00ec\u00ed")
        buf.write("\7\30\2\2\u00ed\u00ee\5 \21\2\u00ee\u00ef\7\31\2\2\u00ef")
        buf.write("\'\3\2\2\2\u00f0\u00f1\7\32\2\2\u00f1\u00f2\7\30\2\2\u00f2")
        buf.write("\u00f3\5 \21\2\u00f3\u00f4\7\31\2\2\u00f4)\3\2\2\2\u00f5")
        buf.write("\u00f6\7\33\2\2\u00f6\u00f7\7\30\2\2\u00f7\u00f8\5 \21")
        buf.write("\2\u00f8\u00f9\7\31\2\2\u00f9+\3\2\2\2\u00fa\u00fc\7(")
        buf.write("\2\2\u00fb\u00fa\3\2\2\2\u00fb\u00fc\3\2\2\2\u00fc\u0100")
        buf.write("\3\2\2\2\u00fd\u00ff\5\34\17\2\u00fe\u00fd\3\2\2\2\u00ff")
        buf.write("\u0102\3\2\2\2\u0100\u00fe\3\2\2\2\u0100\u0101\3\2\2\2")
        buf.write("\u0101\u0103\3\2\2\2\u0102\u0100\3\2\2\2\u0103\u0104\7")
        buf.write("\34\2\2\u0104\u0105\7&\2\2\u0105\u0109\7\b\2\2\u0106\u0108")
        buf.write("\5.\30\2\u0107\u0106\3\2\2\2\u0108\u010b\3\2\2\2\u0109")
        buf.write("\u0107\3\2\2\2\u0109\u010a\3\2\2\2\u010a\u010c\3\2\2\2")
        buf.write("\u010b\u0109\3\2\2\2\u010c\u010e\7\t\2\2\u010d\u010f\7")
        buf.write("\4\2\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2\2\2\u010f-")
        buf.write("\3\2\2\2\u0110\u0112\7(\2\2\u0111\u0110\3\2\2\2\u0111")
        buf.write("\u0112\3\2\2\2\u0112\u0116\3\2\2\2\u0113\u0115\5\34\17")
        buf.write("\2\u0114\u0113\3\2\2\2\u0115\u0118\3\2\2\2\u0116\u0114")
        buf.write("\3\2\2\2\u0116\u0117\3\2\2\2\u0117\u0119\3\2\2\2\u0118")
        buf.write("\u0116\3\2\2\2\u0119\u011a\5 \21\2\u011a\u011d\7&\2\2")
        buf.write("\u011b\u011c\7\17\2\2\u011c\u011e\7\37\2\2\u011d\u011b")
        buf.write("\3\2\2\2\u011d\u011e\3\2\2\2\u011e\u0120\3\2\2\2\u011f")
        buf.write("\u0121\7\4\2\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2")
        buf.write("\u0121/\3\2\2\2\u0122\u0124\7(\2\2\u0123\u0122\3\2\2\2")
        buf.write("\u0123\u0124\3\2\2\2\u0124\u0128\3\2\2\2\u0125\u0127\5")
        buf.write("\34\17\2\u0126\u0125\3\2\2\2\u0127\u012a\3\2\2\2\u0128")
        buf.write("\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012b\3\2\2\2")
        buf.write("\u012a\u0128\3\2\2\2\u012b\u012c\5\62\32\2\u012c\u012d")
        buf.write("\7&\2\2\u012d\u0131\7\b\2\2\u012e\u0130\5\64\33\2\u012f")
        buf.write("\u012e\3\2\2\2\u0130\u0133\3\2\2\2\u0131\u012f\3\2\2\2")
        buf.write("\u0131\u0132\3\2\2\2\u0132\u0134\3\2\2\2\u0133\u0131\3")
        buf.write("\2\2\2\u0134\u0136\7\t\2\2\u0135\u0137\7\4\2\2\u0136\u0135")
        buf.write("\3\2\2\2\u0136\u0137\3\2\2\2\u0137\61\3\2\2\2\u0138\u013b")
        buf.write("\7\35\2\2\u0139\u013b\7\36\2\2\u013a\u0138\3\2\2\2\u013a")
        buf.write("\u0139\3\2\2\2\u013b\63\3\2\2\2\u013c\u013e\7(\2\2\u013d")
        buf.write("\u013c\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u0142\3\2\2\2")
        buf.write("\u013f\u0141\5\34\17\2\u0140\u013f\3\2\2\2\u0141\u0144")
        buf.write("\3\2\2\2\u0142\u0140\3\2\2\2\u0142\u0143\3\2\2\2\u0143")
        buf.write("\u0145\3\2\2\2\u0144\u0142\3\2\2\2\u0145\u0148\7&\2\2")
        buf.write("\u0146\u0147\7\17\2\2\u0147\u0149\5\66\34\2\u0148\u0146")
        buf.write("\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014b\3\2\2\2\u014a")
        buf.write("\u014c\7\21\2\2\u014b\u014a\3\2\2\2\u014b\u014c\3\2\2")
        buf.write("\2\u014c\65\3\2\2\2\u014d\u0150\7#\2\2\u014e\u0150\7$")
        buf.write("\2\2\u014f\u014d\3\2\2\2\u014f\u014e\3\2\2\2\u0150\67")
        buf.write("\3\2\2\2\66<CJMRY^afmsx}\u0080\u0085\u008a\u0091\u0096")
        buf.write("\u0099\u009e\u00a3\u00ac\u00b1\u00b4\u00b9\u00bd\u00c3")
        buf.write("\u00c6\u00ca\u00cf\u00d6\u00d9\u00e0\u00e9\u00fb\u0100")
        buf.write("\u0109\u010e\u0111\u0116\u011d\u0120\u0123\u0128\u0131")
        buf.write("\u0136\u013a\u013d\u0142\u0148\u014b\u014f")
        return buf.getvalue()


class TParser ( Parser ):

    grammarFileName = "T.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'import'", "';'", "'module'", "'interface'", 
                     "'extends'", "'{'", "'}'", "'void'", "'('", "')'", 
                     "'const'", "'signal'", "'='", "'readonly'", "','", 
                     "'bool'", "'int'", "'real'", "'string'", "'var'", "'list'", 
                     "'<'", "'>'", "'map'", "'model'", "'struct'", "'enum'", 
                     "'flag'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "STRING", "DOUBLE_STRING", "SINGLE_STRING", 
                      "TAGLINE", "INTCONSTANT", "HEXCONSTANT", "TAGIDENTIFIER", 
                      "IDENTIFIER", "VERSION", "DOCCOMMENT", "WHITESPACE", 
                      "COMMENT", "MULTICOMM" ]

    RULE_documentSymbol = 0
    RULE_headerSymbol = 1
    RULE_importSymbol = 2
    RULE_moduleSymbol = 3
    RULE_definitionSymbol = 4
    RULE_interfaceSymbol = 5
    RULE_interfaceMemberSymbol = 6
    RULE_operationSymbol = 7
    RULE_operationModifierSymbol = 8
    RULE_signalSymbol = 9
    RULE_propertySymbol = 10
    RULE_propertyModifierSymbol = 11
    RULE_operationParameterSymbol = 12
    RULE_tagSymbol = 13
    RULE_tagAttributeSymbol = 14
    RULE_typeSymbol = 15
    RULE_complexTypeSymbol = 16
    RULE_primitiveTypeSymbol = 17
    RULE_listTypeSymbol = 18
    RULE_mapTypeSymbol = 19
    RULE_modelTypeSymbol = 20
    RULE_structSymbol = 21
    RULE_structFieldSymbol = 22
    RULE_enumSymbol = 23
    RULE_enumTypeSymbol = 24
    RULE_enumMemberSymbol = 25
    RULE_intSymbol = 26

    ruleNames =  [ "documentSymbol", "headerSymbol", "importSymbol", "moduleSymbol", 
                   "definitionSymbol", "interfaceSymbol", "interfaceMemberSymbol", 
                   "operationSymbol", "operationModifierSymbol", "signalSymbol", 
                   "propertySymbol", "propertyModifierSymbol", "operationParameterSymbol", 
                   "tagSymbol", "tagAttributeSymbol", "typeSymbol", "complexTypeSymbol", 
                   "primitiveTypeSymbol", "listTypeSymbol", "mapTypeSymbol", 
                   "modelTypeSymbol", "structSymbol", "structFieldSymbol", 
                   "enumSymbol", "enumTypeSymbol", "enumMemberSymbol", "intSymbol" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    STRING=29
    DOUBLE_STRING=30
    SINGLE_STRING=31
    TAGLINE=32
    INTCONSTANT=33
    HEXCONSTANT=34
    TAGIDENTIFIER=35
    IDENTIFIER=36
    VERSION=37
    DOCCOMMENT=38
    WHITESPACE=39
    COMMENT=40
    MULTICOMM=41

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        # Disable the version check for now as although there is a mismatch the Lexer seems to work fine.
        # Rely on the weekly CI to make sure this keeps working also with later antlr versions.
        # self.checkVersion("4.7.1")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None



    class DocumentSymbolContext(ParserRuleContext):

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

        def headerSymbol(self):
            return self.getTypedRuleContext(TParser.HeaderSymbolContext,0)


        def definitionSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.DefinitionSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.DefinitionSymbolContext,i)


        def getRuleIndex(self):
            return TParser.RULE_documentSymbol

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

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

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




    def documentSymbol(self):

        localctx = TParser.DocumentSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_documentSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 54
            self.headerSymbol()
            self.state = 58
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.T__3) | (1 << TParser.T__25) | (1 << TParser.T__26) | (1 << TParser.T__27) | (1 << TParser.TAGLINE) | (1 << TParser.DOCCOMMENT))) != 0):
                self.state = 55
                self.definitionSymbol()
                self.state = 60
                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 HeaderSymbolContext(ParserRuleContext):

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

        def moduleSymbol(self):
            return self.getTypedRuleContext(TParser.ModuleSymbolContext,0)


        def importSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.ImportSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.ImportSymbolContext,i)


        def getRuleIndex(self):
            return TParser.RULE_headerSymbol

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

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

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




    def headerSymbol(self):

        localctx = TParser.HeaderSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_headerSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 61
            self.moduleSymbol()
            self.state = 65
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.T__0:
                self.state = 62
                self.importSymbol()
                self.state = 67
                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 ImportSymbolContext(ParserRuleContext):

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

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

        def VERSION(self):
            return self.getToken(TParser.VERSION, 0)

        def getRuleIndex(self):
            return TParser.RULE_importSymbol

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

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

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




    def importSymbol(self):

        localctx = TParser.ImportSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_importSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 68
            self.match(TParser.T__0)
            self.state = 69
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 70
            localctx.version = self.match(TParser.VERSION)
            self.state = 72
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 71
                self.match(TParser.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 ModuleSymbolContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.comment = None # Token
            self.name = None # Token
            self.version = None # Token

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

        def VERSION(self):
            return self.getToken(TParser.VERSION, 0)

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_moduleSymbol

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

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

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




    def moduleSymbol(self):

        localctx = TParser.ModuleSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_moduleSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 75
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 74
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 80
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 77
                self.tagSymbol()
                self.state = 82
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 83
            self.match(TParser.T__2)
            self.state = 84
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 85
            localctx.version = self.match(TParser.VERSION)
            self.state = 87
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 86
                self.match(TParser.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 DefinitionSymbolContext(ParserRuleContext):

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

        def interfaceSymbol(self):
            return self.getTypedRuleContext(TParser.InterfaceSymbolContext,0)


        def structSymbol(self):
            return self.getTypedRuleContext(TParser.StructSymbolContext,0)


        def enumSymbol(self):
            return self.getTypedRuleContext(TParser.EnumSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_definitionSymbol

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

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

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




    def definitionSymbol(self):

        localctx = TParser.DefinitionSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_definitionSymbol)
        try:
            self.state = 92
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 89
                self.interfaceSymbol()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 90
                self.structSymbol()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 91
                self.enumSymbol()
                pass


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

    class InterfaceSymbolContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.comment = None # Token
            self.name = None # Token
            self.extends = None # Token

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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def interfaceMemberSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.InterfaceMemberSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.InterfaceMemberSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_interfaceSymbol

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

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

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




    def interfaceSymbol(self):

        localctx = TParser.InterfaceSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_interfaceSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 95
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 94
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 100
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 97
                self.tagSymbol()
                self.state = 102
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 103
            self.match(TParser.T__3)
            self.state = 104
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 107
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__4:
                self.state = 105
                self.match(TParser.T__4)
                self.state = 106
                localctx.extends = self.match(TParser.IDENTIFIER)


            self.state = 109
            self.match(TParser.T__5)
            self.state = 113
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.T__7) | (1 << TParser.T__10) | (1 << TParser.T__11) | (1 << TParser.T__13) | (1 << TParser.T__15) | (1 << TParser.T__16) | (1 << TParser.T__17) | (1 << TParser.T__18) | (1 << TParser.T__19) | (1 << TParser.T__20) | (1 << TParser.T__23) | (1 << TParser.T__24) | (1 << TParser.TAGLINE) | (1 << TParser.IDENTIFIER) | (1 << TParser.DOCCOMMENT))) != 0):
                self.state = 110
                self.interfaceMemberSymbol()
                self.state = 115
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 116
            self.match(TParser.T__6)
            self.state = 118
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 117
                self.match(TParser.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 InterfaceMemberSymbolContext(ParserRuleContext):

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

        def operationSymbol(self):
            return self.getTypedRuleContext(TParser.OperationSymbolContext,0)


        def propertySymbol(self):
            return self.getTypedRuleContext(TParser.PropertySymbolContext,0)


        def signalSymbol(self):
            return self.getTypedRuleContext(TParser.SignalSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_interfaceMemberSymbol

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

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

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




    def interfaceMemberSymbol(self):

        localctx = TParser.InterfaceMemberSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_interfaceMemberSymbol)
        try:
            self.state = 123
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,12,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 120
                self.operationSymbol()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 121
                self.propertySymbol()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 122
                self.signalSymbol()
                pass


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

    class OperationSymbolContext(ParserRuleContext):

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

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

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def operationParameterSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.OperationParameterSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.OperationParameterSymbolContext,i)


        def operationModifierSymbol(self):
            return self.getTypedRuleContext(TParser.OperationModifierSymbolContext,0)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_operationSymbol

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

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

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




    def operationSymbol(self):

        localctx = TParser.OperationSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_operationSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 126
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 125
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 131
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 128
                self.tagSymbol()
                self.state = 133
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 136
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__15, TParser.T__16, TParser.T__17, TParser.T__18, TParser.T__19, TParser.T__20, TParser.T__23, TParser.T__24, TParser.IDENTIFIER]:
                self.state = 134
                self.typeSymbol()
                pass
            elif token in [TParser.T__7]:
                self.state = 135
                self.match(TParser.T__7)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 138
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 139
            self.match(TParser.T__8)
            self.state = 143
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.T__15) | (1 << TParser.T__16) | (1 << TParser.T__17) | (1 << TParser.T__18) | (1 << TParser.T__19) | (1 << TParser.T__20) | (1 << TParser.T__23) | (1 << TParser.T__24) | (1 << TParser.IDENTIFIER))) != 0):
                self.state = 140
                self.operationParameterSymbol()
                self.state = 145
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 146
            self.match(TParser.T__9)
            self.state = 148
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                self.state = 147
                self.operationModifierSymbol()


            self.state = 151
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 150
                self.match(TParser.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 OperationModifierSymbolContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return TParser.RULE_operationModifierSymbol

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

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

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




    def operationModifierSymbol(self):

        localctx = TParser.OperationModifierSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_operationModifierSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 153
            localctx.is_const = self.match(TParser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SignalSymbolContext(ParserRuleContext):

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

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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def operationParameterSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.OperationParameterSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.OperationParameterSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_signalSymbol

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

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

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




    def signalSymbol(self):

        localctx = TParser.SignalSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_signalSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 156
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 155
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 161
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 158
                self.tagSymbol()
                self.state = 163
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 164
            self.match(TParser.T__11)
            self.state = 165
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 166
            self.match(TParser.T__8)
            self.state = 170
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.T__15) | (1 << TParser.T__16) | (1 << TParser.T__17) | (1 << TParser.T__18) | (1 << TParser.T__19) | (1 << TParser.T__20) | (1 << TParser.T__23) | (1 << TParser.T__24) | (1 << TParser.IDENTIFIER))) != 0):
                self.state = 167
                self.operationParameterSymbol()
                self.state = 172
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 173
            self.match(TParser.T__9)
            self.state = 175
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 174
                self.match(TParser.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 PropertySymbolContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.comment = None # Token
            self.name = None # Token
            self.value = None # Token

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def propertyModifierSymbol(self):
            return self.getTypedRuleContext(TParser.PropertyModifierSymbolContext,0)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

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

        def getRuleIndex(self):
            return TParser.RULE_propertySymbol

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

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

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




    def propertySymbol(self):

        localctx = TParser.PropertySymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_propertySymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 178
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 177
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 183
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 180
                self.tagSymbol()
                self.state = 185
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 187
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__10 or _la==TParser.T__13:
                self.state = 186
                self.propertyModifierSymbol()


            self.state = 189
            self.typeSymbol()
            self.state = 190
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 193
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__12:
                self.state = 191
                self.match(TParser.T__12)
                self.state = 192
                localctx.value = self.match(TParser.STRING)


            self.state = 196
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 195
                self.match(TParser.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 PropertyModifierSymbolContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return TParser.RULE_propertyModifierSymbol

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

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

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




    def propertyModifierSymbol(self):

        localctx = TParser.PropertyModifierSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_propertyModifierSymbol)
        try:
            self.state = 200
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 198
                localctx.is_readonly = self.match(TParser.T__13)
                pass
            elif token in [TParser.T__10]:
                self.enterOuterAlt(localctx, 2)
                self.state = 199
                localctx.is_const = self.match(TParser.T__10)
                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 OperationParameterSymbolContext(ParserRuleContext):

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

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


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

        def getRuleIndex(self):
            return TParser.RULE_operationParameterSymbol

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

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

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




    def operationParameterSymbol(self):

        localctx = TParser.OperationParameterSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_operationParameterSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 202
            self.typeSymbol()
            self.state = 203
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 205
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__14:
                self.state = 204
                self.match(TParser.T__14)


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

    class TagSymbolContext(ParserRuleContext):

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

        def TAGLINE(self):
            return self.getToken(TParser.TAGLINE, 0)

        def getRuleIndex(self):
            return TParser.RULE_tagSymbol

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

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

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




    def tagSymbol(self):

        localctx = TParser.TagSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_tagSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 207
            localctx.line = self.match(TParser.TAGLINE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TagAttributeSymbolContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return TParser.RULE_tagAttributeSymbol

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

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

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




    def tagAttributeSymbol(self):

        localctx = TParser.TagAttributeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_tagAttributeSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 212
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__12:
                self.state = 210
                self.match(TParser.T__12)
                self.state = 211
                localctx.value = self.match(TParser.IDENTIFIER)


            self.state = 215
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__14:
                self.state = 214
                self.match(TParser.T__14)


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

    class TypeSymbolContext(ParserRuleContext):

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

        def primitiveTypeSymbol(self):
            return self.getTypedRuleContext(TParser.PrimitiveTypeSymbolContext,0)


        def complexTypeSymbol(self):
            return self.getTypedRuleContext(TParser.ComplexTypeSymbolContext,0)


        def listTypeSymbol(self):
            return self.getTypedRuleContext(TParser.ListTypeSymbolContext,0)


        def mapTypeSymbol(self):
            return self.getTypedRuleContext(TParser.MapTypeSymbolContext,0)


        def modelTypeSymbol(self):
            return self.getTypedRuleContext(TParser.ModelTypeSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_typeSymbol

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

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

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




    def typeSymbol(self):

        localctx = TParser.TypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_typeSymbol)
        try:
            self.state = 222
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__15, TParser.T__16, TParser.T__17, TParser.T__18, TParser.T__19]:
                self.enterOuterAlt(localctx, 1)
                self.state = 217
                self.primitiveTypeSymbol()
                pass
            elif token in [TParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 2)
                self.state = 218
                self.complexTypeSymbol()
                pass
            elif token in [TParser.T__20]:
                self.enterOuterAlt(localctx, 3)
                self.state = 219
                self.listTypeSymbol()
                pass
            elif token in [TParser.T__23]:
                self.enterOuterAlt(localctx, 4)
                self.state = 220
                self.mapTypeSymbol()
                pass
            elif token in [TParser.T__24]:
                self.enterOuterAlt(localctx, 5)
                self.state = 221
                self.modelTypeSymbol()
                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 ComplexTypeSymbolContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return TParser.RULE_complexTypeSymbol

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

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

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




    def complexTypeSymbol(self):

        localctx = TParser.ComplexTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_complexTypeSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 224
            localctx.name = self.match(TParser.IDENTIFIER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class PrimitiveTypeSymbolContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return TParser.RULE_primitiveTypeSymbol

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

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

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




    def primitiveTypeSymbol(self):

        localctx = TParser.PrimitiveTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_primitiveTypeSymbol)
        try:
            self.state = 231
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__15]:
                self.enterOuterAlt(localctx, 1)
                self.state = 226
                localctx.name = self.match(TParser.T__15)
                pass
            elif token in [TParser.T__16]:
                self.enterOuterAlt(localctx, 2)
                self.state = 227
                localctx.name = self.match(TParser.T__16)
                pass
            elif token in [TParser.T__17]:
                self.enterOuterAlt(localctx, 3)
                self.state = 228
                localctx.name = self.match(TParser.T__17)
                pass
            elif token in [TParser.T__18]:
                self.enterOuterAlt(localctx, 4)
                self.state = 229
                localctx.name = self.match(TParser.T__18)
                pass
            elif token in [TParser.T__19]:
                self.enterOuterAlt(localctx, 5)
                self.state = 230
                localctx.name = self.match(TParser.T__19)
                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 ListTypeSymbolContext(ParserRuleContext):

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

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_listTypeSymbol

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

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

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




    def listTypeSymbol(self):

        localctx = TParser.ListTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_listTypeSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 233
            self.match(TParser.T__20)
            self.state = 234
            self.match(TParser.T__21)
            self.state = 235
            localctx.valueType = self.typeSymbol()
            self.state = 236
            self.match(TParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class MapTypeSymbolContext(ParserRuleContext):

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

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_mapTypeSymbol

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

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

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




    def mapTypeSymbol(self):

        localctx = TParser.MapTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_mapTypeSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 238
            self.match(TParser.T__23)
            self.state = 239
            self.match(TParser.T__21)
            self.state = 240
            localctx.valueType = self.typeSymbol()
            self.state = 241
            self.match(TParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ModelTypeSymbolContext(ParserRuleContext):

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

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


        def getRuleIndex(self):
            return TParser.RULE_modelTypeSymbol

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

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

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




    def modelTypeSymbol(self):

        localctx = TParser.ModelTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_modelTypeSymbol)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 243
            self.match(TParser.T__24)
            self.state = 244
            self.match(TParser.T__21)
            self.state = 245
            localctx.valueType = self.typeSymbol()
            self.state = 246
            self.match(TParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StructSymbolContext(ParserRuleContext):

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

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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def structFieldSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.StructFieldSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.StructFieldSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_structSymbol

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

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

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




    def structSymbol(self):

        localctx = TParser.StructSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_structSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 249
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 248
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 254
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 251
                self.tagSymbol()
                self.state = 256
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 257
            self.match(TParser.T__25)
            self.state = 258
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 259
            self.match(TParser.T__5)
            self.state = 263
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.T__15) | (1 << TParser.T__16) | (1 << TParser.T__17) | (1 << TParser.T__18) | (1 << TParser.T__19) | (1 << TParser.T__20) | (1 << TParser.T__23) | (1 << TParser.T__24) | (1 << TParser.TAGLINE) | (1 << TParser.IDENTIFIER) | (1 << TParser.DOCCOMMENT))) != 0):
                self.state = 260
                self.structFieldSymbol()
                self.state = 265
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 266
            self.match(TParser.T__6)
            self.state = 268
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 267
                self.match(TParser.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 StructFieldSymbolContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.comment = None # Token
            self.name = None # Token
            self.value = None # Token

        def typeSymbol(self):
            return self.getTypedRuleContext(TParser.TypeSymbolContext,0)


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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

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

        def getRuleIndex(self):
            return TParser.RULE_structFieldSymbol

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

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

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




    def structFieldSymbol(self):

        localctx = TParser.StructFieldSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_structFieldSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 271
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 270
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 276
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 273
                self.tagSymbol()
                self.state = 278
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 279
            self.typeSymbol()
            self.state = 280
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 283
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__12:
                self.state = 281
                self.match(TParser.T__12)
                self.state = 282
                localctx.value = self.match(TParser.STRING)


            self.state = 286
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 285
                self.match(TParser.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 EnumSymbolContext(ParserRuleContext):

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

        def enumTypeSymbol(self):
            return self.getTypedRuleContext(TParser.EnumTypeSymbolContext,0)


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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def enumMemberSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.EnumMemberSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.EnumMemberSymbolContext,i)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_enumSymbol

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

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

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




    def enumSymbol(self):

        localctx = TParser.EnumSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_enumSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 289
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 288
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 294
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 291
                self.tagSymbol()
                self.state = 296
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 297
            self.enumTypeSymbol()
            self.state = 298
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 299
            self.match(TParser.T__5)
            self.state = 303
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TParser.TAGLINE) | (1 << TParser.IDENTIFIER) | (1 << TParser.DOCCOMMENT))) != 0):
                self.state = 300
                self.enumMemberSymbol()
                self.state = 305
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 306
            self.match(TParser.T__6)
            self.state = 308
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__1:
                self.state = 307
                self.match(TParser.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 EnumTypeSymbolContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return TParser.RULE_enumTypeSymbol

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

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

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




    def enumTypeSymbol(self):

        localctx = TParser.EnumTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_enumTypeSymbol)
        try:
            self.state = 312
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__26]:
                self.enterOuterAlt(localctx, 1)
                self.state = 310
                localctx.isEnum = self.match(TParser.T__26)
                pass
            elif token in [TParser.T__27]:
                self.enterOuterAlt(localctx, 2)
                self.state = 311
                localctx.isFlag = self.match(TParser.T__27)
                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 EnumMemberSymbolContext(ParserRuleContext):

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

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

        def tagSymbol(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TParser.TagSymbolContext)
            else:
                return self.getTypedRuleContext(TParser.TagSymbolContext,i)


        def intSymbol(self):
            return self.getTypedRuleContext(TParser.IntSymbolContext,0)


        def DOCCOMMENT(self):
            return self.getToken(TParser.DOCCOMMENT, 0)

        def getRuleIndex(self):
            return TParser.RULE_enumMemberSymbol

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

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

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




    def enumMemberSymbol(self):

        localctx = TParser.EnumMemberSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_enumMemberSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 315
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 314
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 320
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 317
                self.tagSymbol()
                self.state = 322
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 323
            localctx.name = self.match(TParser.IDENTIFIER)
            self.state = 326
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__12:
                self.state = 324
                self.match(TParser.T__12)
                self.state = 325
                self.intSymbol()


            self.state = 329
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.T__14:
                self.state = 328
                self.match(TParser.T__14)


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

    class IntSymbolContext(ParserRuleContext):

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

        def INTCONSTANT(self):
            return self.getToken(TParser.INTCONSTANT, 0)

        def HEXCONSTANT(self):
            return self.getToken(TParser.HEXCONSTANT, 0)

        def getRuleIndex(self):
            return TParser.RULE_intSymbol

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

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

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




    def intSymbol(self):

        localctx = TParser.IntSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_intSymbol)
        try:
            self.state = 333
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.INTCONSTANT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 331
                localctx.value = self.match(TParser.INTCONSTANT)
                pass
            elif token in [TParser.HEXCONSTANT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 332
                localctx.value = self.match(TParser.HEXCONSTANT)
                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





