This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Peglet

Peglet extends Python’s regular expressions to handle recursive grammars. For example, to parse a tiny subset of HTML:

>>> from peglet import Parser
>>> a_little_html = Parser(r"""
...     parts = part parts |
...     part  = <(\w+)> parts </\w+> group
...           | ([^<]+)
... """, group=lambda *values: values)
>>> a_little_html("Hello. <p><em>Nesting</em> for <i>the win</i>.</p>")
('Hello. ', ('p', ('em', 'Nesting'), ' for ', ('i', 'the win'), '.'))

The goal was to make a parsing library

  1. pleasant enough to use;
  2. simple to adapt or rewrite from scratch if I’m faced with some new situation like a new programming language;
  3. with code easy enough to follow that it could introduce people to parsing.

So it came down to one page of clear code not using combinators. (And then ballooned to 200+ lines from documentation and a few extras.) Some bits that couldn’t fit the latter two constraints went into a combinator library, parson.

For more, see the examples or the module doc in the code.

Installing it

pip install peglet, or else download then python setup.py install.

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Peglet-0.1.1.cygwin-1.7.17-i686.exe (60.9 kB) Copy SHA256 Checksum SHA256 any Windows Installer Dec 10, 2012
Peglet-0.1.1.tar.gz (31.3 kB) Copy SHA256 Checksum SHA256 Source Dec 10, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting