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.
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.