|Subject:||Re: [ELPA] New package: parsec|
|Date:||Tue, 25 Oct 2016 16:23:42 -0400|
More examples can be found at https://github.com/cute-To give a short example, the following code extract the "hello" from the comment:John's [emacs-pl] is awesome, but I found following problems when I tried to use it:Hello Emacs,I've added a new package "parsec" to GNU ELPA (hoping I've not messed up anything). This is a parser combinator library for Emacs Lisp, similar to Haskell's parsec. The work is inspired by John's [emacs-pl]. The main repo of parsec is on GitHub: https://github.com/cute-jumper
- it only contains a very limited set of combinators
- Some of its functions (combinators) have different behaviors than their Haskell counterparts
- It can't show error messages when parsing fails.The new library, parsec, contains most of the parser combinators in "Text.Parsec.Combinator" (I'm adding more gradually), and I tried my best to keep their behavior the same as their Haskell counterparts so that programmer with Haskell background could easily use the library. You can see the table listing all of the functions/macros in the README. It's a long list so I'll skip it here. Parsec also comes with a simple error handling mechanism, which may be improved in the future.
(parsec-with-input "/* hello */"
(parsec-string "*/")))) jumper/parsec.el/tree/master/. examples
|[Prev in Thread]||Current Thread||[Next in Thread]|