[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 31388e6 52/60: Add -s aliases
From: |
Junpeng Qiu |
Subject: |
[elpa] master 31388e6 52/60: Add -s aliases |
Date: |
Tue, 25 Oct 2016 17:45:16 +0000 (UTC) |
branch: master
commit 31388e685ad1492a50cfd32cb5cfac396d84f532
Author: Junpeng Qiu <address@hidden>
Commit: Junpeng Qiu <address@hidden>
Add -s aliases
---
parsec.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/parsec.el b/parsec.el
index 44ac6c6..8ffb13d 100644
--- a/parsec.el
+++ b/parsec.el
@@ -707,6 +707,8 @@ This combinator fails if one of the parsers fails.")
"Collect the results of all the parsers FORMS as a string."
`(parsec-list-to-string (parsec-collect ,@forms)))
+(defalias 'parsec-collect-s 'parsec-collect-as-string)
+
(defmacro parsec-start (&rest forms)
"Eval the parsers FORMS and return the results or a `parsec-error'.
This combinator should be used at the top level as the entry
@@ -797,10 +799,14 @@ point of your parsing program."
"Apply the PARSER zero or more times and return the results as a string."
`(mapconcat #'identity (parsec-many ,parser) ""))
+(defalias 'parsec-many-s 'parsec-many-as-string)
+
(defmacro parsec-many1-as-string (parser)
"Apply the PARSER one or more times and return the results as a string."
`(mapconcat #'identity (parsec-many1 ,parser) ""))
+(defalias 'parsec-many1-s 'parsec-many1-as-string)
+
(defmacro parsec-many-till (parser end &optional type)
"Apply PARSER zero or more times until END succeeds.
The return value is determined by TYPE. If TYPE is `:both', return
@@ -840,6 +846,8 @@ meaning as `parsec-many-till'."
(t
`(parsec-list-to-string (parsec-many-till ,parser ,end ,type))))))
+(defalias 'parsec-many-till-s 'parsec-many-till-as-string)
+
(defmacro parsec-until (parser &optional type)
"Parse any characters until PARSER succeeds.
TYPE has the same meaning as `parsec-many-till'."
@@ -851,6 +859,8 @@ Return the result of either part as a string. TYPE has the
same
meaning as `parsec-many-till'."
`(parsec-many-till-as-string (parsec-any-ch) ,parser ,type))
+(defalias 'parsec-until-s 'parsec-until-as-string)
+
(defmacro parsec-not-followed-by (parser)
"Succeed only when PARSER fails. Consume no input."
(let ((res-sym (make-symbol "results")))
@@ -897,6 +907,8 @@ Return a list of N values returned by PARSER."
Return the N values returned by PARSER as a string."
`(parsec-list-to-string (parsec-count ,n ,parser)))
+(defalias 'parsec-count-s 'parsec-count-as-string)
+
(defmacro parsec-option (opt parser)
"Try to apply PARSER and return OPT if PARSER fails without comsuming input."
`(parsec-or ,parser ,opt))
- [elpa] master 5810eef 21/60: Remove parsec-continue, (continued)
- [elpa] master 5810eef 21/60: Remove parsec-continue, Junpeng Qiu, 2016/10/25
- [elpa] master 452ec1e 35/60: Update scheme parser, Junpeng Qiu, 2016/10/25
- [elpa] master 14b28a1 16/60: Add basic README, Junpeng Qiu, 2016/10/25
- [elpa] master 606fed1 10/60: Add simple JSON parser, Junpeng Qiu, 2016/10/25
- [elpa] master d8cd9d6 17/60: Better naming, Junpeng Qiu, 2016/10/25
- [elpa] master a5ca813 04/60: Full & simple parser, Junpeng Qiu, 2016/10/25
- [elpa] master 9996b5b 31/60: Update full-csv-parser, Junpeng Qiu, 2016/10/25
- [elpa] master bdfcbde 23/60: Update library description, Junpeng Qiu, 2016/10/25
- [elpa] master 2e8c52b 40/60: Make sure parsec-not-followed-by consumes no input, Junpeng Qiu, 2016/10/25
- [elpa] master fb26929 34/60: Fix parsec-make-alternatives, Junpeng Qiu, 2016/10/25
- [elpa] master 31388e6 52/60: Add -s aliases,
Junpeng Qiu <=
- [elpa] master 34521c6 53/60: Update README about *-s functions, Junpeng Qiu, 2016/10/25
- [elpa] master 8f0c266 58/60: Add doc for parsec-peek(-p), Junpeng Qiu, 2016/10/25
- [elpa] master ffd42de 45/60: Use simple-csv-parser.el as a demo, Junpeng Qiu, 2016/10/25
- [elpa] master bf49fb6 38/60: Upate README, Junpeng Qiu, 2016/10/25
- [elpa] master 966ca9e 43/60: Add comments to parsec.el, Junpeng Qiu, 2016/10/25
- [elpa] master c61a38c 22/60: Add convenient newline methods, Junpeng Qiu, 2016/10/25
- [elpa] master 0c3408a 01/60: Init commit, Junpeng Qiu, 2016/10/25
- [elpa] master 1929932 02/60: Split into two files, Junpeng Qiu, 2016/10/25
- [elpa] master fd77961 25/60: Add a few simple API, Junpeng Qiu, 2016/10/25
- [elpa] master 12d2ad6 24/60: Bug fixes, Junpeng Qiu, 2016/10/25