[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parsing library recommendation

From: Eric Abrahamsen
Subject: Parsing library recommendation
Date: Mon, 04 Mar 2019 16:26:03 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

I just found that sieve-manage has stopped working (again) for one of my
servers, apparently because an upgrade in the Dovecot server has changed
the text of the login dance, and the while loop at line 269 in
`sieve-sasl-auth' in sieve-manage.el just spins infinitely.

This prompts a question that I've had for a while: what do today's elisp
hackers recommend for text parsing libraries? What I'd like is just a
simple parser, it doesn't need to be able to munge recursive source code
files, but just read and parse protocol text coming over the wire.

Everything now is written with regexps, which can be good for skipping
over cruft and targeting expected strings, but they fall apart fairly
easily. It would be nice to have a more stable parsing framework that
can handle these oddities (though I know they're all built on regexps,
eventually). It would be nice to have something that could be used for
IMAP servers, etc.

There's a very nice, simple library in ELPA called parsec, which I
understand is adapted from Haskell. That's not an issue, though it means
an ELPA dependency.

Then there's the built-in Bovine/Wisent, which seem to be geared towards
parsing source-code files. They also have the downside of being largely
incomprehensible -- I've tried several times to get a basic "hello
world" parser off the ground, and have never succeeded.

What are our other options?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]