# flake8: noqa
# type: ignore
# Generated from VerseQLParser.g4 by ANTLR 4.13.2
# encoding: utf-8
import sys
from io import StringIO

from antlr4 import *

if sys.version_info[1] > 5:
    from typing import TextIO
else:
    from typing.io import TextIO


def serializedATN():
    return [
        4,
        1,
        53,
        445,
        2,
        0,
        7,
        0,
        2,
        1,
        7,
        1,
        2,
        2,
        7,
        2,
        2,
        3,
        7,
        3,
        2,
        4,
        7,
        4,
        2,
        5,
        7,
        5,
        2,
        6,
        7,
        6,
        2,
        7,
        7,
        7,
        2,
        8,
        7,
        8,
        2,
        9,
        7,
        9,
        2,
        10,
        7,
        10,
        2,
        11,
        7,
        11,
        2,
        12,
        7,
        12,
        2,
        13,
        7,
        13,
        2,
        14,
        7,
        14,
        2,
        15,
        7,
        15,
        2,
        16,
        7,
        16,
        2,
        17,
        7,
        17,
        2,
        18,
        7,
        18,
        2,
        19,
        7,
        19,
        2,
        20,
        7,
        20,
        2,
        21,
        7,
        21,
        2,
        22,
        7,
        22,
        2,
        23,
        7,
        23,
        2,
        24,
        7,
        24,
        2,
        25,
        7,
        25,
        2,
        26,
        7,
        26,
        2,
        27,
        7,
        27,
        2,
        28,
        7,
        28,
        2,
        29,
        7,
        29,
        2,
        30,
        7,
        30,
        2,
        31,
        7,
        31,
        2,
        32,
        7,
        32,
        2,
        33,
        7,
        33,
        2,
        34,
        7,
        34,
        2,
        35,
        7,
        35,
        2,
        36,
        7,
        36,
        2,
        37,
        7,
        37,
        2,
        38,
        7,
        38,
        2,
        39,
        7,
        39,
        2,
        40,
        7,
        40,
        2,
        41,
        7,
        41,
        2,
        42,
        7,
        42,
        2,
        43,
        7,
        43,
        2,
        44,
        7,
        44,
        2,
        45,
        7,
        45,
        2,
        46,
        7,
        46,
        1,
        0,
        1,
        0,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        2,
        1,
        2,
        1,
        2,
        1,
        3,
        1,
        3,
        1,
        3,
        1,
        4,
        1,
        4,
        1,
        4,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        6,
        1,
        6,
        1,
        6,
        1,
        7,
        1,
        7,
        1,
        7,
        1,
        8,
        1,
        8,
        1,
        8,
        1,
        9,
        1,
        9,
        5,
        9,
        123,
        8,
        9,
        10,
        9,
        12,
        9,
        126,
        9,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        5,
        9,
        134,
        8,
        9,
        10,
        9,
        12,
        9,
        137,
        9,
        9,
        1,
        9,
        1,
        9,
        3,
        9,
        141,
        8,
        9,
        1,
        10,
        1,
        10,
        1,
        10,
        1,
        10,
        1,
        10,
        1,
        10,
        1,
        10,
        1,
        10,
        3,
        10,
        151,
        8,
        10,
        1,
        11,
        1,
        11,
        1,
        11,
        1,
        12,
        1,
        12,
        1,
        12,
        1,
        13,
        1,
        13,
        1,
        13,
        1,
        13,
        5,
        13,
        163,
        8,
        13,
        10,
        13,
        12,
        13,
        166,
        9,
        13,
        1,
        13,
        3,
        13,
        169,
        8,
        13,
        1,
        14,
        1,
        14,
        1,
        14,
        3,
        14,
        174,
        8,
        14,
        1,
        15,
        1,
        15,
        1,
        15,
        1,
        16,
        1,
        16,
        1,
        16,
        5,
        16,
        182,
        8,
        16,
        10,
        16,
        12,
        16,
        185,
        9,
        16,
        1,
        16,
        3,
        16,
        188,
        8,
        16,
        1,
        17,
        1,
        17,
        1,
        17,
        1,
        18,
        1,
        18,
        1,
        18,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        3,
        19,
        214,
        8,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        5,
        19,
        221,
        8,
        19,
        10,
        19,
        12,
        19,
        224,
        9,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        3,
        19,
        230,
        8,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        5,
        19,
        238,
        8,
        19,
        10,
        19,
        12,
        19,
        241,
        9,
        19,
        1,
        20,
        1,
        20,
        1,
        20,
        1,
        20,
        1,
        20,
        3,
        20,
        248,
        8,
        20,
        1,
        21,
        1,
        21,
        1,
        21,
        1,
        21,
        1,
        22,
        1,
        22,
        1,
        22,
        5,
        22,
        257,
        8,
        22,
        10,
        22,
        12,
        22,
        260,
        9,
        22,
        1,
        22,
        3,
        22,
        263,
        8,
        22,
        1,
        23,
        1,
        23,
        3,
        23,
        267,
        8,
        23,
        1,
        24,
        1,
        24,
        1,
        24,
        1,
        24,
        1,
        25,
        1,
        25,
        1,
        25,
        1,
        26,
        1,
        26,
        1,
        26,
        5,
        26,
        279,
        8,
        26,
        10,
        26,
        12,
        26,
        282,
        9,
        26,
        1,
        26,
        3,
        26,
        285,
        8,
        26,
        1,
        27,
        1,
        27,
        1,
        27,
        1,
        27,
        1,
        28,
        1,
        28,
        1,
        28,
        3,
        28,
        294,
        8,
        28,
        1,
        28,
        1,
        28,
        1,
        28,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        5,
        29,
        305,
        8,
        29,
        10,
        29,
        12,
        29,
        308,
        9,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        1,
        29,
        5,
        29,
        316,
        8,
        29,
        10,
        29,
        12,
        29,
        319,
        9,
        29,
        1,
        29,
        1,
        29,
        3,
        29,
        323,
        8,
        29,
        1,
        30,
        1,
        30,
        1,
        30,
        1,
        30,
        1,
        31,
        1,
        31,
        1,
        31,
        1,
        31,
        1,
        31,
        1,
        31,
        1,
        32,
        1,
        32,
        1,
        32,
        1,
        32,
        1,
        32,
        3,
        32,
        340,
        8,
        32,
        1,
        32,
        1,
        32,
        1,
        32,
        1,
        32,
        1,
        33,
        1,
        33,
        1,
        33,
        1,
        34,
        1,
        34,
        5,
        34,
        351,
        8,
        34,
        10,
        34,
        12,
        34,
        354,
        9,
        34,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        1,
        35,
        3,
        35,
        365,
        8,
        35,
        1,
        36,
        1,
        36,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        37,
        3,
        37,
        377,
        8,
        37,
        1,
        38,
        1,
        38,
        1,
        39,
        1,
        39,
        1,
        39,
        1,
        39,
        1,
        39,
        1,
        39,
        5,
        39,
        387,
        8,
        39,
        10,
        39,
        12,
        39,
        390,
        9,
        39,
        1,
        39,
        1,
        39,
        3,
        39,
        394,
        8,
        39,
        1,
        40,
        1,
        40,
        1,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        5,
        41,
        402,
        8,
        41,
        10,
        41,
        12,
        41,
        405,
        9,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        3,
        41,
        411,
        8,
        41,
        1,
        42,
        1,
        42,
        1,
        42,
        1,
        42,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        5,
        43,
        421,
        8,
        43,
        10,
        43,
        12,
        43,
        424,
        9,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        3,
        43,
        430,
        8,
        43,
        1,
        44,
        1,
        44,
        1,
        44,
        1,
        44,
        1,
        44,
        1,
        44,
        1,
        44,
        3,
        44,
        439,
        8,
        44,
        1,
        45,
        1,
        45,
        1,
        46,
        1,
        46,
        1,
        46,
        0,
        1,
        38,
        47,
        0,
        2,
        4,
        6,
        8,
        10,
        12,
        14,
        16,
        18,
        20,
        22,
        24,
        26,
        28,
        30,
        32,
        34,
        36,
        38,
        40,
        42,
        44,
        46,
        48,
        50,
        52,
        54,
        56,
        58,
        60,
        62,
        64,
        66,
        68,
        70,
        72,
        74,
        76,
        78,
        80,
        82,
        84,
        86,
        88,
        90,
        92,
        0,
        6,
        7,
        0,
        3,
        3,
        5,
        7,
        10,
        10,
        12,
        12,
        16,
        20,
        22,
        22,
        49,
        49,
        3,
        0,
        6,
        6,
        10,
        10,
        12,
        12,
        1,
        0,
        29,
        34,
        2,
        0,
        3,
        3,
        7,
        7,
        1,
        0,
        45,
        46,
        1,
        0,
        47,
        48,
        459,
        0,
        94,
        1,
        0,
        0,
        0,
        2,
        96,
        1,
        0,
        0,
        0,
        4,
        99,
        1,
        0,
        0,
        0,
        6,
        102,
        1,
        0,
        0,
        0,
        8,
        105,
        1,
        0,
        0,
        0,
        10,
        108,
        1,
        0,
        0,
        0,
        12,
        111,
        1,
        0,
        0,
        0,
        14,
        114,
        1,
        0,
        0,
        0,
        16,
        117,
        1,
        0,
        0,
        0,
        18,
        140,
        1,
        0,
        0,
        0,
        20,
        150,
        1,
        0,
        0,
        0,
        22,
        152,
        1,
        0,
        0,
        0,
        24,
        155,
        1,
        0,
        0,
        0,
        26,
        168,
        1,
        0,
        0,
        0,
        28,
        170,
        1,
        0,
        0,
        0,
        30,
        175,
        1,
        0,
        0,
        0,
        32,
        187,
        1,
        0,
        0,
        0,
        34,
        189,
        1,
        0,
        0,
        0,
        36,
        192,
        1,
        0,
        0,
        0,
        38,
        229,
        1,
        0,
        0,
        0,
        40,
        247,
        1,
        0,
        0,
        0,
        42,
        249,
        1,
        0,
        0,
        0,
        44,
        262,
        1,
        0,
        0,
        0,
        46,
        264,
        1,
        0,
        0,
        0,
        48,
        268,
        1,
        0,
        0,
        0,
        50,
        272,
        1,
        0,
        0,
        0,
        52,
        284,
        1,
        0,
        0,
        0,
        54,
        286,
        1,
        0,
        0,
        0,
        56,
        293,
        1,
        0,
        0,
        0,
        58,
        322,
        1,
        0,
        0,
        0,
        60,
        324,
        1,
        0,
        0,
        0,
        62,
        328,
        1,
        0,
        0,
        0,
        64,
        339,
        1,
        0,
        0,
        0,
        66,
        345,
        1,
        0,
        0,
        0,
        68,
        348,
        1,
        0,
        0,
        0,
        70,
        364,
        1,
        0,
        0,
        0,
        72,
        366,
        1,
        0,
        0,
        0,
        74,
        376,
        1,
        0,
        0,
        0,
        76,
        378,
        1,
        0,
        0,
        0,
        78,
        393,
        1,
        0,
        0,
        0,
        80,
        395,
        1,
        0,
        0,
        0,
        82,
        410,
        1,
        0,
        0,
        0,
        84,
        412,
        1,
        0,
        0,
        0,
        86,
        429,
        1,
        0,
        0,
        0,
        88,
        438,
        1,
        0,
        0,
        0,
        90,
        440,
        1,
        0,
        0,
        0,
        92,
        442,
        1,
        0,
        0,
        0,
        94,
        95,
        7,
        0,
        0,
        0,
        95,
        1,
        1,
        0,
        0,
        0,
        96,
        97,
        3,
        18,
        9,
        0,
        97,
        98,
        5,
        0,
        0,
        1,
        98,
        3,
        1,
        0,
        0,
        0,
        99,
        100,
        3,
        38,
        19,
        0,
        100,
        101,
        5,
        0,
        0,
        1,
        101,
        5,
        1,
        0,
        0,
        0,
        102,
        103,
        3,
        38,
        19,
        0,
        103,
        104,
        5,
        0,
        0,
        1,
        104,
        7,
        1,
        0,
        0,
        0,
        105,
        106,
        3,
        26,
        13,
        0,
        106,
        107,
        5,
        0,
        0,
        1,
        107,
        9,
        1,
        0,
        0,
        0,
        108,
        109,
        3,
        32,
        16,
        0,
        109,
        110,
        5,
        0,
        0,
        1,
        110,
        11,
        1,
        0,
        0,
        0,
        111,
        112,
        3,
        44,
        22,
        0,
        112,
        113,
        5,
        0,
        0,
        1,
        113,
        13,
        1,
        0,
        0,
        0,
        114,
        115,
        3,
        38,
        19,
        0,
        115,
        116,
        5,
        0,
        0,
        1,
        116,
        15,
        1,
        0,
        0,
        0,
        117,
        118,
        3,
        52,
        26,
        0,
        118,
        119,
        5,
        0,
        0,
        1,
        119,
        17,
        1,
        0,
        0,
        0,
        120,
        124,
        3,
        0,
        0,
        0,
        121,
        123,
        3,
        20,
        10,
        0,
        122,
        121,
        1,
        0,
        0,
        0,
        123,
        126,
        1,
        0,
        0,
        0,
        124,
        122,
        1,
        0,
        0,
        0,
        124,
        125,
        1,
        0,
        0,
        0,
        125,
        141,
        1,
        0,
        0,
        0,
        126,
        124,
        1,
        0,
        0,
        0,
        127,
        128,
        3,
        0,
        0,
        0,
        128,
        129,
        3,
        18,
        9,
        0,
        129,
        135,
        5,
        42,
        0,
        0,
        130,
        131,
        3,
        18,
        9,
        0,
        131,
        132,
        5,
        42,
        0,
        0,
        132,
        134,
        1,
        0,
        0,
        0,
        133,
        130,
        1,
        0,
        0,
        0,
        134,
        137,
        1,
        0,
        0,
        0,
        135,
        133,
        1,
        0,
        0,
        0,
        135,
        136,
        1,
        0,
        0,
        0,
        136,
        138,
        1,
        0,
        0,
        0,
        137,
        135,
        1,
        0,
        0,
        0,
        138,
        139,
        5,
        8,
        0,
        0,
        139,
        141,
        1,
        0,
        0,
        0,
        140,
        120,
        1,
        0,
        0,
        0,
        140,
        127,
        1,
        0,
        0,
        0,
        141,
        19,
        1,
        0,
        0,
        0,
        142,
        151,
        3,
        24,
        12,
        0,
        143,
        151,
        3,
        30,
        15,
        0,
        144,
        151,
        3,
        50,
        25,
        0,
        145,
        151,
        3,
        34,
        17,
        0,
        146,
        151,
        3,
        36,
        18,
        0,
        147,
        151,
        3,
        42,
        21,
        0,
        148,
        151,
        3,
        48,
        24,
        0,
        149,
        151,
        3,
        22,
        11,
        0,
        150,
        142,
        1,
        0,
        0,
        0,
        150,
        143,
        1,
        0,
        0,
        0,
        150,
        144,
        1,
        0,
        0,
        0,
        150,
        145,
        1,
        0,
        0,
        0,
        150,
        146,
        1,
        0,
        0,
        0,
        150,
        147,
        1,
        0,
        0,
        0,
        150,
        148,
        1,
        0,
        0,
        0,
        150,
        149,
        1,
        0,
        0,
        0,
        151,
        21,
        1,
        0,
        0,
        0,
        152,
        153,
        3,
        0,
        0,
        0,
        153,
        154,
        3,
        40,
        20,
        0,
        154,
        23,
        1,
        0,
        0,
        0,
        155,
        156,
        5,
        19,
        0,
        0,
        156,
        157,
        3,
        26,
        13,
        0,
        157,
        25,
        1,
        0,
        0,
        0,
        158,
        169,
        5,
        26,
        0,
        0,
        159,
        164,
        3,
        28,
        14,
        0,
        160,
        161,
        5,
        23,
        0,
        0,
        161,
        163,
        3,
        28,
        14,
        0,
        162,
        160,
        1,
        0,
        0,
        0,
        163,
        166,
        1,
        0,
        0,
        0,
        164,
        162,
        1,
        0,
        0,
        0,
        164,
        165,
        1,
        0,
        0,
        0,
        165,
        169,
        1,
        0,
        0,
        0,
        166,
        164,
        1,
        0,
        0,
        0,
        167,
        169,
        3,
        66,
        33,
        0,
        168,
        158,
        1,
        0,
        0,
        0,
        168,
        159,
        1,
        0,
        0,
        0,
        168,
        167,
        1,
        0,
        0,
        0,
        169,
        27,
        1,
        0,
        0,
        0,
        170,
        173,
        3,
        68,
        34,
        0,
        171,
        172,
        5,
        2,
        0,
        0,
        172,
        174,
        3,
        68,
        34,
        0,
        173,
        171,
        1,
        0,
        0,
        0,
        173,
        174,
        1,
        0,
        0,
        0,
        174,
        29,
        1,
        0,
        0,
        0,
        175,
        176,
        7,
        1,
        0,
        0,
        176,
        177,
        3,
        32,
        16,
        0,
        177,
        31,
        1,
        0,
        0,
        0,
        178,
        183,
        3,
        0,
        0,
        0,
        179,
        180,
        5,
        27,
        0,
        0,
        180,
        182,
        3,
        0,
        0,
        0,
        181,
        179,
        1,
        0,
        0,
        0,
        182,
        185,
        1,
        0,
        0,
        0,
        183,
        181,
        1,
        0,
        0,
        0,
        183,
        184,
        1,
        0,
        0,
        0,
        184,
        188,
        1,
        0,
        0,
        0,
        185,
        183,
        1,
        0,
        0,
        0,
        186,
        188,
        3,
        66,
        33,
        0,
        187,
        178,
        1,
        0,
        0,
        0,
        187,
        186,
        1,
        0,
        0,
        0,
        188,
        33,
        1,
        0,
        0,
        0,
        189,
        190,
        5,
        18,
        0,
        0,
        190,
        191,
        3,
        38,
        19,
        0,
        191,
        35,
        1,
        0,
        0,
        0,
        192,
        193,
        5,
        22,
        0,
        0,
        193,
        194,
        3,
        38,
        19,
        0,
        194,
        37,
        1,
        0,
        0,
        0,
        195,
        196,
        6,
        19,
        -1,
        0,
        196,
        230,
        3,
        40,
        20,
        0,
        197,
        198,
        5,
        39,
        0,
        0,
        198,
        199,
        3,
        38,
        19,
        0,
        199,
        200,
        5,
        40,
        0,
        0,
        200,
        230,
        1,
        0,
        0,
        0,
        201,
        202,
        3,
        40,
        20,
        0,
        202,
        203,
        7,
        2,
        0,
        0,
        203,
        204,
        3,
        40,
        20,
        0,
        204,
        230,
        1,
        0,
        0,
        0,
        205,
        206,
        3,
        40,
        20,
        0,
        206,
        207,
        5,
        4,
        0,
        0,
        207,
        208,
        3,
        40,
        20,
        0,
        208,
        209,
        5,
        1,
        0,
        0,
        209,
        210,
        3,
        40,
        20,
        0,
        210,
        230,
        1,
        0,
        0,
        0,
        211,
        213,
        3,
        40,
        20,
        0,
        212,
        214,
        5,
        13,
        0,
        0,
        213,
        212,
        1,
        0,
        0,
        0,
        213,
        214,
        1,
        0,
        0,
        0,
        214,
        215,
        1,
        0,
        0,
        0,
        215,
        216,
        5,
        11,
        0,
        0,
        216,
        217,
        5,
        39,
        0,
        0,
        217,
        222,
        3,
        40,
        20,
        0,
        218,
        219,
        5,
        23,
        0,
        0,
        219,
        221,
        3,
        40,
        20,
        0,
        220,
        218,
        1,
        0,
        0,
        0,
        221,
        224,
        1,
        0,
        0,
        0,
        222,
        220,
        1,
        0,
        0,
        0,
        222,
        223,
        1,
        0,
        0,
        0,
        223,
        225,
        1,
        0,
        0,
        0,
        224,
        222,
        1,
        0,
        0,
        0,
        225,
        226,
        5,
        40,
        0,
        0,
        226,
        230,
        1,
        0,
        0,
        0,
        227,
        228,
        5,
        13,
        0,
        0,
        228,
        230,
        3,
        38,
        19,
        3,
        229,
        195,
        1,
        0,
        0,
        0,
        229,
        197,
        1,
        0,
        0,
        0,
        229,
        201,
        1,
        0,
        0,
        0,
        229,
        205,
        1,
        0,
        0,
        0,
        229,
        211,
        1,
        0,
        0,
        0,
        229,
        227,
        1,
        0,
        0,
        0,
        230,
        239,
        1,
        0,
        0,
        0,
        231,
        232,
        10,
        2,
        0,
        0,
        232,
        233,
        5,
        1,
        0,
        0,
        233,
        238,
        3,
        38,
        19,
        3,
        234,
        235,
        10,
        1,
        0,
        0,
        235,
        236,
        5,
        15,
        0,
        0,
        236,
        238,
        3,
        38,
        19,
        2,
        237,
        231,
        1,
        0,
        0,
        0,
        237,
        234,
        1,
        0,
        0,
        0,
        238,
        241,
        1,
        0,
        0,
        0,
        239,
        237,
        1,
        0,
        0,
        0,
        239,
        240,
        1,
        0,
        0,
        0,
        240,
        39,
        1,
        0,
        0,
        0,
        241,
        239,
        1,
        0,
        0,
        0,
        242,
        248,
        3,
        74,
        37,
        0,
        243,
        248,
        3,
        68,
        34,
        0,
        244,
        248,
        3,
        66,
        33,
        0,
        245,
        248,
        3,
        62,
        31,
        0,
        246,
        248,
        3,
        56,
        28,
        0,
        247,
        242,
        1,
        0,
        0,
        0,
        247,
        243,
        1,
        0,
        0,
        0,
        247,
        244,
        1,
        0,
        0,
        0,
        247,
        245,
        1,
        0,
        0,
        0,
        247,
        246,
        1,
        0,
        0,
        0,
        248,
        41,
        1,
        0,
        0,
        0,
        249,
        250,
        5,
        16,
        0,
        0,
        250,
        251,
        5,
        5,
        0,
        0,
        251,
        252,
        3,
        44,
        22,
        0,
        252,
        43,
        1,
        0,
        0,
        0,
        253,
        258,
        3,
        46,
        23,
        0,
        254,
        255,
        5,
        23,
        0,
        0,
        255,
        257,
        3,
        46,
        23,
        0,
        256,
        254,
        1,
        0,
        0,
        0,
        257,
        260,
        1,
        0,
        0,
        0,
        258,
        256,
        1,
        0,
        0,
        0,
        258,
        259,
        1,
        0,
        0,
        0,
        259,
        263,
        1,
        0,
        0,
        0,
        260,
        258,
        1,
        0,
        0,
        0,
        261,
        263,
        3,
        66,
        33,
        0,
        262,
        253,
        1,
        0,
        0,
        0,
        262,
        261,
        1,
        0,
        0,
        0,
        263,
        45,
        1,
        0,
        0,
        0,
        264,
        266,
        3,
        68,
        34,
        0,
        265,
        267,
        7,
        3,
        0,
        0,
        266,
        265,
        1,
        0,
        0,
        0,
        266,
        267,
        1,
        0,
        0,
        0,
        267,
        47,
        1,
        0,
        0,
        0,
        268,
        269,
        5,
        17,
        0,
        0,
        269,
        270,
        5,
        5,
        0,
        0,
        270,
        271,
        3,
        38,
        19,
        0,
        271,
        49,
        1,
        0,
        0,
        0,
        272,
        273,
        5,
        20,
        0,
        0,
        273,
        274,
        3,
        52,
        26,
        0,
        274,
        51,
        1,
        0,
        0,
        0,
        275,
        280,
        3,
        54,
        27,
        0,
        276,
        277,
        5,
        23,
        0,
        0,
        277,
        279,
        3,
        54,
        27,
        0,
        278,
        276,
        1,
        0,
        0,
        0,
        279,
        282,
        1,
        0,
        0,
        0,
        280,
        278,
        1,
        0,
        0,
        0,
        280,
        281,
        1,
        0,
        0,
        0,
        281,
        285,
        1,
        0,
        0,
        0,
        282,
        280,
        1,
        0,
        0,
        0,
        283,
        285,
        3,
        66,
        33,
        0,
        284,
        275,
        1,
        0,
        0,
        0,
        284,
        283,
        1,
        0,
        0,
        0,
        285,
        53,
        1,
        0,
        0,
        0,
        286,
        287,
        3,
        68,
        34,
        0,
        287,
        288,
        5,
        33,
        0,
        0,
        288,
        289,
        3,
        56,
        28,
        0,
        289,
        55,
        1,
        0,
        0,
        0,
        290,
        291,
        3,
        0,
        0,
        0,
        291,
        292,
        5,
        27,
        0,
        0,
        292,
        294,
        1,
        0,
        0,
        0,
        293,
        290,
        1,
        0,
        0,
        0,
        293,
        294,
        1,
        0,
        0,
        0,
        294,
        295,
        1,
        0,
        0,
        0,
        295,
        296,
        3,
        0,
        0,
        0,
        296,
        297,
        3,
        58,
        29,
        0,
        297,
        57,
        1,
        0,
        0,
        0,
        298,
        299,
        5,
        39,
        0,
        0,
        299,
        323,
        5,
        40,
        0,
        0,
        300,
        301,
        5,
        39,
        0,
        0,
        301,
        306,
        3,
        40,
        20,
        0,
        302,
        303,
        5,
        23,
        0,
        0,
        303,
        305,
        3,
        40,
        20,
        0,
        304,
        302,
        1,
        0,
        0,
        0,
        305,
        308,
        1,
        0,
        0,
        0,
        306,
        304,
        1,
        0,
        0,
        0,
        306,
        307,
        1,
        0,
        0,
        0,
        307,
        309,
        1,
        0,
        0,
        0,
        308,
        306,
        1,
        0,
        0,
        0,
        309,
        310,
        5,
        40,
        0,
        0,
        310,
        323,
        1,
        0,
        0,
        0,
        311,
        312,
        5,
        39,
        0,
        0,
        312,
        317,
        3,
        60,
        30,
        0,
        313,
        314,
        5,
        23,
        0,
        0,
        314,
        316,
        3,
        60,
        30,
        0,
        315,
        313,
        1,
        0,
        0,
        0,
        316,
        319,
        1,
        0,
        0,
        0,
        317,
        315,
        1,
        0,
        0,
        0,
        317,
        318,
        1,
        0,
        0,
        0,
        318,
        320,
        1,
        0,
        0,
        0,
        319,
        317,
        1,
        0,
        0,
        0,
        320,
        321,
        5,
        40,
        0,
        0,
        321,
        323,
        1,
        0,
        0,
        0,
        322,
        298,
        1,
        0,
        0,
        0,
        322,
        300,
        1,
        0,
        0,
        0,
        322,
        311,
        1,
        0,
        0,
        0,
        323,
        59,
        1,
        0,
        0,
        0,
        324,
        325,
        3,
        0,
        0,
        0,
        325,
        326,
        5,
        33,
        0,
        0,
        326,
        327,
        3,
        40,
        20,
        0,
        327,
        61,
        1,
        0,
        0,
        0,
        328,
        329,
        5,
        37,
        0,
        0,
        329,
        330,
        5,
        37,
        0,
        0,
        330,
        331,
        3,
        64,
        32,
        0,
        331,
        332,
        5,
        38,
        0,
        0,
        332,
        333,
        5,
        38,
        0,
        0,
        333,
        63,
        1,
        0,
        0,
        0,
        334,
        335,
        3,
        0,
        0,
        0,
        335,
        336,
        5,
        41,
        0,
        0,
        336,
        337,
        5,
        44,
        0,
        0,
        337,
        338,
        5,
        44,
        0,
        0,
        338,
        340,
        1,
        0,
        0,
        0,
        339,
        334,
        1,
        0,
        0,
        0,
        339,
        340,
        1,
        0,
        0,
        0,
        340,
        341,
        1,
        0,
        0,
        0,
        341,
        342,
        3,
        0,
        0,
        0,
        342,
        343,
        5,
        27,
        0,
        0,
        343,
        344,
        3,
        68,
        34,
        0,
        344,
        65,
        1,
        0,
        0,
        0,
        345,
        346,
        5,
        43,
        0,
        0,
        346,
        347,
        3,
        0,
        0,
        0,
        347,
        67,
        1,
        0,
        0,
        0,
        348,
        352,
        3,
        72,
        36,
        0,
        349,
        351,
        3,
        70,
        35,
        0,
        350,
        349,
        1,
        0,
        0,
        0,
        351,
        354,
        1,
        0,
        0,
        0,
        352,
        350,
        1,
        0,
        0,
        0,
        352,
        353,
        1,
        0,
        0,
        0,
        353,
        69,
        1,
        0,
        0,
        0,
        354,
        352,
        1,
        0,
        0,
        0,
        355,
        356,
        5,
        35,
        0,
        0,
        356,
        357,
        3,
        74,
        37,
        0,
        357,
        358,
        5,
        36,
        0,
        0,
        358,
        365,
        1,
        0,
        0,
        0,
        359,
        360,
        5,
        35,
        0,
        0,
        360,
        361,
        5,
        25,
        0,
        0,
        361,
        365,
        5,
        36,
        0,
        0,
        362,
        363,
        5,
        27,
        0,
        0,
        363,
        365,
        3,
        72,
        36,
        0,
        364,
        355,
        1,
        0,
        0,
        0,
        364,
        359,
        1,
        0,
        0,
        0,
        364,
        362,
        1,
        0,
        0,
        0,
        365,
        71,
        1,
        0,
        0,
        0,
        366,
        367,
        3,
        0,
        0,
        0,
        367,
        73,
        1,
        0,
        0,
        0,
        368,
        377,
        5,
        14,
        0,
        0,
        369,
        377,
        5,
        21,
        0,
        0,
        370,
        377,
        5,
        9,
        0,
        0,
        371,
        377,
        3,
        76,
        38,
        0,
        372,
        377,
        5,
        47,
        0,
        0,
        373,
        377,
        5,
        48,
        0,
        0,
        374,
        377,
        3,
        80,
        40,
        0,
        375,
        377,
        3,
        78,
        39,
        0,
        376,
        368,
        1,
        0,
        0,
        0,
        376,
        369,
        1,
        0,
        0,
        0,
        376,
        370,
        1,
        0,
        0,
        0,
        376,
        371,
        1,
        0,
        0,
        0,
        376,
        372,
        1,
        0,
        0,
        0,
        376,
        373,
        1,
        0,
        0,
        0,
        376,
        374,
        1,
        0,
        0,
        0,
        376,
        375,
        1,
        0,
        0,
        0,
        377,
        75,
        1,
        0,
        0,
        0,
        378,
        379,
        7,
        4,
        0,
        0,
        379,
        77,
        1,
        0,
        0,
        0,
        380,
        381,
        5,
        35,
        0,
        0,
        381,
        394,
        5,
        36,
        0,
        0,
        382,
        383,
        5,
        35,
        0,
        0,
        383,
        388,
        3,
        74,
        37,
        0,
        384,
        385,
        5,
        23,
        0,
        0,
        385,
        387,
        3,
        74,
        37,
        0,
        386,
        384,
        1,
        0,
        0,
        0,
        387,
        390,
        1,
        0,
        0,
        0,
        388,
        386,
        1,
        0,
        0,
        0,
        388,
        389,
        1,
        0,
        0,
        0,
        389,
        391,
        1,
        0,
        0,
        0,
        390,
        388,
        1,
        0,
        0,
        0,
        391,
        392,
        5,
        36,
        0,
        0,
        392,
        394,
        1,
        0,
        0,
        0,
        393,
        380,
        1,
        0,
        0,
        0,
        393,
        382,
        1,
        0,
        0,
        0,
        394,
        79,
        1,
        0,
        0,
        0,
        395,
        396,
        3,
        88,
        44,
        0,
        396,
        81,
        1,
        0,
        0,
        0,
        397,
        398,
        5,
        37,
        0,
        0,
        398,
        403,
        3,
        84,
        42,
        0,
        399,
        400,
        5,
        23,
        0,
        0,
        400,
        402,
        3,
        84,
        42,
        0,
        401,
        399,
        1,
        0,
        0,
        0,
        402,
        405,
        1,
        0,
        0,
        0,
        403,
        401,
        1,
        0,
        0,
        0,
        403,
        404,
        1,
        0,
        0,
        0,
        404,
        406,
        1,
        0,
        0,
        0,
        405,
        403,
        1,
        0,
        0,
        0,
        406,
        407,
        5,
        38,
        0,
        0,
        407,
        411,
        1,
        0,
        0,
        0,
        408,
        409,
        5,
        37,
        0,
        0,
        409,
        411,
        5,
        38,
        0,
        0,
        410,
        397,
        1,
        0,
        0,
        0,
        410,
        408,
        1,
        0,
        0,
        0,
        411,
        83,
        1,
        0,
        0,
        0,
        412,
        413,
        3,
        90,
        45,
        0,
        413,
        414,
        5,
        41,
        0,
        0,
        414,
        415,
        3,
        88,
        44,
        0,
        415,
        85,
        1,
        0,
        0,
        0,
        416,
        417,
        5,
        35,
        0,
        0,
        417,
        422,
        3,
        88,
        44,
        0,
        418,
        419,
        5,
        23,
        0,
        0,
        419,
        421,
        3,
        88,
        44,
        0,
        420,
        418,
        1,
        0,
        0,
        0,
        421,
        424,
        1,
        0,
        0,
        0,
        422,
        420,
        1,
        0,
        0,
        0,
        422,
        423,
        1,
        0,
        0,
        0,
        423,
        425,
        1,
        0,
        0,
        0,
        424,
        422,
        1,
        0,
        0,
        0,
        425,
        426,
        5,
        36,
        0,
        0,
        426,
        430,
        1,
        0,
        0,
        0,
        427,
        428,
        5,
        35,
        0,
        0,
        428,
        430,
        5,
        36,
        0,
        0,
        429,
        416,
        1,
        0,
        0,
        0,
        429,
        427,
        1,
        0,
        0,
        0,
        430,
        87,
        1,
        0,
        0,
        0,
        431,
        439,
        3,
        90,
        45,
        0,
        432,
        439,
        3,
        92,
        46,
        0,
        433,
        439,
        3,
        82,
        41,
        0,
        434,
        439,
        3,
        86,
        43,
        0,
        435,
        439,
        5,
        21,
        0,
        0,
        436,
        439,
        5,
        9,
        0,
        0,
        437,
        439,
        5,
        14,
        0,
        0,
        438,
        431,
        1,
        0,
        0,
        0,
        438,
        432,
        1,
        0,
        0,
        0,
        438,
        433,
        1,
        0,
        0,
        0,
        438,
        434,
        1,
        0,
        0,
        0,
        438,
        435,
        1,
        0,
        0,
        0,
        438,
        436,
        1,
        0,
        0,
        0,
        438,
        437,
        1,
        0,
        0,
        0,
        439,
        89,
        1,
        0,
        0,
        0,
        440,
        441,
        5,
        46,
        0,
        0,
        441,
        91,
        1,
        0,
        0,
        0,
        442,
        443,
        7,
        5,
        0,
        0,
        443,
        93,
        1,
        0,
        0,
        0,
        35,
        124,
        135,
        140,
        150,
        164,
        168,
        173,
        183,
        187,
        213,
        222,
        229,
        237,
        239,
        247,
        258,
        262,
        266,
        280,
        284,
        293,
        306,
        317,
        322,
        339,
        352,
        364,
        376,
        388,
        393,
        403,
        410,
        422,
        429,
        438,
    ]


class VerseQLParser(Parser):

    grammarFileName = "VerseQLParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [
        "<INVALID>",
        "'AND'",
        "'AS'",
        "'ASC'",
        "'BETWEEN'",
        "'BY'",
        "'COLLECTION'",
        "'DESC'",
        "'END'",
        "'FALSE'",
        "'FROM'",
        "'IN'",
        "'INTO'",
        "'NOT'",
        "'NULL'",
        "'OR'",
        "'ORDER'",
        "'RANK'",
        "'SEARCH'",
        "'SELECT'",
        "'SET'",
        "'TRUE'",
        "'WHERE'",
        "','",
        "'+'",
        "'-'",
        "'*'",
        "'.'",
        "'?'",
        "'<'",
        "'<='",
        "'>'",
        "'>='",
        "'='",
        "<INVALID>",
        "'['",
        "']'",
        "'{'",
        "'}'",
        "'('",
        "')'",
        "':'",
        "';'",
        "'@'",
        "'/'",
    ]

    symbolicNames = [
        "<INVALID>",
        "AND",
        "AS",
        "ASC",
        "BETWEEN",
        "BY",
        "COLLECTION",
        "DESC",
        "END",
        "FALSE",
        "FROM",
        "IN",
        "INTO",
        "NOT",
        "NULL",
        "OR",
        "ORDER",
        "RANK",
        "SEARCH",
        "SELECT",
        "SET",
        "TRUE",
        "WHERE",
        "COMMA",
        "PLUS",
        "MINUS",
        "STAR",
        "DOT",
        "QUESTION_MARK",
        "LT",
        "LT_EQ",
        "GT",
        "GT_EQ",
        "EQ",
        "NEQ",
        "BRACKET_LEFT",
        "BRACKET_RIGHT",
        "BRACE_LEFT",
        "BRACE_RIGHT",
        "PAREN_LEFT",
        "PAREN_RIGHT",
        "COLON",
        "SEMI_COLON",
        "AT",
        "SLASH",
        "LITERAL_STRING_SINGLE",
        "LITERAL_STRING_DOUBLE",
        "LITERAL_INTEGER",
        "LITERAL_DECIMAL",
        "IDENTIFIER",
        "WS",
        "COMMENT_SINGLE_LINE",
        "COMMENT_MULTILINE",
        "UNRECOGNIZED",
    ]

    RULE_identifier = 0
    RULE_parse_statement = 1
    RULE_parse_search = 2
    RULE_parse_where = 3
    RULE_parse_select = 4
    RULE_parse_collection = 5
    RULE_parse_order_by = 6
    RULE_parse_rank_by = 7
    RULE_parse_update = 8
    RULE_statement = 9
    RULE_clause = 10
    RULE_generic_clause = 11
    RULE_select_clause = 12
    RULE_select = 13
    RULE_select_term = 14
    RULE_collection_clause = 15
    RULE_collection = 16
    RULE_search_clause = 17
    RULE_where_clause = 18
    RULE_expression = 19
    RULE_operand = 20
    RULE_order_by_clause = 21
    RULE_order_by = 22
    RULE_order_by_term = 23
    RULE_rank_by_clause = 24
    RULE_set_clause = 25
    RULE_update = 26
    RULE_update_operation = 27
    RULE_function = 28
    RULE_function_args = 29
    RULE_named_arg = 30
    RULE_ref = 31
    RULE_ref_path = 32
    RULE_parameter = 33
    RULE_field = 34
    RULE_field_path = 35
    RULE_field_primitive = 36
    RULE_value = 37
    RULE_literal_string = 38
    RULE_array = 39
    RULE_json = 40
    RULE_json_obj = 41
    RULE_json_pair = 42
    RULE_json_arr = 43
    RULE_json_value = 44
    RULE_json_string = 45
    RULE_json_number = 46

    ruleNames = [
        "identifier",
        "parse_statement",
        "parse_search",
        "parse_where",
        "parse_select",
        "parse_collection",
        "parse_order_by",
        "parse_rank_by",
        "parse_update",
        "statement",
        "clause",
        "generic_clause",
        "select_clause",
        "select",
        "select_term",
        "collection_clause",
        "collection",
        "search_clause",
        "where_clause",
        "expression",
        "operand",
        "order_by_clause",
        "order_by",
        "order_by_term",
        "rank_by_clause",
        "set_clause",
        "update",
        "update_operation",
        "function",
        "function_args",
        "named_arg",
        "ref",
        "ref_path",
        "parameter",
        "field",
        "field_path",
        "field_primitive",
        "value",
        "literal_string",
        "array",
        "json",
        "json_obj",
        "json_pair",
        "json_arr",
        "json_value",
        "json_string",
        "json_number",
    ]

    EOF = Token.EOF
    AND = 1
    AS = 2
    ASC = 3
    BETWEEN = 4
    BY = 5
    COLLECTION = 6
    DESC = 7
    END = 8
    FALSE = 9
    FROM = 10
    IN = 11
    INTO = 12
    NOT = 13
    NULL = 14
    OR = 15
    ORDER = 16
    RANK = 17
    SEARCH = 18
    SELECT = 19
    SET = 20
    TRUE = 21
    WHERE = 22
    COMMA = 23
    PLUS = 24
    MINUS = 25
    STAR = 26
    DOT = 27
    QUESTION_MARK = 28
    LT = 29
    LT_EQ = 30
    GT = 31
    GT_EQ = 32
    EQ = 33
    NEQ = 34
    BRACKET_LEFT = 35
    BRACKET_RIGHT = 36
    BRACE_LEFT = 37
    BRACE_RIGHT = 38
    PAREN_LEFT = 39
    PAREN_RIGHT = 40
    COLON = 41
    SEMI_COLON = 42
    AT = 43
    SLASH = 44
    LITERAL_STRING_SINGLE = 45
    LITERAL_STRING_DOUBLE = 46
    LITERAL_INTEGER = 47
    LITERAL_DECIMAL = 48
    IDENTIFIER = 49
    WS = 50
    COMMENT_SINGLE_LINE = 51
    COMMENT_MULTILINE = 52
    UNRECOGNIZED = 53

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

    class IdentifierContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

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

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

        def COLLECTION(self):
            return self.getToken(VerseQLParser.COLLECTION, 0)

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

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

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

        def SEARCH(self):
            return self.getToken(VerseQLParser.SEARCH, 0)

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

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

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

        def RANK(self):
            return self.getToken(VerseQLParser.RANK, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_identifier

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

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

    def identifier(self):

        localctx = VerseQLParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_identifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 94
            _la = self._input.LA(1)
            if not (
                (((_la) & ~0x3F) == 0 and ((1 << _la) & 562949959652584) != 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 Parse_statementContext(ParserRuleContext):
        __slots__ = "parser"

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

        def statement(self):
            return self.getTypedRuleContext(VerseQLParser.StatementContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_statement

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

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

    def parse_statement(self):

        localctx = VerseQLParser.Parse_statementContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 2, self.RULE_parse_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 96
            self.statement()
            self.state = 97
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_searchContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_search

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

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

    def parse_search(self):

        localctx = VerseQLParser.Parse_searchContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 4, self.RULE_parse_search)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            self.expression(0)
            self.state = 100
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_whereContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_where

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

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

    def parse_where(self):

        localctx = VerseQLParser.Parse_whereContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 6, self.RULE_parse_where)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 102
            self.expression(0)
            self.state = 103
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_selectContext(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.getTypedRuleContext(VerseQLParser.SelectContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_select

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

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

    def parse_select(self):

        localctx = VerseQLParser.Parse_selectContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 8, self.RULE_parse_select)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 105
            self.select()
            self.state = 106
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_collectionContext(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(VerseQLParser.CollectionContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_collection

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

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

    def parse_collection(self):

        localctx = VerseQLParser.Parse_collectionContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 10, self.RULE_parse_collection)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 108
            self.collection()
            self.state = 109
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_order_byContext(ParserRuleContext):
        __slots__ = "parser"

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

        def order_by(self):
            return self.getTypedRuleContext(VerseQLParser.Order_byContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_order_by

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

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

    def parse_order_by(self):

        localctx = VerseQLParser.Parse_order_byContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 12, self.RULE_parse_order_by)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 111
            self.order_by()
            self.state = 112
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_rank_byContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_rank_by

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

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

    def parse_rank_by(self):

        localctx = VerseQLParser.Parse_rank_byContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 14, self.RULE_parse_rank_by)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 114
            self.expression(0)
            self.state = 115
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Parse_updateContext(ParserRuleContext):
        __slots__ = "parser"

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

        def update(self):
            return self.getTypedRuleContext(VerseQLParser.UpdateContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parse_update

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

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

    def parse_update(self):

        localctx = VerseQLParser.Parse_updateContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 16, self.RULE_parse_update)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 117
            self.update()
            self.state = 118
            self.match(VerseQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StatementContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_statement

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Statement_multiContext(StatementContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.StatementContext
            super().__init__(parser)
            self.op = None  # IdentifierContext
            self.copyFrom(ctx)

        def statement(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.StatementContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.StatementContext, i
                )

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

        def END(self):
            return self.getToken(VerseQLParser.END, 0)

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

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

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

    class Statement_singleContext(StatementContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.StatementContext
            super().__init__(parser)
            self.op = None  # IdentifierContext
            self.copyFrom(ctx)

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

        def clause(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(VerseQLParser.ClauseContext)
            else:
                return self.getTypedRuleContext(VerseQLParser.ClauseContext, i)

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

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

    def statement(self):

        localctx = VerseQLParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_statement)
        self._la = 0  # Token type
        try:
            self.state = 140
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 2, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Statement_singleContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 1)
                self.state = 120
                localctx.op = self.identifier()
                self.state = 124
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((_la) & ~0x3F) == 0 and (
                    (1 << _la) & 562949959652584
                ) != 0:
                    self.state = 121
                    self.clause()
                    self.state = 126
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 2:
                localctx = VerseQLParser.Statement_multiContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 127
                localctx.op = self.identifier()
                self.state = 128
                self.statement()
                self.state = 129
                self.match(VerseQLParser.SEMI_COLON)
                self.state = 135
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((_la) & ~0x3F) == 0 and (
                    (1 << _la) & 562949959652584
                ) != 0:
                    self.state = 130
                    self.statement()
                    self.state = 131
                    self.match(VerseQLParser.SEMI_COLON)
                    self.state = 137
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 138
                self.match(VerseQLParser.END)
                pass

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

    class ClauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def select_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Select_clauseContext, 0
            )

        def collection_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Collection_clauseContext, 0
            )

        def set_clause(self):
            return self.getTypedRuleContext(VerseQLParser.Set_clauseContext, 0)

        def search_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Search_clauseContext, 0
            )

        def where_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Where_clauseContext, 0
            )

        def order_by_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Order_by_clauseContext, 0
            )

        def rank_by_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Rank_by_clauseContext, 0
            )

        def generic_clause(self):
            return self.getTypedRuleContext(
                VerseQLParser.Generic_clauseContext, 0
            )

        def getRuleIndex(self):
            return VerseQLParser.RULE_clause

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

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

    def clause(self):

        localctx = VerseQLParser.ClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_clause)
        try:
            self.state = 150
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 3, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 142
                self.select_clause()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 143
                self.collection_clause()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 144
                self.set_clause()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 145
                self.search_clause()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 146
                self.where_clause()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 147
                self.order_by_clause()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 148
                self.rank_by_clause()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 149
                self.generic_clause()
                pass

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

    class Generic_clauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def operand(self):
            return self.getTypedRuleContext(VerseQLParser.OperandContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_generic_clause

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

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

    def generic_clause(self):

        localctx = VerseQLParser.Generic_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 22, self.RULE_generic_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 152
            localctx.name = self.identifier()
            self.state = 153
            self.operand()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Select_clauseContext(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(VerseQLParser.SELECT, 0)

        def select(self):
            return self.getTypedRuleContext(VerseQLParser.SelectContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_select_clause

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

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

    def select_clause(self):

        localctx = VerseQLParser.Select_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 24, self.RULE_select_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 155
            self.match(VerseQLParser.SELECT)
            self.state = 156
            self.select()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SelectContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_select

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Select_parameterContext(SelectContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.SelectContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameter(self):
            return self.getTypedRuleContext(VerseQLParser.ParameterContext, 0)

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

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

    class Select_termsContext(SelectContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.SelectContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def select_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Select_termContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Select_termContext, i
                )

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

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

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

    class Select_allContext(SelectContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.SelectContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def STAR(self):
            return self.getToken(VerseQLParser.STAR, 0)

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

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

    def select(self):

        localctx = VerseQLParser.SelectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_select)
        self._la = 0  # Token type
        try:
            self.state = 168
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [26]:
                localctx = VerseQLParser.Select_allContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 158
                self.match(VerseQLParser.STAR)
                pass
            elif token in [3, 5, 6, 7, 10, 12, 16, 17, 18, 19, 20, 22, 49]:
                localctx = VerseQLParser.Select_termsContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 159
                self.select_term()
                self.state = 164
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 160
                    self.match(VerseQLParser.COMMA)
                    self.state = 161
                    self.select_term()
                    self.state = 166
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [43]:
                localctx = VerseQLParser.Select_parameterContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 3)
                self.state = 167
                self.parameter()
                pass
            else:
                raise NoViableAltException(self)

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

    class Select_termContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_select_term

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

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

    def select_term(self):

        localctx = VerseQLParser.Select_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 28, self.RULE_select_term)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 170
            self.field()
            self.state = 173
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 2:
                self.state = 171
                self.match(VerseQLParser.AS)
                self.state = 172
                self.field()

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

    class Collection_clauseContext(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(VerseQLParser.CollectionContext, 0)

        def COLLECTION(self):
            return self.getToken(VerseQLParser.COLLECTION, 0)

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_collection_clause

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

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

    def collection_clause(self):

        localctx = VerseQLParser.Collection_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 30, self.RULE_collection_clause)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 175
            _la = self._input.LA(1)
            if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 5184) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 176
            self.collection()
        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 getRuleIndex(self):
            return VerseQLParser.RULE_collection

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Collection_parameterContext(CollectionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.CollectionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameter(self):
            return self.getTypedRuleContext(VerseQLParser.ParameterContext, 0)

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

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

    class Collection_identifierContext(CollectionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.CollectionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.IdentifierContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.IdentifierContext, i
                )

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

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

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

    def collection(self):

        localctx = VerseQLParser.CollectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_collection)
        self._la = 0  # Token type
        try:
            self.state = 187
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 5, 6, 7, 10, 12, 16, 17, 18, 19, 20, 22, 49]:
                localctx = VerseQLParser.Collection_identifierContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 1)
                self.state = 178
                self.identifier()
                self.state = 183
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 27:
                    self.state = 179
                    self.match(VerseQLParser.DOT)
                    self.state = 180
                    self.identifier()
                    self.state = 185
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [43]:
                localctx = VerseQLParser.Collection_parameterContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 2)
                self.state = 186
                self.parameter()
                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 Search_clauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def SEARCH(self):
            return self.getToken(VerseQLParser.SEARCH, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_search_clause

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

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

    def search_clause(self):

        localctx = VerseQLParser.Search_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 34, self.RULE_search_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 189
            self.match(VerseQLParser.SEARCH)
            self.state = 190
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Where_clauseContext(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(VerseQLParser.WHERE, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_where_clause

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

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

    def where_clause(self):

        localctx = VerseQLParser.Where_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 36, self.RULE_where_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 192
            self.match(VerseQLParser.WHERE)
            self.state = 193
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class 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 VerseQLParser.RULE_expression

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Expression_operandContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def operand(self):
            return self.getTypedRuleContext(VerseQLParser.OperandContext, 0)

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

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

    class Expression_notContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

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

    class Expression_orContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.lhs = None  # ExpressionContext
            self.rhs = None  # ExpressionContext
            self.copyFrom(ctx)

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

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

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

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

    class Expression_comparisonContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.lhs = None  # OperandContext
            self.op = None  # Token
            self.rhs = None  # OperandContext
            self.copyFrom(ctx)

        def operand(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(VerseQLParser.OperandContext)
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.OperandContext, i
                )

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

        def NEQ(self):
            return self.getToken(VerseQLParser.NEQ, 0)

        def GT(self):
            return self.getToken(VerseQLParser.GT, 0)

        def GT_EQ(self):
            return self.getToken(VerseQLParser.GT_EQ, 0)

        def LT(self):
            return self.getToken(VerseQLParser.LT, 0)

        def LT_EQ(self):
            return self.getToken(VerseQLParser.LT_EQ, 0)

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

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

    class Expression_comparison_inContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.lhs = None  # OperandContext
            self.not_in = None  # Token
            self.copyFrom(ctx)

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

        def PAREN_LEFT(self):
            return self.getToken(VerseQLParser.PAREN_LEFT, 0)

        def operand(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(VerseQLParser.OperandContext)
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.OperandContext, i
                )

        def PAREN_RIGHT(self):
            return self.getToken(VerseQLParser.PAREN_RIGHT, 0)

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

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

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

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

    class Expression_paranthesisContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def PAREN_LEFT(self):
            return self.getToken(VerseQLParser.PAREN_LEFT, 0)

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

        def PAREN_RIGHT(self):
            return self.getToken(VerseQLParser.PAREN_RIGHT, 0)

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

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

    class Expression_comparison_betweenContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.lhs = None  # OperandContext
            self.low = None  # OperandContext
            self.high = None  # OperandContext
            self.copyFrom(ctx)

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

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

        def operand(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(VerseQLParser.OperandContext)
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.OperandContext, i
                )

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

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

    class Expression_andContext(ExpressionContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ExpressionContext
            super().__init__(parser)
            self.lhs = None  # ExpressionContext
            self.rhs = None  # ExpressionContext
            self.copyFrom(ctx)

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

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

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

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

    def expression(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = VerseQLParser.ExpressionContext(
            self, self._ctx, _parentState
        )
        _prevctx = localctx
        _startState = 38
        self.enterRecursionRule(localctx, 38, self.RULE_expression, _p)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 229
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 11, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Expression_operandContext(
                    self, localctx
                )
                self._ctx = localctx
                _prevctx = localctx

                self.state = 196
                self.operand()
                pass

            elif la_ == 2:
                localctx = VerseQLParser.Expression_paranthesisContext(
                    self, localctx
                )
                self._ctx = localctx
                _prevctx = localctx
                self.state = 197
                self.match(VerseQLParser.PAREN_LEFT)
                self.state = 198
                self.expression(0)
                self.state = 199
                self.match(VerseQLParser.PAREN_RIGHT)
                pass

            elif la_ == 3:
                localctx = VerseQLParser.Expression_comparisonContext(
                    self, localctx
                )
                self._ctx = localctx
                _prevctx = localctx
                self.state = 201
                localctx.lhs = self.operand()
                self.state = 202
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not (
                    (((_la) & ~0x3F) == 0 and ((1 << _la) & 33822867456) != 0)
                ):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 203
                localctx.rhs = self.operand()
                pass

            elif la_ == 4:
                localctx = VerseQLParser.Expression_comparison_betweenContext(
                    self, localctx
                )
                self._ctx = localctx
                _prevctx = localctx
                self.state = 205
                localctx.lhs = self.operand()
                self.state = 206
                self.match(VerseQLParser.BETWEEN)
                self.state = 207
                localctx.low = self.operand()
                self.state = 208
                self.match(VerseQLParser.AND)
                self.state = 209
                localctx.high = self.operand()
                pass

            elif la_ == 5:
                localctx = VerseQLParser.Expression_comparison_inContext(
                    self, localctx
                )
                self._ctx = localctx
                _prevctx = localctx
                self.state = 211
                localctx.lhs = self.operand()
                self.state = 213
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 13:
                    self.state = 212
                    localctx.not_in = self.match(VerseQLParser.NOT)

                self.state = 215
                self.match(VerseQLParser.IN)
                self.state = 216
                self.match(VerseQLParser.PAREN_LEFT)
                self.state = 217
                self.operand()
                self.state = 222
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 218
                    self.match(VerseQLParser.COMMA)
                    self.state = 219
                    self.operand()
                    self.state = 224
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 225
                self.match(VerseQLParser.PAREN_RIGHT)
                pass

            elif la_ == 6:
                localctx = VerseQLParser.Expression_notContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 227
                self.match(VerseQLParser.NOT)
                self.state = 228
                self.expression(3)
                pass

            self._ctx.stop = self._input.LT(-1)
            self.state = 239
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 13, 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 = 237
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(
                        self._input, 12, self._ctx
                    )
                    if la_ == 1:
                        localctx = VerseQLParser.Expression_andContext(
                            self,
                            VerseQLParser.ExpressionContext(
                                self, _parentctx, _parentState
                            ),
                        )
                        localctx.lhs = _prevctx
                        self.pushNewRecursionContext(
                            localctx, _startState, self.RULE_expression
                        )
                        self.state = 231
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import (
                                FailedPredicateException,
                            )

                            raise FailedPredicateException(
                                self, "self.precpred(self._ctx, 2)"
                            )
                        self.state = 232
                        self.match(VerseQLParser.AND)
                        self.state = 233
                        localctx.rhs = self.expression(3)
                        pass

                    elif la_ == 2:
                        localctx = VerseQLParser.Expression_orContext(
                            self,
                            VerseQLParser.ExpressionContext(
                                self, _parentctx, _parentState
                            ),
                        )
                        localctx.lhs = _prevctx
                        self.pushNewRecursionContext(
                            localctx, _startState, self.RULE_expression
                        )
                        self.state = 234
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import (
                                FailedPredicateException,
                            )

                            raise FailedPredicateException(
                                self, "self.precpred(self._ctx, 1)"
                            )
                        self.state = 235
                        self.match(VerseQLParser.OR)
                        self.state = 236
                        localctx.rhs = self.expression(2)
                        pass

                self.state = 241
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 13, 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 OperandContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_operand

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Operand_fieldContext(OperandContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.OperandContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def field(self):
            return self.getTypedRuleContext(VerseQLParser.FieldContext, 0)

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

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

    class Operand_valueContext(OperandContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.OperandContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

    class Operand_refContext(OperandContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.OperandContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def ref(self):
            return self.getTypedRuleContext(VerseQLParser.RefContext, 0)

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

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

    class Operand_parameterContext(OperandContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.OperandContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameter(self):
            return self.getTypedRuleContext(VerseQLParser.ParameterContext, 0)

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

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

    class Operand_functionContext(OperandContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.OperandContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def function(self):
            return self.getTypedRuleContext(VerseQLParser.FunctionContext, 0)

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

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

    def operand(self):

        localctx = VerseQLParser.OperandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_operand)
        try:
            self.state = 247
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 14, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Operand_valueContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 242
                self.value()
                pass

            elif la_ == 2:
                localctx = VerseQLParser.Operand_fieldContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 243
                self.field()
                pass

            elif la_ == 3:
                localctx = VerseQLParser.Operand_parameterContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 3)
                self.state = 244
                self.parameter()
                pass

            elif la_ == 4:
                localctx = VerseQLParser.Operand_refContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 245
                self.ref()
                pass

            elif la_ == 5:
                localctx = VerseQLParser.Operand_functionContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 5)
                self.state = 246
                self.function()
                pass

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

    class Order_by_clauseContext(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(VerseQLParser.ORDER, 0)

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

        def order_by(self):
            return self.getTypedRuleContext(VerseQLParser.Order_byContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_order_by_clause

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

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

    def order_by_clause(self):

        localctx = VerseQLParser.Order_by_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 42, self.RULE_order_by_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 249
            self.match(VerseQLParser.ORDER)
            self.state = 250
            self.match(VerseQLParser.BY)
            self.state = 251
            self.order_by()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Order_byContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_order_by

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Order_by_parameterContext(Order_byContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.Order_byContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameter(self):
            return self.getTypedRuleContext(VerseQLParser.ParameterContext, 0)

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

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

    class Order_by_termsContext(Order_byContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.Order_byContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def order_by_term(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Order_by_termContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Order_by_termContext, i
                )

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

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

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

    def order_by(self):

        localctx = VerseQLParser.Order_byContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_order_by)
        self._la = 0  # Token type
        try:
            self.state = 262
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 5, 6, 7, 10, 12, 16, 17, 18, 19, 20, 22, 49]:
                localctx = VerseQLParser.Order_by_termsContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 253
                self.order_by_term()
                self.state = 258
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 254
                    self.match(VerseQLParser.COMMA)
                    self.state = 255
                    self.order_by_term()
                    self.state = 260
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [43]:
                localctx = VerseQLParser.Order_by_parameterContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 2)
                self.state = 261
                self.parameter()
                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 Order_by_termContext(ParserRuleContext):
        __slots__ = "parser"

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

        def field(self):
            return self.getTypedRuleContext(VerseQLParser.FieldContext, 0)

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_order_by_term

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

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

    def order_by_term(self):

        localctx = VerseQLParser.Order_by_termContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 46, self.RULE_order_by_term)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 264
            self.field()
            self.state = 266
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 17, self._ctx)
            if la_ == 1:
                self.state = 265
                localctx.direction = self._input.LT(1)
                _la = self._input.LA(1)
                if not (_la == 3 or _la == 7):
                    localctx.direction = 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 Rank_by_clauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RANK(self):
            return self.getToken(VerseQLParser.RANK, 0)

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_rank_by_clause

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

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

    def rank_by_clause(self):

        localctx = VerseQLParser.Rank_by_clauseContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 48, self.RULE_rank_by_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 268
            self.match(VerseQLParser.RANK)
            self.state = 269
            self.match(VerseQLParser.BY)
            self.state = 270
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Set_clauseContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def update(self):
            return self.getTypedRuleContext(VerseQLParser.UpdateContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_set_clause

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

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

    def set_clause(self):

        localctx = VerseQLParser.Set_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_set_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            self.match(VerseQLParser.SET)
            self.state = 273
            self.update()
        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 getRuleIndex(self):
            return VerseQLParser.RULE_update

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Update_operationsContext(UpdateContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.UpdateContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def update_operation(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Update_operationContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Update_operationContext, i
                )

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

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

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

    class Update_parameterContext(UpdateContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.UpdateContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameter(self):
            return self.getTypedRuleContext(VerseQLParser.ParameterContext, 0)

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

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

    def update(self):

        localctx = VerseQLParser.UpdateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_update)
        self._la = 0  # Token type
        try:
            self.state = 284
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 5, 6, 7, 10, 12, 16, 17, 18, 19, 20, 22, 49]:
                localctx = VerseQLParser.Update_operationsContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 1)
                self.state = 275
                self.update_operation()
                self.state = 280
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 276
                    self.match(VerseQLParser.COMMA)
                    self.state = 277
                    self.update_operation()
                    self.state = 282
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [43]:
                localctx = VerseQLParser.Update_parameterContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 2)
                self.state = 283
                self.parameter()
                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 Update_operationContext(ParserRuleContext):
        __slots__ = "parser"

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

        def field(self):
            return self.getTypedRuleContext(VerseQLParser.FieldContext, 0)

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

        def function(self):
            return self.getTypedRuleContext(VerseQLParser.FunctionContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_update_operation

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

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

    def update_operation(self):

        localctx = VerseQLParser.Update_operationContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 54, self.RULE_update_operation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 286
            self.field()
            self.state = 287
            self.match(VerseQLParser.EQ)
            self.state = 288
            self.function()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FunctionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def function_args(self):
            return self.getTypedRuleContext(
                VerseQLParser.Function_argsContext, 0
            )

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.IdentifierContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.IdentifierContext, i
                )

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_function

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

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

    def function(self):

        localctx = VerseQLParser.FunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_function)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 20, self._ctx)
            if la_ == 1:
                self.state = 290
                localctx.namespace = self.identifier()
                self.state = 291
                self.match(VerseQLParser.DOT)

            self.state = 295
            localctx.name = self.identifier()
            self.state = 296
            self.function_args()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Function_argsContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_function_args

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Function_no_argsContext(Function_argsContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.Function_argsContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def PAREN_LEFT(self):
            return self.getToken(VerseQLParser.PAREN_LEFT, 0)

        def PAREN_RIGHT(self):
            return self.getToken(VerseQLParser.PAREN_RIGHT, 0)

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

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

    class Function_with_argsContext(Function_argsContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.Function_argsContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def PAREN_LEFT(self):
            return self.getToken(VerseQLParser.PAREN_LEFT, 0)

        def operand(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(VerseQLParser.OperandContext)
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.OperandContext, i
                )

        def PAREN_RIGHT(self):
            return self.getToken(VerseQLParser.PAREN_RIGHT, 0)

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

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

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

    class Function_with_named_argsContext(Function_argsContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.Function_argsContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def PAREN_LEFT(self):
            return self.getToken(VerseQLParser.PAREN_LEFT, 0)

        def named_arg(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Named_argContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Named_argContext, i
                )

        def PAREN_RIGHT(self):
            return self.getToken(VerseQLParser.PAREN_RIGHT, 0)

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

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

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

    def function_args(self):

        localctx = VerseQLParser.Function_argsContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 58, self.RULE_function_args)
        self._la = 0  # Token type
        try:
            self.state = 322
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 23, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Function_no_argsContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 1)
                self.state = 298
                self.match(VerseQLParser.PAREN_LEFT)
                self.state = 299
                self.match(VerseQLParser.PAREN_RIGHT)
                pass

            elif la_ == 2:
                localctx = VerseQLParser.Function_with_argsContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 2)
                self.state = 300
                self.match(VerseQLParser.PAREN_LEFT)
                self.state = 301
                self.operand()
                self.state = 306
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 302
                    self.match(VerseQLParser.COMMA)
                    self.state = 303
                    self.operand()
                    self.state = 308
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 309
                self.match(VerseQLParser.PAREN_RIGHT)
                pass

            elif la_ == 3:
                localctx = VerseQLParser.Function_with_named_argsContext(
                    self, localctx
                )
                self.enterOuterAlt(localctx, 3)
                self.state = 311
                self.match(VerseQLParser.PAREN_LEFT)
                self.state = 312
                self.named_arg()
                self.state = 317
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 313
                    self.match(VerseQLParser.COMMA)
                    self.state = 314
                    self.named_arg()
                    self.state = 319
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 320
                self.match(VerseQLParser.PAREN_RIGHT)
                pass

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

    class Named_argContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def operand(self):
            return self.getTypedRuleContext(VerseQLParser.OperandContext, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_named_arg

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

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

    def named_arg(self):

        localctx = VerseQLParser.Named_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_named_arg)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 324
            localctx.name = self.identifier()
            self.state = 325
            self.match(VerseQLParser.EQ)
            self.state = 326
            self.operand()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RefContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

        def ref_path(self):
            return self.getTypedRuleContext(VerseQLParser.Ref_pathContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_ref

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

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

    def ref(self):

        localctx = VerseQLParser.RefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_ref)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 328
            self.match(VerseQLParser.BRACE_LEFT)
            self.state = 329
            self.match(VerseQLParser.BRACE_LEFT)
            self.state = 330
            localctx.path = self.ref_path()
            self.state = 331
            self.match(VerseQLParser.BRACE_RIGHT)
            self.state = 332
            self.match(VerseQLParser.BRACE_RIGHT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Ref_pathContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.IdentifierContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.IdentifierContext, i
                )

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

        def field(self):
            return self.getTypedRuleContext(VerseQLParser.FieldContext, 0)

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_ref_path

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

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

    def ref_path(self):

        localctx = VerseQLParser.Ref_pathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_ref_path)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 339
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 24, self._ctx)
            if la_ == 1:
                self.state = 334
                self.identifier()
                self.state = 335
                self.match(VerseQLParser.COLON)
                self.state = 336
                self.match(VerseQLParser.SLASH)
                self.state = 337
                self.match(VerseQLParser.SLASH)

            self.state = 341
            self.identifier()
            self.state = 342
            self.match(VerseQLParser.DOT)
            self.state = 343
            self.field()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ParameterContext(ParserRuleContext):
        __slots__ = "parser"

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

        def AT(self):
            return self.getToken(VerseQLParser.AT, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_parameter

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

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

    def parameter(self):

        localctx = VerseQLParser.ParameterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_parameter)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 345
            self.match(VerseQLParser.AT)
            self.state = 346
            localctx.name = self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FieldContext(ParserRuleContext):
        __slots__ = "parser"

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

        def field_primitive(self):
            return self.getTypedRuleContext(
                VerseQLParser.Field_primitiveContext, 0
            )

        def field_path(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Field_pathContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Field_pathContext, i
                )

        def getRuleIndex(self):
            return VerseQLParser.RULE_field

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

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

    def field(self):

        localctx = VerseQLParser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_field)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 348
            self.field_primitive()
            self.state = 352
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 25, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 349
                    self.field_path()
                self.state = 354
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 25, 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 Field_pathContext(ParserRuleContext):
        __slots__ = "parser"

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

        def BRACKET_LEFT(self):
            return self.getToken(VerseQLParser.BRACKET_LEFT, 0)

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

        def BRACKET_RIGHT(self):
            return self.getToken(VerseQLParser.BRACKET_RIGHT, 0)

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

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

        def field_primitive(self):
            return self.getTypedRuleContext(
                VerseQLParser.Field_primitiveContext, 0
            )

        def getRuleIndex(self):
            return VerseQLParser.RULE_field_path

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

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

    def field_path(self):

        localctx = VerseQLParser.Field_pathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_field_path)
        try:
            self.state = 364
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 26, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 355
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 356
                self.value()
                self.state = 357
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 359
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 360
                self.match(VerseQLParser.MINUS)
                self.state = 361
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 362
                self.match(VerseQLParser.DOT)
                self.state = 363
                self.field_primitive()
                pass

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

    class Field_primitiveContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_field_primitive

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

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

    def field_primitive(self):

        localctx = VerseQLParser.Field_primitiveContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 72, self.RULE_field_primitive)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 366
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ValueContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_value

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Value_jsonContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def json(self):
            return self.getTypedRuleContext(VerseQLParser.JsonContext, 0)

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

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

    class Value_integerContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LITERAL_INTEGER(self):
            return self.getToken(VerseQLParser.LITERAL_INTEGER, 0)

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

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

    class Value_trueContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

    class Value_falseContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

    class Value_stringContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def literal_string(self):
            return self.getTypedRuleContext(
                VerseQLParser.Literal_stringContext, 0
            )

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

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

    class Value_nullContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

    class Value_decimalContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LITERAL_DECIMAL(self):
            return self.getToken(VerseQLParser.LITERAL_DECIMAL, 0)

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

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

    class Value_arrayContext(ValueContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def array(self):
            return self.getTypedRuleContext(VerseQLParser.ArrayContext, 0)

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

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

    def value(self):

        localctx = VerseQLParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_value)
        try:
            self.state = 376
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 27, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Value_nullContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 368
                self.match(VerseQLParser.NULL)
                pass

            elif la_ == 2:
                localctx = VerseQLParser.Value_trueContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 369
                self.match(VerseQLParser.TRUE)
                pass

            elif la_ == 3:
                localctx = VerseQLParser.Value_falseContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 370
                self.match(VerseQLParser.FALSE)
                pass

            elif la_ == 4:
                localctx = VerseQLParser.Value_stringContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 371
                self.literal_string()
                pass

            elif la_ == 5:
                localctx = VerseQLParser.Value_integerContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 372
                self.match(VerseQLParser.LITERAL_INTEGER)
                pass

            elif la_ == 6:
                localctx = VerseQLParser.Value_decimalContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 373
                self.match(VerseQLParser.LITERAL_DECIMAL)
                pass

            elif la_ == 7:
                localctx = VerseQLParser.Value_jsonContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 374
                self.json()
                pass

            elif la_ == 8:
                localctx = VerseQLParser.Value_arrayContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 375
                self.array()
                pass

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

    class Literal_stringContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LITERAL_STRING_SINGLE(self):
            return self.getToken(VerseQLParser.LITERAL_STRING_SINGLE, 0)

        def LITERAL_STRING_DOUBLE(self):
            return self.getToken(VerseQLParser.LITERAL_STRING_DOUBLE, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_literal_string

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

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

    def literal_string(self):

        localctx = VerseQLParser.Literal_stringContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 76, self.RULE_literal_string)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 378
            _la = self._input.LA(1)
            if not (_la == 45 or _la == 46):
                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 ArrayContext(ParserRuleContext):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_array

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Array_itemsContext(ArrayContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ArrayContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def BRACKET_LEFT(self):
            return self.getToken(VerseQLParser.BRACKET_LEFT, 0)

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

        def BRACKET_RIGHT(self):
            return self.getToken(VerseQLParser.BRACKET_RIGHT, 0)

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

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

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

    class Array_emptyContext(ArrayContext):

        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a VerseQLParser.ArrayContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def BRACKET_LEFT(self):
            return self.getToken(VerseQLParser.BRACKET_LEFT, 0)

        def BRACKET_RIGHT(self):
            return self.getToken(VerseQLParser.BRACKET_RIGHT, 0)

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

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

    def array(self):

        localctx = VerseQLParser.ArrayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_array)
        self._la = 0  # Token type
        try:
            self.state = 393
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 29, self._ctx)
            if la_ == 1:
                localctx = VerseQLParser.Array_emptyContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 380
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 381
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

            elif la_ == 2:
                localctx = VerseQLParser.Array_itemsContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 382
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 383
                self.value()
                self.state = 388
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 384
                    self.match(VerseQLParser.COMMA)
                    self.state = 385
                    self.value()
                    self.state = 390
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 391
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

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

    class JsonContext(ParserRuleContext):
        __slots__ = "parser"

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

        def json_value(self):
            return self.getTypedRuleContext(VerseQLParser.Json_valueContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_json

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

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

    def json(self):

        localctx = VerseQLParser.JsonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_json)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 395
            self.json_value()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Json_objContext(ParserRuleContext):
        __slots__ = "parser"

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

        def BRACE_LEFT(self):
            return self.getToken(VerseQLParser.BRACE_LEFT, 0)

        def json_pair(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Json_pairContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Json_pairContext, i
                )

        def BRACE_RIGHT(self):
            return self.getToken(VerseQLParser.BRACE_RIGHT, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_obj

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

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

    def json_obj(self):

        localctx = VerseQLParser.Json_objContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_json_obj)
        self._la = 0  # Token type
        try:
            self.state = 410
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 31, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 397
                self.match(VerseQLParser.BRACE_LEFT)
                self.state = 398
                self.json_pair()
                self.state = 403
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 399
                    self.match(VerseQLParser.COMMA)
                    self.state = 400
                    self.json_pair()
                    self.state = 405
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 406
                self.match(VerseQLParser.BRACE_RIGHT)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 408
                self.match(VerseQLParser.BRACE_LEFT)
                self.state = 409
                self.match(VerseQLParser.BRACE_RIGHT)
                pass

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

    class Json_pairContext(ParserRuleContext):
        __slots__ = "parser"

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

        def json_string(self):
            return self.getTypedRuleContext(
                VerseQLParser.Json_stringContext, 0
            )

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

        def json_value(self):
            return self.getTypedRuleContext(VerseQLParser.Json_valueContext, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_pair

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

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

    def json_pair(self):

        localctx = VerseQLParser.Json_pairContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_json_pair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 412
            self.json_string()
            self.state = 413
            self.match(VerseQLParser.COLON)
            self.state = 414
            self.json_value()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Json_arrContext(ParserRuleContext):
        __slots__ = "parser"

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

        def BRACKET_LEFT(self):
            return self.getToken(VerseQLParser.BRACKET_LEFT, 0)

        def json_value(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    VerseQLParser.Json_valueContext
                )
            else:
                return self.getTypedRuleContext(
                    VerseQLParser.Json_valueContext, i
                )

        def BRACKET_RIGHT(self):
            return self.getToken(VerseQLParser.BRACKET_RIGHT, 0)

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_arr

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

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

    def json_arr(self):

        localctx = VerseQLParser.Json_arrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_json_arr)
        self._la = 0  # Token type
        try:
            self.state = 429
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 33, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 416
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 417
                self.json_value()
                self.state = 422
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 23:
                    self.state = 418
                    self.match(VerseQLParser.COMMA)
                    self.state = 419
                    self.json_value()
                    self.state = 424
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 425
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 427
                self.match(VerseQLParser.BRACKET_LEFT)
                self.state = 428
                self.match(VerseQLParser.BRACKET_RIGHT)
                pass

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

    class Json_valueContext(ParserRuleContext):
        __slots__ = "parser"

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

        def json_string(self):
            return self.getTypedRuleContext(
                VerseQLParser.Json_stringContext, 0
            )

        def json_number(self):
            return self.getTypedRuleContext(
                VerseQLParser.Json_numberContext, 0
            )

        def json_obj(self):
            return self.getTypedRuleContext(VerseQLParser.Json_objContext, 0)

        def json_arr(self):
            return self.getTypedRuleContext(VerseQLParser.Json_arrContext, 0)

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

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

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

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_value

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

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

    def json_value(self):

        localctx = VerseQLParser.Json_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_json_value)
        try:
            self.state = 438
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [46]:
                self.enterOuterAlt(localctx, 1)
                self.state = 431
                self.json_string()
                pass
            elif token in [47, 48]:
                self.enterOuterAlt(localctx, 2)
                self.state = 432
                self.json_number()
                pass
            elif token in [37]:
                self.enterOuterAlt(localctx, 3)
                self.state = 433
                self.json_obj()
                pass
            elif token in [35]:
                self.enterOuterAlt(localctx, 4)
                self.state = 434
                self.json_arr()
                pass
            elif token in [21]:
                self.enterOuterAlt(localctx, 5)
                self.state = 435
                self.match(VerseQLParser.TRUE)
                pass
            elif token in [9]:
                self.enterOuterAlt(localctx, 6)
                self.state = 436
                self.match(VerseQLParser.FALSE)
                pass
            elif token in [14]:
                self.enterOuterAlt(localctx, 7)
                self.state = 437
                self.match(VerseQLParser.NULL)
                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 Json_stringContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LITERAL_STRING_DOUBLE(self):
            return self.getToken(VerseQLParser.LITERAL_STRING_DOUBLE, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_string

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

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

    def json_string(self):

        localctx = VerseQLParser.Json_stringContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 90, self.RULE_json_string)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 440
            self.match(VerseQLParser.LITERAL_STRING_DOUBLE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Json_numberContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LITERAL_INTEGER(self):
            return self.getToken(VerseQLParser.LITERAL_INTEGER, 0)

        def LITERAL_DECIMAL(self):
            return self.getToken(VerseQLParser.LITERAL_DECIMAL, 0)

        def getRuleIndex(self):
            return VerseQLParser.RULE_json_number

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

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

    def json_number(self):

        localctx = VerseQLParser.Json_numberContext(
            self, self._ctx, self.state
        )
        self.enterRule(localctx, 92, self.RULE_json_number)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            _la = self._input.LA(1)
            if not (_la == 47 or _la == 48):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    def sempred(self, localctx: RuleContext, ruleIndex: int, predIndex: int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[19] = 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, 2)

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