summaryrefslogtreecommitdiff
path: root/Fractran
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-02-05 11:33:00 +1100
committerJed Barber <jjbarber@y7mail.com>2014-02-05 11:33:00 +1100
commit8ef39061d5e5967fb14c3452c1f1e43b9b79b4c5 (patch)
tree39f869c2750bfb02ffe5493efddb3f2c3a901df0 /Fractran
parentb9af0635a21b0cdb92be8a92f25c7cf5439774a6 (diff)
Started writing Fractran parser in parsec
Diffstat (limited to 'Fractran')
-rw-r--r--Fractran/Parser.hs19
1 files changed, 19 insertions, 0 deletions
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"
+
+