<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/trollop/trollop.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -22,13 +22,13 @@ bc. $ simplesem simplesem_file.txt
 
 h3. Command Line Options
 
-The simplesem executable accepts a couple command line options which will display the values in the Data array at the time the program exits.
+The simplesem executable accepts a couple optional command line options which will display the values in the Data array at the time the program exits.
 
-pre.  -h    Print help message
-  -t    Print Data array on exit
-  -v    Print Data array with change history on exit. Supersedes -t if it is also specified.
+pre.  --help              Print help message
+  --inspect           Print values in the data array on exit
+  --inspect-history   Print values in the data array with change history on exit
 
-Use -t if you only want to see the ending value at each position in the Data array, otherwise use -v to see each data location's history. If neither -t or -v is used the program will not display the data array.
+Use @--inspect@ if you only want to see the ending value at each position in the Data array, otherwise use @--inspect-history@ to see each data location's history.
 
 h2. Introduction to SIMPLESEM
 
@@ -140,7 +140,7 @@ jump 8
 &lt;/code&gt;
 &lt;/pre&gt;
 
-pre.. $ simplesem -v sample_programs/gcd.txt
+pre.. $ simplesem --inspect-history sample_programs/gcd.txt
 input: 15
 input: 35
 5</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,4 @@
 #!/usr/bin/env ruby
-#= Overview
-#
-# Interpreter for the SIMPLESEM language
-#
-#= Usage
-#
-# simplesem [-t|-v] filename
-# 
-# Options:
-#   -h    Print this message
-#   -t    Print Data array on exit
-#   -v    Print Data array with change history on exit. Supersedes -t 
-#         if it is also specified.
-#
-
-require 'rdoc/usage'
-require 'getoptlong'
 
 # The gem packager will properly add the lib dir to LOAD_PATH when
 # executing the gem but load path manipulation is needed during development
@@ -23,38 +6,31 @@ unless $LOAD_PATH.include?(File.expand_path('../../lib', __FILE__))
   $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
 end
 
-require 'simplesem'   # must execute after manipulating the load path
-
-opts = GetoptLong.new(
-  [ '-h', '--help', GetoptLong::NO_ARGUMENT ],
-  [ '-t', GetoptLong::NO_ARGUMENT ],
-  [ '-v', GetoptLong::NO_ARGUMENT ]
-)
-
-verbosity = 0   # by default do not print what is in Data
-
-opts.each do |opt, arg|
-  case opt
-  when '-h'
-    RDoc::usage
-  when '-t'
-    verbosity = 1
-  when '-v'
-    verbosity = 2
-  end
-end
+require 'simplesem'
+require 'trollop/trollop'
+
+opts = Trollop::options do
+  version SimpleSem::VERSION
+  banner &lt;&lt;-EOS
+Interpreter for the SIMPLESEM language by Rob Olson
+
+Usage: simplesem [options] filename
 
-if ARGV.length != 1
-  puts &quot;Missing filename argument (try --help)&quot;
-  exit 0
+Options:
+EOS
+
+  opt :inspect, &quot;Print values in the data array on exit&quot;
+  opt :inspect_history, &quot;Print values in the data array with change history on exit&quot;
+  conflicts :inspect, :inspect_history
 end
+Trollop::die &quot;must specify a single filename&quot; if ARGV.length != 1
+
 
 ssp = SimpleSem::Program.new(ARGV.shift)
 ssp.run
 
-case verbosity
-when 1
+if opts[:inspect_history]
   puts &quot;\nDATA: \n&quot; + ssp.inspect_data
-when 2
+elsif opts[:inspect]
   puts &quot;\nDATA: \n&quot; + ssp.inspect_data_with_history
 end</diff>
      <filename>bin/simplesem</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>609a425db4f850e947eb9fa23fc047cb0de12138</id>
    </parent>
  </parents>
  <author>
    <name>Rob Olson</name>
    <email>rob@thinkingdigitally.com</email>
  </author>
  <url>http://github.com/robolson/simplesem/commit/130b723df4e6410fad13139cb4b228887b857b61</url>
  <id>130b723df4e6410fad13139cb4b228887b857b61</id>
  <committed-date>2009-09-26T23:58:37-07:00</committed-date>
  <authored-date>2009-09-26T23:48:30-07:00</authored-date>
  <message>Use trollop for command line parsing

Ripped out rdoc/usage in favor trollop of trollop for command line
parsing because rdoc/usage was removed from Ruby 1.9.</message>
  <tree>c857c6df427d3d08ab15b5e16a9a3fe2f8f935fc</tree>
  <committer>
    <name>Rob Olson</name>
    <email>rob@thinkingdigitally.com</email>
  </committer>
</commit>
