Add your description here
Project description
lectes
lectes is a simple Python scanner generator. It can be used to easily define
scanners with Python code.
Documentation: https://maxcode123.github.io/lectes/
Example
from lectes import Rule, Configuration, Regex, Scanner
config = Configuration(
[
Rule(name="FOR", regex=Regex("for")),
Rule(name="INT", regex=Regex("[0-9]+")),
Rule(name="ID", regex=Regex("[a-zA-Z][a-zA-Z0-9]*")),
Rule(name="WHITESPACE", regex=Regex("( )")),
]
)
scanner = Scanner(config)
program = "somevar in othervar for 9 let"
for token in scanner.scan(program):
print(token)
Installation
pip install lectes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lectes-0.1.1.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lectes-0.1.1-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file lectes-0.1.1.tar.gz.
File metadata
- Download URL: lectes-0.1.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a0303aae201788bd3e37dccc31e6489d4e5adef112080222e5617bae2eadc56
|
|
| MD5 |
03bfb0f99220cd5f6d60869d23fb0b29
|
|
| BLAKE2b-256 |
9d625dcfc86539c408eb79921e8632904752ded751bbc32429a18122c33eddca
|
File details
Details for the file lectes-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lectes-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
833a3ab81a4620e2e233ab215f17f18d9e3aeb6d3724c9cdb54760c28b187ca4
|
|
| MD5 |
cd8e681ed071ede50373ddc0f9d73ebf
|
|
| BLAKE2b-256 |
010530ef9621ec47c374ba86d4465f472f6ae1c684eab9782bf4f1450f935e34
|