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

def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3 ")
        buf.write("\u01b7\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\3\2\7\28\n\2\f\2\16\2;\13\2")
        buf.write("\3\2\7\2>\n\2\f\2\16\2A\13\2\3\2\7\2D\n\2\f\2\16\2G\13")
        buf.write("\2\3\2\5\2J\n\2\3\2\3\2\3\3\6\3O\n\3\r\3\16\3P\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3j\n\3\3\4\7\4m\n\4\f")
        buf.write("\4\16\4p\13\4\3\4\3\4\3\5\3\5\3\5\5\5w\n\5\3\6\3\6\3\6")
        buf.write("\3\6\3\6\3\6\3\6\5\6\u0080\n\6\3\7\3\7\5\7\u0084\n\7\3")
        buf.write("\b\3\b\3\b\3\b\3\b\5\b\u008b\n\b\3\t\3\t\3\n\3\n\7\n\u0091")
        buf.write("\n\n\f\n\16\n\u0094\13\n\3\n\3\n\3\n\7\n\u0099\n\n\f\n")
        buf.write("\16\n\u009c\13\n\3\13\3\13\7\13\u00a0\n\13\f\13\16\13")
        buf.write("\u00a3\13\13\3\13\3\13\3\13\7\13\u00a8\n\13\f\13\16\13")
        buf.write("\u00ab\13\13\3\f\3\f\7\f\u00af\n\f\f\f\16\f\u00b2\13\f")
        buf.write("\3\f\3\f\7\f\u00b6\n\f\f\f\16\f\u00b9\13\f\3\f\3\f\7\f")
        buf.write("\u00bd\n\f\f\f\16\f\u00c0\13\f\3\f\7\f\u00c3\n\f\f\f\16")
        buf.write("\f\u00c6\13\f\3\f\7\f\u00c9\n\f\f\f\16\f\u00cc\13\f\3")
        buf.write("\f\3\f\7\f\u00d0\n\f\f\f\16\f\u00d3\13\f\5\f\u00d5\n\f")
        buf.write("\3\f\3\f\3\f\3\f\7\f\u00db\n\f\f\f\16\f\u00de\13\f\3\f")
        buf.write("\5\f\u00e1\n\f\3\r\3\r\7\r\u00e5\n\r\f\r\16\r\u00e8\13")
        buf.write("\r\3\r\7\r\u00eb\n\r\f\r\16\r\u00ee\13\r\3\r\7\r\u00f1")
        buf.write("\n\r\f\r\16\r\u00f4\13\r\3\r\5\r\u00f7\n\r\3\r\3\r\3\16")
        buf.write("\6\16\u00fc\n\16\r\16\16\16\u00fd\3\16\3\16\3\16\3\16")
        buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16")
        buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16")
        buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u0120\n\16\3\17\3")
        buf.write("\17\3\20\3\20\3\20\5\20\u0127\n\20\3\21\3\21\6\21\u012b")
        buf.write("\n\21\r\21\16\21\u012c\5\21\u012f\n\21\3\22\3\22\3\22")
        buf.write("\3\22\3\22\5\22\u0136\n\22\3\23\6\23\u0139\n\23\r\23\16")
        buf.write("\23\u013a\3\24\3\24\7\24\u013f\n\24\f\24\16\24\u0142\13")
        buf.write("\24\3\24\3\24\7\24\u0146\n\24\f\24\16\24\u0149\13\24\3")
        buf.write("\24\3\24\7\24\u014d\n\24\f\24\16\24\u0150\13\24\3\24\7")
        buf.write("\24\u0153\n\24\f\24\16\24\u0156\13\24\3\24\7\24\u0159")
        buf.write("\n\24\f\24\16\24\u015c\13\24\3\24\3\24\7\24\u0160\n\24")
        buf.write("\f\24\16\24\u0163\13\24\5\24\u0165\n\24\3\24\3\24\3\24")
        buf.write("\3\24\7\24\u016b\n\24\f\24\16\24\u016e\13\24\3\24\5\24")
        buf.write("\u0171\n\24\3\25\3\25\7\25\u0175\n\25\f\25\16\25\u0178")
        buf.write("\13\25\3\25\3\25\7\25\u017c\n\25\f\25\16\25\u017f\13\25")
        buf.write("\3\25\7\25\u0182\n\25\f\25\16\25\u0185\13\25\3\25\3\25")
        buf.write("\3\26\3\26\5\26\u018b\n\26\3\27\3\27\3\27\3\27\3\27\3")
        buf.write("\27\5\27\u0193\n\27\3\30\3\30\3\30\7\30\u0198\n\30\f\30")
        buf.write("\16\30\u019b\13\30\3\30\6\30\u019e\n\30\r\30\16\30\u019f")
        buf.write("\5\30\u01a2\n\30\3\31\3\31\3\31\7\31\u01a7\n\31\f\31\16")
        buf.write("\31\u01aa\13\31\3\31\6\31\u01ad\n\31\r\31\16\31\u01ae")
        buf.write("\5\31\u01b1\n\31\3\32\3\32\3\33\3\33\3\33\2\2\34\2\4\6")
        buf.write("\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\2")
        buf.write("\6\4\2\23\26\30\31\3\2\13\f\4\2\21\21\32\33\3\2\r\17\2")
        buf.write("\u01f2\2?\3\2\2\2\4i\3\2\2\2\6n\3\2\2\2\bv\3\2\2\2\n\177")
        buf.write("\3\2\2\2\f\u0083\3\2\2\2\16\u008a\3\2\2\2\20\u008c\3\2")
        buf.write("\2\2\22\u008e\3\2\2\2\24\u009d\3\2\2\2\26\u00e0\3\2\2")
        buf.write("\2\30\u00e2\3\2\2\2\32\u011f\3\2\2\2\34\u0121\3\2\2\2")
        buf.write("\36\u0126\3\2\2\2 \u012e\3\2\2\2\"\u0135\3\2\2\2$\u0138")
        buf.write("\3\2\2\2&\u0170\3\2\2\2(\u0172\3\2\2\2*\u018a\3\2\2\2")
        buf.write(",\u0192\3\2\2\2.\u01a1\3\2\2\2\60\u01b0\3\2\2\2\62\u01b2")
        buf.write("\3\2\2\2\64\u01b4\3\2\2\2\668\5\64\33\2\67\66\3\2\2\2")
        buf.write("8;\3\2\2\29\67\3\2\2\29:\3\2\2\2:<\3\2\2\2;9\3\2\2\2<")
        buf.write(">\5\4\3\2=9\3\2\2\2>A\3\2\2\2?=\3\2\2\2?@\3\2\2\2@E\3")
        buf.write("\2\2\2A?\3\2\2\2BD\5\64\33\2CB\3\2\2\2DG\3\2\2\2EC\3\2")
        buf.write("\2\2EF\3\2\2\2FI\3\2\2\2GE\3\2\2\2HJ\5\6\4\2IH\3\2\2\2")
        buf.write("IJ\3\2\2\2JK\3\2\2\2KL\7\2\2\3L\3\3\2\2\2MO\5\22\n\2N")
        buf.write("M\3\2\2\2OP\3\2\2\2PN\3\2\2\2PQ\3\2\2\2QR\3\2\2\2RS\5")
        buf.write("\4\3\2Sj\3\2\2\2Tj\5\n\6\2UV\5\20\t\2VW\5\64\33\2Wj\3")
        buf.write("\2\2\2XY\5\20\t\2YZ\5\24\13\2Z[\5\6\4\2[j\3\2\2\2\\]\5")
        buf.write("\20\t\2]^\5\n\6\2^j\3\2\2\2_`\5\16\b\2`a\5\64\33\2aj\3")
        buf.write("\2\2\2bc\5\16\b\2cd\5\24\13\2de\5\6\4\2ej\3\2\2\2fg\5")
        buf.write("\16\b\2gh\5\f\7\2hj\3\2\2\2iN\3\2\2\2iT\3\2\2\2iU\3\2")
        buf.write("\2\2iX\3\2\2\2i\\\3\2\2\2i_\3\2\2\2ib\3\2\2\2if\3\2\2")
        buf.write("\2j\5\3\2\2\2km\5\22\n\2lk\3\2\2\2mp\3\2\2\2nl\3\2\2\2")
        buf.write("no\3\2\2\2oq\3\2\2\2pn\3\2\2\2qr\5\b\5\2r\7\3\2\2\2sw")
        buf.write("\5\20\t\2tw\5\n\6\2uw\5\16\b\2vs\3\2\2\2vt\3\2\2\2vu\3")
        buf.write("\2\2\2w\t\3\2\2\2x\u0080\5\60\31\2y\u0080\7\36\2\2z\u0080")
        buf.write("\7\37\2\2{\u0080\7 \2\2|\u0080\5\26\f\2}\u0080\5\30\r")
        buf.write("\2~\u0080\5&\24\2\177x\3\2\2\2\177y\3\2\2\2\177z\3\2\2")
        buf.write("\2\177{\3\2\2\2\177|\3\2\2\2\177}\3\2\2\2\177~\3\2\2\2")
        buf.write("\u0080\13\3\2\2\2\u0081\u0084\5\n\6\2\u0082\u0084\5\20")
        buf.write("\t\2\u0083\u0081\3\2\2\2\u0083\u0082\3\2\2\2\u0084\r\3")
        buf.write("\2\2\2\u0085\u008b\5*\26\2\u0086\u008b\7\22\2\2\u0087")
        buf.write("\u008b\7\27\2\2\u0088\u008b\7\33\2\2\u0089\u008b\7\21")
        buf.write("\2\2\u008a\u0085\3\2\2\2\u008a\u0086\3\2\2\2\u008a\u0087")
        buf.write("\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u0089\3\2\2\2\u008b")
        buf.write("\17\3\2\2\2\u008c\u008d\t\2\2\2\u008d\21\3\2\2\2\u008e")
        buf.write("\u0092\5\62\32\2\u008f\u0091\5\64\33\2\u0090\u008f\3\2")
        buf.write("\2\2\u0091\u0094\3\2\2\2\u0092\u0090\3\2\2\2\u0092\u0093")
        buf.write("\3\2\2\2\u0093\u0095\3\2\2\2\u0094\u0092\3\2\2\2\u0095")
        buf.write("\u0096\7\n\2\2\u0096\u009a\7\n\2\2\u0097\u0099\5\64\33")
        buf.write("\2\u0098\u0097\3\2\2\2\u0099\u009c\3\2\2\2\u009a\u0098")
        buf.write("\3\2\2\2\u009a\u009b\3\2\2\2\u009b\23\3\2\2\2\u009c\u009a")
        buf.write("\3\2\2\2\u009d\u00a1\7\32\2\2\u009e\u00a0\5\64\33\2\u009f")
        buf.write("\u009e\3\2\2\2\u00a0\u00a3\3\2\2\2\u00a1\u009f\3\2\2\2")
        buf.write("\u00a1\u00a2\3\2\2\2\u00a2\u00a4\3\2\2\2\u00a3\u00a1\3")
        buf.write("\2\2\2\u00a4\u00a5\7\n\2\2\u00a5\u00a9\7\n\2\2\u00a6\u00a8")
        buf.write("\5\64\33\2\u00a7\u00a6\3\2\2\2\u00a8\u00ab\3\2\2\2\u00a9")
        buf.write("\u00a7\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\25\3\2\2\2\u00ab")
        buf.write("\u00a9\3\2\2\2\u00ac\u00b0\7\3\2\2\u00ad\u00af\5\64\33")
        buf.write("\2\u00ae\u00ad\3\2\2\2\u00af\u00b2\3\2\2\2\u00b0\u00ae")
        buf.write("\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b3\3\2\2\2\u00b2")
        buf.write("\u00b0\3\2\2\2\u00b3\u00b7\5\6\4\2\u00b4\u00b6\5\64\33")
        buf.write("\2\u00b5\u00b4\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7\u00b5")
        buf.write("\3\2\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00c4\3\2\2\2\u00b9")
        buf.write("\u00b7\3\2\2\2\u00ba\u00be\7\t\2\2\u00bb\u00bd\5\64\33")
        buf.write("\2\u00bc\u00bb\3\2\2\2\u00bd\u00c0\3\2\2\2\u00be\u00bc")
        buf.write("\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c1\3\2\2\2\u00c0")
        buf.write("\u00be\3\2\2\2\u00c1\u00c3\5\6\4\2\u00c2\u00ba\3\2\2\2")
        buf.write("\u00c3\u00c6\3\2\2\2\u00c4\u00c2\3\2\2\2\u00c4\u00c5\3")
        buf.write("\2\2\2\u00c5\u00ca\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00c9")
        buf.write("\5\64\33\2\u00c8\u00c7\3\2\2\2\u00c9\u00cc\3\2\2\2\u00ca")
        buf.write("\u00c8\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00d4\3\2\2\2")
        buf.write("\u00cc\u00ca\3\2\2\2\u00cd\u00d1\7\t\2\2\u00ce\u00d0\5")
        buf.write("\64\33\2\u00cf\u00ce\3\2\2\2\u00d0\u00d3\3\2\2\2\u00d1")
        buf.write("\u00cf\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d5\3\2\2\2")
        buf.write("\u00d3\u00d1\3\2\2\2\u00d4\u00cd\3\2\2\2\u00d4\u00d5\3")
        buf.write("\2\2\2\u00d5\u00d6\3\2\2\2\u00d6\u00d7\7\4\2\2\u00d7\u00e1")
        buf.write("\3\2\2\2\u00d8\u00dc\7\3\2\2\u00d9\u00db\5\64\33\2\u00da")
        buf.write("\u00d9\3\2\2\2\u00db\u00de\3\2\2\2\u00dc\u00da\3\2\2\2")
        buf.write("\u00dc\u00dd\3\2\2\2\u00dd\u00df\3\2\2\2\u00de\u00dc\3")
        buf.write("\2\2\2\u00df\u00e1\7\4\2\2\u00e0\u00ac\3\2\2\2\u00e0\u00d8")
        buf.write("\3\2\2\2\u00e1\27\3\2\2\2\u00e2\u00ec\7\5\2\2\u00e3\u00e5")
        buf.write("\5\64\33\2\u00e4\u00e3\3\2\2\2\u00e5\u00e8\3\2\2\2\u00e6")
        buf.write("\u00e4\3\2\2\2\u00e6\u00e7\3\2\2\2\u00e7\u00e9\3\2\2\2")
        buf.write("\u00e8\u00e6\3\2\2\2\u00e9\u00eb\5\32\16\2\u00ea\u00e6")
        buf.write("\3\2\2\2\u00eb\u00ee\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ec")
        buf.write("\u00ed\3\2\2\2\u00ed\u00f2\3\2\2\2\u00ee\u00ec\3\2\2\2")
        buf.write("\u00ef\u00f1\5\64\33\2\u00f0\u00ef\3\2\2\2\u00f1\u00f4")
        buf.write("\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3")
        buf.write("\u00f6\3\2\2\2\u00f4\u00f2\3\2\2\2\u00f5\u00f7\5\6\4\2")
        buf.write("\u00f6\u00f5\3\2\2\2\u00f6\u00f7\3\2\2\2\u00f7\u00f8\3")
        buf.write("\2\2\2\u00f8\u00f9\7\6\2\2\u00f9\31\3\2\2\2\u00fa\u00fc")
        buf.write("\5\22\n\2\u00fb\u00fa\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd")
        buf.write("\u00fb\3\2\2\2\u00fd\u00fe\3\2\2\2\u00fe\u00ff\3\2\2\2")
        buf.write("\u00ff\u0100\5\32\16\2\u0100\u0120\3\2\2\2\u0101\u0120")
        buf.write("\5\34\17\2\u0102\u0120\5$\23\2\u0103\u0104\5\20\t\2\u0104")
        buf.write("\u0105\5\64\33\2\u0105\u0120\3\2\2\2\u0106\u0107\5\20")
        buf.write("\t\2\u0107\u0108\5\24\13\2\u0108\u0109\5\6\4\2\u0109\u0120")
        buf.write("\3\2\2\2\u010a\u010b\5\20\t\2\u010b\u010c\5\34\17\2\u010c")
        buf.write("\u0120\3\2\2\2\u010d\u010e\5\"\22\2\u010e\u010f\5\64\33")
        buf.write("\2\u010f\u0120\3\2\2\2\u0110\u0111\5\"\22\2\u0111\u0112")
        buf.write("\5\24\13\2\u0112\u0113\5\6\4\2\u0113\u0120\3\2\2\2\u0114")
        buf.write("\u0115\5\"\22\2\u0115\u0116\5\36\20\2\u0116\u0120\3\2")
        buf.write("\2\2\u0117\u0118\7\20\2\2\u0118\u0120\5\64\33\2\u0119")
        buf.write("\u011a\7\20\2\2\u011a\u011b\5\24\13\2\u011b\u011c\5\6")
        buf.write("\4\2\u011c\u0120\3\2\2\2\u011d\u011e\7\20\2\2\u011e\u0120")
        buf.write("\5 \21\2\u011f\u00fb\3\2\2\2\u011f\u0101\3\2\2\2\u011f")
        buf.write("\u0102\3\2\2\2\u011f\u0103\3\2\2\2\u011f\u0106\3\2\2\2")
        buf.write("\u011f\u010a\3\2\2\2\u011f\u010d\3\2\2\2\u011f\u0110\3")
        buf.write("\2\2\2\u011f\u0114\3\2\2\2\u011f\u0117\3\2\2\2\u011f\u0119")
        buf.write("\3\2\2\2\u011f\u011d\3\2\2\2\u0120\33\3\2\2\2\u0121\u0122")
        buf.write("\5\n\6\2\u0122\35\3\2\2\2\u0123\u0127\5\34\17\2\u0124")
        buf.write("\u0127\5\20\t\2\u0125\u0127\5$\23\2\u0126\u0123\3\2\2")
        buf.write("\2\u0126\u0124\3\2\2\2\u0126\u0125\3\2\2\2\u0127\37\3")
        buf.write("\2\2\2\u0128\u012f\5\n\6\2\u0129\u012b\7\f\2\2\u012a\u0129")
        buf.write("\3\2\2\2\u012b\u012c\3\2\2\2\u012c\u012a\3\2\2\2\u012c")
        buf.write("\u012d\3\2\2\2\u012d\u012f\3\2\2\2\u012e\u0128\3\2\2\2")
        buf.write("\u012e\u012a\3\2\2\2\u012f!\3\2\2\2\u0130\u0136\5,\27")
        buf.write("\2\u0131\u0136\7\22\2\2\u0132\u0136\7\27\2\2\u0133\u0136")
        buf.write("\7\33\2\2\u0134\u0136\7\21\2\2\u0135\u0130\3\2\2\2\u0135")
        buf.write("\u0131\3\2\2\2\u0135\u0132\3\2\2\2\u0135\u0133\3\2\2\2")
        buf.write("\u0135\u0134\3\2\2\2\u0136#\3\2\2\2\u0137\u0139\t\3\2")
        buf.write("\2\u0138\u0137\3\2\2\2\u0139\u013a\3\2\2\2\u013a\u0138")
        buf.write("\3\2\2\2\u013a\u013b\3\2\2\2\u013b%\3\2\2\2\u013c\u0140")
        buf.write("\7\7\2\2\u013d\u013f\5\64\33\2\u013e\u013d\3\2\2\2\u013f")
        buf.write("\u0142\3\2\2\2\u0140\u013e\3\2\2\2\u0140\u0141\3\2\2\2")
        buf.write("\u0141\u0143\3\2\2\2\u0142\u0140\3\2\2\2\u0143\u0154\5")
        buf.write("(\25\2\u0144\u0146\5\64\33\2\u0145\u0144\3\2\2\2\u0146")
        buf.write("\u0149\3\2\2\2\u0147\u0145\3\2\2\2\u0147\u0148\3\2\2\2")
        buf.write("\u0148\u014a\3\2\2\2\u0149\u0147\3\2\2\2\u014a\u014e\7")
        buf.write("\t\2\2\u014b\u014d\5\64\33\2\u014c\u014b\3\2\2\2\u014d")
        buf.write("\u0150\3\2\2\2\u014e\u014c\3\2\2\2\u014e\u014f\3\2\2\2")
        buf.write("\u014f\u0151\3\2\2\2\u0150\u014e\3\2\2\2\u0151\u0153\5")
        buf.write("(\25\2\u0152\u0147\3\2\2\2\u0153\u0156\3\2\2\2\u0154\u0152")
        buf.write("\3\2\2\2\u0154\u0155\3\2\2\2\u0155\u015a\3\2\2\2\u0156")
        buf.write("\u0154\3\2\2\2\u0157\u0159\5\64\33\2\u0158\u0157\3\2\2")
        buf.write("\2\u0159\u015c\3\2\2\2\u015a\u0158\3\2\2\2\u015a\u015b")
        buf.write("\3\2\2\2\u015b\u0164\3\2\2\2\u015c\u015a\3\2\2\2\u015d")
        buf.write("\u0161\7\t\2\2\u015e\u0160\5\64\33\2\u015f\u015e\3\2\2")
        buf.write("\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161\u0162")
        buf.write("\3\2\2\2\u0162\u0165\3\2\2\2\u0163\u0161\3\2\2\2\u0164")
        buf.write("\u015d\3\2\2\2\u0164\u0165\3\2\2\2\u0165\u0166\3\2\2\2")
        buf.write("\u0166\u0167\7\b\2\2\u0167\u0171\3\2\2\2\u0168\u016c\7")
        buf.write("\7\2\2\u0169\u016b\5\64\33\2\u016a\u0169\3\2\2\2\u016b")
        buf.write("\u016e\3\2\2\2\u016c\u016a\3\2\2\2\u016c\u016d\3\2\2\2")
        buf.write("\u016d\u016f\3\2\2\2\u016e\u016c\3\2\2\2\u016f\u0171\7")
        buf.write("\b\2\2\u0170\u013c\3\2\2\2\u0170\u0168\3\2\2\2\u0171\'")
        buf.write("\3\2\2\2\u0172\u0176\5.\30\2\u0173\u0175\5\64\33\2\u0174")
        buf.write("\u0173\3\2\2\2\u0175\u0178\3\2\2\2\u0176\u0174\3\2\2\2")
        buf.write("\u0176\u0177\3\2\2\2\u0177\u0179\3\2\2\2\u0178\u0176\3")
        buf.write("\2\2\2\u0179\u017d\7\n\2\2\u017a\u017c\5\64\33\2\u017b")
        buf.write("\u017a\3\2\2\2\u017c\u017f\3\2\2\2\u017d\u017b\3\2\2\2")
        buf.write("\u017d\u017e\3\2\2\2\u017e\u0183\3\2\2\2\u017f\u017d\3")
        buf.write("\2\2\2\u0180\u0182\5\22\n\2\u0181\u0180\3\2\2\2\u0182")
        buf.write("\u0185\3\2\2\2\u0183\u0181\3\2\2\2\u0183\u0184\3\2\2\2")
        buf.write("\u0184\u0186\3\2\2\2\u0185\u0183\3\2\2\2\u0186\u0187\5")
        buf.write("\b\5\2\u0187)\3\2\2\2\u0188\u018b\7\20\2\2\u0189\u018b")
        buf.write("\5,\27\2\u018a\u0188\3\2\2\2\u018a\u0189\3\2\2\2\u018b")
        buf.write("+\3\2\2\2\u018c\u018d\7\20\2\2\u018d\u018e\7\13\2\2\u018e")
        buf.write("\u0193\7\20\2\2\u018f\u0190\7\20\2\2\u0190\u0191\7\13")
        buf.write("\2\2\u0191\u0193\7\21\2\2\u0192\u018c\3\2\2\2\u0192\u018f")
        buf.write("\3\2\2\2\u0193-\3\2\2\2\u0194\u01a2\5\62\32\2\u0195\u01a2")
        buf.write("\7\34\2\2\u0196\u0198\5\64\33\2\u0197\u0196\3\2\2\2\u0198")
        buf.write("\u019b\3\2\2\2\u0199\u0197\3\2\2\2\u0199\u019a\3\2\2\2")
        buf.write("\u019a\u019c\3\2\2\2\u019b\u0199\3\2\2\2\u019c\u019e\7")
        buf.write("\35\2\2\u019d\u0199\3\2\2\2\u019e\u019f\3\2\2\2\u019f")
        buf.write("\u019d\3\2\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a2\3\2\2\2")
        buf.write("\u01a1\u0194\3\2\2\2\u01a1\u0195\3\2\2\2\u01a1\u019d\3")
        buf.write("\2\2\2\u01a2/\3\2\2\2\u01a3\u01b1\7\32\2\2\u01a4\u01b1")
        buf.write("\7\34\2\2\u01a5\u01a7\5\64\33\2\u01a6\u01a5\3\2\2\2\u01a7")
        buf.write("\u01aa\3\2\2\2\u01a8\u01a6\3\2\2\2\u01a8\u01a9\3\2\2\2")
        buf.write("\u01a9\u01ab\3\2\2\2\u01aa\u01a8\3\2\2\2\u01ab\u01ad\7")
        buf.write("\35\2\2\u01ac\u01a8\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae")
        buf.write("\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b1\3\2\2\2")
        buf.write("\u01b0\u01a3\3\2\2\2\u01b0\u01a4\3\2\2\2\u01b0\u01ac\3")
        buf.write("\2\2\2\u01b1\61\3\2\2\2\u01b2\u01b3\t\4\2\2\u01b3\63\3")
        buf.write("\2\2\2\u01b4\u01b5\t\5\2\2\u01b5\65\3\2\2\299?EIPinv\177")
        buf.write("\u0083\u008a\u0092\u009a\u00a1\u00a9\u00b0\u00b7\u00be")
        buf.write("\u00c4\u00ca\u00d1\u00d4\u00dc\u00e0\u00e6\u00ec\u00f2")
        buf.write("\u00f6\u00fd\u011f\u0126\u012c\u012e\u0135\u013a\u0140")
        buf.write("\u0147\u014e\u0154\u015a\u0161\u0164\u016c\u0170\u0176")
        buf.write("\u017d\u0183\u018a\u0192\u0199\u019f\u01a1\u01a8\u01ae")
        buf.write("\u01b0")
        return buf.getvalue()


class IonTextParser ( Parser ):

    grammarFileName = "IonText.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'['", "']'", "'('", "')'", "'{'", "'}'", 
                     "','", "':'", "'.'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'null'" ]

    symbolicNames = [ "<INVALID>", "L_BRACKET", "R_BRACKET", "L_PAREN", 
                      "R_PAREN", "L_CURLY", "R_CURLY", "COMMA", "COLON", 
                      "DOT", "NON_DOT_OPERATOR", "WHITESPACE", "INLINE_COMMENT", 
                      "BLOCK_COMMENT", "NULL", "TYPE", "BOOL", "TIMESTAMP", 
                      "BIN_INTEGER", "DEC_INTEGER", "HEX_INTEGER", "SPECIAL_FLOAT", 
                      "FLOAT", "DECIMAL", "QUOTED_SYMBOL", "IDENTIFIER_SYMBOL", 
                      "SHORT_QUOTED_STRING", "LONG_QUOTED_STRING", "SHORT_QUOTED_CLOB", 
                      "LONG_QUOTED_CLOB", "BLOB" ]

    RULE_top_level = 0
    RULE_top_level_value = 1
    RULE_value = 2
    RULE_entity = 3
    RULE_delimiting_entity = 4
    RULE_keyword_delimiting_entity = 5
    RULE_keyword_entity = 6
    RULE_numeric_entity = 7
    RULE_annotation = 8
    RULE_quoted_annotation = 9
    RULE_list_type = 10
    RULE_sexp = 11
    RULE_sexp_value = 12
    RULE_sexp_delimiting_entity = 13
    RULE_sexp_keyword_delimiting_entity = 14
    RULE_sexp_null_delimiting_entity = 15
    RULE_sexp_keyword_entity = 16
    RULE_operator = 17
    RULE_struct = 18
    RULE_field = 19
    RULE_any_null = 20
    RULE_typed_null = 21
    RULE_field_name = 22
    RULE_quoted_text = 23
    RULE_symbol = 24
    RULE_ws = 25

    ruleNames =  [ "top_level", "top_level_value", "value", "entity", "delimiting_entity", 
                   "keyword_delimiting_entity", "keyword_entity", "numeric_entity", 
                   "annotation", "quoted_annotation", "list_type", "sexp", 
                   "sexp_value", "sexp_delimiting_entity", "sexp_keyword_delimiting_entity", 
                   "sexp_null_delimiting_entity", "sexp_keyword_entity", 
                   "operator", "struct", "field", "any_null", "typed_null", 
                   "field_name", "quoted_text", "symbol", "ws" ]

    EOF = Token.EOF
    L_BRACKET=1
    R_BRACKET=2
    L_PAREN=3
    R_PAREN=4
    L_CURLY=5
    R_CURLY=6
    COMMA=7
    COLON=8
    DOT=9
    NON_DOT_OPERATOR=10
    WHITESPACE=11
    INLINE_COMMENT=12
    BLOCK_COMMENT=13
    NULL=14
    TYPE=15
    BOOL=16
    TIMESTAMP=17
    BIN_INTEGER=18
    DEC_INTEGER=19
    HEX_INTEGER=20
    SPECIAL_FLOAT=21
    FLOAT=22
    DECIMAL=23
    QUOTED_SYMBOL=24
    IDENTIFIER_SYMBOL=25
    SHORT_QUOTED_STRING=26
    LONG_QUOTED_STRING=27
    SHORT_QUOTED_CLOB=28
    LONG_QUOTED_CLOB=29
    BLOB=30

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



    class Top_levelContext(ParserRuleContext):

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

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

        def top_level_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.Top_level_valueContext)
            else:
                return self.getTypedRuleContext(IonTextParser.Top_level_valueContext,i)


        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def value(self):
            return self.getTypedRuleContext(IonTextParser.ValueContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_top_level

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

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




    def top_level(self):

        localctx = IonTextParser.Top_levelContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_top_level)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 61
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,1,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 55
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,0,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 52
                            self.ws() 
                        self.state = 57
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,0,self._ctx)

                    self.state = 58
                    self.top_level_value() 
                self.state = 63
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,1,self._ctx)

            self.state = 67
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,2,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 64
                    self.ws() 
                self.state = 69
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,2,self._ctx)

            self.state = 71
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.L_BRACKET) | (1 << IonTextParser.L_PAREN) | (1 << IonTextParser.L_CURLY) | (1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT) | (1 << IonTextParser.NULL) | (1 << IonTextParser.TYPE) | (1 << IonTextParser.BOOL) | (1 << IonTextParser.TIMESTAMP) | (1 << IonTextParser.BIN_INTEGER) | (1 << IonTextParser.DEC_INTEGER) | (1 << IonTextParser.HEX_INTEGER) | (1 << IonTextParser.SPECIAL_FLOAT) | (1 << IonTextParser.FLOAT) | (1 << IonTextParser.DECIMAL) | (1 << IonTextParser.QUOTED_SYMBOL) | (1 << IonTextParser.IDENTIFIER_SYMBOL) | (1 << IonTextParser.SHORT_QUOTED_STRING) | (1 << IonTextParser.LONG_QUOTED_STRING) | (1 << IonTextParser.SHORT_QUOTED_CLOB) | (1 << IonTextParser.LONG_QUOTED_CLOB) | (1 << IonTextParser.BLOB))) != 0):
                self.state = 70
                self.value()


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

    class Top_level_valueContext(ParserRuleContext):

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

        def top_level_value(self):
            return self.getTypedRuleContext(IonTextParser.Top_level_valueContext,0)


        def annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(IonTextParser.AnnotationContext,i)


        def delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Delimiting_entityContext,0)


        def numeric_entity(self):
            return self.getTypedRuleContext(IonTextParser.Numeric_entityContext,0)


        def ws(self):
            return self.getTypedRuleContext(IonTextParser.WsContext,0)


        def quoted_annotation(self):
            return self.getTypedRuleContext(IonTextParser.Quoted_annotationContext,0)


        def value(self):
            return self.getTypedRuleContext(IonTextParser.ValueContext,0)


        def keyword_entity(self):
            return self.getTypedRuleContext(IonTextParser.Keyword_entityContext,0)


        def keyword_delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Keyword_delimiting_entityContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_top_level_value

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

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




    def top_level_value(self):

        localctx = IonTextParser.Top_level_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_top_level_value)
        try:
            self.state = 103
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 76 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 75
                        self.annotation()

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

                self.state = 80
                self.top_level_value()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 82
                self.delimiting_entity()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 83
                self.numeric_entity()
                self.state = 84
                self.ws()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 86
                self.numeric_entity()
                self.state = 87
                self.quoted_annotation()
                self.state = 88
                self.value()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 90
                self.numeric_entity()
                self.state = 91
                self.delimiting_entity()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 93
                self.keyword_entity()
                self.state = 94
                self.ws()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 96
                self.keyword_entity()
                self.state = 97
                self.quoted_annotation()
                self.state = 98
                self.value()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 100
                self.keyword_entity()
                self.state = 101
                self.keyword_delimiting_entity()
                pass


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

    class ValueContext(ParserRuleContext):

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

        def entity(self):
            return self.getTypedRuleContext(IonTextParser.EntityContext,0)


        def annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(IonTextParser.AnnotationContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_value

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

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




    def value(self):

        localctx = IonTextParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_value)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 108
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,6,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 105
                    self.annotation() 
                self.state = 110
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,6,self._ctx)

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

    class EntityContext(ParserRuleContext):

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

        def numeric_entity(self):
            return self.getTypedRuleContext(IonTextParser.Numeric_entityContext,0)


        def delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Delimiting_entityContext,0)


        def keyword_entity(self):
            return self.getTypedRuleContext(IonTextParser.Keyword_entityContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_entity

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

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




    def entity(self):

        localctx = IonTextParser.EntityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_entity)
        try:
            self.state = 116
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.TIMESTAMP, IonTextParser.BIN_INTEGER, IonTextParser.DEC_INTEGER, IonTextParser.HEX_INTEGER, IonTextParser.FLOAT, IonTextParser.DECIMAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 113
                self.numeric_entity()
                pass
            elif token in [IonTextParser.L_BRACKET, IonTextParser.L_PAREN, IonTextParser.L_CURLY, IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.QUOTED_SYMBOL, IonTextParser.SHORT_QUOTED_STRING, IonTextParser.LONG_QUOTED_STRING, IonTextParser.SHORT_QUOTED_CLOB, IonTextParser.LONG_QUOTED_CLOB, IonTextParser.BLOB]:
                self.enterOuterAlt(localctx, 2)
                self.state = 114
                self.delimiting_entity()
                pass
            elif token in [IonTextParser.NULL, IonTextParser.TYPE, IonTextParser.BOOL, IonTextParser.SPECIAL_FLOAT, IonTextParser.IDENTIFIER_SYMBOL]:
                self.enterOuterAlt(localctx, 3)
                self.state = 115
                self.keyword_entity()
                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 Delimiting_entityContext(ParserRuleContext):

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

        def quoted_text(self):
            return self.getTypedRuleContext(IonTextParser.Quoted_textContext,0)


        def SHORT_QUOTED_CLOB(self):
            return self.getToken(IonTextParser.SHORT_QUOTED_CLOB, 0)

        def LONG_QUOTED_CLOB(self):
            return self.getToken(IonTextParser.LONG_QUOTED_CLOB, 0)

        def BLOB(self):
            return self.getToken(IonTextParser.BLOB, 0)

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


        def sexp(self):
            return self.getTypedRuleContext(IonTextParser.SexpContext,0)


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


        def getRuleIndex(self):
            return IonTextParser.RULE_delimiting_entity

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

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




    def delimiting_entity(self):

        localctx = IonTextParser.Delimiting_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_delimiting_entity)
        try:
            self.state = 125
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.QUOTED_SYMBOL, IonTextParser.SHORT_QUOTED_STRING, IonTextParser.LONG_QUOTED_STRING]:
                self.enterOuterAlt(localctx, 1)
                self.state = 118
                self.quoted_text()
                pass
            elif token in [IonTextParser.SHORT_QUOTED_CLOB]:
                self.enterOuterAlt(localctx, 2)
                self.state = 119
                self.match(IonTextParser.SHORT_QUOTED_CLOB)
                pass
            elif token in [IonTextParser.LONG_QUOTED_CLOB]:
                self.enterOuterAlt(localctx, 3)
                self.state = 120
                self.match(IonTextParser.LONG_QUOTED_CLOB)
                pass
            elif token in [IonTextParser.BLOB]:
                self.enterOuterAlt(localctx, 4)
                self.state = 121
                self.match(IonTextParser.BLOB)
                pass
            elif token in [IonTextParser.L_BRACKET]:
                self.enterOuterAlt(localctx, 5)
                self.state = 122
                self.list_type()
                pass
            elif token in [IonTextParser.L_PAREN]:
                self.enterOuterAlt(localctx, 6)
                self.state = 123
                self.sexp()
                pass
            elif token in [IonTextParser.L_CURLY]:
                self.enterOuterAlt(localctx, 7)
                self.state = 124
                self.struct()
                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 Keyword_delimiting_entityContext(ParserRuleContext):

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

        def delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Delimiting_entityContext,0)


        def numeric_entity(self):
            return self.getTypedRuleContext(IonTextParser.Numeric_entityContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_keyword_delimiting_entity

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

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




    def keyword_delimiting_entity(self):

        localctx = IonTextParser.Keyword_delimiting_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_keyword_delimiting_entity)
        try:
            self.state = 129
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.L_BRACKET, IonTextParser.L_PAREN, IonTextParser.L_CURLY, IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.QUOTED_SYMBOL, IonTextParser.SHORT_QUOTED_STRING, IonTextParser.LONG_QUOTED_STRING, IonTextParser.SHORT_QUOTED_CLOB, IonTextParser.LONG_QUOTED_CLOB, IonTextParser.BLOB]:
                self.enterOuterAlt(localctx, 1)
                self.state = 127
                self.delimiting_entity()
                pass
            elif token in [IonTextParser.TIMESTAMP, IonTextParser.BIN_INTEGER, IonTextParser.DEC_INTEGER, IonTextParser.HEX_INTEGER, IonTextParser.FLOAT, IonTextParser.DECIMAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 128
                self.numeric_entity()
                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 Keyword_entityContext(ParserRuleContext):

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

        def any_null(self):
            return self.getTypedRuleContext(IonTextParser.Any_nullContext,0)


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

        def SPECIAL_FLOAT(self):
            return self.getToken(IonTextParser.SPECIAL_FLOAT, 0)

        def IDENTIFIER_SYMBOL(self):
            return self.getToken(IonTextParser.IDENTIFIER_SYMBOL, 0)

        def TYPE(self):
            return self.getToken(IonTextParser.TYPE, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_keyword_entity

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

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




    def keyword_entity(self):

        localctx = IonTextParser.Keyword_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_keyword_entity)
        try:
            self.state = 136
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.NULL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 131
                self.any_null()
                pass
            elif token in [IonTextParser.BOOL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 132
                self.match(IonTextParser.BOOL)
                pass
            elif token in [IonTextParser.SPECIAL_FLOAT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 133
                self.match(IonTextParser.SPECIAL_FLOAT)
                pass
            elif token in [IonTextParser.IDENTIFIER_SYMBOL]:
                self.enterOuterAlt(localctx, 4)
                self.state = 134
                self.match(IonTextParser.IDENTIFIER_SYMBOL)
                pass
            elif token in [IonTextParser.TYPE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 135
                self.match(IonTextParser.TYPE)
                pass
            else:
                raise NoViableAltException(self)

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

    class Numeric_entityContext(ParserRuleContext):

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

        def BIN_INTEGER(self):
            return self.getToken(IonTextParser.BIN_INTEGER, 0)

        def DEC_INTEGER(self):
            return self.getToken(IonTextParser.DEC_INTEGER, 0)

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

        def TIMESTAMP(self):
            return self.getToken(IonTextParser.TIMESTAMP, 0)

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

        def DECIMAL(self):
            return self.getToken(IonTextParser.DECIMAL, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_numeric_entity

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

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




    def numeric_entity(self):

        localctx = IonTextParser.Numeric_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_numeric_entity)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 138
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.TIMESTAMP) | (1 << IonTextParser.BIN_INTEGER) | (1 << IonTextParser.DEC_INTEGER) | (1 << IonTextParser.HEX_INTEGER) | (1 << IonTextParser.FLOAT) | (1 << IonTextParser.DECIMAL))) != 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 AnnotationContext(ParserRuleContext):

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

        def symbol(self):
            return self.getTypedRuleContext(IonTextParser.SymbolContext,0)


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

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_annotation

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

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




    def annotation(self):

        localctx = IonTextParser.AnnotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_annotation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 140
            self.symbol()
            self.state = 144
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                self.state = 141
                self.ws()
                self.state = 146
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 147
            self.match(IonTextParser.COLON)
            self.state = 148
            self.match(IonTextParser.COLON)
            self.state = 152
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,12,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 149
                    self.ws() 
                self.state = 154
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,12,self._ctx)

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

    class Quoted_annotationContext(ParserRuleContext):

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

        def QUOTED_SYMBOL(self):
            return self.getToken(IonTextParser.QUOTED_SYMBOL, 0)

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

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_quoted_annotation

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

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




    def quoted_annotation(self):

        localctx = IonTextParser.Quoted_annotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_quoted_annotation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 155
            self.match(IonTextParser.QUOTED_SYMBOL)
            self.state = 159
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                self.state = 156
                self.ws()
                self.state = 161
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 162
            self.match(IonTextParser.COLON)
            self.state = 163
            self.match(IonTextParser.COLON)
            self.state = 167
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,14,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 164
                    self.ws() 
                self.state = 169
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,14,self._ctx)

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

    class List_typeContext(ParserRuleContext):

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

        def L_BRACKET(self):
            return self.getToken(IonTextParser.L_BRACKET, 0)

        def value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.ValueContext)
            else:
                return self.getTypedRuleContext(IonTextParser.ValueContext,i)


        def R_BRACKET(self):
            return self.getToken(IonTextParser.R_BRACKET, 0)

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


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

        def getRuleIndex(self):
            return IonTextParser.RULE_list_type

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

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




    def list_type(self):

        localctx = IonTextParser.List_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_list_type)
        self._la = 0 # Token type
        try:
            self.state = 222
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 170
                self.match(IonTextParser.L_BRACKET)
                self.state = 174
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,15,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 171
                        self.ws() 
                    self.state = 176
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,15,self._ctx)

                self.state = 177
                self.value()
                self.state = 181
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,16,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 178
                        self.ws() 
                    self.state = 183
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,16,self._ctx)

                self.state = 194
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,18,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 184
                        self.match(IonTextParser.COMMA)
                        self.state = 188
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,17,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 185
                                self.ws() 
                            self.state = 190
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

                        self.state = 191
                        self.value() 
                    self.state = 196
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,18,self._ctx)

                self.state = 200
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                    self.state = 197
                    self.ws()
                    self.state = 202
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 210
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==IonTextParser.COMMA:
                    self.state = 203
                    self.match(IonTextParser.COMMA)
                    self.state = 207
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                        self.state = 204
                        self.ws()
                        self.state = 209
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 212
                self.match(IonTextParser.R_BRACKET)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 214
                self.match(IonTextParser.L_BRACKET)
                self.state = 218
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                    self.state = 215
                    self.ws()
                    self.state = 220
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 221
                self.match(IonTextParser.R_BRACKET)
                pass


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

    class SexpContext(ParserRuleContext):

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

        def L_PAREN(self):
            return self.getToken(IonTextParser.L_PAREN, 0)

        def R_PAREN(self):
            return self.getToken(IonTextParser.R_PAREN, 0)

        def sexp_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.Sexp_valueContext)
            else:
                return self.getTypedRuleContext(IonTextParser.Sexp_valueContext,i)


        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def value(self):
            return self.getTypedRuleContext(IonTextParser.ValueContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_sexp

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

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




    def sexp(self):

        localctx = IonTextParser.SexpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_sexp)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 224
            self.match(IonTextParser.L_PAREN)
            self.state = 234
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 228
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,24,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 225
                            self.ws() 
                        self.state = 230
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,24,self._ctx)

                    self.state = 231
                    self.sexp_value() 
                self.state = 236
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

            self.state = 240
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,26,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 237
                    self.ws() 
                self.state = 242
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,26,self._ctx)

            self.state = 244
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.L_BRACKET) | (1 << IonTextParser.L_PAREN) | (1 << IonTextParser.L_CURLY) | (1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT) | (1 << IonTextParser.NULL) | (1 << IonTextParser.TYPE) | (1 << IonTextParser.BOOL) | (1 << IonTextParser.TIMESTAMP) | (1 << IonTextParser.BIN_INTEGER) | (1 << IonTextParser.DEC_INTEGER) | (1 << IonTextParser.HEX_INTEGER) | (1 << IonTextParser.SPECIAL_FLOAT) | (1 << IonTextParser.FLOAT) | (1 << IonTextParser.DECIMAL) | (1 << IonTextParser.QUOTED_SYMBOL) | (1 << IonTextParser.IDENTIFIER_SYMBOL) | (1 << IonTextParser.SHORT_QUOTED_STRING) | (1 << IonTextParser.LONG_QUOTED_STRING) | (1 << IonTextParser.SHORT_QUOTED_CLOB) | (1 << IonTextParser.LONG_QUOTED_CLOB) | (1 << IonTextParser.BLOB))) != 0):
                self.state = 243
                self.value()


            self.state = 246
            self.match(IonTextParser.R_PAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Sexp_valueContext(ParserRuleContext):

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

        def sexp_value(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_valueContext,0)


        def annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(IonTextParser.AnnotationContext,i)


        def sexp_delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_delimiting_entityContext,0)


        def operator(self):
            return self.getTypedRuleContext(IonTextParser.OperatorContext,0)


        def numeric_entity(self):
            return self.getTypedRuleContext(IonTextParser.Numeric_entityContext,0)


        def ws(self):
            return self.getTypedRuleContext(IonTextParser.WsContext,0)


        def quoted_annotation(self):
            return self.getTypedRuleContext(IonTextParser.Quoted_annotationContext,0)


        def value(self):
            return self.getTypedRuleContext(IonTextParser.ValueContext,0)


        def sexp_keyword_entity(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_keyword_entityContext,0)


        def sexp_keyword_delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_keyword_delimiting_entityContext,0)


        def NULL(self):
            return self.getToken(IonTextParser.NULL, 0)

        def sexp_null_delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_null_delimiting_entityContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_sexp_value

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

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




    def sexp_value(self):

        localctx = IonTextParser.Sexp_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_sexp_value)
        try:
            self.state = 285
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,29,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 249 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 248
                        self.annotation()

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

                self.state = 253
                self.sexp_value()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 255
                self.sexp_delimiting_entity()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 256
                self.operator()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 257
                self.numeric_entity()
                self.state = 258
                self.ws()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 260
                self.numeric_entity()
                self.state = 261
                self.quoted_annotation()
                self.state = 262
                self.value()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 264
                self.numeric_entity()
                self.state = 265
                self.sexp_delimiting_entity()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 267
                self.sexp_keyword_entity()
                self.state = 268
                self.ws()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 270
                self.sexp_keyword_entity()
                self.state = 271
                self.quoted_annotation()
                self.state = 272
                self.value()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 274
                self.sexp_keyword_entity()
                self.state = 275
                self.sexp_keyword_delimiting_entity()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 277
                self.match(IonTextParser.NULL)
                self.state = 278
                self.ws()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 279
                self.match(IonTextParser.NULL)
                self.state = 280
                self.quoted_annotation()
                self.state = 281
                self.value()
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 283
                self.match(IonTextParser.NULL)
                self.state = 284
                self.sexp_null_delimiting_entity()
                pass


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

    class Sexp_delimiting_entityContext(ParserRuleContext):

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

        def delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Delimiting_entityContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_sexp_delimiting_entity

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

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




    def sexp_delimiting_entity(self):

        localctx = IonTextParser.Sexp_delimiting_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_sexp_delimiting_entity)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 287
            self.delimiting_entity()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Sexp_keyword_delimiting_entityContext(ParserRuleContext):

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

        def sexp_delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Sexp_delimiting_entityContext,0)


        def numeric_entity(self):
            return self.getTypedRuleContext(IonTextParser.Numeric_entityContext,0)


        def operator(self):
            return self.getTypedRuleContext(IonTextParser.OperatorContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_sexp_keyword_delimiting_entity

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

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




    def sexp_keyword_delimiting_entity(self):

        localctx = IonTextParser.Sexp_keyword_delimiting_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_sexp_keyword_delimiting_entity)
        try:
            self.state = 292
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.L_BRACKET, IonTextParser.L_PAREN, IonTextParser.L_CURLY, IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.QUOTED_SYMBOL, IonTextParser.SHORT_QUOTED_STRING, IonTextParser.LONG_QUOTED_STRING, IonTextParser.SHORT_QUOTED_CLOB, IonTextParser.LONG_QUOTED_CLOB, IonTextParser.BLOB]:
                self.enterOuterAlt(localctx, 1)
                self.state = 289
                self.sexp_delimiting_entity()
                pass
            elif token in [IonTextParser.TIMESTAMP, IonTextParser.BIN_INTEGER, IonTextParser.DEC_INTEGER, IonTextParser.HEX_INTEGER, IonTextParser.FLOAT, IonTextParser.DECIMAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 290
                self.numeric_entity()
                pass
            elif token in [IonTextParser.DOT, IonTextParser.NON_DOT_OPERATOR]:
                self.enterOuterAlt(localctx, 3)
                self.state = 291
                self.operator()
                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 Sexp_null_delimiting_entityContext(ParserRuleContext):

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

        def delimiting_entity(self):
            return self.getTypedRuleContext(IonTextParser.Delimiting_entityContext,0)


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

        def getRuleIndex(self):
            return IonTextParser.RULE_sexp_null_delimiting_entity

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

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




    def sexp_null_delimiting_entity(self):

        localctx = IonTextParser.Sexp_null_delimiting_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_sexp_null_delimiting_entity)
        try:
            self.state = 300
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.L_BRACKET, IonTextParser.L_PAREN, IonTextParser.L_CURLY, IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.QUOTED_SYMBOL, IonTextParser.SHORT_QUOTED_STRING, IonTextParser.LONG_QUOTED_STRING, IonTextParser.SHORT_QUOTED_CLOB, IonTextParser.LONG_QUOTED_CLOB, IonTextParser.BLOB]:
                self.enterOuterAlt(localctx, 1)
                self.state = 294
                self.delimiting_entity()
                pass
            elif token in [IonTextParser.NON_DOT_OPERATOR]:
                self.enterOuterAlt(localctx, 2)
                self.state = 296 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 295
                        self.match(IonTextParser.NON_DOT_OPERATOR)

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

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

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

        def typed_null(self):
            return self.getTypedRuleContext(IonTextParser.Typed_nullContext,0)


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

        def SPECIAL_FLOAT(self):
            return self.getToken(IonTextParser.SPECIAL_FLOAT, 0)

        def IDENTIFIER_SYMBOL(self):
            return self.getToken(IonTextParser.IDENTIFIER_SYMBOL, 0)

        def TYPE(self):
            return self.getToken(IonTextParser.TYPE, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_sexp_keyword_entity

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

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




    def sexp_keyword_entity(self):

        localctx = IonTextParser.Sexp_keyword_entityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_sexp_keyword_entity)
        try:
            self.state = 307
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.NULL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 302
                self.typed_null()
                pass
            elif token in [IonTextParser.BOOL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 303
                self.match(IonTextParser.BOOL)
                pass
            elif token in [IonTextParser.SPECIAL_FLOAT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 304
                self.match(IonTextParser.SPECIAL_FLOAT)
                pass
            elif token in [IonTextParser.IDENTIFIER_SYMBOL]:
                self.enterOuterAlt(localctx, 4)
                self.state = 305
                self.match(IonTextParser.IDENTIFIER_SYMBOL)
                pass
            elif token in [IonTextParser.TYPE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 306
                self.match(IonTextParser.TYPE)
                pass
            else:
                raise NoViableAltException(self)

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

    class OperatorContext(ParserRuleContext):

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

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

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

        def getRuleIndex(self):
            return IonTextParser.RULE_operator

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

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




    def operator(self):

        localctx = IonTextParser.OperatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_operator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 310 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 309
                    _la = self._input.LA(1)
                    if not(_la==IonTextParser.DOT or _la==IonTextParser.NON_DOT_OPERATOR):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()

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

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

    class StructContext(ParserRuleContext):

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

        def L_CURLY(self):
            return self.getToken(IonTextParser.L_CURLY, 0)

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


        def R_CURLY(self):
            return self.getToken(IonTextParser.R_CURLY, 0)

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


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

        def getRuleIndex(self):
            return IonTextParser.RULE_struct

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

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




    def struct(self):

        localctx = IonTextParser.StructContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_struct)
        self._la = 0 # Token type
        try:
            self.state = 366
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 314
                self.match(IonTextParser.L_CURLY)
                self.state = 318
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,35,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 315
                        self.ws() 
                    self.state = 320
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,35,self._ctx)

                self.state = 321
                self.field()
                self.state = 338
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,38,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 325
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                            self.state = 322
                            self.ws()
                            self.state = 327
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)

                        self.state = 328
                        self.match(IonTextParser.COMMA)
                        self.state = 332
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,37,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 329
                                self.ws() 
                            self.state = 334
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,37,self._ctx)

                        self.state = 335
                        self.field() 
                    self.state = 340
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,38,self._ctx)

                self.state = 344
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                    self.state = 341
                    self.ws()
                    self.state = 346
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 354
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==IonTextParser.COMMA:
                    self.state = 347
                    self.match(IonTextParser.COMMA)
                    self.state = 351
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                        self.state = 348
                        self.ws()
                        self.state = 353
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 356
                self.match(IonTextParser.R_CURLY)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 358
                self.match(IonTextParser.L_CURLY)
                self.state = 362
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                    self.state = 359
                    self.ws()
                    self.state = 364
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 365
                self.match(IonTextParser.R_CURLY)
                pass


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

    class FieldContext(ParserRuleContext):

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

        def field_name(self):
            return self.getTypedRuleContext(IonTextParser.Field_nameContext,0)


        def COLON(self):
            return self.getToken(IonTextParser.COLON, 0)

        def entity(self):
            return self.getTypedRuleContext(IonTextParser.EntityContext,0)


        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(IonTextParser.AnnotationContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_field

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

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




    def field(self):

        localctx = IonTextParser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_field)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 368
            self.field_name()
            self.state = 372
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                self.state = 369
                self.ws()
                self.state = 374
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 375
            self.match(IonTextParser.COLON)
            self.state = 379
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,45,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 376
                    self.ws() 
                self.state = 381
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,45,self._ctx)

            self.state = 385
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,46,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 382
                    self.annotation() 
                self.state = 387
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,46,self._ctx)

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

    class Any_nullContext(ParserRuleContext):

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

        def NULL(self):
            return self.getToken(IonTextParser.NULL, 0)

        def typed_null(self):
            return self.getTypedRuleContext(IonTextParser.Typed_nullContext,0)


        def getRuleIndex(self):
            return IonTextParser.RULE_any_null

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

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




    def any_null(self):

        localctx = IonTextParser.Any_nullContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_any_null)
        try:
            self.state = 392
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,47,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 390
                self.match(IonTextParser.NULL)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 391
                self.typed_null()
                pass


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

    class Typed_nullContext(ParserRuleContext):

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

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

        def DOT(self):
            return self.getToken(IonTextParser.DOT, 0)

        def TYPE(self):
            return self.getToken(IonTextParser.TYPE, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_typed_null

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

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




    def typed_null(self):

        localctx = IonTextParser.Typed_nullContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_typed_null)
        try:
            self.state = 400
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 394
                self.match(IonTextParser.NULL)
                self.state = 395
                self.match(IonTextParser.DOT)
                self.state = 396
                self.match(IonTextParser.NULL)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 397
                self.match(IonTextParser.NULL)
                self.state = 398
                self.match(IonTextParser.DOT)
                self.state = 399
                self.match(IonTextParser.TYPE)
                pass


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

    class Field_nameContext(ParserRuleContext):

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

        def symbol(self):
            return self.getTypedRuleContext(IonTextParser.SymbolContext,0)


        def SHORT_QUOTED_STRING(self):
            return self.getToken(IonTextParser.SHORT_QUOTED_STRING, 0)

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

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_field_name

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

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




    def field_name(self):

        localctx = IonTextParser.Field_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_field_name)
        self._la = 0 # Token type
        try:
            self.state = 415
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.TYPE, IonTextParser.QUOTED_SYMBOL, IonTextParser.IDENTIFIER_SYMBOL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 402
                self.symbol()
                pass
            elif token in [IonTextParser.SHORT_QUOTED_STRING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 403
                self.match(IonTextParser.SHORT_QUOTED_STRING)
                pass
            elif token in [IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.LONG_QUOTED_STRING]:
                self.enterOuterAlt(localctx, 3)
                self.state = 411 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 407
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                            self.state = 404
                            self.ws()
                            self.state = 409
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)

                        self.state = 410
                        self.match(IonTextParser.LONG_QUOTED_STRING)

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

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

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

        def QUOTED_SYMBOL(self):
            return self.getToken(IonTextParser.QUOTED_SYMBOL, 0)

        def SHORT_QUOTED_STRING(self):
            return self.getToken(IonTextParser.SHORT_QUOTED_STRING, 0)

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

        def ws(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(IonTextParser.WsContext)
            else:
                return self.getTypedRuleContext(IonTextParser.WsContext,i)


        def getRuleIndex(self):
            return IonTextParser.RULE_quoted_text

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

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




    def quoted_text(self):

        localctx = IonTextParser.Quoted_textContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_quoted_text)
        self._la = 0 # Token type
        try:
            self.state = 430
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [IonTextParser.QUOTED_SYMBOL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 417
                self.match(IonTextParser.QUOTED_SYMBOL)
                pass
            elif token in [IonTextParser.SHORT_QUOTED_STRING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 418
                self.match(IonTextParser.SHORT_QUOTED_STRING)
                pass
            elif token in [IonTextParser.WHITESPACE, IonTextParser.INLINE_COMMENT, IonTextParser.BLOCK_COMMENT, IonTextParser.LONG_QUOTED_STRING]:
                self.enterOuterAlt(localctx, 3)
                self.state = 426 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 422
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 0):
                            self.state = 419
                            self.ws()
                            self.state = 424
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)

                        self.state = 425
                        self.match(IonTextParser.LONG_QUOTED_STRING)

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

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

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

        def IDENTIFIER_SYMBOL(self):
            return self.getToken(IonTextParser.IDENTIFIER_SYMBOL, 0)

        def TYPE(self):
            return self.getToken(IonTextParser.TYPE, 0)

        def QUOTED_SYMBOL(self):
            return self.getToken(IonTextParser.QUOTED_SYMBOL, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_symbol

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

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




    def symbol(self):

        localctx = IonTextParser.SymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_symbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 432
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.TYPE) | (1 << IonTextParser.QUOTED_SYMBOL) | (1 << IonTextParser.IDENTIFIER_SYMBOL))) != 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 WsContext(ParserRuleContext):

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

        def WHITESPACE(self):
            return self.getToken(IonTextParser.WHITESPACE, 0)

        def INLINE_COMMENT(self):
            return self.getToken(IonTextParser.INLINE_COMMENT, 0)

        def BLOCK_COMMENT(self):
            return self.getToken(IonTextParser.BLOCK_COMMENT, 0)

        def getRuleIndex(self):
            return IonTextParser.RULE_ws

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

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




    def ws(self):

        localctx = IonTextParser.WsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_ws)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << IonTextParser.WHITESPACE) | (1 << IonTextParser.INLINE_COMMENT) | (1 << IonTextParser.BLOCK_COMMENT))) != 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





