UNPKG

bitmark-grammar

Version:
1,233 lines 396 kB
// 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 { NoViableAltException } from "antlr4ts/NoViableAltException"; import { Parser } from "antlr4ts/Parser"; import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator"; import { RecognitionException } from "antlr4ts/RecognitionException"; import { Token } from "antlr4ts/Token"; import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; import * as Utils from "antlr4ts/misc/Utils"; export class truefalseParser extends Parser { constructor(input) { super(input); this._interp = new ParserATNSimulator(truefalseParser._ATN, this); } // @Override // @NotNull get vocabulary() { return truefalseParser.VOCABULARY; } // tslint:enable:no-trailing-whitespace // @Override get grammarFileName() { return "truefalseParser.g4"; } // @Override get ruleNames() { return truefalseParser.ruleNames; } // @Override get serializedATN() { return truefalseParser._serializedATN; } createFailedPredicateException(predicate, message) { return new FailedPredicateException(this, predicate, message); } // @RuleVersion(0) bitmark() { let _localctx = new BitmarkContext(this._ctx, this.state); this.enterRule(_localctx, 0, truefalseParser.RULE_bitmark); let _la; try { let _alt; 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) bitmark_() { let _localctx = 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) truefalses() { let _localctx = 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) true_false_1() { let _localctx = new True_false_1Context(this._ctx, this.state); this.enterRule(_localctx, 6, truefalseParser.RULE_true_false_1); let _la; try { let _alt; 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) true_false() { let _localctx = new True_falseContext(this._ctx, this.state); this.enterRule(_localctx, 8, truefalseParser.RULE_true_false); let _la; try { let _alt; 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) mcrsep() { let _localctx = new McrsepContext(this._ctx, this.state); this.enterRule(_localctx, 10, truefalseParser.RULE_mcrsep); let _la; 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) mcrsep_end() { let _localctx = new Mcrsep_endContext(this._ctx, this.state); this.enterRule(_localctx, 12, truefalseParser.RULE_mcrsep_end); let _la; 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) tfmisc() { let _localctx = new TfmiscContext(this._ctx, this.state); this.enterRule(_localctx, 14, truefalseParser.RULE_tfmisc); let _la; 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) choices() { let _localctx = new ChoicesContext(this._ctx, this.state); this.enterRule(_localctx, 16, truefalseParser.RULE_choices); let _la; try { let _alt; 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) cplus() { let _localctx = 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) cminus() { let _localctx = 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) choice_plus() { let _localctx = new Choice_plusContext(this._ctx, this.state); this.enterRule(_localctx, 22, truefalseParser.RULE_choice_plus); let _la; 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.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.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) choice_minus() { let _localctx = new Choice_minusContext(this._ctx, this.state); this.enterRule(_localctx, 24, truefalseParser.RULE_choice_minus); let _la; 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.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.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) choice_star() { let _localctx = new Choice_starContext(this._ctx, this.state); this.enterRule(_localctx, 26, truefalseParser.RULE_choice_star); let _la; 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.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.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) bitElem() { let _localctx = 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) resource() { let _localctx = 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)