]> ruin.nu Git - proglang.git/commitdiff
smaller update
authorMichael Andreen <harv@ruin.nu>
Tue, 14 Mar 2006 19:40:43 +0000 (19:40 +0000)
committerMichael Andreen <harv@ruin.nu>
Tue, 14 Mar 2006 19:40:43 +0000 (19:40 +0000)
CompInt.hs
documentation

index 1188466da980b4d1886b4d3deff9d5e199fa08fc..298c9f49c8ae3a50fcf220e393bdf99ed994c1bd 100644 (file)
@@ -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] <file>"
+                       putStrLn "-c : compile <file> to C99-compatible file"
index c3ac4e08ba815c574432d3e2f0905cf120a460e1..fd4664dac04d54fd6b6dcd63704cf8532714b799 100644 (file)
@@ -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
 ++++++++++++