summaryrefslogtreecommitdiff
path: root/Fractran
diff options
context:
space:
mode:
Diffstat (limited to 'Fractran')
-rw-r--r--Fractran/Parser.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Fractran/Parser.hs b/Fractran/Parser.hs
index 576f8a0..6d6cd86 100644
--- a/Fractran/Parser.hs
+++ b/Fractran/Parser.hs
@@ -24,18 +24,18 @@ parseFractran = parse fractran "error"
fractran = do
+ whiteSpace
value <- initVal
fractionList <- many intPair
- whiteSpace
eof
return (FractranProgram fractionList value)
intPair = do
- whiteSpace
numerator <- wholeNumber
slash
denominator <- positiveNumber
+ whiteSpace
return (numerator,denominator)
@@ -43,8 +43,8 @@ slash = char '/'
initVal = do
- whiteSpace
value <- wholeNumber
+ whiteSpace
return value