A NameTree representing fallback; it is evaluated by picking the first nonnegative (evaluated) subtree.
A NameTree representing a union of trees.
An empty NameTree.
A negative NameTree.
Rewrite the paths in a tree for values defined by the given partial function.
Parse a NameTree from a string with concrete syntax
Parse a NameTree from a string with concrete syntax
tree ::= name weight '*' tree tree '&' tree tree '|' tree '(' tree ')' name ::= path | '~' | '$' weight ::= -?([0-9]++(\.[0-9]+*)?|[0-9]+*\.[0-9]++)([eE][+-]?[0-9]++)?[fFdD]?
For example:
/foo & /bar | /baz | $
parses in to the NameTree
Alt(Union(Leaf(Path(foo)),Leaf(Path(bar))),Leaf(Path(baz)),Empty)
The production
is documented at Path.read.
path
when the string does not represent a valid name tree.
A string parseable by NameTree.read.
Simplify the given NameTree, yielding a new NameTree which is evaluation-equivalent.
The NameTree object comprises NameTree types as well as binding and evaluation routines.