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 hashes)
Built Distributions
alteraparser-0.5.0a1-py3.5.egg
(23.5 kB
view hashes)
Close
Hashes for alteraparser-0.5.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbb8443dc325ba788138d4d473ae054dc59f4f2daaac7f4b993b68e6bb5c460 |
|
MD5 | 8ad7588ab17b50aadccacec75733e695 |
|
BLAKE2b-256 | 19cb771340c3d4f048ce8a83737d09f2b497c3fced05a84efa99250b50bd497c |