rubyang 0.1.2.1 → 0.1.3

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.
@@ -9,6 +9,7 @@ rule
9
9
 
10
10
  "module-stmt" : "module-keyword" "identifier-arg-str"
11
11
  "{"
12
+ "stmtsep"
12
13
  "module-header-stmts"
13
14
  "linkage-stmts"
14
15
  "meta-stmts"
@@ -22,6 +23,7 @@ rule
22
23
 
23
24
  "submodule-stmt" : "submodule-keyword" "identifier-arg-str"
24
25
  "{"
26
+ "stmtsep"
25
27
  "submodule-header-stmts"
26
28
  "linkage-stmts"
27
29
  "meta-stmts"
@@ -37,9 +39,9 @@ rule
37
39
  {
38
40
  result = []
39
41
  }
40
- | "module-header-stmts" "module-header-stmt"
42
+ | "module-header-stmts" "module-header-stmt" "stmtsep"
41
43
  {
42
- result = val[0] + [val[1]]
44
+ result = val[0] + [val[1]] + val[2]
43
45
  }
44
46
 
45
47
  "module-header-stmt" : "yang-version-stmt"
@@ -50,9 +52,9 @@ rule
50
52
  {
51
53
  result = []
52
54
  }
53
- | "submodule-header-stmts" "submodule-header-stmt"
55
+ | "submodule-header-stmts" "submodule-header-stmt" "stmtsep"
54
56
  {
55
- result = val[0] + [val[1]]
57
+ result = val[0] + [val[1]] + val[2]
56
58
  }
57
59
 
58
60
  "submodule-header-stmt" : "yang-version-stmt"
@@ -62,9 +64,9 @@ rule
62
64
  {
63
65
  result = []
64
66
  }
65
- | "meta-stmts" "meta-stmt"
67
+ | "meta-stmts" "meta-stmt" "stmtsep"
66
68
  {
67
- result = val[0] + [val[1]]
69
+ result = val[0] + [val[1]] + val[2]
68
70
  }
69
71
 
70
72
  "meta-stmt" : "organization-stmt"
@@ -76,9 +78,9 @@ rule
76
78
  {
77
79
  result = []
78
80
  }
79
- | "linkage-stmts" "linkage-stmt"
81
+ | "linkage-stmts" "linkage-stmt" "stmtsep"
80
82
  {
81
- result = val[0] + [val[1]]
83
+ result = val[0] + [val[1]] + val[2]
82
84
  }
83
85
 
84
86
  "linkage-stmt" : "import-stmt"
@@ -88,18 +90,18 @@ rule
88
90
  {
89
91
  result = []
90
92
  }
91
- | "revision-stmts" "revision-stmt"
93
+ | "revision-stmts" "revision-stmt" "stmtsep"
92
94
  {
93
- result = val[0] + [val[1]]
95
+ result = val[0] + [val[1]] + val[2]
94
96
  }
95
97
 
96
98
  "body-stmts" : /* */
97
99
  {
98
100
  result = []
99
101
  }
100
- | "body-stmts" "body-stmt"
102
+ | "body-stmts" "body-stmt" "stmtsep"
101
103
  {
102
- result = val[0] + [val[1]]
104
+ result = val[0] + [val[1]] + val[2]
103
105
  }
104
106
 
105
107
  "body-stmt" : "extension-stmt"
@@ -123,7 +125,7 @@ rule
123
125
 
124
126
  "yang-version-stmt" : "yang-version-keyword" "yang-version-arg-str" "stmtend"
125
127
  {
126
- result = Rubyang::Model::YangVersion.new( val[1] )
128
+ result = Rubyang::Model::YangVersion.new( val[1], val[2] )
127
129
  }
128
130
 
129
131
  "yang-version-arg-str" : "string"
@@ -134,9 +136,13 @@ rule
134
136
  result = val[0]
135
137
  }
136
138
 
137
- "import-stmt" : "import-keyword" "identifier-arg-str" "{" "inner-import-stmts" "}"
139
+ "import-stmt" : "import-keyword" "identifier-arg-str"
140
+ "{"
141
+ "stmtsep"
142
+ "inner-import-stmts"
143
+ "}"
138
144
  {
139
- substmts = val[3]
145
+ substmts = val[3] + val[4]
140
146
  result = Rubyang::Model::Import.new( val[1], substmts )
141
147
  }
142
148
 
@@ -144,9 +150,9 @@ rule
144
150
  {
145
151
  result = []
146
152
  }
147
- | "inner-import-stmts" "inner-import-stmt"
153
+ | "inner-import-stmts" "inner-import-stmt" "stmtsep"
148
154
  {
149
- result = val[0] + [val[1]]
155
+ result = val[0] + [val[1]] + val[2]
150
156
  }
151
157
 
152
158
  "inner-import-stmt" : "prefix-stmt"
@@ -156,9 +162,13 @@ rule
156
162
  {
157
163
  result = Rubyang::Model::Include.new( val[1] )
158
164
  }
159
- | "include-keyword" "identifier-arg-str" "{" "inner-include-stmts" "}"
165
+ | "include-keyword" "identifier-arg-str"
166
+ "{"
167
+ "stmtsep"
168
+ "inner-include-stmts"
169
+ "}"
160
170
  {
161
- substmts = val[3]
171
+ substmts = val[3] + val[4]
162
172
  result = Rubyang::Model::Include.new( val[1], substmts )
163
173
  }
164
174
 
@@ -166,16 +176,16 @@ rule
166
176
  {
167
177
  result = []
168
178
  }
169
- | "inner-include-stmts" "inner-include-stmt"
179
+ | "inner-include-stmts" "inner-include-stmt" "stmtsep"
170
180
  {
171
- result = val[0] + [val[1]]
181
+ result = val[0] + [val[1]] + val[2]
172
182
  }
173
183
 
174
184
  "inner-include-stmt" : "revision-date-stmt"
175
185
 
176
186
  "namespace-stmt" : "namespace-keyword" "uri-str" "stmtend"
177
187
  {
178
- result = Rubyang::Model::Namespace.new( val[1] )
188
+ result = Rubyang::Model::Namespace.new( val[1], val[2] )
179
189
  }
180
190
 
181
191
  "uri-str" : "string"
@@ -188,47 +198,55 @@ rule
188
198
 
189
199
  "prefix-stmt" : "prefix-keyword" "prefix-arg-str" "stmtend"
190
200
  {
191
- result = Rubyang::Model::Prefix.new( val[1] )
201
+ result = Rubyang::Model::Prefix.new( val[1], val[2] )
192
202
  }
193
203
 
194
- "belongs-to-stmt" : "belongs-to-keyword" "identifier-arg-str" "{" "prefix-stmt" "}"
204
+ "belongs-to-stmt" : "belongs-to-keyword" "identifier-arg-str"
205
+ "{"
206
+ "stmtsep"
207
+ "prefix-stmt" "stmtsep"
208
+ "}"
195
209
  {
196
- substmts = [val[3]]
210
+ substmts = val[3] + [val[4]] + val[5]
197
211
  result = Rubyang::Model::BelongsTo.new( val[1], substmts )
198
212
  }
199
213
 
200
214
  "organization-stmt" : "organization-keyword" "string" "stmtend"
201
215
  {
202
- result = Rubyang::Model::Organization.new( val[1] )
216
+ result = Rubyang::Model::Organization.new( val[1], val[2] )
203
217
  }
204
218
 
205
219
  "contact-stmt" : "contact-keyword" "string" "stmtend"
206
220
  {
207
- result = Rubyang::Model::Contact.new( val[1] )
221
+ result = Rubyang::Model::Contact.new( val[1], val[2] )
208
222
  }
209
223
 
210
224
  "description-stmt" : "description-keyword" "string" "stmtend"
211
225
  {
212
- result = Rubyang::Model::Description.new( val[1] )
226
+ result = Rubyang::Model::Description.new( val[1], val[2] )
213
227
  }
214
228
 
215
229
  "reference-stmt" : "reference-keyword" "string" "stmtend"
216
230
  {
217
- result = Rubyang::Model::Reference.new( val[1] )
231
+ result = Rubyang::Model::Reference.new( val[1], val[2] )
218
232
  }
219
233
 
220
234
  "units-stmt" : "units-keyword" "string" "stmtend"
221
235
  {
222
- result = Rubyang::Model::Units.new( val[1] )
236
+ result = Rubyang::Model::Units.new( val[1], val[2] )
223
237
  }
224
238
 
225
239
  "revision-stmt" : "revision-keyword" "revision-date" ";"
226
240
  {
227
241
  result = Rubyang::Model::Revision.new( val[1] )
228
242
  }
229
- | "revision-keyword" "revision-date" "{" "inner-revision-stmts" "}"
243
+ | "revision-keyword" "revision-date"
244
+ "{"
245
+ "stmtsep"
246
+ "inner-revision-stmts"
247
+ "}"
230
248
  {
231
- substmts = val[3]
249
+ substmts = val[3] + val[4]
232
250
  result = Rubyang::Model::Revision.new( val[1], substmts )
233
251
  }
234
252
 
@@ -236,9 +254,9 @@ rule
236
254
  {
237
255
  result = []
238
256
  }
239
- | "inner-revision-stmts" "inner-revision-stmt"
257
+ | "inner-revision-stmts" "inner-revision-stmt" "stmtsep"
240
258
  {
241
- result = val[0] + [val[1]]
259
+ result = val[0] + [val[1]] + val[2]
242
260
  }
243
261
 
244
262
  "inner-revision-stmt" : "description-stmt"
@@ -248,16 +266,20 @@ rule
248
266
 
249
267
  "revision-date-stmt" : "revision-date-keyword" "revision-date" "stmtend"
250
268
  {
251
- result = Rubyang::Model::RevisionDate.new( val[1] )
269
+ result = Rubyang::Model::RevisionDate.new( val[1], val[2] )
252
270
  }
253
271
 
254
272
  "extension-stmt" : "extension-keyword" "identifier-arg-str" ";"
255
273
  {
256
274
  result = Rubyang::Model::Extension.new( val[1] )
257
275
  }
258
- | "extension-keyword" "identifier-arg-str" "{" "inner-extension-stmts" "}"
276
+ | "extension-keyword" "identifier-arg-str"
277
+ "{"
278
+ "stmtsep"
279
+ "inner-extension-stmts"
280
+ "}"
259
281
  {
260
- substmts = val[3]
282
+ substmts = val[3] + val[4]
261
283
  result = Rubyang::Model::Extension.new( val[1], substmts )
262
284
  }
263
285
 
@@ -265,9 +287,9 @@ rule
265
287
  {
266
288
  result = []
267
289
  }
268
- | "inner-extension-stmts" "inner-extension-stmt"
290
+ | "inner-extension-stmts" "inner-extension-stmt" "stmtsep"
269
291
  {
270
- result = val[0] + [val[1]]
292
+ result = val[0] + [val[1]] + val[2]
271
293
  }
272
294
 
273
295
  "inner-extension-stmt" : "argument-stmt"
@@ -279,9 +301,13 @@ rule
279
301
  {
280
302
  result = Rubyang::Model::Argument.new( val[1] )
281
303
  }
282
- | "argument-keyword" "identifier-arg-str" "{" "inner-argument-stmts" "}"
304
+ | "argument-keyword" "identifier-arg-str"
305
+ "{"
306
+ "stmtsep"
307
+ "inner-argument-stmts"
308
+ "}"
283
309
  {
284
- substmts = val[3]
310
+ substmts = val[3] + val[4]
285
311
  result = Rubyang::Model::Argument.new( val[1], substmts )
286
312
  }
287
313
 
@@ -289,16 +315,16 @@ rule
289
315
  {
290
316
  result = []
291
317
  }
292
- | "inner-argument-stmts" "inner-argument-stmt"
318
+ | "inner-argument-stmts" "inner-argument-stmt" "stmtsep"
293
319
  {
294
- result = val[0] + [val[1]]
320
+ result = val[0] + [val[1]] + val[2]
295
321
  }
296
322
 
297
323
  "inner-argument-stmt" : "yin-element-stmt"
298
324
 
299
- "yin-element-stmt" : "yin-element-keyword" "yin-element-arg-str" ";"
325
+ "yin-element-stmt" : "yin-element-keyword" "yin-element-arg-str" "stmtend"
300
326
  {
301
- result = Rubyang::Model::YinElement.new( val[1] )
327
+ result = Rubyang::Model::YinElement.new( val[1], val[2] )
302
328
  }
303
329
 
304
330
  "yin-element-arg-str" : "string"
@@ -313,9 +339,13 @@ rule
313
339
  {
314
340
  result = Rubyang::Model::Identity.new( val[1] )
315
341
  }
316
- | "identity-keyword" "identifier-arg-str" "{" "inner-identity-stmts" "}"
342
+ | "identity-keyword" "identifier-arg-str"
343
+ "{"
344
+ "stmtsep"
345
+ "inner-identity-stmts"
346
+ "}"
317
347
  {
318
- substmts = val[3]
348
+ substmts = val[3] + val[4]
319
349
  result = Rubyang::Model::Identity.new( val[1], substmts )
320
350
  }
321
351
 
@@ -323,9 +353,9 @@ rule
323
353
  {
324
354
  result = []
325
355
  }
326
- | "inner-identity-stmts" "inner-identity-stmt"
356
+ | "inner-identity-stmts" "inner-identity-stmt" "stmtsep"
327
357
  {
328
- result = val[0] + [val[1]]
358
+ result = val[0] + [val[1]] + val[2]
329
359
  }
330
360
 
331
361
  "inner-identity-stmt" : "base-stmt"
@@ -333,18 +363,22 @@ rule
333
363
  | "description-stmt"
334
364
  | "reference-stmt"
335
365
 
336
- "base-stmt" : "base-keyword" "identifier-ref-arg-str" ";"
366
+ "base-stmt" : "base-keyword" "identifier-ref-arg-str" "stmtend"
337
367
  {
338
- result = Rubyang::Model::Base.new( val[1] )
368
+ result = Rubyang::Model::Base.new( val[1], val[2] )
339
369
  }
340
370
 
341
371
  "feature-stmt" : "feature-keyword" "identifier-arg-str" ";"
342
372
  {
343
373
  result = Rubyang::Model::Feature.new( val[1] )
344
374
  }
345
- | "feature-keyword" "identifier-arg-str" "{" "inner-feature-stmts" "}"
375
+ | "feature-keyword" "identifier-arg-str"
376
+ "{"
377
+ "stmtsep"
378
+ "inner-feature-stmts"
379
+ "}"
346
380
  {
347
- substmts = val[3]
381
+ substmts = val[3] + val[4]
348
382
  result = Rubyang::Model::Feature.new( val[1], substmts )
349
383
  }
350
384
 
@@ -352,9 +386,9 @@ rule
352
386
  {
353
387
  result = []
354
388
  }
355
- | "inner-feature-stmts" "inner-feature-stmt"
389
+ | "inner-feature-stmts" "inner-feature-stmt" "stmtsep"
356
390
  {
357
- result = val[0] + [val[1]]
391
+ result = val[0] + [val[1]] + val[2]
358
392
  }
359
393
 
360
394
  "inner-feature-stmt" : "if-feature-stmt"
@@ -364,12 +398,16 @@ rule
364
398
 
365
399
  "if-feature-stmt" : "if-feature-keyword" "identifier-ref-arg-str" "stmtend"
366
400
  {
367
- result = Rubyang::Model::IfFeature.new( val[1] )
401
+ result = Rubyang::Model::IfFeature.new( val[1], val[2] )
368
402
  }
369
403
 
370
- "typedef-stmt" : "typedef-keyword" "identifier-arg-str" "{" "inner-typedef-stmts" "}"
404
+ "typedef-stmt" : "typedef-keyword" "identifier-arg-str"
405
+ "{"
406
+ "stmtsep"
407
+ "inner-typedef-stmts"
408
+ "}"
371
409
  {
372
- substmts = val[3]
410
+ substmts = val[3] + val[4]
373
411
  result = Rubyang::Model::Typedef.new( val[1], substmts )
374
412
  }
375
413
 
@@ -377,9 +415,9 @@ rule
377
415
  {
378
416
  result = []
379
417
  }
380
- | "inner-typedef-stmts" "inner-typedef-stmt"
418
+ | "inner-typedef-stmts" "inner-typedef-stmt" "stmtsep"
381
419
  {
382
- result = val[0] + [val[1]]
420
+ result = val[0] + [val[1]] + val[2]
383
421
  }
384
422
 
385
423
  "inner-typedef-stmt" : "type-stmt"
@@ -393,9 +431,13 @@ rule
393
431
  {
394
432
  result = Rubyang::Model::Type.new( val[1] )
395
433
  }
396
- | "type-keyword" "identifier-ref-arg-str" "{" "type-body-stmts" "}"
434
+ | "type-keyword" "identifier-ref-arg-str"
435
+ "{"
436
+ "stmtsep"
437
+ "type-body-stmts"
438
+ "}"
397
439
  {
398
- substmts = val[3]
440
+ substmts = val[3] + val[4]
399
441
  result = Rubyang::Model::Type.new( val[1], substmts )
400
442
  }
401
443
 
@@ -409,18 +451,22 @@ rule
409
451
  | "bits-specification"
410
452
  | "union-specification"
411
453
 
412
- "numerical-restrictions" : "range-stmt"
454
+ "numerical-restrictions" : "range-stmt" "stmtsep"
413
455
  {
414
- result = [val[0]]
456
+ result = [val[0]] + val[1]
415
457
  }
416
458
 
417
459
  "range-stmt" : "range-keyword" "range-arg-str" ";"
418
460
  {
419
461
  result = Rubyang::Model::Range.new( val[1] )
420
462
  }
421
- | "range-keyword" "range-arg-str" "{" "inner-range-stmts" "}"
463
+ | "range-keyword" "range-arg-str"
464
+ "{"
465
+ "stmtsep"
466
+ "inner-range-stmts"
467
+ "}"
422
468
  {
423
- substmts = val[3]
469
+ substmts = val[3] + val[4]
424
470
  result = Rubyang::Model::Range.new( val[1], substmts )
425
471
  }
426
472
 
@@ -428,9 +474,9 @@ rule
428
474
  {
429
475
  result = []
430
476
  }
431
- | "inner-range-stmts" "inner-range-stmt"
477
+ | "inner-range-stmts" "inner-range-stmt" "stmtsep"
432
478
  {
433
- result = val[0] + [val[1]]
479
+ result = val[0] + [val[1]] + val[2]
434
480
  }
435
481
 
436
482
  "inner-range-stmt" : "error-message-stmt"
@@ -438,22 +484,24 @@ rule
438
484
  | "description-stmt"
439
485
  | "reference-stmt"
440
486
 
441
- "decimal64-specification" : "fraction-digits-stmt"
487
+ "decimal64-specification" : "fraction-digits-stmt" "stmtsep"
442
488
  {
443
- result = [val[0]]
489
+ result = [val[0]] + val[1]
444
490
  }
445
- | "fraction-digits-stmt" "range-stmt"
491
+ | "fraction-digits-stmt" "stmtsep"
492
+ "range-stmt" "stmtsep"
446
493
  {
447
- result = [val[0], val[1]]
494
+ result = [val[0]] + val[1] + [val[2]] + val[3]
448
495
  }
449
- | "range-stmt" "fraction-digits-stmt"
496
+ | "range-stmt" "stmtsep"
497
+ "fraction-digits-stmt" "stmtsep"
450
498
  {
451
- result = [val[1], val[0]]
499
+ result = [val[0]] + val[1] + [val[2]] + val[3]
452
500
  }
453
501
 
454
502
  "fraction-digits-stmt" : "fraction-digits-keyword" "fraction-digits-arg-str" "stmtend"
455
503
  {
456
- result = Rubyang::Model::FractionDigits.new( val[1] )
504
+ result = Rubyang::Model::FractionDigits.new( val[1], val[2] )
457
505
  }
458
506
 
459
507
  "fraction-digits-arg-str" : "string"
@@ -468,9 +516,9 @@ rule
468
516
  {
469
517
  result = []
470
518
  }
471
- | "string-restrictions" "string-restriction"
519
+ | "string-restrictions" "string-restriction" "stmtsep"
472
520
  {
473
- result = val[0] + [val[1]]
521
+ result = val[0] + [val[1]] + val[2]
474
522
  }
475
523
 
476
524
  "string-restriction" : "length-stmt"
@@ -480,9 +528,13 @@ rule
480
528
  {
481
529
  result = Rubyang::Model::Length.new( val[1] )
482
530
  }
483
- | "length-keyword" "length-arg-str" "{" "inner-length-stmts" "}"
531
+ | "length-keyword" "length-arg-str"
532
+ "{"
533
+ "stmtsep"
534
+ "inner-length-stmts"
535
+ "}"
484
536
  {
485
- substmts = val[3]
537
+ substmts = val[3] + val[4]
486
538
  result = Rubyang::Model::Length.new( val[1], substmts )
487
539
  }
488
540
 
@@ -490,9 +542,9 @@ rule
490
542
  {
491
543
  result = []
492
544
  }
493
- | "inner-length-stmts" "inner-length-stmt"
545
+ | "inner-length-stmts" "inner-length-stmt" "stmtsep"
494
546
  {
495
- result = val[0] + [val[1]]
547
+ result = val[0] + [val[1]] + val[2]
496
548
  }
497
549
 
498
550
  "inner-length-stmt" : "error-message-stmt"
@@ -504,9 +556,13 @@ rule
504
556
  {
505
557
  result = Rubyang::Model::Pattern.new( val[1] )
506
558
  }
507
- | "pattern-keyword" "string" "{" "inner-pattern-stmts" "}"
559
+ | "pattern-keyword" "string"
560
+ "{"
561
+ "stmtsep"
562
+ "inner-pattern-stmts"
563
+ "}"
508
564
  {
509
- substmts = val[3]
565
+ substmts = val[3] + val[4]
510
566
  result = Rubyang::Model::Pattern.new( val[1], substmts )
511
567
  }
512
568
 
@@ -514,9 +570,9 @@ rule
514
570
  {
515
571
  result = []
516
572
  }
517
- | "inner-pattern-stmts" "inner-pattern-stmt"
573
+ | "inner-pattern-stmts" "inner-pattern-stmt" "stmtsep"
518
574
  {
519
- result = val[0] + [val[1]]
575
+ result = val[0] + [val[1]] + val[2]
520
576
  }
521
577
 
522
578
  "inner-pattern-stmt" : "error-message-stmt"
@@ -526,25 +582,29 @@ rule
526
582
 
527
583
  "default-stmt" : "default-keyword" "string" "stmtend"
528
584
  {
529
- result = Rubyang::Model::Default.new( val[1] )
585
+ result = Rubyang::Model::Default.new( val[1], val[2] )
530
586
  }
531
587
 
532
- "enum-specification" : "enum-stmt"
588
+ "enum-specification" : "enum-stmt" "stmtsep"
533
589
  {
534
- result = [val[0]]
590
+ result = [val[0]] + val[1]
535
591
  }
536
- | "enum-specification" "enum-stmt"
592
+ | "enum-specification" "enum-stmt" "stmtsep"
537
593
  {
538
- result = val[0] + [val[1]]
594
+ result = val[0] + [val[1]] + val[2]
539
595
  }
540
596
 
541
597
  "enum-stmt" : "enum-keyword" "string" ";"
542
598
  {
543
599
  result = Rubyang::Model::Enum.new( val[1] )
544
600
  }
545
- | "enum-keyword" "string" "{" "inner-enum-stmts" "}"
601
+ | "enum-keyword" "string"
602
+ "{"
603
+ "stmtsep"
604
+ "inner-enum-stmts"
605
+ "}"
546
606
  {
547
- substmts = val[3]
607
+ substmts = val[3] + val[4]
548
608
  result = Rubyang::Model::Enum.new( val[1], substmts )
549
609
  }
550
610
 
@@ -552,9 +612,9 @@ rule
552
612
  {
553
613
  result = []
554
614
  }
555
- | "inner-enum-stmts" "inner-enum-stmt"
615
+ | "inner-enum-stmts" "inner-enum-stmt" "stmtsep"
556
616
  {
557
- result = val[0] + [val[1]]
617
+ result = val[0] + [val[1]] + val[2]
558
618
  }
559
619
 
560
620
  "inner-enum-stmt" : "value-stmt"
@@ -562,27 +622,29 @@ rule
562
622
  | "description-stmt"
563
623
  | "reference-stmt"
564
624
 
565
- "leafref-specification" : "path-stmt"
625
+ "leafref-specification" : "path-stmt" "stmtsep"
566
626
  {
567
627
  result = [val[0]]
568
628
  }
569
- | "path-stmt" "require-instance-stmt"
629
+ | "path-stmt" "stmtsep"
630
+ "require-instance-stmt" "stmtsep"
570
631
  {
571
- result = [val[0]] + [val[1]]
632
+ result = [val[0]] + val[1] + [val[2]] + val[3]
572
633
  }
573
- | "require-instance-stmt" "path-stmt"
634
+ | "require-instance-stmt" "stmtsep"
635
+ "path-stmt" "stmtsep"
574
636
  {
575
- result = [val[0]] + [val[1]]
637
+ result = [val[0]] + val[1] + [val[2]] + val[3]
576
638
  }
577
639
 
578
640
  "path-stmt" : "path-keyword" "path-arg-str" "stmtend"
579
641
  {
580
- result = Rubyang::Model::Path.new( val[1] )
642
+ result = Rubyang::Model::Path.new( val[1], val[2] )
581
643
  }
582
644
 
583
645
  "require-instance-stmt" : "require-instance-keyword" "require-instance-arg-str" "stmtend"
584
646
  {
585
- result = Rubyang::Model::RequireInstance.new( val[1] )
647
+ result = Rubyang::Model::RequireInstance.new( val[1], val[2] )
586
648
  }
587
649
 
588
650
  "require-instance-arg-str" : "string"
@@ -593,41 +655,45 @@ rule
593
655
  result = val[0]
594
656
  }
595
657
 
596
- "instance-identifier-specification" : "require-instance-stmt"
658
+ "instance-identifier-specification" : "require-instance-stmt" "stmtsep"
597
659
  {
598
- result = [val[0]]
660
+ result = [val[0]] + val[1]
599
661
  }
600
662
 
601
- "identityref-specification" : "base-stmt"
663
+ "identityref-specification" : "base-stmt" "stmtsep"
602
664
  {
603
- result = [val[0]]
665
+ result = [val[0]] + val[1]
604
666
  }
605
667
 
606
- "union-specification" : "type-stmt"
668
+ "union-specification" : "type-stmt" "stmtsep"
607
669
  {
608
- result = [val[0]]
670
+ result = [val[0]] + val[1]
609
671
  }
610
- | "union-specification" "type-stmt"
672
+ | "union-specification" "type-stmt" "stmtsep"
611
673
  {
612
- result = val[0] + [val[1]]
674
+ result = val[0] + [val[1]] + val[2]
613
675
  }
614
676
 
615
- "bits-specification" : "bit-stmt"
677
+ "bits-specification" : "bit-stmt" "stmtsep"
616
678
  {
617
- result = [val[0]]
679
+ result = [val[0]] + val[1]
618
680
  }
619
- | "bits-specification" "bit-stmt"
681
+ | "bits-specification" "bit-stmt" "stmtsep"
620
682
  {
621
- result = val[0] + [val[1]]
683
+ result = val[0] + [val[1]] + val[2]
622
684
  }
623
685
 
624
686
  "bit-stmt" : "bit-keyword" "identifier-arg-str" ";"
625
687
  {
626
688
  result = Rubyang::Model::Bit.new( val[1] )
627
689
  }
628
- | "bit-keyword" "identifier-arg-str" "{" "inner-bit-stmts" "}"
690
+ | "bit-keyword" "identifier-arg-str"
691
+ "{"
692
+ "stmtsep"
693
+ "inner-bit-stmts"
694
+ "}"
629
695
  {
630
- substmts = val[3]
696
+ substmts = val[3] + val[4]
631
697
  result = Rubyang::Model::Bit.new( val[1], substmts )
632
698
  }
633
699
 
@@ -635,9 +701,9 @@ rule
635
701
  {
636
702
  result = []
637
703
  }
638
- | "inner-bit-stmts" "inner-bit-stmt"
704
+ | "inner-bit-stmts" "inner-bit-stmt" "stmtsep"
639
705
  {
640
- result = val[0] + [val[1]]
706
+ result = val[0] + [val[1]] + val[2]
641
707
  }
642
708
 
643
709
  "inner-bit-stmt" : "position-stmt"
@@ -647,7 +713,7 @@ rule
647
713
 
648
714
  "position-stmt" : "position-keyword" "position-value-arg-str" "stmtend"
649
715
  {
650
- result = Rubyang::Model::Position.new( val[1] )
716
+ result = Rubyang::Model::Position.new( val[1], val[2] )
651
717
  }
652
718
 
653
719
  "position-value-arg-str" : "string"
@@ -660,7 +726,7 @@ rule
660
726
 
661
727
  "status-stmt" : "status-keyword" "status-arg-str" "stmtend"
662
728
  {
663
- result = Rubyang::Model::Status.new( val[1] )
729
+ result = Rubyang::Model::Status.new( val[1], val[2] )
664
730
  }
665
731
 
666
732
  "status-arg-str" : "string"
@@ -673,7 +739,7 @@ rule
673
739
 
674
740
  "config-stmt" : "config-keyword" "config-arg-str" "stmtend"
675
741
  {
676
- result = Rubyang::Model::Config.new( val[1] )
742
+ result = Rubyang::Model::Config.new( val[1], val[2] )
677
743
  }
678
744
 
679
745
  "config-arg-str" : "string"
@@ -686,7 +752,7 @@ rule
686
752
 
687
753
  "mandatory-stmt" : "mandatory-keyword" "mandatory-arg-str" "stmtend"
688
754
  {
689
- result = Rubyang::Model::Mandatory.new( val[1] )
755
+ result = Rubyang::Model::Mandatory.new( val[1], val[2] )
690
756
  }
691
757
 
692
758
  "mandatory-arg-str" : "string"
@@ -699,12 +765,12 @@ rule
699
765
 
700
766
  "presence-stmt" : "presence-keyword" "string" "stmtend"
701
767
  {
702
- result = Rubyang::Model::Presence.new( val[1] )
768
+ result = Rubyang::Model::Presence.new( val[1], val[2] )
703
769
  }
704
770
 
705
771
  "ordered-by-stmt" : "ordered-by-keyword" "ordered-by-arg-str" "stmtend"
706
772
  {
707
- result = Rubyang::Model::OrderedBy.new( val[1] )
773
+ result = Rubyang::Model::OrderedBy.new( val[1], val[2] )
708
774
  }
709
775
 
710
776
  "ordered-by-arg-str" : "string"
@@ -719,9 +785,13 @@ rule
719
785
  {
720
786
  result = Rubyang::Model::Must.new( val[1] )
721
787
  }
722
- | "must-keyword" "string" "{" "inner-must-stmts" "}"
788
+ | "must-keyword" "string"
789
+ "{"
790
+ "stmtsep"
791
+ "inner-must-stmts"
792
+ "}"
723
793
  {
724
- substmts = val[3]
794
+ substmts = val[3] + val[4]
725
795
  result = Rubyang::Model::Must.new( val[1], substmts )
726
796
  }
727
797
 
@@ -729,9 +799,9 @@ rule
729
799
  {
730
800
  result = []
731
801
  }
732
- | "inner-must-stmts" "inner-must-stmt"
802
+ | "inner-must-stmts" "inner-must-stmt" "stmtsep"
733
803
  {
734
- result = val[0] + [val[1]]
804
+ result = val[0] + [val[1]] + val[2]
735
805
  }
736
806
 
737
807
  "inner-must-stmt" : "error-message-stmt"
@@ -741,17 +811,17 @@ rule
741
811
 
742
812
  "error-message-stmt" : "error-message-keyword" "string" "stmtend"
743
813
  {
744
- result = Rubyang::Model::ErrorMessage.new( val[1] )
814
+ result = Rubyang::Model::ErrorMessage.new( val[1], val[2] )
745
815
  }
746
816
 
747
817
  "error-app-tag-stmt" : "error-app-tag-keyword" "string" "stmtend"
748
818
  {
749
- result = Rubyang::Model::ErrorAppTag.new( val[1] )
819
+ result = Rubyang::Model::ErrorAppTag.new( val[1], val[2] )
750
820
  }
751
821
 
752
822
  "min-elements-stmt" : "min-elements-keyword" "min-value-arg-str" "stmtend"
753
823
  {
754
- result = Rubyang::Model::MinElements.new( val[1] )
824
+ result = Rubyang::Model::MinElements.new( val[1], val[2] )
755
825
  }
756
826
 
757
827
  "min-value-arg-str" : "string"
@@ -764,7 +834,7 @@ rule
764
834
 
765
835
  "max-elements-stmt" : "max-elements-keyword" "max-value-arg-str" "stmtend"
766
836
  {
767
- result = Rubyang::Model::MaxElements.new( val[1] )
837
+ result = Rubyang::Model::MaxElements.new( val[1], val[2] )
768
838
  }
769
839
 
770
840
  "max-value-arg-str" : "string"
@@ -777,16 +847,20 @@ rule
777
847
 
778
848
  "value-stmt" : "value-keyword" "integer-value" "stmtend"
779
849
  {
780
- result = Rubyang::Model::Value.new( val[1] )
850
+ result = Rubyang::Model::Value.new( val[1], val[2] )
781
851
  }
782
852
 
783
853
  "grouping-stmt" : "grouping-keyword" "identifier-arg-str" ";"
784
854
  {
785
855
  result = Rubyang::Model::Grouping.new( val[1] )
786
856
  }
787
- | "grouping-keyword" "identifier-arg-str" "{" "inner-grouping-stmts" "}"
857
+ | "grouping-keyword" "identifier-arg-str"
858
+ "{"
859
+ "stmtsep"
860
+ "inner-grouping-stmts"
861
+ "}"
788
862
  {
789
- substmts = val[3]
863
+ substmts = val[3] + val[4]
790
864
  result = Rubyang::Model::Grouping.new( val[1], substmts )
791
865
  }
792
866
 
@@ -794,9 +868,9 @@ rule
794
868
  {
795
869
  result = []
796
870
  }
797
- | "inner-grouping-stmts" "inner-grouping-stmt"
871
+ | "inner-grouping-stmts" "inner-grouping-stmt" "stmtsep"
798
872
  {
799
- result = val[0] + [val[1]]
873
+ result = val[0] + [val[1]] + val[2]
800
874
  }
801
875
 
802
876
  "inner-grouping-stmt" : "status-stmt"
@@ -810,9 +884,13 @@ rule
810
884
  {
811
885
  result = Rubyang::Model::Container.new( val[1] )
812
886
  }
813
- | "container-keyword" "identifier-arg-str" "{" "inner-container-stmts" "}"
887
+ | "container-keyword" "identifier-arg-str"
888
+ "{"
889
+ "stmtsep"
890
+ "inner-container-stmts"
891
+ "}"
814
892
  {
815
- substmts = val[3]
893
+ substmts = val[3] + val[4]
816
894
  result = Rubyang::Model::Container.new( val[1], substmts )
817
895
  }
818
896
 
@@ -820,9 +898,9 @@ rule
820
898
  {
821
899
  result = []
822
900
  }
823
- | "inner-container-stmts" "inner-container-stmt"
901
+ | "inner-container-stmts" "inner-container-stmt" "stmtsep"
824
902
  {
825
- result = val[0] + [val[1]]
903
+ result = val[0] + [val[1]] + val[2]
826
904
  }
827
905
 
828
906
  "inner-container-stmt" : "when-stmt"
@@ -837,9 +915,13 @@ rule
837
915
  | "grouping-stmt"
838
916
  | "data-def-stmt"
839
917
 
840
- "leaf-stmt" : "leaf-keyword" "identifier-arg-str" "{" "inner-leaf-stmts" "}"
918
+ "leaf-stmt" : "leaf-keyword" "identifier-arg-str"
919
+ "{"
920
+ "stmtsep"
921
+ "inner-leaf-stmts"
922
+ "}"
841
923
  {
842
- substmts = val[3]
924
+ substmts = val[3] + val[4]
843
925
  result = Rubyang::Model::Leaf.new( val[1], substmts )
844
926
  }
845
927
 
@@ -847,9 +929,9 @@ rule
847
929
  {
848
930
  result = []
849
931
  }
850
- | "inner-leaf-stmts" "inner-leaf-stmt"
932
+ | "inner-leaf-stmts" "inner-leaf-stmt" "stmtsep"
851
933
  {
852
- result = val[0] + [val[1]]
934
+ result = val[0] + [val[1]] + val[2]
853
935
  }
854
936
 
855
937
  "inner-leaf-stmt" : "when-stmt"
@@ -864,9 +946,13 @@ rule
864
946
  | "description-stmt"
865
947
  | "reference-stmt"
866
948
 
867
- "leaf-list-stmt" : "leaf-list-keyword" "identifier-arg-str" "{" "inner-leaf-list-stmts" "}"
949
+ "leaf-list-stmt" : "leaf-list-keyword" "identifier-arg-str"
950
+ "{"
951
+ "stmtsep"
952
+ "inner-leaf-list-stmts"
953
+ "}"
868
954
  {
869
- substmts = val[3]
955
+ substmts = val[3] + val[4]
870
956
  result = Rubyang::Model::LeafList.new( val[1], substmts )
871
957
  }
872
958
 
@@ -874,9 +960,9 @@ rule
874
960
  {
875
961
  result = []
876
962
  }
877
- | "inner-leaf-list-stmts" "inner-leaf-list-stmt"
963
+ | "inner-leaf-list-stmts" "inner-leaf-list-stmt" "stmtsep"
878
964
  {
879
- result = val[0] + [val[1]]
965
+ result = val[0] + [val[1]] + val[2]
880
966
  }
881
967
 
882
968
  "inner-leaf-list-stmt" : "when-stmt"
@@ -892,9 +978,13 @@ rule
892
978
  | "description-stmt"
893
979
  | "reference-stmt"
894
980
 
895
- "list-stmt" : "list-keyword" "identifier-arg-str" "{" "inner-list-stmts" "}"
981
+ "list-stmt" : "list-keyword" "identifier-arg-str"
982
+ "{"
983
+ "stmtsep"
984
+ "inner-list-stmts"
985
+ "}"
896
986
  {
897
- substmts = val[3]
987
+ substmts = val[3] + val[4]
898
988
  result = Rubyang::Model::List.new( val[1], substmts )
899
989
  }
900
990
 
@@ -902,9 +992,9 @@ rule
902
992
  {
903
993
  result = []
904
994
  }
905
- | "inner-list-stmts" "inner-list-stmt"
995
+ | "inner-list-stmts" "inner-list-stmt" "stmtsep"
906
996
  {
907
- result = val[0] + [val[1]]
997
+ result = val[0] + [val[1]] + val[2]
908
998
  }
909
999
 
910
1000
  "inner-list-stmt" : "when-stmt"
@@ -925,7 +1015,7 @@ rule
925
1015
 
926
1016
  "key-stmt" : "key-keyword" "key-arg-str" "stmtend"
927
1017
  {
928
- result = Rubyang::Model::Key.new( val[1] )
1018
+ result = Rubyang::Model::Key.new( val[1], val[2] )
929
1019
  }
930
1020
 
931
1021
  "key-arg-str" : "string"
@@ -938,7 +1028,7 @@ rule
938
1028
 
939
1029
  "unique-stmt" : "unique-keyword" "unique-arg-str" "stmtend"
940
1030
  {
941
- result = Rubyang::Model::Unique.new( val[1] )
1031
+ result = Rubyang::Model::Unique.new( val[1], val[2] )
942
1032
  }
943
1033
 
944
1034
  "unique-arg-str" : "unique-arg"
@@ -953,9 +1043,13 @@ rule
953
1043
  {
954
1044
  result = Rubyang::Model::Choice.new( val[1] )
955
1045
  }
956
- | "choice-keyword" "identifier-arg-str" "{" "inner-choice-stmts" "}"
1046
+ | "choice-keyword" "identifier-arg-str"
1047
+ "{"
1048
+ "stmtsep"
1049
+ "inner-choice-stmts"
1050
+ "}"
957
1051
  {
958
- substmts = val[3]
1052
+ substmts = val[3] + val[4]
959
1053
  result = Rubyang::Model::Choice.new( val[1], substmts )
960
1054
  }
961
1055
 
@@ -963,9 +1057,9 @@ rule
963
1057
  {
964
1058
  result = []
965
1059
  }
966
- | "inner-choice-stmts" "inner-choice-stmt"
1060
+ | "inner-choice-stmts" "inner-choice-stmt" "stmtsep"
967
1061
  {
968
- result = val[0] + [val[1]]
1062
+ result = val[0] + [val[1]] + val[2]
969
1063
  }
970
1064
 
971
1065
  "inner-choice-stmt" : "when-stmt"
@@ -989,9 +1083,13 @@ rule
989
1083
  {
990
1084
  result = Rubyang::Model::Case.new( val[1] )
991
1085
  }
992
- | "case-keyword" "identifier-arg-str" "{" "inner-case-stmts" "}"
1086
+ | "case-keyword" "identifier-arg-str"
1087
+ "{"
1088
+ "stmtsep"
1089
+ "inner-case-stmts"
1090
+ "}"
993
1091
  {
994
- substmts = val[3]
1092
+ substmts = val[3] + val[4]
995
1093
  result = Rubyang::Model::Case.new( val[1], substmts )
996
1094
  }
997
1095
 
@@ -999,9 +1097,9 @@ rule
999
1097
  {
1000
1098
  result = []
1001
1099
  }
1002
- | "inner-case-stmts" "inner-case-stmt"
1100
+ | "inner-case-stmts" "inner-case-stmt" "stmtsep"
1003
1101
  {
1004
- result = val[0] + [val[1]]
1102
+ result = val[0] + [val[1]] + val[2]
1005
1103
  }
1006
1104
 
1007
1105
  "inner-case-stmt" : "when-stmt"
@@ -1015,9 +1113,13 @@ rule
1015
1113
  {
1016
1114
  result = Rubyang::Model::Anyxml.new( val[1] )
1017
1115
  }
1018
- | "anyxml-keyword" "identifier-arg-str" "{" "inner-anyxml-stmts" "}"
1116
+ | "anyxml-keyword" "identifier-arg-str"
1117
+ "{"
1118
+ "stmtsep"
1119
+ "inner-anyxml-stmts"
1120
+ "}"
1019
1121
  {
1020
- substmts = val[3]
1122
+ substmts = val[3] + val[4]
1021
1123
  result = Rubyang::Model::Anyxml.new( val[1], substmts )
1022
1124
  }
1023
1125
 
@@ -1025,9 +1127,9 @@ rule
1025
1127
  {
1026
1128
  result = []
1027
1129
  }
1028
- | "inner-anyxml-stmts" "inner-anyxml-stmt"
1130
+ | "inner-anyxml-stmts" "inner-anyxml-stmt" "stmtsep"
1029
1131
  {
1030
- result = val[0] + [val[1]]
1132
+ result = val[0] + [val[1]] + val[2]
1031
1133
  }
1032
1134
 
1033
1135
  "inner-anyxml-stmt" : "when-stmt"
@@ -1043,9 +1145,13 @@ rule
1043
1145
  {
1044
1146
  result = Rubyang::Model::Uses.new( val[1] )
1045
1147
  }
1046
- | "uses-keyword" "identifier-ref-arg-str" "{" "inner-uses-stmts" "}"
1148
+ | "uses-keyword" "identifier-ref-arg-str"
1149
+ "{"
1150
+ "stmtsep"
1151
+ "inner-uses-stmts"
1152
+ "}"
1047
1153
  {
1048
- substmts = val[3]
1154
+ substmts = val[3] + val[4]
1049
1155
  result = Rubyang::Model::Uses.new( val[1], substmts )
1050
1156
  }
1051
1157
 
@@ -1053,9 +1159,9 @@ rule
1053
1159
  {
1054
1160
  result = []
1055
1161
  }
1056
- | "inner-uses-stmts" "inner-uses-stmt"
1162
+ | "inner-uses-stmts" "inner-uses-stmt" "stmtsep"
1057
1163
  {
1058
- result = val[0] + [val[1]]
1164
+ result = val[0] + [val[1]] + val[2]
1059
1165
  }
1060
1166
 
1061
1167
  "inner-uses-stmt" : "when-stmt"
@@ -1070,9 +1176,13 @@ rule
1070
1176
  {
1071
1177
  result = Rubyang::Model::Refine.new( val[1] )
1072
1178
  }
1073
- | "refine-keyword" "refine-arg-str" "{" "inner-refine-stmts" "}"
1179
+ | "refine-keyword" "refine-arg-str"
1180
+ "{"
1181
+ "stmtsep"
1182
+ "inner-refine-stmts"
1183
+ "}"
1074
1184
  {
1075
- substmts = val[3]
1185
+ substmts = val[3] + val[4]
1076
1186
  result = Rubyang::Model::Refine.new( val[1], substmts )
1077
1187
  }
1078
1188
 
@@ -1099,9 +1209,13 @@ rule
1099
1209
 
1100
1210
  "refine-arg" : "descendant-schema-nodeid"
1101
1211
 
1102
- "uses-augment-stmt" : "augment-keyword" "uses-augment-arg-str" "{" "inner-uses-augment-stmts" "}"
1212
+ "uses-augment-stmt" : "augment-keyword" "uses-augment-arg-str"
1213
+ "{"
1214
+ "stmtsep"
1215
+ "inner-uses-augment-stmts"
1216
+ "}"
1103
1217
  {
1104
- substmts = val[3]
1218
+ substmts = val[3] + val[4]
1105
1219
  result = Rubyang::Model::Augment.new( val[1], substmts )
1106
1220
  }
1107
1221
 
@@ -1109,9 +1223,9 @@ rule
1109
1223
  {
1110
1224
  result = []
1111
1225
  }
1112
- | "inner-uses-augment-stmts" "inner-uses-augment-stmt"
1226
+ | "inner-uses-augment-stmts" "inner-uses-augment-stmt" "stmtsep"
1113
1227
  {
1114
- result = val[0] + [val[1]]
1228
+ result = val[0] + [val[1]] + val[2]
1115
1229
  }
1116
1230
 
1117
1231
  "inner-uses-augment-stmt" : "when-stmt"
@@ -1126,9 +1240,13 @@ rule
1126
1240
 
1127
1241
  "uses-augment-arg" : "descendant-schema-nodeid"
1128
1242
 
1129
- "augment-stmt" : "augment-keyword" "augment-arg-str" "{" "inner-augment-stmts" "}"
1243
+ "augment-stmt" : "augment-keyword" "augment-arg-str"
1244
+ "{"
1245
+ "stmtsep"
1246
+ "inner-augment-stmts"
1247
+ "}"
1130
1248
  {
1131
- substmts = val[3]
1249
+ substmts = val[3] + val[4]
1132
1250
  result = Rubyang::Model::Augment.new( val[1], substmts )
1133
1251
  }
1134
1252
 
@@ -1136,9 +1254,9 @@ rule
1136
1254
  {
1137
1255
  result = []
1138
1256
  }
1139
- | "inner-augment-stmts" "inner-augment-stmt"
1257
+ | "inner-augment-stmts" "inner-augment-stmt" "stmtsep"
1140
1258
  {
1141
- result = val[0] + [val[1]]
1259
+ result = val[0] + [val[1]] + val[2]
1142
1260
  }
1143
1261
 
1144
1262
  "inner-augment-stmt" : "when-stmt"
@@ -1153,25 +1271,61 @@ rule
1153
1271
 
1154
1272
  "augment-arg" : "absolute-schema-nodeid"
1155
1273
 
1156
- "unknown-statement" : "prefixed-node-identifier" "unknown-string" ";"
1157
- | "prefixed-node-identifier" "unknown-string" "{" "unknown-statements2" "}"
1274
+ "unknown-stmts" : /* */
1275
+ {
1276
+ result = []
1277
+ }
1278
+ | "unknown-stmts" "unknown-stmt"
1279
+ {
1280
+ result = val[0] + [val[1]]
1281
+ }
1282
+
1283
+ "unknown-stmt" : "prefixed-node-identifier" "unknown-arg-str" ";"
1284
+ {
1285
+ result = Rubyang::Model::Unknown.new( val[0], val[1] )
1286
+ }
1287
+ | "prefixed-node-identifier" "unknown-arg-str" "{" "unknown-stmts2" "}"
1288
+ {
1289
+ substmts = val[3]
1290
+ result = Rubyang::Model::Unknown.new( val[0], val[1], substmts )
1291
+ }
1292
+
1293
+ "unknown-stmts2" : /* */
1294
+ {
1295
+ result = []
1296
+ }
1297
+ | "unknown-stmts2" "unknown-stmt2"
1298
+ {
1299
+ result = val[0] + [val[1]]
1300
+ }
1158
1301
 
1159
- "unknown-statement2" : "node-identifier" "unknown-string" ";"
1160
- | "node-identifier" "unknown-string" "{" "unknown-statements2" "}"
1302
+ "unknown-stmt2" : "node-identifier" "unknown-arg-str" ";"
1303
+ {
1304
+ result = Rubyang::Model::Unknown.new( val[0], val[1] )
1305
+ }
1306
+ | "node-identifier" "unknown-arg-str" "{" "unknown-stmts2" "}"
1307
+ {
1308
+ substmts = val[3]
1309
+ result = Rubyang::Model::Unknown.new( val[0], val[1], substmts )
1310
+ }
1161
1311
 
1162
- "unknown-string" : /* */
1312
+ "unknown-arg-str" : /* */
1313
+ {
1314
+ result = ''
1315
+ }
1163
1316
  | "string"
1164
1317
 
1165
- "unknown-statements2" : /* */
1166
- | "unknown-statements2" "unknown-statement2"
1167
-
1168
1318
  "when-stmt" : "when-keyword" "string" ";"
1169
1319
  {
1170
1320
  result = Rubyang::Model::When.new( val[1] )
1171
1321
  }
1172
- | "when-keyword" "string" "{" "inner-when-stmts" "}"
1322
+ | "when-keyword" "string"
1323
+ "{"
1324
+ "stmtsep"
1325
+ "inner-when-stmts"
1326
+ "}"
1173
1327
  {
1174
- substmts = val[3]
1328
+ substmts = val[3] + val[4]
1175
1329
  result = Rubyang::Model::When.new( val[1], substmts )
1176
1330
  }
1177
1331
 
@@ -1179,9 +1333,9 @@ rule
1179
1333
  {
1180
1334
  result = []
1181
1335
  }
1182
- | "inner-when-stmts" "inner-when-stmt"
1336
+ | "inner-when-stmts" "inner-when-stmt" "stmtsep"
1183
1337
  {
1184
- result = val[0] + [val[1]]
1338
+ result = val[0] + [val[1]] + val[2]
1185
1339
  }
1186
1340
 
1187
1341
  "inner-when-stmt" : "description-stmt"
@@ -1191,9 +1345,13 @@ rule
1191
1345
  {
1192
1346
  result = Rubyang::Model::Rpc.new( val[1] )
1193
1347
  }
1194
- | "rpc-keyword" "identifier-arg-str" "{" "inner-rpc-stmts" "}"
1348
+ | "rpc-keyword" "identifier-arg-str"
1349
+ "{"
1350
+ "stmtsep"
1351
+ "inner-rpc-stmts"
1352
+ "}"
1195
1353
  {
1196
- substmts = val[3]
1354
+ substmts = val[3] + val[4]
1197
1355
  result = Rubyang::Model::Rpc.new( val[1], substmts )
1198
1356
  }
1199
1357
 
@@ -1215,9 +1373,13 @@ rule
1215
1373
  | "input-stmt"
1216
1374
  | "output-stmt"
1217
1375
 
1218
- "input-stmt" : "input-keyword" "{" "inner-input-stmts" "}"
1376
+ "input-stmt" : "input-keyword"
1377
+ "{"
1378
+ "stmtsep"
1379
+ "inner-input-stmts"
1380
+ "}"
1219
1381
  {
1220
- substmts = val[2]
1382
+ substmts = val[2] + val[3]
1221
1383
  result = Rubyang::Model::Input.new( substmts )
1222
1384
  }
1223
1385
 
@@ -1225,18 +1387,22 @@ rule
1225
1387
  {
1226
1388
  result = []
1227
1389
  }
1228
- | "inner-input-stmts" "inner-input-stmt"
1390
+ | "inner-input-stmts" "inner-input-stmt" "stmtsep"
1229
1391
  {
1230
- result = val[0] + [val[1]]
1392
+ result = val[0] + [val[1]] + val[2]
1231
1393
  }
1232
1394
 
1233
1395
  "inner-input-stmt" : "typedef-stmt"
1234
1396
  | "grouping-stmt"
1235
1397
  | "data-def-stmt"
1236
1398
 
1237
- "output-stmt" : "output-keyword" "{" "inner-output-stmts" "}"
1399
+ "output-stmt" : "output-keyword"
1400
+ "{"
1401
+ "stmtsep"
1402
+ "inner-output-stmts"
1403
+ "}"
1238
1404
  {
1239
- substmts = val[2]
1405
+ substmts = val[2] + val[3]
1240
1406
  result = Rubyang::Model::Output.new( substmts )
1241
1407
  }
1242
1408
 
@@ -1244,9 +1410,9 @@ rule
1244
1410
  {
1245
1411
  result = []
1246
1412
  }
1247
- | "inner-output-stmts" "inner-output-stmt"
1413
+ | "inner-output-stmts" "inner-output-stmt" "stmtsep"
1248
1414
  {
1249
- result = val[0] + [val[1]]
1415
+ result = val[0] + [val[1]] + val[2]
1250
1416
  }
1251
1417
 
1252
1418
  "inner-output-stmt" : "typedef-stmt"
@@ -1257,9 +1423,13 @@ rule
1257
1423
  {
1258
1424
  result = Rubyang::Model::Notification.new( val[1] )
1259
1425
  }
1260
- | "notification-keyword" "identifier-arg-str" "{" "inner-notification-stmts" "}"
1426
+ | "notification-keyword" "identifier-arg-str"
1427
+ "{"
1428
+ "stmtsep"
1429
+ "inner-notification-stmts"
1430
+ "}"
1261
1431
  {
1262
- substmts = val[3]
1432
+ substmts = val[3] + val[4]
1263
1433
  result = Rubyang::Model::Notification.new( val[1], substmts )
1264
1434
  }
1265
1435
 
@@ -1267,9 +1437,9 @@ rule
1267
1437
  {
1268
1438
  result = []
1269
1439
  }
1270
- | "inner-notification-stmts" "inner-notification-stmt"
1440
+ | "inner-notification-stmts" "inner-notification-stmt" "stmtsep"
1271
1441
  {
1272
- result = val[0] + [val[1]]
1442
+ result = val[0] + [val[1]] + val[2]
1273
1443
  }
1274
1444
 
1275
1445
  "inner-notification-stmt" : "if-feature-stmt"
@@ -1284,9 +1454,13 @@ rule
1284
1454
  {
1285
1455
  result = Rubyang::Model::Deviation.new( val[1] )
1286
1456
  }
1287
- | "deviation-keyword" "deviation-arg-str" "{" "inner-deviation-stmts" "}"
1457
+ | "deviation-keyword" "deviation-arg-str"
1458
+ "{"
1459
+ "stmtsep"
1460
+ "inner-deviation-stmts"
1461
+ "}"
1288
1462
  {
1289
- substmts = val[3]
1463
+ substmts = val[3] + val[4]
1290
1464
  result = Rubyang::Model::Deviation.new( val[1], substmts )
1291
1465
  }
1292
1466
 
@@ -1294,9 +1468,9 @@ rule
1294
1468
  {
1295
1469
  result = []
1296
1470
  }
1297
- | "inner-deviation-stmts" "inner-deviation-stmt"
1471
+ | "inner-deviation-stmts" "inner-deviation-stmt" "stmtsep"
1298
1472
  {
1299
- result = val[0] + [val[1]]
1473
+ result = val[0] + [val[1]] + val[2]
1300
1474
  }
1301
1475
 
1302
1476
  "inner-deviation-stmt" : "description-stmt"
@@ -1453,10 +1627,14 @@ rule
1453
1627
  result = val[0] + val[2]
1454
1628
  }
1455
1629
 
1456
- "stmtend" : ";"
1457
- | "{" "unknown-statements" "}"
1630
+ "stmtsep" : "unknown-stmts"
1458
1631
 
1459
- "unknown-statements" : /* */
1460
- | "unknown-statements" "unknown-statement"
1632
+ "stmtend" : ";"
1633
+ {
1634
+ result = []
1635
+ }
1636
+ | "{" "unknown-stmts" "}"
1637
+ {
1638
+ result = val[1]
1639
+ }
1461
1640
  end
1462
-