#!/usr/bin/env python
# -*- coding: utf-8 -*-

# CAVEAT UTILITOR
#
# This file was automatically generated by Grako.
#
#    https://pypi.python.org/pypi/grako/
#
# Any changes you make to it will be overwritten the next time
# the file is generated.


from __future__ import print_function, division, absolute_import, unicode_literals

from grako.parsing import graken, Parser
from grako.util import re, RE_FLAGS, generic_main  # noqa


__version__ = (2016, 8, 1, 1, 12, 26, 0)

__all__ = [
    'SqlParser',
    'SqlSemantics',
    'main'
]

KEYWORDS = set([])


class SqlParser(Parser):
    def __init__(self,
                 whitespace='\\s+',
                 nameguard=None,
                 comments_re='/\\*[\\s\\S]*?\\*/',
                 eol_comments_re='--.*?$',
                 ignorecase=True,
                 left_recursion=True,
                 keywords=KEYWORDS,
                 namechars='',
                 **kwargs):
        super(SqlParser, self).__init__(
            whitespace=whitespace,
            nameguard=nameguard,
            comments_re=comments_re,
            eol_comments_re=eol_comments_re,
            ignorecase=ignorecase,
            left_recursion=left_recursion,
            keywords=keywords,
            namechars=namechars,
            **kwargs
        )

    @graken()
    def _digit_(self):
        self._pattern(r'\d+')

    @graken()
    def _double_quote_(self):
        self._token('"')

    @graken()
    def _quote_(self):
        self._token("'")

    @graken()
    def _left_paren_(self):
        self._token('(')

    @graken()
    def _right_paren_(self):
        self._token(')')

    @graken()
    def _asterisk_(self):
        self._token('*')

    @graken()
    def _plus_sign_(self):
        self._token('+')

    @graken()
    def _comma_(self):
        self._token(',')

    @graken()
    def _minus_sign_(self):
        self._token('-')

    @graken()
    def _period_(self):
        self._token('.')

    @graken()
    def _solidus_(self):
        self._token('/')

    @graken()
    def _colon_(self):
        self._token(':')

    @graken()
    def _semicolon_(self):
        self._token(';')

    @graken()
    def _less_than_operator_(self):
        self._token('<')

    @graken()
    def _equals_operator_(self):
        self._token('=')

    @graken()
    def _greater_than_operator_(self):
        self._token('>')

    @graken()
    def _question_mark_(self):
        self._token('?')

    @graken()
    def _left_bracket_or_trigraph_(self):
        with self._choice():
            with self._option():
                self._left_bracket_()
            with self._option():
                self._left_bracket_trigraph_()
            self._error('no available options')

    @graken()
    def _right_bracket_or_trigraph_(self):
        with self._choice():
            with self._option():
                self._right_bracket_()
            with self._option():
                self._right_bracket_trigraph_()
            self._error('no available options')

    @graken()
    def _left_bracket_(self):
        self._token('[')

    @graken()
    def _left_bracket_trigraph_(self):
        self._token('??(')

    @graken()
    def _right_bracket_(self):
        self._token(']')

    @graken()
    def _right_bracket_trigraph_(self):
        self._token('??)')

    @graken()
    def _underscore_(self):
        self._token('_')

    @graken()
    def _regular_identifier_(self):
        self._pattern(r'[a-z]\w*')
        self._check_name()

    @graken()
    def _large_object_length_token_(self):
        self._digit_()
        self._multiplier_()

    @graken()
    def _multiplier_(self):
        with self._choice():
            with self._option():
                self._token('K')
            with self._option():
                self._token('M')
            with self._option():
                self._token('G')
            with self._option():
                self._token('T')
            with self._option():
                self._token('P')
            self._error('expecting one of: G K M P T')

    @graken()
    def _delimited_identifier_(self):
        self._double_quote_()
        self._delimited_identifier_body_()
        self._double_quote_()

    @graken()
    def _delimited_identifier_body_(self):
        self._pattern(r'(""|[^"\n])+')

    @graken()
    def _delimited_identifier_part_(self):
        self._pattern(r'(""|[^"\n])')

    @graken()
    def _unicode_delimited_identifier_(self):
        self._token('U&')
        self._double_quote_()
        self._unicode_delimiter_body_()
        self._double_quote_()
        self._unicode_escape_specifier_()

    @graken()
    def _unicode_escape_specifier_(self):
        with self._optional():
            self._token('UESCAPE')
            self._quote_()
            self._unicode_escape_character_()
            self._quote_()

    @graken()
    def _unicode_delimiter_body_(self):

        def block0():
            self._unicode_identifier_part_()
        self._positive_closure(block0)

    @graken()
    def _unicode_identifier_part_(self):
        with self._choice():
            with self._option():
                self._delimited_identifier_part_()
            with self._option():
                self._unicode_escape_value_()
            self._error('no available options')

    @graken()
    def _unicode_escape_value_(self):
        with self._choice():
            with self._option():
                self._unicode_4_digit_escape_value_()
            with self._option():
                self._unicode_6_digit_escape_value_()
            with self._option():
                self._unicode_character_escape_value_()
            self._error('no available options')

    @graken()
    def _unicode_4_digit_escape_value_(self):
        self._unicode_escape_character_()
        self._byte_()
        self._byte_()

    @graken()
    def _unicode_6_digit_escape_value_(self):
        self._unicode_escape_character_()
        self._plus_sign_()
        self._byte_()
        self._byte_()
        self._byte_()

    @graken()
    def _unicode_character_escape_value_(self):
        self._unicode_escape_character_()
        self._unicode_escape_character_()

    @graken()
    def _unicode_escape_character_(self):
        self._token('\\U')

    @graken()
    def _not_equals_operator_(self):
        self._token('<>')

    @graken()
    def _greater_than_or_equals_operator_(self):
        self._token('>=')

    @graken()
    def _less_than_or_equals_operator_(self):
        self._token('<=')

    @graken()
    def _concatenation_operator_(self):
        self._token('||')

    @graken()
    def _right_arrow_(self):
        self._token('->')

    @graken()
    def _double_colon_(self):
        self._token('::')

    @graken()
    def _named_argument_assignment_token_(self):
        self._token('=>')

    @graken()
    def _literal_(self):
        with self._choice():
            with self._option():
                self._signed_numeric_literal_()
            with self._option():
                self._general_literal_()
            self._error('no available options')

    @graken()
    def _unsigned_literal_(self):
        with self._choice():
            with self._option():
                self._unsigned_numeric_literal_()
            with self._option():
                self._general_literal_()
            self._error('no available options')

    @graken()
    def _general_literal_(self):
        with self._choice():
            with self._option():
                self._character_string_literal_()
            with self._option():
                self._national_character_string_literal_()
            with self._option():
                self._unicode_character_string_literal_()
            with self._option():
                self._binary_string_literal_()
            with self._option():
                self._datetime_literal_()
            with self._option():
                self._interval_literal_()
            with self._option():
                self._boolean_literal_()
            self._error('no available options')

    @graken()
    def _character_string_literal_(self):
        with self._optional():
            self._underscore_()
            self._character_set_name_()

        def block0():
            self._quote_()
            self._character_representation_()
            self._quote_()
        self._positive_closure(block0)

    @graken()
    def _character_representation_(self):
        self._pattern(r"(''|[^'\n])*")

    @graken()
    def _national_character_string_literal_(self):
        self._token('N')

        def block0():
            self._quote_()
            self._character_representation_()
            self._quote_()
        self._positive_closure(block0)

    @graken()
    def _unicode_character_string_literal_(self):
        with self._optional():
            self._underscore_()
            self._character_set_name_()
        self._token('U&')

        def block0():
            self._quote_()
            with self._optional():

                def block1():
                    self._unicode_representation_()
                self._positive_closure(block1)
            self._quote_()
        self._positive_closure(block0)
        self._unicode_escape_specifier_()

    @graken()
    def _unicode_representation_(self):
        with self._choice():
            with self._option():
                self._character_representation_()
            with self._option():
                self._unicode_escape_value_()
            self._error('no available options')

    @graken()
    def _binary_string_literal_(self):
        self._token('X')

        def block0():
            self._quote_()
            with self._optional():

                def block1():
                    self._byte_()
                self._positive_closure(block1)
            self._quote_()
        self._positive_closure(block0)

    @graken()
    def _hexit_(self):
        self._pattern(r'[a-f\d]')

    @graken()
    def _byte_(self):
        self._hexit_()
        self._hexit_()

    @graken()
    def _signed_numeric_literal_(self):
        with self._optional():
            self._sign_()
        self._unsigned_numeric_literal_()

    @graken()
    def _unsigned_numeric_literal_(self):
        with self._choice():
            with self._option():
                self._exact_numeric_literal_()
            with self._option():
                self._approximate_numeric_literal_()
            self._error('no available options')

    @graken()
    def _exact_numeric_literal_(self):
        with self._choice():
            with self._option():
                self._unsigned_integer_()
                with self._optional():
                    self._period_()
                    with self._optional():
                        self._unsigned_integer_()
            with self._option():
                self._period_()
                self._unsigned_integer_()
            self._error('no available options')

    @graken()
    def _sign_(self):
        with self._choice():
            with self._option():
                self._plus_sign_()
            with self._option():
                self._minus_sign_()
            self._error('no available options')

    @graken()
    def _approximate_numeric_literal_(self):
        self._exact_numeric_literal_()
        self._token('E')
        self._signed_integer_()

    @graken()
    def _signed_integer_(self):
        with self._optional():
            self._sign_()
        self._unsigned_integer_()

    @graken()
    def _unsigned_integer_(self):
        self._digit_()

    @graken()
    def _datetime_literal_(self):
        with self._choice():
            with self._option():
                self._date_literal_()
            with self._option():
                self._time_literal_()
            with self._option():
                self._timestamp_literal_()
            self._error('no available options')

    @graken()
    def _date_literal_(self):
        self._token('DATE')
        self._date_string_()

    @graken()
    def _time_literal_(self):
        self._token('TIME')
        self._time_string_()

    @graken()
    def _timestamp_literal_(self):
        self._token('TIMESTAMP')
        self._timestamp_string_()

    @graken()
    def _date_string_(self):
        self._quote_()
        self._unquoted_date_string_()
        self._quote_()

    @graken()
    def _time_string_(self):
        self._quote_()
        self._unquoted_time_string_()
        self._quote_()

    @graken()
    def _timestamp_string_(self):
        self._quote_()
        self._unquoted_timestamp_string_()
        self._quote_()

    @graken()
    def _time_zone_interval_(self):
        self._sign_()
        self._hours_value_()
        self._colon_()
        self._minutes_value_()

    @graken()
    def _date_value_(self):
        self._years_value_()
        self._minus_sign_()
        self._months_value_()
        self._minus_sign_()
        self._days_value_()

    @graken()
    def _time_value_(self):
        self._hours_value_()
        self._colon_()
        self._minutes_value_()
        self._colon_()
        self._seconds_value_()

    @graken()
    def _interval_literal_(self):
        self._token('INTERVAL')
        with self._optional():
            self._sign_()
        self._interval_string_()
        self._interval_qualifier_()

    @graken()
    def _interval_string_(self):
        self._quote_()
        self._unquoted_interval_string_()
        self._quote_()

    @graken()
    def _unquoted_date_string_(self):
        self._date_value_()

    @graken()
    def _unquoted_time_string_(self):
        self._time_value_()
        with self._optional():
            self._time_zone_interval_()

    @graken()
    def _unquoted_timestamp_string_(self):
        self._unquoted_date_string_()
        self._unquoted_time_string_()

    @graken()
    def _unquoted_interval_string_(self):
        with self._optional():
            self._sign_()
        with self._group():
            with self._choice():
                with self._option():
                    self._year_month_literal_()
                with self._option():
                    self._day_time_literal_()
                self._error('no available options')

    @graken()
    def _year_month_literal_(self):
        with self._choice():
            with self._option():
                self._years_value_()
                with self._optional():
                    self._minus_sign_()
                    self._months_value_()
            with self._option():
                self._months_value_()
            self._error('no available options')

    @graken()
    def _day_time_literal_(self):
        with self._choice():
            with self._option():
                self._day_time_interval_()
            with self._option():
                self._time_interval_()
            self._error('no available options')

    @graken()
    def _day_time_interval_(self):
        self._days_value_()
        with self._optional():
            self._hours_value_()
            with self._optional():
                self._colon_()
                self._minutes_value_()
                with self._optional():
                    self._colon_()
                    self._seconds_value_()

    @graken()
    def _time_interval_(self):
        with self._choice():
            with self._option():
                self._hours_value_()
                with self._optional():
                    self._colon_()
                    self._minutes_value_()
                    with self._optional():
                        self._colon_()
                        self._seconds_value_()
            with self._option():
                self._minutes_value_()
                with self._optional():
                    self._colon_()
                    self._seconds_value_()
            with self._option():
                self._seconds_value_()
            self._error('no available options')

    @graken()
    def _years_value_(self):
        self._datetime_value_()

    @graken()
    def _months_value_(self):
        self._datetime_value_()

    @graken()
    def _days_value_(self):
        self._datetime_value_()

    @graken()
    def _hours_value_(self):
        self._datetime_value_()

    @graken()
    def _minutes_value_(self):
        self._datetime_value_()

    @graken()
    def _seconds_value_(self):
        self._unsigned_integer_()
        with self._optional():
            self._period_()
            with self._optional():
                self._unsigned_integer_()

    @graken()
    def _datetime_value_(self):
        self._unsigned_integer_()

    @graken()
    def _boolean_literal_(self):
        with self._choice():
            with self._option():
                self._token('TRUE')
            with self._option():
                self._token('FALSE')
            with self._option():
                self._token('UNKNOWN')
            self._error('expecting one of: FALSE TRUE UNKNOWN')

    @graken()
    def _identifier_(self):
        self._actual_identifier_()

    @graken()
    def _identifier_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._identifier_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _actual_identifier_(self):
        with self._choice():
            with self._option():
                self._regular_identifier_()
            with self._option():
                self._delimited_identifier_()
            with self._option():
                self._unicode_delimited_identifier_()
            self._error('no available options')

    @graken()
    def _table_name_(self):
        self._local_or_schema_qualified_name_()

    @graken()
    def _schema_name_(self):
        with self._optional():
            self._identifier_()
            self._period_()
        self._identifier_()

    @graken()
    def _schema_qualified_name_(self):
        with self._optional():
            self._schema_name_()
            self._period_()
        self._identifier_()

    @graken()
    def _local_or_schema_qualified_name_(self):
        with self._optional():
            self._local_or_schema_qualifier_()
            self._period_()
        self._identifier_()

    @graken()
    def _local_or_schema_qualifier_(self):
        with self._choice():
            with self._option():
                self._schema_name_()
            with self._option():
                self._token('MODULE')
            self._error('expecting one of: MODULE')

    @graken()
    def _cursor_name_(self):
        self._local_qualified_name_()

    @graken()
    def _local_qualified_name_(self):
        with self._optional():
            self._token('MODULE')
            self._period_()
        self._identifier_()

    @graken()
    def _host_parameter_name_(self):
        self._colon_()
        self._identifier_()

    @graken()
    def _external_routine_name_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                self._character_string_literal_()
            self._error('no available options')

    @graken()
    def _character_set_name_(self):
        with self._optional():
            self._schema_name_()
            self._period_()
        self._regular_identifier_()

    @graken()
    def _connection_name_(self):
        self._simple_value_specification_()

    @graken()
    def _sql_statement_name_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                self._extended_statement_name_()
            self._error('no available options')

    @graken()
    def _extended_statement_name_(self):
        with self._optional():
            self._scope_option_()
        self._simple_value_specification_()

    @graken()
    def _dynamic_cursor_name_(self):
        with self._choice():
            with self._option():
                self._cursor_name_()
            with self._option():
                self._extended_cursor_name_()
            self._error('no available options')

    @graken()
    def _extended_cursor_name_(self):
        with self._optional():
            self._scope_option_()
        self._simple_value_specification_()

    @graken()
    def _descriptor_name_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                with self._optional():
                    self._scope_option_()
                self._simple_value_specification_()
            self._error('no available options')

    @graken()
    def _scope_option_(self):
        with self._choice():
            with self._option():
                self._token('GLOBAL')
            with self._option():
                self._token('LOCAL')
            self._error('expecting one of: GLOBAL LOCAL')

    @graken()
    def _data_type_(self):
        with self._choice():
            with self._option():
                self._predefined_type_()
            with self._option():
                self._row_type_()
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._reference_type_()
            with self._option():
                self._collection_type_()
            self._error('no available options')

    @graken()
    def _predefined_type_(self):
        with self._choice():
            with self._option():
                self._character_string_type_()
                with self._optional():
                    self._token('CHARACTER')
                    self._token('SET')
                    self._character_set_name_()
                with self._optional():
                    self._collate_clause_()
            with self._option():
                self._national_character_string_type_()
                with self._optional():
                    self._collate_clause_()
            with self._option():
                self._binary_string_type_()
            with self._option():
                self._binary_large_object_string_type_()
            with self._option():
                self._numeric_type_()
            with self._option():
                self._token('BOOLEAN')
            with self._option():
                self._datetime_type_()
            with self._option():
                self._interval_type_()
            self._error('expecting one of: BOOLEAN')

    @graken()
    def _character_string_type_(self):
        with self._choice():
            with self._option():
                self._token('CHARACTER')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('CHAR')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('CHARACTER')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._token('CHAR')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._token('VARCHAR')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._character_large_object_type_()
            self._error('expecting one of: CHAR CHARACTER')

    @graken()
    def _character_large_object_type_(self):
        with self._choice():
            with self._option():
                self._token('CHARACTER')
                self._token('LARGE')
                self._token('OBJECT')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            with self._option():
                self._token('CHAR')
                self._token('LARGE')
                self._token('OBJECT')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            with self._option():
                self._token('CLOB')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            self._error('expecting one of: CHAR CHARACTER CLOB')

    @graken()
    def _national_character_string_type_(self):
        with self._choice():
            with self._option():
                self._token('NATIONAL')
                self._token('CHARACTER')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('NATIONAL')
                self._token('CHAR')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('NCHAR')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('NATIONAL')
                self._token('CHARACTER')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._token('NATIONAL')
                self._token('CHAR')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._token('NCHAR')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._national_character_large_object_type_()
            self._error('expecting one of: NATIONAL NCHAR')

    @graken()
    def _national_character_large_object_type_(self):
        with self._choice():
            with self._option():
                self._token('NATIONAL')
                self._token('CHARACTER')
                self._token('LARGE')
                self._token('OBJECT')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            with self._option():
                self._token('NCHAR')
                self._token('LARGE')
                self._token('OBJECT')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            with self._option():
                self._token('NCLOB')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            self._error('expecting one of: NATIONAL NCHAR NCLOB')

    @graken()
    def _binary_string_type_(self):
        with self._choice():
            with self._option():
                self._token('BINARY')
                with self._optional():
                    self._left_paren_()
                    self._length_()
                    self._right_paren_()
            with self._option():
                self._token('BINARY')
                self._token('VARYING')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            with self._option():
                self._token('VARBINARY')
                self._left_paren_()
                self._length_()
                self._right_paren_()
            self._error('expecting one of: BINARY')

    @graken()
    def _binary_large_object_string_type_(self):
        with self._choice():
            with self._option():
                self._token('BINARY')
                self._token('LARGE')
                self._token('OBJECT')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            with self._option():
                self._token('BLOB')
                with self._optional():
                    self._left_paren_()
                    self._large_object_length_()
                    self._right_paren_()
            self._error('expecting one of: BINARY BLOB')

    @graken()
    def _numeric_type_(self):
        with self._choice():
            with self._option():
                self._exact_numeric_type_()
            with self._option():
                self._approximate_numeric_type_()
            self._error('no available options')

    @graken()
    def _exact_numeric_type_(self):
        with self._choice():
            with self._option():
                self._token('NUMERIC')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    with self._optional():
                        self._comma_()
                        self._scale_()
                    self._right_paren_()
            with self._option():
                self._token('DECIMAL')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    with self._optional():
                        self._comma_()
                        self._scale_()
                    self._right_paren_()
            with self._option():
                self._token('DEC')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    with self._optional():
                        self._comma_()
                        self._scale_()
                    self._right_paren_()
            with self._option():
                self._token('SMALLINT')
            with self._option():
                self._token('INTEGER')
            with self._option():
                self._token('INT')
            with self._option():
                self._token('BIGINT')
            self._error('expecting one of: BIGINT DEC DECIMAL INT INTEGER NUMERIC SMALLINT')

    @graken()
    def _approximate_numeric_type_(self):
        with self._choice():
            with self._option():
                self._token('FLOAT')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    self._right_paren_()
            with self._option():
                self._token('REAL')
            with self._option():
                self._token('DOUBLE')
                self._token('PRECISION')
            self._error('expecting one of: DOUBLE FLOAT REAL')

    @graken()
    def _length_(self):
        self._unsigned_integer_()
        with self._optional():
            self._char_length_units_()

    @graken()
    def _large_object_length_(self):
        with self._choice():
            with self._option():
                self._unsigned_integer_()
                with self._optional():
                    self._multiplier_()
                with self._optional():
                    self._char_length_units_()
            with self._option():
                self._large_object_length_token_()
                with self._optional():
                    self._char_length_units_()
            self._error('no available options')

    @graken()
    def _char_length_units_(self):
        with self._choice():
            with self._option():
                self._token('CHARACTERS')
            with self._option():
                self._token('OCTETS')
            self._error('expecting one of: CHARACTERS OCTETS')

    @graken()
    def _precision_(self):
        self._unsigned_integer_()

    @graken()
    def _scale_(self):
        self._unsigned_integer_()

    @graken()
    def _datetime_type_(self):
        with self._choice():
            with self._option():
                self._token('DATE')
            with self._option():
                self._token('TIME')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    self._right_paren_()
                with self._optional():
                    self._with_or_without_time_zone_()
            with self._option():
                self._token('TIMESTAMP')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    self._right_paren_()
                with self._optional():
                    self._with_or_without_time_zone_()
            self._error('expecting one of: DATE TIME TIMESTAMP')

    @graken()
    def _with_or_without_time_zone_(self):
        with self._choice():
            with self._option():
                self._token('WITH')
                self._token('TIME')
                self._token('ZONE')
            with self._option():
                self._token('WITHOUT')
                self._token('TIME')
                self._token('ZONE')
            self._error('expecting one of: WITH WITHOUT')

    @graken()
    def _interval_type_(self):
        self._token('INTERVAL')
        self._interval_qualifier_()

    @graken()
    def _row_type_(self):
        self._token('ROW')
        self._row_type_body_()

    @graken()
    def _row_type_body_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._field_definition_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _reference_type_(self):
        self._token('REF')
        self._left_paren_()
        self._schema_qualified_name_()
        self._right_paren_()
        with self._optional():
            self._scope_clause_()

    @graken()
    def _scope_clause_(self):
        self._token('SCOPE')
        self._table_name_()

    @graken()
    def _collection_type_(self):
        with self._choice():
            with self._option():
                self._array_type_()
            with self._option():
                self._multiset_type_()
            self._error('no available options')

    @graken()
    def _array_type_(self):
        self._data_type_()
        self._token('ARRAY')
        with self._optional():
            self._left_bracket_or_trigraph_()
            self._unsigned_integer_()
            self._right_bracket_or_trigraph_()

    @graken()
    def _multiset_type_(self):
        self._data_type_()
        self._token('MULTISET')

    @graken()
    def _field_definition_(self):
        self._identifier_()
        self._data_type_()

    @graken()
    def _value_expression_primary_(self):
        with self._choice():
            with self._option():
                self._parenthesized_value_expression_()
            with self._option():
                self._nonparenthesized_value_expression_primary_()
            self._error('no available options')

    @graken()
    def _parenthesized_value_expression_(self):
        self._left_paren_()
        self._value_expression_()
        self._right_paren_()

    @graken()
    def _nonparenthesized_value_expression_primary_(self):
        with self._choice():
            with self._option():
                self._unsigned_value_specification_()
            with self._option():
                self._column_reference_()
            with self._option():
                self._set_function_specification_()
            with self._option():
                self._window_function_()
            with self._option():
                self._nested_window_function_()
            with self._option():
                self._subquery_()
            with self._option():
                self._case_expression_()
            with self._option():
                self._cast_specification_()
            with self._option():
                self._field_reference_()
            with self._option():
                self._subtype_treatment_()
            with self._option():
                self._method_invocation_()
            with self._option():
                self._static_method_invocation_()
            with self._option():
                self._new_specification_()
            with self._option():
                self._attribute_or_method_reference_()
            with self._option():
                self._reference_resolution_()
            with self._option():
                self._collection_value_constructor_()
            with self._option():
                self._array_element_reference_()
            with self._option():
                self._multiset_element_reference_()
            with self._option():
                self._next_value_expression_()
            with self._option():
                self._routine_invocation_()
            self._error('no available options')

    @graken()
    def _collection_value_constructor_(self):
        with self._choice():
            with self._option():
                self._array_value_constructor_()
            with self._option():
                self._multiset_value_constructor_()
            self._error('no available options')

    @graken()
    def _value_specification_(self):
        with self._choice():
            with self._option():
                self._literal_()
            with self._option():
                self._general_value_specification_()
            self._error('no available options')

    @graken()
    def _unsigned_value_specification_(self):
        with self._choice():
            with self._option():
                self._unsigned_literal_()
            with self._option():
                self._general_value_specification_()
            self._error('no available options')

    @graken()
    def _general_value_specification_(self):
        with self._choice():
            with self._option():
                self._host_parameter_specification_()
            with self._option():
                self._sql_parameter_reference_()
            with self._option():
                self._dynamic_parameter_specification_()
            with self._option():
                self._current_collation_specification_()
            with self._option():
                self._token('CURRENT_CATALOG')
            with self._option():
                self._token('CURRENT_DEFAULT_TRANSFORM_GROUP')
            with self._option():
                self._token('CURRENT_PATH')
            with self._option():
                self._token('CURRENT_ROLE')
            with self._option():
                self._token('CURRENT_SCHEMA')
            with self._option():
                self._token('CURRENT_TRANSFORM_GROUP_FOR_TYPE')
                self._schema_qualified_name_()
            with self._option():
                self._token('CURRENT_USER')
            with self._option():
                self._token('SESSION_USER')
            with self._option():
                self._token('SYSTEM_USER')
            with self._option():
                self._token('USER')
            with self._option():
                self._token('VALUE')
            self._error('expecting one of: CURRENT_CATALOG CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_SCHEMA CURRENT_USER SESSION_USER SYSTEM_USER USER VALUE')

    @graken()
    def _simple_value_specification_(self):
        with self._choice():
            with self._option():
                self._literal_()
            with self._option():
                self._host_parameter_name_()
            with self._option():
                self._sql_parameter_reference_()
            self._error('no available options')

    @graken()
    def _target_specification_(self):
        with self._choice():
            with self._option():
                self._host_parameter_specification_()
            with self._option():
                self._sql_parameter_reference_()
            with self._option():
                self._column_reference_()
            with self._option():
                self._target_array_element_specification_()
            with self._option():
                self._dynamic_parameter_specification_()
            self._error('no available options')

    @graken()
    def _simple_target_specification_(self):
        with self._choice():
            with self._option():
                self._host_parameter_name_()
            with self._option():
                self._sql_parameter_reference_()
            with self._option():
                self._column_reference_()
            self._error('no available options')

    @graken()
    def _host_parameter_specification_(self):
        self._host_parameter_name_()
        with self._optional():
            self._indicator_parameter_()

    @graken()
    def _dynamic_parameter_specification_(self):
        self._question_mark_()

    @graken()
    def _indicator_parameter_(self):
        with self._optional():
            self._token('INDICATOR')
        self._host_parameter_name_()

    @graken()
    def _target_array_element_specification_(self):
        self._target_array_reference_()
        self._left_bracket_or_trigraph_()
        self._simple_value_specification_()
        self._right_bracket_or_trigraph_()

    @graken()
    def _target_array_reference_(self):
        with self._choice():
            with self._option():
                self._sql_parameter_reference_()
            with self._option():
                self._column_reference_()
            self._error('no available options')

    @graken()
    def _current_collation_specification_(self):
        self._token('COLLATION')
        self._token('FOR')
        self._left_paren_()
        self._string_value_expression_()
        self._right_paren_()

    @graken()
    def _contextually_typed_value_specification_(self):
        with self._choice():
            with self._option():
                self._implicitly_typed_value_specification_()
            with self._option():
                self._token('DEFAULT')
            self._error('expecting one of: DEFAULT')

    @graken()
    def _implicitly_typed_value_specification_(self):
        with self._choice():
            with self._option():
                self._token('NULL')
            with self._option():
                self._empty_specification_()
            self._error('expecting one of: NULL')

    @graken()
    def _empty_specification_(self):
        with self._choice():
            with self._option():
                self._token('ARRAY')
                self._left_bracket_or_trigraph_()
                self._right_bracket_or_trigraph_()
            with self._option():
                self._token('MULTISET')
                self._left_bracket_or_trigraph_()
                self._right_bracket_or_trigraph_()
            self._error('no available options')

    @graken()
    def _identifier_chain_(self):

        def sep0():
            self._token('.')

        def block0():
            self._identifier_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _column_reference_(self):
        with self._choice():
            with self._option():
                self._identifier_chain_()
            with self._option():
                self._token('MODULE')
                self._period_()
                self._identifier_()
                self._period_()
                self._identifier_()
            self._error('no available options')

    @graken()
    def _sql_parameter_reference_(self):
        self._identifier_chain_()

    @graken()
    def _set_function_specification_(self):
        with self._choice():
            with self._option():
                self._aggregate_function_()
            with self._option():
                self._grouping_operation_()
            self._error('no available options')

    @graken()
    def _grouping_operation_(self):
        self._token('GROUPING')
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._column_reference_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _window_function_(self):
        self._window_function_type_()
        self._token('OVER')
        self._window_name_or_specification_()

    @graken()
    def _window_function_type_(self):
        with self._choice():
            with self._option():
                self._rank_function_type_()
                self._left_paren_()
                self._right_paren_()
            with self._option():
                self._token('ROW_NUMBER')
                self._left_paren_()
                self._right_paren_()
            with self._option():
                self._aggregate_function_()
            with self._option():
                self._ntile_function_()
            with self._option():
                self._lead_or_lag_function_()
            with self._option():
                self._first_or_last_value_function_()
            with self._option():
                self._nth_value_function_()
            self._error('no available options')

    @graken()
    def _rank_function_type_(self):
        with self._choice():
            with self._option():
                self._token('RANK')
            with self._option():
                self._token('DENSE_RANK')
            with self._option():
                self._token('PERCENT_RANK')
            with self._option():
                self._token('CUME_DIST')
            self._error('expecting one of: CUME_DIST DENSE_RANK PERCENT_RANK RANK')

    @graken()
    def _window_name_or_specification_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                self._window_specification_()
            self._error('no available options')

    @graken()
    def _case_expression_(self):
        with self._choice():
            with self._option():
                self._case_abbreviation_()
            with self._option():
                self._case_specification_()
            self._error('no available options')

    @graken()
    def _case_abbreviation_(self):
        with self._choice():
            with self._option():
                self._token('NULLIF')
                self._left_paren_()
                self._value_expression_()
                self._comma_()
                self._value_expression_()
                self._right_paren_()
            with self._option():
                self._token('COALESCE')
                self._left_paren_()
                self._value_expression_()

                def block0():
                    self._comma_()
                    self._value_expression_()
                self._positive_closure(block0)
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _case_specification_(self):
        with self._choice():
            with self._option():
                self._simple_case_()
            with self._option():
                self._searched_case_()
            self._error('no available options')

    @graken()
    def _simple_case_(self):
        self._token('CASE')
        self._case_operand_()

        def block0():
            self._simple_when_clause_()
        self._positive_closure(block0)
        with self._optional():
            self._else_clause_()
        self._token('END')

    @graken()
    def _searched_case_(self):
        self._token('CASE')

        def block0():
            self._searched_when_clause_()
        self._positive_closure(block0)
        with self._optional():
            self._else_clause_()
        self._token('END')

    @graken()
    def _simple_when_clause_(self):
        self._token('WHEN')
        self._when_operand_list_()
        self._token('THEN')
        self._result_()

    @graken()
    def _searched_when_clause_(self):
        self._token('WHEN')
        self._search_condition_()
        self._token('THEN')
        self._result_()

    @graken()
    def _else_clause_(self):
        self._token('ELSE')
        self._result_()

    @graken()
    def _case_operand_(self):
        with self._choice():
            with self._option():
                self._row_value_predicand_()
            with self._option():
                self._overlaps_predicate_part_1_()
            self._error('no available options')

    @graken()
    def _when_operand_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._when_operand_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _when_operand_(self):
        with self._choice():
            with self._option():
                self._row_value_predicand_()
            with self._option():
                self._comparison_predicate_part_2_()
            with self._option():
                self._between_predicate_part_2_()
            with self._option():
                self._in_predicate_part_2_()
            with self._option():
                self._character_like_predicate_part_2_()
            with self._option():
                self._octet_like_predicate_part_2_()
            with self._option():
                self._similar_predicate_part_2_()
            with self._option():
                self._regex_like_predicate_part_2_()
            with self._option():
                self._null_predicate_part_2_()
            with self._option():
                self._quantified_comparison_predicate_part_2_()
            with self._option():
                self._normalized_predicate_part_2_()
            with self._option():
                self._match_predicate_part_2_()
            with self._option():
                self._overlaps_predicate_part_2_()
            with self._option():
                self._distinct_predicate_part_2_()
            with self._option():
                self._member_predicate_part_2_()
            with self._option():
                self._submultiset_predicate_part_2_()
            with self._option():
                self._set_predicate_part_2_()
            with self._option():
                self._type_predicate_part_2_()
            self._error('no available options')

    @graken()
    def _result_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._token('NULL')
            self._error('expecting one of: NULL')

    @graken()
    def _cast_specification_(self):
        self._token('CAST')
        self._left_paren_()
        self._cast_operand_()
        self._token('AS')
        self._cast_target_()
        self._right_paren_()

    @graken()
    def _cast_operand_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._implicitly_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _cast_target_(self):
        with self._choice():
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._data_type_()
            self._error('no available options')

    @graken()
    def _next_value_expression_(self):
        self._token('NEXT')
        self._token('VALUE')
        self._token('FOR')
        self._schema_qualified_name_()

    @graken()
    def _field_reference_(self):
        self._value_expression_primary_()
        self._period_()
        self._identifier_()

    @graken()
    def _subtype_treatment_(self):
        self._token('TREAT')
        self._left_paren_()
        self._value_expression_()
        self._token('AS')
        self._target_subtype_()
        self._right_paren_()

    @graken()
    def _target_subtype_(self):
        with self._choice():
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._reference_type_()
            self._error('no available options')

    @graken()
    def _method_invocation_(self):
        with self._choice():
            with self._option():
                self._direct_invocation_()
            with self._option():
                self._generalized_invocation_()
            self._error('no available options')

    @graken()
    def _direct_invocation_(self):
        self._value_expression_primary_()
        self._period_()
        self._identifier_()
        with self._optional():
            self._sql_argument_list_()

    @graken()
    def _generalized_invocation_(self):
        self._left_paren_()
        self._value_expression_primary_()
        self._token('AS')
        self._data_type_()
        self._right_paren_()
        self._period_()
        self._identifier_()
        with self._optional():
            self._sql_argument_list_()

    @graken()
    def _static_method_invocation_(self):
        self._schema_qualified_name_()
        self._double_colon_()
        self._identifier_()
        with self._optional():
            self._sql_argument_list_()

    @graken()
    def _new_specification_(self):
        self._token('NEW')
        self._routine_invocation_()

    @graken()
    def _attribute_or_method_reference_(self):
        self._value_expression_primary_()
        self._right_arrow_()
        self._identifier_()
        with self._optional():
            self._sql_argument_list_()

    @graken()
    def _reference_resolution_(self):
        self._token('DEREF')
        self._left_paren_()
        self._reference_value_expression_()
        self._right_paren_()

    @graken()
    def _array_element_reference_(self):
        self._array_value_expression_()
        self._left_bracket_or_trigraph_()
        self._numeric_value_expression_()
        self._right_bracket_or_trigraph_()

    @graken()
    def _multiset_element_reference_(self):
        self._token('ELEMENT')
        self._left_paren_()
        self._multiset_value_expression_()
        self._right_paren_()

    @graken()
    def _value_expression_(self):
        with self._choice():
            with self._option():
                self._common_value_expression_()
            with self._option():
                self._boolean_value_expression_()
            with self._option():
                self._row_value_expression_()
            self._error('no available options')

    @graken()
    def _common_value_expression_(self):
        with self._choice():
            with self._option():
                self._numeric_value_expression_()
            with self._option():
                self._string_value_expression_()
            with self._option():
                self._datetime_value_expression_()
            with self._option():
                self._interval_value_expression_()
            with self._option():
                self._user_defined_type_value_expression_()
            with self._option():
                self._reference_value_expression_()
            with self._option():
                self._collection_value_expression_()
            self._error('no available options')

    @graken()
    def _user_defined_type_value_expression_(self):
        self._value_expression_primary_()

    @graken()
    def _reference_value_expression_(self):
        self._value_expression_primary_()

    @graken()
    def _collection_value_expression_(self):
        with self._choice():
            with self._option():
                self._array_value_expression_()
            with self._option():
                self._multiset_value_expression_()
            self._error('no available options')

    @graken()
    def _numeric_value_expression_(self):
        with self._choice():
            with self._option():
                self._term_()
            with self._option():
                self._numeric_value_expression_()
                self._plus_sign_()
                self._term_()
            with self._option():
                self._numeric_value_expression_()
                self._minus_sign_()
                self._term_()
            self._error('no available options')

    @graken()
    def _term_(self):
        with self._choice():
            with self._option():
                self._factor_()
            with self._option():
                self._term_()
                self._asterisk_()
                self._factor_()
            with self._option():
                self._term_()
                self._solidus_()
                self._factor_()
            self._error('no available options')

    @graken()
    def _factor_(self):
        with self._optional():
            self._sign_()
        self._numeric_primary_()

    @graken()
    def _numeric_primary_(self):
        with self._choice():
            with self._option():
                self._value_expression_primary_()
            with self._option():
                self._numeric_value_function_()
            self._error('no available options')

    @graken()
    def _numeric_value_function_(self):
        with self._choice():
            with self._option():
                self._position_expression_()
            with self._option():
                self._regex_occurrences_function_()
            with self._option():
                self._regex_position_expression_()
            with self._option():
                self._extract_expression_()
            with self._option():
                self._length_expression_()
            with self._option():
                self._cardinality_expression_()
            with self._option():
                self._max_cardinality_expression_()
            with self._option():
                self._absolute_value_expression_()
            with self._option():
                self._modulus_expression_()
            with self._option():
                self._natural_logarithm_()
            with self._option():
                self._exponential_function_()
            with self._option():
                self._power_function_()
            with self._option():
                self._square_root_()
            with self._option():
                self._floor_function_()
            with self._option():
                self._ceiling_function_()
            with self._option():
                self._width_bucket_function_()
            self._error('no available options')

    @graken()
    def _position_expression_(self):
        with self._choice():
            with self._option():
                self._string_position_expression_()
            with self._option():
                self._blob_position_expression_()
            self._error('no available options')

    @graken()
    def _string_position_expression_(self):
        self._token('POSITION')
        self._left_paren_()
        self._character_value_expression_()
        self._token('IN')
        self._character_value_expression_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        self._right_paren_()

    @graken()
    def _blob_position_expression_(self):
        self._token('POSITION')
        self._left_paren_()
        self._blob_value_expression_()
        self._token('IN')
        self._blob_value_expression_()
        self._right_paren_()

    @graken()
    def _length_expression_(self):
        with self._choice():
            with self._option():
                self._char_length_expression_()
            with self._option():
                self._octet_length_expression_()
            self._error('no available options')

    @graken()
    def _char_length_expression_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._token('CHAR_LENGTH')
                with self._option():
                    self._token('CHARACTER_LENGTH')
                self._error('expecting one of: CHARACTER_LENGTH CHAR_LENGTH')
        self._left_paren_()
        self._character_value_expression_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        self._right_paren_()

    @graken()
    def _octet_length_expression_(self):
        self._token('OCTET_LENGTH')
        self._left_paren_()
        self._string_value_expression_()
        self._right_paren_()

    @graken()
    def _extract_expression_(self):
        self._token('EXTRACT')
        self._left_paren_()
        self._extract_field_()
        self._token('FROM')
        self._extract_source_()
        self._right_paren_()

    @graken()
    def _extract_field_(self):
        with self._choice():
            with self._option():
                self._primary_datetime_field_()
            with self._option():
                self._time_zone_field_()
            self._error('no available options')

    @graken()
    def _time_zone_field_(self):
        with self._choice():
            with self._option():
                self._token('TIMEZONE_HOUR')
            with self._option():
                self._token('TIMEZONE_MINUTE')
            self._error('expecting one of: TIMEZONE_HOUR TIMEZONE_MINUTE')

    @graken()
    def _extract_source_(self):
        with self._choice():
            with self._option():
                self._datetime_value_expression_()
            with self._option():
                self._interval_value_expression_()
            self._error('no available options')

    @graken()
    def _cardinality_expression_(self):
        self._token('CARDINALITY')
        self._left_paren_()
        self._collection_value_expression_()
        self._right_paren_()

    @graken()
    def _max_cardinality_expression_(self):
        self._token('ARRAY_MAX_CARDINALITY')
        self._left_paren_()
        self._array_value_expression_()
        self._right_paren_()

    @graken()
    def _absolute_value_expression_(self):
        self._token('ABS')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _modulus_expression_(self):
        self._token('MOD')
        self._left_paren_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _natural_logarithm_(self):
        self._token('LN')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _exponential_function_(self):
        self._token('EXP')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _power_function_(self):
        self._token('POWER')
        self._left_paren_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _square_root_(self):
        self._token('SQRT')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _floor_function_(self):
        self._token('FLOOR')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _ceiling_function_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._token('CEIL')
                with self._option():
                    self._token('CEILING')
                self._error('expecting one of: CEIL CEILING')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _width_bucket_function_(self):
        self._token('WIDTH_BUCKET')
        self._left_paren_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _string_value_expression_(self):
        with self._choice():
            with self._option():
                self._character_value_expression_()
            with self._option():
                self._blob_value_expression_()
            self._error('no available options')

    @graken()
    def _character_value_expression_(self):
        with self._choice():
            with self._option():
                self._concatenation_()
            with self._option():
                self._character_factor_()
            self._error('no available options')

    @graken()
    def _concatenation_(self):
        self._character_value_expression_()
        self._concatenation_operator_()
        self._character_factor_()

    @graken()
    def _character_factor_(self):
        self._character_primary_()
        with self._optional():
            self._collate_clause_()

    @graken()
    def _character_primary_(self):
        with self._choice():
            with self._option():
                self._value_expression_primary_()
            with self._option():
                self._string_value_function_()
            self._error('no available options')

    @graken()
    def _blob_value_expression_(self):
        with self._choice():
            with self._option():
                self._blob_concatenation_()
            with self._option():
                self._blob_factor_()
            self._error('no available options')

    @graken()
    def _blob_factor_(self):
        self._blob_primary_()

    @graken()
    def _blob_primary_(self):
        with self._choice():
            with self._option():
                self._value_expression_primary_()
            with self._option():
                self._string_value_function_()
            self._error('no available options')

    @graken()
    def _blob_concatenation_(self):
        self._blob_value_expression_()
        self._concatenation_operator_()
        self._blob_factor_()

    @graken()
    def _string_value_function_(self):
        with self._choice():
            with self._option():
                self._character_value_function_()
            with self._option():
                self._blob_value_function_()
            self._error('no available options')

    @graken()
    def _character_value_function_(self):
        with self._choice():
            with self._option():
                self._character_substring_function_()
            with self._option():
                self._regular_expression_substring_function_()
            with self._option():
                self._regex_substring_function_()
            with self._option():
                self._fold_()
            with self._option():
                self._transcoding_()
            with self._option():
                self._character_transliteration_()
            with self._option():
                self._regex_transliteration_()
            with self._option():
                self._trim_function_()
            with self._option():
                self._character_overlay_function_()
            with self._option():
                self._normalize_function_()
            with self._option():
                self._specific_type_method_()
            self._error('no available options')

    @graken()
    def _character_substring_function_(self):
        self._token('SUBSTRING')
        self._left_paren_()
        self._character_value_expression_()
        self._token('FROM')
        self._start_position_()
        with self._optional():
            self._token('FOR')
            self._string_length_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        self._right_paren_()

    @graken()
    def _regular_expression_substring_function_(self):
        self._token('SUBSTRING')
        self._left_paren_()
        self._character_value_expression_()
        self._token('SIMILAR')
        self._character_value_expression_()
        self._token('ESCAPE')
        self._escape_character_()
        self._right_paren_()

    @graken()
    def _fold_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._token('UPPER')
                with self._option():
                    self._token('LOWER')
                self._error('expecting one of: LOWER UPPER')
        self._left_paren_()
        self._character_value_expression_()
        self._right_paren_()

    @graken()
    def _transcoding_(self):
        self._token('CONVERT')
        self._left_paren_()
        self._character_value_expression_()
        self._token('USING')
        self._schema_qualified_name_()
        self._right_paren_()

    @graken()
    def _character_transliteration_(self):
        self._token('TRANSLATE')
        self._left_paren_()
        self._character_value_expression_()
        self._token('USING')
        self._schema_qualified_name_()
        self._right_paren_()

    @graken()
    def _trim_function_(self):
        self._token('TRIM')
        self._left_paren_()
        self._trim_operands_()
        self._right_paren_()

    @graken()
    def _trim_operands_(self):
        with self._optional():
            with self._optional():
                self._trim_specification_()
            with self._optional():
                self._character_value_expression_()
            self._token('FROM')
        self._character_value_expression_()

    @graken()
    def _trim_specification_(self):
        with self._choice():
            with self._option():
                self._token('LEADING')
            with self._option():
                self._token('TRAILING')
            with self._option():
                self._token('BOTH')
            self._error('expecting one of: BOTH LEADING TRAILING')

    @graken()
    def _character_overlay_function_(self):
        self._token('OVERLAY')
        self._left_paren_()
        self._character_value_expression_()
        self._token('PLACING')
        self._character_value_expression_()
        self._token('FROM')
        self._start_position_()
        with self._optional():
            self._token('FOR')
            self._string_length_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        self._right_paren_()

    @graken()
    def _normalize_function_(self):
        self._token('NORMALIZE')
        self._left_paren_()
        self._character_value_expression_()
        with self._optional():
            self._comma_()
            self._normal_form_()
            with self._optional():
                self._comma_()
                self._normalize_function_result_length_()
        self._right_paren_()

    @graken()
    def _specific_type_method_(self):
        self._user_defined_type_value_expression_()
        self._period_()
        self._token('SPECIFICTYPE')
        with self._optional():
            self._left_paren_()
            self._right_paren_()

    @graken()
    def _blob_value_function_(self):
        with self._choice():
            with self._option():
                self._blob_substring_function_()
            with self._option():
                self._blob_trim_function_()
            with self._option():
                self._blob_overlay_function_()
            self._error('no available options')

    @graken()
    def _blob_substring_function_(self):
        self._token('SUBSTRING')
        self._left_paren_()
        self._blob_value_expression_()
        self._token('FROM')
        self._start_position_()
        with self._optional():
            self._token('FOR')
            self._string_length_()
        self._right_paren_()

    @graken()
    def _blob_trim_function_(self):
        self._token('TRIM')
        self._left_paren_()
        self._blob_trim_operands_()
        self._right_paren_()

    @graken()
    def _blob_trim_operands_(self):
        with self._optional():
            with self._optional():
                self._trim_specification_()
            with self._optional():
                self._blob_value_expression_()
            self._token('FROM')
        self._blob_value_expression_()

    @graken()
    def _blob_overlay_function_(self):
        self._token('OVERLAY')
        self._left_paren_()
        self._blob_value_expression_()
        self._token('PLACING')
        self._blob_value_expression_()
        self._token('FROM')
        self._start_position_()
        with self._optional():
            self._token('FOR')
            self._string_length_()
        self._right_paren_()

    @graken()
    def _start_position_(self):
        self._numeric_value_expression_()

    @graken()
    def _string_length_(self):
        self._numeric_value_expression_()

    @graken()
    def _datetime_value_expression_(self):
        with self._choice():
            with self._option():
                self._datetime_term_()
            with self._option():
                self._interval_value_expression_()
                self._plus_sign_()
                self._datetime_term_()
            with self._option():
                self._datetime_value_expression_()
                self._plus_sign_()
                self._interval_term_()
            with self._option():
                self._datetime_value_expression_()
                self._minus_sign_()
                self._interval_term_()
            self._error('no available options')

    @graken()
    def _datetime_term_(self):
        self._datetime_factor_()

    @graken()
    def _datetime_factor_(self):
        self._datetime_primary_()
        with self._optional():
            self._time_zone_()

    @graken()
    def _datetime_primary_(self):
        with self._choice():
            with self._option():
                self._value_expression_primary_()
            with self._option():
                self._datetime_value_function_()
            self._error('no available options')

    @graken()
    def _time_zone_(self):
        self._token('AT')
        self._time_zone_specifier_()

    @graken()
    def _time_zone_specifier_(self):
        with self._choice():
            with self._option():
                self._token('LOCAL')
            with self._option():
                self._token('TIME')
                self._token('ZONE')
                self._interval_primary_()
            self._error('expecting one of: LOCAL')

    @graken()
    def _datetime_value_function_(self):
        with self._choice():
            with self._option():
                self._token('CURRENT_DATE')
            with self._option():
                self._current_time_value_function_()
            with self._option():
                self._current_timestamp_value_function_()
            with self._option():
                self._current_local_time_value_function_()
            with self._option():
                self._current_local_timestamp_value_function_()
            self._error('expecting one of: CURRENT_DATE')

    @graken()
    def _current_time_value_function_(self):
        self._token('CURRENT_TIME')
        with self._optional():
            self._left_paren_()
            self._precision_()
            self._right_paren_()

    @graken()
    def _current_local_time_value_function_(self):
        self._token('LOCALTIME')
        with self._optional():
            self._left_paren_()
            self._precision_()
            self._right_paren_()

    @graken()
    def _current_timestamp_value_function_(self):
        self._token('CURRENT_TIMESTAMP')
        with self._optional():
            self._left_paren_()
            self._precision_()
            self._right_paren_()

    @graken()
    def _current_local_timestamp_value_function_(self):
        self._token('LOCALTIMESTAMP')
        with self._optional():
            self._left_paren_()
            self._precision_()
            self._right_paren_()

    @graken()
    def _interval_value_expression_(self):
        with self._choice():
            with self._option():
                self._interval_term_()
            with self._option():
                self._interval_value_expression_1_()
                self._plus_sign_()
                self._interval_term_1_()
            with self._option():
                self._interval_value_expression_1_()
                self._minus_sign_()
                self._interval_term_1_()
            with self._option():
                self._left_paren_()
                self._datetime_value_expression_()
                self._minus_sign_()
                self._datetime_term_()
                self._right_paren_()
                self._interval_qualifier_()
            self._error('no available options')

    @graken()
    def _interval_term_(self):
        with self._choice():
            with self._option():
                self._interval_factor_()
            with self._option():
                self._interval_term_2_()
                self._asterisk_()
                self._factor_()
            with self._option():
                self._interval_term_2_()
                self._solidus_()
                self._factor_()
            with self._option():
                self._term_()
                self._asterisk_()
                self._interval_factor_()
            self._error('no available options')

    @graken()
    def _interval_factor_(self):
        with self._optional():
            self._sign_()
        self._interval_primary_()

    @graken()
    def _interval_primary_(self):
        with self._choice():
            with self._option():
                self._value_expression_primary_()
                with self._optional():
                    self._interval_qualifier_()
            with self._option():
                self._interval_absolute_value_function_()
            self._error('no available options')

    @graken()
    def _interval_value_expression_1_(self):
        self._interval_value_expression_()

    @graken()
    def _interval_term_1_(self):
        self._interval_term_()

    @graken()
    def _interval_term_2_(self):
        self._interval_term_()

    @graken()
    def _interval_absolute_value_function_(self):
        self._token('ABS')
        self._left_paren_()
        self._interval_value_expression_()
        self._right_paren_()

    @graken()
    def _boolean_value_expression_(self):
        with self._choice():
            with self._option():
                self._boolean_term_()
            with self._option():
                self._boolean_value_expression_()
                self._token('OR')
                self._boolean_term_()
            self._error('no available options')

    @graken()
    def _boolean_term_(self):
        with self._choice():
            with self._option():
                self._boolean_factor_()
            with self._option():
                self._boolean_term_()
                self._token('AND')
                self._boolean_factor_()
            self._error('no available options')

    @graken()
    def _boolean_factor_(self):
        with self._optional():
            self._token('NOT')
        self._boolean_test_()

    @graken()
    def _boolean_test_(self):
        self._boolean_primary_()
        with self._optional():
            self._token('IS')
            with self._optional():
                self._token('NOT')
            self._truth_value_()

    @graken()
    def _truth_value_(self):
        with self._choice():
            with self._option():
                self._token('TRUE')
            with self._option():
                self._token('FALSE')
            with self._option():
                self._token('UNKNOWN')
            self._error('expecting one of: FALSE TRUE UNKNOWN')

    @graken()
    def _boolean_primary_(self):
        with self._choice():
            with self._option():
                self._predicate_()
            with self._option():
                self._boolean_predicand_()
            self._error('no available options')

    @graken()
    def _boolean_predicand_(self):
        with self._choice():
            with self._option():
                self._parenthesized_boolean_value_expression_()
            with self._option():
                self._nonparenthesized_value_expression_primary_()
            self._error('no available options')

    @graken()
    def _parenthesized_boolean_value_expression_(self):
        self._left_paren_()
        self._boolean_value_expression_()
        self._right_paren_()

    @graken()
    def _array_value_expression_(self):
        with self._choice():
            with self._option():
                self._array_concatenation_()
            with self._option():
                self._array_primary_()
            self._error('no available options')

    @graken()
    def _array_concatenation_(self):
        self._array_value_expression_()
        self._concatenation_operator_()
        self._array_primary_()

    @graken()
    def _array_primary_(self):
        with self._choice():
            with self._option():
                self._trim_array_function_()
            with self._option():
                self._value_expression_primary_()
            self._error('no available options')

    @graken()
    def _trim_array_function_(self):
        self._token('TRIM_ARRAY')
        self._left_paren_()
        self._array_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _array_value_constructor_(self):
        with self._choice():
            with self._option():
                self._array_value_constructor_by_enumeration_()
            with self._option():
                self._array_value_constructor_by_query_()
            self._error('no available options')

    @graken()
    def _array_value_constructor_by_enumeration_(self):
        self._token('ARRAY')
        self._left_bracket_or_trigraph_()
        self._array_element_list_()
        self._right_bracket_or_trigraph_()

    @graken()
    def _array_element_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._array_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _array_element_(self):
        self._value_expression_()

    @graken()
    def _array_value_constructor_by_query_(self):
        self._token('ARRAY')
        self._subquery_()

    @graken()
    def _multiset_value_expression_(self):
        with self._choice():
            with self._option():
                self._multiset_term_()
            with self._option():
                self._multiset_value_expression_()
                self._token('MULTISET')
                self._token('UNION')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                self._multiset_term_()
            with self._option():
                self._multiset_value_expression_()
                self._token('MULTISET')
                self._token('EXCEPT')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                self._multiset_term_()
            self._error('no available options')

    @graken()
    def _multiset_term_(self):
        with self._choice():
            with self._option():
                self._multiset_primary_()
            with self._option():
                self._multiset_term_()
                self._token('MULTISET')
                self._token('INTERSECT')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                self._multiset_primary_()
            self._error('no available options')

    @graken()
    def _multiset_primary_(self):
        with self._choice():
            with self._option():
                self._multiset_set_function_()
            with self._option():
                self._value_expression_primary_()
            self._error('no available options')

    @graken()
    def _multiset_set_function_(self):
        self._token('SET')
        self._left_paren_()
        self._multiset_value_expression_()
        self._right_paren_()

    @graken()
    def _multiset_value_constructor_(self):
        with self._choice():
            with self._option():
                self._multiset_value_constructor_by_enumeration_()
            with self._option():
                self._multiset_value_constructor_by_query_()
            with self._option():
                self._table_value_constructor_by_query_()
            self._error('no available options')

    @graken()
    def _multiset_value_constructor_by_enumeration_(self):
        self._token('MULTISET')
        self._left_bracket_or_trigraph_()
        self._multiset_element_list_()
        self._right_bracket_or_trigraph_()

    @graken()
    def _multiset_element_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._multiset_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _multiset_element_(self):
        self._value_expression_()

    @graken()
    def _multiset_value_constructor_by_query_(self):
        self._token('MULTISET')
        self._subquery_()

    @graken()
    def _table_value_constructor_by_query_(self):
        self._token('TABLE')
        self._subquery_()

    @graken()
    def _row_value_constructor_(self):
        with self._choice():
            with self._option():
                self._common_value_expression_()
            with self._option():
                self._boolean_value_expression_()
            with self._option():
                self._explicit_row_value_constructor_()
            self._error('no available options')

    @graken()
    def _explicit_row_value_constructor_(self):
        with self._choice():
            with self._option():
                self._left_paren_()
                self._row_value_constructor_element_()
                self._comma_()
                self._row_value_constructor_element_list_()
                self._right_paren_()
            with self._option():
                self._token('ROW')
                self._left_paren_()
                self._row_value_constructor_element_list_()
                self._right_paren_()
            with self._option():
                self._subquery_()
            self._error('no available options')

    @graken()
    def _row_value_constructor_element_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._row_value_constructor_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _row_value_constructor_element_(self):
        self._value_expression_()

    @graken()
    def _contextually_typed_row_value_constructor_(self):
        with self._choice():
            with self._option():
                self._common_value_expression_()
            with self._option():
                self._boolean_value_expression_()
            with self._option():
                self._contextually_typed_value_specification_()
            with self._option():
                self._left_paren_()
                self._contextually_typed_value_specification_()
                self._right_paren_()
            with self._option():
                self._left_paren_()
                self._contextually_typed_row_value_constructor_element_()
                self._comma_()
                self._contextually_typed_row_value_constructor_element_list_()
                self._right_paren_()
            with self._option():
                self._token('ROW')
                self._left_paren_()
                self._contextually_typed_row_value_constructor_element_list_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _contextually_typed_row_value_constructor_element_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._contextually_typed_row_value_constructor_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _contextually_typed_row_value_constructor_element_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._contextually_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _row_value_constructor_predicand_(self):
        with self._choice():
            with self._option():
                self._common_value_expression_()
            with self._option():
                self._boolean_predicand_()
            with self._option():
                self._explicit_row_value_constructor_()
            self._error('no available options')

    @graken()
    def _row_value_expression_(self):
        with self._choice():
            with self._option():
                self._row_value_special_case_()
            with self._option():
                self._explicit_row_value_constructor_()
            self._error('no available options')

    @graken()
    def _table_row_value_expression_(self):
        with self._choice():
            with self._option():
                self._row_value_special_case_()
            with self._option():
                self._row_value_constructor_()
            self._error('no available options')

    @graken()
    def _contextually_typed_row_value_expression_(self):
        with self._choice():
            with self._option():
                self._row_value_special_case_()
            with self._option():
                self._contextually_typed_row_value_constructor_()
            self._error('no available options')

    @graken()
    def _row_value_predicand_(self):
        with self._choice():
            with self._option():
                self._row_value_special_case_()
            with self._option():
                self._row_value_constructor_predicand_()
            self._error('no available options')

    @graken()
    def _row_value_special_case_(self):
        self._nonparenthesized_value_expression_primary_()

    @graken()
    def _table_value_constructor_(self):
        self._token('VALUES')
        self._row_value_expression_list_()

    @graken()
    def _row_value_expression_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._table_row_value_expression_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _contextually_typed_table_value_constructor_(self):
        self._token('VALUES')
        self._contextually_typed_row_value_expression_list_()

    @graken()
    def _contextually_typed_row_value_expression_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._contextually_typed_row_value_expression_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _table_expression_(self):
        self._from_clause_()
        with self._optional():
            self._where_clause_()
        with self._optional():
            self._group_by_clause_()
        with self._optional():
            self._having_clause_()
        with self._optional():
            self._window_clause_()

    @graken()
    def _from_clause_(self):
        self._token('FROM')
        self._table_reference_list_()

    @graken()
    def _table_reference_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._table_reference_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _table_reference_(self):
        with self._choice():
            with self._option():
                self._table_factor_()
            with self._option():
                self._joined_table_()
            self._error('no available options')

    @graken()
    def _table_factor_(self):
        self._table_primary_()
        with self._optional():
            self._sample_clause_()

    @graken()
    def _sample_clause_(self):
        self._token('TABLESAMPLE')
        self._sample_method_()
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()
        with self._optional():
            self._repeatable_clause_()

    @graken()
    def _sample_method_(self):
        with self._choice():
            with self._option():
                self._token('BERNOULLI')
            with self._option():
                self._token('SYSTEM')
            self._error('expecting one of: BERNOULLI SYSTEM')

    @graken()
    def _repeatable_clause_(self):
        self._token('REPEATABLE')
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _table_primary_(self):
        with self._choice():
            with self._option():
                self._table_or_query_name_()
                with self._optional():
                    self._query_system_time_period_specification_()
                with self._optional():
                    self._as_clause_()
                    with self._optional():
                        self._left_paren_()
                        self._column_name_list_()
                        self._right_paren_()
            with self._option():
                self._subquery_()
                self._as_clause_()
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._lateral_derived_table_()
                self._as_clause_()
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._collection_derived_table_()
                self._as_clause_()
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._table_function_derived_table_()
                self._as_clause_()
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._only_spec_()
                with self._optional():
                    self._as_clause_()
                    with self._optional():
                        self._left_paren_()
                        self._column_name_list_()
                        self._right_paren_()
            with self._option():
                self._data_change_delta_table_()
                with self._optional():
                    self._as_clause_()
                    with self._optional():
                        self._left_paren_()
                        self._column_name_list_()
                        self._right_paren_()
            with self._option():
                self._parenthesized_joined_table_()
            self._error('no available options')

    @graken()
    def _parenthesized_joined_table_(self):
        with self._choice():
            with self._option():
                self._left_paren_()
                self._parenthesized_joined_table_()
                self._right_paren_()
            with self._option():
                self._left_paren_()
                self._joined_table_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _only_spec_(self):
        self._token('ONLY')
        self._left_paren_()
        self._table_or_query_name_()
        self._right_paren_()

    @graken()
    def _lateral_derived_table_(self):
        self._token('LATERAL')
        self._subquery_()

    @graken()
    def _collection_derived_table_(self):
        self._token('UNNEST')
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._collection_value_expression_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()
        with self._optional():
            self._token('WITH')
            self._token('ORDINALITY')

    @graken()
    def _table_function_derived_table_(self):
        self._token('TABLE')
        self._left_paren_()
        self._collection_value_expression_()
        self._right_paren_()

    @graken()
    def _table_or_query_name_(self):
        with self._choice():
            with self._option():
                self._table_name_()
            with self._option():
                self._identifier_()
            self._error('no available options')

    @graken()
    def _column_name_list_(self):
        self._identifier_list_()

    @graken()
    def _data_change_delta_table_(self):
        self._result_option_()
        self._token('TABLE')
        self._left_paren_()
        self._data_change_statement_()
        self._right_paren_()

    @graken()
    def _joined_table_(self):
        with self._choice():
            with self._option():
                self._cross_join_()
            with self._option():
                self._qualified_join_()
            with self._option():
                self._natural_join_()
            self._error('no available options')

    @graken()
    def _cross_join_(self):
        self._table_reference_()
        self._token('CROSS')
        self._token('JOIN')
        self._table_factor_()

    @graken()
    def _qualified_join_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._table_reference_()
                with self._option():
                    self._partitioned_join_table_()
                self._error('no available options')
        with self._optional():
            self._join_type_()
        self._token('JOIN')
        with self._group():
            with self._choice():
                with self._option():
                    self._table_reference_()
                with self._option():
                    self._partitioned_join_table_()
                self._error('no available options')
        self._join_specification_()

    @graken()
    def _natural_join_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._table_reference_()
                with self._option():
                    self._partitioned_join_table_()
                self._error('no available options')
        self._token('NATURAL')
        with self._optional():
            self._join_type_()
        self._token('JOIN')
        with self._group():
            with self._choice():
                with self._option():
                    self._table_factor_()
                with self._option():
                    self._partitioned_join_table_()
                self._error('no available options')

    @graken()
    def _join_specification_(self):
        with self._choice():
            with self._option():
                self._join_condition_()
            with self._option():
                self._named_columns_join_()
            self._error('no available options')

    @graken()
    def _join_condition_(self):
        self._token('ON')
        self._search_condition_()

    @graken()
    def _named_columns_join_(self):
        self._token('USING')
        self._left_paren_()
        self._column_name_list_()
        self._right_paren_()

    @graken()
    def _join_type_(self):
        with self._choice():
            with self._option():
                self._token('INNER')
            with self._option():
                self._outer_join_type_()
                with self._optional():
                    self._token('OUTER')
            self._error('expecting one of: INNER')

    @graken()
    def _outer_join_type_(self):
        with self._choice():
            with self._option():
                self._token('LEFT')
            with self._option():
                self._token('RIGHT')
            with self._option():
                self._token('FULL')
            self._error('expecting one of: FULL LEFT RIGHT')

    @graken()
    def _where_clause_(self):
        self._token('WHERE')
        self._search_condition_()

    @graken()
    def _group_by_clause_(self):
        self._token('GROUP')
        self._token('BY')
        with self._optional():
            self._set_quantifier_()
        self._grouping_element_list_()

    @graken()
    def _grouping_element_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._grouping_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _grouping_element_(self):
        with self._choice():
            with self._option():
                self._ordinary_grouping_set_()
            with self._option():
                self._rollup_list_()
            with self._option():
                self._cube_list_()
            with self._option():
                self._grouping_sets_specification_()
            with self._option():
                self._empty_grouping_set_()
            self._error('no available options')

    @graken()
    def _ordinary_grouping_set_(self):
        with self._choice():
            with self._option():
                self._grouping_column_reference_()
            with self._option():
                self._left_paren_()
                self._grouping_column_reference_list_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _grouping_column_reference_(self):
        self._column_reference_()
        with self._optional():
            self._collate_clause_()

    @graken()
    def _grouping_column_reference_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._grouping_column_reference_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _rollup_list_(self):
        self._token('ROLLUP')
        self._left_paren_()
        self._ordinary_grouping_set_list_()
        self._right_paren_()

    @graken()
    def _ordinary_grouping_set_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._ordinary_grouping_set_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _cube_list_(self):
        self._token('CUBE')
        self._left_paren_()
        self._ordinary_grouping_set_list_()
        self._right_paren_()

    @graken()
    def _grouping_sets_specification_(self):
        self._token('GROUPING')
        self._token('SETS')
        self._left_paren_()
        self._grouping_set_list_()
        self._right_paren_()

    @graken()
    def _grouping_set_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._grouping_set_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _grouping_set_(self):
        with self._choice():
            with self._option():
                self._ordinary_grouping_set_()
            with self._option():
                self._rollup_list_()
            with self._option():
                self._cube_list_()
            with self._option():
                self._grouping_sets_specification_()
            with self._option():
                self._empty_grouping_set_()
            self._error('no available options')

    @graken()
    def _empty_grouping_set_(self):
        self._left_paren_()
        self._right_paren_()

    @graken()
    def _having_clause_(self):
        self._token('HAVING')
        self._search_condition_()

    @graken()
    def _window_clause_(self):
        self._token('WINDOW')
        self._window_definition_list_()

    @graken()
    def _window_definition_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._window_definition_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _window_definition_(self):
        self._identifier_()
        self._token('AS')
        self._window_specification_()

    @graken()
    def _window_specification_(self):
        self._left_paren_()
        self._window_specification_details_()
        self._right_paren_()

    @graken()
    def _window_specification_details_(self):
        with self._optional():
            self._identifier_()
        with self._optional():
            self._window_partition_clause_()
        with self._optional():
            self._order_by_clause_()
        with self._optional():
            self._window_frame_clause_()

    @graken()
    def _window_partition_clause_(self):
        self._token('PARTITION')
        self._token('BY')
        self._window_partition_column_reference_list_()

    @graken()
    def _window_partition_column_reference_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._window_partition_column_reference_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _window_partition_column_reference_(self):
        self._column_reference_()
        with self._optional():
            self._collate_clause_()

    @graken()
    def _window_frame_clause_(self):
        self._window_frame_units_()
        self._window_frame_extent_()
        with self._optional():
            self._window_frame_exclusion_()

    @graken()
    def _window_frame_units_(self):
        with self._choice():
            with self._option():
                self._token('ROWS')
            with self._option():
                self._token('RANGE')
            with self._option():
                self._token('GROUPS')
            self._error('expecting one of: GROUPS RANGE ROWS')

    @graken()
    def _window_frame_extent_(self):
        with self._choice():
            with self._option():
                self._window_frame_start_()
            with self._option():
                self._window_frame_between_()
            self._error('no available options')

    @graken()
    def _window_frame_start_(self):
        with self._choice():
            with self._option():
                self._token('UNBOUNDED')
                self._token('PRECEDING')
            with self._option():
                self._window_frame_preceding_()
            with self._option():
                self._token('CURRENT')
                self._token('ROW')
            self._error('expecting one of: CURRENT UNBOUNDED')

    @graken()
    def _window_frame_preceding_(self):
        self._unsigned_value_specification_()
        self._token('PRECEDING')

    @graken()
    def _window_frame_between_(self):
        self._token('BETWEEN')
        self._window_frame_bound_()
        self._token('AND')
        self._window_frame_bound_()

    @graken()
    def _window_frame_bound_(self):
        with self._choice():
            with self._option():
                self._window_frame_start_()
            with self._option():
                self._token('UNBOUNDED')
                self._token('FOLLOWING')
            with self._option():
                self._window_frame_following_()
            self._error('expecting one of: UNBOUNDED')

    @graken()
    def _window_frame_following_(self):
        self._unsigned_value_specification_()
        self._token('FOLLOWING')

    @graken()
    def _window_frame_exclusion_(self):
        with self._choice():
            with self._option():
                self._token('EXCLUDE')
                self._token('CURRENT')
                self._token('ROW')
            with self._option():
                self._token('EXCLUDE')
                self._token('GROUP')
            with self._option():
                self._token('EXCLUDE')
                self._token('TIES')
            with self._option():
                self._token('EXCLUDE')
                self._token('NO')
                self._token('OTHERS')
            self._error('expecting one of: EXCLUDE')

    @graken()
    def _query_specification_(self):
        self._token('SELECT')
        with self._optional():
            self._set_quantifier_()
        self._select_list_()
        self._table_expression_()

    @graken()
    def _select_list_(self):
        with self._choice():
            with self._option():
                self._asterisk_()
            with self._option():

                def sep0():
                    self._token(',')

                def block0():
                    self._select_sublist_()
                self._positive_closure(block0, prefix=sep0)
            self._error('no available options')

    @graken()
    def _select_sublist_(self):
        with self._choice():
            with self._option():
                self._derived_column_()
            with self._option():
                self._qualified_asterisk_()
            self._error('no available options')

    @graken()
    def _qualified_asterisk_(self):
        with self._choice():
            with self._option():
                self._identifier_chain_()
                self._period_()
                self._asterisk_()
            with self._option():
                self._all_fields_reference_()
            self._error('no available options')

    @graken()
    def _derived_column_(self):
        self._value_expression_()
        with self._optional():
            self._as_clause_()

    @graken()
    def _as_clause_(self):
        with self._optional():
            self._token('AS')
        self._identifier_()

    @graken()
    def _all_fields_reference_(self):
        self._value_expression_primary_()
        self._period_()
        self._asterisk_()
        with self._optional():
            self._token('AS')
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()

    @graken()
    def _query_expression_(self):
        with self._optional():
            self._with_clause_()
        self._query_expression_body_()
        with self._optional():
            self._order_by_clause_()
        with self._optional():
            self._result_offset_clause_()
        with self._optional():
            self._fetch_first_clause_()

    @graken()
    def _with_clause_(self):
        self._token('WITH')
        with self._optional():
            self._token('RECURSIVE')
        self._with_list_()

    @graken()
    def _with_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._with_list_element_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _with_list_element_(self):
        self._identifier_()
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()
        self._token('AS')
        self._subquery_()
        with self._optional():
            self._search_or_cycle_clause_()

    @graken()
    def _query_expression_body_(self):
        with self._choice():
            with self._option():
                self._query_term_()
            with self._option():
                self._query_expression_body_()
                self._token('UNION')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                with self._optional():
                    self._corresponding_spec_()
                self._query_term_()
            with self._option():
                self._query_expression_body_()
                self._token('EXCEPT')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                with self._optional():
                    self._corresponding_spec_()
                self._query_term_()
            self._error('no available options')

    @graken()
    def _query_term_(self):
        with self._choice():
            with self._option():
                self._query_primary_()
            with self._option():
                self._query_term_()
                self._token('INTERSECT')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ALL')
                        with self._option():
                            self._token('DISTINCT')
                        self._error('expecting one of: ALL DISTINCT')
                with self._optional():
                    self._corresponding_spec_()
                self._query_primary_()
            self._error('no available options')

    @graken()
    def _query_primary_(self):
        with self._choice():
            with self._option():
                self._simple_table_()
            with self._option():
                self._left_paren_()
                self._query_expression_body_()
                with self._optional():
                    self._order_by_clause_()
                with self._optional():
                    self._result_offset_clause_()
                with self._optional():
                    self._fetch_first_clause_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _simple_table_(self):
        with self._choice():
            with self._option():
                self._query_specification_()
            with self._option():
                self._table_value_constructor_()
            with self._option():
                self._explicit_table_()
            self._error('no available options')

    @graken()
    def _explicit_table_(self):
        self._token('TABLE')
        self._table_or_query_name_()

    @graken()
    def _corresponding_spec_(self):
        self._token('CORRESPONDING')
        with self._optional():
            self._token('BY')
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()

    @graken()
    def _search_or_cycle_clause_(self):
        with self._choice():
            with self._option():
                self._search_clause_()
            with self._option():
                self._cycle_clause_()
            with self._option():
                self._search_clause_()
                self._cycle_clause_()
            self._error('no available options')

    @graken()
    def _search_clause_(self):
        self._token('SEARCH')
        self._recursive_search_order_()
        self._token('SET')
        self._identifier_()

    @graken()
    def _recursive_search_order_(self):
        with self._choice():
            with self._option():
                self._token('DEPTH')
                self._token('FIRST')
                self._token('BY')
                self._column_name_list_()
            with self._option():
                self._token('BREADTH')
                self._token('FIRST')
                self._token('BY')
                self._column_name_list_()
            self._error('no available options')

    @graken()
    def _cycle_clause_(self):
        self._token('CYCLE')
        self._cycle_column_list_()
        self._token('SET')
        self._identifier_()
        self._token('TO')
        self._value_expression_()
        self._token('DEFAULT')
        self._value_expression_()
        self._token('USING')
        self._identifier_()

    @graken()
    def _cycle_column_list_(self):
        self._column_name_list_()

    @graken()
    def _subquery_(self):
        self._left_paren_()
        self._query_expression_()
        self._right_paren_()

    @graken()
    def _predicate_(self):
        with self._choice():
            with self._option():
                self._comparison_predicate_()
            with self._option():
                self._between_predicate_()
            with self._option():
                self._in_predicate_()
            with self._option():
                self._like_predicate_()
            with self._option():
                self._similar_predicate_()
            with self._option():
                self._regex_like_predicate_()
            with self._option():
                self._null_predicate_()
            with self._option():
                self._quantified_comparison_predicate_()
            with self._option():
                self._exists_predicate_()
            with self._option():
                self._unique_predicate_()
            with self._option():
                self._normalized_predicate_()
            with self._option():
                self._match_predicate_()
            with self._option():
                self._overlaps_predicate_()
            with self._option():
                self._distinct_predicate_()
            with self._option():
                self._member_predicate_()
            with self._option():
                self._submultiset_predicate_()
            with self._option():
                self._set_predicate_()
            with self._option():
                self._type_predicate_()
            with self._option():
                self._period_predicate_()
            self._error('no available options')

    @graken()
    def _comparison_predicate_(self):
        self._row_value_predicand_()
        self._comparison_predicate_part_2_()

    @graken()
    def _comparison_predicate_part_2_(self):
        self._comp_op_()
        self._row_value_predicand_()

    @graken()
    def _comp_op_(self):
        with self._choice():
            with self._option():
                self._equals_operator_()
            with self._option():
                self._not_equals_operator_()
            with self._option():
                self._less_than_operator_()
            with self._option():
                self._greater_than_operator_()
            with self._option():
                self._less_than_or_equals_operator_()
            with self._option():
                self._greater_than_or_equals_operator_()
            self._error('no available options')

    @graken()
    def _between_predicate_(self):
        self._row_value_predicand_()
        self._between_predicate_part_2_()

    @graken()
    def _between_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('BETWEEN')
        with self._optional():
            with self._choice():
                with self._option():
                    self._token('ASYMMETRIC')
                with self._option():
                    self._token('SYMMETRIC')
                self._error('expecting one of: ASYMMETRIC SYMMETRIC')
        self._row_value_predicand_()
        self._token('AND')
        self._row_value_predicand_()

    @graken()
    def _in_predicate_(self):
        self._row_value_predicand_()
        self._in_predicate_part_2_()

    @graken()
    def _in_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('IN')
        self._in_predicate_value_()

    @graken()
    def _in_predicate_value_(self):
        with self._choice():
            with self._option():
                self._subquery_()
            with self._option():
                self._left_paren_()
                self._in_value_list_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _in_value_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._row_value_expression_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _like_predicate_(self):
        with self._choice():
            with self._option():
                self._character_like_predicate_()
            with self._option():
                self._octet_like_predicate_()
            self._error('no available options')

    @graken()
    def _character_like_predicate_(self):
        self._row_value_predicand_()
        self._character_like_predicate_part_2_()

    @graken()
    def _character_like_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('LIKE')
        self._character_value_expression_()
        with self._optional():
            self._token('ESCAPE')
            self._escape_character_()

    @graken()
    def _escape_character_(self):
        self._character_value_expression_()

    @graken()
    def _octet_like_predicate_(self):
        self._row_value_predicand_()
        self._octet_like_predicate_part_2_()

    @graken()
    def _octet_like_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('LIKE')
        self._blob_value_expression_()
        with self._optional():
            self._token('ESCAPE')
            self._blob_value_expression_()

    @graken()
    def _similar_predicate_(self):
        self._row_value_predicand_()
        self._similar_predicate_part_2_()

    @graken()
    def _similar_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('SIMILAR')
        self._token('TO')
        self._character_value_expression_()
        with self._optional():
            self._token('ESCAPE')
            self._escape_character_()

    @graken()
    def _null_predicate_(self):
        self._row_value_predicand_()
        self._null_predicate_part_2_()

    @graken()
    def _null_predicate_part_2_(self):
        self._token('IS')
        with self._optional():
            self._token('NOT')
        self._token('NULL')

    @graken()
    def _quantified_comparison_predicate_(self):
        self._row_value_predicand_()
        self._quantified_comparison_predicate_part_2_()

    @graken()
    def _quantified_comparison_predicate_part_2_(self):
        self._comp_op_()
        self._quantifier_()
        self._subquery_()

    @graken()
    def _quantifier_(self):
        with self._choice():
            with self._option():
                self._token('ALL')
            with self._option():
                self._some_()
            self._error('expecting one of: ALL')

    @graken()
    def _some_(self):
        with self._choice():
            with self._option():
                self._token('SOME')
            with self._option():
                self._token('ANY')
            self._error('expecting one of: ANY SOME')

    @graken()
    def _exists_predicate_(self):
        self._token('EXISTS')
        self._subquery_()

    @graken()
    def _unique_predicate_(self):
        self._token('UNIQUE')
        self._subquery_()

    @graken()
    def _normalized_predicate_(self):
        self._row_value_predicand_()
        self._normalized_predicate_part_2_()

    @graken()
    def _normalized_predicate_part_2_(self):
        self._token('IS')
        with self._optional():
            self._token('NOT')
        with self._optional():
            self._normal_form_()
        self._token('NORMALIZED')

    @graken()
    def _match_predicate_(self):
        self._row_value_predicand_()
        self._match_predicate_part_2_()

    @graken()
    def _match_predicate_part_2_(self):
        self._token('MATCH')
        with self._optional():
            self._token('UNIQUE')
        with self._optional():
            with self._choice():
                with self._option():
                    self._token('SIMPLE')
                with self._option():
                    self._token('PARTIAL')
                with self._option():
                    self._token('FULL')
                self._error('expecting one of: FULL PARTIAL SIMPLE')
        self._subquery_()

    @graken()
    def _overlaps_predicate_(self):
        self._overlaps_predicate_part_1_()
        self._overlaps_predicate_part_2_()

    @graken()
    def _overlaps_predicate_part_1_(self):
        self._row_value_predicand_()

    @graken()
    def _overlaps_predicate_part_2_(self):
        self._token('OVERLAPS')
        self._row_value_predicand_()

    @graken()
    def _distinct_predicate_(self):
        self._row_value_predicand_()
        self._distinct_predicate_part_2_()

    @graken()
    def _distinct_predicate_part_2_(self):
        self._token('IS')
        with self._optional():
            self._token('NOT')
        self._token('DISTINCT')
        self._token('FROM')
        self._row_value_predicand_()

    @graken()
    def _member_predicate_(self):
        self._row_value_predicand_()
        self._member_predicate_part_2_()

    @graken()
    def _member_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('MEMBER')
        with self._optional():
            self._token('OF')
        self._multiset_value_expression_()

    @graken()
    def _submultiset_predicate_(self):
        self._row_value_predicand_()
        self._submultiset_predicate_part_2_()

    @graken()
    def _submultiset_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('SUBMULTISET')
        with self._optional():
            self._token('OF')
        self._multiset_value_expression_()

    @graken()
    def _set_predicate_(self):
        self._row_value_predicand_()
        self._set_predicate_part_2_()

    @graken()
    def _set_predicate_part_2_(self):
        self._token('IS')
        with self._optional():
            self._token('NOT')
        self._token('A')
        self._token('SET')

    @graken()
    def _type_predicate_(self):
        self._row_value_predicand_()
        self._type_predicate_part_2_()

    @graken()
    def _type_predicate_part_2_(self):
        self._token('IS')
        with self._optional():
            self._token('NOT')
        self._token('OF')
        self._left_paren_()
        self._type_list_()
        self._right_paren_()

    @graken()
    def _type_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._user_defined_type_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _user_defined_type_specification_(self):
        with self._choice():
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._exclusive_user_defined_type_specification_()
            self._error('no available options')

    @graken()
    def _exclusive_user_defined_type_specification_(self):
        self._token('ONLY')
        self._schema_qualified_name_()

    @graken()
    def _search_condition_(self):
        self._boolean_value_expression_()

    @graken()
    def _interval_qualifier_(self):
        with self._choice():
            with self._option():
                self._start_field_()
                self._token('TO')
                self._end_field_()
            with self._option():
                self._single_datetime_field_()
            self._error('no available options')

    @graken()
    def _start_field_(self):
        self._non_second_primary_datetime_field_()
        with self._optional():
            self._left_paren_()
            self._precision_()
            self._right_paren_()

    @graken()
    def _end_field_(self):
        with self._choice():
            with self._option():
                self._non_second_primary_datetime_field_()
            with self._option():
                self._token('SECOND')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    self._right_paren_()
            self._error('expecting one of: SECOND')

    @graken()
    def _single_datetime_field_(self):
        with self._choice():
            with self._option():
                self._non_second_primary_datetime_field_()
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    self._right_paren_()
            with self._option():
                self._token('SECOND')
                with self._optional():
                    self._left_paren_()
                    self._precision_()
                    with self._optional():
                        self._comma_()
                        self._precision_()
                    self._right_paren_()
            self._error('expecting one of: SECOND')

    @graken()
    def _primary_datetime_field_(self):
        with self._choice():
            with self._option():
                self._non_second_primary_datetime_field_()
            with self._option():
                self._token('SECOND')
            self._error('expecting one of: SECOND')

    @graken()
    def _non_second_primary_datetime_field_(self):
        with self._choice():
            with self._option():
                self._token('YEAR')
            with self._option():
                self._token('MONTH')
            with self._option():
                self._token('DAY')
            with self._option():
                self._token('HOUR')
            with self._option():
                self._token('MINUTE')
            self._error('expecting one of: DAY HOUR MINUTE MONTH YEAR')

    @graken()
    def _language_clause_(self):
        self._token('LANGUAGE')
        self._language_name_()

    @graken()
    def _language_name_(self):
        with self._choice():
            with self._option():
                self._token('ADA')
            with self._option():
                self._token('C')
            with self._option():
                self._token('COBOL')
            with self._option():
                self._token('FORTRAN')
            with self._option():
                self._token('M')
            with self._option():
                self._token('MUMPS')
            with self._option():
                self._token('PASCAL')
            with self._option():
                self._token('PLI')
            with self._option():
                self._token('SQL')
            self._error('expecting one of: ADA C COBOL FORTRAN M MUMPS PASCAL PLI SQL')

    @graken()
    def _path_specification_(self):
        self._token('PATH')
        self._schema_name_list_()

    @graken()
    def _schema_name_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._schema_name_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _routine_invocation_(self):
        self._schema_qualified_name_()
        self._sql_argument_list_()

    @graken()
    def _sql_argument_list_(self):
        self._left_paren_()
        with self._optional():

            def sep0():
                self._token(',')

            def block0():
                self._sql_argument_()
            self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _sql_argument_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._generalized_expression_()
            with self._option():
                self._target_specification_()
            with self._option():
                self._contextually_typed_value_specification_()
            with self._option():
                self._named_argument_specification_()
            self._error('no available options')

    @graken()
    def _generalized_expression_(self):
        self._value_expression_()
        self._token('AS')
        self._schema_qualified_name_()

    @graken()
    def _specific_routine_designator_(self):
        with self._choice():
            with self._option():
                self._token('SPECIFIC')
                self._routine_type_()
                self._schema_qualified_name_()
            with self._option():
                self._routine_type_()
                self._member_name_()
                with self._optional():
                    self._token('FOR')
                    self._schema_qualified_name_()
            self._error('no available options')

    @graken()
    def _routine_type_(self):
        with self._choice():
            with self._option():
                self._token('ROUTINE')
            with self._option():
                self._token('FUNCTION')
            with self._option():
                self._token('PROCEDURE')
            with self._option():
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('INSTANCE')
                        with self._option():
                            self._token('STATIC')
                        with self._option():
                            self._token('CONSTRUCTOR')
                        self._error('expecting one of: CONSTRUCTOR INSTANCE STATIC')
                self._token('METHOD')
            self._error('expecting one of: CONSTRUCTOR FUNCTION INSTANCE METHOD PROCEDURE ROUTINE STATIC')

    @graken()
    def _member_name_(self):
        self._member_name_alternatives_()
        with self._optional():
            self._data_type_list_()

    @graken()
    def _member_name_alternatives_(self):
        with self._choice():
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._identifier_()
            self._error('no available options')

    @graken()
    def _data_type_list_(self):
        self._left_paren_()
        with self._optional():

            def sep0():
                self._token(',')

            def block0():
                self._data_type_()
            self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _collate_clause_(self):
        self._token('COLLATE')
        self._schema_qualified_name_()

    @graken()
    def _constraint_name_definition_(self):
        self._token('CONSTRAINT')
        self._schema_qualified_name_()

    @graken()
    def _constraint_characteristics_(self):
        with self._choice():
            with self._option():
                self._constraint_check_time_()
                with self._optional():
                    with self._optional():
                        self._token('NOT')
                    self._token('DEFERRABLE')
                with self._optional():
                    self._constraint_enforcement_()
            with self._option():
                with self._optional():
                    self._token('NOT')
                self._token('DEFERRABLE')
                with self._optional():
                    self._constraint_check_time_()
                with self._optional():
                    self._constraint_enforcement_()
            with self._option():
                self._constraint_enforcement_()
            self._error('expecting one of: DEFERRABLE NOT')

    @graken()
    def _constraint_check_time_(self):
        with self._choice():
            with self._option():
                self._token('INITIALLY')
                self._token('DEFERRED')
            with self._option():
                self._token('INITIALLY')
                self._token('IMMEDIATE')
            self._error('expecting one of: INITIALLY')

    @graken()
    def _aggregate_function_(self):
        with self._choice():
            with self._option():
                self._token('COUNT')
                self._left_paren_()
                self._asterisk_()
                self._right_paren_()
                with self._optional():
                    self._filter_clause_()
            with self._option():
                self._general_set_function_()
                with self._optional():
                    self._filter_clause_()
            with self._option():
                self._binary_set_function_()
                with self._optional():
                    self._filter_clause_()
            with self._option():
                self._ordered_set_function_()
                with self._optional():
                    self._filter_clause_()
            with self._option():
                self._array_aggregate_function_()
                with self._optional():
                    self._filter_clause_()
            self._error('no available options')

    @graken()
    def _general_set_function_(self):
        self._computational_operation_()
        self._left_paren_()
        with self._optional():
            self._set_quantifier_()
        self._value_expression_()
        self._right_paren_()

    @graken()
    def _computational_operation_(self):
        with self._choice():
            with self._option():
                self._token('AVG')
            with self._option():
                self._token('MAX')
            with self._option():
                self._token('MIN')
            with self._option():
                self._token('SUM')
            with self._option():
                self._token('EVERY')
            with self._option():
                self._token('ANY')
            with self._option():
                self._token('SOME')
            with self._option():
                self._token('COUNT')
            with self._option():
                self._token('STDDEV_POP')
            with self._option():
                self._token('STDDEV_SAMP')
            with self._option():
                self._token('VAR_SAMP')
            with self._option():
                self._token('VAR_POP')
            with self._option():
                self._token('COLLECT')
            with self._option():
                self._token('FUSION')
            with self._option():
                self._token('INTERSECTION')
            self._error('expecting one of: ANY AVG COLLECT COUNT EVERY FUSION INTERSECTION MAX MIN SOME STDDEV_POP STDDEV_SAMP SUM VAR_POP VAR_SAMP')

    @graken()
    def _set_quantifier_(self):
        with self._choice():
            with self._option():
                self._token('DISTINCT')
            with self._option():
                self._token('ALL')
            self._error('expecting one of: ALL DISTINCT')

    @graken()
    def _filter_clause_(self):
        self._token('FILTER')
        self._left_paren_()
        self._token('WHERE')
        self._search_condition_()
        self._right_paren_()

    @graken()
    def _binary_set_function_(self):
        self._binary_set_function_type_()
        self._left_paren_()
        self._numeric_value_expression_()
        self._comma_()
        self._numeric_value_expression_()
        self._right_paren_()

    @graken()
    def _binary_set_function_type_(self):
        with self._choice():
            with self._option():
                self._token('COVAR_POP')
            with self._option():
                self._token('COVAR_SAMP')
            with self._option():
                self._token('CORR')
            with self._option():
                self._token('REGR_SLOPE')
            with self._option():
                self._token('REGR_INTERCEPT')
            with self._option():
                self._token('REGR_COUNT')
            with self._option():
                self._token('REGR_R2')
            with self._option():
                self._token('REGR_AVGX')
            with self._option():
                self._token('REGR_AVGY')
            with self._option():
                self._token('REGR_SXX')
            with self._option():
                self._token('REGR_SYY')
            with self._option():
                self._token('REGR_SXY')
            self._error('expecting one of: CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY')

    @graken()
    def _ordered_set_function_(self):
        with self._choice():
            with self._option():
                self._hypothetical_set_function_()
            with self._option():
                self._inverse_distribution_function_()
            self._error('no available options')

    @graken()
    def _hypothetical_set_function_(self):
        self._rank_function_type_()
        self._left_paren_()
        self._hypothetical_set_function_value_expression_list_()
        self._right_paren_()
        self._within_group_specification_()

    @graken()
    def _within_group_specification_(self):
        self._token('WITHIN')
        self._token('GROUP')
        self._left_paren_()
        self._order_by_clause_()
        self._right_paren_()

    @graken()
    def _hypothetical_set_function_value_expression_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._value_expression_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _inverse_distribution_function_(self):
        self._inverse_distribution_function_type_()
        self._left_paren_()
        self._numeric_value_expression_()
        self._right_paren_()
        self._within_group_specification_()

    @graken()
    def _inverse_distribution_function_type_(self):
        with self._choice():
            with self._option():
                self._token('PERCENTILE_CONT')
            with self._option():
                self._token('PERCENTILE_DISC')
            self._error('expecting one of: PERCENTILE_CONT PERCENTILE_DISC')

    @graken()
    def _array_aggregate_function_(self):
        self._token('ARRAY_AGG')
        self._left_paren_()
        self._value_expression_()
        with self._optional():
            self._token('ORDER')
            self._token('BY')
            self._sort_specification_list_()
        self._right_paren_()

    @graken()
    def _sort_specification_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._sort_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _sort_specification_(self):
        self._value_expression_()
        with self._optional():
            self._ordering_specification_()
        with self._optional():
            self._null_ordering_()

    @graken()
    def _ordering_specification_(self):
        with self._choice():
            with self._option():
                self._token('ASC')
            with self._option():
                self._token('DESC')
            self._error('expecting one of: ASC DESC')

    @graken()
    def _null_ordering_(self):
        with self._choice():
            with self._option():
                self._token('NULLS')
                self._token('FIRST')
            with self._option():
                self._token('NULLS')
                self._token('LAST')
            self._error('expecting one of: NULLS')

    @graken()
    def _schema_definition_(self):
        self._token('CREATE')
        self._token('SCHEMA')
        self._schema_name_clause_()
        with self._optional():
            self._schema_character_set_or_path_()
        with self._optional():

            def block0():
                self._schema_element_()
            self._positive_closure(block0)

    @graken()
    def _schema_character_set_or_path_(self):
        with self._choice():
            with self._option():
                self._schema_character_set_specification_()
            with self._option():
                self._schema_path_specification_()
            with self._option():
                self._schema_character_set_specification_()
                self._schema_path_specification_()
            with self._option():
                self._schema_path_specification_()
                self._schema_character_set_specification_()
            self._error('no available options')

    @graken()
    def _schema_name_clause_(self):
        with self._choice():
            with self._option():
                self._schema_name_()
            with self._option():
                self._token('AUTHORIZATION')
                self._identifier_()
            with self._option():
                self._schema_name_()
                self._token('AUTHORIZATION')
                self._identifier_()
            self._error('no available options')

    @graken()
    def _schema_character_set_specification_(self):
        self._token('DEFAULT')
        self._token('CHARACTER')
        self._token('SET')
        self._character_set_name_()

    @graken()
    def _schema_path_specification_(self):
        self._path_specification_()

    @graken()
    def _schema_element_(self):
        with self._choice():
            with self._option():
                self._table_definition_()
            with self._option():
                self._view_definition_()
            with self._option():
                self._domain_definition_()
            with self._option():
                self._character_set_definition_()
            with self._option():
                self._collation_definition_()
            with self._option():
                self._transliteration_definition_()
            with self._option():
                self._assertion_definition_()
            with self._option():
                self._trigger_definition_()
            with self._option():
                self._user_defined_type_definition_()
            with self._option():
                self._user_defined_cast_definition_()
            with self._option():
                self._user_defined_ordering_definition_()
            with self._option():
                self._transform_definition_()
            with self._option():
                self._schema_routine_()
            with self._option():
                self._sequence_generator_definition_()
            with self._option():
                self._grant_statement_()
            with self._option():
                self._role_definition_()
            self._error('no available options')

    @graken()
    def _drop_schema_statement_(self):
        self._token('DROP')
        self._token('SCHEMA')
        self._schema_name_()
        self._drop_behavior_()

    @graken()
    def _drop_behavior_(self):
        with self._choice():
            with self._option():
                self._token('CASCADE')
            with self._option():
                self._token('RESTRICT')
            self._error('expecting one of: CASCADE RESTRICT')

    @graken()
    def _table_definition_(self):
        self._token('CREATE')
        with self._optional():
            self._table_scope_()
        self._token('TABLE')
        self._table_name_()
        self._table_contents_source_()
        with self._optional():
            self._token('WITH')
            self._token('SYSTEM')
            self._token('VERSIONING')
        with self._optional():
            self._token('ON')
            self._token('COMMIT')
            self._table_commit_action_()
            self._token('ROWS')

    @graken()
    def _table_contents_source_(self):
        with self._choice():
            with self._option():
                self._table_element_list_()
            with self._option():
                self._typed_table_clause_()
            with self._option():
                self._as_subquery_clause_()
            self._error('no available options')

    @graken()
    def _table_scope_(self):
        self._global_or_local_()
        self._token('TEMPORARY')

    @graken()
    def _global_or_local_(self):
        with self._choice():
            with self._option():
                self._token('GLOBAL')
            with self._option():
                self._token('LOCAL')
            self._error('expecting one of: GLOBAL LOCAL')

    @graken()
    def _table_commit_action_(self):
        with self._choice():
            with self._option():
                self._token('PRESERVE')
            with self._option():
                self._token('DELETE')
            self._error('expecting one of: DELETE PRESERVE')

    @graken()
    def _table_element_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._table_element_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _table_element_(self):
        with self._choice():
            with self._option():
                self._column_definition_()
            with self._option():
                self._table_period_definition_()
            with self._option():
                self._table_constraint_definition_()
            with self._option():
                self._like_clause_()
            self._error('no available options')

    @graken()
    def _typed_table_clause_(self):
        self._token('OF')
        self._schema_qualified_name_()
        with self._optional():
            self._subtable_clause_()
        with self._optional():
            self._typed_table_element_list_()

    @graken()
    def _typed_table_element_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._typed_table_element_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _typed_table_element_(self):
        with self._choice():
            with self._option():
                self._column_options_()
            with self._option():
                self._table_constraint_definition_()
            with self._option():
                self._self_referencing_column_specification_()
            self._error('no available options')

    @graken()
    def _self_referencing_column_specification_(self):
        self._token('REF')
        self._token('IS')
        self._identifier_()
        with self._optional():
            self._reference_generation_()

    @graken()
    def _reference_generation_(self):
        with self._choice():
            with self._option():
                self._token('SYSTEM')
                self._token('GENERATED')
            with self._option():
                self._token('USER')
                self._token('GENERATED')
            with self._option():
                self._token('DERIVED')
            self._error('expecting one of: DERIVED SYSTEM USER')

    @graken()
    def _column_options_(self):
        self._identifier_()
        self._token('WITH')
        self._token('OPTIONS')
        self._column_option_list_()

    @graken()
    def _column_option_list_(self):
        with self._optional():
            self._scope_clause_()
        with self._optional():
            self._default_clause_()
        with self._optional():

            def block0():
                self._column_constraint_definition_()
            self._positive_closure(block0)

    @graken()
    def _subtable_clause_(self):
        self._token('UNDER')
        self._table_name_()

    @graken()
    def _like_clause_(self):
        self._token('LIKE')
        self._table_name_()
        with self._optional():
            self._like_options_()

    @graken()
    def _like_options_(self):

        def block0():
            self._like_option_()
        self._positive_closure(block0)

    @graken()
    def _like_option_(self):
        with self._choice():
            with self._option():
                self._identity_option_()
            with self._option():
                self._column_default_option_()
            with self._option():
                self._generation_option_()
            self._error('no available options')

    @graken()
    def _identity_option_(self):
        with self._choice():
            with self._option():
                self._token('INCLUDING')
                self._token('IDENTITY')
            with self._option():
                self._token('EXCLUDING')
                self._token('IDENTITY')
            self._error('expecting one of: EXCLUDING INCLUDING')

    @graken()
    def _column_default_option_(self):
        with self._choice():
            with self._option():
                self._token('INCLUDING')
                self._token('DEFAULTS')
            with self._option():
                self._token('EXCLUDING')
                self._token('DEFAULTS')
            self._error('expecting one of: EXCLUDING INCLUDING')

    @graken()
    def _generation_option_(self):
        with self._choice():
            with self._option():
                self._token('INCLUDING')
                self._token('GENERATED')
            with self._option():
                self._token('EXCLUDING')
                self._token('GENERATED')
            self._error('expecting one of: EXCLUDING INCLUDING')

    @graken()
    def _as_subquery_clause_(self):
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()
        self._token('AS')
        self._subquery_()
        self._with_or_without_data_()

    @graken()
    def _with_or_without_data_(self):
        with self._choice():
            with self._option():
                self._token('WITH')
                self._token('NO')
                self._token('DATA')
            with self._option():
                self._token('WITH')
                self._token('DATA')
            self._error('expecting one of: WITH')

    @graken()
    def _column_definition_(self):
        self._identifier_()
        with self._optional():
            self._data_type_or_domain_name_()
        with self._optional():
            with self._choice():
                with self._option():
                    self._default_clause_()
                with self._option():
                    self._identity_column_specification_()
                with self._option():
                    self._generation_clause_()
                with self._option():
                    self._system_time_period_start_column_specification_()
                with self._option():
                    self._system_time_period_end_column_specification_()
                self._error('no available options')
        with self._optional():

            def block1():
                self._column_constraint_definition_()
            self._positive_closure(block1)
        with self._optional():
            self._collate_clause_()

    @graken()
    def _data_type_or_domain_name_(self):
        with self._choice():
            with self._option():
                self._data_type_()
            with self._option():
                self._schema_qualified_name_()
            self._error('no available options')

    @graken()
    def _column_constraint_definition_(self):
        with self._optional():
            self._constraint_name_definition_()
        self._column_constraint_()
        with self._optional():
            self._constraint_characteristics_()

    @graken()
    def _column_constraint_(self):
        with self._choice():
            with self._option():
                self._token('NOT')
                self._token('NULL')
            with self._option():
                self._unique_specification_()
            with self._option():
                self._references_specification_()
            with self._option():
                self._check_constraint_definition_()
            self._error('expecting one of: NOT')

    @graken()
    def _identity_column_specification_(self):
        self._token('GENERATED')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('ALWAYS')
                with self._option():
                    self._token('BY')
                    self._token('DEFAULT')
                self._error('expecting one of: ALWAYS BY')
        self._token('AS')
        self._token('IDENTITY')
        with self._optional():
            self._left_paren_()
            self._common_sequence_generator_options_()
            self._right_paren_()

    @graken()
    def _generation_clause_(self):
        self._generation_rule_()
        self._token('AS')
        self._generation_expression_()

    @graken()
    def _generation_rule_(self):
        self._token('GENERATED')
        self._token('ALWAYS')

    @graken()
    def _generation_expression_(self):
        self._left_paren_()
        self._value_expression_()
        self._right_paren_()

    @graken()
    def _default_clause_(self):
        self._token('DEFAULT')
        self._default_option_()

    @graken()
    def _default_option_(self):
        with self._choice():
            with self._option():
                self._literal_()
            with self._option():
                self._datetime_value_function_()
            with self._option():
                self._token('USER')
            with self._option():
                self._token('CURRENT_USER')
            with self._option():
                self._token('CURRENT_ROLE')
            with self._option():
                self._token('SESSION_USER')
            with self._option():
                self._token('SYSTEM_USER')
            with self._option():
                self._token('CURRENT_CATALOG')
            with self._option():
                self._token('CURRENT_SCHEMA')
            with self._option():
                self._token('CURRENT_PATH')
            with self._option():
                self._implicitly_typed_value_specification_()
            self._error('expecting one of: CURRENT_CATALOG CURRENT_PATH CURRENT_ROLE CURRENT_SCHEMA CURRENT_USER SESSION_USER SYSTEM_USER USER')

    @graken()
    def _table_constraint_definition_(self):
        with self._optional():
            self._constraint_name_definition_()
        self._table_constraint_()
        with self._optional():
            self._constraint_characteristics_()

    @graken()
    def _table_constraint_(self):
        with self._choice():
            with self._option():
                self._unique_constraint_definition_()
            with self._option():
                self._referential_constraint_definition_()
            with self._option():
                self._check_constraint_definition_()
            self._error('no available options')

    @graken()
    def _unique_constraint_definition_(self):
        with self._choice():
            with self._option():
                self._unique_specification_()
                self._left_paren_()
                self._column_name_list_()
                with self._optional():
                    self._comma_()
                    self._without_overlap_specification_()
                self._right_paren_()
            with self._option():
                self._token('UNIQUE')
                self._token('(')
                self._token('VALUE')
                self._token(')')
            self._error('expecting one of: UNIQUE')

    @graken()
    def _unique_specification_(self):
        with self._choice():
            with self._option():
                self._token('UNIQUE')
            with self._option():
                self._token('PRIMARY')
                self._token('KEY')
            self._error('expecting one of: PRIMARY UNIQUE')

    @graken()
    def _without_overlap_specification_(self):
        self._identifier_()
        self._token('WITHOUT')
        self._token('OVERLAPS')

    @graken()
    def _referential_constraint_definition_(self):
        self._token('FOREIGN')
        self._token('KEY')
        self._left_paren_()
        self._column_name_list_()
        with self._optional():
            self._comma_()
            self._referencing_period_specification_()
        self._right_paren_()
        self._references_specification_()

    @graken()
    def _references_specification_(self):
        self._token('REFERENCES')
        self._referenced_table_and_columns_()
        with self._optional():
            self._token('MATCH')
            self._match_type_()
        with self._optional():
            self._referential_triggered_action_()

    @graken()
    def _match_type_(self):
        with self._choice():
            with self._option():
                self._token('FULL')
            with self._option():
                self._token('PARTIAL')
            with self._option():
                self._token('SIMPLE')
            self._error('expecting one of: FULL PARTIAL SIMPLE')

    @graken()
    def _referenced_table_and_columns_(self):
        self._table_name_()
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            with self._optional():
                self._comma_()
                self._referenced_period_specification_()
            self._right_paren_()

    @graken()
    def _referential_triggered_action_(self):
        with self._choice():
            with self._option():
                self._update_rule_()
                with self._optional():
                    self._delete_rule_()
            with self._option():
                self._delete_rule_()
                with self._optional():
                    self._update_rule_()
            self._error('no available options')

    @graken()
    def _update_rule_(self):
        self._token('ON')
        self._token('UPDATE')
        self._referential_action_()

    @graken()
    def _delete_rule_(self):
        self._token('ON')
        self._token('DELETE')
        self._referential_action_()

    @graken()
    def _referential_action_(self):
        with self._choice():
            with self._option():
                self._token('CASCADE')
            with self._option():
                self._token('SET')
                self._token('NULL')
            with self._option():
                self._token('SET')
                self._token('DEFAULT')
            with self._option():
                self._token('RESTRICT')
            with self._option():
                self._token('NO')
                self._token('ACTION')
            self._error('expecting one of: CASCADE NO RESTRICT SET')

    @graken()
    def _check_constraint_definition_(self):
        self._token('CHECK')
        self._left_paren_()
        self._search_condition_()
        self._right_paren_()

    @graken()
    def _alter_table_statement_(self):
        self._token('ALTER')
        self._token('TABLE')
        self._table_name_()
        self._alter_table_action_()

    @graken()
    def _alter_table_action_(self):
        with self._choice():
            with self._option():
                self._add_column_definition_()
            with self._option():
                self._alter_column_definition_()
            with self._option():
                self._drop_column_definition_()
            with self._option():
                self._add_table_constraint_definition_()
            with self._option():
                self._alter_table_constraint_definition_()
            with self._option():
                self._drop_table_constraint_definition_()
            with self._option():
                self._add_table_period_definition_()
            with self._option():
                self._drop_table_period_definition_()
            with self._option():
                self._add_system_versioning_clause_()
            with self._option():
                self._drop_system_versioning_clause_()
            self._error('no available options')

    @graken()
    def _add_column_definition_(self):
        self._token('ADD')
        with self._optional():
            self._token('COLUMN')
        self._column_definition_()

    @graken()
    def _alter_column_definition_(self):
        self._token('ALTER')
        with self._optional():
            self._token('COLUMN')
        self._identifier_()
        self._alter_column_action_()

    @graken()
    def _alter_column_action_(self):
        with self._choice():
            with self._option():
                self._set_column_default_clause_()
            with self._option():
                self._drop_column_default_clause_()
            with self._option():
                self._set_column_not_null_clause_()
            with self._option():
                self._drop_column_not_null_clause_()
            with self._option():
                self._add_column_scope_clause_()
            with self._option():
                self._drop_column_scope_clause_()
            with self._option():
                self._alter_column_data_type_clause_()
            with self._option():
                self._alter_identity_column_specification_()
            with self._option():
                self._drop_identity_property_clause_()
            with self._option():
                self._drop_column_generation_expression_clause_()
            self._error('no available options')

    @graken()
    def _set_column_default_clause_(self):
        self._token('SET')
        self._default_clause_()

    @graken()
    def _drop_column_default_clause_(self):
        self._token('DROP')
        self._token('DEFAULT')

    @graken()
    def _add_column_scope_clause_(self):
        self._token('ADD')
        self._scope_clause_()

    @graken()
    def _drop_column_scope_clause_(self):
        self._token('DROP')
        self._token('SCOPE')
        self._drop_behavior_()

    @graken()
    def _alter_identity_column_specification_(self):
        with self._choice():
            with self._option():
                self._set_identity_column_generation_clause_()
                with self._optional():

                    def block0():
                        self._alter_identity_column_option_()
                    self._positive_closure(block0)
            with self._option():

                def block1():
                    self._alter_identity_column_option_()
                self._positive_closure(block1)
            self._error('no available options')

    @graken()
    def _alter_identity_column_option_(self):
        with self._choice():
            with self._option():
                self._alter_sequence_generator_restart_option_()
            with self._option():
                self._token('SET')
                self._basic_sequence_generator_option_()
            self._error('no available options')

    @graken()
    def _drop_column_definition_(self):
        self._token('DROP')
        with self._optional():
            self._token('COLUMN')
        self._identifier_()
        self._drop_behavior_()

    @graken()
    def _add_table_constraint_definition_(self):
        self._token('ADD')
        self._table_constraint_definition_()

    @graken()
    def _drop_table_constraint_definition_(self):
        self._token('DROP')
        self._token('CONSTRAINT')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _drop_table_statement_(self):
        self._token('DROP')
        self._token('TABLE')
        self._table_name_()
        self._drop_behavior_()

    @graken()
    def _view_definition_(self):
        self._token('CREATE')
        with self._optional():
            self._token('RECURSIVE')
        self._token('VIEW')
        self._table_name_()
        self._view_specification_()
        self._token('AS')
        self._query_expression_()
        with self._optional():
            self._token('WITH')
            with self._optional():
                self._levels_clause_()
            self._token('CHECK')
            self._token('OPTION')

    @graken()
    def _view_specification_(self):
        with self._choice():
            with self._option():
                self._regular_view_specification_()
            with self._option():
                self._referenceable_view_specification_()
            self._error('no available options')

    @graken()
    def _regular_view_specification_(self):
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()

    @graken()
    def _referenceable_view_specification_(self):
        self._token('OF')
        self._schema_qualified_name_()
        with self._optional():
            self._subview_clause_()
        with self._optional():
            self._view_element_list_()

    @graken()
    def _subview_clause_(self):
        self._token('UNDER')
        self._table_name_()

    @graken()
    def _view_element_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._view_element_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _view_element_(self):
        with self._choice():
            with self._option():
                self._self_referencing_column_specification_()
            with self._option():
                self._view_column_option_()
            self._error('no available options')

    @graken()
    def _view_column_option_(self):
        self._identifier_()
        self._token('WITH')
        self._token('OPTIONS')
        self._scope_clause_()

    @graken()
    def _levels_clause_(self):
        with self._choice():
            with self._option():
                self._token('CASCADED')
            with self._option():
                self._token('LOCAL')
            self._error('expecting one of: CASCADED LOCAL')

    @graken()
    def _drop_view_statement_(self):
        self._token('DROP')
        self._token('VIEW')
        self._table_name_()
        self._drop_behavior_()

    @graken()
    def _domain_definition_(self):
        self._token('CREATE')
        self._token('DOMAIN')
        self._schema_qualified_name_()
        with self._optional():
            self._token('AS')
        self._predefined_type_()
        with self._optional():
            self._default_clause_()
        with self._optional():

            def block0():
                self._domain_constraint_()
            self._positive_closure(block0)
        with self._optional():
            self._collate_clause_()

    @graken()
    def _domain_constraint_(self):
        with self._optional():
            self._constraint_name_definition_()
        self._check_constraint_definition_()
        with self._optional():
            self._constraint_characteristics_()

    @graken()
    def _alter_domain_statement_(self):
        self._token('ALTER')
        self._token('DOMAIN')
        self._schema_qualified_name_()
        self._alter_domain_action_()

    @graken()
    def _alter_domain_action_(self):
        with self._choice():
            with self._option():
                self._set_domain_default_clause_()
            with self._option():
                self._drop_domain_default_clause_()
            with self._option():
                self._add_domain_constraint_definition_()
            with self._option():
                self._drop_domain_constraint_definition_()
            self._error('no available options')

    @graken()
    def _set_domain_default_clause_(self):
        self._token('SET')
        self._default_clause_()

    @graken()
    def _drop_domain_default_clause_(self):
        self._token('DROP')
        self._token('DEFAULT')

    @graken()
    def _add_domain_constraint_definition_(self):
        self._token('ADD')
        self._domain_constraint_()

    @graken()
    def _drop_domain_constraint_definition_(self):
        self._token('DROP')
        self._token('CONSTRAINT')
        self._schema_qualified_name_()

    @graken()
    def _drop_domain_statement_(self):
        self._token('DROP')
        self._token('DOMAIN')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _character_set_definition_(self):
        self._token('CREATE')
        self._token('CHARACTER')
        self._token('SET')
        self._character_set_name_()
        with self._optional():
            self._token('AS')
        self._character_set_source_()
        with self._optional():
            self._collate_clause_()

    @graken()
    def _character_set_source_(self):
        self._token('GET')
        self._character_set_name_()

    @graken()
    def _drop_character_set_statement_(self):
        self._token('DROP')
        self._token('CHARACTER')
        self._token('SET')
        self._character_set_name_()

    @graken()
    def _collation_definition_(self):
        self._token('CREATE')
        self._token('COLLATION')
        self._schema_qualified_name_()
        self._token('FOR')
        self._character_set_name_()
        self._token('FROM')
        self._schema_qualified_name_()
        with self._optional():
            self._pad_characteristic_()

    @graken()
    def _pad_characteristic_(self):
        with self._choice():
            with self._option():
                self._token('NO')
                self._token('PAD')
            with self._option():
                self._token('PAD')
                self._token('SPACE')
            self._error('expecting one of: NO PAD')

    @graken()
    def _drop_collation_statement_(self):
        self._token('DROP')
        self._token('COLLATION')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _transliteration_definition_(self):
        self._token('CREATE')
        self._token('TRANSLATION')
        self._schema_qualified_name_()
        self._token('FOR')
        self._character_set_name_()
        self._token('TO')
        self._character_set_name_()
        self._token('FROM')
        self._transliteration_source_()

    @graken()
    def _transliteration_source_(self):
        with self._choice():
            with self._option():
                self._schema_qualified_name_()
            with self._option():
                self._specific_routine_designator_()
            self._error('no available options')

    @graken()
    def _drop_transliteration_statement_(self):
        self._token('DROP')
        self._token('TRANSLATION')
        self._schema_qualified_name_()

    @graken()
    def _assertion_definition_(self):
        self._token('CREATE')
        self._token('ASSERTION')
        self._schema_qualified_name_()
        self._token('CHECK')
        self._left_paren_()
        self._search_condition_()
        self._right_paren_()
        with self._optional():
            self._constraint_characteristics_()

    @graken()
    def _drop_assertion_statement_(self):
        self._token('DROP')
        self._token('ASSERTION')
        self._schema_qualified_name_()
        with self._optional():
            self._drop_behavior_()

    @graken()
    def _trigger_definition_(self):
        self._token('CREATE')
        self._token('TRIGGER')
        self._schema_qualified_name_()
        self._trigger_action_time_()
        self._trigger_event_()
        self._token('ON')
        self._table_name_()
        with self._optional():
            self._token('REFERENCING')
            self._old_or_new_values_alias_list_()
        self._triggered_action_()

    @graken()
    def _trigger_action_time_(self):
        with self._choice():
            with self._option():
                self._token('BEFORE')
            with self._option():
                self._token('AFTER')
            with self._option():
                self._token('INSTEAD')
                self._token('OF')
            self._error('expecting one of: AFTER BEFORE INSTEAD')

    @graken()
    def _trigger_event_(self):
        with self._choice():
            with self._option():
                self._token('INSERT')
            with self._option():
                self._token('DELETE')
            with self._option():
                self._token('UPDATE')
                with self._optional():
                    self._token('OF')
                    self._column_name_list_()
            self._error('expecting one of: DELETE INSERT UPDATE')

    @graken()
    def _triggered_action_(self):
        with self._optional():
            self._token('FOR')
            self._token('EACH')
            with self._group():
                with self._choice():
                    with self._option():
                        self._token('ROW')
                    with self._option():
                        self._token('STATEMENT')
                    self._error('expecting one of: ROW STATEMENT')
        with self._optional():
            self._token('WHEN')
            self._left_paren_()
            self._search_condition_()
            self._right_paren_()
        self._triggered_sql_statement_()

    @graken()
    def _triggered_sql_statement_(self):
        with self._choice():
            with self._option():
                self._sql_procedure_statement_()
            with self._option():
                self._token('BEGIN')
                self._token('ATOMIC')

                def block0():
                    self._sql_procedure_statement_()
                    self._semicolon_()
                self._positive_closure(block0)
                self._token('END')
            self._error('no available options')

    @graken()
    def _old_or_new_values_alias_list_(self):

        def block0():
            self._old_or_new_values_alias_()
        self._positive_closure(block0)

    @graken()
    def _old_or_new_values_alias_(self):
        with self._choice():
            with self._option():
                self._token('OLD')
                with self._optional():
                    self._token('ROW')
                self._as_clause_()
            with self._option():
                self._token('NEW')
                with self._optional():
                    self._token('ROW')
                self._as_clause_()
            with self._option():
                self._token('OLD')
                self._token('TABLE')
                self._as_clause_()
            with self._option():
                self._token('NEW')
                self._token('TABLE')
                self._as_clause_()
            self._error('no available options')

    @graken()
    def _drop_trigger_statement_(self):
        self._token('DROP')
        self._token('TRIGGER')
        self._schema_qualified_name_()

    @graken()
    def _user_defined_type_definition_(self):
        self._token('CREATE')
        self._token('TYPE')
        self._user_defined_type_body_()

    @graken()
    def _user_defined_type_body_(self):
        self._schema_qualified_name_()
        with self._optional():
            self._subtype_clause_()
        with self._optional():
            self._token('AS')
            self._representation_()
        with self._optional():
            self._user_defined_type_option_list_()
        with self._optional():
            self._method_specification_list_()

    @graken()
    def _user_defined_type_option_list_(self):
        self._user_defined_type_option_()
        with self._optional():

            def block0():
                self._user_defined_type_option_()
            self._positive_closure(block0)

    @graken()
    def _user_defined_type_option_(self):
        with self._choice():
            with self._option():
                self._instantiable_clause_()
            with self._option():
                self._finality_()
            with self._option():
                self._reference_type_specification_()
            with self._option():
                self._cast_to_ref_()
            with self._option():
                self._cast_to_type_()
            with self._option():
                self._cast_to_distinct_()
            with self._option():
                self._cast_to_source_()
            self._error('no available options')

    @graken()
    def _subtype_clause_(self):
        self._token('UNDER')
        self._schema_qualified_name_()

    @graken()
    def _representation_(self):
        with self._choice():
            with self._option():
                self._predefined_type_()
            with self._option():
                self._collection_type_()
            with self._option():
                self._member_list_()
            self._error('no available options')

    @graken()
    def _member_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._member_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _member_(self):
        self._attribute_definition_()

    @graken()
    def _instantiable_clause_(self):
        with self._choice():
            with self._option():
                self._token('INSTANTIABLE')
            with self._option():
                self._token('NOT')
                self._token('INSTANTIABLE')
            self._error('expecting one of: INSTANTIABLE NOT')

    @graken()
    def _finality_(self):
        with self._choice():
            with self._option():
                self._token('FINAL')
            with self._option():
                self._token('NOT')
                self._token('FINAL')
            self._error('expecting one of: FINAL NOT')

    @graken()
    def _reference_type_specification_(self):
        with self._choice():
            with self._option():
                self._user_defined_representation_()
            with self._option():
                self._derived_representation_()
            with self._option():
                self._system_generated_representation_()
            self._error('no available options')

    @graken()
    def _user_defined_representation_(self):
        self._token('REF')
        self._token('USING')
        self._predefined_type_()

    @graken()
    def _derived_representation_(self):
        self._token('REF')
        self._token('FROM')
        self._list_of_attributes_()

    @graken()
    def _system_generated_representation_(self):
        self._token('REF')
        self._token('IS')
        self._token('SYSTEM')
        self._token('GENERATED')

    @graken()
    def _cast_to_ref_(self):
        self._token('CAST')
        self._left_paren_()
        self._token('SOURCE')
        self._token('AS')
        self._token('REF')
        self._right_paren_()
        self._token('WITH')
        self._identifier_()

    @graken()
    def _cast_to_type_(self):
        self._token('CAST')
        self._left_paren_()
        self._token('REF')
        self._token('AS')
        self._token('SOURCE')
        self._right_paren_()
        self._token('WITH')
        self._identifier_()

    @graken()
    def _list_of_attributes_(self):
        self._left_paren_()
        self._identifier_list_()
        self._right_paren_()

    @graken()
    def _cast_to_distinct_(self):
        self._token('CAST')
        self._left_paren_()
        self._token('SOURCE')
        self._token('AS')
        self._token('DISTINCT')
        self._right_paren_()
        self._token('WITH')
        self._identifier_()

    @graken()
    def _cast_to_source_(self):
        self._token('CAST')
        self._left_paren_()
        self._token('DISTINCT')
        self._token('AS')
        self._token('SOURCE')
        self._right_paren_()
        self._token('WITH')
        self._identifier_()

    @graken()
    def _method_specification_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._method_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _method_specification_(self):
        with self._choice():
            with self._option():
                self._original_method_specification_()
            with self._option():
                self._overriding_method_specification_()
            self._error('no available options')

    @graken()
    def _original_method_specification_(self):
        self._partial_method_specification_()
        with self._optional():
            self._token('SELF')
            self._token('AS')
            self._token('RESULT')
        with self._optional():
            self._token('SELF')
            self._token('AS')
            self._token('LOCATOR')
        with self._optional():
            self._method_characteristics_()

    @graken()
    def _overriding_method_specification_(self):
        self._token('OVERRIDING')
        self._partial_method_specification_()

    @graken()
    def _partial_method_specification_(self):
        with self._optional():
            with self._choice():
                with self._option():
                    self._token('INSTANCE')
                with self._option():
                    self._token('STATIC')
                with self._option():
                    self._token('CONSTRUCTOR')
                self._error('expecting one of: CONSTRUCTOR INSTANCE STATIC')
        self._token('METHOD')
        self._identifier_()
        self._sql_parameter_declaration_list_()
        self._returns_clause_()
        with self._optional():
            self._token('SPECIFIC')
            self._schema_qualified_name_()

    @graken()
    def _method_characteristics_(self):

        def block0():
            self._method_characteristic_()
        self._positive_closure(block0)

    @graken()
    def _method_characteristic_(self):
        with self._choice():
            with self._option():
                self._language_clause_()
            with self._option():
                self._parameter_style_clause_()
            with self._option():
                self._deterministic_characteristic_()
            with self._option():
                self._sql_data_access_indication_()
            with self._option():
                self._null_call_clause_()
            self._error('no available options')

    @graken()
    def _attribute_definition_(self):
        self._identifier_()
        self._data_type_()
        with self._optional():
            self._default_clause_()
        with self._optional():
            self._collate_clause_()

    @graken()
    def _alter_type_statement_(self):
        self._token('ALTER')
        self._token('TYPE')
        self._schema_qualified_name_()
        self._alter_type_action_()

    @graken()
    def _alter_type_action_(self):
        with self._choice():
            with self._option():
                self._add_attribute_definition_()
            with self._option():
                self._drop_attribute_definition_()
            with self._option():
                self._add_original_method_specification_()
            with self._option():
                self._add_overriding_method_specification_()
            with self._option():
                self._drop_method_specification_()
            self._error('no available options')

    @graken()
    def _add_attribute_definition_(self):
        self._token('ADD')
        self._token('ATTRIBUTE')
        self._attribute_definition_()

    @graken()
    def _drop_attribute_definition_(self):
        self._token('DROP')
        self._token('ATTRIBUTE')
        self._identifier_()
        self._token('RESTRICT')

    @graken()
    def _add_original_method_specification_(self):
        self._token('ADD')
        self._original_method_specification_()

    @graken()
    def _add_overriding_method_specification_(self):
        self._token('ADD')
        self._overriding_method_specification_()

    @graken()
    def _drop_method_specification_(self):
        self._token('DROP')
        self._specific_method_specification_designator_()
        self._token('RESTRICT')

    @graken()
    def _specific_method_specification_designator_(self):
        with self._optional():
            with self._choice():
                with self._option():
                    self._token('INSTANCE')
                with self._option():
                    self._token('STATIC')
                with self._option():
                    self._token('CONSTRUCTOR')
                self._error('expecting one of: CONSTRUCTOR INSTANCE STATIC')
        self._token('METHOD')
        self._identifier_()
        self._data_type_list_()

    @graken()
    def _drop_data_type_statement_(self):
        self._token('DROP')
        self._token('TYPE')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _schema_routine_(self):
        with self._choice():
            with self._option():
                self._schema_procedure_()
            with self._option():
                self._schema_function_()
            self._error('no available options')

    @graken()
    def _schema_procedure_(self):
        self._token('CREATE')
        self._sql_invoked_procedure_()

    @graken()
    def _schema_function_(self):
        self._token('CREATE')
        self._sql_invoked_function_()

    @graken()
    def _sql_invoked_procedure_(self):
        self._token('PROCEDURE')
        self._schema_qualified_name_()
        self._sql_parameter_declaration_list_()
        self._routine_characteristics_()
        self._routine_body_()

    @graken()
    def _sql_invoked_function_(self):
        with self._group():
            with self._choice():
                with self._option():
                    self._function_specification_()
                with self._option():
                    self._method_specification_designator_()
                self._error('no available options')
        self._routine_body_()

    @graken()
    def _sql_parameter_declaration_list_(self):
        self._left_paren_()
        with self._optional():

            def sep0():
                self._token(',')

            def block0():
                self._sql_parameter_declaration_()
            self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _sql_parameter_declaration_(self):
        with self._optional():
            self._parameter_mode_()
        with self._optional():
            self._identifier_()
        self._parameter_type_()
        with self._optional():
            self._token('RESULT')
        with self._optional():
            self._token('DEFAULT')
            self._parameter_default_()

    @graken()
    def _parameter_default_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._contextually_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _parameter_mode_(self):
        with self._choice():
            with self._option():
                self._token('IN')
            with self._option():
                self._token('OUT')
            with self._option():
                self._token('INOUT')
            self._error('expecting one of: IN INOUT OUT')

    @graken()
    def _parameter_type_(self):
        self._data_type_()
        with self._optional():
            self._locator_indication_()

    @graken()
    def _locator_indication_(self):
        self._token('AS')
        self._token('LOCATOR')

    @graken()
    def _function_specification_(self):
        self._token('FUNCTION')
        self._schema_qualified_name_()
        self._sql_parameter_declaration_list_()
        self._returns_clause_()
        self._routine_characteristics_()
        with self._optional():
            self._dispatch_clause_()

    @graken()
    def _method_specification_designator_(self):
        with self._choice():
            with self._option():
                self._token('SPECIFIC')
                self._token('METHOD')
                self._schema_qualified_name_()
            with self._option():
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('INSTANCE')
                        with self._option():
                            self._token('STATIC')
                        with self._option():
                            self._token('CONSTRUCTOR')
                        self._error('expecting one of: CONSTRUCTOR INSTANCE STATIC')
                self._token('METHOD')
                self._identifier_()
                self._sql_parameter_declaration_list_()
                with self._optional():
                    self._returns_clause_()
                self._token('FOR')
                self._schema_qualified_name_()
            self._error('no available options')

    @graken()
    def _routine_characteristics_(self):
        with self._optional():

            def block0():
                self._routine_characteristic_()
            self._positive_closure(block0)

    @graken()
    def _routine_characteristic_(self):
        with self._choice():
            with self._option():
                self._language_clause_()
            with self._option():
                self._parameter_style_clause_()
            with self._option():
                self._token('SPECIFIC')
                self._schema_qualified_name_()
            with self._option():
                self._deterministic_characteristic_()
            with self._option():
                self._sql_data_access_indication_()
            with self._option():
                self._null_call_clause_()
            with self._option():
                self._dynamic_result_sets_characteristic_()
            with self._option():
                self._savepoint_level_indication_()
            self._error('no available options')

    @graken()
    def _savepoint_level_indication_(self):
        with self._choice():
            with self._option():
                self._token('NEW')
                self._token('SAVEPOINT')
                self._token('LEVEL')
            with self._option():
                self._token('OLD')
                self._token('SAVEPOINT')
                self._token('LEVEL')
            self._error('expecting one of: NEW OLD')

    @graken()
    def _dynamic_result_sets_characteristic_(self):
        self._token('DYNAMIC')
        self._token('RESULT')
        self._token('SETS')
        self._unsigned_integer_()

    @graken()
    def _parameter_style_clause_(self):
        self._token('PARAMETER')
        self._token('STYLE')
        self._parameter_style_()

    @graken()
    def _dispatch_clause_(self):
        self._token('STATIC')
        self._token('DISPATCH')

    @graken()
    def _returns_clause_(self):
        self._token('RETURNS')
        self._returns_type_()

    @graken()
    def _returns_type_(self):
        with self._choice():
            with self._option():
                self._returns_data_type_()
                with self._optional():
                    self._result_cast_()
            with self._option():
                self._returns_table_type_()
            self._error('no available options')

    @graken()
    def _returns_table_type_(self):
        self._token('TABLE')
        self._table_function_column_list_()

    @graken()
    def _table_function_column_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._table_function_column_list_element_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _table_function_column_list_element_(self):
        self._identifier_()
        self._data_type_()

    @graken()
    def _result_cast_(self):
        self._token('CAST')
        self._token('FROM')
        self._result_cast_from_type_()

    @graken()
    def _result_cast_from_type_(self):
        self._data_type_()
        with self._optional():
            self._locator_indication_()

    @graken()
    def _returns_data_type_(self):
        self._data_type_()
        with self._optional():
            self._locator_indication_()

    @graken()
    def _routine_body_(self):
        with self._choice():
            with self._option():
                self._sql_routine_spec_()
            with self._option():
                self._external_body_reference_()
            self._error('no available options')

    @graken()
    def _sql_routine_spec_(self):
        with self._optional():
            self._rights_clause_()
        self._sql_procedure_statement_()

    @graken()
    def _rights_clause_(self):
        with self._choice():
            with self._option():
                self._token('SQL')
                self._token('SECURITY')
                self._token('INVOKER')
            with self._option():
                self._token('SQL')
                self._token('SECURITY')
                self._token('DEFINER')
            self._error('expecting one of: SQL')

    @graken()
    def _external_body_reference_(self):
        self._token('EXTERNAL')
        with self._optional():
            self._token('NAME')
            self._external_routine_name_()
        with self._optional():
            self._parameter_style_clause_()
        with self._optional():
            self._transform_group_specification_()
        with self._optional():
            self._external_security_clause_()

    @graken()
    def _external_security_clause_(self):
        with self._choice():
            with self._option():
                self._token('EXTERNAL')
                self._token('SECURITY')
                self._token('DEFINER')
            with self._option():
                self._token('EXTERNAL')
                self._token('SECURITY')
                self._token('INVOKER')
            with self._option():
                self._token('EXTERNAL')
                self._token('SECURITY')
                self._token('IMPLEMENTATION')
                self._token('DEFINED')
            self._error('expecting one of: EXTERNAL')

    @graken()
    def _parameter_style_(self):
        with self._choice():
            with self._option():
                self._token('SQL')
            with self._option():
                self._token('GENERAL')
            self._error('expecting one of: GENERAL SQL')

    @graken()
    def _deterministic_characteristic_(self):
        with self._choice():
            with self._option():
                self._token('DETERMINISTIC')
            with self._option():
                self._token('NOT')
                self._token('DETERMINISTIC')
            self._error('expecting one of: DETERMINISTIC NOT')

    @graken()
    def _sql_data_access_indication_(self):
        with self._choice():
            with self._option():
                self._token('NO')
                self._token('SQL')
            with self._option():
                self._token('CONTAINS')
                self._token('SQL')
            with self._option():
                self._token('READS')
                self._token('SQL')
                self._token('DATA')
            with self._option():
                self._token('MODIFIES')
                self._token('SQL')
                self._token('DATA')
            self._error('expecting one of: CONTAINS MODIFIES NO READS')

    @graken()
    def _null_call_clause_(self):
        with self._choice():
            with self._option():
                self._token('RETURNS')
                self._token('NULL')
                self._token('ON')
                self._token('NULL')
                self._token('INPUT')
            with self._option():
                self._token('CALLED')
                self._token('ON')
                self._token('NULL')
                self._token('INPUT')
            self._error('expecting one of: CALLED RETURNS')

    @graken()
    def _transform_group_specification_(self):
        self._token('TRANSFORM')
        self._token('GROUP')
        with self._group():
            with self._choice():
                with self._option():
                    self._identifier_()
                with self._option():
                    self._multiple_group_specification_()
                self._error('no available options')

    @graken()
    def _multiple_group_specification_(self):

        def sep0():
            self._token(',')

        def block0():
            self._group_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _group_specification_(self):
        self._identifier_()
        self._token('FOR')
        self._token('TYPE')
        self._schema_qualified_name_()

    @graken()
    def _alter_routine_statement_(self):
        self._token('ALTER')
        self._specific_routine_designator_()
        self._alter_routine_characteristics_()
        self._token('RESTRICT')

    @graken()
    def _alter_routine_characteristics_(self):

        def block0():
            self._alter_routine_characteristic_()
        self._positive_closure(block0)

    @graken()
    def _alter_routine_characteristic_(self):
        with self._choice():
            with self._option():
                self._language_clause_()
            with self._option():
                self._parameter_style_clause_()
            with self._option():
                self._sql_data_access_indication_()
            with self._option():
                self._null_call_clause_()
            with self._option():
                self._dynamic_result_sets_characteristic_()
            with self._option():
                self._token('NAME')
                self._external_routine_name_()
            self._error('no available options')

    @graken()
    def _drop_routine_statement_(self):
        self._token('DROP')
        self._specific_routine_designator_()
        self._drop_behavior_()

    @graken()
    def _user_defined_cast_definition_(self):
        self._token('CREATE')
        self._token('CAST')
        self._left_paren_()
        self._source_data_type_()
        self._token('AS')
        self._target_data_type_()
        self._right_paren_()
        self._token('WITH')
        self._specific_routine_designator_()
        with self._optional():
            self._token('AS')
            self._token('ASSIGNMENT')

    @graken()
    def _source_data_type_(self):
        self._data_type_()

    @graken()
    def _target_data_type_(self):
        self._data_type_()

    @graken()
    def _drop_user_defined_cast_statement_(self):
        self._token('DROP')
        self._token('CAST')
        self._left_paren_()
        self._source_data_type_()
        self._token('AS')
        self._target_data_type_()
        self._right_paren_()
        self._drop_behavior_()

    @graken()
    def _user_defined_ordering_definition_(self):
        self._token('CREATE')
        self._token('ORDERING')
        self._token('FOR')
        self._schema_qualified_name_()
        self._ordering_form_()

    @graken()
    def _ordering_form_(self):
        with self._choice():
            with self._option():
                self._equals_ordering_form_()
            with self._option():
                self._full_ordering_form_()
            self._error('no available options')

    @graken()
    def _equals_ordering_form_(self):
        self._token('EQUALS')
        self._token('ONLY')
        self._token('BY')
        self._ordering_category_()

    @graken()
    def _full_ordering_form_(self):
        self._token('ORDER')
        self._token('FULL')
        self._token('BY')
        self._ordering_category_()

    @graken()
    def _ordering_category_(self):
        with self._choice():
            with self._option():
                self._relative_category_()
            with self._option():
                self._map_category_()
            with self._option():
                self._state_category_()
            self._error('no available options')

    @graken()
    def _relative_category_(self):
        self._token('RELATIVE')
        self._token('WITH')
        self._specific_routine_designator_()

    @graken()
    def _map_category_(self):
        self._token('MAP')
        self._token('WITH')
        self._specific_routine_designator_()

    @graken()
    def _state_category_(self):
        self._token('STATE')
        with self._optional():
            self._schema_qualified_name_()

    @graken()
    def _drop_user_defined_ordering_statement_(self):
        self._token('DROP')
        self._token('ORDERING')
        self._token('FOR')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _transform_definition_(self):
        self._token('CREATE')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('TRANSFORM')
                with self._option():
                    self._token('TRANSFORMS')
                self._error('expecting one of: TRANSFORM TRANSFORMS')
        self._token('FOR')
        self._schema_qualified_name_()

        def block1():
            self._transform_group_()
        self._positive_closure(block1)

    @graken()
    def _transform_group_(self):
        self._identifier_()
        self._left_paren_()
        self._transform_element_list_()
        self._right_paren_()

    @graken()
    def _transform_element_list_(self):
        self._transform_element_()
        with self._optional():
            self._comma_()
            self._transform_element_()

    @graken()
    def _transform_element_(self):
        with self._choice():
            with self._option():
                self._to_sql_()
            with self._option():
                self._from_sql_()
            self._error('no available options')

    @graken()
    def _to_sql_(self):
        self._token('TO')
        self._token('SQL')
        self._token('WITH')
        self._specific_routine_designator_()

    @graken()
    def _from_sql_(self):
        self._token('FROM')
        self._token('SQL')
        self._token('WITH')
        self._specific_routine_designator_()

    @graken()
    def _alter_transform_statement_(self):
        self._token('ALTER')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('TRANSFORM')
                with self._option():
                    self._token('TRANSFORMS')
                self._error('expecting one of: TRANSFORM TRANSFORMS')
        self._token('FOR')
        self._schema_qualified_name_()

        def block1():
            self._alter_group_()
        self._positive_closure(block1)

    @graken()
    def _alter_group_(self):
        self._identifier_()
        self._left_paren_()
        self._alter_transform_action_list_()
        self._right_paren_()

    @graken()
    def _alter_transform_action_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._alter_transform_action_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _alter_transform_action_(self):
        with self._choice():
            with self._option():
                self._add_transform_element_list_()
            with self._option():
                self._drop_transform_element_list_()
            self._error('no available options')

    @graken()
    def _add_transform_element_list_(self):
        self._token('ADD')
        self._left_paren_()
        self._transform_element_list_()
        self._right_paren_()

    @graken()
    def _drop_transform_element_list_(self):
        self._token('DROP')
        self._left_paren_()
        self._transform_kind_()
        with self._optional():
            self._comma_()
            self._transform_kind_()
        self._drop_behavior_()
        self._right_paren_()

    @graken()
    def _transform_kind_(self):
        with self._choice():
            with self._option():
                self._token('TO')
                self._token('SQL')
            with self._option():
                self._token('FROM')
                self._token('SQL')
            self._error('expecting one of: FROM TO')

    @graken()
    def _drop_transform_statement_(self):
        self._token('DROP')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('TRANSFORM')
                with self._option():
                    self._token('TRANSFORMS')
                self._error('expecting one of: TRANSFORM TRANSFORMS')
        self._transforms_to_be_dropped_()
        self._token('FOR')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _transforms_to_be_dropped_(self):
        with self._choice():
            with self._option():
                self._token('ALL')
            with self._option():
                self._identifier_()
            self._error('expecting one of: ALL')

    @graken()
    def _sequence_generator_definition_(self):
        self._token('CREATE')
        self._token('SEQUENCE')
        self._schema_qualified_name_()
        with self._optional():
            self._sequence_generator_options_()

    @graken()
    def _sequence_generator_options_(self):

        def block0():
            self._sequence_generator_option_()
        self._positive_closure(block0)

    @graken()
    def _sequence_generator_option_(self):
        with self._choice():
            with self._option():
                self._sequence_generator_data_type_option_()
            with self._option():
                self._common_sequence_generator_options_()
            self._error('no available options')

    @graken()
    def _common_sequence_generator_options_(self):

        def block0():
            self._common_sequence_generator_option_()
        self._positive_closure(block0)

    @graken()
    def _common_sequence_generator_option_(self):
        with self._choice():
            with self._option():
                self._sequence_generator_start_with_option_()
            with self._option():
                self._basic_sequence_generator_option_()
            self._error('no available options')

    @graken()
    def _basic_sequence_generator_option_(self):
        with self._choice():
            with self._option():
                self._sequence_generator_increment_by_option_()
            with self._option():
                self._sequence_generator_maxvalue_option_()
            with self._option():
                self._sequence_generator_minvalue_option_()
            with self._option():
                self._sequence_generator_cycle_option_()
            self._error('no available options')

    @graken()
    def _sequence_generator_data_type_option_(self):
        self._token('AS')
        self._data_type_()

    @graken()
    def _sequence_generator_start_with_option_(self):
        self._token('START')
        self._token('WITH')
        self._signed_numeric_literal_()

    @graken()
    def _sequence_generator_increment_by_option_(self):
        self._token('INCREMENT')
        self._token('BY')
        self._signed_numeric_literal_()

    @graken()
    def _sequence_generator_maxvalue_option_(self):
        with self._choice():
            with self._option():
                self._token('MAXVALUE')
                self._signed_numeric_literal_()
            with self._option():
                self._token('NO')
                self._token('MAXVALUE')
            self._error('expecting one of: NO')

    @graken()
    def _sequence_generator_minvalue_option_(self):
        with self._choice():
            with self._option():
                self._token('MINVALUE')
                self._signed_numeric_literal_()
            with self._option():
                self._token('NO')
                self._token('MINVALUE')
            self._error('expecting one of: NO')

    @graken()
    def _sequence_generator_cycle_option_(self):
        with self._choice():
            with self._option():
                self._token('CYCLE')
            with self._option():
                self._token('NO')
                self._token('CYCLE')
            self._error('expecting one of: CYCLE NO')

    @graken()
    def _alter_sequence_generator_statement_(self):
        self._token('ALTER')
        self._token('SEQUENCE')
        self._schema_qualified_name_()
        self._alter_sequence_generator_options_()

    @graken()
    def _alter_sequence_generator_options_(self):

        def block0():
            self._alter_sequence_generator_option_()
        self._positive_closure(block0)

    @graken()
    def _alter_sequence_generator_option_(self):
        with self._choice():
            with self._option():
                self._alter_sequence_generator_restart_option_()
            with self._option():
                self._basic_sequence_generator_option_()
            self._error('no available options')

    @graken()
    def _alter_sequence_generator_restart_option_(self):
        self._token('RESTART')
        with self._optional():
            self._token('WITH')
            self._signed_numeric_literal_()

    @graken()
    def _drop_sequence_generator_statement_(self):
        self._token('DROP')
        self._token('SEQUENCE')
        self._schema_qualified_name_()
        self._drop_behavior_()

    @graken()
    def _grant_statement_(self):
        with self._choice():
            with self._option():
                self._grant_privilege_statement_()
            with self._option():
                self._grant_role_statement_()
            self._error('no available options')

    @graken()
    def _grant_privilege_statement_(self):
        self._token('GRANT')
        self._privileges_()
        self._token('TO')

        def sep0():
            self._token(',')

        def block0():
            self._grantee_()
        self._positive_closure(block0, prefix=sep0)
        with self._optional():
            self._token('WITH')
            self._token('HIERARCHY')
            self._token('OPTION')
        with self._optional():
            self._token('WITH')
            self._token('GRANT')
            self._token('OPTION')
        with self._optional():
            self._token('GRANTED')
            self._token('BY')
            self._grantor_()

    @graken()
    def _privileges_(self):
        self._object_privileges_()
        self._token('ON')
        self._object_name_()

    @graken()
    def _object_name_(self):
        with self._choice():
            with self._option():
                with self._optional():
                    self._token('TABLE')
                self._table_name_()
            with self._option():
                self._token('DOMAIN')
                self._schema_qualified_name_()
            with self._option():
                self._token('COLLATION')
                self._schema_qualified_name_()
            with self._option():
                self._token('CHARACTER')
                self._token('SET')
                self._character_set_name_()
            with self._option():
                self._token('TRANSLATION')
                self._schema_qualified_name_()
            with self._option():
                self._token('TYPE')
                self._schema_qualified_name_()
            with self._option():
                self._token('SEQUENCE')
                self._schema_qualified_name_()
            with self._option():
                self._specific_routine_designator_()
            self._error('no available options')

    @graken()
    def _object_privileges_(self):
        with self._choice():
            with self._option():
                self._token('ALL')
                self._token('PRIVILEGES')
            with self._option():

                def sep0():
                    self._token(',')

                def block0():
                    self._action_()
                self._positive_closure(block0, prefix=sep0)
            self._error('expecting one of: ALL')

    @graken()
    def _action_(self):
        with self._choice():
            with self._option():
                self._token('SELECT')
            with self._option():
                self._token('SELECT')
                self._left_paren_()
                self._column_name_list_()
                self._right_paren_()
            with self._option():
                self._token('SELECT')
                self._left_paren_()
                self._privilege_method_list_()
                self._right_paren_()
            with self._option():
                self._token('DELETE')
            with self._option():
                self._token('INSERT')
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._token('UPDATE')
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._token('REFERENCES')
                with self._optional():
                    self._left_paren_()
                    self._column_name_list_()
                    self._right_paren_()
            with self._option():
                self._token('USAGE')
            with self._option():
                self._token('TRIGGER')
            with self._option():
                self._token('UNDER')
            with self._option():
                self._token('EXECUTE')
            self._error('expecting one of: DELETE EXECUTE INSERT REFERENCES SELECT TRIGGER UNDER UPDATE USAGE')

    @graken()
    def _privilege_method_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._specific_routine_designator_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _grantee_(self):
        with self._choice():
            with self._option():
                self._token('PUBLIC')
            with self._option():
                self._identifier_()
            self._error('expecting one of: PUBLIC')

    @graken()
    def _grantor_(self):
        with self._choice():
            with self._option():
                self._token('CURRENT_USER')
            with self._option():
                self._token('CURRENT_ROLE')
            self._error('expecting one of: CURRENT_ROLE CURRENT_USER')

    @graken()
    def _role_definition_(self):
        self._token('CREATE')
        self._token('ROLE')
        self._identifier_()
        with self._optional():
            self._token('WITH')
            self._token('ADMIN')
            self._grantor_()

    @graken()
    def _grant_role_statement_(self):
        self._token('GRANT')
        self._identifier_list_()
        self._token('TO')

        def sep0():
            self._token(',')

        def block0():
            self._grantee_()
        self._positive_closure(block0, prefix=sep0)
        with self._optional():
            self._token('WITH')
            self._token('ADMIN')
            self._token('OPTION')
        with self._optional():
            self._token('GRANTED')
            self._token('BY')
            self._grantor_()

    @graken()
    def _drop_role_statement_(self):
        self._token('DROP')
        self._token('ROLE')
        self._identifier_()

    @graken()
    def _revoke_statement_(self):
        with self._choice():
            with self._option():
                self._revoke_privilege_statement_()
            with self._option():
                self._revoke_role_statement_()
            self._error('no available options')

    @graken()
    def _revoke_privilege_statement_(self):
        self._token('REVOKE')
        with self._optional():
            self._revoke_option_extension_()
        self._privileges_()
        self._token('FROM')

        def sep0():
            self._token(',')

        def block0():
            self._grantee_()
        self._positive_closure(block0, prefix=sep0)
        with self._optional():
            self._token('GRANTED')
            self._token('BY')
            self._grantor_()
        self._drop_behavior_()

    @graken()
    def _revoke_option_extension_(self):
        with self._choice():
            with self._option():
                self._token('GRANT')
                self._token('OPTION')
                self._token('FOR')
            with self._option():
                self._token('HIERARCHY')
                self._token('OPTION')
                self._token('FOR')
            self._error('expecting one of: GRANT HIERARCHY')

    @graken()
    def _revoke_role_statement_(self):
        self._token('REVOKE')
        with self._optional():
            self._token('ADMIN')
            self._token('OPTION')
            self._token('FOR')
        self._identifier_list_()
        self._token('FROM')

        def sep0():
            self._token(',')

        def block0():
            self._grantee_()
        self._positive_closure(block0, prefix=sep0)
        with self._optional():
            self._token('GRANTED')
            self._token('BY')
            self._grantor_()
        self._drop_behavior_()

    @graken()
    def _character_set_specification_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._character_set_name_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _sql_procedure_statement_(self):
        self._sql_executable_statement_()

    @graken()
    def _sql_executable_statement_(self):
        with self._choice():
            with self._option():
                self._sql_schema_statement_()
            with self._option():
                self._sql_data_statement_()
            with self._option():
                self._sql_control_statement_()
            with self._option():
                self._sql_transaction_statement_()
            with self._option():
                self._sql_connection_statement_()
            with self._option():
                self._sql_session_statement_()
            with self._option():
                self._get_diagnostics_statement_()
            with self._option():
                self._sql_dynamic_statement_()
            self._error('no available options')

    @graken()
    def _sql_schema_statement_(self):
        with self._choice():
            with self._option():
                self._sql_schema_definition_statement_()
            with self._option():
                self._sql_schema_manipulation_statement_()
            self._error('no available options')

    @graken()
    def _sql_schema_definition_statement_(self):
        with self._choice():
            with self._option():
                self._schema_definition_()
            with self._option():
                self._table_definition_()
            with self._option():
                self._view_definition_()
            with self._option():
                self._schema_routine_()
            with self._option():
                self._grant_statement_()
            with self._option():
                self._role_definition_()
            with self._option():
                self._domain_definition_()
            with self._option():
                self._character_set_definition_()
            with self._option():
                self._collation_definition_()
            with self._option():
                self._transliteration_definition_()
            with self._option():
                self._assertion_definition_()
            with self._option():
                self._trigger_definition_()
            with self._option():
                self._user_defined_type_definition_()
            with self._option():
                self._user_defined_cast_definition_()
            with self._option():
                self._user_defined_ordering_definition_()
            with self._option():
                self._transform_definition_()
            with self._option():
                self._sequence_generator_definition_()
            self._error('no available options')

    @graken()
    def _sql_schema_manipulation_statement_(self):
        with self._choice():
            with self._option():
                self._drop_schema_statement_()
            with self._option():
                self._alter_table_statement_()
            with self._option():
                self._drop_table_statement_()
            with self._option():
                self._drop_view_statement_()
            with self._option():
                self._alter_routine_statement_()
            with self._option():
                self._drop_routine_statement_()
            with self._option():
                self._drop_user_defined_cast_statement_()
            with self._option():
                self._revoke_statement_()
            with self._option():
                self._drop_role_statement_()
            with self._option():
                self._alter_domain_statement_()
            with self._option():
                self._drop_domain_statement_()
            with self._option():
                self._drop_character_set_statement_()
            with self._option():
                self._drop_collation_statement_()
            with self._option():
                self._drop_transliteration_statement_()
            with self._option():
                self._drop_assertion_statement_()
            with self._option():
                self._drop_trigger_statement_()
            with self._option():
                self._alter_type_statement_()
            with self._option():
                self._drop_data_type_statement_()
            with self._option():
                self._drop_user_defined_ordering_statement_()
            with self._option():
                self._alter_transform_statement_()
            with self._option():
                self._drop_transform_statement_()
            with self._option():
                self._alter_sequence_generator_statement_()
            with self._option():
                self._drop_sequence_generator_statement_()
            self._error('no available options')

    @graken()
    def _sql_data_statement_(self):
        with self._choice():
            with self._option():
                self._open_statement_()
            with self._option():
                self._fetch_statement_()
            with self._option():
                self._close_statement_()
            with self._option():
                self._select_statement_single_row_()
            with self._option():
                self._free_locator_statement_()
            with self._option():
                self._hold_locator_statement_()
            with self._option():
                self._sql_data_change_statement_()
            self._error('no available options')

    @graken()
    def _sql_data_change_statement_(self):
        with self._choice():
            with self._option():
                self._delete_statement_positioned_()
            with self._option():
                self._delete_statement_searched_()
            with self._option():
                self._insert_statement_()
            with self._option():
                self._update_statement_positioned_()
            with self._option():
                self._update_statement_searched_()
            with self._option():
                self._truncate_table_statement_()
            with self._option():
                self._merge_statement_()
            self._error('no available options')

    @graken()
    def _sql_control_statement_(self):
        with self._choice():
            with self._option():
                self._call_statement_()
            with self._option():
                self._return_statement_()
            self._error('no available options')

    @graken()
    def _sql_transaction_statement_(self):
        with self._choice():
            with self._option():
                self._start_transaction_statement_()
            with self._option():
                self._set_transaction_statement_()
            with self._option():
                self._set_constraints_mode_statement_()
            with self._option():
                self._savepoint_statement_()
            with self._option():
                self._release_savepoint_statement_()
            with self._option():
                self._commit_statement_()
            with self._option():
                self._rollback_statement_()
            self._error('no available options')

    @graken()
    def _sql_connection_statement_(self):
        with self._choice():
            with self._option():
                self._connect_statement_()
            with self._option():
                self._set_connection_statement_()
            with self._option():
                self._disconnect_statement_()
            self._error('no available options')

    @graken()
    def _sql_session_statement_(self):
        with self._choice():
            with self._option():
                self._set_session_user_identifier_statement_()
            with self._option():
                self._set_role_statement_()
            with self._option():
                self._set_local_time_zone_statement_()
            with self._option():
                self._set_session_characteristics_statement_()
            with self._option():
                self._set_catalog_statement_()
            with self._option():
                self._set_schema_statement_()
            with self._option():
                self._set_names_statement_()
            with self._option():
                self._set_path_statement_()
            with self._option():
                self._set_transform_group_statement_()
            with self._option():
                self._set_session_collation_statement_()
            self._error('no available options')

    @graken()
    def _sql_dynamic_statement_(self):
        with self._choice():
            with self._option():
                self._descriptor_statement_()
            with self._option():
                self._prepare_statement_()
            with self._option():
                self._deallocate_prepared_statement_()
            with self._option():
                self._describe_statement_()
            with self._option():
                self._execute_statement_()
            with self._option():
                self._execute_immediate_statement_()
            with self._option():
                self._sql_dynamic_data_statement_()
            self._error('no available options')

    @graken()
    def _sql_dynamic_data_statement_(self):
        with self._choice():
            with self._option():
                self._allocate_cursor_statement_()
            with self._option():
                self._result_set_cursor_()
            with self._option():
                self._dynamic_open_statement_()
            with self._option():
                self._dynamic_fetch_statement_()
            with self._option():
                self._dynamic_close_statement_()
            with self._option():
                self._dynamic_delete_statement_positioned_()
            with self._option():
                self._dynamic_update_statement_positioned_()
            self._error('no available options')

    @graken()
    def _descriptor_statement_(self):
        with self._choice():
            with self._option():
                self._allocate_descriptor_statement_()
            with self._option():
                self._deallocate_descriptor_statement_()
            with self._option():
                self._set_descriptor_statement_()
            with self._option():
                self._get_descriptor_statement_()
            self._error('no available options')

    @graken()
    def _cursor_sensitivity_(self):
        with self._choice():
            with self._option():
                self._token('SENSITIVE')
            with self._option():
                self._token('INSENSITIVE')
            with self._option():
                self._token('ASENSITIVE')
            self._error('expecting one of: ASENSITIVE INSENSITIVE SENSITIVE')

    @graken()
    def _cursor_scrollability_(self):
        with self._choice():
            with self._option():
                self._token('SCROLL')
            with self._option():
                self._token('NO')
                self._token('SCROLL')
            self._error('expecting one of: NO SCROLL')

    @graken()
    def _cursor_holdability_(self):
        with self._choice():
            with self._option():
                self._token('WITH')
                self._token('HOLD')
            with self._option():
                self._token('WITHOUT')
                self._token('HOLD')
            self._error('expecting one of: WITH WITHOUT')

    @graken()
    def _cursor_returnability_(self):
        with self._choice():
            with self._option():
                self._token('WITH')
                self._token('RETURN')
            with self._option():
                self._token('WITHOUT')
                self._token('RETURN')
            self._error('expecting one of: WITH WITHOUT')

    @graken()
    def _cursor_specification_(self):
        self._query_expression_()
        with self._optional():
            self._updatability_clause_()

    @graken()
    def _updatability_clause_(self):
        self._token('FOR')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('READ')
                    self._token('ONLY')
                with self._option():
                    self._token('UPDATE')
                    with self._optional():
                        self._token('OF')
                        self._column_name_list_()
                self._error('expecting one of: READ UPDATE')

    @graken()
    def _order_by_clause_(self):
        self._token('ORDER')
        self._token('BY')
        self._sort_specification_list_()

    @graken()
    def _open_statement_(self):
        self._token('OPEN')
        self._cursor_name_()

    @graken()
    def _fetch_statement_(self):
        self._token('FETCH')
        with self._optional():
            with self._optional():
                self._fetch_orientation_()
            self._token('FROM')
        self._cursor_name_()
        self._token('INTO')
        self._fetch_target_list_()

    @graken()
    def _fetch_orientation_(self):
        with self._choice():
            with self._option():
                self._token('NEXT')
            with self._option():
                self._token('PRIOR')
            with self._option():
                self._token('FIRST')
            with self._option():
                self._token('LAST')
            with self._option():
                with self._group():
                    with self._choice():
                        with self._option():
                            self._token('ABSOLUTE')
                        with self._option():
                            self._token('RELATIVE')
                        self._error('expecting one of: ABSOLUTE RELATIVE')
                self._simple_value_specification_()
            self._error('expecting one of: FIRST LAST NEXT PRIOR')

    @graken()
    def _fetch_target_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._target_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _close_statement_(self):
        self._token('CLOSE')
        self._cursor_name_()

    @graken()
    def _select_statement_single_row_(self):
        self._token('SELECT')
        with self._optional():
            self._set_quantifier_()
        self._select_list_()
        self._token('INTO')
        self._select_target_list_()
        self._table_expression_()

    @graken()
    def _select_target_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._target_specification_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _delete_statement_positioned_(self):
        self._token('DELETE')
        self._token('FROM')
        self._target_table_()
        with self._optional():
            self._as_clause_()
        self._token('WHERE')
        self._token('CURRENT')
        self._token('OF')
        self._cursor_name_()

    @graken()
    def _target_table_(self):
        with self._choice():
            with self._option():
                self._table_name_()
            with self._option():
                self._token('ONLY')
                self._left_paren_()
                self._table_name_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _delete_statement_searched_(self):
        self._token('DELETE')
        self._token('FROM')
        self._target_table_()
        with self._optional():
            self._token('FOR')
            self._token('PORTION')
            self._token('OF')
            self._identifier_()
            self._token('FROM')
            self._point_in_time_1_()
            self._token('TO')
            self._point_in_time_2_()
        with self._optional():
            self._as_clause_()
        with self._optional():
            self._token('WHERE')
            self._search_condition_()

    @graken()
    def _insert_statement_(self):
        self._token('INSERT')
        self._token('INTO')
        self._table_name_()
        self._insert_columns_and_source_()

    @graken()
    def _insert_columns_and_source_(self):
        with self._choice():
            with self._option():
                self._from_subquery_()
            with self._option():
                self._from_constructor_()
            with self._option():
                self._from_default_()
            self._error('no available options')

    @graken()
    def _from_subquery_(self):
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()
        with self._optional():
            self._override_clause_()
        self._query_expression_()

    @graken()
    def _from_constructor_(self):
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()
        with self._optional():
            self._override_clause_()
        self._contextually_typed_table_value_constructor_()

    @graken()
    def _override_clause_(self):
        with self._choice():
            with self._option():
                self._token('OVERRIDING')
                self._token('USER')
                self._token('VALUE')
            with self._option():
                self._token('OVERRIDING')
                self._token('SYSTEM')
                self._token('VALUE')
            self._error('expecting one of: OVERRIDING')

    @graken()
    def _from_default_(self):
        self._token('DEFAULT')
        self._token('VALUES')

    @graken()
    def _merge_statement_(self):
        self._token('MERGE')
        self._token('INTO')
        self._target_table_()
        with self._optional():
            self._as_clause_()
        self._token('USING')
        self._table_reference_()
        self._token('ON')
        self._search_condition_()
        self._merge_operation_specification_()

    @graken()
    def _merge_operation_specification_(self):

        def block0():
            self._merge_when_clause_()
        self._positive_closure(block0)

    @graken()
    def _merge_when_clause_(self):
        with self._choice():
            with self._option():
                self._merge_when_matched_clause_()
            with self._option():
                self._merge_when_not_matched_clause_()
            self._error('no available options')

    @graken()
    def _merge_when_matched_clause_(self):
        self._token('WHEN')
        self._token('MATCHED')
        with self._optional():
            self._token('AND')
            self._search_condition_()
        self._token('THEN')
        self._merge_update_or_delete_specification_()

    @graken()
    def _merge_when_not_matched_clause_(self):
        self._token('WHEN')
        self._token('NOT')
        self._token('MATCHED')
        with self._optional():
            self._token('AND')
            self._search_condition_()
        self._token('THEN')
        self._merge_insert_specification_()

    @graken()
    def _merge_update_specification_(self):
        self._token('UPDATE')
        self._token('SET')
        self._set_clause_list_()

    @graken()
    def _merge_insert_specification_(self):
        self._token('INSERT')
        with self._optional():
            self._left_paren_()
            self._column_name_list_()
            self._right_paren_()
        with self._optional():
            self._override_clause_()
        self._token('VALUES')
        self._merge_insert_value_list_()

    @graken()
    def _merge_insert_value_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._merge_insert_value_element_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _merge_insert_value_element_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._contextually_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _update_statement_positioned_(self):
        self._token('UPDATE')
        self._target_table_()
        with self._optional():
            self._as_clause_()
        self._token('SET')
        self._set_clause_list_()
        self._token('WHERE')
        self._token('CURRENT')
        self._token('OF')
        self._cursor_name_()

    @graken()
    def _update_statement_searched_(self):
        self._token('UPDATE')
        self._target_table_()
        with self._optional():
            self._token('FOR')
            self._token('PORTION')
            self._token('OF')
            self._identifier_()
            self._token('FROM')
            self._point_in_time_1_()
            self._token('TO')
            self._point_in_time_2_()
        with self._optional():
            self._as_clause_()
        self._token('SET')
        self._set_clause_list_()
        with self._optional():
            self._token('WHERE')
            self._search_condition_()

    @graken()
    def _set_clause_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._set_clause_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _set_clause_(self):
        with self._choice():
            with self._option():
                self._multiple_column_assignment_()
            with self._option():
                self._set_target_()
                self._equals_operator_()
                self._update_source_()
            self._error('no available options')

    @graken()
    def _set_target_(self):
        with self._choice():
            with self._option():
                self._update_target_()
            with self._option():
                self._mutated_set_clause_()
            self._error('no available options')

    @graken()
    def _multiple_column_assignment_(self):
        self._set_target_list_()
        self._equals_operator_()
        self._contextually_typed_row_value_expression_()

    @graken()
    def _set_target_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._set_target_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _update_target_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                self._identifier_()
                self._left_bracket_or_trigraph_()
                self._simple_value_specification_()
                self._right_bracket_or_trigraph_()
            self._error('no available options')

    @graken()
    def _mutated_set_clause_(self):
        self._mutated_target_()
        self._period_()
        self._identifier_()

    @graken()
    def _mutated_target_(self):
        with self._choice():
            with self._option():
                self._identifier_()
            with self._option():
                self._mutated_set_clause_()
            self._error('no available options')

    @graken()
    def _update_source_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._contextually_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _temporary_table_declaration_(self):
        self._token('DECLARE')
        self._token('LOCAL')
        self._token('TEMPORARY')
        self._token('TABLE')
        self._table_name_()
        self._table_element_list_()
        with self._optional():
            self._token('ON')
            self._token('COMMIT')
            self._table_commit_action_()
            self._token('ROWS')

    @graken()
    def _free_locator_statement_(self):
        self._token('FREE')
        self._token('LOCATOR')

        def sep0():
            self._token(',')

        def block0():
            self._locator_reference_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _locator_reference_(self):
        with self._choice():
            with self._option():
                self._host_parameter_name_()
            with self._option():
                self._dynamic_parameter_specification_()
            self._error('no available options')

    @graken()
    def _hold_locator_statement_(self):
        self._token('HOLD')
        self._token('LOCATOR')

        def sep0():
            self._token(',')

        def block0():
            self._locator_reference_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _call_statement_(self):
        self._token('CALL')
        self._routine_invocation_()

    @graken()
    def _return_statement_(self):
        self._token('RETURN')
        self._return_value_()

    @graken()
    def _return_value_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._token('NULL')
            self._error('expecting one of: NULL')

    @graken()
    def _start_transaction_statement_(self):
        self._token('START')
        self._token('TRANSACTION')
        with self._optional():
            self._transaction_characteristics_()

    @graken()
    def _transaction_mode_(self):
        with self._choice():
            with self._option():
                self._isolation_level_()
            with self._option():
                self._transaction_access_mode_()
            with self._option():
                self._diagnostics_size_()
            self._error('no available options')

    @graken()
    def _transaction_access_mode_(self):
        with self._choice():
            with self._option():
                self._token('READ')
                self._token('ONLY')
            with self._option():
                self._token('READ')
                self._token('WRITE')
            self._error('expecting one of: READ')

    @graken()
    def _isolation_level_(self):
        self._token('ISOLATION')
        self._token('LEVEL')
        self._level_of_isolation_()

    @graken()
    def _level_of_isolation_(self):
        with self._choice():
            with self._option():
                self._token('READ')
                self._token('UNCOMMITTED')
            with self._option():
                self._token('READ')
                self._token('COMMITTED')
            with self._option():
                self._token('REPEATABLE')
                self._token('READ')
            with self._option():
                self._token('SERIALIZABLE')
            self._error('expecting one of: READ REPEATABLE SERIALIZABLE')

    @graken()
    def _diagnostics_size_(self):
        self._token('DIAGNOSTICS')
        self._token('SIZE')
        self._simple_value_specification_()

    @graken()
    def _set_transaction_statement_(self):
        self._token('SET')
        with self._optional():
            self._token('LOCAL')
        self._token('TRANSACTION')
        self._transaction_characteristics_()

    @graken()
    def _transaction_characteristics_(self):

        def sep0():
            self._token(',')

        def block0():
            self._transaction_mode_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _set_constraints_mode_statement_(self):
        self._token('SET')
        self._token('CONSTRAINTS')
        self._constraint_name_list_()
        with self._group():
            with self._choice():
                with self._option():
                    self._token('DEFERRED')
                with self._option():
                    self._token('IMMEDIATE')
                self._error('expecting one of: DEFERRED IMMEDIATE')

    @graken()
    def _constraint_name_list_(self):
        with self._choice():
            with self._option():
                self._token('ALL')
            with self._option():

                def sep0():
                    self._token(',')

                def block0():
                    self._schema_qualified_name_()
                self._positive_closure(block0, prefix=sep0)
            self._error('expecting one of: ALL')

    @graken()
    def _savepoint_statement_(self):
        self._token('SAVEPOINT')
        self._identifier_()

    @graken()
    def _release_savepoint_statement_(self):
        self._token('RELEASE')
        self._token('SAVEPOINT')
        self._identifier_()

    @graken()
    def _commit_statement_(self):
        self._token('COMMIT')
        with self._optional():
            self._token('WORK')
        with self._optional():
            self._token('AND')
            with self._optional():
                self._token('NO')
            self._token('CHAIN')

    @graken()
    def _rollback_statement_(self):
        self._token('ROLLBACK')
        with self._optional():
            self._token('WORK')
        with self._optional():
            self._token('AND')
            with self._optional():
                self._token('NO')
            self._token('CHAIN')
        with self._optional():
            self._savepoint_clause_()

    @graken()
    def _savepoint_clause_(self):
        self._token('TO')
        self._token('SAVEPOINT')
        self._identifier_()

    @graken()
    def _connect_statement_(self):
        self._token('CONNECT')
        self._token('TO')
        self._connection_target_()

    @graken()
    def _connection_target_(self):
        with self._choice():
            with self._option():
                self._simple_value_specification_()
                with self._optional():
                    self._token('AS')
                    self._connection_name_()
                with self._optional():
                    self._token('USER')
                    self._simple_value_specification_()
            with self._option():
                self._token('DEFAULT')
            self._error('expecting one of: DEFAULT')

    @graken()
    def _set_connection_statement_(self):
        self._token('SET')
        self._token('CONNECTION')
        self._connection_object_()

    @graken()
    def _connection_object_(self):
        with self._choice():
            with self._option():
                self._token('DEFAULT')
            with self._option():
                self._connection_name_()
            self._error('expecting one of: DEFAULT')

    @graken()
    def _disconnect_statement_(self):
        self._token('DISCONNECT')
        self._disconnect_object_()

    @graken()
    def _disconnect_object_(self):
        with self._choice():
            with self._option():
                self._connection_object_()
            with self._option():
                self._token('ALL')
            with self._option():
                self._token('CURRENT')
            self._error('expecting one of: ALL CURRENT')

    @graken()
    def _set_session_characteristics_statement_(self):
        self._token('SET')
        self._token('SESSION')
        self._token('CHARACTERISTICS')
        self._token('AS')
        self._session_characteristic_list_()

    @graken()
    def _session_characteristic_list_(self):

        def sep0():
            self._token(',')

        def block0():
            self._session_characteristic_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _session_characteristic_(self):
        self._token('TRANSACTION')
        self._transaction_characteristics_()

    @graken()
    def _set_session_user_identifier_statement_(self):
        self._token('SET')
        self._token('SESSION')
        self._token('AUTHORIZATION')
        self._value_specification_()

    @graken()
    def _set_role_statement_(self):
        self._token('SET')
        self._token('ROLE')
        self._role_specification_()

    @graken()
    def _role_specification_(self):
        with self._choice():
            with self._option():
                self._value_specification_()
            with self._option():
                self._token('NONE')
            self._error('expecting one of: NONE')

    @graken()
    def _set_local_time_zone_statement_(self):
        self._token('SET')
        self._token('TIME')
        self._token('ZONE')
        self._set_time_zone_value_()

    @graken()
    def _set_time_zone_value_(self):
        with self._choice():
            with self._option():
                self._interval_value_expression_()
            with self._option():
                self._token('LOCAL')
            self._error('expecting one of: LOCAL')

    @graken()
    def _set_catalog_statement_(self):
        self._token('SET')
        self._catalog_name_characteristic_()

    @graken()
    def _catalog_name_characteristic_(self):
        self._token('CATALOG')
        self._value_specification_()

    @graken()
    def _set_schema_statement_(self):
        self._token('SET')
        self._schema_name_characteristic_()

    @graken()
    def _schema_name_characteristic_(self):
        self._token('SCHEMA')
        self._value_specification_()

    @graken()
    def _set_names_statement_(self):
        self._token('SET')
        self._character_set_name_characteristic_()

    @graken()
    def _character_set_name_characteristic_(self):
        self._token('NAMES')
        self._value_specification_()

    @graken()
    def _set_path_statement_(self):
        self._token('SET')
        self._sql_path_characteristic_()

    @graken()
    def _sql_path_characteristic_(self):
        self._token('PATH')
        self._value_specification_()

    @graken()
    def _set_transform_group_statement_(self):
        self._token('SET')
        self._transform_group_characteristic_()

    @graken()
    def _transform_group_characteristic_(self):
        with self._choice():
            with self._option():
                self._token('DEFAULT')
                self._token('TRANSFORM')
                self._token('GROUP')
                self._value_specification_()
            with self._option():
                self._token('TRANSFORM')
                self._token('GROUP')
                self._token('FOR')
                self._token('TYPE')
                self._schema_qualified_name_()
                self._value_specification_()
            self._error('no available options')

    @graken()
    def _set_session_collation_statement_(self):
        with self._choice():
            with self._option():
                self._token('SET')
                self._token('COLLATION')
                self._value_specification_()
                with self._optional():
                    self._token('FOR')
                    self._character_set_specification_list_()
            with self._option():
                self._token('SET')
                self._token('NO')
                self._token('COLLATION')
                with self._optional():
                    self._token('FOR')
                    self._character_set_specification_list_()
            self._error('expecting one of: SET')

    @graken()
    def _allocate_descriptor_statement_(self):
        self._token('ALLOCATE')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()
        with self._optional():
            self._token('WITH')
            self._token('MAX')
            self._simple_value_specification_()

    @graken()
    def _deallocate_descriptor_statement_(self):
        self._token('DEALLOCATE')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()

    @graken()
    def _get_descriptor_statement_(self):
        self._token('GET')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()
        self._get_descriptor_information_()

    @graken()
    def _get_descriptor_information_(self):
        with self._choice():
            with self._option():

                def sep0():
                    self._token(',')

                def block0():
                    self._get_header_information_()
                self._positive_closure(block0, prefix=sep0)
            with self._option():
                self._token('VALUE')
                self._item_number_()

                def sep1():
                    self._token(',')

                def block1():
                    self._get_item_information_()
                self._positive_closure(block1, prefix=sep1)
            self._error('no available options')

    @graken()
    def _get_header_information_(self):
        self._simple_target_specification_()
        self._equals_operator_()
        self._header_item_name_()

    @graken()
    def _header_item_name_(self):
        with self._choice():
            with self._option():
                self._token('COUNT')
            with self._option():
                self._token('KEY_TYPE')
            with self._option():
                self._token('DYNAMIC_FUNCTION')
            with self._option():
                self._token('DYNAMIC_FUNCTION_CODE')
            with self._option():
                self._token('TOP_LEVEL_COUNT')
            self._error('expecting one of: COUNT DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE KEY_TYPE TOP_LEVEL_COUNT')

    @graken()
    def _get_item_information_(self):
        self._simple_target_specification_()
        self._equals_operator_()
        self._descriptor_item_name_()

    @graken()
    def _item_number_(self):
        self._simple_value_specification_()

    @graken()
    def _descriptor_item_name_(self):
        with self._choice():
            with self._option():
                self._token('CARDINALITY')
            with self._option():
                self._token('CHARACTER_SET_CATALOG')
            with self._option():
                self._token('CHARACTER_SET_NAME')
            with self._option():
                self._token('CHARACTER_SET_SCHEMA')
            with self._option():
                self._token('COLLATION_CATALOG')
            with self._option():
                self._token('COLLATION_NAME')
            with self._option():
                self._token('COLLATION_SCHEMA')
            with self._option():
                self._token('DATA')
            with self._option():
                self._token('DATETIME_INTERVAL_CODE')
            with self._option():
                self._token('DATETIME_INTERVAL_PRECISION')
            with self._option():
                self._token('DEGREE')
            with self._option():
                self._token('INDICATOR')
            with self._option():
                self._token('KEY_MEMBER')
            with self._option():
                self._token('LENGTH')
            with self._option():
                self._token('LEVEL')
            with self._option():
                self._token('NAME')
            with self._option():
                self._token('NULLABLE')
            with self._option():
                self._token('OCTET_LENGTH')
            with self._option():
                self._token('PARAMETER_MODE')
            with self._option():
                self._token('PARAMETER_ORDINAL_POSITION')
            with self._option():
                self._token('PARAMETER_SPECIFIC_CATALOG')
            with self._option():
                self._token('PARAMETER_SPECIFIC_NAME')
            with self._option():
                self._token('PARAMETER_SPECIFIC_SCHEMA')
            with self._option():
                self._token('PRECISION')
            with self._option():
                self._token('RETURNED_CARDINALITY')
            with self._option():
                self._token('RETURNED_LENGTH')
            with self._option():
                self._token('RETURNED_OCTET_LENGTH')
            with self._option():
                self._token('SCALE')
            with self._option():
                self._token('SCOPE_CATALOG')
            with self._option():
                self._token('SCOPE_NAME')
            with self._option():
                self._token('SCOPE_SCHEMA')
            with self._option():
                self._token('TYPE')
            with self._option():
                self._token('UNNAMED')
            with self._option():
                self._token('USER_DEFINED_TYPE_CATALOG')
            with self._option():
                self._token('USER_DEFINED_TYPE_NAME')
            with self._option():
                self._token('USER_DEFINED_TYPE_SCHEMA')
            with self._option():
                self._token('USER_DEFINED_TYPE_CODE')
            self._error('expecting one of: CARDINALITY CHARACTER_SET_CATALOG CHARACTER_SET_NAME CHARACTER_SET_SCHEMA COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA DATA DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DEGREE INDICATOR KEY_MEMBER LENGTH LEVEL NAME NULLABLE OCTET_LENGTH PARAMETER_MODE PARAMETER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMETER_SPECIFIC_SCHEMA PRECISION RETURNED_CARDINALITY RETURNED_LENGTH RETURNED_OCTET_LENGTH SCALE SCOPE_CATALOG SCOPE_NAME SCOPE_SCHEMA TYPE UNNAMED USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_CODE USER_DEFINED_TYPE_NAME USER_DEFINED_TYPE_SCHEMA')

    @graken()
    def _set_descriptor_statement_(self):
        self._token('SET')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()
        self._set_descriptor_information_()

    @graken()
    def _set_descriptor_information_(self):
        with self._choice():
            with self._option():

                def sep0():
                    self._token(',')

                def block0():
                    self._set_header_information_()
                self._positive_closure(block0, prefix=sep0)
            with self._option():
                self._token('VALUE')
                self._item_number_()

                def sep1():
                    self._token(',')

                def block1():
                    self._set_item_information_()
                self._positive_closure(block1, prefix=sep1)
            self._error('no available options')

    @graken()
    def _set_header_information_(self):
        self._header_item_name_()
        self._equals_operator_()
        self._simple_value_specification_()

    @graken()
    def _set_item_information_(self):
        self._descriptor_item_name_()
        self._equals_operator_()
        self._simple_value_specification_()

    @graken()
    def _prepare_statement_(self):
        self._token('PREPARE')
        self._sql_statement_name_()
        with self._optional():
            self._attributes_specification_()
        self._token('FROM')
        self._sql_statement_variable_()

    @graken()
    def _attributes_specification_(self):
        self._token('ATTRIBUTES')
        self._simple_value_specification_()

    @graken()
    def _sql_statement_variable_(self):
        self._simple_value_specification_()

    @graken()
    def _deallocate_prepared_statement_(self):
        self._token('DEALLOCATE')
        self._token('PREPARE')
        self._sql_statement_name_()

    @graken()
    def _describe_statement_(self):
        with self._choice():
            with self._option():
                self._describe_input_statement_()
            with self._option():
                self._describe_output_statement_()
            self._error('no available options')

    @graken()
    def _describe_input_statement_(self):
        self._token('DESCRIBE')
        self._token('INPUT')
        self._sql_statement_name_()
        self._using_descriptor_()
        with self._optional():
            self._nesting_option_()

    @graken()
    def _describe_output_statement_(self):
        self._token('DESCRIBE')
        with self._optional():
            self._token('OUTPUT')
        self._described_object_()
        self._using_descriptor_()
        with self._optional():
            self._nesting_option_()

    @graken()
    def _nesting_option_(self):
        with self._choice():
            with self._option():
                self._token('WITH')
                self._token('NESTING')
            with self._option():
                self._token('WITHOUT')
                self._token('NESTING')
            self._error('expecting one of: WITH WITHOUT')

    @graken()
    def _using_descriptor_(self):
        self._token('USING')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()

    @graken()
    def _described_object_(self):
        with self._choice():
            with self._option():
                self._sql_statement_name_()
            with self._option():
                self._token('CURSOR')
                self._cursor_name_()
                self._token('STRUCTURE')
            self._error('no available options')

    @graken()
    def _input_using_clause_(self):
        with self._choice():
            with self._option():
                self._using_arguments_()
            with self._option():
                self._using_descriptor_()
            self._error('no available options')

    @graken()
    def _using_arguments_(self):
        self._token('USING')

        def sep0():
            self._token(',')

        def block0():
            self._using_argument_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _using_argument_(self):
        self._general_value_specification_()

    @graken()
    def _output_using_clause_(self):
        with self._choice():
            with self._option():
                self._into_arguments_()
            with self._option():
                self._into_descriptor_()
            self._error('no available options')

    @graken()
    def _into_arguments_(self):
        self._token('INTO')

        def sep0():
            self._token(',')

        def block0():
            self._into_argument_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _into_argument_(self):
        self._target_specification_()

    @graken()
    def _into_descriptor_(self):
        self._token('INTO')
        with self._optional():
            self._token('SQL')
        self._token('DESCRIPTOR')
        self._descriptor_name_()

    @graken()
    def _execute_statement_(self):
        self._token('EXECUTE')
        self._sql_statement_name_()
        with self._optional():
            self._output_using_clause_()
        with self._optional():
            self._input_using_clause_()

    @graken()
    def _execute_immediate_statement_(self):
        self._token('EXECUTE')
        self._token('IMMEDIATE')
        self._sql_statement_variable_()

    @graken()
    def _allocate_cursor_statement_(self):
        self._token('ALLOCATE')
        self._extended_cursor_name_()
        self._statement_cursor_()
        self._token('FOR')
        self._extended_statement_name_()

    @graken()
    def _statement_cursor_(self):
        with self._optional():
            self._cursor_sensitivity_()
        with self._optional():
            self._cursor_scrollability_()
        self._token('CURSOR')
        with self._optional():
            self._cursor_holdability_()
        with self._optional():
            self._cursor_returnability_()

    @graken()
    def _result_set_cursor_(self):
        self._token('ALLOCATE')
        self._cursor_name_()
        with self._optional():
            self._token('CURSOR')
        self._token('FOR')
        self._token('PROCEDURE')
        self._specific_routine_designator_()

    @graken()
    def _dynamic_open_statement_(self):
        self._token('OPEN')
        self._dynamic_cursor_name_()
        with self._optional():
            self._input_using_clause_()

    @graken()
    def _dynamic_fetch_statement_(self):
        self._token('FETCH')
        with self._optional():
            with self._optional():
                self._fetch_orientation_()
            self._token('FROM')
        self._dynamic_cursor_name_()
        self._output_using_clause_()

    @graken()
    def _dynamic_close_statement_(self):
        self._token('CLOSE')
        self._dynamic_cursor_name_()

    @graken()
    def _dynamic_delete_statement_positioned_(self):
        self._token('DELETE')
        self._token('FROM')
        self._target_table_()
        self._token('WHERE')
        self._token('CURRENT')
        self._token('OF')
        self._dynamic_cursor_name_()

    @graken()
    def _dynamic_update_statement_positioned_(self):
        self._token('UPDATE')
        self._target_table_()
        self._token('SET')
        self._set_clause_list_()
        self._token('WHERE')
        self._token('CURRENT')
        self._token('OF')
        self._dynamic_cursor_name_()

    @graken()
    def _direct_sql_statement_(self):
        self._directly_executable_statement_()
        self._semicolon_()

    @graken()
    def _directly_executable_statement_(self):
        with self._choice():
            with self._option():
                self._direct_sql_data_statement_()
            with self._option():
                self._sql_schema_statement_()
            with self._option():
                self._sql_transaction_statement_()
            with self._option():
                self._sql_connection_statement_()
            with self._option():
                self._sql_session_statement_()
            self._error('no available options')

    @graken()
    def _direct_sql_data_statement_(self):
        with self._choice():
            with self._option():
                self._delete_statement_searched_()
            with self._option():
                self._cursor_specification_()
            with self._option():
                self._insert_statement_()
            with self._option():
                self._update_statement_searched_()
            with self._option():
                self._truncate_table_statement_()
            with self._option():
                self._merge_statement_()
            with self._option():
                self._temporary_table_declaration_()
            self._error('no available options')

    @graken()
    def _get_diagnostics_statement_(self):
        self._token('GET')
        self._token('DIAGNOSTICS')
        self._sql_diagnostics_information_()

    @graken()
    def _sql_diagnostics_information_(self):
        with self._choice():
            with self._option():
                self._statement_information_()
            with self._option():
                self._condition_information_()
            with self._option():
                self._all_information_()
            self._error('no available options')

    @graken()
    def _statement_information_(self):

        def sep0():
            self._token(',')

        def block0():
            self._statement_information_item_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _statement_information_item_(self):
        self._simple_target_specification_()
        self._equals_operator_()
        self._statement_information_item_name_()

    @graken()
    def _statement_information_item_name_(self):
        with self._choice():
            with self._option():
                self._token('NUMBER')
            with self._option():
                self._token('MORE')
            with self._option():
                self._token('COMMAND_FUNCTION')
            with self._option():
                self._token('COMMAND_FUNCTION_CODE')
            with self._option():
                self._token('DYNAMIC_FUNCTION')
            with self._option():
                self._token('DYNAMIC_FUNCTION_CODE')
            with self._option():
                self._token('ROW_COUNT')
            with self._option():
                self._token('TRANSACTIONS_COMMITTED')
            with self._option():
                self._token('TRANSACTIONS_ROLLED_BACK')
            with self._option():
                self._token('TRANSACTION_ACTIVE')
            self._error('expecting one of: COMMAND_FUNCTION COMMAND_FUNCTION_CODE DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE MORE NUMBER ROW_COUNT TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK TRANSACTION_ACTIVE')

    @graken()
    def _condition_information_(self):
        self._token('CONDITION')
        self._simple_value_specification_()

        def sep0():
            self._token(',')

        def block0():
            self._condition_information_item_()
        self._positive_closure(block0, prefix=sep0)

    @graken()
    def _condition_information_item_(self):
        self._simple_target_specification_()
        self._equals_operator_()
        self._condition_information_item_name_()

    @graken()
    def _condition_information_item_name_(self):
        with self._choice():
            with self._option():
                self._token('CATALOG_NAME')
            with self._option():
                self._token('CLASS_ORIGIN')
            with self._option():
                self._token('COLUMN_NAME')
            with self._option():
                self._token('CONDITION_NUMBER')
            with self._option():
                self._token('CONNECTION_NAME')
            with self._option():
                self._token('CONSTRAINT_CATALOG')
            with self._option():
                self._token('CONSTRAINT_NAME')
            with self._option():
                self._token('CONSTRAINT_SCHEMA')
            with self._option():
                self._token('CURSOR_NAME')
            with self._option():
                self._token('MESSAGE_LENGTH')
            with self._option():
                self._token('MESSAGE_OCTET_LENGTH')
            with self._option():
                self._token('MESSAGE_TEXT')
            with self._option():
                self._token('PARAMETER_MODE')
            with self._option():
                self._token('PARAMETER_NAME')
            with self._option():
                self._token('PARAMETER_ORDINAL_POSITION')
            with self._option():
                self._token('RETURNED_SQLSTATE')
            with self._option():
                self._token('ROUTINE_CATALOG')
            with self._option():
                self._token('ROUTINE_NAME')
            with self._option():
                self._token('ROUTINE_SCHEMA')
            with self._option():
                self._token('SCHEMA_NAME')
            with self._option():
                self._token('SERVER_NAME')
            with self._option():
                self._token('SPECIFIC_NAME')
            with self._option():
                self._token('SUBCLASS_ORIGIN')
            with self._option():
                self._token('TABLE_NAME')
            with self._option():
                self._token('TRIGGER_CATALOG')
            with self._option():
                self._token('TRIGGER_NAME')
            with self._option():
                self._token('TRIGGER_SCHEMA')
            self._error('expecting one of: CATALOG_NAME CLASS_ORIGIN COLUMN_NAME CONDITION_NUMBER CONNECTION_NAME CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CURSOR_NAME MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT PARAMETER_MODE PARAMETER_NAME PARAMETER_ORDINAL_POSITION RETURNED_SQLSTATE ROUTINE_CATALOG ROUTINE_NAME ROUTINE_SCHEMA SCHEMA_NAME SERVER_NAME SPECIFIC_NAME SUBCLASS_ORIGIN TABLE_NAME TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA')

    @graken()
    def _all_information_(self):
        self._simple_target_specification_()
        self._equals_operator_()
        self._token('ALL')
        with self._optional():
            self._all_qualifier_()

    @graken()
    def _all_qualifier_(self):
        with self._choice():
            with self._option():
                self._token('STATEMENT')
            with self._option():
                self._token('CONDITION')
                with self._optional():
                    self._simple_value_specification_()
            self._error('expecting one of: CONDITION STATEMENT')

    @graken()
    def _ntile_function_(self):
        self._token('NTILE')
        self._left_paren_()
        self._number_of_tiles_()
        self._right_paren_()

    @graken()
    def _number_of_tiles_(self):
        with self._choice():
            with self._option():
                self._simple_value_specification_()
            with self._option():
                self._dynamic_parameter_specification_()
            self._error('no available options')

    @graken()
    def _lead_or_lag_function_(self):
        self._lead_or_lag_()
        self._left_paren_()
        self._value_expression_()
        with self._optional():
            self._comma_()
            self._exact_numeric_literal_()
            with self._optional():
                self._comma_()
                self._value_expression_()
        self._right_paren_()
        with self._optional():
            self._null_treatment_()

    @graken()
    def _lead_or_lag_(self):
        with self._choice():
            with self._option():
                self._token('LEAD')
            with self._option():
                self._token('LAG')
            self._error('expecting one of: LAG LEAD')

    @graken()
    def _null_treatment_(self):
        with self._choice():
            with self._option():
                self._token('RESPECT')
                self._token('NULLS')
            with self._option():
                self._token('IGNORE')
                self._token('NULLS')
            self._error('expecting one of: IGNORE RESPECT')

    @graken()
    def _first_or_last_value_function_(self):
        self._first_or_last_value_()
        self._left_paren_()
        self._value_expression_()
        self._right_paren_()
        with self._optional():
            self._null_treatment_()

    @graken()
    def _first_or_last_value_(self):
        with self._choice():
            with self._option():
                self._token('FIRST_VALUE')
            with self._option():
                self._token('LAST_VALUE')
            self._error('expecting one of: FIRST_VALUE LAST_VALUE')

    @graken()
    def _nth_value_function_(self):
        self._token('NTH_VALUE')
        self._left_paren_()
        self._value_expression_()
        self._comma_()
        self._nth_row_()
        self._right_paren_()
        with self._optional():
            self._from_first_or_last_()
        with self._optional():
            self._null_treatment_()

    @graken()
    def _nth_row_(self):
        with self._choice():
            with self._option():
                self._simple_value_specification_()
            with self._option():
                self._dynamic_parameter_specification_()
            self._error('no available options')

    @graken()
    def _from_first_or_last_(self):
        with self._choice():
            with self._option():
                self._token('FROM')
                self._token('FIRST')
            with self._option():
                self._token('FROM')
                self._token('LAST')
            self._error('expecting one of: FROM')

    @graken()
    def _nested_window_function_(self):
        with self._choice():
            with self._option():
                self._nested_row_number_function_()
            with self._option():
                self._value_of_expression_at_row_()
            self._error('no available options')

    @graken()
    def _nested_row_number_function_(self):
        self._token('ROW_NUMBER')
        self._left_paren_()
        self._row_marker_()
        self._right_paren_()

    @graken()
    def _value_of_expression_at_row_(self):
        self._token('VALUE_OF')
        self._left_paren_()
        self._value_expression_()
        self._token('AT')
        self._row_marker_expression_()
        with self._optional():
            self._comma_()
            self._value_expression_()
        self._right_paren_()

    @graken()
    def _row_marker_(self):
        with self._choice():
            with self._option():
                self._token('BEGIN_PARTITION')
            with self._option():
                self._token('BEGIN_FRAME')
            with self._option():
                self._token('CURRENT_ROW')
            with self._option():
                self._token('FRAME_ROW')
            with self._option():
                self._token('END_FRAME')
            with self._option():
                self._token('END_PARTITION')
            self._error('expecting one of: BEGIN_FRAME BEGIN_PARTITION CURRENT_ROW END_FRAME END_PARTITION FRAME_ROW')

    @graken()
    def _row_marker_expression_(self):
        self._row_marker_()
        with self._optional():
            self._row_marker_delta_()

    @graken()
    def _row_marker_delta_(self):
        with self._choice():
            with self._option():
                self._plus_sign_()
                self._row_marker_offset_()
            with self._option():
                self._minus_sign_()
                self._row_marker_offset_()
            self._error('no available options')

    @graken()
    def _row_marker_offset_(self):
        with self._choice():
            with self._option():
                self._simple_value_specification_()
            with self._option():
                self._dynamic_parameter_specification_()
            self._error('no available options')

    @graken()
    def _regex_occurrences_function_(self):
        self._token('OCCURRENCES_REGEX')
        self._left_paren_()
        self._xquery_pattern_()
        with self._optional():
            self._token('FLAG')
            self._xquery_option_flag_()
        self._token('IN')
        self._regex_subject_string_()
        with self._optional():
            self._token('FROM')
            self._start_position_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        self._right_paren_()

    @graken()
    def _xquery_pattern_(self):
        self._character_value_expression_()

    @graken()
    def _xquery_option_flag_(self):
        self._character_value_expression_()

    @graken()
    def _regex_subject_string_(self):
        self._character_value_expression_()

    @graken()
    def _regex_position_expression_(self):
        self._token('POSITION_REGEX')
        self._left_paren_()
        with self._optional():
            self._regex_position_start_or_after_()
        self._xquery_pattern_()
        with self._optional():
            self._token('FLAG')
            self._xquery_option_flag_()
        self._token('IN')
        self._regex_subject_string_()
        with self._optional():
            self._token('FROM')
            self._start_position_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        with self._optional():
            self._token('OCCURRENCE')
            self._regex_occurrence_()
        with self._optional():
            self._token('GROUP')
            self._regex_capture_group_()
        self._right_paren_()

    @graken()
    def _regex_position_start_or_after_(self):
        with self._choice():
            with self._option():
                self._token('START')
            with self._option():
                self._token('AFTER')
            self._error('expecting one of: AFTER START')

    @graken()
    def _regex_occurrence_(self):
        self._numeric_value_expression_()

    @graken()
    def _regex_capture_group_(self):
        self._numeric_value_expression_()

    @graken()
    def _period_predicate_(self):
        with self._choice():
            with self._option():
                self._period_overlaps_predicate_()
            with self._option():
                self._period_equals_predicate_()
            with self._option():
                self._period_contains_predicate_()
            with self._option():
                self._period_precedes_predicate_()
            with self._option():
                self._period_succeeds_predicate_()
            with self._option():
                self._period_immediately_precedes_predicate_()
            with self._option():
                self._period_immediately_succeeds_predicate_()
            self._error('no available options')

    @graken()
    def _period_overlaps_predicate_(self):
        self._period_predicand_1_()
        self._period_overlaps_predicate_part_2_()

    @graken()
    def _period_overlaps_predicate_part_2_(self):
        self._token('OVERLAPS')
        self._period_predicand_2_()

    @graken()
    def _period_predicand_1_(self):
        self._period_predicand_()

    @graken()
    def _period_predicand_2_(self):
        self._period_predicand_()

    @graken()
    def _period_predicand_(self):
        with self._choice():
            with self._option():
                self._identifier_chain_()
            with self._option():
                self._token('PERIOD')
                self._left_paren_()
                self._datetime_value_expression_()
                self._comma_()
                self._datetime_value_expression_()
                self._right_paren_()
            self._error('no available options')

    @graken()
    def _period_equals_predicate_(self):
        self._period_predicand_1_()
        self._period_equals_predicate_part_2_()

    @graken()
    def _period_equals_predicate_part_2_(self):
        self._token('EQUALS')
        self._period_predicand_2_()

    @graken()
    def _period_contains_predicate_(self):
        self._period_predicand_1_()
        self._period_contains_predicate_part_2_()

    @graken()
    def _period_contains_predicate_part_2_(self):
        self._token('CONTAINS')
        self._period_or_point_in_time_predicand_()

    @graken()
    def _period_or_point_in_time_predicand_(self):
        with self._choice():
            with self._option():
                self._period_predicand_()
            with self._option():
                self._datetime_value_expression_()
            self._error('no available options')

    @graken()
    def _period_precedes_predicate_(self):
        self._period_predicand_1_()
        self._period_precedes_predicate_part_2_()

    @graken()
    def _period_precedes_predicate_part_2_(self):
        self._token('PRECEDES')
        self._period_predicand_2_()

    @graken()
    def _period_succeeds_predicate_(self):
        self._period_predicand_1_()
        self._period_succeeds_predicate_part_2_()

    @graken()
    def _period_succeeds_predicate_part_2_(self):
        self._token('SUCCEEDS')
        self._period_predicand_2_()

    @graken()
    def _period_immediately_precedes_predicate_(self):
        self._period_predicand_1_()
        self._period_immediately_precedes_predicate_part_2_()

    @graken()
    def _period_immediately_precedes_predicate_part_2_(self):
        self._token('IMMEDIATELY')
        self._token('PRECEDES')
        self._period_predicand_2_()

    @graken()
    def _period_immediately_succeeds_predicate_(self):
        self._period_predicand_1_()
        self._period_immediately_succeeds_predicate_part_2_()

    @graken()
    def _period_immediately_succeeds_predicate_part_2_(self):
        self._token('IMMEDIATELY')
        self._token('SUCCEEDS')
        self._period_predicand_2_()

    @graken()
    def _table_period_definition_(self):
        self._system_or_application_time_period_specification_()
        self._left_paren_()
        self._identifier_()
        self._comma_()
        self._identifier_()
        self._right_paren_()

    @graken()
    def _system_or_application_time_period_specification_(self):
        with self._choice():
            with self._option():
                self._system_time_period_specification_()
            with self._option():
                self._application_time_period_specification_()
            self._error('no available options')

    @graken()
    def _system_time_period_specification_(self):
        self._token('PERIOD')
        self._token('FOR')
        self._token('SYSTEM_TIME')

    @graken()
    def _application_time_period_specification_(self):
        self._token('PERIOD')
        self._token('FOR')
        self._identifier_()

    @graken()
    def _system_time_period_start_column_specification_(self):
        self._timestamp_generation_rule_()
        self._token('AS')
        self._token('ROW')
        self._token('START')

    @graken()
    def _system_time_period_end_column_specification_(self):
        self._timestamp_generation_rule_()
        self._token('AS')
        self._token('ROW')
        self._token('END')

    @graken()
    def _timestamp_generation_rule_(self):
        self._token('GENERATED')
        self._token('ALWAYS')

    @graken()
    def _referencing_period_specification_(self):
        self._token('PERIOD')
        self._identifier_()

    @graken()
    def _referenced_period_specification_(self):
        self._token('PERIOD')
        self._identifier_()

    @graken()
    def _regex_substring_function_(self):
        self._token('SUBSTRING_REGEX')
        self._left_paren_()
        self._xquery_pattern_()
        with self._optional():
            self._token('FLAG')
            self._xquery_option_flag_()
        self._token('IN')
        self._regex_subject_string_()
        with self._optional():
            self._token('FROM')
            self._start_position_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        with self._optional():
            self._token('OCCURRENCE')
            self._regex_occurrence_()
        with self._optional():
            self._token('GROUP')
            self._regex_capture_group_()
        self._right_paren_()

    @graken()
    def _regex_transliteration_(self):
        self._token('TRANSLATE_REGEX')
        self._left_paren_()
        self._xquery_pattern_()
        with self._optional():
            self._token('FLAG')
            self._xquery_option_flag_()
        self._token('IN')
        self._regex_subject_string_()
        with self._optional():
            self._token('WITH')
            self._character_value_expression_()
        with self._optional():
            self._token('FROM')
            self._start_position_()
        with self._optional():
            self._token('USING')
            self._char_length_units_()
        with self._optional():
            self._token('OCCURRENCE')
            self._regex_transliteration_occurrence_()
        self._right_paren_()

    @graken()
    def _regex_transliteration_occurrence_(self):
        with self._choice():
            with self._option():
                self._regex_occurrence_()
            with self._option():
                self._token('ALL')
            self._error('expecting one of: ALL')

    @graken()
    def _normal_form_(self):
        with self._choice():
            with self._option():
                self._token('NFC')
            with self._option():
                self._token('NFD')
            with self._option():
                self._token('NFKC')
            with self._option():
                self._token('NFKD')
            self._error('expecting one of: NFC NFD NFKC NFKD')

    @graken()
    def _normalize_function_result_length_(self):
        with self._choice():
            with self._option():
                self._length_()
            with self._option():
                self._large_object_length_()
            self._error('no available options')

    @graken()
    def _data_change_statement_(self):
        with self._choice():
            with self._option():
                self._delete_statement_searched_()
            with self._option():
                self._insert_statement_()
            with self._option():
                self._merge_statement_()
            with self._option():
                self._update_statement_searched_()
            self._error('no available options')

    @graken()
    def _result_option_(self):
        with self._choice():
            with self._option():
                self._token('FINAL')
            with self._option():
                self._token('NEW')
            with self._option():
                self._token('OLD')
            self._error('expecting one of: FINAL NEW OLD')

    @graken()
    def _partitioned_join_table_(self):
        self._table_factor_()
        self._token('PARTITION')
        self._token('BY')
        self._partitioned_join_column_reference_list_()

    @graken()
    def _partitioned_join_column_reference_list_(self):
        self._left_paren_()

        def sep0():
            self._token(',')

        def block0():
            self._partitioned_join_column_reference_()
        self._positive_closure(block0, prefix=sep0)
        self._right_paren_()

    @graken()
    def _partitioned_join_column_reference_(self):
        self._column_reference_()

    @graken()
    def _query_system_time_period_specification_(self):
        with self._choice():
            with self._option():
                self._token('FOR')
                self._token('SYSTEM_TIME')
                self._token('AS')
                self._token('OF')
                self._point_in_time_1_()
            with self._option():
                self._token('FOR')
                self._token('SYSTEM_TIME')
                self._token('BETWEEN')
                with self._optional():
                    with self._choice():
                        with self._option():
                            self._token('ASYMMETRIC')
                        with self._option():
                            self._token('SYMMETRIC')
                        self._error('expecting one of: ASYMMETRIC SYMMETRIC')
                self._point_in_time_1_()
                self._token('AND')
                self._point_in_time_2_()
            with self._option():
                self._token('FOR')
                self._token('SYSTEM_TIME')
                self._token('FROM')
                self._point_in_time_1_()
                self._token('TO')
                self._point_in_time_2_()
            self._error('no available options')

    @graken()
    def _point_in_time_1_(self):
        self._point_in_time_()

    @graken()
    def _point_in_time_2_(self):
        self._point_in_time_()

    @graken()
    def _point_in_time_(self):
        self._datetime_value_expression_()

    @graken()
    def _result_offset_clause_(self):
        self._token('OFFSET')
        self._simple_value_specification_()
        with self._group():
            with self._choice():
                with self._option():
                    self._token('ROW')
                with self._option():
                    self._token('ROWS')
                self._error('expecting one of: ROW ROWS')

    @graken()
    def _fetch_first_clause_(self):
        self._token('FETCH')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('FIRST')
                with self._option():
                    self._token('NEXT')
                self._error('expecting one of: FIRST NEXT')
        with self._optional():
            self._fetch_first_quantity_()
        with self._group():
            with self._choice():
                with self._option():
                    self._token('ROW')
                with self._option():
                    self._token('ROWS')
                self._error('expecting one of: ROW ROWS')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('ONLY')
                with self._option():
                    self._token('WITH')
                    self._token('TIES')
                self._error('expecting one of: ONLY WITH')

    @graken()
    def _fetch_first_quantity_(self):
        with self._choice():
            with self._option():
                self._simple_value_specification_()
            with self._option():
                self._fetch_first_percentage_()
            self._error('no available options')

    @graken()
    def _fetch_first_percentage_(self):
        self._simple_value_specification_()
        self._token('PERCENT')

    @graken()
    def _regex_like_predicate_(self):
        self._row_value_predicand_()
        self._regex_like_predicate_part_2_()

    @graken()
    def _regex_like_predicate_part_2_(self):
        with self._optional():
            self._token('NOT')
        self._token('LIKE_REGEX')
        self._xquery_pattern_()
        with self._optional():
            self._token('FLAG')
            self._xquery_option_flag_()

    @graken()
    def _named_argument_specification_(self):
        self._identifier_()
        self._named_argument_assignment_token_()
        self._named_argument_sql_argument_()

    @graken()
    def _named_argument_sql_argument_(self):
        with self._choice():
            with self._option():
                self._value_expression_()
            with self._option():
                self._target_specification_()
            with self._option():
                self._contextually_typed_value_specification_()
            self._error('no available options')

    @graken()
    def _alter_table_constraint_definition_(self):
        self._token('ALTER')
        self._token('CONSTRAINT')
        self._schema_qualified_name_()
        self._constraint_enforcement_()

    @graken()
    def _add_table_period_definition_(self):
        self._token('ADD')
        self._table_period_definition_()
        with self._optional():
            self._add_system_time_period_column_list_()

    @graken()
    def _add_system_time_period_column_list_(self):
        self._token('ADD')
        with self._optional():
            self._token('COLUMN')
        self._column_definition_()
        self._token('ADD')
        with self._optional():
            self._token('COLUMN')
        self._column_definition_()

    @graken()
    def _drop_table_period_definition_(self):
        self._token('DROP')
        self._system_or_application_time_period_specification_()
        self._drop_behavior_()

    @graken()
    def _add_system_versioning_clause_(self):
        self._token('ADD')
        self._token('SYSTEM')
        self._token('VERSIONING')

    @graken()
    def _drop_system_versioning_clause_(self):
        self._token('DROP')
        self._token('SYSTEM')
        self._token('VERSIONING')
        self._drop_behavior_()

    @graken()
    def _identity_column_restart_option_(self):
        with self._choice():
            with self._option():
                self._token('CONTINUE')
                self._token('IDENTITY')
            with self._option():
                self._token('RESTART')
                self._token('IDENTITY')
            self._error('expecting one of: CONTINUE RESTART')

    @graken()
    def _merge_update_or_delete_specification_(self):
        with self._choice():
            with self._option():
                self._merge_update_specification_()
            with self._option():
                self._token('DELETE')
            self._error('expecting one of: DELETE')

    @graken()
    def _set_column_not_null_clause_(self):
        self._token('SET')
        self._token('NOT')
        self._token('NULL')

    @graken()
    def _drop_column_not_null_clause_(self):
        self._token('DROP')
        self._token('NOT')
        self._token('NULL')

    @graken()
    def _alter_column_data_type_clause_(self):
        self._token('SET')
        self._token('DATA')
        self._token('TYPE')
        self._data_type_()

    @graken()
    def _set_identity_column_generation_clause_(self):
        self._token('SET')
        self._token('GENERATED')
        with self._group():
            with self._choice():
                with self._option():
                    self._token('ALWAYS')
                with self._option():
                    self._token('BY')
                    self._token('DEFAULT')
                self._error('expecting one of: ALWAYS BY')

    @graken()
    def _drop_identity_property_clause_(self):
        self._token('DROP')
        self._token('IDENTITY')

    @graken()
    def _drop_column_generation_expression_clause_(self):
        self._token('DROP')
        self._token('EXPRESSION')

    @graken()
    def _truncate_table_statement_(self):
        self._token('TRUNCATE')
        self._token('TABLE')
        self._target_table_()
        with self._optional():
            self._identity_column_restart_option_()

    @graken()
    def _constraint_enforcement_(self):
        with self._optional():
            self._token('NOT')
        self._token('ENFORCED')

    @graken()
    def _start_(self):
        self._direct_sql_statement_()
        self._check_eof()


class SqlSemantics(object):
    def digit(self, ast):
        return ast

    def double_quote(self, ast):
        return ast

    def quote(self, ast):
        return ast

    def left_paren(self, ast):
        return ast

    def right_paren(self, ast):
        return ast

    def asterisk(self, ast):
        return ast

    def plus_sign(self, ast):
        return ast

    def comma(self, ast):
        return ast

    def minus_sign(self, ast):
        return ast

    def period(self, ast):
        return ast

    def solidus(self, ast):
        return ast

    def colon(self, ast):
        return ast

    def semicolon(self, ast):
        return ast

    def less_than_operator(self, ast):
        return ast

    def equals_operator(self, ast):
        return ast

    def greater_than_operator(self, ast):
        return ast

    def question_mark(self, ast):
        return ast

    def left_bracket_or_trigraph(self, ast):
        return ast

    def right_bracket_or_trigraph(self, ast):
        return ast

    def left_bracket(self, ast):
        return ast

    def left_bracket_trigraph(self, ast):
        return ast

    def right_bracket(self, ast):
        return ast

    def right_bracket_trigraph(self, ast):
        return ast

    def underscore(self, ast):
        return ast

    def regular_identifier(self, ast):
        return ast

    def large_object_length_token(self, ast):
        return ast

    def multiplier(self, ast):
        return ast

    def delimited_identifier(self, ast):
        return ast

    def delimited_identifier_body(self, ast):
        return ast

    def delimited_identifier_part(self, ast):
        return ast

    def unicode_delimited_identifier(self, ast):
        return ast

    def unicode_escape_specifier(self, ast):
        return ast

    def unicode_delimiter_body(self, ast):
        return ast

    def unicode_identifier_part(self, ast):
        return ast

    def unicode_escape_value(self, ast):
        return ast

    def unicode_4_digit_escape_value(self, ast):
        return ast

    def unicode_6_digit_escape_value(self, ast):
        return ast

    def unicode_character_escape_value(self, ast):
        return ast

    def unicode_escape_character(self, ast):
        return ast

    def not_equals_operator(self, ast):
        return ast

    def greater_than_or_equals_operator(self, ast):
        return ast

    def less_than_or_equals_operator(self, ast):
        return ast

    def concatenation_operator(self, ast):
        return ast

    def right_arrow(self, ast):
        return ast

    def double_colon(self, ast):
        return ast

    def named_argument_assignment_token(self, ast):
        return ast

    def literal(self, ast):
        return ast

    def unsigned_literal(self, ast):
        return ast

    def general_literal(self, ast):
        return ast

    def character_string_literal(self, ast):
        return ast

    def character_representation(self, ast):
        return ast

    def national_character_string_literal(self, ast):
        return ast

    def unicode_character_string_literal(self, ast):
        return ast

    def unicode_representation(self, ast):
        return ast

    def binary_string_literal(self, ast):
        return ast

    def hexit(self, ast):
        return ast

    def byte(self, ast):
        return ast

    def signed_numeric_literal(self, ast):
        return ast

    def unsigned_numeric_literal(self, ast):
        return ast

    def exact_numeric_literal(self, ast):
        return ast

    def sign(self, ast):
        return ast

    def approximate_numeric_literal(self, ast):
        return ast

    def signed_integer(self, ast):
        return ast

    def unsigned_integer(self, ast):
        return ast

    def datetime_literal(self, ast):
        return ast

    def date_literal(self, ast):
        return ast

    def time_literal(self, ast):
        return ast

    def timestamp_literal(self, ast):
        return ast

    def date_string(self, ast):
        return ast

    def time_string(self, ast):
        return ast

    def timestamp_string(self, ast):
        return ast

    def time_zone_interval(self, ast):
        return ast

    def date_value(self, ast):
        return ast

    def time_value(self, ast):
        return ast

    def interval_literal(self, ast):
        return ast

    def interval_string(self, ast):
        return ast

    def unquoted_date_string(self, ast):
        return ast

    def unquoted_time_string(self, ast):
        return ast

    def unquoted_timestamp_string(self, ast):
        return ast

    def unquoted_interval_string(self, ast):
        return ast

    def year_month_literal(self, ast):
        return ast

    def day_time_literal(self, ast):
        return ast

    def day_time_interval(self, ast):
        return ast

    def time_interval(self, ast):
        return ast

    def years_value(self, ast):
        return ast

    def months_value(self, ast):
        return ast

    def days_value(self, ast):
        return ast

    def hours_value(self, ast):
        return ast

    def minutes_value(self, ast):
        return ast

    def seconds_value(self, ast):
        return ast

    def datetime_value(self, ast):
        return ast

    def boolean_literal(self, ast):
        return ast

    def identifier(self, ast):
        return ast

    def identifier_list(self, ast):
        return ast

    def actual_identifier(self, ast):
        return ast

    def table_name(self, ast):
        return ast

    def schema_name(self, ast):
        return ast

    def schema_qualified_name(self, ast):
        return ast

    def local_or_schema_qualified_name(self, ast):
        return ast

    def local_or_schema_qualifier(self, ast):
        return ast

    def cursor_name(self, ast):
        return ast

    def local_qualified_name(self, ast):
        return ast

    def host_parameter_name(self, ast):
        return ast

    def external_routine_name(self, ast):
        return ast

    def character_set_name(self, ast):
        return ast

    def connection_name(self, ast):
        return ast

    def sql_statement_name(self, ast):
        return ast

    def extended_statement_name(self, ast):
        return ast

    def dynamic_cursor_name(self, ast):
        return ast

    def extended_cursor_name(self, ast):
        return ast

    def descriptor_name(self, ast):
        return ast

    def scope_option(self, ast):
        return ast

    def data_type(self, ast):
        return ast

    def predefined_type(self, ast):
        return ast

    def character_string_type(self, ast):
        return ast

    def character_large_object_type(self, ast):
        return ast

    def national_character_string_type(self, ast):
        return ast

    def national_character_large_object_type(self, ast):
        return ast

    def binary_string_type(self, ast):
        return ast

    def binary_large_object_string_type(self, ast):
        return ast

    def numeric_type(self, ast):
        return ast

    def exact_numeric_type(self, ast):
        return ast

    def approximate_numeric_type(self, ast):
        return ast

    def length(self, ast):
        return ast

    def large_object_length(self, ast):
        return ast

    def char_length_units(self, ast):
        return ast

    def precision(self, ast):
        return ast

    def scale(self, ast):
        return ast

    def datetime_type(self, ast):
        return ast

    def with_or_without_time_zone(self, ast):
        return ast

    def interval_type(self, ast):
        return ast

    def row_type(self, ast):
        return ast

    def row_type_body(self, ast):
        return ast

    def reference_type(self, ast):
        return ast

    def scope_clause(self, ast):
        return ast

    def collection_type(self, ast):
        return ast

    def array_type(self, ast):
        return ast

    def multiset_type(self, ast):
        return ast

    def field_definition(self, ast):
        return ast

    def value_expression_primary(self, ast):
        return ast

    def parenthesized_value_expression(self, ast):
        return ast

    def nonparenthesized_value_expression_primary(self, ast):
        return ast

    def collection_value_constructor(self, ast):
        return ast

    def value_specification(self, ast):
        return ast

    def unsigned_value_specification(self, ast):
        return ast

    def general_value_specification(self, ast):
        return ast

    def simple_value_specification(self, ast):
        return ast

    def target_specification(self, ast):
        return ast

    def simple_target_specification(self, ast):
        return ast

    def host_parameter_specification(self, ast):
        return ast

    def dynamic_parameter_specification(self, ast):
        return ast

    def indicator_parameter(self, ast):
        return ast

    def target_array_element_specification(self, ast):
        return ast

    def target_array_reference(self, ast):
        return ast

    def current_collation_specification(self, ast):
        return ast

    def contextually_typed_value_specification(self, ast):
        return ast

    def implicitly_typed_value_specification(self, ast):
        return ast

    def empty_specification(self, ast):
        return ast

    def identifier_chain(self, ast):
        return ast

    def column_reference(self, ast):
        return ast

    def sql_parameter_reference(self, ast):
        return ast

    def set_function_specification(self, ast):
        return ast

    def grouping_operation(self, ast):
        return ast

    def window_function(self, ast):
        return ast

    def window_function_type(self, ast):
        return ast

    def rank_function_type(self, ast):
        return ast

    def window_name_or_specification(self, ast):
        return ast

    def case_expression(self, ast):
        return ast

    def case_abbreviation(self, ast):
        return ast

    def case_specification(self, ast):
        return ast

    def simple_case(self, ast):
        return ast

    def searched_case(self, ast):
        return ast

    def simple_when_clause(self, ast):
        return ast

    def searched_when_clause(self, ast):
        return ast

    def else_clause(self, ast):
        return ast

    def case_operand(self, ast):
        return ast

    def when_operand_list(self, ast):
        return ast

    def when_operand(self, ast):
        return ast

    def result(self, ast):
        return ast

    def cast_specification(self, ast):
        return ast

    def cast_operand(self, ast):
        return ast

    def cast_target(self, ast):
        return ast

    def next_value_expression(self, ast):
        return ast

    def field_reference(self, ast):
        return ast

    def subtype_treatment(self, ast):
        return ast

    def target_subtype(self, ast):
        return ast

    def method_invocation(self, ast):
        return ast

    def direct_invocation(self, ast):
        return ast

    def generalized_invocation(self, ast):
        return ast

    def static_method_invocation(self, ast):
        return ast

    def new_specification(self, ast):
        return ast

    def attribute_or_method_reference(self, ast):
        return ast

    def reference_resolution(self, ast):
        return ast

    def array_element_reference(self, ast):
        return ast

    def multiset_element_reference(self, ast):
        return ast

    def value_expression(self, ast):
        return ast

    def common_value_expression(self, ast):
        return ast

    def user_defined_type_value_expression(self, ast):
        return ast

    def reference_value_expression(self, ast):
        return ast

    def collection_value_expression(self, ast):
        return ast

    def numeric_value_expression(self, ast):
        return ast

    def term(self, ast):
        return ast

    def factor(self, ast):
        return ast

    def numeric_primary(self, ast):
        return ast

    def numeric_value_function(self, ast):
        return ast

    def position_expression(self, ast):
        return ast

    def string_position_expression(self, ast):
        return ast

    def blob_position_expression(self, ast):
        return ast

    def length_expression(self, ast):
        return ast

    def char_length_expression(self, ast):
        return ast

    def octet_length_expression(self, ast):
        return ast

    def extract_expression(self, ast):
        return ast

    def extract_field(self, ast):
        return ast

    def time_zone_field(self, ast):
        return ast

    def extract_source(self, ast):
        return ast

    def cardinality_expression(self, ast):
        return ast

    def max_cardinality_expression(self, ast):
        return ast

    def absolute_value_expression(self, ast):
        return ast

    def modulus_expression(self, ast):
        return ast

    def natural_logarithm(self, ast):
        return ast

    def exponential_function(self, ast):
        return ast

    def power_function(self, ast):
        return ast

    def square_root(self, ast):
        return ast

    def floor_function(self, ast):
        return ast

    def ceiling_function(self, ast):
        return ast

    def width_bucket_function(self, ast):
        return ast

    def string_value_expression(self, ast):
        return ast

    def character_value_expression(self, ast):
        return ast

    def concatenation(self, ast):
        return ast

    def character_factor(self, ast):
        return ast

    def character_primary(self, ast):
        return ast

    def blob_value_expression(self, ast):
        return ast

    def blob_factor(self, ast):
        return ast

    def blob_primary(self, ast):
        return ast

    def blob_concatenation(self, ast):
        return ast

    def string_value_function(self, ast):
        return ast

    def character_value_function(self, ast):
        return ast

    def character_substring_function(self, ast):
        return ast

    def regular_expression_substring_function(self, ast):
        return ast

    def fold(self, ast):
        return ast

    def transcoding(self, ast):
        return ast

    def character_transliteration(self, ast):
        return ast

    def trim_function(self, ast):
        return ast

    def trim_operands(self, ast):
        return ast

    def trim_specification(self, ast):
        return ast

    def character_overlay_function(self, ast):
        return ast

    def normalize_function(self, ast):
        return ast

    def specific_type_method(self, ast):
        return ast

    def blob_value_function(self, ast):
        return ast

    def blob_substring_function(self, ast):
        return ast

    def blob_trim_function(self, ast):
        return ast

    def blob_trim_operands(self, ast):
        return ast

    def blob_overlay_function(self, ast):
        return ast

    def start_position(self, ast):
        return ast

    def string_length(self, ast):
        return ast

    def datetime_value_expression(self, ast):
        return ast

    def datetime_term(self, ast):
        return ast

    def datetime_factor(self, ast):
        return ast

    def datetime_primary(self, ast):
        return ast

    def time_zone(self, ast):
        return ast

    def time_zone_specifier(self, ast):
        return ast

    def datetime_value_function(self, ast):
        return ast

    def current_time_value_function(self, ast):
        return ast

    def current_local_time_value_function(self, ast):
        return ast

    def current_timestamp_value_function(self, ast):
        return ast

    def current_local_timestamp_value_function(self, ast):
        return ast

    def interval_value_expression(self, ast):
        return ast

    def interval_term(self, ast):
        return ast

    def interval_factor(self, ast):
        return ast

    def interval_primary(self, ast):
        return ast

    def interval_value_expression_1(self, ast):
        return ast

    def interval_term_1(self, ast):
        return ast

    def interval_term_2(self, ast):
        return ast

    def interval_absolute_value_function(self, ast):
        return ast

    def boolean_value_expression(self, ast):
        return ast

    def boolean_term(self, ast):
        return ast

    def boolean_factor(self, ast):
        return ast

    def boolean_test(self, ast):
        return ast

    def truth_value(self, ast):
        return ast

    def boolean_primary(self, ast):
        return ast

    def boolean_predicand(self, ast):
        return ast

    def parenthesized_boolean_value_expression(self, ast):
        return ast

    def array_value_expression(self, ast):
        return ast

    def array_concatenation(self, ast):
        return ast

    def array_primary(self, ast):
        return ast

    def trim_array_function(self, ast):
        return ast

    def array_value_constructor(self, ast):
        return ast

    def array_value_constructor_by_enumeration(self, ast):
        return ast

    def array_element_list(self, ast):
        return ast

    def array_element(self, ast):
        return ast

    def array_value_constructor_by_query(self, ast):
        return ast

    def multiset_value_expression(self, ast):
        return ast

    def multiset_term(self, ast):
        return ast

    def multiset_primary(self, ast):
        return ast

    def multiset_set_function(self, ast):
        return ast

    def multiset_value_constructor(self, ast):
        return ast

    def multiset_value_constructor_by_enumeration(self, ast):
        return ast

    def multiset_element_list(self, ast):
        return ast

    def multiset_element(self, ast):
        return ast

    def multiset_value_constructor_by_query(self, ast):
        return ast

    def table_value_constructor_by_query(self, ast):
        return ast

    def row_value_constructor(self, ast):
        return ast

    def explicit_row_value_constructor(self, ast):
        return ast

    def row_value_constructor_element_list(self, ast):
        return ast

    def row_value_constructor_element(self, ast):
        return ast

    def contextually_typed_row_value_constructor(self, ast):
        return ast

    def contextually_typed_row_value_constructor_element_list(self, ast):
        return ast

    def contextually_typed_row_value_constructor_element(self, ast):
        return ast

    def row_value_constructor_predicand(self, ast):
        return ast

    def row_value_expression(self, ast):
        return ast

    def table_row_value_expression(self, ast):
        return ast

    def contextually_typed_row_value_expression(self, ast):
        return ast

    def row_value_predicand(self, ast):
        return ast

    def row_value_special_case(self, ast):
        return ast

    def table_value_constructor(self, ast):
        return ast

    def row_value_expression_list(self, ast):
        return ast

    def contextually_typed_table_value_constructor(self, ast):
        return ast

    def contextually_typed_row_value_expression_list(self, ast):
        return ast

    def table_expression(self, ast):
        return ast

    def from_clause(self, ast):
        return ast

    def table_reference_list(self, ast):
        return ast

    def table_reference(self, ast):
        return ast

    def table_factor(self, ast):
        return ast

    def sample_clause(self, ast):
        return ast

    def sample_method(self, ast):
        return ast

    def repeatable_clause(self, ast):
        return ast

    def table_primary(self, ast):
        return ast

    def parenthesized_joined_table(self, ast):
        return ast

    def only_spec(self, ast):
        return ast

    def lateral_derived_table(self, ast):
        return ast

    def collection_derived_table(self, ast):
        return ast

    def table_function_derived_table(self, ast):
        return ast

    def table_or_query_name(self, ast):
        return ast

    def column_name_list(self, ast):
        return ast

    def data_change_delta_table(self, ast):
        return ast

    def joined_table(self, ast):
        return ast

    def cross_join(self, ast):
        return ast

    def qualified_join(self, ast):
        return ast

    def natural_join(self, ast):
        return ast

    def join_specification(self, ast):
        return ast

    def join_condition(self, ast):
        return ast

    def named_columns_join(self, ast):
        return ast

    def join_type(self, ast):
        return ast

    def outer_join_type(self, ast):
        return ast

    def where_clause(self, ast):
        return ast

    def group_by_clause(self, ast):
        return ast

    def grouping_element_list(self, ast):
        return ast

    def grouping_element(self, ast):
        return ast

    def ordinary_grouping_set(self, ast):
        return ast

    def grouping_column_reference(self, ast):
        return ast

    def grouping_column_reference_list(self, ast):
        return ast

    def rollup_list(self, ast):
        return ast

    def ordinary_grouping_set_list(self, ast):
        return ast

    def cube_list(self, ast):
        return ast

    def grouping_sets_specification(self, ast):
        return ast

    def grouping_set_list(self, ast):
        return ast

    def grouping_set(self, ast):
        return ast

    def empty_grouping_set(self, ast):
        return ast

    def having_clause(self, ast):
        return ast

    def window_clause(self, ast):
        return ast

    def window_definition_list(self, ast):
        return ast

    def window_definition(self, ast):
        return ast

    def window_specification(self, ast):
        return ast

    def window_specification_details(self, ast):
        return ast

    def window_partition_clause(self, ast):
        return ast

    def window_partition_column_reference_list(self, ast):
        return ast

    def window_partition_column_reference(self, ast):
        return ast

    def window_frame_clause(self, ast):
        return ast

    def window_frame_units(self, ast):
        return ast

    def window_frame_extent(self, ast):
        return ast

    def window_frame_start(self, ast):
        return ast

    def window_frame_preceding(self, ast):
        return ast

    def window_frame_between(self, ast):
        return ast

    def window_frame_bound(self, ast):
        return ast

    def window_frame_following(self, ast):
        return ast

    def window_frame_exclusion(self, ast):
        return ast

    def query_specification(self, ast):
        return ast

    def select_list(self, ast):
        return ast

    def select_sublist(self, ast):
        return ast

    def qualified_asterisk(self, ast):
        return ast

    def derived_column(self, ast):
        return ast

    def as_clause(self, ast):
        return ast

    def all_fields_reference(self, ast):
        return ast

    def query_expression(self, ast):
        return ast

    def with_clause(self, ast):
        return ast

    def with_list(self, ast):
        return ast

    def with_list_element(self, ast):
        return ast

    def query_expression_body(self, ast):
        return ast

    def query_term(self, ast):
        return ast

    def query_primary(self, ast):
        return ast

    def simple_table(self, ast):
        return ast

    def explicit_table(self, ast):
        return ast

    def corresponding_spec(self, ast):
        return ast

    def search_or_cycle_clause(self, ast):
        return ast

    def search_clause(self, ast):
        return ast

    def recursive_search_order(self, ast):
        return ast

    def cycle_clause(self, ast):
        return ast

    def cycle_column_list(self, ast):
        return ast

    def subquery(self, ast):
        return ast

    def predicate(self, ast):
        return ast

    def comparison_predicate(self, ast):
        return ast

    def comparison_predicate_part_2(self, ast):
        return ast

    def comp_op(self, ast):
        return ast

    def between_predicate(self, ast):
        return ast

    def between_predicate_part_2(self, ast):
        return ast

    def in_predicate(self, ast):
        return ast

    def in_predicate_part_2(self, ast):
        return ast

    def in_predicate_value(self, ast):
        return ast

    def in_value_list(self, ast):
        return ast

    def like_predicate(self, ast):
        return ast

    def character_like_predicate(self, ast):
        return ast

    def character_like_predicate_part_2(self, ast):
        return ast

    def escape_character(self, ast):
        return ast

    def octet_like_predicate(self, ast):
        return ast

    def octet_like_predicate_part_2(self, ast):
        return ast

    def similar_predicate(self, ast):
        return ast

    def similar_predicate_part_2(self, ast):
        return ast

    def null_predicate(self, ast):
        return ast

    def null_predicate_part_2(self, ast):
        return ast

    def quantified_comparison_predicate(self, ast):
        return ast

    def quantified_comparison_predicate_part_2(self, ast):
        return ast

    def quantifier(self, ast):
        return ast

    def some(self, ast):
        return ast

    def exists_predicate(self, ast):
        return ast

    def unique_predicate(self, ast):
        return ast

    def normalized_predicate(self, ast):
        return ast

    def normalized_predicate_part_2(self, ast):
        return ast

    def match_predicate(self, ast):
        return ast

    def match_predicate_part_2(self, ast):
        return ast

    def overlaps_predicate(self, ast):
        return ast

    def overlaps_predicate_part_1(self, ast):
        return ast

    def overlaps_predicate_part_2(self, ast):
        return ast

    def distinct_predicate(self, ast):
        return ast

    def distinct_predicate_part_2(self, ast):
        return ast

    def member_predicate(self, ast):
        return ast

    def member_predicate_part_2(self, ast):
        return ast

    def submultiset_predicate(self, ast):
        return ast

    def submultiset_predicate_part_2(self, ast):
        return ast

    def set_predicate(self, ast):
        return ast

    def set_predicate_part_2(self, ast):
        return ast

    def type_predicate(self, ast):
        return ast

    def type_predicate_part_2(self, ast):
        return ast

    def type_list(self, ast):
        return ast

    def user_defined_type_specification(self, ast):
        return ast

    def exclusive_user_defined_type_specification(self, ast):
        return ast

    def search_condition(self, ast):
        return ast

    def interval_qualifier(self, ast):
        return ast

    def start_field(self, ast):
        return ast

    def end_field(self, ast):
        return ast

    def single_datetime_field(self, ast):
        return ast

    def primary_datetime_field(self, ast):
        return ast

    def non_second_primary_datetime_field(self, ast):
        return ast

    def language_clause(self, ast):
        return ast

    def language_name(self, ast):
        return ast

    def path_specification(self, ast):
        return ast

    def schema_name_list(self, ast):
        return ast

    def routine_invocation(self, ast):
        return ast

    def sql_argument_list(self, ast):
        return ast

    def sql_argument(self, ast):
        return ast

    def generalized_expression(self, ast):
        return ast

    def specific_routine_designator(self, ast):
        return ast

    def routine_type(self, ast):
        return ast

    def member_name(self, ast):
        return ast

    def member_name_alternatives(self, ast):
        return ast

    def data_type_list(self, ast):
        return ast

    def collate_clause(self, ast):
        return ast

    def constraint_name_definition(self, ast):
        return ast

    def constraint_characteristics(self, ast):
        return ast

    def constraint_check_time(self, ast):
        return ast

    def aggregate_function(self, ast):
        return ast

    def general_set_function(self, ast):
        return ast

    def computational_operation(self, ast):
        return ast

    def set_quantifier(self, ast):
        return ast

    def filter_clause(self, ast):
        return ast

    def binary_set_function(self, ast):
        return ast

    def binary_set_function_type(self, ast):
        return ast

    def ordered_set_function(self, ast):
        return ast

    def hypothetical_set_function(self, ast):
        return ast

    def within_group_specification(self, ast):
        return ast

    def hypothetical_set_function_value_expression_list(self, ast):
        return ast

    def inverse_distribution_function(self, ast):
        return ast

    def inverse_distribution_function_type(self, ast):
        return ast

    def array_aggregate_function(self, ast):
        return ast

    def sort_specification_list(self, ast):
        return ast

    def sort_specification(self, ast):
        return ast

    def ordering_specification(self, ast):
        return ast

    def null_ordering(self, ast):
        return ast

    def schema_definition(self, ast):
        return ast

    def schema_character_set_or_path(self, ast):
        return ast

    def schema_name_clause(self, ast):
        return ast

    def schema_character_set_specification(self, ast):
        return ast

    def schema_path_specification(self, ast):
        return ast

    def schema_element(self, ast):
        return ast

    def drop_schema_statement(self, ast):
        return ast

    def drop_behavior(self, ast):
        return ast

    def table_definition(self, ast):
        return ast

    def table_contents_source(self, ast):
        return ast

    def table_scope(self, ast):
        return ast

    def global_or_local(self, ast):
        return ast

    def table_commit_action(self, ast):
        return ast

    def table_element_list(self, ast):
        return ast

    def table_element(self, ast):
        return ast

    def typed_table_clause(self, ast):
        return ast

    def typed_table_element_list(self, ast):
        return ast

    def typed_table_element(self, ast):
        return ast

    def self_referencing_column_specification(self, ast):
        return ast

    def reference_generation(self, ast):
        return ast

    def column_options(self, ast):
        return ast

    def column_option_list(self, ast):
        return ast

    def subtable_clause(self, ast):
        return ast

    def like_clause(self, ast):
        return ast

    def like_options(self, ast):
        return ast

    def like_option(self, ast):
        return ast

    def identity_option(self, ast):
        return ast

    def column_default_option(self, ast):
        return ast

    def generation_option(self, ast):
        return ast

    def as_subquery_clause(self, ast):
        return ast

    def with_or_without_data(self, ast):
        return ast

    def column_definition(self, ast):
        return ast

    def data_type_or_domain_name(self, ast):
        return ast

    def column_constraint_definition(self, ast):
        return ast

    def column_constraint(self, ast):
        return ast

    def identity_column_specification(self, ast):
        return ast

    def generation_clause(self, ast):
        return ast

    def generation_rule(self, ast):
        return ast

    def generation_expression(self, ast):
        return ast

    def default_clause(self, ast):
        return ast

    def default_option(self, ast):
        return ast

    def table_constraint_definition(self, ast):
        return ast

    def table_constraint(self, ast):
        return ast

    def unique_constraint_definition(self, ast):
        return ast

    def unique_specification(self, ast):
        return ast

    def without_overlap_specification(self, ast):
        return ast

    def referential_constraint_definition(self, ast):
        return ast

    def references_specification(self, ast):
        return ast

    def match_type(self, ast):
        return ast

    def referenced_table_and_columns(self, ast):
        return ast

    def referential_triggered_action(self, ast):
        return ast

    def update_rule(self, ast):
        return ast

    def delete_rule(self, ast):
        return ast

    def referential_action(self, ast):
        return ast

    def check_constraint_definition(self, ast):
        return ast

    def alter_table_statement(self, ast):
        return ast

    def alter_table_action(self, ast):
        return ast

    def add_column_definition(self, ast):
        return ast

    def alter_column_definition(self, ast):
        return ast

    def alter_column_action(self, ast):
        return ast

    def set_column_default_clause(self, ast):
        return ast

    def drop_column_default_clause(self, ast):
        return ast

    def add_column_scope_clause(self, ast):
        return ast

    def drop_column_scope_clause(self, ast):
        return ast

    def alter_identity_column_specification(self, ast):
        return ast

    def alter_identity_column_option(self, ast):
        return ast

    def drop_column_definition(self, ast):
        return ast

    def add_table_constraint_definition(self, ast):
        return ast

    def drop_table_constraint_definition(self, ast):
        return ast

    def drop_table_statement(self, ast):
        return ast

    def view_definition(self, ast):
        return ast

    def view_specification(self, ast):
        return ast

    def regular_view_specification(self, ast):
        return ast

    def referenceable_view_specification(self, ast):
        return ast

    def subview_clause(self, ast):
        return ast

    def view_element_list(self, ast):
        return ast

    def view_element(self, ast):
        return ast

    def view_column_option(self, ast):
        return ast

    def levels_clause(self, ast):
        return ast

    def drop_view_statement(self, ast):
        return ast

    def domain_definition(self, ast):
        return ast

    def domain_constraint(self, ast):
        return ast

    def alter_domain_statement(self, ast):
        return ast

    def alter_domain_action(self, ast):
        return ast

    def set_domain_default_clause(self, ast):
        return ast

    def drop_domain_default_clause(self, ast):
        return ast

    def add_domain_constraint_definition(self, ast):
        return ast

    def drop_domain_constraint_definition(self, ast):
        return ast

    def drop_domain_statement(self, ast):
        return ast

    def character_set_definition(self, ast):
        return ast

    def character_set_source(self, ast):
        return ast

    def drop_character_set_statement(self, ast):
        return ast

    def collation_definition(self, ast):
        return ast

    def pad_characteristic(self, ast):
        return ast

    def drop_collation_statement(self, ast):
        return ast

    def transliteration_definition(self, ast):
        return ast

    def transliteration_source(self, ast):
        return ast

    def drop_transliteration_statement(self, ast):
        return ast

    def assertion_definition(self, ast):
        return ast

    def drop_assertion_statement(self, ast):
        return ast

    def trigger_definition(self, ast):
        return ast

    def trigger_action_time(self, ast):
        return ast

    def trigger_event(self, ast):
        return ast

    def triggered_action(self, ast):
        return ast

    def triggered_sql_statement(self, ast):
        return ast

    def old_or_new_values_alias_list(self, ast):
        return ast

    def old_or_new_values_alias(self, ast):
        return ast

    def drop_trigger_statement(self, ast):
        return ast

    def user_defined_type_definition(self, ast):
        return ast

    def user_defined_type_body(self, ast):
        return ast

    def user_defined_type_option_list(self, ast):
        return ast

    def user_defined_type_option(self, ast):
        return ast

    def subtype_clause(self, ast):
        return ast

    def representation(self, ast):
        return ast

    def member_list(self, ast):
        return ast

    def member(self, ast):
        return ast

    def instantiable_clause(self, ast):
        return ast

    def finality(self, ast):
        return ast

    def reference_type_specification(self, ast):
        return ast

    def user_defined_representation(self, ast):
        return ast

    def derived_representation(self, ast):
        return ast

    def system_generated_representation(self, ast):
        return ast

    def cast_to_ref(self, ast):
        return ast

    def cast_to_type(self, ast):
        return ast

    def list_of_attributes(self, ast):
        return ast

    def cast_to_distinct(self, ast):
        return ast

    def cast_to_source(self, ast):
        return ast

    def method_specification_list(self, ast):
        return ast

    def method_specification(self, ast):
        return ast

    def original_method_specification(self, ast):
        return ast

    def overriding_method_specification(self, ast):
        return ast

    def partial_method_specification(self, ast):
        return ast

    def method_characteristics(self, ast):
        return ast

    def method_characteristic(self, ast):
        return ast

    def attribute_definition(self, ast):
        return ast

    def alter_type_statement(self, ast):
        return ast

    def alter_type_action(self, ast):
        return ast

    def add_attribute_definition(self, ast):
        return ast

    def drop_attribute_definition(self, ast):
        return ast

    def add_original_method_specification(self, ast):
        return ast

    def add_overriding_method_specification(self, ast):
        return ast

    def drop_method_specification(self, ast):
        return ast

    def specific_method_specification_designator(self, ast):
        return ast

    def drop_data_type_statement(self, ast):
        return ast

    def schema_routine(self, ast):
        return ast

    def schema_procedure(self, ast):
        return ast

    def schema_function(self, ast):
        return ast

    def sql_invoked_procedure(self, ast):
        return ast

    def sql_invoked_function(self, ast):
        return ast

    def sql_parameter_declaration_list(self, ast):
        return ast

    def sql_parameter_declaration(self, ast):
        return ast

    def parameter_default(self, ast):
        return ast

    def parameter_mode(self, ast):
        return ast

    def parameter_type(self, ast):
        return ast

    def locator_indication(self, ast):
        return ast

    def function_specification(self, ast):
        return ast

    def method_specification_designator(self, ast):
        return ast

    def routine_characteristics(self, ast):
        return ast

    def routine_characteristic(self, ast):
        return ast

    def savepoint_level_indication(self, ast):
        return ast

    def dynamic_result_sets_characteristic(self, ast):
        return ast

    def parameter_style_clause(self, ast):
        return ast

    def dispatch_clause(self, ast):
        return ast

    def returns_clause(self, ast):
        return ast

    def returns_type(self, ast):
        return ast

    def returns_table_type(self, ast):
        return ast

    def table_function_column_list(self, ast):
        return ast

    def table_function_column_list_element(self, ast):
        return ast

    def result_cast(self, ast):
        return ast

    def result_cast_from_type(self, ast):
        return ast

    def returns_data_type(self, ast):
        return ast

    def routine_body(self, ast):
        return ast

    def sql_routine_spec(self, ast):
        return ast

    def rights_clause(self, ast):
        return ast

    def external_body_reference(self, ast):
        return ast

    def external_security_clause(self, ast):
        return ast

    def parameter_style(self, ast):
        return ast

    def deterministic_characteristic(self, ast):
        return ast

    def sql_data_access_indication(self, ast):
        return ast

    def null_call_clause(self, ast):
        return ast

    def transform_group_specification(self, ast):
        return ast

    def multiple_group_specification(self, ast):
        return ast

    def group_specification(self, ast):
        return ast

    def alter_routine_statement(self, ast):
        return ast

    def alter_routine_characteristics(self, ast):
        return ast

    def alter_routine_characteristic(self, ast):
        return ast

    def drop_routine_statement(self, ast):
        return ast

    def user_defined_cast_definition(self, ast):
        return ast

    def source_data_type(self, ast):
        return ast

    def target_data_type(self, ast):
        return ast

    def drop_user_defined_cast_statement(self, ast):
        return ast

    def user_defined_ordering_definition(self, ast):
        return ast

    def ordering_form(self, ast):
        return ast

    def equals_ordering_form(self, ast):
        return ast

    def full_ordering_form(self, ast):
        return ast

    def ordering_category(self, ast):
        return ast

    def relative_category(self, ast):
        return ast

    def map_category(self, ast):
        return ast

    def state_category(self, ast):
        return ast

    def drop_user_defined_ordering_statement(self, ast):
        return ast

    def transform_definition(self, ast):
        return ast

    def transform_group(self, ast):
        return ast

    def transform_element_list(self, ast):
        return ast

    def transform_element(self, ast):
        return ast

    def to_sql(self, ast):
        return ast

    def from_sql(self, ast):
        return ast

    def alter_transform_statement(self, ast):
        return ast

    def alter_group(self, ast):
        return ast

    def alter_transform_action_list(self, ast):
        return ast

    def alter_transform_action(self, ast):
        return ast

    def add_transform_element_list(self, ast):
        return ast

    def drop_transform_element_list(self, ast):
        return ast

    def transform_kind(self, ast):
        return ast

    def drop_transform_statement(self, ast):
        return ast

    def transforms_to_be_dropped(self, ast):
        return ast

    def sequence_generator_definition(self, ast):
        return ast

    def sequence_generator_options(self, ast):
        return ast

    def sequence_generator_option(self, ast):
        return ast

    def common_sequence_generator_options(self, ast):
        return ast

    def common_sequence_generator_option(self, ast):
        return ast

    def basic_sequence_generator_option(self, ast):
        return ast

    def sequence_generator_data_type_option(self, ast):
        return ast

    def sequence_generator_start_with_option(self, ast):
        return ast

    def sequence_generator_increment_by_option(self, ast):
        return ast

    def sequence_generator_maxvalue_option(self, ast):
        return ast

    def sequence_generator_minvalue_option(self, ast):
        return ast

    def sequence_generator_cycle_option(self, ast):
        return ast

    def alter_sequence_generator_statement(self, ast):
        return ast

    def alter_sequence_generator_options(self, ast):
        return ast

    def alter_sequence_generator_option(self, ast):
        return ast

    def alter_sequence_generator_restart_option(self, ast):
        return ast

    def drop_sequence_generator_statement(self, ast):
        return ast

    def grant_statement(self, ast):
        return ast

    def grant_privilege_statement(self, ast):
        return ast

    def privileges(self, ast):
        return ast

    def object_name(self, ast):
        return ast

    def object_privileges(self, ast):
        return ast

    def action(self, ast):
        return ast

    def privilege_method_list(self, ast):
        return ast

    def grantee(self, ast):
        return ast

    def grantor(self, ast):
        return ast

    def role_definition(self, ast):
        return ast

    def grant_role_statement(self, ast):
        return ast

    def drop_role_statement(self, ast):
        return ast

    def revoke_statement(self, ast):
        return ast

    def revoke_privilege_statement(self, ast):
        return ast

    def revoke_option_extension(self, ast):
        return ast

    def revoke_role_statement(self, ast):
        return ast

    def character_set_specification_list(self, ast):
        return ast

    def sql_procedure_statement(self, ast):
        return ast

    def sql_executable_statement(self, ast):
        return ast

    def sql_schema_statement(self, ast):
        return ast

    def sql_schema_definition_statement(self, ast):
        return ast

    def sql_schema_manipulation_statement(self, ast):
        return ast

    def sql_data_statement(self, ast):
        return ast

    def sql_data_change_statement(self, ast):
        return ast

    def sql_control_statement(self, ast):
        return ast

    def sql_transaction_statement(self, ast):
        return ast

    def sql_connection_statement(self, ast):
        return ast

    def sql_session_statement(self, ast):
        return ast

    def sql_dynamic_statement(self, ast):
        return ast

    def sql_dynamic_data_statement(self, ast):
        return ast

    def descriptor_statement(self, ast):
        return ast

    def cursor_sensitivity(self, ast):
        return ast

    def cursor_scrollability(self, ast):
        return ast

    def cursor_holdability(self, ast):
        return ast

    def cursor_returnability(self, ast):
        return ast

    def cursor_specification(self, ast):
        return ast

    def updatability_clause(self, ast):
        return ast

    def order_by_clause(self, ast):
        return ast

    def open_statement(self, ast):
        return ast

    def fetch_statement(self, ast):
        return ast

    def fetch_orientation(self, ast):
        return ast

    def fetch_target_list(self, ast):
        return ast

    def close_statement(self, ast):
        return ast

    def select_statement_single_row(self, ast):
        return ast

    def select_target_list(self, ast):
        return ast

    def delete_statement_positioned(self, ast):
        return ast

    def target_table(self, ast):
        return ast

    def delete_statement_searched(self, ast):
        return ast

    def insert_statement(self, ast):
        return ast

    def insert_columns_and_source(self, ast):
        return ast

    def from_subquery(self, ast):
        return ast

    def from_constructor(self, ast):
        return ast

    def override_clause(self, ast):
        return ast

    def from_default(self, ast):
        return ast

    def merge_statement(self, ast):
        return ast

    def merge_operation_specification(self, ast):
        return ast

    def merge_when_clause(self, ast):
        return ast

    def merge_when_matched_clause(self, ast):
        return ast

    def merge_when_not_matched_clause(self, ast):
        return ast

    def merge_update_specification(self, ast):
        return ast

    def merge_insert_specification(self, ast):
        return ast

    def merge_insert_value_list(self, ast):
        return ast

    def merge_insert_value_element(self, ast):
        return ast

    def update_statement_positioned(self, ast):
        return ast

    def update_statement_searched(self, ast):
        return ast

    def set_clause_list(self, ast):
        return ast

    def set_clause(self, ast):
        return ast

    def set_target(self, ast):
        return ast

    def multiple_column_assignment(self, ast):
        return ast

    def set_target_list(self, ast):
        return ast

    def update_target(self, ast):
        return ast

    def mutated_set_clause(self, ast):
        return ast

    def mutated_target(self, ast):
        return ast

    def update_source(self, ast):
        return ast

    def temporary_table_declaration(self, ast):
        return ast

    def free_locator_statement(self, ast):
        return ast

    def locator_reference(self, ast):
        return ast

    def hold_locator_statement(self, ast):
        return ast

    def call_statement(self, ast):
        return ast

    def return_statement(self, ast):
        return ast

    def return_value(self, ast):
        return ast

    def start_transaction_statement(self, ast):
        return ast

    def transaction_mode(self, ast):
        return ast

    def transaction_access_mode(self, ast):
        return ast

    def isolation_level(self, ast):
        return ast

    def level_of_isolation(self, ast):
        return ast

    def diagnostics_size(self, ast):
        return ast

    def set_transaction_statement(self, ast):
        return ast

    def transaction_characteristics(self, ast):
        return ast

    def set_constraints_mode_statement(self, ast):
        return ast

    def constraint_name_list(self, ast):
        return ast

    def savepoint_statement(self, ast):
        return ast

    def release_savepoint_statement(self, ast):
        return ast

    def commit_statement(self, ast):
        return ast

    def rollback_statement(self, ast):
        return ast

    def savepoint_clause(self, ast):
        return ast

    def connect_statement(self, ast):
        return ast

    def connection_target(self, ast):
        return ast

    def set_connection_statement(self, ast):
        return ast

    def connection_object(self, ast):
        return ast

    def disconnect_statement(self, ast):
        return ast

    def disconnect_object(self, ast):
        return ast

    def set_session_characteristics_statement(self, ast):
        return ast

    def session_characteristic_list(self, ast):
        return ast

    def session_characteristic(self, ast):
        return ast

    def set_session_user_identifier_statement(self, ast):
        return ast

    def set_role_statement(self, ast):
        return ast

    def role_specification(self, ast):
        return ast

    def set_local_time_zone_statement(self, ast):
        return ast

    def set_time_zone_value(self, ast):
        return ast

    def set_catalog_statement(self, ast):
        return ast

    def catalog_name_characteristic(self, ast):
        return ast

    def set_schema_statement(self, ast):
        return ast

    def schema_name_characteristic(self, ast):
        return ast

    def set_names_statement(self, ast):
        return ast

    def character_set_name_characteristic(self, ast):
        return ast

    def set_path_statement(self, ast):
        return ast

    def sql_path_characteristic(self, ast):
        return ast

    def set_transform_group_statement(self, ast):
        return ast

    def transform_group_characteristic(self, ast):
        return ast

    def set_session_collation_statement(self, ast):
        return ast

    def allocate_descriptor_statement(self, ast):
        return ast

    def deallocate_descriptor_statement(self, ast):
        return ast

    def get_descriptor_statement(self, ast):
        return ast

    def get_descriptor_information(self, ast):
        return ast

    def get_header_information(self, ast):
        return ast

    def header_item_name(self, ast):
        return ast

    def get_item_information(self, ast):
        return ast

    def item_number(self, ast):
        return ast

    def descriptor_item_name(self, ast):
        return ast

    def set_descriptor_statement(self, ast):
        return ast

    def set_descriptor_information(self, ast):
        return ast

    def set_header_information(self, ast):
        return ast

    def set_item_information(self, ast):
        return ast

    def prepare_statement(self, ast):
        return ast

    def attributes_specification(self, ast):
        return ast

    def sql_statement_variable(self, ast):
        return ast

    def deallocate_prepared_statement(self, ast):
        return ast

    def describe_statement(self, ast):
        return ast

    def describe_input_statement(self, ast):
        return ast

    def describe_output_statement(self, ast):
        return ast

    def nesting_option(self, ast):
        return ast

    def using_descriptor(self, ast):
        return ast

    def described_object(self, ast):
        return ast

    def input_using_clause(self, ast):
        return ast

    def using_arguments(self, ast):
        return ast

    def using_argument(self, ast):
        return ast

    def output_using_clause(self, ast):
        return ast

    def into_arguments(self, ast):
        return ast

    def into_argument(self, ast):
        return ast

    def into_descriptor(self, ast):
        return ast

    def execute_statement(self, ast):
        return ast

    def execute_immediate_statement(self, ast):
        return ast

    def allocate_cursor_statement(self, ast):
        return ast

    def statement_cursor(self, ast):
        return ast

    def result_set_cursor(self, ast):
        return ast

    def dynamic_open_statement(self, ast):
        return ast

    def dynamic_fetch_statement(self, ast):
        return ast

    def dynamic_close_statement(self, ast):
        return ast

    def dynamic_delete_statement_positioned(self, ast):
        return ast

    def dynamic_update_statement_positioned(self, ast):
        return ast

    def direct_sql_statement(self, ast):
        return ast

    def directly_executable_statement(self, ast):
        return ast

    def direct_sql_data_statement(self, ast):
        return ast

    def get_diagnostics_statement(self, ast):
        return ast

    def sql_diagnostics_information(self, ast):
        return ast

    def statement_information(self, ast):
        return ast

    def statement_information_item(self, ast):
        return ast

    def statement_information_item_name(self, ast):
        return ast

    def condition_information(self, ast):
        return ast

    def condition_information_item(self, ast):
        return ast

    def condition_information_item_name(self, ast):
        return ast

    def all_information(self, ast):
        return ast

    def all_qualifier(self, ast):
        return ast

    def ntile_function(self, ast):
        return ast

    def number_of_tiles(self, ast):
        return ast

    def lead_or_lag_function(self, ast):
        return ast

    def lead_or_lag(self, ast):
        return ast

    def null_treatment(self, ast):
        return ast

    def first_or_last_value_function(self, ast):
        return ast

    def first_or_last_value(self, ast):
        return ast

    def nth_value_function(self, ast):
        return ast

    def nth_row(self, ast):
        return ast

    def from_first_or_last(self, ast):
        return ast

    def nested_window_function(self, ast):
        return ast

    def nested_row_number_function(self, ast):
        return ast

    def value_of_expression_at_row(self, ast):
        return ast

    def row_marker(self, ast):
        return ast

    def row_marker_expression(self, ast):
        return ast

    def row_marker_delta(self, ast):
        return ast

    def row_marker_offset(self, ast):
        return ast

    def regex_occurrences_function(self, ast):
        return ast

    def xquery_pattern(self, ast):
        return ast

    def xquery_option_flag(self, ast):
        return ast

    def regex_subject_string(self, ast):
        return ast

    def regex_position_expression(self, ast):
        return ast

    def regex_position_start_or_after(self, ast):
        return ast

    def regex_occurrence(self, ast):
        return ast

    def regex_capture_group(self, ast):
        return ast

    def period_predicate(self, ast):
        return ast

    def period_overlaps_predicate(self, ast):
        return ast

    def period_overlaps_predicate_part_2(self, ast):
        return ast

    def period_predicand_1(self, ast):
        return ast

    def period_predicand_2(self, ast):
        return ast

    def period_predicand(self, ast):
        return ast

    def period_equals_predicate(self, ast):
        return ast

    def period_equals_predicate_part_2(self, ast):
        return ast

    def period_contains_predicate(self, ast):
        return ast

    def period_contains_predicate_part_2(self, ast):
        return ast

    def period_or_point_in_time_predicand(self, ast):
        return ast

    def period_precedes_predicate(self, ast):
        return ast

    def period_precedes_predicate_part_2(self, ast):
        return ast

    def period_succeeds_predicate(self, ast):
        return ast

    def period_succeeds_predicate_part_2(self, ast):
        return ast

    def period_immediately_precedes_predicate(self, ast):
        return ast

    def period_immediately_precedes_predicate_part_2(self, ast):
        return ast

    def period_immediately_succeeds_predicate(self, ast):
        return ast

    def period_immediately_succeeds_predicate_part_2(self, ast):
        return ast

    def table_period_definition(self, ast):
        return ast

    def system_or_application_time_period_specification(self, ast):
        return ast

    def system_time_period_specification(self, ast):
        return ast

    def application_time_period_specification(self, ast):
        return ast

    def system_time_period_start_column_specification(self, ast):
        return ast

    def system_time_period_end_column_specification(self, ast):
        return ast

    def timestamp_generation_rule(self, ast):
        return ast

    def referencing_period_specification(self, ast):
        return ast

    def referenced_period_specification(self, ast):
        return ast

    def regex_substring_function(self, ast):
        return ast

    def regex_transliteration(self, ast):
        return ast

    def regex_transliteration_occurrence(self, ast):
        return ast

    def normal_form(self, ast):
        return ast

    def normalize_function_result_length(self, ast):
        return ast

    def data_change_statement(self, ast):
        return ast

    def result_option(self, ast):
        return ast

    def partitioned_join_table(self, ast):
        return ast

    def partitioned_join_column_reference_list(self, ast):
        return ast

    def partitioned_join_column_reference(self, ast):
        return ast

    def query_system_time_period_specification(self, ast):
        return ast

    def point_in_time_1(self, ast):
        return ast

    def point_in_time_2(self, ast):
        return ast

    def point_in_time(self, ast):
        return ast

    def result_offset_clause(self, ast):
        return ast

    def fetch_first_clause(self, ast):
        return ast

    def fetch_first_quantity(self, ast):
        return ast

    def fetch_first_percentage(self, ast):
        return ast

    def regex_like_predicate(self, ast):
        return ast

    def regex_like_predicate_part_2(self, ast):
        return ast

    def named_argument_specification(self, ast):
        return ast

    def named_argument_sql_argument(self, ast):
        return ast

    def alter_table_constraint_definition(self, ast):
        return ast

    def add_table_period_definition(self, ast):
        return ast

    def add_system_time_period_column_list(self, ast):
        return ast

    def drop_table_period_definition(self, ast):
        return ast

    def add_system_versioning_clause(self, ast):
        return ast

    def drop_system_versioning_clause(self, ast):
        return ast

    def identity_column_restart_option(self, ast):
        return ast

    def merge_update_or_delete_specification(self, ast):
        return ast

    def set_column_not_null_clause(self, ast):
        return ast

    def drop_column_not_null_clause(self, ast):
        return ast

    def alter_column_data_type_clause(self, ast):
        return ast

    def set_identity_column_generation_clause(self, ast):
        return ast

    def drop_identity_property_clause(self, ast):
        return ast

    def drop_column_generation_expression_clause(self, ast):
        return ast

    def truncate_table_statement(self, ast):
        return ast

    def constraint_enforcement(self, ast):
        return ast

    def start(self, ast):
        return ast


def main(
        filename,
        startrule,
        trace=False,
        whitespace=None,
        nameguard=None,
        comments_re='/\\*[\\s\\S]*?\\*/',
        eol_comments_re='--.*?$',
        ignorecase=True,
        left_recursion=True,
        **kwargs):

    with open(filename) as f:
        text = f.read()
    whitespace = whitespace or '\\s+'
    parser = SqlParser(parseinfo=False)
    ast = parser.parse(
        text,
        startrule,
        filename=filename,
        trace=trace,
        whitespace=whitespace,
        nameguard=nameguard,
        ignorecase=ignorecase,
        **kwargs)
    return ast

if __name__ == '__main__':
    import json
    ast = generic_main(main, SqlParser, name='Sql')
    print('AST:')
    print(ast)
    print()
    print('JSON:')
    print(json.dumps(ast, indent=2))
    print()
