• 大小: 0.11M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-02-25
  • 语言: C#
  • 标签: C#  c  四则运算  解析  源码  

资源简介

实现 、-、*、/、%、<、>、=、<>、<=、>= 

详细信息查看如下地址: 

http://blog.csdn.net/welliu/archive/2011/04/13/6320562.aspx




资源截图

代码片段和文件信息

/********************************************
 * 
 * http://blog.csdn.net/welliu
 * 
 * Email:lgjwell@gmail.com
 * 
 * QQ:147620454
 * 
 *******************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace expressionCalculator
{
    /// 
    /// 表达式计算器
    /// 

    public class Calculator
    {
        public Calculator()
            : this(““)
        { }

        public Calculator(string expression)
        {
            _expression = expression;
        }

        private string _expression = string.Empty;
        private link_OP _link_OP = null;
        private Evaluator _eval = new Evaluator();

        #region 获取分词

        /// 
        /// 获取后缀分词
        /// 

        public List PostfixWords
        {
            get
            {
                Analyze();
                SyntaxAnalyzer a = new SyntaxAnalyzer();
                return

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      19968  2011-04-13 13:35  expressionCalculator\expressionCalculator\bin\Debug\expressionCalculator.dll

     文件      48640  2011-04-13 13:35  expressionCalculator\expressionCalculator\bin\Debug\expressionCalculator.pdb

     文件       4290  2011-04-13 13:34  expressionCalculator\expressionCalculator\Calculator.cs

     文件       7246  2011-04-13 13:32  expressionCalculator\expressionCalculator\Define.cs

     文件       2780  2011-04-13 13:33  expressionCalculator\expressionCalculator\Enum.cs

     文件      14443  2011-04-13 13:33  expressionCalculator\expressionCalculator\Evaluator.cs

     文件       2381  2011-04-11 22:54  expressionCalculator\expressionCalculator\expressionCalculator.csproj

     文件        451  2011-04-11 23:01  expressionCalculator\expressionCalculator\obj\Debug\expressionCalculator.csproj.FileListAbsolute.txt

     文件      19968  2011-04-13 13:35  expressionCalculator\expressionCalculator\obj\Debug\expressionCalculator.dll

     文件      48640  2011-04-13 13:35  expressionCalculator\expressionCalculator\obj\Debug\expressionCalculator.pdb

     文件      12062  2011-04-13 13:32  expressionCalculator\expressionCalculator\PhraseAnalyzer.cs

     文件       1382  2011-04-11 16:23  expressionCalculator\expressionCalculator\Properties\AssemblyInfo.cs

     文件      17367  2011-04-13 13:32  expressionCalculator\expressionCalculator\SyntaxAnalyzer.cs

     文件       5035  2011-04-13 13:30  expressionCalculator\expressionCalculator\ToolBox.cs

     文件        950  2011-04-11 16:23  expressionCalculator\expressionCalculator.sln

    ..A..H.     11776  2011-05-22 20:00  expressionCalculator\expressionCalculator.suo

     文件      19968  2011-04-13 13:35  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculator.dll

     文件      48640  2011-04-13 13:35  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculator.pdb

     文件      12800  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculatorTest.exe

     文件      28160  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculatorTest.pdb

     文件      14328  2011-04-14 14:28  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculatorTest.vshost.exe

     文件        490  2007-07-21 01:33  expressionCalculatorTest\expressionCalculatorTest\bin\Debug\expressionCalculatorTest.vshost.exe.manifest

     文件       3652  2011-04-12 12:03  expressionCalculatorTest\expressionCalculatorTest\expressionCalculatorTest.csproj

     文件       2566  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\Form1.cs

     文件      10303  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\Form1.Designer.cs

     文件       5814  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\Form1.resx

     文件       1069  2011-04-14 14:28  expressionCalculatorTest\expressionCalculatorTest\obj\Debug\expressionCalculatorTest.csproj.FileListAbsolute.txt

     文件        847  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\obj\Debug\expressionCalculatorTest.csproj.GenerateResource.Cache

     文件      12800  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\obj\Debug\expressionCalculatorTest.exe

     文件        180  2011-04-13 14:24  expressionCalculatorTest\expressionCalculatorTest\obj\Debug\expressionCalculatorTest.Form1.resources

............此处省略31个文件信息

评论

共有 条评论