Пример #1
0
 private bool square_value_without_spaces_sempred(Square_value_without_spacesContext _localctx, int predIndex)
 {
     switch (predIndex)
     {
     case 1: return((_localctx._INT != null?int.Parse(_localctx._INT.Text):0) < 6000000);
     }
     return(true);
 }
Пример #2
0
    public Square_value_without_spacesContext square_value_without_spaces()
    {
        Square_value_without_spacesContext _localctx = new Square_value_without_spacesContext(Context, State);

        EnterRule(_localctx, 6, RULE_square_value_without_spaces);
        try {
            State = 42;
            ErrorHandler.Sync(this);
            switch (TokenStream.LA(1))
            {
            case FLOATING:
                EnterOuterAlt(_localctx, 1);
                {
                    State = 39; Match(FLOATING);
                }
                break;

            case INT:
                EnterOuterAlt(_localctx, 2);
                {
                    State = 40; _localctx._INT = Match(INT);
                    State = 41;
                    if (!((_localctx._INT != null?int.Parse(_localctx._INT.Text):0) < 6000000))
                    {
                        throw new FailedPredicateException(this, "$INT.int < 6000000");
                    }
                }
                break;

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