Mathematic Expressions Library  0.1
The core math data structures and manipulators
symbolic.h
Go to the documentation of this file.
1 
14 #ifndef _SYMBOLIC_H_
15 #define _SYMBOLIC_H_
16 
17 #include <stddef.h> /* size_t */
18 #include "expression_lite.h" // just need pointer expression_t
19 
20 #define SYMBOLIC_NAME_SIZE 10
21 #define SYMBOLIC_P_STR_SIZE 16
22 
28 struct sym {
30  struct expression *p;
31 };
32 typedef struct sym sym_t;
33 
34 sym_t
35 sym_new_name(char *name);
36 
37 sym_t
38 string_to_sym (size_t src_str_len, char const *src_str);
39 
40 void
41 sym_to_string(char *dst_str, sym_t src_sym);
42 
43 //void
44 //sym_set(char name, value_t num);
45 //
46 //value_t
47 //sym_get(sym_t sym);
48 
49 #endif /* _SYMBOLIC_H_ */
50 
51 /* vim: set ts=4 sw=4 expandtab: */
A named symbol type.
Definition: symbolic.h:28
sym_t sym_new_name(char *name)
New symbolic object whose name is set to name.
Definition: symbolic.c:24
#define SYMBOLIC_NAME_SIZE
Definition: symbolic.h:20
struct expression * p
The symbol parameter.
Definition: symbolic.h:30
void sym_to_string(char *dst_str, sym_t src_sym)
Generate a string from a sym_t.
Definition: symbolic.c:104
The stored representation of mathematical expressions.
Definition: expression.h:72
sym_t string_to_sym(size_t src_str_len, char const *src_str)
Create symbol from a string.
Definition: symbolic.c:42
char name[SYMBOLIC_NAME_SIZE]
The symbol name.
Definition: symbolic.h:29