UNPKG

bitmark-grammar

Version:
1,484 lines (1,456 loc) 376 kB
// Generated from ./Flashcard/flashcardParser.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 { flashcardParserListener } from "./flashcardParserListener"; export class flashcardParser extends Parser { public static readonly OPDOT = 1; public static readonly S = 2; public static readonly BitFlash1 = 3; public static readonly BitFlash = 4; public static readonly BitFlashcardset = 5; public static readonly BitFlashcardlangset = 6; public static readonly BitFlashcardlang1 = 7; public static readonly BitVocabulary = 8; public static readonly BitVocabulary_1 = 9; public static readonly OPDOLL = 10; public static readonly OPBUL = 11; public static readonly OPESC = 12; public static readonly OPRANGLES = 13; public static readonly OPRANGLEL = 14; public static readonly OPDANGLE = 15; public static readonly OPU = 16; public static readonly OPB = 17; public static readonly OPQ = 18; public static readonly OPA = 19; public static readonly OPP = 20; public static readonly OPM = 21; public static readonly OPS = 22; public static readonly OPR = 23; public static readonly OPC = 24; public static readonly OPHASH = 25; public static readonly CL = 26; public static readonly COLON = 27; public static readonly AMP = 28; public static readonly DBLCOLON = 29; public static readonly PLUS = 30; public static readonly DotAt = 31; public static readonly Greater = 32; public static readonly Less = 33; public static readonly DBLEQ = 34; public static readonly RightAngle = 35; public static readonly RightArrow = 36; public static readonly EQ = 37; public static readonly EQ2 = 38; public static readonly OR = 39; public static readonly HSPL = 40; public static readonly HSPL2 = 41; public static readonly SSPL = 42; public static readonly SSPL2 = 43; public static readonly COMMENT = 44; public static readonly DCANY = 45; public static readonly Image_type = 46; public static readonly Audio_type = 47; public static readonly Video_type = 48; public static readonly ArticleText = 49; public static readonly NOTCL = 50; public static readonly NUMERIC = 51; public static readonly STRING = 52; public static readonly NL = 53; public static readonly NOTBITMARK = 54; public static readonly ELIPSIS = 55; public static readonly SENTENCE = 56; public static readonly BARSTRING = 57; public static readonly OPAT = 58; public static readonly AtProgress = 59; public static readonly AtReference = 60; public static readonly AtWidth = 61; public static readonly AtHeight = 62; public static readonly AtProgressPoints = 63; public static readonly AtShortanswer = 64; public static readonly AtLonganswer = 65; public static readonly AtExampleWithStr = 66; public static readonly AtExamplecol = 67; public static readonly AtExamplecl = 68; public static readonly AtSampleSolution = 69; public static readonly AtPartialAnswerS = 70; public static readonly AtPartialAnswer = 71; public static readonly AtLabeltrue = 72; public static readonly AtLabelfalse = 73; public static readonly AtPoints = 74; public static readonly AtSrc = 75; public static readonly AtPartner = 76; public static readonly OPATALT = 77; public static readonly OPAMARK = 78; public static readonly ShowInIndex = 79; public static readonly OpAtCaption = 80; public static readonly OpAtLicense = 81; public static readonly OpAtCopyright = 82; public static readonly OpAtSearch = 83; public static readonly OpAtIsTracked = 84; public static readonly OpAtIsInfoOnly = 85; public static readonly AtDate = 86; public static readonly Http = 87; public static readonly Https = 88; public static readonly AmpAudio = 89; public static readonly AmpImage = 90; public static readonly AmpImageZoom = 91; public static readonly AmpImageWAudio = 92; public static readonly AmpVideo = 93; public static readonly AmpArticle = 94; public static readonly AmpDocument = 95; public static readonly AmpApp = 96; public static readonly AmpWebsite = 97; public static readonly AmpStillImageFilm = 98; public static readonly AmpPdf = 99; public static readonly OpAmpAudio = 100; public static readonly OpAmpImage = 101; public static readonly OpAmpImageZoom = 102; public static readonly OpAmpImageWAudio = 103; public static readonly OpAmpVideo = 104; public static readonly OpAmpArticle = 105; public static readonly OpAmpArticleAtt = 106; public static readonly OpAmpDocument = 107; public static readonly OpAmpApp = 108; public static readonly OpAmpWebsite = 109; public static readonly OpAmpStillImageFilm = 110; public static readonly BracEnclose = 111; public static readonly AmpAudioLink = 112; public static readonly AmpImageLink = 113; public static readonly AmpVideoLink = 114; public static readonly AmpArticleLink = 115; public static readonly AmpDocumentLink = 116; public static readonly AmpDocumentDownload = 117; public static readonly AmpAppLink = 118; public static readonly AmpWebsiteLink = 119; public static readonly AmpStillImageFilmLink = 120; public static readonly OpAmpAudioLink = 121; public static readonly OpAmpImageLink = 122; public static readonly OpAmpVideoLink = 123; public static readonly OpAmpArticleLink = 124; public static readonly OpAmpDocumentLink = 125; public static readonly OpAmpDocumentDownload = 126; public static readonly OpAmpAppLink = 127; public static readonly OpAmpWebsiteLink = 128; public static readonly OpAmpStillImageFilmLink = 129; public static readonly AmpImageEmbed = 130; public static readonly AmpVideoEmbed = 131; public static readonly AmpAudioEmbed = 132; public static readonly AmpDocumentEmbed = 133; public static readonly AmpStillImageFilmEmbed = 134; public static readonly OpAmpImageEmbed = 135; public static readonly OpAmpVideoEmbed = 136; public static readonly OpAmpAudioEmbed = 137; public static readonly OpAmpDocumentEmbed = 138; public static readonly OpAmpStillImageFilmEmbed = 139; public static readonly BitmarkMinus = 140; public static readonly BitmarkPlus = 141; public static readonly ColonText = 142; public static readonly ColonJson = 143; public static readonly Prosemirror = 144; public static readonly Placeholder = 145; public static readonly BASIC = 146; public static readonly JPG = 147; public static readonly PNG = 148; public static readonly GIF = 149; public static readonly SVG = 150; public static readonly MP2 = 151; public static readonly MP3 = 152; public static readonly MP4 = 153; public static readonly FLV = 154; public static readonly WMV = 155; public static readonly MPEG = 156; public static readonly MPG = 157; public static readonly TEL = 158; public static readonly DotArticleAtt = 159; public static readonly STAR = 160; public static readonly URL = 161; public static readonly LIST_LINE = 162; public static readonly ENCLBARS = 163; public static readonly RULE_bitmark = 0; public static readonly RULE_bitmark_ = 1; public static readonly RULE_flashcards = 2; public static readonly RULE_flashcard_1 = 3; public static readonly RULE_flashcard = 4; public static readonly RULE_flashcard_set = 5; public static readonly RULE_flashcard_language_set = 6; public static readonly RULE_flashcard_language_1 = 7; public static readonly RULE_vocab = 8; public static readonly RULE_vocab_1 = 9; public static readonly RULE_sx = 10; public static readonly RULE_sidex = 11; public static readonly RULE_sidex_NL = 12; public static readonly RULE_side = 13; public static readonly RULE_side_NL = 14; public static readonly RULE_vside = 15; public static readonly RULE_bitElem = 16; public static readonly RULE_resource = 17; public static readonly RULE_gap = 18; public static readonly RULE_single_gap = 19; public static readonly RULE_bullet_item = 20; public static readonly RULE_atpoint = 21; public static readonly RULE_format = 22; public static readonly RULE_resource_format = 23; public static readonly RULE_resource_format_extra = 24; public static readonly RULE_format2 = 25; public static readonly RULE_image_format = 26; public static readonly RULE_video_format = 27; public static readonly RULE_article_format = 28; public static readonly RULE_document_format = 29; public static readonly RULE_app_format = 30; public static readonly RULE_website_format = 31; public static readonly RULE_stillimagefilm_format = 32; public static readonly RULE_op_article_format = 33; public static readonly RULE_op_document_format = 34; public static readonly RULE_op_app_format = 35; public static readonly RULE_op_website_format = 36; public static readonly RULE_op_video_format = 37; public static readonly RULE_op_stillimagefilm_format = 38; public static readonly RULE_articlebit = 39; public static readonly RULE_documentbit = 40; public static readonly RULE_websitebit = 41; public static readonly RULE_appbit = 42; public static readonly RULE_stillimagefilmbit = 43; public static readonly RULE_stillimg_one = 44; public static readonly RULE_videobit = 45; public static readonly RULE_video_one = 46; public static readonly RULE_imagebit = 47; public static readonly RULE_image_one = 48; public static readonly RULE_op_image_format = 49; public static readonly RULE_image_chained = 50; public static readonly RULE_image_chained4match = 51; public static readonly RULE_audiobit = 52; public static readonly RULE_audio_one = 53; public static readonly RULE_audio_format = 54; public static readonly RULE_op_audio_format = 55; public static readonly RULE_resource_chained = 56; public static readonly RULE_telephone = 57; public static readonly RULE_url = 58; public static readonly RULE_item = 59; public static readonly RULE_lead = 60; public static readonly RULE_angleref = 61; public static readonly RULE_example = 62; public static readonly RULE_bracketed_text = 63; public static readonly RULE_reference = 64; public static readonly RULE_progress = 65; public static readonly RULE_dateprop = 66; public static readonly RULE_dateprop_chained = 67; public static readonly RULE_instruction = 68; public static readonly RULE_hint = 69; public static readonly RULE_title = 70; public static readonly RULE_bool_label = 71; public static readonly RULE_progress_points = 72; public static readonly RULE_istracked = 73; public static readonly RULE_isinfoonly = 74; public static readonly RULE_atdef = 75; public static readonly RULE_atdef_ = 76; public static readonly RULE_dollarans = 77; public static readonly RULE_anchor = 78; public static readonly RULE_dcolon = 79; public static readonly RULE_lines = 80; public static readonly RULE_s_and_w = 81; public static readonly RULE_clnsp = 82; public static readonly RULE_sspl = 83; public static readonly RULE_words = 84; public static readonly RULE_sp = 85; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ "bitmark", "bitmark_", "flashcards", "flashcard_1", "flashcard", "flashcard_set", "flashcard_language_set", "flashcard_language_1", "vocab", "vocab_1", "sx", "sidex", "sidex_NL", "side", "side_NL", "vside", "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", "dcolon", "lines", "s_and_w", "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, 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, 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", "BitFlash1", "BitFlash", "BitFlashcardset", "BitFlashcardlangset", "BitFlashcardlang1", "BitVocabulary", "BitVocabulary_1", "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", "EQ", "EQ2", "OR", "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(flashcardParser._LITERAL_NAMES, flashcardParser._SYMBOLIC_NAMES, []); // @Override // @NotNull public get vocabulary(): Vocabulary { return flashcardParser.VOCABULARY; } // tslint:enable:no-trailing-whitespace // @Override public get grammarFileName(): string { return "flashcardParser.g4"; } // @Override public get ruleNames(): string[] { return flashcardParser.ruleNames; } // @Override public get serializedATN(): string { return flashcardParser._serializedATN; } protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { return new FailedPredicateException(this, predicate, message); } constructor(input: TokenStream) { super(input); this._interp = new ParserATNSimulator(flashcardParser._ATN, this); } // @RuleVersion(0) public bitmark(): BitmarkContext { let _localctx: BitmarkContext = new BitmarkContext(this._ctx, this.state); this.enterRule(_localctx, 0, flashcardParser.RULE_bitmark); let _la: number; try { let _alt: number; 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.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 176; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.S) { { { this.state = 173; this.match(flashcardParser.S); } } this.state = 178; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 179; this.match(flashcardParser.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) & ~0x1F) === 0 && ((1 << _la) & ((1 << flashcardParser.BitFlash1) | (1 << flashcardParser.BitFlash) | (1 << flashcardParser.BitFlashcardset) | (1 << flashcardParser.BitFlashcardlangset) | (1 << flashcardParser.BitFlashcardlang1) | (1 << flashcardParser.BitVocabulary) | (1 << flashcardParser.BitVocabulary_1))) !== 0)); this.state = 192; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 189; this.match(flashcardParser.NL); } } this.state = 194; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 195; this.match(flashcardParser.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, flashcardParser.RULE_bitmark_); try { this.state = 200; this._errHandler.sync(this); switch (this._input.LA(1)) { case flashcardParser.BitFlash1: case flashcardParser.BitFlash: case flashcardParser.BitFlashcardset: case flashcardParser.BitFlashcardlangset: case flashcardParser.BitFlashcardlang1: this.enterOuterAlt(_localctx, 1); { this.state = 197; this.flashcards(); } break; case flashcardParser.BitVocabulary: this.enterOuterAlt(_localctx, 2); { this.state = 198; this.vocab(); } break; case flashcardParser.BitVocabulary_1: this.enterOuterAlt(_localctx, 3); { this.state = 199; this.vocab_1(); } 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 flashcards(): FlashcardsContext { let _localctx: FlashcardsContext = new FlashcardsContext(this._ctx, this.state); this.enterRule(_localctx, 4, flashcardParser.RULE_flashcards); try { this.state = 207; this._errHandler.sync(this); switch (this._input.LA(1)) { case flashcardParser.BitFlash: this.enterOuterAlt(_localctx, 1); { this.state = 202; this.flashcard(); } break; case flashcardParser.BitFlash1: this.enterOuterAlt(_localctx, 2); { this.state = 203; this.flashcard_1(); } break; case flashcardParser.BitFlashcardset: this.enterOuterAlt(_localctx, 3); { this.state = 204; this.flashcard_set(); } break; case flashcardParser.BitFlashcardlangset: this.enterOuterAlt(_localctx, 4); { this.state = 205; this.flashcard_language_set(); } break; case flashcardParser.BitFlashcardlang1: this.enterOuterAlt(_localctx, 5); { this.state = 206; this.flashcard_language_1(); } 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 flashcard_1(): Flashcard_1Context { let _localctx: Flashcard_1Context = new Flashcard_1Context(this._ctx, this.state); this.enterRule(_localctx, 6, flashcardParser.RULE_flashcard_1); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 209; this.match(flashcardParser.BitFlash1); this.state = 210; this.format(); this.state = 211; this.match(flashcardParser.CL); this.state = 212; this.match(flashcardParser.NL); this.state = 213; this.side(); this.state = 214; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 215; this.side(); this.state = 219; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 216; this.match(flashcardParser.NL); } } } this.state = 221; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); } this.state = 235; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 9, this._ctx) ) { case 1: { this.state = 222; this.resource(); this.state = 232; 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 = 226; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 223; this.match(flashcardParser.NL); } } this.state = 228; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 229; this.resource(); } } } this.state = 234; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 8, 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 flashcard(): FlashcardContext { let _localctx: FlashcardContext = new FlashcardContext(this._ctx, this.state); this.enterRule(_localctx, 8, flashcardParser.RULE_flashcard); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 237; this.match(flashcardParser.BitFlash); this.state = 238; this.format(); this.state = 239; this.match(flashcardParser.CL); this.state = 243; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 240; this.match(flashcardParser.NL); } } this.state = 245; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 246; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 247; this.side(); this.state = 248; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 249; this.side(); this.state = 257; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 11, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 250; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 251; this.side(); this.state = 252; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 253; this.side(); } } } this.state = 259; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 11, this._ctx); } this.state = 260; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 264; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 261; this.match(flashcardParser.NL); } } } this.state = 266; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 12, this._ctx); } this.state = 280; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 15, this._ctx) ) { case 1: { this.state = 267; this.resource(); this.state = 277; 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 = 271; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 268; this.match(flashcardParser.NL); } } this.state = 273; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 274; this.resource(); } } } this.state = 279; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 14, 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 flashcard_set(): Flashcard_setContext { let _localctx: Flashcard_setContext = new Flashcard_setContext(this._ctx, this.state); this.enterRule(_localctx, 10, flashcardParser.RULE_flashcard_set); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 282; this.match(flashcardParser.BitFlashcardset); this.state = 283; this.format(); this.state = 284; this.match(flashcardParser.CL); this.state = 288; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 285; this.match(flashcardParser.NL); } } this.state = 290; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 296; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 17, this._ctx) ) { case 1: { this.state = 291; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 292; this.side(); this.state = 293; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 294; this.side(); } break; } this.state = 312; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 298; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 299; this.side(); this.state = 300; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 301; this.side(); this.state = 307; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 302; this.match(flashcardParser.NL); this.state = 303; this.match(flashcardParser.OR); this.state = 304; this.side(); } } this.state = 309; this._errHandler.sync(this); _la = this._input.LA(1); } } } } this.state = 314; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 19, this._ctx); } this.state = 315; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 319; 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 = 316; this.match(flashcardParser.NL); } } } this.state = 321; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 20, this._ctx); } this.state = 335; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 23, this._ctx) ) { case 1: { this.state = 322; this.resource(); this.state = 332; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 22, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 326; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 323; this.match(flashcardParser.NL); } } this.state = 328; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 329; this.resource(); } } } this.state = 334; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 22, 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 flashcard_language_set(): Flashcard_language_setContext { let _localctx: Flashcard_language_setContext = new Flashcard_language_setContext(this._ctx, this.state); this.enterRule(_localctx, 12, flashcardParser.RULE_flashcard_language_set); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 337; this.match(flashcardParser.BitFlashcardlangset); this.state = 338; this.format(); this.state = 339; this.match(flashcardParser.CL); this.state = 343; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 340; this.match(flashcardParser.NL); } } this.state = 345; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 346; this.sidex_NL(); this.state = 358; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 347; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 348; this.sidex(); { this.state = 349; this.match(flashcardParser.NL); this.state = 350; this.sidex_NL(); } this.state = 354; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 352; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 353; this.sidex_NL(); } } this.state = 356; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === flashcardParser.EQ || _la === flashcardParser.EQ2); } } break; default: throw new NoViableAltException(this); } this.state = 360; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 26, this._ctx); } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); this.state = 362; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 366; 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 = 363; this.match(flashcardParser.NL); } } } this.state = 368; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 27, this._ctx); } this.state = 382; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 30, this._ctx) ) { case 1: { this.state = 369; this.resource(); this.state = 379; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 29, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 373; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 370; this.match(flashcardParser.NL); } } this.state = 375; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 376; this.resource(); } } } this.state = 381; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 29, 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 flashcard_language_1(): Flashcard_language_1Context { let _localctx: Flashcard_language_1Context = new Flashcard_language_1Context(this._ctx, this.state); this.enterRule(_localctx, 14, flashcardParser.RULE_flashcard_language_1); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 384; this.match(flashcardParser.BitFlashcardlang1); this.state = 385; this.format(); this.state = 386; this.match(flashcardParser.CL); this.state = 390; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 387; this.match(flashcardParser.NL); } } this.state = 392; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 393; this.sidex_NL(); this.state = 394; _la = this._input.LA(1); if (!(_la === flashcardParser.EQ || _la === flashcardParser.EQ2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 395; this.sidex(); { this.state = 396; this.match(flashcardParser.NL); this.state = 397; this.sidex_NL(); } this.state = 401; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 399; this.match(flashcardParser.OR); this.state = 400; this.sidex_NL(); } } this.state = 403; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la === flashcardParser.OR); this.state = 408; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 405; this.match(flashcardParser.NL); } } } this.state = 410; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx); } this.state = 424; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 36, this._ctx) ) { case 1: { this.state = 411; this.resource(); this.state = 421; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 35, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 415; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 412; this.match(flashcardParser.NL); } } this.state = 417; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 418; this.resource(); } } } this.state = 423; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 35, 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 vocab(): VocabContext { let _localctx: VocabContext = new VocabContext(this._ctx, this.state); this.enterRule(_localctx, 16, flashcardParser.RULE_vocab); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 426; this.match(flashcardParser.BitVocabulary); this.state = 427; this.format(); this.state = 428; this.match(flashcardParser.CL); this.state = 432; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 429; this.match(flashcardParser.NL); } } this.state = 434; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 444; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << flashcardParser.S) | (1 << flashcardParser.OPRANGLES) | (1 << flashcardParser.OPRANGLEL) | (1 << flashcardParser.OPDANGLE) | (1 << flashcardParser.OPU) | (1 << flashcardParser.OPB) | (1 << flashcardParser.OPQ) | (1 << flashcardParser.OPA) | (1 << flashcardParser.OPS) | (1 << flashcardParser.OPC) | (1 << flashcardParser.OPHASH) | (1 << flashcardParser.COLON) | (1 << flashcardParser.AMP))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (flashcardParser.Greater - 32)) | (1 << (flashcardParser.Less - 32)) | (1 << (flashcardParser.RightAngle - 32)) | (1 << (flashcardParser.RightArrow - 32)) | (1 << (flashcardParser.ArticleText - 32)) | (1 << (flashcardParser.NUMERIC - 32)) | (1 << (flashcardParser.STRING - 32)) | (1 << (flashcardParser.NOTBITMARK - 32)) | (1 << (flashcardParser.ELIPSIS - 32)) | (1 << (flashcardParser.SENTENCE - 32)) | (1 << (flashcardParser.BARSTRING - 32)) | (1 << (flashcardParser.AtReference - 32)))) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & ((1 << (flashcardParser.AtExampleWithStr - 66)) | (1 << (flashcardParser.AtExamplecol - 66)) | (1 << (flashcardParser.AtExamplecl - 66)) | (1 << (flashcardParser.AtLabeltrue - 66)) | (1 << (flashcardParser.AtLabelfalse - 66)) | (1 << (flashcardParser.OpAtCopyright - 66)))) !== 0) || ((((_la - 100)) & ~0x1F) === 0 && ((1 << (_la - 100)) & ((1 << (flashcardParser.OpAmpAudio - 100)) | (1 << (flashcardParser.OpAmpImage - 100)) | (1 << (flashcardParser.OpAmpImageZoom - 100)) | (1 << (flashcardParser.OpAmpImageWAudio - 100)) | (1 << (flashcardParser.OpAmpVideo - 100)) | (1 << (flashcardParser.OpAmpArticle - 100)) | (1 << (flashcardParser.OpAmpDocument - 100)) | (1 << (flashcardParser.OpAmpApp - 100)) | (1 << (flashcardParser.OpAmpWebsite - 100)) | (1 << (flashcardParser.OpAmpStillImageFilm - 100)) | (1 << (flashcardParser.OpAmpAudioLink - 100)) | (1 << (flashcardParser.OpAmpImageLink - 100)) | (1 << (flashcardParser.OpAmpVideoLink - 100)) | (1 << (flashcardParser.OpAmpArticleLink - 100)) | (1 << (flashcardParser.OpAmpDocumentLink - 100)) | (1 << (flashcardParser.OpAmpDocumentDownload - 100)) | (1 << (flashcardParser.OpAmpAppLink - 100)) | (1 << (flashcardParser.OpAmpWebsiteLink - 100)) | (1 << (flashcardParser.OpAmpStillImageFilmLink - 100)))) !== 0) || ((((_la - 136)) & ~0x1F) === 0 && ((1 << (_la - 136)) & ((1 << (flashcardParser.OpAmpVideoEmbed - 136)) | (1 << (flashcardParser.OpAmpAudioEmbed - 136)) | (1 << (flashcardParser.OpAmpDocumentEmbed - 136)) | (1 << (flashcardParser.OpAmpStillImageFilmEmbed - 136)) | (1 << (flashcardParser.URL - 136)) | (1 << (flashcardParser.LIST_LINE - 136)))) !== 0)) { { { this.state = 435; this.bitElem(); this.state = 439; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === flashcardParser.NL) { { { this.state = 436; this.match(flashcardParser.NL); } } this.state = 441; this._errHandler.sync(this); _la = this._input.LA(1); } } } this.state = 446; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 464; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 447; _la = this._input.LA(1); if (!(_la === flashcardParser.HSPL || _la === flashcardParser.HSPL2)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 449; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 448; this.vside(); } } this.state = 451; this._errHandler.sync(this); _la = this._input.LA(1); } while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << flashcardParser.S) | (1 << flashcardParser.OPRANGLES) | (1 << flashcardParser.OPRANGLEL) | (1 << flashcardParser.OPDANGLE) | (1 << flashcardParser.OPU) | (1 << flashcardParser.OPB) | (1 << flashcardParser.OPQ) | (1 << flashcardParser.OPA) | (1 << flashcardParser.OPS) | (1 << flashcardParser.OPC) | (1 << flashcardParser.OPHASH) | (1 << flashcardParser.COLON) | (1 << flashcardParser.AMP))) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & ((1 << (flashcardParser.Greater - 32)) | (1 << (flashcardParser.Less - 32)) | (1 << (flashcardParser.RightAngle - 32)) | (1 << (flashcardParser.RightArrow - 32)) | (1 << (flashcardParser.ArticleText - 32)) | (1 << (flashcardParser.NUMERIC - 32)) | (1 << (flashcardParser.STRING - 32)) | (1 << (flashcardParser.NOTBITMARK - 32)) | (1 << (flashcardParser.ELIPSIS - 32)) | (1 << (flashcardParser.SENTENCE - 32)) | (1 << (flashcardParser.BARSTRING - 32)) | (1 << (flashcardParser.AtReference - 32)))) !== 0) || ((((_la - 66)) & ~0x1F) === 0 && ((1 << (_la - 66)) & ((1 << (flashcardParser.AtExampleWithStr - 66)) | (1 << (flashcardParser.AtExamplecol - 66)) | (1 << (flashcardParser.AtExamplecl - 66)) | (1 << (flashcardParser.AtLabeltrue - 66)) | (1 << (flashcardParser.AtLabelfalse - 66)) | (1 << (flashcardParser.OpAtCopyright - 66)))) !== 0) || ((((_la - 100)) & ~0x1F) === 0 && ((1 << (_la - 100)) & ((1 << (flashcardParser.OpAmpAudio - 100)) | (1 << (flashcardParser.OpAmpImage - 100)) | (1 << (flashcardParser.OpAmpImageZoom - 100)) | (1 << (flashcardParser.OpAmpImageWAudio - 100)) | (1 << (flashca