From 4ab526ea4f2ad39b6797adbc9df0fd26ac571456 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Tue, 14 Mar 2006 19:40:43 +0000 Subject: [PATCH] smaller update --- CompInt.hs | 8 ++++++-- documentation | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CompInt.hs b/CompInt.hs index 1188466..298c9f4 100644 --- a/CompInt.hs +++ b/CompInt.hs @@ -49,6 +49,10 @@ main = do args <- getArgs case args of [] -> hGetContents stdin >>= run interpret pStms - "-c":f:[] -> runFile (writeFile (f++".c") . compile) pStms f + "-c":f:[] -> let file = (f++".c") in do + putStrLn $ "Compiling "++f++" to the C99-compatible file:"++file + runFile (writeFile file . compile) pStms f f:[] -> runFile interpret pStms f - _ -> print "Too many arguments" + _ -> do + putStrLn "Usage: ./CompInt [-c] " + putStrLn "-c : compile to C99-compatible file" diff --git a/documentation b/documentation index c3ac4e0..fd4664d 100644 --- a/documentation +++ b/documentation @@ -9,7 +9,7 @@ Typecheck.hs: Contains the type-checking functions typeCheckExp, typeCheckVar an Abssyntax.hs, Parsyntax.y, Lexsyntax.x,ErrM.hs,Printsyntax.hs,Skelsyntax.hs: The files generated by bnfc, only modification is the removal of the Bool type in Abssyntx.hs so haskell's internal type can be used. -typing rules +semantic rules ++++++++++++ -- 2.39.2