2 * FML interpreter. Europagate, 1995
5 * Revision 1.4 1995/02/09 16:06:08 adam
6 * FML can be called from the outside multiple times by the functions:
7 * fml_exec_call and fml_exec_call_str.
8 * An interactive parameter (-i) to fmltest starts a shell-like
9 * interface to FML by using the fml_exec_call_str function.
11 * Revision 1.3 1995/02/09 13:07:15 adam
12 * Nodes are freed now. Many bugs fixed.
14 * Revision 1.2 1995/02/07 16:09:24 adam
15 * The \ character is no longer INCLUDED when terminating a token.
16 * Major changes in tokenization routines. Bug fixes in expressions
17 * with lists (fml_sub0).
19 * Revision 1.1.1.1 1995/02/06 13:48:10 adam
20 * First version of the FML interpreter. It's slow and memory isn't
21 * freed properly. In particular, the FML nodes aren't released yet.
31 static int inf_read (void)
36 int main (int argc, char **argv)
48 if (argv[0][1] == 'd')
50 else if (argv[0][1] == 'm')
52 else if (argv[0][1] == 'i')
58 fprintf (stderr, "uknown option `%s'\n", *argv);
65 inf = fopen (*argv, "r");
68 fprintf (stderr, "cannot open `%s'\n", *argv);
71 fml->read_func = inf_read;
95 if (!fgets (arg, 127, stdin))
97 if ((cp = strchr (arg, '\n')))
99 fml_exec_call_str (fml, arg);