bitmark-grammar
Version:
811 lines (810 loc) • 700 kB
JavaScript
"use strict";
// Generated from ./antlr/matchParser.g4 by ANTLR 4.9.0-SNAPSHOT
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpContext = exports.WordsContext = exports.Or_Context = exports.ClnspContext = exports.OpcContext = exports.OprContext = exports.OpsContext = exports.OpmContext = exports.OppContext = exports.OpaContext = exports.OpqContext = exports.OpbContext = exports.OpuContext = exports.OpdollContext = exports.DclinesContext = exports.S_and_wContext = exports.List_lineContext = exports.LinesContext = exports.ColcoltextContext = exports.DcolonContext = 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.PaudiobitContext = exports.Pimage_oneContext = exports.PimagebitContext = exports.Mpanswer__Context = exports.MpanswerContext = exports.Mpquery__Context = exports.MpqueryContext = exports.Pairmultival_audioContext = exports.Pairmultival_imageContext = exports.Pair_multivalContext = exports.Pair_multivalsContext = exports.Pair_audioContext = exports.Pair_audiosContext = exports.Pair_imageContext = exports.Pair_imagesContext = exports.Panswer__Context = exports.PanswerContext = exports.TenseContext = exports.Pquery__Context = exports.PqueryContext = exports.PqpairContext = exports.PairsContext = exports.Value_title_multiContext = exports.Value_titleContext = exports.Key_titleContext = exports.Pair_heading_multiContext = exports.Pair_headingContext = exports.ResourceContext = exports.ShortansContext = exports.LongansContext = exports.Ml_exampleContext = exports.Single_gapContext = exports.GapContext = exports.BitElemContext = exports.Match_allContext = exports.Match_audioContext = exports.Match_pictureContext = exports.Match_all_reverseContext = exports.Match_reverseContext = exports.Match_solution_groupedContext = exports.Match_matrixContext = exports.Match_Context = exports.MatchesContext = exports.Bitmark_Context = exports.BitmarkContext = exports.matchParser = 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 matchParser extends Parser_1.Parser {
constructor(input) {
super(input);
this._interp = new ParserATNSimulator_1.ParserATNSimulator(matchParser._ATN, this);
}
// @Override
// @NotNull
get vocabulary() {
return matchParser.VOCABULARY;
}
// tslint:enable:no-trailing-whitespace
// @Override
get grammarFileName() { return "matchParser.g4"; }
// @Override
get ruleNames() { return matchParser.ruleNames; }
// @Override
get serializedATN() { return matchParser._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, matchParser.RULE_bitmark);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 261;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 248;
this.bitmark_();
this.state = 258;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.S || _la === matchParser.NL) {
{
{
this.state = 252;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.S) {
{
{
this.state = 249;
this.match(matchParser.S);
}
}
this.state = 254;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 255;
this.match(matchParser.NL);
}
}
this.state = 260;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
this.state = 263;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << matchParser.BitMatch) | (1 << matchParser.BitMatchmatrix) | (1 << matchParser.BitMatchall) | (1 << matchParser.BitMatchrev) | (1 << matchParser.BitMatchallrev) | (1 << matchParser.BitMatchpic) | (1 << matchParser.BitMatchaudio) | (1 << matchParser.BitMatchsolgrp))) !== 0));
this.state = 265;
this.match(matchParser.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, matchParser.RULE_bitmark_);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 267;
this.matches();
}
}
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)
matches() {
let _localctx = new MatchesContext(this._ctx, this.state);
this.enterRule(_localctx, 4, matchParser.RULE_matches);
try {
this.state = 277;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case matchParser.BitMatch:
this.enterOuterAlt(_localctx, 1);
{
this.state = 269;
this.match_();
}
break;
case matchParser.BitMatchmatrix:
this.enterOuterAlt(_localctx, 2);
{
this.state = 270;
this.match_matrix();
}
break;
case matchParser.BitMatchall:
this.enterOuterAlt(_localctx, 3);
{
this.state = 271;
this.match_all();
}
break;
case matchParser.BitMatchallrev:
this.enterOuterAlt(_localctx, 4);
{
this.state = 272;
this.match_all_reverse();
}
break;
case matchParser.BitMatchrev:
this.enterOuterAlt(_localctx, 5);
{
this.state = 273;
this.match_reverse();
}
break;
case matchParser.BitMatchpic:
this.enterOuterAlt(_localctx, 6);
{
this.state = 274;
this.match_picture();
}
break;
case matchParser.BitMatchaudio:
this.enterOuterAlt(_localctx, 7);
{
this.state = 275;
this.match_audio();
}
break;
case matchParser.BitMatchsolgrp:
this.enterOuterAlt(_localctx, 8);
{
this.state = 276;
this.match_solution_grouped();
}
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)
match_() {
let _localctx = new Match_Context(this._ctx, this.state);
this.enterRule(_localctx, 6, matchParser.RULE_match_);
let _la;
try {
let _alt;
this.state = 348;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 15, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 279;
this.match(matchParser.BitMatch);
this.state = 280;
this.format();
this.state = 281;
this.match(matchParser.CL);
this.state = 285;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 4, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 282;
this.match(matchParser.NL);
}
}
}
this.state = 287;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 4, this._ctx);
}
this.state = 297;
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 = 288;
this.bitElem();
this.state = 292;
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 = 289;
this.match(matchParser.NL);
}
}
}
this.state = 294;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx);
}
}
}
}
this.state = 299;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);
}
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 300;
this.match(matchParser.BitMatch);
this.state = 301;
this.format();
this.state = 302;
this.match(matchParser.CL);
this.state = 304;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 303;
this.match(matchParser.NL);
}
}
this.state = 306;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === matchParser.NL);
this.state = 317;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << matchParser.S) | (1 << matchParser.OPDOLL) | (1 << matchParser.OPRANGLES) | (1 << matchParser.OPRANGLEL) | (1 << matchParser.OPDANGLE) | (1 << matchParser.OPU) | (1 << matchParser.OPB) | (1 << matchParser.OPQ) | (1 << matchParser.OPA) | (1 << matchParser.OPS) | (1 << matchParser.OPC) | (1 << matchParser.OPITEM) | (1 << matchParser.CL))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (matchParser.COLON - 32)) | (1 << (matchParser.AMP - 32)) | (1 << (matchParser.DBLCOLON - 32)) | (1 << (matchParser.Greater - 32)) | (1 << (matchParser.Less - 32)) | (1 << (matchParser.RightAngle - 32)) | (1 << (matchParser.RightArrow - 32)) | (1 << (matchParser.DCANY - 32)) | (1 << (matchParser.ArticleText - 32)) | (1 << (matchParser.NUMERIC - 32)) | (1 << (matchParser.STRING - 32)) | (1 << (matchParser.NOTBITMARK - 32)) | (1 << (matchParser.ELIPSIS - 32)) | (1 << (matchParser.SENTENCE - 32)) | (1 << (matchParser.BARSTRING - 32)) | (1 << (matchParser.AtReference - 32)))) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & ((1 << (matchParser.AtExampleWithStr - 68)) | (1 << (matchParser.AtExamplecol - 68)) | (1 << (matchParser.AtExamplecl - 68)) | (1 << (matchParser.AtSampleSolution - 68)) | (1 << (matchParser.AtLabeltrue - 68)) | (1 << (matchParser.AtLabelfalse - 68)) | (1 << (matchParser.OpAtCopyright - 68)))) !== 0) || ((((_la - 101)) & ~0x1F) === 0 && ((1 << (_la - 101)) & ((1 << (matchParser.OpAmpAudio - 101)) | (1 << (matchParser.OpAmpImage - 101)) | (1 << (matchParser.OpAmpImageZoom - 101)) | (1 << (matchParser.OpAmpVideo - 101)) | (1 << (matchParser.OpAmpArticle - 101)) | (1 << (matchParser.OpAmpDocument - 101)) | (1 << (matchParser.OpAmpApp - 101)) | (1 << (matchParser.OpAmpWebsite - 101)) | (1 << (matchParser.OpAmpStillImageFilm - 101)) | (1 << (matchParser.BracEnclose - 101)) | (1 << (matchParser.OpAmpAudioLink - 101)) | (1 << (matchParser.OpAmpImageLink - 101)) | (1 << (matchParser.OpAmpVideoLink - 101)) | (1 << (matchParser.OpAmpArticleLink - 101)) | (1 << (matchParser.OpAmpDocumentLink - 101)) | (1 << (matchParser.OpAmpDocumentDownload - 101)) | (1 << (matchParser.OpAmpAppLink - 101)) | (1 << (matchParser.OpAmpWebsiteLink - 101)) | (1 << (matchParser.OpAmpStillImageFilmLink - 101)))) !== 0) || ((((_la - 136)) & ~0x1F) === 0 && ((1 << (_la - 136)) & ((1 << (matchParser.OpAmpVideoEmbed - 136)) | (1 << (matchParser.OpAmpAudioEmbed - 136)) | (1 << (matchParser.OpAmpDocumentEmbed - 136)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 136)) | (1 << (matchParser.LIST_LINE - 136)))) !== 0)) {
{
{
this.state = 308;
this.bitElem();
this.state = 312;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.NL) {
{
{
this.state = 309;
this.match(matchParser.NL);
}
}
this.state = 314;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
this.state = 319;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 324;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 10, this._ctx)) {
case 1:
{
{
this.state = 320;
this.match(matchParser.HSPL);
this.state = 321;
this.match(matchParser.NL);
}
this.state = 323;
this.pair_heading();
}
break;
}
this.state = 326;
this.pairs();
this.state = 330;
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 = 327;
this.match(matchParser.NL);
}
}
}
this.state = 332;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 11, this._ctx);
}
this.state = 346;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
{
this.state = 333;
this.resource();
this.state = 343;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 13, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 337;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.NL) {
{
{
this.state = 334;
this.match(matchParser.NL);
}
}
this.state = 339;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 340;
this.resource();
}
}
}
this.state = 345;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 13, 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)
match_matrix() {
let _localctx = new Match_matrixContext(this._ctx, this.state);
this.enterRule(_localctx, 8, matchParser.RULE_match_matrix);
let _la;
try {
let _alt;
this.state = 419;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 27, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 350;
this.match(matchParser.BitMatchmatrix);
this.state = 351;
this.format();
this.state = 352;
this.match(matchParser.CL);
this.state = 356;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 353;
this.match(matchParser.NL);
}
}
}
this.state = 358;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx);
}
this.state = 368;
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 = 359;
this.bitElem();
this.state = 363;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 360;
this.match(matchParser.NL);
}
}
}
this.state = 365;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx);
}
}
}
}
this.state = 370;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx);
}
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 371;
this.match(matchParser.BitMatchmatrix);
this.state = 372;
this.format();
this.state = 373;
this.match(matchParser.CL);
this.state = 375;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 374;
this.match(matchParser.NL);
}
}
this.state = 377;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === matchParser.NL);
this.state = 388;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << matchParser.S) | (1 << matchParser.OPDOLL) | (1 << matchParser.OPRANGLES) | (1 << matchParser.OPRANGLEL) | (1 << matchParser.OPDANGLE) | (1 << matchParser.OPU) | (1 << matchParser.OPB) | (1 << matchParser.OPQ) | (1 << matchParser.OPA) | (1 << matchParser.OPS) | (1 << matchParser.OPC) | (1 << matchParser.OPITEM) | (1 << matchParser.CL))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (matchParser.COLON - 32)) | (1 << (matchParser.AMP - 32)) | (1 << (matchParser.DBLCOLON - 32)) | (1 << (matchParser.Greater - 32)) | (1 << (matchParser.Less - 32)) | (1 << (matchParser.RightAngle - 32)) | (1 << (matchParser.RightArrow - 32)) | (1 << (matchParser.DCANY - 32)) | (1 << (matchParser.ArticleText - 32)) | (1 << (matchParser.NUMERIC - 32)) | (1 << (matchParser.STRING - 32)) | (1 << (matchParser.NOTBITMARK - 32)) | (1 << (matchParser.ELIPSIS - 32)) | (1 << (matchParser.SENTENCE - 32)) | (1 << (matchParser.BARSTRING - 32)) | (1 << (matchParser.AtReference - 32)))) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & ((1 << (matchParser.AtExampleWithStr - 68)) | (1 << (matchParser.AtExamplecol - 68)) | (1 << (matchParser.AtExamplecl - 68)) | (1 << (matchParser.AtSampleSolution - 68)) | (1 << (matchParser.AtLabeltrue - 68)) | (1 << (matchParser.AtLabelfalse - 68)) | (1 << (matchParser.OpAtCopyright - 68)))) !== 0) || ((((_la - 101)) & ~0x1F) === 0 && ((1 << (_la - 101)) & ((1 << (matchParser.OpAmpAudio - 101)) | (1 << (matchParser.OpAmpImage - 101)) | (1 << (matchParser.OpAmpImageZoom - 101)) | (1 << (matchParser.OpAmpVideo - 101)) | (1 << (matchParser.OpAmpArticle - 101)) | (1 << (matchParser.OpAmpDocument - 101)) | (1 << (matchParser.OpAmpApp - 101)) | (1 << (matchParser.OpAmpWebsite - 101)) | (1 << (matchParser.OpAmpStillImageFilm - 101)) | (1 << (matchParser.BracEnclose - 101)) | (1 << (matchParser.OpAmpAudioLink - 101)) | (1 << (matchParser.OpAmpImageLink - 101)) | (1 << (matchParser.OpAmpVideoLink - 101)) | (1 << (matchParser.OpAmpArticleLink - 101)) | (1 << (matchParser.OpAmpDocumentLink - 101)) | (1 << (matchParser.OpAmpDocumentDownload - 101)) | (1 << (matchParser.OpAmpAppLink - 101)) | (1 << (matchParser.OpAmpWebsiteLink - 101)) | (1 << (matchParser.OpAmpStillImageFilmLink - 101)))) !== 0) || ((((_la - 136)) & ~0x1F) === 0 && ((1 << (_la - 136)) & ((1 << (matchParser.OpAmpVideoEmbed - 136)) | (1 << (matchParser.OpAmpAudioEmbed - 136)) | (1 << (matchParser.OpAmpDocumentEmbed - 136)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 136)) | (1 << (matchParser.LIST_LINE - 136)))) !== 0)) {
{
{
this.state = 379;
this.bitElem();
this.state = 383;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.NL) {
{
{
this.state = 380;
this.match(matchParser.NL);
}
}
this.state = 385;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
this.state = 390;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 395;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 22, this._ctx)) {
case 1:
{
{
this.state = 391;
this.match(matchParser.HSPL);
this.state = 392;
this.match(matchParser.NL);
}
this.state = 394;
this.pair_heading_multi();
}
break;
}
this.state = 397;
this.pair_multivals();
this.state = 401;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 398;
this.match(matchParser.NL);
}
}
}
this.state = 403;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx);
}
this.state = 417;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 26, this._ctx)) {
case 1:
{
this.state = 404;
this.resource();
this.state = 414;
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 = 408;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.NL) {
{
{
this.state = 405;
this.match(matchParser.NL);
}
}
this.state = 410;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 411;
this.resource();
}
}
}
this.state = 416;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 25, 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)
match_solution_grouped() {
let _localctx = new Match_solution_groupedContext(this._ctx, this.state);
this.enterRule(_localctx, 10, matchParser.RULE_match_solution_grouped);
let _la;
try {
let _alt;
this.state = 490;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 39, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 421;
this.match(matchParser.BitMatchsolgrp);
this.state = 422;
this.format();
this.state = 423;
this.match(matchParser.CL);
this.state = 427;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 28, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 424;
this.match(matchParser.NL);
}
}
}
this.state = 429;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 28, this._ctx);
}
this.state = 439;
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 = 430;
this.bitElem();
this.state = 434;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 29, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 431;
this.match(matchParser.NL);
}
}
}
this.state = 436;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 29, this._ctx);
}
}
}
}
this.state = 441;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx);
}
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 442;
this.match(matchParser.BitMatchsolgrp);
this.state = 443;
this.format();
this.state = 444;
this.match(matchParser.CL);
this.state = 446;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 445;
this.match(matchParser.NL);
}
}
this.state = 448;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === matchParser.NL);
this.state = 459;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << matchParser.S) | (1 << matchParser.OPDOLL) | (1 << matchParser.OPRANGLES) | (1 << matchParser.OPRANGLEL) | (1 << matchParser.OPDANGLE) | (1 << matchParser.OPU) | (1 << matchParser.OPB) | (1 << matchParser.OPQ) | (1 << matchParser.OPA) | (1 << matchParser.OPS) | (1 << matchParser.OPC) | (1 << matchParser.OPITEM) | (1 << matchParser.CL))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (matchParser.COLON - 32)) | (1 << (matchParser.AMP - 32)) | (1 << (matchParser.DBLCOLON - 32)) | (1 << (matchParser.Greater - 32)) | (1 << (matchParser.Less - 32)) | (1 << (matchParser.RightAngle - 32)) | (1 << (matchParser.RightArrow - 32)) | (1 << (matchParser.DCANY - 32)) | (1 << (matchParser.ArticleText - 32)) | (1 << (matchParser.NUMERIC - 32)) | (1 << (matchParser.STRING - 32)) | (1 << (matchParser.NOTBITMARK - 32)) | (1 << (matchParser.ELIPSIS - 32)) | (1 << (matchParser.SENTENCE - 32)) | (1 << (matchParser.BARSTRING - 32)) | (1 << (matchParser.AtReference - 32)))) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & ((1 << (matchParser.AtExampleWithStr - 68)) | (1 << (matchParser.AtExamplecol - 68)) | (1 << (matchParser.AtExamplecl - 68)) | (1 << (matchParser.AtSampleSolution - 68)) | (1 << (matchParser.AtLabeltrue - 68)) | (1 << (matchParser.AtLabelfalse - 68)) | (1 << (matchParser.OpAtCopyright - 68)))) !== 0) || ((((_la - 101)) & ~0x1F) === 0 && ((1 << (_la - 101)) & ((1 << (matchParser.OpAmpAudio - 101)) | (1 << (matchParser.OpAmpImage - 101)) | (1 << (matchParser.OpAmpImageZoom - 101)) | (1 << (matchParser.OpAmpVideo - 101)) | (1 << (matchParser.OpAmpArticle - 101)) | (1 << (matchParser.OpAmpDocument - 101)) | (1 << (matchParser.OpAmpApp - 101)) | (1 << (matchParser.OpAmpWebsite - 101)) | (1 << (matchParser.OpAmpStillImageFilm - 101)) | (1 << (matchParser.BracEnclose - 101)) | (1 << (matchParser.OpAmpAudioLink - 101)) | (1 << (matchParser.OpAmpImageLink - 101)) | (1 << (matchParser.OpAmpVideoLink - 101)) | (1 << (matchParser.OpAmpArticleLink - 101)) | (1 << (matchParser.OpAmpDocumentLink - 101)) | (1 << (matchParser.OpAmpDocumentDownload - 101)) | (1 << (matchParser.OpAmpAppLink - 101)) | (1 << (matchParser.OpAmpWebsiteLink - 101)) | (1 << (matchParser.OpAmpStillImageFilmLink - 101)))) !== 0) || ((((_la - 136)) & ~0x1F) === 0 && ((1 << (_la - 136)) & ((1 << (matchParser.OpAmpVideoEmbed - 136)) | (1 << (matchParser.OpAmpAudioEmbed - 136)) | (1 << (matchParser.OpAmpDocumentEmbed - 136)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 136)) | (1 << (matchParser.LIST_LINE - 136)))) !== 0)) {
{
{
this.state = 450;
this.bitElem();
this.state = 454;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === matchParser.NL) {
{
{
this.state = 451;
this.match(matchParser.NL);
}
}
this.state = 456;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
this.state = 461;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 466;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 34, this._ctx)) {
case 1:
{
{
this.state = 462;
this.match(matchParser.HSPL);
this.state = 463;
this.match(matchParser.NL);
}
this.state = 465;
this.pair_heading();
}
break;
}
this.state = 468;
this.pairs();
this.state = 472;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 35, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 469;
this.match(matchParser.NL);
}
}
}
this.state = 474;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 35, this._ctx);
}
this.state = 488;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 38, this._ctx)) {
case 1:
{
this.state = 475;
this.resource();
this.state = 485;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 37, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 479;
this._errHandler.sync(this);
_la = this._input.LA(1);