Class: RegularExpression::AST::Quantifier::ZeroOrMore

Inherits:
Object
  • Object
show all
Defined in:
lib/regular_expression/ast.rb

Instance Method Summary collapse

Instance Method Details

#quantify(start, finish) {|start, start| ... } ⇒ Object

Yields:

  • (start, start)


267
268
269
270
# File 'lib/regular_expression/ast.rb', line 267

def quantify(start, finish)
  yield start, start
  start.add_transition(NFA::Transition::Epsilon.new(finish))
end

#to_dot(parent) ⇒ Object



263
264
265
# File 'lib/regular_expression/ast.rb', line 263

def to_dot(parent)
  parent.add_node(object_id, label: "*", shape: "box")
end