From 12b3e97d0ee4b7d1fa6560b91d14ef7be110bdff Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 9 Aug 2012 05:15:01 +1000 Subject: Compilation now automated --- Syntactic.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Syntactic.hs') diff --git a/Syntactic.hs b/Syntactic.hs index 6502c43..fb629ba 100644 --- a/Syntactic.hs +++ b/Syntactic.hs @@ -1,5 +1,7 @@ import System( getArgs ) import Text.Printf +import Parse + scan :: String -> String @@ -43,7 +45,7 @@ doScan = map (scan . stripReturn) main = do args <- getArgs - list <- getLines $ head args + list <- getLines (head args) plist <- return $ doScan list - printf $ if (list == plist) then "Scan OK\n" else "Syntax error\n" + printf $ if (args == plist) then "Scan OK\n" else "Syntax error\n" -- cgit