diff options
author | Ori Bernstein <ori@eigenstate.org> | 2012-06-15 16:08:28 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2012-06-15 16:08:28 -0400 |
commit | d660f92ea19fe51531e7e5bc562a79de7f75a792 (patch) | |
tree | 46ba5e76169e057b71b9909d680a9f86c17ed267 /muse | |
parent | 128a304c58ed737c2f3c3bfff6957ccfc4c5bd50 (diff) | |
download | mc-d660f92ea19fe51531e7e5bc562a79de7f75a792.tar.gz |
Rename files.
Diffstat (limited to 'muse')
-rw-r--r-- | muse/Makefile | 8 | ||||
-rw-r--r-- | muse/main.c | 79 |
2 files changed, 0 insertions, 87 deletions
diff --git a/muse/Makefile b/muse/Makefile deleted file mode 100644 index 636a391..0000000 --- a/muse/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -BIN=muse -OBJ=main.o - -CFLAGS+=-I../parse -LDFLAGS+=-L../parse -lparse -EXTRADEP=../parse/libparse.a - -include ../mk/c.mk diff --git a/muse/main.c b/muse/main.c deleted file mode 100644 index 1255b76..0000000 --- a/muse/main.c +++ /dev/null @@ -1,79 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <stdint.h> -#include <ctype.h> -#include <string.h> -#include <assert.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> - -#include "parse.h" - -Node *file; -static char *outfile; -int debug; - -static void usage(char *prog) -{ - printf("%s [-h] [-o outfile] inputs\n", prog); - printf("\t-h\tPrint this help\n"); - printf("\t-d\tPrint debug dumps\n"); - printf("\t-o\tOutput to outfile\n"); -} - -int main(int argc, char **argv) -{ - int opt; - int i; - Stab *globls; - Node *rdback; - FILE *tmp; - - while ((opt = getopt(argc, argv, "dho:")) != -1) { - switch (opt) { - case 'o': - outfile = optarg; - break; - case 'h': - case 'd': - debug++; - break; - default: - usage(argv[0]); - exit(0); - break; - } - } - - for (i = optind; i < argc; i++) { - globls = mkstab(); - tyinit(globls); - tokinit(argv[i]); - file = mkfile(argv[i]); - file->file.exports = mkstab(); - file->file.globls = globls; - yyparse(); - - if (debug) { - /* test storing tree to file */ - tmp = fopen("a.pkl", "w"); - pickle(file, tmp); - fclose(tmp); - - /* and reading it back */ - tmp = fopen("a.pkl", "r"); - rdback = unpickle(tmp); - dump(rdback, stdout); - fclose(tmp); - - /* before we do anything to the parse */ - dump(file, stdout); - } - infer(file); - die("FIXME: IMPLEMENT ME!"); - } - - return 0; -} |