fortio-namelist 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NOTE.md +8 -4
- data/README.md +58 -43
- data/fortio-namelist.gemspec +2 -1
- data/lib/fortio-namelist/fortran_namelist.rb +3 -3
- data/lib/fortio-namelist/fortran_namelist.tab.rb +157 -144
- data/lib/fortio-namelist/fortran_namelist.y +22 -16
- data/spec/array_spec.rb +36 -36
- data/spec/empty_spec.rb +9 -9
- data/spec/identifier_spec.rb +15 -15
- data/spec/scalar_spec.rb +70 -70
- data/spec/structure_spec.rb +70 -46
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed7fddd6ffa15b9134cf1818215a1bf4cd6b1086165df795faa955224277ef4a
|
4
|
+
data.tar.gz: 75f1f40c5dfb92e5e5877e2fe9ba696a7e8399810a7affea8371f72412957603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48cedc4dea6b54cc81c69a206e8a5fbe5253fb074e6f4b1b1956422bf96ae6ebcd971c1c71c526c7750b1f66a24c5cc0da89e79b8f1aacf54e81a4962a95a547
|
7
|
+
data.tar.gz: 90c9ddd5cc7044cd8326e0d4baa2896d9e186887d06a24b9fd20cc26076e56f6ed20e8b8352feffcec7a3f433a29a1ecd2e7eff4017ed161d0ce566d03f0a5d2
|
data/NOTE.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
NOTE
|
2
3
|
----
|
3
4
|
|
4
5
|
### グループ名のプレフィックス
|
@@ -20,10 +21,13 @@ name
|
|
20
21
|
### 論理型リテラル
|
21
22
|
|
22
23
|
v1 = .true. ! true
|
23
|
-
v2 = .
|
24
|
-
v3 =
|
24
|
+
v2 = .t ! true
|
25
|
+
v3 = .t_1 ! true
|
26
|
+
v4 = t ! true
|
25
27
|
|
26
28
|
v4 = .false. ! false
|
27
|
-
v5 = .
|
29
|
+
v5 = .f ! false
|
30
|
+
v5 = .f_1 ! false
|
28
31
|
v6 = f ! false
|
29
32
|
|
33
|
+
もちろん大文字でもよい。
|
data/README.md
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
fortio-namelist
|
2
3
|
===============
|
3
4
|
|
@@ -22,7 +23,14 @@ require "fortio-namelist"
|
|
22
23
|
```
|
23
24
|
|
24
25
|
Usage
|
25
|
-
|
26
|
+
------
|
27
|
+
|
28
|
+
### Useful methods
|
29
|
+
|
30
|
+
It is enough for the user to remember the following two methods.
|
31
|
+
|
32
|
+
FortIO::Namelist.read(input, group: nil)
|
33
|
+
FortIO::Namelist.dump(root, **format_options)
|
26
34
|
|
27
35
|
### Reading namelist format string
|
28
36
|
|
@@ -37,14 +45,14 @@ If the keyword argument `group` is omitted, all namelist groups included in `inp
|
|
37
45
|
The Hash object of the return value has a two-level structure as follows.
|
38
46
|
|
39
47
|
{
|
40
|
-
|
41
|
-
|
42
|
-
|
48
|
+
group1: {
|
49
|
+
var11: value11,
|
50
|
+
var12: value12,
|
43
51
|
: :
|
44
52
|
}
|
45
|
-
|
46
|
-
|
47
|
-
|
53
|
+
group2: {
|
54
|
+
var21: value21,
|
55
|
+
var22: value22,
|
48
56
|
: :
|
49
57
|
}
|
50
58
|
:
|
@@ -55,37 +63,42 @@ Group names and variable names are given as String objects. The value is Ruby's
|
|
55
63
|
|
56
64
|
Example:
|
57
65
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
66
|
+
```ruby
|
67
|
+
require 'fortio-namelist'
|
68
|
+
|
69
|
+
input = %{
|
70
|
+
&group1
|
71
|
+
var1 = 11
|
72
|
+
var2 = 12
|
73
|
+
/
|
74
|
+
&group2
|
75
|
+
var1 = 12
|
76
|
+
var2 = 22
|
77
|
+
/
|
78
|
+
&group3
|
79
|
+
var1 = 31
|
80
|
+
var2 = 32
|
81
|
+
/
|
82
|
+
}
|
83
|
+
|
84
|
+
### read all groups
|
85
|
+
root = FortIO::Namelist.read(input)
|
86
|
+
=> {:group1=>{:var1=>11, :var2=>12},
|
87
|
+
:group2=>{:var1=>12, :var2=>22},
|
88
|
+
:group3=>{:var1=>31, :var2=>32}}
|
89
|
+
|
90
|
+
|
91
|
+
### read only "group2"
|
92
|
+
root = FortIO::Namelist.read(input, group: "group2")
|
93
|
+
=> {:group2=>{:var1=>12, :var2=>22}}
|
94
|
+
|
95
|
+
|
96
|
+
### read only "group1" and "group3"
|
97
|
+
root = FortIO::Namelist.read(input, group: ["group1", "group3"])
|
98
|
+
=> {:group1=>{:var1=>11, :var2=>12},
|
99
|
+
:group3=>{:var1=>31, :var2=>32}}
|
74
100
|
|
75
|
-
|
76
|
-
root = FortIO::Namelist.read(input)
|
77
|
-
=> {"group1"=>{"var1"=>11, "var2"=>12},
|
78
|
-
"group2"=>{"var1"=>12, "var2"=>22},
|
79
|
-
"group3"=>{"var1"=>31, "var2"=>32}}
|
80
|
-
|
81
|
-
### read only "group2"
|
82
|
-
root = FortIO::Namelist.read(input, group: "group2")
|
83
|
-
=> {"group2"=>{"var1"=>12, "var2"=>22}}
|
84
|
-
|
85
|
-
### read only "group1" and "group3"
|
86
|
-
root = FortIO::Namelist.read(input, group: ["group1", "group3"])
|
87
|
-
=> {"group1"=>{"var1"=>11, "var2"=>12},
|
88
|
-
"group3"=>{"var1"=>31, "var2"=>32}}
|
101
|
+
```
|
89
102
|
|
90
103
|
### Generating namelist format string from Hash object with namelist structure
|
91
104
|
|
@@ -122,13 +135,15 @@ The argument `root` is given as a Hash object. The return value is a string in n
|
|
122
135
|
|
123
136
|
Example:
|
124
137
|
|
125
|
-
|
138
|
+
```ruby
|
139
|
+
require 'fortio-namelist'
|
140
|
+
|
141
|
+
root = {group1: {var1: 11, var2: 12},
|
142
|
+
group2: {var1: 12, var2: 22},
|
143
|
+
group3: {var1: 31, var2: 32}}
|
126
144
|
|
127
|
-
|
128
|
-
|
129
|
-
"group3"=>{"var1"=>31, "var2"=>32}}
|
130
|
-
|
131
|
-
puts FortIO::Namelist.dump(root)
|
145
|
+
puts FortIO::Namelist.dump(root)
|
146
|
+
```
|
132
147
|
|
133
148
|
This script print a namelist format string to stdout.
|
134
149
|
|
data/fortio-namelist.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Gem::Specification::new do |s|
|
2
|
-
version = "1.
|
2
|
+
version = "1.2.0"
|
3
3
|
files = Dir.glob("**/*") - [
|
4
4
|
Dir.glob("fortio-namelist-*.gem"),
|
5
5
|
Dir.glob("test/**/*"),
|
@@ -19,5 +19,6 @@ Gem::Specification::new do |s|
|
|
19
19
|
s.homepage = 'https://github.com/himotoyoshi/fortio-namelist'
|
20
20
|
s.files = files
|
21
21
|
s.required_ruby_version = ">= 2.4.0"
|
22
|
+
s.add_development_dependency "racc", "~> 1.5"
|
22
23
|
end
|
23
24
|
|
@@ -240,9 +240,9 @@ module FortIO::Namelist
|
|
240
240
|
reader = FortIO::Namelist::Reader.new(text)
|
241
241
|
case group
|
242
242
|
when Array
|
243
|
-
groups = group
|
244
|
-
when String
|
245
|
-
groups = [group]
|
243
|
+
groups = group.map{|s| s.intern }
|
244
|
+
when String, Symbol
|
245
|
+
groups = [group].map{|s| s.intern }
|
246
246
|
when nil
|
247
247
|
groups = reader.namelist.keys
|
248
248
|
else
|
@@ -146,12 +146,12 @@ module FortIO::Namelist
|
|
146
146
|
:STRINGLIKE,
|
147
147
|
@s[0]
|
148
148
|
]
|
149
|
-
when @s.scan(/\A\.t
|
149
|
+
when @s.scan(/\A\.t[\w\d_]*\.?/i) ### LOGICAL true
|
150
150
|
return [
|
151
151
|
:LOGICAL,
|
152
152
|
true,
|
153
153
|
]
|
154
|
-
when @s.scan(/\A\.f
|
154
|
+
when @s.scan(/\A\.f[\w\d_]*\.?/i) ### LOGICAL false
|
155
155
|
return [
|
156
156
|
:LOGICAL,
|
157
157
|
false,
|
@@ -214,7 +214,7 @@ module FortIO
|
|
214
214
|
module Namelist
|
215
215
|
class Parser < Racc::Parser
|
216
216
|
|
217
|
-
module_eval(<<'...end fortran_namelist.y/module_eval...', 'fortran_namelist.y',
|
217
|
+
module_eval(<<'...end fortran_namelist.y/module_eval...', 'fortran_namelist.y', 128)
|
218
218
|
|
219
219
|
def parse (str)
|
220
220
|
@scan = FortIO::Namelist::Scanner.new(str)
|
@@ -243,68 +243,70 @@ module_eval(<<'...end fortran_namelist.y/module_eval...', 'fortran_namelist.y',
|
|
243
243
|
##### State transition tables begin ###
|
244
244
|
|
245
245
|
racc_action_table = [
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
43,
|
252
|
-
|
253
|
-
|
254
|
-
|
246
|
+
48, 34, 65, 63, 47, 4, 5, 39, 14, 41,
|
247
|
+
62, 42, 43, 46, 49, 48, 66, 10, 13, 47,
|
248
|
+
15, 13, 39, 29, 41, 30, 42, 43, 46, 49,
|
249
|
+
47, 23, 24, 56, 55, 41, 47, 42, 43, 46,
|
250
|
+
13, 41, 47, 42, 43, 46, 26, 59, 24, 42,
|
251
|
+
43, 46, 4, 5, 21, 10, 13, 18, 4, 5,
|
252
|
+
21, 24, 59, 18, 13, 33, 46, 59, 30, 51,
|
253
|
+
7, 46, 4, 5, 13, 13, 57, 58, 61, 24,
|
254
|
+
24, 68, 70, 51, 74, 75, 51 ]
|
255
255
|
|
256
256
|
racc_action_check = [
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
257
|
+
28, 28, 57, 51, 28, 0, 0, 28, 6, 28,
|
258
|
+
51, 28, 28, 28, 28, 69, 57, 3, 3, 69,
|
259
|
+
7, 21, 69, 21, 69, 21, 69, 69, 69, 69,
|
260
|
+
36, 11, 11, 36, 36, 36, 55, 36, 36, 36,
|
261
|
+
10, 55, 58, 55, 55, 55, 19, 58, 22, 58,
|
262
|
+
58, 58, 9, 9, 9, 16, 16, 9, 25, 25,
|
263
|
+
25, 27, 47, 25, 61, 27, 47, 68, 61, 29,
|
264
|
+
1, 68, 1, 1, 30, 33, 37, 41, 50, 52,
|
265
|
+
53, 60, 62, 63, 70, 72, 74 ]
|
266
266
|
|
267
267
|
racc_action_pointer = [
|
268
|
-
|
269
|
-
|
270
|
-
nil,
|
271
|
-
nil, nil,
|
272
|
-
nil, nil, nil,
|
273
|
-
|
274
|
-
|
275
|
-
nil, nil ]
|
268
|
+
3, 70, nil, 12, nil, nil, 4, 20, nil, 50,
|
269
|
+
34, 26, nil, nil, nil, nil, 50, nil, nil, 42,
|
270
|
+
nil, 15, 42, nil, nil, 56, nil, 55, -4, 56,
|
271
|
+
68, nil, nil, 69, nil, nil, 22, 64, nil, nil,
|
272
|
+
nil, 63, nil, nil, nil, nil, nil, 49, nil, nil,
|
273
|
+
69, -9, 73, 74, nil, 28, nil, -2, 34, nil,
|
274
|
+
69, 58, 69, 70, nil, nil, nil, nil, 54, 11,
|
275
|
+
72, nil, 76, nil, 73, nil, nil ]
|
276
276
|
|
277
277
|
racc_action_default = [
|
278
|
-
-
|
279
|
-
-8,
|
280
|
-
-
|
281
|
-
-
|
282
|
-
-
|
283
|
-
-
|
284
|
-
-
|
285
|
-
-
|
278
|
+
-51, -51, -2, -15, -5, -6, -51, -51, -1, -51,
|
279
|
+
-8, -11, -12, -13, -7, 77, -15, -4, -16, -51,
|
280
|
+
-18, -51, -9, -10, -14, -51, -17, -51, -51, -51,
|
281
|
+
-23, -3, -19, -25, -20, -21, -27, -28, -29, -30,
|
282
|
+
-34, -40, -36, -37, -38, -39, -41, -51, -43, -44,
|
283
|
+
-51, -47, -24, -26, -31, -51, -33, -51, -51, -40,
|
284
|
+
-51, -51, -51, -51, -32, -45, -46, -35, -51, -51,
|
285
|
+
-48, -49, -51, -22, -51, -42, -50 ]
|
286
286
|
|
287
287
|
racc_goto_table = [
|
288
|
-
|
289
|
-
1,
|
290
|
-
|
291
|
-
nil, nil,
|
292
|
-
|
288
|
+
22, 50, 35, 60, 28, 17, 54, 2, 8, 9,
|
289
|
+
19, 27, 20, 1, 16, 67, nil, nil, nil, nil,
|
290
|
+
52, 31, 25, 53, 72, 64, 19, nil, 32, nil,
|
291
|
+
nil, nil, nil, nil, nil, 71, nil, nil, nil, nil,
|
292
|
+
nil, nil, nil, 73, 69, nil, 76, nil, nil, nil,
|
293
|
+
nil, 27 ]
|
293
294
|
|
294
295
|
racc_goto_check = [
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
nil, nil,
|
299
|
-
11, nil, nil,
|
296
|
+
8, 13, 12, 18, 11, 6, 16, 2, 2, 4,
|
297
|
+
7, 8, 10, 1, 5, 17, nil, nil, nil, nil,
|
298
|
+
8, 6, 4, 8, 18, 16, 7, nil, 10, nil,
|
299
|
+
nil, nil, nil, nil, nil, 13, nil, nil, nil, nil,
|
300
|
+
nil, nil, nil, 12, 11, nil, 13, nil, nil, nil,
|
301
|
+
nil, 8 ]
|
300
302
|
|
301
303
|
racc_goto_pointer = [
|
302
|
-
nil,
|
303
|
-
|
304
|
+
nil, 13, 7, nil, 6, 5, -4, 1, -10, nil,
|
305
|
+
3, -17, -26, -28, nil, nil, -30, -43, -44, nil ]
|
304
306
|
|
305
307
|
racc_goto_default = [
|
306
308
|
nil, nil, nil, 3, nil, nil, nil, 6, 11, 12,
|
307
|
-
nil, nil, nil,
|
309
|
+
nil, nil, nil, nil, 36, 37, 38, 40, 44, 45 ]
|
308
310
|
|
309
311
|
racc_reduce_table = [
|
310
312
|
0, 0, :racc_error,
|
@@ -316,47 +318,52 @@ racc_reduce_table = [
|
|
316
318
|
1, 27, :_reduce_none,
|
317
319
|
2, 23, :_reduce_7,
|
318
320
|
1, 24, :_reduce_none,
|
321
|
+
2, 24, :_reduce_none,
|
322
|
+
2, 24, :_reduce_none,
|
319
323
|
1, 24, :_reduce_none,
|
320
324
|
1, 24, :_reduce_none,
|
321
325
|
1, 28, :_reduce_none,
|
322
326
|
2, 28, :_reduce_none,
|
323
327
|
0, 29, :_reduce_none,
|
324
328
|
1, 26, :_reduce_none,
|
325
|
-
2, 26, :
|
326
|
-
1, 25, :
|
327
|
-
3, 25, :
|
328
|
-
3, 30, :
|
329
|
-
3, 30, :
|
330
|
-
|
331
|
-
6, 30, :_reduce_21,
|
329
|
+
2, 26, :_reduce_17,
|
330
|
+
1, 25, :_reduce_18,
|
331
|
+
3, 25, :_reduce_19,
|
332
|
+
3, 30, :_reduce_20,
|
333
|
+
3, 30, :_reduce_21,
|
334
|
+
6, 30, :_reduce_22,
|
332
335
|
1, 31, :_reduce_none,
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
1,
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
1, 36, :
|
344
|
-
|
336
|
+
2, 31, :_reduce_none,
|
337
|
+
2, 31, :_reduce_none,
|
338
|
+
3, 31, :_reduce_none,
|
339
|
+
1, 32, :_reduce_none,
|
340
|
+
1, 32, :_reduce_none,
|
341
|
+
1, 34, :_reduce_none,
|
342
|
+
1, 34, :_reduce_30,
|
343
|
+
2, 34, :_reduce_31,
|
344
|
+
3, 34, :_reduce_32,
|
345
|
+
2, 34, :_reduce_33,
|
346
|
+
1, 36, :_reduce_34,
|
347
|
+
3, 36, :_reduce_35,
|
345
348
|
1, 37, :_reduce_none,
|
346
349
|
1, 37, :_reduce_none,
|
347
|
-
|
348
|
-
1,
|
349
|
-
1,
|
350
|
-
|
351
|
-
|
352
|
-
1,
|
353
|
-
|
354
|
-
3,
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
350
|
+
1, 37, :_reduce_none,
|
351
|
+
1, 37, :_reduce_none,
|
352
|
+
1, 38, :_reduce_none,
|
353
|
+
1, 38, :_reduce_none,
|
354
|
+
5, 39, :_reduce_42,
|
355
|
+
1, 35, :_reduce_43,
|
356
|
+
1, 35, :_reduce_44,
|
357
|
+
3, 35, :_reduce_45,
|
358
|
+
3, 35, :_reduce_46,
|
359
|
+
1, 33, :_reduce_47,
|
360
|
+
3, 33, :_reduce_48,
|
361
|
+
3, 33, :_reduce_49,
|
362
|
+
5, 33, :_reduce_50 ]
|
363
|
+
|
364
|
+
racc_reduce_n = 51
|
365
|
+
|
366
|
+
racc_shift_n = 77
|
360
367
|
|
361
368
|
racc_token_table = {
|
362
369
|
false => 0,
|
@@ -367,9 +374,9 @@ racc_token_table = {
|
|
367
374
|
:COMMA => 5,
|
368
375
|
:NL => 6,
|
369
376
|
"/" => 7,
|
370
|
-
"
|
371
|
-
"
|
372
|
-
"
|
377
|
+
"(" => 8,
|
378
|
+
")" => 9,
|
379
|
+
"=" => 10,
|
373
380
|
:NIL => 11,
|
374
381
|
"," => 12,
|
375
382
|
:DIGITS => 13,
|
@@ -409,9 +416,9 @@ Racc_token_to_s_table = [
|
|
409
416
|
"COMMA",
|
410
417
|
"NL",
|
411
418
|
"\"/\"",
|
412
|
-
"\"=\"",
|
413
419
|
"\"(\"",
|
414
420
|
"\")\"",
|
421
|
+
"\"=\"",
|
415
422
|
"NIL",
|
416
423
|
"\",\"",
|
417
424
|
"DIGITS",
|
@@ -432,6 +439,7 @@ Racc_token_to_s_table = [
|
|
432
439
|
"nls",
|
433
440
|
"blank",
|
434
441
|
"vardef",
|
442
|
+
"equal",
|
435
443
|
"rvalues",
|
436
444
|
"array_spec",
|
437
445
|
"rlist",
|
@@ -471,7 +479,7 @@ module_eval(<<'.,.,', 'fortran_namelist.y', 26)
|
|
471
479
|
|
472
480
|
module_eval(<<'.,.,', 'fortran_namelist.y', 34)
|
473
481
|
def _reduce_7(val, _values, result)
|
474
|
-
result = val[1].downcase; @scan.in_namelist = val[1].downcase
|
482
|
+
result = val[1].downcase.intern; @scan.in_namelist = val[1].downcase.intern
|
475
483
|
result
|
476
484
|
end
|
477
485
|
.,.,
|
@@ -490,173 +498,178 @@ module_eval(<<'.,.,', 'fortran_namelist.y', 34)
|
|
490
498
|
|
491
499
|
# reduce 14 omitted
|
492
500
|
|
493
|
-
|
494
|
-
|
501
|
+
# reduce 15 omitted
|
502
|
+
|
503
|
+
# reduce 16 omitted
|
504
|
+
|
505
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 52)
|
506
|
+
def _reduce_17(val, _values, result)
|
495
507
|
raise Racc::ParseError, "\nparse error (&)" unless val[1] =~ /\Aend\Z/i
|
496
508
|
result
|
497
509
|
end
|
498
510
|
.,.,
|
499
511
|
|
500
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
501
|
-
def
|
512
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 55)
|
513
|
+
def _reduce_18(val, _values, result)
|
502
514
|
result = [val[0]]
|
503
515
|
result
|
504
516
|
end
|
505
517
|
.,.,
|
506
518
|
|
507
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
508
|
-
def
|
519
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 57)
|
520
|
+
def _reduce_19(val, _values, result)
|
509
521
|
result = val[0] + [val[2]]
|
510
522
|
result
|
511
523
|
end
|
512
524
|
.,.,
|
513
525
|
|
514
|
-
module_eval(<<'.,.,', 'fortran_namelist.y', 59)
|
515
|
-
def _reduce_18(val, _values, result)
|
516
|
-
result = ParamDef.new(val[0].downcase, nil, "")
|
517
|
-
result
|
518
|
-
end
|
519
|
-
.,.,
|
520
|
-
|
521
526
|
module_eval(<<'.,.,', 'fortran_namelist.y', 61)
|
522
|
-
def
|
523
|
-
result = ParamDef.new(val[0].downcase, nil,
|
527
|
+
def _reduce_20(val, _values, result)
|
528
|
+
result = ParamDef.new(val[0].downcase.intern, nil, "")
|
524
529
|
result
|
525
530
|
end
|
526
531
|
.,.,
|
527
532
|
|
528
533
|
module_eval(<<'.,.,', 'fortran_namelist.y', 63)
|
529
|
-
def
|
530
|
-
result = ParamDef.new(val[0].downcase, nil, val[
|
534
|
+
def _reduce_21(val, _values, result)
|
535
|
+
result = ParamDef.new(val[0].downcase.intern, nil, val[2])
|
531
536
|
result
|
532
537
|
end
|
533
538
|
.,.,
|
534
539
|
|
535
540
|
module_eval(<<'.,.,', 'fortran_namelist.y', 65)
|
536
|
-
def
|
537
|
-
result = ParamDef.new(val[0].downcase, val[2], val[5])
|
541
|
+
def _reduce_22(val, _values, result)
|
542
|
+
result = ParamDef.new(val[0].downcase.intern, val[2], val[5])
|
538
543
|
result
|
539
544
|
end
|
540
545
|
.,.,
|
541
546
|
|
542
|
-
# reduce 22 omitted
|
543
|
-
|
544
547
|
# reduce 23 omitted
|
545
548
|
|
546
549
|
# reduce 24 omitted
|
547
550
|
|
548
|
-
|
549
|
-
|
551
|
+
# reduce 25 omitted
|
552
|
+
|
553
|
+
# reduce 26 omitted
|
554
|
+
|
555
|
+
# reduce 27 omitted
|
556
|
+
|
557
|
+
# reduce 28 omitted
|
558
|
+
|
559
|
+
# reduce 29 omitted
|
560
|
+
|
561
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 79)
|
562
|
+
def _reduce_30(val, _values, result)
|
550
563
|
result = [nil, nil]
|
551
564
|
result
|
552
565
|
end
|
553
566
|
.,.,
|
554
567
|
|
555
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
556
|
-
def
|
568
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 81)
|
569
|
+
def _reduce_31(val, _values, result)
|
557
570
|
result = val[0] + val[1]
|
558
571
|
result
|
559
572
|
end
|
560
573
|
.,.,
|
561
574
|
|
562
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
563
|
-
def
|
575
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 83)
|
576
|
+
def _reduce_32(val, _values, result)
|
564
577
|
result = val[0] + val[2]
|
565
578
|
result
|
566
579
|
end
|
567
580
|
.,.,
|
568
581
|
|
569
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
570
|
-
def
|
582
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 85)
|
583
|
+
def _reduce_33(val, _values, result)
|
571
584
|
result = val[0] + [nil]
|
572
585
|
result
|
573
586
|
end
|
574
587
|
.,.,
|
575
588
|
|
576
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
577
|
-
def
|
589
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 88)
|
590
|
+
def _reduce_34(val, _values, result)
|
578
591
|
result = [val[0]]
|
579
592
|
result
|
580
593
|
end
|
581
594
|
.,.,
|
582
595
|
|
583
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
584
|
-
def
|
596
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 90)
|
597
|
+
def _reduce_35(val, _values, result)
|
585
598
|
result = [val[2]] * val[0]
|
586
599
|
result
|
587
600
|
end
|
588
601
|
.,.,
|
589
602
|
|
590
|
-
# reduce
|
603
|
+
# reduce 36 omitted
|
591
604
|
|
592
|
-
# reduce
|
605
|
+
# reduce 37 omitted
|
593
606
|
|
594
|
-
# reduce
|
607
|
+
# reduce 38 omitted
|
595
608
|
|
596
|
-
# reduce
|
609
|
+
# reduce 39 omitted
|
597
610
|
|
598
|
-
# reduce
|
611
|
+
# reduce 40 omitted
|
599
612
|
|
600
|
-
# reduce
|
613
|
+
# reduce 41 omitted
|
601
614
|
|
602
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
603
|
-
def
|
615
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 104)
|
616
|
+
def _reduce_42(val, _values, result)
|
604
617
|
result = Complex(val[1],val[3])
|
605
618
|
result
|
606
619
|
end
|
607
620
|
.,.,
|
608
621
|
|
609
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
610
|
-
def
|
622
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 107)
|
623
|
+
def _reduce_43(val, _values, result)
|
611
624
|
result = [val[0]]
|
612
625
|
result
|
613
626
|
end
|
614
627
|
.,.,
|
615
628
|
|
616
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
617
|
-
def
|
629
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 109)
|
630
|
+
def _reduce_44(val, _values, result)
|
618
631
|
result = [val[0]]
|
619
632
|
result
|
620
633
|
end
|
621
634
|
.,.,
|
622
635
|
|
623
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
624
|
-
def
|
636
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 111)
|
637
|
+
def _reduce_45(val, _values, result)
|
625
638
|
result = val[0] + [val[2]]
|
626
639
|
result
|
627
640
|
end
|
628
641
|
.,.,
|
629
642
|
|
630
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
631
|
-
def
|
643
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 113)
|
644
|
+
def _reduce_46(val, _values, result)
|
632
645
|
result = val[0] + [val[2]]
|
633
646
|
result
|
634
647
|
end
|
635
648
|
.,.,
|
636
649
|
|
637
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
638
|
-
def
|
650
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 116)
|
651
|
+
def _reduce_47(val, _values, result)
|
639
652
|
result = [val[0]-1]
|
640
653
|
result
|
641
654
|
end
|
642
655
|
.,.,
|
643
656
|
|
644
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
645
|
-
def
|
657
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 118)
|
658
|
+
def _reduce_48(val, _values, result)
|
646
659
|
result = [(val[0]-1)..(val[2]-1)]
|
647
660
|
result
|
648
661
|
end
|
649
662
|
.,.,
|
650
663
|
|
651
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
652
|
-
def
|
664
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 120)
|
665
|
+
def _reduce_49(val, _values, result)
|
653
666
|
result = [val[0]-1] + val[2]
|
654
667
|
result
|
655
668
|
end
|
656
669
|
.,.,
|
657
670
|
|
658
|
-
module_eval(<<'.,.,', 'fortran_namelist.y',
|
659
|
-
def
|
671
|
+
module_eval(<<'.,.,', 'fortran_namelist.y', 122)
|
672
|
+
def _reduce_50(val, _values, result)
|
660
673
|
result = [(val[0]-1)..(val[2]-1)] + val[4]
|
661
674
|
result
|
662
675
|
end
|