implementing parsec combinators