summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Thue/Parser.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Thue/Parser.hs b/src/Thue/Parser.hs
index 288f770..9c52d6a 100644
--- a/src/Thue/Parser.hs
+++ b/src/Thue/Parser.hs
@@ -76,6 +76,7 @@ fromThueState = map tChar
thue ver = do
+ many blankLine
rs <- many (rule ver)
separatorLine
i <- initialState ver
@@ -88,9 +89,13 @@ rule ver = do
separator
r <- state ver
eol
+ many blankLine
return (ThueRule o r)
+blankLine = many (oneOf " \t") >> eol
+
+
separatorLine = separator >> eol
separator = string "::="
<?> "rule separator"