patrickhuber / Pliant

MIT License
26 stars 4 forks source link

Create parse tree enumeration #53

Closed patrickhuber closed 8 years ago

patrickhuber commented 8 years ago

Current implementation of the parse tree enumeration through visitors does not properly traverse ambiguous parse forests and the changing state of the IForestNodeStateManager causes idempotentcy to break when iterating several times.

Track an ambiguity count when adding more than one forest node to and forest nodes. Use that count to create forest traversal paths.

The forest traversal path should be unique and remain read only. A next path can be derived from a previous path. When the ambiguity count reaches the path index, null will be returned.