ToRacerParser.hs revision a9153cb03333fdffc44aa4904db86374e51bca95
module ToRacerParser where
import GMP.GMPParser
import System.Environment
import IO
{--
runLex :: (Ord a, Show a, ModalLogic a b) => String -> Parser (Formula a) -> String -> IO ()
runLex path p input = run (do
whiteSpace
; x <- p
; eof
; return x
) input
--}
run :: (Ord a, Show a, ModalLogic a b) => String -> Parser (Formula a) -> String -> IO ()
run path p input
= case (parse p "" input) of
Left err -> do putStr "parse error at "
;print err
Right x -> do writeFile path x