summaryrefslogtreecommitdiff
path: root/src/fype.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fype.c')
-rw-r--r--src/fype.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/fype.c b/src/fype.c
index 23f017f..0b64242 100644
--- a/src/fype.c
+++ b/src/fype.c
@@ -1,13 +1,12 @@
/*:*
*: File: ./src/fype.c
- *: A simple interpreter
+ *: A simple Fype interpreter
*:
- *: WWW : http://fype.buetow.org
- *: AUTHOR : http://paul.buetow.org
- *: E-Mail : fype at dev.buetow.org
+ *: WWW: http://fype.buetow.org
+ *: AUTHOR: http://paul.buetow.org
+ *: E-Mail: fype at dev.buetow.org
*:
- *: Copyright (c) 2005 - 2009, Dipl.-Inform. (FH) Paul C. Buetow
- *: All rights reserved.
+ *: The Fype Language; (c) 2005 - 2010 Paul Buetow
*:
*: Redistribution and use in source and binary forms, with or without modi-
*: fication, are permitted provided that the following conditions are met:
@@ -36,10 +35,9 @@
#include "fype.h"
#include "argv.h"
-#include "core/garbage.h"
-#include "core/interpret.h"
#include "core/scanner.h"
-#include "core/symbol.h"
+#include "core/token.h"
+#include "core/interpret.h"
Fype*
fype_new() {
@@ -50,8 +48,6 @@ fype_new() {
p_fype->p_tupel_argv = tupel_new();
p_fype->c_basename = NULL;
- garbage_init();
-
return (p_fype);
}
@@ -59,18 +55,13 @@ void
fype_delete(Fype *p_fype) {
argv_tupel_delete(p_fype->p_tupel_argv);
- hash_iterate(p_fype->p_hash_syms, symbol_cleanup_hash_syms_cb);
hash_delete(p_fype->p_hash_syms);
- //list_iterate(p_fype->p_list_token, token_print_cb);
- list_iterate(p_fype->p_list_token, token_ref_down_cb);
- //list_iterate(p_fype->p_list_token, token_print_cb);
+ list_iterate(p_fype->p_list_token, token_delete_cb);
list_delete(p_fype->p_list_token);
if (p_fype->c_basename)
free(p_fype->c_basename);
-
- garbage_destroy();
}
int
@@ -80,10 +71,10 @@ fype_run(int i_argc, char **pc_argv) {
// argv: Maintains command line options
argv_run(p_fype, i_argc, pc_argv);
- // scanner: Creates a list of token
+ // scanner: Fills the list of tokens
scanner_run(p_fype);
- // interpret: Interpret the list of token
+ // interpret: Interprets the list of tokens
interpret_run(p_fype);
fype_delete(p_fype);