# Generated from ./Sparql.g4 by ANTLR 4.9.3
# 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\u00a4")
        buf.write("\u05f7\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\4\u0084")
        buf.write("\t\u0084\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087")
        buf.write("\3\2\3\2\3\2\3\2\3\2\5\2\u0114\n\2\3\2\3\2\3\2\3\2\3\2")
        buf.write("\3\2\5\2\u011c\n\2\3\3\3\3\7\3\u0120\n\3\f\3\16\3\u0123")
        buf.write("\13\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6\7\6\u012e\n")
        buf.write("\6\f\6\16\6\u0131\13\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7")
        buf.write("\3\b\3\b\5\b\u013d\n\b\3\b\6\b\u0140\n\b\r\b\16\b\u0141")
        buf.write("\3\b\5\b\u0145\n\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n")
        buf.write("\5\n\u0150\n\n\3\13\3\13\3\13\7\13\u0155\n\13\f\13\16")
        buf.write("\13\u0158\13\13\3\13\3\13\3\13\3\13\7\13\u015e\n\13\f")
        buf.write("\13\16\13\u0161\13\13\3\13\3\13\3\13\5\13\u0166\n\13\3")
        buf.write("\13\3\13\5\13\u016a\n\13\3\f\3\f\6\f\u016e\n\f\r\f\16")
        buf.write("\f\u016f\3\f\5\f\u0173\n\f\3\f\7\f\u0176\n\f\f\f\16\f")
        buf.write("\u0179\13\f\3\f\5\f\u017c\n\f\3\f\3\f\3\r\3\r\7\r\u0182")
        buf.write("\n\r\f\r\16\r\u0185\13\r\3\r\3\r\3\r\3\16\3\16\5\16\u018c")
        buf.write("\n\16\3\16\3\16\3\17\5\17\u0191\n\17\3\17\3\17\3\20\5")
        buf.write("\20\u0196\n\20\3\20\5\20\u0199\n\20\3\20\5\20\u019c\n")
        buf.write("\20\3\20\5\20\u019f\n\20\3\21\3\21\3\21\6\21\u01a4\n\21")
        buf.write("\r\21\16\21\u01a5\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u01ae")
        buf.write("\n\22\3\22\3\22\3\22\5\22\u01b3\n\22\3\23\3\23\6\23\u01b7")
        buf.write("\n\23\r\23\16\23\u01b8\3\24\3\24\3\25\3\25\3\25\6\25\u01c0")
        buf.write("\n\25\r\25\16\25\u01c1\3\26\3\26\3\26\3\26\3\26\3\26\3")
        buf.write("\26\5\26\u01cb\n\26\3\27\3\27\5\27\u01cf\n\27\3\27\3\27")
        buf.write("\5\27\u01d3\n\27\5\27\u01d5\n\27\3\30\3\30\3\30\3\31\3")
        buf.write("\31\3\31\3\32\3\32\5\32\u01df\n\32\3\33\3\33\3\33\3\33")
        buf.write("\3\33\3\33\7\33\u01e7\n\33\f\33\16\33\u01ea\13\33\3\33")
        buf.write("\3\33\5\33\u01ee\n\33\5\33\u01f0\n\33\3\34\3\34\3\34\3")
        buf.write("\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\5\34\u01fd\n\34")
        buf.write("\3\35\3\35\5\35\u0201\n\35\3\35\3\35\3\35\5\35\u0206\n")
        buf.write("\35\3\36\3\36\5\36\u020a\n\36\3\36\3\36\3\37\3\37\5\37")
        buf.write("\u0210\n\37\3\37\3\37\3 \3 \5 \u0216\n \3 \3 \3!\3!\5")
        buf.write("!\u021c\n!\3!\3!\3!\3!\3\"\3\"\5\"\u0224\n\"\3\"\3\"\3")
        buf.write("\"\3\"\3#\3#\5#\u022c\n#\3#\3#\3#\3#\3$\3$\3$\3$\3%\3")
        buf.write("%\3%\3%\3&\3&\3&\3&\3\'\3\'\5\'\u0240\n\'\3\'\3\'\5\'")
        buf.write("\u0244\n\'\3\'\5\'\u0247\n\'\3\'\7\'\u024a\n\'\f\'\16")
        buf.write("\'\u024d\13\'\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3*\3*\5*\u025a")
        buf.write("\n*\3*\3*\3+\3+\5+\u0260\n+\3+\5+\u0263\n+\3,\3,\3,\3")
        buf.write("-\3-\3-\3-\5-\u026c\n-\3.\3.\3.\3.\3/\3/\3/\3/\3\60\5")
        buf.write("\60\u0277\n\60\3\60\7\60\u027a\n\60\f\60\16\60\u027d\13")
        buf.write("\60\3\61\3\61\5\61\u0281\n\61\3\61\5\61\u0284\n\61\3\62")
        buf.write("\3\62\3\62\3\62\5\62\u028a\n\62\3\62\3\62\3\63\3\63\3")
        buf.write("\63\5\63\u0291\n\63\7\63\u0293\n\63\f\63\16\63\u0296\13")
        buf.write("\63\3\64\3\64\3\64\5\64\u029b\n\64\3\64\3\64\3\65\5\65")
        buf.write("\u02a0\n\65\3\65\7\65\u02a3\n\65\f\65\16\65\u02a6\13\65")
        buf.write("\3\66\3\66\5\66\u02aa\n\66\3\66\5\66\u02ad\n\66\3\67\3")
        buf.write("\67\3\67\5\67\u02b2\n\67\7\67\u02b4\n\67\f\67\16\67\u02b7")
        buf.write("\13\67\38\38\38\38\38\38\38\38\58\u02c1\n8\39\39\39\3")
        buf.write(":\3:\3:\3:\3;\3;\5;\u02cc\n;\3;\3;\3;\3<\3<\3<\3<\3<\3")
        buf.write("<\3<\3=\3=\3=\3>\3>\5>\u02dd\n>\3?\3?\3?\7?\u02e2\n?\f")
        buf.write("?\16?\u02e5\13?\3?\3?\3@\3@\7@\u02eb\n@\f@\16@\u02ee\13")
        buf.write("@\3@\3@\3@\7@\u02f3\n@\f@\16@\u02f6\13@\3@\3@\3A\3A\7")
        buf.write("A\u02fc\nA\fA\16A\u02ff\13A\3A\3A\3B\3B\3B\3B\3B\5B\u0308")
        buf.write("\nB\3C\3C\3C\3D\3D\3D\7D\u0310\nD\fD\16D\u0313\13D\3E")
        buf.write("\3E\3E\3F\3F\3F\3F\3F\3F\5F\u031e\nF\3G\3G\3G\3H\3H\5")
        buf.write("H\u0325\nH\3H\3H\5H\u0329\nH\3H\3H\3I\3I\3I\7I\u0330\n")
        buf.write("I\fI\16I\u0333\13I\3J\3J\5J\u0337\nJ\3J\3J\3K\3K\3K\5")
        buf.write("K\u033e\nK\7K\u0340\nK\fK\16K\u0343\13K\3L\3L\3L\3L\3")
        buf.write("L\3L\5L\u034b\nL\3M\5M\u034e\nM\3N\3N\3N\3N\3N\3N\5N\u0356")
        buf.write("\nN\7N\u0358\nN\fN\16N\u035b\13N\3O\3O\5O\u035f\nO\3P")
        buf.write("\3P\3P\7P\u0364\nP\fP\16P\u0367\13P\3Q\3Q\3R\3R\3R\3R")
        buf.write("\3R\3R\5R\u0371\nR\3S\5S\u0374\nS\3T\3T\5T\u0378\nT\3")
        buf.write("T\3T\3T\5T\u037d\nT\7T\u037f\nT\fT\16T\u0382\13T\3U\3")
        buf.write("U\5U\u0386\nU\3U\3U\3V\3V\3W\3W\3X\3X\3X\7X\u0391\nX\f")
        buf.write("X\16X\u0394\13X\3Y\3Y\3Z\3Z\3[\3[\3[\7[\u039d\n[\f[\16")
        buf.write("[\u03a0\13[\3\\\3\\\3\\\7\\\u03a5\n\\\f\\\16\\\u03a8\13")
        buf.write("\\\3]\3]\5]\u03ac\n]\3^\5^\u03af\n^\3^\3^\3_\3_\3`\3`")
        buf.write("\3`\3`\3`\3`\3`\3`\5`\u03bd\n`\3a\3a\3a\3a\3a\7a\u03c4")
        buf.write("\na\fa\16a\u03c7\13a\5a\u03c9\na\3a\5a\u03cc\na\3b\5b")
        buf.write("\u03cf\nb\3b\3b\5b\u03d3\nb\3c\3c\3d\3d\5d\u03d9\nd\3")
        buf.write("e\3e\3e\3e\3f\3f\5f\u03e1\nf\3g\3g\3g\3g\3h\3h\6h\u03e9")
        buf.write("\nh\rh\16h\u03ea\3h\3h\3i\3i\6i\u03f1\ni\ri\16i\u03f2")
        buf.write("\3i\3i\3j\3j\5j\u03f9\nj\3k\3k\5k\u03fd\nk\3l\3l\5l\u0401")
        buf.write("\nl\3m\3m\5m\u0405\nm\3n\3n\3o\3o\3o\3o\3o\3o\5o\u040f")
        buf.write("\no\3p\3p\3p\3q\3q\3q\3q\3q\3q\3q\3q\5q\u041c\nq\3q\3")
        buf.write("q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\5q\u042b\nq\3q\3q\3")
        buf.write("q\5q\u0430\nq\3q\3q\3q\3q\3q\3q\3q\7q\u0439\nq\fq\16q")
        buf.write("\u043c\13q\3r\3r\5r\u0440\nr\3r\3r\5r\u0444\nr\3s\5s\u0447")
        buf.write("\ns\3s\3s\3t\3t\3t\3t\3t\3t\3t\3t\3t\3t\5t\u0455\nt\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\5u\u0480\nu\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\5")
        buf.write("u\u049d\nu\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\5u\u0526\nu\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u\3")
        buf.write("u\3u\3u\3u\5u\u0563\nu\3v\3v\3v\3v\3v\3v\3v\5v\u056c\n")
        buf.write("v\3v\3v\3w\3w\3w\3w\3w\3w\3w\5w\u0577\nw\3w\3w\3x\3x\3")
        buf.write("x\3x\3x\3x\3x\3x\3x\5x\u0584\nx\3x\3x\3y\3y\3y\3z\3z\3")
        buf.write("z\3z\3{\3{\3{\5{\u0592\n{\3{\3{\5{\u0596\n{\3{\3{\3{\3")
        buf.write("{\5{\u059c\n{\3{\3{\3{\3{\3{\3{\5{\u05a4\n{\3{\3{\3{\3")
        buf.write("{\3{\3{\5{\u05ac\n{\3{\3{\3{\3{\3{\3{\5{\u05b4\n{\3{\3")
        buf.write("{\3{\3{\3{\3{\5{\u05bc\n{\3{\3{\3{\3{\3{\3{\5{\u05c4\n")
        buf.write("{\3{\3{\3{\3{\3{\5{\u05cb\n{\3{\3{\5{\u05cf\n{\3|\3|\5")
        buf.write("|\u05d3\n|\3}\3}\3}\3}\5}\u05d9\n}\3~\3~\3~\5~\u05de\n")
        buf.write("~\3\177\3\177\3\u0080\3\u0080\3\u0081\3\u0081\3\u0082")
        buf.write("\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084\5\u0084\u05ec")
        buf.write("\n\u0084\3\u0085\3\u0085\3\u0086\3\u0086\5\u0086\u05f2")
        buf.write("\n\u0086\3\u0087\3\u0087\3\u0087\3\u0087\2\3\u00e0\u0088")
        buf.write("\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62")
        buf.write("\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082")
        buf.write("\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094")
        buf.write("\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6")
        buf.write("\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8")
        buf.write("\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca")
        buf.write("\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da\u00dc")
        buf.write("\u00de\u00e0\u00e2\u00e4\u00e6\u00e8\u00ea\u00ec\u00ee")
        buf.write("\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa\u00fc\u00fe\u0100")
        buf.write("\u0102\u0104\u0106\u0108\u010a\u010c\2\20\3\2\7\b\3\2")
        buf.write("\21\22\4\2\u0099\u0099\u009b\u009c\3\2yz\4\2\u009b\u009b")
        buf.write("\u009f\u009f\3\2\u0099\u009a\4\2\u008b\u008d\u00a0\u00a2")
        buf.write("\4\2\u0099\u009a\u009e\u009e\3\2|~\3\2\177\u0081\3\2\u0082")
        buf.write("\u0084\3\2\'(\3\2\u0085\u0088\3\2vw\2\u066c\2\u011b\3")
        buf.write("\2\2\2\4\u0121\3\2\2\2\6\u0124\3\2\2\2\b\u0127\3\2\2\2")
        buf.write("\n\u012b\3\2\2\2\f\u0135\3\2\2\2\16\u013a\3\2\2\2\20\u0146")
        buf.write("\3\2\2\2\22\u014f\3\2\2\2\24\u0151\3\2\2\2\26\u016b\3")
        buf.write("\2\2\2\30\u017f\3\2\2\2\32\u0189\3\2\2\2\34\u0190\3\2")
        buf.write("\2\2\36\u0195\3\2\2\2 \u01a0\3\2\2\2\"\u01b2\3\2\2\2$")
        buf.write("\u01b4\3\2\2\2&\u01ba\3\2\2\2(\u01bc\3\2\2\2*\u01ca\3")
        buf.write("\2\2\2,\u01d4\3\2\2\2.\u01d6\3\2\2\2\60\u01d9\3\2\2\2")
        buf.write("\62\u01de\3\2\2\2\64\u01e0\3\2\2\2\66\u01fc\3\2\2\28\u01fe")
        buf.write("\3\2\2\2:\u0207\3\2\2\2<\u020d\3\2\2\2>\u0213\3\2\2\2")
        buf.write("@\u0219\3\2\2\2B\u0221\3\2\2\2D\u0229\3\2\2\2F\u0231\3")
        buf.write("\2\2\2H\u0235\3\2\2\2J\u0239\3\2\2\2L\u023f\3\2\2\2N\u0251")
        buf.write("\3\2\2\2P\u0254\3\2\2\2R\u0257\3\2\2\2T\u0262\3\2\2\2")
        buf.write("V\u0264\3\2\2\2X\u026b\3\2\2\2Z\u026d\3\2\2\2\\\u0271")
        buf.write("\3\2\2\2^\u0276\3\2\2\2`\u027e\3\2\2\2b\u0285\3\2\2\2")
        buf.write("d\u028d\3\2\2\2f\u0297\3\2\2\2h\u029f\3\2\2\2j\u02a7\3")
        buf.write("\2\2\2l\u02ae\3\2\2\2n\u02c0\3\2\2\2p\u02c2\3\2\2\2r\u02c5")
        buf.write("\3\2\2\2t\u02c9\3\2\2\2v\u02d0\3\2\2\2x\u02d7\3\2\2\2")
        buf.write("z\u02dc\3\2\2\2|\u02de\3\2\2\2~\u02e8\3\2\2\2\u0080\u02f9")
        buf.write("\3\2\2\2\u0082\u0307\3\2\2\2\u0084\u0309\3\2\2\2\u0086")
        buf.write("\u030c\3\2\2\2\u0088\u0314\3\2\2\2\u008a\u031d\3\2\2\2")
        buf.write("\u008c\u031f\3\2\2\2\u008e\u0322\3\2\2\2\u0090\u032c\3")
        buf.write("\2\2\2\u0092\u0334\3\2\2\2\u0094\u033a\3\2\2\2\u0096\u034a")
        buf.write("\3\2\2\2\u0098\u034d\3\2\2\2\u009a\u034f\3\2\2\2\u009c")
        buf.write("\u035e\3\2\2\2\u009e\u0360\3\2\2\2\u00a0\u0368\3\2\2\2")
        buf.write("\u00a2\u0370\3\2\2\2\u00a4\u0373\3\2\2\2\u00a6\u0377\3")
        buf.write("\2\2\2\u00a8\u0385\3\2\2\2\u00aa\u0389\3\2\2\2\u00ac\u038b")
        buf.write("\3\2\2\2\u00ae\u038d\3\2\2\2\u00b0\u0395\3\2\2\2\u00b2")
        buf.write("\u0397\3\2\2\2\u00b4\u0399\3\2\2\2\u00b6\u03a1\3\2\2\2")
        buf.write("\u00b8\u03a9\3\2\2\2\u00ba\u03ae\3\2\2\2\u00bc\u03b2\3")
        buf.write("\2\2\2\u00be\u03bc\3\2\2\2\u00c0\u03cb\3\2\2\2\u00c2\u03ce")
        buf.write("\3\2\2\2\u00c4\u03d4\3\2\2\2\u00c6\u03d8\3\2\2\2\u00c8")
        buf.write("\u03da\3\2\2\2\u00ca\u03e0\3\2\2\2\u00cc\u03e2\3\2\2\2")
        buf.write("\u00ce\u03e6\3\2\2\2\u00d0\u03ee\3\2\2\2\u00d2\u03f8\3")
        buf.write("\2\2\2\u00d4\u03fc\3\2\2\2\u00d6\u0400\3\2\2\2\u00d8\u0404")
        buf.write("\3\2\2\2\u00da\u0406\3\2\2\2\u00dc\u040e\3\2\2\2\u00de")
        buf.write("\u0410\3\2\2\2\u00e0\u041b\3\2\2\2\u00e2\u043f\3\2\2\2")
        buf.write("\u00e4\u0446\3\2\2\2\u00e6\u0454\3\2\2\2\u00e8\u0562\3")
        buf.write("\2\2\2\u00ea\u0564\3\2\2\2\u00ec\u056f\3\2\2\2\u00ee\u057a")
        buf.write("\3\2\2\2\u00f0\u0587\3\2\2\2\u00f2\u058a\3\2\2\2\u00f4")
        buf.write("\u05ce\3\2\2\2\u00f6\u05d0\3\2\2\2\u00f8\u05d4\3\2\2\2")
        buf.write("\u00fa\u05dd\3\2\2\2\u00fc\u05df\3\2\2\2\u00fe\u05e1\3")
        buf.write("\2\2\2\u0100\u05e3\3\2\2\2\u0102\u05e5\3\2\2\2\u0104\u05e7")
        buf.write("\3\2\2\2\u0106\u05eb\3\2\2\2\u0108\u05ed\3\2\2\2\u010a")
        buf.write("\u05f1\3\2\2\2\u010c\u05f3\3\2\2\2\u010e\u0113\5\4\3\2")
        buf.write("\u010f\u0114\5\n\6\2\u0110\u0114\5\24\13\2\u0111\u0114")
        buf.write("\5\26\f\2\u0112\u0114\5\30\r\2\u0113\u010f\3\2\2\2\u0113")
        buf.write("\u0110\3\2\2\2\u0113\u0111\3\2\2\2\u0113\u0112\3\2\2\2")
        buf.write("\u0113\u0114\3\2\2\2\u0114\u0115\3\2\2\2\u0115\u0116\5")
        buf.write("\62\32\2\u0116\u0117\7\2\2\3\u0117\u011c\3\2\2\2\u0118")
        buf.write("\u0119\5\64\33\2\u0119\u011a\7\2\2\3\u011a\u011c\3\2\2")
        buf.write("\2\u011b\u010e\3\2\2\2\u011b\u0118\3\2\2\2\u011c\3\3\2")
        buf.write("\2\2\u011d\u0120\5\6\4\2\u011e\u0120\5\b\5\2\u011f\u011d")
        buf.write("\3\2\2\2\u011f\u011e\3\2\2\2\u0120\u0123\3\2\2\2\u0121")
        buf.write("\u011f\3\2\2\2\u0121\u0122\3\2\2\2\u0122\5\3\2\2\2\u0123")
        buf.write("\u0121\3\2\2\2\u0124\u0125\7\4\2\2\u0125\u0126\7u\2\2")
        buf.write("\u0126\7\3\2\2\2\u0127\u0128\7\5\2\2\u0128\u0129\7v\2")
        buf.write("\2\u0129\u012a\7u\2\2\u012a\t\3\2\2\2\u012b\u012f\5\16")
        buf.write("\b\2\u012c\u012e\5\32\16\2\u012d\u012c\3\2\2\2\u012e\u0131")
        buf.write("\3\2\2\2\u012f\u012d\3\2\2\2\u012f\u0130\3\2\2\2\u0130")
        buf.write("\u0132\3\2\2\2\u0131\u012f\3\2\2\2\u0132\u0133\5\34\17")
        buf.write("\2\u0133\u0134\5\36\20\2\u0134\13\3\2\2\2\u0135\u0136")
        buf.write("\5\16\b\2\u0136\u0137\5\34\17\2\u0137\u0138\5\36\20\2")
        buf.write("\u0138\u0139\5\62\32\2\u0139\r\3\2\2\2\u013a\u013c\7\6")
        buf.write("\2\2\u013b\u013d\5\20\t\2\u013c\u013b\3\2\2\2\u013c\u013d")
        buf.write("\3\2\2\2\u013d\u0144\3\2\2\2\u013e\u0140\5\22\n\2\u013f")
        buf.write("\u013e\3\2\2\2\u0140\u0141\3\2\2\2\u0141\u013f\3\2\2\2")
        buf.write("\u0141\u0142\3\2\2\2\u0142\u0145\3\2\2\2\u0143\u0145\7")
        buf.write("\u009b\2\2\u0144\u013f\3\2\2\2\u0144\u0143\3\2\2\2\u0145")
        buf.write("\17\3\2\2\2\u0146\u0147\t\2\2\2\u0147\21\3\2\2\2\u0148")
        buf.write("\u0150\5\u00dan\2\u0149\u014a\7\u0091\2\2\u014a\u014b")
        buf.write("\5\u00e0q\2\u014b\u014c\7:\2\2\u014c\u014d\5\u00dan\2")
        buf.write("\u014d\u014e\7\u0092\2\2\u014e\u0150\3\2\2\2\u014f\u0148")
        buf.write("\3\2\2\2\u014f\u0149\3\2\2\2\u0150\23\3\2\2\2\u0151\u0169")
        buf.write("\7\t\2\2\u0152\u0156\5\u0092J\2\u0153\u0155\5\32\16\2")
        buf.write("\u0154\u0153\3\2\2\2\u0155\u0158\3\2\2\2\u0156\u0154\3")
        buf.write("\2\2\2\u0156\u0157\3\2\2\2\u0157\u0159\3\2\2\2\u0158\u0156")
        buf.write("\3\2\2\2\u0159\u015a\5\34\17\2\u015a\u015b\5\36\20\2\u015b")
        buf.write("\u016a\3\2\2\2\u015c\u015e\5\32\16\2\u015d\u015c\3\2\2")
        buf.write("\2\u015e\u0161\3\2\2\2\u015f\u015d\3\2\2\2\u015f\u0160")
        buf.write("\3\2\2\2\u0160\u0162\3\2\2\2\u0161\u015f\3\2\2\2\u0162")
        buf.write("\u0163\7\16\2\2\u0163\u0165\7\u0093\2\2\u0164\u0166\5")
        buf.write("d\63\2\u0165\u0164\3\2\2\2\u0165\u0166\3\2\2\2\u0166\u0167")
        buf.write("\3\2\2\2\u0167\u0168\7\u0094\2\2\u0168\u016a\5\36\20\2")
        buf.write("\u0169\u0152\3\2\2\2\u0169\u015f\3\2\2\2\u016a\25\3\2")
        buf.write("\2\2\u016b\u0172\7\n\2\2\u016c\u016e\5\u00d8m\2\u016d")
        buf.write("\u016c\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u016d\3\2\2\2")
        buf.write("\u016f\u0170\3\2\2\2\u0170\u0173\3\2\2\2\u0171\u0173\7")
        buf.write("\u009b\2\2\u0172\u016d\3\2\2\2\u0172\u0171\3\2\2\2\u0173")
        buf.write("\u0177\3\2\2\2\u0174\u0176\5\32\16\2\u0175\u0174\3\2\2")
        buf.write("\2\u0176\u0179\3\2\2\2\u0177\u0175\3\2\2\2\u0177\u0178")
        buf.write("\3\2\2\2\u0178\u017b\3\2\2\2\u0179\u0177\3\2\2\2\u017a")
        buf.write("\u017c\5\34\17\2\u017b\u017a\3\2\2\2\u017b\u017c\3\2\2")
        buf.write("\2\u017c\u017d\3\2\2\2\u017d\u017e\5\36\20\2\u017e\27")
        buf.write("\3\2\2\2\u017f\u0183\7\13\2\2\u0180\u0182\5\32\16\2\u0181")
        buf.write("\u0180\3\2\2\2\u0182\u0185\3\2\2\2\u0183\u0181\3\2\2\2")
        buf.write("\u0183\u0184\3\2\2\2\u0184\u0186\3\2\2\2\u0185\u0183\3")
        buf.write("\2\2\2\u0186\u0187\5\34\17\2\u0187\u0188\5\36\20\2\u0188")
        buf.write("\31\3\2\2\2\u0189\u018b\7\f\2\2\u018a\u018c\7\r\2\2\u018b")
        buf.write("\u018a\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018d\3\2\2\2")
        buf.write("\u018d\u018e\5\u0106\u0084\2\u018e\33\3\2\2\2\u018f\u0191")
        buf.write("\7\16\2\2\u0190\u018f\3\2\2\2\u0190\u0191\3\2\2\2\u0191")
        buf.write("\u0192\3\2\2\2\u0192\u0193\5f\64\2\u0193\35\3\2\2\2\u0194")
        buf.write("\u0196\5 \21\2\u0195\u0194\3\2\2\2\u0195\u0196\3\2\2\2")
        buf.write("\u0196\u0198\3\2\2\2\u0197\u0199\5$\23\2\u0198\u0197\3")
        buf.write("\2\2\2\u0198\u0199\3\2\2\2\u0199\u019b\3\2\2\2\u019a\u019c")
        buf.write("\5(\25\2\u019b\u019a\3\2\2\2\u019b\u019c\3\2\2\2\u019c")
        buf.write("\u019e\3\2\2\2\u019d\u019f\5,\27\2\u019e\u019d\3\2\2\2")
        buf.write("\u019e\u019f\3\2\2\2\u019f\37\3\2\2\2\u01a0\u01a1\7;\2")
        buf.write("\2\u01a1\u01a3\7\20\2\2\u01a2\u01a4\5\"\22\2\u01a3\u01a2")
        buf.write("\3\2\2\2\u01a4\u01a5\3\2\2\2\u01a5\u01a3\3\2\2\2\u01a5")
        buf.write("\u01a6\3\2\2\2\u01a6!\3\2\2\2\u01a7\u01b3\5\u00e8u\2\u01a8")
        buf.write("\u01b3\5\u008cG\2\u01a9\u01aa\7\u0091\2\2\u01aa\u01ad")
        buf.write("\5\u00e0q\2\u01ab\u01ac\7:\2\2\u01ac\u01ae\5\u00dan\2")
        buf.write("\u01ad\u01ab\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae\u01af\3")
        buf.write("\2\2\2\u01af\u01b0\7\u0092\2\2\u01b0\u01b3\3\2\2\2\u01b1")
        buf.write("\u01b3\5\u00dan\2\u01b2\u01a7\3\2\2\2\u01b2\u01a8\3\2")
        buf.write("\2\2\u01b2\u01a9\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3#\3")
        buf.write("\2\2\2\u01b4\u01b6\7<\2\2\u01b5\u01b7\5&\24\2\u01b6\u01b5")
        buf.write("\3\2\2\2\u01b7\u01b8\3\2\2\2\u01b8\u01b6\3\2\2\2\u01b8")
        buf.write("\u01b9\3\2\2\2\u01b9%\3\2\2\2\u01ba\u01bb\5\u008aF\2\u01bb")
        buf.write("\'\3\2\2\2\u01bc\u01bd\7\17\2\2\u01bd\u01bf\7\20\2\2\u01be")
        buf.write("\u01c0\5*\26\2\u01bf\u01be\3\2\2\2\u01c0\u01c1\3\2\2\2")
        buf.write("\u01c1\u01bf\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2)\3\2\2")
        buf.write("\2\u01c3\u01c4\t\3\2\2\u01c4\u01c5\7\u0091\2\2\u01c5\u01c6")
        buf.write("\5\u00e0q\2\u01c6\u01c7\7\u0092\2\2\u01c7\u01cb\3\2\2")
        buf.write("\2\u01c8\u01cb\5\u008aF\2\u01c9\u01cb\5\u00dan\2\u01ca")
        buf.write("\u01c3\3\2\2\2\u01ca\u01c8\3\2\2\2\u01ca\u01c9\3\2\2\2")
        buf.write("\u01cb+\3\2\2\2\u01cc\u01ce\5.\30\2\u01cd\u01cf\5\60\31")
        buf.write("\2\u01ce\u01cd\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf\u01d5")
        buf.write("\3\2\2\2\u01d0\u01d2\5\60\31\2\u01d1\u01d3\5.\30\2\u01d2")
        buf.write("\u01d1\3\2\2\2\u01d2\u01d3\3\2\2\2\u01d3\u01d5\3\2\2\2")
        buf.write("\u01d4\u01cc\3\2\2\2\u01d4\u01d0\3\2\2\2\u01d5-\3\2\2")
        buf.write("\2\u01d6\u01d7\7\23\2\2\u01d7\u01d8\7|\2\2\u01d8/\3\2")
        buf.write("\2\2\u01d9\u01da\7\24\2\2\u01da\u01db\7|\2\2\u01db\61")
        buf.write("\3\2\2\2\u01dc\u01dd\7\25\2\2\u01dd\u01df\5z>\2\u01de")
        buf.write("\u01dc\3\2\2\2\u01de\u01df\3\2\2\2\u01df\63\3\2\2\2\u01e0")
        buf.write("\u01ef\5\4\3\2\u01e1\u01e8\5\66\34\2\u01e2\u01e3\7\u0097")
        buf.write("\2\2\u01e3\u01e4\5\4\3\2\u01e4\u01e5\5\66\34\2\u01e5\u01e7")
        buf.write("\3\2\2\2\u01e6\u01e2\3\2\2\2\u01e7\u01ea\3\2\2\2\u01e8")
        buf.write("\u01e6\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01ed\3\2\2\2")
        buf.write("\u01ea\u01e8\3\2\2\2\u01eb\u01ec\7\u0097\2\2\u01ec\u01ee")
        buf.write("\5\4\3\2\u01ed\u01eb\3\2\2\2\u01ed\u01ee\3\2\2\2\u01ee")
        buf.write("\u01f0\3\2\2\2\u01ef\u01e1\3\2\2\2\u01ef\u01f0\3\2\2\2")
        buf.write("\u01f0\65\3\2\2\2\u01f1\u01fd\58\35\2\u01f2\u01fd\5:\36")
        buf.write("\2\u01f3\u01fd\5<\37\2\u01f4\u01fd\5@!\2\u01f5\u01fd\5")
        buf.write("B\"\2\u01f6\u01fd\5D#\2\u01f7\u01fd\5> \2\u01f8\u01fd")
        buf.write("\5F$\2\u01f9\u01fd\5H%\2\u01fa\u01fd\5J&\2\u01fb\u01fd")
        buf.write("\5L\'\2\u01fc\u01f1\3\2\2\2\u01fc\u01f2\3\2\2\2\u01fc")
        buf.write("\u01f3\3\2\2\2\u01fc\u01f4\3\2\2\2\u01fc\u01f5\3\2\2\2")
        buf.write("\u01fc\u01f6\3\2\2\2\u01fc\u01f7\3\2\2\2\u01fc\u01f8\3")
        buf.write("\2\2\2\u01fc\u01f9\3\2\2\2\u01fc\u01fa\3\2\2\2\u01fc\u01fb")
        buf.write("\3\2\2\2\u01fd\67\3\2\2\2\u01fe\u0200\7)\2\2\u01ff\u0201")
        buf.write("\7\63\2\2\u0200\u01ff\3\2\2\2\u0200\u0201\3\2\2\2\u0201")
        buf.write("\u0202\3\2\2\2\u0202\u0205\5\u0106\u0084\2\u0203\u0204")
        buf.write("\78\2\2\u0204\u0206\5V,\2\u0205\u0203\3\2\2\2\u0205\u0206")
        buf.write("\3\2\2\2\u02069\3\2\2\2\u0207\u0209\7*\2\2\u0208\u020a")
        buf.write("\7\63\2\2\u0209\u0208\3\2\2\2\u0209\u020a\3\2\2\2\u020a")
        buf.write("\u020b\3\2\2\2\u020b\u020c\5X-\2\u020c;\3\2\2\2\u020d")
        buf.write("\u020f\7+\2\2\u020e\u0210\7\63\2\2\u020f\u020e\3\2\2\2")
        buf.write("\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\5")
        buf.write("X-\2\u0212=\3\2\2\2\u0213\u0215\7/\2\2\u0214\u0216\7\63")
        buf.write("\2\2\u0215\u0214\3\2\2\2\u0215\u0216\3\2\2\2\u0216\u0217")
        buf.write("\3\2\2\2\u0217\u0218\5V,\2\u0218?\3\2\2\2\u0219\u021b")
        buf.write("\7,\2\2\u021a\u021c\7\63\2\2\u021b\u021a\3\2\2\2\u021b")
        buf.write("\u021c\3\2\2\2\u021c\u021d\3\2\2\2\u021d\u021e\5T+\2\u021e")
        buf.write("\u021f\79\2\2\u021f\u0220\5T+\2\u0220A\3\2\2\2\u0221\u0223")
        buf.write("\7-\2\2\u0222\u0224\7\63\2\2\u0223\u0222\3\2\2\2\u0223")
        buf.write("\u0224\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0226\5T+\2\u0226")
        buf.write("\u0227\79\2\2\u0227\u0228\5T+\2\u0228C\3\2\2\2\u0229\u022b")
        buf.write("\7.\2\2\u022a\u022c\7\63\2\2\u022b\u022a\3\2\2\2\u022b")
        buf.write("\u022c\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u022e\5T+\2\u022e")
        buf.write("\u022f\79\2\2\u022f\u0230\5T+\2\u0230E\3\2\2\2\u0231\u0232")
        buf.write("\7\61\2\2\u0232\u0233\7\66\2\2\u0233\u0234\5\\/\2\u0234")
        buf.write("G\3\2\2\2\u0235\u0236\7\60\2\2\u0236\u0237\7\66\2\2\u0237")
        buf.write("\u0238\5\\/\2\u0238I\3\2\2\2\u0239\u023a\7\60\2\2\u023a")
        buf.write("\u023b\7\16\2\2\u023b\u023c\5Z.\2\u023cK\3\2\2\2\u023d")
        buf.write("\u023e\7\67\2\2\u023e\u0240\5\u0106\u0084\2\u023f\u023d")
        buf.write("\3\2\2\2\u023f\u0240\3\2\2\2\u0240\u0246\3\2\2\2\u0241")
        buf.write("\u0243\5N(\2\u0242\u0244\5P)\2\u0243\u0242\3\2\2\2\u0243")
        buf.write("\u0244\3\2\2\2\u0244\u0247\3\2\2\2\u0245\u0247\5P)\2\u0246")
        buf.write("\u0241\3\2\2\2\u0246\u0245\3\2\2\2\u0247\u024b\3\2\2\2")
        buf.write("\u0248\u024a\5R*\2\u0249\u0248\3\2\2\2\u024a\u024d\3\2")
        buf.write("\2\2\u024b\u0249\3\2\2\2\u024b\u024c\3\2\2\2\u024c\u024e")
        buf.write("\3\2\2\2\u024d\u024b\3\2\2\2\u024e\u024f\7\16\2\2\u024f")
        buf.write("\u0250\5f\64\2\u0250M\3\2\2\2\u0251\u0252\7\60\2\2\u0252")
        buf.write("\u0253\5Z.\2\u0253O\3\2\2\2\u0254\u0255\7\61\2\2\u0255")
        buf.write("\u0256\5Z.\2\u0256Q\3\2\2\2\u0257\u0259\7\62\2\2\u0258")
        buf.write("\u025a\7\r\2\2\u0259\u0258\3\2\2\2\u0259\u025a\3\2\2\2")
        buf.write("\u025a\u025b\3\2\2\2\u025b\u025c\5\u0106\u0084\2\u025c")
        buf.write("S\3\2\2\2\u025d\u0263\7\64\2\2\u025e\u0260\7\27\2\2\u025f")
        buf.write("\u025e\3\2\2\2\u025f\u0260\3\2\2\2\u0260\u0261\3\2\2\2")
        buf.write("\u0261\u0263\5\u0106\u0084\2\u0262\u025d\3\2\2\2\u0262")
        buf.write("\u025f\3\2\2\2\u0263U\3\2\2\2\u0264\u0265\7\27\2\2\u0265")
        buf.write("\u0266\5\u0106\u0084\2\u0266W\3\2\2\2\u0267\u026c\5V,")
        buf.write("\2\u0268\u026c\7\64\2\2\u0269\u026c\7\r\2\2\u026a\u026c")
        buf.write("\7\65\2\2\u026b\u0267\3\2\2\2\u026b\u0268\3\2\2\2\u026b")
        buf.write("\u0269\3\2\2\2\u026b\u026a\3\2\2\2\u026cY\3\2\2\2\u026d")
        buf.write("\u026e\7\u0093\2\2\u026e\u026f\5^\60\2\u026f\u0270\7\u0094")
        buf.write("\2\2\u0270[\3\2\2\2\u0271\u0272\7\u0093\2\2\u0272\u0273")
        buf.write("\5^\60\2\u0273\u0274\7\u0094\2\2\u0274]\3\2\2\2\u0275")
        buf.write("\u0277\5d\63\2\u0276\u0275\3\2\2\2\u0276\u0277\3\2\2\2")
        buf.write("\u0277\u027b\3\2\2\2\u0278\u027a\5`\61\2\u0279\u0278\3")
        buf.write("\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c")
        buf.write("\3\2\2\2\u027c_\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280")
        buf.write("\5b\62\2\u027f\u0281\7\u0098\2\2\u0280\u027f\3\2\2\2\u0280")
        buf.write("\u0281\3\2\2\2\u0281\u0283\3\2\2\2\u0282\u0284\5d\63\2")
        buf.write("\u0283\u0282\3\2\2\2\u0283\u0284\3\2\2\2\u0284a\3\2\2")
        buf.write("\2\u0285\u0286\7\27\2\2\u0286\u0287\5\u00d8m\2\u0287\u0289")
        buf.write("\7\u0093\2\2\u0288\u028a\5d\63\2\u0289\u0288\3\2\2\2\u0289")
        buf.write("\u028a\3\2\2\2\u028a\u028b\3\2\2\2\u028b\u028c\7\u0094")
        buf.write("\2\2\u028cc\3\2\2\2\u028d\u0294\5\u0096L\2\u028e\u0290")
        buf.write("\7\u0098\2\2\u028f\u0291\5\u0096L\2\u0290\u028f\3\2\2")
        buf.write("\2\u0290\u0291\3\2\2\2\u0291\u0293\3\2\2\2\u0292\u028e")
        buf.write("\3\2\2\2\u0293\u0296\3\2\2\2\u0294\u0292\3\2\2\2\u0294")
        buf.write("\u0295\3\2\2\2\u0295e\3\2\2\2\u0296\u0294\3\2\2\2\u0297")
        buf.write("\u029a\7\u0093\2\2\u0298\u029b\5\f\7\2\u0299\u029b\5h")
        buf.write("\65\2\u029a\u0298\3\2\2\2\u029a\u0299\3\2\2\2\u029b\u029c")
        buf.write("\3\2\2\2\u029c\u029d\7\u0094\2\2\u029dg\3\2\2\2\u029e")
        buf.write("\u02a0\5l\67\2\u029f\u029e\3\2\2\2\u029f\u02a0\3\2\2\2")
        buf.write("\u02a0\u02a4\3\2\2\2\u02a1\u02a3\5j\66\2\u02a2\u02a1\3")
        buf.write("\2\2\2\u02a3\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5")
        buf.write("\3\2\2\2\u02a5i\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9")
        buf.write("\5n8\2\u02a8\u02aa\7\u0098\2\2\u02a9\u02a8\3\2\2\2\u02a9")
        buf.write("\u02aa\3\2\2\2\u02aa\u02ac\3\2\2\2\u02ab\u02ad\5l\67\2")
        buf.write("\u02ac\u02ab\3\2\2\2\u02ac\u02ad\3\2\2\2\u02adk\3\2\2")
        buf.write("\2\u02ae\u02b5\5\u00a2R\2\u02af\u02b1\7\u0098\2\2\u02b0")
        buf.write("\u02b2\5\u00a2R\2\u02b1\u02b0\3\2\2\2\u02b1\u02b2\3\2")
        buf.write("\2\2\u02b2\u02b4\3\2\2\2\u02b3\u02af\3\2\2\2\u02b4\u02b7")
        buf.write("\3\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6")
        buf.write("m\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b8\u02c1\5\u0086D\2\u02b9")
        buf.write("\u02c1\5p9\2\u02ba\u02c1\5\u0084C\2\u02bb\u02c1\5r:\2")
        buf.write("\u02bc\u02c1\5t;\2\u02bd\u02c1\5\u0088E\2\u02be\u02c1")
        buf.write("\5v<\2\u02bf\u02c1\5x=\2\u02c0\u02b8\3\2\2\2\u02c0\u02b9")
        buf.write("\3\2\2\2\u02c0\u02ba\3\2\2\2\u02c0\u02bb\3\2\2\2\u02c0")
        buf.write("\u02bc\3\2\2\2\u02c0\u02bd\3\2\2\2\u02c0\u02be\3\2\2\2")
        buf.write("\u02c0\u02bf\3\2\2\2\u02c1o\3\2\2\2\u02c2\u02c3\7\26\2")
        buf.write("\2\u02c3\u02c4\5f\64\2\u02c4q\3\2\2\2\u02c5\u02c6\7\27")
        buf.write("\2\2\u02c6\u02c7\5\u00d8m\2\u02c7\u02c8\5f\64\2\u02c8")
        buf.write("s\3\2\2\2\u02c9\u02cb\7?\2\2\u02ca\u02cc\7\63\2\2\u02cb")
        buf.write("\u02ca\3\2\2\2\u02cb\u02cc\3\2\2\2\u02cc\u02cd\3\2\2\2")
        buf.write("\u02cd\u02ce\5\u00d8m\2\u02ce\u02cf\5f\64\2\u02cfu\3\2")
        buf.write("\2\2\u02d0\u02d1\7@\2\2\u02d1\u02d2\7\u0091\2\2\u02d2")
        buf.write("\u02d3\5\u00e0q\2\u02d3\u02d4\7:\2\2\u02d4\u02d5\5\u00da")
        buf.write("n\2\u02d5\u02d6\7\u0092\2\2\u02d6w\3\2\2\2\u02d7\u02d8")
        buf.write("\7\25\2\2\u02d8\u02d9\5z>\2\u02d9y\3\2\2\2\u02da\u02dd")
        buf.write("\5|?\2\u02db\u02dd\5~@\2\u02dc\u02da\3\2\2\2\u02dc\u02db")
        buf.write("\3\2\2\2\u02dd{\3\2\2\2\u02de\u02df\5\u00dan\2\u02df\u02e3")
        buf.write("\7\u0093\2\2\u02e0\u02e2\5\u0082B\2\u02e1\u02e0\3\2\2")
        buf.write("\2\u02e2\u02e5\3\2\2\2\u02e3\u02e1\3\2\2\2\u02e3\u02e4")
        buf.write("\3\2\2\2\u02e4\u02e6\3\2\2\2\u02e5\u02e3\3\2\2\2\u02e6")
        buf.write("\u02e7\7\u0094\2\2\u02e7}\3\2\2\2\u02e8\u02ec\7\u0091")
        buf.write("\2\2\u02e9\u02eb\5\u00dan\2\u02ea\u02e9\3\2\2\2\u02eb")
        buf.write("\u02ee\3\2\2\2\u02ec\u02ea\3\2\2\2\u02ec\u02ed\3\2\2\2")
        buf.write("\u02ed\u02ef\3\2\2\2\u02ee\u02ec\3\2\2\2\u02ef\u02f0\7")
        buf.write("\u0092\2\2\u02f0\u02f4\7\u0093\2\2\u02f1\u02f3\5\u0080")
        buf.write("A\2\u02f2\u02f1\3\2\2\2\u02f3\u02f6\3\2\2\2\u02f4\u02f2")
        buf.write("\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5\u02f7\3\2\2\2\u02f6")
        buf.write("\u02f4\3\2\2\2\u02f7\u02f8\7\u0094\2\2\u02f8\177\3\2\2")
        buf.write("\2\u02f9\u02fd\7\u0091\2\2\u02fa\u02fc\5\u0082B\2\u02fb")
        buf.write("\u02fa\3\2\2\2\u02fc\u02ff\3\2\2\2\u02fd\u02fb\3\2\2\2")
        buf.write("\u02fd\u02fe\3\2\2\2\u02fe\u0300\3\2\2\2\u02ff\u02fd\3")
        buf.write("\2\2\2\u0300\u0301\7\u0092\2\2\u0301\u0081\3\2\2\2\u0302")
        buf.write("\u0308\5\u0106\u0084\2\u0303\u0308\5\u00f8}\2\u0304\u0308")
        buf.write("\5\u00fa~\2\u0305\u0308\5\u0102\u0082\2\u0306\u0308\7")
        buf.write("=\2\2\u0307\u0302\3\2\2\2\u0307\u0303\3\2\2\2\u0307\u0304")
        buf.write("\3\2\2\2\u0307\u0305\3\2\2\2\u0307\u0306\3\2\2\2\u0308")
        buf.write("\u0083\3\2\2\2\u0309\u030a\7A\2\2\u030a\u030b\5f\64\2")
        buf.write("\u030b\u0085\3\2\2\2\u030c\u0311\5f\64\2\u030d\u030e\7")
        buf.write("\30\2\2\u030e\u0310\5f\64\2\u030f\u030d\3\2\2\2\u0310")
        buf.write("\u0313\3\2\2\2\u0311\u030f\3\2\2\2\u0311\u0312\3\2\2\2")
        buf.write("\u0312\u0087\3\2\2\2\u0313\u0311\3\2\2\2\u0314\u0315\7")
        buf.write("\31\2\2\u0315\u0316\5\u008aF\2\u0316\u0089\3\2\2\2\u0317")
        buf.write("\u0318\7\u0091\2\2\u0318\u0319\5\u00e0q\2\u0319\u031a")
        buf.write("\7\u0092\2\2\u031a\u031e\3\2\2\2\u031b\u031e\5\u00e8u")
        buf.write("\2\u031c\u031e\5\u008cG\2\u031d\u0317\3\2\2\2\u031d\u031b")
        buf.write("\3\2\2\2\u031d\u031c\3\2\2\2\u031e\u008b\3\2\2\2\u031f")
        buf.write("\u0320\5\u0106\u0084\2\u0320\u0321\5\u008eH\2\u0321\u008d")
        buf.write("\3\2\2\2\u0322\u0328\7\u0091\2\2\u0323\u0325\7\7\2\2\u0324")
        buf.write("\u0323\3\2\2\2\u0324\u0325\3\2\2\2\u0325\u0326\3\2\2\2")
        buf.write("\u0326\u0329\5\u0090I\2\u0327\u0329\3\2\2\2\u0328\u0324")
        buf.write("\3\2\2\2\u0328\u0327\3\2\2\2\u0329\u032a\3\2\2\2\u032a")
        buf.write("\u032b\7\u0092\2\2\u032b\u008f\3\2\2\2\u032c\u0331\5\u00e0")
        buf.write("q\2\u032d\u032e\7\u009d\2\2\u032e\u0330\5\u00e0q\2\u032f")
        buf.write("\u032d\3\2\2\2\u0330\u0333\3\2\2\2\u0331\u032f\3\2\2\2")
        buf.write("\u0331\u0332\3\2\2\2\u0332\u0091\3\2\2\2\u0333\u0331\3")
        buf.write("\2\2\2\u0334\u0336\7\u0093\2\2\u0335\u0337\5\u0094K\2")
        buf.write("\u0336\u0335\3\2\2\2\u0336\u0337\3\2\2\2\u0337\u0338\3")
        buf.write("\2\2\2\u0338\u0339\7\u0094\2\2\u0339\u0093\3\2\2\2\u033a")
        buf.write("\u0341\5\u0096L\2\u033b\u033d\7\u0098\2\2\u033c\u033e")
        buf.write("\5\u0094K\2\u033d\u033c\3\2\2\2\u033d\u033e\3\2\2\2\u033e")
        buf.write("\u0340\3\2\2\2\u033f\u033b\3\2\2\2\u0340\u0343\3\2\2\2")
        buf.write("\u0341\u033f\3\2\2\2\u0341\u0342\3\2\2\2\u0342\u0095\3")
        buf.write("\2\2\2\u0343\u0341\3\2\2\2\u0344\u0345\5\u00d6l\2\u0345")
        buf.write("\u0346\5\u009aN\2\u0346\u034b\3\2\2\2\u0347\u0348\5\u00c6")
        buf.write("d\2\u0348\u0349\5\u0098M\2\u0349\u034b\3\2\2\2\u034a\u0344")
        buf.write("\3\2\2\2\u034a\u0347\3\2\2\2\u034b\u0097\3\2\2\2\u034c")
        buf.write("\u034e\5\u009aN\2\u034d\u034c\3\2\2\2\u034d\u034e\3\2")
        buf.write("\2\2\u034e\u0099\3\2\2\2\u034f\u0350\5\u009cO\2\u0350")
        buf.write("\u0359\5\u009eP\2\u0351\u0355\7\u0097\2\2\u0352\u0353")
        buf.write("\5\u009cO\2\u0353\u0354\5\u009eP\2\u0354\u0356\3\2\2\2")
        buf.write("\u0355\u0352\3\2\2\2\u0355\u0356\3\2\2\2\u0356\u0358\3")
        buf.write("\2\2\2\u0357\u0351\3\2\2\2\u0358\u035b\3\2\2\2\u0359\u0357")
        buf.write("\3\2\2\2\u0359\u035a\3\2\2\2\u035a\u009b\3\2\2\2\u035b")
        buf.write("\u0359\3\2\2\2\u035c\u035f\5\u00d8m\2\u035d\u035f\7\32")
        buf.write("\2\2\u035e\u035c\3\2\2\2\u035e\u035d\3\2\2\2\u035f\u009d")
        buf.write("\3\2\2\2\u0360\u0365\5\u00a0Q\2\u0361\u0362\7\u009d\2")
        buf.write("\2\u0362\u0364\5\u00a0Q\2\u0363\u0361\3\2\2\2\u0364\u0367")
        buf.write("\3\2\2\2\u0365\u0363\3\2\2\2\u0365\u0366\3\2\2\2\u0366")
        buf.write("\u009f\3\2\2\2\u0367\u0365\3\2\2\2\u0368\u0369\5\u00d2")
        buf.write("j\2\u0369\u00a1\3\2\2\2\u036a\u036b\5\u00d6l\2\u036b\u036c")
        buf.write("\5\u00a6T\2\u036c\u0371\3\2\2\2\u036d\u036e\5\u00caf\2")
        buf.write("\u036e\u036f\5\u00a4S\2\u036f\u0371\3\2\2\2\u0370\u036a")
        buf.write("\3\2\2\2\u0370\u036d\3\2\2\2\u0371\u00a3\3\2\2\2\u0372")
        buf.write("\u0374\5\u00a6T\2\u0373\u0372\3\2\2\2\u0373\u0374\3\2")
        buf.write("\2\2\u0374\u00a5\3\2\2\2\u0375\u0378\5\u00aaV\2\u0376")
        buf.write("\u0378\5\u00acW\2\u0377\u0375\3\2\2\2\u0377\u0376\3\2")
        buf.write("\2\2\u0378\u0379\3\2\2\2\u0379\u0380\5\u00aeX\2\u037a")
        buf.write("\u037c\7\u0097\2\2\u037b\u037d\5\u00a8U\2\u037c\u037b")
        buf.write("\3\2\2\2\u037c\u037d\3\2\2\2\u037d\u037f\3\2\2\2\u037e")
        buf.write("\u037a\3\2\2\2\u037f\u0382\3\2\2\2\u0380\u037e\3\2\2\2")
        buf.write("\u0380\u0381\3\2\2\2\u0381\u00a7\3\2\2\2\u0382\u0380\3")
        buf.write("\2\2\2\u0383\u0386\5\u00aaV\2\u0384\u0386\5\u00acW\2\u0385")
        buf.write("\u0383\3\2\2\2\u0385\u0384\3\2\2\2\u0386\u0387\3\2\2\2")
        buf.write("\u0387\u0388\5\u009eP\2\u0388\u00a9\3\2\2\2\u0389\u038a")
        buf.write("\5\u00b2Z\2\u038a\u00ab\3\2\2\2\u038b\u038c\5\u00dan\2")
        buf.write("\u038c\u00ad\3\2\2\2\u038d\u0392\5\u00b0Y\2\u038e\u038f")
        buf.write("\7\u009d\2\2\u038f\u0391\5\u00b0Y\2\u0390\u038e\3\2\2")
        buf.write("\2\u0391\u0394\3\2\2\2\u0392\u0390\3\2\2\2\u0392\u0393")
        buf.write("\3\2\2\2\u0393\u00af\3\2\2\2\u0394\u0392\3\2\2\2\u0395")
        buf.write("\u0396\5\u00d4k\2\u0396\u00b1\3\2\2\2\u0397\u0398\5\u00b4")
        buf.write("[\2\u0398\u00b3\3\2\2\2\u0399\u039e\5\u00b6\\\2\u039a")
        buf.write("\u039b\7\u00a3\2\2\u039b\u039d\5\u00b6\\\2\u039c\u039a")
        buf.write("\3\2\2\2\u039d\u03a0\3\2\2\2\u039e\u039c\3\2\2\2\u039e")
        buf.write("\u039f\3\2\2\2\u039f\u00b5\3\2\2\2\u03a0\u039e\3\2\2\2")
        buf.write("\u03a1\u03a6\5\u00ba^\2\u03a2\u03a3\7\u009f\2\2\u03a3")
        buf.write("\u03a5\5\u00ba^\2\u03a4\u03a2\3\2\2\2\u03a5\u03a8\3\2")
        buf.write("\2\2\u03a6\u03a4\3\2\2\2\u03a6\u03a7\3\2\2\2\u03a7\u00b7")
        buf.write("\3\2\2\2\u03a8\u03a6\3\2\2\2\u03a9\u03ab\5\u00be`\2\u03aa")
        buf.write("\u03ac\5\u00bc_\2\u03ab\u03aa\3\2\2\2\u03ab\u03ac\3\2")
        buf.write("\2\2\u03ac\u00b9\3\2\2\2\u03ad\u03af\7\u0090\2\2\u03ae")
        buf.write("\u03ad\3\2\2\2\u03ae\u03af\3\2\2\2\u03af\u03b0\3\2\2\2")
        buf.write("\u03b0\u03b1\5\u00b8]\2\u03b1\u00bb\3\2\2\2\u03b2\u03b3")
        buf.write("\t\4\2\2\u03b3\u00bd\3\2\2\2\u03b4\u03bd\5\u0106\u0084")
        buf.write("\2\u03b5\u03bd\7\32\2\2\u03b6\u03b7\7\u009e\2\2\u03b7")
        buf.write("\u03bd\5\u00c0a\2\u03b8\u03b9\7\u0091\2\2\u03b9\u03ba")
        buf.write("\5\u00b2Z\2\u03ba\u03bb\7\u0092\2\2\u03bb\u03bd\3\2\2")
        buf.write("\2\u03bc\u03b4\3\2\2\2\u03bc\u03b5\3\2\2\2\u03bc\u03b6")
        buf.write("\3\2\2\2\u03bc\u03b8\3\2\2\2\u03bd\u00bf\3\2\2\2\u03be")
        buf.write("\u03cc\5\u00c2b\2\u03bf\u03c8\7\u0091\2\2\u03c0\u03c5")
        buf.write("\5\u00c2b\2\u03c1\u03c2\7\u00a3\2\2\u03c2\u03c4\5\u00c2")
        buf.write("b\2\u03c3\u03c1\3\2\2\2\u03c4\u03c7\3\2\2\2\u03c5\u03c3")
        buf.write("\3\2\2\2\u03c5\u03c6\3\2\2\2\u03c6\u03c9\3\2\2\2\u03c7")
        buf.write("\u03c5\3\2\2\2\u03c8\u03c0\3\2\2\2\u03c8\u03c9\3\2\2\2")
        buf.write("\u03c9\u03ca\3\2\2\2\u03ca\u03cc\7\u0092\2\2\u03cb\u03be")
        buf.write("\3\2\2\2\u03cb\u03bf\3\2\2\2\u03cc\u00c1\3\2\2\2\u03cd")
        buf.write("\u03cf\7\u0090\2\2\u03ce\u03cd\3\2\2\2\u03ce\u03cf\3\2")
        buf.write("\2\2\u03cf\u03d2\3\2\2\2\u03d0\u03d3\5\u0106\u0084\2\u03d1")
        buf.write("\u03d3\7\32\2\2\u03d2\u03d0\3\2\2\2\u03d2\u03d1\3\2\2")
        buf.write("\2\u03d3\u00c3\3\2\2\2\u03d4\u03d5\7|\2\2\u03d5\u00c5")
        buf.write("\3\2\2\2\u03d6\u03d9\5\u00ceh\2\u03d7\u03d9\5\u00c8e\2")
        buf.write("\u03d8\u03d6\3\2\2\2\u03d8\u03d7\3\2\2\2\u03d9\u00c7\3")
        buf.write("\2\2\2\u03da\u03db\7\u0095\2\2\u03db\u03dc\5\u009aN\2")
        buf.write("\u03dc\u03dd\7\u0096\2\2\u03dd\u00c9\3\2\2\2\u03de\u03e1")
        buf.write("\5\u00d0i\2\u03df\u03e1\5\u00ccg\2\u03e0\u03de\3\2\2\2")
        buf.write("\u03e0\u03df\3\2\2\2\u03e1\u00cb\3\2\2\2\u03e2\u03e3\7")
        buf.write("\u0095\2\2\u03e3\u03e4\5\u00a6T\2\u03e4\u03e5\7\u0096")
        buf.write("\2\2\u03e5\u00cd\3\2\2\2\u03e6\u03e8\7\u0091\2\2\u03e7")
        buf.write("\u03e9\5\u00d2j\2\u03e8\u03e7\3\2\2\2\u03e9\u03ea\3\2")
        buf.write("\2\2\u03ea\u03e8\3\2\2\2\u03ea\u03eb\3\2\2\2\u03eb\u03ec")
        buf.write("\3\2\2\2\u03ec\u03ed\7\u0092\2\2\u03ed\u00cf\3\2\2\2\u03ee")
        buf.write("\u03f0\7\u0091\2\2\u03ef\u03f1\5\u00d4k\2\u03f0\u03ef")
        buf.write("\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f0\3\2\2\2\u03f2")
        buf.write("\u03f3\3\2\2\2\u03f3\u03f4\3\2\2\2\u03f4\u03f5\7\u0092")
        buf.write("\2\2\u03f5\u00d1\3\2\2\2\u03f6\u03f9\5\u00d6l\2\u03f7")
        buf.write("\u03f9\5\u00c6d\2\u03f8\u03f6\3\2\2\2\u03f8\u03f7\3\2")
        buf.write("\2\2\u03f9\u00d3\3\2\2\2\u03fa\u03fd\5\u00d6l\2\u03fb")
        buf.write("\u03fd\5\u00caf\2\u03fc\u03fa\3\2\2\2\u03fc\u03fb\3\2")
        buf.write("\2\2\u03fd\u00d5\3\2\2\2\u03fe\u0401\5\u00dan\2\u03ff")
        buf.write("\u0401\5\u00dco\2\u0400\u03fe\3\2\2\2\u0400\u03ff\3\2")
        buf.write("\2\2\u0401\u00d7\3\2\2\2\u0402\u0405\5\u00dan\2\u0403")
        buf.write("\u0405\5\u0106\u0084\2\u0404\u0402\3\2\2\2\u0404\u0403")
        buf.write("\3\2\2\2\u0405\u00d9\3\2\2\2\u0406\u0407\t\5\2\2\u0407")
        buf.write("\u00db\3\2\2\2\u0408\u040f\5\u0106\u0084\2\u0409\u040f")
        buf.write("\5\u00f8}\2\u040a\u040f\5\u00fa~\2\u040b\u040f\5\u0102")
        buf.write("\u0082\2\u040c\u040f\5\u010a\u0086\2\u040d\u040f\5\u00de")
        buf.write("p\2\u040e\u0408\3\2\2\2\u040e\u0409\3\2\2\2\u040e\u040a")
        buf.write("\3\2\2\2\u040e\u040b\3\2\2\2\u040e\u040c\3\2\2\2\u040e")
        buf.write("\u040d\3\2\2\2\u040f\u00dd\3\2\2\2\u0410\u0411\7\u0091")
        buf.write("\2\2\u0411\u0412\7\u0092\2\2\u0412\u00df\3\2\2\2\u0413")
        buf.write("\u0414\bq\1\2\u0414\u041c\5\u00e6t\2\u0415\u0416\t\6\2")
        buf.write("\2\u0416\u041c\5\u00e0q\f\u0417\u0418\t\7\2\2\u0418\u041c")
        buf.write("\5\u00e0q\13\u0419\u041a\7\u009e\2\2\u041a\u041c\5\u00e0")
        buf.write("q\n\u041b\u0413\3\2\2\2\u041b\u0415\3\2\2\2\u041b\u0417")
        buf.write("\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u043a\3\2\2\2\u041d")
        buf.write("\u041e\f\t\2\2\u041e\u041f\t\6\2\2\u041f\u0439\5\u00e0")
        buf.write("q\n\u0420\u0421\f\b\2\2\u0421\u0422\t\7\2\2\u0422\u0439")
        buf.write("\5\u00e0q\t\u0423\u0424\f\5\2\2\u0424\u0425\t\b\2\2\u0425")
        buf.write("\u0439\5\u00e0q\6\u0426\u0427\f\7\2\2\u0427\u0439\5\u00e2")
        buf.write("r\2\u0428\u042a\f\6\2\2\u0429\u042b\7q\2\2\u042a\u0429")
        buf.write("\3\2\2\2\u042a\u042b\3\2\2\2\u042b\u042c\3\2\2\2\u042c")
        buf.write("\u042d\7r\2\2\u042d\u042f\7\u0091\2\2\u042e\u0430\5\u0090")
        buf.write("I\2\u042f\u042e\3\2\2\2\u042f\u0430\3\2\2\2\u0430\u0431")
        buf.write("\3\2\2\2\u0431\u0439\7\u0092\2\2\u0432\u0433\f\4\2\2\u0433")
        buf.write("\u0434\7\u008e\2\2\u0434\u0439\5\u00e0q\2\u0435\u0436")
        buf.write("\f\3\2\2\u0436\u0437\7\u008f\2\2\u0437\u0439\5\u00e0q")
        buf.write("\2\u0438\u041d\3\2\2\2\u0438\u0420\3\2\2\2\u0438\u0423")
        buf.write("\3\2\2\2\u0438\u0426\3\2\2\2\u0438\u0428\3\2\2\2\u0438")
        buf.write("\u0432\3\2\2\2\u0438\u0435\3\2\2\2\u0439\u043c\3\2\2\2")
        buf.write("\u043a\u0438\3\2\2\2\u043a\u043b\3\2\2\2\u043b\u00e1\3")
        buf.write("\2\2\2\u043c\u043a\3\2\2\2\u043d\u0440\5\u00fe\u0080\2")
        buf.write("\u043e\u0440\5\u0100\u0081\2\u043f\u043d\3\2\2\2\u043f")
        buf.write("\u043e\3\2\2\2\u0440\u0443\3\2\2\2\u0441\u0442\t\6\2\2")
        buf.write("\u0442\u0444\5\u00e4s\2\u0443\u0441\3\2\2\2\u0443\u0444")
        buf.write("\3\2\2\2\u0444\u00e3\3\2\2\2\u0445\u0447\t\t\2\2\u0446")
        buf.write("\u0445\3\2\2\2\u0446\u0447\3\2\2\2\u0447\u0448\3\2\2\2")
        buf.write("\u0448\u0449\5\u00e6t\2\u0449\u00e5\3\2\2\2\u044a\u044b")
        buf.write("\7\u0091\2\2\u044b\u044c\5\u00e0q\2\u044c\u044d\7\u0092")
        buf.write("\2\2\u044d\u0455\3\2\2\2\u044e\u0455\5\u00e8u\2\u044f")
        buf.write("\u0455\5\u00f6|\2\u0450\u0455\5\u00f8}\2\u0451\u0455\5")
        buf.write("\u00fa~\2\u0452\u0455\5\u0102\u0082\2\u0453\u0455\5\u00da")
        buf.write("n\2\u0454\u044a\3\2\2\2\u0454\u044e\3\2\2\2\u0454\u044f")
        buf.write("\3\2\2\2\u0454\u0450\3\2\2\2\u0454\u0451\3\2\2\2\u0454")
        buf.write("\u0452\3\2\2\2\u0454\u0453\3\2\2\2\u0455\u00e7\3\2\2\2")
        buf.write("\u0456\u0563\5\u00f4{\2\u0457\u0458\7\33\2\2\u0458\u0459")
        buf.write("\7\u0091\2\2\u0459\u045a\5\u00e0q\2\u045a\u045b\7\u0092")
        buf.write("\2\2\u045b\u0563\3\2\2\2\u045c\u045d\7\34\2\2\u045d\u045e")
        buf.write("\7\u0091\2\2\u045e\u045f\5\u00e0q\2\u045f\u0460\7\u0092")
        buf.write("\2\2\u0460\u0563\3\2\2\2\u0461\u0462\7\35\2\2\u0462\u0463")
        buf.write("\7\u0091\2\2\u0463\u0464\5\u00e0q\2\u0464\u0465\7\u009d")
        buf.write("\2\2\u0465\u0466\5\u00e0q\2\u0466\u0467\7\u0092\2\2\u0467")
        buf.write("\u0563\3\2\2\2\u0468\u0469\7\36\2\2\u0469\u046a\7\u0091")
        buf.write("\2\2\u046a\u046b\5\u00e0q\2\u046b\u046c\7\u0092\2\2\u046c")
        buf.write("\u0563\3\2\2\2\u046d\u046e\7\37\2\2\u046e\u046f\7\u0091")
        buf.write("\2\2\u046f\u0470\5\u00dan\2\u0470\u0471\7\u0092\2\2\u0471")
        buf.write("\u0563\3\2\2\2\u0472\u0473\7B\2\2\u0473\u0474\7\u0091")
        buf.write("\2\2\u0474\u0475\5\u00e0q\2\u0475\u0476\7\u0092\2\2\u0476")
        buf.write("\u0563\3\2\2\2\u0477\u0478\7C\2\2\u0478\u0479\7\u0091")
        buf.write("\2\2\u0479\u047a\5\u00e0q\2\u047a\u047b\7\u0092\2\2\u047b")
        buf.write("\u0563\3\2\2\2\u047c\u047d\7D\2\2\u047d\u047f\7\u0091")
        buf.write("\2\2\u047e\u0480\5\u00e0q\2\u047f\u047e\3\2\2\2\u047f")
        buf.write("\u0480\3\2\2\2\u0480\u0481\3\2\2\2\u0481\u0563\7\u0092")
        buf.write("\2\2\u0482\u0483\7E\2\2\u0483\u0484\7\u0091\2\2\u0484")
        buf.write("\u0563\7\u0092\2\2\u0485\u0486\7F\2\2\u0486\u0487\7\u0091")
        buf.write("\2\2\u0487\u0488\5\u00e0q\2\u0488\u0489\7\u0092\2\2\u0489")
        buf.write("\u0563\3\2\2\2\u048a\u048b\7G\2\2\u048b\u048c\7\u0091")
        buf.write("\2\2\u048c\u048d\5\u00e0q\2\u048d\u048e\7\u0092\2\2\u048e")
        buf.write("\u0563\3\2\2\2\u048f\u0490\7H\2\2\u0490\u0491\7\u0091")
        buf.write("\2\2\u0491\u0492\5\u00e0q\2\u0492\u0493\7\u0092\2\2\u0493")
        buf.write("\u0563\3\2\2\2\u0494\u0495\7I\2\2\u0495\u0496\7\u0091")
        buf.write("\2\2\u0496\u0497\5\u00e0q\2\u0497\u0498\7\u0092\2\2\u0498")
        buf.write("\u0563\3\2\2\2\u0499\u049a\7J\2\2\u049a\u049c\7\u0091")
        buf.write("\2\2\u049b\u049d\5\u0090I\2\u049c\u049b\3\2\2\2\u049c")
        buf.write("\u049d\3\2\2\2\u049d\u049e\3\2\2\2\u049e\u0563\7\u0092")
        buf.write("\2\2\u049f\u0563\5\u00ecw\2\u04a0\u04a1\7K\2\2\u04a1\u04a2")
        buf.write("\7\u0091\2\2\u04a2\u04a3\5\u00e0q\2\u04a3\u04a4\7\u0092")
        buf.write("\2\2\u04a4\u0563\3\2\2\2\u04a5\u0563\5\u00eex\2\u04a6")
        buf.write("\u04a7\7L\2\2\u04a7\u04a8\7\u0091\2\2\u04a8\u04a9\5\u00e0")
        buf.write("q\2\u04a9\u04aa\7\u0092\2\2\u04aa\u0563\3\2\2\2\u04ab")
        buf.write("\u04ac\7M\2\2\u04ac\u04ad\7\u0091\2\2\u04ad\u04ae\5\u00e0")
        buf.write("q\2\u04ae\u04af\7\u0092\2\2\u04af\u0563\3\2\2\2\u04b0")
        buf.write("\u04b1\7N\2\2\u04b1\u04b2\7\u0091\2\2\u04b2\u04b3\5\u00e0")
        buf.write("q\2\u04b3\u04b4\7\u0092\2\2\u04b4\u0563\3\2\2\2\u04b5")
        buf.write("\u04b6\7O\2\2\u04b6\u04b7\7\u0091\2\2\u04b7\u04b8\5\u00e0")
        buf.write("q\2\u04b8\u04b9\7\u009d\2\2\u04b9\u04ba\5\u00e0q\2\u04ba")
        buf.write("\u04bb\7\u0092\2\2\u04bb\u0563\3\2\2\2\u04bc\u04bd\7P")
        buf.write("\2\2\u04bd\u04be\7\u0091\2\2\u04be\u04bf\5\u00e0q\2\u04bf")
        buf.write("\u04c0\7\u009d\2\2\u04c0\u04c1\5\u00e0q\2\u04c1\u04c2")
        buf.write("\7\u0092\2\2\u04c2\u0563\3\2\2\2\u04c3\u04c4\7Q\2\2\u04c4")
        buf.write("\u04c5\7\u0091\2\2\u04c5\u04c6\5\u00e0q\2\u04c6\u04c7")
        buf.write("\7\u009d\2\2\u04c7\u04c8\5\u00e0q\2\u04c8\u04c9\7\u0092")
        buf.write("\2\2\u04c9\u0563\3\2\2\2\u04ca\u04cb\7R\2\2\u04cb\u04cc")
        buf.write("\7\u0091\2\2\u04cc\u04cd\5\u00e0q\2\u04cd\u04ce\7\u009d")
        buf.write("\2\2\u04ce\u04cf\5\u00e0q\2\u04cf\u04d0\7\u0092\2\2\u04d0")
        buf.write("\u0563\3\2\2\2\u04d1\u04d2\7S\2\2\u04d2\u04d3\7\u0091")
        buf.write("\2\2\u04d3\u04d4\5\u00e0q\2\u04d4\u04d5\7\u009d\2\2\u04d5")
        buf.write("\u04d6\5\u00e0q\2\u04d6\u04d7\7\u0092\2\2\u04d7\u0563")
        buf.write("\3\2\2\2\u04d8\u04d9\7U\2\2\u04d9\u04da\7\u0091\2\2\u04da")
        buf.write("\u04db\5\u00e0q\2\u04db\u04dc\7\u0092\2\2\u04dc\u0563")
        buf.write("\3\2\2\2\u04dd\u04de\7V\2\2\u04de\u04df\7\u0091\2\2\u04df")
        buf.write("\u04e0\5\u00e0q\2\u04e0\u04e1\7\u0092\2\2\u04e1\u0563")
        buf.write("\3\2\2\2\u04e2\u04e3\7W\2\2\u04e3\u04e4\7\u0091\2\2\u04e4")
        buf.write("\u04e5\5\u00e0q\2\u04e5\u04e6\7\u0092\2\2\u04e6\u0563")
        buf.write("\3\2\2\2\u04e7\u04e8\7X\2\2\u04e8\u04e9\7\u0091\2\2\u04e9")
        buf.write("\u04ea\5\u00e0q\2\u04ea\u04eb\7\u0092\2\2\u04eb\u0563")
        buf.write("\3\2\2\2\u04ec\u04ed\7Y\2\2\u04ed\u04ee\7\u0091\2\2\u04ee")
        buf.write("\u04ef\5\u00e0q\2\u04ef\u04f0\7\u0092\2\2\u04f0\u0563")
        buf.write("\3\2\2\2\u04f1\u04f2\7Z\2\2\u04f2\u04f3\7\u0091\2\2\u04f3")
        buf.write("\u04f4\5\u00e0q\2\u04f4\u04f5\7\u0092\2\2\u04f5\u0563")
        buf.write("\3\2\2\2\u04f6\u04f7\7[\2\2\u04f7\u04f8\7\u0091\2\2\u04f8")
        buf.write("\u04f9\5\u00e0q\2\u04f9\u04fa\7\u0092\2\2\u04fa\u0563")
        buf.write("\3\2\2\2\u04fb\u04fc\7\\\2\2\u04fc\u04fd\7\u0091\2\2\u04fd")
        buf.write("\u04fe\5\u00e0q\2\u04fe\u04ff\7\u0092\2\2\u04ff\u0563")
        buf.write("\3\2\2\2\u0500\u0501\7]\2\2\u0501\u0502\7\u0091\2\2\u0502")
        buf.write("\u0563\7\u0092\2\2\u0503\u0504\7^\2\2\u0504\u0505\7\u0091")
        buf.write("\2\2\u0505\u0563\7\u0092\2\2\u0506\u0507\7_\2\2\u0507")
        buf.write("\u0508\7\u0091\2\2\u0508\u0563\7\u0092\2\2\u0509\u050a")
        buf.write("\7`\2\2\u050a\u050b\7\u0091\2\2\u050b\u050c\5\u00e0q\2")
        buf.write("\u050c\u050d\7\u0092\2\2\u050d\u0563\3\2\2\2\u050e\u050f")
        buf.write("\7a\2\2\u050f\u0510\7\u0091\2\2\u0510\u0511\5\u00e0q\2")
        buf.write("\u0511\u0512\7\u0092\2\2\u0512\u0563\3\2\2\2\u0513\u0514")
        buf.write("\7b\2\2\u0514\u0515\7\u0091\2\2\u0515\u0516\5\u00e0q\2")
        buf.write("\u0516\u0517\7\u0092\2\2\u0517\u0563\3\2\2\2\u0518\u0519")
        buf.write("\7c\2\2\u0519\u051a\7\u0091\2\2\u051a\u051b\5\u00e0q\2")
        buf.write("\u051b\u051c\7\u0092\2\2\u051c\u0563\3\2\2\2\u051d\u051e")
        buf.write("\7d\2\2\u051e\u051f\7\u0091\2\2\u051f\u0520\5\u00e0q\2")
        buf.write("\u0520\u0521\7\u0092\2\2\u0521\u0563\3\2\2\2\u0522\u0523")
        buf.write("\7e\2\2\u0523\u0525\7\u0091\2\2\u0524\u0526\5\u0090I\2")
        buf.write("\u0525\u0524\3\2\2\2\u0525\u0526\3\2\2\2\u0526\u0527\3")
        buf.write("\2\2\2\u0527\u0563\7\u0092\2\2\u0528\u0529\7f\2\2\u0529")
        buf.write("\u052a\7\u0091\2\2\u052a\u052b\5\u00e0q\2\u052b\u052c")
        buf.write("\7\u009d\2\2\u052c\u052d\5\u00e0q\2\u052d\u052e\7\u009d")
        buf.write("\2\2\u052e\u052f\5\u00e0q\2\u052f\u0530\7\u0092\2\2\u0530")
        buf.write("\u0563\3\2\2\2\u0531\u0532\7g\2\2\u0532\u0533\7\u0091")
        buf.write("\2\2\u0533\u0534\5\u00e0q\2\u0534\u0535\7\u009d\2\2\u0535")
        buf.write("\u0536\5\u00e0q\2\u0536\u0537\7\u0092\2\2\u0537\u0563")
        buf.write("\3\2\2\2\u0538\u0539\7h\2\2\u0539\u053a\7\u0091\2\2\u053a")
        buf.write("\u053b\5\u00e0q\2\u053b\u053c\7\u009d\2\2\u053c\u053d")
        buf.write("\5\u00e0q\2\u053d\u053e\7\u0092\2\2\u053e\u0563\3\2\2")
        buf.write("\2\u053f\u0540\7 \2\2\u0540\u0541\7\u0091\2\2\u0541\u0542")
        buf.write("\5\u00e0q\2\u0542\u0543\7\u009d\2\2\u0543\u0544\5\u00e0")
        buf.write("q\2\u0544\u0545\7\u0092\2\2\u0545\u0563\3\2\2\2\u0546")
        buf.write("\u0547\7!\2\2\u0547\u0548\7\u0091\2\2\u0548\u0549\5\u00e0")
        buf.write("q\2\u0549\u054a\7\u0092\2\2\u054a\u0563\3\2\2\2\u054b")
        buf.write("\u054c\7\"\2\2\u054c\u054d\7\u0091\2\2\u054d\u054e\5\u00e0")
        buf.write("q\2\u054e\u054f\7\u0092\2\2\u054f\u0563\3\2\2\2\u0550")
        buf.write("\u0551\7#\2\2\u0551\u0552\7\u0091\2\2\u0552\u0553\5\u00e0")
        buf.write("q\2\u0553\u0554\7\u0092\2\2\u0554\u0563\3\2\2\2\u0555")
        buf.write("\u0556\7$\2\2\u0556\u0557\7\u0091\2\2\u0557\u0558\5\u00e0")
        buf.write("q\2\u0558\u0559\7\u0092\2\2\u0559\u0563\3\2\2\2\u055a")
        buf.write("\u055b\7i\2\2\u055b\u055c\7\u0091\2\2\u055c\u055d\5\u00e0")
        buf.write("q\2\u055d\u055e\7\u0092\2\2\u055e\u0563\3\2\2\2\u055f")
        buf.write("\u0563\5\u00eav\2\u0560\u0563\5\u00f0y\2\u0561\u0563\5")
        buf.write("\u00f2z\2\u0562\u0456\3\2\2\2\u0562\u0457\3\2\2\2\u0562")
        buf.write("\u045c\3\2\2\2\u0562\u0461\3\2\2\2\u0562\u0468\3\2\2\2")
        buf.write("\u0562\u046d\3\2\2\2\u0562\u0472\3\2\2\2\u0562\u0477\3")
        buf.write("\2\2\2\u0562\u047c\3\2\2\2\u0562\u0482\3\2\2\2\u0562\u0485")
        buf.write("\3\2\2\2\u0562\u048a\3\2\2\2\u0562\u048f\3\2\2\2\u0562")
        buf.write("\u0494\3\2\2\2\u0562\u0499\3\2\2\2\u0562\u049f\3\2\2\2")
        buf.write("\u0562\u04a0\3\2\2\2\u0562\u04a5\3\2\2\2\u0562\u04a6\3")
        buf.write("\2\2\2\u0562\u04ab\3\2\2\2\u0562\u04b0\3\2\2\2\u0562\u04b5")
        buf.write("\3\2\2\2\u0562\u04bc\3\2\2\2\u0562\u04c3\3\2\2\2\u0562")
        buf.write("\u04ca\3\2\2\2\u0562\u04d1\3\2\2\2\u0562\u04d8\3\2\2\2")
        buf.write("\u0562\u04dd\3\2\2\2\u0562\u04e2\3\2\2\2\u0562\u04e7\3")
        buf.write("\2\2\2\u0562\u04ec\3\2\2\2\u0562\u04f1\3\2\2\2\u0562\u04f6")
        buf.write("\3\2\2\2\u0562\u04fb\3\2\2\2\u0562\u0500\3\2\2\2\u0562")
        buf.write("\u0503\3\2\2\2\u0562\u0506\3\2\2\2\u0562\u0509\3\2\2\2")
        buf.write("\u0562\u050e\3\2\2\2\u0562\u0513\3\2\2\2\u0562\u0518\3")
        buf.write("\2\2\2\u0562\u051d\3\2\2\2\u0562\u0522\3\2\2\2\u0562\u0528")
        buf.write("\3\2\2\2\u0562\u0531\3\2\2\2\u0562\u0538\3\2\2\2\u0562")
        buf.write("\u053f\3\2\2\2\u0562\u0546\3\2\2\2\u0562\u054b\3\2\2\2")
        buf.write("\u0562\u0550\3\2\2\2\u0562\u0555\3\2\2\2\u0562\u055a\3")
        buf.write("\2\2\2\u0562\u055f\3\2\2\2\u0562\u0560\3\2\2\2\u0562\u0561")
        buf.write("\3\2\2\2\u0563\u00e9\3\2\2\2\u0564\u0565\7%\2\2\u0565")
        buf.write("\u0566\7\u0091\2\2\u0566\u0567\5\u00e0q\2\u0567\u0568")
        buf.write("\7\u009d\2\2\u0568\u056b\5\u00e0q\2\u0569\u056a\7\u009d")
        buf.write("\2\2\u056a\u056c\5\u00e0q\2\u056b\u0569\3\2\2\2\u056b")
        buf.write("\u056c\3\2\2\2\u056c\u056d\3\2\2\2\u056d\u056e\7\u0092")
        buf.write("\2\2\u056e\u00eb\3\2\2\2\u056f\u0570\7&\2\2\u0570\u0571")
        buf.write("\7\u0091\2\2\u0571\u0572\5\u00e0q\2\u0572\u0573\7\u009d")
        buf.write("\2\2\u0573\u0576\5\u00e0q\2\u0574\u0575\7\u009d\2\2\u0575")
        buf.write("\u0577\5\u00e0q\2\u0576\u0574\3\2\2\2\u0576\u0577\3\2")
        buf.write("\2\2\u0577\u0578\3\2\2\2\u0578\u0579\7\u0092\2\2\u0579")
        buf.write("\u00ed\3\2\2\2\u057a\u057b\7T\2\2\u057b\u057c\7\u0091")
        buf.write("\2\2\u057c\u057d\5\u00e0q\2\u057d\u057e\7\u009d\2\2\u057e")
        buf.write("\u057f\5\u00e0q\2\u057f\u0580\7\u009d\2\2\u0580\u0583")
        buf.write("\5\u00e0q\2\u0581\u0582\7\u009d\2\2\u0582\u0584\5\u00e0")
        buf.write("q\2\u0583\u0581\3\2\2\2\u0583\u0584\3\2\2\2\u0584\u0585")
        buf.write("\3\2\2\2\u0585\u0586\7\u0092\2\2\u0586\u00ef\3\2\2\2\u0587")
        buf.write("\u0588\7s\2\2\u0588\u0589\5f\64\2\u0589\u00f1\3\2\2\2")
        buf.write("\u058a\u058b\7q\2\2\u058b\u058c\7s\2\2\u058c\u058d\5f")
        buf.write("\64\2\u058d\u00f3\3\2\2\2\u058e\u058f\7j\2\2\u058f\u0591")
        buf.write("\7\u0091\2\2\u0590\u0592\7\7\2\2\u0591\u0590\3\2\2\2\u0591")
        buf.write("\u0592\3\2\2\2\u0592\u0595\3\2\2\2\u0593\u0596\7\u009b")
        buf.write("\2\2\u0594\u0596\5\u00e0q\2\u0595\u0593\3\2\2\2\u0595")
        buf.write("\u0594\3\2\2\2\u0596\u0597\3\2\2\2\u0597\u05cf\7\u0092")
        buf.write("\2\2\u0598\u0599\7k\2\2\u0599\u059b\7\u0091\2\2\u059a")
        buf.write("\u059c\7\7\2\2\u059b\u059a\3\2\2\2\u059b\u059c\3\2\2\2")
        buf.write("\u059c\u059d\3\2\2\2\u059d\u059e\5\u00e0q\2\u059e\u059f")
        buf.write("\7\u0092\2\2\u059f\u05cf\3\2\2\2\u05a0\u05a1\7l\2\2\u05a1")
        buf.write("\u05a3\7\u0091\2\2\u05a2\u05a4\7\7\2\2\u05a3\u05a2\3\2")
        buf.write("\2\2\u05a3\u05a4\3\2\2\2\u05a4\u05a5\3\2\2\2\u05a5\u05a6")
        buf.write("\5\u00e0q\2\u05a6\u05a7\7\u0092\2\2\u05a7\u05cf\3\2\2")
        buf.write("\2\u05a8\u05a9\7m\2\2\u05a9\u05ab\7\u0091\2\2\u05aa\u05ac")
        buf.write("\7\7\2\2\u05ab\u05aa\3\2\2\2\u05ab\u05ac\3\2\2\2\u05ac")
        buf.write("\u05ad\3\2\2\2\u05ad\u05ae\5\u00e0q\2\u05ae\u05af\7\u0092")
        buf.write("\2\2\u05af\u05cf\3\2\2\2\u05b0\u05b1\7n\2\2\u05b1\u05b3")
        buf.write("\7\u0091\2\2\u05b2\u05b4\7\7\2\2\u05b3\u05b2\3\2\2\2\u05b3")
        buf.write("\u05b4\3\2\2\2\u05b4\u05b5\3\2\2\2\u05b5\u05b6\5\u00e0")
        buf.write("q\2\u05b6\u05b7\7\u0092\2\2\u05b7\u05cf\3\2\2\2\u05b8")
        buf.write("\u05b9\7o\2\2\u05b9\u05bb\7\u0091\2\2\u05ba\u05bc\7\7")
        buf.write("\2\2\u05bb\u05ba\3\2\2\2\u05bb\u05bc\3\2\2\2\u05bc\u05bd")
        buf.write("\3\2\2\2\u05bd\u05be\5\u00e0q\2\u05be\u05bf\7\u0092\2")
        buf.write("\2\u05bf\u05cf\3\2\2\2\u05c0\u05c1\7p\2\2\u05c1\u05c3")
        buf.write("\7\u0091\2\2\u05c2\u05c4\7\7\2\2\u05c3\u05c2\3\2\2\2\u05c3")
        buf.write("\u05c4\3\2\2\2\u05c4\u05c5\3\2\2\2\u05c5\u05ca\5\u00e0")
        buf.write("q\2\u05c6\u05c7\7\u0097\2\2\u05c7\u05c8\7t\2\2\u05c8\u05c9")
        buf.write("\7\u00a0\2\2\u05c9\u05cb\5\u0104\u0083\2\u05ca\u05c6\3")
        buf.write("\2\2\2\u05ca\u05cb\3\2\2\2\u05cb\u05cc\3\2\2\2\u05cc\u05cd")
        buf.write("\7\u0092\2\2\u05cd\u05cf\3\2\2\2\u05ce\u058e\3\2\2\2\u05ce")
        buf.write("\u0598\3\2\2\2\u05ce\u05a0\3\2\2\2\u05ce\u05a8\3\2\2\2")
        buf.write("\u05ce\u05b0\3\2\2\2\u05ce\u05b8\3\2\2\2\u05ce\u05c0\3")
        buf.write("\2\2\2\u05cf\u00f5\3\2\2\2\u05d0\u05d2\5\u0106\u0084\2")
        buf.write("\u05d1\u05d3\5\u008eH\2\u05d2\u05d1\3\2\2\2\u05d2\u05d3")
        buf.write("\3\2\2\2\u05d3\u00f7\3\2\2\2\u05d4\u05d8\5\u0104\u0083")
        buf.write("\2\u05d5\u05d9\7{\2\2\u05d6\u05d7\7\u008a\2\2\u05d7\u05d9")
        buf.write("\5\u0106\u0084\2\u05d8\u05d5\3\2\2\2\u05d8\u05d6\3\2\2")
        buf.write("\2\u05d8\u05d9\3\2\2\2\u05d9\u00f9\3\2\2\2\u05da\u05de")
        buf.write("\5\u00fc\177\2\u05db\u05de\5\u00fe\u0080\2\u05dc\u05de")
        buf.write("\5\u0100\u0081\2\u05dd\u05da\3\2\2\2\u05dd\u05db\3\2\2")
        buf.write("\2\u05dd\u05dc\3\2\2\2\u05de\u00fb\3\2\2\2\u05df\u05e0")
        buf.write("\t\n\2\2\u05e0\u00fd\3\2\2\2\u05e1\u05e2\t\13\2\2\u05e2")
        buf.write("\u00ff\3\2\2\2\u05e3\u05e4\t\f\2\2\u05e4\u0101\3\2\2\2")
        buf.write("\u05e5\u05e6\t\r\2\2\u05e6\u0103\3\2\2\2\u05e7\u05e8\t")
        buf.write("\16\2\2\u05e8\u0105\3\2\2\2\u05e9\u05ec\7u\2\2\u05ea\u05ec")
        buf.write("\5\u0108\u0085\2\u05eb\u05e9\3\2\2\2\u05eb\u05ea\3\2\2")
        buf.write("\2\u05ec\u0107\3\2\2\2\u05ed\u05ee\t\17\2\2\u05ee\u0109")
        buf.write("\3\2\2\2\u05ef\u05f2\7x\2\2\u05f0\u05f2\5\u010c\u0087")
        buf.write("\2\u05f1\u05ef\3\2\2\2\u05f1\u05f0\3\2\2\2\u05f2\u010b")
        buf.write("\3\2\2\2\u05f3\u05f4\7\u0095\2\2\u05f4\u05f5\7\u0096\2")
        buf.write("\2\u05f5\u010d\3\2\2\2\u0095\u0113\u011b\u011f\u0121\u012f")
        buf.write("\u013c\u0141\u0144\u014f\u0156\u015f\u0165\u0169\u016f")
        buf.write("\u0172\u0177\u017b\u0183\u018b\u0190\u0195\u0198\u019b")
        buf.write("\u019e\u01a5\u01ad\u01b2\u01b8\u01c1\u01ca\u01ce\u01d2")
        buf.write("\u01d4\u01de\u01e8\u01ed\u01ef\u01fc\u0200\u0205\u0209")
        buf.write("\u020f\u0215\u021b\u0223\u022b\u023f\u0243\u0246\u024b")
        buf.write("\u0259\u025f\u0262\u026b\u0276\u027b\u0280\u0283\u0289")
        buf.write("\u0290\u0294\u029a\u029f\u02a4\u02a9\u02ac\u02b1\u02b5")
        buf.write("\u02c0\u02cb\u02dc\u02e3\u02ec\u02f4\u02fd\u0307\u0311")
        buf.write("\u031d\u0324\u0328\u0331\u0336\u033d\u0341\u034a\u034d")
        buf.write("\u0355\u0359\u035e\u0365\u0370\u0373\u0377\u037c\u0380")
        buf.write("\u0385\u0392\u039e\u03a6\u03ab\u03ae\u03bc\u03c5\u03c8")
        buf.write("\u03cb\u03ce\u03d2\u03d8\u03e0\u03ea\u03f2\u03f8\u03fc")
        buf.write("\u0400\u0404\u040e\u041b\u042a\u042f\u0438\u043a\u043f")
        buf.write("\u0443\u0446\u0454\u047f\u049c\u0525\u0562\u056b\u0576")
        buf.write("\u0583\u0591\u0595\u059b\u05a3\u05ab\u05b3\u05bb\u05c3")
        buf.write("\u05ca\u05ce\u05d2\u05d8\u05dd\u05eb\u05f1")
        return buf.getvalue()


class SparqlParser ( Parser ):

    grammarFileName = "Sparql.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>", 
                     "'a'", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<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>", "WS", "BASE", "PREFIX", "SELECT", "DISTINCT", 
                      "REDUCED", "CONSTRUCT", "DESCRIBE", "ASK", "FROM", 
                      "NAMED", "WHERE", "ORDER", "BY", "ASC", "DESC", "LIMIT", 
                      "OFFSET", "VALUES", "OPTIONAL", "GRAPH", "UNION", 
                      "FILTER", "A", "STR", "LANG", "LANGMATCHES", "DATATYPE", 
                      "BOUND", "SAMETERM", "ISIRI", "ISURI", "ISBLANK", 
                      "ISLITERAL", "REGEX", "SUBSTR", "TRUE", "FALSE", "LOAD", 
                      "CLEAR", "DROP", "ADD", "MOVE", "COPY", "CREATE", 
                      "DELETE", "INSERT", "USING", "SILENT", "DEFAULT", 
                      "ALL", "DATA", "WITH", "INTO", "TO", "AS", "GROUP", 
                      "HAVING", "UNDEF", "BINDINGS", "SERVICE", "BIND", 
                      "MINUS", "IRI", "URI", "BNODE", "RAND", "ABS", "CEIL", 
                      "FLOOR", "ROUND", "CONCAT", "STRLEN", "UCASE", "LCASE", 
                      "ENCODE_FOR_URI", "CONTAINS", "STRSTARTS", "STRENDS", 
                      "STRBEFORE", "STRAFTER", "REPLACE", "YEAR", "MONTH", 
                      "DAY", "HOURS", "MINUTES", "SECONDS", "TIMEZONE", 
                      "TZ", "NOW", "UUID", "STRUUID", "MD5", "SHA1", "SHA256", 
                      "SHA384", "SHA512", "COALESCE", "IF", "STRLANG", "STRDT", 
                      "ISNUMERIC", "COUNT", "SUM", "MIN", "MAX", "AVG", 
                      "SAMPLE", "GROUP_CONCAT", "NOT", "IN", "EXISTS", "SEPARATOR", 
                      "IRIREF", "PNAME_NS", "PNAME_LN", "BLANK_NODE_LABEL", 
                      "VAR1", "VAR2", "LANGTAG", "INTEGER", "DECIMAL", "DOUBLE", 
                      "INTEGER_POSITIVE", "DECIMAL_POSITIVE", "DOUBLE_POSITIVE", 
                      "INTEGER_NEGATIVE", "DECIMAL_NEGATIVE", "DOUBLE_NEGATIVE", 
                      "STRING_LITERAL1", "STRING_LITERAL2", "STRING_LITERAL_LONG1", 
                      "STRING_LITERAL_LONG2", "COMMENT", "REFERENCE", "LESS_EQUAL", 
                      "GREATER_EQUAL", "NOT_EQUAL", "AND", "OR", "INVERSE", 
                      "OPEN_BRACE", "CLOSE_BRACE", "OPEN_CURLY_BRACE", "CLOSE_CURLY_BRACE", 
                      "OPEN_SQUARE_BRACKET", "CLOSE_SQUARE_BRACKET", "SEMICOLON", 
                      "DOT", "PLUS_SIGN", "MINUS_SIGN", "ASTERISK", "QUESTION_MARK", 
                      "COMMA", "NEGATION", "DIVIDE", "EQUAL", "LESS", "GREATER", 
                      "PIPE", "ANY" ]

    RULE_query = 0
    RULE_prologue = 1
    RULE_baseDecl = 2
    RULE_prefixDecl = 3
    RULE_selectQuery = 4
    RULE_subSelect = 5
    RULE_selectClause = 6
    RULE_selectModifier = 7
    RULE_selectVariables = 8
    RULE_constructQuery = 9
    RULE_describeQuery = 10
    RULE_askQuery = 11
    RULE_datasetClause = 12
    RULE_whereClause = 13
    RULE_solutionModifier = 14
    RULE_groupClause = 15
    RULE_groupCondition = 16
    RULE_havingClause = 17
    RULE_havingCondition = 18
    RULE_orderClause = 19
    RULE_orderCondition = 20
    RULE_limitOffsetClauses = 21
    RULE_limitClause = 22
    RULE_offsetClause = 23
    RULE_valuesClause = 24
    RULE_updateCommand = 25
    RULE_update = 26
    RULE_load = 27
    RULE_clear = 28
    RULE_drop = 29
    RULE_create = 30
    RULE_add = 31
    RULE_move = 32
    RULE_copy = 33
    RULE_insertData = 34
    RULE_deleteData = 35
    RULE_deleteWhere = 36
    RULE_modify = 37
    RULE_deleteClause = 38
    RULE_insertClause = 39
    RULE_usingClause = 40
    RULE_graphOrDefault = 41
    RULE_graphRef = 42
    RULE_graphRefAll = 43
    RULE_quadPattern = 44
    RULE_quadData = 45
    RULE_quads = 46
    RULE_quadsDetails = 47
    RULE_quadsNotTriples = 48
    RULE_triplesTemplate = 49
    RULE_groupGraphPattern = 50
    RULE_groupGraphPatternSub = 51
    RULE_groupGraphPatternSubList = 52
    RULE_triplesBlock = 53
    RULE_graphPatternNotTriples = 54
    RULE_optionalGraphPattern = 55
    RULE_graphGraphPattern = 56
    RULE_serviceGraphPattern = 57
    RULE_bind = 58
    RULE_inlineData = 59
    RULE_dataBlock = 60
    RULE_inlineDataOneVar = 61
    RULE_inlineDataFull = 62
    RULE_dataBlockValues = 63
    RULE_dataBlockValue = 64
    RULE_minusGraphPattern = 65
    RULE_groupOrUnionGraphPattern = 66
    RULE_filter = 67
    RULE_constraint = 68
    RULE_functionCall = 69
    RULE_argList = 70
    RULE_expressionList = 71
    RULE_constructTemplate = 72
    RULE_constructTriples = 73
    RULE_triplesSameSubject = 74
    RULE_propertyList = 75
    RULE_propertyListNotEmpty = 76
    RULE_verb = 77
    RULE_objectList = 78
    RULE_object = 79
    RULE_triplesSameSubjectPath = 80
    RULE_propertyListPath = 81
    RULE_propertyListPathNotEmpty = 82
    RULE_propertyListPathNotEmptyList = 83
    RULE_verbPath = 84
    RULE_verbSimple = 85
    RULE_objectListPath = 86
    RULE_objectPath = 87
    RULE_path = 88
    RULE_pathAlternative = 89
    RULE_pathSequence = 90
    RULE_pathElt = 91
    RULE_pathEltOrInverse = 92
    RULE_pathMod = 93
    RULE_pathPrimary = 94
    RULE_pathNegatedPropertySet = 95
    RULE_pathOneInPropertySet = 96
    RULE_integer = 97
    RULE_triplesNode = 98
    RULE_blankNodePropertyList = 99
    RULE_triplesNodePath = 100
    RULE_blankNodePropertyListPath = 101
    RULE_collection = 102
    RULE_collectionPath = 103
    RULE_graphNode = 104
    RULE_graphNodePath = 105
    RULE_varOrTerm = 106
    RULE_varOrIRI = 107
    RULE_var = 108
    RULE_graphTerm = 109
    RULE_nil = 110
    RULE_expression = 111
    RULE_unaryLiteralExpression = 112
    RULE_unaryExpression = 113
    RULE_primaryExpression = 114
    RULE_builtInCall = 115
    RULE_regexExpression = 116
    RULE_subStringExpression = 117
    RULE_strReplaceExpression = 118
    RULE_existsFunction = 119
    RULE_notExistsFunction = 120
    RULE_aggregate = 121
    RULE_iriRefOrFunction = 122
    RULE_rdfLiteral = 123
    RULE_numericLiteral = 124
    RULE_numericLiteralUnsigned = 125
    RULE_numericLiteralPositive = 126
    RULE_numericLiteralNegative = 127
    RULE_booleanLiteral = 128
    RULE_string = 129
    RULE_iri = 130
    RULE_prefixedName = 131
    RULE_blankNode = 132
    RULE_anon = 133

    ruleNames =  [ "query", "prologue", "baseDecl", "prefixDecl", "selectQuery", 
                   "subSelect", "selectClause", "selectModifier", "selectVariables", 
                   "constructQuery", "describeQuery", "askQuery", "datasetClause", 
                   "whereClause", "solutionModifier", "groupClause", "groupCondition", 
                   "havingClause", "havingCondition", "orderClause", "orderCondition", 
                   "limitOffsetClauses", "limitClause", "offsetClause", 
                   "valuesClause", "updateCommand", "update", "load", "clear", 
                   "drop", "create", "add", "move", "copy", "insertData", 
                   "deleteData", "deleteWhere", "modify", "deleteClause", 
                   "insertClause", "usingClause", "graphOrDefault", "graphRef", 
                   "graphRefAll", "quadPattern", "quadData", "quads", "quadsDetails", 
                   "quadsNotTriples", "triplesTemplate", "groupGraphPattern", 
                   "groupGraphPatternSub", "groupGraphPatternSubList", "triplesBlock", 
                   "graphPatternNotTriples", "optionalGraphPattern", "graphGraphPattern", 
                   "serviceGraphPattern", "bind", "inlineData", "dataBlock", 
                   "inlineDataOneVar", "inlineDataFull", "dataBlockValues", 
                   "dataBlockValue", "minusGraphPattern", "groupOrUnionGraphPattern", 
                   "filter", "constraint", "functionCall", "argList", "expressionList", 
                   "constructTemplate", "constructTriples", "triplesSameSubject", 
                   "propertyList", "propertyListNotEmpty", "verb", "objectList", 
                   "object", "triplesSameSubjectPath", "propertyListPath", 
                   "propertyListPathNotEmpty", "propertyListPathNotEmptyList", 
                   "verbPath", "verbSimple", "objectListPath", "objectPath", 
                   "path", "pathAlternative", "pathSequence", "pathElt", 
                   "pathEltOrInverse", "pathMod", "pathPrimary", "pathNegatedPropertySet", 
                   "pathOneInPropertySet", "integer", "triplesNode", "blankNodePropertyList", 
                   "triplesNodePath", "blankNodePropertyListPath", "collection", 
                   "collectionPath", "graphNode", "graphNodePath", "varOrTerm", 
                   "varOrIRI", "var", "graphTerm", "nil", "expression", 
                   "unaryLiteralExpression", "unaryExpression", "primaryExpression", 
                   "builtInCall", "regexExpression", "subStringExpression", 
                   "strReplaceExpression", "existsFunction", "notExistsFunction", 
                   "aggregate", "iriRefOrFunction", "rdfLiteral", "numericLiteral", 
                   "numericLiteralUnsigned", "numericLiteralPositive", "numericLiteralNegative", 
                   "booleanLiteral", "string", "iri", "prefixedName", "blankNode", 
                   "anon" ]

    EOF = Token.EOF
    WS=1
    BASE=2
    PREFIX=3
    SELECT=4
    DISTINCT=5
    REDUCED=6
    CONSTRUCT=7
    DESCRIBE=8
    ASK=9
    FROM=10
    NAMED=11
    WHERE=12
    ORDER=13
    BY=14
    ASC=15
    DESC=16
    LIMIT=17
    OFFSET=18
    VALUES=19
    OPTIONAL=20
    GRAPH=21
    UNION=22
    FILTER=23
    A=24
    STR=25
    LANG=26
    LANGMATCHES=27
    DATATYPE=28
    BOUND=29
    SAMETERM=30
    ISIRI=31
    ISURI=32
    ISBLANK=33
    ISLITERAL=34
    REGEX=35
    SUBSTR=36
    TRUE=37
    FALSE=38
    LOAD=39
    CLEAR=40
    DROP=41
    ADD=42
    MOVE=43
    COPY=44
    CREATE=45
    DELETE=46
    INSERT=47
    USING=48
    SILENT=49
    DEFAULT=50
    ALL=51
    DATA=52
    WITH=53
    INTO=54
    TO=55
    AS=56
    GROUP=57
    HAVING=58
    UNDEF=59
    BINDINGS=60
    SERVICE=61
    BIND=62
    MINUS=63
    IRI=64
    URI=65
    BNODE=66
    RAND=67
    ABS=68
    CEIL=69
    FLOOR=70
    ROUND=71
    CONCAT=72
    STRLEN=73
    UCASE=74
    LCASE=75
    ENCODE_FOR_URI=76
    CONTAINS=77
    STRSTARTS=78
    STRENDS=79
    STRBEFORE=80
    STRAFTER=81
    REPLACE=82
    YEAR=83
    MONTH=84
    DAY=85
    HOURS=86
    MINUTES=87
    SECONDS=88
    TIMEZONE=89
    TZ=90
    NOW=91
    UUID=92
    STRUUID=93
    MD5=94
    SHA1=95
    SHA256=96
    SHA384=97
    SHA512=98
    COALESCE=99
    IF=100
    STRLANG=101
    STRDT=102
    ISNUMERIC=103
    COUNT=104
    SUM=105
    MIN=106
    MAX=107
    AVG=108
    SAMPLE=109
    GROUP_CONCAT=110
    NOT=111
    IN=112
    EXISTS=113
    SEPARATOR=114
    IRIREF=115
    PNAME_NS=116
    PNAME_LN=117
    BLANK_NODE_LABEL=118
    VAR1=119
    VAR2=120
    LANGTAG=121
    INTEGER=122
    DECIMAL=123
    DOUBLE=124
    INTEGER_POSITIVE=125
    DECIMAL_POSITIVE=126
    DOUBLE_POSITIVE=127
    INTEGER_NEGATIVE=128
    DECIMAL_NEGATIVE=129
    DOUBLE_NEGATIVE=130
    STRING_LITERAL1=131
    STRING_LITERAL2=132
    STRING_LITERAL_LONG1=133
    STRING_LITERAL_LONG2=134
    COMMENT=135
    REFERENCE=136
    LESS_EQUAL=137
    GREATER_EQUAL=138
    NOT_EQUAL=139
    AND=140
    OR=141
    INVERSE=142
    OPEN_BRACE=143
    CLOSE_BRACE=144
    OPEN_CURLY_BRACE=145
    CLOSE_CURLY_BRACE=146
    OPEN_SQUARE_BRACKET=147
    CLOSE_SQUARE_BRACKET=148
    SEMICOLON=149
    DOT=150
    PLUS_SIGN=151
    MINUS_SIGN=152
    ASTERISK=153
    QUESTION_MARK=154
    COMMA=155
    NEGATION=156
    DIVIDE=157
    EQUAL=158
    LESS=159
    GREATER=160
    PIPE=161
    ANY=162

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




    class QueryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def prologue(self):
            return self.getTypedRuleContext(SparqlParser.PrologueContext,0)


        def valuesClause(self):
            return self.getTypedRuleContext(SparqlParser.ValuesClauseContext,0)


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

        def selectQuery(self):
            return self.getTypedRuleContext(SparqlParser.SelectQueryContext,0)


        def constructQuery(self):
            return self.getTypedRuleContext(SparqlParser.ConstructQueryContext,0)


        def describeQuery(self):
            return self.getTypedRuleContext(SparqlParser.DescribeQueryContext,0)


        def askQuery(self):
            return self.getTypedRuleContext(SparqlParser.AskQueryContext,0)


        def updateCommand(self):
            return self.getTypedRuleContext(SparqlParser.UpdateCommandContext,0)


        def getRuleIndex(self):
            return SparqlParser.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 = SparqlParser.QueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_query)
        try:
            self.state = 281
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 268
                self.prologue()
                self.state = 273
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [SparqlParser.SELECT]:
                    self.state = 269
                    self.selectQuery()
                    pass
                elif token in [SparqlParser.CONSTRUCT]:
                    self.state = 270
                    self.constructQuery()
                    pass
                elif token in [SparqlParser.DESCRIBE]:
                    self.state = 271
                    self.describeQuery()
                    pass
                elif token in [SparqlParser.ASK]:
                    self.state = 272
                    self.askQuery()
                    pass
                elif token in [SparqlParser.EOF, SparqlParser.VALUES]:
                    pass
                else:
                    pass
                self.state = 275
                self.valuesClause()
                self.state = 276
                self.match(SparqlParser.EOF)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 278
                self.updateCommand()
                self.state = 279
                self.match(SparqlParser.EOF)
                pass


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


    class PrologueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def baseDecl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.BaseDeclContext)
            else:
                return self.getTypedRuleContext(SparqlParser.BaseDeclContext,i)


        def prefixDecl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PrefixDeclContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PrefixDeclContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_prologue

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

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

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




    def prologue(self):

        localctx = SparqlParser.PrologueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_prologue)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 287
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.BASE or _la==SparqlParser.PREFIX:
                self.state = 285
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [SparqlParser.BASE]:
                    self.state = 283
                    self.baseDecl()
                    pass
                elif token in [SparqlParser.PREFIX]:
                    self.state = 284
                    self.prefixDecl()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 289
                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 BaseDeclContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BASE(self):
            return self.getToken(SparqlParser.BASE, 0)

        def IRIREF(self):
            return self.getToken(SparqlParser.IRIREF, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_baseDecl

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

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

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




    def baseDecl(self):

        localctx = SparqlParser.BaseDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_baseDecl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 290
            self.match(SparqlParser.BASE)
            self.state = 291
            self.match(SparqlParser.IRIREF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PrefixDeclContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PREFIX(self):
            return self.getToken(SparqlParser.PREFIX, 0)

        def PNAME_NS(self):
            return self.getToken(SparqlParser.PNAME_NS, 0)

        def IRIREF(self):
            return self.getToken(SparqlParser.IRIREF, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_prefixDecl

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

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

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




    def prefixDecl(self):

        localctx = SparqlParser.PrefixDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_prefixDecl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            self.match(SparqlParser.PREFIX)
            self.state = 294
            self.match(SparqlParser.PNAME_NS)
            self.state = 295
            self.match(SparqlParser.IRIREF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectQueryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def selectClause(self):
            return self.getTypedRuleContext(SparqlParser.SelectClauseContext,0)


        def whereClause(self):
            return self.getTypedRuleContext(SparqlParser.WhereClauseContext,0)


        def solutionModifier(self):
            return self.getTypedRuleContext(SparqlParser.SolutionModifierContext,0)


        def datasetClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DatasetClauseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DatasetClauseContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_selectQuery

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

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

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




    def selectQuery(self):

        localctx = SparqlParser.SelectQueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_selectQuery)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 297
            self.selectClause()
            self.state = 301
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.FROM:
                self.state = 298
                self.datasetClause()
                self.state = 303
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 304
            self.whereClause()
            self.state = 305
            self.solutionModifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SubSelectContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def selectClause(self):
            return self.getTypedRuleContext(SparqlParser.SelectClauseContext,0)


        def whereClause(self):
            return self.getTypedRuleContext(SparqlParser.WhereClauseContext,0)


        def solutionModifier(self):
            return self.getTypedRuleContext(SparqlParser.SolutionModifierContext,0)


        def valuesClause(self):
            return self.getTypedRuleContext(SparqlParser.ValuesClauseContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_subSelect

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

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

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




    def subSelect(self):

        localctx = SparqlParser.SubSelectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_subSelect)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 307
            self.selectClause()
            self.state = 308
            self.whereClause()
            self.state = 309
            self.solutionModifier()
            self.state = 310
            self.valuesClause()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)

        def selectModifier(self):
            return self.getTypedRuleContext(SparqlParser.SelectModifierContext,0)


        def selectVariables(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.SelectVariablesContext)
            else:
                return self.getTypedRuleContext(SparqlParser.SelectVariablesContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_selectClause

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

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

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




    def selectClause(self):

        localctx = SparqlParser.SelectClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_selectClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 312
            self.match(SparqlParser.SELECT)
            self.state = 314
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.DISTINCT or _la==SparqlParser.REDUCED:
                self.state = 313
                self.selectModifier()


            self.state = 322
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.VAR1, SparqlParser.VAR2, SparqlParser.OPEN_BRACE]:
                self.state = 317 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 316
                    self.selectVariables()
                    self.state = 319 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (((((_la - 119)) & ~0x3f) == 0 and ((1 << (_la - 119)) & ((1 << (SparqlParser.VAR1 - 119)) | (1 << (SparqlParser.VAR2 - 119)) | (1 << (SparqlParser.OPEN_BRACE - 119)))) != 0)):
                        break

                pass
            elif token in [SparqlParser.ASTERISK]:
                self.state = 321
                self.match(SparqlParser.ASTERISK)
                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 SelectModifierContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DISTINCT(self):
            return self.getToken(SparqlParser.DISTINCT, 0)

        def REDUCED(self):
            return self.getToken(SparqlParser.REDUCED, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_selectModifier

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

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

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




    def selectModifier(self):

        localctx = SparqlParser.SelectModifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_selectModifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 324
            _la = self._input.LA(1)
            if not(_la==SparqlParser.DISTINCT or _la==SparqlParser.REDUCED):
                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 SelectVariablesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


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

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_selectVariables

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

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

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




    def selectVariables(self):

        localctx = SparqlParser.SelectVariablesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_selectVariables)
        try:
            self.state = 333
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 326
                self.var()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 327
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 328
                self.expression(0)
                self.state = 329
                self.match(SparqlParser.AS)
                self.state = 330
                self.var()
                self.state = 331
                self.match(SparqlParser.CLOSE_BRACE)
                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 ConstructQueryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CONSTRUCT(self):
            return self.getToken(SparqlParser.CONSTRUCT, 0)

        def constructTemplate(self):
            return self.getTypedRuleContext(SparqlParser.ConstructTemplateContext,0)


        def whereClause(self):
            return self.getTypedRuleContext(SparqlParser.WhereClauseContext,0)


        def solutionModifier(self):
            return self.getTypedRuleContext(SparqlParser.SolutionModifierContext,0)


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

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def datasetClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DatasetClauseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DatasetClauseContext,i)


        def triplesTemplate(self):
            return self.getTypedRuleContext(SparqlParser.TriplesTemplateContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_constructQuery

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

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

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




    def constructQuery(self):

        localctx = SparqlParser.ConstructQueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_constructQuery)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 335
            self.match(SparqlParser.CONSTRUCT)
            self.state = 359
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_CURLY_BRACE]:
                self.state = 336
                self.constructTemplate()
                self.state = 340
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SparqlParser.FROM:
                    self.state = 337
                    self.datasetClause()
                    self.state = 342
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 343
                self.whereClause()
                self.state = 344
                self.solutionModifier()
                pass
            elif token in [SparqlParser.FROM, SparqlParser.WHERE]:
                self.state = 349
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SparqlParser.FROM:
                    self.state = 346
                    self.datasetClause()
                    self.state = 351
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 352
                self.match(SparqlParser.WHERE)
                self.state = 353
                self.match(SparqlParser.OPEN_CURLY_BRACE)
                self.state = 355
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                    self.state = 354
                    self.triplesTemplate()


                self.state = 357
                self.match(SparqlParser.CLOSE_CURLY_BRACE)
                self.state = 358
                self.solutionModifier()
                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 DescribeQueryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DESCRIBE(self):
            return self.getToken(SparqlParser.DESCRIBE, 0)

        def solutionModifier(self):
            return self.getTypedRuleContext(SparqlParser.SolutionModifierContext,0)


        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)

        def datasetClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DatasetClauseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DatasetClauseContext,i)


        def whereClause(self):
            return self.getTypedRuleContext(SparqlParser.WhereClauseContext,0)


        def varOrIRI(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.VarOrIRIContext)
            else:
                return self.getTypedRuleContext(SparqlParser.VarOrIRIContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_describeQuery

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

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

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




    def describeQuery(self):

        localctx = SparqlParser.DescribeQueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_describeQuery)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 361
            self.match(SparqlParser.DESCRIBE)
            self.state = 368
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.VAR1, SparqlParser.VAR2]:
                self.state = 363 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 362
                    self.varOrIRI()
                    self.state = 365 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)))) != 0)):
                        break

                pass
            elif token in [SparqlParser.ASTERISK]:
                self.state = 367
                self.match(SparqlParser.ASTERISK)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 373
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.FROM:
                self.state = 370
                self.datasetClause()
                self.state = 375
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 377
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.WHERE or _la==SparqlParser.OPEN_CURLY_BRACE:
                self.state = 376
                self.whereClause()


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


    class AskQueryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ASK(self):
            return self.getToken(SparqlParser.ASK, 0)

        def whereClause(self):
            return self.getTypedRuleContext(SparqlParser.WhereClauseContext,0)


        def solutionModifier(self):
            return self.getTypedRuleContext(SparqlParser.SolutionModifierContext,0)


        def datasetClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DatasetClauseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DatasetClauseContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_askQuery

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

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

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




    def askQuery(self):

        localctx = SparqlParser.AskQueryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_askQuery)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 381
            self.match(SparqlParser.ASK)
            self.state = 385
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.FROM:
                self.state = 382
                self.datasetClause()
                self.state = 387
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class DatasetClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def NAMED(self):
            return self.getToken(SparqlParser.NAMED, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_datasetClause

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

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

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




    def datasetClause(self):

        localctx = SparqlParser.DatasetClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_datasetClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 391
            self.match(SparqlParser.FROM)
            self.state = 393
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.NAMED:
                self.state = 392
                self.match(SparqlParser.NAMED)


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


    class WhereClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_whereClause

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

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

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




    def whereClause(self):

        localctx = SparqlParser.WhereClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_whereClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 398
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.WHERE:
                self.state = 397
                self.match(SparqlParser.WHERE)


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


    class SolutionModifierContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def groupClause(self):
            return self.getTypedRuleContext(SparqlParser.GroupClauseContext,0)


        def havingClause(self):
            return self.getTypedRuleContext(SparqlParser.HavingClauseContext,0)


        def orderClause(self):
            return self.getTypedRuleContext(SparqlParser.OrderClauseContext,0)


        def limitOffsetClauses(self):
            return self.getTypedRuleContext(SparqlParser.LimitOffsetClausesContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_solutionModifier

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

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

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




    def solutionModifier(self):

        localctx = SparqlParser.SolutionModifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_solutionModifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 403
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.GROUP:
                self.state = 402
                self.groupClause()


            self.state = 406
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.HAVING:
                self.state = 405
                self.havingClause()


            self.state = 409
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.ORDER:
                self.state = 408
                self.orderClause()


            self.state = 412
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.LIMIT or _la==SparqlParser.OFFSET:
                self.state = 411
                self.limitOffsetClauses()


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


    class GroupClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def groupCondition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GroupConditionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GroupConditionContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_groupClause

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

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

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




    def groupClause(self):

        localctx = SparqlParser.GroupClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_groupClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 414
            self.match(SparqlParser.GROUP)
            self.state = 415
            self.match(SparqlParser.BY)
            self.state = 417 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 416
                self.groupCondition()
                self.state = 419 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (((((_la - 25)) & ~0x3f) == 0 and ((1 << (_la - 25)) & ((1 << (SparqlParser.STR - 25)) | (1 << (SparqlParser.LANG - 25)) | (1 << (SparqlParser.LANGMATCHES - 25)) | (1 << (SparqlParser.DATATYPE - 25)) | (1 << (SparqlParser.BOUND - 25)) | (1 << (SparqlParser.SAMETERM - 25)) | (1 << (SparqlParser.ISIRI - 25)) | (1 << (SparqlParser.ISURI - 25)) | (1 << (SparqlParser.ISBLANK - 25)) | (1 << (SparqlParser.ISLITERAL - 25)) | (1 << (SparqlParser.REGEX - 25)) | (1 << (SparqlParser.SUBSTR - 25)) | (1 << (SparqlParser.IRI - 25)) | (1 << (SparqlParser.URI - 25)) | (1 << (SparqlParser.BNODE - 25)) | (1 << (SparqlParser.RAND - 25)) | (1 << (SparqlParser.ABS - 25)) | (1 << (SparqlParser.CEIL - 25)) | (1 << (SparqlParser.FLOOR - 25)) | (1 << (SparqlParser.ROUND - 25)) | (1 << (SparqlParser.CONCAT - 25)) | (1 << (SparqlParser.STRLEN - 25)) | (1 << (SparqlParser.UCASE - 25)) | (1 << (SparqlParser.LCASE - 25)) | (1 << (SparqlParser.ENCODE_FOR_URI - 25)) | (1 << (SparqlParser.CONTAINS - 25)) | (1 << (SparqlParser.STRSTARTS - 25)) | (1 << (SparqlParser.STRENDS - 25)) | (1 << (SparqlParser.STRBEFORE - 25)) | (1 << (SparqlParser.STRAFTER - 25)) | (1 << (SparqlParser.REPLACE - 25)) | (1 << (SparqlParser.YEAR - 25)) | (1 << (SparqlParser.MONTH - 25)) | (1 << (SparqlParser.DAY - 25)) | (1 << (SparqlParser.HOURS - 25)) | (1 << (SparqlParser.MINUTES - 25)) | (1 << (SparqlParser.SECONDS - 25)))) != 0) or ((((_la - 89)) & ~0x3f) == 0 and ((1 << (_la - 89)) & ((1 << (SparqlParser.TIMEZONE - 89)) | (1 << (SparqlParser.TZ - 89)) | (1 << (SparqlParser.NOW - 89)) | (1 << (SparqlParser.UUID - 89)) | (1 << (SparqlParser.STRUUID - 89)) | (1 << (SparqlParser.MD5 - 89)) | (1 << (SparqlParser.SHA1 - 89)) | (1 << (SparqlParser.SHA256 - 89)) | (1 << (SparqlParser.SHA384 - 89)) | (1 << (SparqlParser.SHA512 - 89)) | (1 << (SparqlParser.COALESCE - 89)) | (1 << (SparqlParser.IF - 89)) | (1 << (SparqlParser.STRLANG - 89)) | (1 << (SparqlParser.STRDT - 89)) | (1 << (SparqlParser.ISNUMERIC - 89)) | (1 << (SparqlParser.COUNT - 89)) | (1 << (SparqlParser.SUM - 89)) | (1 << (SparqlParser.MIN - 89)) | (1 << (SparqlParser.MAX - 89)) | (1 << (SparqlParser.AVG - 89)) | (1 << (SparqlParser.SAMPLE - 89)) | (1 << (SparqlParser.GROUP_CONCAT - 89)) | (1 << (SparqlParser.NOT - 89)) | (1 << (SparqlParser.EXISTS - 89)) | (1 << (SparqlParser.IRIREF - 89)) | (1 << (SparqlParser.PNAME_NS - 89)) | (1 << (SparqlParser.PNAME_LN - 89)) | (1 << (SparqlParser.VAR1 - 89)) | (1 << (SparqlParser.VAR2 - 89)) | (1 << (SparqlParser.OPEN_BRACE - 89)))) != 0)):
                    break

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


    class GroupConditionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def builtInCall(self):
            return self.getTypedRuleContext(SparqlParser.BuiltInCallContext,0)


        def functionCall(self):
            return self.getTypedRuleContext(SparqlParser.FunctionCallContext,0)


        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_groupCondition

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

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

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




    def groupCondition(self):

        localctx = SparqlParser.GroupConditionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_groupCondition)
        self._la = 0 # Token type
        try:
            self.state = 432
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 421
                self.builtInCall()
                pass
            elif token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 422
                self.functionCall()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 423
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 424
                self.expression(0)
                self.state = 427
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.AS:
                    self.state = 425
                    self.match(SparqlParser.AS)
                    self.state = 426
                    self.var()


                self.state = 429
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 4)
                self.state = 431
                self.var()
                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 HavingClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def havingCondition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.HavingConditionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.HavingConditionContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_havingClause

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

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

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




    def havingClause(self):

        localctx = SparqlParser.HavingClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_havingClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self.match(SparqlParser.HAVING)
            self.state = 436 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 435
                self.havingCondition()
                self.state = 438 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (((((_la - 25)) & ~0x3f) == 0 and ((1 << (_la - 25)) & ((1 << (SparqlParser.STR - 25)) | (1 << (SparqlParser.LANG - 25)) | (1 << (SparqlParser.LANGMATCHES - 25)) | (1 << (SparqlParser.DATATYPE - 25)) | (1 << (SparqlParser.BOUND - 25)) | (1 << (SparqlParser.SAMETERM - 25)) | (1 << (SparqlParser.ISIRI - 25)) | (1 << (SparqlParser.ISURI - 25)) | (1 << (SparqlParser.ISBLANK - 25)) | (1 << (SparqlParser.ISLITERAL - 25)) | (1 << (SparqlParser.REGEX - 25)) | (1 << (SparqlParser.SUBSTR - 25)) | (1 << (SparqlParser.IRI - 25)) | (1 << (SparqlParser.URI - 25)) | (1 << (SparqlParser.BNODE - 25)) | (1 << (SparqlParser.RAND - 25)) | (1 << (SparqlParser.ABS - 25)) | (1 << (SparqlParser.CEIL - 25)) | (1 << (SparqlParser.FLOOR - 25)) | (1 << (SparqlParser.ROUND - 25)) | (1 << (SparqlParser.CONCAT - 25)) | (1 << (SparqlParser.STRLEN - 25)) | (1 << (SparqlParser.UCASE - 25)) | (1 << (SparqlParser.LCASE - 25)) | (1 << (SparqlParser.ENCODE_FOR_URI - 25)) | (1 << (SparqlParser.CONTAINS - 25)) | (1 << (SparqlParser.STRSTARTS - 25)) | (1 << (SparqlParser.STRENDS - 25)) | (1 << (SparqlParser.STRBEFORE - 25)) | (1 << (SparqlParser.STRAFTER - 25)) | (1 << (SparqlParser.REPLACE - 25)) | (1 << (SparqlParser.YEAR - 25)) | (1 << (SparqlParser.MONTH - 25)) | (1 << (SparqlParser.DAY - 25)) | (1 << (SparqlParser.HOURS - 25)) | (1 << (SparqlParser.MINUTES - 25)) | (1 << (SparqlParser.SECONDS - 25)))) != 0) or ((((_la - 89)) & ~0x3f) == 0 and ((1 << (_la - 89)) & ((1 << (SparqlParser.TIMEZONE - 89)) | (1 << (SparqlParser.TZ - 89)) | (1 << (SparqlParser.NOW - 89)) | (1 << (SparqlParser.UUID - 89)) | (1 << (SparqlParser.STRUUID - 89)) | (1 << (SparqlParser.MD5 - 89)) | (1 << (SparqlParser.SHA1 - 89)) | (1 << (SparqlParser.SHA256 - 89)) | (1 << (SparqlParser.SHA384 - 89)) | (1 << (SparqlParser.SHA512 - 89)) | (1 << (SparqlParser.COALESCE - 89)) | (1 << (SparqlParser.IF - 89)) | (1 << (SparqlParser.STRLANG - 89)) | (1 << (SparqlParser.STRDT - 89)) | (1 << (SparqlParser.ISNUMERIC - 89)) | (1 << (SparqlParser.COUNT - 89)) | (1 << (SparqlParser.SUM - 89)) | (1 << (SparqlParser.MIN - 89)) | (1 << (SparqlParser.MAX - 89)) | (1 << (SparqlParser.AVG - 89)) | (1 << (SparqlParser.SAMPLE - 89)) | (1 << (SparqlParser.GROUP_CONCAT - 89)) | (1 << (SparqlParser.NOT - 89)) | (1 << (SparqlParser.EXISTS - 89)) | (1 << (SparqlParser.IRIREF - 89)) | (1 << (SparqlParser.PNAME_NS - 89)) | (1 << (SparqlParser.PNAME_LN - 89)) | (1 << (SparqlParser.OPEN_BRACE - 89)))) != 0)):
                    break

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


    class HavingConditionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def constraint(self):
            return self.getTypedRuleContext(SparqlParser.ConstraintContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_havingCondition

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

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

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




    def havingCondition(self):

        localctx = SparqlParser.HavingConditionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_havingCondition)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 440
            self.constraint()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def orderCondition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.OrderConditionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.OrderConditionContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_orderClause

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

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

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




    def orderClause(self):

        localctx = SparqlParser.OrderClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_orderClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            self.match(SparqlParser.ORDER)
            self.state = 443
            self.match(SparqlParser.BY)
            self.state = 445 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 444
                self.orderCondition()
                self.state = 447 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.ASC) | (1 << SparqlParser.DESC) | (1 << SparqlParser.STR) | (1 << SparqlParser.LANG) | (1 << SparqlParser.LANGMATCHES) | (1 << SparqlParser.DATATYPE) | (1 << SparqlParser.BOUND) | (1 << SparqlParser.SAMETERM) | (1 << SparqlParser.ISIRI) | (1 << SparqlParser.ISURI) | (1 << SparqlParser.ISBLANK) | (1 << SparqlParser.ISLITERAL) | (1 << SparqlParser.REGEX) | (1 << SparqlParser.SUBSTR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (SparqlParser.IRI - 64)) | (1 << (SparqlParser.URI - 64)) | (1 << (SparqlParser.BNODE - 64)) | (1 << (SparqlParser.RAND - 64)) | (1 << (SparqlParser.ABS - 64)) | (1 << (SparqlParser.CEIL - 64)) | (1 << (SparqlParser.FLOOR - 64)) | (1 << (SparqlParser.ROUND - 64)) | (1 << (SparqlParser.CONCAT - 64)) | (1 << (SparqlParser.STRLEN - 64)) | (1 << (SparqlParser.UCASE - 64)) | (1 << (SparqlParser.LCASE - 64)) | (1 << (SparqlParser.ENCODE_FOR_URI - 64)) | (1 << (SparqlParser.CONTAINS - 64)) | (1 << (SparqlParser.STRSTARTS - 64)) | (1 << (SparqlParser.STRENDS - 64)) | (1 << (SparqlParser.STRBEFORE - 64)) | (1 << (SparqlParser.STRAFTER - 64)) | (1 << (SparqlParser.REPLACE - 64)) | (1 << (SparqlParser.YEAR - 64)) | (1 << (SparqlParser.MONTH - 64)) | (1 << (SparqlParser.DAY - 64)) | (1 << (SparqlParser.HOURS - 64)) | (1 << (SparqlParser.MINUTES - 64)) | (1 << (SparqlParser.SECONDS - 64)) | (1 << (SparqlParser.TIMEZONE - 64)) | (1 << (SparqlParser.TZ - 64)) | (1 << (SparqlParser.NOW - 64)) | (1 << (SparqlParser.UUID - 64)) | (1 << (SparqlParser.STRUUID - 64)) | (1 << (SparqlParser.MD5 - 64)) | (1 << (SparqlParser.SHA1 - 64)) | (1 << (SparqlParser.SHA256 - 64)) | (1 << (SparqlParser.SHA384 - 64)) | (1 << (SparqlParser.SHA512 - 64)) | (1 << (SparqlParser.COALESCE - 64)) | (1 << (SparqlParser.IF - 64)) | (1 << (SparqlParser.STRLANG - 64)) | (1 << (SparqlParser.STRDT - 64)) | (1 << (SparqlParser.ISNUMERIC - 64)) | (1 << (SparqlParser.COUNT - 64)) | (1 << (SparqlParser.SUM - 64)) | (1 << (SparqlParser.MIN - 64)) | (1 << (SparqlParser.MAX - 64)) | (1 << (SparqlParser.AVG - 64)) | (1 << (SparqlParser.SAMPLE - 64)) | (1 << (SparqlParser.GROUP_CONCAT - 64)) | (1 << (SparqlParser.NOT - 64)) | (1 << (SparqlParser.EXISTS - 64)) | (1 << (SparqlParser.IRIREF - 64)) | (1 << (SparqlParser.PNAME_NS - 64)) | (1 << (SparqlParser.PNAME_LN - 64)) | (1 << (SparqlParser.VAR1 - 64)) | (1 << (SparqlParser.VAR2 - 64)))) != 0) or _la==SparqlParser.OPEN_BRACE):
                    break

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


    class OrderConditionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

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

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

        def constraint(self):
            return self.getTypedRuleContext(SparqlParser.ConstraintContext,0)


        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_orderCondition

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

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

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




    def orderCondition(self):

        localctx = SparqlParser.OrderConditionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_orderCondition)
        self._la = 0 # Token type
        try:
            self.state = 456
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.ASC, SparqlParser.DESC]:
                self.enterOuterAlt(localctx, 1)
                self.state = 449
                _la = self._input.LA(1)
                if not(_la==SparqlParser.ASC or _la==SparqlParser.DESC):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 450
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 451
                self.expression(0)
                self.state = 452
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 454
                self.constraint()
                pass
            elif token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 3)
                self.state = 455
                self.var()
                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 LimitOffsetClausesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def limitClause(self):
            return self.getTypedRuleContext(SparqlParser.LimitClauseContext,0)


        def offsetClause(self):
            return self.getTypedRuleContext(SparqlParser.OffsetClauseContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_limitOffsetClauses

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

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

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




    def limitOffsetClauses(self):

        localctx = SparqlParser.LimitOffsetClausesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_limitOffsetClauses)
        self._la = 0 # Token type
        try:
            self.state = 466
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.LIMIT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 458
                self.limitClause()
                self.state = 460
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.OFFSET:
                    self.state = 459
                    self.offsetClause()


                pass
            elif token in [SparqlParser.OFFSET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 462
                self.offsetClause()
                self.state = 464
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.LIMIT:
                    self.state = 463
                    self.limitClause()


                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 LimitClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LIMIT(self):
            return self.getToken(SparqlParser.LIMIT, 0)

        def INTEGER(self):
            return self.getToken(SparqlParser.INTEGER, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_limitClause

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

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

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




    def limitClause(self):

        localctx = SparqlParser.LimitClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_limitClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self.match(SparqlParser.LIMIT)
            self.state = 469
            self.match(SparqlParser.INTEGER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OffsetClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def INTEGER(self):
            return self.getToken(SparqlParser.INTEGER, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_offsetClause

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

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

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




    def offsetClause(self):

        localctx = SparqlParser.OffsetClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_offsetClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 471
            self.match(SparqlParser.OFFSET)
            self.state = 472
            self.match(SparqlParser.INTEGER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ValuesClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def dataBlock(self):
            return self.getTypedRuleContext(SparqlParser.DataBlockContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_valuesClause

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

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

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




    def valuesClause(self):

        localctx = SparqlParser.ValuesClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_valuesClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 476
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.VALUES:
                self.state = 474
                self.match(SparqlParser.VALUES)
                self.state = 475
                self.dataBlock()


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


    class UpdateCommandContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def prologue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PrologueContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PrologueContext,i)


        def update(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.UpdateContext)
            else:
                return self.getTypedRuleContext(SparqlParser.UpdateContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_updateCommand

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

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

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




    def updateCommand(self):

        localctx = SparqlParser.UpdateCommandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_updateCommand)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 478
            self.prologue()
            self.state = 493
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.LOAD) | (1 << SparqlParser.CLEAR) | (1 << SparqlParser.DROP) | (1 << SparqlParser.ADD) | (1 << SparqlParser.MOVE) | (1 << SparqlParser.COPY) | (1 << SparqlParser.CREATE) | (1 << SparqlParser.DELETE) | (1 << SparqlParser.INSERT) | (1 << SparqlParser.WITH))) != 0):
                self.state = 479
                self.update()
                self.state = 486
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,34,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 480
                        self.match(SparqlParser.SEMICOLON)
                        self.state = 481
                        self.prologue()
                        self.state = 482
                        self.update() 
                    self.state = 488
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,34,self._ctx)

                self.state = 491
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.SEMICOLON:
                    self.state = 489
                    self.match(SparqlParser.SEMICOLON)
                    self.state = 490
                    self.prologue()




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


    class UpdateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def load(self):
            return self.getTypedRuleContext(SparqlParser.LoadContext,0)


        def clear(self):
            return self.getTypedRuleContext(SparqlParser.ClearContext,0)


        def drop(self):
            return self.getTypedRuleContext(SparqlParser.DropContext,0)


        def add(self):
            return self.getTypedRuleContext(SparqlParser.AddContext,0)


        def move(self):
            return self.getTypedRuleContext(SparqlParser.MoveContext,0)


        def copy(self):
            return self.getTypedRuleContext(SparqlParser.CopyContext,0)


        def create(self):
            return self.getTypedRuleContext(SparqlParser.CreateContext,0)


        def insertData(self):
            return self.getTypedRuleContext(SparqlParser.InsertDataContext,0)


        def deleteData(self):
            return self.getTypedRuleContext(SparqlParser.DeleteDataContext,0)


        def deleteWhere(self):
            return self.getTypedRuleContext(SparqlParser.DeleteWhereContext,0)


        def modify(self):
            return self.getTypedRuleContext(SparqlParser.ModifyContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_update

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

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

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




    def update(self):

        localctx = SparqlParser.UpdateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_update)
        try:
            self.state = 506
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,37,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 495
                self.load()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 496
                self.clear()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 497
                self.drop()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 498
                self.add()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 499
                self.move()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 500
                self.copy()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 501
                self.create()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 502
                self.insertData()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 503
                self.deleteData()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 504
                self.deleteWhere()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 505
                self.modify()
                pass


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


    class LoadContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LOAD(self):
            return self.getToken(SparqlParser.LOAD, 0)

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

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

        def graphRef(self):
            return self.getTypedRuleContext(SparqlParser.GraphRefContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_load

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

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

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




    def load(self):

        localctx = SparqlParser.LoadContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_load)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 508
            self.match(SparqlParser.LOAD)
            self.state = 510
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 509
                self.match(SparqlParser.SILENT)


            self.state = 512
            self.iri()
            self.state = 515
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.INTO:
                self.state = 513
                self.match(SparqlParser.INTO)
                self.state = 514
                self.graphRef()


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


    class ClearContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CLEAR(self):
            return self.getToken(SparqlParser.CLEAR, 0)

        def graphRefAll(self):
            return self.getTypedRuleContext(SparqlParser.GraphRefAllContext,0)


        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_clear

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

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

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




    def clear(self):

        localctx = SparqlParser.ClearContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_clear)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 517
            self.match(SparqlParser.CLEAR)
            self.state = 519
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 518
                self.match(SparqlParser.SILENT)


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


    class DropContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def graphRefAll(self):
            return self.getTypedRuleContext(SparqlParser.GraphRefAllContext,0)


        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_drop

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

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

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




    def drop(self):

        localctx = SparqlParser.DropContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_drop)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 523
            self.match(SparqlParser.DROP)
            self.state = 525
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 524
                self.match(SparqlParser.SILENT)


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


    class CreateContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def graphRef(self):
            return self.getTypedRuleContext(SparqlParser.GraphRefContext,0)


        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_create

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

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

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




    def create(self):

        localctx = SparqlParser.CreateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_create)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 529
            self.match(SparqlParser.CREATE)
            self.state = 531
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 530
                self.match(SparqlParser.SILENT)


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


    class AddContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def graphOrDefault(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GraphOrDefaultContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GraphOrDefaultContext,i)


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

        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_add

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

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

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




    def add(self):

        localctx = SparqlParser.AddContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_add)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 535
            self.match(SparqlParser.ADD)
            self.state = 537
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 536
                self.match(SparqlParser.SILENT)


            self.state = 539
            self.graphOrDefault()
            self.state = 540
            self.match(SparqlParser.TO)
            self.state = 541
            self.graphOrDefault()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MoveContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def MOVE(self):
            return self.getToken(SparqlParser.MOVE, 0)

        def graphOrDefault(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GraphOrDefaultContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GraphOrDefaultContext,i)


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

        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_move

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

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

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




    def move(self):

        localctx = SparqlParser.MoveContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_move)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 543
            self.match(SparqlParser.MOVE)
            self.state = 545
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 544
                self.match(SparqlParser.SILENT)


            self.state = 547
            self.graphOrDefault()
            self.state = 548
            self.match(SparqlParser.TO)
            self.state = 549
            self.graphOrDefault()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CopyContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COPY(self):
            return self.getToken(SparqlParser.COPY, 0)

        def graphOrDefault(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GraphOrDefaultContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GraphOrDefaultContext,i)


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

        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_copy

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

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

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




    def copy(self):

        localctx = SparqlParser.CopyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_copy)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 551
            self.match(SparqlParser.COPY)
            self.state = 553
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 552
                self.match(SparqlParser.SILENT)


            self.state = 555
            self.graphOrDefault()
            self.state = 556
            self.match(SparqlParser.TO)
            self.state = 557
            self.graphOrDefault()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InsertDataContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def DATA(self):
            return self.getToken(SparqlParser.DATA, 0)

        def quadData(self):
            return self.getTypedRuleContext(SparqlParser.QuadDataContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_insertData

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

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

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




    def insertData(self):

        localctx = SparqlParser.InsertDataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_insertData)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 559
            self.match(SparqlParser.INSERT)
            self.state = 560
            self.match(SparqlParser.DATA)
            self.state = 561
            self.quadData()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DeleteDataContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def DATA(self):
            return self.getToken(SparqlParser.DATA, 0)

        def quadData(self):
            return self.getTypedRuleContext(SparqlParser.QuadDataContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_deleteData

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

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

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




    def deleteData(self):

        localctx = SparqlParser.DeleteDataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_deleteData)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 563
            self.match(SparqlParser.DELETE)
            self.state = 564
            self.match(SparqlParser.DATA)
            self.state = 565
            self.quadData()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DeleteWhereContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def quadPattern(self):
            return self.getTypedRuleContext(SparqlParser.QuadPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_deleteWhere

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

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

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




    def deleteWhere(self):

        localctx = SparqlParser.DeleteWhereContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_deleteWhere)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 567
            self.match(SparqlParser.DELETE)
            self.state = 568
            self.match(SparqlParser.WHERE)
            self.state = 569
            self.quadPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ModifyContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def deleteClause(self):
            return self.getTypedRuleContext(SparqlParser.DeleteClauseContext,0)


        def insertClause(self):
            return self.getTypedRuleContext(SparqlParser.InsertClauseContext,0)


        def WITH(self):
            return self.getToken(SparqlParser.WITH, 0)

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def usingClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.UsingClauseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.UsingClauseContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_modify

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

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

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




    def modify(self):

        localctx = SparqlParser.ModifyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_modify)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 573
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.WITH:
                self.state = 571
                self.match(SparqlParser.WITH)
                self.state = 572
                self.iri()


            self.state = 580
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.DELETE]:
                self.state = 575
                self.deleteClause()
                self.state = 577
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.INSERT:
                    self.state = 576
                    self.insertClause()


                pass
            elif token in [SparqlParser.INSERT]:
                self.state = 579
                self.insertClause()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 585
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.USING:
                self.state = 582
                self.usingClause()
                self.state = 587
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 588
            self.match(SparqlParser.WHERE)
            self.state = 589
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DeleteClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def quadPattern(self):
            return self.getTypedRuleContext(SparqlParser.QuadPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_deleteClause

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

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

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




    def deleteClause(self):

        localctx = SparqlParser.DeleteClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_deleteClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 591
            self.match(SparqlParser.DELETE)
            self.state = 592
            self.quadPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InsertClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def quadPattern(self):
            return self.getTypedRuleContext(SparqlParser.QuadPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_insertClause

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

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

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




    def insertClause(self):

        localctx = SparqlParser.InsertClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_insertClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 594
            self.match(SparqlParser.INSERT)
            self.state = 595
            self.quadPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class UsingClauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def NAMED(self):
            return self.getToken(SparqlParser.NAMED, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_usingClause

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

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

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




    def usingClause(self):

        localctx = SparqlParser.UsingClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_usingClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 597
            self.match(SparqlParser.USING)
            self.state = 599
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.NAMED:
                self.state = 598
                self.match(SparqlParser.NAMED)


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


    class GraphOrDefaultContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEFAULT(self):
            return self.getToken(SparqlParser.DEFAULT, 0)

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def GRAPH(self):
            return self.getToken(SparqlParser.GRAPH, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_graphOrDefault

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

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

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




    def graphOrDefault(self):

        localctx = SparqlParser.GraphOrDefaultContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_graphOrDefault)
        self._la = 0 # Token type
        try:
            self.state = 608
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.DEFAULT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 603
                self.match(SparqlParser.DEFAULT)
                pass
            elif token in [SparqlParser.GRAPH, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 605
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.GRAPH:
                    self.state = 604
                    self.match(SparqlParser.GRAPH)


                self.state = 607
                self.iri()
                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 GraphRefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GRAPH(self):
            return self.getToken(SparqlParser.GRAPH, 0)

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphRef

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

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

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




    def graphRef(self):

        localctx = SparqlParser.GraphRefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_graphRef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 610
            self.match(SparqlParser.GRAPH)
            self.state = 611
            self.iri()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GraphRefAllContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def graphRef(self):
            return self.getTypedRuleContext(SparqlParser.GraphRefContext,0)


        def DEFAULT(self):
            return self.getToken(SparqlParser.DEFAULT, 0)

        def NAMED(self):
            return self.getToken(SparqlParser.NAMED, 0)

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

        def getRuleIndex(self):
            return SparqlParser.RULE_graphRefAll

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

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

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




    def graphRefAll(self):

        localctx = SparqlParser.GraphRefAllContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_graphRefAll)
        try:
            self.state = 617
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.GRAPH]:
                self.enterOuterAlt(localctx, 1)
                self.state = 613
                self.graphRef()
                pass
            elif token in [SparqlParser.DEFAULT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 614
                self.match(SparqlParser.DEFAULT)
                pass
            elif token in [SparqlParser.NAMED]:
                self.enterOuterAlt(localctx, 3)
                self.state = 615
                self.match(SparqlParser.NAMED)
                pass
            elif token in [SparqlParser.ALL]:
                self.enterOuterAlt(localctx, 4)
                self.state = 616
                self.match(SparqlParser.ALL)
                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 QuadPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def quads(self):
            return self.getTypedRuleContext(SparqlParser.QuadsContext,0)


        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_quadPattern

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

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

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




    def quadPattern(self):

        localctx = SparqlParser.QuadPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_quadPattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 619
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 620
            self.quads()
            self.state = 621
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QuadDataContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def quads(self):
            return self.getTypedRuleContext(SparqlParser.QuadsContext,0)


        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_quadData

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

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

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




    def quadData(self):

        localctx = SparqlParser.QuadDataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_quadData)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 623
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 624
            self.quads()
            self.state = 625
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QuadsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triplesTemplate(self):
            return self.getTypedRuleContext(SparqlParser.TriplesTemplateContext,0)


        def quadsDetails(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.QuadsDetailsContext)
            else:
                return self.getTypedRuleContext(SparqlParser.QuadsDetailsContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_quads

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

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

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




    def quads(self):

        localctx = SparqlParser.QuadsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_quads)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 628
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 627
                self.triplesTemplate()


            self.state = 633
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.GRAPH:
                self.state = 630
                self.quadsDetails()
                self.state = 635
                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 QuadsDetailsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def quadsNotTriples(self):
            return self.getTypedRuleContext(SparqlParser.QuadsNotTriplesContext,0)


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

        def triplesTemplate(self):
            return self.getTypedRuleContext(SparqlParser.TriplesTemplateContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_quadsDetails

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

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

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




    def quadsDetails(self):

        localctx = SparqlParser.QuadsDetailsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_quadsDetails)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 636
            self.quadsNotTriples()
            self.state = 638
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.DOT:
                self.state = 637
                self.match(SparqlParser.DOT)


            self.state = 641
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 640
                self.triplesTemplate()


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


    class QuadsNotTriplesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GRAPH(self):
            return self.getToken(SparqlParser.GRAPH, 0)

        def varOrIRI(self):
            return self.getTypedRuleContext(SparqlParser.VarOrIRIContext,0)


        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def triplesTemplate(self):
            return self.getTypedRuleContext(SparqlParser.TriplesTemplateContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_quadsNotTriples

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

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

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




    def quadsNotTriples(self):

        localctx = SparqlParser.QuadsNotTriplesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_quadsNotTriples)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 643
            self.match(SparqlParser.GRAPH)
            self.state = 644
            self.varOrIRI()
            self.state = 645
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 647
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 646
                self.triplesTemplate()


            self.state = 649
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TriplesTemplateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triplesSameSubject(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.TriplesSameSubjectContext)
            else:
                return self.getTypedRuleContext(SparqlParser.TriplesSameSubjectContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_triplesTemplate

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

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

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




    def triplesTemplate(self):

        localctx = SparqlParser.TriplesTemplateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_triplesTemplate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 651
            self.triplesSameSubject()
            self.state = 658
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.DOT:
                self.state = 652
                self.match(SparqlParser.DOT)
                self.state = 654
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                    self.state = 653
                    self.triplesSameSubject()


                self.state = 660
                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 GroupGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def subSelect(self):
            return self.getTypedRuleContext(SparqlParser.SubSelectContext,0)


        def groupGraphPatternSub(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternSubContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_groupGraphPattern

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

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

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




    def groupGraphPattern(self):

        localctx = SparqlParser.GroupGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_groupGraphPattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 661
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 664
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.SELECT]:
                self.state = 662
                self.subSelect()
                pass
            elif token in [SparqlParser.VALUES, SparqlParser.OPTIONAL, SparqlParser.GRAPH, SparqlParser.FILTER, SparqlParser.TRUE, SparqlParser.FALSE, SparqlParser.SERVICE, SparqlParser.BIND, SparqlParser.MINUS, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.BLANK_NODE_LABEL, SparqlParser.VAR1, SparqlParser.VAR2, SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE, SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2, SparqlParser.OPEN_BRACE, SparqlParser.OPEN_CURLY_BRACE, SparqlParser.CLOSE_CURLY_BRACE, SparqlParser.OPEN_SQUARE_BRACKET]:
                self.state = 663
                self.groupGraphPatternSub()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 666
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GroupGraphPatternSubContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triplesBlock(self):
            return self.getTypedRuleContext(SparqlParser.TriplesBlockContext,0)


        def groupGraphPatternSubList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GroupGraphPatternSubListContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GroupGraphPatternSubListContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_groupGraphPatternSub

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

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

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




    def groupGraphPatternSub(self):

        localctx = SparqlParser.GroupGraphPatternSubContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_groupGraphPatternSub)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 669
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 668
                self.triplesBlock()


            self.state = 674
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.VALUES) | (1 << SparqlParser.OPTIONAL) | (1 << SparqlParser.GRAPH) | (1 << SparqlParser.FILTER) | (1 << SparqlParser.SERVICE) | (1 << SparqlParser.BIND) | (1 << SparqlParser.MINUS))) != 0) or _la==SparqlParser.OPEN_CURLY_BRACE:
                self.state = 671
                self.groupGraphPatternSubList()
                self.state = 676
                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 GroupGraphPatternSubListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def graphPatternNotTriples(self):
            return self.getTypedRuleContext(SparqlParser.GraphPatternNotTriplesContext,0)


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

        def triplesBlock(self):
            return self.getTypedRuleContext(SparqlParser.TriplesBlockContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_groupGraphPatternSubList

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

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

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




    def groupGraphPatternSubList(self):

        localctx = SparqlParser.GroupGraphPatternSubListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_groupGraphPatternSubList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 677
            self.graphPatternNotTriples()
            self.state = 679
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.DOT:
                self.state = 678
                self.match(SparqlParser.DOT)


            self.state = 682
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 681
                self.triplesBlock()


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


    class TriplesBlockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triplesSameSubjectPath(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.TriplesSameSubjectPathContext)
            else:
                return self.getTypedRuleContext(SparqlParser.TriplesSameSubjectPathContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_triplesBlock

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

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

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




    def triplesBlock(self):

        localctx = SparqlParser.TriplesBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_triplesBlock)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 684
            self.triplesSameSubjectPath()
            self.state = 691
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.DOT:
                self.state = 685
                self.match(SparqlParser.DOT)
                self.state = 687
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                    self.state = 686
                    self.triplesSameSubjectPath()


                self.state = 693
                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 GraphPatternNotTriplesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def groupOrUnionGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupOrUnionGraphPatternContext,0)


        def optionalGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.OptionalGraphPatternContext,0)


        def minusGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.MinusGraphPatternContext,0)


        def graphGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GraphGraphPatternContext,0)


        def serviceGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.ServiceGraphPatternContext,0)


        def filter(self):
            return self.getTypedRuleContext(SparqlParser.FilterContext,0)


        def bind(self):
            return self.getTypedRuleContext(SparqlParser.BindContext,0)


        def inlineData(self):
            return self.getTypedRuleContext(SparqlParser.InlineDataContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphPatternNotTriples

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

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

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




    def graphPatternNotTriples(self):

        localctx = SparqlParser.GraphPatternNotTriplesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_graphPatternNotTriples)
        try:
            self.state = 702
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_CURLY_BRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 694
                self.groupOrUnionGraphPattern()
                pass
            elif token in [SparqlParser.OPTIONAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 695
                self.optionalGraphPattern()
                pass
            elif token in [SparqlParser.MINUS]:
                self.enterOuterAlt(localctx, 3)
                self.state = 696
                self.minusGraphPattern()
                pass
            elif token in [SparqlParser.GRAPH]:
                self.enterOuterAlt(localctx, 4)
                self.state = 697
                self.graphGraphPattern()
                pass
            elif token in [SparqlParser.SERVICE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 698
                self.serviceGraphPattern()
                pass
            elif token in [SparqlParser.FILTER]:
                self.enterOuterAlt(localctx, 6)
                self.state = 699
                self.filter()
                pass
            elif token in [SparqlParser.BIND]:
                self.enterOuterAlt(localctx, 7)
                self.state = 700
                self.bind()
                pass
            elif token in [SparqlParser.VALUES]:
                self.enterOuterAlt(localctx, 8)
                self.state = 701
                self.inlineData()
                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 OptionalGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPTIONAL(self):
            return self.getToken(SparqlParser.OPTIONAL, 0)

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_optionalGraphPattern

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

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

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




    def optionalGraphPattern(self):

        localctx = SparqlParser.OptionalGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_optionalGraphPattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 704
            self.match(SparqlParser.OPTIONAL)
            self.state = 705
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GraphGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GRAPH(self):
            return self.getToken(SparqlParser.GRAPH, 0)

        def varOrIRI(self):
            return self.getTypedRuleContext(SparqlParser.VarOrIRIContext,0)


        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphGraphPattern

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

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

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




    def graphGraphPattern(self):

        localctx = SparqlParser.GraphGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_graphGraphPattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 707
            self.match(SparqlParser.GRAPH)
            self.state = 708
            self.varOrIRI()
            self.state = 709
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ServiceGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def varOrIRI(self):
            return self.getTypedRuleContext(SparqlParser.VarOrIRIContext,0)


        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def SILENT(self):
            return self.getToken(SparqlParser.SILENT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_serviceGraphPattern

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

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

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




    def serviceGraphPattern(self):

        localctx = SparqlParser.ServiceGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_serviceGraphPattern)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 711
            self.match(SparqlParser.SERVICE)
            self.state = 713
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.SILENT:
                self.state = 712
                self.match(SparqlParser.SILENT)


            self.state = 715
            self.varOrIRI()
            self.state = 716
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BindContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BIND(self):
            return self.getToken(SparqlParser.BIND, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_bind

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

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

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




    def bind(self):

        localctx = SparqlParser.BindContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_bind)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 718
            self.match(SparqlParser.BIND)
            self.state = 719
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 720
            self.expression(0)
            self.state = 721
            self.match(SparqlParser.AS)
            self.state = 722
            self.var()
            self.state = 723
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InlineDataContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def dataBlock(self):
            return self.getTypedRuleContext(SparqlParser.DataBlockContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_inlineData

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

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

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




    def inlineData(self):

        localctx = SparqlParser.InlineDataContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_inlineData)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 725
            self.match(SparqlParser.VALUES)
            self.state = 726
            self.dataBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DataBlockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def inlineDataOneVar(self):
            return self.getTypedRuleContext(SparqlParser.InlineDataOneVarContext,0)


        def inlineDataFull(self):
            return self.getTypedRuleContext(SparqlParser.InlineDataFullContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_dataBlock

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

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

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




    def dataBlock(self):

        localctx = SparqlParser.DataBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_dataBlock)
        try:
            self.state = 730
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 728
                self.inlineDataOneVar()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 729
                self.inlineDataFull()
                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 InlineDataOneVarContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def dataBlockValue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DataBlockValueContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DataBlockValueContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_inlineDataOneVar

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

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

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




    def inlineDataOneVar(self):

        localctx = SparqlParser.InlineDataOneVarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_inlineDataOneVar)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 732
            self.var()
            self.state = 733
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 737
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE) | (1 << SparqlParser.UNDEF))) != 0) or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)))) != 0):
                self.state = 734
                self.dataBlockValue()
                self.state = 739
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 740
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InlineDataFullContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def var(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.VarContext)
            else:
                return self.getTypedRuleContext(SparqlParser.VarContext,i)


        def dataBlockValues(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DataBlockValuesContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DataBlockValuesContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_inlineDataFull

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

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

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




    def inlineDataFull(self):

        localctx = SparqlParser.InlineDataFullContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_inlineDataFull)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 742
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 746
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.VAR1 or _la==SparqlParser.VAR2:
                self.state = 743
                self.var()
                self.state = 748
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 749
            self.match(SparqlParser.CLOSE_BRACE)
            self.state = 750
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 754
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.OPEN_BRACE:
                self.state = 751
                self.dataBlockValues()
                self.state = 756
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 757
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DataBlockValuesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def dataBlockValue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.DataBlockValueContext)
            else:
                return self.getTypedRuleContext(SparqlParser.DataBlockValueContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_dataBlockValues

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

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

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




    def dataBlockValues(self):

        localctx = SparqlParser.DataBlockValuesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_dataBlockValues)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 759
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 763
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE) | (1 << SparqlParser.UNDEF))) != 0) or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)))) != 0):
                self.state = 760
                self.dataBlockValue()
                self.state = 765
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 766
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DataBlockValueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def rdfLiteral(self):
            return self.getTypedRuleContext(SparqlParser.RdfLiteralContext,0)


        def numericLiteral(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralContext,0)


        def booleanLiteral(self):
            return self.getTypedRuleContext(SparqlParser.BooleanLiteralContext,0)


        def UNDEF(self):
            return self.getToken(SparqlParser.UNDEF, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_dataBlockValue

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

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

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




    def dataBlockValue(self):

        localctx = SparqlParser.DataBlockValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_dataBlockValue)
        try:
            self.state = 773
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 768
                self.iri()
                pass
            elif token in [SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2]:
                self.enterOuterAlt(localctx, 2)
                self.state = 769
                self.rdfLiteral()
                pass
            elif token in [SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 770
                self.numericLiteral()
                pass
            elif token in [SparqlParser.TRUE, SparqlParser.FALSE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 771
                self.booleanLiteral()
                pass
            elif token in [SparqlParser.UNDEF]:
                self.enterOuterAlt(localctx, 5)
                self.state = 772
                self.match(SparqlParser.UNDEF)
                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 MinusGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_minusGraphPattern

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

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

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




    def minusGraphPattern(self):

        localctx = SparqlParser.MinusGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_minusGraphPattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 775
            self.match(SparqlParser.MINUS)
            self.state = 776
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GroupOrUnionGraphPatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def groupGraphPattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GroupGraphPatternContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_groupOrUnionGraphPattern

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

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

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




    def groupOrUnionGraphPattern(self):

        localctx = SparqlParser.GroupOrUnionGraphPatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_groupOrUnionGraphPattern)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 778
            self.groupGraphPattern()
            self.state = 783
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.UNION:
                self.state = 779
                self.match(SparqlParser.UNION)
                self.state = 780
                self.groupGraphPattern()
                self.state = 785
                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 FilterContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FILTER(self):
            return self.getToken(SparqlParser.FILTER, 0)

        def constraint(self):
            return self.getTypedRuleContext(SparqlParser.ConstraintContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_filter

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

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

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




    def filter(self):

        localctx = SparqlParser.FilterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_filter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 786
            self.match(SparqlParser.FILTER)
            self.state = 787
            self.constraint()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConstraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def builtInCall(self):
            return self.getTypedRuleContext(SparqlParser.BuiltInCallContext,0)


        def functionCall(self):
            return self.getTypedRuleContext(SparqlParser.FunctionCallContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_constraint

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

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

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




    def constraint(self):

        localctx = SparqlParser.ConstraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_constraint)
        try:
            self.state = 795
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 789
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 790
                self.expression(0)
                self.state = 791
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS]:
                self.enterOuterAlt(localctx, 2)
                self.state = 793
                self.builtInCall()
                pass
            elif token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 794
                self.functionCall()
                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 FunctionCallContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def argList(self):
            return self.getTypedRuleContext(SparqlParser.ArgListContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_functionCall

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

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

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




    def functionCall(self):

        localctx = SparqlParser.FunctionCallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_functionCall)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 797
            self.iri()
            self.state = 798
            self.argList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArgListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def expressionList(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionListContext,0)


        def DISTINCT(self):
            return self.getToken(SparqlParser.DISTINCT, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_argList

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

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

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




    def argList(self):

        localctx = SparqlParser.ArgListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_argList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 800
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 806
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.DISTINCT, SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.TRUE, SparqlParser.FALSE, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.VAR1, SparqlParser.VAR2, SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE, SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2, SparqlParser.OPEN_BRACE, SparqlParser.PLUS_SIGN, SparqlParser.MINUS_SIGN, SparqlParser.ASTERISK, SparqlParser.NEGATION, SparqlParser.DIVIDE]:
                self.state = 802
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 801
                    self.match(SparqlParser.DISTINCT)


                self.state = 804
                self.expressionList()
                pass
            elif token in [SparqlParser.CLOSE_BRACE]:
                pass
            else:
                raise NoViableAltException(self)

            self.state = 808
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_expressionList

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

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

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




    def expressionList(self):

        localctx = SparqlParser.ExpressionListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_expressionList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 810
            self.expression(0)
            self.state = 815
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.COMMA:
                self.state = 811
                self.match(SparqlParser.COMMA)
                self.state = 812
                self.expression(0)
                self.state = 817
                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 ConstructTemplateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_CURLY_BRACE(self):
            return self.getToken(SparqlParser.OPEN_CURLY_BRACE, 0)

        def CLOSE_CURLY_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_CURLY_BRACE, 0)

        def constructTriples(self):
            return self.getTypedRuleContext(SparqlParser.ConstructTriplesContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_constructTemplate

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

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

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




    def constructTemplate(self):

        localctx = SparqlParser.ConstructTemplateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_constructTemplate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 818
            self.match(SparqlParser.OPEN_CURLY_BRACE)
            self.state = 820
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                self.state = 819
                self.constructTriples()


            self.state = 822
            self.match(SparqlParser.CLOSE_CURLY_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConstructTriplesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triplesSameSubject(self):
            return self.getTypedRuleContext(SparqlParser.TriplesSameSubjectContext,0)


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

        def constructTriples(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ConstructTriplesContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ConstructTriplesContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_constructTriples

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

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

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




    def constructTriples(self):

        localctx = SparqlParser.ConstructTriplesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_constructTriples)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 824
            self.triplesSameSubject()
            self.state = 831
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,83,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 825
                    self.match(SparqlParser.DOT)
                    self.state = 827
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0):
                        self.state = 826
                        self.constructTriples()

             
                self.state = 833
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,83,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 TriplesSameSubjectContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def varOrTerm(self):
            return self.getTypedRuleContext(SparqlParser.VarOrTermContext,0)


        def propertyListNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListNotEmptyContext,0)


        def triplesNode(self):
            return self.getTypedRuleContext(SparqlParser.TriplesNodeContext,0)


        def propertyList(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_triplesSameSubject

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

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

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




    def triplesSameSubject(self):

        localctx = SparqlParser.TriplesSameSubjectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_triplesSameSubject)
        try:
            self.state = 840
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,84,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 834
                self.varOrTerm()
                self.state = 835
                self.propertyListNotEmpty()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 837
                self.triplesNode()
                self.state = 838
                self.propertyList()
                pass


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


    class PropertyListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def propertyListNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListNotEmptyContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_propertyList

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

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

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




    def propertyList(self):

        localctx = SparqlParser.PropertyListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_propertyList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 843
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.A or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)))) != 0):
                self.state = 842
                self.propertyListNotEmpty()


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


    class PropertyListNotEmptyContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def verb(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.VerbContext)
            else:
                return self.getTypedRuleContext(SparqlParser.VerbContext,i)


        def objectList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ObjectListContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ObjectListContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_propertyListNotEmpty

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

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

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




    def propertyListNotEmpty(self):

        localctx = SparqlParser.PropertyListNotEmptyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_propertyListNotEmpty)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 845
            self.verb()
            self.state = 846
            self.objectList()
            self.state = 855
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.SEMICOLON:
                self.state = 847
                self.match(SparqlParser.SEMICOLON)
                self.state = 851
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.A or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)))) != 0):
                    self.state = 848
                    self.verb()
                    self.state = 849
                    self.objectList()


                self.state = 857
                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 VerbContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def varOrIRI(self):
            return self.getTypedRuleContext(SparqlParser.VarOrIRIContext,0)


        def A(self):
            return self.getToken(SparqlParser.A, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_verb

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

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

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




    def verb(self):

        localctx = SparqlParser.VerbContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_verb)
        try:
            self.state = 860
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 858
                self.varOrIRI()
                pass
            elif token in [SparqlParser.A]:
                self.enterOuterAlt(localctx, 2)
                self.state = 859
                self.match(SparqlParser.A)
                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 ObjectListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def object(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ObjectContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ObjectContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_objectList

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

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

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




    def objectList(self):

        localctx = SparqlParser.ObjectListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_objectList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 862
            self.object()
            self.state = 867
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.COMMA:
                self.state = 863
                self.match(SparqlParser.COMMA)
                self.state = 864
                self.object()
                self.state = 869
                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 ObjectContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def graphNode(self):
            return self.getTypedRuleContext(SparqlParser.GraphNodeContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_object

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

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

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




    def object(self):

        localctx = SparqlParser.ObjectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_object)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 870
            self.graphNode()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TriplesSameSubjectPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def varOrTerm(self):
            return self.getTypedRuleContext(SparqlParser.VarOrTermContext,0)


        def propertyListPathNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListPathNotEmptyContext,0)


        def triplesNodePath(self):
            return self.getTypedRuleContext(SparqlParser.TriplesNodePathContext,0)


        def propertyListPath(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListPathContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_triplesSameSubjectPath

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

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

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




    def triplesSameSubjectPath(self):

        localctx = SparqlParser.TriplesSameSubjectPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_triplesSameSubjectPath)
        try:
            self.state = 878
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,90,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 872
                self.varOrTerm()
                self.state = 873
                self.propertyListPathNotEmpty()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 875
                self.triplesNodePath()
                self.state = 876
                self.propertyListPath()
                pass


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


    class PropertyListPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def propertyListPathNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListPathNotEmptyContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_propertyListPath

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

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

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




    def propertyListPath(self):

        localctx = SparqlParser.PropertyListPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_propertyListPath)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 881
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.A or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INVERSE - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.NEGATION - 115)))) != 0):
                self.state = 880
                self.propertyListPathNotEmpty()


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


    class PropertyListPathNotEmptyContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def objectListPath(self):
            return self.getTypedRuleContext(SparqlParser.ObjectListPathContext,0)


        def verbPath(self):
            return self.getTypedRuleContext(SparqlParser.VerbPathContext,0)


        def verbSimple(self):
            return self.getTypedRuleContext(SparqlParser.VerbSimpleContext,0)


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

        def propertyListPathNotEmptyList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PropertyListPathNotEmptyListContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PropertyListPathNotEmptyListContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_propertyListPathNotEmpty

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

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

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




    def propertyListPathNotEmpty(self):

        localctx = SparqlParser.PropertyListPathNotEmptyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_propertyListPathNotEmpty)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 885
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.A, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.INVERSE, SparqlParser.OPEN_BRACE, SparqlParser.NEGATION]:
                self.state = 883
                self.verbPath()
                pass
            elif token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.state = 884
                self.verbSimple()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 887
            self.objectListPath()
            self.state = 894
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.SEMICOLON:
                self.state = 888
                self.match(SparqlParser.SEMICOLON)
                self.state = 890
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.A or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INVERSE - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.NEGATION - 115)))) != 0):
                    self.state = 889
                    self.propertyListPathNotEmptyList()


                self.state = 896
                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 PropertyListPathNotEmptyListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def objectList(self):
            return self.getTypedRuleContext(SparqlParser.ObjectListContext,0)


        def verbPath(self):
            return self.getTypedRuleContext(SparqlParser.VerbPathContext,0)


        def verbSimple(self):
            return self.getTypedRuleContext(SparqlParser.VerbSimpleContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_propertyListPathNotEmptyList

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

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

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




    def propertyListPathNotEmptyList(self):

        localctx = SparqlParser.PropertyListPathNotEmptyListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_propertyListPathNotEmptyList)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 899
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.A, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.INVERSE, SparqlParser.OPEN_BRACE, SparqlParser.NEGATION]:
                self.state = 897
                self.verbPath()
                pass
            elif token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.state = 898
                self.verbSimple()
                pass
            else:
                raise NoViableAltException(self)

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


    class VerbPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def path(self):
            return self.getTypedRuleContext(SparqlParser.PathContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_verbPath

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

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

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




    def verbPath(self):

        localctx = SparqlParser.VerbPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_verbPath)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 903
            self.path()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VerbSimpleContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_verbSimple

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

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

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




    def verbSimple(self):

        localctx = SparqlParser.VerbSimpleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_verbSimple)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 905
            self.var()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ObjectListPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def objectPath(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ObjectPathContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ObjectPathContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_objectListPath

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

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

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




    def objectListPath(self):

        localctx = SparqlParser.ObjectListPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_objectListPath)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 907
            self.objectPath()
            self.state = 912
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.COMMA:
                self.state = 908
                self.match(SparqlParser.COMMA)
                self.state = 909
                self.objectPath()
                self.state = 914
                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 ObjectPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def graphNodePath(self):
            return self.getTypedRuleContext(SparqlParser.GraphNodePathContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_objectPath

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

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

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




    def objectPath(self):

        localctx = SparqlParser.ObjectPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_objectPath)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 915
            self.graphNodePath()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathAlternative(self):
            return self.getTypedRuleContext(SparqlParser.PathAlternativeContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_path

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

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

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




    def path(self):

        localctx = SparqlParser.PathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_path)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 917
            self.pathAlternative()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PathAlternativeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathSequence(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PathSequenceContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PathSequenceContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_pathAlternative

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

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

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




    def pathAlternative(self):

        localctx = SparqlParser.PathAlternativeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_pathAlternative)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 919
            self.pathSequence()
            self.state = 924
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.PIPE:
                self.state = 920
                self.match(SparqlParser.PIPE)
                self.state = 921
                self.pathSequence()
                self.state = 926
                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 PathSequenceContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathEltOrInverse(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PathEltOrInverseContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PathEltOrInverseContext,i)


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

        def getRuleIndex(self):
            return SparqlParser.RULE_pathSequence

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

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

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




    def pathSequence(self):

        localctx = SparqlParser.PathSequenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 180, self.RULE_pathSequence)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 927
            self.pathEltOrInverse()
            self.state = 932
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SparqlParser.DIVIDE:
                self.state = 928
                self.match(SparqlParser.DIVIDE)
                self.state = 929
                self.pathEltOrInverse()
                self.state = 934
                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 PathEltContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathPrimary(self):
            return self.getTypedRuleContext(SparqlParser.PathPrimaryContext,0)


        def pathMod(self):
            return self.getTypedRuleContext(SparqlParser.PathModContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_pathElt

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

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

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




    def pathElt(self):

        localctx = SparqlParser.PathEltContext(self, self._ctx, self.state)
        self.enterRule(localctx, 182, self.RULE_pathElt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 935
            self.pathPrimary()
            self.state = 937
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 151)) & ~0x3f) == 0 and ((1 << (_la - 151)) & ((1 << (SparqlParser.PLUS_SIGN - 151)) | (1 << (SparqlParser.ASTERISK - 151)) | (1 << (SparqlParser.QUESTION_MARK - 151)))) != 0):
                self.state = 936
                self.pathMod()


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


    class PathEltOrInverseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathElt(self):
            return self.getTypedRuleContext(SparqlParser.PathEltContext,0)


        def INVERSE(self):
            return self.getToken(SparqlParser.INVERSE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_pathEltOrInverse

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

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

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




    def pathEltOrInverse(self):

        localctx = SparqlParser.PathEltOrInverseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 184, self.RULE_pathEltOrInverse)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 940
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.INVERSE:
                self.state = 939
                self.match(SparqlParser.INVERSE)


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


    class PathModContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def QUESTION_MARK(self):
            return self.getToken(SparqlParser.QUESTION_MARK, 0)

        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)

        def PLUS_SIGN(self):
            return self.getToken(SparqlParser.PLUS_SIGN, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_pathMod

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

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

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




    def pathMod(self):

        localctx = SparqlParser.PathModContext(self, self._ctx, self.state)
        self.enterRule(localctx, 186, self.RULE_pathMod)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 944
            localctx.op = self._input.LT(1)
            _la = self._input.LA(1)
            if not(((((_la - 151)) & ~0x3f) == 0 and ((1 << (_la - 151)) & ((1 << (SparqlParser.PLUS_SIGN - 151)) | (1 << (SparqlParser.ASTERISK - 151)) | (1 << (SparqlParser.QUESTION_MARK - 151)))) != 0)):
                localctx.op = 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 PathPrimaryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def A(self):
            return self.getToken(SparqlParser.A, 0)

        def NEGATION(self):
            return self.getToken(SparqlParser.NEGATION, 0)

        def pathNegatedPropertySet(self):
            return self.getTypedRuleContext(SparqlParser.PathNegatedPropertySetContext,0)


        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def path(self):
            return self.getTypedRuleContext(SparqlParser.PathContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_pathPrimary

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

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

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




    def pathPrimary(self):

        localctx = SparqlParser.PathPrimaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 188, self.RULE_pathPrimary)
        try:
            self.state = 954
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 946
                self.iri()
                pass
            elif token in [SparqlParser.A]:
                self.enterOuterAlt(localctx, 2)
                self.state = 947
                self.match(SparqlParser.A)
                pass
            elif token in [SparqlParser.NEGATION]:
                self.enterOuterAlt(localctx, 3)
                self.state = 948
                self.match(SparqlParser.NEGATION)
                self.state = 949
                self.pathNegatedPropertySet()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 950
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 951
                self.path()
                self.state = 952
                self.match(SparqlParser.CLOSE_BRACE)
                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 PathNegatedPropertySetContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pathOneInPropertySet(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.PathOneInPropertySetContext)
            else:
                return self.getTypedRuleContext(SparqlParser.PathOneInPropertySetContext,i)


        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

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

        def getRuleIndex(self):
            return SparqlParser.RULE_pathNegatedPropertySet

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

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

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




    def pathNegatedPropertySet(self):

        localctx = SparqlParser.PathNegatedPropertySetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 190, self.RULE_pathNegatedPropertySet)
        self._la = 0 # Token type
        try:
            self.state = 969
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.A, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.INVERSE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 956
                self.pathOneInPropertySet()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 957
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 966
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.A or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.INVERSE - 115)))) != 0):
                    self.state = 958
                    self.pathOneInPropertySet()
                    self.state = 963
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==SparqlParser.PIPE:
                        self.state = 959
                        self.match(SparqlParser.PIPE)
                        self.state = 960
                        self.pathOneInPropertySet()
                        self.state = 965
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 968
                self.match(SparqlParser.CLOSE_BRACE)
                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 PathOneInPropertySetContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def A(self):
            return self.getToken(SparqlParser.A, 0)

        def INVERSE(self):
            return self.getToken(SparqlParser.INVERSE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_pathOneInPropertySet

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

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

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




    def pathOneInPropertySet(self):

        localctx = SparqlParser.PathOneInPropertySetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 192, self.RULE_pathOneInPropertySet)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 972
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.INVERSE:
                self.state = 971
                self.match(SparqlParser.INVERSE)


            self.state = 976
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.state = 974
                self.iri()
                pass
            elif token in [SparqlParser.A]:
                self.state = 975
                self.match(SparqlParser.A)
                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 IntegerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INTEGER(self):
            return self.getToken(SparqlParser.INTEGER, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_integer

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

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

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




    def integer(self):

        localctx = SparqlParser.IntegerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 194, self.RULE_integer)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 978
            self.match(SparqlParser.INTEGER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TriplesNodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def collection(self):
            return self.getTypedRuleContext(SparqlParser.CollectionContext,0)


        def blankNodePropertyList(self):
            return self.getTypedRuleContext(SparqlParser.BlankNodePropertyListContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_triplesNode

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

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

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




    def triplesNode(self):

        localctx = SparqlParser.TriplesNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 196, self.RULE_triplesNode)
        try:
            self.state = 982
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 980
                self.collection()
                pass
            elif token in [SparqlParser.OPEN_SQUARE_BRACKET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 981
                self.blankNodePropertyList()
                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 BlankNodePropertyListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.OPEN_SQUARE_BRACKET, 0)

        def propertyListNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListNotEmptyContext,0)


        def CLOSE_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.CLOSE_SQUARE_BRACKET, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_blankNodePropertyList

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

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

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




    def blankNodePropertyList(self):

        localctx = SparqlParser.BlankNodePropertyListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 198, self.RULE_blankNodePropertyList)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 984
            self.match(SparqlParser.OPEN_SQUARE_BRACKET)
            self.state = 985
            self.propertyListNotEmpty()
            self.state = 986
            self.match(SparqlParser.CLOSE_SQUARE_BRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TriplesNodePathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def collectionPath(self):
            return self.getTypedRuleContext(SparqlParser.CollectionPathContext,0)


        def blankNodePropertyListPath(self):
            return self.getTypedRuleContext(SparqlParser.BlankNodePropertyListPathContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_triplesNodePath

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

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

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




    def triplesNodePath(self):

        localctx = SparqlParser.TriplesNodePathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 200, self.RULE_triplesNodePath)
        try:
            self.state = 990
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 988
                self.collectionPath()
                pass
            elif token in [SparqlParser.OPEN_SQUARE_BRACKET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 989
                self.blankNodePropertyListPath()
                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 BlankNodePropertyListPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.OPEN_SQUARE_BRACKET, 0)

        def propertyListPathNotEmpty(self):
            return self.getTypedRuleContext(SparqlParser.PropertyListPathNotEmptyContext,0)


        def CLOSE_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.CLOSE_SQUARE_BRACKET, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_blankNodePropertyListPath

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

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

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




    def blankNodePropertyListPath(self):

        localctx = SparqlParser.BlankNodePropertyListPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 202, self.RULE_blankNodePropertyListPath)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 992
            self.match(SparqlParser.OPEN_SQUARE_BRACKET)
            self.state = 993
            self.propertyListPathNotEmpty()
            self.state = 994
            self.match(SparqlParser.CLOSE_SQUARE_BRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CollectionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def graphNode(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GraphNodeContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GraphNodeContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_collection

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

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

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




    def collection(self):

        localctx = SparqlParser.CollectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 204, self.RULE_collection)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 996
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 998 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 997
                self.graphNode()
                self.state = 1000 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0)):
                    break

            self.state = 1002
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CollectionPathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def graphNodePath(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.GraphNodePathContext)
            else:
                return self.getTypedRuleContext(SparqlParser.GraphNodePathContext,i)


        def getRuleIndex(self):
            return SparqlParser.RULE_collectionPath

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

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

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




    def collectionPath(self):

        localctx = SparqlParser.CollectionPathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 206, self.RULE_collectionPath)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1004
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 1006 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1005
                self.graphNodePath()
                self.state = 1008 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==SparqlParser.TRUE or _la==SparqlParser.FALSE or ((((_la - 115)) & ~0x3f) == 0 and ((1 << (_la - 115)) & ((1 << (SparqlParser.IRIREF - 115)) | (1 << (SparqlParser.PNAME_NS - 115)) | (1 << (SparqlParser.PNAME_LN - 115)) | (1 << (SparqlParser.BLANK_NODE_LABEL - 115)) | (1 << (SparqlParser.VAR1 - 115)) | (1 << (SparqlParser.VAR2 - 115)) | (1 << (SparqlParser.INTEGER - 115)) | (1 << (SparqlParser.DECIMAL - 115)) | (1 << (SparqlParser.DOUBLE - 115)) | (1 << (SparqlParser.INTEGER_POSITIVE - 115)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 115)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 115)) | (1 << (SparqlParser.INTEGER_NEGATIVE - 115)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 115)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 115)) | (1 << (SparqlParser.STRING_LITERAL1 - 115)) | (1 << (SparqlParser.STRING_LITERAL2 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 115)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 115)) | (1 << (SparqlParser.OPEN_BRACE - 115)) | (1 << (SparqlParser.OPEN_SQUARE_BRACKET - 115)))) != 0)):
                    break

            self.state = 1010
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GraphNodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def varOrTerm(self):
            return self.getTypedRuleContext(SparqlParser.VarOrTermContext,0)


        def triplesNode(self):
            return self.getTypedRuleContext(SparqlParser.TriplesNodeContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphNode

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

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

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




    def graphNode(self):

        localctx = SparqlParser.GraphNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 208, self.RULE_graphNode)
        try:
            self.state = 1014
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,111,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1012
                self.varOrTerm()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1013
                self.triplesNode()
                pass


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


    class GraphNodePathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def varOrTerm(self):
            return self.getTypedRuleContext(SparqlParser.VarOrTermContext,0)


        def triplesNodePath(self):
            return self.getTypedRuleContext(SparqlParser.TriplesNodePathContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphNodePath

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

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

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




    def graphNodePath(self):

        localctx = SparqlParser.GraphNodePathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 210, self.RULE_graphNodePath)
        try:
            self.state = 1018
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,112,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1016
                self.varOrTerm()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1017
                self.triplesNodePath()
                pass


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


    class VarOrTermContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def graphTerm(self):
            return self.getTypedRuleContext(SparqlParser.GraphTermContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_varOrTerm

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

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

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




    def varOrTerm(self):

        localctx = SparqlParser.VarOrTermContext(self, self._ctx, self.state)
        self.enterRule(localctx, 212, self.RULE_varOrTerm)
        try:
            self.state = 1022
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1020
                self.var()
                pass
            elif token in [SparqlParser.TRUE, SparqlParser.FALSE, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.BLANK_NODE_LABEL, SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE, SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2, SparqlParser.OPEN_BRACE, SparqlParser.OPEN_SQUARE_BRACKET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1021
                self.graphTerm()
                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 VarOrIRIContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_varOrIRI

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

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

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




    def varOrIRI(self):

        localctx = SparqlParser.VarOrIRIContext(self, self._ctx, self.state)
        self.enterRule(localctx, 214, self.RULE_varOrIRI)
        try:
            self.state = 1026
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1024
                self.var()
                pass
            elif token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1025
                self.iri()
                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 VarContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR1(self):
            return self.getToken(SparqlParser.VAR1, 0)

        def VAR2(self):
            return self.getToken(SparqlParser.VAR2, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_var

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

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

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




    def var(self):

        localctx = SparqlParser.VarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 216, self.RULE_var)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1028
            _la = self._input.LA(1)
            if not(_la==SparqlParser.VAR1 or _la==SparqlParser.VAR2):
                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 GraphTermContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def rdfLiteral(self):
            return self.getTypedRuleContext(SparqlParser.RdfLiteralContext,0)


        def numericLiteral(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralContext,0)


        def booleanLiteral(self):
            return self.getTypedRuleContext(SparqlParser.BooleanLiteralContext,0)


        def blankNode(self):
            return self.getTypedRuleContext(SparqlParser.BlankNodeContext,0)


        def nil(self):
            return self.getTypedRuleContext(SparqlParser.NilContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_graphTerm

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

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

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




    def graphTerm(self):

        localctx = SparqlParser.GraphTermContext(self, self._ctx, self.state)
        self.enterRule(localctx, 218, self.RULE_graphTerm)
        try:
            self.state = 1036
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1030
                self.iri()
                pass
            elif token in [SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1031
                self.rdfLiteral()
                pass
            elif token in [SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1032
                self.numericLiteral()
                pass
            elif token in [SparqlParser.TRUE, SparqlParser.FALSE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1033
                self.booleanLiteral()
                pass
            elif token in [SparqlParser.BLANK_NODE_LABEL, SparqlParser.OPEN_SQUARE_BRACKET]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1034
                self.blankNode()
                pass
            elif token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 6)
                self.state = 1035
                self.nil()
                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 NilContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_nil

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

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

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




    def nil(self):

        localctx = SparqlParser.NilContext(self, self._ctx, self.state)
        self.enterRule(localctx, 220, self.RULE_nil)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1038
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 1039
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return SparqlParser.RULE_expression

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class UnarySignedLiteralExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)

        def unaryLiteralExpression(self):
            return self.getTypedRuleContext(SparqlParser.UnaryLiteralExpressionContext,0)


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

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

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


    class ConditionalOrExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)

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

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

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

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


    class AdditiveExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)

        def PLUS_SIGN(self):
            return self.getToken(SparqlParser.PLUS_SIGN, 0)
        def MINUS_SIGN(self):
            return self.getToken(SparqlParser.MINUS_SIGN, 0)

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

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

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


    class UnaryAdditiveExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)

        def PLUS_SIGN(self):
            return self.getToken(SparqlParser.PLUS_SIGN, 0)
        def MINUS_SIGN(self):
            return self.getToken(SparqlParser.MINUS_SIGN, 0)

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

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

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


    class RelationalExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)

        def EQUAL(self):
            return self.getToken(SparqlParser.EQUAL, 0)
        def NOT_EQUAL(self):
            return self.getToken(SparqlParser.NOT_EQUAL, 0)
        def LESS(self):
            return self.getToken(SparqlParser.LESS, 0)
        def GREATER(self):
            return self.getToken(SparqlParser.GREATER, 0)
        def LESS_EQUAL(self):
            return self.getToken(SparqlParser.LESS_EQUAL, 0)
        def GREATER_EQUAL(self):
            return self.getToken(SparqlParser.GREATER_EQUAL, 0)

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

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

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


    class RelationalSetExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)

        def IN(self):
            return self.getToken(SparqlParser.IN, 0)
        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)
        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)
        def NOT(self):
            return self.getToken(SparqlParser.NOT, 0)
        def expressionList(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionListContext,0)


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

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

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


    class UnaryMultiplicativeExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)

        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)
        def DIVIDE(self):
            return self.getToken(SparqlParser.DIVIDE, 0)

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

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

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


    class BaseExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def primaryExpression(self):
            return self.getTypedRuleContext(SparqlParser.PrimaryExpressionContext,0)


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

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

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


    class MultiplicativeExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)

        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)
        def DIVIDE(self):
            return self.getToken(SparqlParser.DIVIDE, 0)

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

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

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


    class ConditionalAndExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)

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

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

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

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


    class UnaryNegationExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a SparqlParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NEGATION(self):
            return self.getToken(SparqlParser.NEGATION, 0)
        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


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

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

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



    def expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = SparqlParser.ExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 222
        self.enterRecursionRule(localctx, 222, self.RULE_expression, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1049
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.TRUE, SparqlParser.FALSE, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS, SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN, SparqlParser.VAR1, SparqlParser.VAR2, SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE, SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2, SparqlParser.OPEN_BRACE]:
                localctx = SparqlParser.BaseExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 1042
                self.primaryExpression()
                pass
            elif token in [SparqlParser.ASTERISK, SparqlParser.DIVIDE]:
                localctx = SparqlParser.UnaryMultiplicativeExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1043
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==SparqlParser.ASTERISK or _la==SparqlParser.DIVIDE):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1044
                self.expression(10)
                pass
            elif token in [SparqlParser.PLUS_SIGN, SparqlParser.MINUS_SIGN]:
                localctx = SparqlParser.UnaryAdditiveExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1045
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==SparqlParser.PLUS_SIGN or _la==SparqlParser.MINUS_SIGN):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1046
                self.expression(9)
                pass
            elif token in [SparqlParser.NEGATION]:
                localctx = SparqlParser.UnaryNegationExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1047
                self.match(SparqlParser.NEGATION)
                self.state = 1048
                self.expression(8)
                pass
            else:
                raise NoViableAltException(self)

            self._ctx.stop = self._input.LT(-1)
            self.state = 1080
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,120,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 = 1078
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,119,self._ctx)
                    if la_ == 1:
                        localctx = SparqlParser.MultiplicativeExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1051
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 1052
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(_la==SparqlParser.ASTERISK or _la==SparqlParser.DIVIDE):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 1053
                        self.expression(8)
                        pass

                    elif la_ == 2:
                        localctx = SparqlParser.AdditiveExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1054
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 1055
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(_la==SparqlParser.PLUS_SIGN or _la==SparqlParser.MINUS_SIGN):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 1056
                        self.expression(7)
                        pass

                    elif la_ == 3:
                        localctx = SparqlParser.RelationalExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1057
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 1058
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 137)) & ~0x3f) == 0 and ((1 << (_la - 137)) & ((1 << (SparqlParser.LESS_EQUAL - 137)) | (1 << (SparqlParser.GREATER_EQUAL - 137)) | (1 << (SparqlParser.NOT_EQUAL - 137)) | (1 << (SparqlParser.EQUAL - 137)) | (1 << (SparqlParser.LESS - 137)) | (1 << (SparqlParser.GREATER - 137)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 1059
                        self.expression(4)
                        pass

                    elif la_ == 4:
                        localctx = SparqlParser.UnarySignedLiteralExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1060
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 1061
                        self.unaryLiteralExpression()
                        pass

                    elif la_ == 5:
                        localctx = SparqlParser.RelationalSetExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1062
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 1064
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==SparqlParser.NOT:
                            self.state = 1063
                            self.match(SparqlParser.NOT)


                        self.state = 1066
                        self.match(SparqlParser.IN)
                        self.state = 1067
                        self.match(SparqlParser.OPEN_BRACE)
                        self.state = 1069
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.STR) | (1 << SparqlParser.LANG) | (1 << SparqlParser.LANGMATCHES) | (1 << SparqlParser.DATATYPE) | (1 << SparqlParser.BOUND) | (1 << SparqlParser.SAMETERM) | (1 << SparqlParser.ISIRI) | (1 << SparqlParser.ISURI) | (1 << SparqlParser.ISBLANK) | (1 << SparqlParser.ISLITERAL) | (1 << SparqlParser.REGEX) | (1 << SparqlParser.SUBSTR) | (1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (SparqlParser.IRI - 64)) | (1 << (SparqlParser.URI - 64)) | (1 << (SparqlParser.BNODE - 64)) | (1 << (SparqlParser.RAND - 64)) | (1 << (SparqlParser.ABS - 64)) | (1 << (SparqlParser.CEIL - 64)) | (1 << (SparqlParser.FLOOR - 64)) | (1 << (SparqlParser.ROUND - 64)) | (1 << (SparqlParser.CONCAT - 64)) | (1 << (SparqlParser.STRLEN - 64)) | (1 << (SparqlParser.UCASE - 64)) | (1 << (SparqlParser.LCASE - 64)) | (1 << (SparqlParser.ENCODE_FOR_URI - 64)) | (1 << (SparqlParser.CONTAINS - 64)) | (1 << (SparqlParser.STRSTARTS - 64)) | (1 << (SparqlParser.STRENDS - 64)) | (1 << (SparqlParser.STRBEFORE - 64)) | (1 << (SparqlParser.STRAFTER - 64)) | (1 << (SparqlParser.REPLACE - 64)) | (1 << (SparqlParser.YEAR - 64)) | (1 << (SparqlParser.MONTH - 64)) | (1 << (SparqlParser.DAY - 64)) | (1 << (SparqlParser.HOURS - 64)) | (1 << (SparqlParser.MINUTES - 64)) | (1 << (SparqlParser.SECONDS - 64)) | (1 << (SparqlParser.TIMEZONE - 64)) | (1 << (SparqlParser.TZ - 64)) | (1 << (SparqlParser.NOW - 64)) | (1 << (SparqlParser.UUID - 64)) | (1 << (SparqlParser.STRUUID - 64)) | (1 << (SparqlParser.MD5 - 64)) | (1 << (SparqlParser.SHA1 - 64)) | (1 << (SparqlParser.SHA256 - 64)) | (1 << (SparqlParser.SHA384 - 64)) | (1 << (SparqlParser.SHA512 - 64)) | (1 << (SparqlParser.COALESCE - 64)) | (1 << (SparqlParser.IF - 64)) | (1 << (SparqlParser.STRLANG - 64)) | (1 << (SparqlParser.STRDT - 64)) | (1 << (SparqlParser.ISNUMERIC - 64)) | (1 << (SparqlParser.COUNT - 64)) | (1 << (SparqlParser.SUM - 64)) | (1 << (SparqlParser.MIN - 64)) | (1 << (SparqlParser.MAX - 64)) | (1 << (SparqlParser.AVG - 64)) | (1 << (SparqlParser.SAMPLE - 64)) | (1 << (SparqlParser.GROUP_CONCAT - 64)) | (1 << (SparqlParser.NOT - 64)) | (1 << (SparqlParser.EXISTS - 64)) | (1 << (SparqlParser.IRIREF - 64)) | (1 << (SparqlParser.PNAME_NS - 64)) | (1 << (SparqlParser.PNAME_LN - 64)) | (1 << (SparqlParser.VAR1 - 64)) | (1 << (SparqlParser.VAR2 - 64)) | (1 << (SparqlParser.INTEGER - 64)) | (1 << (SparqlParser.DECIMAL - 64)) | (1 << (SparqlParser.DOUBLE - 64)) | (1 << (SparqlParser.INTEGER_POSITIVE - 64)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 64)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 64)))) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & ((1 << (SparqlParser.INTEGER_NEGATIVE - 128)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 128)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 128)) | (1 << (SparqlParser.STRING_LITERAL1 - 128)) | (1 << (SparqlParser.STRING_LITERAL2 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 128)) | (1 << (SparqlParser.OPEN_BRACE - 128)) | (1 << (SparqlParser.PLUS_SIGN - 128)) | (1 << (SparqlParser.MINUS_SIGN - 128)) | (1 << (SparqlParser.ASTERISK - 128)) | (1 << (SparqlParser.NEGATION - 128)) | (1 << (SparqlParser.DIVIDE - 128)))) != 0):
                            self.state = 1068
                            self.expressionList()


                        self.state = 1071
                        self.match(SparqlParser.CLOSE_BRACE)
                        pass

                    elif la_ == 6:
                        localctx = SparqlParser.ConditionalAndExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1072
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")

                        self.state = 1073
                        self.match(SparqlParser.AND)
                        self.state = 1074
                        self.expression(0)
                        pass

                    elif la_ == 7:
                        localctx = SparqlParser.ConditionalOrExpressionContext(self, SparqlParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 1075
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")

                        self.state = 1076
                        self.match(SparqlParser.OR)
                        self.state = 1077
                        self.expression(0)
                        pass

             
                self.state = 1082
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,120,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 UnaryLiteralExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def numericLiteralPositive(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralPositiveContext,0)


        def numericLiteralNegative(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralNegativeContext,0)


        def unaryExpression(self):
            return self.getTypedRuleContext(SparqlParser.UnaryExpressionContext,0)


        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)

        def DIVIDE(self):
            return self.getToken(SparqlParser.DIVIDE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_unaryLiteralExpression

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

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

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




    def unaryLiteralExpression(self):

        localctx = SparqlParser.UnaryLiteralExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 224, self.RULE_unaryLiteralExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1085
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE]:
                self.state = 1083
                self.numericLiteralPositive()
                pass
            elif token in [SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE]:
                self.state = 1084
                self.numericLiteralNegative()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 1089
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,122,self._ctx)
            if la_ == 1:
                self.state = 1087
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==SparqlParser.ASTERISK or _la==SparqlParser.DIVIDE):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1088
                self.unaryExpression()


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


    class UnaryExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def primaryExpression(self):
            return self.getTypedRuleContext(SparqlParser.PrimaryExpressionContext,0)


        def NEGATION(self):
            return self.getToken(SparqlParser.NEGATION, 0)

        def PLUS_SIGN(self):
            return self.getToken(SparqlParser.PLUS_SIGN, 0)

        def MINUS_SIGN(self):
            return self.getToken(SparqlParser.MINUS_SIGN, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_unaryExpression

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

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

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




    def unaryExpression(self):

        localctx = SparqlParser.UnaryExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 226, self.RULE_unaryExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1092
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 151)) & ~0x3f) == 0 and ((1 << (_la - 151)) & ((1 << (SparqlParser.PLUS_SIGN - 151)) | (1 << (SparqlParser.MINUS_SIGN - 151)) | (1 << (SparqlParser.NEGATION - 151)))) != 0):
                self.state = 1091
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(((((_la - 151)) & ~0x3f) == 0 and ((1 << (_la - 151)) & ((1 << (SparqlParser.PLUS_SIGN - 151)) | (1 << (SparqlParser.MINUS_SIGN - 151)) | (1 << (SparqlParser.NEGATION - 151)))) != 0)):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


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


    class PrimaryExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def builtInCall(self):
            return self.getTypedRuleContext(SparqlParser.BuiltInCallContext,0)


        def iriRefOrFunction(self):
            return self.getTypedRuleContext(SparqlParser.IriRefOrFunctionContext,0)


        def rdfLiteral(self):
            return self.getTypedRuleContext(SparqlParser.RdfLiteralContext,0)


        def numericLiteral(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralContext,0)


        def booleanLiteral(self):
            return self.getTypedRuleContext(SparqlParser.BooleanLiteralContext,0)


        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_primaryExpression

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

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

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




    def primaryExpression(self):

        localctx = SparqlParser.PrimaryExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 228, self.RULE_primaryExpression)
        try:
            self.state = 1106
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.OPEN_BRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1096
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1097
                self.expression(0)
                self.state = 1098
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STR, SparqlParser.LANG, SparqlParser.LANGMATCHES, SparqlParser.DATATYPE, SparqlParser.BOUND, SparqlParser.SAMETERM, SparqlParser.ISIRI, SparqlParser.ISURI, SparqlParser.ISBLANK, SparqlParser.ISLITERAL, SparqlParser.REGEX, SparqlParser.SUBSTR, SparqlParser.IRI, SparqlParser.URI, SparqlParser.BNODE, SparqlParser.RAND, SparqlParser.ABS, SparqlParser.CEIL, SparqlParser.FLOOR, SparqlParser.ROUND, SparqlParser.CONCAT, SparqlParser.STRLEN, SparqlParser.UCASE, SparqlParser.LCASE, SparqlParser.ENCODE_FOR_URI, SparqlParser.CONTAINS, SparqlParser.STRSTARTS, SparqlParser.STRENDS, SparqlParser.STRBEFORE, SparqlParser.STRAFTER, SparqlParser.REPLACE, SparqlParser.YEAR, SparqlParser.MONTH, SparqlParser.DAY, SparqlParser.HOURS, SparqlParser.MINUTES, SparqlParser.SECONDS, SparqlParser.TIMEZONE, SparqlParser.TZ, SparqlParser.NOW, SparqlParser.UUID, SparqlParser.STRUUID, SparqlParser.MD5, SparqlParser.SHA1, SparqlParser.SHA256, SparqlParser.SHA384, SparqlParser.SHA512, SparqlParser.COALESCE, SparqlParser.IF, SparqlParser.STRLANG, SparqlParser.STRDT, SparqlParser.ISNUMERIC, SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT, SparqlParser.NOT, SparqlParser.EXISTS]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1100
                self.builtInCall()
                pass
            elif token in [SparqlParser.IRIREF, SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1101
                self.iriRefOrFunction()
                pass
            elif token in [SparqlParser.STRING_LITERAL1, SparqlParser.STRING_LITERAL2, SparqlParser.STRING_LITERAL_LONG1, SparqlParser.STRING_LITERAL_LONG2]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1102
                self.rdfLiteral()
                pass
            elif token in [SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE, SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE, SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1103
                self.numericLiteral()
                pass
            elif token in [SparqlParser.TRUE, SparqlParser.FALSE]:
                self.enterOuterAlt(localctx, 6)
                self.state = 1104
                self.booleanLiteral()
                pass
            elif token in [SparqlParser.VAR1, SparqlParser.VAR2]:
                self.enterOuterAlt(localctx, 7)
                self.state = 1105
                self.var()
                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 BuiltInCallContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def aggregate(self):
            return self.getTypedRuleContext(SparqlParser.AggregateContext,0)


        def STR(self):
            return self.getToken(SparqlParser.STR, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)


        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def LANG(self):
            return self.getToken(SparqlParser.LANG, 0)

        def LANGMATCHES(self):
            return self.getToken(SparqlParser.LANGMATCHES, 0)

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

        def DATATYPE(self):
            return self.getToken(SparqlParser.DATATYPE, 0)

        def BOUND(self):
            return self.getToken(SparqlParser.BOUND, 0)

        def var(self):
            return self.getTypedRuleContext(SparqlParser.VarContext,0)


        def IRI(self):
            return self.getToken(SparqlParser.IRI, 0)

        def URI(self):
            return self.getToken(SparqlParser.URI, 0)

        def BNODE(self):
            return self.getToken(SparqlParser.BNODE, 0)

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

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

        def CEIL(self):
            return self.getToken(SparqlParser.CEIL, 0)

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

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

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

        def expressionList(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionListContext,0)


        def subStringExpression(self):
            return self.getTypedRuleContext(SparqlParser.SubStringExpressionContext,0)


        def STRLEN(self):
            return self.getToken(SparqlParser.STRLEN, 0)

        def strReplaceExpression(self):
            return self.getTypedRuleContext(SparqlParser.StrReplaceExpressionContext,0)


        def UCASE(self):
            return self.getToken(SparqlParser.UCASE, 0)

        def LCASE(self):
            return self.getToken(SparqlParser.LCASE, 0)

        def ENCODE_FOR_URI(self):
            return self.getToken(SparqlParser.ENCODE_FOR_URI, 0)

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

        def STRSTARTS(self):
            return self.getToken(SparqlParser.STRSTARTS, 0)

        def STRENDS(self):
            return self.getToken(SparqlParser.STRENDS, 0)

        def STRBEFORE(self):
            return self.getToken(SparqlParser.STRBEFORE, 0)

        def STRAFTER(self):
            return self.getToken(SparqlParser.STRAFTER, 0)

        def YEAR(self):
            return self.getToken(SparqlParser.YEAR, 0)

        def MONTH(self):
            return self.getToken(SparqlParser.MONTH, 0)

        def DAY(self):
            return self.getToken(SparqlParser.DAY, 0)

        def HOURS(self):
            return self.getToken(SparqlParser.HOURS, 0)

        def MINUTES(self):
            return self.getToken(SparqlParser.MINUTES, 0)

        def SECONDS(self):
            return self.getToken(SparqlParser.SECONDS, 0)

        def TIMEZONE(self):
            return self.getToken(SparqlParser.TIMEZONE, 0)

        def TZ(self):
            return self.getToken(SparqlParser.TZ, 0)

        def NOW(self):
            return self.getToken(SparqlParser.NOW, 0)

        def UUID(self):
            return self.getToken(SparqlParser.UUID, 0)

        def STRUUID(self):
            return self.getToken(SparqlParser.STRUUID, 0)

        def MD5(self):
            return self.getToken(SparqlParser.MD5, 0)

        def SHA1(self):
            return self.getToken(SparqlParser.SHA1, 0)

        def SHA256(self):
            return self.getToken(SparqlParser.SHA256, 0)

        def SHA384(self):
            return self.getToken(SparqlParser.SHA384, 0)

        def SHA512(self):
            return self.getToken(SparqlParser.SHA512, 0)

        def COALESCE(self):
            return self.getToken(SparqlParser.COALESCE, 0)

        def IF(self):
            return self.getToken(SparqlParser.IF, 0)

        def STRLANG(self):
            return self.getToken(SparqlParser.STRLANG, 0)

        def STRDT(self):
            return self.getToken(SparqlParser.STRDT, 0)

        def SAMETERM(self):
            return self.getToken(SparqlParser.SAMETERM, 0)

        def ISIRI(self):
            return self.getToken(SparqlParser.ISIRI, 0)

        def ISURI(self):
            return self.getToken(SparqlParser.ISURI, 0)

        def ISBLANK(self):
            return self.getToken(SparqlParser.ISBLANK, 0)

        def ISLITERAL(self):
            return self.getToken(SparqlParser.ISLITERAL, 0)

        def ISNUMERIC(self):
            return self.getToken(SparqlParser.ISNUMERIC, 0)

        def regexExpression(self):
            return self.getTypedRuleContext(SparqlParser.RegexExpressionContext,0)


        def existsFunction(self):
            return self.getTypedRuleContext(SparqlParser.ExistsFunctionContext,0)


        def notExistsFunction(self):
            return self.getTypedRuleContext(SparqlParser.NotExistsFunctionContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_builtInCall

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

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

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




    def builtInCall(self):

        localctx = SparqlParser.BuiltInCallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 230, self.RULE_builtInCall)
        self._la = 0 # Token type
        try:
            self.state = 1376
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.COUNT, SparqlParser.SUM, SparqlParser.MIN, SparqlParser.MAX, SparqlParser.AVG, SparqlParser.SAMPLE, SparqlParser.GROUP_CONCAT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1108
                self.aggregate()
                pass
            elif token in [SparqlParser.STR]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1109
                self.match(SparqlParser.STR)
                self.state = 1110
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1111
                self.expression(0)
                self.state = 1112
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.LANG]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1114
                self.match(SparqlParser.LANG)
                self.state = 1115
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1116
                self.expression(0)
                self.state = 1117
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.LANGMATCHES]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1119
                self.match(SparqlParser.LANGMATCHES)
                self.state = 1120
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1121
                self.expression(0)
                self.state = 1122
                self.match(SparqlParser.COMMA)
                self.state = 1123
                self.expression(0)
                self.state = 1124
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.DATATYPE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1126
                self.match(SparqlParser.DATATYPE)
                self.state = 1127
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1128
                self.expression(0)
                self.state = 1129
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.BOUND]:
                self.enterOuterAlt(localctx, 6)
                self.state = 1131
                self.match(SparqlParser.BOUND)
                self.state = 1132
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1133
                self.var()
                self.state = 1134
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.IRI]:
                self.enterOuterAlt(localctx, 7)
                self.state = 1136
                self.match(SparqlParser.IRI)
                self.state = 1137
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1138
                self.expression(0)
                self.state = 1139
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.URI]:
                self.enterOuterAlt(localctx, 8)
                self.state = 1141
                self.match(SparqlParser.URI)
                self.state = 1142
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1143
                self.expression(0)
                self.state = 1144
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.BNODE]:
                self.enterOuterAlt(localctx, 9)
                self.state = 1146
                self.match(SparqlParser.BNODE)
                self.state = 1147
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1149
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.STR) | (1 << SparqlParser.LANG) | (1 << SparqlParser.LANGMATCHES) | (1 << SparqlParser.DATATYPE) | (1 << SparqlParser.BOUND) | (1 << SparqlParser.SAMETERM) | (1 << SparqlParser.ISIRI) | (1 << SparqlParser.ISURI) | (1 << SparqlParser.ISBLANK) | (1 << SparqlParser.ISLITERAL) | (1 << SparqlParser.REGEX) | (1 << SparqlParser.SUBSTR) | (1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (SparqlParser.IRI - 64)) | (1 << (SparqlParser.URI - 64)) | (1 << (SparqlParser.BNODE - 64)) | (1 << (SparqlParser.RAND - 64)) | (1 << (SparqlParser.ABS - 64)) | (1 << (SparqlParser.CEIL - 64)) | (1 << (SparqlParser.FLOOR - 64)) | (1 << (SparqlParser.ROUND - 64)) | (1 << (SparqlParser.CONCAT - 64)) | (1 << (SparqlParser.STRLEN - 64)) | (1 << (SparqlParser.UCASE - 64)) | (1 << (SparqlParser.LCASE - 64)) | (1 << (SparqlParser.ENCODE_FOR_URI - 64)) | (1 << (SparqlParser.CONTAINS - 64)) | (1 << (SparqlParser.STRSTARTS - 64)) | (1 << (SparqlParser.STRENDS - 64)) | (1 << (SparqlParser.STRBEFORE - 64)) | (1 << (SparqlParser.STRAFTER - 64)) | (1 << (SparqlParser.REPLACE - 64)) | (1 << (SparqlParser.YEAR - 64)) | (1 << (SparqlParser.MONTH - 64)) | (1 << (SparqlParser.DAY - 64)) | (1 << (SparqlParser.HOURS - 64)) | (1 << (SparqlParser.MINUTES - 64)) | (1 << (SparqlParser.SECONDS - 64)) | (1 << (SparqlParser.TIMEZONE - 64)) | (1 << (SparqlParser.TZ - 64)) | (1 << (SparqlParser.NOW - 64)) | (1 << (SparqlParser.UUID - 64)) | (1 << (SparqlParser.STRUUID - 64)) | (1 << (SparqlParser.MD5 - 64)) | (1 << (SparqlParser.SHA1 - 64)) | (1 << (SparqlParser.SHA256 - 64)) | (1 << (SparqlParser.SHA384 - 64)) | (1 << (SparqlParser.SHA512 - 64)) | (1 << (SparqlParser.COALESCE - 64)) | (1 << (SparqlParser.IF - 64)) | (1 << (SparqlParser.STRLANG - 64)) | (1 << (SparqlParser.STRDT - 64)) | (1 << (SparqlParser.ISNUMERIC - 64)) | (1 << (SparqlParser.COUNT - 64)) | (1 << (SparqlParser.SUM - 64)) | (1 << (SparqlParser.MIN - 64)) | (1 << (SparqlParser.MAX - 64)) | (1 << (SparqlParser.AVG - 64)) | (1 << (SparqlParser.SAMPLE - 64)) | (1 << (SparqlParser.GROUP_CONCAT - 64)) | (1 << (SparqlParser.NOT - 64)) | (1 << (SparqlParser.EXISTS - 64)) | (1 << (SparqlParser.IRIREF - 64)) | (1 << (SparqlParser.PNAME_NS - 64)) | (1 << (SparqlParser.PNAME_LN - 64)) | (1 << (SparqlParser.VAR1 - 64)) | (1 << (SparqlParser.VAR2 - 64)) | (1 << (SparqlParser.INTEGER - 64)) | (1 << (SparqlParser.DECIMAL - 64)) | (1 << (SparqlParser.DOUBLE - 64)) | (1 << (SparqlParser.INTEGER_POSITIVE - 64)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 64)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 64)))) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & ((1 << (SparqlParser.INTEGER_NEGATIVE - 128)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 128)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 128)) | (1 << (SparqlParser.STRING_LITERAL1 - 128)) | (1 << (SparqlParser.STRING_LITERAL2 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 128)) | (1 << (SparqlParser.OPEN_BRACE - 128)) | (1 << (SparqlParser.PLUS_SIGN - 128)) | (1 << (SparqlParser.MINUS_SIGN - 128)) | (1 << (SparqlParser.ASTERISK - 128)) | (1 << (SparqlParser.NEGATION - 128)) | (1 << (SparqlParser.DIVIDE - 128)))) != 0):
                    self.state = 1148
                    self.expression(0)


                self.state = 1151
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.RAND]:
                self.enterOuterAlt(localctx, 10)
                self.state = 1152
                self.match(SparqlParser.RAND)
                self.state = 1153
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1154
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ABS]:
                self.enterOuterAlt(localctx, 11)
                self.state = 1155
                self.match(SparqlParser.ABS)
                self.state = 1156
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1157
                self.expression(0)
                self.state = 1158
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.CEIL]:
                self.enterOuterAlt(localctx, 12)
                self.state = 1160
                self.match(SparqlParser.CEIL)
                self.state = 1161
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1162
                self.expression(0)
                self.state = 1163
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.FLOOR]:
                self.enterOuterAlt(localctx, 13)
                self.state = 1165
                self.match(SparqlParser.FLOOR)
                self.state = 1166
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1167
                self.expression(0)
                self.state = 1168
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ROUND]:
                self.enterOuterAlt(localctx, 14)
                self.state = 1170
                self.match(SparqlParser.ROUND)
                self.state = 1171
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1172
                self.expression(0)
                self.state = 1173
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.CONCAT]:
                self.enterOuterAlt(localctx, 15)
                self.state = 1175
                self.match(SparqlParser.CONCAT)
                self.state = 1176
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1178
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.STR) | (1 << SparqlParser.LANG) | (1 << SparqlParser.LANGMATCHES) | (1 << SparqlParser.DATATYPE) | (1 << SparqlParser.BOUND) | (1 << SparqlParser.SAMETERM) | (1 << SparqlParser.ISIRI) | (1 << SparqlParser.ISURI) | (1 << SparqlParser.ISBLANK) | (1 << SparqlParser.ISLITERAL) | (1 << SparqlParser.REGEX) | (1 << SparqlParser.SUBSTR) | (1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (SparqlParser.IRI - 64)) | (1 << (SparqlParser.URI - 64)) | (1 << (SparqlParser.BNODE - 64)) | (1 << (SparqlParser.RAND - 64)) | (1 << (SparqlParser.ABS - 64)) | (1 << (SparqlParser.CEIL - 64)) | (1 << (SparqlParser.FLOOR - 64)) | (1 << (SparqlParser.ROUND - 64)) | (1 << (SparqlParser.CONCAT - 64)) | (1 << (SparqlParser.STRLEN - 64)) | (1 << (SparqlParser.UCASE - 64)) | (1 << (SparqlParser.LCASE - 64)) | (1 << (SparqlParser.ENCODE_FOR_URI - 64)) | (1 << (SparqlParser.CONTAINS - 64)) | (1 << (SparqlParser.STRSTARTS - 64)) | (1 << (SparqlParser.STRENDS - 64)) | (1 << (SparqlParser.STRBEFORE - 64)) | (1 << (SparqlParser.STRAFTER - 64)) | (1 << (SparqlParser.REPLACE - 64)) | (1 << (SparqlParser.YEAR - 64)) | (1 << (SparqlParser.MONTH - 64)) | (1 << (SparqlParser.DAY - 64)) | (1 << (SparqlParser.HOURS - 64)) | (1 << (SparqlParser.MINUTES - 64)) | (1 << (SparqlParser.SECONDS - 64)) | (1 << (SparqlParser.TIMEZONE - 64)) | (1 << (SparqlParser.TZ - 64)) | (1 << (SparqlParser.NOW - 64)) | (1 << (SparqlParser.UUID - 64)) | (1 << (SparqlParser.STRUUID - 64)) | (1 << (SparqlParser.MD5 - 64)) | (1 << (SparqlParser.SHA1 - 64)) | (1 << (SparqlParser.SHA256 - 64)) | (1 << (SparqlParser.SHA384 - 64)) | (1 << (SparqlParser.SHA512 - 64)) | (1 << (SparqlParser.COALESCE - 64)) | (1 << (SparqlParser.IF - 64)) | (1 << (SparqlParser.STRLANG - 64)) | (1 << (SparqlParser.STRDT - 64)) | (1 << (SparqlParser.ISNUMERIC - 64)) | (1 << (SparqlParser.COUNT - 64)) | (1 << (SparqlParser.SUM - 64)) | (1 << (SparqlParser.MIN - 64)) | (1 << (SparqlParser.MAX - 64)) | (1 << (SparqlParser.AVG - 64)) | (1 << (SparqlParser.SAMPLE - 64)) | (1 << (SparqlParser.GROUP_CONCAT - 64)) | (1 << (SparqlParser.NOT - 64)) | (1 << (SparqlParser.EXISTS - 64)) | (1 << (SparqlParser.IRIREF - 64)) | (1 << (SparqlParser.PNAME_NS - 64)) | (1 << (SparqlParser.PNAME_LN - 64)) | (1 << (SparqlParser.VAR1 - 64)) | (1 << (SparqlParser.VAR2 - 64)) | (1 << (SparqlParser.INTEGER - 64)) | (1 << (SparqlParser.DECIMAL - 64)) | (1 << (SparqlParser.DOUBLE - 64)) | (1 << (SparqlParser.INTEGER_POSITIVE - 64)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 64)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 64)))) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & ((1 << (SparqlParser.INTEGER_NEGATIVE - 128)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 128)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 128)) | (1 << (SparqlParser.STRING_LITERAL1 - 128)) | (1 << (SparqlParser.STRING_LITERAL2 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 128)) | (1 << (SparqlParser.OPEN_BRACE - 128)) | (1 << (SparqlParser.PLUS_SIGN - 128)) | (1 << (SparqlParser.MINUS_SIGN - 128)) | (1 << (SparqlParser.ASTERISK - 128)) | (1 << (SparqlParser.NEGATION - 128)) | (1 << (SparqlParser.DIVIDE - 128)))) != 0):
                    self.state = 1177
                    self.expressionList()


                self.state = 1180
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SUBSTR]:
                self.enterOuterAlt(localctx, 16)
                self.state = 1181
                self.subStringExpression()
                pass
            elif token in [SparqlParser.STRLEN]:
                self.enterOuterAlt(localctx, 17)
                self.state = 1182
                self.match(SparqlParser.STRLEN)
                self.state = 1183
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1184
                self.expression(0)
                self.state = 1185
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.REPLACE]:
                self.enterOuterAlt(localctx, 18)
                self.state = 1187
                self.strReplaceExpression()
                pass
            elif token in [SparqlParser.UCASE]:
                self.enterOuterAlt(localctx, 19)
                self.state = 1188
                self.match(SparqlParser.UCASE)
                self.state = 1189
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1190
                self.expression(0)
                self.state = 1191
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.LCASE]:
                self.enterOuterAlt(localctx, 20)
                self.state = 1193
                self.match(SparqlParser.LCASE)
                self.state = 1194
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1195
                self.expression(0)
                self.state = 1196
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ENCODE_FOR_URI]:
                self.enterOuterAlt(localctx, 21)
                self.state = 1198
                self.match(SparqlParser.ENCODE_FOR_URI)
                self.state = 1199
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1200
                self.expression(0)
                self.state = 1201
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.CONTAINS]:
                self.enterOuterAlt(localctx, 22)
                self.state = 1203
                self.match(SparqlParser.CONTAINS)
                self.state = 1204
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1205
                self.expression(0)
                self.state = 1206
                self.match(SparqlParser.COMMA)
                self.state = 1207
                self.expression(0)
                self.state = 1208
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRSTARTS]:
                self.enterOuterAlt(localctx, 23)
                self.state = 1210
                self.match(SparqlParser.STRSTARTS)
                self.state = 1211
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1212
                self.expression(0)
                self.state = 1213
                self.match(SparqlParser.COMMA)
                self.state = 1214
                self.expression(0)
                self.state = 1215
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRENDS]:
                self.enterOuterAlt(localctx, 24)
                self.state = 1217
                self.match(SparqlParser.STRENDS)
                self.state = 1218
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1219
                self.expression(0)
                self.state = 1220
                self.match(SparqlParser.COMMA)
                self.state = 1221
                self.expression(0)
                self.state = 1222
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRBEFORE]:
                self.enterOuterAlt(localctx, 25)
                self.state = 1224
                self.match(SparqlParser.STRBEFORE)
                self.state = 1225
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1226
                self.expression(0)
                self.state = 1227
                self.match(SparqlParser.COMMA)
                self.state = 1228
                self.expression(0)
                self.state = 1229
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRAFTER]:
                self.enterOuterAlt(localctx, 26)
                self.state = 1231
                self.match(SparqlParser.STRAFTER)
                self.state = 1232
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1233
                self.expression(0)
                self.state = 1234
                self.match(SparqlParser.COMMA)
                self.state = 1235
                self.expression(0)
                self.state = 1236
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.YEAR]:
                self.enterOuterAlt(localctx, 27)
                self.state = 1238
                self.match(SparqlParser.YEAR)
                self.state = 1239
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1240
                self.expression(0)
                self.state = 1241
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.MONTH]:
                self.enterOuterAlt(localctx, 28)
                self.state = 1243
                self.match(SparqlParser.MONTH)
                self.state = 1244
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1245
                self.expression(0)
                self.state = 1246
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.DAY]:
                self.enterOuterAlt(localctx, 29)
                self.state = 1248
                self.match(SparqlParser.DAY)
                self.state = 1249
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1250
                self.expression(0)
                self.state = 1251
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.HOURS]:
                self.enterOuterAlt(localctx, 30)
                self.state = 1253
                self.match(SparqlParser.HOURS)
                self.state = 1254
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1255
                self.expression(0)
                self.state = 1256
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.MINUTES]:
                self.enterOuterAlt(localctx, 31)
                self.state = 1258
                self.match(SparqlParser.MINUTES)
                self.state = 1259
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1260
                self.expression(0)
                self.state = 1261
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SECONDS]:
                self.enterOuterAlt(localctx, 32)
                self.state = 1263
                self.match(SparqlParser.SECONDS)
                self.state = 1264
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1265
                self.expression(0)
                self.state = 1266
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.TIMEZONE]:
                self.enterOuterAlt(localctx, 33)
                self.state = 1268
                self.match(SparqlParser.TIMEZONE)
                self.state = 1269
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1270
                self.expression(0)
                self.state = 1271
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.TZ]:
                self.enterOuterAlt(localctx, 34)
                self.state = 1273
                self.match(SparqlParser.TZ)
                self.state = 1274
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1275
                self.expression(0)
                self.state = 1276
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.NOW]:
                self.enterOuterAlt(localctx, 35)
                self.state = 1278
                self.match(SparqlParser.NOW)
                self.state = 1279
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1280
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.UUID]:
                self.enterOuterAlt(localctx, 36)
                self.state = 1281
                self.match(SparqlParser.UUID)
                self.state = 1282
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1283
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRUUID]:
                self.enterOuterAlt(localctx, 37)
                self.state = 1284
                self.match(SparqlParser.STRUUID)
                self.state = 1285
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1286
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.MD5]:
                self.enterOuterAlt(localctx, 38)
                self.state = 1287
                self.match(SparqlParser.MD5)
                self.state = 1288
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1289
                self.expression(0)
                self.state = 1290
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SHA1]:
                self.enterOuterAlt(localctx, 39)
                self.state = 1292
                self.match(SparqlParser.SHA1)
                self.state = 1293
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1294
                self.expression(0)
                self.state = 1295
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SHA256]:
                self.enterOuterAlt(localctx, 40)
                self.state = 1297
                self.match(SparqlParser.SHA256)
                self.state = 1298
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1299
                self.expression(0)
                self.state = 1300
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SHA384]:
                self.enterOuterAlt(localctx, 41)
                self.state = 1302
                self.match(SparqlParser.SHA384)
                self.state = 1303
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1304
                self.expression(0)
                self.state = 1305
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SHA512]:
                self.enterOuterAlt(localctx, 42)
                self.state = 1307
                self.match(SparqlParser.SHA512)
                self.state = 1308
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1309
                self.expression(0)
                self.state = 1310
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.COALESCE]:
                self.enterOuterAlt(localctx, 43)
                self.state = 1312
                self.match(SparqlParser.COALESCE)
                self.state = 1313
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1315
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SparqlParser.STR) | (1 << SparqlParser.LANG) | (1 << SparqlParser.LANGMATCHES) | (1 << SparqlParser.DATATYPE) | (1 << SparqlParser.BOUND) | (1 << SparqlParser.SAMETERM) | (1 << SparqlParser.ISIRI) | (1 << SparqlParser.ISURI) | (1 << SparqlParser.ISBLANK) | (1 << SparqlParser.ISLITERAL) | (1 << SparqlParser.REGEX) | (1 << SparqlParser.SUBSTR) | (1 << SparqlParser.TRUE) | (1 << SparqlParser.FALSE))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (SparqlParser.IRI - 64)) | (1 << (SparqlParser.URI - 64)) | (1 << (SparqlParser.BNODE - 64)) | (1 << (SparqlParser.RAND - 64)) | (1 << (SparqlParser.ABS - 64)) | (1 << (SparqlParser.CEIL - 64)) | (1 << (SparqlParser.FLOOR - 64)) | (1 << (SparqlParser.ROUND - 64)) | (1 << (SparqlParser.CONCAT - 64)) | (1 << (SparqlParser.STRLEN - 64)) | (1 << (SparqlParser.UCASE - 64)) | (1 << (SparqlParser.LCASE - 64)) | (1 << (SparqlParser.ENCODE_FOR_URI - 64)) | (1 << (SparqlParser.CONTAINS - 64)) | (1 << (SparqlParser.STRSTARTS - 64)) | (1 << (SparqlParser.STRENDS - 64)) | (1 << (SparqlParser.STRBEFORE - 64)) | (1 << (SparqlParser.STRAFTER - 64)) | (1 << (SparqlParser.REPLACE - 64)) | (1 << (SparqlParser.YEAR - 64)) | (1 << (SparqlParser.MONTH - 64)) | (1 << (SparqlParser.DAY - 64)) | (1 << (SparqlParser.HOURS - 64)) | (1 << (SparqlParser.MINUTES - 64)) | (1 << (SparqlParser.SECONDS - 64)) | (1 << (SparqlParser.TIMEZONE - 64)) | (1 << (SparqlParser.TZ - 64)) | (1 << (SparqlParser.NOW - 64)) | (1 << (SparqlParser.UUID - 64)) | (1 << (SparqlParser.STRUUID - 64)) | (1 << (SparqlParser.MD5 - 64)) | (1 << (SparqlParser.SHA1 - 64)) | (1 << (SparqlParser.SHA256 - 64)) | (1 << (SparqlParser.SHA384 - 64)) | (1 << (SparqlParser.SHA512 - 64)) | (1 << (SparqlParser.COALESCE - 64)) | (1 << (SparqlParser.IF - 64)) | (1 << (SparqlParser.STRLANG - 64)) | (1 << (SparqlParser.STRDT - 64)) | (1 << (SparqlParser.ISNUMERIC - 64)) | (1 << (SparqlParser.COUNT - 64)) | (1 << (SparqlParser.SUM - 64)) | (1 << (SparqlParser.MIN - 64)) | (1 << (SparqlParser.MAX - 64)) | (1 << (SparqlParser.AVG - 64)) | (1 << (SparqlParser.SAMPLE - 64)) | (1 << (SparqlParser.GROUP_CONCAT - 64)) | (1 << (SparqlParser.NOT - 64)) | (1 << (SparqlParser.EXISTS - 64)) | (1 << (SparqlParser.IRIREF - 64)) | (1 << (SparqlParser.PNAME_NS - 64)) | (1 << (SparqlParser.PNAME_LN - 64)) | (1 << (SparqlParser.VAR1 - 64)) | (1 << (SparqlParser.VAR2 - 64)) | (1 << (SparqlParser.INTEGER - 64)) | (1 << (SparqlParser.DECIMAL - 64)) | (1 << (SparqlParser.DOUBLE - 64)) | (1 << (SparqlParser.INTEGER_POSITIVE - 64)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 64)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 64)))) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & ((1 << (SparqlParser.INTEGER_NEGATIVE - 128)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 128)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 128)) | (1 << (SparqlParser.STRING_LITERAL1 - 128)) | (1 << (SparqlParser.STRING_LITERAL2 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 128)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 128)) | (1 << (SparqlParser.OPEN_BRACE - 128)) | (1 << (SparqlParser.PLUS_SIGN - 128)) | (1 << (SparqlParser.MINUS_SIGN - 128)) | (1 << (SparqlParser.ASTERISK - 128)) | (1 << (SparqlParser.NEGATION - 128)) | (1 << (SparqlParser.DIVIDE - 128)))) != 0):
                    self.state = 1314
                    self.expressionList()


                self.state = 1317
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.IF]:
                self.enterOuterAlt(localctx, 44)
                self.state = 1318
                self.match(SparqlParser.IF)
                self.state = 1319
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1320
                self.expression(0)
                self.state = 1321
                self.match(SparqlParser.COMMA)
                self.state = 1322
                self.expression(0)
                self.state = 1323
                self.match(SparqlParser.COMMA)
                self.state = 1324
                self.expression(0)
                self.state = 1325
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRLANG]:
                self.enterOuterAlt(localctx, 45)
                self.state = 1327
                self.match(SparqlParser.STRLANG)
                self.state = 1328
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1329
                self.expression(0)
                self.state = 1330
                self.match(SparqlParser.COMMA)
                self.state = 1331
                self.expression(0)
                self.state = 1332
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.STRDT]:
                self.enterOuterAlt(localctx, 46)
                self.state = 1334
                self.match(SparqlParser.STRDT)
                self.state = 1335
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1336
                self.expression(0)
                self.state = 1337
                self.match(SparqlParser.COMMA)
                self.state = 1338
                self.expression(0)
                self.state = 1339
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SAMETERM]:
                self.enterOuterAlt(localctx, 47)
                self.state = 1341
                self.match(SparqlParser.SAMETERM)
                self.state = 1342
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1343
                self.expression(0)
                self.state = 1344
                self.match(SparqlParser.COMMA)
                self.state = 1345
                self.expression(0)
                self.state = 1346
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ISIRI]:
                self.enterOuterAlt(localctx, 48)
                self.state = 1348
                self.match(SparqlParser.ISIRI)
                self.state = 1349
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1350
                self.expression(0)
                self.state = 1351
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ISURI]:
                self.enterOuterAlt(localctx, 49)
                self.state = 1353
                self.match(SparqlParser.ISURI)
                self.state = 1354
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1355
                self.expression(0)
                self.state = 1356
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ISBLANK]:
                self.enterOuterAlt(localctx, 50)
                self.state = 1358
                self.match(SparqlParser.ISBLANK)
                self.state = 1359
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1360
                self.expression(0)
                self.state = 1361
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ISLITERAL]:
                self.enterOuterAlt(localctx, 51)
                self.state = 1363
                self.match(SparqlParser.ISLITERAL)
                self.state = 1364
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1365
                self.expression(0)
                self.state = 1366
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.ISNUMERIC]:
                self.enterOuterAlt(localctx, 52)
                self.state = 1368
                self.match(SparqlParser.ISNUMERIC)
                self.state = 1369
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1370
                self.expression(0)
                self.state = 1371
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.REGEX]:
                self.enterOuterAlt(localctx, 53)
                self.state = 1373
                self.regexExpression()
                pass
            elif token in [SparqlParser.EXISTS]:
                self.enterOuterAlt(localctx, 54)
                self.state = 1374
                self.existsFunction()
                pass
            elif token in [SparqlParser.NOT]:
                self.enterOuterAlt(localctx, 55)
                self.state = 1375
                self.notExistsFunction()
                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 RegexExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def REGEX(self):
            return self.getToken(SparqlParser.REGEX, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)


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

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_regexExpression

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

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

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




    def regexExpression(self):

        localctx = SparqlParser.RegexExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 232, self.RULE_regexExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1378
            self.match(SparqlParser.REGEX)
            self.state = 1379
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 1380
            self.expression(0)
            self.state = 1381
            self.match(SparqlParser.COMMA)
            self.state = 1382
            self.expression(0)
            self.state = 1385
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.COMMA:
                self.state = 1383
                self.match(SparqlParser.COMMA)
                self.state = 1384
                self.expression(0)


            self.state = 1387
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SubStringExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SUBSTR(self):
            return self.getToken(SparqlParser.SUBSTR, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)


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

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_subStringExpression

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

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

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




    def subStringExpression(self):

        localctx = SparqlParser.SubStringExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 234, self.RULE_subStringExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1389
            self.match(SparqlParser.SUBSTR)
            self.state = 1390
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 1391
            self.expression(0)
            self.state = 1392
            self.match(SparqlParser.COMMA)
            self.state = 1393
            self.expression(0)
            self.state = 1396
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.COMMA:
                self.state = 1394
                self.match(SparqlParser.COMMA)
                self.state = 1395
                self.expression(0)


            self.state = 1398
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StrReplaceExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def REPLACE(self):
            return self.getToken(SparqlParser.REPLACE, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SparqlParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(SparqlParser.ExpressionContext,i)


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

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_strReplaceExpression

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

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

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




    def strReplaceExpression(self):

        localctx = SparqlParser.StrReplaceExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 236, self.RULE_strReplaceExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1400
            self.match(SparqlParser.REPLACE)
            self.state = 1401
            self.match(SparqlParser.OPEN_BRACE)
            self.state = 1402
            self.expression(0)
            self.state = 1403
            self.match(SparqlParser.COMMA)
            self.state = 1404
            self.expression(0)
            self.state = 1405
            self.match(SparqlParser.COMMA)
            self.state = 1406
            self.expression(0)
            self.state = 1409
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SparqlParser.COMMA:
                self.state = 1407
                self.match(SparqlParser.COMMA)
                self.state = 1408
                self.expression(0)


            self.state = 1411
            self.match(SparqlParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExistsFunctionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_existsFunction

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

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

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




    def existsFunction(self):

        localctx = SparqlParser.ExistsFunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 238, self.RULE_existsFunction)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1413
            self.match(SparqlParser.EXISTS)
            self.state = 1414
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NotExistsFunctionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def groupGraphPattern(self):
            return self.getTypedRuleContext(SparqlParser.GroupGraphPatternContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_notExistsFunction

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

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

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




    def notExistsFunction(self):

        localctx = SparqlParser.NotExistsFunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 240, self.RULE_notExistsFunction)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1416
            self.match(SparqlParser.NOT)
            self.state = 1417
            self.match(SparqlParser.EXISTS)
            self.state = 1418
            self.groupGraphPattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AggregateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def COUNT(self):
            return self.getToken(SparqlParser.COUNT, 0)

        def OPEN_BRACE(self):
            return self.getToken(SparqlParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(SparqlParser.CLOSE_BRACE, 0)

        def ASTERISK(self):
            return self.getToken(SparqlParser.ASTERISK, 0)

        def expression(self):
            return self.getTypedRuleContext(SparqlParser.ExpressionContext,0)


        def DISTINCT(self):
            return self.getToken(SparqlParser.DISTINCT, 0)

        def SUM(self):
            return self.getToken(SparqlParser.SUM, 0)

        def MIN(self):
            return self.getToken(SparqlParser.MIN, 0)

        def MAX(self):
            return self.getToken(SparqlParser.MAX, 0)

        def AVG(self):
            return self.getToken(SparqlParser.AVG, 0)

        def SAMPLE(self):
            return self.getToken(SparqlParser.SAMPLE, 0)

        def GROUP_CONCAT(self):
            return self.getToken(SparqlParser.GROUP_CONCAT, 0)

        def SEMICOLON(self):
            return self.getToken(SparqlParser.SEMICOLON, 0)

        def SEPARATOR(self):
            return self.getToken(SparqlParser.SEPARATOR, 0)

        def EQUAL(self):
            return self.getToken(SparqlParser.EQUAL, 0)

        def string(self):
            return self.getTypedRuleContext(SparqlParser.StringContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_aggregate

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

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

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




    def aggregate(self):

        localctx = SparqlParser.AggregateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 242, self.RULE_aggregate)
        self._la = 0 # Token type
        try:
            self.state = 1484
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.COUNT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1420
                self.match(SparqlParser.COUNT)
                self.state = 1421
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1423
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1422
                    self.match(SparqlParser.DISTINCT)


                self.state = 1427
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,133,self._ctx)
                if la_ == 1:
                    self.state = 1425
                    self.match(SparqlParser.ASTERISK)
                    pass

                elif la_ == 2:
                    self.state = 1426
                    self.expression(0)
                    pass


                self.state = 1429
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SUM]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1430
                self.match(SparqlParser.SUM)
                self.state = 1431
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1433
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1432
                    self.match(SparqlParser.DISTINCT)


                self.state = 1435
                self.expression(0)
                self.state = 1436
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.MIN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1438
                self.match(SparqlParser.MIN)
                self.state = 1439
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1441
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1440
                    self.match(SparqlParser.DISTINCT)


                self.state = 1443
                self.expression(0)
                self.state = 1444
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.MAX]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1446
                self.match(SparqlParser.MAX)
                self.state = 1447
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1449
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1448
                    self.match(SparqlParser.DISTINCT)


                self.state = 1451
                self.expression(0)
                self.state = 1452
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.AVG]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1454
                self.match(SparqlParser.AVG)
                self.state = 1455
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1457
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1456
                    self.match(SparqlParser.DISTINCT)


                self.state = 1459
                self.expression(0)
                self.state = 1460
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.SAMPLE]:
                self.enterOuterAlt(localctx, 6)
                self.state = 1462
                self.match(SparqlParser.SAMPLE)
                self.state = 1463
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1465
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1464
                    self.match(SparqlParser.DISTINCT)


                self.state = 1467
                self.expression(0)
                self.state = 1468
                self.match(SparqlParser.CLOSE_BRACE)
                pass
            elif token in [SparqlParser.GROUP_CONCAT]:
                self.enterOuterAlt(localctx, 7)
                self.state = 1470
                self.match(SparqlParser.GROUP_CONCAT)
                self.state = 1471
                self.match(SparqlParser.OPEN_BRACE)
                self.state = 1473
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.DISTINCT:
                    self.state = 1472
                    self.match(SparqlParser.DISTINCT)


                self.state = 1475
                self.expression(0)
                self.state = 1480
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SparqlParser.SEMICOLON:
                    self.state = 1476
                    self.match(SparqlParser.SEMICOLON)
                    self.state = 1477
                    self.match(SparqlParser.SEPARATOR)
                    self.state = 1478
                    self.match(SparqlParser.EQUAL)
                    self.state = 1479
                    self.string()


                self.state = 1482
                self.match(SparqlParser.CLOSE_BRACE)
                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 IriRefOrFunctionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def argList(self):
            return self.getTypedRuleContext(SparqlParser.ArgListContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_iriRefOrFunction

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

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

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




    def iriRefOrFunction(self):

        localctx = SparqlParser.IriRefOrFunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 244, self.RULE_iriRefOrFunction)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1486
            self.iri()
            self.state = 1488
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,142,self._ctx)
            if la_ == 1:
                self.state = 1487
                self.argList()


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


    class RdfLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def string(self):
            return self.getTypedRuleContext(SparqlParser.StringContext,0)


        def LANGTAG(self):
            return self.getToken(SparqlParser.LANGTAG, 0)

        def REFERENCE(self):
            return self.getToken(SparqlParser.REFERENCE, 0)

        def iri(self):
            return self.getTypedRuleContext(SparqlParser.IriContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_rdfLiteral

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

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

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




    def rdfLiteral(self):

        localctx = SparqlParser.RdfLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 246, self.RULE_rdfLiteral)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1490
            self.string()
            self.state = 1494
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,143,self._ctx)
            if la_ == 1:
                self.state = 1491
                self.match(SparqlParser.LANGTAG)

            elif la_ == 2:
                self.state = 1492
                self.match(SparqlParser.REFERENCE)
                self.state = 1493
                self.iri()


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


    class NumericLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def numericLiteralUnsigned(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralUnsignedContext,0)


        def numericLiteralPositive(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralPositiveContext,0)


        def numericLiteralNegative(self):
            return self.getTypedRuleContext(SparqlParser.NumericLiteralNegativeContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_numericLiteral

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

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

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




    def numericLiteral(self):

        localctx = SparqlParser.NumericLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 248, self.RULE_numericLiteral)
        try:
            self.state = 1499
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.INTEGER, SparqlParser.DECIMAL, SparqlParser.DOUBLE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1496
                self.numericLiteralUnsigned()
                pass
            elif token in [SparqlParser.INTEGER_POSITIVE, SparqlParser.DECIMAL_POSITIVE, SparqlParser.DOUBLE_POSITIVE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1497
                self.numericLiteralPositive()
                pass
            elif token in [SparqlParser.INTEGER_NEGATIVE, SparqlParser.DECIMAL_NEGATIVE, SparqlParser.DOUBLE_NEGATIVE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1498
                self.numericLiteralNegative()
                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 NumericLiteralUnsignedContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INTEGER(self):
            return self.getToken(SparqlParser.INTEGER, 0)

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

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

        def getRuleIndex(self):
            return SparqlParser.RULE_numericLiteralUnsigned

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

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

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




    def numericLiteralUnsigned(self):

        localctx = SparqlParser.NumericLiteralUnsignedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 250, self.RULE_numericLiteralUnsigned)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1501
            _la = self._input.LA(1)
            if not(((((_la - 122)) & ~0x3f) == 0 and ((1 << (_la - 122)) & ((1 << (SparqlParser.INTEGER - 122)) | (1 << (SparqlParser.DECIMAL - 122)) | (1 << (SparqlParser.DOUBLE - 122)))) != 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 NumericLiteralPositiveContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INTEGER_POSITIVE(self):
            return self.getToken(SparqlParser.INTEGER_POSITIVE, 0)

        def DECIMAL_POSITIVE(self):
            return self.getToken(SparqlParser.DECIMAL_POSITIVE, 0)

        def DOUBLE_POSITIVE(self):
            return self.getToken(SparqlParser.DOUBLE_POSITIVE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_numericLiteralPositive

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

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

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




    def numericLiteralPositive(self):

        localctx = SparqlParser.NumericLiteralPositiveContext(self, self._ctx, self.state)
        self.enterRule(localctx, 252, self.RULE_numericLiteralPositive)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1503
            _la = self._input.LA(1)
            if not(((((_la - 125)) & ~0x3f) == 0 and ((1 << (_la - 125)) & ((1 << (SparqlParser.INTEGER_POSITIVE - 125)) | (1 << (SparqlParser.DECIMAL_POSITIVE - 125)) | (1 << (SparqlParser.DOUBLE_POSITIVE - 125)))) != 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 NumericLiteralNegativeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INTEGER_NEGATIVE(self):
            return self.getToken(SparqlParser.INTEGER_NEGATIVE, 0)

        def DECIMAL_NEGATIVE(self):
            return self.getToken(SparqlParser.DECIMAL_NEGATIVE, 0)

        def DOUBLE_NEGATIVE(self):
            return self.getToken(SparqlParser.DOUBLE_NEGATIVE, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_numericLiteralNegative

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

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

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




    def numericLiteralNegative(self):

        localctx = SparqlParser.NumericLiteralNegativeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 254, self.RULE_numericLiteralNegative)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1505
            _la = self._input.LA(1)
            if not(((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & ((1 << (SparqlParser.INTEGER_NEGATIVE - 128)) | (1 << (SparqlParser.DECIMAL_NEGATIVE - 128)) | (1 << (SparqlParser.DOUBLE_NEGATIVE - 128)))) != 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 BooleanLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return SparqlParser.RULE_booleanLiteral

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

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

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




    def booleanLiteral(self):

        localctx = SparqlParser.BooleanLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 256, self.RULE_booleanLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1507
            _la = self._input.LA(1)
            if not(_la==SparqlParser.TRUE or _la==SparqlParser.FALSE):
                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 StringContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def STRING_LITERAL1(self):
            return self.getToken(SparqlParser.STRING_LITERAL1, 0)

        def STRING_LITERAL2(self):
            return self.getToken(SparqlParser.STRING_LITERAL2, 0)

        def STRING_LITERAL_LONG1(self):
            return self.getToken(SparqlParser.STRING_LITERAL_LONG1, 0)

        def STRING_LITERAL_LONG2(self):
            return self.getToken(SparqlParser.STRING_LITERAL_LONG2, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_string

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

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

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




    def string(self):

        localctx = SparqlParser.StringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 258, self.RULE_string)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1509
            _la = self._input.LA(1)
            if not(((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & ((1 << (SparqlParser.STRING_LITERAL1 - 131)) | (1 << (SparqlParser.STRING_LITERAL2 - 131)) | (1 << (SparqlParser.STRING_LITERAL_LONG1 - 131)) | (1 << (SparqlParser.STRING_LITERAL_LONG2 - 131)))) != 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 IriContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IRIREF(self):
            return self.getToken(SparqlParser.IRIREF, 0)

        def prefixedName(self):
            return self.getTypedRuleContext(SparqlParser.PrefixedNameContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_iri

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

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

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




    def iri(self):

        localctx = SparqlParser.IriContext(self, self._ctx, self.state)
        self.enterRule(localctx, 260, self.RULE_iri)
        try:
            self.state = 1513
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.IRIREF]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1511
                self.match(SparqlParser.IRIREF)
                pass
            elif token in [SparqlParser.PNAME_NS, SparqlParser.PNAME_LN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1512
                self.prefixedName()
                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 PrefixedNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PNAME_LN(self):
            return self.getToken(SparqlParser.PNAME_LN, 0)

        def PNAME_NS(self):
            return self.getToken(SparqlParser.PNAME_NS, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_prefixedName

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

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

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




    def prefixedName(self):

        localctx = SparqlParser.PrefixedNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 262, self.RULE_prefixedName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1515
            _la = self._input.LA(1)
            if not(_la==SparqlParser.PNAME_NS or _la==SparqlParser.PNAME_LN):
                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 BlankNodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BLANK_NODE_LABEL(self):
            return self.getToken(SparqlParser.BLANK_NODE_LABEL, 0)

        def anon(self):
            return self.getTypedRuleContext(SparqlParser.AnonContext,0)


        def getRuleIndex(self):
            return SparqlParser.RULE_blankNode

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

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

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




    def blankNode(self):

        localctx = SparqlParser.BlankNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 264, self.RULE_blankNode)
        try:
            self.state = 1519
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SparqlParser.BLANK_NODE_LABEL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1517
                self.match(SparqlParser.BLANK_NODE_LABEL)
                pass
            elif token in [SparqlParser.OPEN_SQUARE_BRACKET]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1518
                self.anon()
                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 AnonContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.OPEN_SQUARE_BRACKET, 0)

        def CLOSE_SQUARE_BRACKET(self):
            return self.getToken(SparqlParser.CLOSE_SQUARE_BRACKET, 0)

        def getRuleIndex(self):
            return SparqlParser.RULE_anon

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

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

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




    def anon(self):

        localctx = SparqlParser.AnonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 266, self.RULE_anon)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1521
            self.match(SparqlParser.OPEN_SQUARE_BRACKET)
            self.state = 1522
            self.match(SparqlParser.CLOSE_SQUARE_BRACKET)
        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[111] = self.expression_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 expression_sempred(self, localctx:ExpressionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 7)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 6)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 5)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 2)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 1)
         




