lib/rley/parser/parse_state.rb in rley-0.0.15 vs lib/rley/parser/parse_state.rb in rley-0.0.16

- old
+ new

@@ -34,9 +34,17 @@ # Next expected symbol in the production def next_symbol() return dotted_rule.next_symbol end + # Give a String representation of itself. + # The format of the text representation is + # "format of dotted rule" + " | " + origin + # @return [String] + def to_s() + return dotted_rule.to_s + " | #{origin}" + end + private # Return the validated dotted item(rule) def valid_dotted_rule(aDottedRule) fail StandardError, 'Dotted item cannot be nil' if aDottedRule.nil?