Hacker News new | ask | show | jobs
by eru 742 days ago
> I think it all depends on the language, but I found it (usually) easier to implement the recursive-descending parsers just manually. This may include combination approach too, but using my own combinatorial and domain-specific functions.

Working in what languages did you make this observation?

In something like C I would probably agree with you. But in eg Haskell or OCaml, I would probably prefer parser combinators.

2 comments

In other functional languages I tend to reach for combinators, but in OCaml I either use Menhir or regret not using it.
I work with Rust most of the time. As of the pure functional languages, yes, perhaps using parser combinators is better.