The editor is based on a collection of algebraic C++ objects, all derived from nucleo object.
All operators and groups are nucleo containers. Containers also derive from nucleo class so a tree structure can be build to represent an algebraic expression, with operators containing other operators.
A nucleo object reacts to edition changes by changing they own type if necessary (recognising nominals, literal and booleans) or rearanging the lists dependencies.
Due to this constant parsing the algebraic is always ready for manipulation with literals, nominals, booleans, operators and functions being isolated objects, nominal objects also have an internal value of type double.
A sample expression. |
|
Diagram of the neested lists builded by this editor in order to represent the sample expression. This lists are neested according to the priority of the intervinient operators, the editor does all the ordering as the user writes (active parser). As a result of this, no aditional parse is needed, once the user finishes the equation, it is ready for calculation or other sort of operations you may implement on it. What about y=m*(x+b) ? What is the advantage? All the parsing consuming time is distributed in small gaps while editing, leaving all computing power to calculation time (like indexing advantage for databases). |
I am using Microsoft® VC++ 5 © and the project is MFC© dependent at this moment.
download here the v039 exe + AlgEdit.dll file (178kb)
(assuming that you already have the DLL's: mfc42.dll, msvcirt.dll, msvcrt.dll)
to solve:
last update: 97/09/22
Rui H F Azevedo