Sha256: eb74521e3ef4911176e961e09d6c8ef2629065c95f0b9ec856dfe8a87f9c14ae

Contents?: true

Size: 380 Bytes

Versions: 128

Compression:

Stored size: 380 Bytes

Contents

#!/usr/bin/env ruby

load File.join(File.dirname(__FILE__), 'turing.rb')
include Turing

filename, *tapes = ARGV
machine_type =
  case ext = File.extname(filename)
  when '.stm'
    SingleTapeMachine
  when '.mtm'
    MultiTapeMachine
  else
    raise "unknown turing machine suffix: #{ext}, use .stm or .mtm"
  end
tm = machine_type.new(File.read(filename))
print tm.to_graphviz

Version data entries

128 entries across 114 versions & 8 rubygems

Version Path
tins-1.38.0 examples/turing-graph.rb
tins-1.37.1 examples/turing-graph.rb
tins-1.37.0 examples/turing-graph.rb
tins-1.36.1 examples/turing-graph.rb
tins-1.36.0 examples/turing-graph.rb
tins-1.35.0 examples/turing-graph.rb
tins-1.34.0 examples/turing-graph.rb
tins-1.33.0 examples/turing-graph.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/turing-graph.rb
tins-1.32.1 examples/turing-graph.rb
tins-1.32.0 examples/turing-graph.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/turing-graph.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/turing-graph.rb
tins-1.31.1 examples/turing-graph.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/tins-1.31.0/examples/turing-graph.rb
tins-1.31.0 examples/turing-graph.rb
tins-1.30.0 examples/turing-graph.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/examples/turing-graph.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/examples/turing-graph.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/examples/turing-graph.rb