Skip to main content

A simple parser and grammar definition library

Project description


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')

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")


  • added transform_ast method to enable transformation of AST nodes

Project details

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

alteraparser-1.1.0-py3.4.egg (46.4 kB view hashes)

Uploaded 3 4

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page