text:
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys

def serializedATN():
    with StringIO() as buf:
        buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3")
        buf.write(u"D\u01f7\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t")
        buf.write(u"\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
        buf.write(u"\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4")
        buf.write(u"\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30")
        buf.write(u"\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t")
        buf.write(u"\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$")
        buf.write(u"\t$\4%\t%\4&\t&\4\'\t\'\3\2\3\2\3\2\3\2\3\2\5\2T\n\2")
        buf.write(u"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4")
        buf.write(u"\7\4c\n\4\f\4\16\4f\13\4\5\4h\n\4\3\5\3\5\3\5\3\5\3\5")
        buf.write(u"\3\5\5\5p\n\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5y\n\5\7")
        buf.write(u"\5{\n\5\f\5\16\5~\13\5\3\5\5\5\u0081\n\5\3\6\3\6\3\6")
        buf.write(u"\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t")
        buf.write(u"\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write(u"\3\13\3\13\3\13\5\13\u00a2\n\13\3\f\3\f\3\f\3\f\3\f\3")
        buf.write(u"\f\3\f\5\f\u00ab\n\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r")
        buf.write(u"\3\r\7\r\u00b6\n\r\f\r\16\r\u00b9\13\r\3\r\3\r\3\r\3")
        buf.write(u"\r\3\r\3\r\7\r\u00c1\n\r\f\r\16\r\u00c4\13\r\5\r\u00c6")
        buf.write(u"\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u00cd\n\16\f\16\16\16")
        buf.write(u"\u00d0\13\16\3\16\3\16\7\16\u00d4\n\16\f\16\16\16\u00d7")
        buf.write(u"\13\16\5\16\u00d9\n\16\3\17\3\17\3\17\3\17\3\17\3\17")
        buf.write(u"\3\17\7\17\u00e2\n\17\f\17\16\17\u00e5\13\17\3\17\3\17")
        buf.write(u"\3\20\3\20\3\20\3\20\3\20\3\20\3\20\7\20\u00f0\n\20\f")
        buf.write(u"\20\16\20\u00f3\13\20\3\20\3\20\3\20\3\20\3\20\3\20\3")
        buf.write(u"\20\7\20\u00fc\n\20\f\20\16\20\u00ff\13\20\3\20\3\20")
        buf.write(u"\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\5\22\u010c")
        buf.write(u"\n\22\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u0114\n\23\f")
        buf.write(u"\23\16\23\u0117\13\23\3\24\3\24\3\24\3\24\3\24\3\24\7")
        buf.write(u"\24\u011f\n\24\f\24\16\24\u0122\13\24\3\25\3\25\3\25")
        buf.write(u"\3\25\3\25\3\25\3\25\7\25\u012b\n\25\f\25\16\25\u012e")
        buf.write(u"\13\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\7\26\u0137")
        buf.write(u"\n\26\f\26\16\26\u013a\13\26\3\27\3\27\3\27\3\27\3\27")
        buf.write(u"\3\27\3\27\7\27\u0143\n\27\f\27\16\27\u0146\13\27\3\30")
        buf.write(u"\3\30\3\30\3\30\3\30\3\30\3\30\7\30\u014f\n\30\f\30\16")
        buf.write(u"\30\u0152\13\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3")
        buf.write(u"\31\3\31\3\31\5\31\u015e\n\31\3\32\3\32\3\32\3\32\3\32")
        buf.write(u"\3\32\3\32\3\32\3\32\3\32\3\32\3\32\7\32\u016c\n\32\f")
        buf.write(u"\32\16\32\u016f\13\32\5\32\u0171\n\32\3\33\3\33\3\33")
        buf.write(u"\3\33\3\33\3\33\3\33\3\33\7\33\u017b\n\33\f\33\16\33")
        buf.write(u"\u017e\13\33\5\33\u0180\n\33\3\33\3\33\3\33\3\33\3\33")
        buf.write(u"\3\33\3\33\3\33\3\33\5\33\u018b\n\33\3\34\3\34\3\34\3")
        buf.write(u"\34\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\37\3\37")
        buf.write(u"\3\37\3\37\3\37\3\37\3\37\7\37\u01a0\n\37\f\37\16\37")
        buf.write(u"\u01a3\13\37\3\37\3\37\3\37\3\37\3\37\3\37\7\37\u01ab")
        buf.write(u"\n\37\f\37\16\37\u01ae\13\37\3\37\3\37\3 \3 \3 \3 \3")
        buf.write(u" \3 \3 \3 \7 \u01ba\n \f \16 \u01bd\13 \3 \3 \5 \u01c1")
        buf.write(u"\n \3!\3!\3!\3!\3!\5!\u01c8\n!\3\"\3\"\3\"\3\"\3\"\3")
        buf.write(u"\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\7\"\u01db")
        buf.write(u"\n\"\f\"\16\"\u01de\13\"\5\"\u01e0\n\"\5\"\u01e2\n\"")
        buf.write(u"\3#\3#\3#\3#\7#\u01e8\n#\f#\16#\u01eb\13#\5#\u01ed\n")
        buf.write(u"#\3$\3$\3%\3%\3&\3&\3\'\3\'\3\'\2\b$&(*,.(\2\4\6\b\n")
        buf.write(u"\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:")
        buf.write(u"<>@BDFHJL\2\6\4\2\b\b\n\r\3\2\16\17\4\2\3\3\20\20\4\2")
        buf.write(u"\t\t\21\22\2\u0213\2S\3\2\2\2\4U\3\2\2\2\6g\3\2\2\2\b")
        buf.write(u"o\3\2\2\2\n\u0082\3\2\2\2\f\u0086\3\2\2\2\16\u008d\3")
        buf.write(u"\2\2\2\20\u0091\3\2\2\2\22\u0094\3\2\2\2\24\u00a1\3\2")
        buf.write(u"\2\2\26\u00aa\3\2\2\2\30\u00ac\3\2\2\2\32\u00d8\3\2\2")
        buf.write(u"\2\34\u00da\3\2\2\2\36\u00e8\3\2\2\2 \u0102\3\2\2\2\"")
        buf.write(u"\u010b\3\2\2\2$\u010d\3\2\2\2&\u0118\3\2\2\2(\u0123\3")
        buf.write(u"\2\2\2*\u012f\3\2\2\2,\u013b\3\2\2\2.\u0147\3\2\2\2\60")
        buf.write(u"\u015d\3\2\2\2\62\u0170\3\2\2\2\64\u018a\3\2\2\2\66\u018c")
        buf.write(u"\3\2\2\28\u0190\3\2\2\2:\u0193\3\2\2\2<\u0198\3\2\2\2")
        buf.write(u">\u01b1\3\2\2\2@\u01c2\3\2\2\2B\u01c9\3\2\2\2D\u01ec")
        buf.write(u"\3\2\2\2F\u01ee\3\2\2\2H\u01f0\3\2\2\2J\u01f2\3\2\2\2")
        buf.write(u"L\u01f4\3\2\2\2NT\7>\2\2OT\7?\2\2PT\7A\2\2QT\5\4\3\2")
        buf.write(u"RT\7B\2\2SN\3\2\2\2SO\3\2\2\2SP\3\2\2\2SQ\3\2\2\2SR\3")
        buf.write(u"\2\2\2T\3\3\2\2\2UV\7D\2\2VW\7D\2\2WX\7D\2\2XY\7D\2\2")
        buf.write(u"YZ\7\3\2\2Z[\7D\2\2[\\\7D\2\2\\]\7\3\2\2]^\7D\2\2^_\7")
        buf.write(u"D\2\2_\5\3\2\2\2`h\5\b\5\2ac\5\b\5\2ba\3\2\2\2cf\3\2")
        buf.write(u"\2\2db\3\2\2\2de\3\2\2\2eh\3\2\2\2fd\3\2\2\2g`\3\2\2")
        buf.write(u"\2gd\3\2\2\2h\7\3\2\2\2ip\5\n\6\2jp\5\f\7\2kp\5\16\b")
        buf.write(u"\2lp\5\20\t\2mp\5\22\n\2np\5\24\13\2oi\3\2\2\2oj\3\2")
        buf.write(u"\2\2ok\3\2\2\2ol\3\2\2\2om\3\2\2\2on\3\2\2\2p|\3\2\2")
        buf.write(u"\2qx\7\4\2\2ry\5\n\6\2sy\5\f\7\2ty\5\16\b\2uy\5\20\t")
        buf.write(u"\2vy\5\22\n\2wy\5\24\13\2xr\3\2\2\2xs\3\2\2\2xt\3\2\2")
        buf.write(u"\2xu\3\2\2\2xv\3\2\2\2xw\3\2\2\2y{\3\2\2\2zq\3\2\2\2")
        buf.write(u"{~\3\2\2\2|z\3\2\2\2|}\3\2\2\2}\u0080\3\2\2\2~|\3\2\2")
        buf.write(u"\2\177\u0081\7\4\2\2\u0080\177\3\2\2\2\u0080\u0081\3")
        buf.write(u"\2\2\2\u0081\t\3\2\2\2\u0082\u0083\7\23\2\2\u0083\u0084")
        buf.write(u"\7\24\2\2\u0084\u0085\7>\2\2\u0085\13\3\2\2\2\u0086\u0087")
        buf.write(u"\7\26\2\2\u0087\u0088\7\24\2\2\u0088\u0089\7>\2\2\u0089")
        buf.write(u"\u008a\7\27\2\2\u008a\u008b\7\31\2\2\u008b\u008c\7>\2")
        buf.write(u"\2\u008c\r\3\2\2\2\u008d\u008e\7\30\2\2\u008e\u008f\7")
        buf.write(u"\24\2\2\u008f\u0090\7>\2\2\u0090\17\3\2\2\2\u0091\u0092")
        buf.write(u"\7\32\2\2\u0092\u0093\7\25\2\2\u0093\21\3\2\2\2\u0094")
        buf.write(u"\u0095\7\33\2\2\u0095\u0096\7\24\2\2\u0096\u0097\7>\2")
        buf.write(u"\2\u0097\23\3\2\2\2\u0098\u00a2\5\30\r\2\u0099\u00a2")
        buf.write(u"\5\62\32\2\u009a\u00a2\5\66\34\2\u009b\u00a2\58\35\2")
        buf.write(u"\u009c\u00a2\5:\36\2\u009d\u00a2\5<\37\2\u009e\u00a2")
        buf.write(u"\5> \2\u009f\u00a2\5@!\2\u00a0\u00a2\5B\"\2\u00a1\u0098")
        buf.write(u"\3\2\2\2\u00a1\u0099\3\2\2\2\u00a1\u009a\3\2\2\2\u00a1")
        buf.write(u"\u009b\3\2\2\2\u00a1\u009c\3\2\2\2\u00a1\u009d\3\2\2")
        buf.write(u"\2\u00a1\u009e\3\2\2\2\u00a1\u009f\3\2\2\2\u00a1\u00a0")
        buf.write(u"\3\2\2\2\u00a2\25\3\2\2\2\u00a3\u00ab\7\"\2\2\u00a4\u00ab")
        buf.write(u"\7#\2\2\u00a5\u00ab\7$\2\2\u00a6\u00a7\7%\2\2\u00a7\u00a8")
        buf.write(u"\7\5\2\2\u00a8\u00a9\7?\2\2\u00a9\u00ab\7\6\2\2\u00aa")
        buf.write(u"\u00a3\3\2\2\2\u00aa\u00a4\3\2\2\2\u00aa\u00a5\3\2\2")
        buf.write(u"\2\u00aa\u00a6\3\2\2\2\u00ab\27\3\2\2\2\u00ac\u00ad\7")
        buf.write(u"\23\2\2\u00ad\u00ae\7)\2\2\u00ae\u00af\7>\2\2\u00af\u00b0")
        buf.write(u"\7\5\2\2\u00b0\u00b1\7>\2\2\u00b1\u00b7\5\26\f\2\u00b2")
        buf.write(u"\u00b3\7\7\2\2\u00b3\u00b4\7>\2\2\u00b4\u00b6\5\26\f")
        buf.write(u"\2\u00b5\u00b2\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7\u00b5")
        buf.write(u"\3\2\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00c5\3\2\2\2\u00b9")
        buf.write(u"\u00b7\3\2\2\2\u00ba\u00bb\7\7\2\2\u00bb\u00bc\7\34\2")
        buf.write(u"\2\u00bc\u00c2\5\32\16\2\u00bd\u00be\7\7\2\2\u00be\u00bf")
        buf.write(u"\7\34\2\2\u00bf\u00c1\5\32\16\2\u00c0\u00bd\3\2\2\2\u00c1")
        buf.write(u"\u00c4\3\2\2\2\u00c2\u00c0\3\2\2\2\u00c2\u00c3\3\2\2")
        buf.write(u"\2\u00c3\u00c6\3\2\2\2\u00c4\u00c2\3\2\2\2\u00c5\u00ba")
        buf.write(u"\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7")
        buf.write(u"\u00c8\7\6\2\2\u00c8\31\3\2\2\2\u00c9\u00d9\5\34\17\2")
        buf.write(u"\u00ca\u00ce\5\36\20\2\u00cb\u00cd\5\36\20\2\u00cc\u00cb")
        buf.write(u"\3\2\2\2\u00cd\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce")
        buf.write(u"\u00cf\3\2\2\2\u00cf\u00d9\3\2\2\2\u00d0\u00ce\3\2\2")
        buf.write(u"\2\u00d1\u00d5\5 \21\2\u00d2\u00d4\5 \21\2\u00d3\u00d2")
        buf.write(u"\3\2\2\2\u00d4\u00d7\3\2\2\2\u00d5\u00d3\3\2\2\2\u00d5")
        buf.write(u"\u00d6\3\2\2\2\u00d6\u00d9\3\2\2\2\u00d7\u00d5\3\2\2")
        buf.write(u"\2\u00d8\u00c9\3\2\2\2\u00d8\u00ca\3\2\2\2\u00d8\u00d1")
        buf.write(u"\3\2\2\2\u00d9\33\3\2\2\2\u00da\u00db\7>\2\2\u00db\u00dc")
        buf.write(u"\7\35\2\2\u00dc\u00dd\7\37\2\2\u00dd\u00de\7\5\2\2\u00de")
        buf.write(u"\u00e3\7>\2\2\u00df\u00e0\7\7\2\2\u00e0\u00e2\7>\2\2")
        buf.write(u"\u00e1\u00df\3\2\2\2\u00e2\u00e5\3\2\2\2\u00e3\u00e1")
        buf.write(u"\3\2\2\2\u00e3\u00e4\3\2\2\2\u00e4\u00e6\3\2\2\2\u00e5")
        buf.write(u"\u00e3\3\2\2\2\u00e6\u00e7\7\6\2\2\u00e7\35\3\2\2\2\u00e8")
        buf.write(u"\u00e9\7>\2\2\u00e9\u00ea\7\36\2\2\u00ea\u00eb\7\37\2")
        buf.write(u"\2\u00eb\u00ec\7\5\2\2\u00ec\u00f1\7>\2\2\u00ed\u00ee")
        buf.write(u"\7\7\2\2\u00ee\u00f0\7>\2\2\u00ef\u00ed\3\2\2\2\u00f0")
        buf.write(u"\u00f3\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f1\u00f2\3\2\2")
        buf.write(u"\2\u00f2\u00f4\3\2\2\2\u00f3\u00f1\3\2\2\2\u00f4\u00f5")
        buf.write(u"\7\6\2\2\u00f5\u00f6\7 \2\2\u00f6\u00f7\7>\2\2\u00f7")
        buf.write(u"\u00f8\7\5\2\2\u00f8\u00fd\7>\2\2\u00f9\u00fa\7\7\2\2")
        buf.write(u"\u00fa\u00fc\7>\2\2\u00fb\u00f9\3\2\2\2\u00fc\u00ff\3")
        buf.write(u"\2\2\2\u00fd\u00fb\3\2\2\2\u00fd\u00fe\3\2\2\2\u00fe")
        buf.write(u"\u0100\3\2\2\2\u00ff\u00fd\3\2\2\2\u0100\u0101\7\6\2")
        buf.write(u"\2\u0101\37\3\2\2\2\u0102\u0103\7>\2\2\u0103\u0104\7")
        buf.write(u"!\2\2\u0104\u0105\5\"\22\2\u0105!\3\2\2\2\u0106\u0107")
        buf.write(u"\7\5\2\2\u0107\u0108\5$\23\2\u0108\u0109\7\6\2\2\u0109")
        buf.write(u"\u010c\3\2\2\2\u010a\u010c\3\2\2\2\u010b\u0106\3\2\2")
        buf.write(u"\2\u010b\u010a\3\2\2\2\u010c#\3\2\2\2\u010d\u010e\b\23")
        buf.write(u"\1\2\u010e\u010f\5&\24\2\u010f\u0115\3\2\2\2\u0110\u0111")
        buf.write(u"\f\3\2\2\u0111\u0112\7\'\2\2\u0112\u0114\5&\24\2\u0113")
        buf.write(u"\u0110\3\2\2\2\u0114\u0117\3\2\2\2\u0115\u0113\3\2\2")
        buf.write(u"\2\u0115\u0116\3\2\2\2\u0116%\3\2\2\2\u0117\u0115\3\2")
        buf.write(u"\2\2\u0118\u0119\b\24\1\2\u0119\u011a\5(\25\2\u011a\u0120")
        buf.write(u"\3\2\2\2\u011b\u011c\f\3\2\2\u011c\u011d\7&\2\2\u011d")
        buf.write(u"\u011f\5(\25\2\u011e\u011b\3\2\2\2\u011f\u0122\3\2\2")
        buf.write(u"\2\u0120\u011e\3\2\2\2\u0120\u0121\3\2\2\2\u0121\'\3")
        buf.write(u"\2\2\2\u0122\u0120\3\2\2\2\u0123\u0124\b\25\1\2\u0124")
        buf.write(u"\u0125\5*\26\2\u0125\u012c\3\2\2\2\u0126\u0127\f\3\2")
        buf.write(u"\2\u0127\u0128\5H%\2\u0128\u0129\5*\26\2\u0129\u012b")
        buf.write(u"\3\2\2\2\u012a\u0126\3\2\2\2\u012b\u012e\3\2\2\2\u012c")
        buf.write(u"\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d)\3\2\2\2\u012e")
        buf.write(u"\u012c\3\2\2\2\u012f\u0130\b\26\1\2\u0130\u0131\5,\27")
        buf.write(u"\2\u0131\u0138\3\2\2\2\u0132\u0133\f\3\2\2\u0133\u0134")
        buf.write(u"\5F$\2\u0134\u0135\5,\27\2\u0135\u0137\3\2\2\2\u0136")
        buf.write(u"\u0132\3\2\2\2\u0137\u013a\3\2\2\2\u0138\u0136\3\2\2")
        buf.write(u"\2\u0138\u0139\3\2\2\2\u0139+\3\2\2\2\u013a\u0138\3\2")
        buf.write(u"\2\2\u013b\u013c\b\27\1\2\u013c\u013d\5.\30\2\u013d\u0144")
        buf.write(u"\3\2\2\2\u013e\u013f\f\3\2\2\u013f\u0140\5J&\2\u0140")
        buf.write(u"\u0141\5.\30\2\u0141\u0143\3\2\2\2\u0142\u013e\3\2\2")
        buf.write(u"\2\u0143\u0146\3\2\2\2\u0144\u0142\3\2\2\2\u0144\u0145")
        buf.write(u"\3\2\2\2\u0145-\3\2\2\2\u0146\u0144\3\2\2\2\u0147\u0148")
        buf.write(u"\b\30\1\2\u0148\u0149\5\60\31\2\u0149\u0150\3\2\2\2\u014a")
        buf.write(u"\u014b\f\3\2\2\u014b\u014c\5L\'\2\u014c\u014d\5\60\31")
        buf.write(u"\2\u014d\u014f\3\2\2\2\u014e\u014a\3\2\2\2\u014f\u0152")
        buf.write(u"\3\2\2\2\u0150\u014e\3\2\2\2\u0150\u0151\3\2\2\2\u0151")
        buf.write(u"/\3\2\2\2\u0152\u0150\3\2\2\2\u0153\u0154\7\5\2\2\u0154")
        buf.write(u"\u0155\5$\23\2\u0155\u0156\7\6\2\2\u0156\u015e\3\2\2")
        buf.write(u"\2\u0157\u015e\5\2\2\2\u0158\u0159\7(\2\2\u0159\u015a")
        buf.write(u"\7\5\2\2\u015a\u015b\5$\23\2\u015b\u015c\7\6\2\2\u015c")
        buf.write(u"\u015e\3\2\2\2\u015d\u0153\3\2\2\2\u015d\u0157\3\2\2")
        buf.write(u"\2\u015d\u0158\3\2\2\2\u015e\61\3\2\2\2\u015f\u0160\7")
        buf.write(u"\26\2\2\u0160\u0161\7)\2\2\u0161\u0162\7>\2\2\u0162\u0163")
        buf.write(u"\7\27\2\2\u0163\u0164\7\31\2\2\u0164\u0171\7>\2\2\u0165")
        buf.write(u"\u0166\7\26\2\2\u0166\u0167\7)\2\2\u0167\u0168\7>\2\2")
        buf.write(u"\u0168\u016d\5\64\33\2\u0169\u016a\7\7\2\2\u016a\u016c")
        buf.write(u"\5\64\33\2\u016b\u0169\3\2\2\2\u016c\u016f\3\2\2\2\u016d")
        buf.write(u"\u016b\3\2\2\2\u016d\u016e\3\2\2\2\u016e\u0171\3\2\2")
        buf.write(u"\2\u016f\u016d\3\2\2\2\u0170\u015f\3\2\2\2\u0170\u0165")
        buf.write(u"\3\2\2\2\u0171\63\3\2\2\2\u0172\u0173\7+\2\2\u0173\u0174")
        buf.write(u"\7,\2\2\u0174\u0175\7>\2\2\u0175\u017f\5\26\f\2\u0176")
        buf.write(u"\u0177\7\34\2\2\u0177\u017c\5\32\16\2\u0178\u0179\7\7")
        buf.write(u"\2\2\u0179\u017b\5\32\16\2\u017a\u0178\3\2\2\2\u017b")
        buf.write(u"\u017e\3\2\2\2\u017c\u017a\3\2\2\2\u017c\u017d\3\2\2")
        buf.write(u"\2\u017d\u0180\3\2\2\2\u017e\u017c\3\2\2\2\u017f\u0176")
        buf.write(u"\3\2\2\2\u017f\u0180\3\2\2\2\u0180\u018b\3\2\2\2\u0181")
        buf.write(u"\u0182\7+\2\2\u0182\u0183\7\34\2\2\u0183\u018b\5\32\16")
        buf.write(u"\2\u0184\u0185\7\30\2\2\u0185\u0186\7,\2\2\u0186\u018b")
        buf.write(u"\7>\2\2\u0187\u0188\7\30\2\2\u0188\u0189\7\34\2\2\u0189")
        buf.write(u"\u018b\7>\2\2\u018a\u0172\3\2\2\2\u018a\u0181\3\2\2\2")
        buf.write(u"\u018a\u0184\3\2\2\2\u018a\u0187\3\2\2\2\u018b\65\3\2")
        buf.write(u"\2\2\u018c\u018d\7\30\2\2\u018d\u018e\7)\2\2\u018e\u018f")
        buf.write(u"\7>\2\2\u018f\67\3\2\2\2\u0190\u0191\7\32\2\2\u0191\u0192")
        buf.write(u"\7*\2\2\u01929\3\2\2\2\u0193\u0194\7\32\2\2\u0194\u0195")
        buf.write(u"\7-\2\2\u0195\u0196\7/\2\2\u0196\u0197\7>\2\2\u0197;")
        buf.write(u"\3\2\2\2\u0198\u0199\7\60\2\2\u0199\u019a\7\63\2\2\u019a")
        buf.write(u"\u019b\7>\2\2\u019b\u019c\7\5\2\2\u019c\u01a1\7>\2\2")
        buf.write(u"\u019d\u019e\7\7\2\2\u019e\u01a0\7>\2\2\u019f\u019d\3")
        buf.write(u"\2\2\2\u01a0\u01a3\3\2\2\2\u01a1\u019f\3\2\2\2\u01a1")
        buf.write(u"\u01a2\3\2\2\2\u01a2\u01a4\3\2\2\2\u01a3\u01a1\3\2\2")
        buf.write(u"\2\u01a4\u01a5\7\6\2\2\u01a5\u01a6\7\62\2\2\u01a6\u01a7")
        buf.write(u"\7\5\2\2\u01a7\u01ac\5\2\2\2\u01a8\u01a9\7\7\2\2\u01a9")
        buf.write(u"\u01ab\5\2\2\2\u01aa\u01a8\3\2\2\2\u01ab\u01ae\3\2\2")
        buf.write(u"\2\u01ac\u01aa\3\2\2\2\u01ac\u01ad\3\2\2\2\u01ad\u01af")
        buf.write(u"\3\2\2\2\u01ae\u01ac\3\2\2\2\u01af\u01b0\7\6\2\2\u01b0")
        buf.write(u"=\3\2\2\2\u01b1\u01b2\7\64\2\2\u01b2\u01b3\7>\2\2\u01b3")
        buf.write(u"\u01b4\7\65\2\2\u01b4\u01b5\7>\2\2\u01b5\u01b6\7\b\2")
        buf.write(u"\2\u01b6\u01bb\5\26\f\2\u01b7\u01b8\7\7\2\2\u01b8\u01ba")
        buf.write(u"\5\26\f\2\u01b9\u01b7\3\2\2\2\u01ba\u01bd\3\2\2\2\u01bb")
        buf.write(u"\u01b9\3\2\2\2\u01bb\u01bc\3\2\2\2\u01bc\u01c0\3\2\2")
        buf.write(u"\2\u01bd\u01bb\3\2\2\2\u01be\u01bf\7\66\2\2\u01bf\u01c1")
        buf.write(u"\5\"\22\2\u01c0\u01be\3\2\2\2\u01c0\u01c1\3\2\2\2\u01c1")
        buf.write(u"?\3\2\2\2\u01c2\u01c3\7\67\2\2\u01c3\u01c4\7/\2\2\u01c4")
        buf.write(u"\u01c7\7>\2\2\u01c5\u01c6\7\66\2\2\u01c6\u01c8\5\"\22")
        buf.write(u"\2\u01c7\u01c5\3\2\2\2\u01c7\u01c8\3\2\2\2\u01c8A\3\2")
        buf.write(u"\2\2\u01c9\u01ca\7\61\2\2\u01ca\u01cb\5D#\2\u01cb\u01cc")
        buf.write(u"\7/\2\2\u01cc\u01e1\7>\2\2\u01cd\u01ce\7\66\2\2\u01ce")
        buf.write(u"\u01df\5\"\22\2\u01cf\u01d0\78\2\2\u01d0\u01d1\79\2\2")
        buf.write(u"\u01d1\u01d2\5\"\22\2\u01d2\u01d3\7:\2\2\u01d3\u01e0")
        buf.write(u"\3\2\2\2\u01d4\u01dc\7;\2\2\u01d5\u01d6\7\7\2\2\u01d6")
        buf.write(u"\u01d7\5\"\22\2\u01d7\u01d8\7:\2\2\u01d8\u01db\3\2\2")
        buf.write(u"\2\u01d9\u01db\7;\2\2\u01da\u01d5\3\2\2\2\u01da\u01d9")
        buf.write(u"\3\2\2\2\u01db\u01de\3\2\2\2\u01dc\u01da\3\2\2\2\u01dc")
        buf.write(u"\u01dd\3\2\2\2\u01dd\u01e0\3\2\2\2\u01de\u01dc\3\2\2")
        buf.write(u"\2\u01df\u01cf\3\2\2\2\u01df\u01d4\3\2\2\2\u01df\u01e0")
        buf.write(u"\3\2\2\2\u01e0\u01e2\3\2\2\2\u01e1\u01cd\3\2\2\2\u01e1")
        buf.write(u"\u01e2\3\2\2\2\u01e2C\3\2\2\2\u01e3\u01ed\7\t\2\2\u01e4")
        buf.write(u"\u01e9\7>\2\2\u01e5\u01e6\7\7\2\2\u01e6\u01e8\7>\2\2")
        buf.write(u"\u01e7\u01e5\3\2\2\2\u01e8\u01eb\3\2\2\2\u01e9\u01e7")
        buf.write(u"\3\2\2\2\u01e9\u01ea\3\2\2\2\u01ea\u01ed\3\2\2\2\u01eb")
        buf.write(u"\u01e9\3\2\2\2\u01ec\u01e3\3\2\2\2\u01ec\u01e4\3\2\2")
        buf.write(u"\2\u01edE\3\2\2\2\u01ee\u01ef\t\2\2\2\u01efG\3\2\2\2")
        buf.write(u"\u01f0\u01f1\t\3\2\2\u01f1I\3\2\2\2\u01f2\u01f3\t\4\2")
        buf.write(u"\2\u01f3K\3\2\2\2\u01f4\u01f5\t\5\2\2\u01f5M\3\2\2\2")
        buf.write(u",Sdgox|\u0080\u00a1\u00aa\u00b7\u00c2\u00c5\u00ce\u00d5")
        buf.write(u"\u00d8\u00e3\u00f1\u00fd\u010b\u0115\u0120\u012c\u0138")
        buf.write(u"\u0144\u0150\u015d\u016d\u0170\u017c\u017f\u018a\u01a1")
        buf.write(u"\u01ac\u01bb\u01c0\u01c7\u01da\u01dc\u01df\u01e1\u01e9")
        buf.write(u"\u01ec")
        return buf.getvalue()

class SQLGramaticaParser ( Parser ):

    grammarFileName = "SQLGramatica.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ u"<INVALID>", u"'-'", u"';'", u"'('", u"')'", u"','",
                     u"'='", u"'*'", u"'<'", u"'>'", u"'<='", u"'>='", u"'=='",
                     u"'!='", u"'+'", u"'/'", u"'%'" ]

    symbolicNames = [ u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>",
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>",
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>",
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>",
                      u"<INVALID>", u"CREATE", u"DATABASE", u"DATABASES",
                      u"ALTER", u"RENAME", u"DROP", u"TO", u"SHOW", u"USE",
                      u"CONSTRAINT", u"PRIMARY", u"FOREIGN", u"KEY", u"REFERENCES",
                      u"CHECK", u"INT", u"FLOAT", u"DATE", u"CHAR", u"AND",
                      u"OR", u"NOT", u"TABLE", u"TABLES", u"ADD", u"COLUMN",
                      u"COLUMNS", u"SHOWX", u"FROM", u"INSERT", u"SELECT",
                      u"VALUES", u"INTO", u"UPDATE", u"SET", u"WHERE", u"DELETE",
                      u"ORDER", u"BY", u"ASC", u"DESC", u"NULL", u"WS",
                      u"IDX", u"NUMX", u"CHARS", u"CHARX", u"STRING", u"COMMENTX",
                      u"DIGITX" ]

    RULE_literal = 0
    RULE_fecha = 1
    RULE_programa = 2
    RULE_database = 3
    RULE_createDatabase = 4
    RULE_alterDatabase = 5
    RULE_dropDatabase = 6
    RULE_showDatabase = 7
    RULE_useDatabase = 8
    RULE_opTable = 9
    RULE_tipo = 10
    RULE_createTable = 11
    RULE_constraint = 12
    RULE_primaryKey = 13
    RULE_foreignKey = 14
    RULE_check = 15
    RULE_exp = 16
    RULE_orExpression = 17
    RULE_andExpression = 18
    RULE_equalsExpression = 19
    RULE_relationExpression = 20
    RULE_addSubsExpression = 21
    RULE_mulDivExpression = 22
    RULE_basicExpression = 23
    RULE_alterTable = 24
    RULE_action = 25
    RULE_dropTable = 26
    RULE_showTables = 27
    RULE_showColumns = 28
    RULE_insertInto = 29
    RULE_updateSet = 30
    RULE_deleteFrom = 31
    RULE_selectFrom = 32
    RULE_sep = 33
    RULE_rel_op = 34
    RULE_eq_op = 35
    RULE_add_op = 36
    RULE_mult_op = 37

    ruleNames =  [ u"literal", u"fecha", u"programa", u"database", u"createDatabase",
                   u"alterDatabase", u"dropDatabase", u"showDatabase", u"useDatabase",
                   u"opTable", u"tipo", u"createTable", u"constraint", u"primaryKey",
                   u"foreignKey", u"check", u"exp", u"orExpression", u"andExpression",
                   u"equalsExpression", u"relationExpression", u"addSubsExpression",
                   u"mulDivExpression", u"basicExpression", u"alterTable",
                   u"action", u"dropTable", u"showTables", u"showColumns",
                   u"insertInto", u"updateSet", u"deleteFrom", u"selectFrom",
                   u"sep", u"rel_op", u"eq_op", u"add_op", u"mult_op" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    CREATE=17
    DATABASE=18
    DATABASES=19
    ALTER=20
    RENAME=21
    DROP=22
    TO=23
    SHOW=24
    USE=25
    CONSTRAINT=26
    PRIMARY=27
    FOREIGN=28
    KEY=29
    REFERENCES=30
    CHECK=31
    INT=32
    FLOAT=33
    DATE=34
    CHAR=35
    AND=36
    OR=37
    NOT=38
    TABLE=39
    TABLES=40
    ADD=41
    COLUMN=42
    COLUMNS=43
    SHOWX=44
    FROM=45
    INSERT=46
    SELECT=47
    VALUES=48
    INTO=49
    UPDATE=50
    SET=51
    WHERE=52
    DELETE=53
    ORDER=54
    BY=55
    ASC=56
    DESC=57
    NULL=58
    WS=59
    IDX=60
    NUMX=61
    CHARS=62
    CHARX=63
    STRING=64
    COMMENTX=65
    DIGITX=66

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

    class LiteralContext(ParserRuleContext):

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

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def NUMX(self):
            return self.getToken(SQLGramaticaParser.NUMX, 0)

        def CHARX(self):
            return self.getToken(SQLGramaticaParser.CHARX, 0)

        def fecha(self):
            return self.getTypedRuleContext(SQLGramaticaParser.FechaContext,0)

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_literal

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

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

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

    def literal(self):

        localctx = SQLGramaticaParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_literal)
        try:
            self.state = 81
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SQLGramaticaParser.IDX]:
                self.enterOuterAlt(localctx, 1)
                self.state = 76
                self.match(SQLGramaticaParser.IDX)
                pass
            elif token in [SQLGramaticaParser.NUMX]:
                self.enterOuterAlt(localctx, 2)
                self.state = 77
                self.match(SQLGramaticaParser.NUMX)
                pass
            elif token in [SQLGramaticaParser.CHARX]:
                self.enterOuterAlt(localctx, 3)
                self.state = 78
                self.match(SQLGramaticaParser.CHARX)
                pass
            elif token in [SQLGramaticaParser.DIGITX]:
                self.enterOuterAlt(localctx, 4)
                self.state = 79
                self.fecha()
                pass
            elif token in [SQLGramaticaParser.STRING]:
                self.enterOuterAlt(localctx, 5)
                self.state = 80
                self.match(SQLGramaticaParser.STRING)
                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 FechaContext(ParserRuleContext):

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

        def DIGITX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.DIGITX)
            else:
                return self.getToken(SQLGramaticaParser.DIGITX, i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_fecha

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

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

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

    def fecha(self):

        localctx = SQLGramaticaParser.FechaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_fecha)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 83
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 84
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 85
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 86
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 87
            self.match(SQLGramaticaParser.T__0)
            self.state = 88
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 89
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 90
            self.match(SQLGramaticaParser.T__0)
            self.state = 91
            self.match(SQLGramaticaParser.DIGITX)
            self.state = 92
            self.match(SQLGramaticaParser.DIGITX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ProgramaContext(ParserRuleContext):

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

        def database(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.DatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.DatabaseContext,i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_programa

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

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

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

    def programa(self):

        localctx = SQLGramaticaParser.ProgramaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_programa)
        self._la = 0 # Token type
        try:
            self.state = 101
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,2,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 94
                self.database()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 98
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SQLGramaticaParser.CREATE) | (1 << SQLGramaticaParser.ALTER) | (1 << SQLGramaticaParser.DROP) | (1 << SQLGramaticaParser.SHOW) | (1 << SQLGramaticaParser.USE) | (1 << SQLGramaticaParser.INSERT) | (1 << SQLGramaticaParser.SELECT) | (1 << SQLGramaticaParser.UPDATE) | (1 << SQLGramaticaParser.DELETE))) != 0):
                    self.state = 95
                    self.database()
                    self.state = 100
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

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

    class DatabaseContext(ParserRuleContext):

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

        def createDatabase(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.CreateDatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.CreateDatabaseContext,i)

        def alterDatabase(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.AlterDatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.AlterDatabaseContext,i)

        def dropDatabase(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.DropDatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.DropDatabaseContext,i)

        def showDatabase(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ShowDatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ShowDatabaseContext,i)

        def useDatabase(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.UseDatabaseContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.UseDatabaseContext,i)

        def opTable(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.OpTableContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.OpTableContext,i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_database

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

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

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

    def database(self):

        localctx = SQLGramaticaParser.DatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_database)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 109
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.state = 103
                self.createDatabase()
                pass

            elif la_ == 2:
                self.state = 104
                self.alterDatabase()
                pass

            elif la_ == 3:
                self.state = 105
                self.dropDatabase()
                pass

            elif la_ == 4:
                self.state = 106
                self.showDatabase()
                pass

            elif la_ == 5:
                self.state = 107
                self.useDatabase()
                pass

            elif la_ == 6:
                self.state = 108
                self.opTable()
                pass

            self.state = 122
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,5,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 111
                    self.match(SQLGramaticaParser.T__1)
                    self.state = 118
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,4,self._ctx)
                    if la_ == 1:
                        self.state = 112
                        self.createDatabase()
                        pass

                    elif la_ == 2:
                        self.state = 113
                        self.alterDatabase()
                        pass

                    elif la_ == 3:
                        self.state = 114
                        self.dropDatabase()
                        pass

                    elif la_ == 4:
                        self.state = 115
                        self.showDatabase()
                        pass

                    elif la_ == 5:
                        self.state = 116
                        self.useDatabase()
                        pass

                    elif la_ == 6:
                        self.state = 117
                        self.opTable()
                        pass

                self.state = 124
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,self._ctx)

            self.state = 126
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SQLGramaticaParser.T__1:
                self.state = 125
                self.match(SQLGramaticaParser.T__1)

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

    class CreateDatabaseContext(ParserRuleContext):

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

        def CREATE(self):
            return self.getToken(SQLGramaticaParser.CREATE, 0)

        def DATABASE(self):
            return self.getToken(SQLGramaticaParser.DATABASE, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_createDatabase

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

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

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

    def createDatabase(self):

        localctx = SQLGramaticaParser.CreateDatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_createDatabase)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 128
            self.match(SQLGramaticaParser.CREATE)
            self.state = 129
            self.match(SQLGramaticaParser.DATABASE)
            self.state = 130
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class AlterDatabaseContext(ParserRuleContext):

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

        def ALTER(self):
            return self.getToken(SQLGramaticaParser.ALTER, 0)

        def DATABASE(self):
            return self.getToken(SQLGramaticaParser.DATABASE, 0)

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def RENAME(self):
            return self.getToken(SQLGramaticaParser.RENAME, 0)

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_alterDatabase

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

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

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

    def alterDatabase(self):

        localctx = SQLGramaticaParser.AlterDatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_alterDatabase)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 132
            self.match(SQLGramaticaParser.ALTER)
            self.state = 133
            self.match(SQLGramaticaParser.DATABASE)
            self.state = 134
            self.match(SQLGramaticaParser.IDX)
            self.state = 135
            self.match(SQLGramaticaParser.RENAME)
            self.state = 136
            self.match(SQLGramaticaParser.TO)
            self.state = 137
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class DropDatabaseContext(ParserRuleContext):

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

        def DROP(self):
            return self.getToken(SQLGramaticaParser.DROP, 0)

        def DATABASE(self):
            return self.getToken(SQLGramaticaParser.DATABASE, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_dropDatabase

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

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

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

    def dropDatabase(self):

        localctx = SQLGramaticaParser.DropDatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_dropDatabase)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 139
            self.match(SQLGramaticaParser.DROP)
            self.state = 140
            self.match(SQLGramaticaParser.DATABASE)
            self.state = 141
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ShowDatabaseContext(ParserRuleContext):

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

        def SHOW(self):
            return self.getToken(SQLGramaticaParser.SHOW, 0)

        def DATABASES(self):
            return self.getToken(SQLGramaticaParser.DATABASES, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_showDatabase

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

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

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

    def showDatabase(self):

        localctx = SQLGramaticaParser.ShowDatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_showDatabase)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 143
            self.match(SQLGramaticaParser.SHOW)
            self.state = 144
            self.match(SQLGramaticaParser.DATABASES)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class UseDatabaseContext(ParserRuleContext):

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

        def USE(self):
            return self.getToken(SQLGramaticaParser.USE, 0)

        def DATABASE(self):
            return self.getToken(SQLGramaticaParser.DATABASE, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_useDatabase

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

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

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

    def useDatabase(self):

        localctx = SQLGramaticaParser.UseDatabaseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_useDatabase)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146
            self.match(SQLGramaticaParser.USE)
            self.state = 147
            self.match(SQLGramaticaParser.DATABASE)
            self.state = 148
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OpTableContext(ParserRuleContext):

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

        def createTable(self):
            return self.getTypedRuleContext(SQLGramaticaParser.CreateTableContext,0)

        def alterTable(self):
            return self.getTypedRuleContext(SQLGramaticaParser.AlterTableContext,0)

        def dropTable(self):
            return self.getTypedRuleContext(SQLGramaticaParser.DropTableContext,0)

        def showTables(self):
            return self.getTypedRuleContext(SQLGramaticaParser.ShowTablesContext,0)

        def showColumns(self):
            return self.getTypedRuleContext(SQLGramaticaParser.ShowColumnsContext,0)

        def insertInto(self):
            return self.getTypedRuleContext(SQLGramaticaParser.InsertIntoContext,0)

        def updateSet(self):
            return self.getTypedRuleContext(SQLGramaticaParser.UpdateSetContext,0)

        def deleteFrom(self):
            return self.getTypedRuleContext(SQLGramaticaParser.DeleteFromContext,0)

        def selectFrom(self):
            return self.getTypedRuleContext(SQLGramaticaParser.SelectFromContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_opTable

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

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

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

    def opTable(self):

        localctx = SQLGramaticaParser.OpTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_opTable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 159
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 150
                self.createTable()
                pass

            elif la_ == 2:
                self.state = 151
                self.alterTable()
                pass

            elif la_ == 3:
                self.state = 152
                self.dropTable()
                pass

            elif la_ == 4:
                self.state = 153
                self.showTables()
                pass

            elif la_ == 5:
                self.state = 154
                self.showColumns()
                pass

            elif la_ == 6:
                self.state = 155
                self.insertInto()
                pass

            elif la_ == 7:
                self.state = 156
                self.updateSet()
                pass

            elif la_ == 8:
                self.state = 157
                self.deleteFrom()
                pass

            elif la_ == 9:
                self.state = 158
                self.selectFrom()
                pass

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

    class TipoContext(ParserRuleContext):

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

        def INT(self):
            return self.getToken(SQLGramaticaParser.INT, 0)

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

        def DATE(self):
            return self.getToken(SQLGramaticaParser.DATE, 0)

        def CHAR(self):
            return self.getToken(SQLGramaticaParser.CHAR, 0)

        def NUMX(self):
            return self.getToken(SQLGramaticaParser.NUMX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_tipo

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

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

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

    def tipo(self):

        localctx = SQLGramaticaParser.TipoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_tipo)
        try:
            self.state = 168
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SQLGramaticaParser.INT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 161
                self.match(SQLGramaticaParser.INT)
                pass
            elif token in [SQLGramaticaParser.FLOAT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 162
                self.match(SQLGramaticaParser.FLOAT)
                pass
            elif token in [SQLGramaticaParser.DATE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 163
                self.match(SQLGramaticaParser.DATE)
                pass
            elif token in [SQLGramaticaParser.CHAR]:
                self.enterOuterAlt(localctx, 4)
                self.state = 164
                self.match(SQLGramaticaParser.CHAR)
                self.state = 165
                self.match(SQLGramaticaParser.T__2)
                self.state = 166
                self.match(SQLGramaticaParser.NUMX)
                self.state = 167
                self.match(SQLGramaticaParser.T__3)
                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 CreateTableContext(ParserRuleContext):

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

        def CREATE(self):
            return self.getToken(SQLGramaticaParser.CREATE, 0)

        def TABLE(self):
            return self.getToken(SQLGramaticaParser.TABLE, 0)

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def tipo(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.TipoContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.TipoContext,i)

        def CONSTRAINT(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.CONSTRAINT)
            else:
                return self.getToken(SQLGramaticaParser.CONSTRAINT, i)

        def constraint(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ConstraintContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ConstraintContext,i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_createTable

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

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

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

    def createTable(self):

        localctx = SQLGramaticaParser.CreateTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_createTable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 170
            self.match(SQLGramaticaParser.CREATE)
            self.state = 171
            self.match(SQLGramaticaParser.TABLE)
            self.state = 172
            self.match(SQLGramaticaParser.IDX)
            self.state = 173
            self.match(SQLGramaticaParser.T__2)
            self.state = 174
            self.match(SQLGramaticaParser.IDX)
            self.state = 175
            self.tipo()
            self.state = 181
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,9,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 176
                    self.match(SQLGramaticaParser.T__4)
                    self.state = 177
                    self.match(SQLGramaticaParser.IDX)
                    self.state = 178
                    self.tipo()
                self.state = 183
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,9,self._ctx)

            self.state = 195
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SQLGramaticaParser.T__4:
                self.state = 184
                self.match(SQLGramaticaParser.T__4)
                self.state = 185
                self.match(SQLGramaticaParser.CONSTRAINT)
                self.state = 186
                self.constraint()
                self.state = 192
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SQLGramaticaParser.T__4:
                    self.state = 187
                    self.match(SQLGramaticaParser.T__4)
                    self.state = 188
                    self.match(SQLGramaticaParser.CONSTRAINT)
                    self.state = 189
                    self.constraint()
                    self.state = 194
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

    class ConstraintContext(ParserRuleContext):

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

        def primaryKey(self):
            return self.getTypedRuleContext(SQLGramaticaParser.PrimaryKeyContext,0)

        def foreignKey(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ForeignKeyContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ForeignKeyContext,i)

        def check(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.CheckContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.CheckContext,i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_constraint

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

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

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

    def constraint(self):

        localctx = SQLGramaticaParser.ConstraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_constraint)
        self._la = 0 # Token type
        try:
            self.state = 214
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 199
                self.primaryKey()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 200
                self.foreignKey()
                self.state = 204
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SQLGramaticaParser.IDX:
                    self.state = 201
                    self.foreignKey()
                    self.state = 206
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 207
                self.check()
                self.state = 211
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SQLGramaticaParser.IDX:
                    self.state = 208
                    self.check()
                    self.state = 213
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

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

    class PrimaryKeyContext(ParserRuleContext):

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

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def PRIMARY(self):
            return self.getToken(SQLGramaticaParser.PRIMARY, 0)

        def KEY(self):
            return self.getToken(SQLGramaticaParser.KEY, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_primaryKey

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

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

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

    def primaryKey(self):

        localctx = SQLGramaticaParser.PrimaryKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_primaryKey)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 216
            self.match(SQLGramaticaParser.IDX)
            self.state = 217
            self.match(SQLGramaticaParser.PRIMARY)
            self.state = 218
            self.match(SQLGramaticaParser.KEY)
            self.state = 219
            self.match(SQLGramaticaParser.T__2)
            self.state = 220
            self.match(SQLGramaticaParser.IDX)
            self.state = 225
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 221
                self.match(SQLGramaticaParser.T__4)
                self.state = 222
                self.match(SQLGramaticaParser.IDX)
                self.state = 227
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

    class ForeignKeyContext(ParserRuleContext):

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

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def FOREIGN(self):
            return self.getToken(SQLGramaticaParser.FOREIGN, 0)

        def KEY(self):
            return self.getToken(SQLGramaticaParser.KEY, 0)

        def REFERENCES(self):
            return self.getToken(SQLGramaticaParser.REFERENCES, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_foreignKey

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

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

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

    def foreignKey(self):

        localctx = SQLGramaticaParser.ForeignKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_foreignKey)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 230
            self.match(SQLGramaticaParser.IDX)
            self.state = 231
            self.match(SQLGramaticaParser.FOREIGN)
            self.state = 232
            self.match(SQLGramaticaParser.KEY)
            self.state = 233
            self.match(SQLGramaticaParser.T__2)
            self.state = 234
            self.match(SQLGramaticaParser.IDX)
            self.state = 239
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 235
                self.match(SQLGramaticaParser.T__4)
                self.state = 236
                self.match(SQLGramaticaParser.IDX)
                self.state = 241
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 242
            self.match(SQLGramaticaParser.T__3)
            self.state = 243
            self.match(SQLGramaticaParser.REFERENCES)
            self.state = 244
            self.match(SQLGramaticaParser.IDX)
            self.state = 245
            self.match(SQLGramaticaParser.T__2)
            self.state = 246
            self.match(SQLGramaticaParser.IDX)
            self.state = 251
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 247
                self.match(SQLGramaticaParser.T__4)
                self.state = 248
                self.match(SQLGramaticaParser.IDX)
                self.state = 253
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

    class CheckContext(ParserRuleContext):

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

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def CHECK(self):
            return self.getToken(SQLGramaticaParser.CHECK, 0)

        def exp(self):
            return self.getTypedRuleContext(SQLGramaticaParser.ExpContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_check

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

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

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

    def check(self):

        localctx = SQLGramaticaParser.CheckContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_check)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 256
            self.match(SQLGramaticaParser.IDX)
            self.state = 257
            self.match(SQLGramaticaParser.CHECK)

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

    class ExpContext(ParserRuleContext):

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

        def orExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.OrExpressionContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_exp

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

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

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

    def exp(self):

        localctx = SQLGramaticaParser.ExpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_exp)
        try:
            self.state = 265
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SQLGramaticaParser.T__2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 260
                self.match(SQLGramaticaParser.T__2)
                self.state = 261
                self.orExpression(0)
                self.state = 262
                self.match(SQLGramaticaParser.T__3)
                pass
            elif token in [SQLGramaticaParser.EOF, SQLGramaticaParser.T__1, SQLGramaticaParser.T__3, SQLGramaticaParser.T__4, SQLGramaticaParser.CREATE, SQLGramaticaParser.ALTER, SQLGramaticaParser.DROP, SQLGramaticaParser.SHOW, SQLGramaticaParser.USE, SQLGramaticaParser.INSERT, SQLGramaticaParser.SELECT, SQLGramaticaParser.UPDATE, SQLGramaticaParser.DELETE, SQLGramaticaParser.ORDER, SQLGramaticaParser.ASC, SQLGramaticaParser.DESC, SQLGramaticaParser.IDX]:
                self.enterOuterAlt(localctx, 2)

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

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

        def andExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.AndExpressionContext,0)

        def orExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.OrExpressionContext,0)

        def OR(self):
            return self.getToken(SQLGramaticaParser.OR, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_orExpression

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

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

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

    def orExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.OrExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 34
        self.enterRecursionRule(localctx, 34, self.RULE_orExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 268
            self.andExpression(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 275
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,19,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.OrExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_orExpression)
                    self.state = 270
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 271
                    self.match(SQLGramaticaParser.OR)
                    self.state = 272
                    self.andExpression(0)
                self.state = 277
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,self._ctx)

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

    class AndExpressionContext(ParserRuleContext):

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

        def equalsExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.EqualsExpressionContext,0)

        def andExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.AndExpressionContext,0)

        def AND(self):
            return self.getToken(SQLGramaticaParser.AND, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_andExpression

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

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

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

    def andExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.AndExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 36
        self.enterRecursionRule(localctx, 36, self.RULE_andExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 279
            self.equalsExpression(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 286
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,20,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.AndExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_andExpression)
                    self.state = 281
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 282
                    self.match(SQLGramaticaParser.AND)
                    self.state = 283
                    self.equalsExpression(0)
                self.state = 288
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,20,self._ctx)

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

    class EqualsExpressionContext(ParserRuleContext):

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

        def relationExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.RelationExpressionContext,0)

        def equalsExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.EqualsExpressionContext,0)

        def eq_op(self):
            return self.getTypedRuleContext(SQLGramaticaParser.Eq_opContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_equalsExpression

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

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

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

    def equalsExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.EqualsExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 38
        self.enterRecursionRule(localctx, 38, self.RULE_equalsExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 290
            self.relationExpression(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 298
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,21,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.EqualsExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_equalsExpression)
                    self.state = 292
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 293
                    self.eq_op()
                    self.state = 294
                    self.relationExpression(0)
                self.state = 300
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,self._ctx)

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

    class RelationExpressionContext(ParserRuleContext):

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

        def addSubsExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.AddSubsExpressionContext,0)

        def relationExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.RelationExpressionContext,0)

        def rel_op(self):
            return self.getTypedRuleContext(SQLGramaticaParser.Rel_opContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_relationExpression

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

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

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

    def relationExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.RelationExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 40
        self.enterRecursionRule(localctx, 40, self.RULE_relationExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 302
            self.addSubsExpression(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 310
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,22,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.RelationExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_relationExpression)
                    self.state = 304
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 305
                    self.rel_op()
                    self.state = 306
                    self.addSubsExpression(0)
                self.state = 312
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,22,self._ctx)

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

    class AddSubsExpressionContext(ParserRuleContext):

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

        def mulDivExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.MulDivExpressionContext,0)

        def addSubsExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.AddSubsExpressionContext,0)

        def add_op(self):
            return self.getTypedRuleContext(SQLGramaticaParser.Add_opContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_addSubsExpression

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

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

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

    def addSubsExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.AddSubsExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 42
        self.enterRecursionRule(localctx, 42, self.RULE_addSubsExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 314
            self.mulDivExpression(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 322
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,23,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.AddSubsExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_addSubsExpression)
                    self.state = 316
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 317
                    self.add_op()
                    self.state = 318
                    self.mulDivExpression(0)
                self.state = 324
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,23,self._ctx)

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

    class MulDivExpressionContext(ParserRuleContext):

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

        def basicExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.BasicExpressionContext,0)

        def mulDivExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.MulDivExpressionContext,0)

        def mult_op(self):
            return self.getTypedRuleContext(SQLGramaticaParser.Mult_opContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_mulDivExpression

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

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

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

    def mulDivExpression(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SQLGramaticaParser.MulDivExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 44
        self.enterRecursionRule(localctx, 44, self.RULE_mulDivExpression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self.basicExpression()
            self._ctx.stop = self._input.LT(-1)
            self.state = 334
            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:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = SQLGramaticaParser.MulDivExpressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_mulDivExpression)
                    self.state = 328
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 329
                    self.mult_op()
                    self.state = 330
                    self.basicExpression()
                self.state = 336
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,24,self._ctx)

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

    class BasicExpressionContext(ParserRuleContext):

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

        def orExpression(self):
            return self.getTypedRuleContext(SQLGramaticaParser.OrExpressionContext,0)

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

        def NOT(self):
            return self.getToken(SQLGramaticaParser.NOT, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_basicExpression

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

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

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

    def basicExpression(self):

        localctx = SQLGramaticaParser.BasicExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_basicExpression)
        try:
            self.state = 347
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SQLGramaticaParser.T__2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 337
                self.match(SQLGramaticaParser.T__2)
                self.state = 338
                self.orExpression(0)
                self.state = 339
                self.match(SQLGramaticaParser.T__3)
                pass
            elif token in [SQLGramaticaParser.IDX, SQLGramaticaParser.NUMX, SQLGramaticaParser.CHARX, SQLGramaticaParser.STRING, SQLGramaticaParser.DIGITX]:
                self.enterOuterAlt(localctx, 2)
                self.state = 341
                self.literal()
                pass
            elif token in [SQLGramaticaParser.NOT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 342
                self.match(SQLGramaticaParser.NOT)
                self.state = 343
                self.match(SQLGramaticaParser.T__2)
                self.state = 344
                self.orExpression(0)
                self.state = 345
                self.match(SQLGramaticaParser.T__3)
                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 AlterTableContext(ParserRuleContext):

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

        def ALTER(self):
            return self.getToken(SQLGramaticaParser.ALTER, 0)

        def TABLE(self):
            return self.getToken(SQLGramaticaParser.TABLE, 0)

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def RENAME(self):
            return self.getToken(SQLGramaticaParser.RENAME, 0)

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

        def action(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ActionContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ActionContext,i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_alterTable

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

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

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

    def alterTable(self):

        localctx = SQLGramaticaParser.AlterTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_alterTable)
        self._la = 0 # Token type
        try:
            self.state = 366
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 349
                self.match(SQLGramaticaParser.ALTER)
                self.state = 350
                self.match(SQLGramaticaParser.TABLE)
                self.state = 351
                self.match(SQLGramaticaParser.IDX)
                self.state = 352
                self.match(SQLGramaticaParser.RENAME)
                self.state = 353
                self.match(SQLGramaticaParser.TO)
                self.state = 354
                self.match(SQLGramaticaParser.IDX)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 355
                self.match(SQLGramaticaParser.ALTER)
                self.state = 356
                self.match(SQLGramaticaParser.TABLE)
                self.state = 357
                self.match(SQLGramaticaParser.IDX)
                self.state = 358
                self.action()
                self.state = 363
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SQLGramaticaParser.T__4:
                    self.state = 359
                    self.match(SQLGramaticaParser.T__4)
                    self.state = 360
                    self.action()
                    self.state = 365
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

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

    class ActionContext(ParserRuleContext):

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

        def ADD(self):
            return self.getToken(SQLGramaticaParser.ADD, 0)

        def COLUMN(self):
            return self.getToken(SQLGramaticaParser.COLUMN, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def tipo(self):
            return self.getTypedRuleContext(SQLGramaticaParser.TipoContext,0)

        def CONSTRAINT(self):
            return self.getToken(SQLGramaticaParser.CONSTRAINT, 0)

        def constraint(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ConstraintContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ConstraintContext,i)

        def DROP(self):
            return self.getToken(SQLGramaticaParser.DROP, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_action

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

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

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

    def action(self):

        localctx = SQLGramaticaParser.ActionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_action)
        self._la = 0 # Token type
        try:
            self.state = 392
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,30,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 368
                self.match(SQLGramaticaParser.ADD)
                self.state = 369
                self.match(SQLGramaticaParser.COLUMN)
                self.state = 370
                self.match(SQLGramaticaParser.IDX)
                self.state = 371
                self.tipo()
                self.state = 381
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SQLGramaticaParser.CONSTRAINT:
                    self.state = 372
                    self.match(SQLGramaticaParser.CONSTRAINT)
                    self.state = 373
                    self.constraint()
                    self.state = 378
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,28,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 374
                            self.match(SQLGramaticaParser.T__4)
                            self.state = 375
                            self.constraint()
                        self.state = 380
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,28,self._ctx)

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 383
                self.match(SQLGramaticaParser.ADD)
                self.state = 384
                self.match(SQLGramaticaParser.CONSTRAINT)
                self.state = 385
                self.constraint()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 386
                self.match(SQLGramaticaParser.DROP)
                self.state = 387
                self.match(SQLGramaticaParser.COLUMN)
                self.state = 388
                self.match(SQLGramaticaParser.IDX)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 389
                self.match(SQLGramaticaParser.DROP)
                self.state = 390
                self.match(SQLGramaticaParser.CONSTRAINT)
                self.state = 391
                self.match(SQLGramaticaParser.IDX)
                pass

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

    class DropTableContext(ParserRuleContext):

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

        def DROP(self):
            return self.getToken(SQLGramaticaParser.DROP, 0)

        def TABLE(self):
            return self.getToken(SQLGramaticaParser.TABLE, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_dropTable

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

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

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

    def dropTable(self):

        localctx = SQLGramaticaParser.DropTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_dropTable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 394
            self.match(SQLGramaticaParser.DROP)
            self.state = 395
            self.match(SQLGramaticaParser.TABLE)
            self.state = 396
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ShowTablesContext(ParserRuleContext):

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

        def SHOW(self):
            return self.getToken(SQLGramaticaParser.SHOW, 0)

        def TABLES(self):
            return self.getToken(SQLGramaticaParser.TABLES, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_showTables

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

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

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

    def showTables(self):

        localctx = SQLGramaticaParser.ShowTablesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_showTables)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 398
            self.match(SQLGramaticaParser.SHOW)
            self.state = 399
            self.match(SQLGramaticaParser.TABLES)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ShowColumnsContext(ParserRuleContext):

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

        def SHOW(self):
            return self.getToken(SQLGramaticaParser.SHOW, 0)

        def COLUMNS(self):
            return self.getToken(SQLGramaticaParser.COLUMNS, 0)

        def FROM(self):
            return self.getToken(SQLGramaticaParser.FROM, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_showColumns

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

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

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

    def showColumns(self):

        localctx = SQLGramaticaParser.ShowColumnsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_showColumns)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 401
            self.match(SQLGramaticaParser.SHOW)
            self.state = 402
            self.match(SQLGramaticaParser.COLUMNS)
            self.state = 403
            self.match(SQLGramaticaParser.FROM)
            self.state = 404
            self.match(SQLGramaticaParser.IDX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class InsertIntoContext(ParserRuleContext):

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

        def INSERT(self):
            return self.getToken(SQLGramaticaParser.INSERT, 0)

        def INTO(self):
            return self.getToken(SQLGramaticaParser.INTO, 0)

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def VALUES(self):
            return self.getToken(SQLGramaticaParser.VALUES, 0)

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_insertInto

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

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

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

    def insertInto(self):

        localctx = SQLGramaticaParser.InsertIntoContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_insertInto)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 406
            self.match(SQLGramaticaParser.INSERT)
            self.state = 407
            self.match(SQLGramaticaParser.INTO)
            self.state = 408
            self.match(SQLGramaticaParser.IDX)
            self.state = 409
            self.match(SQLGramaticaParser.T__2)
            self.state = 410
            self.match(SQLGramaticaParser.IDX)
            self.state = 415
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 411
                self.match(SQLGramaticaParser.T__4)
                self.state = 412
                self.match(SQLGramaticaParser.IDX)
                self.state = 417
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 418
            self.match(SQLGramaticaParser.T__3)
            self.state = 419
            self.match(SQLGramaticaParser.VALUES)
            self.state = 420
            self.match(SQLGramaticaParser.T__2)
            self.state = 421
            self.literal()
            self.state = 426
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 422
                self.match(SQLGramaticaParser.T__4)
                self.state = 423
                self.literal()
                self.state = 428
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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

    class UpdateSetContext(ParserRuleContext):

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

        def UPDATE(self):
            return self.getToken(SQLGramaticaParser.UPDATE, 0)

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

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

        def tipo(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.TipoContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.TipoContext,i)

        def WHERE(self):
            return self.getToken(SQLGramaticaParser.WHERE, 0)

        def exp(self):
            return self.getTypedRuleContext(SQLGramaticaParser.ExpContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_updateSet

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

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

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

    def updateSet(self):

        localctx = SQLGramaticaParser.UpdateSetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_updateSet)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 431
            self.match(SQLGramaticaParser.UPDATE)
            self.state = 432
            self.match(SQLGramaticaParser.IDX)
            self.state = 433
            self.match(SQLGramaticaParser.SET)
            self.state = 434
            self.match(SQLGramaticaParser.IDX)
            self.state = 435
            self.match(SQLGramaticaParser.T__5)
            self.state = 436
            self.tipo()
            self.state = 441
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SQLGramaticaParser.T__4:
                self.state = 437
                self.match(SQLGramaticaParser.T__4)
                self.state = 438
                self.tipo()
                self.state = 443
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 446
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SQLGramaticaParser.WHERE:
                self.state = 444
                self.match(SQLGramaticaParser.WHERE)
                self.state = 445
                self.exp()

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

    class DeleteFromContext(ParserRuleContext):

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

        def DELETE(self):
            return self.getToken(SQLGramaticaParser.DELETE, 0)

        def FROM(self):
            return self.getToken(SQLGramaticaParser.FROM, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def WHERE(self):
            return self.getToken(SQLGramaticaParser.WHERE, 0)

        def exp(self):
            return self.getTypedRuleContext(SQLGramaticaParser.ExpContext,0)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_deleteFrom

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

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

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

    def deleteFrom(self):

        localctx = SQLGramaticaParser.DeleteFromContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_deleteFrom)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.match(SQLGramaticaParser.DELETE)
            self.state = 449
            self.match(SQLGramaticaParser.FROM)
            self.state = 450
            self.match(SQLGramaticaParser.IDX)
            self.state = 453
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SQLGramaticaParser.WHERE:
                self.state = 451
                self.match(SQLGramaticaParser.WHERE)
                self.state = 452
                self.exp()

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

    class SelectFromContext(ParserRuleContext):

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

        def SELECT(self):
            return self.getToken(SQLGramaticaParser.SELECT, 0)

        def sep(self):
            return self.getTypedRuleContext(SQLGramaticaParser.SepContext,0)

        def FROM(self):
            return self.getToken(SQLGramaticaParser.FROM, 0)

        def IDX(self):
            return self.getToken(SQLGramaticaParser.IDX, 0)

        def WHERE(self):
            return self.getToken(SQLGramaticaParser.WHERE, 0)

        def exp(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(SQLGramaticaParser.ExpContext)
            else:
                return self.getTypedRuleContext(SQLGramaticaParser.ExpContext,i)

        def ORDER(self):
            return self.getToken(SQLGramaticaParser.ORDER, 0)

        def BY(self):
            return self.getToken(SQLGramaticaParser.BY, 0)

        def ASC(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.ASC)
            else:
                return self.getToken(SQLGramaticaParser.ASC, i)

        def DESC(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.DESC)
            else:
                return self.getToken(SQLGramaticaParser.DESC, i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_selectFrom

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

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

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

    def selectFrom(self):

        localctx = SQLGramaticaParser.SelectFromContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_selectFrom)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 455
            self.match(SQLGramaticaParser.SELECT)
            self.state = 456
            self.sep()
            self.state = 457
            self.match(SQLGramaticaParser.FROM)
            self.state = 458
            self.match(SQLGramaticaParser.IDX)
            self.state = 479
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SQLGramaticaParser.WHERE:
                self.state = 459
                self.match(SQLGramaticaParser.WHERE)
                self.state = 460
                self.exp()
                self.state = 477
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [SQLGramaticaParser.ORDER]:
                    self.state = 461
                    self.match(SQLGramaticaParser.ORDER)
                    self.state = 462
                    self.match(SQLGramaticaParser.BY)
                    self.state = 463
                    self.exp()
                    self.state = 464
                    self.match(SQLGramaticaParser.ASC)
                    pass
                elif token in [SQLGramaticaParser.DESC]:
                    self.state = 466
                    self.match(SQLGramaticaParser.DESC)
                    self.state = 474
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==SQLGramaticaParser.T__4 or _la==SQLGramaticaParser.DESC:
                        self.state = 472
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [SQLGramaticaParser.T__4]:
                            self.state = 467
                            self.match(SQLGramaticaParser.T__4)
                            self.state = 468
                            self.exp()
                            self.state = 469
                            self.match(SQLGramaticaParser.ASC)
                            pass
                        elif token in [SQLGramaticaParser.DESC]:
                            self.state = 471
                            self.match(SQLGramaticaParser.DESC)
                            pass
                        else:
                            raise NoViableAltException(self)

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

                    pass
                elif token in [SQLGramaticaParser.EOF, SQLGramaticaParser.T__1, SQLGramaticaParser.CREATE, SQLGramaticaParser.ALTER, SQLGramaticaParser.DROP, SQLGramaticaParser.SHOW, SQLGramaticaParser.USE, SQLGramaticaParser.INSERT, SQLGramaticaParser.SELECT, SQLGramaticaParser.UPDATE, SQLGramaticaParser.DELETE]:
                    pass
                else:
                    pass

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

    class SepContext(ParserRuleContext):

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

        def IDX(self, i=None):
            if i is None:
                return self.getTokens(SQLGramaticaParser.IDX)
            else:
                return self.getToken(SQLGramaticaParser.IDX, i)

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_sep

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

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

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

    def sep(self):

        localctx = SQLGramaticaParser.SepContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_sep)
        self._la = 0 # Token type
        try:
            self.state = 490
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SQLGramaticaParser.T__6]:
                self.enterOuterAlt(localctx, 1)
                self.state = 481
                self.match(SQLGramaticaParser.T__6)
                pass
            elif token in [SQLGramaticaParser.IDX]:
                self.enterOuterAlt(localctx, 2)
                self.state = 482
                self.match(SQLGramaticaParser.IDX)
                self.state = 487
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SQLGramaticaParser.T__4:
                    self.state = 483
                    self.match(SQLGramaticaParser.T__4)
                    self.state = 484
                    self.match(SQLGramaticaParser.IDX)
                    self.state = 489
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            else:
                raise NoViableAltException(self)

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

    class Rel_opContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_rel_op

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

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

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

    def rel_op(self):

        localctx = SQLGramaticaParser.Rel_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_rel_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 492
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SQLGramaticaParser.T__5) | (1 << SQLGramaticaParser.T__7) | (1 << SQLGramaticaParser.T__8) | (1 << SQLGramaticaParser.T__9) | (1 << SQLGramaticaParser.T__10))) != 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 Eq_opContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_eq_op

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

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

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

    def eq_op(self):

        localctx = SQLGramaticaParser.Eq_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_eq_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 494
            _la = self._input.LA(1)
            if not(_la==SQLGramaticaParser.T__11 or _la==SQLGramaticaParser.T__12):
                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 Add_opContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_add_op

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

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

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

    def add_op(self):

        localctx = SQLGramaticaParser.Add_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_add_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 496
            _la = self._input.LA(1)
            if not(_la==SQLGramaticaParser.T__0 or _la==SQLGramaticaParser.T__13):
                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 Mult_opContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return SQLGramaticaParser.RULE_mult_op

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

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

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

    def mult_op(self):

        localctx = SQLGramaticaParser.Mult_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_mult_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 498
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SQLGramaticaParser.T__6) | (1 << SQLGramaticaParser.T__14) | (1 << SQLGramaticaParser.T__15))) != 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

    def sempred(self, localctx, ruleIndex, predIndex):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[17] = self.orExpression_sempred
        self._predicates[18] = self.andExpression_sempred
        self._predicates[19] = self.equalsExpression_sempred
        self._predicates[20] = self.relationExpression_sempred
        self._predicates[21] = self.addSubsExpression_sempred
        self._predicates[22] = self.mulDivExpression_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def orExpression_sempred(self, localctx, predIndex):
            if predIndex == 0:
                return self.precpred(self._ctx, 1)

    def andExpression_sempred(self, localctx, predIndex):
            if predIndex == 1:
                return self.precpred(self._ctx, 1)

    def equalsExpression_sempred(self, localctx, predIndex):
            if predIndex == 2:
                return self.precpred(self._ctx, 1)

    def relationExpression_sempred(self, localctx, predIndex):
            if predIndex == 3:
                return self.precpred(self._ctx, 1)

    def addSubsExpression_sempred(self, localctx, predIndex):
            if predIndex == 4:
                return self.precpred(self._ctx, 1)

    def mulDivExpression_sempred(self, localctx, predIndex):
            if predIndex == 5:
                return self.precpred(self._ctx, 1)