Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for alteraparser, version 0.5.0a1
Filename, size File type Python version Upload date Hashes
Filename, size alteraparser-0.5.0a1-py3.5.egg (23.5 kB) File type Egg Python version 3.5 Upload date Hashes View hashes
Filename, size alteraparser-0.5.0a1-py3-none-any.whl (24.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size alteraparser-0.5.0a1.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page