文件名称:brainfuck-in-ruby:用 Ruby 编写的 Brainfuck 解释器
文件大小:6KB
文件格式:ZIP
更新时间:2024-07-29 01:45:54
Ruby
脑Ruby 用 Ruby 编写的解释器。 用法 # Require it require 'brainrubyck' # Create a interpreter instance br = BrainRubyck . new # Give it some code br . code = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.' # Parse it! br . parse! # => "Hello World\n" # The output can also be found in an instance variable br . out # You can read the cursor loca