[DUG] Expression Parser/Evaluator

Phil Scadden p.scadden at gns.cri.nz
Wed Oct 24 16:55:34 NZDT 2007


> Can anyone recommend a good expression parser/evaluator? Ideally a bit 
> more than just mathematical expressions, we would like it to handle 
> logical evaluation (ie Booleans), IF statements and ideally strings 
> (primarily for comparison within boolean IF conditions but if the 
> parser/evaluator could handle strings as results then all the better). 
> We don’t need any loop constructs or more advanced program control 
> constructs. We would probably like to be able to define our own 
> expression functions but the user probably doesn’t need to be able to.
>
me too. I use a thing called FormulaBuilder that got for D2, before 
variants, and appears to have vanished without trace. It does one-time 
compiles, can add my own functions, rerun the function
changing only the variables and does 
IIF(expression,ontrue,onfalse).CHOOSE, SELECT, string functions, date 
functions, statistics etc. Doesnt do multiline expressions like 
pasScript. For my kind of application, it has been perfect. It is also 
seriously dated and I have been too lazy to modernize the code. A good 
replacement would be nice.

-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232


More information about the Delphi mailing list