A simple parser and grammar definition library
Project description
Introduction
Alteraparser is a library that provides functions to define a grammar that can be passed to a parser.
Basic Usage
Code sample:
from alteraparser.parser import Parser
from alteraparser import char_range, fork, many, grammar, ...
ALPHA = fork(char_range('a', 'z'), char_range('A', 'Z'))
NUM = char_range('0', '9')
ALPHA_NUM = fork(ALPHA, NUM)
...
variable = fork([ALPHA, many(ALPHA_NUM)]).set_name('var')
...
my_grammar = grammar(variable, ...)
my_parser = Parser(my_grammar)
ast = my_parser.parse_file("my_code.txt")
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
alteraparser-0.5.0a1.tar.gz
(5.7 kB
view details)
Built Distributions
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
alteraparser-0.5.0a1-py3.5.egg
(23.5 kB
view details)
File details
Details for the file alteraparser-0.5.0a1.tar.gz.
File metadata
- Download URL: alteraparser-0.5.0a1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ed51a13205d81eb3bfcaf0747edbfe50c6e0a60904b7e03c134fad15384b996
|
|
| MD5 |
42b2dc025931b5d548654ad659842819
|
|
| BLAKE2b-256 |
8e78a99942ae4a2e823fff09530a2ba57cadcd81d8ed6b0905dc6a0c4e9761d1
|
File details
Details for the file alteraparser-0.5.0a1-py3.5.egg.
File metadata
- Download URL: alteraparser-0.5.0a1-py3.5.egg
- Upload date:
- Size: 23.5 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0b6ce67c7a60e2ecfce32482482cd2224a777c62807c896e305379727fd2478
|
|
| MD5 |
41f6000a1ae80a1d6e907736ca9f4821
|
|
| BLAKE2b-256 |
a323925ac02fb0b0547e78fd185500269d1583237853737ce19e6695828fd101
|
File details
Details for the file alteraparser-0.5.0a1-py3-none-any.whl.
File metadata
- Download URL: alteraparser-0.5.0a1-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dbb8443dc325ba788138d4d473ae054dc59f4f2daaac7f4b993b68e6bb5c460
|
|
| MD5 |
8ad7588ab17b50aadccacec75733e695
|
|
| BLAKE2b-256 |
19cb771340c3d4f048ce8a83737d09f2b497c3fced05a84efa99250b50bd497c
|