Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iskandr/dsltools
Helpers for DSL construction in Python
https://github.com/iskandr/dsltools
Last synced: 2 months ago
JSON representation
Helpers for DSL construction in Python
- Host: GitHub
- URL: https://github.com/iskandr/dsltools
- Owner: iskandr
- License: other
- Created: 2013-07-07T18:36:26.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-20T08:42:07.000Z (about 11 years ago)
- Last Synced: 2024-09-14T09:47:35.587Z (3 months ago)
- Language: Python
- Homepage:
- Size: 199 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DSL Tools
========Helpers for creating and traversing recursively nested data structures in Python. Useful for creating simple languages and abstract value domains like type and shape systems.
Contains:
* *Node*: Base class for building algebraic data types by having each child class declare "\_members = ['x', 'y', 'z']"
* *ScopedDict*: Stack of dictionaries for keeping variable->value mappings while traversing nested scopes
* *ScopedSet*: Stack of sets for keeping sets of variables while traversing nested scopes
* *NestedBlocks*: Stack of lists for traversing nested scopes of statement sequences
* *dispatch*: calls local functions based on the class name of its argument