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)
===========
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 | 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
pydsl-0.5.4.tar.gz
(38.8 kB
view details)
File details
Details for the file pydsl-0.5.4.tar.gz
.
File metadata
- Download URL: pydsl-0.5.4.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b9bebec60e1a7c75d4b591fa5bd57255f165db677a28795c2c6a5a9009adb17 |
|
MD5 | 69419177f86d5becce4677d6b7b0e34a |
|
BLAKE2b-256 | 3742841002abdff1577f4181386f773e34226c3d0bb6edf173f36dafd774cb41 |