2 * FML interpreter. Europagate, 1995
5 * Revision 1.1 1995/02/06 13:48:09 adam
12 #define FML_MAX_TOKEN 2048
14 #define FML_ATOM_BUF 12
22 struct fml_atom *next;
23 char buf[FML_ATOM_BUF];
26 struct fml_node *fml_tokenize (Fml fml);
27 struct fml_node *fml_node_alloc (Fml fml);
28 struct fml_atom *fml_atom_alloc (Fml fml, char *str);
29 int fml_atom_str (struct fml_atom *a, char *str);
30 void fml_atom_strx (struct fml_atom *a, char *str, int max);
31 int fml_atom_val (struct fml_atom *a);
32 struct fml_node *fml_mk_list (Fml fml, struct fml_node *fn);
33 void fml_node_delete (Fml fml, struct fml_node *fn);
34 struct fml_node *fml_node_copy (Fml fml, struct fml_node *fn);
47 struct fml_atom *atom;
48 char sbuf[FML_ATOM_BUF*4];
53 struct fml_node *args;
54 struct fml_node *body;
55 struct fml_node *(*binary)(Fml fml, struct fml_node *l,
57 struct fml_node *(*prefix)(Fml fml, struct fml_node **lp,
61 struct fml_sym_tab *fml_sym_open (void);
62 void fml_sym_close (struct fml_sym_tab **tabp);
63 struct fml_sym_info *fml_sym_add (struct fml_sym_tab *tab, const char *s);
64 struct fml_sym_info *fml_sym_add_local (struct fml_sym_tab *tab,const char *s);
66 struct fml_sym_info *fml_sym_lookup (struct fml_sym_tab *tab, const char *s);
67 struct fml_sym_info *fml_sym_lookup_local (struct fml_sym_tab *tab,
69 void fml_sym_push (struct fml_sym_tab *tab);
70 void fml_sym_pop (struct fml_sym_tab *tab, void(*ph)(struct fml_sym_info *i));
72 void fml_pr_list (struct fml_node *p);
83 #define FML_CBINARY 10
84 #define FML_CPREFIX 11