private IExpression MultiplicativeExpression()
        {
            IExpression expr = UnaryExpression();

            while (!lexer.Peek(TokenType.None))
            {
                Operator op;
                if (lexer.Accept(TokenType.Mult))
                {
                    op = Operator.Mult;
                }
                else if (lexer.Accept(TokenType.Div))
                {
                    op = Operator.Div;
                }
                else if (lexer.Accept(TokenType.Mod))
                {
                    op = Operator.Mod;
                }
                else
                {
                    break;
                }

                expr = new NumericArithmeticExpression
                {
                    Operator  = op,
                    LeftExpr  = (INumericExpression)expr,
                    RightExpr = (INumericExpression)UnaryExpression()
                };
            }

            return(expr);
        }
        private IExpression AdditiveExpression()
        {
            IExpression expr = MultiplicativeExpression();

            while (!lexer.Peek(TokenType.None))
            {
                Operator op;
                if (lexer.Accept(TokenType.Plus))
                {
                    op = Operator.Plus;
                }
                else if (lexer.Accept(TokenType.Minus))
                {
                    op = Operator.Minus;
                }
                else
                {
                    break;
                }

                expr = new NumericArithmeticExpression
                {
                    Operator  = op,
                    LeftExpr  = (INumericExpression)expr,
                    RightExpr = (INumericExpression)MultiplicativeExpression()
                };
            }

            return(expr);
        }
        private IExpression ShiftExpression()
        {
            IExpression expr = AdditiveExpression();

            while (!lexer.Peek(TokenType.None))
            {
                Operator op;
                if (lexer.Accept(TokenType.LeftShift))
                {
                    op = Operator.LeftShift;
                }
                else if (lexer.Accept(TokenType.RightShift))
                {
                    op = Operator.RightShift;
                }
                else
                {
                    break;
                }

                expr = new NumericArithmeticExpression
                {
                    Operator  = op,
                    LeftExpr  = (INumericExpression)expr,
                    RightExpr = (INumericExpression)AdditiveExpression()
                };
            }

            return(expr);
        }
        private IExpression BitwiseAndExpression()
        {
            IExpression expr = EqualityExpression();

            while (lexer.Accept(TokenType.BitwiseAnd))
            {
                expr = new NumericArithmeticExpression
                {
                    Operator  = Operator.BitwiseAnd,
                    LeftExpr  = (INumericExpression)expr,
                    RightExpr = (INumericExpression)EqualityExpression()
                };
            }

            return(expr);
        }
        private IExpression BitwiseOrExpression()
        {
            IExpression expr = BitwiseXorExpression();

            while (lexer.Accept(TokenType.BitwiseOr))
            {
                expr = new NumericArithmeticExpression
                {
                    Operator  = Operator.BitwiseOr,
                    LeftExpr  = (INumericExpression)expr,
                    RightExpr = (INumericExpression)BitwiseXorExpression()
                };
            }

            return(expr);
        }