UNPKG

bitmark-grammar

Version:
904 lines 629 kB
// Generated from ./Match/matchParser.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 matchParser extends Parser { constructor(input) { super(input); this._interp = new 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(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) { _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) { _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(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) match_() { let _localctx = new Match_Context(this._ctx, this.state); this.enterRule(_localctx, 6, matchParser.RULE_match_); let _la; try { let _alt; 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 = 283; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 282; this.match(matchParser.NL); } } this.state = 285; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === matchParser.NL); this.state = 296; 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.CL) | (1 << matchParser.COLON) | (1 << matchParser.AMP) | (1 << matchParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (matchParser.Greater - 33)) | (1 << (matchParser.Less - 33)) | (1 << (matchParser.RightAngle - 33)) | (1 << (matchParser.RightArrow - 33)) | (1 << (matchParser.DCANY - 33)) | (1 << (matchParser.ArticleText - 33)) | (1 << (matchParser.NUMERIC - 33)) | (1 << (matchParser.STRING - 33)) | (1 << (matchParser.NOTBITMARK - 33)) | (1 << (matchParser.SENTENCE - 33)) | (1 << (matchParser.BARSTRING - 33)) | (1 << (matchParser.AtReference - 33)) | (1 << (matchParser.AtExampleWithStr - 33)) | (1 << (matchParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (matchParser.AtExamplecl - 65)) | (1 << (matchParser.AtLabeltrue - 65)) | (1 << (matchParser.AtLabelfalse - 65)) | (1 << (matchParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (matchParser.OpAmpAudio - 97)) | (1 << (matchParser.OpAmpImage - 97)) | (1 << (matchParser.OpAmpImageZoom - 97)) | (1 << (matchParser.OpAmpImageWAudio - 97)) | (1 << (matchParser.OpAmpVideo - 97)) | (1 << (matchParser.OpAmpArticle - 97)) | (1 << (matchParser.OpAmpDocument - 97)) | (1 << (matchParser.OpAmpApp - 97)) | (1 << (matchParser.OpAmpWebsite - 97)) | (1 << (matchParser.OpAmpStillImageFilm - 97)) | (1 << (matchParser.BracEnclose - 97)) | (1 << (matchParser.OpAmpAudioLink - 97)) | (1 << (matchParser.OpAmpImageLink - 97)) | (1 << (matchParser.OpAmpVideoLink - 97)) | (1 << (matchParser.OpAmpArticleLink - 97)) | (1 << (matchParser.OpAmpDocumentLink - 97)) | (1 << (matchParser.OpAmpDocumentDownload - 97)) | (1 << (matchParser.OpAmpAppLink - 97)) | (1 << (matchParser.OpAmpWebsiteLink - 97)) | (1 << (matchParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (matchParser.OpAmpVideoEmbed - 133)) | (1 << (matchParser.OpAmpAudioEmbed - 133)) | (1 << (matchParser.OpAmpDocumentEmbed - 133)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (matchParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 287; this.bitElem(); this.state = 291; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 288; this.match(matchParser.NL); } } this.state = 293; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 298; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 303; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 7, this._ctx)) { case 1: { { this.state = 299; this.match(matchParser.HSPL); this.state = 300; this.match(matchParser.NL); } this.state = 302; this.pair_heading(); } break; } this.state = 305; this.pairs(); this.state = 309; 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 = 306; this.match(matchParser.NL); } } } this.state = 311; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx); } this.state = 325; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 11, this._ctx)) { case 1: { this.state = 312; this.resource(); this.state = 322; 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 = 316; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 313; this.match(matchParser.NL); } } this.state = 318; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 319; this.resource(); } } } this.state = 324; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 10, 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) 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.enterOuterAlt(_localctx, 1); { this.state = 327; this.match(matchParser.BitMatchmatrix); this.state = 328; this.format(); this.state = 329; this.match(matchParser.CL); this.state = 331; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 330; this.match(matchParser.NL); } } this.state = 333; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === matchParser.NL); this.state = 344; 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.CL) | (1 << matchParser.COLON) | (1 << matchParser.AMP) | (1 << matchParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (matchParser.Greater - 33)) | (1 << (matchParser.Less - 33)) | (1 << (matchParser.RightAngle - 33)) | (1 << (matchParser.RightArrow - 33)) | (1 << (matchParser.DCANY - 33)) | (1 << (matchParser.ArticleText - 33)) | (1 << (matchParser.NUMERIC - 33)) | (1 << (matchParser.STRING - 33)) | (1 << (matchParser.NOTBITMARK - 33)) | (1 << (matchParser.SENTENCE - 33)) | (1 << (matchParser.BARSTRING - 33)) | (1 << (matchParser.AtReference - 33)) | (1 << (matchParser.AtExampleWithStr - 33)) | (1 << (matchParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (matchParser.AtExamplecl - 65)) | (1 << (matchParser.AtLabeltrue - 65)) | (1 << (matchParser.AtLabelfalse - 65)) | (1 << (matchParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (matchParser.OpAmpAudio - 97)) | (1 << (matchParser.OpAmpImage - 97)) | (1 << (matchParser.OpAmpImageZoom - 97)) | (1 << (matchParser.OpAmpImageWAudio - 97)) | (1 << (matchParser.OpAmpVideo - 97)) | (1 << (matchParser.OpAmpArticle - 97)) | (1 << (matchParser.OpAmpDocument - 97)) | (1 << (matchParser.OpAmpApp - 97)) | (1 << (matchParser.OpAmpWebsite - 97)) | (1 << (matchParser.OpAmpStillImageFilm - 97)) | (1 << (matchParser.BracEnclose - 97)) | (1 << (matchParser.OpAmpAudioLink - 97)) | (1 << (matchParser.OpAmpImageLink - 97)) | (1 << (matchParser.OpAmpVideoLink - 97)) | (1 << (matchParser.OpAmpArticleLink - 97)) | (1 << (matchParser.OpAmpDocumentLink - 97)) | (1 << (matchParser.OpAmpDocumentDownload - 97)) | (1 << (matchParser.OpAmpAppLink - 97)) | (1 << (matchParser.OpAmpWebsiteLink - 97)) | (1 << (matchParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (matchParser.OpAmpVideoEmbed - 133)) | (1 << (matchParser.OpAmpAudioEmbed - 133)) | (1 << (matchParser.OpAmpDocumentEmbed - 133)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (matchParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 335; this.bitElem(); this.state = 339; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 336; this.match(matchParser.NL); } } this.state = 341; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 346; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 351; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 15, this._ctx)) { case 1: { { this.state = 347; this.match(matchParser.HSPL); this.state = 348; this.match(matchParser.NL); } this.state = 350; this.pair_heading_multi(); } break; } this.state = 353; this.pair_multivals(); this.state = 357; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 354; this.match(matchParser.NL); } } } this.state = 359; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx); } this.state = 373; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 19, this._ctx)) { case 1: { this.state = 360; this.resource(); this.state = 370; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 364; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 361; this.match(matchParser.NL); } } this.state = 366; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 367; this.resource(); } } } this.state = 372; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 18, 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) 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.enterOuterAlt(_localctx, 1); { this.state = 375; this.match(matchParser.BitMatchsolgrp); this.state = 376; this.format(); this.state = 377; this.match(matchParser.CL); this.state = 379; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 378; this.match(matchParser.NL); } } this.state = 381; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === matchParser.NL); this.state = 392; 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.CL) | (1 << matchParser.COLON) | (1 << matchParser.AMP) | (1 << matchParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (matchParser.Greater - 33)) | (1 << (matchParser.Less - 33)) | (1 << (matchParser.RightAngle - 33)) | (1 << (matchParser.RightArrow - 33)) | (1 << (matchParser.DCANY - 33)) | (1 << (matchParser.ArticleText - 33)) | (1 << (matchParser.NUMERIC - 33)) | (1 << (matchParser.STRING - 33)) | (1 << (matchParser.NOTBITMARK - 33)) | (1 << (matchParser.SENTENCE - 33)) | (1 << (matchParser.BARSTRING - 33)) | (1 << (matchParser.AtReference - 33)) | (1 << (matchParser.AtExampleWithStr - 33)) | (1 << (matchParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (matchParser.AtExamplecl - 65)) | (1 << (matchParser.AtLabeltrue - 65)) | (1 << (matchParser.AtLabelfalse - 65)) | (1 << (matchParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (matchParser.OpAmpAudio - 97)) | (1 << (matchParser.OpAmpImage - 97)) | (1 << (matchParser.OpAmpImageZoom - 97)) | (1 << (matchParser.OpAmpImageWAudio - 97)) | (1 << (matchParser.OpAmpVideo - 97)) | (1 << (matchParser.OpAmpArticle - 97)) | (1 << (matchParser.OpAmpDocument - 97)) | (1 << (matchParser.OpAmpApp - 97)) | (1 << (matchParser.OpAmpWebsite - 97)) | (1 << (matchParser.OpAmpStillImageFilm - 97)) | (1 << (matchParser.BracEnclose - 97)) | (1 << (matchParser.OpAmpAudioLink - 97)) | (1 << (matchParser.OpAmpImageLink - 97)) | (1 << (matchParser.OpAmpVideoLink - 97)) | (1 << (matchParser.OpAmpArticleLink - 97)) | (1 << (matchParser.OpAmpDocumentLink - 97)) | (1 << (matchParser.OpAmpDocumentDownload - 97)) | (1 << (matchParser.OpAmpAppLink - 97)) | (1 << (matchParser.OpAmpWebsiteLink - 97)) | (1 << (matchParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (matchParser.OpAmpVideoEmbed - 133)) | (1 << (matchParser.OpAmpAudioEmbed - 133)) | (1 << (matchParser.OpAmpDocumentEmbed - 133)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (matchParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 383; this.bitElem(); this.state = 387; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 384; this.match(matchParser.NL); } } this.state = 389; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 394; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 399; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 23, this._ctx)) { case 1: { { this.state = 395; this.match(matchParser.HSPL); this.state = 396; this.match(matchParser.NL); } this.state = 398; this.pair_heading(); } break; } this.state = 401; this.pairs(); this.state = 405; 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 = 402; this.match(matchParser.NL); } } } this.state = 407; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 24, this._ctx); } this.state = 421; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 27, this._ctx)) { case 1: { this.state = 408; this.resource(); this.state = 418; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 26, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 412; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 409; this.match(matchParser.NL); } } this.state = 414; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 415; this.resource(); } } } this.state = 420; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 26, 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) match_reverse() { let _localctx = new Match_reverseContext(this._ctx, this.state); this.enterRule(_localctx, 12, matchParser.RULE_match_reverse); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 423; this.match(matchParser.BitMatchrev); this.state = 424; this.format(); this.state = 425; this.match(matchParser.CL); this.state = 427; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 426; this.match(matchParser.NL); } } this.state = 429; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === matchParser.NL); this.state = 440; 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.CL) | (1 << matchParser.COLON) | (1 << matchParser.AMP) | (1 << matchParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (matchParser.Greater - 33)) | (1 << (matchParser.Less - 33)) | (1 << (matchParser.RightAngle - 33)) | (1 << (matchParser.RightArrow - 33)) | (1 << (matchParser.DCANY - 33)) | (1 << (matchParser.ArticleText - 33)) | (1 << (matchParser.NUMERIC - 33)) | (1 << (matchParser.STRING - 33)) | (1 << (matchParser.NOTBITMARK - 33)) | (1 << (matchParser.SENTENCE - 33)) | (1 << (matchParser.BARSTRING - 33)) | (1 << (matchParser.AtReference - 33)) | (1 << (matchParser.AtExampleWithStr - 33)) | (1 << (matchParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (matchParser.AtExamplecl - 65)) | (1 << (matchParser.AtLabeltrue - 65)) | (1 << (matchParser.AtLabelfalse - 65)) | (1 << (matchParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (matchParser.OpAmpAudio - 97)) | (1 << (matchParser.OpAmpImage - 97)) | (1 << (matchParser.OpAmpImageZoom - 97)) | (1 << (matchParser.OpAmpImageWAudio - 97)) | (1 << (matchParser.OpAmpVideo - 97)) | (1 << (matchParser.OpAmpArticle - 97)) | (1 << (matchParser.OpAmpDocument - 97)) | (1 << (matchParser.OpAmpApp - 97)) | (1 << (matchParser.OpAmpWebsite - 97)) | (1 << (matchParser.OpAmpStillImageFilm - 97)) | (1 << (matchParser.BracEnclose - 97)) | (1 << (matchParser.OpAmpAudioLink - 97)) | (1 << (matchParser.OpAmpImageLink - 97)) | (1 << (matchParser.OpAmpVideoLink - 97)) | (1 << (matchParser.OpAmpArticleLink - 97)) | (1 << (matchParser.OpAmpDocumentLink - 97)) | (1 << (matchParser.OpAmpDocumentDownload - 97)) | (1 << (matchParser.OpAmpAppLink - 97)) | (1 << (matchParser.OpAmpWebsiteLink - 97)) | (1 << (matchParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (matchParser.OpAmpVideoEmbed - 133)) | (1 << (matchParser.OpAmpAudioEmbed - 133)) | (1 << (matchParser.OpAmpDocumentEmbed - 133)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (matchParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 431; this.bitElem(); this.state = 435; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 432; this.match(matchParser.NL); } } this.state = 437; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 442; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 447; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 31, this._ctx)) { case 1: { { this.state = 443; this.match(matchParser.HSPL); this.state = 444; this.match(matchParser.NL); } this.state = 446; this.pair_heading(); } break; } this.state = 449; this.pairs(); this.state = 453; 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 = 450; this.match(matchParser.NL); } } } this.state = 455; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx); } this.state = 469; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 35, this._ctx)) { case 1: { this.state = 456; this.resource(); this.state = 466; 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 = 460; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 457; this.match(matchParser.NL); } } this.state = 462; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 463; this.resource(); } } } this.state = 468; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 34, 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) match_all_reverse() { let _localctx = new Match_all_reverseContext(this._ctx, this.state); this.enterRule(_localctx, 14, matchParser.RULE_match_all_reverse); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 471; this.match(matchParser.BitMatchallrev); this.state = 472; this.format(); this.state = 473; this.match(matchParser.CL); this.state = 475; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 474; this.match(matchParser.NL); } } this.state = 477; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === matchParser.NL); this.state = 488; 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.CL) | (1 << matchParser.COLON) | (1 << matchParser.AMP) | (1 << matchParser.DBLCOLON))) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & ((1 << (matchParser.Greater - 33)) | (1 << (matchParser.Less - 33)) | (1 << (matchParser.RightAngle - 33)) | (1 << (matchParser.RightArrow - 33)) | (1 << (matchParser.DCANY - 33)) | (1 << (matchParser.ArticleText - 33)) | (1 << (matchParser.NUMERIC - 33)) | (1 << (matchParser.STRING - 33)) | (1 << (matchParser.NOTBITMARK - 33)) | (1 << (matchParser.SENTENCE - 33)) | (1 << (matchParser.BARSTRING - 33)) | (1 << (matchParser.AtReference - 33)) | (1 << (matchParser.AtExampleWithStr - 33)) | (1 << (matchParser.AtExamplecol - 33)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (matchParser.AtExamplecl - 65)) | (1 << (matchParser.AtLabeltrue - 65)) | (1 << (matchParser.AtLabelfalse - 65)) | (1 << (matchParser.OpAtCopyright - 65)))) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & ((1 << (matchParser.OpAmpAudio - 97)) | (1 << (matchParser.OpAmpImage - 97)) | (1 << (matchParser.OpAmpImageZoom - 97)) | (1 << (matchParser.OpAmpImageWAudio - 97)) | (1 << (matchParser.OpAmpVideo - 97)) | (1 << (matchParser.OpAmpArticle - 97)) | (1 << (matchParser.OpAmpDocument - 97)) | (1 << (matchParser.OpAmpApp - 97)) | (1 << (matchParser.OpAmpWebsite - 97)) | (1 << (matchParser.OpAmpStillImageFilm - 97)) | (1 << (matchParser.BracEnclose - 97)) | (1 << (matchParser.OpAmpAudioLink - 97)) | (1 << (matchParser.OpAmpImageLink - 97)) | (1 << (matchParser.OpAmpVideoLink - 97)) | (1 << (matchParser.OpAmpArticleLink - 97)) | (1 << (matchParser.OpAmpDocumentLink - 97)) | (1 << (matchParser.OpAmpDocumentDownload - 97)) | (1 << (matchParser.OpAmpAppLink - 97)) | (1 << (matchParser.OpAmpWebsiteLink - 97)) | (1 << (matchParser.OpAmpStillImageFilmLink - 97)))) !== 0) || ((((_la - 133)) & ~0x1F) === 0 && ((1 << (_la - 133)) & ((1 << (matchParser.OpAmpVideoEmbed - 133)) | (1 << (matchParser.OpAmpAudioEmbed - 133)) | (1 << (matchParser.OpAmpDocumentEmbed - 133)) | (1 << (matchParser.OpAmpStillImageFilmEmbed - 133)) | (1 << (matchParser.LIST_LINE - 133)))) !== 0)) { { { this.state = 479; this.bitElem(); this.state = 483; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === matchParser.NL) { { { this.state = 480; this.match(matchParser.NL); } } this.state = 485; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 490; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 495; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 39, this._ctx)) { case 1: { { this.state = 491; this.match(matchParser.HSPL); this.state = 492; this.match(matchParser.NL); } this.state = 494; this.pair_heading(); } break; } this.state = 497; this.pairs(); this.state = 501; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 40, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 498; this.match(matchParser.NL); } } } this.state = 503; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 40, this._ctx); } this.state = 517; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 43, this._ctx)) { case 1: { this.state = 504; this.resource(); this.state = 514; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 42, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_