Ejemplo n.º 1
0
 public IndexModel(ILogger <IndexModel> logger, NumContext context, UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager)
 {
     _logger        = logger;
     _context       = context;
     _userManager   = userManager;
     _signInManager = signInManager;
 }
Ejemplo n.º 2
0
    public NumContext num()
    {
        NumContext _localctx = new NumContext(Context, State);

        EnterRule(_localctx, 4, RULE_num);
        int _la;

        try {
            EnterOuterAlt(_localctx, 1);
            {
                State = 37;
                _la   = TokenStream.LA(1);
                if (!(_la == UINT || _la == REAL))
                {
                    ErrorHandler.RecoverInline(this);
                }
                else
                {
                    ErrorHandler.ReportMatch(this);
                    Consume();
                }
            }
        }
        catch (RecognitionException re) {
            _localctx.exception = re;
            ErrorHandler.ReportError(this, re);
            ErrorHandler.Recover(this, re);
        }
        finally {
            ExitRule();
        }
        return(_localctx);
    }
Ejemplo n.º 3
0
        public NumContext num()
        {
            NumContext _localctx = new NumContext(_ctx, State);

            EnterRule(_localctx, 0, RULE_num);
            try {
                State = 13;
                _errHandler.Sync(this);
                switch (_input.La(1))
                {
                case SEPARADORDECIMAL:
                    EnterOuterAlt(_localctx, 1);
                    {
                        State = 6; Match(SEPARADORDECIMAL);
                        State = 7; Match(INT);
                    }
                    break;

                case INT:
                    EnterOuterAlt(_localctx, 2);
                    {
                        State = 8; Match(INT);
                        State = 11;
                        _errHandler.Sync(this);
                        switch (Interpreter.AdaptivePredict(_input, 0, _ctx))
                        {
                        case 1:
                        {
                            State = 9; Match(SEPARADORDECIMAL);
                            State = 10; Match(INT);
                        }
                        break;
                        }
                    }
                    break;

                default:
                    throw new NoViableAltException(this);
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                _errHandler.ReportError(this, re);
                _errHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }
Ejemplo n.º 4
0
        public NumContext num()
        {
            NumContext _localctx = new NumContext(_ctx, State);

            EnterRule(_localctx, 6, RULE_num);
            try {
                State = 56;
                _errHandler.Sync(this);
                switch (_input.La(1))
                {
                case INT:
                    EnterOuterAlt(_localctx, 1);
                    {
                        State           = 49; _localctx._INT = Match(INT);
                        _localctx.value = int.Parse((_localctx._INT != null?_localctx._INT.Text:null));
                    }
                    break;

                case PARENI:
                    EnterOuterAlt(_localctx, 2);
                    {
                        State           = 51; Match(PARENI);
                        State           = 52; _localctx._exp = exp();
                        State           = 53; Match(PAREND);
                        _localctx.value = _localctx._exp.value;
                    }
                    break;

                default:
                    throw new NoViableAltException(this);
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                _errHandler.ReportError(this, re);
                _errHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }
Ejemplo n.º 5
0
    public NumContext num()
    {
        NumContext _localctx = new NumContext(Context, State);

        EnterRule(_localctx, 6, RULE_num);
        try {
            EnterOuterAlt(_localctx, 1);
            {
                State = 52; Match(UINT);
            }
        }
        catch (RecognitionException re) {
            _localctx.exception = re;
            ErrorHandler.ReportError(this, re);
            ErrorHandler.Recover(this, re);
        }
        finally {
            ExitRule();
        }
        return(_localctx);
    }
Ejemplo n.º 6
0
    public PrimaryContext primary()
    {
        PrimaryContext _localctx = new PrimaryContext(Context, State);

        EnterRule(_localctx, 8, RULE_primary);
        int _la;

        try {
            State = 68;
            ErrorHandler.Sync(this);
            switch (TokenStream.LA(1))
            {
            case NUM:
                _localctx = new NumContext(_localctx);
                EnterOuterAlt(_localctx, 1);
                {
                    State = 58; Match(NUM);
                }
                break;

            case ID:
                _localctx = new IdContext(_localctx);
                EnterOuterAlt(_localctx, 2);
                {
                    State = 59; Match(ID);
                }
                break;

            case LL:
                _localctx = new ParensContext(_localctx);
                EnterOuterAlt(_localctx, 3);
                {
                    State = 60; Match(LL);
                    State = 62;
                    ErrorHandler.Sync(this);
                    _la = TokenStream.LA(1);
                    do
                    {
                        {
                            {
                                State = 61; expr(0);
                            }
                        }
                        State = 64;
                        ErrorHandler.Sync(this);
                        _la = TokenStream.LA(1);
                    } while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__1) | (1L << SIN) | (1L << COS) | (1L << TAN) | (1L << LN) | (1L << LOG) | (1L << SQRT) | (1L << LL) | (1L << ID) | (1L << NUM))) != 0));
                    State = 66; Match(RL);
                }
                break;

            default:
                throw new NoViableAltException(this);
            }
        }
        catch (RecognitionException re) {
            _localctx.exception = re;
            ErrorHandler.ReportError(this, re);
            ErrorHandler.Recover(this, re);
        }
        finally {
            ExitRule();
        }
        return(_localctx);
    }