ported to use Parsec instead of Graham Hutton's lib

relies heavily on `try`, so there's a lot of backtracking, thus it's
probably pretty slow