private bool levelOne_sempred(LevelOneContext _localctx, int predIndex) { switch (predIndex) { case 4: return(Precpred(_ctx, 5)); case 5: return(Precpred(_ctx, 4)); case 6: return(Precpred(_ctx, 3)); case 7: return(Precpred(_ctx, 2)); case 8: return(Precpred(_ctx, 1)); } return(true); }
public GOperatorContext(LevelOneContext context) { CopyFrom(context); }
public PlusOperator1Context(LevelOneContext context) { CopyFrom(context); }
public EntryContext(LevelOneContext context) { CopyFrom(context); }
public StarOperator1Context(LevelOneContext context) { CopyFrom(context); }
public virtual void CopyFrom(LevelOneContext context) { base.CopyFrom(context); }
private LevelOneContext levelOne(int _p) { ParserRuleContext _parentctx = _ctx; int _parentState = State; LevelOneContext _localctx = new LevelOneContext(_ctx, _parentState); LevelOneContext _prevctx = _localctx; int _startState = 6; EnterRecursionRule(_localctx, 6, RULE_levelOne, _p); int _la; try { int _alt; EnterOuterAlt(_localctx, 1); { { _localctx = new EntryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; State = 47; Match(ENTRY); } _ctx.stop = _input.Lt(-1); State = 66; _errHandler.Sync(this); _alt = Interpreter.AdaptivePredict(_input, 7, _ctx); while (_alt != 2 && _alt != global::Antlr4.Runtime.Atn.ATN.InvalidAltNumber) { if (_alt == 1) { if (_parseListeners != null) { TriggerExitRuleEvent(); } _prevctx = _localctx; { State = 64; switch (Interpreter.AdaptivePredict(_input, 6, _ctx)) { case 1: { _localctx = new DotOperatorContext(new LevelOneContext(_parentctx, _parentState)); ((DotOperatorContext)_localctx).left = _prevctx; PushNewRecursionContext(_localctx, _startState, RULE_levelOne); State = 49; if (!(Precpred(_ctx, 5))) { throw new FailedPredicateException(this, "Precpred(_ctx, 5)"); } State = 50; Match(DOT); State = 51; ((DotOperatorContext)_localctx).right = levelOne(6); } break; case 2: { _localctx = new FOperatorContext(new LevelOneContext(_parentctx, _parentState)); ((FOperatorContext)_localctx).left = _prevctx; PushNewRecursionContext(_localctx, _startState, RULE_levelOne); State = 52; if (!(Precpred(_ctx, 4))) { throw new FailedPredicateException(this, "Precpred(_ctx, 4)"); } State = 53; Match(F); State = 54; ((FOperatorContext)_localctx).right = levelOne(5); } break; case 3: { _localctx = new GOperatorContext(new LevelOneContext(_parentctx, _parentState)); ((GOperatorContext)_localctx).left = _prevctx; PushNewRecursionContext(_localctx, _startState, RULE_levelOne); State = 55; if (!(Precpred(_ctx, 3))) { throw new FailedPredicateException(this, "Precpred(_ctx, 3)"); } State = 56; Match(G); State = 57; ((GOperatorContext)_localctx).right = levelOne(4); } break; case 4: { _localctx = new StarOperator1Context(new LevelOneContext(_parentctx, _parentState)); ((StarOperator1Context)_localctx).left = _prevctx; PushNewRecursionContext(_localctx, _startState, RULE_levelOne); State = 58; if (!(Precpred(_ctx, 2))) { throw new FailedPredicateException(this, "Precpred(_ctx, 2)"); } State = 59; ((StarOperator1Context)_localctx).op = _input.Lt(1); _la = _input.La(1); if (!(_la == STAR || _la == HAT)) { ((StarOperator1Context)_localctx).op = _errHandler.RecoverInline(this); } Consume(); State = 60; ((StarOperator1Context)_localctx).right = levelOne(3); } break; case 5: { _localctx = new PlusOperator1Context(new LevelOneContext(_parentctx, _parentState)); ((PlusOperator1Context)_localctx).left = _prevctx; PushNewRecursionContext(_localctx, _startState, RULE_levelOne); State = 61; if (!(Precpred(_ctx, 1))) { throw new FailedPredicateException(this, "Precpred(_ctx, 1)"); } State = 62; Match(PLUS); State = 63; ((PlusOperator1Context)_localctx).right = levelOne(2); } break; } } } State = 68; _errHandler.Sync(this); _alt = Interpreter.AdaptivePredict(_input, 7, _ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.ReportError(this, re); _errHandler.Recover(this, re); } finally { UnrollRecursionContexts(_parentctx); } return(_localctx); }