esolang 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,369 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Esolang::Interpreters::Smallfuck
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Esolang::Interpreters::Smallfuck";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Esolang.html" title="Esolang (module)">Esolang</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Interpreters.html" title="Esolang::Interpreters (module)">Interpreters</a></span></span>
41
+ &raquo;
42
+ <span class="title">Smallfuck</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Esolang::Interpreters::Smallfuck
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseInterpreter.html" title="Esolang::Interpreters::BaseInterpreter (class)">BaseInterpreter</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="BaseInterpreter.html" title="Esolang::Interpreters::BaseInterpreter (class)">BaseInterpreter</a></span></li>
78
+
79
+ <li class="next">Esolang::Interpreters::Smallfuck</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/interpreters/smallfuck_interpreter.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>The Smallfuck class represents an interpreter for the Smallfuck esoteric programming language.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(code, tape) &#x21d2; Smallfuck </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+ <span class="note title constructor">constructor</span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>Initializes a new instance of the Smallfuck interpreter.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong> &#x21d2; String </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'>
174
+ <p>Executes the interpretation of the Smallfuck code.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ </ul>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ <div id="constructor_details" class="method_details_list">
190
+ <h2>Constructor Details</h2>
191
+
192
+ <div class="method_details first">
193
+ <h3 class="signature first" id="initialize-instance_method">
194
+
195
+ #<strong>initialize</strong>(code, tape) &#x21d2; <tt><span class='object_link'><a href="" title="Esolang::Interpreters::Smallfuck (class)">Smallfuck</a></span></tt>
196
+
197
+
198
+
199
+
200
+
201
+ </h3><div class="docstring">
202
+ <div class="discussion">
203
+
204
+ <p>Initializes a new instance of the Smallfuck interpreter.</p>
205
+
206
+
207
+ </div>
208
+ </div>
209
+ <div class="tags">
210
+ <p class="tag_title">Parameters:</p>
211
+ <ul class="param">
212
+
213
+ <li>
214
+
215
+ <span class='name'>code</span>
216
+
217
+
218
+ <span class='type'>(<tt>String</tt>)</span>
219
+
220
+
221
+
222
+ &mdash;
223
+ <div class='inline'>
224
+ <p>The Smallfuck code to interpret.</p>
225
+ </div>
226
+
227
+ </li>
228
+
229
+ <li>
230
+
231
+ <span class='name'>tape</span>
232
+
233
+
234
+ <span class='type'>(<tt>String</tt>)</span>
235
+
236
+
237
+
238
+ &mdash;
239
+ <div class='inline'>
240
+ <p>The initial tape state for the Smallfuck program.</p>
241
+ </div>
242
+
243
+ </li>
244
+
245
+ </ul>
246
+
247
+
248
+ </div><table class="source_code">
249
+ <tr>
250
+ <td>
251
+ <pre class="lines">
252
+
253
+
254
+ 13
255
+ 14
256
+ 15
257
+ 16</pre>
258
+ </td>
259
+ <td>
260
+ <pre class="code"><span class="info file"># File 'lib/interpreters/smallfuck_interpreter.rb', line 13</span>
261
+
262
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_tape'>tape</span><span class='rparen'>)</span>
263
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[^&lt;&gt;\*\[\]]</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
264
+ <span class='ivar'>@tape</span> <span class='op'>=</span> <span class='id identifier rubyid_tape'>tape</span><span class='period'>.</span><span class='id identifier rubyid_chars'>chars</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_i</span><span class='rparen'>)</span>
265
+ <span class='kw'>end</span></pre>
266
+ </td>
267
+ </tr>
268
+ </table>
269
+ </div>
270
+
271
+ </div>
272
+
273
+
274
+ <div id="instance_method_details" class="method_details_list">
275
+ <h2>Instance Method Details</h2>
276
+
277
+
278
+ <div class="method_details first">
279
+ <h3 class="signature first" id="run-instance_method">
280
+
281
+ #<strong>run</strong> &#x21d2; <tt>String</tt>
282
+
283
+
284
+
285
+
286
+
287
+ </h3><div class="docstring">
288
+ <div class="discussion">
289
+
290
+ <p>Executes the interpretation of the Smallfuck code.</p>
291
+
292
+
293
+ </div>
294
+ </div>
295
+ <div class="tags">
296
+
297
+ <p class="tag_title">Returns:</p>
298
+ <ul class="return">
299
+
300
+ <li>
301
+
302
+
303
+ <span class='type'>(<tt>String</tt>)</span>
304
+
305
+
306
+
307
+ &mdash;
308
+ <div class='inline'>
309
+ <p>The result of the Smallfuck interpretation.</p>
310
+ </div>
311
+
312
+ </li>
313
+
314
+ </ul>
315
+
316
+ </div><table class="source_code">
317
+ <tr>
318
+ <td>
319
+ <pre class="lines">
320
+
321
+
322
+ 21
323
+ 22
324
+ 23
325
+ 24
326
+ 25
327
+ 26
328
+ 27
329
+ 28
330
+ 29
331
+ 30
332
+ 31
333
+ 32
334
+ 33</pre>
335
+ </td>
336
+ <td>
337
+ <pre class="code"><span class="info file"># File 'lib/interpreters/smallfuck_interpreter.rb', line 21</span>
338
+
339
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
340
+ <span class='kw'>while</span> <span class='id identifier rubyid_running?'>running?</span> <span class='kw'>do</span>
341
+ <span class='kw'>case</span> <span class='id identifier rubyid_command'>command</span>
342
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&gt;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_move_right'>move_right</span>
343
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&lt;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_move_left'>move_left</span>
344
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_flip'>flip</span>
345
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_loop_begin'>loop_begin</span>
346
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>]</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>then</span> <span class='id identifier rubyid_loop_end'>loop_end</span>
347
+ <span class='kw'>end</span>
348
+ <span class='ivar'>@code_pointer</span> <span class='op'>+=</span> <span class='int'>1</span>
349
+ <span class='kw'>end</span>
350
+ <span class='ivar'>@tape</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
351
+ <span class='kw'>end</span></pre>
352
+ </td>
353
+ </tr>
354
+ </table>
355
+ </div>
356
+
357
+ </div>
358
+
359
+ </div>
360
+
361
+ <div id="footer">
362
+ Generated on Mon Jan 22 14:49:08 2024 by
363
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
364
+ 0.9.34 (ruby-3.1.2).
365
+ </div>
366
+
367
+ </div>
368
+ </body>
369
+ </html>
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Esolang::Interpreters
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Esolang::Interpreters";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (I)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Esolang.html" title="Esolang (module)">Esolang</a></span></span>
41
+ &raquo;
42
+ <span class="title">Interpreters</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Esolang::Interpreters
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/interpreters/ook_interpreter.rb<span class="defines">,<br />
82
+ lib/interpreters/base_interpreter.rb,<br /> lib/interpreters/boolfuck_interpreter.rb,<br /> lib/interpreters/brainfuck_interpreter.rb,<br /> lib/interpreters/paintfuck_interpreter.rb,<br /> lib/interpreters/smallfuck_interpreter.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+
93
+
94
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Interpreters/BaseInterpreter.html" title="Esolang::Interpreters::BaseInterpreter (class)">BaseInterpreter</a></span>, <span class='object_link'><a href="Interpreters/Boolfuck.html" title="Esolang::Interpreters::Boolfuck (class)">Boolfuck</a></span>, <span class='object_link'><a href="Interpreters/Brainfuck.html" title="Esolang::Interpreters::Brainfuck (class)">Brainfuck</a></span>, <span class='object_link'><a href="Interpreters/Ook.html" title="Esolang::Interpreters::Ook (class)">Ook</a></span>, <span class='object_link'><a href="Interpreters/Paintfuck.html" title="Esolang::Interpreters::Paintfuck (class)">Paintfuck</a></span>, <span class='object_link'><a href="Interpreters/Smallfuck.html" title="Esolang::Interpreters::Smallfuck (class)">Smallfuck</a></span>
95
+
96
+
97
+ </p>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </div>
108
+
109
+ <div id="footer">
110
+ Generated on Mon Jan 22 14:49:08 2024 by
111
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
+ 0.9.34 (ruby-3.1.2).
113
+ </div>
114
+
115
+ </div>
116
+ </body>
117
+ </html>
@@ -0,0 +1,120 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Esolang::Refinements
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Esolang::Refinements";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Esolang.html" title="Esolang (module)">Esolang</a></span></span>
41
+ &raquo;
42
+ <span class="title">Refinements</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Esolang::Refinements
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/refinements/refinements.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+
89
+ <p>The Refinements module provides refinements for String class to enable direct interpretation of esoteric programming languages.</p>
90
+
91
+ <p>To use these refinements, you need to include them using the ‘using` keyword:</p>
92
+
93
+ <p>“‘ruby require ’esolang’ “‘</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div>
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ </div>
111
+
112
+ <div id="footer">
113
+ Generated on Mon Jan 22 14:49:08 2024 by
114
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
115
+ 0.9.34 (ruby-3.1.2).
116
+ </div>
117
+
118
+ </div>
119
+ </body>
120
+ </html>