-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymbolic.h
51 lines (42 loc) · 1.04 KB
/
symbolic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* @file symbolic.h
*
* @date May 3, 2014
* @author Craig Hesling
*
* A light structure that is mostly public access.
*
* The point of the sym structure is to create a string based reference
* to an object without being directly connected to the object.
* This allows for
*
*/
#ifndef _SYMBOLIC_H_
#define _SYMBOLIC_H_
#include <stddef.h> /* size_t */
#include "expression_lite.h" // just need pointer expression_t
#define SYMBOLIC_NAME_SIZE 10
#define SYMBOLIC_P_STR_SIZE 16
/**
* A named symbol type.
* A symbol can refer to a variable or function.
* The field p is NULL when no parameter exists.
*/
struct sym {
char name[SYMBOLIC_NAME_SIZE]; ///< The symbol name
struct expression *p; ///< The symbol parameter
};
typedef struct sym sym_t;
sym_t
sym_new_name(char *name);
sym_t
string_to_sym (size_t src_str_len, char const *src_str);
void
sym_to_string(char *dst_str, sym_t src_sym);
//void
//sym_set(char name, value_t num);
//
//value_t
//sym_get(sym_t sym);
#endif /* _SYMBOLIC_H_ */
/* vim: set ts=4 sw=4 expandtab: */