diff options
Diffstat (limited to 'interpreter')
-rw-r--r-- | interpreter/Makefile | 2 | ||||
-rw-r--r-- | interpreter/fuspel.c | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/interpreter/Makefile b/interpreter/Makefile index 796a90b..824cb90 100644 --- a/interpreter/Makefile +++ b/interpreter/Makefile @@ -1,4 +1,4 @@ -CFLAGS=-Werror -Wall -Wextra -O3 -D_FUSPEL_CLI +CFLAGS=-Werror -Wall -Wextra -Wno-missing-field-initializers -O3 -D_FUSPEL_CLI DEPS=lex.h syntax.h print.h parse.h log.h eval.h mem.h code.h graphs.h OBJ=fuspel.o lex.o syntax.o print.o parse.o log.o eval.o mem.o code.o graphs.o diff --git a/interpreter/fuspel.c b/interpreter/fuspel.c index 919b92a..1cbdd4c 100644 --- a/interpreter/fuspel.c +++ b/interpreter/fuspel.c @@ -26,30 +26,26 @@ fuspel* import(fuspel* already_parsed, char* fname) { f = fopen(fname_, "r"); if (!f) { - fprintf(stderr, "Couldn't read %s\n", fname_); + fprintf(stderr, "Couldn't read %s.\n", fname_); exit(EXIT_FAILURE); } - printf("Lexing %s...\n", fname_); - while (!feof(f)) { char program[LINE_LENGTH]; if (!fgets(program, LINE_LENGTH, f)) { if (feof(f)) break; - fprintf(stderr, "Couldn't read input.\n"); + fprintf(stderr, "Couldn't read %s.\n", fname_); exit(EXIT_FAILURE); } tokens = lex(tokens, program); if (!tokens) { - fprintf(stderr, "Couldn't lex program.\n"); + fprintf(stderr, "Couldn't lex module %s.\n", fname); exit(EXIT_FAILURE); } } - printf("Parsing %s...\n", fname_); - my_free(fname_); pgm = parse(tokens); @@ -94,7 +90,6 @@ static struct argp argp = { options, parse_opt, args_doc, doc, 0, 0, 0 }; int main(int argc, char* argv[]) { expression* result; - int i; struct environment env; env.printProgram = false; |