import { ATN } from "antlr4ts/atn/ATN" ; import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer" ; import { FailedPredicateException } from "antlr4ts/FailedPredicateException" ; import { NotNull } from "antlr4ts/Decorators" ; import { NoViableAltException } from "antlr4ts/NoViableAltException" ; import { Override } from "antlr4ts/Decorators" ; import { Parser } from "antlr4ts/Parser" ; import { ParserRuleContext } from "antlr4ts/ParserRuleContext" ; import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator" ; import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener" ; import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor" ; import { RecognitionException } from "antlr4ts/RecognitionException" ; import { RuleContext } from "antlr4ts/RuleContext" ; import { TerminalNode } from "antlr4ts/tree/TerminalNode" ; import { Token } from "antlr4ts/Token" ; import { TokenStream } from "antlr4ts/TokenStream" ; import { Vocabulary } from "antlr4ts/Vocabulary" ; import { VocabularyImpl } from "antlr4ts/VocabularyImpl" ; import * as Utils from "antlr4ts/misc/Utils" ; import { SQLParserListener } from "./SQLParserListener" ; import { SQLParserVisitor } from "./SQLParserVisitor" ; export class SQLParser extends Parser { public static readonly ID = 1 ; public static readonly OPEN_COMMENT = 2 ; public static readonly S_REQUIRED_MARK = 3 ; public static readonly WORD = 4 ; public static readonly EOF_STATEMENT = 5 ; public static readonly WSL = 6 ; public static readonly STRING = 7 ; public static readonly PARAM_MARK = 8 ; public static readonly WS = 9 ; public static readonly TRANSFORM_ARROW = 10 ; public static readonly SPREAD = 11 ; public static readonly NAME_TAG = 12 ; public static readonly TYPE_TAG = 13 ; public static readonly OB = 14 ; public static readonly CB = 15 ; public static readonly COMMA = 16 ; public static readonly C_REQUIRED_MARK = 17 ; public static readonly ANY = 18 ; public static readonly CLOSE_COMMENT = 19 ; public static readonly CAST = 20 ; public static readonly RULE_input = 0 ; public static readonly RULE_query = 1 ; public static readonly RULE_queryDef = 2 ; public static readonly RULE_ignoredComment = 3 ; public static readonly RULE_statement = 4 ; public static readonly RULE_statementBody = 5 ; public static readonly RULE_word = 6 ; public static readonly RULE_param = 7 ; public static readonly RULE_paramId = 8 ; public static readonly RULE_nameTag = 9 ; public static readonly RULE_paramTag = 10 ; public static readonly RULE_paramTransform = 11 ; public static readonly RULE_transformRule = 12 ; public static readonly RULE_spreadTransform = 13 ; public static readonly RULE_pickTransform = 14 ; public static readonly RULE_spreadPickTransform = 15 ; public static readonly RULE_key = 16 ; public static readonly RULE_queryName = 17 ; public static readonly RULE_paramName = 18 ; public static readonly ruleNames : string [ ] = [ "input" , "query" , "queryDef" , "ignoredComment" , "statement" , "statementBody" , "word" , "param" , "paramId" , "nameTag" , "paramTag" , "paramTransform" , "transformRule" , "spreadTransform" , "pickTransform" , "spreadPickTransform" , "key" , "queryName" , "paramName" , ] ; private static readonly _LITERAL_NAMES : Array < string | undefined > = [ undefined , undefined , "'/*'" , undefined , undefined , "';'" , undefined , undefined , "':'" , undefined , "'->'" , "'...'" , "'@name'" , "'@param'" , "'('" , "')'" , "','" , undefined , undefined , "'*/'" , "'::'" , ] ; private static readonly _SYMBOLIC_NAMES : Array < string | undefined > = [ undefined , "ID" , "OPEN_COMMENT" , "S_REQUIRED_MARK" , "WORD" , "EOF_STATEMENT" , "WSL" , "STRING" , "PARAM_MARK" , "WS" , "TRANSFORM_ARROW" , "SPREAD" , "NAME_TAG" , "TYPE_TAG" , "OB" , "CB" , "COMMA" , "C_REQUIRED_MARK" , "ANY" , "CLOSE_COMMENT" , "CAST" , ] ; public static readonly VOCABULARY : Vocabulary = new VocabularyImpl ( SQLParser . _LITERAL_NAMES , SQLParser . _SYMBOLIC_NAMES , [ ] ) ; public get vocabulary ( ) : Vocabulary { return SQLParser . VOCABULARY ; } public get grammarFileName ( ) : string { return "SQLParser.g4" ; } public get ruleNames ( ) : string [ ] { return SQLParser . ruleNames ; } public get serializedATN ( ) : string { return SQLParser . _serializedATN ; } protected createFailedPredicateException ( predicate ? , message ? ) { return new FailedPredicateException ( this , predicate , message ) ; } constructor ( input ) { super ( input ) ; this . _interp = new ParserATNSimulator ( SQLParser . _ATN , this ) ; } public input ( ) { let _localctx = new InputContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 0 , SQLParser . RULE_input ) ; let _la ; try { let _alt ; this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 45 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; do { { { this . state = 41 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 0 , this . _ctx ) ; while ( _alt !== 2 && _alt !== ATN . INVALID_ALT_NUMBER ) { if ( _alt === 1 ) { { { this . state = 38 ; this . ignoredComment ( ) ; } } } this . state = 43 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 0 , this . _ctx ) ; } this . state = 44 ; this . query ( ) ; } } this . state = 47 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; } while ( _la === SQLParser . OPEN_COMMENT ) ; this . state = 49 ; this . match ( SQLParser . EOF ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public query ( ) { let _localctx = new QueryContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 2 , SQLParser . RULE_query ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 51 ; this . queryDef ( ) ; this . state = 52 ; this . statement ( ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public queryDef ( ) { let _localctx = new QueryDefContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 4 , SQLParser . RULE_queryDef ) ; let _la ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 54 ; this . match ( SQLParser . OPEN_COMMENT ) ; this . state = 55 ; this . nameTag ( ) ; this . state = 59 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; while ( _la === SQLParser . TYPE_TAG ) { { { this . state = 56 ; this . paramTag ( ) ; } } this . state = 61 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; } this . state = 62 ; this . match ( SQLParser . CLOSE_COMMENT ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public ignoredComment ( ) { let _localctx = new IgnoredCommentContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 6 , SQLParser . RULE_ignoredComment ) ; let _la ; try { let _alt ; this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 64 ; this . match ( SQLParser . OPEN_COMMENT ) ; this . state = 68 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 3 , this . _ctx ) ; while ( _alt !== 1 && _alt !== ATN . INVALID_ALT_NUMBER ) { if ( _alt === 1 + 1 ) { { { this . state = 65 ; _la = this . _input . LA ( 1 ) ; if ( _la <= 0 || ( _la === SQLParser . NAME_TAG ) ) { this . _errHandler . recoverInline ( this ) ; } else { if ( this . _input . LA ( 1 ) === Token . EOF ) { this . matchedEOF = true ; } this . _errHandler . reportMatch ( this ) ; this . consume ( ) ; } } } } this . state = 70 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 3 , this . _ctx ) ; } this . state = 71 ; this . match ( SQLParser . CLOSE_COMMENT ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public statement ( ) { let _localctx = new StatementContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 8 , SQLParser . RULE_statement ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 73 ; this . statementBody ( ) ; this . state = 74 ; this . match ( SQLParser . EOF_STATEMENT ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public statementBody ( ) { let _localctx = new StatementBodyContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 10 , SQLParser . RULE_statementBody ) ; let _la ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 76 ; this . word ( ) ; this . state = 82 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; while ( ( ( ( _la ) & ~ 0x1F ) === 0 && ( ( 1 << _la ) & ( ( 1 << SQLParser . ID ) | ( 1 << SQLParser . OPEN_COMMENT ) | ( 1 << SQLParser . S_REQUIRED_MARK ) | ( 1 << SQLParser . WORD ) | ( 1 << SQLParser . STRING ) | ( 1 << SQLParser . PARAM_MARK ) ) ) !== 0 ) ) { { this . state = 80 ; this . _errHandler . sync ( this ) ; switch ( this . _input . LA ( 1 ) ) { case SQLParser . OPEN_COMMENT : { this . state = 77 ; this . ignoredComment ( ) ; } break ; case SQLParser . PARAM_MARK : { this . state = 78 ; this . param ( ) ; } break ; case SQLParser . ID : case SQLParser . S_REQUIRED_MARK : case SQLParser . WORD : case SQLParser . STRING : { this . state = 79 ; this . word ( ) ; } break ; default : throw new NoViableAltException ( this ) ; } } this . state = 84 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; } } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public word ( ) { let _localctx = new WordContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 12 , SQLParser . RULE_word ) ; let _la ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 85 ; _la = this . _input . LA ( 1 ) ; if ( ! ( ( ( ( _la ) & ~ 0x1F ) === 0 && ( ( 1 << _la ) & ( ( 1 << SQLParser . ID ) | ( 1 << SQLParser . S_REQUIRED_MARK ) | ( 1 << SQLParser . WORD ) | ( 1 << SQLParser . STRING ) ) ) !== 0 ) ) ) { this . _errHandler . recoverInline ( this ) ; } else { if ( this . _input . LA ( 1 ) === Token . EOF ) { this . matchedEOF = true ; } this . _errHandler . reportMatch ( this ) ; this . consume ( ) ; } } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public param ( ) { let _localctx = new ParamContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 14 , SQLParser . RULE_param ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 87 ; this . match ( SQLParser . PARAM_MARK ) ; this . state = 88 ; this . paramId ( ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public paramId ( ) { let _localctx = new ParamIdContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 16 , SQLParser . RULE_paramId ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 90 ; this . match ( SQLParser . ID ) ; this . state = 92 ; this . _errHandler . sync ( this ) ; switch ( this . interpreter . adaptivePredict ( this . _input , 6 , this . _ctx ) ) { case 1 : { this . state = 91 ; this . match ( SQLParser . S_REQUIRED_MARK ) ; } break ; } } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public nameTag ( ) { let _localctx = new NameTagContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 18 , SQLParser . RULE_nameTag ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 94 ; this . match ( SQLParser . NAME_TAG ) ; this . state = 95 ; this . queryName ( ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public paramTag ( ) { let _localctx = new ParamTagContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 20 , SQLParser . RULE_paramTag ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 97 ; this . match ( SQLParser . TYPE_TAG ) ; this . state = 98 ; this . paramName ( ) ; this . state = 99 ; this . paramTransform ( ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public paramTransform ( ) { let _localctx = new ParamTransformContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 22 , SQLParser . RULE_paramTransform ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 101 ; this . match ( SQLParser . TRANSFORM_ARROW ) ; this . state = 102 ; this . transformRule ( ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public transformRule ( ) { let _localctx = new TransformRuleContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 24 , SQLParser . RULE_transformRule ) ; try { this . state = 107 ; this . _errHandler . sync ( this ) ; switch ( this . interpreter . adaptivePredict ( this . _input , 7 , this . _ctx ) ) { case 1 : this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 104 ; this . spreadTransform ( ) ; } break ; case 2 : this . enterOuterAlt ( _localctx , 2 ) ; { this . state = 105 ; this . pickTransform ( ) ; } break ; case 3 : this . enterOuterAlt ( _localctx , 3 ) ; { this . state = 106 ; this . spreadPickTransform ( ) ; } break ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public spreadTransform ( ) { let _localctx = new SpreadTransformContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 26 , SQLParser . RULE_spreadTransform ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 109 ; this . match ( SQLParser . OB ) ; this . state = 110 ; this . match ( SQLParser . SPREAD ) ; this . state = 111 ; this . match ( SQLParser . CB ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public pickTransform ( ) { let _localctx = new PickTransformContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 28 , SQLParser . RULE_pickTransform ) ; let _la ; try { let _alt ; this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 113 ; this . match ( SQLParser . OB ) ; this . state = 114 ; this . key ( ) ; this . state = 119 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 8 , this . _ctx ) ; while ( _alt !== 2 && _alt !== ATN . INVALID_ALT_NUMBER ) { if ( _alt === 1 ) { { { this . state = 115 ; this . match ( SQLParser . COMMA ) ; this . state = 116 ; this . key ( ) ; } } } this . state = 121 ; this . _errHandler . sync ( this ) ; _alt = this . interpreter . adaptivePredict ( this . _input , 8 , this . _ctx ) ; } this . state = 123 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; if ( _la === SQLParser . COMMA ) { { this . state = 122 ; this . match ( SQLParser . COMMA ) ; } } this . state = 125 ; this . match ( SQLParser . CB ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public spreadPickTransform ( ) { let _localctx = new SpreadPickTransformContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 30 , SQLParser . RULE_spreadPickTransform ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 127 ; this . match ( SQLParser . OB ) ; this . state = 128 ; this . pickTransform ( ) ; this . state = 129 ; this . match ( SQLParser . SPREAD ) ; this . state = 130 ; this . match ( SQLParser . CB ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public key ( ) { let _localctx = new KeyContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 32 , SQLParser . RULE_key ) ; let _la ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 132 ; this . match ( SQLParser . ID ) ; this . state = 134 ; this . _errHandler . sync ( this ) ; _la = this . _input . LA ( 1 ) ; if ( _la === SQLParser . C_REQUIRED_MARK ) { { this . state = 133 ; this . match ( SQLParser . C_REQUIRED_MARK ) ; } } } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public queryName ( ) { let _localctx = new QueryNameContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 34 , SQLParser . RULE_queryName ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 136 ; this . match ( SQLParser . ID ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public paramName ( ) { let _localctx = new ParamNameContext ( this . _ctx , this . state ) ; this . enterRule ( _localctx , 36 , SQLParser . RULE_paramName ) ; try { this . enterOuterAlt ( _localctx , 1 ) ; { this . state = 138 ; this . match ( SQLParser . ID ) ; } } catch ( re ) { if ( re instanceof RecognitionException ) { _localctx . exception = re ; this . _errHandler . reportError ( this , re ) ; this . _errHandler . recover ( this , re ) ; } else { throw re ; } } finally { this . exitRule ( ) ; } return _localctx ; } public static readonly _serializedATN : string = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x16\x8F\x04\x02" + "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" + "\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04" + "\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" + "\x13\t\x13\x04\x14\t\x14\x03\x02\x07\x02*\n\x02\f\x02\x0E\x02-\v\x02\x03" + "\x02\x06\x020\n\x02\r\x02\x0E\x021\x03\x02\x03\x02\x03\x03\x03\x03\x03" + "\x03\x03\x04\x03\x04\x03\x04\x07\x04<\n\x04\f\x04\x0E\x04?\v\x04\x03\x04" + "\x03\x04\x03\x05\x03\x05\x07\x05E\n\x05\f\x05\x0E\x05H\v\x05\x03\x05\x03" + "\x05\x03\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\x07\x07\x07S" + "\n\x07\f\x07\x0E\x07V\v\x07\x03\b\x03\b\x03\t\x03\t\x03\t\x03\n\x03\n" + "\x05\n_\n\n\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03\r\x03\r\x03" + "\r\x03\x0E\x03\x0E\x03\x0E\x05\x0En\n\x0E\x03\x0F\x03\x0F\x03\x0F\x03" + "\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x07\x10x\n\x10\f\x10\x0E\x10{\v\x10" + "\x03\x10\x05\x10~\n\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11" + "\x03\x11\x03\x12\x03\x12\x05\x12\x89\n\x12\x03\x13\x03\x13\x03\x14\x03" + "\x14\x03\x14\x03F\x02\x02\x15\x02\x02\x04\x02\x06\x02\b\x02\n\x02\f\x02" + "\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x18\x02\x1A\x02\x1C\x02\x1E\x02" + " \x02\"\x02$\x02&\x02\x02\x04\x03\x02\x0E\x0E\x05\x02\x03\x03\x05\x06" + "\t\t\x02\x88\x02/\x03\x02\x02\x02\x045\x03\x02\x02\x02\x068\x03\x02\x02" + "\x02\bB\x03\x02\x02\x02\nK\x03\x02\x02\x02\fN\x03\x02\x02\x02\x0EW\x03" + "\x02\x02\x02\x10Y\x03\x02\x02\x02\x12\\\x03\x02\x02\x02\x14`\x03\x02\x02" + "\x02\x16c\x03\x02\x02\x02\x18g\x03\x02\x02\x02\x1Am\x03\x02\x02\x02\x1C" + "o\x03\x02\x02\x02\x1Es\x03\x02\x02\x02 \x81\x03\x02\x02\x02\"\x86\x03" + "\x02\x02\x02$\x8A\x03\x02\x02\x02&\x8C\x03\x02\x02\x02(*\x05\b\x05\x02" + ")(\x03\x02\x02\x02*-\x03\x02\x02\x02+)\x03\x02\x02\x02+,\x03\x02\x02\x02" + ",.\x03\x02\x02\x02-+\x03\x02\x02\x02.0\x05\x04\x03\x02/+\x03\x02\x02\x02" + "01\x03\x02\x02\x021/\x03\x02\x02\x0212\x03\x02\x02\x0223\x03\x02\x02\x02" + "34\x07\x02\x02\x034\x03\x03\x02\x02\x0256\x05\x06\x04\x0267\x05\n\x06" + "\x027\x05\x03\x02\x02\x0289\x07\x04\x02\x029=\x05\x14\v\x02:<\x05\x16" + "\f\x02;:\x03\x02\x02\x02<?\x03\x02\x02\x02=;\x03\x02\x02\x02=>\x03\x02" + "\x02\x02>@\x03\x02\x02\x02?=\x03\x02\x02\x02@A\x07\x15\x02\x02A\x07\x03" + "\x02\x02\x02BF\x07\x04\x02\x02CE\n\x02\x02\x02DC\x03\x02\x02\x02EH\x03" + "\x02\x02\x02FG\x03\x02\x02\x02FD\x03\x02\x02\x02GI\x03\x02\x02\x02HF\x03" + "\x02\x02\x02IJ\x07\x15\x02\x02J\t\x03\x02\x02\x02KL\x05\f\x07\x02LM\x07" + "\x07\x02\x02M\v\x03\x02\x02\x02NT\x05\x0E\b\x02OS\x05\b\x05\x02PS\x05" + "\x10\t\x02QS\x05\x0E\b\x02RO\x03\x02\x02\x02RP\x03\x02\x02\x02RQ\x03\x02" + "\x02\x02SV\x03\x02\x02\x02TR\x03\x02\x02\x02TU\x03\x02\x02\x02U\r\x03" + "\x02\x02\x02VT\x03\x02\x02\x02WX\t\x03\x02\x02X\x0F\x03\x02\x02\x02YZ" + "\x07\n\x02\x02Z[\x05\x12\n\x02[\x11\x03\x02\x02\x02\\^\x07\x03\x02\x02" + "]_\x07\x05\x02\x02^]\x03\x02\x02\x02^_\x03\x02\x02\x02_\x13\x03\x02\x02" + "\x02`a\x07\x0E\x02\x02ab\x05$\x13\x02b\x15\x03\x02\x02\x02cd\x07\x0F\x02" + "\x02de\x05&\x14\x02ef\x05\x18\r\x02f\x17\x03\x02\x02\x02gh\x07\f\x02\x02" + "hi\x05\x1A\x0E\x02i\x19\x03\x02\x02\x02jn\x05\x1C\x0F\x02kn\x05\x1E\x10" + "\x02ln\x05 \x11\x02mj\x03\x02\x02\x02mk\x03\x02\x02\x02ml\x03\x02\x02" + "\x02n\x1B\x03\x02\x02\x02op\x07\x10\x02\x02pq\x07\r\x02\x02qr\x07\x11" + "\x02\x02r\x1D\x03\x02\x02\x02st\x07\x10\x02\x02ty\x05\"\x12\x02uv\x07" + "\x12\x02\x02vx\x05\"\x12\x02wu\x03\x02\x02\x02x{\x03\x02\x02\x02yw\x03" + "\x02\x02\x02yz\x03\x02\x02\x02z}\x03\x02\x02\x02{y\x03\x02\x02\x02|~\x07" + "\x12\x02\x02}|\x03\x02\x02\x02}~\x03\x02\x02\x02~\x7F\x03\x02\x02\x02" + "\x7F\x80\x07\x11\x02\x02\x80\x1F\x03\x02\x02\x02\x81\x82\x07\x10\x02\x02" + "\x82\x83\x05\x1E\x10\x02\x83\x84\x07\r\x02\x02\x84\x85\x07\x11\x02\x02" + "\x85!\x03\x02\x02\x02\x86\x88\x07\x03\x02\x02\x87\x89\x07\x13\x02\x02" + "\x88\x87\x03\x02\x02\x02\x88\x89\x03\x02\x02\x02\x89#\x03\x02\x02\x02" + "\x8A\x8B\x07\x03\x02\x02\x8B%\x03\x02\x02\x02\x8C\x8D\x07\x03\x02\x02" + "\x8D\'\x03\x02\x02\x02\r+1=FRT^my}\x88" ; public static __ATN : ATN ; public static get _ATN ( ) : ATN { if ( ! SQLParser . __ATN ) { SQLParser . __ATN = new ATNDeserializer ( ) . deserialize ( Utils . toCharArray ( SQLParser . _serializedATN ) ) ; } return SQLParser . __ATN ; } } export class InputContext extends ParserRuleContext { public EOF ( ) { return this . getToken ( SQLParser . EOF , 0 ) ; } public query ( ) ; public query ( i ) ; public query ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( QueryContext ) ; } else { return this . getRuleContext ( i , QueryContext ) ; } } public ignoredComment ( ) ; public ignoredComment ( i ) ; public ignoredComment ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( IgnoredCommentContext ) ; } else { return this . getRuleContext ( i , IgnoredCommentContext ) ; } } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_input ; } public enterRule ( listener ) { if ( listener . enterInput ) { listener . enterInput ( this ) ; } } public exitRule ( listener ) { if ( listener . exitInput ) { listener . exitInput ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitInput ) { return visitor . visitInput ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class QueryContext extends ParserRuleContext { public queryDef ( ) { return this . getRuleContext ( 0 , QueryDefContext ) ; } public statement ( ) { return this . getRuleContext ( 0 , StatementContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_query ; } public enterRule ( listener ) { if ( listener . enterQuery ) { listener . enterQuery ( this ) ; } } public exitRule ( listener ) { if ( listener . exitQuery ) { listener . exitQuery ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitQuery ) { return visitor . visitQuery ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class QueryDefContext extends ParserRuleContext { public OPEN_COMMENT ( ) { return this . getToken ( SQLParser . OPEN_COMMENT , 0 ) ; } public nameTag ( ) { return this . getRuleContext ( 0 , NameTagContext ) ; } public CLOSE_COMMENT ( ) { return this . getToken ( SQLParser . CLOSE_COMMENT , 0 ) ; } public paramTag ( ) ; public paramTag ( i ) ; public paramTag ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( ParamTagContext ) ; } else { return this . getRuleContext ( i , ParamTagContext ) ; } } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_queryDef ; } public enterRule ( listener ) { if ( listener . enterQueryDef ) { listener . enterQueryDef ( this ) ; } } public exitRule ( listener ) { if ( listener . exitQueryDef ) { listener . exitQueryDef ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitQueryDef ) { return visitor . visitQueryDef ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class IgnoredCommentContext extends ParserRuleContext { public OPEN_COMMENT ( ) { return this . getToken ( SQLParser . OPEN_COMMENT , 0 ) ; } public CLOSE_COMMENT ( ) { return this . getToken ( SQLParser . CLOSE_COMMENT , 0 ) ; } public NAME_TAG ( ) ; public NAME_TAG ( i ) ; public NAME_TAG ( i ? ) { if ( i === undefined ) { return this . getTokens ( SQLParser . NAME_TAG ) ; } else { return this . getToken ( SQLParser . NAME_TAG , i ) ; } } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_ignoredComment ; } public enterRule ( listener ) { if ( listener . enterIgnoredComment ) { listener . enterIgnoredComment ( this ) ; } } public exitRule ( listener ) { if ( listener . exitIgnoredComment ) { listener . exitIgnoredComment ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitIgnoredComment ) { return visitor . visitIgnoredComment ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class StatementContext extends ParserRuleContext { public statementBody ( ) { return this . getRuleContext ( 0 , StatementBodyContext ) ; } public EOF_STATEMENT ( ) { return this . getToken ( SQLParser . EOF_STATEMENT , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_statement ; } public enterRule ( listener ) { if ( listener . enterStatement ) { listener . enterStatement ( this ) ; } } public exitRule ( listener ) { if ( listener . exitStatement ) { listener . exitStatement ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitStatement ) { return visitor . visitStatement ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class StatementBodyContext extends ParserRuleContext { public word ( ) ; public word ( i ) ; public word ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( WordContext ) ; } else { return this . getRuleContext ( i , WordContext ) ; } } public ignoredComment ( ) ; public ignoredComment ( i ) ; public ignoredComment ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( IgnoredCommentContext ) ; } else { return this . getRuleContext ( i , IgnoredCommentContext ) ; } } public param ( ) ; public param ( i ) ; public param ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( ParamContext ) ; } else { return this . getRuleContext ( i , ParamContext ) ; } } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_statementBody ; } public enterRule ( listener ) { if ( listener . enterStatementBody ) { listener . enterStatementBody ( this ) ; } } public exitRule ( listener ) { if ( listener . exitStatementBody ) { listener . exitStatementBody ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitStatementBody ) { return visitor . visitStatementBody ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class WordContext extends ParserRuleContext { public WORD ( ) { return this . tryGetToken ( SQLParser . WORD , 0 ) ; } public ID ( ) { return this . tryGetToken ( SQLParser . ID , 0 ) ; } public STRING ( ) { return this . tryGetToken ( SQLParser . STRING , 0 ) ; } public S_REQUIRED_MARK ( ) { return this . tryGetToken ( SQLParser . S_REQUIRED_MARK , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_word ; } public enterRule ( listener ) { if ( listener . enterWord ) { listener . enterWord ( this ) ; } } public exitRule ( listener ) { if ( listener . exitWord ) { listener . exitWord ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitWord ) { return visitor . visitWord ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class ParamContext extends ParserRuleContext { public PARAM_MARK ( ) { return this . getToken ( SQLParser . PARAM_MARK , 0 ) ; } public paramId ( ) { return this . getRuleContext ( 0 , ParamIdContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_param ; } public enterRule ( listener ) { if ( listener . enterParam ) { listener . enterParam ( this ) ; } } public exitRule ( listener ) { if ( listener . exitParam ) { listener . exitParam ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitParam ) { return visitor . visitParam ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class ParamIdContext extends ParserRuleContext { public ID ( ) { return this . getToken ( SQLParser . ID , 0 ) ; } public S_REQUIRED_MARK ( ) { return this . tryGetToken ( SQLParser . S_REQUIRED_MARK , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_paramId ; } public enterRule ( listener ) { if ( listener . enterParamId ) { listener . enterParamId ( this ) ; } } public exitRule ( listener ) { if ( listener . exitParamId ) { listener . exitParamId ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitParamId ) { return visitor . visitParamId ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class NameTagContext extends ParserRuleContext { public NAME_TAG ( ) { return this . getToken ( SQLParser . NAME_TAG , 0 ) ; } public queryName ( ) { return this . getRuleContext ( 0 , QueryNameContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_nameTag ; } public enterRule ( listener ) { if ( listener . enterNameTag ) { listener . enterNameTag ( this ) ; } } public exitRule ( listener ) { if ( listener . exitNameTag ) { listener . exitNameTag ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitNameTag ) { return visitor . visitNameTag ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class ParamTagContext extends ParserRuleContext { public TYPE_TAG ( ) { return this . getToken ( SQLParser . TYPE_TAG , 0 ) ; } public paramName ( ) { return this . getRuleContext ( 0 , ParamNameContext ) ; } public paramTransform ( ) { return this . getRuleContext ( 0 , ParamTransformContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_paramTag ; } public enterRule ( listener ) { if ( listener . enterParamTag ) { listener . enterParamTag ( this ) ; } } public exitRule ( listener ) { if ( listener . exitParamTag ) { listener . exitParamTag ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitParamTag ) { return visitor . visitParamTag ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class ParamTransformContext extends ParserRuleContext { public TRANSFORM_ARROW ( ) { return this . getToken ( SQLParser . TRANSFORM_ARROW , 0 ) ; } public transformRule ( ) { return this . getRuleContext ( 0 , TransformRuleContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_paramTransform ; } public enterRule ( listener ) { if ( listener . enterParamTransform ) { listener . enterParamTransform ( this ) ; } } public exitRule ( listener ) { if ( listener . exitParamTransform ) { listener . exitParamTransform ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitParamTransform ) { return visitor . visitParamTransform ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class TransformRuleContext extends ParserRuleContext { public spreadTransform ( ) { return this . tryGetRuleContext ( 0 , SpreadTransformContext ) ; } public pickTransform ( ) { return this . tryGetRuleContext ( 0 , PickTransformContext ) ; } public spreadPickTransform ( ) { return this . tryGetRuleContext ( 0 , SpreadPickTransformContext ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_transformRule ; } public enterRule ( listener ) { if ( listener . enterTransformRule ) { listener . enterTransformRule ( this ) ; } } public exitRule ( listener ) { if ( listener . exitTransformRule ) { listener . exitTransformRule ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitTransformRule ) { return visitor . visitTransformRule ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class SpreadTransformContext extends ParserRuleContext { public OB ( ) { return this . getToken ( SQLParser . OB , 0 ) ; } public SPREAD ( ) { return this . getToken ( SQLParser . SPREAD , 0 ) ; } public CB ( ) { return this . getToken ( SQLParser . CB , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_spreadTransform ; } public enterRule ( listener ) { if ( listener . enterSpreadTransform ) { listener . enterSpreadTransform ( this ) ; } } public exitRule ( listener ) { if ( listener . exitSpreadTransform ) { listener . exitSpreadTransform ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitSpreadTransform ) { return visitor . visitSpreadTransform ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class PickTransformContext extends ParserRuleContext { public OB ( ) { return this . getToken ( SQLParser . OB , 0 ) ; } public key ( ) ; public key ( i ) ; public key ( i ? ) { if ( i === undefined ) { return this . getRuleContexts ( KeyContext ) ; } else { return this . getRuleContext ( i , KeyContext ) ; } } public CB ( ) { return this . getToken ( SQLParser . CB , 0 ) ; } public COMMA ( ) ; public COMMA ( i ) ; public COMMA ( i ? ) { if ( i === undefined ) { return this . getTokens ( SQLParser . COMMA ) ; } else { return this . getToken ( SQLParser . COMMA , i ) ; } } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_pickTransform ; } public enterRule ( listener ) { if ( listener . enterPickTransform ) { listener . enterPickTransform ( this ) ; } } public exitRule ( listener ) { if ( listener . exitPickTransform ) { listener . exitPickTransform ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitPickTransform ) { return visitor . visitPickTransform ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class SpreadPickTransformContext extends ParserRuleContext { public OB ( ) { return this . getToken ( SQLParser . OB , 0 ) ; } public pickTransform ( ) { return this . getRuleContext ( 0 , PickTransformContext ) ; } public SPREAD ( ) { return this . getToken ( SQLParser . SPREAD , 0 ) ; } public CB ( ) { return this . getToken ( SQLParser . CB , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_spreadPickTransform ; } public enterRule ( listener ) { if ( listener . enterSpreadPickTransform ) { listener . enterSpreadPickTransform ( this ) ; } } public exitRule ( listener ) { if ( listener . exitSpreadPickTransform ) { listener . exitSpreadPickTransform ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitSpreadPickTransform ) { return visitor . visitSpreadPickTransform ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class KeyContext extends ParserRuleContext { public ID ( ) { return this . getToken ( SQLParser . ID , 0 ) ; } public C_REQUIRED_MARK ( ) { return this . tryGetToken ( SQLParser . C_REQUIRED_MARK , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_key ; } public enterRule ( listener ) { if ( listener . enterKey ) { listener . enterKey ( this ) ; } } public exitRule ( listener ) { if ( listener . exitKey ) { listener . exitKey ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitKey ) { return visitor . visitKey ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class QueryNameContext extends ParserRuleContext { public ID ( ) { return this . getToken ( SQLParser . ID , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_queryName ; } public enterRule ( listener ) { if ( listener . enterQueryName ) { listener . enterQueryName ( this ) ; } } public exitRule ( listener ) { if ( listener . exitQueryName ) { listener . exitQueryName ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitQueryName ) { return visitor . visitQueryName ( this ) ; } else { return visitor . visitChildren ( this ) ; } } } export class ParamNameContext extends ParserRuleContext { public ID ( ) { return this . getToken ( SQLParser . ID , 0 ) ; } constructor ( parent , invokingState ) { super ( parent , invokingState ) ; } public get ruleIndex ( ) : number { return SQLParser . RULE_paramName ; } public enterRule ( listener ) { if ( listener . enterParamName ) { listener . enterParamName ( this ) ; } } public exitRule ( listener ) { if ( listener . exitParamName ) { listener . exitParamName ( this ) ; } } public accept < Result > ( visitor ) { if ( visitor . visitParamName ) { return visitor . visitParamName ( this ) ; } else { return visitor . visitChildren ( this ) ; } } }