UNPKG

aion-ics

Version:

Aion DSL language for managing ICalendar data

1,816 lines (1,768 loc) 132 kB
// Generated from src/core/antlr/Aion.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 { AionListener } from "./AionListener"; import { AionVisitor } from "./AionVisitor"; export class AionParser extends Parser { public static readonly T__0 = 1; public static readonly T__1 = 2; public static readonly T__2 = 3; public static readonly T__3 = 4; public static readonly T__4 = 5; public static readonly T__5 = 6; public static readonly T__6 = 7; public static readonly T__7 = 8; public static readonly T__8 = 9; public static readonly T__9 = 10; public static readonly T__10 = 11; public static readonly T__11 = 12; public static readonly T__12 = 13; public static readonly T__13 = 14; public static readonly T__14 = 15; public static readonly T__15 = 16; public static readonly T__16 = 17; public static readonly T__17 = 18; public static readonly T__18 = 19; public static readonly T__19 = 20; public static readonly T__20 = 21; public static readonly T__21 = 22; public static readonly T__22 = 23; public static readonly T__23 = 24; public static readonly T__24 = 25; public static readonly T__25 = 26; public static readonly T__26 = 27; public static readonly T__27 = 28; public static readonly T__28 = 29; public static readonly T__29 = 30; public static readonly T__30 = 31; public static readonly T__31 = 32; public static readonly T__32 = 33; public static readonly T__33 = 34; public static readonly T__34 = 35; public static readonly T__35 = 36; public static readonly T__36 = 37; public static readonly T__37 = 38; public static readonly T__38 = 39; public static readonly T__39 = 40; public static readonly T__40 = 41; public static readonly T__41 = 42; public static readonly T__42 = 43; public static readonly T__43 = 44; public static readonly T__44 = 45; public static readonly T__45 = 46; public static readonly T__46 = 47; public static readonly T__47 = 48; public static readonly T__48 = 49; public static readonly T__49 = 50; public static readonly T__50 = 51; public static readonly T__51 = 52; public static readonly T__52 = 53; public static readonly T__53 = 54; public static readonly T__54 = 55; public static readonly T__55 = 56; public static readonly T__56 = 57; public static readonly T__57 = 58; public static readonly T__58 = 59; public static readonly T__59 = 60; public static readonly T__60 = 61; public static readonly T__61 = 62; public static readonly T__62 = 63; public static readonly T__63 = 64; public static readonly T__64 = 65; public static readonly T__65 = 66; public static readonly T__66 = 67; public static readonly T__67 = 68; public static readonly T__68 = 69; public static readonly T__69 = 70; public static readonly T__70 = 71; public static readonly T__71 = 72; public static readonly T__72 = 73; public static readonly T__73 = 74; public static readonly T__74 = 75; public static readonly T__75 = 76; public static readonly T__76 = 77; public static readonly T__77 = 78; public static readonly T__78 = 79; public static readonly T__79 = 80; public static readonly T__80 = 81; public static readonly T__81 = 82; public static readonly T__82 = 83; public static readonly T__83 = 84; public static readonly T__84 = 85; public static readonly T__85 = 86; public static readonly IDENTIFIER = 87; public static readonly STRING = 88; public static readonly NUMBER = 89; public static readonly WS = 90; public static readonly COMMENT = 91; public static readonly MONTH_NAME = 92; public static readonly RULE_program = 0; public static readonly RULE_statement = 1; public static readonly RULE_import_stmt = 2; public static readonly RULE_assignment_stmt = 3; public static readonly RULE_value_assignment_stmt = 4; public static readonly RULE_default_declaration = 5; public static readonly RULE_declaration = 6; public static readonly RULE_event_decl = 7; public static readonly RULE_event_time_spec = 8; public static readonly RULE_recurrence_expr = 9; public static readonly RULE_structured_event_stmt = 10; public static readonly RULE_structured_event_field = 11; public static readonly RULE_task_decl = 12; public static readonly RULE_task_time_spec = 13; public static readonly RULE_pomodoro_decl = 14; public static readonly RULE_loop_stmt = 15; public static readonly RULE_loop_start = 16; public static readonly RULE_loop_end = 17; public static readonly RULE_loop_unit = 18; public static readonly RULE_conditional_stmt = 19; public static readonly RULE_filter_stmt = 20; public static readonly RULE_merge_stmt = 21; public static readonly RULE_identifier_list = 22; public static readonly RULE_include_stmt = 23; public static readonly RULE_export_stmt = 24; public static readonly RULE_condition = 25; public static readonly RULE_comparison_op = 26; public static readonly RULE_strategy = 27; public static readonly RULE_value_expr = 28; public static readonly RULE_function_call = 29; public static readonly RULE_date = 30; public static readonly RULE_date_specifier = 31; public static readonly RULE_weekday_list = 32; public static readonly RULE_weekday = 33; public static readonly RULE_time = 34; public static readonly RULE_time_at = 35; public static readonly RULE_time_range = 36; public static readonly RULE_duration = 37; public static readonly RULE_time_unit = 38; public static readonly RULE_value = 39; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ "program", "statement", "import_stmt", "assignment_stmt", "value_assignment_stmt", "default_declaration", "declaration", "event_decl", "event_time_spec", "recurrence_expr", "structured_event_stmt", "structured_event_field", "task_decl", "task_time_spec", "pomodoro_decl", "loop_stmt", "loop_start", "loop_end", "loop_unit", "conditional_stmt", "filter_stmt", "merge_stmt", "identifier_list", "include_stmt", "export_stmt", "condition", "comparison_op", "strategy", "value_expr", "function_call", "date", "date_specifier", "weekday_list", "weekday", "time", "time_at", "time_range", "duration", "time_unit", "value", ]; private static readonly _LITERAL_NAMES: Array<string | undefined> = [ undefined, "'import'", "'as'", "';'", "'='", "'new'", "'event'", "'on'", "'at'", "'for'", "'from'", "'to'", "'find'", "'between'", "'daily'", "'weekly'", "'monthly'", "'yearly'", "'each'", "'{'", "'}'", "'name'", "':'", "','", "'start'", "'duration'", "'location'", "'category'", "'task'", "'and'", "'using'", "'pomodoro'", "'repeat'", "'times'", "'every'", "'with'", "'pause'", "'step'", "'today'", "'+'", "'day'", "'days'", "'week'", "'weeks'", "'month'", "'months'", "'if'", "'('", "')'", "'else'", "'filter'", "'where'", "'into'", "'merge'", "'include'", "'in'", "'export'", "'default'", "'all'", "'count'", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", "'random'", "'earliest'", "'latest'", "'weeknumber'", "'.'", "'Monday'", "'Tuesday'", "'Wednesday'", "'Thursday'", "'Friday'", "'Saturday'", "'Sunday'", "'Mon'", "'Tue'", "'Wed'", "'Thu'", "'Fri'", "'Sat'", "'Sun'", "'h'", "'m'", ]; private static readonly _SYMBOLIC_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, 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, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, "IDENTIFIER", "STRING", "NUMBER", "WS", "COMMENT", "MONTH_NAME", ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(AionParser._LITERAL_NAMES, AionParser._SYMBOLIC_NAMES, []); // @Override // @NotNull public get vocabulary(): Vocabulary { return AionParser.VOCABULARY; } // tslint:enable:no-trailing-whitespace // @Override public get grammarFileName(): string { return "Aion.g4"; } // @Override public get ruleNames(): string[] { return AionParser.ruleNames; } // @Override public get serializedATN(): string { return AionParser._serializedATN; } protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { return new FailedPredicateException(this, predicate, message); } constructor(input: TokenStream) { super(input); this._interp = new ParserATNSimulator(AionParser._ATN, this); } // @RuleVersion(0) public program(): ProgramContext { let _localctx: ProgramContext = new ProgramContext(this._ctx, this.state); this.enterRule(_localctx, 0, AionParser.RULE_program); let _la: number; try { this.enterOuterAlt(_localctx, 1); { this.state = 83; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__0) | (1 << AionParser.T__4) | (1 << AionParser.T__5) | (1 << AionParser.T__17))) !== 0) || ((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & ((1 << (AionParser.T__45 - 46)) | (1 << (AionParser.T__49 - 46)) | (1 << (AionParser.T__52 - 46)) | (1 << (AionParser.T__53 - 46)) | (1 << (AionParser.T__55 - 46)))) !== 0) || _la === AionParser.IDENTIFIER) { { { this.state = 80; this.statement(); } } this.state = 85; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 86; this.match(AionParser.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 statement(): StatementContext { let _localctx: StatementContext = new StatementContext(this._ctx, this.state); this.enterRule(_localctx, 2, AionParser.RULE_statement); try { this.state = 99; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 1, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 88; this.import_stmt(); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 89; this.assignment_stmt(); } break; case 3: this.enterOuterAlt(_localctx, 3); { this.state = 90; this.value_assignment_stmt(); } break; case 4: this.enterOuterAlt(_localctx, 4); { this.state = 91; this.loop_stmt(); } break; case 5: this.enterOuterAlt(_localctx, 5); { this.state = 92; this.export_stmt(); } break; case 6: this.enterOuterAlt(_localctx, 6); { this.state = 93; this.merge_stmt(); } break; case 7: this.enterOuterAlt(_localctx, 7); { this.state = 94; this.filter_stmt(); } break; case 8: this.enterOuterAlt(_localctx, 8); { this.state = 95; this.include_stmt(); } break; case 9: this.enterOuterAlt(_localctx, 9); { this.state = 96; this.conditional_stmt(); } break; case 10: this.enterOuterAlt(_localctx, 10); { this.state = 97; this.structured_event_stmt(); } break; case 11: this.enterOuterAlt(_localctx, 11); { this.state = 98; this.default_declaration(); } 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 import_stmt(): Import_stmtContext { let _localctx: Import_stmtContext = new Import_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 4, AionParser.RULE_import_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 101; this.match(AionParser.T__0); this.state = 102; this.match(AionParser.STRING); this.state = 103; this.match(AionParser.T__1); this.state = 104; this.match(AionParser.IDENTIFIER); this.state = 105; this.match(AionParser.T__2); } } 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 assignment_stmt(): Assignment_stmtContext { let _localctx: Assignment_stmtContext = new Assignment_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 6, AionParser.RULE_assignment_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 107; this.match(AionParser.IDENTIFIER); this.state = 108; this.match(AionParser.T__3); this.state = 109; this.declaration(); this.state = 110; this.match(AionParser.T__2); } } 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 value_assignment_stmt(): Value_assignment_stmtContext { let _localctx: Value_assignment_stmtContext = new Value_assignment_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 8, AionParser.RULE_value_assignment_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 112; this.match(AionParser.IDENTIFIER); this.state = 113; this.match(AionParser.T__3); this.state = 114; this.value_expr(); this.state = 115; this.match(AionParser.T__2); } } 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 default_declaration(): Default_declarationContext { let _localctx: Default_declarationContext = new Default_declarationContext(this._ctx, this.state); this.enterRule(_localctx, 10, AionParser.RULE_default_declaration); try { this.enterOuterAlt(_localctx, 1); { this.state = 117; this.match(AionParser.T__4); this.state = 121; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__5: { this.state = 118; this.event_decl(); } break; case AionParser.T__27: { this.state = 119; this.task_decl(); } break; case AionParser.T__30: { this.state = 120; this.pomodoro_decl(); } break; default: throw new NoViableAltException(this); } this.state = 123; this.match(AionParser.T__2); } } 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 declaration(): DeclarationContext { let _localctx: DeclarationContext = new DeclarationContext(this._ctx, this.state); this.enterRule(_localctx, 12, AionParser.RULE_declaration); try { this.state = 128; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__5: this.enterOuterAlt(_localctx, 1); { this.state = 125; this.event_decl(); } break; case AionParser.T__27: this.enterOuterAlt(_localctx, 2); { this.state = 126; this.task_decl(); } break; case AionParser.T__30: this.enterOuterAlt(_localctx, 3); { this.state = 127; this.pomodoro_decl(); } 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 event_decl(): Event_declContext { let _localctx: Event_declContext = new Event_declContext(this._ctx, this.state); this.enterRule(_localctx, 14, AionParser.RULE_event_decl); try { this.state = 141; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 4, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 130; this.match(AionParser.T__5); this.state = 131; this.match(AionParser.STRING); this.state = 132; this.recurrence_expr(); this.state = 133; this.event_time_spec(); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 135; this.match(AionParser.T__5); this.state = 136; this.match(AionParser.STRING); this.state = 137; this.match(AionParser.T__6); this.state = 138; this.date(); this.state = 139; this.event_time_spec(); } 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 event_time_spec(): Event_time_specContext { let _localctx: Event_time_specContext = new Event_time_specContext(this._ctx, this.state); this.enterRule(_localctx, 16, AionParser.RULE_event_time_spec); try { this.state = 161; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__7: this.enterOuterAlt(_localctx, 1); { this.state = 143; this.match(AionParser.T__7); this.state = 144; this.time(); this.state = 145; this.match(AionParser.T__8); this.state = 146; this.duration(); } break; case AionParser.T__9: this.enterOuterAlt(_localctx, 2); { this.state = 148; this.match(AionParser.T__9); this.state = 149; this.time(); this.state = 150; this.match(AionParser.T__10); this.state = 151; this.time(); } break; case AionParser.T__8: this.enterOuterAlt(_localctx, 3); { this.state = 153; this.match(AionParser.T__8); this.state = 154; this.duration(); this.state = 155; this.match(AionParser.T__11); this.state = 156; this.match(AionParser.T__12); this.state = 157; this.time(); this.state = 158; this.match(AionParser.T__10); this.state = 159; this.time(); } 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 recurrence_expr(): Recurrence_exprContext { let _localctx: Recurrence_exprContext = new Recurrence_exprContext(this._ctx, this.state); this.enterRule(_localctx, 18, AionParser.RULE_recurrence_expr); try { this.state = 196; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__13: this.enterOuterAlt(_localctx, 1); { this.state = 163; this.match(AionParser.T__13); this.state = 166; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 6, this._ctx) ) { case 1: { this.state = 164; this.match(AionParser.T__7); this.state = 165; this.time(); } break; } } break; case AionParser.T__14: this.enterOuterAlt(_localctx, 2); { this.state = 168; this.match(AionParser.T__14); this.state = 169; this.match(AionParser.T__6); this.state = 170; this.weekday_list(); this.state = 173; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 7, this._ctx) ) { case 1: { this.state = 171; this.time_range(); } break; case 2: { this.state = 172; this.time_at(); } break; } } break; case AionParser.T__15: this.enterOuterAlt(_localctx, 3); { this.state = 175; this.match(AionParser.T__15); this.state = 176; this.match(AionParser.T__6); this.state = 177; this.match(AionParser.NUMBER); this.state = 180; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 8, this._ctx) ) { case 1: { this.state = 178; this.time_range(); } break; case 2: { this.state = 179; this.time_at(); } break; } } break; case AionParser.T__16: this.enterOuterAlt(_localctx, 4); { this.state = 182; this.match(AionParser.T__16); this.state = 183; this.match(AionParser.T__6); this.state = 184; this.date(); this.state = 187; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 9, this._ctx) ) { case 1: { this.state = 185; this.time_range(); } break; case 2: { this.state = 186; this.time_at(); } break; } } break; case AionParser.T__17: this.enterOuterAlt(_localctx, 5); { this.state = 189; this.match(AionParser.T__17); this.state = 190; this.match(AionParser.NUMBER); this.state = 191; this.loop_unit(); this.state = 194; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 10, this._ctx) ) { case 1: { this.state = 192; this.time_range(); } break; case 2: { this.state = 193; this.time_at(); } break; } } 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 structured_event_stmt(): Structured_event_stmtContext { let _localctx: Structured_event_stmtContext = new Structured_event_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 20, AionParser.RULE_structured_event_stmt); let _la: number; try { this.enterOuterAlt(_localctx, 1); { this.state = 198; this.match(AionParser.T__5); this.state = 199; this.match(AionParser.IDENTIFIER); this.state = 200; this.match(AionParser.T__18); this.state = 204; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__20) | (1 << AionParser.T__23) | (1 << AionParser.T__24) | (1 << AionParser.T__25) | (1 << AionParser.T__26))) !== 0)) { { { this.state = 201; this.structured_event_field(); } } this.state = 206; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 207; this.match(AionParser.T__19); } } 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 structured_event_field(): Structured_event_fieldContext { let _localctx: Structured_event_fieldContext = new Structured_event_fieldContext(this._ctx, this.state); this.enterRule(_localctx, 22, AionParser.RULE_structured_event_field); let _la: number; try { this.state = 239; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__20: this.enterOuterAlt(_localctx, 1); { this.state = 209; this.match(AionParser.T__20); this.state = 210; this.match(AionParser.T__21); this.state = 211; this.match(AionParser.STRING); this.state = 213; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__22) { { this.state = 212; this.match(AionParser.T__22); } } } break; case AionParser.T__23: this.enterOuterAlt(_localctx, 2); { this.state = 215; this.match(AionParser.T__23); this.state = 216; this.match(AionParser.T__21); this.state = 217; this.time(); this.state = 219; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__22) { { this.state = 218; this.match(AionParser.T__22); } } } break; case AionParser.T__24: this.enterOuterAlt(_localctx, 3); { this.state = 221; this.match(AionParser.T__24); this.state = 222; this.match(AionParser.T__21); this.state = 223; this.duration(); this.state = 225; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__22) { { this.state = 224; this.match(AionParser.T__22); } } } break; case AionParser.T__25: this.enterOuterAlt(_localctx, 4); { this.state = 227; this.match(AionParser.T__25); this.state = 228; this.match(AionParser.T__21); this.state = 229; this.match(AionParser.STRING); this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__22) { { this.state = 230; this.match(AionParser.T__22); } } } break; case AionParser.T__26: this.enterOuterAlt(_localctx, 5); { this.state = 233; this.match(AionParser.T__26); this.state = 234; this.match(AionParser.T__21); this.state = 235; this.match(AionParser.STRING); this.state = 237; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__22) { { this.state = 236; this.match(AionParser.T__22); } } } 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 task_decl(): Task_declContext { let _localctx: Task_declContext = new Task_declContext(this._ctx, this.state); this.enterRule(_localctx, 24, AionParser.RULE_task_decl); try { this.state = 252; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 19, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 241; this.match(AionParser.T__27); this.state = 242; this.match(AionParser.STRING); this.state = 243; this.match(AionParser.T__6); this.state = 244; this.date(); this.state = 245; this.task_time_spec(); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 247; this.match(AionParser.T__27); this.state = 248; this.match(AionParser.STRING); this.state = 249; this.recurrence_expr(); this.state = 250; this.task_time_spec(); } 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 task_time_spec(): Task_time_specContext { let _localctx: Task_time_specContext = new Task_time_specContext(this._ctx, this.state); this.enterRule(_localctx, 26, AionParser.RULE_task_time_spec); let _la: number; try { this.state = 265; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.T__7: this.enterOuterAlt(_localctx, 1); { this.state = 254; this.match(AionParser.T__7); this.state = 255; this.time(); } break; case AionParser.T__11: this.enterOuterAlt(_localctx, 2); { this.state = 256; this.match(AionParser.T__11); this.state = 257; this.match(AionParser.T__12); this.state = 258; this.time(); this.state = 259; this.match(AionParser.T__28); this.state = 260; this.time(); this.state = 263; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__29) { { this.state = 261; this.match(AionParser.T__29); this.state = 262; this.strategy(); } } } 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 pomodoro_decl(): Pomodoro_declContext { let _localctx: Pomodoro_declContext = new Pomodoro_declContext(this._ctx, this.state); this.enterRule(_localctx, 28, AionParser.RULE_pomodoro_decl); let _la: number; try { this.state = 304; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 26, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 267; this.match(AionParser.T__30); this.state = 268; this.match(AionParser.STRING); this.state = 269; this.match(AionParser.T__6); this.state = 270; this.date(); this.state = 271; this.match(AionParser.T__7); this.state = 272; this.time(); this.state = 273; this.match(AionParser.T__31); this.state = 274; this.match(AionParser.NUMBER); this.state = 275; this.match(AionParser.T__32); this.state = 278; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__33) { { this.state = 276; this.match(AionParser.T__33); this.state = 277; this.duration(); } } this.state = 284; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__34) { { this.state = 280; this.match(AionParser.T__34); this.state = 281; this.duration(); this.state = 282; this.match(AionParser.T__35); } } } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 286; this.match(AionParser.T__30); this.state = 287; this.match(AionParser.STRING); this.state = 288; this.recurrence_expr(); this.state = 289; this.match(AionParser.T__7); this.state = 290; this.time(); this.state = 291; this.match(AionParser.T__31); this.state = 292; this.match(AionParser.NUMBER); this.state = 293; this.match(AionParser.T__32); this.state = 296; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__33) { { this.state = 294; this.match(AionParser.T__33); this.state = 295; this.duration(); } } this.state = 302; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__34) { { this.state = 298; this.match(AionParser.T__34); this.state = 299; this.duration(); this.state = 300; this.match(AionParser.T__35); } } } 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 loop_stmt(): Loop_stmtContext { let _localctx: Loop_stmtContext = new Loop_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 30, AionParser.RULE_loop_stmt); let _la: number; try { this.enterOuterAlt(_localctx, 1); { this.state = 306; this.match(AionParser.T__17); this.state = 307; this.loop_unit(); this.state = 308; this.match(AionParser.T__9); this.state = 309; this.loop_start(); this.state = 310; this.match(AionParser.T__10); this.state = 311; this.loop_end(); this.state = 314; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__36) { { this.state = 312; this.match(AionParser.T__36); this.state = 313; this.match(AionParser.NUMBER); } } this.state = 316; this.match(AionParser.T__18); this.state = 320; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__0) | (1 << AionParser.T__4) | (1 << AionParser.T__5) | (1 << AionParser.T__17))) !== 0) || ((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & ((1 << (AionParser.T__45 - 46)) | (1 << (AionParser.T__49 - 46)) | (1 << (AionParser.T__52 - 46)) | (1 << (AionParser.T__53 - 46)) | (1 << (AionParser.T__55 - 46)))) !== 0) || _la === AionParser.IDENTIFIER) { { { this.state = 317; this.statement(); } } this.state = 322; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 323; this.match(AionParser.T__19); } } 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 loop_start(): Loop_startContext { let _localctx: Loop_startContext = new Loop_startContext(this._ctx, this.state); this.enterRule(_localctx, 32, AionParser.RULE_loop_start); try { this.state = 328; this._errHandler.sync(this); switch (this._input.LA(1)) { case AionParser.NUMBER: this.enterOuterAlt(_localctx, 1); { this.state = 325; this.date(); } break; case AionParser.IDENTIFIER: this.enterOuterAlt(_localctx, 2); { this.state = 326; this.match(AionParser.IDENTIFIER); } break; case AionParser.T__37: this.enterOuterAlt(_localctx, 3); { this.state = 327; this.match(AionParser.T__37); } 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 loop_end(): Loop_endContext { let _localctx: Loop_endContext = new Loop_endContext(this._ctx, this.state); this.enterRule(_localctx, 34, AionParser.RULE_loop_end); try { this.state = 336; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 30, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 330; this.date(); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 331; this.match(AionParser.IDENTIFIER); } break; case 3: this.enterOuterAlt(_localctx, 3); { this.state = 332; this.loop_start(); this.state = 333; this.match(AionParser.T__38); this.state = 334; this.match(AionParser.NUMBER); } 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 loop_unit(): Loop_unitContext { let _localctx: Loop_unitContext = new Loop_unitContext(this._ctx, this.state); this.enterRule(_localctx, 36, AionParser.RULE_loop_unit); let _la: number; try { this.enterOuterAlt(_localctx, 1); { this.state = 338; _la = this._input.LA(1); if (!(((((_la - 40)) & ~0x1F) === 0 && ((1 << (_la - 40)) & ((1 << (AionParser.T__39 - 40)) | (1 << (AionParser.T__40 - 40)) | (1 << (AionParser.T__41 - 40)) | (1 << (AionParser.T__42 - 40)) | (1 << (AionParser.T__43 - 40)) | (1 << (AionParser.T__44 - 40)))) !== 0))) { 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 conditional_stmt(): Conditional_stmtContext { let _localctx: Conditional_stmtContext = new Conditional_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 38, AionParser.RULE_conditional_stmt); let _la: number; try { let _alt: number; this.enterOuterAlt(_localctx, 1); { this.state = 340; this.match(AionParser.T__45); this.state = 341; this.match(AionParser.T__46); this.state = 342; this.condition(); this.state = 343; this.match(AionParser.T__47); this.state = 344; this.match(AionParser.T__18); this.state = 348; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__0) | (1 << AionParser.T__4) | (1 << AionParser.T__5) | (1 << AionParser.T__17))) !== 0) || ((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & ((1 << (AionParser.T__45 - 46)) | (1 << (AionParser.T__49 - 46)) | (1 << (AionParser.T__52 - 46)) | (1 << (AionParser.T__53 - 46)) | (1 << (AionParser.T__55 - 46)))) !== 0) || _la === AionParser.IDENTIFIER) { { { this.state = 345; this.statement(); } } this.state = 350; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 351; this.match(AionParser.T__19); this.state = 368; 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 = 352; this.match(AionParser.T__48); this.state = 353; this.match(AionParser.T__45); this.state = 354; this.match(AionParser.T__46); this.state = 355; this.condition(); this.state = 356; this.match(AionParser.T__47); this.state = 357; this.match(AionParser.T__18); this.state = 361; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__0) | (1 << AionParser.T__4) | (1 << AionParser.T__5) | (1 << AionParser.T__17))) !== 0) || ((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & ((1 << (AionParser.T__45 - 46)) | (1 << (AionParser.T__49 - 46)) | (1 << (AionParser.T__52 - 46)) | (1 << (AionParser.T__53 - 46)) | (1 << (AionParser.T__55 - 46)))) !== 0) || _la === AionParser.IDENTIFIER) { { { this.state = 358; this.statement(); } } this.state = 363; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 364; this.match(AionParser.T__19); } } } this.state = 370; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 33, this._ctx); } this.state = 380; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__48) { { this.state = 371; this.match(AionParser.T__48); this.state = 372; this.match(AionParser.T__18); this.state = 376; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << AionParser.T__0) | (1 << AionParser.T__4) | (1 << AionParser.T__5) | (1 << AionParser.T__17))) !== 0) || ((((_la - 46)) & ~0x1F) === 0 && ((1 << (_la - 46)) & ((1 << (AionParser.T__45 - 46)) | (1 << (AionParser.T__49 - 46)) | (1 << (AionParser.T__52 - 46)) | (1 << (AionParser.T__53 - 46)) | (1 << (AionParser.T__55 - 46)))) !== 0) || _la === AionParser.IDENTIFIER) { { { this.state = 373; this.statement(); } } this.state = 378; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 379; this.match(AionParser.T__19); } } } } 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 filter_stmt(): Filter_stmtContext { let _localctx: Filter_stmtContext = new Filter_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 40, AionParser.RULE_filter_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 382; this.match(AionParser.T__49); this.state = 383; this.match(AionParser.IDENTIFIER); this.state = 384; this.match(AionParser.T__50); this.state = 385; this.condition(); this.state = 386; this.match(AionParser.T__51); this.state = 387; this.match(AionParser.IDENTIFIER); this.state = 388; this.match(AionParser.T__2); } } 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 merge_stmt(): Merge_stmtContext { let _localctx: Merge_stmtContext = new Merge_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 42, AionParser.RULE_merge_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 390; this.match(AionParser.T__52); this.state = 391; this.identifier_list(); this.state = 392; this.match(AionParser.T__51); this.state = 393; this.match(AionParser.IDENTIFIER); this.state = 394; this.match(AionParser.T__2); } } 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 identifier_list(): Identifier_listContext { let _localctx: Identifier_listContext = new Identifier_listContext(this._ctx, this.state); this.enterRule(_localctx, 44, AionParser.RULE_identifier_list); let _la: number; try { this.enterOuterAlt(_localctx, 1); { this.state = 396; this.match(AionParser.IDENTIFIER); this.state = 401; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === AionParser.T__22) { { { this.state = 397; this.match(AionParser.T__22); this.state = 398; this.match(AionParser.IDENTIFIER); } } this.state = 403; 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 include_stmt(): Include_stmtContext { let _localctx: Include_stmtContext = new Include_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 46, AionParser.RULE_include_stmt); try { this.enterOuterAlt(_localctx, 1); { this.state = 404; this.match(AionParser.T__53); this.state = 405; this.match(AionParser.IDENTIFIER); this.state = 406; this.match(AionParser.T__54); this.state = 407; this.match(AionParser.IDENTIFIER); this.state = 408; this.match(AionParser.T__2); } } 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 export_stmt(): Export_stmtContext { let _localctx: Export_stmtContext = new Export_stmtContext(this._ctx, this.state); this.enterRule(_localctx, 48, AionParser.RULE_export_stmt); let _la: number; try { this.state = 425; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 38, this._ctx) ) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 410; this.match(AionParser.T__55); this.state = 411; this.match(AionParser.IDENTIFIER); this.state = 414; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === AionParser.T__1) { { this.state = 412; this.match(AionParser.T__1); this.state = 413; this.match(AionParser.STRING); } } this.state = 416; this.match(AionParser.T__2); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 417; this.match(AionParser.T__55); this.state = 418; this.match(AionParser.T__56); this.state = 419; this.match(AionParser.T__1); this.state = 420; this.match(AionParser.STRING); this.state = 421; this.match(AionParser.T__2); } break; case 3: this.enterOuterAlt(_localctx, 3); { this.state = 422; this.match(AionParser.T__55); this.state = 423; this.match(AionParser.T__57); this.state = 424; this.match(AionParser.T__2); } 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 condition(): ConditionContext { let _localctx: ConditionContext = new ConditionCont