diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-02-11 11:45:17 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-02-11 11:45:17 +1100 |
commit | 54658529a3c16d91ca9858538ed78635196591d4 (patch) | |
tree | 0f60d9c54c6c0725c7d529dcc3b5724da12ae87c /Fractran | |
parent | 9baf8106c8c0d93a45c851e55b9acc4725437864 (diff) |
Fixed whitespace parsing bug in Fractran parser
Diffstat (limited to 'Fractran')
-rw-r--r-- | Fractran/Parser.hs | 6 |
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 |