term_utils 0.3.2 → 0.4.0

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -2
  3. data/COPYING +3 -3
  4. data/README.md +51 -16
  5. data/doc/TermUtils.html +9 -9
  6. data/doc/TermUtils/AP.html +48 -159
  7. data/doc/TermUtils/AP/Article.html +48 -46
  8. data/doc/TermUtils/AP/ArticleResult.html +584 -0
  9. data/doc/TermUtils/AP/Flag.html +294 -77
  10. data/doc/TermUtils/AP/NoSuchValueError.html +13 -13
  11. data/doc/TermUtils/AP/Parameter.html +885 -97
  12. data/doc/TermUtils/AP/ParameterResult.html +980 -0
  13. data/doc/TermUtils/{FF/Cursor/Context.html → AP/ParameterWalkerHooks.html} +59 -59
  14. data/doc/TermUtils/AP/ParseError.html +13 -13
  15. data/doc/TermUtils/AP/Parser.html +174 -142
  16. data/doc/TermUtils/AP/Result.html +200 -527
  17. data/doc/TermUtils/AP/Syntax.html +102 -392
  18. data/doc/TermUtils/AP/SyntaxError.html +13 -13
  19. data/doc/TermUtils/AP/Walker.html +686 -0
  20. data/doc/TermUtils/FF.html +10 -10
  21. data/doc/TermUtils/FF/Config.html +201 -33
  22. data/doc/TermUtils/FF/Context.html +585 -0
  23. data/doc/TermUtils/FF/Entry.html +626 -0
  24. data/doc/TermUtils/FF/Query.html +402 -66
  25. data/doc/TermUtils/PropertyTreeNode.html +302 -188
  26. data/doc/TermUtils/Tab.html +90 -83
  27. data/doc/TermUtils/Tab/Column.html +94 -92
  28. data/doc/TermUtils/Tab/Header.html +26 -26
  29. data/doc/TermUtils/Tab/Holder.html +74 -74
  30. data/doc/TermUtils/Tab/Printer.html +42 -42
  31. data/doc/TermUtils/Tab/Table.html +124 -128
  32. data/doc/TermUtils/Tab/TableError.html +11 -11
  33. data/doc/_index.html +48 -34
  34. data/doc/class_list.html +3 -3
  35. data/doc/css/style.css +2 -2
  36. data/doc/file.README.html +64 -31
  37. data/doc/file_list.html +2 -2
  38. data/doc/frames.html +2 -2
  39. data/doc/index.html +64 -31
  40. data/doc/js/app.js +14 -3
  41. data/doc/method_list.html +387 -211
  42. data/doc/top-level-namespace.html +6 -6
  43. data/lib/term_utils.rb +8 -1
  44. data/lib/term_utils/ap.rb +41 -30
  45. data/lib/term_utils/ap/article.rb +14 -8
  46. data/lib/term_utils/ap/flag.rb +36 -19
  47. data/lib/term_utils/ap/parameter.rb +87 -18
  48. data/lib/term_utils/ap/parser.rb +141 -115
  49. data/lib/term_utils/ap/result.rb +207 -160
  50. data/lib/term_utils/ap/syntax.rb +52 -68
  51. data/lib/term_utils/ff.rb +11 -2
  52. data/lib/term_utils/ff/config.rb +20 -8
  53. data/lib/term_utils/{ap/no_such_value_error.rb → ff/entry.rb} +25 -7
  54. data/lib/term_utils/ff/query.rb +93 -14
  55. data/lib/term_utils/property_tree_node.rb +47 -19
  56. data/lib/term_utils/tab.rb +102 -58
  57. data/term_utils.gemspec +4 -4
  58. metadata +12 -14
  59. data/doc/TermUtils/AP/Element.html +0 -1025
  60. data/doc/TermUtils/AP/Level.html +0 -638
  61. data/doc/TermUtils/FF/Cursor.html +0 -929
  62. data/lib/term_utils/ap/element.rb +0 -78
  63. data/lib/term_utils/ap/level.rb +0 -57
  64. data/lib/term_utils/ap/parse_error.rb +0 -27
  65. data/lib/term_utils/ap/syntax_error.rb +0 -27
  66. data/lib/term_utils/ff/cursor.rb +0 -153
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: TermUtils::AP::Syntax
8
8
 
9
- &mdash; Documentation by YARD 0.9.20
9
+ &mdash; Documentation by YARD 0.9.25
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::Syntax";
19
19
  relpath = '../../';
20
20
  </script>
@@ -102,7 +102,7 @@
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>Represents the argument list syntax. It holds a list of parameters and levels.</p>
105
+ <p>Represents the argument list syntax. It holds a list of parameters.</p>
106
106
 
107
107
 
108
108
  </div>
@@ -120,7 +120,7 @@
120
120
  <li class="public ">
121
121
  <span class="summary_signature">
122
122
 
123
- <a href="#elements-instance_method" title="#elements (instance method)">#<strong>elements</strong> &#x21d2; Array&lt;TermUtils::AP::Element&gt; </a>
123
+ <a href="#parameters-instance_method" title="#parameters (instance method)">#<strong>parameters</strong> &#x21d2; Array&lt;Parameter&gt; </a>
124
124
 
125
125
 
126
126
 
@@ -158,31 +158,7 @@
158
158
  <li class="public ">
159
159
  <span class="summary_signature">
160
160
 
161
- <a href="#define_level-instance_method" title="#define_level (instance method)">#<strong>define_level</strong>(opts = {}, &amp;block) &#x21d2; TermUtils::AP::Level </a>
162
-
163
-
164
-
165
- </span>
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <span class="summary_desc"><div class='inline'>
176
- <p>Creates and adds a new Level.</p>
177
- </div></span>
178
-
179
- </li>
180
-
181
-
182
- <li class="public ">
183
- <span class="summary_signature">
184
-
185
- <a href="#define_parameter-instance_method" title="#define_parameter (instance method)">#<strong>define_parameter</strong>(opts = {}, &amp;block) &#x21d2; TermUtils::AP::Parameter </a>
161
+ <a href="#define_parameter-instance_method" title="#define_parameter (instance method)">#<strong>define_parameter</strong>(id = nil, opts = {}, &amp;block) &#x21d2; Parameter </a>
186
162
 
187
163
 
188
164
 
@@ -206,7 +182,7 @@
206
182
  <li class="public ">
207
183
  <span class="summary_signature">
208
184
 
209
- <a href="#fetch_elements-instance_method" title="#fetch_elements (instance method)">#<strong>fetch_elements</strong> &#x21d2; Array </a>
185
+ <a href="#fetch_parameters-instance_method" title="#fetch_parameters (instance method)">#<strong>fetch_parameters</strong> &#x21d2; Array </a>
210
186
 
211
187
 
212
188
 
@@ -221,55 +197,7 @@
221
197
 
222
198
 
223
199
  <span class="summary_desc"><div class='inline'>
224
- <p>Fetches all direct flagged parameters and levels.</p>
225
- </div></span>
226
-
227
- </li>
228
-
229
-
230
- <li class="public ">
231
- <span class="summary_signature">
232
-
233
- <a href="#fetch_flagged_elements-instance_method" title="#fetch_flagged_elements (instance method)">#<strong>fetch_flagged_elements</strong> &#x21d2; Hash&lt;String, TermUtils::AP::Element&gt; </a>
234
-
235
-
236
-
237
- </span>
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
- <span class="summary_desc"><div class='inline'>
248
- <p>Fetches all direct flagged parameters and levels.</p>
249
- </div></span>
250
-
251
- </li>
252
-
253
-
254
- <li class="public ">
255
- <span class="summary_signature">
256
-
257
- <a href="#fetch_unflagged_parameters-instance_method" title="#fetch_unflagged_parameters (instance method)">#<strong>fetch_unflagged_parameters</strong> &#x21d2; Array&lt;TermUtils::AP::Parameter&gt; </a>
258
-
259
-
260
-
261
- </span>
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
- <span class="summary_desc"><div class='inline'>
272
- <p>Fetches all direct unflagged.</p>
200
+ <p>Fetches all flagged parameters and unflagged parameters.</p>
273
201
  </div></span>
274
202
 
275
203
  </li>
@@ -381,15 +309,15 @@
381
309
  <pre class="lines">
382
310
 
383
311
 
384
- 26
385
312
  27
386
- 28</pre>
313
+ 28
314
+ 29</pre>
387
315
  </td>
388
316
  <td>
389
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 26</span>
317
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 27</span>
390
318
 
391
319
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
392
- <span class='ivar'>@elements</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
320
+ <span class='ivar'>@parameters</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
393
321
  <span class='kw'>end</span></pre>
394
322
  </td>
395
323
  </tr>
@@ -402,11 +330,11 @@
402
330
  <h2>Instance Attribute Details</h2>
403
331
 
404
332
 
405
- <span id="elements=-instance_method"></span>
333
+ <span id="parameters=-instance_method"></span>
406
334
  <div class="method_details first">
407
- <h3 class="signature first" id="elements-instance_method">
335
+ <h3 class="signature first" id="parameters-instance_method">
408
336
 
409
- #<strong>elements</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">TermUtils::AP::Element</a></span>&gt;</tt>
337
+ #<strong>parameters</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span>&gt;</tt>
410
338
 
411
339
 
412
340
 
@@ -426,7 +354,7 @@
426
354
  <li>
427
355
 
428
356
 
429
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">TermUtils::AP::Element</a></span>&gt;</tt>)</span>
357
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span>&gt;</tt>)</span>
430
358
 
431
359
 
432
360
 
@@ -447,8 +375,8 @@
447
375
  <td>
448
376
  <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 24</span>
449
377
 
450
- <span class='kw'>def</span> <span class='id identifier rubyid_elements'>elements</span>
451
- <span class='ivar'>@elements</span>
378
+ <span class='kw'>def</span> <span class='id identifier rubyid_parameters'>parameters</span>
379
+ <span class='ivar'>@parameters</span>
452
380
  <span class='kw'>end</span></pre>
453
381
  </td>
454
382
  </tr>
@@ -463,9 +391,9 @@
463
391
 
464
392
 
465
393
  <div class="method_details first">
466
- <h3 class="signature first" id="define_level-instance_method">
394
+ <h3 class="signature first" id="define_parameter-instance_method">
467
395
 
468
- #<strong>define_level</strong>(opts = {}, &amp;block) &#x21d2; <tt><span class='object_link'><a href="Level.html" title="TermUtils::AP::Level (class)">TermUtils::AP::Level</a></span></tt>
396
+ #<strong>define_parameter</strong>(id = nil, opts = {}, &amp;block) &#x21d2; <tt><span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span></tt>
469
397
 
470
398
 
471
399
 
@@ -474,7 +402,7 @@
474
402
  </h3><div class="docstring">
475
403
  <div class="discussion">
476
404
 
477
- <p>Creates and adds a new Level.</p>
405
+ <p>Creates and adds a new Parameter.</p>
478
406
 
479
407
 
480
408
  </div>
@@ -485,127 +413,17 @@
485
413
 
486
414
  <li>
487
415
 
488
- <span class='name'>opts</span>
416
+ <span class='name'>id</span>
489
417
 
490
418
 
491
- <span class='type'>(<tt>Hash</tt>)</span>
419
+ <span class='type'>(<tt>Symbol</tt>, <tt>nil</tt>)</span>
492
420
 
493
421
 
494
- <em class="default">(defaults to: <tt>{}</tt>)</em>
422
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
495
423
 
496
424
 
497
425
  </li>
498
426
 
499
- </ul>
500
-
501
-
502
-
503
-
504
- <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
505
- <ul class="option">
506
-
507
- <li>
508
- <span class="name">:id</span>
509
- <span class="type">(<tt>Symbol</tt>)</span>
510
- <span class="default">
511
-
512
- </span>
513
-
514
- </li>
515
-
516
- <li>
517
- <span class="name">:min_occurs</span>
518
- <span class="type">(<tt>Integer</tt>)</span>
519
- <span class="default">
520
-
521
- </span>
522
-
523
- &mdash; <div class='inline'>
524
- <p>Default value is `0`.</p>
525
- </div>
526
-
527
- </li>
528
-
529
- <li>
530
- <span class="name">:max_occurs</span>
531
- <span class="type">(<tt>Integer</tt>)</span>
532
- <span class="default">
533
-
534
- </span>
535
-
536
- &mdash; <div class='inline'>
537
- <p>Default value is `1`.</p>
538
- </div>
539
-
540
- </li>
541
-
542
- </ul>
543
-
544
-
545
-
546
-
547
- <p class="tag_title">Returns:</p>
548
- <ul class="return">
549
-
550
- <li>
551
-
552
-
553
- <span class='type'>(<tt><span class='object_link'><a href="Level.html" title="TermUtils::AP::Level (class)">TermUtils::AP::Level</a></span></tt>)</span>
554
-
555
-
556
-
557
- </li>
558
-
559
- </ul>
560
-
561
- </div><table class="source_code">
562
- <tr>
563
- <td>
564
- <pre class="lines">
565
-
566
-
567
- 63
568
- 64
569
- 65
570
- 66
571
- 67
572
- 68</pre>
573
- </td>
574
- <td>
575
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 63</span>
576
-
577
- <span class='kw'>def</span> <span class='id identifier rubyid_define_level'>define_level</span><span class='lparen'>(</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>
578
- <span class='id identifier rubyid_new_level'>new_level</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="Level.html" title="TermUtils::AP::Level (class)">Level</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Level.html#initialize-instance_method" title="TermUtils::AP::Level#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
579
- <span class='ivar'>@elements</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_new_level'>new_level</span>
580
- <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_new_level'>new_level</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
581
- <span class='id identifier rubyid_new_level'>new_level</span>
582
- <span class='kw'>end</span></pre>
583
- </td>
584
- </tr>
585
- </table>
586
- </div>
587
-
588
- <div class="method_details ">
589
- <h3 class="signature " id="define_parameter-instance_method">
590
-
591
- #<strong>define_parameter</strong>(opts = {}, &amp;block) &#x21d2; <tt><span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">TermUtils::AP::Parameter</a></span></tt>
592
-
593
-
594
-
595
-
596
-
597
- </h3><div class="docstring">
598
- <div class="discussion">
599
-
600
- <p>Creates and adds a new Parameter.</p>
601
-
602
-
603
- </div>
604
- </div>
605
- <div class="tags">
606
- <p class="tag_title">Parameters:</p>
607
- <ul class="param">
608
-
609
427
  <li>
610
428
 
611
429
  <span class='name'>opts</span>
@@ -624,6 +442,8 @@
624
442
 
625
443
 
626
444
 
445
+
446
+
627
447
  <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
628
448
  <ul class="option">
629
449
 
@@ -643,10 +463,6 @@
643
463
 
644
464
  </span>
645
465
 
646
- &mdash; <div class='inline'>
647
- <p>Default value is `0`.</p>
648
- </div>
649
-
650
466
  </li>
651
467
 
652
468
  <li>
@@ -656,10 +472,6 @@
656
472
 
657
473
  </span>
658
474
 
659
- &mdash; <div class='inline'>
660
- <p>Default value is `1`.</p>
661
- </div>
662
-
663
475
  </li>
664
476
 
665
477
  </ul>
@@ -673,7 +485,7 @@
673
485
  <li>
674
486
 
675
487
 
676
- <span class='type'>(<tt><span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">TermUtils::AP::Parameter</a></span></tt>)</span>
488
+ <span class='type'>(<tt><span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span></tt>)</span>
677
489
 
678
490
 
679
491
 
@@ -687,19 +499,37 @@
687
499
  <pre class="lines">
688
500
 
689
501
 
690
- 51
691
- 52
692
- 53
693
502
  54
694
503
  55
695
- 56</pre>
504
+ 56
505
+ 57
506
+ 58
507
+ 59
508
+ 60
509
+ 61
510
+ 62
511
+ 63
512
+ 64
513
+ 65
514
+ 66
515
+ 67
516
+ 68</pre>
696
517
  </td>
697
518
  <td>
698
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 51</span>
519
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 54</span>
520
+
521
+ <span class='kw'>def</span> <span class='id identifier rubyid_define_parameter'>define_parameter</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</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>
522
+ <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span>
523
+ <span class='id identifier rubyid_param'>param</span> <span class='op'>=</span> <span class='ivar'>@parameters</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_id'>id</span> <span class='rbrace'>}</span>
524
+ <span class='kw'>if</span> <span class='id identifier rubyid_param'>param</span>
525
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_param'>param</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
526
+ <span class='kw'>return</span> <span class='id identifier rubyid_param'>param</span>
527
+ <span class='kw'>end</span>
699
528
 
700
- <span class='kw'>def</span> <span class='id identifier rubyid_define_parameter'>define_parameter</span><span class='lparen'>(</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>
529
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
530
+ <span class='kw'>end</span>
701
531
  <span class='id identifier rubyid_new_parameter'>new_parameter</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="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Parameter.html#initialize-instance_method" title="TermUtils::AP::Parameter#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
702
- <span class='ivar'>@elements</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_new_parameter'>new_parameter</span>
532
+ <span class='ivar'>@parameters</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_new_parameter'>new_parameter</span>
703
533
  <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_new_parameter'>new_parameter</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
704
534
  <span class='id identifier rubyid_new_parameter'>new_parameter</span>
705
535
  <span class='kw'>end</span></pre>
@@ -709,9 +539,9 @@
709
539
  </div>
710
540
 
711
541
  <div class="method_details ">
712
- <h3 class="signature " id="fetch_elements-instance_method">
542
+ <h3 class="signature " id="fetch_parameters-instance_method">
713
543
 
714
- #<strong>fetch_elements</strong> &#x21d2; <tt>Array</tt>
544
+ #<strong>fetch_parameters</strong> &#x21d2; <tt>Array</tt>
715
545
 
716
546
 
717
547
 
@@ -720,7 +550,7 @@
720
550
  </h3><div class="docstring">
721
551
  <div class="discussion">
722
552
 
723
- <p>Fetches all direct flagged parameters and levels.</p>
553
+ <p>Fetches all flagged parameters and unflagged parameters.</p>
724
554
 
725
555
 
726
556
  </div>
@@ -741,21 +571,13 @@
741
571
 
742
572
  </ul>
743
573
 
744
- <p class="tag_title">See Also:</p>
745
- <ul class="see">
746
-
747
- <li><span class='object_link'><a href="#fetch_flagged_elements-instance_method" title="TermUtils::AP::Syntax#fetch_flagged_elements (method)">#fetch_flagged_elements</a></span></li>
748
-
749
- <li><span class='object_link'><a href="#fetch_unflagged_parameters-instance_method" title="TermUtils::AP::Syntax#fetch_unflagged_parameters (method)">#fetch_unflagged_parameters</a></span></li>
750
-
751
- </ul>
752
-
753
574
  </div><table class="source_code">
754
575
  <tr>
755
576
  <td>
756
577
  <pre class="lines">
757
578
 
758
579
 
580
+ 72
759
581
  73
760
582
  74
761
583
  75
@@ -771,92 +593,37 @@
771
593
  85
772
594
  86
773
595
  87
774
- 88</pre>
775
- </td>
776
- <td>
777
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 73</span>
778
-
779
- <span class='kw'>def</span> <span class='id identifier rubyid_fetch_elements'>fetch_elements</span>
780
- <span class='id identifier rubyid_flagged_elems'>flagged_elems</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
781
- <span class='id identifier rubyid_unflagged_params'>unflagged_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
782
- <span class='ivar'>@elements</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_e'>e</span><span class='op'>|</span>
783
- <span class='kw'>if</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_flags'>flags</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
784
- <span class='comment'># Parameter
785
- </span> <span class='id identifier rubyid_unflagged_params'>unflagged_params</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_e'>e</span>
786
- <span class='kw'>else</span>
787
- <span class='comment'># Parameter or Level
788
- </span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_flags'>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_f'>f</span><span class='op'>|</span>
789
- <span class='id identifier rubyid_flagged_elems'>flagged_elems</span><span class='lbracket'>[</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span>
790
- <span class='kw'>end</span>
791
- <span class='kw'>end</span>
792
- <span class='kw'>end</span>
793
- <span class='lbracket'>[</span><span class='id identifier rubyid_flagged_elems'>flagged_elems</span><span class='comma'>,</span> <span class='id identifier rubyid_unflagged_params'>unflagged_params</span><span class='rbracket'>]</span>
794
- <span class='kw'>end</span></pre>
795
- </td>
796
- </tr>
797
- </table>
798
- </div>
799
-
800
- <div class="method_details ">
801
- <h3 class="signature " id="fetch_flagged_elements-instance_method">
802
-
803
- #<strong>fetch_flagged_elements</strong> &#x21d2; <tt>Hash&lt;String, <span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">TermUtils::AP::Element</a></span>&gt;</tt>
804
-
805
-
806
-
807
-
808
-
809
- </h3><div class="docstring">
810
- <div class="discussion">
811
-
812
- <p>Fetches all direct flagged parameters and levels.</p>
813
-
814
-
815
- </div>
816
- </div>
817
- <div class="tags">
818
-
819
- <p class="tag_title">Returns:</p>
820
- <ul class="return">
821
-
822
- <li>
823
-
824
-
825
- <span class='type'>(<tt>Hash&lt;String, <span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">TermUtils::AP::Element</a></span>&gt;</tt>)</span>
826
-
827
-
828
-
829
- </li>
830
-
831
- </ul>
832
-
833
- </div><table class="source_code">
834
- <tr>
835
- <td>
836
- <pre class="lines">
837
-
838
-
596
+ 88
597
+ 89
598
+ 90
839
599
  91
840
600
  92
841
- 93
842
- 94
843
- 95
844
- 96
845
- 97
846
- 98
847
- 99</pre>
601
+ 93</pre>
848
602
  </td>
849
603
  <td>
850
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 91</span>
604
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 72</span>
851
605
 
852
- <span class='kw'>def</span> <span class='id identifier rubyid_fetch_flagged_elements'>fetch_flagged_elements</span>
853
- <span class='id identifier rubyid_elems'>elems</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
854
- <span class='ivar'>@elements</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_e'>e</span><span class='op'>|</span>
855
- <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_flags'>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_f'>f</span><span class='op'>|</span>
856
- <span class='id identifier rubyid_elems'>elems</span><span class='lbracket'>[</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span>
606
+ <span class='kw'>def</span> <span class='id identifier rubyid_fetch_parameters'>fetch_parameters</span>
607
+ <span class='id identifier rubyid_unflagged_params'>unflagged_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
608
+ <span class='id identifier rubyid_flagged_params'>flagged_params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
609
+ <span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
610
+ <span class='ivar'>@parameters</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_p'>p</span><span class='op'>|</span>
611
+ <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_flagged?'>flagged?</span>
612
+ <span class='comment'># Flagged
613
+ </span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_flags'>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_f'>f</span><span class='op'>|</span>
614
+ <span class='id identifier rubyid_flagged_params'>flagged_params</span><span class='lbracket'>[</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_p'>p</span>
615
+ <span class='kw'>if</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_long?'>long?</span>
616
+ <span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span>
617
+ <span class='kw'>else</span>
618
+ <span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='lbracket'>[</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span>
619
+ <span class='kw'>end</span>
620
+ <span class='kw'>end</span>
621
+ <span class='kw'>else</span>
622
+ <span class='comment'># Unflagged
623
+ </span> <span class='id identifier rubyid_unflagged_params'>unflagged_params</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_p'>p</span>
857
624
  <span class='kw'>end</span>
858
625
  <span class='kw'>end</span>
859
- <span class='id identifier rubyid_elems'>elems</span>
626
+ <span class='lbracket'>[</span><span class='id identifier rubyid_unflagged_params'>unflagged_params</span><span class='comma'>,</span> <span class='id identifier rubyid_flagged_params'>flagged_params</span><span class='comma'>,</span> <span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='rbracket'>]</span>
860
627
  <span class='kw'>end</span></pre>
861
628
  </td>
862
629
  </tr>
@@ -864,9 +631,9 @@
864
631
  </div>
865
632
 
866
633
  <div class="method_details ">
867
- <h3 class="signature " id="fetch_unflagged_parameters-instance_method">
634
+ <h3 class="signature " id="finalize!-instance_method">
868
635
 
869
- #<strong>fetch_unflagged_parameters</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">TermUtils::AP::Parameter</a></span>&gt;</tt>
636
+ #<strong>finalize!</strong>(opts = {}) &#x21d2; <tt>nil</tt>
870
637
 
871
638
 
872
639
 
@@ -875,7 +642,7 @@
875
642
  </h3><div class="docstring">
876
643
  <div class="discussion">
877
644
 
878
- <p>Fetches all direct unflagged.</p>
645
+ <p>Finalizes this one. Internal use.</p>
879
646
 
880
647
 
881
648
  </div>
@@ -888,71 +655,20 @@
888
655
  <li>
889
656
 
890
657
 
891
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Parameter.html" title="TermUtils::AP::Parameter (class)">TermUtils::AP::Parameter</a></span>&gt;</tt>)</span>
658
+ <span class='type'>(<tt>nil</tt>)</span>
892
659
 
893
660
 
894
661
 
895
662
  </li>
896
663
 
897
664
  </ul>
898
-
899
- </div><table class="source_code">
900
- <tr>
901
- <td>
902
- <pre class="lines">
903
-
904
-
905
- 102
906
- 103
907
- 104
908
- 105
909
- 106
910
- 107
911
- 108
912
- 109</pre>
913
- </td>
914
- <td>
915
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 102</span>
916
-
917
- <span class='kw'>def</span> <span class='id identifier rubyid_fetch_unflagged_parameters'>fetch_unflagged_parameters</span>
918
- <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
919
- <span class='ivar'>@elements</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_e'>e</span><span class='op'>|</span>
920
- <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</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="Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span></span>
921
- <span class='id identifier rubyid_params'>params</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_e'>e</span> <span class='kw'>if</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_flags'>flags</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
922
- <span class='kw'>end</span>
923
- <span class='id identifier rubyid_params'>params</span>
924
- <span class='kw'>end</span></pre>
925
- </td>
926
- </tr>
927
- </table>
928
- </div>
929
-
930
- <div class="method_details ">
931
- <h3 class="signature " id="finalize!-instance_method">
932
-
933
- #<strong>finalize!</strong>(opts = {}) &#x21d2; <tt>nil</tt>
934
-
935
-
936
-
937
-
938
-
939
- </h3><div class="docstring">
940
- <div class="discussion">
941
-
942
- <p>Finalizes this one. Internal use.</p>
943
-
944
-
945
- </div>
946
- </div>
947
- <div class="tags">
948
-
949
- <p class="tag_title">Returns:</p>
950
- <ul class="return">
665
+ <p class="tag_title">Raises:</p>
666
+ <ul class="raise">
951
667
 
952
668
  <li>
953
669
 
954
670
 
955
- <span class='type'>(<tt>nil</tt>)</span>
671
+ <span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></tt>)</span>
956
672
 
957
673
 
958
674
 
@@ -966,17 +682,21 @@
966
682
  <pre class="lines">
967
683
 
968
684
 
685
+ 40
969
686
  41
970
687
  42
971
688
  43
972
- 44</pre>
689
+ 44
690
+ 45</pre>
973
691
  </td>
974
692
  <td>
975
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 41</span>
693
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 40</span>
976
694
 
977
695
  <span class='kw'>def</span> <span class='id identifier rubyid_finalize!'>finalize!</span><span class='lparen'>(</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>
978
- <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:anonymous</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='int'>0</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='symbol'>:anonymous</span>
979
- <span class='ivar'>@elements</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
696
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:anonymous</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='int'>0</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span> <span class='symbol'>:anonymous</span>
697
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:flag_labels</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
698
+ <span class='ivar'>@parameters</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
699
+ <span class='kw'>nil</span>
980
700
  <span class='kw'>end</span></pre>
981
701
  </td>
982
702
  </tr>
@@ -1009,27 +729,17 @@
1009
729
  <pre class="lines">
1010
730
 
1011
731
 
1012
- 30
1013
- 31
1014
732
  32
1015
733
  33
1016
734
  34
1017
- 35
1018
- 36
1019
- 37
1020
- 38</pre>
735
+ 35</pre>
1021
736
  </td>
1022
737
  <td>
1023
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 30</span>
738
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/syntax.rb', line 32</span>
1024
739
 
1025
740
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize_dup'>initialize_dup</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
1026
- <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span>
1027
- <span class='ivar'>@elements</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1028
- <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</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_e'>e</span><span class='op'>|</span>
1029
- <span class='ivar'>@elements</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
1030
- <span class='kw'>end</span>
1031
- <span class='kw'>end</span>
1032
- <span class='kw'>super</span>
741
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
742
+ <span class='ivar'>@parameters</span> <span class='op'>=</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_parameters'>parameters</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'>:dup</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_parameters'>parameters</span>
1033
743
  <span class='kw'>end</span></pre>
1034
744
  </td>
1035
745
  </tr>
@@ -1041,9 +751,9 @@
1041
751
  </div>
1042
752
 
1043
753
  <div id="footer">
1044
- Generated on Fri Feb 7 18:54:40 2020 by
754
+ Generated on Sun Aug 2 18:35:10 2020 by
1045
755
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1046
- 0.9.20 (ruby-2.6.5).
756
+ 0.9.25 (ruby-2.6.5).
1047
757
  </div>
1048
758
 
1049
759
  </div>