Skip to main content

Python Domain Specific Language Tools

Project description

DESCRIPTION
===========

pydsl is a language library written in python. It provides some verbs for Grammars.

from pydsl.file.BNF import load_bnf_file
grammardefinition = loand_bnf_file('myfile.bnf')
grammardefinition.alphabet # Returns the alphabet used by this grammar
grammardefinition.minsize
grammardefinition.maxsize
grammardefinition.enumerate # Returns a generator that generates every accepted word

from pydsl.check import check
check(grammardefinition,'mystring') # returns True or False

from pydsl.parser import parse
parse(grammardefinition,'mystring') # returns a ParseTree

from pydsl.extract import extract
extract(grammardefinition,'abcmystringabc') # returns ('mystring',3,11)

FORMATS
=======

Functions
---------

| Format |Check|Match|Search|Split|Extract|Translate|Validate|Diff|
| ------- |:---:|-----|------|-----|:-----:|:-------:|:------:|----|
| BNF | V | | | |V | Parse | V | |
| regexp | V | | | |V | X | | |
| ply | V | | | |V | V | | |
| parsley | V | | | |V | V | | |
|pyparsing| V | | | |V | | | |

Properties
----------

| Format |First|Min|Max|Enumerate|
| ------- |:---:|---|---|---------|
| BNF | V | | | |
| regexp | | | | |
| ply | | | | |
| parsley | | | | |
|pyparsing| | | | |


INSTALLATION
============
* disttools:
* python3 setup.py install
* pip:
* pip install pydsl

CONTRIBUTIONS
=============
* check existing issues: https://github.com/nesaro/pydsl
* read the project's blog: http://pydsl.blogspot.co.uk
* pull requests :)


REQUIREMENTS
============
* python >= 2.7
* optional: ply library ( http://www.dabeaz.com/ply/ )

ABOUT
=====
Copyright (C) 2008-2015 Nestor Arocha (nesaro@gmail.com)

Project details


Release history Release notifications

This version
History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.1

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pydsl-0.5.4.tar.gz (38.8 kB) Copy SHA256 hash SHA256 Source None Feb 10, 2017

Supported by

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