Parser combinator in R