This implements a deep, eager, prefix-order, depth-first, acyclic traversal by conforming HMRCombinator to REDReducible.
Note that since this is a deep and eager traversal, the traversal of each individual node is unable to selectively traverse or ignore branches of alternations/concatenations, or to operate on the results of their subcombinators. Thus, parseNull cannot be implemented with this interface; it’s only suitable for trivial computations such as the size of the grammar or pretty-printing.
This implements a deep, eager, prefix-order, depth-first, acyclic traversal by conforming
HMRCombinator
toREDReducible
.Note that since this is a deep and eager traversal, the traversal of each individual node is unable to selectively traverse or ignore branches of alternations/concatenations, or to operate on the results of their subcombinators. Thus,
parseNull
cannot be implemented with this interface; it’s only suitable for trivial computations such as the size of the grammar or pretty-printing.Fixes #57.