Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct word{
- struct word *previous;
- char *name;
- uint8_t flag;
- void(*xt)();
- }word;
- #define STRUCT {0, "+", 0, add}
- word last_word = {&(STRUCT), "-", 0, sub};
- typedef struct word{
- // struct word *previous;
- char *name;
- uint8_t flag;
- void(*xt)();
- } word;
- word w[] = {
- { "plus", 0, add };
- { "minus", 0, sub };
- ...
- };
- typedef struct word{
- struct word *previous;
- char *name;
- unsigned char flag;
- void(*xt)();
- } word;
- word w[] = {
- { 0, "plus", 0, add },
- { &w[0], "minus", 0, minus },
- { &w[1], "product", 0, prod }
- ...
- };
- typedef struct word {
- struct word *previous;
- char *name;
- uint8_t flag;
- void(*xt)();
- } word;
- word w1 = { 0, "plus", 0, add };
- word w2 = { &w1, "minus", 0, sub };
- typedef struct word {
- struct word *previous;
- char *name;
- uint8_t flag;
- void(*xt)();
- } word;
- word* root = malloc(sizeof(word));
- *root = (word){ 0, "plus", 0, add };
- word* prev = root;
- root = malloc(sizeof(word));
- *root = (word){ prev, "minus", 0, sub };
- prev = root;
- root = malloc(sizeof(word));
- *root = (word){ prev, "times", 0, mult };
- // ...
- typedef struct word
- {
- void(*xt)();
- char *name;
- uint8_t index;
- uint8_t flag;
- } word;
- word w[] =
- {
- { 0, "plus", 0, add },
- { 1, "minus", 0, minus },
- { 2, "product", 0, prod },
- // ...
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement