dt-sql-parser
Version:
SQL Parsers for BigData, built with antlr4
1,403 lines • 3.43 MB
JavaScript
// Generated from dt-sql-parser/src/grammar/mysql/MySqlParser.g4 by ANTLR 4.13.1
// @ts-nocheck
import * as antlr from "antlr4ng";
import { SQLParserBase } from '../SQLParserBase';
export class MySqlParser extends SQLParserBase {
get grammarFileName() { return "MySqlParser.g4"; }
get literalNames() { return MySqlParser.literalNames; }
get symbolicNames() { return MySqlParser.symbolicNames; }
get ruleNames() { return MySqlParser.ruleNames; }
get serializedATN() { return MySqlParser._serializedATN; }
createFailedPredicateException(predicate, message) {
return new antlr.FailedPredicateException(this, predicate, message);
}
constructor(input) {
super(input);
this.interpreter = new antlr.ParserATNSimulator(this, MySqlParser._ATN, MySqlParser.decisionsToDFA, new antlr.PredictionContextCache());
}
program() {
let localContext = new ProgramContext(this.context, this.state);
this.enterRule(localContext, 0, MySqlParser.RULE_program);
let _la;
try {
this.enterOuterAlt(localContext, 1);
{
this.state = 841;
this.errorHandler.sync(this);
_la = this.tokenStream.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 169870592) !== 0) || ((((_la - 34)) & ~0x1F) === 0 && ((1 << (_la - 34)) & 268573697) !== 0) || ((((_la - 72)) & ~0x1F) === 0 && ((1 << (_la - 72)) & 2151694339) !== 0) || ((((_la - 104)) & ~0x1F) === 0 && ((1 << (_la - 104)) & 536936449) !== 0) || ((((_la - 140)) & ~0x1F) === 0 && ((1 << (_la - 140)) & 442923) !== 0) || ((((_la - 173)) & ~0x1F) === 0 && ((1 << (_la - 173)) & 2184193) !== 0) || ((((_la - 317)) & ~0x1F) === 0 && ((1 << (_la - 317)) & 16781443) !== 0) || _la === 362 || _la === 371 || ((((_la - 404)) & ~0x1F) === 0 && ((1 << (_la - 404)) & 270573569) !== 0) || _la === 540 || _la === 562 || ((((_la - 575)) & ~0x1F) === 0 && ((1 << (_la - 575)) & 16643) !== 0) || ((((_la - 640)) & ~0x1F) === 0 && ((1 << (_la - 640)) & 268435521) !== 0) || _la === 673 || _la === 694 || _la === 713 || _la === 717 || _la === 749 || _la === 866 || _la === 869) {
{
{
this.state = 838;
this.singleStatement();
}
}
this.state = 843;
this.errorHandler.sync(this);
_la = this.tokenStream.LA(1);
}
this.state = 844;
this.match(MySqlParser.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;
}
singleStatement() {
let localContext = new SingleStatementContext(this.context, this.state);
this.enterRule(localContext, 2, MySqlParser.RULE_singleStatement);
try {
this.state = 851;
this.errorHandler.sync(this);
switch (this.tokenStream.LA(1)) {
case MySqlParser.KW_ALTER:
case MySqlParser.KW_ANALYZE:
case MySqlParser.KW_CALL:
case MySqlParser.KW_CHANGE:
case MySqlParser.KW_CHECK:
case MySqlParser.KW_CREATE:
case MySqlParser.KW_DELETE:
case MySqlParser.KW_DESC:
case MySqlParser.KW_DESCRIBE:
case MySqlParser.KW_DROP:
case MySqlParser.KW_EXPLAIN:
case MySqlParser.KW_GET:
case MySqlParser.KW_GRANT:
case MySqlParser.KW_INSERT:
case MySqlParser.KW_KILL:
case MySqlParser.KW_LOAD:
case MySqlParser.KW_LOCK:
case MySqlParser.KW_OPTIMIZE:
case MySqlParser.KW_PURGE:
case MySqlParser.KW_RELEASE:
case MySqlParser.KW_RENAME:
case MySqlParser.KW_REPLACE:
case MySqlParser.KW_RESIGNAL:
case MySqlParser.KW_REVOKE:
case MySqlParser.KW_SELECT:
case MySqlParser.KW_SET:
case MySqlParser.KW_SHOW:
case MySqlParser.KW_SIGNAL:
case MySqlParser.KW_TABLE:
case MySqlParser.KW_UNLOCK:
case MySqlParser.KW_UPDATE:
case MySqlParser.KW_USE:
case MySqlParser.KW_VALUES:
case MySqlParser.KW_WITH:
case MySqlParser.KW_BEGIN:
case MySqlParser.KW_BINLOG:
case MySqlParser.KW_CACHE:
case MySqlParser.KW_CHECKSUM:
case MySqlParser.KW_COMMIT:
case MySqlParser.KW_DEALLOCATE:
case MySqlParser.KW_DO:
case MySqlParser.KW_FLUSH:
case MySqlParser.KW_HANDLER:
case MySqlParser.KW_HELP:
case MySqlParser.KW_IMPORT:
case MySqlParser.KW_INSTALL:
case MySqlParser.KW_PREPARE:
case MySqlParser.KW_REPAIR:
case MySqlParser.KW_RESET:
case MySqlParser.KW_RESTART:
case MySqlParser.KW_ROLLBACK:
case MySqlParser.KW_SAVEPOINT:
case MySqlParser.KW_START:
case MySqlParser.KW_STOP:
case MySqlParser.KW_TRUNCATE:
case MySqlParser.KW_UNINSTALL:
case MySqlParser.KW_XA:
case MySqlParser.KW_CLONE:
case MySqlParser.KW_EXECUTE:
case MySqlParser.KW_SHUTDOWN:
case MySqlParser.LR_BRACKET:
this.enterOuterAlt(localContext, 1);
{
this.state = 846;
this.sqlStatement();
this.state = 848;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 1, this.context)) {
case 1:
{
this.state = 847;
this.match(MySqlParser.SEMI);
}
break;
}
}
break;
case MySqlParser.SEMI:
this.enterOuterAlt(localContext, 2);
{
this.state = 850;
this.emptyStatement_();
}
break;
default:
throw new antlr.NoViableAltException(this);
}
}
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;
}
sqlStatement() {
let localContext = new SqlStatementContext(this.context, this.state);
this.enterRule(localContext, 4, MySqlParser.RULE_sqlStatement);
try {
this.state = 860;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 3, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 853;
this.ddlStatement();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 854;
this.dmlStatement();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 855;
this.transactionStatement();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 856;
this.replicationStatement();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 857;
this.preparedStatement();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 858;
this.administrationStatement();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 859;
this.utilityStatement();
}
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;
}
emptyStatement_() {
let localContext = new EmptyStatement_Context(this.context, this.state);
this.enterRule(localContext, 6, MySqlParser.RULE_emptyStatement_);
try {
this.enterOuterAlt(localContext, 1);
{
this.state = 862;
this.match(MySqlParser.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;
}
ddlStatement() {
let localContext = new DdlStatementContext(this.context, this.state);
this.enterRule(localContext, 8, MySqlParser.RULE_ddlStatement);
try {
this.state = 904;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 4, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 864;
this.createDatabase();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 865;
this.createEvent();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 866;
this.createIndex();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 867;
this.createLogFileGroup();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 868;
this.createProcedure();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 869;
this.createFunction();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 870;
this.createFunctionLoadable();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 871;
this.createServer();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 872;
this.createTable();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 873;
this.createTableSpaceInnoDB();
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 874;
this.createTableSpaceNDB();
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 875;
this.createTrigger();
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 876;
this.createView();
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 877;
this.createRole();
}
break;
case 15:
this.enterOuterAlt(localContext, 15);
{
this.state = 878;
this.alterDatabase();
}
break;
case 16:
this.enterOuterAlt(localContext, 16);
{
this.state = 879;
this.alterEvent();
}
break;
case 17:
this.enterOuterAlt(localContext, 17);
{
this.state = 880;
this.alterFunction();
}
break;
case 18:
this.enterOuterAlt(localContext, 18);
{
this.state = 881;
this.alterInstance();
}
break;
case 19:
this.enterOuterAlt(localContext, 19);
{
this.state = 882;
this.alterLogFileGroup();
}
break;
case 20:
this.enterOuterAlt(localContext, 20);
{
this.state = 883;
this.alterProcedure();
}
break;
case 21:
this.enterOuterAlt(localContext, 21);
{
this.state = 884;
this.alterServer();
}
break;
case 22:
this.enterOuterAlt(localContext, 22);
{
this.state = 885;
this.alterTable();
}
break;
case 23:
this.enterOuterAlt(localContext, 23);
{
this.state = 886;
this.alterTableSpace();
}
break;
case 24:
this.enterOuterAlt(localContext, 24);
{
this.state = 887;
this.alterView();
}
break;
case 25:
this.enterOuterAlt(localContext, 25);
{
this.state = 888;
this.dropDatabase();
}
break;
case 26:
this.enterOuterAlt(localContext, 26);
{
this.state = 889;
this.dropEvent();
}
break;
case 27:
this.enterOuterAlt(localContext, 27);
{
this.state = 890;
this.dropIndex();
}
break;
case 28:
this.enterOuterAlt(localContext, 28);
{
this.state = 891;
this.dropLogFileGroup();
}
break;
case 29:
this.enterOuterAlt(localContext, 29);
{
this.state = 892;
this.dropProcedure();
}
break;
case 30:
this.enterOuterAlt(localContext, 30);
{
this.state = 893;
this.dropFunction();
}
break;
case 31:
this.enterOuterAlt(localContext, 31);
{
this.state = 894;
this.dropServer();
}
break;
case 32:
this.enterOuterAlt(localContext, 32);
{
this.state = 895;
this.dropSpatial();
}
break;
case 33:
this.enterOuterAlt(localContext, 33);
{
this.state = 896;
this.dropTable();
}
break;
case 34:
this.enterOuterAlt(localContext, 34);
{
this.state = 897;
this.dropTableSpace();
}
break;
case 35:
this.enterOuterAlt(localContext, 35);
{
this.state = 898;
this.dropTrigger();
}
break;
case 36:
this.enterOuterAlt(localContext, 36);
{
this.state = 899;
this.dropView();
}
break;
case 37:
this.enterOuterAlt(localContext, 37);
{
this.state = 900;
this.dropRole();
}
break;
case 38:
this.enterOuterAlt(localContext, 38);
{
this.state = 901;
this.setRole();
}
break;
case 39:
this.enterOuterAlt(localContext, 39);
{
this.state = 902;
this.renameTable();
}
break;
case 40:
this.enterOuterAlt(localContext, 40);
{
this.state = 903;
this.truncateTable();
}
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;
}
dmlStatement() {
let localContext = new DmlStatementContext(this.context, this.state);
this.enterRule(localContext, 10, MySqlParser.RULE_dmlStatement);
try {
this.state = 923;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 5, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 906;
this.selectStatement();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 907;
this.setOperations();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 908;
this.insertStatement();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 909;
this.updateStatement();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 910;
this.deleteStatement();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 911;
this.replaceStatement();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 912;
this.callStatement();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 913;
this.interSectStatement();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 914;
this.loadDataStatement();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 915;
this.loadXmlStatement();
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 916;
this.parenthesizedQuery();
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 917;
this.doStatement();
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 918;
this.handlerStatement();
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 919;
this.importTableStatement();
}
break;
case 15:
this.enterOuterAlt(localContext, 15);
{
this.state = 920;
this.valuesStatement();
}
break;
case 16:
this.enterOuterAlt(localContext, 16);
{
this.state = 921;
this.withStatement();
}
break;
case 17:
this.enterOuterAlt(localContext, 17);
{
this.state = 922;
this.tableStatement();
}
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;
}
transactionStatement() {
let localContext = new TransactionStatementContext(this.context, this.state);
this.enterRule(localContext, 12, MySqlParser.RULE_transactionStatement);
try {
this.state = 934;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 6, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 925;
this.startTransaction();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 926;
this.beginWork();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 927;
this.commitWork();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 928;
this.rollbackWork();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 929;
this.savePointStatement();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 930;
this.rollbackStatement();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 931;
this.releaseStatement();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 932;
this.lockTables();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 933;
this.unlockTables();
}
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;
}
replicationStatement() {
let localContext = new ReplicationStatementContext(this.context, this.state);
this.enterRule(localContext, 14, MySqlParser.RULE_replicationStatement);
try {
this.state = 950;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 7, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 936;
this.changeMaster();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 937;
this.changeReplicationFilter();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 938;
this.changeReplicationSource();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 939;
this.purgeBinaryLogs();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 940;
this.startSlaveOrReplica();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 941;
this.stopSlaveOrReplica();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 942;
this.startGroupReplication();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 943;
this.stopGroupReplication();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 944;
this.xaStartTransaction();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 945;
this.xaEndTransaction();
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 946;
this.xaPrepareStatement();
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 947;
this.xaCommitWork();
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 948;
this.xaRollbackWork();
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 949;
this.xaRecoverWork();
}
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;
}
preparedStatement() {
let localContext = new PreparedStatementContext(this.context, this.state);
this.enterRule(localContext, 16, MySqlParser.RULE_preparedStatement);
try {
this.state = 955;
this.errorHandler.sync(this);
switch (this.tokenStream.LA(1)) {
case MySqlParser.KW_PREPARE:
this.enterOuterAlt(localContext, 1);
{
this.state = 952;
this.prepareStatement();
}
break;
case MySqlParser.KW_EXECUTE:
this.enterOuterAlt(localContext, 2);
{
this.state = 953;
this.executeStatement();
}
break;
case MySqlParser.KW_DROP:
case MySqlParser.KW_DEALLOCATE:
this.enterOuterAlt(localContext, 3);
{
this.state = 954;
this.deallocatePrepare();
}
break;
default:
throw new antlr.NoViableAltException(this);
}
}
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;
}
compoundStatement() {
let localContext = new CompoundStatementContext(this.context, this.state);
this.enterRule(localContext, 18, MySqlParser.RULE_compoundStatement);
try {
this.state = 967;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 9, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 957;
this.blockStatement();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 958;
this.caseStatement();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 959;
this.ifStatement();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 960;
this.leaveStatement();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 961;
this.loopStatement();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 962;
this.repeatStatement();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 963;
this.whileStatement();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 964;
this.iterateStatement();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 965;
this.returnStatement();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 966;
this.cursorStatement();
}
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;
}
administrationStatement() {
let localContext = new AdministrationStatementContext(this.context, this.state);
this.enterRule(localContext, 20, MySqlParser.RULE_administrationStatement);
try {
this.state = 1002;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 10, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 969;
this.alterUser();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 970;
this.createUser();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 971;
this.dropUser();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 972;
this.grantStatement();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 973;
this.grantProxy();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 974;
this.renameUser();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 975;
this.revokeStatement();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 976;
this.alterResourceGroup();
}
break;
case 9:
this.enterOuterAlt(localContext, 9);
{
this.state = 977;
this.createResourceGroup();
}
break;
case 10:
this.enterOuterAlt(localContext, 10);
{
this.state = 978;
this.dropResourceGroup();
}
break;
case 11:
this.enterOuterAlt(localContext, 11);
{
this.state = 979;
this.setResourceGroup();
}
break;
case 12:
this.enterOuterAlt(localContext, 12);
{
this.state = 980;
this.analyzeTable();
}
break;
case 13:
this.enterOuterAlt(localContext, 13);
{
this.state = 981;
this.checkTable();
}
break;
case 14:
this.enterOuterAlt(localContext, 14);
{
this.state = 982;
this.checksumTable();
}
break;
case 15:
this.enterOuterAlt(localContext, 15);
{
this.state = 983;
this.optimizeTable();
}
break;
case 16:
this.enterOuterAlt(localContext, 16);
{
this.state = 984;
this.repairTable();
}
break;
case 17:
this.enterOuterAlt(localContext, 17);
{
this.state = 985;
this.installComponent();
}
break;
case 18:
this.enterOuterAlt(localContext, 18);
{
this.state = 986;
this.uninstallComponent();
}
break;
case 19:
this.enterOuterAlt(localContext, 19);
{
this.state = 987;
this.installPlugin();
}
break;
case 20:
this.enterOuterAlt(localContext, 20);
{
this.state = 988;
this.uninstallPlugin();
}
break;
case 21:
this.enterOuterAlt(localContext, 21);
{
this.state = 989;
this.cloneStatement();
}
break;
case 22:
this.enterOuterAlt(localContext, 22);
{
this.state = 990;
this.setStatement();
}
break;
case 23:
this.enterOuterAlt(localContext, 23);
{
this.state = 991;
this.showStatement();
}
break;
case 24:
this.enterOuterAlt(localContext, 24);
{
this.state = 992;
this.binLogStatement();
}
break;
case 25:
this.enterOuterAlt(localContext, 25);
{
this.state = 993;
this.cacheIndexStatement();
}
break;
case 26:
this.enterOuterAlt(localContext, 26);
{
this.state = 994;
this.flushStatement();
}
break;
case 27:
this.enterOuterAlt(localContext, 27);
{
this.state = 995;
this.killStatement();
}
break;
case 28:
this.enterOuterAlt(localContext, 28);
{
this.state = 996;
this.loadIndexIntoCache();
}
break;
case 29:
this.enterOuterAlt(localContext, 29);
{
this.state = 997;
this.resetStatement();
}
break;
case 30:
this.enterOuterAlt(localContext, 30);
{
this.state = 998;
this.resetPersist();
}
break;
case 31:
this.enterOuterAlt(localContext, 31);
{
this.state = 999;
this.resetAllChannel();
}
break;
case 32:
this.enterOuterAlt(localContext, 32);
{
this.state = 1000;
this.reStartStatement();
}
break;
case 33:
this.enterOuterAlt(localContext, 33);
{
this.state = 1001;
this.shutdownStatement();
}
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;
}
utilityStatement() {
let localContext = new UtilityStatementContext(this.context, this.state);
this.enterRule(localContext, 22, MySqlParser.RULE_utilityStatement);
try {
this.state = 1012;
this.errorHandler.sync(this);
switch (this.interpreter.adaptivePredict(this.tokenStream, 11, this.context)) {
case 1:
this.enterOuterAlt(localContext, 1);
{
this.state = 1004;
this.fullDescribeStatement();
}
break;
case 2:
this.enterOuterAlt(localContext, 2);
{
this.state = 1005;
this.simpleDescribeStatement();
}
break;
case 3:
this.enterOuterAlt(localContext, 3);
{
this.state = 1006;
this.analyzeDescribeStatement();
}
break;
case 4:
this.enterOuterAlt(localContext, 4);
{
this.state = 1007;
this.helpStatement();
}
break;
case 5:
this.enterOuterAlt(localContext, 5);
{
this.state = 1008;
this.useStatement();
}
break;
case 6:
this.enterOuterAlt(localContext, 6);
{
this.state = 1009;
this.signalStatement();
}
break;
case 7:
this.enterOuterAlt(localContext, 7);
{
this.state = 1010;
this.resignalStatement();
}
break;
case 8:
this.enterOuterAlt(localContext, 8);
{
this.state = 1011;
this.diagnosticsStatement();
}
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;
}
createDatabase() {
let localContext = new CreateDatabaseContext(this.context, this.state);
this.enterRule(localContext, 24, MySqlParser.RULE_createDatabase);
let _la;
try {