Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python Domain Specific Language Tools
Python GAP
Pull request Compare This branch is 7 commits ahead, 75 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
pydsl
tests
.gitignore
.travis.yml
CONTRIBUTIONS
LICENSE
MANIFEST.in
README
README.md
requirements.txt
setup.py

README.md

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.Checker 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

REQUIREMENTS

ABOUT

Copyright (C) 2008-2014 Nestor Arocha (nesaro@gmail.com)

Something went wrong with that request. Please try again.