Parser
2.1
Package for parsing, storing and evaluating algebraic expressions.
Currently, this package only contains the storing and evaluating functions. It does not parse any expression. It is used by HPStack, which can decode the RPL 'DOSYMB' (algebraic expressions) from the RPL stack.
The principle is the following :
- The expression is stored as a stack (exactly as it is coded in RPL)
- Each level of the stack is either a numerical value (double), a variable, a function, or a symbolic expression
- A variable is described by its name, and its value which can be set by prs_alg_set_var
- A function is described by its code (which is in fact for convenience its address in the RPL Saturn world), its number of parameters, and a pointer to the corresponding C function
- A symbol is described by another stack
- When evaluated, the stack is processed, getting variables value, and calling the functions. The symbols are kept unevaluated until a function processes them.
Generated on Wed May 23 20:11:39 2007 for HPParser by
1.5.0