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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c44816ef76988ff0fb717b4d8d67eab2525e96341e01292be61b589ad5863c64
4
- data.tar.gz: '0572478dd329fea60bd37dce6095b188f25c7ede6d3fc8bc9424cbf7a56762d5'
3
+ metadata.gz: ed7fddd6ffa15b9134cf1818215a1bf4cd6b1086165df795faa955224277ef4a
4
+ data.tar.gz: 75f1f40c5dfb92e5e5877e2fe9ba696a7e8399810a7affea8371f72412957603
5
5
  SHA512:
6
- metadata.gz: 2b6588de0bacd73f1ce582399cea86b97ee820b84cfdcee9ce9531d4292a004294ff1b6495b2e7415f3d57c5b3a36947675c75870a250eb3fc9e3d4e782eb54c
7
- data.tar.gz: 34ba922c0b04ef92fa3ed3df09ecf8350233c324675aa8a9a393bb6a641df6c61e19d93f686ca0e4d735c0f0c5a349c505f1ad43aa5edbbd48386eb77696ed6c
6
+ metadata.gz: 48cedc4dea6b54cc81c69a206e8a5fbe5253fb074e6f4b1b1956422bf96ae6ebcd971c1c71c526c7750b1f66a24c5cc0da89e79b8f1aacf54e81a4962a95a547
7
+ data.tar.gz: 90c9ddd5cc7044cd8326e0d4baa2896d9e186887d06a24b9fd20cc26076e56f6ed20e8b8352feffcec7a3f433a29a1ecd2e7eff4017ed161d0ce566d03f0a5d2
data/NOTE.md CHANGED
@@ -1,4 +1,5 @@
1
- name
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 = .tabc. ! true
24
- v3 = t ! true
24
+ v2 = .t ! true
25
+ v3 = .t_1 ! true
26
+ v4 = t ! true
25
27
 
26
28
  v4 = .false. ! false
27
- v5 = .fabc. ! false
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
- "group1" => {
41
- "var11" => value11,
42
- "var12" => value12,
48
+ group1: {
49
+ var11: value11,
50
+ var12: value12,
43
51
  : :
44
52
  }
45
- "group2" => {
46
- "var21" => value21,
47
- "var22" => value22,
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
- require 'fortio-namelist'
59
-
60
- input = %{
61
- &group1
62
- var1 = 11
63
- var2 = 12
64
- /
65
- &group2
66
- var1 = 12
67
- var2 = 22
68
- /
69
- &group3
70
- var1 = 31
71
- var2 = 32
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
- ### read all groups
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
- require 'fortio-namelist'
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
- root = {"group1"=>{"var1"=>11, "var2"=>12},
128
- "group2"=>{"var1"=>12, "var2"=>22},
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
 
@@ -1,5 +1,5 @@
1
1
  Gem::Specification::new do |s|
2
- version = "1.1.0"
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.*?\./i) ### LOGICAL true
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.*?\./i) ### LOGICAL false
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', 122)
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
- 44, 30, 13, 58, 60, 43, 14, 35, 15, 37,
247
- 57, 38, 39, 42, 45, 44, 22, 22, 61, 54,
248
- 43, 24, 35, 42, 37, 44, 38, 39, 42, 45,
249
- 43, 54, 35, 47, 37, 42, 38, 39, 42, 45,
250
- 43, 52, 51, 50, 37, 43, 38, 39, 42, 37,
251
- 43, 38, 39, 42, 54, 53, 38, 39, 42, 4,
252
- 5, 21, 4, 5, 18, 4, 5, 21, 56, 7,
253
- 18, 4, 5, 10, 13, 10, 13, 25, 26, 63,
254
- 64, 65, 47, 69, 70, 47 ]
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
- 25, 25, 25, 47, 52, 25, 6, 25, 7, 25,
258
- 47, 25, 25, 25, 25, 29, 11, 29, 52, 43,
259
- 29, 19, 29, 43, 29, 64, 29, 29, 29, 29,
260
- 64, 63, 64, 26, 64, 63, 64, 64, 64, 64,
261
- 32, 33, 32, 32, 32, 50, 32, 32, 32, 50,
262
- 53, 50, 50, 50, 53, 37, 53, 53, 53, 9,
263
- 9, 9, 0, 0, 9, 23, 23, 23, 46, 1,
264
- 23, 1, 1, 3, 3, 16, 16, 21, 21, 55,
265
- 56, 57, 58, 65, 67, 69 ]
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
- 60, 69, nil, 68, nil, nil, 2, 8, nil, 57,
269
- nil, 10, nil, nil, nil, nil, 70, nil, nil, 17,
270
- nil, 69, nil, 63, nil, -4, 20, nil, nil, 11,
271
- nil, nil, 31, 29, nil, nil, nil, 41, nil, nil,
272
- nil, nil, nil, 6, nil, nil, 58, -9, nil, nil,
273
- 36, nil, 0, 41, nil, 67, 72, 68, 69, nil,
274
- nil, nil, nil, 18, 21, 71, nil, 74, nil, 72,
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
- -46, -46, -2, -13, -5, -6, -46, -46, -1, -46,
279
- -8, -9, -10, -11, -7, 72, -13, -4, -14, -46,
280
- -16, -46, -12, -46, -15, -46, -46, -3, -17, -46,
281
- -18, -19, -22, -23, -24, -25, -29, -35, -31, -32,
282
- -33, -34, -36, -46, -38, -39, -46, -42, -20, -26,
283
- -46, -28, -46, -46, -35, -46, -46, -46, -46, -27,
284
- -40, -41, -30, -46, -46, -43, -44, -46, -21, -46,
285
- -37, -45 ]
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
- 46, 31, 55, 49, 17, 48, 19, 2, 8, 20,
289
- 1, 9, 16, 29, 62, nil, nil, nil, 27, nil,
290
- 19, 59, 67, 28, 23, nil, nil, nil, nil, nil,
291
- nil, nil, 66, nil, nil, nil, nil, nil, nil, nil,
292
- 68, nil, nil, 71 ]
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
- 12, 11, 17, 15, 6, 11, 7, 2, 2, 10,
296
- 1, 4, 5, 8, 16, nil, nil, nil, 6, nil,
297
- 7, 15, 17, 10, 4, nil, nil, nil, nil, nil,
298
- nil, nil, 12, nil, nil, nil, nil, nil, nil, nil,
299
- 11, nil, nil, 12 ]
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, 10, 7, nil, 8, 3, -5, -3, -12, nil,
303
- 0, -24, -26, nil, nil, -29, -39, -41, nil ]
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, 32, 33, 34, 36, 40, 41 ]
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, :_reduce_15,
326
- 1, 25, :_reduce_16,
327
- 3, 25, :_reduce_17,
328
- 3, 30, :_reduce_18,
329
- 3, 30, :_reduce_19,
330
- 4, 30, :_reduce_20,
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
- 1, 31, :_reduce_none,
334
- 1, 33, :_reduce_none,
335
- 1, 33, :_reduce_25,
336
- 2, 33, :_reduce_26,
337
- 3, 33, :_reduce_27,
338
- 2, 33, :_reduce_28,
339
- 1, 35, :_reduce_29,
340
- 3, 35, :_reduce_30,
341
- 1, 36, :_reduce_none,
342
- 1, 36, :_reduce_none,
343
- 1, 36, :_reduce_none,
344
- 1, 36, :_reduce_none,
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
- 5, 38, :_reduce_37,
348
- 1, 34, :_reduce_38,
349
- 1, 34, :_reduce_39,
350
- 3, 34, :_reduce_40,
351
- 3, 34, :_reduce_41,
352
- 1, 32, :_reduce_42,
353
- 3, 32, :_reduce_43,
354
- 3, 32, :_reduce_44,
355
- 5, 32, :_reduce_45 ]
356
-
357
- racc_reduce_n = 46
358
-
359
- racc_shift_n = 72
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
- "=" => 8,
371
- "(" => 9,
372
- ")" => 10,
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
- module_eval(<<'.,.,', 'fortran_namelist.y', 50)
494
- def _reduce_15(val, _values, result)
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', 53)
501
- def _reduce_16(val, _values, result)
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', 55)
508
- def _reduce_17(val, _values, result)
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 _reduce_19(val, _values, result)
523
- result = ParamDef.new(val[0].downcase, nil, val[2])
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 _reduce_20(val, _values, result)
530
- result = ParamDef.new(val[0].downcase, nil, val[3])
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 _reduce_21(val, _values, result)
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
- module_eval(<<'.,.,', 'fortran_namelist.y', 73)
549
- def _reduce_25(val, _values, result)
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', 75)
556
- def _reduce_26(val, _values, result)
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', 77)
563
- def _reduce_27(val, _values, result)
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', 79)
570
- def _reduce_28(val, _values, result)
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', 82)
577
- def _reduce_29(val, _values, result)
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', 84)
584
- def _reduce_30(val, _values, result)
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 31 omitted
603
+ # reduce 36 omitted
591
604
 
592
- # reduce 32 omitted
605
+ # reduce 37 omitted
593
606
 
594
- # reduce 33 omitted
607
+ # reduce 38 omitted
595
608
 
596
- # reduce 34 omitted
609
+ # reduce 39 omitted
597
610
 
598
- # reduce 35 omitted
611
+ # reduce 40 omitted
599
612
 
600
- # reduce 36 omitted
613
+ # reduce 41 omitted
601
614
 
602
- module_eval(<<'.,.,', 'fortran_namelist.y', 98)
603
- def _reduce_37(val, _values, result)
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', 101)
610
- def _reduce_38(val, _values, result)
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', 103)
617
- def _reduce_39(val, _values, result)
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', 105)
624
- def _reduce_40(val, _values, result)
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', 107)
631
- def _reduce_41(val, _values, result)
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', 110)
638
- def _reduce_42(val, _values, result)
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', 112)
645
- def _reduce_43(val, _values, result)
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', 114)
652
- def _reduce_44(val, _values, result)
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', 116)
659
- def _reduce_45(val, _values, result)
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