babel_bridge 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9d0bebf56805838a10f3d96e1858d431f304b033
4
+ data.tar.gz: 78e92279e5aa1c4af6b8c7e635e76ebc5f4bac88
5
+ SHA512:
6
+ metadata.gz: 4572bf0b8206a87c0cb4af2f361831904ae660bf92546602fe78c97cebed435040887e6cd18eeefa97ca0ce06e1b1755de74d09b5bd5da830a6600bc8283a349
7
+ data.tar.gz: 431d9c7024cd72dab5b90e2f6fb14dba84b6802e47622791199b97d2066df0eb45231766bdfa1fe742f9b3a2026d1ad330086de2ebc30641f8a4a23ec8e3614d
@@ -8,7 +8,7 @@ $gemspec = Gem::Specification.new do |gem|
8
8
  gem.author = "Shane Brinkman-Davis"
9
9
  gem.date = "2010-11-28"
10
10
  gem.email = "shanebdavis@gmail.com"
11
- gem.homepage = "http://babel-bridge.rubyforge.org"
11
+ gem.homepage = "https://github.com/shanebdavis/Babel-Bridge"
12
12
  gem.platform = Gem::Platform::RUBY
13
13
  gem.rubyforge_project = "babel-bridge"
14
14
  gem.summary = "A Ruby-based parser-generator based on Parsing Expression Grammars."
@@ -0,0 +1,33 @@
1
+ # This language doesn't support comments.
2
+ # When trying these examples out, remeber not to copy and paste the comments.
3
+
4
+ # calculate 2^[0]
5
+ [0]=10;[1]=1;while [0]>0 do [0]=[0]-1;[1]=[1]*2 end;[1]
6
+
7
+ # return the [0]th number in the fibonancci sequence:
8
+ # [0] == fib number to output
9
+ # [1] == current fib number
10
+ # [2] == fib[[1]]
11
+ # [3] == fib[[1]-1]
12
+ # [4] == temp
13
+ [0]=5;[1]=2;[2]=[3]=1;while [1]<[0] do [4]=[2]+[3];[2]=[3];[3]=[4];[1]=[1]+1 end;[3]
14
+
15
+ # simulate a turing machine
16
+ # [0] == current state
17
+ # [1] == head position
18
+ # [2] == number of symbols this machine recognizes
19
+ # [3] == current state + read value offset
20
+ # [state*[2]*3+10] == write at the current head position(nil or any number)
21
+ # [state*[2]*3+11] == move head amount (-1, 0, 1)
22
+ # [state*[2]*3+12] == next-state (states starting from 0)
23
+ # [10000+] == tape - pick a large enough constant that the turing machine doesn't corrupt your states
24
+ # -1 is the stop-state
25
+ # Assumes you initalized your turing program for all your states.
26
+ [0]=-1;
27
+ [1]=10000;
28
+ while [0]>=0 do
29
+ [3] = 10 + ([0]*[2]+[[1]]) * 3;
30
+ [[1]] = [[3]];
31
+ [1] = [1] + [[3]+1];
32
+ [0] = [[3]+2];
33
+ end
@@ -1,3 +1,3 @@
1
1
  module BabelBridge
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel_bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
5
- prerelease:
4
+ version: 0.5.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Shane Brinkman-Davis
@@ -14,105 +13,90 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: simplecov
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: guard-rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: guard-test
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rb-fsevent
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
- description: ! 'Babel Bridge is an object oriented parser generator for parsing expression
111
- grammars (PEG).
112
-
97
+ description: |
98
+ Babel Bridge is an object oriented parser generator for parsing expression grammars (PEG).
113
99
  Generate memoizing packrat parsers 100% in Ruby code with a simple embedded DSL.
114
-
115
- '
116
100
  email: shanebdavis@gmail.com
117
101
  executables: []
118
102
  extensions: []
@@ -131,6 +115,7 @@ files:
131
115
  - examples/json/json_parser.rb
132
116
  - examples/json/json_parser2.rb
133
117
  - examples/test.rb
118
+ - examples/turing/examples.turing
134
119
  - examples/turing/turing++.rb
135
120
  - examples/turing/turing.rb
136
121
  - examples/turing/turing00.rb
@@ -175,29 +160,28 @@ files:
175
160
  - spec/rule_parsing_spec.rb
176
161
  - spec/spec_helper.rb
177
162
  - spec/tools_spec.rb
178
- homepage: http://babel-bridge.rubyforge.org
163
+ homepage: https://github.com/shanebdavis/Babel-Bridge
179
164
  licenses: []
165
+ metadata: {}
180
166
  post_install_message:
181
167
  rdoc_options: []
182
168
  require_paths:
183
169
  - lib
184
170
  required_ruby_version: !ruby/object:Gem::Requirement
185
- none: false
186
171
  requirements:
187
- - - ! '>='
172
+ - - '>='
188
173
  - !ruby/object:Gem::Version
189
174
  version: '0'
190
175
  required_rubygems_version: !ruby/object:Gem::Requirement
191
- none: false
192
176
  requirements:
193
- - - ! '>='
177
+ - - '>='
194
178
  - !ruby/object:Gem::Version
195
179
  version: '0'
196
180
  requirements: []
197
181
  rubyforge_project: babel-bridge
198
- rubygems_version: 1.8.24
182
+ rubygems_version: 2.0.14
199
183
  signing_key:
200
- specification_version: 3
184
+ specification_version: 4
201
185
  summary: A Ruby-based parser-generator based on Parsing Expression Grammars.
202
186
  test_files:
203
187
  - spec/advanced_parsers_spec.rb