forked from bortzmeyer/GaBuZoMeu
16 lines
499 B
Haskell
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 ?
|
|
|