term_utils 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -2
  3. data/COPYING +3 -3
  4. data/README.md +51 -16
  5. data/Rakefile +6 -0
  6. data/doc/TermUtils/AP/Article.html +57 -55
  7. data/doc/TermUtils/AP/ArticleResult.html +584 -0
  8. data/doc/TermUtils/AP/Flag.html +295 -78
  9. data/doc/TermUtils/AP/Parameter.html +891 -103
  10. data/doc/TermUtils/AP/ParameterResult.html +980 -0
  11. data/doc/TermUtils/{FF/Cursor/Context.html → AP/ParameterWalkerHooks.html} +60 -60
  12. data/doc/TermUtils/AP/ParseError.html +651 -19
  13. data/doc/TermUtils/AP/Parser.html +181 -121
  14. data/doc/TermUtils/AP/Result.html +201 -528
  15. data/doc/TermUtils/AP/Syntax.html +103 -393
  16. data/doc/TermUtils/AP/SyntaxError.html +9 -91
  17. data/doc/TermUtils/AP/Walker.html +686 -0
  18. data/doc/TermUtils/AP.html +49 -160
  19. data/doc/TermUtils/FF/Config.html +203 -35
  20. data/doc/TermUtils/FF/Context.html +585 -0
  21. data/doc/TermUtils/FF/Entry.html +626 -0
  22. data/doc/TermUtils/FF/Finder.html +850 -0
  23. data/doc/TermUtils/FF/{Cursor.html → FinderEntry.html} +473 -211
  24. data/doc/TermUtils/FF/FinderQuery.html +946 -0
  25. data/doc/TermUtils/FF/Query.html +402 -70
  26. data/doc/TermUtils/FF.html +135 -11
  27. data/doc/TermUtils/PropertyTreeNode.html +304 -190
  28. data/doc/TermUtils/Tab/Column.html +98 -96
  29. data/doc/TermUtils/Tab/Header.html +30 -30
  30. data/doc/TermUtils/Tab/Holder.html +81 -81
  31. data/doc/TermUtils/Tab/Printer.html +43 -43
  32. data/doc/TermUtils/Tab/Table.html +124 -128
  33. data/doc/TermUtils/Tab/TableError.html +7 -89
  34. data/doc/TermUtils/Tab.html +93 -86
  35. data/doc/TermUtils.html +10 -10
  36. data/doc/_index.html +62 -42
  37. data/doc/class_list.html +3 -3
  38. data/doc/css/style.css +3 -2
  39. data/doc/file.README.html +63 -26
  40. data/doc/file_list.html +2 -2
  41. data/doc/frames.html +2 -2
  42. data/doc/index.html +63 -26
  43. data/doc/js/app.js +14 -3
  44. data/doc/method_list.html +708 -236
  45. data/doc/top-level-namespace.html +7 -7
  46. data/lib/term_utils/ap/article.rb +15 -9
  47. data/lib/term_utils/ap/flag.rb +37 -20
  48. data/lib/term_utils/ap/parameter.rb +88 -19
  49. data/lib/term_utils/ap/parser.rb +143 -116
  50. data/lib/term_utils/ap/result.rb +208 -161
  51. data/lib/term_utils/ap/syntax.rb +53 -69
  52. data/lib/term_utils/ap.rb +79 -24
  53. data/lib/term_utils/ff/config.rb +22 -10
  54. data/lib/term_utils/{ap/no_such_value_error.rb → ff/entry.rb} +26 -8
  55. data/lib/term_utils/ff/finder.rb +255 -0
  56. data/lib/term_utils/ff/query.rb +94 -17
  57. data/lib/term_utils/ff.rb +12 -2
  58. data/lib/term_utils/property_tree_node.rb +47 -19
  59. data/lib/term_utils/tab.rb +106 -61
  60. data/lib/term_utils.rb +8 -1
  61. data/term_utils.gemspec +4 -4
  62. metadata +18 -17
  63. data/doc/TermUtils/AP/Element.html +0 -1025
  64. data/doc/TermUtils/AP/Level.html +0 -638
  65. data/doc/TermUtils/AP/NoSuchValueError.html +0 -217
  66. data/lib/term_utils/ap/element.rb +0 -78
  67. data/lib/term_utils/ap/level.rb +0 -57
  68. data/lib/term_utils/ap/parse_error.rb +0 -27
  69. data/lib/term_utils/ap/syntax_error.rb +0 -27
  70. data/lib/term_utils/ff/cursor.rb +0 -153
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: TermUtils::AP::Parser
8
8
 
9
- &mdash; Documentation by YARD 0.9.20
9
+ &mdash; Documentation by YARD 0.9.34
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "TermUtils::AP::Parser";
19
19
  relpath = '../../';
20
20
  </script>
@@ -119,7 +119,7 @@
119
119
 
120
120
 
121
121
  <h2>
122
- Instance Method Summary
122
+ Class Method Summary
123
123
  <small><a href="#" class="summary_toggle">collapse</a></small>
124
124
  </h2>
125
125
 
@@ -128,14 +128,36 @@
128
128
  <li class="public ">
129
129
  <span class="summary_signature">
130
130
 
131
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Parser </a>
131
+ <a href="#eval_article_min_occurs-class_method" title="eval_article_min_occurs (class method)">.<strong>eval_article_min_occurs</strong>(articles) &#x21d2; Integer </a>
132
132
 
133
133
 
134
134
 
135
135
  </span>
136
136
 
137
137
 
138
- <span class="note title constructor">constructor</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Evaluates the added number of min occurs of a given array of articles.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#match_shortcut_flag-class_method" title="match_shortcut_flag (class method)">.<strong>match_shortcut_flag</strong>(shortcut_flags, arg) &#x21d2; Array&lt;String&gt;<sup>?</sup> </a>
156
+
157
+
158
+
159
+ </span>
160
+
139
161
 
140
162
 
141
163
 
@@ -145,22 +167,33 @@
145
167
 
146
168
 
147
169
  <span class="summary_desc"><div class='inline'>
148
- <p>A new instance of Parser.</p>
170
+ <p>Tests whether a given sample matches a shortcut flag.</p>
149
171
  </div></span>
150
172
 
151
173
  </li>
152
174
 
153
175
 
176
+ </ul>
177
+
178
+ <h2>
179
+ Instance Method Summary
180
+ <small><a href="#" class="summary_toggle">collapse</a></small>
181
+ </h2>
182
+
183
+ <ul class="summary">
184
+
154
185
  <li class="public ">
155
186
  <span class="summary_signature">
156
187
 
157
- <a href="#parse_arguments-instance_method" title="#parse_arguments (instance method)">#<strong>parse_arguments</strong>(syntax, arguments, opts = {}) &#x21d2; TermUtils::AP::Result </a>
188
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Parser </a>
158
189
 
159
190
 
160
191
 
161
192
  </span>
162
193
 
163
194
 
195
+ <span class="note title constructor">constructor</span>
196
+
164
197
 
165
198
 
166
199
 
@@ -169,7 +202,7 @@
169
202
 
170
203
 
171
204
  <span class="summary_desc"><div class='inline'>
172
- <p>Parses a given list of arguments.</p>
205
+ <p>Constructs a new Parser.</p>
173
206
  </div></span>
174
207
 
175
208
  </li>
@@ -178,7 +211,7 @@
178
211
  <li class="public ">
179
212
  <span class="summary_signature">
180
213
 
181
- <a href="#parse_command-instance_method" title="#parse_command (instance method)">#<strong>parse_command</strong>(syntax, command, opts = {}) &#x21d2; TermUtils::AP::Result </a>
214
+ <a href="#parse_arguments-instance_method" title="#parse_arguments (instance method)">#<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &amp;block) &#x21d2; Result </a>
182
215
 
183
216
 
184
217
 
@@ -193,7 +226,7 @@
193
226
 
194
227
 
195
228
  <span class="summary_desc"><div class='inline'>
196
- <p>Parses a given command.</p>
229
+ <p>Parses a given list of arguments.</p>
197
230
  </div></span>
198
231
 
199
232
  </li>
@@ -217,7 +250,7 @@
217
250
  </h3><div class="docstring">
218
251
  <div class="discussion">
219
252
 
220
- <p>Returns a new instance of Parser</p>
253
+ <p>Constructs a new Parser.</p>
221
254
 
222
255
 
223
256
  </div>
@@ -231,11 +264,11 @@
231
264
  <pre class="lines">
232
265
 
233
266
 
234
- 22
235
- 23</pre>
267
+ 24
268
+ 25</pre>
236
269
  </td>
237
270
  <td>
238
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 22</span>
271
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 24</span>
239
272
 
240
273
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
241
274
  <span class='kw'>end</span></pre>
@@ -247,14 +280,14 @@
247
280
  </div>
248
281
 
249
282
 
250
- <div id="instance_method_details" class="method_details_list">
251
- <h2>Instance Method Details</h2>
283
+ <div id="class_method_details" class="method_details_list">
284
+ <h2>Class Method Details</h2>
252
285
 
253
286
 
254
287
  <div class="method_details first">
255
- <h3 class="signature first" id="parse_arguments-instance_method">
288
+ <h3 class="signature first" id="eval_article_min_occurs-class_method">
256
289
 
257
- #<strong>parse_arguments</strong>(syntax, arguments, opts = {}) &#x21d2; <tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>
290
+ .<strong>eval_article_min_occurs</strong>(articles) &#x21d2; <tt>Integer</tt>
258
291
 
259
292
 
260
293
 
@@ -263,7 +296,7 @@
263
296
  </h3><div class="docstring">
264
297
  <div class="discussion">
265
298
 
266
- <p>Parses a given list of arguments.</p>
299
+ <p>Evaluates the added number of min occurs of a given array of articles.</p>
267
300
 
268
301
 
269
302
  </div>
@@ -274,103 +307,111 @@
274
307
 
275
308
  <li>
276
309
 
277
- <span class='name'>syntax</span>
310
+ <span class='name'>articles</span>
278
311
 
279
312
 
280
- <span class='type'>(<tt><span class='object_link'><a href="Syntax.html" title="TermUtils::AP::Syntax (class)">TermUtils::AP::Syntax</a></span></tt>)</span>
313
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span>&gt;</tt>)</span>
281
314
 
282
315
 
283
316
 
284
317
  </li>
285
318
 
286
- <li>
287
-
288
- <span class='name'>arguments</span>
289
-
290
-
291
- <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
292
-
293
-
294
-
295
- </li>
319
+ </ul>
320
+
321
+ <p class="tag_title">Returns:</p>
322
+ <ul class="return">
296
323
 
297
324
  <li>
298
325
 
299
- <span class='name'>opts</span>
300
-
301
-
302
- <span class='type'>(<tt>Hash</tt>)</span>
303
326
 
327
+ <span class='type'>(<tt>Integer</tt>)</span>
304
328
 
305
- <em class="default">(defaults to: <tt>{}</tt>)</em>
306
329
 
307
330
 
308
- &mdash;
309
- <div class='inline'>
310
- <p>`:program`.</p>
311
- </div>
312
-
313
331
  </li>
314
332
 
315
333
  </ul>
316
334
 
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
325
- <ul class="option">
326
-
327
- <li>
328
- <span class="name">:program</span>
329
- <span class="type">(<tt>Boolean</tt>)</span>
330
- <span class="default">
331
-
332
- </span>
333
-
334
- &mdash; <div class='inline'>
335
- <p>Whether the first argument is the program name.</p>
335
+ </div><table class="source_code">
336
+ <tr>
337
+ <td>
338
+ <pre class="lines">
339
+
340
+
341
+ 65
342
+ 66
343
+ 67</pre>
344
+ </td>
345
+ <td>
346
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 65</span>
347
+
348
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_eval_article_min_occurs'>eval_article_min_occurs</span><span class='lparen'>(</span><span class='id identifier rubyid_articles'>articles</span><span class='rparen'>)</span>
349
+ <span class='id identifier rubyid_articles'>articles</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_acc'>acc</span><span class='comma'>,</span> <span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_acc'>acc</span> <span class='op'>+</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_min_occurs'>min_occurs</span> <span class='rbrace'>}</span>
350
+ <span class='kw'>end</span></pre>
351
+ </td>
352
+ </tr>
353
+ </table>
336
354
  </div>
337
-
338
- </li>
339
-
340
- </ul>
355
+
356
+ <div class="method_details ">
357
+ <h3 class="signature " id="match_shortcut_flag-class_method">
358
+
359
+ .<strong>match_shortcut_flag</strong>(shortcut_flags, arg) &#x21d2; <tt>Array&lt;String&gt;</tt><sup>?</sup>
341
360
 
342
361
 
343
- <p class="tag_title">Returns:</p>
344
- <ul class="return">
362
+
363
+
364
+
365
+ </h3><div class="docstring">
366
+ <div class="discussion">
367
+
368
+ <p>Tests whether a given sample matches a shortcut flag.</p>
369
+
370
+
371
+ </div>
372
+ </div>
373
+ <div class="tags">
374
+ <p class="tag_title">Parameters:</p>
375
+ <ul class="param">
345
376
 
346
377
  <li>
347
378
 
379
+ <span class='name'>shortcut_flags</span>
380
+
348
381
 
349
- <span class='type'>(<tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>)</span>
382
+ <span class='type'>(<tt>Hash&lt;String, <span class='object_link'><a href="Flag.html" title="TermUtils::AP::Flag (class)">Flag</a></span>&gt;</tt>)</span>
350
383
 
351
384
 
352
385
 
353
386
  </li>
354
387
 
355
- </ul>
356
- <p class="tag_title">Raises:</p>
357
- <ul class="raise">
358
-
359
388
  <li>
360
389
 
390
+ <span class='name'>arg</span>
361
391
 
362
- <span class='type'>(<tt><span class='object_link'><a href="ParseError.html" title="TermUtils::AP::ParseError (class)">TermUtils::AP::ParseError</a></span></tt>)</span>
392
+
393
+ <span class='type'>(<tt>String</tt>)</span>
363
394
 
364
395
 
365
396
 
366
397
  </li>
367
398
 
399
+ </ul>
400
+
401
+ <p class="tag_title">Returns:</p>
402
+ <ul class="return">
403
+
368
404
  <li>
369
405
 
370
406
 
371
- <span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">TermUtils::AP::SyntaxError</a></span></tt>)</span>
407
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>, <tt>nil</tt>)</span>
408
+
372
409
 
373
410
 
411
+ &mdash;
412
+ <div class='inline'>
413
+ <p>Replacements on success, nil otherwise.</p>
414
+ </div>
374
415
 
375
416
  </li>
376
417
 
@@ -382,39 +423,43 @@
382
423
  <pre class="lines">
383
424
 
384
425
 
385
- 43
386
- 44
387
- 45
388
- 46
389
- 47
390
- 48
391
- 49
392
- 50
393
- 51
394
- 52</pre>
426
+ 52
427
+ 53
428
+ 54
429
+ 55
430
+ 56
431
+ 57
432
+ 58
433
+ 59
434
+ 60</pre>
395
435
  </td>
396
436
  <td>
397
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 43</span>
437
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 52</span>
398
438
 
399
- <span class='kw'>def</span> <span class='id identifier rubyid_parse_arguments'>parse_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
400
- <span class='id identifier rubyid_syntax'>syntax</span> <span class='op'>=</span> <span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
401
- <span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span>
402
- <span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
403
- <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="TermUtils::AP::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='rparen'>)</span>
404
- <span class='id identifier rubyid_catch'>catch</span> <span class='symbol'>:done</span> <span class='kw'>do</span>
405
- <span class='id identifier rubyid_parse0'>parse0</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
439
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_match_shortcut_flag'>match_shortcut_flag</span><span class='lparen'>(</span><span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
440
+ <span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_flag'>flag</span><span class='op'>|</span>
441
+ <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span> <span class='id identifier rubyid_label'>label</span>
442
+
443
+ <span class='kw'>return</span> <span class='lbracket'>[</span><span class='id identifier rubyid_flag'>flag</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='lbracket'>[</span><span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>..</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
406
444
  <span class='kw'>end</span>
407
- <span class='id identifier rubyid_res'>res</span>
445
+
446
+ <span class='kw'>nil</span>
408
447
  <span class='kw'>end</span></pre>
409
448
  </td>
410
449
  </tr>
411
450
  </table>
412
451
  </div>
413
452
 
414
- <div class="method_details ">
415
- <h3 class="signature " id="parse_command-instance_method">
453
+ </div>
454
+
455
+ <div id="instance_method_details" class="method_details_list">
456
+ <h2>Instance Method Details</h2>
457
+
458
+
459
+ <div class="method_details first">
460
+ <h3 class="signature first" id="parse_arguments-instance_method">
416
461
 
417
- #<strong>parse_command</strong>(syntax, command, opts = {}) &#x21d2; <tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>
462
+ #<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &amp;block) &#x21d2; <tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>
418
463
 
419
464
 
420
465
 
@@ -423,7 +468,7 @@
423
468
  </h3><div class="docstring">
424
469
  <div class="discussion">
425
470
 
426
- <p>Parses a given command.</p>
471
+ <p>Parses a given list of arguments.</p>
427
472
 
428
473
 
429
474
  </div>
@@ -437,7 +482,7 @@
437
482
  <span class='name'>syntax</span>
438
483
 
439
484
 
440
- <span class='type'>(<tt><span class='object_link'><a href="Syntax.html" title="TermUtils::AP::Syntax (class)">TermUtils::AP::Syntax</a></span></tt>)</span>
485
+ <span class='type'>(<tt><span class='object_link'><a href="Syntax.html" title="TermUtils::AP::Syntax (class)">Syntax</a></span></tt>)</span>
441
486
 
442
487
 
443
488
 
@@ -445,10 +490,10 @@
445
490
 
446
491
  <li>
447
492
 
448
- <span class='name'>command</span>
493
+ <span class='name'>arguments</span>
449
494
 
450
495
 
451
- <span class='type'>(<tt>String</tt>)</span>
496
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
452
497
 
453
498
 
454
499
 
@@ -459,17 +504,12 @@
459
504
  <span class='name'>opts</span>
460
505
 
461
506
 
462
- <span class='type'>(<tt>Hash</tt>)</span>
507
+ <span class='type'>(<tt>Hash&lt;Symbol, Object&gt;</tt>)</span>
463
508
 
464
509
 
465
510
  <em class="default">(defaults to: <tt>{}</tt>)</em>
466
511
 
467
512
 
468
- &mdash;
469
- <div class='inline'>
470
- <p>`:program`.</p>
471
- </div>
472
-
473
513
  </li>
474
514
 
475
515
  </ul>
@@ -485,20 +525,22 @@
485
525
  <ul class="option">
486
526
 
487
527
  <li>
488
- <span class="name">:program</span>
528
+ <span class="name">:strict</span>
489
529
  <span class="type">(<tt>Boolean</tt>)</span>
490
530
  <span class="default">
491
531
 
492
532
  </span>
493
533
 
494
534
  &mdash; <div class='inline'>
495
- <p>Whether the first argument is the program name.</p>
535
+ <p>Whether the Syntax must be considered as strict.</p>
496
536
  </div>
497
537
 
498
538
  </li>
499
539
 
500
540
  </ul>
501
541
 
542
+
543
+
502
544
 
503
545
  <p class="tag_title">Returns:</p>
504
546
  <ul class="return">
@@ -506,7 +548,7 @@
506
548
  <li>
507
549
 
508
550
 
509
- <span class='type'>(<tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>)</span>
551
+ <span class='type'>(<tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>)</span>
510
552
 
511
553
 
512
554
 
@@ -519,7 +561,7 @@
519
561
  <li>
520
562
 
521
563
 
522
- <span class='type'>(<tt><span class='object_link'><a href="ParseError.html" title="TermUtils::AP::ParseError (class)">TermUtils::AP::ParseError</a></span></tt>)</span>
564
+ <span class='type'>(<tt><span class='object_link'><a href="ParseError.html" title="TermUtils::AP::ParseError (class)">ParseError</a></span></tt>)</span>
523
565
 
524
566
 
525
567
 
@@ -528,7 +570,7 @@
528
570
  <li>
529
571
 
530
572
 
531
- <span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">TermUtils::AP::SyntaxError</a></span></tt>)</span>
573
+ <span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></tt>)</span>
532
574
 
533
575
 
534
576
 
@@ -542,15 +584,33 @@
542
584
  <pre class="lines">
543
585
 
544
586
 
545
- 32
546
- 33
547
- 34</pre>
587
+ 35
588
+ 36
589
+ 37
590
+ 38
591
+ 39
592
+ 40
593
+ 41
594
+ 42
595
+ 43
596
+ 44
597
+ 45
598
+ 46</pre>
548
599
  </td>
549
600
  <td>
550
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 32</span>
601
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 35</span>
551
602
 
552
- <span class='kw'>def</span> <span class='id identifier rubyid_parse_command'>parse_command</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
553
- <span class='id identifier rubyid_parse_arguments'>parse_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
603
+ <span class='kw'>def</span> <span class='id identifier rubyid_parse_arguments'>parse_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
604
+ <span class='id identifier rubyid_syntax'>syntax</span> <span class='op'>=</span> <span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
605
+ <span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span>
606
+ <span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
607
+ <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="TermUtils::AP::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='rparen'>)</span>
608
+ <span class='id identifier rubyid_catch'>catch</span> <span class='symbol'>:done</span> <span class='kw'>do</span>
609
+ <span class='id identifier rubyid_parse0'>parse0</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
610
+ <span class='kw'>end</span>
611
+ <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_remaining_arguments'>remaining_arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span>
612
+ <span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_walk'>walk</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
613
+ <span class='id identifier rubyid_res'>res</span>
554
614
  <span class='kw'>end</span></pre>
555
615
  </td>
556
616
  </tr>
@@ -562,9 +622,9 @@
562
622
  </div>
563
623
 
564
624
  <div id="footer">
565
- Generated on Fri Feb 7 18:54:40 2020 by
566
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
567
- 0.9.20 (ruby-2.6.5).
625
+ Generated on Wed Aug 9 17:34:26 2023 by
626
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
627
+ 0.9.34 (ruby-3.2.2).
568
628
  </div>
569
629
 
570
630
  </div>