Пример #1
0
        ExprNode Expr_2_4()
        {
            var n = Expr_2_3();

            while (Lexer.Token == Lexer.TokenType.TOK_LOGOR)
            {
                var pos = Lexer.Describe();
                Lexer.NextToken();
                var n1 = Expr_2_3();
                n = new ArifmExprNode(n, n1, Lexer.TokenType.TOK_LOGOR, pos);
            }
            return(n);
        }
Пример #2
0
        ExprNode Expr_2()
        {
            var n = Expr_3_1();

            while (Lexer.Token == Lexer.TokenType.TOK_AND)
            {
                var pos = Lexer.Describe();
                Lexer.NextToken();
                var n1 = Expr_3_1();
                n = new ArifmExprNode(n, n1, Lexer.TokenType.TOK_AND, pos);
            }
            return(n);
        }
Пример #3
0
        ExprNode Expr_3_1()
        {
            var n = Expr_3();

            while (Lexer.Token == Lexer.TokenType.TOK_EQUAL || Lexer.Token == Lexer.TokenType.TOK_NOTEQ)
            {
                var pos = Lexer.Describe();
                var t   = Lexer.Token;
                Lexer.NextToken();
                var n1 = Expr_3();
                n = new ArifmExprNode(n, n1, t, pos);
            }
            return(n);
        }
Пример #4
0
        ExprNode Expr_4()
        {
            var n = Expr_5();

            while (Lexer.Token == Lexer.TokenType.TOK_PLUS ||
                   Lexer.Token == Lexer.TokenType.TOK_MINUS)
            {
                var pos = Lexer.Describe();
                var t   = Lexer.Token;
                Lexer.NextToken();
                var n1 = Expr_5();
                n = new ArifmExprNode(n, n1, t, pos);
            }
            return(n);
        }
Пример #5
0
        ExprNode Expr_5()
        {
            var n = Expr_U();

            while (Lexer.Token == Lexer.TokenType.TOK_MUL ||
                   Lexer.Token == Lexer.TokenType.TOK_DIV ||
                   Lexer.Token == Lexer.TokenType.TOK_MOD)
            {
                var pos = Lexer.Describe();
                var t   = Lexer.Token;
                Lexer.NextToken();
                var n1 = Expr_U();
                n = new ArifmExprNode(n, n1, t, pos);
            }
            return(n);
        }
Пример #6
0
        ExprNode Expr_3()
        {
            var n = Expr_4_1();

            while (Lexer.Token == Lexer.TokenType.TOK_LESS ||
                   Lexer.Token == Lexer.TokenType.TOK_GREATER ||
                   Lexer.Token == Lexer.TokenType.TOK_GREATEQ ||
                   Lexer.Token == Lexer.TokenType.TOK_LESSEQ)
            {
                var pos = Lexer.Describe();
                var t   = Lexer.Token;
                Lexer.NextToken();
                var n1 = Expr_4_1();
                n = new ArifmExprNode(n, n1, t, pos);
            }
            return(n);
        }