basic101 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -0
  3. data/Changelog.md +9 -1
  4. data/Gemfile +9 -8
  5. data/Gemfile.lock +66 -53
  6. data/README.md +8 -6
  7. data/VERSION +1 -1
  8. data/basic101.gemspec +688 -0
  9. data/lib/basic101/parser.rb +28 -457
  10. data/lib/basic101/parser/data_statement.rb +20 -0
  11. data/lib/basic101/parser/define_function_statement.rb +18 -0
  12. data/lib/basic101/parser/dim_statement.rb +16 -0
  13. data/lib/basic101/parser/end_statement.rb +11 -0
  14. data/lib/basic101/parser/expression.rb +100 -0
  15. data/lib/basic101/parser/for_statement.rb +17 -0
  16. data/lib/basic101/parser/function_call.rb +13 -0
  17. data/lib/basic101/parser/gosub_statement.rb +12 -0
  18. data/lib/basic101/parser/goto_statement.rb +11 -0
  19. data/lib/basic101/parser/identifier.rb +87 -0
  20. data/lib/basic101/parser/if_statement.rb +20 -0
  21. data/lib/basic101/parser/input_statement.rb +19 -0
  22. data/lib/basic101/parser/let_statement.rb +13 -0
  23. data/lib/basic101/parser/next_statement.rb +16 -0
  24. data/lib/basic101/parser/numeric.rb +34 -0
  25. data/lib/basic101/parser/on_goto_statement.rb +20 -0
  26. data/lib/basic101/parser/print_statement.rb +19 -0
  27. data/lib/basic101/parser/program.rb +17 -0
  28. data/lib/basic101/parser/randomize_statement.rb +11 -0
  29. data/lib/basic101/parser/read_statement.rb +12 -0
  30. data/lib/basic101/parser/reference.rb +36 -0
  31. data/lib/basic101/parser/remark_statement.rb +11 -0
  32. data/lib/basic101/parser/restore_statement.rb +12 -0
  33. data/lib/basic101/parser/return_statement.rb +11 -0
  34. data/lib/basic101/parser/space.rb +23 -0
  35. data/lib/basic101/parser/statements.rb +36 -0
  36. data/lib/basic101/parser/stop_statement.rb +11 -0
  37. data/lib/basic101/parser/string.rb +17 -0
  38. data/test/spec/basic_float_spec.rb +2 -2
  39. data/test/spec/basic_object_spec.rb +1 -1
  40. data/test/spec/basic_string_spec.rb +2 -2
  41. data/test/spec/input_reader_spec.rb +11 -11
  42. data/test/spec/input_spec.rb +5 -5
  43. data/test/spec/output_spec.rb +3 -3
  44. data/test/spec/spec_helper.rb +2 -1
  45. data/test/spec/support/basic_numeric_helpers.rb +3 -3
  46. metadata +82 -34
@@ -286,7 +286,7 @@ module BasicNumericHelpers
286
286
 
287
287
  context 'when positive' do
288
288
  specify do
289
- output.should_receive(:print).with(' 123 ')
289
+ expect(output).to receive(:print).with(' 123 ')
290
290
  subject.print_string(output)
291
291
  end
292
292
  end
@@ -294,7 +294,7 @@ module BasicNumericHelpers
294
294
  context 'when negative' do
295
295
  let(:value) {-123}
296
296
  specify do
297
- output.should_receive(:print).with('-123 ')
297
+ expect(output).to receive(:print).with('-123 ')
298
298
  subject.print_string(output)
299
299
  end
300
300
  end
@@ -303,7 +303,7 @@ module BasicNumericHelpers
303
303
 
304
304
  describe '#print_new_line' do
305
305
  specify do
306
- output.should_receive(:print).with("\n")
306
+ expect(output).to receive(:print).with("\n")
307
307
  subject.print_new_line(output)
308
308
  end
309
309
  end
metadata CHANGED
@@ -1,116 +1,134 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basic101
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Conrad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2014-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jeweler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '10.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '10.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: redcarpet
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-its
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.1'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '0.9'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: '0.9'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: yard
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ">="
115
+ - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0'
117
+ version: 0.8.7
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ">="
122
+ - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0'
111
- description: basic101 is a circa 1980 BASIC interpreter written in Ruby. It supports
112
- a modified subset of Microsoft's BASIC-80 v. 5 and runs the games published in Basic
113
- Computer Games, Microcomputer Edition by David H. Ahl
124
+ version: 0.8.7
125
+ description: "[![Gem Version](https://badge.fury.io/rb/basic101.png)](http://badge.fury.io/rb/basic101)
126
+ [![Dependency Status](https://gemnasium.com/wconrad/basic101.svg)](https://gemnasium.com/wconrad/basic101)
127
+ [![Code Climate](https://codeclimate.com/github/wconrad/basic101.png)](https://codeclimate.com/github/wconrad/basic101)
128
+ [![Build Status](https://travis-ci.org/wconrad/basic101.png)](https://travis-ci.org/wconrad/basic101)
129
+ \ basic101 is a circa 1980 BASIC interpreter written in Ruby. It supports a modified
130
+ subset of Microsoft's BASIC-80 v. 5 and runs the games published in Basic Computer
131
+ Games, Microcomputer Edition by David H. Ahl"
114
132
  email: wconrad@yagni.com
115
133
  executables:
116
134
  - basic101
@@ -121,6 +139,7 @@ extra_rdoc_files:
121
139
  files:
122
140
  - ".rspec"
123
141
  - ".simplecov"
142
+ - ".travis.yml"
124
143
  - ".yardopts"
125
144
  - Changelog.md
126
145
  - Gemfile
@@ -129,6 +148,7 @@ files:
129
148
  - README.md
130
149
  - Rakefile
131
150
  - VERSION
151
+ - basic101.gemspec
132
152
  - bin/basic101
133
153
  - lib/basic101.rb
134
154
  - lib/basic101/abs_function.rb
@@ -188,6 +208,34 @@ files:
188
208
  - lib/basic101/on_goto_statement.rb
189
209
  - lib/basic101/output.rb
190
210
  - lib/basic101/parser.rb
211
+ - lib/basic101/parser/data_statement.rb
212
+ - lib/basic101/parser/define_function_statement.rb
213
+ - lib/basic101/parser/dim_statement.rb
214
+ - lib/basic101/parser/end_statement.rb
215
+ - lib/basic101/parser/expression.rb
216
+ - lib/basic101/parser/for_statement.rb
217
+ - lib/basic101/parser/function_call.rb
218
+ - lib/basic101/parser/gosub_statement.rb
219
+ - lib/basic101/parser/goto_statement.rb
220
+ - lib/basic101/parser/identifier.rb
221
+ - lib/basic101/parser/if_statement.rb
222
+ - lib/basic101/parser/input_statement.rb
223
+ - lib/basic101/parser/let_statement.rb
224
+ - lib/basic101/parser/next_statement.rb
225
+ - lib/basic101/parser/numeric.rb
226
+ - lib/basic101/parser/on_goto_statement.rb
227
+ - lib/basic101/parser/print_statement.rb
228
+ - lib/basic101/parser/program.rb
229
+ - lib/basic101/parser/randomize_statement.rb
230
+ - lib/basic101/parser/read_statement.rb
231
+ - lib/basic101/parser/reference.rb
232
+ - lib/basic101/parser/remark_statement.rb
233
+ - lib/basic101/parser/restore_statement.rb
234
+ - lib/basic101/parser/return_statement.rb
235
+ - lib/basic101/parser/space.rb
236
+ - lib/basic101/parser/statements.rb
237
+ - lib/basic101/parser/stop_statement.rb
238
+ - lib/basic101/parser/string.rb
191
239
  - lib/basic101/power_operation.rb
192
240
  - lib/basic101/print_comma.rb
193
241
  - lib/basic101/print_semicolon.rb
@@ -735,7 +783,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
735
783
  version: '0'
736
784
  requirements: []
737
785
  rubyforge_project:
738
- rubygems_version: 2.2.1
786
+ rubygems_version: 2.4.4
739
787
  signing_key:
740
788
  specification_version: 4
741
789
  summary: Circa 1980 basic intepreter