UNPKG

bitmark-grammar

Version:
1,037 lines (1,036 loc) 446 kB
// Generated from ./Chat/chatParser.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; import { FailedPredicateException } from "antlr4ts/FailedPredicateException"; import { NoViableAltException } from "antlr4ts/NoViableAltException"; import { Parser } from "antlr4ts/Parser"; import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator"; import { RecognitionException } from "antlr4ts/RecognitionException"; import { Token } from "antlr4ts/Token"; import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; import * as Utils from "antlr4ts/misc/Utils"; export class chatParser extends Parser { constructor(input) { super(input); this._interp = new ParserATNSimulator(chatParser._ATN, this); } // @Override // @NotNull get vocabulary() { return chatParser.VOCABULARY; } // tslint:enable:no-trailing-whitespace // @Override get grammarFileName() { return "chatParser.g4"; } // @Override get ruleNames() { return chatParser.ruleNames; } // @Override get serializedATN() { return chatParser._serializedATN; } createFailedPredicateException(predicate, message) { return new FailedPredicateException(this, predicate, message); } // @RuleVersion(0) bitmark() { let _localctx = new BitmarkContext(this._ctx, this.state); this.enterRule(_localctx, 0, chatParser.RULE_bitmark); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 189; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 176; this.bitmark_(); this.state = 186; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 180; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.S) { { { this.state = 177; this.match(chatParser.S); } } this.state = 182; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 183; this.match(chatParser.NL); } } } this.state = 188; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx); } } } this.state = 191; this._errHandler.sync(this); _la = this._input.LA(1); } while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << chatParser.BitChat) | (1 << chatParser.BitConv) | (1 << chatParser.BitConversationLeft1) | (1 << chatParser.BitConversationRight1) | (1 << chatParser.BitConversationRight1Thought) | (1 << chatParser.BitConversationRight1Scream) | (1 << chatParser.BitConversationLeft1Thought) | (1 << chatParser.BitConversationLeft1Scream))) !== 0)); this.state = 196; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 193; this.match(chatParser.NL); } } this.state = 198; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 199; this.match(chatParser.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; } // @RuleVersion(0) bitmark_() { let _localctx = new Bitmark_Context(this._ctx, this.state); this.enterRule(_localctx, 2, chatParser.RULE_bitmark_); try { this.state = 209; this._errHandler.sync(this); switch (this._input.LA(1)) { case chatParser.BitChat: this.enterOuterAlt(_localctx, 1); { this.state = 201; this.chat(); } break; case chatParser.BitConv: this.enterOuterAlt(_localctx, 2); { this.state = 202; this.conversation(); } break; case chatParser.BitConversationLeft1: this.enterOuterAlt(_localctx, 3); { this.state = 203; this.conversation_left_1(); } break; case chatParser.BitConversationRight1: this.enterOuterAlt(_localctx, 4); { this.state = 204; this.conversation_right_1(); } break; case chatParser.BitConversationRight1Thought: this.enterOuterAlt(_localctx, 5); { this.state = 205; this.conversation_right_1_thought(); } break; case chatParser.BitConversationRight1Scream: this.enterOuterAlt(_localctx, 6); { this.state = 206; this.conversation_right_1_scream(); } break; case chatParser.BitConversationLeft1Thought: this.enterOuterAlt(_localctx, 7); { this.state = 207; this.conversation_left_1_thought(); } break; case chatParser.BitConversationLeft1Scream: this.enterOuterAlt(_localctx, 8); { this.state = 208; this.conversation_left_1_scream(); } break; default: throw new NoViableAltException(this); } } 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; } // @RuleVersion(0) chat() { let _localctx = new ChatContext(this._ctx, this.state); this.enterRule(_localctx, 4, chatParser.RULE_chat); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 211; this.match(chatParser.BitChat); this.state = 212; this.format(); this.state = 213; this.match(chatParser.CL); this.state = 217; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 214; this.match(chatParser.NL); } } this.state = 219; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 229; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << chatParser.S) | (1 << chatParser.OPRANGLES) | (1 << chatParser.OPRANGLEL) | (1 << chatParser.OPDANGLE) | (1 << chatParser.OPU) | (1 << chatParser.OPB) | (1 << chatParser.OPQ) | (1 << chatParser.OPA) | (1 << chatParser.OPS) | (1 << chatParser.OPC) | (1 << chatParser.OPHASH) | (1 << chatParser.COLON) | (1 << chatParser.AMP) | (1 << chatParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (chatParser.Greater - 33)) | (1 << (chatParser.Less - 33)) | (1 << (chatParser.RightAngle - 33)) | (1 << (chatParser.RightArrow - 33)) | (1 << (chatParser.DBLEQ - 33)) | (1 << (chatParser.ArticleText - 33)) | (1 << (chatParser.NUMERIC - 33)) | (1 << (chatParser.STRING - 33)) | (1 << (chatParser.NOTBITMARK - 33)) | (1 << (chatParser.SENTENCE - 33)) | (1 << (chatParser.BARSTRING - 33)) | (1 << (chatParser.AtReference - 33)) | (1 << (chatParser.AtExampleWithStr - 33)) | (1 << (chatParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (chatParser.AtExamplecl - 65)) | (1 << (chatParser.AtLabeltrue - 65)) | (1 << (chatParser.AtLabelfalse - 65)) | (1 << (chatParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (chatParser.OpAmpAudio - 97)) | (1 << (chatParser.OpAmpImage - 97)) | (1 << (chatParser.OpAmpImageZoom - 97)) | (1 << (chatParser.OpAmpImageWAudio - 97)) | (1 << (chatParser.OpAmpVideo - 97)) | (1 << (chatParser.OpAmpArticle - 97)) | (1 << (chatParser.OpAmpDocument - 97)) | (1 << (chatParser.OpAmpApp - 97)) | (1 << (chatParser.OpAmpWebsite - 97)) | (1 << (chatParser.OpAmpStillImageFilm - 97)) | (1 << (chatParser.OpAmpAudioLink - 97)) | (1 << (chatParser.OpAmpImageLink - 97)) | (1 << (chatParser.OpAmpVideoLink - 97)) | (1 << (chatParser.OpAmpArticleLink - 97)) | (1 << (chatParser.OpAmpDocumentLink - 97)) | (1 << (chatParser.OpAmpDocumentDownload - 97)) | (1 << (chatParser.OpAmpAppLink - 97)) | (1 << (chatParser.OpAmpWebsiteLink - 97)) | (1 << (chatParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (chatParser.OpAmpVideoEmbed - 133)) | (1 << (chatParser.OpAmpAudioEmbed - 133)) | (1 << (chatParser.OpAmpDocumentEmbed - 133)) | (1 << (chatParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (chatParser.URL - 133)) | (1 << (chatParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 220; this.bitElem(); this.state = 224; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 221; this.match(chatParser.NL); } } this.state = 226; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 232; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 233; this.initiator(); this.state = 234; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 235; this.partner(); this.state = 244; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 236; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 237; this.chat_initiator(); this.state = 241; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.SSPL || _la === chatParser.SSPL2) { { { this.state = 238; this.sspl_chat_partner(); } } this.state = 243; this._errHandler.sync(this); _la = this._input.LA(1); } } } break; default: throw new NoViableAltException(this); } this.state = 246; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); this.state = 248; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 252; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 10, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 249; this.match(chatParser.NL); } } } this.state = 254; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 10, this._ctx); } this.state = 268; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 13, this._ctx)) { case 1: { this.state = 255; this.resource(); this.state = 265; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 259; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 256; this.match(chatParser.NL); } } this.state = 261; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 262; this.resource(); } } } this.state = 267; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); } } 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; } // @RuleVersion(0) conversation() { let _localctx = new ConversationContext(this._ctx, this.state); this.enterRule(_localctx, 6, chatParser.RULE_conversation); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 270; this.match(chatParser.BitConv); this.state = 271; this.format(); this.state = 272; this.match(chatParser.CL); this.state = 276; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 273; this.match(chatParser.NL); } } this.state = 278; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 288; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << chatParser.S) | (1 << chatParser.OPRANGLES) | (1 << chatParser.OPRANGLEL) | (1 << chatParser.OPDANGLE) | (1 << chatParser.OPU) | (1 << chatParser.OPB) | (1 << chatParser.OPQ) | (1 << chatParser.OPA) | (1 << chatParser.OPS) | (1 << chatParser.OPC) | (1 << chatParser.OPHASH) | (1 << chatParser.COLON) | (1 << chatParser.AMP) | (1 << chatParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (chatParser.Greater - 33)) | (1 << (chatParser.Less - 33)) | (1 << (chatParser.RightAngle - 33)) | (1 << (chatParser.RightArrow - 33)) | (1 << (chatParser.DBLEQ - 33)) | (1 << (chatParser.ArticleText - 33)) | (1 << (chatParser.NUMERIC - 33)) | (1 << (chatParser.STRING - 33)) | (1 << (chatParser.NOTBITMARK - 33)) | (1 << (chatParser.SENTENCE - 33)) | (1 << (chatParser.BARSTRING - 33)) | (1 << (chatParser.AtReference - 33)) | (1 << (chatParser.AtExampleWithStr - 33)) | (1 << (chatParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (chatParser.AtExamplecl - 65)) | (1 << (chatParser.AtLabeltrue - 65)) | (1 << (chatParser.AtLabelfalse - 65)) | (1 << (chatParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (chatParser.OpAmpAudio - 97)) | (1 << (chatParser.OpAmpImage - 97)) | (1 << (chatParser.OpAmpImageZoom - 97)) | (1 << (chatParser.OpAmpImageWAudio - 97)) | (1 << (chatParser.OpAmpVideo - 97)) | (1 << (chatParser.OpAmpArticle - 97)) | (1 << (chatParser.OpAmpDocument - 97)) | (1 << (chatParser.OpAmpApp - 97)) | (1 << (chatParser.OpAmpWebsite - 97)) | (1 << (chatParser.OpAmpStillImageFilm - 97)) | (1 << (chatParser.OpAmpAudioLink - 97)) | (1 << (chatParser.OpAmpImageLink - 97)) | (1 << (chatParser.OpAmpVideoLink - 97)) | (1 << (chatParser.OpAmpArticleLink - 97)) | (1 << (chatParser.OpAmpDocumentLink - 97)) | (1 << (chatParser.OpAmpDocumentDownload - 97)) | (1 << (chatParser.OpAmpAppLink - 97)) | (1 << (chatParser.OpAmpWebsiteLink - 97)) | (1 << (chatParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (chatParser.OpAmpVideoEmbed - 133)) | (1 << (chatParser.OpAmpAudioEmbed - 133)) | (1 << (chatParser.OpAmpDocumentEmbed - 133)) | (1 << (chatParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (chatParser.URL - 133)) | (1 << (chatParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 279; this.bitElem(); this.state = 283; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 280; this.match(chatParser.NL); } } this.state = 285; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 290; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 291; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 292; this.initiator(); this.state = 293; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 294; this.partner(); this.state = 303; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 295; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 296; this.chat_initiator(); this.state = 300; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.SSPL || _la === chatParser.SSPL2) { { { this.state = 297; this.sspl_chat_partner(); } } this.state = 302; this._errHandler.sync(this); _la = this._input.LA(1); } } } break; default: throw new NoViableAltException(this); } this.state = 305; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); this.state = 307; _la = this._input.LA(1); if (!(_la === chatParser.HSPL || _la === chatParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 311; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 308; this.match(chatParser.NL); } } } this.state = 313; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx); } this.state = 327; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 22, this._ctx)) { case 1: { this.state = 314; this.resource(); this.state = 324; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 21, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 318; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 315; this.match(chatParser.NL); } } this.state = 320; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 321; this.resource(); } } } this.state = 326; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 21, this._ctx); } } 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; } // @RuleVersion(0) conversation_left_1() { let _localctx = new Conversation_left_1Context(this._ctx, this.state); this.enterRule(_localctx, 8, chatParser.RULE_conversation_left_1); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 329; this.match(chatParser.BitConversationLeft1); this.state = 330; this.format2(); this.state = 331; this.match(chatParser.CL); this.state = 335; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 332; this.match(chatParser.NL); } } } this.state = 337; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx); } this.state = 347; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 338; this.bitElem(); this.state = 342; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 24, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 339; this.match(chatParser.NL); } } } this.state = 344; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 24, this._ctx); } } } } this.state = 349; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx); } this.state = 351; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === chatParser.AtPartner) { { this.state = 350; this.partner1(); } } this.state = 356; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 353; this.match(chatParser.NL); } } this.state = 358; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 366; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 359; this.s_and_w(); this.state = 363; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 28, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 360; this.match(chatParser.NL); } } } this.state = 365; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 28, this._ctx); } } } break; default: throw new NoViableAltException(this); } this.state = 368; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 29, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); } } 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; } // @RuleVersion(0) conversation_right_1() { let _localctx = new Conversation_right_1Context(this._ctx, this.state); this.enterRule(_localctx, 10, chatParser.RULE_conversation_right_1); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 370; this.match(chatParser.BitConversationRight1); this.state = 371; this.format2(); this.state = 372; this.match(chatParser.CL); this.state = 376; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 373; this.match(chatParser.NL); } } } this.state = 378; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx); } this.state = 388; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 379; this.bitElem(); this.state = 383; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 31, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 380; this.match(chatParser.NL); } } } this.state = 385; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 31, this._ctx); } } } } this.state = 390; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx); } this.state = 392; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === chatParser.AtPartner) { { this.state = 391; this.partner1(); } } this.state = 397; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 394; this.match(chatParser.NL); } } this.state = 399; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 407; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 400; this.s_and_w(); this.state = 404; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 35, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 401; this.match(chatParser.NL); } } } this.state = 406; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 35, this._ctx); } } } break; default: throw new NoViableAltException(this); } this.state = 409; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 36, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); } } 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; } // @RuleVersion(0) conversation_right_1_thought() { let _localctx = new Conversation_right_1_thoughtContext(this._ctx, this.state); this.enterRule(_localctx, 12, chatParser.RULE_conversation_right_1_thought); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 411; this.match(chatParser.BitConversationRight1Thought); this.state = 412; this.format2(); this.state = 413; this.match(chatParser.CL); this.state = 417; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 37, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 414; this.match(chatParser.NL); } } } this.state = 419; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 37, this._ctx); } this.state = 429; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 39, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 420; this.bitElem(); this.state = 424; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 38, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 421; this.match(chatParser.NL); } } } this.state = 426; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 38, this._ctx); } } } } this.state = 431; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 39, this._ctx); } this.state = 433; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === chatParser.AtPartner) { { this.state = 432; this.partner1(); } } this.state = 438; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === chatParser.NL) { { { this.state = 435; this.match(chatParser.NL); } } this.state = 440; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 448; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 441; this.s_and_w(); this.state = 445; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 42, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 442; this.match(chatParser.NL); } } } this.state = 447; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 42, this._ctx); } } } break; default: throw new NoViableAltException(this); } this.state = 450; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 43, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); } } catch (re) {