Skip to content

sulir/treepace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Treepace - Tree Transformation Language

Build Status

Treepace (tree pattern replace) is a Python library offering a concise, embeddable language for searching and replacing parts of tree structures.

The main features are:

  • an intuitive API, similar to regex
  • "one line per transformation" syntax - e.g. tree.transform('item -> li')
  • bidirectional integration with the host language - transformations can execute Python code easily
  • node values are real objects, not only strings
  • thanks to node inheritance, nodes can react to changes which is useful for debugging and mapping to resources like GUI components

Installation

The simplest way is to install the package from PyPI: pip install treepace.

Alternatively, clone this repository and run: python setup.py install.

Tutorial

The tutorial is available in a form of IPython Notebook.

About

Tree Transformation Language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages