Skip to main content

The parce lexer

Project description

import parce

HomepageDevelopmentDownloadDocumentationLicense

This Python package, parce, can be used to lex text into a tree structure using a language definition. The tree structure can subsequently be queried and transformed in various powerful ways.

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

A key feature of parce is that you can re-lex and re-transform only modified parts of a text if you already have lexed 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.33.0.tar.gz (597.8 kB view details)

Uploaded Source

File details

Details for the file parce-0.33.0.tar.gz.

File metadata

  • Download URL: parce-0.33.0.tar.gz
  • Upload date:
  • Size: 597.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for parce-0.33.0.tar.gz
Algorithm Hash digest
SHA256 57eacb6c0855d3a17a3b5de80042607b66cc0e9c524a7927b19677865331da7a
MD5 d7355d25b50a00d209cfc567e9e94a2e
BLAKE2b-256 0e094ac114bb4b34c2c321501e4babc15f250df53b55df061abd3cbe5cac3688

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