File | simple.str |
Author | Eelco Visser <visser@acm.org> |
Since | unknown |
This module contains generic one-pass traversals over terms.
These traversals have been defined using the primitive term traversaloperators of Stratego, all, some and one, and the control operators oflanguage. This results is a wide variety of resuable term traversals.
Term traversals can be categorized into classes according tohow much of the term they traverse and to which partsof the term they modify. Please read the annotated source codeto see the breakdown.
General | |
Lines of code | 343 |
Stratego | |
Module number | 1 (100% documented) |
Constructor number | 0 |
Overlay number | 0 |
Strategy number | 31 (12% documented) |
Rule number | 0 |
DynamicRule number | 0 |
Strategy summary |
||
alldownup2(Strategy s1, Strategy s2) | n/a | simple.str |
alltd(Strategy s) | n/a | simple.str |
alltd-fold(Strategy s1, Strategy s2) | n/a | simple.str |
bottomup(Strategy s) | n/a | simple.str |
bottomup-para(Strategy s) | A variation on bottomup is a traversal that also provides the original term as well as the term in which the direct subterms have been transformed | simple.str |
bottomupS(Strategy s, Strategy stop) | n/a | simple.str |
breadthfirst(Strategy s) | n/a | simple.str |
don't-stop(Strategy s) | A unit for topdownS, bottomupS and downupS | simple.str |
downup(Strategy s) | n/a | simple.str |
downup(Strategy s1, Strategy s2) | n/a | simple.str |
downup2(Strategy s1, Strategy s2) | n/a | simple.str |
downupS(Strategy s, Strategy stop) | n/a | simple.str |
downupS(Strategy s1, Strategy s2, Strategy stop) | n/a | simple.str |
leaves(Strategy s, Strategy is-leaf, Strategy skip) | n/a | simple.str |
leaves(Strategy s, Strategy is-leaf) | n/a | simple.str |
manybu(Strategy s) | n/a | simple.str |
manytd(Strategy s) | n/a | simple.str |
oncebu(Strategy s) | n/a | simple.str |
oncetd(Strategy s) | n/a | simple.str |
oncetd-skip(Strategy s, Strategy skip) | n/a | simple.str |
somebu(Strategy s) | n/a | simple.str |
somedownup(Strategy s) | n/a | simple.str |
somespinebu(Strategy s) | n/a | simple.str |
somespinetd(Strategy s) | n/a | simple.str |
sometd(Strategy s) | n/a | simple.str |
spinebu(Strategy s) | Apply s along the spine of a term, in bottom up order | simple.str |
spinebu'(Strategy s) | n/a | simple.str |
spinetd(Strategy s) | Apply s along the spine of a term, in top down order | simple.str |
spinetd'(Strategy s) | n/a | simple.str |
topdown(Strategy s) | n/a | simple.str |
topdownS(Strategy s, Strategy stop) | n/a | simple.str |
Strategy details |
|||||||||||||||||||||
ATerm | bottomup-para(Strategy s) | ||||||||||||||||||||
A variation on bottomup is a traversal that also provides theoriginal term as well as the term in which the direct subtermshave been transformed. (also known as a paramorphism?) |
|||||||||||||||||||||
ATerm | don't-stop(Strategy s) | ||||||||||||||||||||
A unit for topdownS, bottomupS and downupS. For example, topdown(s) is equivalent to topdownS(s,don't-stop).
|
|||||||||||||||||||||
ATerm | spinebu(Strategy s) | ||||||||||||||||||||
Apply s along the spine of a term, in bottom up order. A spine of a term is a chain of nodes from the root to somesubterm. The traversal stops when 's' fails for all childrenof a node.
|
|||||||||||||||||||||
ATerm | spinetd(Strategy s) | ||||||||||||||||||||
Apply s along the spine of a term, in top down order. A spine of a term is a chain of nodes from the root to somesubterm. The traversal stops when 's' fails for all childrenof a node.
|
|||||||||||||||||||||