GaBuZoMeu/check-wf.hs
2023-10-01 15:56:20 +02:00

17 lines
465 B
Haskell

import Grammar
import System.Environment (getArgs)
analyze language input
= case (parse language "" input) of
Left err -> (input ++ " is NOT well-formed: " ++ (show err) ++
"\n")
Right x -> (input ++ " is well-formed\n")
main = do
myargs <- getArgs
putStr (concat (map (analyze tag) myargs))
-- We do not set return code since it is possible that some are well-formed and some are not.