зеркало из https://github.com/github/stack-graphs.git
be38049672 | ||
---|---|---|
.. | ||
modules | ||
nested-scope | ||
sequential-definitions | ||
.gitignore | ||
README.md | ||
bootstrap | ||
parse | ||
run |
README.md
Examples
Each directory contains a small example highlighting a particular name binding pattern.
The examples use Python syntax, but do not necessarily implement Python semantics.
Each directory contains a stack-graphs.tsg
file that describes at the top what behavior it implements, and a tests
directory showcasing the behavior.
Running the examples requires the Python grammar to be available. This can be installed (in this directory) by executing:
./bootstrap
Run the tests for an example by executing:
./run EXAMPLE_DIR
or, from within the example's directory:
../run
To render HTML visualizations of the stack graphs for the tests in an example, add the -V
flag to run.
Print the parse tree of an example file by executing:
./parse EXAMPLE_FILE
The following examples are available: