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AULT,IN_DBL_BRACE> TOKEN [IGNORE_CASE] : {
<ADAPTER: "adapter">
| <ALL: "all">
| <ANALYZE: "analyze">
| <AND: "and">
| <ANY: "any">
| <APPLY: "apply">
| <AS: "as">
| <ASC: "asc">
| <AT: "at">
| <AUTOGENERATED: "autogenerated">
| <BETWEEN: "between">
| <BTREE: "btree">
| <BY: "by">
| <CASE: "case">
| <CAST: "cast">
| <CLOSED: "closed">
| <CREATE: "create">
| <CROSS: "cross">
| <COMPACTION: "compaction">
| <COMPACT: "compact">
| <CONNECT: "connect">
| <CORRELATE: "correlate">
| <DATASET: "dataset">
| <COLLECTION: "collection">
| <DATABASE: "database">
| <DATAVERSE: "dataverse">
| <DECLARE: "declare">
| <DEFINITION: "definition">
| <DELETE: "delete">
| <DESC: "desc">
| <DISCONNECT: "disconnect">
| <DISTINCT: "distinct">
| <DIV: "div">
| <DROP: "drop">
| <ELEMENT: "element">
| <EXPLAIN: "explain">
| <ELSE: "else">
| <ENFORCED: "enforced">
| <END: "end">
| <EVERY: "every">
| <EXCEPT: "except">
| <EXISTS: "exists">
| <EXTERNAL: "external">
| <FALSE: "false">
| <FEED: "feed">
| <FILTER: "filter">
| <FLATTEN: "flatten">
| <FOR: "for">
| <FROM: "from">
| <FULL: "full">
| <FULLTEXT: "fulltext">
| <FUNCTION: "function">
| <GROUP: "group">
| <HAVING: "having">
| <HINTS: "hints">
| <IF: "if">
| <INTO: "into">
| <IN: "in">
| <INDEX: "index">
| <INGESTION: "ingestion">
| <INNER: "inner">
| <INSERT: "insert">
| <INTERNAL: "internal">
| <INTERSECT: "intersect">
| <IS: "is">
| <JOIN: "join">
| <KEYWORD: "keyword">
| <KEY: "key">
| <KNOWN: "known">
| <LEFT: "left">
| <LETTING: "letting">
| <LET: "let">
| <LIKE: "like">
| <LIMIT: "limit">
| <LOAD: "load">
| <MISSING: "missing">
| <MOD: "mod">
| <NODEGROUP: "nodegroup">
| <NGRAM: "ngram">
| <NOT: "not">
| <NULL: "null">
| <OFFSET: "offset">
| <ON: "on">
| <OPEN: "open">
| <OR: "or">
| <ORDER: "order">
| <OUTER: "outer">
| <OUTPUT: "output">
| <OVER: "over">
| <PATH: "path">
| <POLICY: "policy">
| <PRESORTED: "pre-sorted">
| <PRIMARY: "primary">
| <RAW: "raw">
| <RETURN: "return">
| <RETURNING: "returning">
| <RIGHT: "right">
| <RTREE: "rtree">
| <RUN: "run">
| <SATISFIES: "satisfies">
| <SECONDARY: "secondary">
| <SELECT: "select">
| <SET: "set">
| <SOME: "some">
| <START: "start">
| <STOP: "stop">
| <SYNONYM: "synonym">
| <TEMPORARY: "temporary">
| <THEN: "then">
| <TO: "to">
| <TRUE: "true">
| <TYPE: "type">
| <UNION: "union">
| <UNKNOWN: "unknown">
| <UNNEST: "unnest">
| <UPDATE: "update">
| <UPSERT: "upsert">
| <USE: "use">
| <USING: "using">
| <VALUE: "value">
| <VALUED: "valued">
| <VIEW: "view">
| <WHEN: "when">
| <WHERE: "where">
| <WITH: "with">
| <WRITE: "write">
| <COPY: "copy">
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<CARET: "^">
| <CONCAT: "||">
| <DIVIDE: "/">
| <MINUS: "-">
| <MUL: "*">
| <PLUS: "+">
| <LEFTPAREN: "(">
| <RIGHTPAREN: ")">
| <LEFTBRACKET: "[">
| <RIGHTBRACKET: "]">
| <ATT: "@">
| <COLON: ":">
| <COMMA: ",">
| <DOT: ".">
| <PERCENT: "%">
| <QUES: "?">
| <SEMICOLON: ";">
| <SHARP: "#">
| <LT: "<">
| <GT: ">">
| <LE: "<=">
| <GE: ">=">
| <EQ: "=">
| <NE: "!=">
| <LG: "<>">
| <SIMILAR: "~=">
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<LEFTBRACE: "{"> : DEFAULT
}
|
<DEFAULT> TOKEN : {
<RIGHTBRACE: "}"> : {
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<LEFTDBLBRACE: "{{"> : IN_DBL_BRACE
}
|
<IN_DBL_BRACE> TOKEN : {
<RIGHTDBLBRACE: "}}"> : {
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<#DIGIT: ["0"-"9"]>
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<INTEGER_LITERAL: <DIGITS>>
| <DOUBLE_LITERAL: <DIGITS> "." <DIGITS> (("e" | "E") ("+" | "-")? <DIGITS>)? | <DIGITS> ("e" | "E") ("+" | "-")? <DIGITS> | "." <DIGITS> (("e" | "E") ("+" | "-")? <DIGITS>)?>
| <FLOAT_LITERAL: <DIGITS> ("f" | "F") | <DIGITS> ("." <DIGITS> ("f" | "F"))? | "." <DIGITS> ("f" | "F")>
| <#DIGITS: (<DIGIT>)+>
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<#LETTER: ["A"-"Z","a"-"z"]>
| <#IDENTIFIER_START_SPECIALCHAR: ["_"]>
| <#IDENTIFIER_REST_SPECIALCHAR: ["$"]>
| <#IDENTIFIER_START: <LETTER> | <IDENTIFIER_START_SPECIALCHAR>>
| <#IDENTIFIER_REST: <LETTER> | <DIGIT> | <IDENTIFIER_START_SPECIALCHAR> | <IDENTIFIER_REST_SPECIALCHAR>>
| <IDENTIFIER: <IDENTIFIER_START> (<IDENTIFIER_REST>)*>
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<QUOTED_STRING: "`" (<EscapeQuot> | <EscapeBslash> | <EscapeSlash> | <EscapeBspace> | <EscapeFormf> | <EscapeNl> | <EscapeCr> | <EscapeTab> | <EscapeBTickWithBslash> | <EscapeBtickWithBtick> | ~["`","\\"])* "`">
| <STRING_LITERAL: ("E")? "\"" (<EscapeQuot> | <EscapeBslash> | <EscapeSlash> | <EscapeBspace> | <EscapeFormf> | <EscapeNl> | <EscapeBTickWithBslash> | <EscapeCr> | <EscapeTab> | ~["\"","\\"])* "\"" | ("E")? "\'" (<EscapeApos> | <EscapeBslash> | <EscapeSlash> | <EscapeBspace> | <EscapeFormf> | <EscapeNl> | <EscapeBTickWithBslash> | <EscapeCr> | <EscapeTab> | ~["\'","\\"])* "\'">
| <#EscapeBTickWithBslash: "\\`">
| <#EscapeBtickWithBtick: "``">
| <#EscapeQuot: "\\\"">
| <#EscapeApos: "\\\'">
| <#EscapeBslash: "\\\\">
| <#EscapeSlash: "\\/">
| <#EscapeBspace: "\\b">
| <#EscapeFormf: "\\f">
| <#EscapeNl: "\\n">
| <#EscapeCr: "\\r">
| <#EscapeTab: "\\t">
}
|
<DEFAULT,IN_DBL_BRACE> TOKEN : {
<DOLLAR_INTEGER_LITERAL: "$" <INTEGER_LITERAL>>
| <DOLLAR_IDENTIFIER: "$" <IDENTIFIER>>
| <DOLLAR_QUOTED_STRING: "$" <QUOTED_STRING>>
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
" "
| "\t"
| "\r"
| "\n"
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
<"//" (~["\n"])* "\n">
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
<"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")?>
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
<"--" (~["\n"])* "\n">
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
<"--" (~["\n","\r"])* ("\n" | "\r" | "\r\n")?>
}
|
<DEFAULT,IN_DBL_BRACE> SKIP : {
"/*" : INSIDE_COMMENT
}
|
<INSIDE_COMMENT> SPECIAL : {
<"+" (" ")* (~["*"])*>
}
|
<INSIDE_COMMENT> SKIP : {
"/*" : {
}
|
<INSIDE_COMMENT> SKIP : {
"*/" : {
| <~[]>
}
|