lib/rley/sppf/parse_forest.rb in rley-0.7.00 vs lib/rley/sppf/parse_forest.rb in rley-0.7.01

- old
+ new

@@ -29,10 +29,11 @@ @is_ambiguous = false end # Notification that the SPPF construction is over def done! + # Do nothing end # Returns true if the given node is present in the forest. def include?(aNode) return key2node.include?(aNode) @@ -42,18 +43,19 @@ # (i.e. more than one parse tree for the given input) def ambiguous?() return @is_ambiguous end - # Create an Enumerator that helps to iterate over the possible parse trees. - # That enumerator will generate a parse tree when called with `next` method. + # Create an Enumerator that helps to iterate over the possible + # parse trees. That enumerator will generate a parse tree when + # called with `next` method. # @return [Enumerator] def to_ptree_enum() - # How to implement? - # One visits the forest => beware of dependency - # At each visited item create a corresponding tree node. - # At end of visit & stack not empty - # Re-generate another ptree + # How to implement? + # One visits the forest => beware of dependency + # At each visited item create a corresponding tree node. + # At end of visit & stack not empty + # Re-generate another ptree end # Part of the 'visitee' role in the Visitor design pattern. # A visitee is expected to accept the visit from a visitor object # @param aVisitor [ParseForestVisitor] the visitor object