Logical and mathematical expressions parser / evaluator

From: Christiaan (Christiaan_at_notvalid.nl)
Date: 12/30/03


Date: Tue, 30 Dec 2003 21:31:36 +0100

hello,
I am looking for a delphi component (freeware is not necessary) to parse
logical and mathematical expression. I want to do the following with
assistance of the component:
1) users should be able to enter logical and mathical expressions such as

if(height > 5) then
begin
  price := sin(5) * Power(2,4);
end;

- this doesnt of course have to be supported by the component, but a visual
of entering these expressions would be nice
- It doesnt have to be a specific grammair, eg Pascal
2) The component should be able to parse the expression and tell whether it
is syntactically correct
3) The component should return the unassigned variables (in the example
height), the user should be able to assign values to these variables
4) after the variables have been assigned, the expression should be
evaluated and return the variables including their values.

Does anybody know a good component which supports this (don't know if I am
at the right place to ask this)

kind regards,
Christiaan



Relevant Pages