C# 表达式解析器源代码(修正)

上传者: igame | 上传时间: 2019-12-21 19:56:42 | 文件大小: 37KB | 文件类型: zip
一个C#实现的简单表达式解析器,支持算符优先级、括号以及函数。 修正前一个上传版本存在的问题:算符优先级的错误。

文件下载

资源详情

[{"title":"( 74 个子文件 37KB ) C# 表达式解析器源代码(修正)","children":[{"title":"CSFormula.sln <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"CSFormular.csproj <span style='color:#111;'> 4.41KB </span>","children":null,"spread":false},{"title":"Expression","children":[{"title":"ExpressionNode.cs <span style='color:#111;'> 602B </span>","children":null,"spread":false},{"title":"Operator.Package","children":[{"title":"And.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"ShiftRight.cs <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"Operator.cs <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"BitwiseOr.cs <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"Not.cs <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"LessEqual.cs <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"Add.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"ShiftLeft.cs <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"Div.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"BinaryOperator.cs <span style='color:#111;'> 514B </span>","children":null,"spread":false},{"title":"Parentheses.cs <span style='color:#111;'> 511B </span>","children":null,"spread":false},{"title":"Minus.cs <span style='color:#111;'> 510B </span>","children":null,"spread":false},{"title":"Plus.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"Function.cs <span style='color:#111;'> 764B </span>","children":null,"spread":false},{"title":"BitwiseAnd.cs <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"BitwiseNot.cs <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"Mul.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"Average.cs <span style='color:#111;'> 507B </span>","children":null,"spread":false},{"title":"Less.cs <span style='color:#111;'> 510B </span>","children":null,"spread":false},{"title":"UnaryOperator.cs <span style='color:#111;'> 513B </span>","children":null,"spread":false},{"title":"Or.cs <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"GreaterEqual.cs <span style='color:#111;'> 518B </span>","children":null,"spread":false},{"title":"Sum.cs <span style='color:#111;'> 503B </span>","children":null,"spread":false},{"title":"Sub.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"Greater.cs <span style='color:#111;'> 513B </span>","children":null,"spread":false},{"title":"Power.cs <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"Xor.cs <span style='color:#111;'> 509B </span>","children":null,"spread":false}],"spread":false},{"title":"Formula.cs <span style='color:#111;'> 26.16KB </span>","children":null,"spread":false},{"title":"Operator","children":[{"title":"Logic","children":[{"title":"NotEqual.cs <span style='color:#111;'> 599B </span>","children":null,"spread":false},{"title":"And.cs <span style='color:#111;'> 832B </span>","children":null,"spread":false},{"title":"LessEqual.cs <span style='color:#111;'> 795B </span>","children":null,"spread":false},{"title":"Equal.cs <span style='color:#111;'> 593B </span>","children":null,"spread":false},{"title":"Less.cs <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"Or.cs <span style='color:#111;'> 820B </span>","children":null,"spread":false},{"title":"GreaterEqual.cs <span style='color:#111;'> 801B </span>","children":null,"spread":false},{"title":"Greater.cs <span style='color:#111;'> 789B </span>","children":null,"spread":false}],"spread":true},{"title":"Operator.cs <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"Bitwise","children":[{"title":"BitwiseOr.cs <span style='color:#111;'> 793B </span>","children":null,"spread":false},{"title":"BitwiseAnd.cs <span style='color:#111;'> 795B </span>","children":null,"spread":false},{"title":"BitwiseNot.cs <span style='color:#111;'> 779B </span>","children":null,"spread":false}],"spread":true},{"title":"Function","children":[{"title":"Average.cs <span style='color:#111;'> 1000B </span>","children":null,"spread":false},{"title":"Sum.cs <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"Power.cs <span style='color:#111;'> 948B </span>","children":null,"spread":false}],"spread":true},{"title":"BinaryOperator.cs <span style='color:#111;'> 1021B </span>","children":null,"spread":false},{"title":"Parentheses.cs <span style='color:#111;'> 751B </span>","children":null,"spread":false},{"title":"OperatorBase.cs <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"Mathematic","children":[{"title":"ShiftRight.cs <span style='color:#111;'> 812B </span>","children":null,"spread":false},{"title":"Mod.cs <span style='color:#111;'> 817B </span>","children":null,"spread":false},{"title":"Add.cs <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"ShiftLeft.cs <span style='color:#111;'> 810B </span>","children":null,"spread":false},{"title":"Div.cs <span style='color:#111;'> 910B </span>","children":null,"spread":false},{"title":"Mul.cs <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"Sub.cs <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"Xor.cs <span style='color:#111;'> 783B </span>","children":null,"spread":false}],"spread":true},{"title":"Function.cs <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"UnaryOperator.cs <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"Unary","children":[{"title":"Not.cs <span style='color:#111;'> 765B </span>","children":null,"spread":false},{"title":"Minus.cs <span style='color:#111;'> 798B </span>","children":null,"spread":false},{"title":"Plus.cs <span style='color:#111;'> 766B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"Operand.Package","children":[{"title":"Operand.cs <span style='color:#111;'> 1.70KB </span>","children":null,"spread":false},{"title":"OperandString.cs <span style='color:#111;'> 511B </span>","children":null,"spread":false},{"title":"OperandNumber.cs <span style='color:#111;'> 511B </span>","children":null,"spread":false},{"title":"OperandBoolean.cs <span style='color:#111;'> 512B </span>","children":null,"spread":false}],"spread":true},{"title":"Token.cs <span style='color:#111;'> 911B </span>","children":null,"spread":false},{"title":"Operand","children":[{"title":"OperandBase.cs <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"Operand.cs <span style='color:#111;'> 8.35KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"CSFormularTest","children":[{"title":"Program.cs <span style='color:#111;'> 2.33KB </span>","children":null,"spread":false},{"title":"CSFormularTest.csproj <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • linwanglian1 :
    请问楼主,里面打代码是用什么工具生成的
    2020-03-03
  • cjipcrwitz :
    内容很丰富,最可贵的是资源不需要很多积分.
    2019-06-05
  • amoonchild :
    括号优先级有问题, 正负号有问题, 识别字符串的方式不太好, 大概的思路还算可以吧
    2019-04-19
  • sjm5210 :
    非常不错的资源,非常感谢!
    2019-02-14
  • XLELSE :
    资源不错,可以用,谢谢分享
    2018-12-07

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明