build.h (444B)
1 typedef struct Token Token; 2 struct Token { 3 int t; 4 char *p; 5 }; 6 7 typedef struct Label Label; 8 struct Label { 9 char *p; 10 uint16_t n; 11 }; 12 13 void splittokens(char *dat, Array *tokens); 14 void addwords(Array *words, char *p); 15 Label * getlabel(Array *labels, char *p); 16 int run1(Array *tokens, Array *labels, Array *words); 17 int run2(Array *labels, Array *words, int16_t *prog); 18 int build(char *dat, int16_t *prog); 19 int buildfile(FILE *fp, int16_t *prog);