From: Neil Smith Date: Tue, 3 Dec 2019 22:13:01 +0000 (+0000) Subject: Parsing tweaks. X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=c4794c207f6278f57aebedc5827d20cc6de41962;p=advent-of-code-19.git Parsing tweaks. --- diff --git a/advent03/src/advent03.hs b/advent03/src/advent03.hs index a863ffe..c022a1b 100644 --- a/advent03/src/advent03.hs +++ b/advent03/src/advent03.hs @@ -101,7 +101,7 @@ integer = lexeme L.decimal symb = L.symbol sc comma = symb "," -wiresP = some pathP +wiresP = many pathP pathP = segmentP `sepBy1` comma segmentP = segmentify <$> directionP <*> integer diff --git a/advent03/src/advent03part1.hs b/advent03/src/advent03part1.hs index e2beb38..5647ce5 100644 --- a/advent03/src/advent03part1.hs +++ b/advent03/src/advent03part1.hs @@ -86,7 +86,7 @@ integer = lexeme L.decimal symb = L.symbol sc comma = symb "," -wiresP = some pathP +wiresP = many pathP pathP = segmentP `sepBy1` comma segmentP = segmentify <$> directionP <*> integer