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.1.0
Serious peformance improvements were made
Minor bug fix in json example parser
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 Distributions
File details
Details for the file parsemon2-3.1.0.tar.gz
.
File metadata
- Download URL: parsemon2-3.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23556401321428907a44bab73dfd2dc2974cae40ac6885e5742833508a92873c |
|
MD5 | acc7fdb6a404f9811a2d47d1684f0626 |
|
BLAKE2b-256 | 0c915080dfafd4effbb1489011d909706f77f21199106082e6ac31165485b431 |
File details
Details for the file parsemon2-3.1.0-cp39-cp39-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: parsemon2-3.1.0-cp39-cp39-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd2414f233b25b03ef5ebeb399f21c4ee9dfbffe396b9eec0c254271cafbdffd |
|
MD5 | 2bdfbdd874038ed93a446eff66be7015 |
|
BLAKE2b-256 | e2622d4fe68d1e27b78e25030333b351fb6b1351c83de1276c6d39eac6cb7e68 |
File details
Details for the file parsemon2-3.1.0-cp38-cp38-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: parsemon2-3.1.0-cp38-cp38-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad5572be64bfeec6e33aab50f8b47183fc746dbc0d402058bee269bfbcf4b47 |
|
MD5 | 0546a44c95393d70899b4b5a39e90272 |
|
BLAKE2b-256 | 31f410b5545cf0d6db69c337aad8e955fb6b11f9858bae23c6706ea846c06b3f |
File details
Details for the file parsemon2-3.1.0-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: parsemon2-3.1.0-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33e814910e9bf753f413026dde97015552bf2db4aa43c9ec6a5a47e27d027683 |
|
MD5 | 8f779a2a7e661027be0b26a72656a9aa |
|
BLAKE2b-256 | 9b98f1268e7c1c3efee12a4260c2bcfa9af8ff68e3ca477545243e05ed2e3b19 |
File details
Details for the file parsemon2-3.1.0-cp37-cp37m-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: parsemon2-3.1.0-cp37-cp37m-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.7m, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e68d85963274c40cb33df5477453ad712c1528394fc3feb34ee960174964f6b |
|
MD5 | 74544ac15e90a1f2444b1fb46abf87a9 |
|
BLAKE2b-256 | 32719896e6e7b2e791082640c449fc994041cad2bfc5dacd19a4099edebf6c81 |
File details
Details for the file parsemon2-3.1.0-cp36-cp36m-manylinux_2_24_x86_64.whl
.
File metadata
- Download URL: parsemon2-3.1.0-cp36-cp36m-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.6m, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b86f7520df9881eab28c926803baa4c844f911dcf246b2638e3d74f82854bfb |
|
MD5 | 8b1671b93b70db9945e4160376c15f61 |
|
BLAKE2b-256 | 88a4a1760e8f2c744aef84d367e63357b6cee1859b80b91cacefbb12a0904137 |