class Rley::SPPF::EpsilonNode
A leaf node in a parse forest that matches an empty string from the input
Public Class Methods
Source
# File lib/rley/sppf/epsilon_node.rb, line 11 def initialize(aPosition) range = { low: aPosition, high: aPosition } super(range) end
aPosition [Integer] is the position of the token in the input stream.
Calls superclass method
Public Instance Methods
Source
# File lib/rley/sppf/epsilon_node.rb, line 25 def accept(aVisitor) aVisitor.visit_epsilon(self) end
Part of the ‘visitee’ role in Visitor design pattern. @param aVisitor the visitor
Source
# File lib/rley/sppf/epsilon_node.rb, line 19 def to_string(indentation) "_#{range.to_string(indentation)}" end
Emit a (formatted) string representation of the node. Mainly used for diagnosis/debugging purposes. @return [String]