brainfucktt 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +3 -2
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/brainfucktt.gemspec +2 -2
  5. metadata +3 -33
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Brainfucktt
2
2
 
3
- A [Brainfuck][brainfuck] interpreter built in [Ruby][ruby] using [Treetop][treetop].
3
+ A [Brainfuck][brainfuck] interpreter built in [Ruby][ruby] using [Treetop][treetop] on [treetop_bootstrap][treetop_bootstrap].
4
4
 
5
5
  Brainfuck is an eight-instruction turing-clomplete programming language created in 1993
6
6
  by Urban Müller, based on the more formal programming language [P′′][p''] created by Corrado
@@ -94,4 +94,5 @@ The MIT License (MIT) - See LICENSE for further details.
94
94
  [brainfuck]: http://www.muppetlabs.com/~breadbox/bf/
95
95
  [ruby]: http://ruby-lang.org
96
96
  [treetop]: http://treetop.rubyforge.org
97
- [p'']: http://en.wikipedia.org/wiki/P%E2%80%B2%E2%80%B2
97
+ [p'']: http://en.wikipedia.org/wiki/P%E2%80%B2%E2%80%B2
98
+ [treetop_bootstrap]: https://github.com/RyanScottLewis/treetop_bootstrap
data/Rakefile CHANGED
@@ -17,6 +17,7 @@ spec = Gem::Specification.new do |s|
17
17
  s.author = 'Ryan Scott Lewis'
18
18
  s.email = 'ryan@rynet.us'
19
19
  s.summary = 'A Brainfuck interpreter built in Ruby using Treetop.'
20
+ s.description = 'A Brainfuck interpreter built using Treetop.'
20
21
 
21
22
  # Dependencies
22
23
  s.add_dependency 'treetop', '~> 1.4'
@@ -34,7 +35,6 @@ spec = Gem::Specification.new do |s|
34
35
  # Pragmatically set variables
35
36
  s.homepage = "http://github.com/RyanScottLewis/#{s.name}"
36
37
  s.version = Pathname.glob('VERSION*').first.read
37
- s.description = Pathname.glob('README*').first.read
38
38
  s.require_paths = ['lib']
39
39
  s.files = `git ls-files`.lines.to_a.collect { |s| s.strip }
40
40
  s.executables = `git ls-files -- bin/*`.lines.to_a.collect { |s| File.basename(s.strip) }
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "brainfucktt"
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Scott Lewis"]
9
9
  s.date = "2012-12-06"
10
- s.description = "# Brainfucktt\n\nA [Brainfuck][brainfuck] interpreter built in [Ruby][ruby] using [Treetop][treetop].\n\nBrainfuck is an eight-instruction turing-clomplete programming language created in 1993\nby Urban M\u{fc}ller, based on the more formal programming language [P\u{2032}\u{2032}][p''] created by Corrado\nB\u{f6}hm in 1964.\n\nIt is designed to challenge and amuse programmers, and is not made to be suitable for \npractical use.\n\n## Install\n\n### Bundler: `gem 'brainfucktt'`\n\n### RubyGems: `gem install brainfucktt`\n\n## Brainfuck Instructions\n\n`>` Increment the data pointer (to point to the next cell to the right).\n\n`<` Decrement the data pointer (to point to the next cell to the left).\n\n`+` Increment (increase by one) the byte at the data pointer.\n\n`-` Decrement (decrease by one) the byte at the data pointer.\n\n`.` Output the byte at the data pointer as an ASCII encoded character.\n\n`,` Accept one byte of input, storing its value in the byte at the data pointer.\n\n`[` If the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching `]` command.\n\n`]` If the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching `[` command.\n\n### Comments\n\nAny character besides one of the 8 instructions above is not parsed and will be regarded as a comment.\n\n## Usage\n\n### Running\n\n```ruby\nrequire 'brainfucktt'\n\n# \"Hello World!\" written in Brainfuck\ncode = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\n\nBrainfucktt.run(code)\n```\n\n### Parsing\n\n```ruby\nrequire 'brainfucktt'\n\n# \"Hello World!\" written in Brainfuck\ncode = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\nparser = Brainfucktt.parse(code)\n\n# Print out the AST of the code\np parser.tree\n\n# Run the code within Ruby\nparser.run\n```\n\n### StringIO\n\nSometimes you do now want to use STDIN or STDOUT for the I/O of the Brainfuck program.\n\nTo do that, you must use the stdlib `stringio`:\n\n```ruby\nrequire 'brainfucktt'\nrequire 'stringio'\n\n# \"Hello World!\" written in Brainfuck\ncode = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\n\noutput = StringIO.new\nBrainfucktt.run(code, output: output)\n\np output.string # => \"Hello World!\\n\"\n```\n\n## Copyright\n\nCopyright \u{a9} 2012 Ryan Scott Lewis <ryan@rynet.us>.\n\nThe MIT License (MIT) - See LICENSE for further details.\n\n[brainfuck]: http://www.muppetlabs.com/~breadbox/bf/\n[ruby]: http://ruby-lang.org\n[treetop]: http://treetop.rubyforge.org\n[p'']: http://en.wikipedia.org/wiki/P%E2%80%B2%E2%80%B2"
10
+ s.description = "A Brainfuck interpreter built using Treetop."
11
11
  s.email = "ryan@rynet.us"
12
12
  s.files = ["Gemfile", "LICENSE", "README.md", "Rakefile", "VERSION", "brainfucktt.gemspec", "examples/hello_world.rb", "examples/hello_world_with_comments.rb", "examples/stringio.rb", "lib/brainfucktt.rb", "lib/brainfucktt/byte.rb", "lib/brainfucktt/conversion_helpers.rb", "lib/brainfucktt/data.rb", "lib/brainfucktt/errors.rb", "lib/brainfucktt/language.rb", "lib/brainfucktt/language/decrement_byte.rb", "lib/brainfucktt/language/decrement_pointer.rb", "lib/brainfucktt/language/increment_byte.rb", "lib/brainfucktt/language/increment_pointer.rb", "lib/brainfucktt/language/input_byte.rb", "lib/brainfucktt/language/loop.rb", "lib/brainfucktt/language/output_byte.rb", "lib/brainfucktt/language/tree.rb", "lib/brainfucktt/language_parser.treetop", "lib/brainfucktt/node.rb", "lib/brainfucktt/parser.rb"]
13
13
  s.homepage = "http://github.com/RyanScottLewis/brainfucktt"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainfucktt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -187,37 +187,7 @@ dependencies:
187
187
  - - ~>
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0.7'
190
- description: ! "# Brainfucktt\n\nA [Brainfuck][brainfuck] interpreter built in [Ruby][ruby]
191
- using [Treetop][treetop].\n\nBrainfuck is an eight-instruction turing-clomplete
192
- programming language created in 1993\nby Urban Müller, based on the more formal
193
- programming language [P′′][p''] created by Corrado\nBöhm in 1964.\n\nIt is designed
194
- to challenge and amuse programmers, and is not made to be suitable for \npractical
195
- use.\n\n## Install\n\n### Bundler: `gem 'brainfucktt'`\n\n### RubyGems: `gem install
196
- brainfucktt`\n\n## Brainfuck Instructions\n\n`>` Increment the data pointer (to
197
- point to the next cell to the right).\n\n`<` Decrement the data pointer (to point
198
- to the next cell to the left).\n\n`+` Increment (increase by one) the byte at the
199
- data pointer.\n\n`-` Decrement (decrease by one) the byte at the data pointer.\n\n`.`
200
- Output the byte at the data pointer as an ASCII encoded character.\n\n`,` Accept
201
- one byte of input, storing its value in the byte at the data pointer.\n\n`[` If
202
- the byte at the data pointer is zero, then instead of moving the instruction pointer
203
- forward to the next command, jump it forward to the command after the matching `]`
204
- command.\n\n`]` If the byte at the data pointer is nonzero, then instead of moving
205
- the instruction pointer forward to the next command, jump it back to the command
206
- after the matching `[` command.\n\n### Comments\n\nAny character besides one of
207
- the 8 instructions above is not parsed and will be regarded as a comment.\n\n##
208
- Usage\n\n### Running\n\n```ruby\nrequire 'brainfucktt'\n\n# \"Hello World!\" written
209
- in Brainfuck\ncode = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\n\nBrainfucktt.run(code)\n```\n\n###
210
- Parsing\n\n```ruby\nrequire 'brainfucktt'\n\n# \"Hello World!\" written in Brainfuck\ncode
211
- = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\nparser
212
- = Brainfucktt.parse(code)\n\n# Print out the AST of the code\np parser.tree\n\n#
213
- Run the code within Ruby\nparser.run\n```\n\n### StringIO\n\nSometimes you do now
214
- want to use STDIN or STDOUT for the I/O of the Brainfuck program.\n\nTo do that,
215
- you must use the stdlib `stringio`:\n\n```ruby\nrequire 'brainfucktt'\nrequire 'stringio'\n\n#
216
- \"Hello World!\" written in Brainfuck\ncode = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'\n\noutput
217
- = StringIO.new\nBrainfucktt.run(code, output: output)\n\np output.string # => \"Hello
218
- World!\\n\"\n```\n\n## Copyright\n\nCopyright © 2012 Ryan Scott Lewis <ryan@rynet.us>.\n\nThe
219
- MIT License (MIT) - See LICENSE for further details.\n\n[brainfuck]: http://www.muppetlabs.com/~breadbox/bf/\n[ruby]:
220
- http://ruby-lang.org\n[treetop]: http://treetop.rubyforge.org\n[p'']: http://en.wikipedia.org/wiki/P%E2%80%B2%E2%80%B2"
190
+ description: A Brainfuck interpreter built using Treetop.
221
191
  email: ryan@rynet.us
222
192
  executables: []
223
193
  extensions: []
@@ -263,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
263
233
  version: '0'
264
234
  segments:
265
235
  - 0
266
- hash: -1616283130574261905
236
+ hash: -107453280338519890
267
237
  required_rubygems_version: !ruby/object:Gem::Requirement
268
238
  none: false
269
239
  requirements: