dt-sql-parser
Version:
SQL Parsers for BigData, built with antlr4
1,361 lines • 3.63 MB
JavaScript
// 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 = 933;
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 === 583) {
{
{
this.state = 930;
this.singleStmt();
}
}
this.state = 935;
this.errorHandler.sync(this);
_la = this.tokenStream.LA(1);
}
this.state = 936;
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 = 938;
this.stmt();
this.state = 940;
this.errorHandler.sync(this);
_la = this.tokenStream.LA(1);
if (_la === 7) {
{
this.state = 939;
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 = 1062;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 3, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 942;
this.alterEventTrigStmt();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 943;
this.alterCollationStmt();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 944;
this.alterDatabaseStmt();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 945;
this.alterDatabaseSetStmt();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 946;
this.alterDefaultPrivilegesStmt();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 947;
this.alterDomainStmt();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 948;
this.alterEnumStmt();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 949;
this.alterExtensionStmt();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 950;
this.alterExtensionContentsStmt();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 951;
this.alterFdwStmt();
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 952;
this.alterForeignServerStmt();
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 953;
this.alterFunctionStmt();
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 954;
this.alterGroupStmt();
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 955;
this.alterObjectDependsStmt();
}
break;
case 15:
this.enterOuterAlt(localContext, 15);
{
this.state = 956;
this.alterObjectSchemaStmt();
}
break;
case 16:
this.enterOuterAlt(localContext, 16);
{
this.state = 957;
this.alterOwnerStmt();
}
break;
case 17:
this.enterOuterAlt(localContext, 17);
{
this.state = 958;
this.alterOperatorStmt();
}
break;
case 18:
this.enterOuterAlt(localContext, 18);
{
this.state = 959;
this.alterTypeStmt();
}
break;
case 19:
this.enterOuterAlt(localContext, 19);
{
this.state = 960;
this.alterPolicyStmt();
}
break;
case 20:
this.enterOuterAlt(localContext, 20);
{
this.state = 961;
this.alterProcedureStmt();
}
break;
case 21:
this.enterOuterAlt(localContext, 21);
{
this.state = 962;
this.alterSeqStmt();
}
break;
case 22:
this.enterOuterAlt(localContext, 22);
{
this.state = 963;
this.alterSystemStmt();
}
break;
case 23:
this.enterOuterAlt(localContext, 23);
{
this.state = 964;
this.alterTableStmt();
}
break;
case 24:
this.enterOuterAlt(localContext, 24);
{
this.state = 965;
this.alterTblSpcStmt();
}
break;
case 25:
this.enterOuterAlt(localContext, 25);
{
this.state = 966;
this.alterCompositeTypeStmt();
}
break;
case 26:
this.enterOuterAlt(localContext, 26);
{
this.state = 967;
this.alterPublicationStmt();
}
break;
case 27:
this.enterOuterAlt(localContext, 27);
{
this.state = 968;
this.alterRoleSetStmt();
}
break;
case 28:
this.enterOuterAlt(localContext, 28);
{
this.state = 969;
this.alterRoutineStmt();
}
break;
case 29:
this.enterOuterAlt(localContext, 29);
{
this.state = 970;
this.alterRoleStmt();
}
break;
case 30:
this.enterOuterAlt(localContext, 30);
{
this.state = 971;
this.alterSubscriptionStmt();
}
break;
case 31:
this.enterOuterAlt(localContext, 31);
{
this.state = 972;
this.alterStatsStmt();
}
break;
case 32:
this.enterOuterAlt(localContext, 32);
{
this.state = 973;
this.alterSearchConfigurationStmt();
}
break;
case 33:
this.enterOuterAlt(localContext, 33);
{
this.state = 974;
this.alterSearchDictionaryStmt();
}
break;
case 34:
this.enterOuterAlt(localContext, 34);
{
this.state = 975;
this.alterUserMappingStmt();
}
break;
case 35:
this.enterOuterAlt(localContext, 35);
{
this.state = 976;
this.analyzeStmt();
}
break;
case 36:
this.enterOuterAlt(localContext, 36);
{
this.state = 977;
this.callStmt();
}
break;
case 37:
this.enterOuterAlt(localContext, 37);
{
this.state = 978;
this.checkPointStmt();
}
break;
case 38:
this.enterOuterAlt(localContext, 38);
{
this.state = 979;
this.closePortalStmt();
}
break;
case 39:
this.enterOuterAlt(localContext, 39);
{
this.state = 980;
this.clusterStmt();
}
break;
case 40:
this.enterOuterAlt(localContext, 40);
{
this.state = 981;
this.commentStmt();
}
break;
case 41:
this.enterOuterAlt(localContext, 41);
{
this.state = 982;
this.constraintsSetStmt();
}
break;
case 42:
this.enterOuterAlt(localContext, 42);
{
this.state = 983;
this.copyStmt();
}
break;
case 43:
this.enterOuterAlt(localContext, 43);
{
this.state = 984;
this.createAccessMethodStmt();
}
break;
case 44:
this.enterOuterAlt(localContext, 44);
{
this.state = 985;
this.createAsStmt();
}
break;
case 45:
this.enterOuterAlt(localContext, 45);
{
this.state = 986;
this.createAssertionStmt();
}
break;
case 46:
this.enterOuterAlt(localContext, 46);
{
this.state = 987;
this.createCastStmt();
}
break;
case 47:
this.enterOuterAlt(localContext, 47);
{
this.state = 988;
this.createConversionStmt();
}
break;
case 48:
this.enterOuterAlt(localContext, 48);
{
this.state = 989;
this.createDomainStmt();
}
break;
case 49:
this.enterOuterAlt(localContext, 49);
{
this.state = 990;
this.createExtensionStmt();
}
break;
case 50:
this.enterOuterAlt(localContext, 50);
{
this.state = 991;
this.createFdwStmt();
}
break;
case 51:
this.enterOuterAlt(localContext, 51);
{
this.state = 992;
this.createForeignServerStmt();
}
break;
case 52:
this.enterOuterAlt(localContext, 52);
{
this.state = 993;
this.createForeignTableStmt();
}
break;
case 53:
this.enterOuterAlt(localContext, 53);
{
this.state = 994;
this.createFunctionStmt();
}
break;
case 54:
this.enterOuterAlt(localContext, 54);
{
this.state = 995;
this.createGroupStmt();
}
break;
case 55:
this.enterOuterAlt(localContext, 55);
{
this.state = 996;
this.createMaterializedViewStmt();
}
break;
case 56:
this.enterOuterAlt(localContext, 56);
{
this.state = 997;
this.createOperatorClassStmt();
}
break;
case 57:
this.enterOuterAlt(localContext, 57);
{
this.state = 998;
this.createOperatorFamilyStmt();
}
break;
case 58:
this.enterOuterAlt(localContext, 58);
{
this.state = 999;
this.createPublicationStmt();
}
break;
case 59:
this.enterOuterAlt(localContext, 59);
{
this.state = 1000;
this.alterOperatorFamilyStmt();
}
break;
case 60:
this.enterOuterAlt(localContext, 60);
{
this.state = 1001;
this.createPolicyStmt();
}
break;
case 61:
this.enterOuterAlt(localContext, 61);
{
this.state = 1002;
this.createProceduralLangStmt();
}
break;
case 62:
this.enterOuterAlt(localContext, 62);
{
this.state = 1003;
this.createSchemaStmt();
}
break;
case 63:
this.enterOuterAlt(localContext, 63);
{
this.state = 1004;
this.createSeqStmt();
}
break;
case 64:
this.enterOuterAlt(localContext, 64);
{
this.state = 1005;
this.createStmt();
}
break;
case 65:
this.enterOuterAlt(localContext, 65);
{
this.state = 1006;
this.createSubscriptionStmt();
}
break;
case 66:
this.enterOuterAlt(localContext, 66);
{
this.state = 1007;
this.createStatsStmt();
}
break;
case 67:
this.enterOuterAlt(localContext, 67);
{
this.state = 1008;
this.createTableSpaceStmt();
}
break;
case 68:
this.enterOuterAlt(localContext, 68);
{
this.state = 1009;
this.createTransformStmt();
}
break;
case 69:
this.enterOuterAlt(localContext, 69);
{
this.state = 1010;
this.createTrigStmt();
}
break;
case 70:
this.enterOuterAlt(localContext, 70);
{
this.state = 1011;
this.createEventTrigStmt();
}
break;
case 71:
this.enterOuterAlt(localContext, 71);
{
this.state = 1012;
this.createRoleStmt();
}
break;
case 72:
this.enterOuterAlt(localContext, 72);
{
this.state = 1013;
this.createUserStmt();
}
break;
case 73:
this.enterOuterAlt(localContext, 73);
{
this.state = 1014;
this.createUserMappingStmt();
}
break;
case 74:
this.enterOuterAlt(localContext, 74);
{
this.state = 1015;
this.createDbStmt();
}
break;
case 75:
this.enterOuterAlt(localContext, 75);
{
this.state = 1016;
this.dealLocateStmt();
}
break;
case 76:
this.enterOuterAlt(localContext, 76);
{
this.state = 1017;
this.declareCursorStmt();
}
break;
case 77:
this.enterOuterAlt(localContext, 77);
{
this.state = 1018;
this.defineStmt();
}
break;
case 78:
this.enterOuterAlt(localContext, 78);
{
this.state = 1019;
this.deleteStmt();
}
break;
case 79:
this.enterOuterAlt(localContext, 79);
{
this.state = 1020;
this.discardStmt();
}
break;
case 80:
this.enterOuterAlt(localContext, 80);
{
this.state = 1021;
this.doStmt();
}
break;
case 81:
this.enterOuterAlt(localContext, 81);
{
this.state = 1022;
this.dropStmt();
}
break;
case 82:
this.enterOuterAlt(localContext, 82);
{
this.state = 1023;
this.executeStmt();
}
break;
case 83:
this.enterOuterAlt(localContext, 83);
{
this.state = 1024;
this.explainStmt();
}
break;
case 84:
this.enterOuterAlt(localContext, 84);
{
this.state = 1025;
this.fetchStmt();
}
break;
case 85:
this.enterOuterAlt(localContext, 85);
{
this.state = 1026;
this.grantStmt();
}
break;
case 86:
this.enterOuterAlt(localContext, 86);
{
this.state = 1027;
this.grantRoleStmt();
}
break;
case 87:
this.enterOuterAlt(localContext, 87);
{
this.state = 1028;
this.mergeStmt();
}
break;
case 88:
this.enterOuterAlt(localContext, 88);
{
this.state = 1029;
this.importForeignSchemaStmt();
}
break;
case 89:
this.enterOuterAlt(localContext, 89);
{
this.state = 1030;
this.indexStmt();
}
break;
case 90:
this.enterOuterAlt(localContext, 90);
{
this.state = 1031;
this.insertStmt();
}
break;
case 91:
this.enterOuterAlt(localContext, 91);
{
this.state = 1032;
this.listenStmt();
}
break;
case 92:
this.enterOuterAlt(localContext, 92);
{
this.state = 1033;
this.refreshMaterializedViewStmt();
}
break;
case 93:
this.enterOuterAlt(localContext, 93);
{
this.state = 1034;
this.loadStmt();
}
break;
case 94:
this.enterOuterAlt(localContext, 94);
{
this.state = 1035;
this.lockStmt();
}
break;
case 95:
this.enterOuterAlt(localContext, 95);
{
this.state = 1036;
this.notifyStmt();
}
break;
case 96:
this.enterOuterAlt(localContext, 96);
{
this.state = 1037;
this.prepareStmt();
}
break;
case 97:
this.enterOuterAlt(localContext, 97);
{
this.state = 1038;
this.reassignOwnedStmt();
}
break;
case 98:
this.enterOuterAlt(localContext, 98);
{
this.state = 1039;
this.reindexStmt();
}
break;
case 99:
this.enterOuterAlt(localContext, 99);
{
this.state = 1040;
this.removeAggregateStmt();
}
break;
case 100:
this.enterOuterAlt(localContext, 100);
{
this.state = 1041;
this.removeFuncStmt();
}
break;
case 101:
this.enterOuterAlt(localContext, 101);
{
this.state = 1042;
this.removeOperatorStmt();
}
break;
case 102:
this.enterOuterAlt(localContext, 102);
{
this.state = 1043;
this.renameStmt();
}
break;
case 103:
this.enterOuterAlt(localContext, 103);
{
this.state = 1044;
this.revokeStmt();
}
break;
case 104:
this.enterOuterAlt(localContext, 104);
{
this.state = 1045;
this.revokeRoleStmt();
}
break;
case 105:
this.enterOuterAlt(localContext, 105);
{
this.state = 1046;
this.ruleStmt();
}
break;
case 106:
this.enterOuterAlt(localContext, 106);
{
this.state = 1047;
this.secLabelStmt();
}
break;
case 107:
this.enterOuterAlt(localContext, 107);
{
this.state = 1048;
this.selectStmt();
}
break;
case 108:
this.enterOuterAlt(localContext, 108);
{
this.state = 1049;
this.transactionStmt();
}
break;
case 109:
this.enterOuterAlt(localContext, 109);
{
this.state = 1050;
this.truncateStmt();
}
break;
case 110:
this.enterOuterAlt(localContext, 110);
{
this.state = 1051;
this.unListenStmt();
}
break;
case 111:
this.enterOuterAlt(localContext, 111);
{
this.state = 1052;
this.updateStmt();
}
break;
case 112:
this.enterOuterAlt(localContext, 112);
{
this.state = 1053;
this.vacuumStmt();
}
break;
case 113:
this.enterOuterAlt(localContext, 113);
{
this.state = 1054;
this.variableResetStmt();
}
break;
case 114:
this.enterOuterAlt(localContext, 114);
{
this.state = 1055;
this.variableSetStmt();
}
break;
case 115:
this.enterOuterAlt(localContext, 115);
{
this.state = 1056;
this.variableShowStmt();
}
break;
case 116:
this.enterOuterAlt(localContext, 116);
{
this.state = 1057;
this.viewStmt();
}
break;
case 117:
this.enterOuterAlt(localContext, 117);
{
this.state = 1058;
this.match(PostgreSqlParser.MetaCommand);
this.state = 1060;
this.errorHandler.sync(this);
_la = this.tokenStream.LA(1);
if (_la === 584) {
{
this.state = 1059;
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 = 1064;
this.match(PostgreSqlParser.KW_CALL);
this.state = 1065;
this.funcApplication();
}
}
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 = 1067;
this.match(PostgreSqlParser.KW_CREATE);
this.state = 1068;
this.match(PostgreSqlParser.KW_ROLE);
this.state = 1069;
this.roleSpec();
this.state = 1071;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 4, this.context)) {
case 1:
{
this.state = 1070;
this.match(PostgreSqlParser.KW_WITH);
}
break;
}
this.state = 1076;
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 = 1073;
this.createOperatorRoleElem();
}
}
}
this.state = 1078;
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;
}
alterOperatorRoleElem() {
let localContext = new AlterOperatorRoleElemContext(this.context, this.state);
this.enterRule(localContext, 10, PostgreSqlParser.RULE_alterOperatorRoleElem);
let _la;
try {
this.state = 1117;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 7, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 1079;
this.match(PostgreSqlParser.KW_PASSWORD);
this.state = 1082;
this.errorHandler.sync(this);
switch (this.tokenStream.LA(1)) {
case PostgreSqlParser.StringConstant:
case PostgreSqlParser.UnicodeEscapeStringConstant:
case PostgreSqlParser.BeginDollarStringConstant:
case PostgreSqlParser.EscapeStringConstant:
{
this.state = 1080;
this.stringConst();
}
break;
case PostgreSqlParser.KW_NULL:
{
this.state = 1081;
this.match(PostgreSqlParser.KW_NULL);
}
break;
default:
throw new antlr.NoViableAltException(this);
}
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 1084;
_la = this.tokenStream.LA(1);
if (!(_la === 195 || _la === 364)) {
this.errorHandler.recoverInline(this);
}
else {
this.errorHandler.reportMatch(this);
this.consume();
}
this.state = 1085;
this.match(PostgreSqlParser.KW_PASSWORD);
this.state = 1086;
this.stringConst();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 1087;
this.match(PostgreSqlParser.KW_INHERIT);
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 1088;
this.match(PostgreSqlParser.KW_NOINHERIT);
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 1089;
this.match(PostgreSqlParser.KW_CREATEUSER);
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 1090;
this.match(PostgreSqlParser.KW_NOCREATEUSER);
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 1091;
this.match(PostgreSqlParser.KW_CREATEROLE);
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 1092;
this.match(PostgreSqlParser.KW_NOCREATEROLE);
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 1093;
this.match(PostgreSqlParser.KW_CREATEDB);
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 1094;
this.match(PostgreSqlParser.KW_NOCREATEDB);
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 1095;
this.match(PostgreSqlParser.KW_SUPERUSER);
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 1096;
this.match(PostgreSqlParser.KW_NOSUPERUSER);
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 1097;
this.match(PostgreSqlParser.KW_LOGIN);
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 1098;
this.match(PostgreSqlParser.KW_NOLOGIN);
}
break;
case 15:
this.enterOuterAlt(localContext, 15);
{
this.state = 1099;
this.match(PostgreSqlParser.KW_REPLICATION);
}
break;
case 16:
this.enterOuterAlt(localContext, 16);
{
this.state = 1100;
this.match(PostgreSqlParser.KW_NOREPLICATION);
}
break;
case 17:
this.enterOuterAlt(localContext, 17);
{
this.state = 1101;
this.match(PostgreSqlParser.KW_BYPASSRLS);
}
break;
case 18:
this.enterOuterAlt(localContext, 18);
{
this.state = 1102;
this.match(PostgreSqlParser.KW_NOBYPASSRLS);
}
break;
case 19:
this.enterOuterAlt(localContext, 19);
{
this.state = 1103;
this.match(PostgreSqlParser.KW_CONNECTION);
this.state = 1104;
this.match(PostgreSqlParser.KW_LIMIT);
this.state = 1105;
this.signedConst();
}
break;
case 20:
this.enterOuterAlt(localContext, 20);
{
this.state = 1106;
this.match(PostgreSqlParser.KW_VALID);
this.state = 1107;
this.match(PostgreSqlParser.KW_UNTIL);
this.state = 1108;
this.stringConst();
}
break;
case 21:
this.enterOuterAlt(localContext, 21);
{
this.state = 1109;
this.match(PostgreSqlParser.KW_IN);
this.state = 1110;
_la = this.tokenStream.LA(1);
if (!(_la === 66 || _la === 318)) {
this.errorHandler.recoverInline(this);
}
else {
this.errorHandler.reportMatch(this);
this.consume();
}
this.state = 1111;
this.nameList();
}
break;
case 22:
this.enterOuterAlt(localContext, 22);
{
this.state = 1112;
_la = this.tokenStream.LA(1);
if (!(_la === 99 || _la === 318)) {
this.errorHandler.recoverInline(this);
}
else {
this.errorHandler.reportMatch(this);
this.consume();
}
this.state = 1113;
this.roleList();
}
break;
case 23:
this.enterOuterAlt(localContext, 23);
{
this.state = 1114;
this.match(PostgreSqlParser.KW_ADMIN);
this.state = 1115;
this.nameList();
}
break;
case 24:
this.enterOuterAlt(localContext, 24);
{
this.state = 1116;
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;
}
createOperatorRoleElem() {
let localContext = new CreateOperatorRoleElemContext(this.context, this.state);
this.enterRule(localContext, 12, PostgreSqlParser.RULE_createOperatorRoleElem);
let _la;
try {
this.state = 1127;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 8, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 1119;
this.alterOperatorRoleElem();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 1120;
this.match(PostgreSqlParser.KW_SYSID);
this.state = 1121;
this.match(PostgreSqlParser.Integral);
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 1122;
_la = this.tokenStream.LA(1);
if (!(_la === 134 || _la === 318)) {
this.errorHandler.recoverInline(this);
}
else {
this.errorHandler.reportMatch(this);
this.consume();
}
this.state = 1123;
this.roleList();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 1124;
this.match(PostgreSqlParser.KW_IN);
this.state = 1125;
_la = this.tokenStream.LA(1);
if (!(_la === 66 || _la === 318)) {
this.errorHandler.recoverInline(this);
}
else {
this.errorHandler.reportMatch(this);
this.consume();
}
this.state = 1126;
this.roleList();
}
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.e