unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: emacs-devel@gnu.org
Cc: Ted Zlatanov <tzz@lifelogs.com>
Subject: Proposed new core library: pl.el
Date: Wed, 04 Nov 2015 21:14:27 -0500	[thread overview]
Message-ID: <m2egg542gs.fsf@newartisans.com> (raw)

pl.el (standing for "parser library") is a combinator parsing library for
Emacs, similar to Haskell's Parsec. You can see how it works at the following
README:

    https://github.com/jwiegley/emacs-pl

PL offers a way to write very compact parsers of structured text. For example
(from the README):

  (pl-parse
    (delete-region (pl-str "<xml>" :beg)
                   (pl-until
                     (pl-str "</xml>" :end))))

The idea being applicative parsers is that the result of `pl-parse' is the
FORM you pass in, where every sub-parser becomes a value of the type you
intended to parse. If a sub-parse fails, either the whole parse fails, or it
returns nil if you wrap the parser in `pl-try'.

There is room for improving performance, but the API is complete enough to
start using it. Giving the unproven status, though, perhaps it should start
out in ELPA, and move to core after it has solidified and gained some users?

John



             reply	other threads:[~2015-11-05  2:14 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05  2:14 John Wiegley [this message]
2015-11-05  2:22 ` Proposed new core library: pl.el Dmitry Gutov
2015-11-05  2:41   ` ELPA policy (was: Proposed new core library: pl.el) John Wiegley
2015-11-05  3:00     ` ELPA policy Dmitry Gutov
2015-11-05  9:08       ` Artur Malabarba
2015-11-05 12:51       ` Michael Welsh Duggan
2015-11-05 13:49         ` Dmitry Gutov
2015-11-05 14:41           ` Michael Welsh Duggan
2015-11-05 15:09           ` John Wiegley
2015-11-05 15:40             ` Dmitry Gutov
2015-11-05 16:58               ` Artur Malabarba
2015-11-05 17:45                 ` Dmitry Gutov
2015-11-06 21:37             ` Richard Stallman
2015-11-08 16:30               ` John Wiegley
2015-11-08 17:11                 ` Eli Zaretskii
2015-11-08 18:00                   ` Wolfgang Jenkner
2015-11-08 18:20                     ` Eli Zaretskii
2015-11-09  0:53                       ` Wolfgang Jenkner
2015-11-08 18:26                   ` Óscar Fuentes
2015-11-08 18:31                     ` Eli Zaretskii
2015-11-08 19:27                   ` Artur Malabarba
2015-11-08 18:33                     ` Eli Zaretskii
2015-11-08 20:04                       ` Artur Malabarba
2015-11-08 19:58                         ` Eli Zaretskii
2015-11-08 20:10                           ` Dmitry Gutov
2015-11-08 20:26                             ` Eli Zaretskii
2015-11-08 20:36                               ` Dmitry Gutov
2015-11-08 20:47                                 ` Eli Zaretskii
2015-11-08 23:16                             ` Richard Stallman
2015-11-09  1:45                               ` Dmitry Gutov
2015-11-09  2:59                                 ` Yuri Khan
2015-11-08 19:55                 ` Artur Malabarba
2015-11-09  9:25                 ` Stephen Leake
2015-11-05  7:13     ` David Kastrup
2015-11-05  9:19   ` Proposed new core library: pl.el Artur Malabarba
2015-11-05 20:19 ` Ted Zlatanov
2015-11-05 23:54   ` Artur Malabarba
2015-11-06 15:35     ` Ted Zlatanov
2015-11-08 20:54       ` Ted Zlatanov
2015-11-08 22:31         ` Artur Malabarba
2015-11-09 22:02         ` John Wiegley
2015-11-09 23:14           ` Artur Malabarba
2015-11-09 23:18             ` John Wiegley
2015-11-10  1:45               ` Ted Zlatanov
2015-11-11 14:51                 ` Ted Zlatanov
2015-11-11 15:08                   ` Nicolas Petton
2015-11-11 15:28                     ` Ted Zlatanov
2015-11-11 17:27                       ` Artur Malabarba
2015-11-11 17:38                         ` Artur Malabarba
2015-11-11 18:38                       ` Ted Zlatanov
2015-11-11 17:03                     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2egg542gs.fsf@newartisans.com \
    --to=jwiegley@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).