[rust-dev] Is there a Parsec equivalent in Rust?
Meredith L. Patterson
clonearmy at gmail.com
Fri Jun 13 02:55:43 PDT 2014
That seems a bit excessive. C doesn't have higher-kinded types or monads
either, *and* it's strict, but we cloned Parsec effectively enough. Neither
parser combinators nor PEG/packrat *require* monads, or even lazy
evaluation for that matter; they're just easier to implement that way. You
can even do Iteratees in C. http://code.khjk.org/citer/
Regarding Rick's SWIG question, really I'd rather avoid using SWIG for any
future Hammer bindings, and eventually it'll be eliminated from the
existing ones. But could someone explain what makes generating a set of
Enums more Rust-ish than using a discriminated union?
Don't get me wrong, I love Ragel, but it has its limitations
(character-oriented, not really intended to handle recursion, extra
code-generation step), and Hammer was partially written to address those.
On Fri, Jun 13, 2014 at 6:41 AM, Steve Klabnik <steve at steveklabnik.com>
> It's not possible to directly write a Parsec port because we don't
> have HKT and therefore monads. Ragel is probably the best bet for now.
> Rust-dev mailing list
> Rust-dev at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev