[Solved] Haskell Token.LanguageDef in Rust

#1

I am convering some Haskell code to Rust. The Haskell code uses http://hackage.haskell.org/package/parsec-3.1.13.0/docs/Text-Parsec-Token.html for parsing.

What Rust library is closest to the above?

#2

Nom or lalrpop

1 Like
#3

I personally enjoyed using https://docs.rs/combine/ to define parsers; I found the approach produces more readable code than nom does overall. It’s probably closer to parsec as well whereas nom might be closer to attoparsec.

1 Like
#4

@Fiedzia , @Centril : Thanks for the suggestions. I worked through the lalrpop and combine examples – and ended up going with combine + combine-language (modeled after Token.LanguageDef).