Page
Library
Module
Module type
Parameter
Class
Class type
Source
Yuujinchou.PatternSourceThe Pattern module defines the patterns.
The type of hierarchical names.
We assume names are hierarchical and can be encoded as lists of strings. For example, the name x.y.z is represented as the following OCaml list:
["x"; "y"; "z"]The pattern type is abstract---you should build a pattern using the following builders and execute it by Action.run.
any keeps the content of the current tree. It is an error if the tree is empty (no name to match).
only path keeps the subtree rooted at path. It is an error if the subtree was empty.
none drops everything. It is an error if the tree was already empty (nothing to drop).
renaming path path' relocates the subtree rooted at path to path'. It is an error if the subtree was empty (nothing to move).
seq [pat0; pat1; pat2; ...; patn] runs the patterns pat0, pat1, pat2, ..., patn in order.
union [pat0; pat1; pat2; ...; patn] calculates the union of the results of individual patterns pat0, pat1, pat2, ..., patn.
hook h applies the hook labelled h to the entire trie; see Action.run_with_hooks.
Pretty printer for path.