GaBuZoMeu/check-wf.hs
Stephane Bortzmeyer 2fc541c0a7 Initial import
2023-06-08 21:49:35 +02:00

16 lines
499 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))
-- TODO: set return code? What code to use if some are well-formed and some are not?
-- TODO: provide a version with -q and -v ?