bitmark-grammar
Version:
1,126 lines (1,125 loc) • 455 kB
JavaScript
"use strict";
// Generated from ./antlr/sequenceParser.g4 by ANTLR 4.9.0-SNAPSHOT
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpContext = exports.WordsContext = exports.SsplContext = exports.ClnspContext = exports.DclinesContext = exports.S_and_wContext = 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.ResourceContext = exports.Choice_starContext = exports.Choice_minusContext = exports.Choice_plusContext = exports.Single_gapContext = exports.GapContext = exports.BitElemContext = exports.FooterContext = exports.MtexContext = exports.MelemContext = exports.Menu_textContext = exports.Hspl_slotContext = exports.Menu_listContext = exports.Menu_3_courseContext = exports.MinusminusContext = exports.SeqstrContext = exports.SequenceContext = exports.BitContext = exports.Bitmark_Context = exports.BitmarkContext = exports.sequenceParser = 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 sequenceParser extends Parser_1.Parser {
constructor(input) {
super(input);
this._interp = new ParserATNSimulator_1.ParserATNSimulator(sequenceParser._ATN, this);
}
// @Override
// @NotNull
get vocabulary() {
return sequenceParser.VOCABULARY;
}
// tslint:enable:no-trailing-whitespace
// @Override
get grammarFileName() { return "sequenceParser.g4"; }
// @Override
get ruleNames() { return sequenceParser.ruleNames; }
// @Override
get serializedATN() { return sequenceParser._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, sequenceParser.RULE_bitmark);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 185;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 172;
this.bitmark_();
this.state = 182;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 176;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.S) {
{
{
this.state = 173;
this.match(sequenceParser.S);
}
}
this.state = 178;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 179;
this.match(sequenceParser.NL);
}
}
}
this.state = 184;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx);
}
}
}
this.state = 187;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === sequenceParser.BitSequence || _la === sequenceParser.BitMenu3Course);
this.state = 192;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 189;
this.match(sequenceParser.NL);
}
}
this.state = 194;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 195;
this.match(sequenceParser.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, sequenceParser.RULE_bitmark_);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 197;
this.bit();
}
}
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)
bit() {
let _localctx = new BitContext(this._ctx, this.state);
this.enterRule(_localctx, 4, sequenceParser.RULE_bit);
try {
this.state = 201;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case sequenceParser.BitSequence:
this.enterOuterAlt(_localctx, 1);
{
this.state = 199;
this.sequence();
}
break;
case sequenceParser.BitMenu3Course:
this.enterOuterAlt(_localctx, 2);
{
this.state = 200;
this.menu_3_course();
}
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)
sequence() {
let _localctx = new SequenceContext(this._ctx, this.state);
this.enterRule(_localctx, 6, sequenceParser.RULE_sequence);
let _la;
try {
let _alt;
this.state = 268;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 15, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 203;
this.match(sequenceParser.BitSequence);
this.state = 204;
this.format();
this.state = 205;
this.match(sequenceParser.CL);
this.state = 215;
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 = 209;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 206;
this.match(sequenceParser.NL);
}
}
this.state = 211;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 212;
this.bitElem();
}
}
}
this.state = 217;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx);
}
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 218;
this.match(sequenceParser.BitSequence);
this.state = 219;
this.format();
this.state = 220;
this.match(sequenceParser.CL);
this.state = 230;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 224;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 221;
this.match(sequenceParser.NL);
}
}
this.state = 226;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 227;
this.bitElem();
}
}
}
this.state = 232;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);
}
this.state = 236;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 233;
this.match(sequenceParser.NL);
}
}
this.state = 238;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 239;
this.match(sequenceParser.HSPL);
this.state = 245;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 10, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 240;
this.seqstr();
this.state = 241;
this.minusminus();
}
}
}
this.state = 247;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 10, this._ctx);
}
this.state = 248;
this.seqstr();
this.state = 249;
this.match(sequenceParser.HSPL);
this.state = 251;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 11, this._ctx)) {
case 1:
{
this.state = 250;
this.footer();
}
break;
}
this.state = 266;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
{
this.state = 253;
this.resource();
this.state = 263;
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 = 257;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 254;
this.match(sequenceParser.NL);
}
}
this.state = 259;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 260;
this.resource();
}
}
}
this.state = 265;
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)
seqstr() {
let _localctx = new SeqstrContext(this._ctx, this.state);
this.enterRule(_localctx, 8, sequenceParser.RULE_seqstr);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 276;
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 = 270;
this.bitElem();
this.state = 272;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === sequenceParser.NL) {
{
this.state = 271;
this.match(sequenceParser.NL);
}
}
}
}
}
this.state = 278;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx);
}
this.state = 279;
this.s_and_w();
}
}
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)
minusminus() {
let _localctx = new MinusminusContext(this._ctx, this.state);
this.enterRule(_localctx, 10, sequenceParser.RULE_minusminus);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 281;
this.match(sequenceParser.DMM);
}
}
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)
menu_3_course() {
let _localctx = new Menu_3_courseContext(this._ctx, this.state);
this.enterRule(_localctx, 12, sequenceParser.RULE_menu_3_course);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 283;
this.match(sequenceParser.BitMenu3Course);
this.state = 284;
this.format();
this.state = 285;
this.match(sequenceParser.CL);
this.state = 295;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx);
while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 289;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 286;
this.match(sequenceParser.NL);
}
}
this.state = 291;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 292;
this.bitElem();
}
}
}
this.state = 297;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx);
}
this.state = 301;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 298;
this.match(sequenceParser.NL);
}
}
this.state = 303;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 304;
this.menu_list();
this.state = 306;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 21, this._ctx)) {
case 1:
{
this.state = 305;
this.footer();
}
break;
}
this.state = 321;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 24, this._ctx)) {
case 1:
{
this.state = 308;
this.resource();
this.state = 318;
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 = 312;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 309;
this.match(sequenceParser.NL);
}
}
this.state = 314;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 315;
this.resource();
}
}
}
this.state = 320;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 23, this._ctx);
}
}
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)
menu_list() {
let _localctx = new Menu_listContext(this._ctx, this.state);
this.enterRule(_localctx, 14, sequenceParser.RULE_menu_list);
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 323;
this.hspl_slot();
this.state = 324;
this.menu_text();
this.state = 329;
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 = 325;
this.match(sequenceParser.HSPL);
this.state = 326;
this.menu_text();
}
}
}
this.state = 331;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 25, this._ctx);
}
this.state = 332;
this.match(sequenceParser.HSPL);
}
}
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)
hspl_slot() {
let _localctx = new Hspl_slotContext(this._ctx, this.state);
this.enterRule(_localctx, 16, sequenceParser.RULE_hspl_slot);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 334;
this.match(sequenceParser.HSPL);
}
}
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)
menu_text() {
let _localctx = new Menu_textContext(this._ctx, this.state);
this.enterRule(_localctx, 18, sequenceParser.RULE_menu_text);
try {
this.state = 338;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case sequenceParser.S:
case sequenceParser.OPB:
case sequenceParser.OPQ:
case sequenceParser.OPA:
case sequenceParser.OPS:
case sequenceParser.COLON:
case sequenceParser.AMP:
case sequenceParser.Greater:
case sequenceParser.Less:
case sequenceParser.RightAngle:
case sequenceParser.RightArrow:
case sequenceParser.DBLEQ:
case sequenceParser.NUMERIC:
case sequenceParser.STRING:
case sequenceParser.NOTBITMARK:
case sequenceParser.ELIPSIS:
case sequenceParser.SENTENCE:
case sequenceParser.BARSTRING:
case sequenceParser.AtExampleWithStr:
case sequenceParser.AtExamplecol:
case sequenceParser.AtExamplecl:
case sequenceParser.AtSampleSolution:
case sequenceParser.OpAtCopyright:
case sequenceParser.AmpAudio:
case sequenceParser.AmpImage:
case sequenceParser.AmpVideo:
case sequenceParser.AmpArticle:
case sequenceParser.AmpDocument:
case sequenceParser.AmpApp:
case sequenceParser.AmpWebsite:
case sequenceParser.AmpAudioLink:
case sequenceParser.AmpImageLink:
case sequenceParser.AmpArticleLink:
case sequenceParser.AmpDocumentLink:
case sequenceParser.BitmarkMinus:
case sequenceParser.BitmarkPlus:
case sequenceParser.URL:
case sequenceParser.LIST_LINE:
this.enterOuterAlt(_localctx, 1);
{
this.state = 336;
this.melem();
}
break;
case sequenceParser.HSPL:
this.enterOuterAlt(_localctx, 2);
// tslint:disable-next-line:no-empty
{
}
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)
melem() {
let _localctx = new MelemContext(this._ctx, this.state);
this.enterRule(_localctx, 20, sequenceParser.RULE_melem);
let _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 340;
this.mtex();
this.state = 344;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << sequenceParser.S) | (1 << sequenceParser.OPB) | (1 << sequenceParser.OPQ) | (1 << sequenceParser.OPA) | (1 << sequenceParser.OPS) | (1 << sequenceParser.COLON) | (1 << sequenceParser.AMP) | (1 << sequenceParser.Greater))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (sequenceParser.Less - 32)) | (1 << (sequenceParser.RightAngle - 32)) | (1 << (sequenceParser.RightArrow - 32)) | (1 << (sequenceParser.DBLEQ - 32)) | (1 << (sequenceParser.NUMERIC - 32)) | (1 << (sequenceParser.STRING - 32)) | (1 << (sequenceParser.NOTBITMARK - 32)) | (1 << (sequenceParser.ELIPSIS - 32)) | (1 << (sequenceParser.SENTENCE - 32)) | (1 << (sequenceParser.BARSTRING - 32)) | (1 << (sequenceParser.AtExampleWithStr - 32)))) !== 0) || ((((_la - 64)) & ~0x1F) === 0 && ((1 << (_la - 64)) & ((1 << (sequenceParser.AtExamplecol - 64)) | (1 << (sequenceParser.AtExamplecl - 64)) | (1 << (sequenceParser.AtSampleSolution - 64)) | (1 << (sequenceParser.OpAtCopyright - 64)) | (1 << (sequenceParser.AmpAudio - 64)) | (1 << (sequenceParser.AmpImage - 64)) | (1 << (sequenceParser.AmpVideo - 64)) | (1 << (sequenceParser.AmpArticle - 64)) | (1 << (sequenceParser.AmpDocument - 64)) | (1 << (sequenceParser.AmpApp - 64)) | (1 << (sequenceParser.AmpWebsite - 64)))) !== 0) || ((((_la - 107)) & ~0x1F) === 0 && ((1 << (_la - 107)) & ((1 << (sequenceParser.AmpAudioLink - 107)) | (1 << (sequenceParser.AmpImageLink - 107)) | (1 << (sequenceParser.AmpArticleLink - 107)) | (1 << (sequenceParser.AmpDocumentLink - 107)) | (1 << (sequenceParser.BitmarkMinus - 107)) | (1 << (sequenceParser.BitmarkPlus - 107)))) !== 0) || _la === sequenceParser.URL || _la === sequenceParser.LIST_LINE) {
{
{
this.state = 341;
this.mtex();
}
}
this.state = 346;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
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)
mtex() {
let _localctx = new MtexContext(this._ctx, this.state);
this.enterRule(_localctx, 22, sequenceParser.RULE_mtex);
let _la;
try {
this.state = 366;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case sequenceParser.S:
case sequenceParser.OPS:
case sequenceParser.COLON:
case sequenceParser.AMP:
case sequenceParser.Greater:
case sequenceParser.Less:
case sequenceParser.RightAngle:
case sequenceParser.RightArrow:
case sequenceParser.DBLEQ:
case sequenceParser.NUMERIC:
case sequenceParser.STRING:
case sequenceParser.NOTBITMARK:
case sequenceParser.ELIPSIS:
case sequenceParser.SENTENCE:
case sequenceParser.BARSTRING:
case sequenceParser.AmpAudio:
case sequenceParser.AmpImage:
case sequenceParser.AmpVideo:
case sequenceParser.AmpArticle:
case sequenceParser.AmpDocument:
case sequenceParser.AmpApp:
case sequenceParser.AmpWebsite:
case sequenceParser.AmpAudioLink:
case sequenceParser.AmpImageLink:
case sequenceParser.AmpArticleLink:
case sequenceParser.AmpDocumentLink:
case sequenceParser.BitmarkMinus:
case sequenceParser.BitmarkPlus:
case sequenceParser.URL:
case sequenceParser.LIST_LINE:
this.enterOuterAlt(_localctx, 1);
{
this.state = 347;
this.s_and_w();
this.state = 351;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 348;
this.match(sequenceParser.NL);
}
}
this.state = 353;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
break;
case sequenceParser.OPB:
case sequenceParser.OPQ:
case sequenceParser.OPA:
case sequenceParser.AtExampleWithStr:
case sequenceParser.AtExamplecol:
case sequenceParser.AtExamplecl:
case sequenceParser.AtSampleSolution:
case sequenceParser.OpAtCopyright:
this.enterOuterAlt(_localctx, 2);
{
this.state = 358;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case sequenceParser.OPB:
{
this.state = 354;
this.instruction();
}
break;
case sequenceParser.OPA:
case sequenceParser.AtSampleSolution:
case sequenceParser.OpAtCopyright:
{
this.state = 355;
this.atdef();
}
break;
case sequenceParser.OPQ:
{
this.state = 356;
this.hint();
}
break;
case sequenceParser.AtExampleWithStr:
case sequenceParser.AtExamplecol:
case sequenceParser.AtExamplecl:
{
this.state = 357;
this.example();
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
this.state = 363;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 360;
this.match(sequenceParser.NL);
}
}
this.state = 365;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
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)
footer() {
let _localctx = new FooterContext(this._ctx, this.state);
this.enterRule(_localctx, 24, sequenceParser.RULE_footer);
let _la;
try {
let _alt;
this.enterOuterAlt(_localctx, 1);
{
this.state = 375;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 371;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === sequenceParser.NL) {
{
{
this.state = 368;
this.match(sequenceParser.NL);
}
}
this.state = 373;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 374;
this.s_and_w();
}
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
this.state = 377;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx);
} while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER);
this.state = 380;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 379;
this.match(sequenceParser.NL);
}
}
break;
default:
throw new NoViableAltException_1.NoViableAltException(this);
}
this.state = 382;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 34, this._ctx);
} while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER);
}
}
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)
bitElem() {
let _localctx = new BitElemContext(this._ctx, this.state);
this.enterRule(_localctx, 26, sequenceParser.RULE_bitElem);
try {
this.state = 410;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 35, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 384;
this.match(sequenceParser.LIST_LINE);
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 385;
this.match(sequenceParser.NOTBITMARK);
}
break;
case 3:
this.enterOuterAlt(_localctx, 3);
{
this.state = 386;
this.dclines();
}
break;
case 4:
this.enterOuterAlt(_localctx, 4);
{
this.state = 387;
this.gap();
}
break;
case 5:
this.enterOuterAlt(_localctx, 5);
{
this.state = 388;
this.atdef();
}
break;
case 6:
this.enterOuterAlt(_localctx, 6);
{
this.state = 389;
this.reference();
}
break;
case 7:
this.enterOuterAlt(_localctx, 7);
{
this.state = 390;
this.dollarans();
}
break;
case 8:
this.enterOuterAlt(_localctx, 8);
{
this.state = 391;
this.item();
}
break;
case 9:
this.enterOuterAlt(_localctx, 9);
{
this.state = 392;
this.title();
}
break;
case 10:
this.enterOuterAlt(_localctx, 10);
{
this.state = 393;
this.instruction();
}
break;
case 11:
this.enterOuterAlt(_localctx, 11);
{
this.state = 394;
this.hint();
}
break;
case 12:
this.enterOuterAlt(_localctx, 12);
{
this.state = 395;
this.s_and_w();
}
break;
case 13:
this.enterOuterAlt(_localctx, 13);
{
this.state = 396;
this.example();
}
break;
case 14:
this.enterOuterAlt(_localctx, 14);
{
this.state = 397;
this.bool_label();
}
break;
case 15:
this.enterOuterAlt(_localctx, 15);
{
this.state = 398;
this.imagebit();
}
break;
case 16:
this.enterOuterAlt(_localctx, 16);
{
this.state = 399;
this.audiobit();
}
break;
case 17:
this.enterOuterAlt(_localctx, 17);