/* This is a generated file! */
/* Generated by `utils/build_lexers.py` via `utils/rustify.py` */
/* This process can be run via tox: `tox -e generate-rs` */
#![cfg_attr(rustfmt, rustfmt_skip)]
use once_cell::sync::Lazy;
use sqlfluffrs_types::{LexMatcher, LexMatcherConfig};
use sqlfluffrs_types::{Token, RegexModeGroup};
use sqlfluffrs_types::token::CaseFold;
use sqlfluffrs_types::{BracketPairEntry, BracketPairSet};

pub static STARROCKS_KEYWORDS: Lazy<Vec<String>> = Lazy::new(|| { vec![
    "ACCESSIBLE".to_string(),
    "ADD".to_string(),
    "ALL".to_string(),
    "ALTER".to_string(),
    "ANALYZE".to_string(),
    "AND".to_string(),
    "AS".to_string(),
    "ASC".to_string(),
    "ASENSITIVE".to_string(),
    "BEFORE".to_string(),
    "BETWEEN".to_string(),
    "BIGINT".to_string(),
    "BINARY".to_string(),
    "BLOB".to_string(),
    "BOTH".to_string(),
    "BY".to_string(),
    "CALL".to_string(),
    "CASCADE".to_string(),
    "CASE".to_string(),
    "CHANGE".to_string(),
    "CHANGED_PAGE_BITMAPS".to_string(),
    "CHAR".to_string(),
    "CHARACTER".to_string(),
    "CHECK".to_string(),
    "CLIENT_STATISTICS".to_string(),
    "COLLATE".to_string(),
    "COLUMN".to_string(),
    "CONDITION".to_string(),
    "CONSTRAINT".to_string(),
    "CONTINUE".to_string(),
    "CONVERT".to_string(),
    "CREATE".to_string(),
    "CROSS".to_string(),
    "CURRENT_DATE".to_string(),
    "CURRENT_ROLE".to_string(),
    "CURRENT_TIME".to_string(),
    "CURRENT_TIMESTAMP".to_string(),
    "CURRENT_USER".to_string(),
    "CURSOR".to_string(),
    "DATABASE".to_string(),
    "DATABASES".to_string(),
    "DATE_TRUNC".to_string(),
    "DAY_HOUR".to_string(),
    "DAY_MICROSECOND".to_string(),
    "DAY_MINUTE".to_string(),
    "DAY_SECOND".to_string(),
    "DEC".to_string(),
    "DECIMAL".to_string(),
    "DECLARE".to_string(),
    "DEFAULT".to_string(),
    "DELAYED".to_string(),
    "DELETE".to_string(),
    "DELETE_DOMAIN_ID".to_string(),
    "DESC".to_string(),
    "DESCRIBE".to_string(),
    "DETERMINISTIC".to_string(),
    "DISTINCT".to_string(),
    "DISTINCTROW".to_string(),
    "DIV".to_string(),
    "DOUBLE".to_string(),
    "DO_DOMAIN_IDS".to_string(),
    "DROP".to_string(),
    "DUAL".to_string(),
    "EACH".to_string(),
    "ELSE".to_string(),
    "ELSEIF".to_string(),
    "ENCLOSED".to_string(),
    "ESCAPED".to_string(),
    "EXCEPT".to_string(),
    "EXISTS".to_string(),
    "EXIT".to_string(),
    "EXPLAIN".to_string(),
    "FALSE".to_string(),
    "FETCH".to_string(),
    "FLOAT".to_string(),
    "FLOAT4".to_string(),
    "FLOAT8".to_string(),
    "FOR".to_string(),
    "FORCE".to_string(),
    "FOREIGN".to_string(),
    "FROM".to_string(),
    "FULLTEXT".to_string(),
    "GENERAL".to_string(),
    "GRANT".to_string(),
    "GROUP".to_string(),
    "HAVING".to_string(),
    "HIGH_PRIORITY".to_string(),
    "HOUR_MICROSECOND".to_string(),
    "HOUR_MINUTE".to_string(),
    "HOUR_SECOND".to_string(),
    "IF".to_string(),
    "IGNORE".to_string(),
    "IGNORE_DOMAIN_IDS".to_string(),
    "IGNORE_SERVER_IDS".to_string(),
    "IN".to_string(),
    "INDEX".to_string(),
    "INDEX_STATISTICS".to_string(),
    "INFILE".to_string(),
    "INNER".to_string(),
    "INOUT".to_string(),
    "INSENSITIVE".to_string(),
    "INSERT".to_string(),
    "INT".to_string(),
    "INT1".to_string(),
    "INT2".to_string(),
    "INT3".to_string(),
    "INT4".to_string(),
    "INT8".to_string(),
    "INTEGER".to_string(),
    "INTERSECT".to_string(),
    "INTERVAL".to_string(),
    "INTO".to_string(),
    "IS".to_string(),
    "ITERATE".to_string(),
    "JOIN".to_string(),
    "KEY".to_string(),
    "KEYS".to_string(),
    "KILL".to_string(),
    "LEADING".to_string(),
    "LEAVE".to_string(),
    "LEFT".to_string(),
    "LIKE".to_string(),
    "LIMIT".to_string(),
    "LINEAR".to_string(),
    "LINES".to_string(),
    "LOAD".to_string(),
    "LOCALTIME".to_string(),
    "LOCALTIMESTAMP".to_string(),
    "LOCK".to_string(),
    "LONG".to_string(),
    "LONGBLOB".to_string(),
    "LONGTEXT".to_string(),
    "LOOP".to_string(),
    "LOW_PRIORITY".to_string(),
    "MASTER_HEARTBEAT_PERIOD".to_string(),
    "MASTER_SSL_VERIFY_SERVER_CERT".to_string(),
    "MATCH".to_string(),
    "MAXVALUE".to_string(),
    "MEDIUMBLOB".to_string(),
    "MEDIUMINT".to_string(),
    "MEDIUMTEXT".to_string(),
    "MIDDLEINT".to_string(),
    "MINUTE_MICROSECOND".to_string(),
    "MINUTE_SECOND".to_string(),
    "MOD".to_string(),
    "MODIFIES".to_string(),
    "NATURAL".to_string(),
    "NOT".to_string(),
    "NO_WRITE_TO_BINLOG".to_string(),
    "NULL".to_string(),
    "NUMERIC".to_string(),
    "OFFSET".to_string(),
    "OLAP".to_string(),
    "ON".to_string(),
    "OPTIMIZE".to_string(),
    "OPTION".to_string(),
    "OPTIONALLY".to_string(),
    "OR".to_string(),
    "ORDER".to_string(),
    "OUT".to_string(),
    "OUTER".to_string(),
    "OUTFILE".to_string(),
    "OVER".to_string(),
    "PAGE_CHECKSUM".to_string(),
    "PARSE_VCOL_EXPR".to_string(),
    "PARTITION".to_string(),
    "PRECISION".to_string(),
    "PRIMARY".to_string(),
    "PROCEDURE".to_string(),
    "PROPERTIES".to_string(),
    "PURGE".to_string(),
    "RANGE".to_string(),
    "READ".to_string(),
    "READS".to_string(),
    "READ_WRITE".to_string(),
    "REAL".to_string(),
    "RECURSIVE".to_string(),
    "REFERENCES".to_string(),
    "REF_SYSTEM_ID".to_string(),
    "REGEXP".to_string(),
    "RELEASE".to_string(),
    "RENAME".to_string(),
    "REPEAT".to_string(),
    "REPLACE".to_string(),
    "REQUIRE".to_string(),
    "RESIGNAL".to_string(),
    "RESTRICT".to_string(),
    "RETURN".to_string(),
    "RETURNING".to_string(),
    "REVOKE".to_string(),
    "RIGHT".to_string(),
    "RLIKE".to_string(),
    "ROWS".to_string(),
    "ROW_NUMBER".to_string(),
    "SCHEMA".to_string(),
    "SCHEMAS".to_string(),
    "SECOND_MICROSECOND".to_string(),
    "SELECT".to_string(),
    "SENSITIVE".to_string(),
    "SEPARATOR".to_string(),
    "SET".to_string(),
    "SHOW".to_string(),
    "SIGNAL".to_string(),
    "SLOW".to_string(),
    "SMALLINT".to_string(),
    "SPATIAL".to_string(),
    "SPECIFIC".to_string(),
    "SQL".to_string(),
    "SQLEXCEPTION".to_string(),
    "SQLSTATE".to_string(),
    "SQLWARNING".to_string(),
    "SQL_BIG_RESULT".to_string(),
    "SQL_CALC_FOUND_ROWS".to_string(),
    "SQL_SMALL_RESULT".to_string(),
    "SSL".to_string(),
    "STARTING".to_string(),
    "STATS_AUTO_RECALC".to_string(),
    "STATS_PERSISTENT".to_string(),
    "STATS_SAMPLE_PAGES".to_string(),
    "STRAIGHT_JOIN".to_string(),
    "TABLE".to_string(),
    "TERMINATED".to_string(),
    "THEN".to_string(),
    "TIME_SLICE".to_string(),
    "TINYBLOB".to_string(),
    "TINYINT".to_string(),
    "TINYTEXT".to_string(),
    "TO".to_string(),
    "TRAILING".to_string(),
    "TRIGGER".to_string(),
    "TRUE".to_string(),
    "UNDO".to_string(),
    "UNION".to_string(),
    "UNIQUE".to_string(),
    "UNLOCK".to_string(),
    "UNSIGNED".to_string(),
    "UPDATE".to_string(),
    "USAGE".to_string(),
    "USE".to_string(),
    "USING".to_string(),
    "UTC_DATE".to_string(),
    "UTC_TIME".to_string(),
    "UTC_TIMESTAMP".to_string(),
    "VALUES".to_string(),
    "VARBINARY".to_string(),
    "VARCHAR".to_string(),
    "VARCHARACTER".to_string(),
    "VARYING".to_string(),
    "WHEN".to_string(),
    "WHERE".to_string(),
    "WHILE".to_string(),
    "WINDOW".to_string(),
    "WITH".to_string(),
    "WRITE".to_string(),
    "XOR".to_string(),
    "YEAR_MONTH".to_string(),
    "ZEROFILL".to_string(),
]});

pub static STARROCKS_LEXERS: Lazy<Vec<LexMatcher>> = Lazy::new(|| { vec![

    LexMatcher::regex_lexer(
        "whitespace",
        r#"[^\S\r\n]+"#,Token::whitespace_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "inline_comment",
        r#"(^--|-- |#)[^\n]*"#,Token::comment_token,
        None,
        |input| input.starts_with(['#','-','/']),
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: Some(vec![String::from("--"), String::from("#")]),
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "block_comment",
        r#"\/\*([^\*]|\*(?!\/))*\*\/"#,Token::comment_token,
        Some(extract_nested_block_comment),
        |input| input.starts_with("/"),
        LexMatcherConfig {
        subdivider: Some(Box::new(
    LexMatcher::regex_subdivider(
        "newline",
        r#"\r\n|\n"#,Token::newline_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ))),
        trim_post_subdivide: Some(Box::new(
    LexMatcher::regex_subdivider(
        "whitespace",
        r#"[^\S\r\n]+"#,Token::whitespace_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ))),
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "single_quote",
        r#"(?s)('(?:\\'|''|\\\\|[^'])*'(?!'))"#,Token::code_token,
        None,
        |input| match input.as_bytes() {
        [b'\'', ..] => true,                     // Single quote case
        [b'R' | b'r', b'\'', ..] => true,        // r' or R'
        [b'B' | b'b', b'\'', ..] => true,        // b' or B'
        [b'R' | b'r', b'B' | b'b', b'\'', ..] => true, // rb', RB', etc.
        [b'B' | b'b', b'R' | b'r', b'\'', ..] => true, // br', Br', etc.
        _ => false,
    },
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: Some((r#"(?s)('((?:\\'|''|\\\\|[^'])*)'(?!'))"#.to_string(), RegexModeGroup::Index(2))),
        escape_replacements: Some(std::sync::Arc::new(vec![(r#"\\'|''"#.to_string(), r#"'"#.to_string())])),
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "double_quote",
        r#"(?s)("(?:\\"|""|\\\\|[^"])*"(?!"))"#,Token::code_token,
        None,
        |input| match input.as_bytes() {
        [b'"', ..] => true,                     // Just a double quote
        [b'R' | b'r', b'"', ..] => true,        // r" or R"
        [b'B' | b'b', b'"', ..] => true,        // b" or B"
        [b'R' | b'r', b'B' | b'b', b'"', ..] => true, // rb", RB", etc.
        [b'B' | b'b', b'R' | b'r', b'"', ..] => true, // br", Br", etc.
        _ => false,
    },
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: Some((r#"(?s)("((?:\\"|""|\\\\|[^"])*)"(?!"))"#.to_string(), RegexModeGroup::Index(2))),
        escape_replacements: Some(std::sync::Arc::new(vec![(r#"\\"|"""#.to_string(), r#"""#.to_string())])),
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "back_quote",
        r#"`(?:[^`\\]|\\.)*`"#,Token::code_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: Some((r#"`((?:[^`\\]|\\.)*)`"#.to_string(), RegexModeGroup::Index(1))),
        escape_replacements: Some(std::sync::Arc::new(vec![(r#"\\`"#.to_string(), r#"`"#.to_string())])),
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "dollar_quote",
        r#"\$(\w*)\$(.*?)\$\1\$"#,Token::code_token,
        None,
        |input| input.starts_with("$"),
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: Some((r#"\$(\w*)\$(.*?)\$\1\$"#.to_string(), RegexModeGroup::Index(2))),
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "hexadecimal_literal",
        r#"([xX]'([\da-fA-F][\da-fA-F])+'|0x[\da-fA-F]+)"#,Token::literal_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: Some(String::from("numeric_literal")),
    },
    ),

    LexMatcher::regex_lexer(
        "bit_value_literal",
        r#"([bB]'[01]+'|0b[01]+)"#,Token::literal_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: Some(String::from("numeric_literal")),
    },
    ),

    LexMatcher::regex_lexer(
        "numeric_literal",
        r#"(?>\d+\.\d+|\d+\.(?![\.\w])|\.\d+|\d+)(\.?[eE][+-]?\d+)?((?<=\.)|(?=\b))"#,Token::literal_token,
        None,
        |input| input.starts_with(['x','X','.','0','1','2','3','4','5','6','7','8','9', '-', '+', '$', '¢', '£', '¤', '¥', '৲', '৳', '฿', '៛', '₠', '₡', '₢', '₣', '₤', '₥', '₦', '₧', '₨', '₩', '₪', '₫', '€', '₭', '₮', '₯', '₰', '₱', '﹩', '＄', '￠', '￡', '￥', '￦']),
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "obevo_annotation",
        r#"////\s*(CHANGE|BODY|METADATA)[^\n]*"#,Token::comment_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "glob_operator",
        "~~~",Token::comparison_operator_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "like_operator",
        r#"!?~~?\*?"#,Token::comparison_operator_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "newline",
        r#"\r\n|\n"#,Token::newline_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "casting_operator",
        "::",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "walrus_operator",
        ":=",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "equals",
        "=",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "inline_path_operator",
        "->>",Token::symbol_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "column_path_operator",
        "->",Token::symbol_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "greater_than",
        ">",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "less_than",
        "<",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "not",
        "!",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "dot",
        ".",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "comma",
        ",",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "plus",
        "+",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "minus",
        "-",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "divide",
        "/",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "percent",
        "%",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "question",
        "?",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "double_ampersand",
        "&&",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "ampersand",
        "&",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "double_vertical_bar",
        "||",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "vertical_bar",
        "|",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "caret",
        "^",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "star",
        "*",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "start_bracket",
        "(",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "end_bracket",
        ")",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "start_square_bracket",
        "[",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "end_square_bracket",
        "]",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "start_curly_bracket",
        "{",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "end_curly_bracket",
        "}",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "colon",
        ":",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::string_lexer(
        "semicolon",
        ";",Token::code_token,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),

    LexMatcher::regex_lexer(
        "at_sign",
        r#"@@?[a-zA-Z0-9_$]*(\.[a-zA-Z0-9_$]+)?"#,Token::code_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: Some(vec![String::from("@")]),
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: Some(String::from("at_sign_literal")),
    },
    ),

    LexMatcher::regex_lexer(
        "word",
        r#"[0-9a-zA-Z_]+"#,Token::word_token,
        None,
        |_| true,
        LexMatcherConfig {
        subdivider: None,
        trim_post_subdivide: None,
        trim_start: None,
        trim_chars: None,
        quoted_value: None,
        escape_replacements: None,
        casefold: CaseFold::None,
        kwarg_type: None,
    },
    ),
]});

pub static STARROCKS_BRACKET_PAIRS: Lazy<BracketPairSet> = Lazy::new(|| { BracketPairSet(vec![
    BracketPairEntry { open: "{", close: "}", start_type: "start_curly_bracket", end_type: "end_curly_bracket", persists: false },
    BracketPairEntry { open: "(", close: ")", start_type: "start_bracket", end_type: "end_bracket", persists: true },
    BracketPairEntry { open: "[", close: "]", start_type: "start_square_bracket", end_type: "end_square_bracket", persists: false },
]) });


// Wrapper function that passes the dialect name to the shared implementation
fn extract_nested_block_comment(input: &str) -> Option<&str> {
    crate::extract_nested_block_comment(input, "starrocks")
}
