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.2.0.tar.gz
(8.3 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.2.0-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file lectes-0.2.0.tar.gz.
File metadata
- Download URL: lectes-0.2.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abb0a57814a5845ffdccc653776dac17f0642bca2a261e18423f687c12924c20
|
|
| MD5 |
34e3c085df9a40b8a7fa43aa00ba28e0
|
|
| BLAKE2b-256 |
35b85c1d4a0d506d2d9faf2ba84a6d9cfb4d604717547402017455061792b25e
|
File details
Details for the file lectes-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lectes-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2272eae2d00a5f9eaee5c9217c5a9a0301b3e6b7ac13c0093c8fdbe9326fccb8
|
|
| MD5 |
d5cacd967270961834e377207c3f2d4b
|
|
| BLAKE2b-256 |
f0e227050985a770a4290ad73cca0decea9a5193e275b50269a3b756aa5faf27
|