From 8596c81c62a09e16ac0d706114aacc8f5b976465 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 5 Mar 2012 20:02:12 -0500 Subject: [PATCH] Made set line parsing more specific --- CardParser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CardParser.hs b/CardParser.hs index b9deb2e..bf5471c 100644 --- a/CardParser.hs +++ b/CardParser.hs @@ -87,12 +87,12 @@ stats_line = do sets_line :: Parser [(String, Rarity)] sets_line = do - sets <- sepBy set (string ", ") + sets <- sepBy1 set (string ", ") return sets set :: Parser (String, Rarity) set = do - set' <- many1 (noneOf "\n-") + set' <- many1 $ oneOf $ ['A'..'Z'] ++ ['0'..'9'] char '-' rarity' <- oneOf "LCURMS" case rarity' of