bitmark-grammar
Version:
960 lines (959 loc) • 505 kB
JavaScript
// Generated from ./Choice/choiceParser.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 choiceParser extends Parser {
constructor(input) {
super(input);
this._interp = new 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(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.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) {
_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) {
_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(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)
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.enterOuterAlt(_localctx, 1);
{
this.state = 233;
this.match(choiceParser.BitMultichoice);
this.state = 234;
this.format();
this.state = 235;
this.match(choiceParser.CL);
this.state = 237;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 236;
this.match(choiceParser.NL);
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 239;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 250;
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.OPHASH) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP) | (1 << choiceParser.Greater))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (choiceParser.Less - 32)) | (1 << (choiceParser.RightAngle - 32)) | (1 << (choiceParser.RightArrow - 32)) | (1 << (choiceParser.DBLEQ - 32)) | (1 << (choiceParser.DCANY - 32)) | (1 << (choiceParser.ArticleText - 32)) | (1 << (choiceParser.NUMERIC - 32)) | (1 << (choiceParser.STRING - 32)) | (1 << (choiceParser.NOTBITMARK - 32)) | (1 << (choiceParser.SENTENCE - 32)) | (1 << (choiceParser.BARSTRING - 32)) | (1 << (choiceParser.AtReference - 32)))) !== 0) || ((((_la - 64)) & ~0x1F) === 0 && ((1 << (_la - 64)) & ((1 << (choiceParser.AtExampleWithStr - 64)) | (1 << (choiceParser.AtExamplecol - 64)) | (1 << (choiceParser.AtExamplecl - 64)) | (1 << (choiceParser.AtLabeltrue - 64)) | (1 << (choiceParser.AtLabelfalse - 64)) | (1 << (choiceParser.OpAtCopyright - 64)))) !== 0) || ((((_la - 98)) & ~0x1F) === 0 && ((1 << (_la - 98)) & ((1 << (choiceParser.OpAmpAudio - 98)) | (1 << (choiceParser.OpAmpImage - 98)) | (1 << (choiceParser.OpAmpImageZoom - 98)) | (1 << (choiceParser.OpAmpImageWAudio - 98)) | (1 << (choiceParser.OpAmpVideo - 98)) | (1 << (choiceParser.OpAmpArticle - 98)) | (1 << (choiceParser.OpAmpDocument - 98)) | (1 << (choiceParser.OpAmpApp - 98)) | (1 << (choiceParser.OpAmpWebsite - 98)) | (1 << (choiceParser.OpAmpStillImageFilm - 98)) | (1 << (choiceParser.OpAmpAudioLink - 98)) | (1 << (choiceParser.OpAmpImageLink - 98)) | (1 << (choiceParser.OpAmpVideoLink - 98)) | (1 << (choiceParser.OpAmpArticleLink - 98)) | (1 << (choiceParser.OpAmpDocumentLink - 98)) | (1 << (choiceParser.OpAmpDocumentDownload - 98)) | (1 << (choiceParser.OpAmpAppLink - 98)) | (1 << (choiceParser.OpAmpWebsiteLink - 98)) | (1 << (choiceParser.OpAmpStillImageFilmLink - 98)))) !== 0) || ((((_la - 134)) & ~0x1F) === 0 && ((1 << (_la - 134)) & ((1 << (choiceParser.OpAmpVideoEmbed - 134)) | (1 << (choiceParser.OpAmpAudioEmbed - 134)) | (1 << (choiceParser.OpAmpDocumentEmbed - 134)) | (1 << (choiceParser.OpAmpStillImageFilmEmbed - 134)) | (1 << (choiceParser.URL - 134)) | (1 << (choiceParser.LIST_LINE - 134)))) !== 0)) {
{
{
this.state = 241;
this.bitElem();
this.state = 245;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 242;
this.match(choiceParser.NL);
}
}
}
this.state = 247;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);
}
}
}
this.state = 252;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 274;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 256;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 253;
this.match(choiceParser.NL);
}
}
}
this.state = 258;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);
}
this.state = 259;
this.mcrsep();
this.state = 267;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 10, this._ctx)) {
case 1:
{
this.state = 263;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 260;
this.match(choiceParser.NL);
}
}
}
this.state = 265;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx);
}
this.state = 266;
this.mcrmisc();
}
break;
}
this.state = 270;
this._errHandler.sync(this);
_la = this._input.LA(1);
if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << choiceParser.S) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP) | (1 << choiceParser.Greater))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (choiceParser.Less - 32)) | (1 << (choiceParser.RightAngle - 32)) | (1 << (choiceParser.RightArrow - 32)) | (1 << (choiceParser.DBLEQ - 32)) | (1 << (choiceParser.NUMERIC - 32)) | (1 << (choiceParser.STRING - 32)) | (1 << (choiceParser.NOTBITMARK - 32)) | (1 << (choiceParser.SENTENCE - 32)) | (1 << (choiceParser.BARSTRING - 32)))) !== 0) || _la === choiceParser.URL) {
{
this.state = 269;
this.s_and_w();
}
}
this.state = 272;
this.choices();
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 276;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 280;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case choiceParser.HSPL:
case choiceParser.HSPL2:
{
this.state = 278;
_la = this._input.LA(1);
if (!(_la === choiceParser.HSPL || _la === choiceParser.HSPL2)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
break;
case choiceParser.NL:
{
this.state = 279;
this.match(choiceParser.NL);
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 285;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
{
this.state = 282;
this.bitElem();
this.state = 283;
this.match(choiceParser.NL);
}
break;
}
this.state = 290;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 15, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 287;
this.match(choiceParser.NL);
}
}
}
this.state = 292;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 15, this._ctx);
}
this.state = 306;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 18, this._ctx)) {
case 1:
{
this.state = 293;
this.resource();
this.state = 303;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 297;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === choiceParser.NL) {
{
{
this.state = 294;
this.match(choiceParser.NL);
}
}
this.state = 299;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 300;
this.resource();
}
}
}
this.state = 305;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, 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)
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 = 310;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case choiceParser.HSPL:
case choiceParser.HSPL2:
{
this.state = 308;
_la = this._input.LA(1);
if (!(_la === choiceParser.HSPL || _la === choiceParser.HSPL2)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
break;
case choiceParser.NL:
{
this.state = 309;
this.match(choiceParser.NL);
}
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)
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 = 315;
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.OPHASH) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP) | (1 << choiceParser.Greater))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (choiceParser.Less - 32)) | (1 << (choiceParser.RightAngle - 32)) | (1 << (choiceParser.RightArrow - 32)) | (1 << (choiceParser.DBLEQ - 32)) | (1 << (choiceParser.DCANY - 32)) | (1 << (choiceParser.ArticleText - 32)) | (1 << (choiceParser.NUMERIC - 32)) | (1 << (choiceParser.STRING - 32)) | (1 << (choiceParser.NOTBITMARK - 32)) | (1 << (choiceParser.SENTENCE - 32)) | (1 << (choiceParser.BARSTRING - 32)) | (1 << (choiceParser.AtReference - 32)))) !== 0) || ((((_la - 64)) & ~0x1F) === 0 && ((1 << (_la - 64)) & ((1 << (choiceParser.AtExampleWithStr - 64)) | (1 << (choiceParser.AtExamplecol - 64)) | (1 << (choiceParser.AtExamplecl - 64)) | (1 << (choiceParser.AtLabeltrue - 64)) | (1 << (choiceParser.AtLabelfalse - 64)) | (1 << (choiceParser.OpAtCopyright - 64)))) !== 0) || ((((_la - 98)) & ~0x1F) === 0 && ((1 << (_la - 98)) & ((1 << (choiceParser.OpAmpAudio - 98)) | (1 << (choiceParser.OpAmpImage - 98)) | (1 << (choiceParser.OpAmpImageZoom - 98)) | (1 << (choiceParser.OpAmpImageWAudio - 98)) | (1 << (choiceParser.OpAmpVideo - 98)) | (1 << (choiceParser.OpAmpArticle - 98)) | (1 << (choiceParser.OpAmpDocument - 98)) | (1 << (choiceParser.OpAmpApp - 98)) | (1 << (choiceParser.OpAmpWebsite - 98)) | (1 << (choiceParser.OpAmpStillImageFilm - 98)) | (1 << (choiceParser.OpAmpAudioLink - 98)) | (1 << (choiceParser.OpAmpImageLink - 98)) | (1 << (choiceParser.OpAmpVideoLink - 98)) | (1 << (choiceParser.OpAmpArticleLink - 98)) | (1 << (choiceParser.OpAmpDocumentLink - 98)) | (1 << (choiceParser.OpAmpDocumentDownload - 98)) | (1 << (choiceParser.OpAmpAppLink - 98)) | (1 << (choiceParser.OpAmpWebsiteLink - 98)) | (1 << (choiceParser.OpAmpStillImageFilmLink - 98)))) !== 0) || ((((_la - 134)) & ~0x1F) === 0 && ((1 << (_la - 134)) & ((1 << (choiceParser.OpAmpVideoEmbed - 134)) | (1 << (choiceParser.OpAmpAudioEmbed - 134)) | (1 << (choiceParser.OpAmpDocumentEmbed - 134)) | (1 << (choiceParser.OpAmpStillImageFilmEmbed - 134)) | (1 << (choiceParser.URL - 134)) | (1 << (choiceParser.LIST_LINE - 134)))) !== 0)) {
{
{
this.state = 312;
this.bitElem();
}
}
this.state = 317;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 318;
this.match(choiceParser.NL);
}
}
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)
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.enterOuterAlt(_localctx, 1);
{
this.state = 320;
this.match(choiceParser.BitMultichoice1);
this.state = 321;
this.format();
this.state = 322;
this.match(choiceParser.CL);
this.state = 324;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 323;
this.match(choiceParser.NL);
}
}
this.state = 326;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === choiceParser.NL);
this.state = 337;
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 = 328;
this.bitElem();
this.state = 332;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === choiceParser.NL) {
{
{
this.state = 329;
this.match(choiceParser.NL);
}
}
this.state = 334;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
}
this.state = 339;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx);
}
this.state = 340;
this.choices();
}
}
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)
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.enterOuterAlt(_localctx, 1);
{
this.state = 342;
this.match(choiceParser.BitMultiresp);
this.state = 343;
this.format();
this.state = 344;
this.match(choiceParser.CL);
this.state = 346;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 345;
this.match(choiceParser.NL);
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 348;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 24, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 359;
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.OPHASH) | (1 << choiceParser.COLON) | (1 << choiceParser.AMP) | (1 << choiceParser.Greater))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (choiceParser.Less - 32)) | (1 << (choiceParser.RightAngle - 32)) | (1 << (choiceParser.RightArrow - 32)) | (1 << (choiceParser.DBLEQ - 32)) | (1 << (choiceParser.DCANY - 32)) | (1 << (choiceParser.ArticleText - 32)) | (1 << (choiceParser.NUMERIC - 32)) | (1 << (choiceParser.STRING - 32)) | (1 << (choiceParser.NOTBITMARK - 32)) | (1 << (choiceParser.SENTENCE - 32)) | (1 << (choiceParser.BARSTRING - 32)) | (1 << (choiceParser.AtReference - 32)))) !== 0) || ((((_la - 64)) & ~0x1F) === 0 && ((1 << (_la - 64)) & ((1 << (choiceParser.AtExampleWithStr - 64)) | (1 << (choiceParser.AtExamplecol - 64)) | (1 << (choiceParser.AtExamplecl - 64)) | (1 << (choiceParser.AtLabeltrue - 64)) | (1 << (choiceParser.AtLabelfalse - 64)) | (1 << (choiceParser.OpAtCopyright - 64)))) !== 0) || ((((_la - 98)) & ~0x1F) === 0 && ((1 << (_la - 98)) & ((1 << (choiceParser.OpAmpAudio - 98)) | (1 << (choiceParser.OpAmpImage - 98)) | (1 << (choiceParser.OpAmpImageZoom - 98)) | (1 << (choiceParser.OpAmpImageWAudio - 98)) | (1 << (choiceParser.OpAmpVideo - 98)) | (1 << (choiceParser.OpAmpArticle - 98)) | (1 << (choiceParser.OpAmpDocument - 98)) | (1 << (choiceParser.OpAmpApp - 98)) | (1 << (choiceParser.OpAmpWebsite - 98)) | (1 << (choiceParser.OpAmpStillImageFilm - 98)) | (1 << (choiceParser.OpAmpAudioLink - 98)) | (1 << (choiceParser.OpAmpImageLink - 98)) | (1 << (choiceParser.OpAmpVideoLink - 98)) | (1 << (choiceParser.OpAmpArticleLink - 98)) | (1 << (choiceParser.OpAmpDocumentLink - 98)) | (1 << (choiceParser.OpAmpDocumentDownload - 98)) | (1 << (choiceParser.OpAmpAppLink - 98)) | (1 << (choiceParser.OpAmpWebsiteLink - 98)) | (1 << (choiceParser.OpAmpStillImageFilmLink - 98)))) !== 0) || ((((_la - 134)) & ~0x1F) === 0 && ((1 << (_la - 134)) & ((1 << (choiceParser.OpAmpVideoEmbed - 134)) | (1 << (choiceParser.OpAmpAudioEmbed - 134)) | (1 << (choiceParser.OpAmpDocumentEmbed - 134)) | (1 << (choiceParser.OpAmpStillImageFilmEmbed - 134)) | (1 << (choiceParser.URL - 134)) | (1 << (choiceParser.LIST_LINE - 134)))) !== 0)) {
{
{
this.state = 350;
this.bitElem();
this.state = 354;
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 = 351;
this.match(choiceParser.NL);
}
}
}
this.state = 356;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx);
}
}
}
this.state = 361;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 380;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 365;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 362;
this.match(choiceParser.NL);
}
}
}
this.state = 367;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx);
}
this.state = 368;
this.mcrsep();
this.state = 376;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 29, this._ctx)) {
case 1:
{
this.state = 372;
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 = 369;
this.match(choiceParser.NL);
}
}
}
this.state = 374;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 28, this._ctx);
}
this.state = 375;
this.mcrmisc();
}
break;
}
this.state = 378;
this.choices();
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 382;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 386;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 31, this._ctx)) {
case 1:
{
this.state = 384;
_la = this._input.LA(1);
if (!(_la === choiceParser.HSPL || _la === choiceParser.HSPL2)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
break;
case 2:
{
this.state = 385;
this.match(choiceParser.NL);
}
break;
}
this.state = 395;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 33, this._ctx)) {
case 1:
{
this.state = 388;
this.bitElem();
this.state = 392;
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 = 389;
this.match(choiceParser.NL);
}
}
}
this.state = 394;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx);
}
}
break;
}
this.state = 400;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 34, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 397;
this.match(choiceParser.NL);
}
}
}
this.state = 402;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 34, this._ctx);
}
this.state = 416;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 37, this._ctx)) {
case 1:
{
this.state = 403;
this.resource();
this.state = 413;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 36, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 407;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === choiceParser.NL) {
{
{
this.state = 404;
this.match(choiceParser.NL);
}
}
this.state = 409;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 410;
this.resource();
}
}
}
this.state = 415;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 36, 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)
multiple_response_1() {
let _localctx = new Multiple_response_1Context(this._ctx, this.state);
this.enterRule(_localctx, 16, choiceParser.RULE_multiple_response_1);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 418;
this.match(choiceParser.BitMultiresp1);
this.state = 419;
this.format();
this.state = 420;
this.match(choiceParser.CL);
this.state = 422;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 421;
this.match(choiceParser.NL);
}
}
this.state = 424;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === choiceParser.NL);
this.state = 433;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 426;
this.bitElem();
this.state = 430;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === choiceParser.NL) {
{
{
this.state = 427;
this.match(choiceParser.NL);
}
}
this.state = 432;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 435;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 40, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 437;
this.choices();
this.state = 441;
this._errHandler.sync(this);