[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed new core library: pl.el
From: |
John Wiegley |
Subject: |
Proposed new core library: pl.el |
Date: |
Wed, 04 Nov 2015 21:14:27 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
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
- Proposed new core library: pl.el,
John Wiegley <=
- Re: Proposed new core library: pl.el, Dmitry Gutov, 2015/11/04
- ELPA policy (was: Proposed new core library: pl.el), John Wiegley, 2015/11/04
- Re: ELPA policy, Dmitry Gutov, 2015/11/04
- Re: ELPA policy, Artur Malabarba, 2015/11/05
- Re: ELPA policy, Michael Welsh Duggan, 2015/11/05
- Re: ELPA policy, Dmitry Gutov, 2015/11/05
- Re: ELPA policy, Michael Welsh Duggan, 2015/11/05
- Re: ELPA policy, John Wiegley, 2015/11/05
- Re: ELPA policy, Dmitry Gutov, 2015/11/05
- Re: ELPA policy, Artur Malabarba, 2015/11/05