UNPKG

yini-parser

Version:

Readable configuration without YAML foot-guns or JSON noise. The official Node.js parser for YINI config format — An INI-inspired configuration format with clear nesting, explicit types, and predictable parsing.

1,317 lines 93.8 kB
"use strict"; // Generated from ./grammar/v1.0.0-rc.3/YiniParser.g4 by ANTLR 4.13.2 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols Object.defineProperty(exports, "__esModule", { value: true }); exports.Bad_memberContext = exports.Bad_meta_textContext = exports.Boolean_literalContext = exports.String_concatContext = exports.String_literalContext = exports.Null_literalContext = exports.Number_literalContext = exports.ElementsContext = exports.List_literalContext = exports.Object_memberContext = exports.Object_membersContext = exports.Object_literalContext = exports.ValueContext = exports.Colon_list_declContext = exports.MemberContext = exports.AssignmentContext = exports.EolContext = exports.AnnotationContext = exports.DirectiveContext = exports.Meta_stmtContext = exports.StmtContext = exports.Terminal_stmtContext = exports.PrologContext = exports.YiniContext = void 0; const antlr4_1 = require("antlr4"); class YiniParser extends antlr4_1.Parser { get grammarFileName() { return "YiniParser.g4"; } get literalNames() { return YiniParser.literalNames; } get symbolicNames() { return YiniParser.symbolicNames; } get ruleNames() { return YiniParser.ruleNames; } get serializedATN() { return YiniParser._serializedATN; } createFailedPredicateException(predicate, message) { return new antlr4_1.FailedPredicateException(this, predicate, message); } constructor(input) { super(input); this._interp = new antlr4_1.ParserATNSimulator(this, YiniParser._ATN, YiniParser.DecisionsToDFA, new antlr4_1.PredictionContextCache()); } // @RuleVersion(0) yini() { let localctx = new YiniContext(this, this._ctx, this.state); this.enterRule(localctx, 0, YiniParser.RULE_yini); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 49; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 0, this._ctx)) { case 1: { this.state = 48; this.prolog(); } break; } this.state = 54; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3741485086) !== 0) || ((((_la - 34)) & ~0x1F) === 0 && ((1 << (_la - 34)) & 107137) !== 0)) { { { this.state = 51; this.stmt(); } } this.state = 56; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 58; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 5) { { this.state = 57; this.terminal_stmt(); } } this.state = 60; this.match(YiniParser.EOF); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) prolog() { let localctx = new PrologContext(this, this._ctx, this.state); this.enterRule(localctx, 2, YiniParser.RULE_prolog); try { let _alt; this.state = 74; this._errHandler.sync(this); switch (this._input.LA(1)) { case 29: this.enterOuterAlt(localctx, 1); { this.state = 62; this.match(YiniParser.SHEBANG); this.state = 66; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 3, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 63; this.eol(); } } } this.state = 68; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 3, this._ctx); } } break; case 41: case 47: this.enterOuterAlt(localctx, 2); { this.state = 70; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 69; this.eol(); } } break; default: throw new antlr4_1.NoViableAltException(this); } this.state = 72; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 4, this._ctx); } while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) terminal_stmt() { let localctx = new Terminal_stmtContext(this, this._ctx, this.state); this.enterRule(localctx, 4, YiniParser.RULE_terminal_stmt); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 76; this.match(YiniParser.TERMINAL_TOKEN); this.state = 79; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 6, this._ctx)) { case 1: { this.state = 77; this.eol(); } break; case 2: { this.state = 78; this.match(YiniParser.INLINE_COMMENT); } break; } this.state = 84; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 81; this.match(YiniParser.NL); } } this.state = 86; this._errHandler.sync(this); _la = this._input.LA(1); } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) stmt() { let localctx = new StmtContext(this, this._ctx, this.state); this.enterRule(localctx, 6, YiniParser.RULE_stmt); try { this.state = 93; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 8, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 87; this.eol(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 88; this.match(YiniParser.SECTION_HEAD); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 89; this.assignment(); } break; case 4: this.enterOuterAlt(localctx, 4); { this.state = 90; this.colon_list_decl(); } break; case 5: this.enterOuterAlt(localctx, 5); { this.state = 91; this.meta_stmt(); } break; case 6: this.enterOuterAlt(localctx, 6); { this.state = 92; this.bad_member(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) meta_stmt() { let localctx = new Meta_stmtContext(this, this._ctx, this.state); this.enterRule(localctx, 8, YiniParser.RULE_meta_stmt); try { this.state = 100; this._errHandler.sync(this); switch (this._input.LA(1)) { case 1: case 2: this.enterOuterAlt(localctx, 1); { this.state = 95; this.directive(); } break; case 3: this.enterOuterAlt(localctx, 2); { this.state = 96; this.annotation(); } break; case 50: this.enterOuterAlt(localctx, 3); { this.state = 97; this.bad_meta_text(); this.state = 98; this.eol(); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) directive() { let localctx = new DirectiveContext(this, this._ctx, this.state); this.enterRule(localctx, 10, YiniParser.RULE_directive); let _la; try { this.state = 115; this._errHandler.sync(this); switch (this._input.LA(1)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 102; this.match(YiniParser.YINI_TOKEN); this.state = 103; this.eol(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 104; this.match(YiniParser.INCLUDE_TOKEN); this.state = 108; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 43) { { { this.state = 105; this.match(YiniParser.WS); } } this.state = 110; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 112; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 34) { { this.state = 111; this.string_literal(); } } this.state = 114; this.eol(); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) annotation() { let localctx = new AnnotationContext(this, this._ctx, this.state); this.enterRule(localctx, 12, YiniParser.RULE_annotation); try { this.enterOuterAlt(localctx, 1); { this.state = 117; this.match(YiniParser.DEPRECATED_TOKEN); this.state = 118; this.eol(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) eol() { let localctx = new EolContext(this, this._ctx, this.state); this.enterRule(localctx, 14, YiniParser.RULE_eol); let _la; try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 121; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 47) { { this.state = 120; this.match(YiniParser.INLINE_COMMENT); } } this.state = 124; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 123; this.match(YiniParser.NL); } } break; default: throw new antlr4_1.NoViableAltException(this); } this.state = 126; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 14, this._ctx); } while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) assignment() { let localctx = new AssignmentContext(this, this._ctx, this.state); this.enterRule(localctx, 16, YiniParser.RULE_assignment); try { this.enterOuterAlt(localctx, 1); { this.state = 128; this.member(); this.state = 129; this.eol(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) member() { let localctx = new MemberContext(this, this._ctx, this.state); this.enterRule(localctx, 18, YiniParser.RULE_member); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 131; this.match(YiniParser.KEY); this.state = 133; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 43) { { this.state = 132; this.match(YiniParser.WS); } } this.state = 135; this.match(YiniParser.EQ); this.state = 137; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 43) { { this.state = 136; this.match(YiniParser.WS); } } this.state = 140; this._errHandler.sync(this); _la = this._input.LA(1); if (((((_la - 15)) & ~0x1F) === 0 && ((1 << (_la - 15)) & 572933) !== 0)) { { this.state = 139; this.value(); } } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) colon_list_decl() { let localctx = new Colon_list_declContext(this, this._ctx, this.state); this.enterRule(localctx, 20, YiniParser.RULE_colon_list_decl); let _la; try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 142; this.match(YiniParser.KEY); this.state = 144; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 43) { { this.state = 143; this.match(YiniParser.WS); } } this.state = 146; this.match(YiniParser.COLON); this.state = 155; this._errHandler.sync(this); _la = this._input.LA(1); while (((((_la - 41)) & ~0x1F) === 0 && ((1 << (_la - 41)) & 69) !== 0)) { { this.state = 153; this._errHandler.sync(this); switch (this._input.LA(1)) { case 41: case 47: { this.state = 147; this.eol(); } break; case 43: { this.state = 149; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 148; this.match(YiniParser.WS); } } break; default: throw new antlr4_1.NoViableAltException(this); } this.state = 151; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 19, this._ctx); } while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER); } break; default: throw new antlr4_1.NoViableAltException(this); } } this.state = 157; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 158; this.elements(); this.state = 167; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 24, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { this.state = 165; this._errHandler.sync(this); switch (this._input.LA(1)) { case 41: case 47: { this.state = 159; this.eol(); } break; case 43: { this.state = 161; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 160; this.match(YiniParser.WS); } } break; default: throw new antlr4_1.NoViableAltException(this); } this.state = 163; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 22, this._ctx); } while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER); } break; default: throw new antlr4_1.NoViableAltException(this); } } } this.state = 169; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 24, this._ctx); } this.state = 170; this.eol(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) value() { let localctx = new ValueContext(this, this._ctx, this.state); this.enterRule(localctx, 22, YiniParser.RULE_value); try { this.state = 178; this._errHandler.sync(this); switch (this._input.LA(1)) { case 26: this.enterOuterAlt(localctx, 1); { this.state = 172; this.null_literal(); } break; case 34: this.enterOuterAlt(localctx, 2); { this.state = 173; this.string_literal(); } break; case 30: this.enterOuterAlt(localctx, 3); { this.state = 174; this.number_literal(); } break; case 24: case 25: this.enterOuterAlt(localctx, 4); { this.state = 175; this.boolean_literal(); } break; case 15: case 28: this.enterOuterAlt(localctx, 5); { this.state = 176; this.list_literal(); } break; case 17: case 27: this.enterOuterAlt(localctx, 6); { this.state = 177; this.object_literal(); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) object_literal() { let localctx = new Object_literalContext(this, this._ctx, this.state); this.enterRule(localctx, 24, YiniParser.RULE_object_literal); let _la; try { let _alt; this.state = 210; this._errHandler.sync(this); switch (this._input.LA(1)) { case 17: this.enterOuterAlt(localctx, 1); { this.state = 180; this.match(YiniParser.OC); this.state = 184; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 181; this.match(YiniParser.NL); } } } this.state = 186; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 26, this._ctx); } this.state = 188; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 31) { { this.state = 187; this.object_members(); } } this.state = 193; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 190; this.match(YiniParser.NL); } } this.state = 195; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 196; this.match(YiniParser.CC); this.state = 200; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 29, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 197; this.match(YiniParser.NL); } } } this.state = 202; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 29, this._ctx); } } break; case 27: this.enterOuterAlt(localctx, 2); { this.state = 203; this.match(YiniParser.EMPTY_OBJECT); this.state = 207; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 30, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 204; this.match(YiniParser.NL); } } } this.state = 209; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 30, this._ctx); } } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) object_members() { let localctx = new Object_membersContext(this, this._ctx, this.state); this.enterRule(localctx, 26, YiniParser.RULE_object_members); let _la; try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 212; this.object_member(); this.state = 223; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 213; this.match(YiniParser.COMMA); this.state = 217; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 214; this.match(YiniParser.NL); } } this.state = 219; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 220; this.object_member(); } } } this.state = 225; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 33, this._ctx); } this.state = 227; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 13) { { this.state = 226; this.match(YiniParser.COMMA); } } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) object_member() { let localctx = new Object_memberContext(this, this._ctx, this.state); this.enterRule(localctx, 28, YiniParser.RULE_object_member); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 229; this.match(YiniParser.KEY); this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 43) { { this.state = 230; this.match(YiniParser.WS); } } this.state = 233; this.match(YiniParser.COLON); this.state = 237; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 234; this.match(YiniParser.NL); } } this.state = 239; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 240; this.value(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) list_literal() { let localctx = new List_literalContext(this, this._ctx, this.state); this.enterRule(localctx, 30, YiniParser.RULE_list_literal); let _la; try { let _alt; this.state = 272; this._errHandler.sync(this); switch (this._input.LA(1)) { case 15: this.enterOuterAlt(localctx, 1); { this.state = 242; this.match(YiniParser.OB); this.state = 246; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 243; this.match(YiniParser.NL); } } } this.state = 248; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 37, this._ctx); } this.state = 250; this._errHandler.sync(this); _la = this._input.LA(1); if (((((_la - 15)) & ~0x1F) === 0 && ((1 << (_la - 15)) & 572933) !== 0)) { { this.state = 249; this.elements(); } } this.state = 255; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 252; this.match(YiniParser.NL); } } this.state = 257; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 258; this.match(YiniParser.CB); this.state = 262; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 259; this.match(YiniParser.NL); } } } this.state = 264; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 40, this._ctx); } } break; case 28: this.enterOuterAlt(localctx, 2); { this.state = 265; this.match(YiniParser.EMPTY_LIST); this.state = 269; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 41, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 266; this.match(YiniParser.NL); } } } this.state = 271; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 41, this._ctx); } } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) elements() { let localctx = new ElementsContext(this, this._ctx, this.state); this.enterRule(localctx, 32, YiniParser.RULE_elements); let _la; try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 274; this.value(); this.state = 291; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 45, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 278; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 275; this.match(YiniParser.NL); } } this.state = 280; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 281; this.match(YiniParser.COMMA); this.state = 285; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 41) { { { this.state = 282; this.match(YiniParser.NL); } } this.state = 287; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 288; this.value(); } } } this.state = 293; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 45, this._ctx); } this.state = 295; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 13) { { this.state = 294; this.match(YiniParser.COMMA); } } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) number_literal() { let localctx = new Number_literalContext(this, this._ctx, this.state); this.enterRule(localctx, 34, YiniParser.RULE_number_literal); try { this.enterOuterAlt(localctx, 1); { this.state = 297; this.match(YiniParser.NUMBER); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) null_literal() { let localctx = new Null_literalContext(this, this._ctx, this.state); this.enterRule(localctx, 36, YiniParser.RULE_null_literal); try { this.enterOuterAlt(localctx, 1); { this.state = 299; this.match(YiniParser.NULL); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) string_literal() { let localctx = new String_literalContext(this, this._ctx, this.state); this.enterRule(localctx, 38, YiniParser.RULE_string_literal); try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 301; this.match(YiniParser.STRING); this.state = 305; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 47, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 302; this.string_concat(); } } } this.state = 307; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 47, this._ctx); } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) string_concat() { let localctx = new String_concatContext(this, this._ctx, this.state); this.enterRule(localctx, 40, YiniParser.RULE_string_concat); let _la; tr