summaryrefslogtreecommitdiff
path: root/Compare.hs
blob: 4d9ab6da0b3b48dd433a6e5f51d7676aff27d391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import System.Environment( getArgs )
import Text.Printf
import Library.Parse
import Library.Semantic
import Library.Stack



main = do
    args <- getArgs
    listA <- getLines (args!!0)
    listB <- getLines (args!!1)
    let resultA = eval (map (stripReturn) listA)
        resultB = eval (map (stripReturn) listB)
        output = if (resultA == resultB)
    	         then "Articles identical\n"
    	         else "Differences detected\n"
    printf output