UNPKG

bitmark-grammar

Version:
868 lines 555 kB
"use strict"; // Generated from ./antlr/choiceParser.g4 by ANTLR 4.9.0-SNAPSHOT Object.defineProperty(exports, "__esModule", { value: true }); exports.SpContext = exports.WordsContext = exports.SsplContext = exports.ClnspContext = exports.S_and_wContext = exports.LinesContext = exports.DclinesContext = exports.AnchorContext = exports.DollaransContext = exports.Atdef_Context = exports.AtdefContext = exports.IsinfoonlyContext = exports.IstrackedContext = exports.Progress_pointsContext = exports.Bool_labelContext = exports.TitleContext = exports.HintContext = exports.InstructionContext = exports.Dateprop_chainedContext = exports.DatepropContext = exports.ProgressContext = exports.ReferenceContext = exports.Bracketed_textContext = exports.ExampleContext = exports.AnglerefContext = exports.LeadContext = exports.ItemContext = exports.UrlContext = exports.TelephoneContext = exports.Resource_chainedContext = exports.Op_audio_formatContext = exports.Audio_formatContext = exports.Audio_oneContext = exports.AudiobitContext = exports.Image_chained4matchContext = exports.Image_chainedContext = exports.Op_image_formatContext = exports.Image_oneContext = exports.ImagebitContext = exports.Video_oneContext = exports.VideobitContext = exports.Stillimg_oneContext = exports.StillimagefilmbitContext = exports.AppbitContext = exports.WebsitebitContext = exports.DocumentbitContext = exports.ArticlebitContext = exports.Op_stillimagefilm_formatContext = exports.Op_video_formatContext = exports.Op_website_formatContext = exports.Op_app_formatContext = exports.Op_document_formatContext = exports.Op_article_formatContext = exports.Stillimagefilm_formatContext = exports.Website_formatContext = exports.App_formatContext = exports.Document_formatContext = exports.Article_formatContext = exports.Video_formatContext = exports.Image_formatContext = exports.Format2Context = exports.Resource_format_extraContext = exports.Resource_formatContext = exports.FormatContext = exports.AtpointContext = exports.Bullet_itemContext = exports.ResourceContext = exports.ShortansContext = exports.LongansContext = exports.Il_followContext = exports.Ml_exampleContext = exports.Inline_choicesContext = exports.Choice_headContext = exports.Headed_choicesContext = exports.Highlight_inline_choicesContext = exports.Headed_inline_choicesContext = exports.Il_choice_minusContext = exports.Il_choice_plusContext = exports.Choice_minusContext = exports.Choice_plusContext = exports.CminusContext = exports.CplusContext = exports.ChoicesContext = exports.Single_gapContext = exports.GapContext = exports.BitElemContext = exports.Highlight_il_choiceContext = exports.Highlight_textContext = exports.Multitxt_il_choiceContext = exports.Multiple_choice_textContext = exports.Multiple_response_1Context = exports.Multiple_responseContext = exports.Multiple_choice_1Context = exports.McrmiscContext = exports.McrsepContext = exports.Multiple_choiceContext = exports.Multi_choicesContext = exports.Bitmark_Context = exports.BitmarkContext = exports.choiceParser = void 0; const ATN_1 = require("antlr4ts/atn/ATN"); const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer"); const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException"); const NoViableAltException_1 = require("antlr4ts/NoViableAltException"); const Parser_1 = require("antlr4ts/Parser"); const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext"); const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator"); const RecognitionException_1 = require("antlr4ts/RecognitionException"); const Token_1 = require("antlr4ts/Token"); const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl"); const Utils = require("antlr4ts/misc/Utils"); class choiceParser extends Parser_1.Parser { constructor(input) { super(input); this._interp = new ParserATNSimulator_1.ParserATNSimulator(choiceParser._ATN, this); } // @Override // @NotNull get vocabulary() { return choiceParser.VOCABULARY; } // tslint:enable:no-trailing-whitespace // @Override get grammarFileName() { return "choiceParser.g4"; } // @Override get ruleNames() { return choiceParser.ruleNames; } // @Override get serializedATN() { return choiceParser._serializedATN; } createFailedPredicateException(predicate, message) { return new FailedPredicateException_1.FailedPredicateException(this, predicate, message); } // @RuleVersion(0) bitmark() { let _localctx = new BitmarkContext(this._ctx, this.state); this.enterRule(_localctx, 0, choiceParser.RULE_bitmark); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 211; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 198; this.bitmark_(); this.state = 208; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 202; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === choiceParser.S) { { { this.state = 199; this.match(choiceParser.S); } } this.state = 204; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 205; this.match(choiceParser.NL); } } } this.state = 210; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx); } } } this.state = 213; this._errHandler.sync(this); _la = this._input.LA(1); } while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << choiceParser.BitMultichoice1) | (1 << choiceParser.BitMultichoice) | (1 << choiceParser.BitMultiresp1) | (1 << choiceParser.BitMultiresp) | (1 << choiceParser.BitMultichoicetext) | (1 << choiceParser.BitHighlighttext))) !== 0)); this.state = 218; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === choiceParser.NL) { { { this.state = 215; this.match(choiceParser.NL); } } this.state = 220; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 221; this.match(choiceParser.EOF); } } catch (re) { if (re instanceof RecognitionException_1.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, choiceParser.RULE_bitmark_); try { this.enterOuterAlt(_localctx, 1); { this.state = 223; this.multi_choices(); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) multi_choices() { let _localctx = new Multi_choicesContext(this._ctx, this.state); this.enterRule(_localctx, 4, choiceParser.RULE_multi_choices); try { this.state = 231; this._errHandler.sync(this); switch (this._input.LA(1)) { case choiceParser.BitMultichoice: this.enterOuterAlt(_localctx, 1); { this.state = 225; this.multiple_choice(); } break; case choiceParser.BitMultichoice1: this.enterOuterAlt(_localctx, 2); { this.state = 226; this.multiple_choice_1(); } break; case choiceParser.BitMultiresp: this.enterOuterAlt(_localctx, 3); { this.state = 227; this.multiple_response(); } break; case choiceParser.BitMultiresp1: this.enterOuterAlt(_localctx, 4); { this.state = 228; this.multiple_response_1(); } break; case choiceParser.BitMultichoicetext: this.enterOuterAlt(_localctx, 5); { this.state = 229; this.multiple_choice_text(); } break; case choiceParser.BitHighlighttext: this.enterOuterAlt(_localctx, 6); { this.state = 230; this.highlight_text(); } break; default: throw new NoViableAltException_1.NoViableAltException(this); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) multiple_choice() { let _localctx = new Multiple_choiceContext(this._ctx, this.state); this.enterRule(_localctx, 6, choiceParser.RULE_multiple_choice); let _la; try { let _alt; this.state = 329; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 22, this._ctx)) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 233; this.match(choiceParser.BitMultichoice); this.state = 234; this.format(); this.state = 235; this.match(choiceParser.CL); this.state = 239; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 236; this.match(choiceParser.NL); } } } this.state = 241; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); } this.state = 251; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 242; this.bitElem(); this.state = 246; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 243; this.match(choiceParser.NL); } } } this.state = 248; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); } } } } this.state = 253; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx); } } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 254; this.match(choiceParser.BitMultichoice); this.state = 255; this.format(); this.state = 256; this.match(choiceParser.CL); this.state = 258; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 257; this.match(choiceParser.NL); } } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 260; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx); } while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER); this.state = 271; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << choiceParser.S) | (1 << choiceParser.OPRANGLES) | (1 << choiceParser.OPRANGLEL) | (1 << choiceParser.OPDANGLE) | (1 << choiceParser.OPU) | (1 << choiceParser.OPB) | (1 << choiceParser.OPQ) | (1 << choiceParser.OPA) | (1 << choiceParser.OPC) | (1 << choiceParser.OPITEM) | (1 << choiceParser.OPHASH) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP))) !== 0) || ((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (choiceParser.Greater - 35)) | (1 << (choiceParser.Less - 35)) | (1 << (choiceParser.RightAngle - 35)) | (1 << (choiceParser.RightArrow - 35)) | (1 << (choiceParser.DBLEQ - 35)) | (1 << (choiceParser.DCANY - 35)) | (1 << (choiceParser.ArticleText - 35)) | (1 << (choiceParser.NUMERIC - 35)) | (1 << (choiceParser.STRING - 35)) | (1 << (choiceParser.NOTBITMARK - 35)) | (1 << (choiceParser.ELIPSIS - 35)) | (1 << (choiceParser.SENTENCE - 35)) | (1 << (choiceParser.BARSTRING - 35)) | (1 << (choiceParser.AtReference - 35)))) !== 0) || ((((_la - 69)) & ~0x1F) === 0 && ((1 << (_la - 69)) & ((1 << (choiceParser.AtExampleWithStr - 69)) | (1 << (choiceParser.AtExamplecol - 69)) | (1 << (choiceParser.AtExamplecl - 69)) | (1 << (choiceParser.AtSampleSolution - 69)) | (1 << (choiceParser.AtLabeltrue - 69)) | (1 << (choiceParser.AtLabelfalse - 69)) | (1 << (choiceParser.OpAtCopyright - 69)))) !== 0) || ((((_la - 102)) & ~0x1F) === 0 && ((1 << (_la - 102)) & ((1 << (choiceParser.OpAmpAudio - 102)) | (1 << (choiceParser.OpAmpImage - 102)) | (1 << (choiceParser.OpAmpImageZoom - 102)) | (1 << (choiceParser.OpAmpVideo - 102)) | (1 << (choiceParser.OpAmpArticle - 102)) | (1 << (choiceParser.OpAmpDocument - 102)) | (1 << (choiceParser.OpAmpApp - 102)) | (1 << (choiceParser.OpAmpWebsite - 102)) | (1 << (choiceParser.OpAmpStillImageFilm - 102)) | (1 << (choiceParser.OpAmpAudioLink - 102)) | (1 << (choiceParser.OpAmpImageLink - 102)) | (1 << (choiceParser.OpAmpVideoLink - 102)) | (1 << (choiceParser.OpAmpArticleLink - 102)) | (1 << (choiceParser.OpAmpDocumentLink - 102)) | (1 << (choiceParser.OpAmpDocumentDownload - 102)) | (1 << (choiceParser.OpAmpAppLink - 102)) | (1 << (choiceParser.OpAmpWebsiteLink - 102)) | (1 << (choiceParser.OpAmpStillImageFilmLink - 102)))) !== 0) || ((((_la - 137)) & ~0x1F) === 0 && ((1 << (_la - 137)) & ((1 << (choiceParser.OpAmpVideoEmbed - 137)) | (1 << (choiceParser.OpAmpAudioEmbed - 137)) | (1 << (choiceParser.OpAmpDocumentEmbed - 137)) | (1 << (choiceParser.OpAmpStillImageFilmEmbed - 137)) | (1 << (choiceParser.URL - 137)) | (1 << (choiceParser.LIST_LINE - 137)))) !== 0)) { { { this.state = 262; this.bitElem(); this.state = 266; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 263; this.match(choiceParser.NL); } } } this.state = 268; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx); } } } this.state = 273; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 295; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 277; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 11, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 274; this.match(choiceParser.NL); } } } this.state = 279; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 11, this._ctx); } this.state = 280; this.mcrsep(); this.state = 288; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 13, this._ctx)) { case 1: { this.state = 284; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 281; this.match(choiceParser.NL); } } } this.state = 286; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); } this.state = 287; this.mcrmisc(); } break; } this.state = 291; this._errHandler.sync(this); _la = this._input.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << choiceParser.S) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP))) !== 0) || ((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (choiceParser.Greater - 35)) | (1 << (choiceParser.Less - 35)) | (1 << (choiceParser.RightAngle - 35)) | (1 << (choiceParser.RightArrow - 35)) | (1 << (choiceParser.DBLEQ - 35)) | (1 << (choiceParser.NUMERIC - 35)) | (1 << (choiceParser.STRING - 35)) | (1 << (choiceParser.NOTBITMARK - 35)) | (1 << (choiceParser.ELIPSIS - 35)) | (1 << (choiceParser.SENTENCE - 35)) | (1 << (choiceParser.BARSTRING - 35)))) !== 0) || _la === choiceParser.URL) { { this.state = 290; this.s_and_w(); } } this.state = 293; this.choices(); } } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 297; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 15, this._ctx); } while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER); this.state = 301; this._errHandler.sync(this); switch (this._input.LA(1)) { case choiceParser.HSPL: case choiceParser.HSPL2: { this.state = 299; _la = this._input.LA(1); if (!(_la === choiceParser.HSPL || _la === choiceParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token_1.Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } } break; case choiceParser.NL: { this.state = 300; this.match(choiceParser.NL); } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 306; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 17, this._ctx)) { case 1: { this.state = 303; this.bitElem(); this.state = 304; this.match(choiceParser.NL); } break; } this.state = 311; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 308; this.match(choiceParser.NL); } } } this.state = 313; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); } this.state = 327; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 21, this._ctx)) { case 1: { this.state = 314; this.resource(); this.state = 324; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 20, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 318; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === choiceParser.NL) { { { this.state = 315; this.match(choiceParser.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, 20, this._ctx); } } break; } } break; } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) mcrsep() { let _localctx = new McrsepContext(this._ctx, this.state); this.enterRule(_localctx, 8, choiceParser.RULE_mcrsep); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 333; this._errHandler.sync(this); switch (this._input.LA(1)) { case choiceParser.HSPL: case choiceParser.HSPL2: { this.state = 331; _la = this._input.LA(1); if (!(_la === choiceParser.HSPL || _la === choiceParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token_1.Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } } break; case choiceParser.NL: { this.state = 332; this.match(choiceParser.NL); } break; default: throw new NoViableAltException_1.NoViableAltException(this); } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) mcrmisc() { let _localctx = new McrmiscContext(this._ctx, this.state); this.enterRule(_localctx, 10, choiceParser.RULE_mcrmisc); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 338; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << choiceParser.S) | (1 << choiceParser.OPRANGLES) | (1 << choiceParser.OPRANGLEL) | (1 << choiceParser.OPDANGLE) | (1 << choiceParser.OPU) | (1 << choiceParser.OPB) | (1 << choiceParser.OPQ) | (1 << choiceParser.OPA) | (1 << choiceParser.OPC) | (1 << choiceParser.OPITEM) | (1 << choiceParser.OPHASH) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP))) !== 0) || ((((_la - 35)) & ~0x1F) === 0 && ((1 << (_la - 35)) & ((1 << (choiceParser.Greater - 35)) | (1 << (choiceParser.Less - 35)) | (1 << (choiceParser.RightAngle - 35)) | (1 << (choiceParser.RightArrow - 35)) | (1 << (choiceParser.DBLEQ - 35)) | (1 << (choiceParser.DCANY - 35)) | (1 << (choiceParser.ArticleText - 35)) | (1 << (choiceParser.NUMERIC - 35)) | (1 << (choiceParser.STRING - 35)) | (1 << (choiceParser.NOTBITMARK - 35)) | (1 << (choiceParser.ELIPSIS - 35)) | (1 << (choiceParser.SENTENCE - 35)) | (1 << (choiceParser.BARSTRING - 35)) | (1 << (choiceParser.AtReference - 35)))) !== 0) || ((((_la - 69)) & ~0x1F) === 0 && ((1 << (_la - 69)) & ((1 << (choiceParser.AtExampleWithStr - 69)) | (1 << (choiceParser.AtExamplecol - 69)) | (1 << (choiceParser.AtExamplecl - 69)) | (1 << (choiceParser.AtSampleSolution - 69)) | (1 << (choiceParser.AtLabeltrue - 69)) | (1 << (choiceParser.AtLabelfalse - 69)) | (1 << (choiceParser.OpAtCopyright - 69)))) !== 0) || ((((_la - 102)) & ~0x1F) === 0 && ((1 << (_la - 102)) & ((1 << (choiceParser.OpAmpAudio - 102)) | (1 << (choiceParser.OpAmpImage - 102)) | (1 << (choiceParser.OpAmpImageZoom - 102)) | (1 << (choiceParser.OpAmpVideo - 102)) | (1 << (choiceParser.OpAmpArticle - 102)) | (1 << (choiceParser.OpAmpDocument - 102)) | (1 << (choiceParser.OpAmpApp - 102)) | (1 << (choiceParser.OpAmpWebsite - 102)) | (1 << (choiceParser.OpAmpStillImageFilm - 102)) | (1 << (choiceParser.OpAmpAudioLink - 102)) | (1 << (choiceParser.OpAmpImageLink - 102)) | (1 << (choiceParser.OpAmpVideoLink - 102)) | (1 << (choiceParser.OpAmpArticleLink - 102)) | (1 << (choiceParser.OpAmpDocumentLink - 102)) | (1 << (choiceParser.OpAmpDocumentDownload - 102)) | (1 << (choiceParser.OpAmpAppLink - 102)) | (1 << (choiceParser.OpAmpWebsiteLink - 102)) | (1 << (choiceParser.OpAmpStillImageFilmLink - 102)))) !== 0) || ((((_la - 137)) & ~0x1F) === 0 && ((1 << (_la - 137)) & ((1 << (choiceParser.OpAmpVideoEmbed - 137)) | (1 << (choiceParser.OpAmpAudioEmbed - 137)) | (1 << (choiceParser.OpAmpDocumentEmbed - 137)) | (1 << (choiceParser.OpAmpStillImageFilmEmbed - 137)) | (1 << (choiceParser.URL - 137)) | (1 << (choiceParser.LIST_LINE - 137)))) !== 0)) { { { this.state = 335; this.bitElem(); } } this.state = 340; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 341; this.match(choiceParser.NL); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) multiple_choice_1() { let _localctx = new Multiple_choice_1Context(this._ctx, this.state); this.enterRule(_localctx, 12, choiceParser.RULE_multiple_choice_1); let _la; try { let _alt; this.state = 386; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 31, this._ctx)) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 343; this.match(choiceParser.BitMultichoice1); this.state = 344; this.format(); this.state = 345; this.match(choiceParser.CL); this.state = 349; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 346; this.match(choiceParser.NL); } } } this.state = 351; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx); } this.state = 361; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 352; this.bitElem(); this.state = 356; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 26, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 353; this.match(choiceParser.NL); } } } this.state = 358; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 26, this._ctx); } } } } this.state = 363; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx); } } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 364; this.match(choiceParser.BitMultichoice1); this.state = 365; this.format(); this.state = 366; this.match(choiceParser.CL); this.state = 368; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 367; this.match(choiceParser.NL); } } this.state = 370; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === choiceParser.NL); this.state = 381; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 372; this.bitElem(); this.state = 376; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === choiceParser.NL) { { { this.state = 373; this.match(choiceParser.NL); } } this.state = 378; this._errHandler.sync(this); _la = this._input.LA(1); } } } } this.state = 383; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx); } this.state = 384; this.choices(); } break; } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } // @RuleVersion(0) multiple_response() { let _localctx = new Multiple_responseContext(this._ctx, this.state); this.enterRule(_localctx, 14, choiceParser.RULE_multiple_response); let _la; try { let _alt; this.state = 485; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 49, this._ctx)) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 388; this.match(choiceParser.BitMultiresp); this.state = 389; this.format(); this.state = 390; this.match(choiceParser.CL); this.state = 394; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 391; this.match(choiceParser.NL); } } } this.state = 396; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx); } this.state = 406; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 34, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 397; this.bitElem(); this.state = 401; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 398; this.match(choiceParser.NL); } } } this.state = 403; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx); } } } } this.state = 408; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 34, this._ctx); } } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 409; this.match(choiceParser.BitMultiresp); this.state = 410; this.format(); this.state = 411; this.match(choiceParser.CL); this.state = 413; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 412; this.match(choiceParser.NL); } } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 415; this._errHandler.sync(this); _alt = this.interpreter.adaptivePr