bitmark-grammar
Version:
1,135 lines (1,134 loc) • 847 kB
JavaScript
// Generated from ./typescript//bitmark.g4 by ANTLR 4.7.3-SNAPSHOT
import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
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";
let bitmark = /** @class */ (() => {
class bitmark extends Parser {
constructor(input) {
super(input);
this._interp = new ParserATNSimulator(bitmark._ATN, this);
}
// @Override
// @NotNull
get vocabulary() {
return bitmark.VOCABULARY;
}
// tslint:enable:no-trailing-whitespace
// @Override
get grammarFileName() { return "bitmark.g4"; }
// @Override
get ruleNames() { return bitmark.ruleNames; }
// @Override
get serializedATN() { return bitmark._serializedATN; }
// @RuleVersion(0)
bitmark() {
let _localctx = new BitmarkContext(this._ctx, this.state);
this.enterRule(_localctx, 0, bitmark.RULE_bitmark);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 358;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 348;
this.bitmark_();
this.state = 355;
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 = 350;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.SP) {
{
this.state = 349;
this.sp();
}
}
this.state = 352;
this.nl();
}
}
}
this.state = 357;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx);
}
}
}
this.state = 360;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << bitmark.BitBook) | (1 << bitmark.BitChapter) | (1 << bitmark.BitToc) | (1 << bitmark.BitSummary) | (1 << bitmark.BitIntlink) | (1 << bitmark.BitAlias) | (1 << bitmark.BitGroups) | (1 << bitmark.BitGroupt) | (1 << bitmark.BitCloze) | (1 << bitmark.BitClozeinstgrp) | (1 << bitmark.BitClozesolgrp) | (1 << bitmark.BitMultichoice1) | (1 << bitmark.BitMultichoice) | (1 << bitmark.BitMultiresp1) | (1 << bitmark.BitMultiresp) | (1 << bitmark.BitMultichoisetext) | (1 << bitmark.BitClozeandmulti) | (1 << bitmark.BitEssay) | (1 << bitmark.BitArticleattach) | (1 << bitmark.BitInterview) | (1 << bitmark.BitInterviewinstgrp) | (1 << bitmark.BitMatch) | (1 << bitmark.BitMatchall) | (1 << bitmark.BitMatchrev) | (1 << bitmark.BitMatchallrev) | (1 << bitmark.BitMatchpic) | (1 << bitmark.BitMatchaudio) | (1 << bitmark.BitMatchsolgrp) | (1 << bitmark.BitTruefalse1) | (1 << bitmark.BitTruefalse) | (1 << bitmark.BitSequence))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (bitmark.BitCorrection - 32)) | (1 << (bitmark.BitMark - 32)) | (1 << (bitmark.BitDocup - 32)) | (1 << (bitmark.BitTakepic - 32)) | (1 << (bitmark.BitRecaud - 32)) | (1 << (bitmark.BitPrepnote - 32)) | (1 << (bitmark.BitAssign - 32)) | (1 << (bitmark.BitFlash1 - 32)) | (1 << (bitmark.BitFlash - 32)) | (1 << (bitmark.BitArticle - 32)) | (1 << (bitmark.BitChat - 32)) | (1 << (bitmark.BitConv - 32)) | (1 << (bitmark.BitBotint - 32)) | (1 << (bitmark.BitSelfassess - 32)) | (1 << (bitmark.BitRating - 32)) | (1 << (bitmark.BitSurvey - 32)) | (1 << (bitmark.BitSurvey1 - 32)) | (1 << (bitmark.BitSurveyanon - 32)) | (1 << (bitmark.BitSurveyanon1 - 32)) | (1 << (bitmark.OPESC - 32)) | (1 << (bitmark.OPDANGLE - 32)) | (1 << (bitmark.OPQ - 32)))) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & ((1 << (bitmark.OPS - 65)) | (1 << (bitmark.COLON - 65)) | (1 << (bitmark.AMP - 65)) | (1 << (bitmark.Greater - 65)) | (1 << (bitmark.Less - 65)) | (1 << (bitmark.LIST_LINE - 65)) | (1 << (bitmark.EMP1 - 65)) | (1 << (bitmark.EMP2 - 65)) | (1 << (bitmark.EMP3 - 65)) | (1 << (bitmark.NOTE - 65)) | (1 << (bitmark.REM - 65)))) !== 0) || ((((_la - 99)) & ~0x1F) === 0 && ((1 << (_la - 99)) & ((1 << (bitmark.NUMERIC - 99)) | (1 << (bitmark.STRING - 99)) | (1 << (bitmark.SP - 99)) | (1 << (bitmark.SENTENCE - 99)) | (1 << (bitmark.AtReference - 99)))) !== 0));
this.state = 362;
this.match(bitmark.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, bitmark.RULE_bitmark_);
try {
this.state = 366;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 3, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 364;
this.bit();
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 365;
this.lines();
}
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)
bit() {
let _localctx = new BitContext(this._ctx, this.state);
this.enterRule(_localctx, 4, bitmark.RULE_bit);
try {
this.state = 424;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case bitmark.BitBook:
this.enterOuterAlt(_localctx, 1);
{
this.state = 368;
this.book();
}
break;
case bitmark.BitChapter:
this.enterOuterAlt(_localctx, 2);
{
this.state = 369;
this.chapter();
}
break;
case bitmark.LIST_LINE:
this.enterOuterAlt(_localctx, 3);
{
this.state = 370;
this.listline_();
}
break;
case bitmark.EMP1:
case bitmark.EMP2:
case bitmark.EMP3:
this.enterOuterAlt(_localctx, 4);
{
this.state = 371;
this.titlestar_();
}
break;
case bitmark.REM:
this.enterOuterAlt(_localctx, 5);
{
this.state = 372;
this.remark_();
}
break;
case bitmark.AtReference:
this.enterOuterAlt(_localctx, 6);
{
this.state = 373;
this.reference();
}
break;
case bitmark.BitSummary:
this.enterOuterAlt(_localctx, 7);
{
this.state = 374;
this.summary();
}
break;
case bitmark.BitToc:
this.enterOuterAlt(_localctx, 8);
{
this.state = 375;
this.toc();
}
break;
case bitmark.BitAlias:
this.enterOuterAlt(_localctx, 9);
{
this.state = 376;
this.bit_alias();
}
break;
case bitmark.BitIntlink:
this.enterOuterAlt(_localctx, 10);
{
this.state = 377;
this.internal_link();
}
break;
case bitmark.OPDANGLE:
this.enterOuterAlt(_localctx, 11);
{
this.state = 378;
this.anchor();
}
break;
case bitmark.BitGroups:
this.enterOuterAlt(_localctx, 12);
{
this.state = 379;
this.group_born();
}
break;
case bitmark.BitGroupt:
this.enterOuterAlt(_localctx, 13);
{
this.state = 380;
this.group_died();
}
break;
case bitmark.BitCloze:
this.enterOuterAlt(_localctx, 14);
{
this.state = 381;
this.cloze();
}
break;
case bitmark.BitClozeinstgrp:
this.enterOuterAlt(_localctx, 15);
{
this.state = 382;
this.cloze_instruction_grouped();
}
break;
case bitmark.BitClozesolgrp:
this.enterOuterAlt(_localctx, 16);
{
this.state = 383;
this.cloze_solution_grouped();
}
break;
case bitmark.BitClozeandmulti:
this.enterOuterAlt(_localctx, 17);
{
this.state = 384;
this.cloze_and_multiple_choice_text();
}
break;
case bitmark.BitMultichoice:
this.enterOuterAlt(_localctx, 18);
{
this.state = 385;
this.multiple_choice();
}
break;
case bitmark.BitMultichoice1:
this.enterOuterAlt(_localctx, 19);
{
this.state = 386;
this.multiple_choice_1();
}
break;
case bitmark.BitMultichoisetext:
this.enterOuterAlt(_localctx, 20);
{
this.state = 387;
this.multiple_choice_text();
}
break;
case bitmark.BitMultiresp:
this.enterOuterAlt(_localctx, 21);
{
this.state = 388;
this.multiple_response();
}
break;
case bitmark.BitMultiresp1:
this.enterOuterAlt(_localctx, 22);
{
this.state = 389;
this.multiple_response_1();
}
break;
case bitmark.BitEssay:
this.enterOuterAlt(_localctx, 23);
{
this.state = 390;
this.essay();
}
break;
case bitmark.BitInterview:
this.enterOuterAlt(_localctx, 24);
{
this.state = 391;
this.interview();
}
break;
case bitmark.BitInterviewinstgrp:
this.enterOuterAlt(_localctx, 25);
{
this.state = 392;
this.interview_instruction_grouped();
}
break;
case bitmark.BitMatch:
this.enterOuterAlt(_localctx, 26);
{
this.state = 393;
this.match_();
}
break;
case bitmark.BitMatchall:
this.enterOuterAlt(_localctx, 27);
{
this.state = 394;
this.match_all();
}
break;
case bitmark.BitMatchallrev:
this.enterOuterAlt(_localctx, 28);
{
this.state = 395;
this.match_all_reverse();
}
break;
case bitmark.BitMatchrev:
this.enterOuterAlt(_localctx, 29);
{
this.state = 396;
this.match_reverse();
}
break;
case bitmark.BitMatchpic:
this.enterOuterAlt(_localctx, 30);
{
this.state = 397;
this.match_picture();
}
break;
case bitmark.BitMatchaudio:
this.enterOuterAlt(_localctx, 31);
{
this.state = 398;
this.match_audio();
}
break;
case bitmark.BitMatchsolgrp:
this.enterOuterAlt(_localctx, 32);
{
this.state = 399;
this.match_solution_grouped();
}
break;
case bitmark.BitTruefalse1:
this.enterOuterAlt(_localctx, 33);
{
this.state = 400;
this.true_false_1();
}
break;
case bitmark.BitTruefalse:
this.enterOuterAlt(_localctx, 34);
{
this.state = 401;
this.true_false();
}
break;
case bitmark.BitSequence:
this.enterOuterAlt(_localctx, 35);
{
this.state = 402;
this.sequence();
}
break;
case bitmark.BitCorrection:
this.enterOuterAlt(_localctx, 36);
{
this.state = 403;
this.correction();
}
break;
case bitmark.BitMark:
this.enterOuterAlt(_localctx, 37);
{
this.state = 404;
this.mark_();
}
break;
case bitmark.BitDocup:
this.enterOuterAlt(_localctx, 38);
{
this.state = 405;
this.document_upload();
}
break;
case bitmark.BitTakepic:
this.enterOuterAlt(_localctx, 39);
{
this.state = 406;
this.take_picture();
}
break;
case bitmark.BitRecaud:
this.enterOuterAlt(_localctx, 40);
{
this.state = 407;
this.record_audio();
}
break;
case bitmark.BitPrepnote:
this.enterOuterAlt(_localctx, 41);
{
this.state = 408;
this.preparation_note();
}
break;
case bitmark.BitAssign:
this.enterOuterAlt(_localctx, 42);
{
this.state = 409;
this.assignment();
}
break;
case bitmark.BitArticle:
this.enterOuterAlt(_localctx, 43);
{
this.state = 410;
this.article();
}
break;
case bitmark.BitArticleattach:
this.enterOuterAlt(_localctx, 44);
{
this.state = 411;
this.article_attachment();
}
break;
case bitmark.BitFlash:
this.enterOuterAlt(_localctx, 45);
{
this.state = 412;
this.flashcard();
}
break;
case bitmark.BitFlash1:
this.enterOuterAlt(_localctx, 46);
{
this.state = 413;
this.flashcard_1();
}
break;
case bitmark.BitChat:
this.enterOuterAlt(_localctx, 47);
{
this.state = 414;
this.chat();
}
break;
case bitmark.BitConv:
this.enterOuterAlt(_localctx, 48);
{
this.state = 415;
this.conversation();
}
break;
case bitmark.BitBotint:
this.enterOuterAlt(_localctx, 49);
{
this.state = 416;
this.bot_interview();
}
break;
case bitmark.BitSelfassess:
this.enterOuterAlt(_localctx, 50);
{
this.state = 417;
this.self_assessment();
}
break;
case bitmark.BitRating:
this.enterOuterAlt(_localctx, 51);
{
this.state = 418;
this.rating();
}
break;
case bitmark.BitSurvey:
this.enterOuterAlt(_localctx, 52);
{
this.state = 419;
this.survey();
}
break;
case bitmark.BitSurvey1:
this.enterOuterAlt(_localctx, 53);
{
this.state = 420;
this.survey_1();
}
break;
case bitmark.BitSurveyanon:
this.enterOuterAlt(_localctx, 54);
{
this.state = 421;
this.survey_anonymous();
}
break;
case bitmark.BitSurveyanon1:
this.enterOuterAlt(_localctx, 55);
{
this.state = 422;
this.survey_anonymous_1();
}
break;
case bitmark.OPQ:
this.enterOuterAlt(_localctx, 56);
{
this.state = 423;
this.hint();
}
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)
book() {
let _localctx = new BookContext(this._ctx, this.state);
this.enterRule(_localctx, 6, bitmark.RULE_book);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 426;
this.match(bitmark.BitBook);
this.state = 428;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.ColonCollection || _la === bitmark.ColonBook) {
{
this.state = 427;
_la = this._input.LA(1);
if (!(_la === bitmark.ColonCollection || _la === bitmark.ColonBook)) {
this._errHandler.recoverInline(this);
}
else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
this.state = 431;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.SP) {
{
this.state = 430;
this.sp();
}
}
this.state = 433;
this.cl();
this.state = 437;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 434;
this.nl();
}
}
}
this.state = 439;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx);
}
this.state = 440;
this.title_etc();
}
}
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)
chapter() {
let _localctx = new ChapterContext(this._ctx, this.state);
this.enterRule(_localctx, 8, bitmark.RULE_chapter);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 442;
this.match(bitmark.BitChapter);
this.state = 450;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.COLON) {
{
this.state = 443;
this.match(bitmark.COLON);
this.state = 446;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
this.state = 446;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 8, this._ctx)) {
case 1:
{
this.state = 444;
this.s_and_w();
}
break;
case 2:
{
this.state = 445;
this.match(bitmark.COLON);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 448;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
}
}
this.state = 453;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.SP) {
{
this.state = 452;
this.sp();
}
}
this.state = 455;
this.cl();
this.state = 456;
this.title_etc();
}
}
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)
title() {
let _localctx = new TitleContext(this._ctx, this.state);
this.enterRule(_localctx, 10, bitmark.RULE_title);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 458;
this.match(bitmark.OPHASH);
this.state = 460;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 459;
this.s_and_w();
}
}
this.state = 462;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (((((_la - 53)) & ~0x1F) === 0 && ((1 << (_la - 53)) & ((1 << (bitmark.OPESC - 53)) | (1 << (bitmark.OPS - 53)) | (1 << (bitmark.COLON - 53)) | (1 << (bitmark.AMP - 53)) | (1 << (bitmark.Greater - 53)) | (1 << (bitmark.Less - 53)))) !== 0) || ((((_la - 87)) & ~0x1F) === 0 && ((1 << (_la - 87)) & ((1 << (bitmark.EMP1 - 87)) | (1 << (bitmark.EMP2 - 87)) | (1 << (bitmark.EMP3 - 87)) | (1 << (bitmark.NOTE - 87)) | (1 << (bitmark.REM - 87)) | (1 << (bitmark.NUMERIC - 87)) | (1 << (bitmark.STRING - 87)) | (1 << (bitmark.SP - 87)) | (1 << (bitmark.SENTENCE - 87)))) !== 0));
this.state = 464;
this.cl();
}
}
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)
subtitle() {
let _localctx = new SubtitleContext(this._ctx, this.state);
this.enterRule(_localctx, 12, bitmark.RULE_subtitle);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 466;
this.match(bitmark.OPHASH2);
this.state = 468;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 467;
this.s_and_w();
}
}
this.state = 470;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (((((_la - 53)) & ~0x1F) === 0 && ((1 << (_la - 53)) & ((1 << (bitmark.OPESC - 53)) | (1 << (bitmark.OPS - 53)) | (1 << (bitmark.COLON - 53)) | (1 << (bitmark.AMP - 53)) | (1 << (bitmark.Greater - 53)) | (1 << (bitmark.Less - 53)))) !== 0) || ((((_la - 87)) & ~0x1F) === 0 && ((1 << (_la - 87)) & ((1 << (bitmark.EMP1 - 87)) | (1 << (bitmark.EMP2 - 87)) | (1 << (bitmark.EMP3 - 87)) | (1 << (bitmark.NOTE - 87)) | (1 << (bitmark.REM - 87)) | (1 << (bitmark.NUMERIC - 87)) | (1 << (bitmark.STRING - 87)) | (1 << (bitmark.SP - 87)) | (1 << (bitmark.SENTENCE - 87)))) !== 0));
this.state = 472;
this.cl();
}
}
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)
progress() {
let _localctx = new ProgressContext(this._ctx, this.state);
this.enterRule(_localctx, 14, bitmark.RULE_progress);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 474;
this.match(bitmark.AtProgress);
this.state = 475;
this.s_and_w();
this.state = 476;
this.cl();
}
}
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)
reference() {
let _localctx = new ReferenceContext(this._ctx, this.state);
this.enterRule(_localctx, 16, bitmark.RULE_reference);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 478;
this.match(bitmark.AtReference);
this.state = 482;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
this.state = 482;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
{
this.state = 479;
this.s_and_w();
}
break;
case 2:
{
this.state = 480;
this.match(bitmark.COLON);
}
break;
case 3:
{
this.state = 481;
this.nl();
}
break;
}
}
this.state = 484;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (((((_la - 53)) & ~0x1F) === 0 && ((1 << (_la - 53)) & ((1 << (bitmark.OPESC - 53)) | (1 << (bitmark.OPS - 53)) | (1 << (bitmark.COLON - 53)) | (1 << (bitmark.AMP - 53)) | (1 << (bitmark.Greater - 53)) | (1 << (bitmark.Less - 53)))) !== 0) || ((((_la - 87)) & ~0x1F) === 0 && ((1 << (_la - 87)) & ((1 << (bitmark.EMP1 - 87)) | (1 << (bitmark.EMP2 - 87)) | (1 << (bitmark.EMP3 - 87)) | (1 << (bitmark.NOTE - 87)) | (1 << (bitmark.REM - 87)) | (1 << (bitmark.NUMERIC - 87)) | (1 << (bitmark.STRING - 87)) | (1 << (bitmark.SP - 87)) | (1 << (bitmark.NL - 87)) | (1 << (bitmark.SENTENCE - 87)))) !== 0));
this.state = 486;
this.cl();
}
}
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)
toc() {
let _localctx = new TocContext(this._ctx, this.state);
this.enterRule(_localctx, 18, bitmark.RULE_toc);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 488;
this.match(bitmark.BitToc);
this.state = 490;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (((((_la - 53)) & ~0x1F) === 0 && ((1 << (_la - 53)) & ((1 << (bitmark.OPESC - 53)) | (1 << (bitmark.OPS - 53)) | (1 << (bitmark.COLON - 53)) | (1 << (bitmark.AMP - 53)) | (1 << (bitmark.Greater - 53)) | (1 << (bitmark.Less - 53)))) !== 0) || ((((_la - 87)) & ~0x1F) === 0 && ((1 << (_la - 87)) & ((1 << (bitmark.EMP1 - 87)) | (1 << (bitmark.EMP2 - 87)) | (1 << (bitmark.EMP3 - 87)) | (1 << (bitmark.NOTE - 87)) | (1 << (bitmark.REM - 87)) | (1 << (bitmark.NUMERIC - 87)) | (1 << (bitmark.STRING - 87)) | (1 << (bitmark.SP - 87)) | (1 << (bitmark.SENTENCE - 87)))) !== 0)) {
{
this.state = 489;
this.s_and_w();
}
}
this.state = 492;
this.cl();
this.state = 493;
this.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)
summary() {
let _localctx = new SummaryContext(this._ctx, this.state);
this.enterRule(_localctx, 20, bitmark.RULE_summary);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 495;
this.match(bitmark.BitSummary);
this.state = 497;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.SP) {
{
this.state = 496;
this.sp();
}
}
this.state = 499;
this.cl();
this.state = 503;
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 = 500;
this.nl();
}
}
}
this.state = 505;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx);
}
this.state = 506;
this.title_etc();
}
}
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)
internal_link() {
let _localctx = new Internal_linkContext(this._ctx, this.state);
this.enterRule(_localctx, 22, bitmark.RULE_internal_link);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 508;
this.match(bitmark.BitIntlink);
this.state = 509;
this.cl();
this.state = 519;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 20, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 513;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === bitmark.NL) {
{
{
this.state = 510;
this.nl();
}
}
this.state = 515;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 516;
this.bitElem();
}
}
}
this.state = 521;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 20, this._ctx);
}
}
}
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)
bit_alias() {
let _localctx = new Bit_aliasContext(this._ctx, this.state);
this.enterRule(_localctx, 24, bitmark.RULE_bit_alias);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 522;
this.match(bitmark.BitAlias);
this.state = 523;
this.cl();
this.state = 524;
this.alias();
}
}
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)
title_etc() {
let _localctx = new Title_etcContext(this._ctx, this.state);
this.enterRule(_localctx, 26, bitmark.RULE_title_etc);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 543;
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 = 527;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === bitmark.NL) {
{
this.state = 526;
this.nl();
}
}
this.state = 537;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case bitmark.OPHASH:
{
this.state = 529;
this.title();
}
break;
case bitmark.OPHASH2:
{
this.state = 530;
this.subtitle();
}
break;
case bitmark.OPA:
{
this.state = 531;
this.atdef();
}
break;
case bitmark.OPC:
{
this.state = 532;
this.item();
}
break;
case bitmark.OPB:
{
this.state = 533;
this.instruction();