1234567891011121314151617181920212223 |
- #include "erpl.h"
- #include "erpli.c"
- #include "erple.c"
- int main (int argc, char** argv) {
- Atom *expr, *ret;
- Table *root_scope = NULL;
- while (!interrupted) {
-
- printf("> ");
- expr = parse();
- ret = eval(expr,&root_scope);
- if (ret) {
- printf("returned: "); print_expression(ret); putchar(10);
- stack_push(ret, &stack);
- }
- free_atom(expr);
- if (ret != expr)
- free_atom(ret);
- }
- return 0;
- }
|