От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 22.07.04 06:38 | ||
Оценка: | 77 (7) |
Many applications require the parsing of mathematical expressions. The main goal of this project is to provide a fast and easy way of doing this. Most of the applications require repeated evaluation of the same formula. In order to speed such operations up the parser compiles the formula into bytecode. This bytecode is used for all successive calculations of the formula resulting in dramatic improvement of performance.
От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 27.07.04 03:20 | ||
Оценка: |
Rev 1.01 : July 23 2004
Support for user defined function has been added; New functions: AddFun(), ClearFun(), InitFunctions()
Built in constants have been removed; The parser contained undocumented built in constants pi, e. There was the possibility of name conflicts with user defined variables.
Setting multiple variables with SetVar can now be done with a map of names and pointers as the only argument. For this reason a new type Parser::varmap_type was added. The old version that took 3 arguments (array of names, array of pointers and array length) is now marked as deprecated.
The names of logarithm functions have changed. The new names are: log2 for base 2, log10 or log for base 10 and ln for base e.
От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 03.08.04 06:58 | ||
Оценка: |
Rev 1.02 : July 30 2004
Support for user defined constants added; New functions: InitConst(), AddConst(), SetConst(), ClearConst().
Single variables can now be added using AddVar(); You have now the choice of adding them either one by one or all at the same time using SetVar(const varmap_type &a_vVar)
Internal handling of variables changed, is now similar to function handling.
virtual destructor added; InitFun(), InitConst() are now virtual too thus making it possible to derive new parsers with a modified set of default functions and constants.
Support for user defined functions with 2 or 3 parameters added; Bytecode format changed to hold function parameter count.
От: | Andrew S | http://alchemy-lab.com | |
Дата: | 03.08.04 08:18 | ||
Оценка: |
SDB>Many applications require the parsing of mathematical expressions. The main goal of this project is to provide a fast and easy way of doing this. Most of the applications require repeated evaluation of the same formula. In order to speed such operations up the parser compiles the formula into bytecode. This bytecode is used for all successive calculations of the formula resulting in dramatic improvement of performance.
От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 07.08.04 09:13 | ||
Оценка: |
I built this math parser with adaptability and reusability in mind. Adaptable means that to add or modify some behaviour, you should not have to recode half of the parser, and thus simple modifications should be simple to do. To enhance a very adaptable design, you should only have to add code and never have to modify existing code (is it only a dream?). To be reusable a component should encapsulate its logic and allows application specific things to be defined externally, without impacting the component.
От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 01.09.04 04:06 | ||
Оценка: |
Rev 1.05
Variable/constant names will now be checked for invalid characters.
Querying the names of all variables used in an expression is now possible; new function: GetUsedVar().
Disabling bytecode parsing is now possible; new function: EnableByteCode(bool bStat).
Predefined functions with variable number of arguments added: sum, avg, min, max.
Unary prefix operators added; new functions: AddPrefixOp(...), ClearPrefixOp().
Postfix operator interface names changed; new function names: AddPostfixOp(...), ClearPostfixOp().
Hardcoded sign operators removed in favor of prefix operators; bytecode format changed accordingly.