Commit Graph

2554 Commits

Author SHA1 Message Date
Geoffroy Couprie
56a7a42346 point the docs to Parser::map and Parser::flat_map 2021-10-10 22:25:48 +02:00
Jihchi Lee
eb181568a4 Fix broken "take_while" link 2021-10-10 22:10:55 +02:00
Constantin Nickel
b5735d2e8b ci: tune build jobs with caching and disable incremental compilation 2021-10-10 22:05:09 +02:00
Alex Hamilton
dfa55914dc Implement Alt<I, O, E> for the 1-tuple type
This revision enables the use of the alt() combinator on a 1-tuple of
parsers. Notably, because only a single parser will need to see the
input, there is no Clone bound on this implementation, unlike with other
tuple sizes.
2021-09-25 17:08:07 +02:00
Alex Huszagh
c80828897f Increment minimal-lexical version. 2021-09-25 16:35:41 +02:00
Drumato
8ab6827c2d specify the syntax highlight to code snippet in error doc 2021-09-25 16:29:14 +02:00
Gungy2
e1cf43a6fc
Add pseudocode interpreter to the list of projects (#1400)
Co-authored-by: Geoffroy Couprie <geo.couprie@gmail.com>
2021-09-25 16:28:36 +02:00
Nipunn Koorapati
5ce4183ff7 Fix doc for fold_many_m_n (one of the args takes a lambda) 2021-09-25 16:25:56 +02:00
Michael Schubart
0b1343bc19 alt takes tuple
Co-authored-by: Jihchi Lee <achi@987.tw>
2021-09-25 16:22:11 +02:00
Michael Schubart
07dd0510cc Fix usage comment of alt() combinator
Looks like `|` is a leftover from the old macro-based API.
2021-09-25 16:22:11 +02:00
Constantin Nickel
6ecee46e4c Re-enable the iterator example
Apply the current code formatting
2021-09-25 16:21:31 +02:00
Constantin Nickel
9f40fbd9e6 Remove superfluous #[macro_use] attributes 2021-09-25 16:20:58 +02:00
Constantin Nickel
b5c0e7dd14 Fix test warnings with std feature not enabled 2021-09-25 16:19:41 +02:00
Constantin Nickel
847366f387 Fix clippy warnings
clippy::unnecessary_cast
2021-09-25 16:18:56 +02:00
Strytyp
babec7cc6c Update README.md
Add Wasm parser.
2021-09-25 16:16:54 +02:00
clonejo
5b7535e590 Fix docs: misleading argument order (streaming::escaped_transform)
The docs example for streaming::escaped_transform is very misleading, as
it would transform backslash+newline to just n, not backslash+n to
newline, as most people would expect.

This is already correct in the docs for complete::escaped_transform and
the tests, this seems to be an oversight.
2021-09-25 16:15:05 +02:00
Nils
a6cd401274 Fix documention for double using f64 and float 2021-09-25 16:09:06 +02:00
Antoine PLASKOWSKI
615e6a441e minimal-lexical now import with no default feature 2021-08-26 09:21:44 +02:00
Constantin Nickel
cff46ba829 Replace build status badge 2021-08-21 20:13:31 +02:00
Geoffroy Couprie
9678b061d3 v7.0.0 2021-08-21 13:03:47 +02:00
Geoffroy Couprie
6e93a3a319 remove link to FAQ 2021-08-21 13:03:32 +02:00
Geoffroy Couprie
e2d82eee33 fmt 2021-08-21 12:46:24 +02:00
Geoffroy Couprie
fb711cffa7 missing proptest for streaming number parsers 2021-08-21 12:24:31 +02:00
Geoffroy Couprie
3de831816c remove mentions of macros in the documentation 2021-08-21 12:24:09 +02:00
Geoffroy Couprie
195d398520 update github actions 2021-08-21 12:17:41 +02:00
Geoffroy Couprie
9ccdc35752 remove .travis.yml 2021-08-21 12:16:25 +02:00
Geoffroy Couprie
a7a23d9dec update the MSRV to 1.48
Debian 11.0 Bullseye was released on 2021-08-14, and it provides rustc
in version 1.48: https://packages.debian.org/search?keywords=rustc

While nom 7 can still build for Rust 1.41.1, the latest stable release
of Debian is enough as a support limit
2021-08-21 12:13:43 +02:00
Geoffroy Couprie
889aa0a75b update the changelog 2021-08-21 12:02:47 +02:00
Geoffroy Couprie
5d50ca711b performance fix for float parsing in &str 2021-08-21 11:31:46 +02:00
Geoffroy Couprie
e2a0dd52e0 v7.0.0-alpha3 2021-08-18 19:04:14 +02:00
Geoffroy Couprie
e6f17e2cba fmt 2021-08-18 18:59:35 +02:00
Geoffroy Couprie
b57026bd03 fix streaming usage 2021-08-18 18:57:18 +02:00
Geoffroy Couprie
272de11b1c fix performance regressions 2021-08-18 17:23:43 +02:00
Geoffroy Couprie
704cfed72a current proptests for floats require the std feature 2021-08-18 17:16:32 +02:00
Geoffroy Couprie
baf5e015b9 replace lexical-core with minimal-lexical
minimal-lexical is a smaller library (compile faster), has no
dependencies, and is faster than lexical-core 0.7 (0.8 will have the
same algorithm).

It requires a separate tokenization phase, done manually, but this will
give more flexibility in supporting different syntaxes

This commit removes the "lexical" feature, as there is no need now
tosupport a separate version without the crate
2021-08-18 00:05:47 +02:00
Geoffroy Couprie
6cd562ebd3 fix property tests 2021-08-17 17:34:21 +02:00
Geoffroy Couprie
485147144c fix a stack overflow in the expression parser 2021-08-17 16:46:34 +02:00
Geoffroy Couprie
8b453bd024 fix fuzzing target compilation 2021-08-17 16:43:46 +02:00
Geoffroy Couprie
45d11216db proptest should be a dev dependency 2021-08-17 16:43:24 +02:00
Geoffroy Couprie
018cd45966 add text to number parsers
these parsers convert directly to numbers from text decimal
representation. If the parsed number gets to large for the target type,
the parser will fail

this commit also introduces testing through proptest, to make sure that
those parsers are functionally equivalent to digit1 then calling
.parse() on it
2021-08-17 16:37:38 +02:00
cenodis
808a85bbcf Add fail parser 2021-08-17 11:42:00 +02:00
cenodis
a91dd52477 Document second argument of multi::length_value 2021-08-17 11:40:29 +02:00
Geoffroy Couprie
ea483e5a81 fix formatting 2021-08-14 15:47:43 +02:00
Geoffroy Couprie
5777c81cdd update the error management doc 2021-08-14 15:43:42 +02:00
Geoffroy Couprie
ef5e0bbc9b raise MSRV to 1.46
bitflags in lexical will not compile below 1.46
2021-08-13 14:47:03 +02:00
Geoffroy Couprie
4f046c61b4 unused code 2021-08-13 14:35:50 +02:00
Geoffroy Couprie
834a2caf8c clarify combinator argument names 2021-08-13 14:35:12 +02:00
Geoffroy Couprie
43c62fd0be compile on 1.41.1 without lexical
lexical is now integrating a version of bitflags that is incompatible
with Rust 1.41.1
2021-08-13 12:57:17 +02:00
Geoffroy Couprie
9ddbc00c1f move HexDisplay to the traits module
remove the util module
2021-08-13 12:52:16 +02:00
Geoffroy Couprie
5637d0b37f reintroduce dbg_dmp, move it to the error module 2021-08-13 12:49:33 +02:00