From 8ef39061d5e5967fb14c3452c1f1e43b9b79b4c5 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 5 Feb 2014 11:33:00 +1100 Subject: Started writing Fractran parser in parsec --- Fractran/Parser.hs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Fractran/Parser.hs diff --git a/Fractran/Parser.hs b/Fractran/Parser.hs new file mode 100644 index 0000000..7cbea11 --- /dev/null +++ b/Fractran/Parser.hs @@ -0,0 +1,19 @@ +module Parser ( + FractranProgram(..), + + parseFractran + ) where + + +import Text.Combinators.Parsec + + + +data FractranProgram = FractranProgram { fractions :: [(Int,Int)] } + + + +parseFractran :: String -> Either ParseError FractranProgram +parseFractran = parse fractran "error" + + -- cgit