Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Parser engine for ordered text.

Project Description

Ordered data consists of a sequence of tokens that appear in a predictable order. Unlike fixed-field data, ordered data may contain tokens that are optional or that may repeat a variable number of times. These two properties prevent a parser from relying on a token’s positional index. The only guarantees provided by an ordered data grammar are the order that the tokens will appear in, whether or not they are optional, and how many times a specific token may repeat before a different token appears.

An example of ordered text is a U.S. street address:

123 Broadway Ave., Apt. 15, Philadelphia, PA 19101

The elements of the address (street number, street name, city, etc.) appear in a consistent order if the address is to be considered valid. The apartment number may or may not be present in an address, but should appear in a consistent position in the sequence in order to be valid.

A parser’s grammar is defined by a sequence of GrammarElement instances. Each of these elements is applied in the order it appears in the sequence. Since the parser also extends AbstractCommand, hierarchical ordered text can be parsed by using one or more ordered parser instances as elements of another parser’s grammar.

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ordtext-0.1.1.tar.gz (11.2 kB) Copy SHA256 Checksum SHA256 Source Sep 19, 2015

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