Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Plex

Plex is a library building lexical analysers.

Plex is a Python module for constructing lexical analysers, or scanners. Plex scanners have almost all the capabilities of the scanners generated by GNU Flex, and are specified in a very similar way. Tokens are defined by regular expressions, and each token has an associated action, which may be to return a literal value, or to call an arbitrary function.

Plex is designed to fill a need that is left wanting by the existing Python regular expression modules. If you’ve ever tried to use one of them for implementing a scanner, you will have found that they’re not really suited to the task. You can define a bunch of regular expressions which match your tokens all right, but you can only match one of them at a time against your input. To match all of them at once, you have to join them all together into one big r.e., but then you’ve got no easy way to tell which one matched. This is the problem that Plex is designed to solve.

Another advantage of Plex is that it compiles all of the regular expressions into a single DFA. Once that’s done, the input can be processed in a time proportional to the number of characters to be scanned, and independent of the number or complexity of the regular expressions. Python’s existing regular expression matchers do not have this property.

Contact

Original author :

Computer Science Department,
University of Canterbury,
Christchurch,
New Zealand

Maintainer : Stephane Klein <stephane@harobed.org>

Changes

2.0.0 (2009-12-13)

  • Create a Plex python package

  • Convert documentation to Sphinx

  • Convert tests to nose

  • Format the source code with PEP8 recommendations

    • 4 spaces indentation

    • convert package and modules names to lowers cases

1.1.5

  • Eliminated a syntax warning about assigning to None when using with Python 2.3.

1.1.4

  • Fixed bug causing argument of Rep or Rep1 to fail to match following a newline.

1.1.3

  • Fixed bug causing Eol to fail to match at the beginning of a line in some circumstances.

1.1.2

  • Changed Scanner.yield() to Scanner.produce() to accommodate Python 2.3, where yield is a keyword.

  • Changed test10 to not rely so much on details of string repr.

1.1.1

  • Fixed two minor bugs: uncommented Scanner.next_char() and added import of types to Regexps.py.

1.1

  • Added support for case-insensitive matches.

1.0

  • First official release.

Metadata

Release files for plex3 2.0.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plex3 2.0.0.dev0
File Size Uploaded Provenance
plex3-2.0.0.dev0.tar.gz 20.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for plex3 2.0.0.dev0
File Interpreter ABI Platform
plex3-2.0.0.dev0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 77.1 kB

Release files / plex3-2.0.0.dev0.tar.gz

Download URL plex3-2.0.0.dev0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
43224df37fe09bbaf90724f412db5b82349aea9a251388604e141d7481368775
BLAKE2b-256 checksum
How to use checksums
e3f17249a62a9c41857819a11e0f71e1a0af4c137351bb448aafc3ca254555d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / plex3-2.0.0.dev0-py2.py3-none-any.whl

Download URL plex3-2.0.0.dev0-py2.py3-none-any.whl
Size 56.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
04a4e1b9904d0d649079f970e0944a1cd238a53250d50706f6484b72d7ae05ef
BLAKE2b-256 checksum
How to use checksums
2794321fed3cb9a900f05ec7fb10b94cf6ba52a7d772e98c2f82fcfc72d81061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for plex3 2.0.0.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page