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")
Changes
- 0.5.0.a2:
added transform_ast method to enable transformation of AST nodes
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
File details
Details for the file alteraparser-0.5.3a2-py3-none-any.whl.
File metadata
- Download URL: alteraparser-0.5.3a2-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ef3adcc5951481332379d540bc2f319ce872b674075096baa98ad3f56506fb
|
|
| MD5 |
cd8809aef30fe893ff1c58a293ebbbcc
|
|
| BLAKE2b-256 |
c15f26805549a015ab3f962701de84fac2333fe2d622fbf0f7e58fc905a7a9f4
|