# Generated from src/queryparser/adql/ADQLParser.g4 by ANTLR 4.8
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0133")
        buf.write("\u04bd\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64")
        buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t")
        buf.write(";\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\t")
        buf.write("D\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\t")
        buf.write("M\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\t")
        buf.write("V\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4")
        buf.write("_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4")
        buf.write("h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4")
        buf.write("q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4")
        buf.write("z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080")
        buf.write("\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\3\2\3")
        buf.write("\2\3\3\3\3\3\3\3\3\3\3\3\4\5\4\u010f\n\4\3\4\3\4\3\5\3")
        buf.write("\5\5\5\u0115\n\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\7\3\7\3")
        buf.write("\b\3\b\3\t\3\t\3\n\5\n\u0125\n\n\3\n\3\n\3\13\3\13\3\f")
        buf.write("\3\f\3\f\3\f\3\f\3\f\5\f\u0131\n\f\3\r\3\r\3\r\3\r\3\r")
        buf.write("\3\r\7\r\u0139\n\r\f\r\16\r\u013c\13\r\3\16\3\16\5\16")
        buf.write("\u0140\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3")
        buf.write("\17\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\22")
        buf.write("\3\22\3\22\3\22\3\22\3\23\3\23\3\24\3\24\3\24\5\24\u015e")
        buf.write("\n\24\3\24\3\24\3\24\3\24\5\24\u0164\n\24\7\24\u0166\n")
        buf.write("\24\f\24\16\24\u0169\13\24\3\25\3\25\3\25\3\25\3\25\3")
        buf.write("\25\3\25\3\25\3\25\3\26\3\26\3\27\3\27\3\27\7\27\u0179")
        buf.write("\n\27\f\27\16\27\u017c\13\27\3\30\3\30\3\30\5\30\u0181")
        buf.write("\n\30\3\30\3\30\3\31\3\31\3\32\3\32\3\32\3\32\3\33\3\33")
        buf.write("\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\36\3\36")
        buf.write("\3\36\5\36\u0199\n\36\3\37\3\37\3\37\3\37\3\37\3 \3 \3")
        buf.write(" \3 \3 \3!\3!\3\"\3\"\3#\3#\3#\3#\3$\3$\3%\5%\u01b0\n")
        buf.write("%\3%\3%\3&\3&\3&\3&\3\'\3\'\5\'\u01ba\n\'\3(\3(\3)\3)")
        buf.write("\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\5)\u01cc\n)\3)\3")
        buf.write(")\3*\3*\3*\5*\u01d3\n*\5*\u01d5\n*\3*\3*\5*\u01d9\n*\3")
        buf.write("+\3+\3+\3,\3,\3,\3,\3,\3-\5-\u01e4\n-\3-\3-\3.\3.\3.\3")
        buf.write(".\7.\u01ec\n.\f.\16.\u01ef\13.\3/\3/\3\60\3\60\3\60\5")
        buf.write("\60\u01f6\n\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61")
        buf.write("\3\61\3\61\5\61\u0202\n\61\3\62\3\62\3\62\3\62\3\63\3")
        buf.write("\63\3\64\3\64\3\64\7\64\u020d\n\64\f\64\16\64\u0210\13")
        buf.write("\64\3\65\3\65\3\65\3\66\3\66\5\66\u0217\n\66\3\67\3\67")
        buf.write("\5\67\u021b\n\67\3\67\3\67\3\67\38\38\38\38\38\58\u0225")
        buf.write("\n8\39\39\39\79\u022a\n9\f9\169\u022d\139\3:\3:\3:\3:")
        buf.write("\3:\3:\3:\3;\3;\3<\3<\3<\3=\3=\5=\u023d\n=\3>\3>\3>\5")
        buf.write(">\u0242\n>\5>\u0244\n>\3?\3?\5?\u0248\n?\3?\5?\u024b\n")
        buf.write("?\3?\3?\3?\5?\u0250\n?\3?\3?\3?\3?\5?\u0256\n?\3@\3@\5")
        buf.write("@\u025a\n@\3@\3@\3@\3@\3@\5@\u0261\n@\3@\3@\3@\5@\u0266")
        buf.write("\n@\3A\3A\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3")
        buf.write("B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3")
        buf.write("B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3")
        buf.write("B\3B\3B\3B\3B\3B\3B\3B\3B\3B\5B\u02a6\nB\3B\3B\3B\3B\3")
        buf.write("B\3B\5B\u02ae\nB\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\5")
        buf.write("B\u02bc\nB\3B\3B\5B\u02c0\nB\3C\3C\3C\3C\3C\3D\3D\3D\3")
        buf.write("D\5D\u02cb\nD\3D\3D\3D\3D\3D\5D\u02d2\nD\3D\3D\5D\u02d6")
        buf.write("\nD\3E\3E\3E\3E\3E\5E\u02dd\nE\3F\3F\3F\3F\5F\u02e3\n")
        buf.write("F\3F\3F\5F\u02e7\nF\3G\3G\3G\3G\5G\u02ed\nG\3H\3H\3H\5")
        buf.write("H\u02f2\nH\3H\3H\3I\3I\5I\u02f8\nI\3J\5J\u02fb\nJ\3J\3")
        buf.write("J\5J\u02ff\nJ\3K\3K\3K\3K\3K\5K\u0306\nK\3K\3K\3K\3K\3")
        buf.write("K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\7K\u031a\nK\f")
        buf.write("K\16K\u031d\13K\3L\3L\3L\3L\5L\u0323\nL\3M\3M\3M\3N\3")
        buf.write("N\3N\3N\3O\3O\3P\3P\3Q\3Q\3R\3R\3R\3R\3R\3R\3R\3S\3S\3")
        buf.write("S\3S\3S\3S\3S\3S\3S\6S\u0342\nS\rS\16S\u0343\3S\3S\3T")
        buf.write("\3T\3T\3T\3T\3T\5T\u034e\nT\3U\3U\5U\u0352\nU\3V\3V\3")
        buf.write("V\5V\u0357\nV\3W\3W\3W\5W\u035c\nW\3W\3W\3W\5W\u0361\n")
        buf.write("W\3W\3W\3W\3W\5W\u0367\nW\3W\7W\u036a\nW\fW\16W\u036d")
        buf.write("\13W\3X\3X\3Y\3Y\3Y\3Z\3Z\5Z\u0376\nZ\3Z\3Z\3[\3[\3[\5")
        buf.write("[\u037d\n[\3[\3[\3[\5[\u0382\n[\3[\7[\u0385\n[\f[\16[")
        buf.write("\u0388\13[\3\\\3\\\3]\3]\3]\3]\3]\3^\3^\3_\3_\3`\3`\3")
        buf.write("`\3`\3`\3`\7`\u039b\n`\f`\16`\u039e\13`\3a\3a\3a\7a\u03a3")
        buf.write("\na\fa\16a\u03a6\13a\3a\3a\3a\3a\3a\7a\u03ad\na\fa\16")
        buf.write("a\u03b0\13a\5a\u03b2\na\5a\u03b4\na\3b\3b\5b\u03b8\nb")
        buf.write("\3b\5b\u03bb\nb\3b\3b\3b\3c\3c\3c\3c\3c\5c\u03c5\nc\3")
        buf.write("d\3d\3d\3d\3d\5d\u03cc\nd\3e\3e\3f\3f\3f\3g\3g\3h\3h\3")
        buf.write("i\5i\u03d8\ni\3i\3i\3j\3j\5j\u03de\nj\3k\3k\5k\u03e2\n")
        buf.write("k\3l\3l\3l\7l\u03e7\nl\fl\16l\u03ea\13l\3m\3m\3n\3n\3")
        buf.write("o\3o\3o\5o\u03f3\no\3p\3p\3p\3p\3q\3q\5q\u03fb\nq\3q\5")
        buf.write("q\u03fe\nq\3q\5q\u0401\nq\3q\5q\u0404\nq\3q\5q\u0407\n")
        buf.write("q\3r\3r\3r\5r\u040c\nr\3r\3r\3s\3s\3s\5s\u0413\ns\3s\3")
        buf.write("s\3s\3s\3s\3s\3s\5s\u041c\ns\3s\3s\5s\u0420\ns\3s\5s\u0423")
        buf.write("\ns\3s\3s\3s\5s\u0428\ns\7s\u042a\ns\fs\16s\u042d\13s")
        buf.write("\3t\3t\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\7u\u043d\n")
        buf.write("u\fu\16u\u0440\13u\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3")
        buf.write("v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3")
        buf.write("v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\5")
        buf.write("v\u0471\nv\3w\3w\3x\3x\3y\3y\3z\3z\5z\u047b\nz\3{\3{\3")
        buf.write("{\5{\u0480\n{\3|\3|\3}\3}\3}\3}\3}\7}\u0489\n}\f}\16}")
        buf.write("\u048c\13}\5}\u048e\n}\3}\3}\3~\3~\3\177\3\177\3\u0080")
        buf.write("\3\u0080\3\u0080\3\u0080\5\u0080\u049a\n\u0080\3\u0081")
        buf.write("\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081")
        buf.write("\u04a3\n\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083")
        buf.write("\3\u0083\3\u0083\3\u0083\7\u0083\u04ad\n\u0083\f\u0083")
        buf.write("\16\u0083\u04b0\13\u0083\3\u0083\3\u0083\5\u0083\u04b4")
        buf.write("\n\u0083\3\u0083\3\u0083\3\u0083\5\u0083\u04b9\n\u0083")
        buf.write("\3\u0083\3\u0083\3\u0083\2\n\30&\u0094\u00ac\u00b4\u00be")
        buf.write("\u00e4\u00e8\u0084\2\4\6\b\n\f\16\20\22\24\26\30\32\34")
        buf.write("\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjln")
        buf.write("prtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c\u008e")
        buf.write("\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0")
        buf.write("\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2")
        buf.write("\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4")
        buf.write("\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6")
        buf.write("\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4\u00e6\u00e8")
        buf.write("\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa")
        buf.write("\u00fc\u00fe\u0100\u0102\u0104\2\t\4\2\u0081\u0081\u00fb")
        buf.write("\u00fb\4\2\u0123\u0125\u012b\u012d\4\288ll\5\2\u0089\u0089")
        buf.write("\u00a7\u00a7\u00d8\u00d8\6\2<<ZZ\u00ad\u00ae\u00ec\u00ec")
        buf.write("\4\2\61\61qq\4\2\u011d\u011d\u011f\u011f\2\u04d5\2\u0106")
        buf.write("\3\2\2\2\4\u0108\3\2\2\2\6\u010e\3\2\2\2\b\u0112\3\2\2")
        buf.write("\2\n\u011b\3\2\2\2\f\u011d\3\2\2\2\16\u011f\3\2\2\2\20")
        buf.write("\u0121\3\2\2\2\22\u0124\3\2\2\2\24\u0128\3\2\2\2\26\u0130")
        buf.write("\3\2\2\2\30\u0132\3\2\2\2\32\u013f\3\2\2\2\34\u0141\3")
        buf.write("\2\2\2\36\u014c\3\2\2\2 \u014e\3\2\2\2\"\u0153\3\2\2\2")
        buf.write("$\u0158\3\2\2\2&\u015d\3\2\2\2(\u016a\3\2\2\2*\u0173\3")
        buf.write("\2\2\2,\u0175\3\2\2\2.\u0180\3\2\2\2\60\u0184\3\2\2\2")
        buf.write("\62\u0186\3\2\2\2\64\u018a\3\2\2\2\66\u018c\3\2\2\28\u0193")
        buf.write("\3\2\2\2:\u0198\3\2\2\2<\u019a\3\2\2\2>\u019f\3\2\2\2")
        buf.write("@\u01a4\3\2\2\2B\u01a6\3\2\2\2D\u01a8\3\2\2\2F\u01ac\3")
        buf.write("\2\2\2H\u01af\3\2\2\2J\u01b3\3\2\2\2L\u01b7\3\2\2\2N\u01bb")
        buf.write("\3\2\2\2P\u01bd\3\2\2\2R\u01d8\3\2\2\2T\u01da\3\2\2\2")
        buf.write("V\u01dd\3\2\2\2X\u01e3\3\2\2\2Z\u01e7\3\2\2\2\\\u01f0")
        buf.write("\3\2\2\2^\u01f2\3\2\2\2`\u0201\3\2\2\2b\u0203\3\2\2\2")
        buf.write("d\u0207\3\2\2\2f\u0209\3\2\2\2h\u0211\3\2\2\2j\u0216\3")
        buf.write("\2\2\2l\u0218\3\2\2\2n\u0224\3\2\2\2p\u0226\3\2\2\2r\u022e")
        buf.write("\3\2\2\2t\u0235\3\2\2\2v\u0237\3\2\2\2x\u023c\3\2\2\2")
        buf.write("z\u0243\3\2\2\2|\u0255\3\2\2\2~\u0265\3\2\2\2\u0080\u0267")
        buf.write("\3\2\2\2\u0082\u02bf\3\2\2\2\u0084\u02c1\3\2\2\2\u0086")
        buf.write("\u02d5\3\2\2\2\u0088\u02dc\3\2\2\2\u008a\u02e6\3\2\2\2")
        buf.write("\u008c\u02ec\3\2\2\2\u008e\u02ee\3\2\2\2\u0090\u02f7\3")
        buf.write("\2\2\2\u0092\u02fe\3\2\2\2\u0094\u0305\3\2\2\2\u0096\u0322")
        buf.write("\3\2\2\2\u0098\u0324\3\2\2\2\u009a\u0327\3\2\2\2\u009c")
        buf.write("\u032b\3\2\2\2\u009e\u032d\3\2\2\2\u00a0\u032f\3\2\2\2")
        buf.write("\u00a2\u0331\3\2\2\2\u00a4\u0338\3\2\2\2\u00a6\u034d\3")
        buf.write("\2\2\2\u00a8\u0351\3\2\2\2\u00aa\u0356\3\2\2\2\u00ac\u035b")
        buf.write("\3\2\2\2\u00ae\u036e\3\2\2\2\u00b0\u0370\3\2\2\2\u00b2")
        buf.write("\u0375\3\2\2\2\u00b4\u037c\3\2\2\2\u00b6\u0389\3\2\2\2")
        buf.write("\u00b8\u038b\3\2\2\2\u00ba\u0390\3\2\2\2\u00bc\u0392\3")
        buf.write("\2\2\2\u00be\u0394\3\2\2\2\u00c0\u03b3\3\2\2\2\u00c2\u03b5")
        buf.write("\3\2\2\2\u00c4\u03c4\3\2\2\2\u00c6\u03cb\3\2\2\2\u00c8")
        buf.write("\u03cd\3\2\2\2\u00ca\u03cf\3\2\2\2\u00cc\u03d2\3\2\2\2")
        buf.write("\u00ce\u03d4\3\2\2\2\u00d0\u03d7\3\2\2\2\u00d2\u03dd\3")
        buf.write("\2\2\2\u00d4\u03df\3\2\2\2\u00d6\u03e3\3\2\2\2\u00d8\u03eb")
        buf.write("\3\2\2\2\u00da\u03ed\3\2\2\2\u00dc\u03f2\3\2\2\2\u00de")
        buf.write("\u03f4\3\2\2\2\u00e0\u03f8\3\2\2\2\u00e2\u040b\3\2\2\2")
        buf.write("\u00e4\u041b\3\2\2\2\u00e6\u042e\3\2\2\2\u00e8\u0430\3")
        buf.write("\2\2\2\u00ea\u0470\3\2\2\2\u00ec\u0472\3\2\2\2\u00ee\u0474")
        buf.write("\3\2\2\2\u00f0\u0476\3\2\2\2\u00f2\u047a\3\2\2\2\u00f4")
        buf.write("\u047f\3\2\2\2\u00f6\u0481\3\2\2\2\u00f8\u0483\3\2\2\2")
        buf.write("\u00fa\u0491\3\2\2\2\u00fc\u0493\3\2\2\2\u00fe\u0499\3")
        buf.write("\2\2\2\u0100\u04a2\3\2\2\2\u0102\u04a4\3\2\2\2\u0104\u04a7")
        buf.write("\3\2\2\2\u0106\u0107\7\u0113\2\2\u0107\3\3\2\2\2\u0108")
        buf.write("\u0109\7\5\2\2\u0109\u010a\7\u011a\2\2\u010a\u010b\5`")
        buf.write("\61\2\u010b\u010c\7\u011b\2\2\u010c\5\3\2\2\2\u010d\u010f")
        buf.write("\7\67\2\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2\2\2\u010f")
        buf.write("\u0110\3\2\2\2\u0110\u0111\5*\26\2\u0111\7\3\2\2\2\u0112")
        buf.write("\u0114\5\u00fe\u0080\2\u0113\u0115\7\u00b8\2\2\u0114\u0113")
        buf.write("\3\2\2\2\u0114\u0115\3\2\2\2\u0115\u0116\3\2\2\2\u0116")
        buf.write("\u0117\7>\2\2\u0117\u0118\5\u00fe\u0080\2\u0118\u0119")
        buf.write("\7\64\2\2\u0119\u011a\5\u00fe\u0080\2\u011a\t\3\2\2\2")
        buf.write("\u011b\u011c\7\u0117\2\2\u011c\13\3\2\2\2\u011d\u011e")
        buf.write("\7\u0118\2\2\u011e\r\3\2\2\2\u011f\u0120\7\u0127\2\2\u0120")
        buf.write("\17\3\2\2\2\u0121\u0122\7\u0119\2\2\u0122\21\3\2\2\2\u0123")
        buf.write("\u0125\7\u00b8\2\2\u0124\u0123\3\2\2\2\u0124\u0125\3\2")
        buf.write("\2\2\u0125\u0126\3\2\2\2\u0126\u0127\5\26\f\2\u0127\23")
        buf.write("\3\2\2\2\u0128\u0129\t\2\2\2\u0129\25\3\2\2\2\u012a\u012b")
        buf.write("\7\u011a\2\2\u012b\u012c\5\u00be`\2\u012c\u012d\7\u011b")
        buf.write("\2\2\u012d\u0131\3\2\2\2\u012e\u0131\5\u00a6T\2\u012f")
        buf.write("\u0131\5\32\16\2\u0130\u012a\3\2\2\2\u0130\u012e\3\2\2")
        buf.write("\2\u0130\u012f\3\2\2\2\u0131\27\3\2\2\2\u0132\u0133\b")
        buf.write("\r\1\2\u0133\u0134\5\22\n\2\u0134\u013a\3\2\2\2\u0135")
        buf.write("\u0136\f\3\2\2\u0136\u0137\7\64\2\2\u0137\u0139\5\22\n")
        buf.write("\2\u0138\u0135\3\2\2\2\u0139\u013c\3\2\2\2\u013a\u0138")
        buf.write("\3\2\2\2\u013a\u013b\3\2\2\2\u013b\31\3\2\2\2\u013c\u013a")
        buf.write("\3\2\2\2\u013d\u0140\5\24\13\2\u013e\u0140\5\u00f8}\2")
        buf.write("\u013f\u013d\3\2\2\2\u013f\u013e\3\2\2\2\u0140\33\3\2")
        buf.write("\2\2\u0141\u0142\7\r\2\2\u0142\u0143\7\u011a\2\2\u0143")
        buf.write("\u0144\58\35\2\u0144\u0145\7\u011e\2\2\u0145\u0146\5D")
        buf.write("#\2\u0146\u0147\7\u011e\2\2\u0147\u0148\5\u0094K\2\u0148")
        buf.write("\u0149\7\u011e\2\2\u0149\u014a\5\u0094K\2\u014a\u014b")
        buf.write("\7\u011b\2\2\u014b\35\3\2\2\2\u014c\u014d\7\u0116\2\2")
        buf.write("\u014d\37\3\2\2\2\u014e\u014f\7\17\2\2\u014f\u0150\7\u011a")
        buf.write("\2\2\u0150\u0151\5`\61\2\u0151\u0152\7\u011b\2\2\u0152")
        buf.write("!\3\2\2\2\u0153\u0154\7\u00ab\2\2\u0154\u0155\7\u011a")
        buf.write("\2\2\u0155\u0156\5$\23\2\u0156\u0157\7\u011b\2\2\u0157")
        buf.write("#\3\2\2\2\u0158\u0159\7\u0115\2\2\u0159%\3\2\2\2\u015a")
        buf.write("\u015b\b\24\1\2\u015b\u015e\5\u0100\u0081\2\u015c\u015e")
        buf.write("\5\u00dco\2\u015d\u015a\3\2\2\2\u015d\u015c\3\2\2\2\u015e")
        buf.write("\u0167\3\2\2\2\u015f\u0160\f\5\2\2\u0160\u0163\5\64\33")
        buf.write("\2\u0161\u0164\5\u0100\u0081\2\u0162\u0164\5\u00dco\2")
        buf.write("\u0163\u0161\3\2\2\2\u0163\u0162\3\2\2\2\u0164\u0166\3")
        buf.write("\2\2\2\u0165\u015f\3\2\2\2\u0166\u0169\3\2\2\2\u0167\u0165")
        buf.write("\3\2\2\2\u0167\u0168\3\2\2\2\u0168\'\3\2\2\2\u0169\u0167")
        buf.write("\3\2\2\2\u016a\u016b\7\20\2\2\u016b\u016c\7\u011a\2\2")
        buf.write("\u016c\u016d\58\35\2\u016d\u016e\7\u011e\2\2\u016e\u016f")
        buf.write("\5D#\2\u016f\u0170\7\u011e\2\2\u0170\u0171\5\u00b6\\\2")
        buf.write("\u0171\u0172\7\u011b\2\2\u0172)\3\2\2\2\u0173\u0174\5")
        buf.write("j\66\2\u0174+\3\2\2\2\u0175\u017a\5*\26\2\u0176\u0177")
        buf.write("\7\u011e\2\2\u0177\u0179\5*\26\2\u0178\u0176\3\2\2\2\u0179")
        buf.write("\u017c\3\2\2\2\u017a\u0178\3\2\2\2\u017a\u017b\3\2\2\2")
        buf.write("\u017b-\3\2\2\2\u017c\u017a\3\2\2\2\u017d\u017e\5\u00aa")
        buf.write("V\2\u017e\u017f\7\u0120\2\2\u017f\u0181\3\2\2\2\u0180")
        buf.write("\u017d\3\2\2\2\u0180\u0181\3\2\2\2\u0181\u0182\3\2\2\2")
        buf.write("\u0182\u0183\5*\26\2\u0183/\3\2\2\2\u0184\u0185\t\3\2")
        buf.write("\2\u0185\61\3\2\2\2\u0186\u0187\5\u00fe\u0080\2\u0187")
        buf.write("\u0188\5\60\31\2\u0188\u0189\5\u00fe\u0080\2\u0189\63")
        buf.write("\3\2\2\2\u018a\u018b\7\u012a\2\2\u018b\65\3\2\2\2\u018c")
        buf.write("\u018d\7\21\2\2\u018d\u018e\7\u011a\2\2\u018e\u018f\5")
        buf.write("`\61\2\u018f\u0190\7\u011e\2\2\u0190\u0191\5`\61\2\u0191")
        buf.write("\u0192\7\u011b\2\2\u0192\67\3\2\2\2\u0193\u0194\5\u00da")
        buf.write("n\2\u01949\3\2\2\2\u0195\u0199\5\u00a2R\2\u0196\u0199")
        buf.write("\5.\30\2\u0197\u0199\5 \21\2\u0198\u0195\3\2\2\2\u0198")
        buf.write("\u0196\3\2\2\2\u0198\u0197\3\2\2\2\u0199;\3\2\2\2\u019a")
        buf.write("\u019b\7\22\2\2\u019b\u019c\7\u011a\2\2\u019c\u019d\5")
        buf.write(":\36\2\u019d\u019e\7\u011b\2\2\u019e=\3\2\2\2\u019f\u01a0")
        buf.write("\7\23\2\2\u01a0\u01a1\7\u011a\2\2\u01a1\u01a2\5:\36\2")
        buf.write("\u01a2\u01a3\7\u011b\2\2\u01a3?\3\2\2\2\u01a4\u01a5\5")
        buf.write("\u0094K\2\u01a5A\3\2\2\2\u01a6\u01a7\5\u0094K\2\u01a7")
        buf.write("C\3\2\2\2\u01a8\u01a9\5@!\2\u01a9\u01aa\7\u011e\2\2\u01aa")
        buf.write("\u01ab\5B\"\2\u01abE\3\2\2\2\u01ac\u01ad\5j\66\2\u01ad")
        buf.write("G\3\2\2\2\u01ae\u01b0\7\67\2\2\u01af\u01ae\3\2\2\2\u01af")
        buf.write("\u01b0\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b2\5F$\2\u01b2")
        buf.write("I\3\2\2\2\u01b3\u01b4\7\u012e\2\2\u01b4\u01b5\7\u0116")
        buf.write("\2\2\u01b5\u01b6\7\u012e\2\2\u01b6K\3\2\2\2\u01b7\u01b9")
        buf.write("\5\u00fe\u0080\2\u01b8\u01ba\5\6\4\2\u01b9\u01b8\3\2\2")
        buf.write("\2\u01b9\u01ba\3\2\2\2\u01baM\3\2\2\2\u01bb\u01bc\5\u00e6")
        buf.write("t\2\u01bcO\3\2\2\2\u01bd\u01be\7\30\2\2\u01be\u01cb\7")
        buf.write("\u011a\2\2\u01bf\u01c0\5:\36\2\u01c0\u01c1\7\u011e\2\2")
        buf.write("\u01c1\u01c2\5:\36\2\u01c2\u01cc\3\2\2\2\u01c3\u01c4\5")
        buf.write("\u0094K\2\u01c4\u01c5\7\u011e\2\2\u01c5\u01c6\5\u0094")
        buf.write("K\2\u01c6\u01c7\7\u011e\2\2\u01c7\u01c8\5\u0094K\2\u01c8")
        buf.write("\u01c9\7\u011e\2\2\u01c9\u01ca\5\u0094K\2\u01ca\u01cc")
        buf.write("\3\2\2\2\u01cb\u01bf\3\2\2\2\u01cb\u01c3\3\2\2\2\u01cc")
        buf.write("\u01cd\3\2\2\2\u01cd\u01ce\7\u011b\2\2\u01ceQ\3\2\2\2")
        buf.write("\u01cf\u01d4\5\u00eex\2\u01d0\u01d2\7\u0120\2\2\u01d1")
        buf.write("\u01d3\5\u00eex\2\u01d2\u01d1\3\2\2\2\u01d2\u01d3\3\2")
        buf.write("\2\2\u01d3\u01d5\3\2\2\2\u01d4\u01d0\3\2\2\2\u01d4\u01d5")
        buf.write("\3\2\2\2\u01d5\u01d9\3\2\2\2\u01d6\u01d7\7\u0120\2\2\u01d7")
        buf.write("\u01d9\5\u00eex\2\u01d8\u01cf\3\2\2\2\u01d8\u01d6\3\2")
        buf.write("\2\2\u01d9S\3\2\2\2\u01da\u01db\7~\2\2\u01db\u01dc\5\u00e6")
        buf.write("t\2\u01dcU\3\2\2\2\u01dd\u01de\7\24\2\2\u01de\u01df\7")
        buf.write("\u011a\2\2\u01df\u01e0\5`\61\2\u01e0\u01e1\7\u011b\2\2")
        buf.write("\u01e1W\3\2\2\2\u01e2\u01e4\5\u00ceh\2\u01e3\u01e2\3\2")
        buf.write("\2\2\u01e3\u01e4\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e6")
        buf.write("\5\u0092J\2\u01e6Y\3\2\2\2\u01e7\u01e8\7\u0088\2\2\u01e8")
        buf.write("\u01ed\5\u00e4s\2\u01e9\u01ea\7\u011e\2\2\u01ea\u01ec")
        buf.write("\5\u00e4s\2\u01eb\u01e9\3\2\2\2\u01ec\u01ef\3\2\2\2\u01ed")
        buf.write("\u01eb\3\2\2\2\u01ed\u01ee\3\2\2\2\u01ee[\3\2\2\2\u01ef")
        buf.write("\u01ed\3\2\2\2\u01f0\u01f1\5$\23\2\u01f1]\3\2\2\2\u01f2")
        buf.write("\u01f3\5\u00c8e\2\u01f3\u01f5\7\u011a\2\2\u01f4\u01f6")
        buf.write("\5\u00ccg\2\u01f5\u01f4\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6")
        buf.write("\u01f7\3\2\2\2\u01f7\u01f8\5\u00fe\u0080\2\u01f8\u01f9")
        buf.write("\7\u011b\2\2\u01f9_\3\2\2\2\u01fa\u0202\5\34\17\2\u01fb")
        buf.write("\u0202\5 \21\2\u01fc\u0202\5(\25\2\u01fd\u0202\5\u00a2")
        buf.write("R\2\u01fe\u0202\5\u00a4S\2\u01ff\u0202\5\u00b8]\2\u0200")
        buf.write("\u0202\5\u00f8}\2\u0201\u01fa\3\2\2\2\u0201\u01fb\3\2")
        buf.write("\2\2\u0201\u01fc\3\2\2\2\u0201\u01fd\3\2\2\2\u0201\u01fe")
        buf.write("\3\2\2\2\u0201\u01ff\3\2\2\2\u0201\u0200\3\2\2\2\u0202")
        buf.write("a\3\2\2\2\u0203\u0204\7\u008f\2\2\u0204\u0205\7B\2\2\u0205")
        buf.write("\u0206\5f\64\2\u0206c\3\2\2\2\u0207\u0208\5.\30\2\u0208")
        buf.write("e\3\2\2\2\u0209\u020e\5d\63\2\u020a\u020b\7\u011e\2\2")
        buf.write("\u020b\u020d\5d\63\2\u020c\u020a\3\2\2\2\u020d\u0210\3")
        buf.write("\2\2\2\u020e\u020c\3\2\2\2\u020e\u020f\3\2\2\2\u020fg")
        buf.write("\3\2\2\2\u0210\u020e\3\2\2\2\u0211\u0212\7\u0090\2\2\u0212")
        buf.write("\u0213\5\u00be`\2\u0213i\3\2\2\2\u0214\u0217\5\u00ba^")
        buf.write("\2\u0215\u0217\5J&\2\u0216\u0214\3\2\2\2\u0216\u0215\3")
        buf.write("\2\2\2\u0217k\3\2\2\2\u0218\u021a\5\u00fe\u0080\2\u0219")
        buf.write("\u021b\7\u00b8\2\2\u021a\u0219\3\2\2\2\u021a\u021b\3\2")
        buf.write("\2\2\u021b\u021c\3\2\2\2\u021c\u021d\7\u0094\2\2\u021d")
        buf.write("\u021e\5n8\2\u021em\3\2\2\2\u021f\u0225\5\u00e6t\2\u0220")
        buf.write("\u0221\7\u011a\2\2\u0221\u0222\5p9\2\u0222\u0223\7\u011b")
        buf.write("\2\2\u0223\u0225\3\2\2\2\u0224\u021f\3\2\2\2\u0224\u0220")
        buf.write("\3\2\2\2\u0225o\3\2\2\2\u0226\u022b\5\u00fe\u0080\2\u0227")
        buf.write("\u0228\7\u011e\2\2\u0228\u022a\5\u00fe\u0080\2\u0229\u0227")
        buf.write("\3\2\2\2\u022a\u022d\3\2\2\2\u022b\u0229\3\2\2\2\u022b")
        buf.write("\u022c\3\2\2\2\u022cq\3\2\2\2\u022d\u022b\3\2\2\2\u022e")
        buf.write("\u022f\7\34\2\2\u022f\u0230\7\u011a\2\2\u0230\u0231\5")
        buf.write("`\61\2\u0231\u0232\7\u011e\2\2\u0232\u0233\5`\61\2\u0233")
        buf.write("\u0234\7\u011b\2\2\u0234s\3\2\2\2\u0235\u0236\5,\27\2")
        buf.write("\u0236u\3\2\2\2\u0237\u0238\7\u00bf\2\2\u0238\u0239\5")
        buf.write("\u00be`\2\u0239w\3\2\2\2\u023a\u023d\5v<\2\u023b\u023d")
        buf.write("\5\u0084C\2\u023c\u023a\3\2\2\2\u023c\u023b\3\2\2\2\u023d")
        buf.write("y\3\2\2\2\u023e\u0244\7\u0097\2\2\u023f\u0241\5\u009e")
        buf.write("P\2\u0240\u0242\7\u00c5\2\2\u0241\u0240\3\2\2\2\u0241")
        buf.write("\u0242\3\2\2\2\u0242\u0244\3\2\2\2\u0243\u023e\3\2\2\2")
        buf.write("\u0243\u023f\3\2\2\2\u0244{\3\2\2\2\u0245\u0247\5\u00e4")
        buf.write("s\2\u0246\u0248\7\u00b4\2\2\u0247\u0246\3\2\2\2\u0247")
        buf.write("\u0248\3\2\2\2\u0248\u024a\3\2\2\2\u0249\u024b\5z>\2\u024a")
        buf.write("\u0249\3\2\2\2\u024a\u024b\3\2\2\2\u024b\u024c\3\2\2\2")
        buf.write("\u024c\u024d\7\u00a2\2\2\u024d\u024f\5\u00e4s\2\u024e")
        buf.write("\u0250\5x=\2\u024f\u024e\3\2\2\2\u024f\u0250\3\2\2\2\u0250")
        buf.write("\u0256\3\2\2\2\u0251\u0252\7\u011a\2\2\u0252\u0253\5|")
        buf.write("?\2\u0253\u0254\7\u011b\2\2\u0254\u0256\3\2\2\2\u0255")
        buf.write("\u0245\3\2\2\2\u0255\u0251\3\2\2\2\u0256}\3\2\2\2\u0257")
        buf.write("\u0259\5\u0080A\2\u0258\u025a\7\u00b8\2\2\u0259\u0258")
        buf.write("\3\2\2\2\u0259\u025a\3\2\2\2\u025a\u025b\3\2\2\2\u025b")
        buf.write("\u025c\7\u00a9\2\2\u025c\u025d\5\u00a0Q\2\u025d\u0266")
        buf.write("\3\2\2\2\u025e\u0260\5\u0080A\2\u025f\u0261\7\u00b8\2")
        buf.write("\2\u0260\u025f\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u0262")
        buf.write("\3\2\2\2\u0262\u0263\7\33\2\2\u0263\u0264\5\u00a0Q\2\u0264")
        buf.write("\u0266\3\2\2\2\u0265\u0257\3\2\2\2\u0265\u025e\3\2\2\2")
        buf.write("\u0266\177\3\2\2\2\u0267\u0268\5&\24\2\u0268\u0081\3\2")
        buf.write("\2\2\u0269\u026a\7\3\2\2\u026a\u026b\7\u011a\2\2\u026b")
        buf.write("\u026c\5\u0094K\2\u026c\u026d\7\u011b\2\2\u026d\u02c0")
        buf.write("\3\2\2\2\u026e\u026f\7\16\2\2\u026f\u0270\7\u011a\2\2")
        buf.write("\u0270\u0271\5\u0094K\2\u0271\u0272\7\u011b\2\2\u0272")
        buf.write("\u02c0\3\2\2\2\u0273\u0274\7\27\2\2\u0274\u0275\7\u011a")
        buf.write("\2\2\u0275\u0276\5\u0094K\2\u0276\u0277\7\u011b\2\2\u0277")
        buf.write("\u02c0\3\2\2\2\u0278\u0279\7\31\2\2\u0279\u027a\7\u011a")
        buf.write("\2\2\u027a\u027b\5\u0094K\2\u027b\u027c\7\u011b\2\2\u027c")
        buf.write("\u02c0\3\2\2\2\u027d\u027e\7\32\2\2\u027e\u027f\7\u011a")
        buf.write("\2\2\u027f\u0280\5\u0094K\2\u0280\u0281\7\u011b\2\2\u0281")
        buf.write("\u02c0\3\2\2\2\u0282\u0283\7\36\2\2\u0283\u0284\7\u011a")
        buf.write("\2\2\u0284\u0285\5\u0094K\2\u0285\u0286\7\u011b\2\2\u0286")
        buf.write("\u02c0\3\2\2\2\u0287\u0288\7\37\2\2\u0288\u0289\7\u011a")
        buf.write("\2\2\u0289\u028a\5\u0094K\2\u028a\u028b\7\u011b\2\2\u028b")
        buf.write("\u02c0\3\2\2\2\u028c\u028d\7 \2\2\u028d\u028e\7\u011a")
        buf.write("\2\2\u028e\u028f\5\u0094K\2\u028f\u0290\7\u011e\2\2\u0290")
        buf.write("\u0291\5\u0094K\2\u0291\u0292\7\u011b\2\2\u0292\u02c0")
        buf.write("\3\2\2\2\u0293\u0294\7!\2\2\u0294\u0295\7\u011a\2\2\u0295")
        buf.write("\u02c0\7\u011b\2\2\u0296\u0297\7$\2\2\u0297\u0298\7\u011a")
        buf.write("\2\2\u0298\u0299\5\u0094K\2\u0299\u029a\7\u011e\2\2\u029a")
        buf.write("\u029b\5\u0094K\2\u029b\u029c\7\u011b\2\2\u029c\u02c0")
        buf.write("\3\2\2\2\u029d\u029e\7%\2\2\u029e\u029f\7\u011a\2\2\u029f")
        buf.write("\u02a0\5\u0094K\2\u02a0\u02a1\7\u011b\2\2\u02a1\u02c0")
        buf.write("\3\2\2\2\u02a2\u02a3\7\'\2\2\u02a3\u02a5\7\u011a\2\2\u02a4")
        buf.write("\u02a6\5\u00eex\2\u02a5\u02a4\3\2\2\2\u02a5\u02a6\3\2")
        buf.write("\2\2\u02a6\u02a7\3\2\2\2\u02a7\u02c0\7\u011b\2\2\u02a8")
        buf.write("\u02a9\7(\2\2\u02a9\u02aa\7\u011a\2\2\u02aa\u02ad\5\u0094")
        buf.write("K\2\u02ab\u02ac\7\u011e\2\2\u02ac\u02ae\5\u00d0i\2\u02ad")
        buf.write("\u02ab\3\2\2\2\u02ad\u02ae\3\2\2\2\u02ae\u02af\3\2\2\2")
        buf.write("\u02af\u02b0\7\u011b\2\2\u02b0\u02c0\3\2\2\2\u02b1\u02b2")
        buf.write("\7*\2\2\u02b2\u02b3\7\u011a\2\2\u02b3\u02b4\5\u0094K\2")
        buf.write("\u02b4\u02b5\7\u011b\2\2\u02b5\u02c0\3\2\2\2\u02b6\u02b7")
        buf.write("\7-\2\2\u02b7\u02b8\7\u011a\2\2\u02b8\u02bb\5\u0094K\2")
        buf.write("\u02b9\u02ba\7\u011e\2\2\u02ba\u02bc\5\u00d0i\2\u02bb")
        buf.write("\u02b9\3\2\2\2\u02bb\u02bc\3\2\2\2\u02bc\u02bd\3\2\2\2")
        buf.write("\u02bd\u02be\7\u011b\2\2\u02be\u02c0\3\2\2\2\u02bf\u0269")
        buf.write("\3\2\2\2\u02bf\u026e\3\2\2\2\u02bf\u0273\3\2\2\2\u02bf")
        buf.write("\u0278\3\2\2\2\u02bf\u027d\3\2\2\2\u02bf\u0282\3\2\2\2")
        buf.write("\u02bf\u0287\3\2\2\2\u02bf\u028c\3\2\2\2\u02bf\u0293\3")
        buf.write("\2\2\2\u02bf\u0296\3\2\2\2\u02bf\u029d\3\2\2\2\u02bf\u02a2")
        buf.write("\3\2\2\2\u02bf\u02a8\3\2\2\2\u02bf\u02b1\3\2\2\2\u02bf")
        buf.write("\u02b6\3\2\2\2\u02c0\u0083\3\2\2\2\u02c1\u02c2\7\u0103")
        buf.write("\2\2\u02c2\u02c3\7\u011a\2\2\u02c3\u02c4\5t;\2\u02c4\u02c5")
        buf.write("\7\u011b\2\2\u02c5\u0085\3\2\2\2\u02c6\u02d6\5\u008aF")
        buf.write("\2\u02c7\u02c8\5\u00acW\2\u02c8\u02ca\7\u00fc\2\2\u02c9")
        buf.write("\u02cb\7\61\2\2\u02ca\u02c9\3\2\2\2\u02ca\u02cb\3\2\2")
        buf.write("\2\u02cb\u02cc\3\2\2\2\u02cc\u02cd\5\u00b4[\2\u02cd\u02d6")
        buf.write("\3\2\2\2\u02ce\u02cf\5\u00acW\2\u02cf\u02d1\7z\2\2\u02d0")
        buf.write("\u02d2\7\61\2\2\u02d1\u02d0\3\2\2\2\u02d1\u02d2\3\2\2")
        buf.write("\2\u02d2\u02d3\3\2\2\2\u02d3\u02d4\5\u00b4[\2\u02d4\u02d6")
        buf.write("\3\2\2\2\u02d5\u02c6\3\2\2\2\u02d5\u02c7\3\2\2\2\u02d5")
        buf.write("\u02ce\3\2\2\2\u02d6\u0087\3\2\2\2\u02d7\u02dd\5\u00b2")
        buf.write("Z\2\u02d8\u02d9\7\u011a\2\2\u02d9\u02da\5\u0086D\2\u02da")
        buf.write("\u02db\7\u011b\2\2\u02db\u02dd\3\2\2\2\u02dc\u02d7\3\2")
        buf.write("\2\2\u02dc\u02d8\3\2\2\2\u02dd\u0089\3\2\2\2\u02de\u02e7")
        buf.write("\5\u0088E\2\u02df\u02e0\5\u00b4[\2\u02e0\u02e2\7\u009d")
        buf.write("\2\2\u02e1\u02e3\7\61\2\2\u02e2\u02e1\3\2\2\2\u02e2\u02e3")
        buf.write("\3\2\2\2\u02e3\u02e4\3\2\2\2\u02e4\u02e5\5\u00acW\2\u02e5")
        buf.write("\u02e7\3\2\2\2\u02e6\u02de\3\2\2\2\u02e6\u02df\3\2\2\2")
        buf.write("\u02e7\u008b\3\2\2\2\u02e8\u02ed\5\4\3\2\u02e9\u02ed\5")
        buf.write("<\37\2\u02ea\u02ed\5> \2\u02eb\u02ed\5P)\2\u02ec\u02e8")
        buf.write("\3\2\2\2\u02ec\u02e9\3\2\2\2\u02ec\u02ea\3\2\2\2\u02ec")
        buf.write("\u02eb\3\2\2\2\u02ed\u008d\3\2\2\2\u02ee\u02ef\5.\30\2")
        buf.write("\u02ef\u02f1\7\u00a0\2\2\u02f0\u02f2\7\u00b8\2\2\u02f1")
        buf.write("\u02f0\3\2\2\2\u02f1\u02f2\3\2\2\2\u02f2\u02f3\3\2\2\2")
        buf.write("\u02f3\u02f4\7\u00b9\2\2\u02f4\u008f\3\2\2\2\u02f5\u02f8")
        buf.write("\5\u00a8U\2\u02f6\u02f8\5\u008cG\2\u02f7\u02f5\3\2\2\2")
        buf.write("\u02f7\u02f6\3\2\2\2\u02f8\u0091\3\2\2\2\u02f9\u02fb\5")
        buf.write("\u00ceh\2\u02fa\u02f9\3\2\2\2\u02fa\u02fb\3\2\2\2\u02fb")
        buf.write("\u02fc\3\2\2\2\u02fc\u02ff\5\u0100\u0081\2\u02fd\u02ff")
        buf.write("\5\u0096L\2\u02fe\u02fa\3\2\2\2\u02fe\u02fd\3\2\2\2\u02ff")
        buf.write("\u0093\3\2\2\2\u0300\u0301\bK\1\2\u0301\u0306\5\u00e8")
        buf.write("u\2\u0302\u0303\5\f\7\2\u0303\u0304\5\u0094K\b\u0304\u0306")
        buf.write("\3\2\2\2\u0305\u0300\3\2\2\2\u0305\u0302\3\2\2\2\u0306")
        buf.write("\u031b\3\2\2\2\u0307\u0308\f\7\2\2\u0308\u0309\5\n\6\2")
        buf.write("\u0309\u030a\5\u0094K\b\u030a\u031a\3\2\2\2\u030b\u030c")
        buf.write("\f\6\2\2\u030c\u030d\5\16\b\2\u030d\u030e\5\u0094K\7\u030e")
        buf.write("\u031a\3\2\2\2\u030f\u0310\f\5\2\2\u0310\u0311\5\20\t")
        buf.write("\2\u0311\u0312\5\u0094K\6\u0312\u031a\3\2\2\2\u0313\u0314")
        buf.write("\f\4\2\2\u0314\u0315\7\u011d\2\2\u0315\u031a\5\u00e8u")
        buf.write("\2\u0316\u0317\f\3\2\2\u0317\u0318\7\u011f\2\2\u0318\u031a")
        buf.write("\5\u00e8u\2\u0319\u0307\3\2\2\2\u0319\u030b\3\2\2\2\u0319")
        buf.write("\u030f\3\2\2\2\u0319\u0313\3\2\2\2\u0319\u0316\3\2\2\2")
        buf.write("\u031a\u031d\3\2\2\2\u031b\u0319\3\2\2\2\u031b\u031c\3")
        buf.write("\2\2\2\u031c\u0095\3\2\2\2\u031d\u031b\3\2\2\2\u031e\u0323")
        buf.write("\5\u00eav\2\u031f\u0323\5\u0082B\2\u0320\u0323\5\u0090")
        buf.write("I\2\u0321\u0323\5\u00f8}\2\u0322\u031e\3\2\2\2\u0322\u031f")
        buf.write("\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0321\3\2\2\2\u0323")
        buf.write("\u0097\3\2\2\2\u0324\u0325\7\u00be\2\2\u0325\u0326\5\u00ee")
        buf.write("x\2\u0326\u0099\3\2\2\2\u0327\u0328\7\u00c4\2\2\u0328")
        buf.write("\u0329\7B\2\2\u0329\u032a\5\u00d6l\2\u032a\u009b\3\2\2")
        buf.write("\2\u032b\u032c\t\4\2\2\u032c\u009d\3\2\2\2\u032d\u032e")
        buf.write("\t\5\2\2\u032e\u009f\3\2\2\2\u032f\u0330\5&\24\2\u0330")
        buf.write("\u00a1\3\2\2\2\u0331\u0332\7\"\2\2\u0332\u0333\7\u011a")
        buf.write("\2\2\u0333\u0334\58\35\2\u0334\u0335\7\u011e\2\2\u0335")
        buf.write("\u0336\5D#\2\u0336\u0337\7\u011b\2\2\u0337\u00a3\3\2\2")
        buf.write("\2\u0338\u0339\7#\2\2\u0339\u033a\7\u011a\2\2\u033a\u033b")
        buf.write("\58\35\2\u033b\u033c\7\u011e\2\2\u033c\u033d\5D#\2\u033d")
        buf.write("\u033e\7\u011e\2\2\u033e\u0341\5D#\2\u033f\u0340\7\u011e")
        buf.write("\2\2\u0340\u0342\5D#\2\u0341\u033f\3\2\2\2\u0342\u0343")
        buf.write("\3\2\2\2\u0343\u0341\3\2\2\2\u0343\u0344\3\2\2\2\u0344")
        buf.write("\u0345\3\2\2\2\u0345\u0346\7\u011b\2\2\u0346\u00a5\3\2")
        buf.write("\2\2\u0347\u034e\5\62\32\2\u0348\u034e\5\b\5\2\u0349\u034e")
        buf.write("\5l\67\2\u034a\u034e\5~@\2\u034b\u034e\5\u008eH\2\u034c")
        buf.write("\u034e\5T+\2\u034d\u0347\3\2\2\2\u034d\u0348\3\2\2\2\u034d")
        buf.write("\u0349\3\2\2\2\u034d\u034a\3\2\2\2\u034d\u034b\3\2\2\2")
        buf.write("\u034d\u034c\3\2\2\2\u034e\u00a7\3\2\2\2\u034f\u0352\5")
        buf.write("\66\34\2\u0350\u0352\5r:\2\u0351\u034f\3\2\2\2\u0351\u0350")
        buf.write("\3\2\2\2\u0352\u00a9\3\2\2\2\u0353\u0357\5*\26\2\u0354")
        buf.write("\u0357\5\u00e2r\2\u0355\u0357\5F$\2\u0356\u0353\3\2\2")
        buf.write("\2\u0356\u0354\3\2\2\2\u0356\u0355\3\2\2\2\u0357\u00ab")
        buf.write("\3\2\2\2\u0358\u0359\bW\1\2\u0359\u035c\5\u008aF\2\u035a")
        buf.write("\u035c\5|?\2\u035b\u0358\3\2\2\2\u035b\u035a\3\2\2\2\u035c")
        buf.write("\u036b\3\2\2\2\u035d\u035e\f\5\2\2\u035e\u0360\7\u00fc")
        buf.write("\2\2\u035f\u0361\7\61\2\2\u0360\u035f\3\2\2\2\u0360\u0361")
        buf.write("\3\2\2\2\u0361\u0362\3\2\2\2\u0362\u036a\5\u00b4[\2\u0363")
        buf.write("\u0364\f\4\2\2\u0364\u0366\7z\2\2\u0365\u0367\7\61\2\2")
        buf.write("\u0366\u0365\3\2\2\2\u0366\u0367\3\2\2\2\u0367\u0368\3")
        buf.write("\2\2\2\u0368\u036a\5\u00b4[\2\u0369\u035d\3\2\2\2\u0369")
        buf.write("\u0363\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2")
        buf.write("\u036b\u036c\3\2\2\2\u036c\u00ad\3\2\2\2\u036d\u036b\3")
        buf.write("\2\2\2\u036e\u036f\7\u0116\2\2\u036f\u00af\3\2\2\2\u0370")
        buf.write("\u0371\5\u00acW\2\u0371\u0372\7\u0122\2\2\u0372\u00b1")
        buf.write("\3\2\2\2\u0373\u0374\7\u010c\2\2\u0374\u0376\5\u0104\u0083")
        buf.write("\2\u0375\u0373\3\2\2\2\u0375\u0376\3\2\2\2\u0376\u0377")
        buf.write("\3\2\2\2\u0377\u0378\5\u00c2b\2\u0378\u00b3\3\2\2\2\u0379")
        buf.write("\u037a\b[\1\2\u037a\u037d\5\u0088E\2\u037b\u037d\5|?\2")
        buf.write("\u037c\u0379\3\2\2\2\u037c\u037b\3\2\2\2\u037d\u0386\3")
        buf.write("\2\2\2\u037e\u037f\f\4\2\2\u037f\u0381\7\u009d\2\2\u0380")
        buf.write("\u0382\7\61\2\2\u0381\u0380\3\2\2\2\u0381\u0382\3\2\2")
        buf.write("\2\u0382\u0383\3\2\2\2\u0383\u0385\5\u00acW\2\u0384\u037e")
        buf.write("\3\2\2\2\u0385\u0388\3\2\2\2\u0386\u0384\3\2\2\2\u0386")
        buf.write("\u0387\3\2\2\2\u0387\u00b5\3\2\2\2\u0388\u0386\3\2\2\2")
        buf.write("\u0389\u038a\5\u0094K\2\u038a\u00b7\3\2\2\2\u038b\u038c")
        buf.write("\7&\2\2\u038c\u038d\7\u011a\2\2\u038d\u038e\5\u00dan\2")
        buf.write("\u038e\u038f\7\u011b\2\2\u038f\u00b9\3\2\2\2\u0390\u0391")
        buf.write("\7\u0116\2\2\u0391\u00bb\3\2\2\2\u0392\u0393\7\u0116\2")
        buf.write("\2\u0393\u00bd\3\2\2\2\u0394\u0395\b`\1\2\u0395\u0396")
        buf.write("\5\30\r\2\u0396\u039c\3\2\2\2\u0397\u0398\f\3\2\2\u0398")
        buf.write("\u0399\7\u00c3\2\2\u0399\u039b\5\30\r\2\u039a\u0397\3")
        buf.write("\2\2\2\u039b\u039e\3\2\2\2\u039c\u039a\3\2\2\2\u039c\u039d")
        buf.write("\3\2\2\2\u039d\u00bf\3\2\2\2\u039e\u039c\3\2\2\2\u039f")
        buf.write("\u03a4\5\u00c4c\2\u03a0\u03a1\7\u011e\2\2\u03a1\u03a3")
        buf.write("\5\u00c4c\2\u03a2\u03a0\3\2\2\2\u03a3\u03a6\3\2\2\2\u03a4")
        buf.write("\u03a2\3\2\2\2\u03a4\u03a5\3\2\2\2\u03a5\u03b4\3\2\2\2")
        buf.write("\u03a6\u03a4\3\2\2\2\u03a7\u03b1\7\u011c\2\2\u03a8\u03a9")
        buf.write("\7\u011e\2\2\u03a9\u03ae\5\u00c4c\2\u03aa\u03ab\7\u011e")
        buf.write("\2\2\u03ab\u03ad\5\u00c4c\2\u03ac\u03aa\3\2\2\2\u03ad")
        buf.write("\u03b0\3\2\2\2\u03ae\u03ac\3\2\2\2\u03ae\u03af\3\2\2\2")
        buf.write("\u03af\u03b2\3\2\2\2\u03b0\u03ae\3\2\2\2\u03b1\u03a8\3")
        buf.write("\2\2\2\u03b1\u03b2\3\2\2\2\u03b2\u03b4\3\2\2\2\u03b3\u039f")
        buf.write("\3\2\2\2\u03b3\u03a7\3\2\2\2\u03b4\u00c1\3\2\2\2\u03b5")
        buf.write("\u03b7\7\u00df\2\2\u03b6\u03b8\5\u00ccg\2\u03b7\u03b6")
        buf.write("\3\2\2\2\u03b7\u03b8\3\2\2\2\u03b8\u03ba\3\2\2\2\u03b9")
        buf.write("\u03bb\5\u00caf\2\u03ba\u03b9\3\2\2\2\u03ba\u03bb\3\2")
        buf.write("\2\2\u03bb\u03bc\3\2\2\2\u03bc\u03bd\5\u00c0a\2\u03bd")
        buf.write("\u03be\5\u00e0q\2\u03be\u00c3\3\2\2\2\u03bf\u03c5\5L\'")
        buf.write("\2\u03c0\u03c1\5\u00aaV\2\u03c1\u03c2\7\u0120\2\2\u03c2")
        buf.write("\u03c3\7\u011c\2\2\u03c3\u03c5\3\2\2\2\u03c4\u03bf\3\2")
        buf.write("\2\2\u03c4\u03c0\3\2\2\2\u03c5\u00c5\3\2\2\2\u03c6\u03c7")
        buf.write("\7Z\2\2\u03c7\u03c8\7\u011a\2\2\u03c8\u03c9\7\u011c\2")
        buf.write("\2\u03c9\u03cc\7\u011b\2\2\u03ca\u03cc\5^\60\2\u03cb\u03c6")
        buf.write("\3\2\2\2\u03cb\u03ca\3\2\2\2\u03cc\u00c7\3\2\2\2\u03cd")
        buf.write("\u03ce\t\6\2\2\u03ce\u00c9\3\2\2\2\u03cf\u03d0\7,\2\2")
        buf.write("\u03d0\u03d1\5\u00eex\2\u03d1\u00cb\3\2\2\2\u03d2\u03d3")
        buf.write("\t\7\2\2\u03d3\u00cd\3\2\2\2\u03d4\u03d5\t\b\2\2\u03d5")
        buf.write("\u00cf\3\2\2\2\u03d6\u03d8\5\u00ceh\2\u03d7\u03d6\3\2")
        buf.write("\2\2\u03d7\u03d8\3\2\2\2\u03d8\u03d9\3\2\2\2\u03d9\u03da")
        buf.write("\5\u00eex\2\u03da\u00d1\3\2\2\2\u03db\u03de\5*\26\2\u03dc")
        buf.write("\u03de\5\u00eex\2\u03dd\u03db\3\2\2\2\u03dd\u03dc\3\2")
        buf.write("\2\2\u03de\u00d3\3\2\2\2\u03df\u03e1\5\u00d2j\2\u03e0")
        buf.write("\u03e2\5\u009cO\2\u03e1\u03e0\3\2\2\2\u03e1\u03e2\3\2")
        buf.write("\2\2\u03e2\u00d5\3\2\2\2\u03e3\u03e8\5\u00d4k\2\u03e4")
        buf.write("\u03e5\7\u011e\2\2\u03e5\u03e7\5\u00d4k\2\u03e6\u03e4")
        buf.write("\3\2\2\2\u03e7\u03ea\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e8")
        buf.write("\u03e9\3\2\2\2\u03e9\u00d7\3\2\2\2\u03ea\u03e8\3\2\2\2")
        buf.write("\u03eb\u03ec\5V,\2\u03ec\u00d9\3\2\2\2\u03ed\u03ee\5&")
        buf.write("\24\2\u03ee\u00db\3\2\2\2\u03ef\u03f3\5\u00d8m\2\u03f0")
        buf.write("\u03f3\5\u00f8}\2\u03f1\u03f3\5\"\22\2\u03f2\u03ef\3\2")
        buf.write("\2\2\u03f2\u03f0\3\2\2\2\u03f2\u03f1\3\2\2\2\u03f3\u00dd")
        buf.write("\3\2\2\2\u03f4\u03f5\7\u011a\2\2\u03f5\u03f6\5\u00acW")
        buf.write("\2\u03f6\u03f7\7\u011b\2\2\u03f7\u00df\3\2\2\2\u03f8\u03fa")
        buf.write("\5Z.\2\u03f9\u03fb\5\u0102\u0082\2\u03fa\u03f9\3\2\2\2")
        buf.write("\u03fa\u03fb\3\2\2\2\u03fb\u03fd\3\2\2\2\u03fc\u03fe\5")
        buf.write("b\62\2\u03fd\u03fc\3\2\2\2\u03fd\u03fe\3\2\2\2\u03fe\u0400")
        buf.write("\3\2\2\2\u03ff\u0401\5h\65\2\u0400\u03ff\3\2\2\2\u0400")
        buf.write("\u0401\3\2\2\2\u0401\u0403\3\2\2\2\u0402\u0404\5\u009a")
        buf.write("N\2\u0403\u0402\3\2\2\2\u0403\u0404\3\2\2\2\u0404\u0406")
        buf.write("\3\2\2\2\u0405\u0407\5\u0098M\2\u0406\u0405\3\2\2\2\u0406")
        buf.write("\u0407\3\2\2\2\u0407\u00e1\3\2\2\2\u0408\u0409\5\u00bc")
        buf.write("_\2\u0409\u040a\7\u0120\2\2\u040a\u040c\3\2\2\2\u040b")
        buf.write("\u0408\3\2\2\2\u040b\u040c\3\2\2\2\u040c\u040d\3\2\2\2")
        buf.write("\u040d\u040e\5j\66\2\u040e\u00e3\3\2\2\2\u040f\u0410\b")
        buf.write("s\1\2\u0410\u0412\5\u00e2r\2\u0411\u0413\5H%\2\u0412\u0411")
        buf.write("\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u041c\3\2\2\2\u0414")
        buf.write("\u0415\5N(\2\u0415\u0416\5H%\2\u0416\u041c\3\2\2\2\u0417")
        buf.write("\u0418\7\u011a\2\2\u0418\u0419\5|?\2\u0419\u041a\7\u011b")
        buf.write("\2\2\u041a\u041c\3\2\2\2\u041b\u040f\3\2\2\2\u041b\u0414")
        buf.write("\3\2\2\2\u041b\u0417\3\2\2\2\u041c\u042b\3\2\2\2\u041d")
        buf.write("\u041f\f\4\2\2\u041e\u0420\7\u00b4\2\2\u041f\u041e\3\2")
        buf.write("\2\2\u041f\u0420\3\2\2\2\u0420\u0422\3\2\2\2\u0421\u0423")
        buf.write("\5z>\2\u0422\u0421\3\2\2\2\u0422\u0423\3\2\2\2\u0423\u0424")
        buf.write("\3\2\2\2\u0424\u0425\7\u00a2\2\2\u0425\u0427\5\u00e4s")
        buf.write("\2\u0426\u0428\5x=\2\u0427\u0426\3\2\2\2\u0427\u0428\3")
        buf.write("\2\2\2\u0428\u042a\3\2\2\2\u0429\u041d\3\2\2\2\u042a\u042d")
        buf.write("\3\2\2\2\u042b\u0429\3\2\2\2\u042b\u042c\3\2\2\2\u042c")
        buf.write("\u00e5\3\2\2\2\u042d\u042b\3\2\2\2\u042e\u042f\5\u00de")
        buf.write("p\2\u042f\u00e7\3\2\2\2\u0430\u0431\bu\1\2\u0431\u0432")
        buf.write("\5X-\2\u0432\u043e\3\2\2\2\u0433\u0434\f\5\2\2\u0434\u0435")
        buf.write("\7\u011c\2\2\u0435\u043d\5X-\2\u0436\u0437\f\4\2\2\u0437")
        buf.write("\u0438\7\u0129\2\2\u0438\u043d\5X-\2\u0439\u043a\f\3\2")
        buf.write("\2\u043a\u043b\7\u0130\2\2\u043b\u043d\5X-\2\u043c\u0433")
        buf.write("\3\2\2\2\u043c\u0436\3\2\2\2\u043c\u0439\3\2\2\2\u043d")
        buf.write("\u0440\3\2\2\2\u043e\u043c\3\2\2\2\u043e\u043f\3\2\2\2")
        buf.write("\u043f\u00e9\3\2\2\2\u0440\u043e\3\2\2\2\u0441\u0442\7")
        buf.write("\4\2\2\u0442\u0443\7\u011a\2\2\u0443\u0444\5\u0094K\2")
        buf.write("\u0444\u0445\7\u011b\2\2\u0445\u0471\3\2\2\2\u0446\u0447")
        buf.write("\7\4\2\2\u0447\u0448\7\u011a\2\2\u0448\u0449\5\u0094K")
        buf.write("\2\u0449\u044a\7\u011b\2\2\u044a\u0471\3\2\2\2\u044b\u044c")
        buf.write("\7\6\2\2\u044c\u044d\7\u011a\2\2\u044d\u044e\5\u0094K")
        buf.write("\2\u044e\u044f\7\u011b\2\2\u044f\u0471\3\2\2\2\u0450\u0451")
        buf.write("\7\7\2\2\u0451\u0452\7\u011a\2\2\u0452\u0453\5\u0094K")
        buf.write("\2\u0453\u0454\7\u011b\2\2\u0454\u0471\3\2\2\2\u0455\u0456")
        buf.write("\7\b\2\2\u0456\u0457\7\u011a\2\2\u0457\u0458\5\u0094K")
        buf.write("\2\u0458\u0459\7\u011e\2\2\u0459\u045a\5\u0094K\2\u045a")
        buf.write("\u045b\7\u011b\2\2\u045b\u0471\3\2\2\2\u045c\u045d\7\25")
        buf.write("\2\2\u045d\u045e\7\u011a\2\2\u045e\u045f\5\u0094K\2\u045f")
        buf.write("\u0460\7\u011b\2\2\u0460\u0471\3\2\2\2\u0461\u0462\7\26")
        buf.write("\2\2\u0462\u0463\7\u011a\2\2\u0463\u0464\5\u0094K\2\u0464")
        buf.write("\u0465\7\u011b\2\2\u0465\u0471\3\2\2\2\u0466\u0467\7)")
        buf.write("\2\2\u0467\u0468\7\u011a\2\2\u0468\u0469\5\u0094K\2\u0469")
        buf.write("\u046a\7\u011b\2\2\u046a\u0471\3\2\2\2\u046b\u046c\7+")
        buf.write("\2\2\u046c\u046d\7\u011a\2\2\u046d\u046e\5\u0094K\2\u046e")
        buf.write("\u046f\7\u011b\2\2\u046f\u0471\3\2\2\2\u0470\u0441\3\2")
        buf.write("\2\2\u0470\u0446\3\2\2\2\u0470\u044b\3\2\2\2\u0470\u0450")
        buf.write("\3\2\2\2\u0470\u0455\3\2\2\2\u0470\u045c\3\2\2\2\u0470")
        buf.write("\u0461\3\2\2\2\u0470\u0466\3\2\2\2\u0470\u046b\3\2\2\2")
        buf.write("\u0471\u00eb\3\2\2\2\u0472\u0473\7\u0116\2\2\u0473\u00ed")
        buf.write("\3\2\2\2\u0474\u0475\7\u0111\2\2\u0475\u00ef\3\2\2\2\u0476")
        buf.write("\u0477\7\u0114\2\2\u0477\u00f1\3\2\2\2\u0478\u047b\5\u00f4")
        buf.write("{\2\u0479\u047b\5\\/\2\u047a\u0478\3\2\2\2\u047a\u0479")
        buf.write("\3\2\2\2\u047b\u00f3\3\2\2\2\u047c\u0480\5R*\2\u047d\u0480")
        buf.write("\5\2\2\2\u047e\u0480\5\u00f0y\2\u047f\u047c\3\2\2\2\u047f")
        buf.write("\u047d\3\2\2\2\u047f\u047e\3\2\2\2\u0480\u00f5\3\2\2\2")
        buf.write("\u0481\u0482\5\u00f2z\2\u0482\u00f7\3\2\2\2\u0483\u0484")
        buf.write("\5\u00fa~\2\u0484\u048d\7\u011a\2\2\u0485\u048a\5\u00fc")
        buf.write("\177\2\u0486\u0487\7\u011e\2\2\u0487\u0489\5\u00fc\177")
        buf.write("\2\u0488\u0486\3\2\2\2\u0489\u048c\3\2\2\2\u048a\u0488")
        buf.write("\3\2\2\2\u048a\u048b\3\2\2\2\u048b\u048e\3\2\2\2\u048c")
        buf.write("\u048a\3\2\2\2\u048d\u0485\3\2\2\2\u048d\u048e\3\2\2\2")
        buf.write("\u048e\u048f\3\2\2\2\u048f\u0490\7\u011b\2\2\u0490\u00f9")
        buf.write("\3\2\2\2\u0491\u0492\5\u00ba^\2\u0492\u00fb\3\2\2\2\u0493")
        buf.write("\u0494\5\u00fe\u0080\2\u0494\u00fd\3\2\2\2\u0495\u049a")
        buf.write("\5\u0094K\2\u0496\u049a\5\u00dan\2\u0497\u049a\5\32\16")
        buf.write("\2\u0498\u049a\5`\61\2\u0499\u0495\3\2\2\2\u0499\u0496")
        buf.write("\3\2\2\2\u0499\u0497\3\2\2\2\u0499\u0498\3\2\2\2\u049a")
        buf.write("\u00ff\3\2\2\2\u049b\u04a3\5\u00f6|\2\u049c\u04a3\5.\30")
        buf.write("\2\u049d\u04a3\5\u00c6d\2\u049e\u049f\7\u011a\2\2\u049f")
        buf.write("\u04a0\5\u00fe\u0080\2\u04a0\u04a1\7\u011b\2\2\u04a1\u04a3")
        buf.write("\3\2\2\2\u04a2\u049b\3\2\2\2\u04a2\u049c\3\2\2\2\u04a2")
        buf.write("\u049d\3\2\2\2\u04a2\u049e\3\2\2\2\u04a3\u0101\3\2\2\2")
        buf.write("\u04a4\u04a5\7\u010b\2\2\u04a5\u04a6\5\u00be`\2\u04a6")
        buf.write("\u0103\3\2\2\2\u04a7\u04b3\5\u00aeX\2\u04a8\u04a9\7\u011a")
        buf.write("\2\2\u04a9\u04ae\5*\26\2\u04aa\u04ab\7\u011e\2\2\u04ab")
        buf.write("\u04ad\5*\26\2\u04ac\u04aa\3\2\2\2\u04ad\u04b0\3\2\2\2")
        buf.write("\u04ae\u04ac\3\2\2\2\u04ae\u04af\3\2\2\2\u04af\u04b1\3")
        buf.write("\2\2\2\u04b0\u04ae\3\2\2\2\u04b1\u04b2\7\u011b\2\2\u04b2")
        buf.write("\u04b4\3\2\2\2\u04b3\u04a8\3\2\2\2\u04b3\u04b4\3\2\2\2")
        buf.write("\u04b4\u04b5\3\2\2\2\u04b5\u04b6\7\67\2\2\u04b6\u04b8")
        buf.write("\7\u011a\2\2\u04b7\u04b9\5\u00b2Z\2\u04b8\u04b7\3\2\2")
        buf.write("\2\u04b8\u04b9\3\2\2\2\u04b9\u04ba\3\2\2\2\u04ba\u04bb")
        buf.write("\7\u011b\2\2\u04bb\u0105\3\2\2\2m\u010e\u0114\u0124\u0130")
        buf.write("\u013a\u013f\u015d\u0163\u0167\u017a\u0180\u0198\u01af")
        buf.write("\u01b9\u01cb\u01d2\u01d4\u01d8\u01e3\u01ed\u01f5\u0201")
        buf.write("\u020e\u0216\u021a\u0224\u022b\u023c\u0241\u0243\u0247")
        buf.write("\u024a\u024f\u0255\u0259\u0260\u0265\u02a5\u02ad\u02bb")
        buf.write("\u02bf\u02ca\u02d1\u02d5\u02dc\u02e2\u02e6\u02ec\u02f1")
        buf.write("\u02f7\u02fa\u02fe\u0305\u0319\u031b\u0322\u0343\u034d")
        buf.write("\u0351\u0356\u035b\u0360\u0366\u0369\u036b\u0375\u037c")
        buf.write("\u0381\u0386\u039c\u03a4\u03ae\u03b1\u03b3\u03b7\u03ba")
        buf.write("\u03c4\u03cb\u03d7\u03dd\u03e1\u03e8\u03f2\u03fa\u03fd")
        buf.write("\u0400\u0403\u0406\u040b\u0412\u041b\u041f\u0422\u0427")
        buf.write("\u042b\u043c\u043e\u0470\u047a\u047f\u048a\u048d\u0499")
        buf.write("\u04a2\u04ae\u04b3\u04b8")
        return buf.getvalue()


class ADQLParser ( Parser ):

    grammarFileName = "ADQLParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'&'", "'~'", "'^'", "'('", "')'", "'*'", 
                     "'+'", "','", "'-'", "'.'", "':'", "';'", "'<'", "'='", 
                     "'>'", "'?'", "'|'", "'_'", "'/'", "'||'", "'<='", 
                     "'>='", "<INVALID>", "'\"'", "'''", "'%'" ]

    symbolicNames = [ "<INVALID>", "ABS", "ACOS", "AREA", "ASIN", "ATAN", 
                      "ATAN2", "BIT_AND", "BIT_NOT", "BIT_OR", "BIT_XOR", 
                      "BOX", "CEILING", "CENTROID", "CIRCLE", "CONTAINS", 
                      "COORD1", "COORD2", "COORDSYS", "COS", "COT", "DEGREES", 
                      "DISTANCE", "EXP", "FLOOR", "ILIKE", "INTERSECTS", 
                      "IN_UNIT", "LOG", "LOG10", "MOD", "PI", "POINT", "POLYGON", 
                      "POWER", "RADIANS", "REGION", "RAND", "ROUND", "SIN", 
                      "SQRT", "TAN", "TOP", "TRUNCATE", "ABSOLUTE", "ACTION", 
                      "ADD", "ALL", "ALLOCATE", "ALTER", "AND", "ANY", "ARE", 
                      "AS", "ASC", "ASSERTION", "AT", "AUTHORIZATION", "AVG", 
                      "BEGIN", "BETWEEN", "BIT", "BIT_LENGTH", "BOTH", "BY", 
                      "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", 
                      "CHAR", "CHARACTER", "CHAR_LENGTH", "CHARACTER_LENGTH", 
                      "CHECK", "CLOSE", "COALESCE", "COLLATE", "COLLATION", 
                      "COLUMN", "COMMIT", "CONNECT", "CONNECTION", "CONSTRAINT", 
                      "CONSTRAINTS", "CONTINUE", "CONVERT", "CORRESPONDING", 
                      "COUNT", "CREATE", "CROSS", "CURRENT", "CURRENT_DATE", 
                      "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", 
                      "CURSOR", "DATE", "DAY", "DEALLOCATE", "DECIMAL", 
                      "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", 
                      "DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DISCONNECT", 
                      "DISTINCT", "DOMAIN", "DOUBLE", "DROP", "E_SYM", "ELSE", 
                      "END", "ENDEXEC_SYM", "ESCAPE", "EXCEPT", "EXCEPTION", 
                      "EXEC", "EXECUTE", "EXISTS", "EXTERNAL", "EXTRACT", 
                      "FALSE", "FETCH", "FIRST", "FLOAT", "FOR", "FOREIGN", 
                      "FOUND", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO", 
                      "GRANT", "GROUP", "HAVING", "HOUR", "IDENTITY", "IMMEDIATE", 
                      "IN", "INDICATOR", "INITIALLY", "INNER", "INPUT", 
                      "INSENSITIVE", "INSERT", "INT_SYM", "INTEGER", "INTERSECT", 
                      "INTERVAL", "INTO", "IS", "ISOLATION", "JOIN", "KEY", 
                      "LANGUAGE", "LAST", "LEADING", "LEFT", "LEVEL", "LIKE", 
                      "LOCAL", "LOWER", "MATCH", "MAX", "MIN", "MINUTE", 
                      "MODULE", "MONTH", "NAMES", "NATIONAL", "NATURAL", 
                      "NCHAR", "NEXT", "NO", "NOT", "NULL", "NULLIF", "NUMERIC", 
                      "OCTET_LENGTH", "OF", "OFFSET", "ON", "ONLY", "OPEN", 
                      "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", 
                      "PAD", "PARTIAL", "POSITION", "PRECISION", "PREPARE", 
                      "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", 
                      "READ", "REAL_SYM", "REFERENCES", "RELATIVE", "RESTRICT", 
                      "REVOKE", "RIGHT", "ROLLBACK", "ROWS", "SCHEMA", "SCROLL", 
                      "SECOND", "SECTION", "SELECT", "SESSION", "SESSION_USER", 
                      "SET", "SIZE", "SMALLINT", "SOME", "SPACE", "SQL", 
                      "SQLCODE", "SQLERROR", "SQLSTATE", "SUBSTRING", "SUM", 
                      "SYSTEM_USER", "TABLE", "TEMPORARY", "THEN", "TIME", 
                      "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", 
                      "TRAILING", "TRANSACTION", "TRANSLATE", "TRANSLATION", 
                      "TRIM", "TRUE", "UNION", "UNIQUE", "UNKNOWN", "UPDATE", 
                      "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", 
                      "VARCHAR", "VARYING", "VIEW", "WHEN", "WHENEVER", 
                      "WHERE", "WITH", "WORK", "WRITE", "YEAR", "ZONE", 
                      "INT", "EXPONENT", "REAL", "HEX_DIGIT", "CSL", "ID", 
                      "AMPERSAND", "TILDE", "CIRCUMFLEX", "LPAREN", "RPAREN", 
                      "ASTERISK", "PLUS", "COMMA", "MINUS", "DOT", "COLON", 
                      "SEMI", "LTH", "EQ", "GTH", "QUESTION", "VERTBAR", 
                      "UNDERSCORE", "SOLIDUS", "CONCAT", "LEET", "GRET", 
                      "NOT_EQ", "DQ", "SQ", "MOD_SYM", "DQ_SYM", "WS", "COMMENT" ]

    RULE_approximate_numeric_literal = 0
    RULE_area = 1
    RULE_as_clause = 2
    RULE_between_predicate = 3
    RULE_bitwise_and = 4
    RULE_bitwise_not = 5
    RULE_bitwise_or = 6
    RULE_bitwise_xor = 7
    RULE_boolean_factor = 8
    RULE_boolean_literal = 9
    RULE_boolean_primary = 10
    RULE_boolean_term = 11
    RULE_boolean_value_expression = 12
    RULE_box = 13
    RULE_catalog_name = 14
    RULE_centroid = 15
    RULE_char_function = 16
    RULE_character_string_literal = 17
    RULE_character_value_expression = 18
    RULE_circle = 19
    RULE_column_name = 20
    RULE_column_name_list = 21
    RULE_column_reference = 22
    RULE_comp_op = 23
    RULE_comparison_predicate = 24
    RULE_concatenation_operator = 25
    RULE_contains = 26
    RULE_coord_sys = 27
    RULE_coord_value = 28
    RULE_coord1 = 29
    RULE_coord2 = 30
    RULE_coordinate1 = 31
    RULE_coordinate2 = 32
    RULE_coordinates = 33
    RULE_correlation_name = 34
    RULE_correlation_specification = 35
    RULE_delimited_identifier = 36
    RULE_derived_column = 37
    RULE_derived_table = 38
    RULE_distance = 39
    RULE_exact_numeric_literal = 40
    RULE_exists_predicate = 41
    RULE_extract_coordsys = 42
    RULE_factor = 43
    RULE_from_clause = 44
    RULE_general_literal = 45
    RULE_general_set_function = 46
    RULE_geometry_value_expression = 47
    RULE_group_by_clause = 48
    RULE_grouping_column_reference = 49
    RULE_grouping_column_reference_list = 50
    RULE_having_clause = 51
    RULE_identifier = 52
    RULE_in_predicate = 53
    RULE_in_predicate_value = 54
    RULE_in_value_list = 55
    RULE_intersects = 56
    RULE_join_column_list = 57
    RULE_join_condition = 58
    RULE_join_specification = 59
    RULE_join_type = 60
    RULE_joined_table = 61
    RULE_like_predicate = 62
    RULE_match_value = 63
    RULE_math_function = 64
    RULE_named_columns_join = 65
    RULE_non_join_query_expression = 66
    RULE_non_join_query_primary = 67
    RULE_non_join_query_term = 68
    RULE_non_predicate_geometry_function = 69
    RULE_null_predicate = 70
    RULE_numeric_geometry_function = 71
    RULE_numeric_primary = 72
    RULE_numeric_value_expression = 73
    RULE_numeric_value_function = 74
    RULE_offset_clause = 75
    RULE_order_by_clause = 76
    RULE_ordering_specification = 77
    RULE_outer_join_type = 78
    RULE_pattern = 79
    RULE_point = 80
    RULE_polygon = 81
    RULE_predicate = 82
    RULE_predicate_geometry_function = 83
    RULE_qualifier = 84
    RULE_query_expression = 85
    RULE_query_name = 86
    RULE_query = 87
    RULE_query_specification = 88
    RULE_query_term = 89
    RULE_radius = 90
    RULE_region = 91
    RULE_regular_identifier = 92
    RULE_schema_name = 93
    RULE_search_condition = 94
    RULE_select_list = 95
    RULE_select_query = 96
    RULE_select_sublist = 97
    RULE_set_function_specification = 98
    RULE_set_function_type = 99
    RULE_set_limit = 100
    RULE_set_quantifier = 101
    RULE_sign = 102
    RULE_signed_integer = 103
    RULE_sort_key = 104
    RULE_sort_specification = 105
    RULE_sort_specification_list = 106
    RULE_string_geometry_function = 107
    RULE_string_value_expression = 108
    RULE_string_value_function = 109
    RULE_subquery = 110
    RULE_table_expression = 111
    RULE_table_name = 112
    RULE_table_reference = 113
    RULE_table_subquery = 114
    RULE_term = 115
    RULE_trig_function = 116
    RULE_unqualified_schema_name = 117
    RULE_unsigned_decimal = 118
    RULE_unsigned_hexadecimal = 119
    RULE_unsigned_literal = 120
    RULE_unsigned_numeric_literal = 121
    RULE_unsigned_value_specification = 122
    RULE_user_defined_function = 123
    RULE_user_defined_function_name = 124
    RULE_user_defined_function_param = 125
    RULE_value_expression = 126
    RULE_value_expression_primary = 127
    RULE_where_clause = 128
    RULE_with_query = 129

    ruleNames =  [ "approximate_numeric_literal", "area", "as_clause", "between_predicate", 
                   "bitwise_and", "bitwise_not", "bitwise_or", "bitwise_xor", 
                   "boolean_factor", "boolean_literal", "boolean_primary", 
                   "boolean_term", "boolean_value_expression", "box", "catalog_name", 
                   "centroid", "char_function", "character_string_literal", 
                   "character_value_expression", "circle", "column_name", 
                   "column_name_list", "column_reference", "comp_op", "comparison_predicate", 
                   "concatenation_operator", "contains", "coord_sys", "coord_value", 
                   "coord1", "coord2", "coordinate1", "coordinate2", "coordinates", 
                   "correlation_name", "correlation_specification", "delimited_identifier", 
                   "derived_column", "derived_table", "distance", "exact_numeric_literal", 
                   "exists_predicate", "extract_coordsys", "factor", "from_clause", 
                   "general_literal", "general_set_function", "geometry_value_expression", 
                   "group_by_clause", "grouping_column_reference", "grouping_column_reference_list", 
                   "having_clause", "identifier", "in_predicate", "in_predicate_value", 
                   "in_value_list", "intersects", "join_column_list", "join_condition", 
                   "join_specification", "join_type", "joined_table", "like_predicate", 
                   "match_value", "math_function", "named_columns_join", 
                   "non_join_query_expression", "non_join_query_primary", 
                   "non_join_query_term", "non_predicate_geometry_function", 
                   "null_predicate", "numeric_geometry_function", "numeric_primary", 
                   "numeric_value_expression", "numeric_value_function", 
                   "offset_clause", "order_by_clause", "ordering_specification", 
                   "outer_join_type", "pattern", "point", "polygon", "predicate", 
                   "predicate_geometry_function", "qualifier", "query_expression", 
                   "query_name", "query", "query_specification", "query_term", 
                   "radius", "region", "regular_identifier", "schema_name", 
                   "search_condition", "select_list", "select_query", "select_sublist", 
                   "set_function_specification", "set_function_type", "set_limit", 
                   "set_quantifier", "sign", "signed_integer", "sort_key", 
                   "sort_specification", "sort_specification_list", "string_geometry_function", 
                   "string_value_expression", "string_value_function", "subquery", 
                   "table_expression", "table_name", "table_reference", 
                   "table_subquery", "term", "trig_function", "unqualified_schema_name", 
                   "unsigned_decimal", "unsigned_hexadecimal", "unsigned_literal", 
                   "unsigned_numeric_literal", "unsigned_value_specification", 
                   "user_defined_function", "user_defined_function_name", 
                   "user_defined_function_param", "value_expression", "value_expression_primary", 
                   "where_clause", "with_query" ]

    EOF = Token.EOF
    ABS=1
    ACOS=2
    AREA=3
    ASIN=4
    ATAN=5
    ATAN2=6
    BIT_AND=7
    BIT_NOT=8
    BIT_OR=9
    BIT_XOR=10
    BOX=11
    CEILING=12
    CENTROID=13
    CIRCLE=14
    CONTAINS=15
    COORD1=16
    COORD2=17
    COORDSYS=18
    COS=19
    COT=20
    DEGREES=21
    DISTANCE=22
    EXP=23
    FLOOR=24
    ILIKE=25
    INTERSECTS=26
    IN_UNIT=27
    LOG=28
    LOG10=29
    MOD=30
    PI=31
    POINT=32
    POLYGON=33
    POWER=34
    RADIANS=35
    REGION=36
    RAND=37
    ROUND=38
    SIN=39
    SQRT=40
    TAN=41
    TOP=42
    TRUNCATE=43
    ABSOLUTE=44
    ACTION=45
    ADD=46
    ALL=47
    ALLOCATE=48
    ALTER=49
    AND=50
    ANY=51
    ARE=52
    AS=53
    ASC=54
    ASSERTION=55
    AT=56
    AUTHORIZATION=57
    AVG=58
    BEGIN=59
    BETWEEN=60
    BIT=61
    BIT_LENGTH=62
    BOTH=63
    BY=64
    CASCADE=65
    CASCADED=66
    CASE=67
    CAST=68
    CATALOG=69
    CHAR=70
    CHARACTER=71
    CHAR_LENGTH=72
    CHARACTER_LENGTH=73
    CHECK=74
    CLOSE=75
    COALESCE=76
    COLLATE=77
    COLLATION=78
    COLUMN=79
    COMMIT=80
    CONNECT=81
    CONNECTION=82
    CONSTRAINT=83
    CONSTRAINTS=84
    CONTINUE=85
    CONVERT=86
    CORRESPONDING=87
    COUNT=88
    CREATE=89
    CROSS=90
    CURRENT=91
    CURRENT_DATE=92
    CURRENT_TIME=93
    CURRENT_TIMESTAMP=94
    CURRENT_USER=95
    CURSOR=96
    DATE=97
    DAY=98
    DEALLOCATE=99
    DECIMAL=100
    DECLARE=101
    DEFAULT=102
    DEFERRABLE=103
    DEFERRED=104
    DELETE=105
    DESC=106
    DESCRIBE=107
    DESCRIPTOR=108
    DIAGNOSTICS=109
    DISCONNECT=110
    DISTINCT=111
    DOMAIN=112
    DOUBLE=113
    DROP=114
    E_SYM=115
    ELSE=116
    END=117
    ENDEXEC_SYM=118
    ESCAPE=119
    EXCEPT=120
    EXCEPTION=121
    EXEC=122
    EXECUTE=123
    EXISTS=124
    EXTERNAL=125
    EXTRACT=126
    FALSE=127
    FETCH=128
    FIRST=129
    FLOAT=130
    FOR=131
    FOREIGN=132
    FOUND=133
    FROM=134
    FULL=135
    GET=136
    GLOBAL=137
    GO=138
    GOTO=139
    GRANT=140
    GROUP=141
    HAVING=142
    HOUR=143
    IDENTITY=144
    IMMEDIATE=145
    IN=146
    INDICATOR=147
    INITIALLY=148
    INNER=149
    INPUT=150
    INSENSITIVE=151
    INSERT=152
    INT_SYM=153
    INTEGER=154
    INTERSECT=155
    INTERVAL=156
    INTO=157
    IS=158
    ISOLATION=159
    JOIN=160
    KEY=161
    LANGUAGE=162
    LAST=163
    LEADING=164
    LEFT=165
    LEVEL=166
    LIKE=167
    LOCAL=168
    LOWER=169
    MATCH=170
    MAX=171
    MIN=172
    MINUTE=173
    MODULE=174
    MONTH=175
    NAMES=176
    NATIONAL=177
    NATURAL=178
    NCHAR=179
    NEXT=180
    NO=181
    NOT=182
    NULL=183
    NULLIF=184
    NUMERIC=185
    OCTET_LENGTH=186
    OF=187
    OFFSET=188
    ON=189
    ONLY=190
    OPEN=191
    OPTION=192
    OR=193
    ORDER=194
    OUTER=195
    OUTPUT=196
    OVERLAPS=197
    PAD=198
    PARTIAL=199
    POSITION=200
    PRECISION=201
    PREPARE=202
    PRESERVE=203
    PRIMARY=204
    PRIOR=205
    PRIVILEGES=206
    PROCEDURE=207
    READ=208
    REAL_SYM=209
    REFERENCES=210
    RELATIVE=211
    RESTRICT=212
    REVOKE=213
    RIGHT=214
    ROLLBACK=215
    ROWS=216
    SCHEMA=217
    SCROLL=218
    SECOND=219
    SECTION=220
    SELECT=221
    SESSION=222
    SESSION_USER=223
    SET=224
    SIZE=225
    SMALLINT=226
    SOME=227
    SPACE=228
    SQL=229
    SQLCODE=230
    SQLERROR=231
    SQLSTATE=232
    SUBSTRING=233
    SUM=234
    SYSTEM_USER=235
    TABLE=236
    TEMPORARY=237
    THEN=238
    TIME=239
    TIMESTAMP=240
    TIMEZONE_HOUR=241
    TIMEZONE_MINUTE=242
    TO=243
    TRAILING=244
    TRANSACTION=245
    TRANSLATE=246
    TRANSLATION=247
    TRIM=248
    TRUE=249
    UNION=250
    UNIQUE=251
    UNKNOWN=252
    UPDATE=253
    UPPER=254
    USAGE=255
    USER=256
    USING=257
    VALUE=258
    VALUES=259
    VARCHAR=260
    VARYING=261
    VIEW=262
    WHEN=263
    WHENEVER=264
    WHERE=265
    WITH=266
    WORK=267
    WRITE=268
    YEAR=269
    ZONE=270
    INT=271
    EXPONENT=272
    REAL=273
    HEX_DIGIT=274
    CSL=275
    ID=276
    AMPERSAND=277
    TILDE=278
    CIRCUMFLEX=279
    LPAREN=280
    RPAREN=281
    ASTERISK=282
    PLUS=283
    COMMA=284
    MINUS=285
    DOT=286
    COLON=287
    SEMI=288
    LTH=289
    EQ=290
    GTH=291
    QUESTION=292
    VERTBAR=293
    UNDERSCORE=294
    SOLIDUS=295
    CONCAT=296
    LEET=297
    GRET=298
    NOT_EQ=299
    DQ=300
    SQ=301
    MOD_SYM=302
    DQ_SYM=303
    WS=304
    COMMENT=305

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




    class Approximate_numeric_literalContext(ParserRuleContext):

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

        def REAL(self):
            return self.getToken(ADQLParser.REAL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_approximate_numeric_literal

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

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

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




    def approximate_numeric_literal(self):

        localctx = ADQLParser.Approximate_numeric_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_approximate_numeric_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 260
            self.match(ADQLParser.REAL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AreaContext(ParserRuleContext):

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

        def AREA(self):
            return self.getToken(ADQLParser.AREA, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def geometry_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_area

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

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

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




    def area(self):

        localctx = ADQLParser.AreaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_area)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 262
            self.match(ADQLParser.AREA)
            self.state = 263
            self.match(ADQLParser.LPAREN)
            self.state = 264
            self.geometry_value_expression()
            self.state = 265
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class As_clauseContext(ParserRuleContext):

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

        def column_name(self):
            return self.getTypedRuleContext(ADQLParser.Column_nameContext,0)


        def AS(self):
            return self.getToken(ADQLParser.AS, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_as_clause

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

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

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




    def as_clause(self):

        localctx = ADQLParser.As_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_as_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 268
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.AS:
                self.state = 267
                self.match(ADQLParser.AS)


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


    class Between_predicateContext(ParserRuleContext):

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

        def value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Value_expressionContext,i)


        def BETWEEN(self):
            return self.getToken(ADQLParser.BETWEEN, 0)

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

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

        def getRuleIndex(self):
            return ADQLParser.RULE_between_predicate

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

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

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




    def between_predicate(self):

        localctx = ADQLParser.Between_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_between_predicate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            self.value_expression()
            self.state = 274
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.NOT:
                self.state = 273
                self.match(ADQLParser.NOT)


            self.state = 276
            self.match(ADQLParser.BETWEEN)
            self.state = 277
            self.value_expression()
            self.state = 278
            self.match(ADQLParser.AND)
            self.state = 279
            self.value_expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Bitwise_andContext(ParserRuleContext):

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

        def AMPERSAND(self):
            return self.getToken(ADQLParser.AMPERSAND, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_bitwise_and

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

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

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




    def bitwise_and(self):

        localctx = ADQLParser.Bitwise_andContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_bitwise_and)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 281
            self.match(ADQLParser.AMPERSAND)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Bitwise_notContext(ParserRuleContext):

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

        def TILDE(self):
            return self.getToken(ADQLParser.TILDE, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_bitwise_not

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

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

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




    def bitwise_not(self):

        localctx = ADQLParser.Bitwise_notContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_bitwise_not)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 283
            self.match(ADQLParser.TILDE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Bitwise_orContext(ParserRuleContext):

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

        def VERTBAR(self):
            return self.getToken(ADQLParser.VERTBAR, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_bitwise_or

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

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

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




    def bitwise_or(self):

        localctx = ADQLParser.Bitwise_orContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_bitwise_or)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 285
            self.match(ADQLParser.VERTBAR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Bitwise_xorContext(ParserRuleContext):

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

        def CIRCUMFLEX(self):
            return self.getToken(ADQLParser.CIRCUMFLEX, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_bitwise_xor

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

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

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




    def bitwise_xor(self):

        localctx = ADQLParser.Bitwise_xorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_bitwise_xor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 287
            self.match(ADQLParser.CIRCUMFLEX)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Boolean_factorContext(ParserRuleContext):

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

        def boolean_primary(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_primaryContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_boolean_factor

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

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

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




    def boolean_factor(self):

        localctx = ADQLParser.Boolean_factorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_boolean_factor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 290
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.NOT:
                self.state = 289
                self.match(ADQLParser.NOT)


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


    class Boolean_literalContext(ParserRuleContext):

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

        def TRUE(self):
            return self.getToken(ADQLParser.TRUE, 0)

        def FALSE(self):
            return self.getToken(ADQLParser.FALSE, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_boolean_literal

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

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

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




    def boolean_literal(self):

        localctx = ADQLParser.Boolean_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_boolean_literal)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 294
            _la = self._input.LA(1)
            if not(_la==ADQLParser.FALSE or _la==ADQLParser.TRUE):
                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 Boolean_primaryContext(ParserRuleContext):

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

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def search_condition(self):
            return self.getTypedRuleContext(ADQLParser.Search_conditionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def predicate(self):
            return self.getTypedRuleContext(ADQLParser.PredicateContext,0)


        def boolean_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_boolean_primary

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

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

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




    def boolean_primary(self):

        localctx = ADQLParser.Boolean_primaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_boolean_primary)
        try:
            self.state = 302
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 296
                self.match(ADQLParser.LPAREN)
                self.state = 297
                self.search_condition(0)
                self.state = 298
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 300
                self.predicate()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 301
                self.boolean_value_expression()
                pass


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


    class Boolean_termContext(ParserRuleContext):

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

        def boolean_factor(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_factorContext,0)


        def boolean_term(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_termContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_boolean_term

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

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

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



    def boolean_term(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Boolean_termContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 22
        self.enterRecursionRule(localctx, 22, self.RULE_boolean_term, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 305
            self.boolean_factor()
            self._ctx.stop = self._input.LT(-1)
            self.state = 312
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,4,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 = ADQLParser.Boolean_termContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_boolean_term)
                    self.state = 307
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 308
                    self.match(ADQLParser.AND)
                    self.state = 309
                    self.boolean_factor() 
                self.state = 314
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,4,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 Boolean_value_expressionContext(ParserRuleContext):

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

        def boolean_literal(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_literalContext,0)


        def user_defined_function(self):
            return self.getTypedRuleContext(ADQLParser.User_defined_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_boolean_value_expression

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

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

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




    def boolean_value_expression(self):

        localctx = ADQLParser.Boolean_value_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_boolean_value_expression)
        try:
            self.state = 317
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.FALSE, ADQLParser.TRUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 315
                self.boolean_literal()
                pass
            elif token in [ADQLParser.ID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 316
                self.user_defined_function()
                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 BoxContext(ParserRuleContext):

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

        def BOX(self):
            return self.getToken(ADQLParser.BOX, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_sys(self):
            return self.getTypedRuleContext(ADQLParser.Coord_sysContext,0)


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

        def coordinates(self):
            return self.getTypedRuleContext(ADQLParser.CoordinatesContext,0)


        def numeric_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Numeric_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,i)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_box

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

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

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




    def box(self):

        localctx = ADQLParser.BoxContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_box)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 319
            self.match(ADQLParser.BOX)
            self.state = 320
            self.match(ADQLParser.LPAREN)
            self.state = 321
            self.coord_sys()
            self.state = 322
            self.match(ADQLParser.COMMA)
            self.state = 323
            self.coordinates()
            self.state = 324
            self.match(ADQLParser.COMMA)
            self.state = 325
            self.numeric_value_expression(0)
            self.state = 326
            self.match(ADQLParser.COMMA)
            self.state = 327
            self.numeric_value_expression(0)
            self.state = 328
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Catalog_nameContext(ParserRuleContext):

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_catalog_name

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

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

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




    def catalog_name(self):

        localctx = ADQLParser.Catalog_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_catalog_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 330
            self.match(ADQLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CentroidContext(ParserRuleContext):

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

        def CENTROID(self):
            return self.getToken(ADQLParser.CENTROID, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def geometry_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_centroid

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

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

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




    def centroid(self):

        localctx = ADQLParser.CentroidContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_centroid)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 332
            self.match(ADQLParser.CENTROID)
            self.state = 333
            self.match(ADQLParser.LPAREN)
            self.state = 334
            self.geometry_value_expression()
            self.state = 335
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Char_functionContext(ParserRuleContext):

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

        def LOWER(self):
            return self.getToken(ADQLParser.LOWER, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def character_string_literal(self):
            return self.getTypedRuleContext(ADQLParser.Character_string_literalContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_char_function

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

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

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




    def char_function(self):

        localctx = ADQLParser.Char_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_char_function)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 337
            self.match(ADQLParser.LOWER)
            self.state = 338
            self.match(ADQLParser.LPAREN)
            self.state = 339
            self.character_string_literal()
            self.state = 340
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Character_string_literalContext(ParserRuleContext):

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

        def CSL(self):
            return self.getToken(ADQLParser.CSL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_character_string_literal

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

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

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




    def character_string_literal(self):

        localctx = ADQLParser.Character_string_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_character_string_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 342
            self.match(ADQLParser.CSL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Character_value_expressionContext(ParserRuleContext):

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

        def value_expression_primary(self):
            return self.getTypedRuleContext(ADQLParser.Value_expression_primaryContext,0)


        def string_value_function(self):
            return self.getTypedRuleContext(ADQLParser.String_value_functionContext,0)


        def character_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Character_value_expressionContext,0)


        def concatenation_operator(self):
            return self.getTypedRuleContext(ADQLParser.Concatenation_operatorContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_character_value_expression

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

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

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



    def character_value_expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Character_value_expressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 36
        self.enterRecursionRule(localctx, 36, self.RULE_character_value_expression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 347
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 345
                self.value_expression_primary()
                pass

            elif la_ == 2:
                self.state = 346
                self.string_value_function()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 357
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,8,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 = ADQLParser.Character_value_expressionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_character_value_expression)
                    self.state = 349
                    if not self.precpred(self._ctx, 3):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                    self.state = 350
                    self.concatenation_operator()
                    self.state = 353
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
                    if la_ == 1:
                        self.state = 351
                        self.value_expression_primary()
                        pass

                    elif la_ == 2:
                        self.state = 352
                        self.string_value_function()
                        pass

             
                self.state = 359
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,8,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 CircleContext(ParserRuleContext):

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

        def CIRCLE(self):
            return self.getToken(ADQLParser.CIRCLE, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_sys(self):
            return self.getTypedRuleContext(ADQLParser.Coord_sysContext,0)


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

        def coordinates(self):
            return self.getTypedRuleContext(ADQLParser.CoordinatesContext,0)


        def radius(self):
            return self.getTypedRuleContext(ADQLParser.RadiusContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_circle

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

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

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




    def circle(self):

        localctx = ADQLParser.CircleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_circle)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 360
            self.match(ADQLParser.CIRCLE)
            self.state = 361
            self.match(ADQLParser.LPAREN)
            self.state = 362
            self.coord_sys()
            self.state = 363
            self.match(ADQLParser.COMMA)
            self.state = 364
            self.coordinates()
            self.state = 365
            self.match(ADQLParser.COMMA)
            self.state = 366
            self.radius()
            self.state = 367
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Column_nameContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ADQLParser.RULE_column_name

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

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

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




    def column_name(self):

        localctx = ADQLParser.Column_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_column_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 369
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Column_name_listContext(ParserRuleContext):

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

        def column_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Column_nameContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Column_nameContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_column_name_list

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

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

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




    def column_name_list(self):

        localctx = ADQLParser.Column_name_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_column_name_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 371
            self.column_name()
            self.state = 376
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ADQLParser.COMMA:
                self.state = 372
                self.match(ADQLParser.COMMA)
                self.state = 373
                self.column_name()
                self.state = 378
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class Column_referenceContext(ParserRuleContext):

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

        def column_name(self):
            return self.getTypedRuleContext(ADQLParser.Column_nameContext,0)


        def qualifier(self):
            return self.getTypedRuleContext(ADQLParser.QualifierContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_column_reference

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

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

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




    def column_reference(self):

        localctx = ADQLParser.Column_referenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_column_reference)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.state = 379
                self.qualifier()
                self.state = 380
                self.match(ADQLParser.DOT)


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


    class Comp_opContext(ParserRuleContext):

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

        def EQ(self):
            return self.getToken(ADQLParser.EQ, 0)

        def NOT_EQ(self):
            return self.getToken(ADQLParser.NOT_EQ, 0)

        def LTH(self):
            return self.getToken(ADQLParser.LTH, 0)

        def GTH(self):
            return self.getToken(ADQLParser.GTH, 0)

        def GRET(self):
            return self.getToken(ADQLParser.GRET, 0)

        def LEET(self):
            return self.getToken(ADQLParser.LEET, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_comp_op

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

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

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




    def comp_op(self):

        localctx = ADQLParser.Comp_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_comp_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 386
            _la = self._input.LA(1)
            if not(((((_la - 289)) & ~0x3f) == 0 and ((1 << (_la - 289)) & ((1 << (ADQLParser.LTH - 289)) | (1 << (ADQLParser.EQ - 289)) | (1 << (ADQLParser.GTH - 289)) | (1 << (ADQLParser.LEET - 289)) | (1 << (ADQLParser.GRET - 289)) | (1 << (ADQLParser.NOT_EQ - 289)))) != 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 Comparison_predicateContext(ParserRuleContext):

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

        def value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Value_expressionContext,i)


        def comp_op(self):
            return self.getTypedRuleContext(ADQLParser.Comp_opContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_comparison_predicate

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

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

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




    def comparison_predicate(self):

        localctx = ADQLParser.Comparison_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_comparison_predicate)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 388
            self.value_expression()
            self.state = 389
            self.comp_op()
            self.state = 390
            self.value_expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Concatenation_operatorContext(ParserRuleContext):

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

        def CONCAT(self):
            return self.getToken(ADQLParser.CONCAT, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_concatenation_operator

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

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

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




    def concatenation_operator(self):

        localctx = ADQLParser.Concatenation_operatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_concatenation_operator)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 392
            self.match(ADQLParser.CONCAT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ContainsContext(ParserRuleContext):

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

        def CONTAINS(self):
            return self.getToken(ADQLParser.CONTAINS, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def geometry_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Geometry_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,i)


        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_contains

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

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

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




    def contains(self):

        localctx = ADQLParser.ContainsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_contains)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 394
            self.match(ADQLParser.CONTAINS)
            self.state = 395
            self.match(ADQLParser.LPAREN)
            self.state = 396
            self.geometry_value_expression()
            self.state = 397
            self.match(ADQLParser.COMMA)
            self.state = 398
            self.geometry_value_expression()
            self.state = 399
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coord_sysContext(ParserRuleContext):

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

        def string_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.String_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_coord_sys

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

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

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




    def coord_sys(self):

        localctx = ADQLParser.Coord_sysContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_coord_sys)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 401
            self.string_value_expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coord_valueContext(ParserRuleContext):

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

        def point(self):
            return self.getTypedRuleContext(ADQLParser.PointContext,0)


        def column_reference(self):
            return self.getTypedRuleContext(ADQLParser.Column_referenceContext,0)


        def centroid(self):
            return self.getTypedRuleContext(ADQLParser.CentroidContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_coord_value

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

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

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




    def coord_value(self):

        localctx = ADQLParser.Coord_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_coord_value)
        try:
            self.state = 406
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.POINT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 403
                self.point()
                pass
            elif token in [ADQLParser.ID, ADQLParser.DQ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 404
                self.column_reference()
                pass
            elif token in [ADQLParser.CENTROID]:
                self.enterOuterAlt(localctx, 3)
                self.state = 405
                self.centroid()
                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 Coord1Context(ParserRuleContext):

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

        def COORD1(self):
            return self.getToken(ADQLParser.COORD1, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_value(self):
            return self.getTypedRuleContext(ADQLParser.Coord_valueContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_coord1

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

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

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




    def coord1(self):

        localctx = ADQLParser.Coord1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_coord1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 408
            self.match(ADQLParser.COORD1)
            self.state = 409
            self.match(ADQLParser.LPAREN)
            self.state = 410
            self.coord_value()
            self.state = 411
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coord2Context(ParserRuleContext):

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

        def COORD2(self):
            return self.getToken(ADQLParser.COORD2, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_value(self):
            return self.getTypedRuleContext(ADQLParser.Coord_valueContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_coord2

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

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

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




    def coord2(self):

        localctx = ADQLParser.Coord2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_coord2)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 413
            self.match(ADQLParser.COORD2)
            self.state = 414
            self.match(ADQLParser.LPAREN)
            self.state = 415
            self.coord_value()
            self.state = 416
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coordinate1Context(ParserRuleContext):

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

        def numeric_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_coordinate1

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

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

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




    def coordinate1(self):

        localctx = ADQLParser.Coordinate1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_coordinate1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 418
            self.numeric_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coordinate2Context(ParserRuleContext):

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

        def numeric_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_coordinate2

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

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

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




    def coordinate2(self):

        localctx = ADQLParser.Coordinate2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_coordinate2)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 420
            self.numeric_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CoordinatesContext(ParserRuleContext):

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

        def coordinate1(self):
            return self.getTypedRuleContext(ADQLParser.Coordinate1Context,0)


        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def coordinate2(self):
            return self.getTypedRuleContext(ADQLParser.Coordinate2Context,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_coordinates

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

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

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




    def coordinates(self):

        localctx = ADQLParser.CoordinatesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_coordinates)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 422
            self.coordinate1()
            self.state = 423
            self.match(ADQLParser.COMMA)
            self.state = 424
            self.coordinate2()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Correlation_nameContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ADQLParser.RULE_correlation_name

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

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

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




    def correlation_name(self):

        localctx = ADQLParser.Correlation_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_correlation_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 426
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Correlation_specificationContext(ParserRuleContext):

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

        def correlation_name(self):
            return self.getTypedRuleContext(ADQLParser.Correlation_nameContext,0)


        def AS(self):
            return self.getToken(ADQLParser.AS, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_correlation_specification

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

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

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




    def correlation_specification(self):

        localctx = ADQLParser.Correlation_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_correlation_specification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 429
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.AS:
                self.state = 428
                self.match(ADQLParser.AS)


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


    class Delimited_identifierContext(ParserRuleContext):

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

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_delimited_identifier

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

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

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




    def delimited_identifier(self):

        localctx = ADQLParser.Delimited_identifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_delimited_identifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 433
            self.match(ADQLParser.DQ)
            self.state = 434
            self.match(ADQLParser.ID)
            self.state = 435
            self.match(ADQLParser.DQ)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Derived_columnContext(ParserRuleContext):

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

        def value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Value_expressionContext,0)


        def as_clause(self):
            return self.getTypedRuleContext(ADQLParser.As_clauseContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_derived_column

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

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

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




    def derived_column(self):

        localctx = ADQLParser.Derived_columnContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_derived_column)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 437
            self.value_expression()
            self.state = 439
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.AS or _la==ADQLParser.ID or _la==ADQLParser.DQ:
                self.state = 438
                self.as_clause()


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


    class Derived_tableContext(ParserRuleContext):

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

        def table_subquery(self):
            return self.getTypedRuleContext(ADQLParser.Table_subqueryContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_derived_table

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

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

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




    def derived_table(self):

        localctx = ADQLParser.Derived_tableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_derived_table)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 441
            self.table_subquery()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DistanceContext(ParserRuleContext):

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

        def DISTANCE(self):
            return self.getToken(ADQLParser.DISTANCE, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def coord_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Coord_valueContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Coord_valueContext,i)


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

        def numeric_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Numeric_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,i)


        def getRuleIndex(self):
            return ADQLParser.RULE_distance

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

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

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




    def distance(self):

        localctx = ADQLParser.DistanceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_distance)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 443
            self.match(ADQLParser.DISTANCE)
            self.state = 444
            self.match(ADQLParser.LPAREN)
            self.state = 457
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.state = 445
                self.coord_value()
                self.state = 446
                self.match(ADQLParser.COMMA)
                self.state = 447
                self.coord_value()
                pass

            elif la_ == 2:
                self.state = 449
                self.numeric_value_expression(0)
                self.state = 450
                self.match(ADQLParser.COMMA)
                self.state = 451
                self.numeric_value_expression(0)
                self.state = 452
                self.match(ADQLParser.COMMA)
                self.state = 453
                self.numeric_value_expression(0)
                self.state = 454
                self.match(ADQLParser.COMMA)
                self.state = 455
                self.numeric_value_expression(0)
                pass


            self.state = 459
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Exact_numeric_literalContext(ParserRuleContext):

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

        def unsigned_decimal(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Unsigned_decimalContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_exact_numeric_literal

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

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

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




    def exact_numeric_literal(self):

        localctx = ADQLParser.Exact_numeric_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_exact_numeric_literal)
        try:
            self.state = 470
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.INT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 461
                self.unsigned_decimal()
                self.state = 466
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
                if la_ == 1:
                    self.state = 462
                    self.match(ADQLParser.DOT)
                    self.state = 464
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
                    if la_ == 1:
                        self.state = 463
                        self.unsigned_decimal()




                pass
            elif token in [ADQLParser.DOT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 468
                self.match(ADQLParser.DOT)
                self.state = 469
                self.unsigned_decimal()
                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 Exists_predicateContext(ParserRuleContext):

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

        def EXISTS(self):
            return self.getToken(ADQLParser.EXISTS, 0)

        def table_subquery(self):
            return self.getTypedRuleContext(ADQLParser.Table_subqueryContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_exists_predicate

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

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

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




    def exists_predicate(self):

        localctx = ADQLParser.Exists_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_exists_predicate)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 472
            self.match(ADQLParser.EXISTS)
            self.state = 473
            self.table_subquery()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Extract_coordsysContext(ParserRuleContext):

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

        def COORDSYS(self):
            return self.getToken(ADQLParser.COORDSYS, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def geometry_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_extract_coordsys

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

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

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




    def extract_coordsys(self):

        localctx = ADQLParser.Extract_coordsysContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_extract_coordsys)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 475
            self.match(ADQLParser.COORDSYS)
            self.state = 476
            self.match(ADQLParser.LPAREN)
            self.state = 477
            self.geometry_value_expression()
            self.state = 478
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FactorContext(ParserRuleContext):

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

        def numeric_primary(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_primaryContext,0)


        def sign(self):
            return self.getTypedRuleContext(ADQLParser.SignContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_factor

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

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

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




    def factor(self):

        localctx = ADQLParser.FactorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_factor)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 481
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
            if la_ == 1:
                self.state = 480
                self.sign()


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


    class From_clauseContext(ParserRuleContext):

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

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

        def table_reference(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Table_referenceContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Table_referenceContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_from_clause

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

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

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




    def from_clause(self):

        localctx = ADQLParser.From_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_from_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 485
            self.match(ADQLParser.FROM)
            self.state = 486
            self.table_reference(0)
            self.state = 491
            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:
                    self.state = 487
                    self.match(ADQLParser.COMMA)
                    self.state = 488
                    self.table_reference(0) 
                self.state = 493
                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.exitRule()
        return localctx


    class General_literalContext(ParserRuleContext):

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

        def character_string_literal(self):
            return self.getTypedRuleContext(ADQLParser.Character_string_literalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_general_literal

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

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

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




    def general_literal(self):

        localctx = ADQLParser.General_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_general_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 494
            self.character_string_literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class General_set_functionContext(ParserRuleContext):

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

        def set_function_type(self):
            return self.getTypedRuleContext(ADQLParser.Set_function_typeContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def set_quantifier(self):
            return self.getTypedRuleContext(ADQLParser.Set_quantifierContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_general_set_function

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

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

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




    def general_set_function(self):

        localctx = ADQLParser.General_set_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_general_set_function)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 496
            self.set_function_type()
            self.state = 497
            self.match(ADQLParser.LPAREN)
            self.state = 499
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.ALL or _la==ADQLParser.DISTINCT:
                self.state = 498
                self.set_quantifier()


            self.state = 501
            self.value_expression()
            self.state = 502
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Geometry_value_expressionContext(ParserRuleContext):

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

        def box(self):
            return self.getTypedRuleContext(ADQLParser.BoxContext,0)


        def centroid(self):
            return self.getTypedRuleContext(ADQLParser.CentroidContext,0)


        def circle(self):
            return self.getTypedRuleContext(ADQLParser.CircleContext,0)


        def point(self):
            return self.getTypedRuleContext(ADQLParser.PointContext,0)


        def polygon(self):
            return self.getTypedRuleContext(ADQLParser.PolygonContext,0)


        def region(self):
            return self.getTypedRuleContext(ADQLParser.RegionContext,0)


        def user_defined_function(self):
            return self.getTypedRuleContext(ADQLParser.User_defined_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_geometry_value_expression

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

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

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




    def geometry_value_expression(self):

        localctx = ADQLParser.Geometry_value_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_geometry_value_expression)
        try:
            self.state = 511
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.BOX]:
                self.enterOuterAlt(localctx, 1)
                self.state = 504
                self.box()
                pass
            elif token in [ADQLParser.CENTROID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 505
                self.centroid()
                pass
            elif token in [ADQLParser.CIRCLE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 506
                self.circle()
                pass
            elif token in [ADQLParser.POINT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 507
                self.point()
                pass
            elif token in [ADQLParser.POLYGON]:
                self.enterOuterAlt(localctx, 5)
                self.state = 508
                self.polygon()
                pass
            elif token in [ADQLParser.REGION]:
                self.enterOuterAlt(localctx, 6)
                self.state = 509
                self.region()
                pass
            elif token in [ADQLParser.ID]:
                self.enterOuterAlt(localctx, 7)
                self.state = 510
                self.user_defined_function()
                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 Group_by_clauseContext(ParserRuleContext):

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

        def GROUP(self):
            return self.getToken(ADQLParser.GROUP, 0)

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

        def grouping_column_reference_list(self):
            return self.getTypedRuleContext(ADQLParser.Grouping_column_reference_listContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_group_by_clause

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

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

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




    def group_by_clause(self):

        localctx = ADQLParser.Group_by_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_group_by_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 513
            self.match(ADQLParser.GROUP)
            self.state = 514
            self.match(ADQLParser.BY)
            self.state = 515
            self.grouping_column_reference_list()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Grouping_column_referenceContext(ParserRuleContext):

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

        def column_reference(self):
            return self.getTypedRuleContext(ADQLParser.Column_referenceContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_grouping_column_reference

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

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

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




    def grouping_column_reference(self):

        localctx = ADQLParser.Grouping_column_referenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_grouping_column_reference)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 517
            self.column_reference()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Grouping_column_reference_listContext(ParserRuleContext):

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

        def grouping_column_reference(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Grouping_column_referenceContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Grouping_column_referenceContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_grouping_column_reference_list

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

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

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




    def grouping_column_reference_list(self):

        localctx = ADQLParser.Grouping_column_reference_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_grouping_column_reference_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 519
            self.grouping_column_reference()
            self.state = 524
            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:
                    self.state = 520
                    self.match(ADQLParser.COMMA)
                    self.state = 521
                    self.grouping_column_reference() 
                self.state = 526
                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.exitRule()
        return localctx


    class Having_clauseContext(ParserRuleContext):

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

        def HAVING(self):
            return self.getToken(ADQLParser.HAVING, 0)

        def search_condition(self):
            return self.getTypedRuleContext(ADQLParser.Search_conditionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_having_clause

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

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

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




    def having_clause(self):

        localctx = ADQLParser.Having_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_having_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 527
            self.match(ADQLParser.HAVING)
            self.state = 528
            self.search_condition(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierContext(ParserRuleContext):

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

        def regular_identifier(self):
            return self.getTypedRuleContext(ADQLParser.Regular_identifierContext,0)


        def delimited_identifier(self):
            return self.getTypedRuleContext(ADQLParser.Delimited_identifierContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_identifier

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

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

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




    def identifier(self):

        localctx = ADQLParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_identifier)
        try:
            self.state = 532
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ID]:
                self.enterOuterAlt(localctx, 1)
                self.state = 530
                self.regular_identifier()
                pass
            elif token in [ADQLParser.DQ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 531
                self.delimited_identifier()
                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 In_predicateContext(ParserRuleContext):

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

        def value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Value_expressionContext,0)


        def IN(self):
            return self.getToken(ADQLParser.IN, 0)

        def in_predicate_value(self):
            return self.getTypedRuleContext(ADQLParser.In_predicate_valueContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_in_predicate

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

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

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




    def in_predicate(self):

        localctx = ADQLParser.In_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_in_predicate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 534
            self.value_expression()
            self.state = 536
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.NOT:
                self.state = 535
                self.match(ADQLParser.NOT)


            self.state = 538
            self.match(ADQLParser.IN)
            self.state = 539
            self.in_predicate_value()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class In_predicate_valueContext(ParserRuleContext):

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

        def table_subquery(self):
            return self.getTypedRuleContext(ADQLParser.Table_subqueryContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def in_value_list(self):
            return self.getTypedRuleContext(ADQLParser.In_value_listContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_in_predicate_value

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

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

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




    def in_predicate_value(self):

        localctx = ADQLParser.In_predicate_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_in_predicate_value)
        try:
            self.state = 546
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,25,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 541
                self.table_subquery()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 542
                self.match(ADQLParser.LPAREN)
                self.state = 543
                self.in_value_list()
                self.state = 544
                self.match(ADQLParser.RPAREN)
                pass


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


    class In_value_listContext(ParserRuleContext):

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

        def value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Value_expressionContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_in_value_list

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

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

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




    def in_value_list(self):

        localctx = ADQLParser.In_value_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_in_value_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 548
            self.value_expression()
            self.state = 553
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ADQLParser.COMMA:
                self.state = 549
                self.match(ADQLParser.COMMA)
                self.state = 550
                self.value_expression()
                self.state = 555
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class IntersectsContext(ParserRuleContext):

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

        def INTERSECTS(self):
            return self.getToken(ADQLParser.INTERSECTS, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def geometry_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Geometry_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,i)


        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_intersects

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

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

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




    def intersects(self):

        localctx = ADQLParser.IntersectsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_intersects)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 556
            self.match(ADQLParser.INTERSECTS)
            self.state = 557
            self.match(ADQLParser.LPAREN)
            self.state = 558
            self.geometry_value_expression()
            self.state = 559
            self.match(ADQLParser.COMMA)
            self.state = 560
            self.geometry_value_expression()
            self.state = 561
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Join_column_listContext(ParserRuleContext):

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

        def column_name_list(self):
            return self.getTypedRuleContext(ADQLParser.Column_name_listContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_join_column_list

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

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

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




    def join_column_list(self):

        localctx = ADQLParser.Join_column_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_join_column_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 563
            self.column_name_list()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Join_conditionContext(ParserRuleContext):

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

        def ON(self):
            return self.getToken(ADQLParser.ON, 0)

        def search_condition(self):
            return self.getTypedRuleContext(ADQLParser.Search_conditionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_join_condition

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

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

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




    def join_condition(self):

        localctx = ADQLParser.Join_conditionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_join_condition)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 565
            self.match(ADQLParser.ON)
            self.state = 566
            self.search_condition(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Join_specificationContext(ParserRuleContext):

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

        def join_condition(self):
            return self.getTypedRuleContext(ADQLParser.Join_conditionContext,0)


        def named_columns_join(self):
            return self.getTypedRuleContext(ADQLParser.Named_columns_joinContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_join_specification

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

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

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




    def join_specification(self):

        localctx = ADQLParser.Join_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_join_specification)
        try:
            self.state = 570
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ON]:
                self.enterOuterAlt(localctx, 1)
                self.state = 568
                self.join_condition()
                pass
            elif token in [ADQLParser.USING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 569
                self.named_columns_join()
                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 Join_typeContext(ParserRuleContext):

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

        def INNER(self):
            return self.getToken(ADQLParser.INNER, 0)

        def outer_join_type(self):
            return self.getTypedRuleContext(ADQLParser.Outer_join_typeContext,0)


        def OUTER(self):
            return self.getToken(ADQLParser.OUTER, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_join_type

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

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

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




    def join_type(self):

        localctx = ADQLParser.Join_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_join_type)
        self._la = 0 # Token type
        try:
            self.state = 577
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.INNER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 572
                self.match(ADQLParser.INNER)
                pass
            elif token in [ADQLParser.FULL, ADQLParser.LEFT, ADQLParser.RIGHT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 573
                self.outer_join_type()
                self.state = 575
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.OUTER:
                    self.state = 574
                    self.match(ADQLParser.OUTER)


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

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

        def table_reference(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Table_referenceContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Table_referenceContext,i)


        def JOIN(self):
            return self.getToken(ADQLParser.JOIN, 0)

        def NATURAL(self):
            return self.getToken(ADQLParser.NATURAL, 0)

        def join_type(self):
            return self.getTypedRuleContext(ADQLParser.Join_typeContext,0)


        def join_specification(self):
            return self.getTypedRuleContext(ADQLParser.Join_specificationContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def joined_table(self):
            return self.getTypedRuleContext(ADQLParser.Joined_tableContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_joined_table

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

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

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




    def joined_table(self):

        localctx = ADQLParser.Joined_tableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_joined_table)
        self._la = 0 # Token type
        try:
            self.state = 595
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 579
                self.table_reference(0)
                self.state = 581
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.NATURAL:
                    self.state = 580
                    self.match(ADQLParser.NATURAL)


                self.state = 584
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 135)) & ~0x3f) == 0 and ((1 << (_la - 135)) & ((1 << (ADQLParser.FULL - 135)) | (1 << (ADQLParser.INNER - 135)) | (1 << (ADQLParser.LEFT - 135)))) != 0) or _la==ADQLParser.RIGHT:
                    self.state = 583
                    self.join_type()


                self.state = 586
                self.match(ADQLParser.JOIN)
                self.state = 587
                self.table_reference(0)
                self.state = 589
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
                if la_ == 1:
                    self.state = 588
                    self.join_specification()


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 591
                self.match(ADQLParser.LPAREN)
                self.state = 592
                self.joined_table()
                self.state = 593
                self.match(ADQLParser.RPAREN)
                pass


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


    class Like_predicateContext(ParserRuleContext):

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

        def match_value(self):
            return self.getTypedRuleContext(ADQLParser.Match_valueContext,0)


        def LIKE(self):
            return self.getToken(ADQLParser.LIKE, 0)

        def pattern(self):
            return self.getTypedRuleContext(ADQLParser.PatternContext,0)


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

        def ILIKE(self):
            return self.getToken(ADQLParser.ILIKE, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_like_predicate

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

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

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




    def like_predicate(self):

        localctx = ADQLParser.Like_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_like_predicate)
        self._la = 0 # Token type
        try:
            self.state = 611
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,36,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 597
                self.match_value()
                self.state = 599
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.NOT:
                    self.state = 598
                    self.match(ADQLParser.NOT)


                self.state = 601
                self.match(ADQLParser.LIKE)
                self.state = 602
                self.pattern()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 604
                self.match_value()
                self.state = 606
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.NOT:
                    self.state = 605
                    self.match(ADQLParser.NOT)


                self.state = 608
                self.match(ADQLParser.ILIKE)
                self.state = 609
                self.pattern()
                pass


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


    class Match_valueContext(ParserRuleContext):

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

        def character_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Character_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_match_value

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

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

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




    def match_value(self):

        localctx = ADQLParser.Match_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_match_value)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 613
            self.character_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Math_functionContext(ParserRuleContext):

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

        def ABS(self):
            return self.getToken(ADQLParser.ABS, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def numeric_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Numeric_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,i)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def CEILING(self):
            return self.getToken(ADQLParser.CEILING, 0)

        def DEGREES(self):
            return self.getToken(ADQLParser.DEGREES, 0)

        def EXP(self):
            return self.getToken(ADQLParser.EXP, 0)

        def FLOOR(self):
            return self.getToken(ADQLParser.FLOOR, 0)

        def LOG(self):
            return self.getToken(ADQLParser.LOG, 0)

        def LOG10(self):
            return self.getToken(ADQLParser.LOG10, 0)

        def MOD(self):
            return self.getToken(ADQLParser.MOD, 0)

        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def PI(self):
            return self.getToken(ADQLParser.PI, 0)

        def POWER(self):
            return self.getToken(ADQLParser.POWER, 0)

        def RADIANS(self):
            return self.getToken(ADQLParser.RADIANS, 0)

        def RAND(self):
            return self.getToken(ADQLParser.RAND, 0)

        def unsigned_decimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,0)


        def ROUND(self):
            return self.getToken(ADQLParser.ROUND, 0)

        def signed_integer(self):
            return self.getTypedRuleContext(ADQLParser.Signed_integerContext,0)


        def SQRT(self):
            return self.getToken(ADQLParser.SQRT, 0)

        def TRUNCATE(self):
            return self.getToken(ADQLParser.TRUNCATE, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_math_function

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

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

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




    def math_function(self):

        localctx = ADQLParser.Math_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_math_function)
        self._la = 0 # Token type
        try:
            self.state = 701
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ABS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 615
                self.match(ADQLParser.ABS)
                self.state = 616
                self.match(ADQLParser.LPAREN)
                self.state = 617
                self.numeric_value_expression(0)
                self.state = 618
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.CEILING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 620
                self.match(ADQLParser.CEILING)
                self.state = 621
                self.match(ADQLParser.LPAREN)
                self.state = 622
                self.numeric_value_expression(0)
                self.state = 623
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.DEGREES]:
                self.enterOuterAlt(localctx, 3)
                self.state = 625
                self.match(ADQLParser.DEGREES)
                self.state = 626
                self.match(ADQLParser.LPAREN)
                self.state = 627
                self.numeric_value_expression(0)
                self.state = 628
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.EXP]:
                self.enterOuterAlt(localctx, 4)
                self.state = 630
                self.match(ADQLParser.EXP)
                self.state = 631
                self.match(ADQLParser.LPAREN)
                self.state = 632
                self.numeric_value_expression(0)
                self.state = 633
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.FLOOR]:
                self.enterOuterAlt(localctx, 5)
                self.state = 635
                self.match(ADQLParser.FLOOR)
                self.state = 636
                self.match(ADQLParser.LPAREN)
                self.state = 637
                self.numeric_value_expression(0)
                self.state = 638
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.LOG]:
                self.enterOuterAlt(localctx, 6)
                self.state = 640
                self.match(ADQLParser.LOG)
                self.state = 641
                self.match(ADQLParser.LPAREN)
                self.state = 642
                self.numeric_value_expression(0)
                self.state = 643
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.LOG10]:
                self.enterOuterAlt(localctx, 7)
                self.state = 645
                self.match(ADQLParser.LOG10)
                self.state = 646
                self.match(ADQLParser.LPAREN)
                self.state = 647
                self.numeric_value_expression(0)
                self.state = 648
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.MOD]:
                self.enterOuterAlt(localctx, 8)
                self.state = 650
                self.match(ADQLParser.MOD)
                self.state = 651
                self.match(ADQLParser.LPAREN)
                self.state = 652
                self.numeric_value_expression(0)
                self.state = 653
                self.match(ADQLParser.COMMA)
                self.state = 654
                self.numeric_value_expression(0)
                self.state = 655
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.PI]:
                self.enterOuterAlt(localctx, 9)
                self.state = 657
                self.match(ADQLParser.PI)
                self.state = 658
                self.match(ADQLParser.LPAREN)
                self.state = 659
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.POWER]:
                self.enterOuterAlt(localctx, 10)
                self.state = 660
                self.match(ADQLParser.POWER)
                self.state = 661
                self.match(ADQLParser.LPAREN)
                self.state = 662
                self.numeric_value_expression(0)
                self.state = 663
                self.match(ADQLParser.COMMA)
                self.state = 664
                self.numeric_value_expression(0)
                self.state = 665
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.RADIANS]:
                self.enterOuterAlt(localctx, 11)
                self.state = 667
                self.match(ADQLParser.RADIANS)
                self.state = 668
                self.match(ADQLParser.LPAREN)
                self.state = 669
                self.numeric_value_expression(0)
                self.state = 670
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.RAND]:
                self.enterOuterAlt(localctx, 12)
                self.state = 672
                self.match(ADQLParser.RAND)
                self.state = 673
                self.match(ADQLParser.LPAREN)
                self.state = 675
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.INT:
                    self.state = 674
                    self.unsigned_decimal()


                self.state = 677
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.ROUND]:
                self.enterOuterAlt(localctx, 13)
                self.state = 678
                self.match(ADQLParser.ROUND)
                self.state = 679
                self.match(ADQLParser.LPAREN)
                self.state = 680
                self.numeric_value_expression(0)
                self.state = 683
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.COMMA:
                    self.state = 681
                    self.match(ADQLParser.COMMA)
                    self.state = 682
                    self.signed_integer()


                self.state = 685
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.SQRT]:
                self.enterOuterAlt(localctx, 14)
                self.state = 687
                self.match(ADQLParser.SQRT)
                self.state = 688
                self.match(ADQLParser.LPAREN)
                self.state = 689
                self.numeric_value_expression(0)
                self.state = 690
                self.match(ADQLParser.RPAREN)
                pass
            elif token in [ADQLParser.TRUNCATE]:
                self.enterOuterAlt(localctx, 15)
                self.state = 692
                self.match(ADQLParser.TRUNCATE)
                self.state = 693
                self.match(ADQLParser.LPAREN)
                self.state = 694
                self.numeric_value_expression(0)
                self.state = 697
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.COMMA:
                    self.state = 695
                    self.match(ADQLParser.COMMA)
                    self.state = 696
                    self.signed_integer()


                self.state = 699
                self.match(ADQLParser.RPAREN)
                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 Named_columns_joinContext(ParserRuleContext):

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

        def USING(self):
            return self.getToken(ADQLParser.USING, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def join_column_list(self):
            return self.getTypedRuleContext(ADQLParser.Join_column_listContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_named_columns_join

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

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

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




    def named_columns_join(self):

        localctx = ADQLParser.Named_columns_joinContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_named_columns_join)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 703
            self.match(ADQLParser.USING)
            self.state = 704
            self.match(ADQLParser.LPAREN)
            self.state = 705
            self.join_column_list()
            self.state = 706
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Non_join_query_expressionContext(ParserRuleContext):

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

        def non_join_query_term(self):
            return self.getTypedRuleContext(ADQLParser.Non_join_query_termContext,0)


        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def UNION(self):
            return self.getToken(ADQLParser.UNION, 0)

        def query_term(self):
            return self.getTypedRuleContext(ADQLParser.Query_termContext,0)


        def ALL(self):
            return self.getToken(ADQLParser.ALL, 0)

        def EXCEPT(self):
            return self.getToken(ADQLParser.EXCEPT, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_non_join_query_expression

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

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

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




    def non_join_query_expression(self):

        localctx = ADQLParser.Non_join_query_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_non_join_query_expression)
        self._la = 0 # Token type
        try:
            self.state = 723
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 708
                self.non_join_query_term()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 709
                self.query_expression(0)
                self.state = 710
                self.match(ADQLParser.UNION)
                self.state = 712
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.ALL:
                    self.state = 711
                    self.match(ADQLParser.ALL)


                self.state = 714
                self.query_term(0)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 716
                self.query_expression(0)
                self.state = 717
                self.match(ADQLParser.EXCEPT)
                self.state = 719
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.ALL:
                    self.state = 718
                    self.match(ADQLParser.ALL)


                self.state = 721
                self.query_term(0)
                pass


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


    class Non_join_query_primaryContext(ParserRuleContext):

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

        def query_specification(self):
            return self.getTypedRuleContext(ADQLParser.Query_specificationContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def non_join_query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Non_join_query_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_non_join_query_primary

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

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

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




    def non_join_query_primary(self):

        localctx = ADQLParser.Non_join_query_primaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_non_join_query_primary)
        try:
            self.state = 730
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.SELECT, ADQLParser.WITH]:
                self.enterOuterAlt(localctx, 1)
                self.state = 725
                self.query_specification()
                pass
            elif token in [ADQLParser.LPAREN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 726
                self.match(ADQLParser.LPAREN)
                self.state = 727
                self.non_join_query_expression()
                self.state = 728
                self.match(ADQLParser.RPAREN)
                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 Non_join_query_termContext(ParserRuleContext):

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

        def non_join_query_primary(self):
            return self.getTypedRuleContext(ADQLParser.Non_join_query_primaryContext,0)


        def query_term(self):
            return self.getTypedRuleContext(ADQLParser.Query_termContext,0)


        def INTERSECT(self):
            return self.getToken(ADQLParser.INTERSECT, 0)

        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def ALL(self):
            return self.getToken(ADQLParser.ALL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_non_join_query_term

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

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

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




    def non_join_query_term(self):

        localctx = ADQLParser.Non_join_query_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_non_join_query_term)
        self._la = 0 # Token type
        try:
            self.state = 740
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 732
                self.non_join_query_primary()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 733
                self.query_term(0)
                self.state = 734
                self.match(ADQLParser.INTERSECT)
                self.state = 736
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.ALL:
                    self.state = 735
                    self.match(ADQLParser.ALL)


                self.state = 738
                self.query_expression(0)
                pass


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


    class Non_predicate_geometry_functionContext(ParserRuleContext):

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

        def area(self):
            return self.getTypedRuleContext(ADQLParser.AreaContext,0)


        def coord1(self):
            return self.getTypedRuleContext(ADQLParser.Coord1Context,0)


        def coord2(self):
            return self.getTypedRuleContext(ADQLParser.Coord2Context,0)


        def distance(self):
            return self.getTypedRuleContext(ADQLParser.DistanceContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_non_predicate_geometry_function

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

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

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




    def non_predicate_geometry_function(self):

        localctx = ADQLParser.Non_predicate_geometry_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_non_predicate_geometry_function)
        try:
            self.state = 746
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.AREA]:
                self.enterOuterAlt(localctx, 1)
                self.state = 742
                self.area()
                pass
            elif token in [ADQLParser.COORD1]:
                self.enterOuterAlt(localctx, 2)
                self.state = 743
                self.coord1()
                pass
            elif token in [ADQLParser.COORD2]:
                self.enterOuterAlt(localctx, 3)
                self.state = 744
                self.coord2()
                pass
            elif token in [ADQLParser.DISTANCE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 745
                self.distance()
                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 Null_predicateContext(ParserRuleContext):

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

        def column_reference(self):
            return self.getTypedRuleContext(ADQLParser.Column_referenceContext,0)


        def IS(self):
            return self.getToken(ADQLParser.IS, 0)

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

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

        def getRuleIndex(self):
            return ADQLParser.RULE_null_predicate

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

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

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




    def null_predicate(self):

        localctx = ADQLParser.Null_predicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_null_predicate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 748
            self.column_reference()
            self.state = 749
            self.match(ADQLParser.IS)
            self.state = 751
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.NOT:
                self.state = 750
                self.match(ADQLParser.NOT)


            self.state = 753
            self.match(ADQLParser.NULL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Numeric_geometry_functionContext(ParserRuleContext):

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

        def predicate_geometry_function(self):
            return self.getTypedRuleContext(ADQLParser.Predicate_geometry_functionContext,0)


        def non_predicate_geometry_function(self):
            return self.getTypedRuleContext(ADQLParser.Non_predicate_geometry_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_numeric_geometry_function

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

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

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




    def numeric_geometry_function(self):

        localctx = ADQLParser.Numeric_geometry_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_numeric_geometry_function)
        try:
            self.state = 757
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.CONTAINS, ADQLParser.INTERSECTS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 755
                self.predicate_geometry_function()
                pass
            elif token in [ADQLParser.AREA, ADQLParser.COORD1, ADQLParser.COORD2, ADQLParser.DISTANCE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 756
                self.non_predicate_geometry_function()
                pass
            else:
                raise NoViableAltException(self)

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


    class Numeric_primaryContext(ParserRuleContext):

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

        def value_expression_primary(self):
            return self.getTypedRuleContext(ADQLParser.Value_expression_primaryContext,0)


        def sign(self):
            return self.getTypedRuleContext(ADQLParser.SignContext,0)


        def numeric_value_function(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_value_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_numeric_primary

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

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

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




    def numeric_primary(self):

        localctx = ADQLParser.Numeric_primaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_numeric_primary)
        self._la = 0 # Token type
        try:
            self.state = 764
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,51,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 760
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.PLUS or _la==ADQLParser.MINUS:
                    self.state = 759
                    self.sign()


                self.state = 762
                self.value_expression_primary()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 763
                self.numeric_value_function()
                pass


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


    class Numeric_value_expressionContext(ParserRuleContext):

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

        def term(self):
            return self.getTypedRuleContext(ADQLParser.TermContext,0)


        def bitwise_not(self):
            return self.getTypedRuleContext(ADQLParser.Bitwise_notContext,0)


        def numeric_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Numeric_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,i)


        def bitwise_and(self):
            return self.getTypedRuleContext(ADQLParser.Bitwise_andContext,0)


        def bitwise_or(self):
            return self.getTypedRuleContext(ADQLParser.Bitwise_orContext,0)


        def bitwise_xor(self):
            return self.getTypedRuleContext(ADQLParser.Bitwise_xorContext,0)


        def PLUS(self):
            return self.getToken(ADQLParser.PLUS, 0)

        def MINUS(self):
            return self.getToken(ADQLParser.MINUS, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_numeric_value_expression

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

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

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



    def numeric_value_expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Numeric_value_expressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 146
        self.enterRecursionRule(localctx, 146, self.RULE_numeric_value_expression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 771
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ABS, ADQLParser.ACOS, ADQLParser.AREA, ADQLParser.ASIN, ADQLParser.ATAN, ADQLParser.ATAN2, ADQLParser.CEILING, ADQLParser.CONTAINS, ADQLParser.COORD1, ADQLParser.COORD2, ADQLParser.COS, ADQLParser.COT, ADQLParser.DEGREES, ADQLParser.DISTANCE, ADQLParser.EXP, ADQLParser.FLOOR, ADQLParser.INTERSECTS, ADQLParser.LOG, ADQLParser.LOG10, ADQLParser.MOD, ADQLParser.PI, ADQLParser.POWER, ADQLParser.RADIANS, ADQLParser.RAND, ADQLParser.ROUND, ADQLParser.SIN, ADQLParser.SQRT, ADQLParser.TAN, ADQLParser.TRUNCATE, ADQLParser.AVG, ADQLParser.COUNT, ADQLParser.MAX, ADQLParser.MIN, ADQLParser.SUM, ADQLParser.INT, ADQLParser.REAL, ADQLParser.HEX_DIGIT, ADQLParser.CSL, ADQLParser.ID, ADQLParser.LPAREN, ADQLParser.PLUS, ADQLParser.MINUS, ADQLParser.DOT, ADQLParser.DQ]:
                self.state = 767
                self.term(0)
                pass
            elif token in [ADQLParser.TILDE]:
                self.state = 768
                self.bitwise_not()
                self.state = 769
                self.numeric_value_expression(6)
                pass
            else:
                raise NoViableAltException(self)

            self._ctx.stop = self._input.LT(-1)
            self.state = 793
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,54,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 791
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,53,self._ctx)
                    if la_ == 1:
                        localctx = ADQLParser.Numeric_value_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_numeric_value_expression)
                        self.state = 773
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 774
                        self.bitwise_and()
                        self.state = 775
                        self.numeric_value_expression(6)
                        pass

                    elif la_ == 2:
                        localctx = ADQLParser.Numeric_value_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_numeric_value_expression)
                        self.state = 777
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 778
                        self.bitwise_or()
                        self.state = 779
                        self.numeric_value_expression(5)
                        pass

                    elif la_ == 3:
                        localctx = ADQLParser.Numeric_value_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_numeric_value_expression)
                        self.state = 781
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 782
                        self.bitwise_xor()
                        self.state = 783
                        self.numeric_value_expression(4)
                        pass

                    elif la_ == 4:
                        localctx = ADQLParser.Numeric_value_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_numeric_value_expression)
                        self.state = 785
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 786
                        self.match(ADQLParser.PLUS)
                        self.state = 787
                        self.term(0)
                        pass

                    elif la_ == 5:
                        localctx = ADQLParser.Numeric_value_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_numeric_value_expression)
                        self.state = 788
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 789
                        self.match(ADQLParser.MINUS)
                        self.state = 790
                        self.term(0)
                        pass

             
                self.state = 795
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,54,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 Numeric_value_functionContext(ParserRuleContext):

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

        def trig_function(self):
            return self.getTypedRuleContext(ADQLParser.Trig_functionContext,0)


        def math_function(self):
            return self.getTypedRuleContext(ADQLParser.Math_functionContext,0)


        def numeric_geometry_function(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_geometry_functionContext,0)


        def user_defined_function(self):
            return self.getTypedRuleContext(ADQLParser.User_defined_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_numeric_value_function

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

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

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




    def numeric_value_function(self):

        localctx = ADQLParser.Numeric_value_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_numeric_value_function)
        try:
            self.state = 800
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ACOS, ADQLParser.ASIN, ADQLParser.ATAN, ADQLParser.ATAN2, ADQLParser.COS, ADQLParser.COT, ADQLParser.SIN, ADQLParser.TAN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 796
                self.trig_function()
                pass
            elif token in [ADQLParser.ABS, ADQLParser.CEILING, ADQLParser.DEGREES, ADQLParser.EXP, ADQLParser.FLOOR, ADQLParser.LOG, ADQLParser.LOG10, ADQLParser.MOD, ADQLParser.PI, ADQLParser.POWER, ADQLParser.RADIANS, ADQLParser.RAND, ADQLParser.ROUND, ADQLParser.SQRT, ADQLParser.TRUNCATE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 797
                self.math_function()
                pass
            elif token in [ADQLParser.AREA, ADQLParser.CONTAINS, ADQLParser.COORD1, ADQLParser.COORD2, ADQLParser.DISTANCE, ADQLParser.INTERSECTS]:
                self.enterOuterAlt(localctx, 3)
                self.state = 798
                self.numeric_geometry_function()
                pass
            elif token in [ADQLParser.ID]:
                self.enterOuterAlt(localctx, 4)
                self.state = 799
                self.user_defined_function()
                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 Offset_clauseContext(ParserRuleContext):

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

        def OFFSET(self):
            return self.getToken(ADQLParser.OFFSET, 0)

        def unsigned_decimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_offset_clause

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

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

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




    def offset_clause(self):

        localctx = ADQLParser.Offset_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_offset_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 802
            self.match(ADQLParser.OFFSET)
            self.state = 803
            self.unsigned_decimal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Order_by_clauseContext(ParserRuleContext):

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

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

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

        def sort_specification_list(self):
            return self.getTypedRuleContext(ADQLParser.Sort_specification_listContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_order_by_clause

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

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

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




    def order_by_clause(self):

        localctx = ADQLParser.Order_by_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_order_by_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 805
            self.match(ADQLParser.ORDER)
            self.state = 806
            self.match(ADQLParser.BY)
            self.state = 807
            self.sort_specification_list()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Ordering_specificationContext(ParserRuleContext):

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

        def ASC(self):
            return self.getToken(ADQLParser.ASC, 0)

        def DESC(self):
            return self.getToken(ADQLParser.DESC, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_ordering_specification

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

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

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




    def ordering_specification(self):

        localctx = ADQLParser.Ordering_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_ordering_specification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 809
            _la = self._input.LA(1)
            if not(_la==ADQLParser.ASC or _la==ADQLParser.DESC):
                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 Outer_join_typeContext(ParserRuleContext):

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

        def LEFT(self):
            return self.getToken(ADQLParser.LEFT, 0)

        def RIGHT(self):
            return self.getToken(ADQLParser.RIGHT, 0)

        def FULL(self):
            return self.getToken(ADQLParser.FULL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_outer_join_type

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

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

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




    def outer_join_type(self):

        localctx = ADQLParser.Outer_join_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_outer_join_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 811
            _la = self._input.LA(1)
            if not(_la==ADQLParser.FULL or _la==ADQLParser.LEFT or _la==ADQLParser.RIGHT):
                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 PatternContext(ParserRuleContext):

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

        def character_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Character_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_pattern

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

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

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




    def pattern(self):

        localctx = ADQLParser.PatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 813
            self.character_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PointContext(ParserRuleContext):

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

        def POINT(self):
            return self.getToken(ADQLParser.POINT, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_sys(self):
            return self.getTypedRuleContext(ADQLParser.Coord_sysContext,0)


        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def coordinates(self):
            return self.getTypedRuleContext(ADQLParser.CoordinatesContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_point

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

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

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




    def point(self):

        localctx = ADQLParser.PointContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_point)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 815
            self.match(ADQLParser.POINT)
            self.state = 816
            self.match(ADQLParser.LPAREN)
            self.state = 817
            self.coord_sys()
            self.state = 818
            self.match(ADQLParser.COMMA)
            self.state = 819
            self.coordinates()
            self.state = 820
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PolygonContext(ParserRuleContext):

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

        def POLYGON(self):
            return self.getToken(ADQLParser.POLYGON, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def coord_sys(self):
            return self.getTypedRuleContext(ADQLParser.Coord_sysContext,0)


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

        def coordinates(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.CoordinatesContext)
            else:
                return self.getTypedRuleContext(ADQLParser.CoordinatesContext,i)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_polygon

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

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

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




    def polygon(self):

        localctx = ADQLParser.PolygonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_polygon)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 822
            self.match(ADQLParser.POLYGON)
            self.state = 823
            self.match(ADQLParser.LPAREN)
            self.state = 824
            self.coord_sys()
            self.state = 825
            self.match(ADQLParser.COMMA)
            self.state = 826
            self.coordinates()
            self.state = 827
            self.match(ADQLParser.COMMA)
            self.state = 828
            self.coordinates()
            self.state = 831 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 829
                self.match(ADQLParser.COMMA)
                self.state = 830
                self.coordinates()
                self.state = 833 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==ADQLParser.COMMA):
                    break

            self.state = 835
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PredicateContext(ParserRuleContext):

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

        def comparison_predicate(self):
            return self.getTypedRuleContext(ADQLParser.Comparison_predicateContext,0)


        def between_predicate(self):
            return self.getTypedRuleContext(ADQLParser.Between_predicateContext,0)


        def in_predicate(self):
            return self.getTypedRuleContext(ADQLParser.In_predicateContext,0)


        def like_predicate(self):
            return self.getTypedRuleContext(ADQLParser.Like_predicateContext,0)


        def null_predicate(self):
            return self.getTypedRuleContext(ADQLParser.Null_predicateContext,0)


        def exists_predicate(self):
            return self.getTypedRuleContext(ADQLParser.Exists_predicateContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_predicate

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

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

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




    def predicate(self):

        localctx = ADQLParser.PredicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_predicate)
        try:
            self.state = 843
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,57,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 837
                self.comparison_predicate()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 838
                self.between_predicate()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 839
                self.in_predicate()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 840
                self.like_predicate()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 841
                self.null_predicate()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 842
                self.exists_predicate()
                pass


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


    class Predicate_geometry_functionContext(ParserRuleContext):

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

        def contains(self):
            return self.getTypedRuleContext(ADQLParser.ContainsContext,0)


        def intersects(self):
            return self.getTypedRuleContext(ADQLParser.IntersectsContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_predicate_geometry_function

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

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

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




    def predicate_geometry_function(self):

        localctx = ADQLParser.Predicate_geometry_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_predicate_geometry_function)
        try:
            self.state = 847
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.CONTAINS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 845
                self.contains()
                pass
            elif token in [ADQLParser.INTERSECTS]:
                self.enterOuterAlt(localctx, 2)
                self.state = 846
                self.intersects()
                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 QualifierContext(ParserRuleContext):

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

        def column_name(self):
            return self.getTypedRuleContext(ADQLParser.Column_nameContext,0)


        def table_name(self):
            return self.getTypedRuleContext(ADQLParser.Table_nameContext,0)


        def correlation_name(self):
            return self.getTypedRuleContext(ADQLParser.Correlation_nameContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_qualifier

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

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

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




    def qualifier(self):

        localctx = ADQLParser.QualifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_qualifier)
        try:
            self.state = 852
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,59,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 849
                self.column_name()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 850
                self.table_name()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 851
                self.correlation_name()
                pass


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


    class Query_expressionContext(ParserRuleContext):

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

        def non_join_query_term(self):
            return self.getTypedRuleContext(ADQLParser.Non_join_query_termContext,0)


        def joined_table(self):
            return self.getTypedRuleContext(ADQLParser.Joined_tableContext,0)


        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def UNION(self):
            return self.getToken(ADQLParser.UNION, 0)

        def query_term(self):
            return self.getTypedRuleContext(ADQLParser.Query_termContext,0)


        def ALL(self):
            return self.getToken(ADQLParser.ALL, 0)

        def EXCEPT(self):
            return self.getToken(ADQLParser.EXCEPT, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_query_expression

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

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

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



    def query_expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Query_expressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 170
        self.enterRecursionRule(localctx, 170, self.RULE_query_expression, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 857
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,60,self._ctx)
            if la_ == 1:
                self.state = 855
                self.non_join_query_term()
                pass

            elif la_ == 2:
                self.state = 856
                self.joined_table()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 873
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,64,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 871
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,63,self._ctx)
                    if la_ == 1:
                        localctx = ADQLParser.Query_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_query_expression)
                        self.state = 859
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 860
                        self.match(ADQLParser.UNION)
                        self.state = 862
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==ADQLParser.ALL:
                            self.state = 861
                            self.match(ADQLParser.ALL)


                        self.state = 864
                        self.query_term(0)
                        pass

                    elif la_ == 2:
                        localctx = ADQLParser.Query_expressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_query_expression)
                        self.state = 865
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 866
                        self.match(ADQLParser.EXCEPT)
                        self.state = 868
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==ADQLParser.ALL:
                            self.state = 867
                            self.match(ADQLParser.ALL)


                        self.state = 870
                        self.query_term(0)
                        pass

             
                self.state = 875
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,64,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 Query_nameContext(ParserRuleContext):

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_query_name

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

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

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




    def query_name(self):

        localctx = ADQLParser.Query_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_query_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 876
            self.match(ADQLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QueryContext(ParserRuleContext):

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

        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def SEMI(self):
            return self.getToken(ADQLParser.SEMI, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_query

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

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

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




    def query(self):

        localctx = ADQLParser.QueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_query)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 878
            self.query_expression(0)
            self.state = 879
            self.match(ADQLParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Query_specificationContext(ParserRuleContext):

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

        def select_query(self):
            return self.getTypedRuleContext(ADQLParser.Select_queryContext,0)


        def WITH(self):
            return self.getToken(ADQLParser.WITH, 0)

        def with_query(self):
            return self.getTypedRuleContext(ADQLParser.With_queryContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_query_specification

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

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

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




    def query_specification(self):

        localctx = ADQLParser.Query_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_query_specification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 883
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.WITH:
                self.state = 881
                self.match(ADQLParser.WITH)
                self.state = 882
                self.with_query()


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


    class Query_termContext(ParserRuleContext):

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

        def non_join_query_primary(self):
            return self.getTypedRuleContext(ADQLParser.Non_join_query_primaryContext,0)


        def joined_table(self):
            return self.getTypedRuleContext(ADQLParser.Joined_tableContext,0)


        def query_term(self):
            return self.getTypedRuleContext(ADQLParser.Query_termContext,0)


        def INTERSECT(self):
            return self.getToken(ADQLParser.INTERSECT, 0)

        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def ALL(self):
            return self.getToken(ADQLParser.ALL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_query_term

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

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

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



    def query_term(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Query_termContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 178
        self.enterRecursionRule(localctx, 178, self.RULE_query_term, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 890
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,66,self._ctx)
            if la_ == 1:
                self.state = 888
                self.non_join_query_primary()
                pass

            elif la_ == 2:
                self.state = 889
                self.joined_table()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 900
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,68,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 = ADQLParser.Query_termContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_query_term)
                    self.state = 892
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 893
                    self.match(ADQLParser.INTERSECT)
                    self.state = 895
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==ADQLParser.ALL:
                        self.state = 894
                        self.match(ADQLParser.ALL)


                    self.state = 897
                    self.query_expression(0) 
                self.state = 902
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,68,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 RadiusContext(ParserRuleContext):

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

        def numeric_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_radius

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

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

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




    def radius(self):

        localctx = ADQLParser.RadiusContext(self, self._ctx, self.state)
        self.enterRule(localctx, 180, self.RULE_radius)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 903
            self.numeric_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RegionContext(ParserRuleContext):

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

        def REGION(self):
            return self.getToken(ADQLParser.REGION, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def string_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.String_value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_region

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

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

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




    def region(self):

        localctx = ADQLParser.RegionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 182, self.RULE_region)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 905
            self.match(ADQLParser.REGION)
            self.state = 906
            self.match(ADQLParser.LPAREN)
            self.state = 907
            self.string_value_expression()
            self.state = 908
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Regular_identifierContext(ParserRuleContext):

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_regular_identifier

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

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

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




    def regular_identifier(self):

        localctx = ADQLParser.Regular_identifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 184, self.RULE_regular_identifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 910
            self.match(ADQLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Schema_nameContext(ParserRuleContext):

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_schema_name

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

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

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




    def schema_name(self):

        localctx = ADQLParser.Schema_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 186, self.RULE_schema_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 912
            self.match(ADQLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Search_conditionContext(ParserRuleContext):

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

        def boolean_term(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_termContext,0)


        def search_condition(self):
            return self.getTypedRuleContext(ADQLParser.Search_conditionContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_search_condition

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

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

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



    def search_condition(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Search_conditionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 188
        self.enterRecursionRule(localctx, 188, self.RULE_search_condition, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 915
            self.boolean_term(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 922
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,69,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 = ADQLParser.Search_conditionContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_search_condition)
                    self.state = 917
                    if not self.precpred(self._ctx, 1):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                    self.state = 918
                    self.match(ADQLParser.OR)
                    self.state = 919
                    self.boolean_term(0) 
                self.state = 924
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,69,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 Select_listContext(ParserRuleContext):

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

        def select_sublist(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Select_sublistContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Select_sublistContext,i)


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

        def ASTERISK(self):
            return self.getToken(ADQLParser.ASTERISK, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_select_list

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

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

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




    def select_list(self):

        localctx = ADQLParser.Select_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 190, self.RULE_select_list)
        self._la = 0 # Token type
        try:
            self.state = 945
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ABS, ADQLParser.ACOS, ADQLParser.AREA, ADQLParser.ASIN, ADQLParser.ATAN, ADQLParser.ATAN2, ADQLParser.BOX, ADQLParser.CEILING, ADQLParser.CENTROID, ADQLParser.CIRCLE, ADQLParser.CONTAINS, ADQLParser.COORD1, ADQLParser.COORD2, ADQLParser.COORDSYS, ADQLParser.COS, ADQLParser.COT, ADQLParser.DEGREES, ADQLParser.DISTANCE, ADQLParser.EXP, ADQLParser.FLOOR, ADQLParser.INTERSECTS, ADQLParser.LOG, ADQLParser.LOG10, ADQLParser.MOD, ADQLParser.PI, ADQLParser.POINT, ADQLParser.POLYGON, ADQLParser.POWER, ADQLParser.RADIANS, ADQLParser.REGION, ADQLParser.RAND, ADQLParser.ROUND, ADQLParser.SIN, ADQLParser.SQRT, ADQLParser.TAN, ADQLParser.TRUNCATE, ADQLParser.AVG, ADQLParser.COUNT, ADQLParser.FALSE, ADQLParser.LOWER, ADQLParser.MAX, ADQLParser.MIN, ADQLParser.SUM, ADQLParser.TRUE, ADQLParser.INT, ADQLParser.REAL, ADQLParser.HEX_DIGIT, ADQLParser.CSL, ADQLParser.ID, ADQLParser.TILDE, ADQLParser.LPAREN, ADQLParser.PLUS, ADQLParser.MINUS, ADQLParser.DOT, ADQLParser.DQ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 925
                self.select_sublist()
                self.state = 930
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ADQLParser.COMMA:
                    self.state = 926
                    self.match(ADQLParser.COMMA)
                    self.state = 927
                    self.select_sublist()
                    self.state = 932
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [ADQLParser.ASTERISK]:
                self.enterOuterAlt(localctx, 2)
                self.state = 933
                self.match(ADQLParser.ASTERISK)
                self.state = 943
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==ADQLParser.COMMA:
                    self.state = 934
                    self.match(ADQLParser.COMMA)
                    self.state = 935
                    self.select_sublist()
                    self.state = 940
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==ADQLParser.COMMA:
                        self.state = 936
                        self.match(ADQLParser.COMMA)
                        self.state = 937
                        self.select_sublist()
                        self.state = 942
                        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 Select_queryContext(ParserRuleContext):

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

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

        def select_list(self):
            return self.getTypedRuleContext(ADQLParser.Select_listContext,0)


        def table_expression(self):
            return self.getTypedRuleContext(ADQLParser.Table_expressionContext,0)


        def set_quantifier(self):
            return self.getTypedRuleContext(ADQLParser.Set_quantifierContext,0)


        def set_limit(self):
            return self.getTypedRuleContext(ADQLParser.Set_limitContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_select_query

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

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

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




    def select_query(self):

        localctx = ADQLParser.Select_queryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 192, self.RULE_select_query)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 947
            self.match(ADQLParser.SELECT)
            self.state = 949
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.ALL or _la==ADQLParser.DISTINCT:
                self.state = 948
                self.set_quantifier()


            self.state = 952
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.TOP:
                self.state = 951
                self.set_limit()


            self.state = 954
            self.select_list()
            self.state = 955
            self.table_expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Select_sublistContext(ParserRuleContext):

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

        def derived_column(self):
            return self.getTypedRuleContext(ADQLParser.Derived_columnContext,0)


        def qualifier(self):
            return self.getTypedRuleContext(ADQLParser.QualifierContext,0)


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

        def ASTERISK(self):
            return self.getToken(ADQLParser.ASTERISK, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_select_sublist

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

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

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




    def select_sublist(self):

        localctx = ADQLParser.Select_sublistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 194, self.RULE_select_sublist)
        try:
            self.state = 962
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,76,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 957
                self.derived_column()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 958
                self.qualifier()
                self.state = 959
                self.match(ADQLParser.DOT)
                self.state = 960
                self.match(ADQLParser.ASTERISK)
                pass


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


    class Set_function_specificationContext(ParserRuleContext):

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

        def COUNT(self):
            return self.getToken(ADQLParser.COUNT, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def ASTERISK(self):
            return self.getToken(ADQLParser.ASTERISK, 0)

        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def general_set_function(self):
            return self.getTypedRuleContext(ADQLParser.General_set_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_set_function_specification

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

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

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




    def set_function_specification(self):

        localctx = ADQLParser.Set_function_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 196, self.RULE_set_function_specification)
        try:
            self.state = 969
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,77,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 964
                self.match(ADQLParser.COUNT)
                self.state = 965
                self.match(ADQLParser.LPAREN)
                self.state = 966
                self.match(ADQLParser.ASTERISK)
                self.state = 967
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 968
                self.general_set_function()
                pass


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


    class Set_function_typeContext(ParserRuleContext):

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

        def AVG(self):
            return self.getToken(ADQLParser.AVG, 0)

        def MAX(self):
            return self.getToken(ADQLParser.MAX, 0)

        def MIN(self):
            return self.getToken(ADQLParser.MIN, 0)

        def SUM(self):
            return self.getToken(ADQLParser.SUM, 0)

        def COUNT(self):
            return self.getToken(ADQLParser.COUNT, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_set_function_type

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

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

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




    def set_function_type(self):

        localctx = ADQLParser.Set_function_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 198, self.RULE_set_function_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 971
            _la = self._input.LA(1)
            if not(_la==ADQLParser.AVG or _la==ADQLParser.COUNT or ((((_la - 171)) & ~0x3f) == 0 and ((1 << (_la - 171)) & ((1 << (ADQLParser.MAX - 171)) | (1 << (ADQLParser.MIN - 171)) | (1 << (ADQLParser.SUM - 171)))) != 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 Set_limitContext(ParserRuleContext):

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

        def TOP(self):
            return self.getToken(ADQLParser.TOP, 0)

        def unsigned_decimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_set_limit

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

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

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




    def set_limit(self):

        localctx = ADQLParser.Set_limitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 200, self.RULE_set_limit)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 973
            self.match(ADQLParser.TOP)
            self.state = 974
            self.unsigned_decimal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Set_quantifierContext(ParserRuleContext):

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

        def DISTINCT(self):
            return self.getToken(ADQLParser.DISTINCT, 0)

        def ALL(self):
            return self.getToken(ADQLParser.ALL, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_set_quantifier

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

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

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




    def set_quantifier(self):

        localctx = ADQLParser.Set_quantifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 202, self.RULE_set_quantifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 976
            _la = self._input.LA(1)
            if not(_la==ADQLParser.ALL or _la==ADQLParser.DISTINCT):
                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 SignContext(ParserRuleContext):

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

        def PLUS(self):
            return self.getToken(ADQLParser.PLUS, 0)

        def MINUS(self):
            return self.getToken(ADQLParser.MINUS, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_sign

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

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

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




    def sign(self):

        localctx = ADQLParser.SignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 204, self.RULE_sign)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 978
            _la = self._input.LA(1)
            if not(_la==ADQLParser.PLUS or _la==ADQLParser.MINUS):
                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 Signed_integerContext(ParserRuleContext):

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

        def unsigned_decimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,0)


        def sign(self):
            return self.getTypedRuleContext(ADQLParser.SignContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_signed_integer

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

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

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




    def signed_integer(self):

        localctx = ADQLParser.Signed_integerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 206, self.RULE_signed_integer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 981
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.PLUS or _la==ADQLParser.MINUS:
                self.state = 980
                self.sign()


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


    class Sort_keyContext(ParserRuleContext):

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

        def column_name(self):
            return self.getTypedRuleContext(ADQLParser.Column_nameContext,0)


        def unsigned_decimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_decimalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_sort_key

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

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

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




    def sort_key(self):

        localctx = ADQLParser.Sort_keyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 208, self.RULE_sort_key)
        try:
            self.state = 987
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.ID, ADQLParser.DQ]:
                self.enterOuterAlt(localctx, 1)
                self.state = 985
                self.column_name()
                pass
            elif token in [ADQLParser.INT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 986
                self.unsigned_decimal()
                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 Sort_specificationContext(ParserRuleContext):

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

        def sort_key(self):
            return self.getTypedRuleContext(ADQLParser.Sort_keyContext,0)


        def ordering_specification(self):
            return self.getTypedRuleContext(ADQLParser.Ordering_specificationContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_sort_specification

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

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

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




    def sort_specification(self):

        localctx = ADQLParser.Sort_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 210, self.RULE_sort_specification)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 989
            self.sort_key()
            self.state = 991
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,80,self._ctx)
            if la_ == 1:
                self.state = 990
                self.ordering_specification()


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


    class Sort_specification_listContext(ParserRuleContext):

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

        def sort_specification(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Sort_specificationContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Sort_specificationContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_sort_specification_list

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

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

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




    def sort_specification_list(self):

        localctx = ADQLParser.Sort_specification_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 212, self.RULE_sort_specification_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 993
            self.sort_specification()
            self.state = 998
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,81,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 994
                    self.match(ADQLParser.COMMA)
                    self.state = 995
                    self.sort_specification() 
                self.state = 1000
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,81,self._ctx)

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


    class String_geometry_functionContext(ParserRuleContext):

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

        def extract_coordsys(self):
            return self.getTypedRuleContext(ADQLParser.Extract_coordsysContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_string_geometry_function

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

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

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




    def string_geometry_function(self):

        localctx = ADQLParser.String_geometry_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 214, self.RULE_string_geometry_function)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1001
            self.extract_coordsys()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class String_value_expressionContext(ParserRuleContext):

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

        def character_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Character_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_string_value_expression

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

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

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




    def string_value_expression(self):

        localctx = ADQLParser.String_value_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 216, self.RULE_string_value_expression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1003
            self.character_value_expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class String_value_functionContext(ParserRuleContext):

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

        def string_geometry_function(self):
            return self.getTypedRuleContext(ADQLParser.String_geometry_functionContext,0)


        def user_defined_function(self):
            return self.getTypedRuleContext(ADQLParser.User_defined_functionContext,0)


        def char_function(self):
            return self.getTypedRuleContext(ADQLParser.Char_functionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_string_value_function

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

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

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




    def string_value_function(self):

        localctx = ADQLParser.String_value_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 218, self.RULE_string_value_function)
        try:
            self.state = 1008
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.COORDSYS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1005
                self.string_geometry_function()
                pass
            elif token in [ADQLParser.ID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1006
                self.user_defined_function()
                pass
            elif token in [ADQLParser.LOWER]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1007
                self.char_function()
                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 SubqueryContext(ParserRuleContext):

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

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def query_expression(self):
            return self.getTypedRuleContext(ADQLParser.Query_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_subquery

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

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

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




    def subquery(self):

        localctx = ADQLParser.SubqueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 220, self.RULE_subquery)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1010
            self.match(ADQLParser.LPAREN)
            self.state = 1011
            self.query_expression(0)
            self.state = 1012
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Table_expressionContext(ParserRuleContext):

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

        def from_clause(self):
            return self.getTypedRuleContext(ADQLParser.From_clauseContext,0)


        def where_clause(self):
            return self.getTypedRuleContext(ADQLParser.Where_clauseContext,0)


        def group_by_clause(self):
            return self.getTypedRuleContext(ADQLParser.Group_by_clauseContext,0)


        def having_clause(self):
            return self.getTypedRuleContext(ADQLParser.Having_clauseContext,0)


        def order_by_clause(self):
            return self.getTypedRuleContext(ADQLParser.Order_by_clauseContext,0)


        def offset_clause(self):
            return self.getTypedRuleContext(ADQLParser.Offset_clauseContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_table_expression

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

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

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




    def table_expression(self):

        localctx = ADQLParser.Table_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 222, self.RULE_table_expression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1014
            self.from_clause()
            self.state = 1016
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,83,self._ctx)
            if la_ == 1:
                self.state = 1015
                self.where_clause()


            self.state = 1019
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,84,self._ctx)
            if la_ == 1:
                self.state = 1018
                self.group_by_clause()


            self.state = 1022
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,85,self._ctx)
            if la_ == 1:
                self.state = 1021
                self.having_clause()


            self.state = 1025
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,86,self._ctx)
            if la_ == 1:
                self.state = 1024
                self.order_by_clause()


            self.state = 1028
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,87,self._ctx)
            if la_ == 1:
                self.state = 1027
                self.offset_clause()


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


    class Table_nameContext(ParserRuleContext):

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

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


        def schema_name(self):
            return self.getTypedRuleContext(ADQLParser.Schema_nameContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_table_name

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

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

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




    def table_name(self):

        localctx = ADQLParser.Table_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 224, self.RULE_table_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1033
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,88,self._ctx)
            if la_ == 1:
                self.state = 1030
                self.schema_name()
                self.state = 1031
                self.match(ADQLParser.DOT)


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


    class Table_referenceContext(ParserRuleContext):

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

        def table_name(self):
            return self.getTypedRuleContext(ADQLParser.Table_nameContext,0)


        def correlation_specification(self):
            return self.getTypedRuleContext(ADQLParser.Correlation_specificationContext,0)


        def derived_table(self):
            return self.getTypedRuleContext(ADQLParser.Derived_tableContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def joined_table(self):
            return self.getTypedRuleContext(ADQLParser.Joined_tableContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def table_reference(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Table_referenceContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Table_referenceContext,i)


        def JOIN(self):
            return self.getToken(ADQLParser.JOIN, 0)

        def NATURAL(self):
            return self.getToken(ADQLParser.NATURAL, 0)

        def join_type(self):
            return self.getTypedRuleContext(ADQLParser.Join_typeContext,0)


        def join_specification(self):
            return self.getTypedRuleContext(ADQLParser.Join_specificationContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_table_reference

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

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

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



    def table_reference(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.Table_referenceContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 226
        self.enterRecursionRule(localctx, 226, self.RULE_table_reference, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1049
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,90,self._ctx)
            if la_ == 1:
                self.state = 1038
                self.table_name()
                self.state = 1040
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,89,self._ctx)
                if la_ == 1:
                    self.state = 1039
                    self.correlation_specification()


                pass

            elif la_ == 2:
                self.state = 1042
                self.derived_table()
                self.state = 1043
                self.correlation_specification()
                pass

            elif la_ == 3:
                self.state = 1045
                self.match(ADQLParser.LPAREN)
                self.state = 1046
                self.joined_table()
                self.state = 1047
                self.match(ADQLParser.RPAREN)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 1065
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,94,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 = ADQLParser.Table_referenceContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_table_reference)
                    self.state = 1051
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 1053
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==ADQLParser.NATURAL:
                        self.state = 1052
                        self.match(ADQLParser.NATURAL)


                    self.state = 1056
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 135)) & ~0x3f) == 0 and ((1 << (_la - 135)) & ((1 << (ADQLParser.FULL - 135)) | (1 << (ADQLParser.INNER - 135)) | (1 << (ADQLParser.LEFT - 135)))) != 0) or _la==ADQLParser.RIGHT:
                        self.state = 1055
                        self.join_type()


                    self.state = 1058
                    self.match(ADQLParser.JOIN)
                    self.state = 1059
                    self.table_reference(0)
                    self.state = 1061
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,93,self._ctx)
                    if la_ == 1:
                        self.state = 1060
                        self.join_specification()

             
                self.state = 1067
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,94,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 Table_subqueryContext(ParserRuleContext):

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

        def subquery(self):
            return self.getTypedRuleContext(ADQLParser.SubqueryContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_table_subquery

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

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

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




    def table_subquery(self):

        localctx = ADQLParser.Table_subqueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 228, self.RULE_table_subquery)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1068
            self.subquery()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TermContext(ParserRuleContext):

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

        def factor(self):
            return self.getTypedRuleContext(ADQLParser.FactorContext,0)


        def term(self):
            return self.getTypedRuleContext(ADQLParser.TermContext,0)


        def ASTERISK(self):
            return self.getToken(ADQLParser.ASTERISK, 0)

        def SOLIDUS(self):
            return self.getToken(ADQLParser.SOLIDUS, 0)

        def MOD_SYM(self):
            return self.getToken(ADQLParser.MOD_SYM, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_term

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

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

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



    def term(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ADQLParser.TermContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 230
        self.enterRecursionRule(localctx, 230, self.RULE_term, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1071
            self.factor()
            self._ctx.stop = self._input.LT(-1)
            self.state = 1084
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,96,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 1082
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,95,self._ctx)
                    if la_ == 1:
                        localctx = ADQLParser.TermContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_term)
                        self.state = 1073
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 1074
                        self.match(ADQLParser.ASTERISK)
                        self.state = 1075
                        self.factor()
                        pass

                    elif la_ == 2:
                        localctx = ADQLParser.TermContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_term)
                        self.state = 1076
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 1077
                        self.match(ADQLParser.SOLIDUS)
                        self.state = 1078
                        self.factor()
                        pass

                    elif la_ == 3:
                        localctx = ADQLParser.TermContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_term)
                        self.state = 1079
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 1080
                        self.match(ADQLParser.MOD_SYM)
                        self.state = 1081
                        self.factor()
                        pass

             
                self.state = 1086
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,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 Trig_functionContext(ParserRuleContext):

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

        def ACOS(self):
            return self.getToken(ADQLParser.ACOS, 0)

        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def numeric_value_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Numeric_value_expressionContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,i)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def ASIN(self):
            return self.getToken(ADQLParser.ASIN, 0)

        def ATAN(self):
            return self.getToken(ADQLParser.ATAN, 0)

        def ATAN2(self):
            return self.getToken(ADQLParser.ATAN2, 0)

        def COMMA(self):
            return self.getToken(ADQLParser.COMMA, 0)

        def COS(self):
            return self.getToken(ADQLParser.COS, 0)

        def COT(self):
            return self.getToken(ADQLParser.COT, 0)

        def SIN(self):
            return self.getToken(ADQLParser.SIN, 0)

        def TAN(self):
            return self.getToken(ADQLParser.TAN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_trig_function

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

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

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




    def trig_function(self):

        localctx = ADQLParser.Trig_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 232, self.RULE_trig_function)
        try:
            self.state = 1134
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,97,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1087
                self.match(ADQLParser.ACOS)
                self.state = 1088
                self.match(ADQLParser.LPAREN)
                self.state = 1089
                self.numeric_value_expression(0)
                self.state = 1090
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1092
                self.match(ADQLParser.ACOS)
                self.state = 1093
                self.match(ADQLParser.LPAREN)
                self.state = 1094
                self.numeric_value_expression(0)
                self.state = 1095
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1097
                self.match(ADQLParser.ASIN)
                self.state = 1098
                self.match(ADQLParser.LPAREN)
                self.state = 1099
                self.numeric_value_expression(0)
                self.state = 1100
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1102
                self.match(ADQLParser.ATAN)
                self.state = 1103
                self.match(ADQLParser.LPAREN)
                self.state = 1104
                self.numeric_value_expression(0)
                self.state = 1105
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 1107
                self.match(ADQLParser.ATAN2)
                self.state = 1108
                self.match(ADQLParser.LPAREN)
                self.state = 1109
                self.numeric_value_expression(0)
                self.state = 1110
                self.match(ADQLParser.COMMA)
                self.state = 1111
                self.numeric_value_expression(0)
                self.state = 1112
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 1114
                self.match(ADQLParser.COS)
                self.state = 1115
                self.match(ADQLParser.LPAREN)
                self.state = 1116
                self.numeric_value_expression(0)
                self.state = 1117
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 1119
                self.match(ADQLParser.COT)
                self.state = 1120
                self.match(ADQLParser.LPAREN)
                self.state = 1121
                self.numeric_value_expression(0)
                self.state = 1122
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 1124
                self.match(ADQLParser.SIN)
                self.state = 1125
                self.match(ADQLParser.LPAREN)
                self.state = 1126
                self.numeric_value_expression(0)
                self.state = 1127
                self.match(ADQLParser.RPAREN)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 1129
                self.match(ADQLParser.TAN)
                self.state = 1130
                self.match(ADQLParser.LPAREN)
                self.state = 1131
                self.numeric_value_expression(0)
                self.state = 1132
                self.match(ADQLParser.RPAREN)
                pass


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


    class Unqualified_schema_nameContext(ParserRuleContext):

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

        def ID(self):
            return self.getToken(ADQLParser.ID, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_unqualified_schema_name

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

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

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




    def unqualified_schema_name(self):

        localctx = ADQLParser.Unqualified_schema_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 234, self.RULE_unqualified_schema_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1136
            self.match(ADQLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Unsigned_decimalContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ADQLParser.RULE_unsigned_decimal

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

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

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




    def unsigned_decimal(self):

        localctx = ADQLParser.Unsigned_decimalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 236, self.RULE_unsigned_decimal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1138
            self.match(ADQLParser.INT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Unsigned_hexadecimalContext(ParserRuleContext):

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

        def HEX_DIGIT(self):
            return self.getToken(ADQLParser.HEX_DIGIT, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_unsigned_hexadecimal

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

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

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




    def unsigned_hexadecimal(self):

        localctx = ADQLParser.Unsigned_hexadecimalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 238, self.RULE_unsigned_hexadecimal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1140
            self.match(ADQLParser.HEX_DIGIT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Unsigned_literalContext(ParserRuleContext):

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

        def unsigned_numeric_literal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_numeric_literalContext,0)


        def general_literal(self):
            return self.getTypedRuleContext(ADQLParser.General_literalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_unsigned_literal

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

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

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




    def unsigned_literal(self):

        localctx = ADQLParser.Unsigned_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 240, self.RULE_unsigned_literal)
        try:
            self.state = 1144
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.INT, ADQLParser.REAL, ADQLParser.HEX_DIGIT, ADQLParser.DOT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1142
                self.unsigned_numeric_literal()
                pass
            elif token in [ADQLParser.CSL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1143
                self.general_literal()
                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 Unsigned_numeric_literalContext(ParserRuleContext):

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

        def exact_numeric_literal(self):
            return self.getTypedRuleContext(ADQLParser.Exact_numeric_literalContext,0)


        def approximate_numeric_literal(self):
            return self.getTypedRuleContext(ADQLParser.Approximate_numeric_literalContext,0)


        def unsigned_hexadecimal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_hexadecimalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_unsigned_numeric_literal

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

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

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




    def unsigned_numeric_literal(self):

        localctx = ADQLParser.Unsigned_numeric_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 242, self.RULE_unsigned_numeric_literal)
        try:
            self.state = 1149
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.INT, ADQLParser.DOT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1146
                self.exact_numeric_literal()
                pass
            elif token in [ADQLParser.REAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1147
                self.approximate_numeric_literal()
                pass
            elif token in [ADQLParser.HEX_DIGIT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1148
                self.unsigned_hexadecimal()
                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 Unsigned_value_specificationContext(ParserRuleContext):

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

        def unsigned_literal(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_literalContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_unsigned_value_specification

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

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

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




    def unsigned_value_specification(self):

        localctx = ADQLParser.Unsigned_value_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 244, self.RULE_unsigned_value_specification)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1151
            self.unsigned_literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class User_defined_functionContext(ParserRuleContext):

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

        def user_defined_function_name(self):
            return self.getTypedRuleContext(ADQLParser.User_defined_function_nameContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def user_defined_function_param(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.User_defined_function_paramContext)
            else:
                return self.getTypedRuleContext(ADQLParser.User_defined_function_paramContext,i)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_user_defined_function

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

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

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




    def user_defined_function(self):

        localctx = ADQLParser.User_defined_functionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 246, self.RULE_user_defined_function)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1153
            self.user_defined_function_name()
            self.state = 1154
            self.match(ADQLParser.LPAREN)
            self.state = 1163
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ADQLParser.ABS) | (1 << ADQLParser.ACOS) | (1 << ADQLParser.AREA) | (1 << ADQLParser.ASIN) | (1 << ADQLParser.ATAN) | (1 << ADQLParser.ATAN2) | (1 << ADQLParser.BOX) | (1 << ADQLParser.CEILING) | (1 << ADQLParser.CENTROID) | (1 << ADQLParser.CIRCLE) | (1 << ADQLParser.CONTAINS) | (1 << ADQLParser.COORD1) | (1 << ADQLParser.COORD2) | (1 << ADQLParser.COORDSYS) | (1 << ADQLParser.COS) | (1 << ADQLParser.COT) | (1 << ADQLParser.DEGREES) | (1 << ADQLParser.DISTANCE) | (1 << ADQLParser.EXP) | (1 << ADQLParser.FLOOR) | (1 << ADQLParser.INTERSECTS) | (1 << ADQLParser.LOG) | (1 << ADQLParser.LOG10) | (1 << ADQLParser.MOD) | (1 << ADQLParser.PI) | (1 << ADQLParser.POINT) | (1 << ADQLParser.POLYGON) | (1 << ADQLParser.POWER) | (1 << ADQLParser.RADIANS) | (1 << ADQLParser.REGION) | (1 << ADQLParser.RAND) | (1 << ADQLParser.ROUND) | (1 << ADQLParser.SIN) | (1 << ADQLParser.SQRT) | (1 << ADQLParser.TAN) | (1 << ADQLParser.TRUNCATE) | (1 << ADQLParser.AVG))) != 0) or _la==ADQLParser.COUNT or _la==ADQLParser.FALSE or ((((_la - 169)) & ~0x3f) == 0 and ((1 << (_la - 169)) & ((1 << (ADQLParser.LOWER - 169)) | (1 << (ADQLParser.MAX - 169)) | (1 << (ADQLParser.MIN - 169)))) != 0) or ((((_la - 234)) & ~0x3f) == 0 and ((1 << (_la - 234)) & ((1 << (ADQLParser.SUM - 234)) | (1 << (ADQLParser.TRUE - 234)) | (1 << (ADQLParser.INT - 234)) | (1 << (ADQLParser.REAL - 234)) | (1 << (ADQLParser.HEX_DIGIT - 234)) | (1 << (ADQLParser.CSL - 234)) | (1 << (ADQLParser.ID - 234)) | (1 << (ADQLParser.TILDE - 234)) | (1 << (ADQLParser.LPAREN - 234)) | (1 << (ADQLParser.PLUS - 234)) | (1 << (ADQLParser.MINUS - 234)) | (1 << (ADQLParser.DOT - 234)))) != 0) or _la==ADQLParser.DQ:
                self.state = 1155
                self.user_defined_function_param()
                self.state = 1160
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ADQLParser.COMMA:
                    self.state = 1156
                    self.match(ADQLParser.COMMA)
                    self.state = 1157
                    self.user_defined_function_param()
                    self.state = 1162
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 1165
            self.match(ADQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class User_defined_function_nameContext(ParserRuleContext):

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

        def regular_identifier(self):
            return self.getTypedRuleContext(ADQLParser.Regular_identifierContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_user_defined_function_name

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

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

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




    def user_defined_function_name(self):

        localctx = ADQLParser.User_defined_function_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 248, self.RULE_user_defined_function_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1167
            self.regular_identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class User_defined_function_paramContext(ParserRuleContext):

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

        def value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_user_defined_function_param

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

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

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




    def user_defined_function_param(self):

        localctx = ADQLParser.User_defined_function_paramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 250, self.RULE_user_defined_function_param)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1169
            self.value_expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Value_expressionContext(ParserRuleContext):

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

        def numeric_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Numeric_value_expressionContext,0)


        def string_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.String_value_expressionContext,0)


        def boolean_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Boolean_value_expressionContext,0)


        def geometry_value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Geometry_value_expressionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_value_expression

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

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

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




    def value_expression(self):

        localctx = ADQLParser.Value_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 252, self.RULE_value_expression)
        try:
            self.state = 1175
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,102,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1171
                self.numeric_value_expression(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1172
                self.string_value_expression()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1173
                self.boolean_value_expression()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1174
                self.geometry_value_expression()
                pass


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


    class Value_expression_primaryContext(ParserRuleContext):

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

        def unsigned_value_specification(self):
            return self.getTypedRuleContext(ADQLParser.Unsigned_value_specificationContext,0)


        def column_reference(self):
            return self.getTypedRuleContext(ADQLParser.Column_referenceContext,0)


        def set_function_specification(self):
            return self.getTypedRuleContext(ADQLParser.Set_function_specificationContext,0)


        def LPAREN(self):
            return self.getToken(ADQLParser.LPAREN, 0)

        def value_expression(self):
            return self.getTypedRuleContext(ADQLParser.Value_expressionContext,0)


        def RPAREN(self):
            return self.getToken(ADQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return ADQLParser.RULE_value_expression_primary

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

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

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




    def value_expression_primary(self):

        localctx = ADQLParser.Value_expression_primaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 254, self.RULE_value_expression_primary)
        try:
            self.state = 1184
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [ADQLParser.INT, ADQLParser.REAL, ADQLParser.HEX_DIGIT, ADQLParser.CSL, ADQLParser.DOT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1177
                self.unsigned_value_specification()
                pass
            elif token in [ADQLParser.ID, ADQLParser.DQ]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1178
                self.column_reference()
                pass
            elif token in [ADQLParser.AVG, ADQLParser.COUNT, ADQLParser.MAX, ADQLParser.MIN, ADQLParser.SUM]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1179
                self.set_function_specification()
                pass
            elif token in [ADQLParser.LPAREN]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1180
                self.match(ADQLParser.LPAREN)
                self.state = 1181
                self.value_expression()
                self.state = 1182
                self.match(ADQLParser.RPAREN)
                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 Where_clauseContext(ParserRuleContext):

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

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

        def search_condition(self):
            return self.getTypedRuleContext(ADQLParser.Search_conditionContext,0)


        def getRuleIndex(self):
            return ADQLParser.RULE_where_clause

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

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

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




    def where_clause(self):

        localctx = ADQLParser.Where_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 256, self.RULE_where_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1186
            self.match(ADQLParser.WHERE)
            self.state = 1187
            self.search_condition(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class With_queryContext(ParserRuleContext):

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

        def query_name(self):
            return self.getTypedRuleContext(ADQLParser.Query_nameContext,0)


        def AS(self):
            return self.getToken(ADQLParser.AS, 0)

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

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

        def column_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ADQLParser.Column_nameContext)
            else:
                return self.getTypedRuleContext(ADQLParser.Column_nameContext,i)


        def query_specification(self):
            return self.getTypedRuleContext(ADQLParser.Query_specificationContext,0)


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

        def getRuleIndex(self):
            return ADQLParser.RULE_with_query

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

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

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




    def with_query(self):

        localctx = ADQLParser.With_queryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 258, self.RULE_with_query)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1189
            self.query_name()
            self.state = 1201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.LPAREN:
                self.state = 1190
                self.match(ADQLParser.LPAREN)
                self.state = 1191
                self.column_name()
                self.state = 1196
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ADQLParser.COMMA:
                    self.state = 1192
                    self.match(ADQLParser.COMMA)
                    self.state = 1193
                    self.column_name()
                    self.state = 1198
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1199
                self.match(ADQLParser.RPAREN)


            self.state = 1203
            self.match(ADQLParser.AS)
            self.state = 1204
            self.match(ADQLParser.LPAREN)
            self.state = 1206
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==ADQLParser.SELECT or _la==ADQLParser.WITH:
                self.state = 1205
                self.query_specification()


            self.state = 1208
            self.match(ADQLParser.RPAREN)
        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:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[11] = self.boolean_term_sempred
        self._predicates[18] = self.character_value_expression_sempred
        self._predicates[73] = self.numeric_value_expression_sempred
        self._predicates[85] = self.query_expression_sempred
        self._predicates[89] = self.query_term_sempred
        self._predicates[94] = self.search_condition_sempred
        self._predicates[113] = self.table_reference_sempred
        self._predicates[115] = self.term_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 boolean_term_sempred(self, localctx:Boolean_termContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 1)
         

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

    def numeric_value_expression_sempred(self, localctx:Numeric_value_expressionContext, predIndex:int):
            if predIndex == 2:
                return self.precpred(self._ctx, 5)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 2)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 1)
         

    def query_expression_sempred(self, localctx:Query_expressionContext, predIndex:int):
            if predIndex == 7:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 8:
                return self.precpred(self._ctx, 2)
         

    def query_term_sempred(self, localctx:Query_termContext, predIndex:int):
            if predIndex == 9:
                return self.precpred(self._ctx, 2)
         

    def search_condition_sempred(self, localctx:Search_conditionContext, predIndex:int):
            if predIndex == 10:
                return self.precpred(self._ctx, 1)
         

    def table_reference_sempred(self, localctx:Table_referenceContext, predIndex:int):
            if predIndex == 11:
                return self.precpred(self._ctx, 2)
         

    def term_sempred(self, localctx:TermContext, predIndex:int):
            if predIndex == 12:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 13:
                return self.precpred(self._ctx, 2)
         

            if predIndex == 14:
                return self.precpred(self._ctx, 1)
         




