|
My Project
programmer's documentation
|
Go to the documentation of this file. 1 #ifndef __MEI_EVALUATE_H__
2 #define __MEI_EVALUATE_H__
105 hash_table_t *symbol_table);
mei_tree_t * mei_tree_new_with_shared_symbols(const char *expr, hash_table_t *symbol_table)
Returns a new interpreter. The node member is empty, the string member contains the mathematical expr...
Definition: mei_evaluate.c:536
char * string
Definition: mei_evaluate.h:54
int mei_tree_builder(mei_tree_t *ev)
Call the yacc parser. Return 0 if the parsing is ok, or the number of errors, if errors occurs.
Definition: mei_evaluate.c:606
Hash table, intended to provide a symbol table.
int errors
Definition: mei_evaluate.h:55
int * columns
Definition: mei_evaluate.h:56
void mei_symbol_table_insert(hash_table_t *symbol_table, const char *str, const double value)
Inserts a constant (label and value) in a table of symbols.
Definition: mei_evaluate.c:728
void mei_tree_insert(mei_tree_t *ev, const char *str, const double value)
Inserts a constant (label and value) in the table of symbols associated to an interpreter.
Definition: mei_evaluate.c:702
mei_tree_t * mei_tree_new(const char *expr)
Returns a new interpreter. The node member is empty, the string member contains the mathematical expr...
Definition: mei_evaluate.c:489
void mei_tree_destroy(mei_tree_t *ev)
Free memory and return NULL.
Definition: mei_evaluate.c:872
double mei_tree_lookup(mei_tree_t *ev, const char *str)
Returns a value of the str symbol (variable or constant) from table of symbols of ev interpreter.
Definition: mei_evaluate.c:827
int mei_tree_find_symbol(mei_tree_t *ev, const char *str)
Check if the symbol str exists in the expression stored in ev.
Definition: mei_evaluate.c:755
Structure defining an interpreter for a mathematical expression.
Definition: mei_evaluate.h:53
hash_table_t * mei_table_symbols_new(void)
Returns a new table of symbols. The table contains standard mathematical symbols.
Definition: mei_evaluate.c:582
int * lines
Definition: mei_evaluate.h:57
hash_table_t * symbol
Definition: mei_evaluate.h:59
mei_node_t * node
Definition: mei_evaluate.h:60
int mei_tree_find_symbols(mei_tree_t *ev, const int size, const char **symbol)
Check if the symbol str from a list exists in the expression. The list of missing symbols is stored i...
Definition: mei_evaluate.c:789
double mei_evaluate(mei_tree_t *ev)
Evaluates the expression ev : 1) computes all values for variables inside the expression 2) returns a...
Definition: mei_evaluate.c:857
char ** labels
Definition: mei_evaluate.h:58
Nodal structure of the interpreter.