class Treetop::Runtime::SyntaxNode

def elements

def elements
  return @elements if terminal?
  # replace the character class placeholders in the sequence (lazy instantiation)
  last_element = nil
  @comprehensive_elements ||= @elements.map do |element|
    if element == true
      index = last_element ? last_element.interval.last : interval.first
      element = SyntaxNode.new(input, index...(index + 1))
      element.parent = self
    end
    last_element = element
  end
  @comprehensive_elements
end