Skip to main content

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.

Changes

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsemon2-2.1.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file parsemon2-2.1.tar.gz.

File metadata

  • Download URL: parsemon2-2.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.8

File hashes

Hashes for parsemon2-2.1.tar.gz
Algorithm Hash digest
SHA256 7e0973a8a1bf5b3138bf2c5263bed2b33c0a41352655e97fbe99249225e7b2cb
MD5 95f618081d89a1e7eacbf47b003bd0b2
BLAKE2b-256 c6bdf7b9e331d3a8cc1040237dfc2bf287a3d621a45be771eaa317ddbaf138b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page