robrix/Hammer — pull request #73 by robrix (2014-04-12 18:52:34+00:00)
Title: Reducible grammars

This implements a deep, greedy, depth-first, acyclic traversal by conforming `HMRCombinator` to `REDReducible`.

Note that since this is a deep traversal, the traversal of each individual node is unable to selectively traverse or ignore branches of alternations/concatenations, or to operate on their computed results effectively. 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.