From ddb69212f03a82e980144594d809a072b50e7f19 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 11 Feb 2023 09:40:25 -0800 Subject: Finish the compiler. Just joking. But we did manage to compile a program from SML to bytecode. --- main.sml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'main.sml') diff --git a/main.sml b/main.sml index c020691..10e6937 100644 --- a/main.sml +++ b/main.sml @@ -1,9 +1,16 @@ -fun parseFiles (filenames : string list) : (string, Syntax.dec list) Either.either = - let fun go [] acc = Either.Right (concat (rev acc)) - | go (f :: fs) acc = - case Parser.parse f - Either.Right prog => go fs (prog :: acc) - err => err - in go [] filenames +use "result.sml"; +use "buffer.sml"; +use "gensym.sml"; +use "map.sml"; +use "syntax.sml"; +use "codegen.sml"; +use "cps.sml"; +use "elab.sml"; +use "gensym.sml"; +use "linker.sml"; +use "opts.sml"; +use "parser.sml"; +use "compiler.sml"; -val _ = parseFiles (CommandLine.arguments ()) +val _ = Compiler.main () +val _ = OS.Process.exit OS.Process.success -- cgit v1.3.1