Skip to main content

Python Domain Specific Language Tools

Project 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.Match import match match(grammardefinition,’mystring’) # returns (‘my’,’string’)

from pydsl.Parser import parse parse(grammardefinition,’mystring’) # returns a ParseTree

from pydsl.Extract import extract extract(grammardefinition,’abcmystringabc’) # returns (‘mystring’,3,11)

from pydsl.Validate import validate validate(grammardefinition,’mystrng’) # returns a ParseTree with the missing i and a note

from pydsl.Guess import guess guess(‘mystring’) # Returns a set that includes grammardefinition


  • disttools: * python3 install
  • pip: * pip install pydsl



Copyright (C) 2008-2013 Nestor Arocha (

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 pydsl, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size pydsl-0.4.0.tar.gz (36.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page