class RegularExpression::CFG::ExtendedBasicBlock

An Extended Basic Block is a linear sequence of instructions with one entry point and zero or more exit points.

Attributes

exits[R]
insns[R]
name[R]

Public Class Methods

new(name, insns, exits) click to toggle source
# File lib/regular_expression/cfg.rb, line 101
def initialize(name, insns, exits)
  @name = name
  @insns = insns
  @exits = exits
end

Public Instance Methods

dump(exit_map, io: $stdout) click to toggle source
# File lib/regular_expression/cfg.rb, line 107
def dump(exit_map, io: $stdout)
  io.puts("#{name}:")
  insns.each { |insn| io.puts("  #{insn}") }
  exits.each { |exit| io.puts("    #{exit} -> #{exit_map[exit].name}") }
end