Sha256: e11f551685c757f60b5a4e383cffb3f60c917a0dfffd3250aba7c178754f89b6

Contents?: true

Size: 967 Bytes

Versions: 2

Compression:

Stored size: 967 Bytes

Contents

#!/usr/bin/env ruby

# The gem packager will properly add the lib dir to LOAD_PATH when
# executing the gem but load path manipulation is needed during development
unless $LOAD_PATH.include?(File.expand_path('../../lib', __FILE__))
  $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
end

require 'simplesem'
require 'trollop/trollop'

opts = Trollop::options do
  version SimpleSem::VERSION
  banner <<-EOS
Interpreter for the SIMPLESEM language by Rob Olson

Usage: simplesem [options] filename

Options:
EOS

  opt :inspect, "Print values in the data array on exit"
  opt :inspect_history, "Print values in the data array with change history on exit"
  conflicts :inspect, :inspect_history
end
Trollop::die "must specify a single filename" if ARGV.length != 1


ssp = SimpleSem::Program.new(ARGV.shift)
ssp.run

if opts[:inspect_history]
  puts "\nDATA: \n" + ssp.inspect_data
elsif opts[:inspect]
  puts "\nDATA: \n" + ssp.inspect_data_with_history
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
robolson-simplesem-0.1.4 bin/simplesem
simplesem-0.1.4 bin/simplesem