UNPKG

dt-sql-parser

Version:

SQL Parsers for BigData, built with antlr4

1,364 lines (1,363 loc) 3.64 MB
// Generated from dt-sql-parser/src/grammar/postgresql/PostgreSqlParser.g4 by ANTLR 4.13.1 // @ts-nocheck import * as antlr from "antlr4ng"; import { SQLParserBase } from '../SQLParserBase'; export class PostgreSqlParser extends SQLParserBase { get grammarFileName() { return "PostgreSqlParser.g4"; } get literalNames() { return PostgreSqlParser.literalNames; } get symbolicNames() { return PostgreSqlParser.symbolicNames; } get ruleNames() { return PostgreSqlParser.ruleNames; } get serializedATN() { return PostgreSqlParser._serializedATN; } createFailedPredicateException(predicate, message) { return new antlr.FailedPredicateException(this, predicate, message); } constructor(input) { super(input); this.interpreter = new antlr.ParserATNSimulator(this, PostgreSqlParser._ATN, PostgreSqlParser.decisionsToDFA, new antlr.PredictionContextCache()); } program() { let localContext = new ProgramContext(this.context, this.state); this.enterRule(localContext, 0, PostgreSqlParser.RULE_program); let _la; try { this.enterOuterAlt(localContext, 1); { this.state = 935; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 2 || _la === 31 || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 570441729) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 142606337) !== 0) || _la === 105 || _la === 129 || ((((_la - 138)) & ~0x1F) === 0 && ((1 << (_la - 138)) & 2159673601) !== 0) || ((((_la - 177)) & ~0x1F) === 0 && ((1 << (_la - 177)) & 100680739) !== 0) || ((((_la - 241)) & ~0x1F) === 0 && ((1 << (_la - 241)) & 1090557953) !== 0) || ((((_la - 290)) & ~0x1F) === 0 && ((1 << (_la - 290)) & 679839745) !== 0) || ((((_la - 322)) & ~0x1F) === 0 && ((1 << (_la - 322)) & 272417) !== 0) || ((((_la - 358)) & ~0x1F) === 0 && ((1 << (_la - 358)) & 6401) !== 0) || ((((_la - 422)) & ~0x1F) === 0 && ((1 << (_la - 422)) & 4196353) !== 0) || _la === 454 || _la === 525 || _la === 581) { { { this.state = 932; this.singleStmt(); } } this.state = 937; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } this.state = 938; this.match(PostgreSqlParser.EOF); } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } singleStmt() { let localContext = new SingleStmtContext(this.context, this.state); this.enterRule(localContext, 2, PostgreSqlParser.RULE_singleStmt); let _la; try { this.enterOuterAlt(localContext, 1); { this.state = 940; this.stmt(); this.state = 942; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 7) { { this.state = 941; this.match(PostgreSqlParser.SEMI); } } } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } stmt() { let localContext = new StmtContext(this.context, this.state); this.enterRule(localContext, 4, PostgreSqlParser.RULE_stmt); let _la; try { this.state = 1064; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 3, this.context)) { case 1: this.enterOuterAlt(localContext, 1); { this.state = 944; this.altereventtrigstmt(); } break; case 2: this.enterOuterAlt(localContext, 2); { this.state = 945; this.altercollationstmt(); } break; case 3: this.enterOuterAlt(localContext, 3); { this.state = 946; this.alterdatabasestmt(); } break; case 4: this.enterOuterAlt(localContext, 4); { this.state = 947; this.alterdatabasesetstmt(); } break; case 5: this.enterOuterAlt(localContext, 5); { this.state = 948; this.alterdefaultprivilegesstmt(); } break; case 6: this.enterOuterAlt(localContext, 6); { this.state = 949; this.alterdomainstmt(); } break; case 7: this.enterOuterAlt(localContext, 7); { this.state = 950; this.alterenumstmt(); } break; case 8: this.enterOuterAlt(localContext, 8); { this.state = 951; this.alterextensionstmt(); } break; case 9: this.enterOuterAlt(localContext, 9); { this.state = 952; this.alterextensioncontentsstmt(); } break; case 10: this.enterOuterAlt(localContext, 10); { this.state = 953; this.alterfdwstmt(); } break; case 11: this.enterOuterAlt(localContext, 11); { this.state = 954; this.alterforeignserverstmt(); } break; case 12: this.enterOuterAlt(localContext, 12); { this.state = 955; this.alterfunctionstmt(); } break; case 13: this.enterOuterAlt(localContext, 13); { this.state = 956; this.altergroupstmt(); } break; case 14: this.enterOuterAlt(localContext, 14); { this.state = 957; this.alterobjectdependsstmt(); } break; case 15: this.enterOuterAlt(localContext, 15); { this.state = 958; this.alterobjectschemastmt(); } break; case 16: this.enterOuterAlt(localContext, 16); { this.state = 959; this.alterownerstmt(); } break; case 17: this.enterOuterAlt(localContext, 17); { this.state = 960; this.alteroperatorstmt(); } break; case 18: this.enterOuterAlt(localContext, 18); { this.state = 961; this.altertypestmt(); } break; case 19: this.enterOuterAlt(localContext, 19); { this.state = 962; this.alterpolicystmt(); } break; case 20: this.enterOuterAlt(localContext, 20); { this.state = 963; this.alterprocedurestmt(); } break; case 21: this.enterOuterAlt(localContext, 21); { this.state = 964; this.alterseqstmt(); } break; case 22: this.enterOuterAlt(localContext, 22); { this.state = 965; this.altersystemstmt(); } break; case 23: this.enterOuterAlt(localContext, 23); { this.state = 966; this.altertablestmt(); } break; case 24: this.enterOuterAlt(localContext, 24); { this.state = 967; this.altertblspcstmt(); } break; case 25: this.enterOuterAlt(localContext, 25); { this.state = 968; this.altercompositetypestmt(); } break; case 26: this.enterOuterAlt(localContext, 26); { this.state = 969; this.alterpublicationstmt(); } break; case 27: this.enterOuterAlt(localContext, 27); { this.state = 970; this.alterrolesetstmt(); } break; case 28: this.enterOuterAlt(localContext, 28); { this.state = 971; this.alterroutinestmt(); } break; case 29: this.enterOuterAlt(localContext, 29); { this.state = 972; this.alterrolestmt(); } break; case 30: this.enterOuterAlt(localContext, 30); { this.state = 973; this.altersubscriptionstmt(); } break; case 31: this.enterOuterAlt(localContext, 31); { this.state = 974; this.alterstatsstmt(); } break; case 32: this.enterOuterAlt(localContext, 32); { this.state = 975; this.altertsconfigurationstmt(); } break; case 33: this.enterOuterAlt(localContext, 33); { this.state = 976; this.altertsdictionarystmt(); } break; case 34: this.enterOuterAlt(localContext, 34); { this.state = 977; this.alterusermappingstmt(); } break; case 35: this.enterOuterAlt(localContext, 35); { this.state = 978; this.analyzestmt(); } break; case 36: this.enterOuterAlt(localContext, 36); { this.state = 979; this.callstmt(); } break; case 37: this.enterOuterAlt(localContext, 37); { this.state = 980; this.checkpointstmt(); } break; case 38: this.enterOuterAlt(localContext, 38); { this.state = 981; this.closeportalstmt(); } break; case 39: this.enterOuterAlt(localContext, 39); { this.state = 982; this.clusterstmt(); } break; case 40: this.enterOuterAlt(localContext, 40); { this.state = 983; this.commentstmt(); } break; case 41: this.enterOuterAlt(localContext, 41); { this.state = 984; this.constraintssetstmt(); } break; case 42: this.enterOuterAlt(localContext, 42); { this.state = 985; this.copystmt(); } break; case 43: this.enterOuterAlt(localContext, 43); { this.state = 986; this.createamstmt(); } break; case 44: this.enterOuterAlt(localContext, 44); { this.state = 987; this.createasstmt(); } break; case 45: this.enterOuterAlt(localContext, 45); { this.state = 988; this.createassertionstmt(); } break; case 46: this.enterOuterAlt(localContext, 46); { this.state = 989; this.createcaststmt(); } break; case 47: this.enterOuterAlt(localContext, 47); { this.state = 990; this.createconversionstmt(); } break; case 48: this.enterOuterAlt(localContext, 48); { this.state = 991; this.createdomainstmt(); } break; case 49: this.enterOuterAlt(localContext, 49); { this.state = 992; this.createextensionstmt(); } break; case 50: this.enterOuterAlt(localContext, 50); { this.state = 993; this.createfdwstmt(); } break; case 51: this.enterOuterAlt(localContext, 51); { this.state = 994; this.createforeignserverstmt(); } break; case 52: this.enterOuterAlt(localContext, 52); { this.state = 995; this.createforeigntablestmt(); } break; case 53: this.enterOuterAlt(localContext, 53); { this.state = 996; this.createfunctionstmt(); } break; case 54: this.enterOuterAlt(localContext, 54); { this.state = 997; this.creategroupstmt(); } break; case 55: this.enterOuterAlt(localContext, 55); { this.state = 998; this.creatematviewstmt(); } break; case 56: this.enterOuterAlt(localContext, 56); { this.state = 999; this.createopclassstmt(); } break; case 57: this.enterOuterAlt(localContext, 57); { this.state = 1000; this.createopfamilystmt(); } break; case 58: this.enterOuterAlt(localContext, 58); { this.state = 1001; this.createpublicationstmt(); } break; case 59: this.enterOuterAlt(localContext, 59); { this.state = 1002; this.alteropfamilystmt(); } break; case 60: this.enterOuterAlt(localContext, 60); { this.state = 1003; this.createpolicystmt(); } break; case 61: this.enterOuterAlt(localContext, 61); { this.state = 1004; this.createplangstmt(); } break; case 62: this.enterOuterAlt(localContext, 62); { this.state = 1005; this.createschemastmt(); } break; case 63: this.enterOuterAlt(localContext, 63); { this.state = 1006; this.createseqstmt(); } break; case 64: this.enterOuterAlt(localContext, 64); { this.state = 1007; this.createstmt(); } break; case 65: this.enterOuterAlt(localContext, 65); { this.state = 1008; this.createsubscriptionstmt(); } break; case 66: this.enterOuterAlt(localContext, 66); { this.state = 1009; this.createstatsstmt(); } break; case 67: this.enterOuterAlt(localContext, 67); { this.state = 1010; this.createtablespacestmt(); } break; case 68: this.enterOuterAlt(localContext, 68); { this.state = 1011; this.createtransformstmt(); } break; case 69: this.enterOuterAlt(localContext, 69); { this.state = 1012; this.createtrigstmt(); } break; case 70: this.enterOuterAlt(localContext, 70); { this.state = 1013; this.createeventtrigstmt(); } break; case 71: this.enterOuterAlt(localContext, 71); { this.state = 1014; this.createrolestmt(); } break; case 72: this.enterOuterAlt(localContext, 72); { this.state = 1015; this.createuserstmt(); } break; case 73: this.enterOuterAlt(localContext, 73); { this.state = 1016; this.createusermappingstmt(); } break; case 74: this.enterOuterAlt(localContext, 74); { this.state = 1017; this.createdbstmt(); } break; case 75: this.enterOuterAlt(localContext, 75); { this.state = 1018; this.deallocatestmt(); } break; case 76: this.enterOuterAlt(localContext, 76); { this.state = 1019; this.declarecursorstmt(); } break; case 77: this.enterOuterAlt(localContext, 77); { this.state = 1020; this.definestmt(); } break; case 78: this.enterOuterAlt(localContext, 78); { this.state = 1021; this.deletestmt(); } break; case 79: this.enterOuterAlt(localContext, 79); { this.state = 1022; this.discardstmt(); } break; case 80: this.enterOuterAlt(localContext, 80); { this.state = 1023; this.dostmt(); } break; case 81: this.enterOuterAlt(localContext, 81); { this.state = 1024; this.dropstmt(); } break; case 82: this.enterOuterAlt(localContext, 82); { this.state = 1025; this.executestmt(); } break; case 83: this.enterOuterAlt(localContext, 83); { this.state = 1026; this.explainstmt(); } break; case 84: this.enterOuterAlt(localContext, 84); { this.state = 1027; this.fetchstmt(); } break; case 85: this.enterOuterAlt(localContext, 85); { this.state = 1028; this.grantstmt(); } break; case 86: this.enterOuterAlt(localContext, 86); { this.state = 1029; this.grantrolestmt(); } break; case 87: this.enterOuterAlt(localContext, 87); { this.state = 1030; this.mergestmt(); } break; case 88: this.enterOuterAlt(localContext, 88); { this.state = 1031; this.importforeignschemastmt(); } break; case 89: this.enterOuterAlt(localContext, 89); { this.state = 1032; this.indexstmt(); } break; case 90: this.enterOuterAlt(localContext, 90); { this.state = 1033; this.insertstmt(); } break; case 91: this.enterOuterAlt(localContext, 91); { this.state = 1034; this.listenstmt(); } break; case 92: this.enterOuterAlt(localContext, 92); { this.state = 1035; this.refreshmatviewstmt(); } break; case 93: this.enterOuterAlt(localContext, 93); { this.state = 1036; this.loadstmt(); } break; case 94: this.enterOuterAlt(localContext, 94); { this.state = 1037; this.lockstmt(); } break; case 95: this.enterOuterAlt(localContext, 95); { this.state = 1038; this.notifystmt(); } break; case 96: this.enterOuterAlt(localContext, 96); { this.state = 1039; this.preparestmt(); } break; case 97: this.enterOuterAlt(localContext, 97); { this.state = 1040; this.reassignownedstmt(); } break; case 98: this.enterOuterAlt(localContext, 98); { this.state = 1041; this.reindexstmt(); } break; case 99: this.enterOuterAlt(localContext, 99); { this.state = 1042; this.removeaggrstmt(); } break; case 100: this.enterOuterAlt(localContext, 100); { this.state = 1043; this.removefuncstmt(); } break; case 101: this.enterOuterAlt(localContext, 101); { this.state = 1044; this.removeoperstmt(); } break; case 102: this.enterOuterAlt(localContext, 102); { this.state = 1045; this.renamestmt(); } break; case 103: this.enterOuterAlt(localContext, 103); { this.state = 1046; this.revokestmt(); } break; case 104: this.enterOuterAlt(localContext, 104); { this.state = 1047; this.revokerolestmt(); } break; case 105: this.enterOuterAlt(localContext, 105); { this.state = 1048; this.rulestmt(); } break; case 106: this.enterOuterAlt(localContext, 106); { this.state = 1049; this.seclabelstmt(); } break; case 107: this.enterOuterAlt(localContext, 107); { this.state = 1050; this.selectstmt(); } break; case 108: this.enterOuterAlt(localContext, 108); { this.state = 1051; this.transactionstmt(); } break; case 109: this.enterOuterAlt(localContext, 109); { this.state = 1052; this.truncatestmt(); } break; case 110: this.enterOuterAlt(localContext, 110); { this.state = 1053; this.unlistenstmt(); } break; case 111: this.enterOuterAlt(localContext, 111); { this.state = 1054; this.updatestmt(); } break; case 112: this.enterOuterAlt(localContext, 112); { this.state = 1055; this.vacuumstmt(); } break; case 113: this.enterOuterAlt(localContext, 113); { this.state = 1056; this.variableresetstmt(); } break; case 114: this.enterOuterAlt(localContext, 114); { this.state = 1057; this.variablesetstmt(); } break; case 115: this.enterOuterAlt(localContext, 115); { this.state = 1058; this.variableshowstmt(); } break; case 116: this.enterOuterAlt(localContext, 116); { this.state = 1059; this.viewstmt(); } break; case 117: this.enterOuterAlt(localContext, 117); { this.state = 1060; this.match(PostgreSqlParser.MetaCommand); this.state = 1062; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 582) { { this.state = 1061; this.match(PostgreSqlParser.EndMetaCommand); } } } break; } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } callstmt() { let localContext = new CallstmtContext(this.context, this.state); this.enterRule(localContext, 6, PostgreSqlParser.RULE_callstmt); try { this.enterOuterAlt(localContext, 1); { this.state = 1066; this.match(PostgreSqlParser.KW_CALL); this.state = 1067; this.func_application(); } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } createrolestmt() { let localContext = new CreaterolestmtContext(this.context, this.state); this.enterRule(localContext, 8, PostgreSqlParser.RULE_createrolestmt); try { let alternative; this.enterOuterAlt(localContext, 1); { this.state = 1069; this.match(PostgreSqlParser.KW_CREATE); this.state = 1070; this.match(PostgreSqlParser.KW_ROLE); this.state = 1071; this.rolespec(); this.state = 1073; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 4, this.context)) { case 1: { this.state = 1072; this.match(PostgreSqlParser.KW_WITH); } break; } this.state = 1078; this.errorHandler.sync(this); alternative = this.interpreter.adaptivePredict(this.tokenStream, 5, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { if (alternative === 1) { { { this.state = 1075; this.createoptroleelem(); } } } this.state = 1080; this.errorHandler.sync(this); alternative = this.interpreter.adaptivePredict(this.tokenStream, 5, this.context); } } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } alteroptroleelem() { let localContext = new AlteroptroleelemContext(this.context, this.state); this.enterRule(localContext, 10, PostgreSqlParser.RULE_alteroptroleelem); let _la; try { this.state = 1119; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 7, this.context)) { case 1: this.enterOuterAlt(localContext, 1); { this.state = 1081; this.match(PostgreSqlParser.KW_PASSWORD); this.state = 1084; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case PostgreSqlParser.StringConstant: case PostgreSqlParser.UnicodeEscapeStringConstant: case PostgreSqlParser.BeginDollarStringConstant: case PostgreSqlParser.EscapeStringConstant: { this.state = 1082; this.sconst(); } break; case PostgreSqlParser.KW_NULL: { this.state = 1083; this.match(PostgreSqlParser.KW_NULL); } break; default: throw new antlr.NoViableAltException(this); } } break; case 2: this.enterOuterAlt(localContext, 2); { this.state = 1086; _la = this.tokenStream.LA(1); if (!(_la === 195 || _la === 364)) { this.errorHandler.recoverInline(this); } else { this.errorHandler.reportMatch(this); this.consume(); } this.state = 1087; this.match(PostgreSqlParser.KW_PASSWORD); this.state = 1088; this.sconst(); } break; case 3: this.enterOuterAlt(localContext, 3); { this.state = 1089; this.match(PostgreSqlParser.KW_INHERIT); } break; case 4: this.enterOuterAlt(localContext, 4); { this.state = 1090; this.match(PostgreSqlParser.KW_NOINHERIT); } break; case 5: this.enterOuterAlt(localContext, 5); { this.state = 1091; this.match(PostgreSqlParser.KW_CREATEUSER); } break; case 6: this.enterOuterAlt(localContext, 6); { this.state = 1092; this.match(PostgreSqlParser.KW_NOCREATEUSER); } break; case 7: this.enterOuterAlt(localContext, 7); { this.state = 1093; this.match(PostgreSqlParser.KW_CREATEROLE); } break; case 8: this.enterOuterAlt(localContext, 8); { this.state = 1094; this.match(PostgreSqlParser.KW_NOCREATEROLE); } break; case 9: this.enterOuterAlt(localContext, 9); { this.state = 1095; this.match(PostgreSqlParser.KW_CREATEDB); } break; case 10: this.enterOuterAlt(localContext, 10); { this.state = 1096; this.match(PostgreSqlParser.KW_NOCREATEDB); } break; case 11: this.enterOuterAlt(localContext, 11); { this.state = 1097; this.match(PostgreSqlParser.KW_SUPERUSER); } break; case 12: this.enterOuterAlt(localContext, 12); { this.state = 1098; this.match(PostgreSqlParser.KW_NOSUPERUSER); } break; case 13: this.enterOuterAlt(localContext, 13); { this.state = 1099; this.match(PostgreSqlParser.KW_LOGIN); } break; case 14: this.enterOuterAlt(localContext, 14); { this.state = 1100; this.match(PostgreSqlParser.KW_NOLOGIN); } break; case 15: this.enterOuterAlt(localContext, 15); { this.state = 1101; this.match(PostgreSqlParser.KW_REPLICATION); } break; case 16: this.enterOuterAlt(localContext, 16); { this.state = 1102; this.match(PostgreSqlParser.KW_NOREPLICATION); } break; case 17: this.enterOuterAlt(localContext, 17); { this.state = 1103; this.match(PostgreSqlParser.KW_BYPASSRLS); } break; case 18: this.enterOuterAlt(localContext, 18); { this.state = 1104; this.match(PostgreSqlParser.KW_NOBYPASSRLS); } break; case 19: this.enterOuterAlt(localContext, 19); { this.state = 1105; this.match(PostgreSqlParser.KW_CONNECTION); this.state = 1106; this.match(PostgreSqlParser.KW_LIMIT); this.state = 1107; this.signediconst(); } break; case 20: this.enterOuterAlt(localContext, 20); { this.state = 1108; this.match(PostgreSqlParser.KW_VALID); this.state = 1109; this.match(PostgreSqlParser.KW_UNTIL); this.state = 1110; this.sconst(); } break; case 21: this.enterOuterAlt(localContext, 21); { this.state = 1111; this.match(PostgreSqlParser.KW_IN); this.state = 1112; _la = this.tokenStream.LA(1); if (!(_la === 66 || _la === 318)) { this.errorHandler.recoverInline(this); } else { this.errorHandler.reportMatch(this); this.consume(); } this.state = 1113; this.name_list(); } break; case 22: this.enterOuterAlt(localContext, 22); { this.state = 1114; _la = this.tokenStream.LA(1); if (!(_la === 99 || _la === 318)) { this.errorHandler.recoverInline(this); } else { this.errorHandler.reportMatch(this); this.consume(); } this.state = 1115; this.role_list(); } break; case 23: this.enterOuterAlt(localContext, 23); { this.state = 1116; this.match(PostgreSqlParser.KW_ADMIN); this.state = 1117; this.name_list(); } break; case 24: this.enterOuterAlt(localContext, 24); { this.state = 1118; this.identifier(); } break; } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } createoptroleelem() { let localContext = new CreateoptroleelemContext(this.context, this.state); this.enterRule(localContext, 12, PostgreSqlParser.RULE_createoptroleelem); let _la; try { this.state = 1129; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 8, this.context)) { case 1: this.enterOuterAlt(localContext, 1); { this.state = 1121; this.alteroptroleelem(); } break; case 2: this.enterOuterAlt(localContext, 2); { this.state = 1122; this.match(PostgreSqlParser.KW_SYSID); this.state = 1123; this.match(PostgreSqlParser.Integral); } break; case 3: this.enterOuterAlt(localContext, 3); { this.state = 1124; _la = this.tokenStream.LA(1); if (!(_la === 134 || _la === 318)) { this.errorHandler.recoverInline(this); } else { this.errorHandler.reportMatch(this); this.consume(); } this.state = 1125; this.role_list(); } break; case 4: this.enterOuterAlt(localContext, 4); { this.state = 1126; this.match(PostgreSqlParser.KW_IN); this.state = 1127; _la = this.tokenStream.LA(1); if (!(_la === 66 || _la === 318)) { this.errorHandler.recoverInline(this); } else { this.errorHandler.reportMatch(this); this.consume(); } this.state = 1128; this.role_list(); } break; } } catch (re) { if (re instanceof antlr.RecognitionException) { localContext.exception = re; this.errorHandler.reportError(this, re); this.errorHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localContext; } createuserstmt() { let localContext = new CreateuserstmtContext(this.context, this.state); this.enterRule(localContext, 14, PostgreSqlParser.RULE_createuserstmt); try { let alternative;