bitmark-grammar
Version:
1,709 lines (1,663 loc) • 330 kB
text/typescript
// Generated from ./Truefalse/truefalseParser.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 { NotNull } from "antlr4ts/Decorators";
import { NoViableAltException } from "antlr4ts/NoViableAltException";
import { Override } from "antlr4ts/Decorators";
import { Parser } from "antlr4ts/Parser";
import { ParserRuleContext } from "antlr4ts/ParserRuleContext";
import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator";
import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
import { RecognitionException } from "antlr4ts/RecognitionException";
import { RuleContext } from "antlr4ts/RuleContext";
//import { RuleVersion } from "antlr4ts/RuleVersion";
import { TerminalNode } from "antlr4ts/tree/TerminalNode";
import { Token } from "antlr4ts/Token";
import { TokenStream } from "antlr4ts/TokenStream";
import { Vocabulary } from "antlr4ts/Vocabulary";
import { VocabularyImpl } from "antlr4ts/VocabularyImpl";
import * as Utils from "antlr4ts/misc/Utils";
import { truefalseParserListener } from "./truefalseParserListener";
export class truefalseParser extends Parser {
public static readonly OPDOT = 1;
public static readonly S = 2;
public static readonly BitTruefalse1 = 3;
public static readonly BitTruefalse = 4;
public static readonly OPDOLL = 5;
public static readonly OPBUL = 6;
public static readonly OPESC = 7;
public static readonly OPRANGLES = 8;
public static readonly OPRANGLEL = 9;
public static readonly OPDANGLE = 10;
public static readonly OPU = 11;
public static readonly OPB = 12;
public static readonly OPQ = 13;
public static readonly OPA = 14;
public static readonly OPP = 15;
public static readonly OPM = 16;
public static readonly OPS = 17;
public static readonly OPR = 18;
public static readonly OPC = 19;
public static readonly OPHASH = 20;
public static readonly CL = 21;
public static readonly COLON = 22;
public static readonly AMP = 23;
public static readonly DBLCOLON = 24;
public static readonly PLUS = 25;
public static readonly DotAt = 26;
public static readonly Greater = 27;
public static readonly Less = 28;
public static readonly DBLEQ = 29;
public static readonly RightAngle = 30;
public static readonly RightArrow = 31;
public static readonly HSPL = 32;
public static readonly HSPL2 = 33;
public static readonly SSPL = 34;
public static readonly SSPL2 = 35;
public static readonly COMMENT = 36;
public static readonly DCANY = 37;
public static readonly Image_type = 38;
public static readonly Audio_type = 39;
public static readonly Video_type = 40;
public static readonly ArticleText = 41;
public static readonly NOTCL = 42;
public static readonly NUMERIC = 43;
public static readonly STRING = 44;
public static readonly NL = 45;
public static readonly NOTBITMARK = 46;
public static readonly ELIPSIS = 47;
public static readonly SENTENCE = 48;
public static readonly BARSTRING = 49;
public static readonly OPAT = 50;
public static readonly AtProgress = 51;
public static readonly AtReference = 52;
public static readonly AtWidth = 53;
public static readonly AtHeight = 54;
public static readonly AtProgressPoints = 55;
public static readonly AtShortanswer = 56;
public static readonly AtLonganswer = 57;
public static readonly AtExampleWithStr = 58;
public static readonly AtExamplecol = 59;
public static readonly AtExamplecl = 60;
public static readonly AtSampleSolution = 61;
public static readonly AtPartialAnswerS = 62;
public static readonly AtPartialAnswer = 63;
public static readonly AtLabeltrue = 64;
public static readonly AtLabelfalse = 65;
public static readonly AtPoints = 66;
public static readonly AtSrc = 67;
public static readonly AtPartner = 68;
public static readonly OPATALT = 69;
public static readonly OPAMARK = 70;
public static readonly ShowInIndex = 71;
public static readonly OpAtCaption = 72;
public static readonly OpAtLicense = 73;
public static readonly OpAtCopyright = 74;
public static readonly OpAtSearch = 75;
public static readonly OpAtIsTracked = 76;
public static readonly OpAtIsInfoOnly = 77;
public static readonly AtDate = 78;
public static readonly Http = 79;
public static readonly Https = 80;
public static readonly AmpAudio = 81;
public static readonly AmpImage = 82;
public static readonly AmpImageZoom = 83;
public static readonly AmpImageWAudio = 84;
public static readonly AmpVideo = 85;
public static readonly AmpArticle = 86;
public static readonly AmpDocument = 87;
public static readonly AmpApp = 88;
public static readonly AmpWebsite = 89;
public static readonly AmpStillImageFilm = 90;
public static readonly AmpPdf = 91;
public static readonly OpAmpAudio = 92;
public static readonly OpAmpImage = 93;
public static readonly OpAmpImageZoom = 94;
public static readonly OpAmpImageWAudio = 95;
public static readonly OpAmpVideo = 96;
public static readonly OpAmpArticle = 97;
public static readonly OpAmpArticleAtt = 98;
public static readonly OpAmpDocument = 99;
public static readonly OpAmpApp = 100;
public static readonly OpAmpWebsite = 101;
public static readonly OpAmpStillImageFilm = 102;
public static readonly BracEnclose = 103;
public static readonly AmpAudioLink = 104;
public static readonly AmpImageLink = 105;
public static readonly AmpVideoLink = 106;
public static readonly AmpArticleLink = 107;
public static readonly AmpDocumentLink = 108;
public static readonly AmpDocumentDownload = 109;
public static readonly AmpAppLink = 110;
public static readonly AmpWebsiteLink = 111;
public static readonly AmpStillImageFilmLink = 112;
public static readonly OpAmpAudioLink = 113;
public static readonly OpAmpImageLink = 114;
public static readonly OpAmpVideoLink = 115;
public static readonly OpAmpArticleLink = 116;
public static readonly OpAmpDocumentLink = 117;
public static readonly OpAmpDocumentDownload = 118;
public static readonly OpAmpAppLink = 119;
public static readonly OpAmpWebsiteLink = 120;
public static readonly OpAmpStillImageFilmLink = 121;
public static readonly AmpImageEmbed = 122;
public static readonly AmpVideoEmbed = 123;
public static readonly AmpAudioEmbed = 124;
public static readonly AmpDocumentEmbed = 125;
public static readonly AmpStillImageFilmEmbed = 126;
public static readonly OpAmpImageEmbed = 127;
public static readonly OpAmpVideoEmbed = 128;
public static readonly OpAmpAudioEmbed = 129;
public static readonly OpAmpDocumentEmbed = 130;
public static readonly OpAmpStillImageFilmEmbed = 131;
public static readonly BitmarkMinus = 132;
public static readonly BitmarkPlus = 133;
public static readonly ColonText = 134;
public static readonly ColonJson = 135;
public static readonly Prosemirror = 136;
public static readonly Placeholder = 137;
public static readonly BASIC = 138;
public static readonly JPG = 139;
public static readonly PNG = 140;
public static readonly GIF = 141;
public static readonly SVG = 142;
public static readonly MP2 = 143;
public static readonly MP3 = 144;
public static readonly MP4 = 145;
public static readonly FLV = 146;
public static readonly WMV = 147;
public static readonly MPEG = 148;
public static readonly MPG = 149;
public static readonly TEL = 150;
public static readonly DotArticleAtt = 151;
public static readonly STAR = 152;
public static readonly URL = 153;
public static readonly LIST_LINE = 154;
public static readonly ENCLBARS = 155;
public static readonly RULE_bitmark = 0;
public static readonly RULE_bitmark_ = 1;
public static readonly RULE_truefalses = 2;
public static readonly RULE_true_false_1 = 3;
public static readonly RULE_true_false = 4;
public static readonly RULE_mcrsep = 5;
public static readonly RULE_mcrsep_end = 6;
public static readonly RULE_tfmisc = 7;
public static readonly RULE_choices = 8;
public static readonly RULE_cplus = 9;
public static readonly RULE_cminus = 10;
public static readonly RULE_choice_plus = 11;
public static readonly RULE_choice_minus = 12;
public static readonly RULE_choice_star = 13;
public static readonly RULE_bitElem = 14;
public static readonly RULE_resource = 15;
public static readonly RULE_gap = 16;
public static readonly RULE_single_gap = 17;
public static readonly RULE_bullet_item = 18;
public static readonly RULE_atpoint = 19;
public static readonly RULE_format = 20;
public static readonly RULE_resource_format = 21;
public static readonly RULE_resource_format_extra = 22;
public static readonly RULE_format2 = 23;
public static readonly RULE_image_format = 24;
public static readonly RULE_video_format = 25;
public static readonly RULE_article_format = 26;
public static readonly RULE_document_format = 27;
public static readonly RULE_app_format = 28;
public static readonly RULE_website_format = 29;
public static readonly RULE_stillimagefilm_format = 30;
public static readonly RULE_op_article_format = 31;
public static readonly RULE_op_document_format = 32;
public static readonly RULE_op_app_format = 33;
public static readonly RULE_op_website_format = 34;
public static readonly RULE_op_video_format = 35;
public static readonly RULE_op_stillimagefilm_format = 36;
public static readonly RULE_articlebit = 37;
public static readonly RULE_documentbit = 38;
public static readonly RULE_websitebit = 39;
public static readonly RULE_appbit = 40;
public static readonly RULE_stillimagefilmbit = 41;
public static readonly RULE_stillimg_one = 42;
public static readonly RULE_videobit = 43;
public static readonly RULE_video_one = 44;
public static readonly RULE_imagebit = 45;
public static readonly RULE_image_one = 46;
public static readonly RULE_op_image_format = 47;
public static readonly RULE_image_chained = 48;
public static readonly RULE_image_chained4match = 49;
public static readonly RULE_audiobit = 50;
public static readonly RULE_audio_one = 51;
public static readonly RULE_audio_format = 52;
public static readonly RULE_op_audio_format = 53;
public static readonly RULE_resource_chained = 54;
public static readonly RULE_telephone = 55;
public static readonly RULE_url = 56;
public static readonly RULE_item = 57;
public static readonly RULE_lead = 58;
public static readonly RULE_angleref = 59;
public static readonly RULE_example = 60;
public static readonly RULE_bracketed_text = 61;
public static readonly RULE_reference = 62;
public static readonly RULE_progress = 63;
public static readonly RULE_dateprop = 64;
public static readonly RULE_dateprop_chained = 65;
public static readonly RULE_instruction = 66;
public static readonly RULE_hint = 67;
public static readonly RULE_title = 68;
public static readonly RULE_bool_label = 69;
public static readonly RULE_progress_points = 70;
public static readonly RULE_istracked = 71;
public static readonly RULE_isinfoonly = 72;
public static readonly RULE_atdef = 73;
public static readonly RULE_atdef_ = 74;
public static readonly RULE_dollarans = 75;
public static readonly RULE_anchor = 76;
public static readonly RULE_lines = 77;
public static readonly RULE_s_and_w = 78;
public static readonly RULE_dclines = 79;
public static readonly RULE_clnsp = 80;
public static readonly RULE_sspl = 81;
public static readonly RULE_words = 82;
public static readonly RULE_sp = 83;
// tslint:disable:no-trailing-whitespace
public static readonly ruleNames: string[] = [
"bitmark", "bitmark_", "truefalses", "true_false_1", "true_false", "mcrsep",
"mcrsep_end", "tfmisc", "choices", "cplus", "cminus", "choice_plus", "choice_minus",
"choice_star", "bitElem", "resource", "gap", "single_gap", "bullet_item",
"atpoint", "format", "resource_format", "resource_format_extra", "format2",
"image_format", "video_format", "article_format", "document_format", "app_format",
"website_format", "stillimagefilm_format", "op_article_format", "op_document_format",
"op_app_format", "op_website_format", "op_video_format", "op_stillimagefilm_format",
"articlebit", "documentbit", "websitebit", "appbit", "stillimagefilmbit",
"stillimg_one", "videobit", "video_one", "imagebit", "image_one", "op_image_format",
"image_chained", "image_chained4match", "audiobit", "audio_one", "audio_format",
"op_audio_format", "resource_chained", "telephone", "url", "item", "lead",
"angleref", "example", "bracketed_text", "reference", "progress", "dateprop",
"dateprop_chained", "instruction", "hint", "title", "bool_label", "progress_points",
"istracked", "isinfoonly", "atdef", "atdef_", "dollarans", "anchor", "lines",
"s_and_w", "dclines", "clnsp", "sspl", "words", "sp",
];
private static readonly _LITERAL_NAMES: Array<string | undefined> = [
undefined, "'[.'", undefined, undefined, undefined, undefined, undefined,
"'[^'", undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, "'[#'",
"']'", "':'", "'&'", "'::'", "'+'", "'.@'", "'>'", "'<'", "'=='", "'\u25BA'",
"'\u2192'", undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, "'[@'", undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, "'http://'",
"'https://'", "'&audio'", "'&image'", "'&image-zoom'", "'&image-with-audio'",
"'&video'", "'&article'", "'&document'", "'&app'", "'&website'", "'&still-image-film'",
"'&pdf'", undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, "'&audio-link'",
"'&image-link'", "'&video-link'", "'&article-link'", "'&document-link'",
"'&document-download'", "'&app-link'", "'&website-link'", "'&still-image-film-link'",
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, "'&image-embed'", "'&video-embed'", "'&daudio-embed'",
"'&document-embed'", "'&still-image-film-embed'", undefined, undefined,
undefined, undefined, undefined, "':bitmark--'", "':bitmark++'", "':text'",
"':json'", "':prosemirror'", "':placeholder'", "':basic'", "':jpg'", "':png'",
"':gif'", "':svg'", "':mp2'", "':mp3'", "':mp4'", "':flv'", "':wmv'",
"':mpeg'", "':mpg'", "'tel:'", "'.article-attachment'", "'*'",
];
private static readonly _SYMBOLIC_NAMES: Array<string | undefined> = [
undefined, "OPDOT", "S", "BitTruefalse1", "BitTruefalse", "OPDOLL", "OPBUL",
"OPESC", "OPRANGLES", "OPRANGLEL", "OPDANGLE", "OPU", "OPB", "OPQ", "OPA",
"OPP", "OPM", "OPS", "OPR", "OPC", "OPHASH", "CL", "COLON", "AMP", "DBLCOLON",
"PLUS", "DotAt", "Greater", "Less", "DBLEQ", "RightAngle", "RightArrow",
"HSPL", "HSPL2", "SSPL", "SSPL2", "COMMENT", "DCANY", "Image_type", "Audio_type",
"Video_type", "ArticleText", "NOTCL", "NUMERIC", "STRING", "NL", "NOTBITMARK",
"ELIPSIS", "SENTENCE", "BARSTRING", "OPAT", "AtProgress", "AtReference",
"AtWidth", "AtHeight", "AtProgressPoints", "AtShortanswer", "AtLonganswer",
"AtExampleWithStr", "AtExamplecol", "AtExamplecl", "AtSampleSolution",
"AtPartialAnswerS", "AtPartialAnswer", "AtLabeltrue", "AtLabelfalse",
"AtPoints", "AtSrc", "AtPartner", "OPATALT", "OPAMARK", "ShowInIndex",
"OpAtCaption", "OpAtLicense", "OpAtCopyright", "OpAtSearch", "OpAtIsTracked",
"OpAtIsInfoOnly", "AtDate", "Http", "Https", "AmpAudio", "AmpImage", "AmpImageZoom",
"AmpImageWAudio", "AmpVideo", "AmpArticle", "AmpDocument", "AmpApp", "AmpWebsite",
"AmpStillImageFilm", "AmpPdf", "OpAmpAudio", "OpAmpImage", "OpAmpImageZoom",
"OpAmpImageWAudio", "OpAmpVideo", "OpAmpArticle", "OpAmpArticleAtt", "OpAmpDocument",
"OpAmpApp", "OpAmpWebsite", "OpAmpStillImageFilm", "BracEnclose", "AmpAudioLink",
"AmpImageLink", "AmpVideoLink", "AmpArticleLink", "AmpDocumentLink", "AmpDocumentDownload",
"AmpAppLink", "AmpWebsiteLink", "AmpStillImageFilmLink", "OpAmpAudioLink",
"OpAmpImageLink", "OpAmpVideoLink", "OpAmpArticleLink", "OpAmpDocumentLink",
"OpAmpDocumentDownload", "OpAmpAppLink", "OpAmpWebsiteLink", "OpAmpStillImageFilmLink",
"AmpImageEmbed", "AmpVideoEmbed", "AmpAudioEmbed", "AmpDocumentEmbed",
"AmpStillImageFilmEmbed", "OpAmpImageEmbed", "OpAmpVideoEmbed", "OpAmpAudioEmbed",
"OpAmpDocumentEmbed", "OpAmpStillImageFilmEmbed", "BitmarkMinus", "BitmarkPlus",
"ColonText", "ColonJson", "Prosemirror", "Placeholder", "BASIC", "JPG",
"PNG", "GIF", "SVG", "MP2", "MP3", "MP4", "FLV", "WMV", "MPEG", "MPG",
"TEL", "DotArticleAtt", "STAR", "URL", "LIST_LINE", "ENCLBARS",
];
public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(truefalseParser._LITERAL_NAMES, truefalseParser._SYMBOLIC_NAMES, []);
// @Override
// @NotNull
public get vocabulary(): Vocabulary {
return truefalseParser.VOCABULARY;
}
// tslint:enable:no-trailing-whitespace
// @Override
public get grammarFileName(): string { return "truefalseParser.g4"; }
// @Override
public get ruleNames(): string[] { return truefalseParser.ruleNames; }
// @Override
public get serializedATN(): string { return truefalseParser._serializedATN; }
protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {
return new FailedPredicateException(this, predicate, message);
}
constructor(input: TokenStream) {
super(input);
this._interp = new ParserATNSimulator(truefalseParser._ATN, this);
}
// @RuleVersion(0)
public bitmark(): BitmarkContext {
let _localctx: BitmarkContext = new BitmarkContext(this._ctx, this.state);
this.enterRule(_localctx, 0, truefalseParser.RULE_bitmark);
let _la: number;
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
this.state = 181;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 168;
this.bitmark_();
this.state = 178;
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 = 172;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.S) {
{
{
this.state = 169;
this.match(truefalseParser.S);
}
}
this.state = 174;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 175;
this.match(truefalseParser.NL);
}
}
}
this.state = 180;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx);
}
}
}
this.state = 183;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === truefalseParser.BitTruefalse1 || _la === truefalseParser.BitTruefalse);
this.state = 188;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 185;
this.match(truefalseParser.NL);
}
}
this.state = 190;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 191;
this.match(truefalseParser.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)
public bitmark_(): Bitmark_Context {
let _localctx: Bitmark_Context = new Bitmark_Context(this._ctx, this.state);
this.enterRule(_localctx, 2, truefalseParser.RULE_bitmark_);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 193;
this.truefalses();
}
}
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)
public truefalses(): TruefalsesContext {
let _localctx: TruefalsesContext = new TruefalsesContext(this._ctx, this.state);
this.enterRule(_localctx, 4, truefalseParser.RULE_truefalses);
try {
this.state = 197;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case truefalseParser.BitTruefalse1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 195;
this.true_false_1();
}
break;
case truefalseParser.BitTruefalse:
this.enterOuterAlt(_localctx, 2);
{
this.state = 196;
this.true_false();
}
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)
public true_false_1(): True_false_1Context {
let _localctx: True_false_1Context = new True_false_1Context(this._ctx, this.state);
this.enterRule(_localctx, 6, truefalseParser.RULE_true_false_1);
let _la: number;
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
this.state = 199;
this.match(truefalseParser.BitTruefalse1);
this.state = 200;
this.format();
this.state = 201;
this.match(truefalseParser.CL);
this.state = 203;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 202;
this.match(truefalseParser.NL);
}
}
this.state = 205;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === truefalseParser.NL);
this.state = 216;
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 = 207;
this.bitElem();
this.state = 211;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 208;
this.match(truefalseParser.NL);
}
}
this.state = 213;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
}
this.state = 218;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx);
}
this.state = 219;
this.choices();
this.state = 223;
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 = 220;
this.match(truefalseParser.NL);
}
}
}
this.state = 225;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx);
}
this.state = 239;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 11, this._ctx) ) {
case 1:
{
this.state = 226;
this.resource();
this.state = 236;
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 = 230;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 227;
this.match(truefalseParser.NL);
}
}
this.state = 232;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 233;
this.resource();
}
}
}
this.state = 238;
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)
public true_false(): True_falseContext {
let _localctx: True_falseContext = new True_falseContext(this._ctx, this.state);
this.enterRule(_localctx, 8, truefalseParser.RULE_true_false);
let _la: number;
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
this.state = 241;
this.match(truefalseParser.BitTruefalse);
this.state = 242;
this.format();
this.state = 243;
this.match(truefalseParser.CL);
this.state = 247;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 244;
this.match(truefalseParser.NL);
}
}
this.state = 249;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 259;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 14, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 250;
this.bitElem();
this.state = 254;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 251;
this.match(truefalseParser.NL);
}
}
this.state = 256;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
}
this.state = 261;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 14, this._ctx);
}
this.state = 272;
this._errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
this.state = 263;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === truefalseParser.HSPL || _la === truefalseParser.HSPL2) {
{
this.state = 262;
this.mcrsep();
}
}
this.state = 268;
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 = 265;
this.tfmisc();
}
}
}
this.state = 270;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx);
}
this.state = 271;
this.choices();
}
}
break;
default:
throw new NoViableAltException(this);
}
this.state = 274;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 17, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
this.state = 276;
this.mcrsep_end();
this.state = 280;
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 = 277;
this.match(truefalseParser.NL);
}
}
}
this.state = 282;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 18, this._ctx);
}
this.state = 296;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 21, this._ctx) ) {
case 1:
{
this.state = 283;
this.resource();
this.state = 293;
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 = 287;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 284;
this.match(truefalseParser.NL);
}
}
this.state = 289;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 290;
this.resource();
}
}
}
this.state = 295;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 20, 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)
public mcrsep(): McrsepContext {
let _localctx: McrsepContext = new McrsepContext(this._ctx, this.state);
this.enterRule(_localctx, 10, truefalseParser.RULE_mcrsep);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 298;
_la = this._input.LA(1);
if (!(_la === truefalseParser.HSPL || _la === truefalseParser.HSPL2)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
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)
public mcrsep_end(): Mcrsep_endContext {
let _localctx: Mcrsep_endContext = new Mcrsep_endContext(this._ctx, this.state);
this.enterRule(_localctx, 12, truefalseParser.RULE_mcrsep_end);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 300;
_la = this._input.LA(1);
if (!(_la === truefalseParser.HSPL || _la === truefalseParser.HSPL2)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
}
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)
public tfmisc(): TfmiscContext {
let _localctx: TfmiscContext = new TfmiscContext(this._ctx, this.state);
this.enterRule(_localctx, 14, truefalseParser.RULE_tfmisc);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
{
this.state = 302;
this.bitElem();
this.state = 306;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.NL) {
{
{
this.state = 303;
this.match(truefalseParser.NL);
}
}
this.state = 308;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
}
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)
public choices(): ChoicesContext {
let _localctx: ChoicesContext = new ChoicesContext(this._ctx, this.state);
this.enterRule(_localctx, 16, truefalseParser.RULE_choices);
let _la: number;
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
this.state = 311;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 23, this._ctx) ) {
case 1:
{
this.state = 309;
this.cplus();
}
break;
case 2:
{
this.state = 310;
this.cminus();
}
break;
}
this.state = 328;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 314;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === truefalseParser.NL) {
{
this.state = 313;
this.match(truefalseParser.NL);
}
}
this.state = 319;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === truefalseParser.S) {
{
{
this.state = 316;
this.match(truefalseParser.S);
}
}
this.state = 321;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 324;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 26, this._ctx) ) {
case 1:
{
this.state = 322;
this.cplus();
}
break;
case 2:
{
this.state = 323;
this.cminus();
}
break;
}
}
}
}
this.state = 330;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 27, 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)
public cplus(): CplusContext {
let _localctx: CplusContext = new CplusContext(this._ctx, this.state);
this.enterRule(_localctx, 18, truefalseParser.RULE_cplus);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 331;
this.choice_plus();
this.state = 333;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 28, this._ctx) ) {
case 1:
{
this.state = 332;
this.example();
}
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)
public cminus(): CminusContext {
let _localctx: CminusContext = new CminusContext(this._ctx, this.state);
this.enterRule(_localctx, 20, truefalseParser.RULE_cminus);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 335;
this.choice_minus();
this.state = 337;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 29, this._ctx) ) {
case 1:
{
this.state = 336;
this.example();
}
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)
public choice_plus(): Choice_plusContext {
let _localctx: Choice_plusContext = new Choice_plusContext(this._ctx, this.state);
this.enterRule(_localctx, 22, truefalseParser.RULE_choice_plus);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 340;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === truefalseParser.OPC) {
{
this.state = 339;
this.item();
}
}
this.state = 342;
this.match(truefalseParser.OPP);
this.state = 345;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
this.state = 345;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case truefalseParser.S:
case truefalseParser.OPS:
case truefalseParser.COLON:
case truefalseParser.AMP:
case truefalseParser.DBLCOLON:
case truefalseParser.Greater:
case truefalseParser.Less:
case truefalseParser.DBLEQ:
case truefalseParser.RightAngle:
case truefalseParser.RightArrow:
case truefalseParser.NUMERIC:
case truefalseParser.STRING:
case truefalseParser.NOTBITMARK:
case truefalseParser.ELIPSIS:
case truefalseParser.SENTENCE:
case truefalseParser.BARSTRING:
case truefalseParser.URL:
{
this.state = 343;
this.s_and_w();
}
break;
case truefalseParser.NL:
{
this.state = 344;
this.match(truefalseParser.NL);
}
break;
default:
throw new NoViableAltException(this);
}
}
this.state = 347;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << truefalseParser.S) | (1 << truefalseParser.OPS) | (1 << truefalseParser.COLON) | (1 << truefalseParser.AMP) | (1 << truefalseParser.DBLCOLON) | (1 << truefalseParser.Greater) | (1 << truefalseParser.Less) | (1 << truefalseParser.DBLEQ) | (1 << truefalseParser.RightAngle) | (1 << truefalseParser.RightArrow))) !== 0) || ((((_la - 43)) & ~0x1F) === 0 && ((1 << (_la - 43)) & ((1 << (truefalseParser.NUMERIC - 43)) | (1 << (truefalseParser.STRING - 43)) | (1 << (truefalseParser.NL - 43)) | (1 << (truefalseParser.NOTBITMARK - 43)) | (1 << (truefalseParser.ELIPSIS - 43)) | (1 << (truefalseParser.SENTENCE - 43)) | (1 << (truefalseParser.BARSTRING - 43)))) !== 0) || _la === truefalseParser.URL);
this.state = 349;
this.match(truefalseParser.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)
public choice_minus(): Choice_minusContext {
let _localctx: Choice_minusContext = new Choice_minusContext(this._ctx, this.state);
this.enterRule(_localctx, 24, truefalseParser.RULE_choice_minus);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 352;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === truefalseParser.OPC) {
{
this.state = 351;
this.item();
}
}
this.state = 354;
this.match(truefalseParser.OPM);
this.state = 357;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
this.state = 357;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case truefalseParser.S:
case truefalseParser.OPS:
case truefalseParser.COLON:
case truefalseParser.AMP:
case truefalseParser.DBLCOLON:
case truefalseParser.Greater:
case truefalseParser.Less:
case truefalseParser.DBLEQ:
case truefalseParser.RightAngle:
case truefalseParser.RightArrow:
case truefalseParser.NUMERIC:
case truefalseParser.STRING:
case truefalseParser.NOTBITMARK:
case truefalseParser.ELIPSIS:
case truefalseParser.SENTENCE:
case truefalseParser.BARSTRING:
case truefalseParser.URL:
{
this.state = 355;
this.s_and_w();
}
break;
case truefalseParser.NL:
{
this.state = 356;
this.match(truefalseParser.NL);
}
break;
default:
throw new NoViableAltException(this);
}
}
this.state = 359;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << truefalseParser.S) | (1 << truefalseParser.OPS) | (1 << truefalseParser.COLON) | (1 << truefalseParser.AMP) | (1 << truefalseParser.DBLCOLON) | (1 << truefalseParser.Greater) | (1 << truefalseParser.Less) | (1 << truefalseParser.DBLEQ) | (1 << truefalseParser.RightAngle) | (1 << truefalseParser.RightArrow))) !== 0) || ((((_la - 43)) & ~0x1F) === 0 && ((1 << (_la - 43)) & ((1 << (truefalseParser.NUMERIC - 43)) | (1 << (truefalseParser.STRING - 43)) | (1 << (truefalseParser.NL - 43)) | (1 << (truefalseParser.NOTBITMARK - 43)) | (1 << (truefalseParser.ELIPSIS - 43)) | (1 << (truefalseParser.SENTENCE - 43)) | (1 << (truefalseParser.BARSTRING - 43)))) !== 0) || _la === truefalseParser.URL);
this.state = 361;
this.match(truefalseParser.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)
public choice_star(): Choice_starContext {
let _localctx: Choice_starContext = new Choice_starContext(this._ctx, this.state);
this.enterRule(_localctx, 26, truefalseParser.RULE_choice_star);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 364;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === truefalseParser.OPC) {
{
this.state = 363;
this.item();
}
}
this.state = 366;
this.match(truefalseParser.OPR);
this.state = 369;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
this.state = 369;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case truefalseParser.S:
case truefalseParser.OPS:
case truefalseParser.COLON:
case truefalseParser.AMP:
case truefalseParser.DBLCOLON:
case truefalseParser.Greater:
case truefalseParser.Less:
case truefalseParser.DBLEQ:
case truefalseParser.RightAngle:
case truefalseParser.RightArrow:
case truefalseParser.NUMERIC:
case truefalseParser.STRING:
case truefalseParser.NOTBITMARK:
case truefalseParser.ELIPSIS:
case truefalseParser.SENTENCE:
case truefalseParser.BARSTRING:
case truefalseParser.URL:
{
this.state = 367;
this.s_and_w();
}
break;
case truefalseParser.NL:
{
this.state = 368;
this.match(truefalseParser.NL);
}
break;
default:
throw new NoViableAltException(this);
}
}
this.state = 371;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << truefalseParser.S) | (1 << truefalseParser.OPS) | (1 << truefalseParser.COLON) | (1 << truefalseParser.AMP) | (1 << truefalseParser.DBLCOLON) | (1 << truefalseParser.Greater) | (1 << truefalseParser.Less) | (1 << truefalseParser.DBLEQ) | (1 << truefalseParser.RightAngle) | (1 << truefalseParser.RightArrow))) !== 0) || ((((_la - 43)) & ~0x1F) === 0 && ((1 << (_la - 43)) & ((1 << (truefalseParser.NUMERIC - 43)) | (1 << (truefalseParser.STRING - 43)) | (1 << (truefalseParser.NL - 43)) | (1 << (truefalseParser.NOTBITMARK - 43)) | (1 << (truefalseParser.ELIPSIS - 43)) | (1 << (truefalseParser.SENTENCE - 43)) | (1 << (truefalseParser.BARSTRING - 43)))) !== 0) || _la === truefalseParser.URL);
this.state = 373;
this.match(truefalseParser.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)
public bitElem(): BitElemContext {
let _localctx: BitElemContext = new BitElemContext(this._ctx, this.state);
this.enterRule(_localctx, 28, truefalseParser.RULE_bitElem);
try {
this.state = 399;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 39, this._ctx) ) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 375;
this.match(truefalseParser.LIST_LINE);
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 376;
this.match(truefalseParser.NOTBITMARK);
}
break;
case 3:
this.enterOuterAlt(_localctx, 3);
{
this.state = 377;
this.dclines();
}
break;
case 4:
this.enterOuterAlt(_localctx, 4);
{
this.state = 378;
this.gap();
}
break;
case 5:
this.enterOuterAlt(_localctx, 5);
{
this.state = 379;
this.atdef();
}
break;
case 6:
this.enterOuterAlt(_localctx, 6);
{
this.state = 380;
this.reference();
}
break;
case 7:
this.enterOuterAlt(_localctx, 7);
{
this.state = 381;
this.item();
}
break;
case 8:
this.enterOuterAlt(_localctx, 8);
{
this.state = 382;
this.title();
}
break;
case 9:
this.enterOuterAlt(_localctx, 9);
{
this.state = 383;
this.instruction();
}
break;
case 10:
this.enterOuterAlt(_localctx, 10);
{
this.state = 384;
this.hint();
}
break;
case 11:
this.enterOuterAlt(_localctx, 11);
{
this.state = 385;
this.s_and_w();
}
break;
case 12:
this.enterOuterAlt(_localctx, 12);
{
this.state = 386;
this.example();
}
break;
case 13:
this.enterOuterAlt(_localctx, 13);
{
this.state = 387;
this.bool_label();
}
break;
case 14:
this.enterOuterAlt(_localctx, 14);
{
this.state = 388;
this.imagebit();
}
break;
case 15:
this.enterOuterAlt(_localctx, 15);
{
this.state = 389;
this.audiobit();
}
break;
case 16:
this.enterOuterAlt(_localctx, 16);
{
this.state = 390;
this.videobit();
}
break;
case 17:
this.enterOuterAlt(_localctx, 17);
{
this.state = 391;
this.articlebit();
}
break;
case 18:
this.enterOuterAlt(_localctx, 18);
{
this.state = 392;
this.documentbit();
}
break;
case 19:
this.enterOuterAlt(_localctx, 19);
{
this.state = 393;
this.appbit();
}
break;
case 20:
this.enterOuterAlt(_localctx, 20);
{
this.state = 394;
this.websitebit();
}
break;
case 21:
this.enterOuterAlt(_localctx, 21);
{
this.state = 395;
this.stillimagefilmbit();
}
break;
case 22:
this.enterOuterAlt(_localctx, 22);
{
this.state = 396;
this.angleref();
}
break;
case 23:
this.enterOuterAlt(_localctx, 23);
{
this.state = 397;
this.anchor();
}
break;
case 24:
this.enterOuterAlt(_localctx, 24);
{
this.state = 398;
this.sp();
}
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)
public resource(): ResourceContext {
let _localctx: ResourceContext = new ResourceContext(this._ctx, this.state);
this.enterRule(_localctx, 30, truefalseParser.RULE_resource);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 401;
this.bitElem();
}
}
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)
public gap(): GapContext {
let _localctx: GapContext = new GapContext(this._ctx, this.state);
this.enterRule(_localctx, 32, truefalseParser.RULE_gap);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
this.state = 403;
this.single_gap();
this.state = 411;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 41, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
this.state = 409;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case truefalseParser.OPU:
{
this.state = 404;
this.single_gap();
}
break;
case truefalseParser.OPB:
{
this.state = 405;
this.instruction();
}
break;
case truefalseParser.OPQ:
{
this.state = 406;
this.hint();
}
break;
case truefalseParser.OPC:
{
this.state = 407;
this.item();
}
break;
case truefalseParser.AtExampleWithStr:
case truefalseParser.AtExamplecol:
case truefalseParser.AtExamplecl:
{
this.state = 408;
this.example();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
this.state = 413;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 41, 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)
public single_gap(): Single_gapContext {
let _localctx: Single_gapContext = new Single_gapContext(this._ctx, this.state);
this.enterRule(_localctx, 34, truefalseParser.RULE_single_gap);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 414;
this.match(truefalseParser.OPU);
this.state = 418;
this._errHandler.sync(this);
switch ( this.interpreter.adaptivePredict(this._input, 42, this._ctx) ) {
case 1:
{
this.state = 415;
this.match(truefalseParser.NUMERIC);
}
break;
case 2:
{
this.state = 416;
this.match(truefalseParser.STRING);
}
break;
case 3:
// tslint:disable-next-line:no-empty
{
}
break;
}
this.state = 423;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << truefalseParser.S) | (1 << truefalseParser.OPS) | (1 << truefalseParser.COLON) | (1 << truefalseParse