fig 1.22.0 → 1.22.1.beta.1
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.
- checksums.yaml +4 -4
- data/Changes +13 -0
- data/lib/fig.rb +1 -1
- data/lib/fig/command/options.rb +21 -7
- data/lib/fig/grammar/base.rb +19 -14
- data/lib/fig/grammar/v0.rb +100 -78
- data/lib/fig/grammar/v1.rb +7 -2
- data/lib/fig/grammar/v1_base.rb +147 -113
- data/lib/fig/grammar/v2.rb +49 -33
- data/lib/fig/grammar/version.rb +9 -8
- data/lib/fig/grammar/version_identification.rb +2 -2
- data/lib/fig/protocol/netrc_enabled.rb +18 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41b856ed8d7e652bfe33d35e21562d23796d4540
|
4
|
+
data.tar.gz: 10cd044b454eea222d662d29c15a7439d2438d95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54def14e8dbaac94e63a79a6bc65fab9104f078e21387812f75401910cfa9382463a4c8cd20a6e34b40b0abfe9c97a5edba7c8c35e322f8f538a5793c134654e
|
7
|
+
data.tar.gz: c05690e45a5f453fae00f4bb92cabe4be1a909c0a4f5b632afb84c869efbfc45596dd7ab9e68d3f56a4e1bcb2b0c5be23bd0fba38abfb003b88721760c8376c8
|
data/Changes
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
v1.22.1.beta.1 - 2014/12/17
|
2
|
+
|
3
|
+
Bug fixes:
|
4
|
+
|
5
|
+
- Net::SSH::Prompt turns off HighLine's EOF detection. We turn it back on
|
6
|
+
because, otherwise, prompting for credentials barfs when there's no input
|
7
|
+
available from STDIN, e.g. on a continuous integration server.
|
8
|
+
|
9
|
+
Miscellaneous:
|
10
|
+
|
11
|
+
- More tweaks of --options and --help-long output.
|
12
|
+
- Upgraded dependencies.
|
13
|
+
|
1
14
|
v1.22.0 - 2014/11/20
|
2
15
|
|
3
16
|
New features:
|
data/lib/fig.rb
CHANGED
data/lib/fig/command/options.rb
CHANGED
@@ -370,7 +370,7 @@ Running commands:
|
|
370
370
|
|
371
371
|
@parser.on(
|
372
372
|
'--run-command-statement',
|
373
|
-
'run the command in
|
373
|
+
'run the command in package definition file (i.e. with no package descriptor specified)'
|
374
374
|
) do
|
375
375
|
set_base_action(Fig::Command::Action::RunCommandStatement)
|
376
376
|
end
|
@@ -561,7 +561,7 @@ Running commands:
|
|
561
561
|
|
562
562
|
def set_up_listings()
|
563
563
|
@parser.separator ''
|
564
|
-
@parser.separator '
|
564
|
+
@parser.separator 'Querying repository contents:'
|
565
565
|
|
566
566
|
option_mapping = {
|
567
567
|
:local_packages => [
|
@@ -569,6 +569,25 @@ Running commands:
|
|
569
569
|
Fig::Command::Action::ListLocal
|
570
570
|
],
|
571
571
|
|
572
|
+
:remote_packages => [
|
573
|
+
['--list-remote', 'list packages in remote repository'],
|
574
|
+
Fig::Command::Action::ListRemote
|
575
|
+
],
|
576
|
+
}
|
577
|
+
|
578
|
+
option_mapping.each_pair do
|
579
|
+
| type, specification_action_class |
|
580
|
+
|
581
|
+
specification, action_class = *specification_action_class
|
582
|
+
@parser.on(*specification) do
|
583
|
+
set_base_action(action_class)
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
@parser.separator ''
|
588
|
+
@parser.separator 'Querying package data:'
|
589
|
+
|
590
|
+
option_mapping = {
|
572
591
|
:configs => [
|
573
592
|
['--list-configs', 'list configurations'],
|
574
593
|
Fig::Command::Action::ListConfigs
|
@@ -586,11 +605,6 @@ Running commands:
|
|
586
605
|
],
|
587
606
|
Fig::Command::Action::ListVariables
|
588
607
|
],
|
589
|
-
|
590
|
-
:remote_packages => [
|
591
|
-
['--list-remote', 'list packages in remote repo'],
|
592
|
-
Fig::Command::Action::ListRemote
|
593
|
-
],
|
594
608
|
}
|
595
609
|
|
596
610
|
option_mapping.each_pair do
|
data/lib/fig/grammar/base.rb
CHANGED
@@ -19,7 +19,7 @@ module Fig
|
|
19
19
|
if node_cache[:ws].has_key?(index)
|
20
20
|
cached = node_cache[:ws][index]
|
21
21
|
if cached
|
22
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
22
|
+
node_cache[:ws][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
23
23
|
@index = cached.interval.end
|
24
24
|
end
|
25
25
|
return cached
|
@@ -27,10 +27,11 @@ module Fig
|
|
27
27
|
|
28
28
|
s0, i0 = [], index
|
29
29
|
loop do
|
30
|
-
if has_terminal?('\
|
30
|
+
if has_terminal?(@regexps[gr = '\A[ \\n\\r\\t]'] ||= Regexp.new(gr), :regexp, index)
|
31
31
|
r1 = true
|
32
32
|
@index += 1
|
33
33
|
else
|
34
|
+
terminal_parse_failure('[ \\n\\r\\t]')
|
34
35
|
r1 = nil
|
35
36
|
end
|
36
37
|
if r1
|
@@ -56,7 +57,7 @@ module Fig
|
|
56
57
|
if node_cache[:optional_ws].has_key?(index)
|
57
58
|
cached = node_cache[:optional_ws][index]
|
58
59
|
if cached
|
59
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
60
|
+
node_cache[:optional_ws][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
60
61
|
@index = cached.interval.end
|
61
62
|
end
|
62
63
|
return cached
|
@@ -64,10 +65,11 @@ module Fig
|
|
64
65
|
|
65
66
|
s0, i0 = [], index
|
66
67
|
loop do
|
67
|
-
if has_terminal?('\
|
68
|
+
if has_terminal?(@regexps[gr = '\A[ \\n\\r\\t]'] ||= Regexp.new(gr), :regexp, index)
|
68
69
|
r1 = true
|
69
70
|
@index += 1
|
70
71
|
else
|
72
|
+
terminal_parse_failure('[ \\n\\r\\t]')
|
71
73
|
r1 = nil
|
72
74
|
end
|
73
75
|
if r1
|
@@ -91,16 +93,16 @@ module Fig
|
|
91
93
|
if node_cache[:comment].has_key?(index)
|
92
94
|
cached = node_cache[:comment][index]
|
93
95
|
if cached
|
94
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
96
|
+
node_cache[:comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
95
97
|
@index = cached.interval.end
|
96
98
|
end
|
97
99
|
return cached
|
98
100
|
end
|
99
101
|
|
100
102
|
i0, s0 = index, []
|
101
|
-
if has_terminal?('#', false, index)
|
102
|
-
r1 =
|
103
|
-
@index +=
|
103
|
+
if (match_len = has_terminal?('#', false, index))
|
104
|
+
r1 = true
|
105
|
+
@index += match_len
|
104
106
|
else
|
105
107
|
terminal_parse_failure('#')
|
106
108
|
r1 = nil
|
@@ -109,10 +111,11 @@ module Fig
|
|
109
111
|
if r1
|
110
112
|
s2, i2 = [], index
|
111
113
|
loop do
|
112
|
-
if has_terminal?('\
|
114
|
+
if has_terminal?(@regexps[gr = '\A[^\\n]'] ||= Regexp.new(gr), :regexp, index)
|
113
115
|
r3 = true
|
114
116
|
@index += 1
|
115
117
|
else
|
118
|
+
terminal_parse_failure('[^\\n]')
|
116
119
|
r3 = nil
|
117
120
|
end
|
118
121
|
if r3
|
@@ -124,9 +127,9 @@ module Fig
|
|
124
127
|
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
125
128
|
s0 << r2
|
126
129
|
if r2
|
127
|
-
if has_terminal?("\n", false, index)
|
128
|
-
r4 =
|
129
|
-
@index +=
|
130
|
+
if (match_len = has_terminal?("\n", false, index))
|
131
|
+
r4 = true
|
132
|
+
@index += match_len
|
130
133
|
else
|
131
134
|
terminal_parse_failure("\n")
|
132
135
|
r4 = nil
|
@@ -152,7 +155,7 @@ module Fig
|
|
152
155
|
if node_cache[:ws_or_comment].has_key?(index)
|
153
156
|
cached = node_cache[:ws_or_comment][index]
|
154
157
|
if cached
|
155
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
158
|
+
node_cache[:ws_or_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
156
159
|
@index = cached.interval.end
|
157
160
|
end
|
158
161
|
return cached
|
@@ -161,10 +164,12 @@ module Fig
|
|
161
164
|
i0 = index
|
162
165
|
r1 = _nt_ws
|
163
166
|
if r1
|
167
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
164
168
|
r0 = r1
|
165
169
|
else
|
166
170
|
r2 = _nt_comment
|
167
171
|
if r2
|
172
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
168
173
|
r0 = r2
|
169
174
|
else
|
170
175
|
@index = i0
|
@@ -182,7 +187,7 @@ module Fig
|
|
182
187
|
if node_cache[:optional_ws_or_comment].has_key?(index)
|
183
188
|
cached = node_cache[:optional_ws_or_comment][index]
|
184
189
|
if cached
|
185
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
190
|
+
node_cache[:optional_ws_or_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
186
191
|
@index = cached.interval.end
|
187
192
|
end
|
188
193
|
return cached
|
data/lib/fig/grammar/v0.rb
CHANGED
@@ -63,7 +63,7 @@ module Fig
|
|
63
63
|
if node_cache[:package].has_key?(index)
|
64
64
|
cached = node_cache[:package][index]
|
65
65
|
if cached
|
66
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
66
|
+
node_cache[:package][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
67
67
|
@index = cached.interval.end
|
68
68
|
end
|
69
69
|
return cached
|
@@ -130,7 +130,7 @@ module Fig
|
|
130
130
|
if node_cache[:package_statement].has_key?(index)
|
131
131
|
cached = node_cache[:package_statement][index]
|
132
132
|
if cached
|
133
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
133
|
+
node_cache[:package_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
134
134
|
@index = cached.interval.end
|
135
135
|
end
|
136
136
|
return cached
|
@@ -139,18 +139,22 @@ module Fig
|
|
139
139
|
i0 = index
|
140
140
|
r1 = _nt_archive
|
141
141
|
if r1
|
142
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
142
143
|
r0 = r1
|
143
144
|
else
|
144
145
|
r2 = _nt_resource
|
145
146
|
if r2
|
147
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
146
148
|
r0 = r2
|
147
149
|
else
|
148
150
|
r3 = _nt_retrieve
|
149
151
|
if r3
|
152
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
150
153
|
r0 = r3
|
151
154
|
else
|
152
155
|
r4 = _nt_config
|
153
156
|
if r4
|
157
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
154
158
|
r0 = r4
|
155
159
|
else
|
156
160
|
@index = i0
|
@@ -188,16 +192,16 @@ module Fig
|
|
188
192
|
if node_cache[:archive].has_key?(index)
|
189
193
|
cached = node_cache[:archive][index]
|
190
194
|
if cached
|
191
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
195
|
+
node_cache[:archive][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
192
196
|
@index = cached.interval.end
|
193
197
|
end
|
194
198
|
return cached
|
195
199
|
end
|
196
200
|
|
197
201
|
i0, s0 = index, []
|
198
|
-
if has_terminal?('archive', false, index)
|
199
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
200
|
-
@index +=
|
202
|
+
if (match_len = has_terminal?('archive', false, index))
|
203
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
204
|
+
@index += match_len
|
201
205
|
else
|
202
206
|
terminal_parse_failure('archive')
|
203
207
|
r1 = nil
|
@@ -262,16 +266,16 @@ module Fig
|
|
262
266
|
if node_cache[:resource].has_key?(index)
|
263
267
|
cached = node_cache[:resource][index]
|
264
268
|
if cached
|
265
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
269
|
+
node_cache[:resource][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
266
270
|
@index = cached.interval.end
|
267
271
|
end
|
268
272
|
return cached
|
269
273
|
end
|
270
274
|
|
271
275
|
i0, s0 = index, []
|
272
|
-
if has_terminal?('resource', false, index)
|
273
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
274
|
-
@index +=
|
276
|
+
if (match_len = has_terminal?('resource', false, index))
|
277
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
278
|
+
@index += match_len
|
275
279
|
else
|
276
280
|
terminal_parse_failure('resource')
|
277
281
|
r1 = nil
|
@@ -341,16 +345,16 @@ module Fig
|
|
341
345
|
if node_cache[:retrieve].has_key?(index)
|
342
346
|
cached = node_cache[:retrieve][index]
|
343
347
|
if cached
|
344
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
348
|
+
node_cache[:retrieve][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
345
349
|
@index = cached.interval.end
|
346
350
|
end
|
347
351
|
return cached
|
348
352
|
end
|
349
353
|
|
350
354
|
i0, s0 = index, []
|
351
|
-
if has_terminal?('retrieve', false, index)
|
352
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
353
|
-
@index +=
|
355
|
+
if (match_len = has_terminal?('retrieve', false, index))
|
356
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
357
|
+
@index += match_len
|
354
358
|
else
|
355
359
|
terminal_parse_failure('retrieve')
|
356
360
|
r1 = nil
|
@@ -377,9 +381,9 @@ module Fig
|
|
377
381
|
r4 = _nt_environment_variable_name
|
378
382
|
s0 << r4
|
379
383
|
if r4
|
380
|
-
if has_terminal?('->', false, index)
|
381
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index +
|
382
|
-
@index +=
|
384
|
+
if (match_len = has_terminal?('->', false, index))
|
385
|
+
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
386
|
+
@index += match_len
|
383
387
|
else
|
384
388
|
terminal_parse_failure('->')
|
385
389
|
r5 = nil
|
@@ -452,16 +456,16 @@ module Fig
|
|
452
456
|
if node_cache[:config].has_key?(index)
|
453
457
|
cached = node_cache[:config][index]
|
454
458
|
if cached
|
455
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
459
|
+
node_cache[:config][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
456
460
|
@index = cached.interval.end
|
457
461
|
end
|
458
462
|
return cached
|
459
463
|
end
|
460
464
|
|
461
465
|
i0, s0 = index, []
|
462
|
-
if has_terminal?('config', false, index)
|
463
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
464
|
-
@index +=
|
466
|
+
if (match_len = has_terminal?('config', false, index))
|
467
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
468
|
+
@index += match_len
|
465
469
|
else
|
466
470
|
terminal_parse_failure('config')
|
467
471
|
r1 = nil
|
@@ -517,9 +521,9 @@ module Fig
|
|
517
521
|
r7 = instantiate_node(SyntaxNode,input, i7...index, s7)
|
518
522
|
s0 << r7
|
519
523
|
if r7
|
520
|
-
if has_terminal?('end', false, index)
|
521
|
-
r9 = instantiate_node(SyntaxNode,input, index...(index +
|
522
|
-
@index +=
|
524
|
+
if (match_len = has_terminal?('end', false, index))
|
525
|
+
r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
526
|
+
@index += match_len
|
523
527
|
else
|
524
528
|
terminal_parse_failure('end')
|
525
529
|
r9 = nil
|
@@ -567,7 +571,7 @@ module Fig
|
|
567
571
|
if node_cache[:config_statement].has_key?(index)
|
568
572
|
cached = node_cache[:config_statement][index]
|
569
573
|
if cached
|
570
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
574
|
+
node_cache[:config_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
571
575
|
@index = cached.interval.end
|
572
576
|
end
|
573
577
|
return cached
|
@@ -576,22 +580,27 @@ module Fig
|
|
576
580
|
i0 = index
|
577
581
|
r1 = _nt_override
|
578
582
|
if r1
|
583
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
579
584
|
r0 = r1
|
580
585
|
else
|
581
586
|
r2 = _nt_include
|
582
587
|
if r2
|
588
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
583
589
|
r0 = r2
|
584
590
|
else
|
585
591
|
r3 = _nt_command
|
586
592
|
if r3
|
593
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
587
594
|
r0 = r3
|
588
595
|
else
|
589
596
|
r4 = _nt_path
|
590
597
|
if r4
|
598
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
591
599
|
r0 = r4
|
592
600
|
else
|
593
601
|
r5 = _nt_set
|
594
602
|
if r5
|
603
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
595
604
|
r0 = r5
|
596
605
|
else
|
597
606
|
@index = i0
|
@@ -631,16 +640,16 @@ module Fig
|
|
631
640
|
if node_cache[:include].has_key?(index)
|
632
641
|
cached = node_cache[:include][index]
|
633
642
|
if cached
|
634
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
643
|
+
node_cache[:include][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
635
644
|
@index = cached.interval.end
|
636
645
|
end
|
637
646
|
return cached
|
638
647
|
end
|
639
648
|
|
640
649
|
i0, s0 = index, []
|
641
|
-
if has_terminal?('include', false, index)
|
642
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
643
|
-
@index +=
|
650
|
+
if (match_len = has_terminal?('include', false, index))
|
651
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
652
|
+
@index += match_len
|
644
653
|
else
|
645
654
|
terminal_parse_failure('include')
|
646
655
|
r1 = nil
|
@@ -724,16 +733,16 @@ module Fig
|
|
724
733
|
if node_cache[:override].has_key?(index)
|
725
734
|
cached = node_cache[:override][index]
|
726
735
|
if cached
|
727
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
736
|
+
node_cache[:override][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
728
737
|
@index = cached.interval.end
|
729
738
|
end
|
730
739
|
return cached
|
731
740
|
end
|
732
741
|
|
733
742
|
i0, s0 = index, []
|
734
|
-
if has_terminal?('override', false, index)
|
735
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
736
|
-
@index +=
|
743
|
+
if (match_len = has_terminal?('override', false, index))
|
744
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
745
|
+
@index += match_len
|
737
746
|
else
|
738
747
|
terminal_parse_failure('override')
|
739
748
|
r1 = nil
|
@@ -817,16 +826,16 @@ module Fig
|
|
817
826
|
if node_cache[:set].has_key?(index)
|
818
827
|
cached = node_cache[:set][index]
|
819
828
|
if cached
|
820
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
829
|
+
node_cache[:set][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
821
830
|
@index = cached.interval.end
|
822
831
|
end
|
823
832
|
return cached
|
824
833
|
end
|
825
834
|
|
826
835
|
i0, s0 = index, []
|
827
|
-
if has_terminal?('set', false, index)
|
828
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
829
|
-
@index +=
|
836
|
+
if (match_len = has_terminal?('set', false, index))
|
837
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
838
|
+
@index += match_len
|
830
839
|
else
|
831
840
|
terminal_parse_failure('set')
|
832
841
|
r1 = nil
|
@@ -910,7 +919,7 @@ module Fig
|
|
910
919
|
if node_cache[:path].has_key?(index)
|
911
920
|
cached = node_cache[:path][index]
|
912
921
|
if cached
|
913
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
922
|
+
node_cache[:path][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
914
923
|
@index = cached.interval.end
|
915
924
|
end
|
916
925
|
return cached
|
@@ -918,34 +927,37 @@ module Fig
|
|
918
927
|
|
919
928
|
i0, s0 = index, []
|
920
929
|
i1 = index
|
921
|
-
if has_terminal?('add', false, index)
|
922
|
-
r2 = instantiate_node(SyntaxNode,input, index...(index +
|
923
|
-
@index +=
|
930
|
+
if (match_len = has_terminal?('add', false, index))
|
931
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
932
|
+
@index += match_len
|
924
933
|
else
|
925
934
|
terminal_parse_failure('add')
|
926
935
|
r2 = nil
|
927
936
|
end
|
928
937
|
if r2
|
938
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
929
939
|
r1 = r2
|
930
940
|
else
|
931
|
-
if has_terminal?('append', false, index)
|
932
|
-
r3 = instantiate_node(SyntaxNode,input, index...(index +
|
933
|
-
@index +=
|
941
|
+
if (match_len = has_terminal?('append', false, index))
|
942
|
+
r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
943
|
+
@index += match_len
|
934
944
|
else
|
935
945
|
terminal_parse_failure('append')
|
936
946
|
r3 = nil
|
937
947
|
end
|
938
948
|
if r3
|
949
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
939
950
|
r1 = r3
|
940
951
|
else
|
941
|
-
if has_terminal?('path', false, index)
|
942
|
-
r4 = instantiate_node(SyntaxNode,input, index...(index +
|
943
|
-
@index +=
|
952
|
+
if (match_len = has_terminal?('path', false, index))
|
953
|
+
r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
954
|
+
@index += match_len
|
944
955
|
else
|
945
956
|
terminal_parse_failure('path')
|
946
957
|
r4 = nil
|
947
958
|
end
|
948
959
|
if r4
|
960
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
949
961
|
r1 = r4
|
950
962
|
else
|
951
963
|
@index = i1
|
@@ -1032,16 +1044,16 @@ module Fig
|
|
1032
1044
|
if node_cache[:command].has_key?(index)
|
1033
1045
|
cached = node_cache[:command][index]
|
1034
1046
|
if cached
|
1035
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1047
|
+
node_cache[:command][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1036
1048
|
@index = cached.interval.end
|
1037
1049
|
end
|
1038
1050
|
return cached
|
1039
1051
|
end
|
1040
1052
|
|
1041
1053
|
i0, s0 = index, []
|
1042
|
-
if has_terminal?('command', false, index)
|
1043
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
1044
|
-
@index +=
|
1054
|
+
if (match_len = has_terminal?('command', false, index))
|
1055
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1056
|
+
@index += match_len
|
1045
1057
|
else
|
1046
1058
|
terminal_parse_failure('command')
|
1047
1059
|
r1 = nil
|
@@ -1109,16 +1121,16 @@ module Fig
|
|
1109
1121
|
if node_cache[:command_line].has_key?(index)
|
1110
1122
|
cached = node_cache[:command_line][index]
|
1111
1123
|
if cached
|
1112
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1124
|
+
node_cache[:command_line][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1113
1125
|
@index = cached.interval.end
|
1114
1126
|
end
|
1115
1127
|
return cached
|
1116
1128
|
end
|
1117
1129
|
|
1118
1130
|
i0, s0 = index, []
|
1119
|
-
if has_terminal?('"', false, index)
|
1120
|
-
r1 =
|
1121
|
-
@index +=
|
1131
|
+
if (match_len = has_terminal?('"', false, index))
|
1132
|
+
r1 = true
|
1133
|
+
@index += match_len
|
1122
1134
|
else
|
1123
1135
|
terminal_parse_failure('"')
|
1124
1136
|
r1 = nil
|
@@ -1127,10 +1139,11 @@ module Fig
|
|
1127
1139
|
if r1
|
1128
1140
|
s2, i2 = [], index
|
1129
1141
|
loop do
|
1130
|
-
if has_terminal?('\
|
1142
|
+
if has_terminal?(@regexps[gr = '\A[^"]'] ||= Regexp.new(gr), :regexp, index)
|
1131
1143
|
r3 = true
|
1132
1144
|
@index += 1
|
1133
1145
|
else
|
1146
|
+
terminal_parse_failure('[^"]')
|
1134
1147
|
r3 = nil
|
1135
1148
|
end
|
1136
1149
|
if r3
|
@@ -1142,9 +1155,9 @@ module Fig
|
|
1142
1155
|
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
1143
1156
|
s0 << r2
|
1144
1157
|
if r2
|
1145
|
-
if has_terminal?('"', false, index)
|
1146
|
-
r4 =
|
1147
|
-
@index +=
|
1158
|
+
if (match_len = has_terminal?('"', false, index))
|
1159
|
+
r4 = true
|
1160
|
+
@index += match_len
|
1148
1161
|
else
|
1149
1162
|
terminal_parse_failure('"')
|
1150
1163
|
r4 = nil
|
@@ -1170,7 +1183,7 @@ module Fig
|
|
1170
1183
|
if node_cache[:descriptor_string].has_key?(index)
|
1171
1184
|
cached = node_cache[:descriptor_string][index]
|
1172
1185
|
if cached
|
1173
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1186
|
+
node_cache[:descriptor_string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1174
1187
|
@index = cached.interval.end
|
1175
1188
|
end
|
1176
1189
|
return cached
|
@@ -1178,10 +1191,11 @@ module Fig
|
|
1178
1191
|
|
1179
1192
|
s0, i0 = [], index
|
1180
1193
|
loop do
|
1181
|
-
if has_terminal?('\
|
1194
|
+
if has_terminal?(@regexps[gr = '\A[\\S]'] ||= Regexp.new(gr), :regexp, index)
|
1182
1195
|
r1 = true
|
1183
1196
|
@index += 1
|
1184
1197
|
else
|
1198
|
+
terminal_parse_failure('[\\S]')
|
1185
1199
|
r1 = nil
|
1186
1200
|
end
|
1187
1201
|
if r1
|
@@ -1207,7 +1221,7 @@ module Fig
|
|
1207
1221
|
if node_cache[:config_name].has_key?(index)
|
1208
1222
|
cached = node_cache[:config_name][index]
|
1209
1223
|
if cached
|
1210
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1224
|
+
node_cache[:config_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1211
1225
|
@index = cached.interval.end
|
1212
1226
|
end
|
1213
1227
|
return cached
|
@@ -1215,10 +1229,11 @@ module Fig
|
|
1215
1229
|
|
1216
1230
|
s0, i0 = [], index
|
1217
1231
|
loop do
|
1218
|
-
if has_terminal?('\
|
1232
|
+
if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_.-]'] ||= Regexp.new(gr), :regexp, index)
|
1219
1233
|
r1 = true
|
1220
1234
|
@index += 1
|
1221
1235
|
else
|
1236
|
+
terminal_parse_failure('[a-zA-Z0-9_.-]')
|
1222
1237
|
r1 = nil
|
1223
1238
|
end
|
1224
1239
|
if r1
|
@@ -1244,7 +1259,7 @@ module Fig
|
|
1244
1259
|
if node_cache[:environment_variable_name].has_key?(index)
|
1245
1260
|
cached = node_cache[:environment_variable_name][index]
|
1246
1261
|
if cached
|
1247
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1262
|
+
node_cache[:environment_variable_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1248
1263
|
@index = cached.interval.end
|
1249
1264
|
end
|
1250
1265
|
return cached
|
@@ -1252,10 +1267,11 @@ module Fig
|
|
1252
1267
|
|
1253
1268
|
s0, i0 = [], index
|
1254
1269
|
loop do
|
1255
|
-
if has_terminal?('\
|
1270
|
+
if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index)
|
1256
1271
|
r1 = true
|
1257
1272
|
@index += 1
|
1258
1273
|
else
|
1274
|
+
terminal_parse_failure('[a-zA-Z0-9_]')
|
1259
1275
|
r1 = nil
|
1260
1276
|
end
|
1261
1277
|
if r1
|
@@ -1281,7 +1297,7 @@ module Fig
|
|
1281
1297
|
if node_cache[:environment_variable_name_value].has_key?(index)
|
1282
1298
|
cached = node_cache[:environment_variable_name_value][index]
|
1283
1299
|
if cached
|
1284
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1300
|
+
node_cache[:environment_variable_name_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1285
1301
|
@index = cached.interval.end
|
1286
1302
|
end
|
1287
1303
|
return cached
|
@@ -1289,10 +1305,11 @@ module Fig
|
|
1289
1305
|
|
1290
1306
|
s0, i0 = [], index
|
1291
1307
|
loop do
|
1292
|
-
if has_terminal?('\
|
1308
|
+
if has_terminal?(@regexps[gr = '\A[\\S]'] ||= Regexp.new(gr), :regexp, index)
|
1293
1309
|
r1 = true
|
1294
1310
|
@index += 1
|
1295
1311
|
else
|
1312
|
+
terminal_parse_failure('[\\S]')
|
1296
1313
|
r1 = nil
|
1297
1314
|
end
|
1298
1315
|
if r1
|
@@ -1338,7 +1355,7 @@ module Fig
|
|
1338
1355
|
if node_cache[:asset_location].has_key?(index)
|
1339
1356
|
cached = node_cache[:asset_location][index]
|
1340
1357
|
if cached
|
1341
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1358
|
+
node_cache[:asset_location][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1342
1359
|
@index = cached.interval.end
|
1343
1360
|
end
|
1344
1361
|
return cached
|
@@ -1348,10 +1365,11 @@ module Fig
|
|
1348
1365
|
i1, s1 = index, []
|
1349
1366
|
s2, i2 = [], index
|
1350
1367
|
loop do
|
1351
|
-
if has_terminal?('\
|
1368
|
+
if has_terminal?(@regexps[gr = '\A[^@\'"<>|\\s]'] ||= Regexp.new(gr), :regexp, index)
|
1352
1369
|
r3 = true
|
1353
1370
|
@index += 1
|
1354
1371
|
else
|
1372
|
+
terminal_parse_failure('[^@\'"<>|\\s]')
|
1355
1373
|
r3 = nil
|
1356
1374
|
end
|
1357
1375
|
if r3
|
@@ -1379,12 +1397,13 @@ module Fig
|
|
1379
1397
|
r1 = nil
|
1380
1398
|
end
|
1381
1399
|
if r1
|
1400
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
1382
1401
|
r0 = r1
|
1383
1402
|
else
|
1384
1403
|
i5, s5 = index, []
|
1385
|
-
if has_terminal?('"', false, index)
|
1386
|
-
r6 =
|
1387
|
-
@index +=
|
1404
|
+
if (match_len = has_terminal?('"', false, index))
|
1405
|
+
r6 = true
|
1406
|
+
@index += match_len
|
1388
1407
|
else
|
1389
1408
|
terminal_parse_failure('"')
|
1390
1409
|
r6 = nil
|
@@ -1393,10 +1412,11 @@ module Fig
|
|
1393
1412
|
if r6
|
1394
1413
|
s7, i7 = [], index
|
1395
1414
|
loop do
|
1396
|
-
if has_terminal?('\
|
1415
|
+
if has_terminal?(@regexps[gr = '\A[^@\'"<>|*?\\[\\]{}\\s]'] ||= Regexp.new(gr), :regexp, index)
|
1397
1416
|
r8 = true
|
1398
1417
|
@index += 1
|
1399
1418
|
else
|
1419
|
+
terminal_parse_failure('[^@\'"<>|*?\\[\\]{}\\s]')
|
1400
1420
|
r8 = nil
|
1401
1421
|
end
|
1402
1422
|
if r8
|
@@ -1413,9 +1433,9 @@ module Fig
|
|
1413
1433
|
end
|
1414
1434
|
s5 << r7
|
1415
1435
|
if r7
|
1416
|
-
if has_terminal?('"', false, index)
|
1417
|
-
r9 =
|
1418
|
-
@index +=
|
1436
|
+
if (match_len = has_terminal?('"', false, index))
|
1437
|
+
r9 = true
|
1438
|
+
@index += match_len
|
1419
1439
|
else
|
1420
1440
|
terminal_parse_failure('"')
|
1421
1441
|
r9 = nil
|
@@ -1435,6 +1455,7 @@ module Fig
|
|
1435
1455
|
r5 = nil
|
1436
1456
|
end
|
1437
1457
|
if r5
|
1458
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
1438
1459
|
r0 = r5
|
1439
1460
|
else
|
1440
1461
|
@index = i0
|
@@ -1452,7 +1473,7 @@ module Fig
|
|
1452
1473
|
if node_cache[:retrieve_path].has_key?(index)
|
1453
1474
|
cached = node_cache[:retrieve_path][index]
|
1454
1475
|
if cached
|
1455
|
-
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1476
|
+
node_cache[:retrieve_path][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1456
1477
|
@index = cached.interval.end
|
1457
1478
|
end
|
1458
1479
|
return cached
|
@@ -1460,10 +1481,11 @@ module Fig
|
|
1460
1481
|
|
1461
1482
|
s0, i0 = [], index
|
1462
1483
|
loop do
|
1463
|
-
if has_terminal?('\
|
1484
|
+
if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_/.\\[\\]-]'] ||= Regexp.new(gr), :regexp, index)
|
1464
1485
|
r1 = true
|
1465
1486
|
@index += 1
|
1466
1487
|
else
|
1488
|
+
terminal_parse_failure('[a-zA-Z0-9_/.\\[\\]-]')
|
1467
1489
|
r1 = nil
|
1468
1490
|
end
|
1469
1491
|
if r1
|