skip to navigation
skip to content

Not Logged In

pydsl 0.4.0

Python Domain Specific Language Tools

Latest Version: 0.5.0

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

INSTALLATION

  • disttools: * python3 setup.py install
  • pip: * pip install pydsl

REQUIREMENTS

ABOUT

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

 
File Type Py Version Uploaded on Size
pydsl-0.4.0.tar.gz (md5) Source 2013-12-21 36KB
  • Downloads (All Versions):
  • 17 downloads in the last day
  • 176 downloads in the last week
  • 849 downloads in the last month