A monadic parser combinator written purely in python
Project description
parsemon2
This is yet another attempt to bring monadic parsing to python. The problem the author saw with many other implementations is a limit to their composability. A lot of the times these otherwise quite well written implementations suffer pretty bad from pythons lack of TCO. This implementation uses trampolines to get around that.
Right now this implementation is nothing more but a toy, but the tests that come with this package show already that it’s parsing ability is not dependent on pythons recursion limit.
We also have error messages.
documentation
If you want to learn about the library we recommend checking out our readthedocs page.
Changes
3.0.1
Update README
3.0
Remove pyrsistent deque implementation
Improve fmap performance
Implement end-of-input parser
run_parser now returns a ParsingResult object instead of the raw value of the supplied parser
run_parser won’t fail if the parser did not consume all of the supplied input
Got rid of NotEnouhInput exception.
Drop official support for Python 3.6
Change semantics of until parser.
2.0
Parsers constructed with do can now take arguments
New parser for floating point numbers: parsmon.basic.floating_point
Implement x | y operator for parsers, it is a short hand for choice(x,y)
Improved performance parsing speed by factor 4 - 6
There is now an example of a parser included in this package. It is the worlds slowest json parser
1.1
Implement validators
chain now accepts 1 or more arguments
Implement do notation
New whitespace parser
New parser for integers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file parsemon2-3.0.1.tar.gz
.
File metadata
- Download URL: parsemon2-3.0.1.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32200e8d2608f9b71f48080a0c848ff7c15d57dfcb7c9d5455a0ebb1a79041b |
|
MD5 | cd020ed4876dca938f0c0814d5ed8307 |
|
BLAKE2b-256 | 931feb6c5db29374ff8b3451b488f7e44150931b8e48b74a59b2d00b38c6d5eb |
File details
Details for the file parsemon2-3.0.1-py3-none-any.whl
.
File metadata
- Download URL: parsemon2-3.0.1-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e4261099c19a466eb54e043111088b34b7c6b2610bb9e7bac031b3bd95b958 |
|
MD5 | c248912c2f5012a543d55a9aff436ee6 |
|
BLAKE2b-256 | 6fb9b2d2b7c3139194bb6537e883fa694d55a9714673c630151cfa8a9a162ed0 |