Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 6ad0b56477
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (23 sloc) 0.577 kB
#!/usr/bin/env ruby
dir = File.dirname(File.expand_path(__FILE__))+'/../lib/'
require dir+"concatenative"
puts " ========================================="
puts " => Concatenative CLI"
puts " Enter an item to push it on the stack"
puts " or 'exit' to end the program."
puts " ========================================="
loop do
print " => "
begin
Concatenative.process(instance_eval(gets))
rescue Exception => e
if e.is_a? SystemExit then
puts " Exiting."
exit
end
print " ERROR: "
puts e.message
end
print " STACK: "
pp Concatenative::STACK
end
Jump to Line
Something went wrong with that request. Please try again.