2005-12-25 06:48:18 UTC
Oh man, the links messed up my previous post, lets try again:
There is a mathematical expression parser (formula parser) available at
http://www.bestcode.com/html/mathparser.html
It supports logical operator that you are asking: <, >, =, <>, >=, <=, &, |, !
The parser comes in four different languages:
Delphi VCL component that can also be used in C++ Builder.
ActiveX (COM) Component that resides in a DLL. Written in Visual C++ using ATL.
Java version.
.Net version written in C# (CSharp)
They all have source code available.
Operators: +, -, /, *, ^
Logical Operators: <, >, =, <>, >=, <=, &, |, ! [IF(condition,case1,case2) is supported]
The expression to be parsed can contain predefined or user defined functions and variables. Functions can take many parameters.
It has good error reporting such that it can be used to get error about an undefined variable and define it and try again for example.
The parser can optionally optimize expressions by evaluating contstant portions at once to speed up repeated evaluations when
expression remains unchanged but parameters change.
.NET version supports string values.
Math Parser for Delphi:
http://www.bestcode.com/html/tbcparser.html
Math Parser for COM :
http://www.bestcode.com/html/bcparserx.html
Math parser for Java :
http://www.bestcode.com/html/jbcparser.html
Math Parser for .NET :
http://www.bestcode.com/html/bcparser_net.html
Cheers!
Veli
support@bestcode.com