/// <summary>
        /// Visit a value expression
        /// </summary>
        /// <param name="expression">The expression</param>
        /// <exception cref="ArgumentNullException">Thrown when the input parameter is null</exception>
        public void Visit(ValueExpression expression)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            switch (expression.Type)
            {
            case ValueExpressionType.Integer:
                result = int.Parse(expression.Text, CultureInfo.InvariantCulture);
                break;

            case ValueExpressionType.Variable:
                int value;
                int dereferencedValue;
                int pointerValue;
                if (context.TryResolveSymbol(expression.Text, out value))
                {
                    result = context.Variables[expression.Text];
                }
                else if (context.TryResolveDereference(expression.Text, out dereferencedValue, out pointerValue))
                {
                    // give a dummy pointer address for the pointer.
                    result = pointerValue;
                }
                else
                {
                    int intValue;
                    if (Int32.TryParse(expression.Text, out intValue))
                    {
                        result = intValue;
                    }
                    else
                    {
                        result = expression.Text;
                    }
                }
                break;

            case ValueExpressionType.Null:
                result = expression.Text;
                break;

            default:
                break;
            }
        }