Skip to main content

The parce lexer

Project description

import parce

HomepageDevelopmentDownloadDocumentationLicense

This Python package, parce, can be used for parsing text into tokens using one of the supplied language definitions in the lang directory, or building your own language definitions and parse text using them.

The parce module is designed to be very fast, while being written in pure Python, using native data structures as much as possible. Parsing can be done in a background thread.

A powerful feature of parce is that you can retokenize only modified parts of a text if you already have tokenized it. This makes parce suitable for text editors etc. that need to keep a tokenized structure of the text up-to-date e.g. to support syntax highlighting as you type.

The module is written and maintained by Wilbert Berendsen. Python 3.5 and higher is supported. Besides Python itself there are no other dependencies. Testing is done by running pytest-3 in the root directory.

The logo is a public domain tree image with the name in the Gentium italic font. Why the name? It’s short, sounds like ‘parse’, and has the meaning of “friend”, “buddy”, “bro.” :-)

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

parce-0.8.0.tar.gz (173.5 kB view hashes)

Uploaded Source

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