递归下降的表达式解析器(C#)

使用方法:10-2*3 得到结果 6。

ExpressionParser.cs

using System;

namespace IBMS.Text.Script
{
    
Field

    
Public Mothord

    
Private Methord
        
    }


}


ExpressionParserException.cs
using System;

namespace IBMS.Text.Script
{
    /**//// <summary>
    /// Exception class for parsor errors
    /// </summary>
    public class ExpressionParserException:Exception
    {
        /**//// <summary>
        /// Constructor
        /// </summary>
        /// <param name="str">error message</param>
        public ExpressionParserException(string str)
            :base(str)
        {
            
        }
        
    }
}
posted @ 2006-03-22 20:43 南桥一梦 阅读(431) 评论(2) 编辑 收藏