Parsing a string formula to an integer result

后端 未结 2 427
闹比i
闹比i 2021-01-16 01:11

I\'m doing some parsing work, too complex to get into details, but there\'s one simple thing I need to do (at least simple concept, maybe not simple answer). I might have a

相关标签:
2条回答
  • 2021-01-16 01:32

    Parser10, written originally by Renate Schaaf for Delphi 1 and later upgraded to Delphi2 and 3 by Alin Flaider and Stefan Hoffmeister, is a fairly simple math parser. It will do the job for simple expressions and can serve as a boilerplate for more complex work.

    It is not built for speed though.

    Update :

    Hallvard Vassbotn made an update of Parser10 and added some documentation. Load it from here.

    0 讨论(0)
  • 2021-01-16 01:54

    List of Parsers, Mathematical Expression Evaluators, Calculators: here

    [Edit] Or a TBindExpression in Delphi XE2, not sure if its apply PEMDAS

    0 讨论(0)
提交回复
热议问题