bayesnet 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2484 @@
1
+ # Autogenerated from a Treetop grammar. Edits may be lost.
2
+
3
+
4
+ require "treetop"
5
+
6
+ module Bayesnet
7
+ module Parsers
8
+ module Bif
9
+ include Treetop::Runtime
10
+
11
+ def root
12
+ @root ||= :CompilationUnit
13
+ end
14
+
15
+ include Bayesnet::Parsers::Builder
16
+
17
+ module CompilationUnit0
18
+ def SEP1
19
+ elements[0]
20
+ end
21
+
22
+ def NetworkDeclaration
23
+ elements[1]
24
+ end
25
+
26
+ def list
27
+ elements[2]
28
+ end
29
+
30
+ def SEP2
31
+ elements[3]
32
+ end
33
+ end
34
+
35
+ module CompilationUnit1
36
+ def nodes
37
+ list.elements.select { |e| e.respond_to?(:node) }.map(&:node)
38
+ end
39
+
40
+ def cpts
41
+ list.elements.select { |e| e.respond_to?(:cpt) }.map(&:cpt)
42
+ end
43
+ end
44
+
45
+ def _nt_CompilationUnit
46
+ start_index = index
47
+ if node_cache[:CompilationUnit].has_key?(index)
48
+ cached = node_cache[:CompilationUnit][index]
49
+ if cached
50
+ node_cache[:CompilationUnit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
51
+ @index = cached.interval.end
52
+ end
53
+ return cached
54
+ end
55
+
56
+ i0, s0 = index, []
57
+ r1 = _nt_SEP
58
+ s0 << r1
59
+ if r1
60
+ r2 = _nt_NetworkDeclaration
61
+ s0 << r2
62
+ if r2
63
+ s3, i3 = [], index
64
+ loop do
65
+ i4 = index
66
+ r5 = _nt_VariableDeclaration
67
+ if r5
68
+ r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
69
+ r4 = r5
70
+ else
71
+ r6 = _nt_ProbabilityDeclaration
72
+ if r6
73
+ r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
74
+ r4 = r6
75
+ else
76
+ @index = i4
77
+ r4 = nil
78
+ end
79
+ end
80
+ if r4
81
+ s3 << r4
82
+ else
83
+ break
84
+ end
85
+ end
86
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
87
+ s0 << r3
88
+ if r3
89
+ r7 = _nt_SEP
90
+ s0 << r7
91
+ end
92
+ end
93
+ end
94
+ if s0.last
95
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
96
+ r0.extend(CompilationUnit0)
97
+ r0.extend(CompilationUnit1)
98
+ else
99
+ @index = i0
100
+ r0 = nil
101
+ end
102
+
103
+ node_cache[:CompilationUnit][start_index] = r0
104
+
105
+ r0
106
+ end
107
+
108
+ module NetworkDeclaration0
109
+ def SEP1
110
+ elements[0]
111
+ end
112
+
113
+ def NETWORK
114
+ elements[1]
115
+ end
116
+
117
+ def SEP2
118
+ elements[2]
119
+ end
120
+
121
+ def WORD
122
+ elements[3]
123
+ end
124
+
125
+ def SEP3
126
+ elements[4]
127
+ end
128
+
129
+ def NetworkContent
130
+ elements[5]
131
+ end
132
+
133
+ def SEP4
134
+ elements[6]
135
+ end
136
+ end
137
+
138
+ def _nt_NetworkDeclaration
139
+ start_index = index
140
+ if node_cache[:NetworkDeclaration].has_key?(index)
141
+ cached = node_cache[:NetworkDeclaration][index]
142
+ if cached
143
+ node_cache[:NetworkDeclaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
144
+ @index = cached.interval.end
145
+ end
146
+ return cached
147
+ end
148
+
149
+ i0, s0 = index, []
150
+ r1 = _nt_SEP
151
+ s0 << r1
152
+ if r1
153
+ r2 = _nt_NETWORK
154
+ s0 << r2
155
+ if r2
156
+ r3 = _nt_SEP
157
+ s0 << r3
158
+ if r3
159
+ r4 = _nt_WORD
160
+ s0 << r4
161
+ if r4
162
+ r5 = _nt_SEP
163
+ s0 << r5
164
+ if r5
165
+ r6 = _nt_NetworkContent
166
+ s0 << r6
167
+ if r6
168
+ r7 = _nt_SEP
169
+ s0 << r7
170
+ end
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
176
+ if s0.last
177
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
178
+ r0.extend(NetworkDeclaration0)
179
+ else
180
+ @index = i0
181
+ r0 = nil
182
+ end
183
+
184
+ node_cache[:NetworkDeclaration][start_index] = r0
185
+
186
+ r0
187
+ end
188
+
189
+ module NetworkContent0
190
+ def SEP
191
+ elements[0]
192
+ end
193
+
194
+ def Property
195
+ elements[1]
196
+ end
197
+ end
198
+
199
+ module NetworkContent1
200
+ def SEP1
201
+ elements[0]
202
+ end
203
+
204
+ def SEP2
205
+ elements[3]
206
+ end
207
+
208
+ def SEP3
209
+ elements[5]
210
+ end
211
+ end
212
+
213
+ def _nt_NetworkContent
214
+ start_index = index
215
+ if node_cache[:NetworkContent].has_key?(index)
216
+ cached = node_cache[:NetworkContent][index]
217
+ if cached
218
+ node_cache[:NetworkContent][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
219
+ @index = cached.interval.end
220
+ end
221
+ return cached
222
+ end
223
+
224
+ i0, s0 = index, []
225
+ r1 = _nt_SEP
226
+ s0 << r1
227
+ if r1
228
+ if (match_len = has_terminal?("{", false, index))
229
+ r2 = true
230
+ @index += match_len
231
+ else
232
+ terminal_parse_failure('"{"')
233
+ r2 = nil
234
+ end
235
+ s0 << r2
236
+ if r2
237
+ s3, i3 = [], index
238
+ loop do
239
+ i4, s4 = index, []
240
+ r5 = _nt_SEP
241
+ s4 << r5
242
+ if r5
243
+ r6 = _nt_Property
244
+ s4 << r6
245
+ end
246
+ if s4.last
247
+ r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
248
+ r4.extend(NetworkContent0)
249
+ else
250
+ @index = i4
251
+ r4 = nil
252
+ end
253
+ if r4
254
+ s3 << r4
255
+ else
256
+ break
257
+ end
258
+ end
259
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
260
+ s0 << r3
261
+ if r3
262
+ r7 = _nt_SEP
263
+ s0 << r7
264
+ if r7
265
+ if (match_len = has_terminal?("}", false, index))
266
+ r8 = true
267
+ @index += match_len
268
+ else
269
+ terminal_parse_failure('"}"')
270
+ r8 = nil
271
+ end
272
+ s0 << r8
273
+ if r8
274
+ r9 = _nt_SEP
275
+ s0 << r9
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end
281
+ if s0.last
282
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
283
+ r0.extend(NetworkContent1)
284
+ else
285
+ @index = i0
286
+ r0 = nil
287
+ end
288
+
289
+ node_cache[:NetworkContent][start_index] = r0
290
+
291
+ r0
292
+ end
293
+
294
+ module VariableDeclaration0
295
+ def SEP1
296
+ elements[0]
297
+ end
298
+
299
+ def VARIABLE
300
+ elements[1]
301
+ end
302
+
303
+ def SEP2
304
+ elements[2]
305
+ end
306
+
307
+ def probabilityVariableName
308
+ elements[3]
309
+ end
310
+
311
+ def SEP3
312
+ elements[4]
313
+ end
314
+
315
+ def variableContent
316
+ elements[5]
317
+ end
318
+
319
+ def SEP4
320
+ elements[6]
321
+ end
322
+ end
323
+
324
+ module VariableDeclaration1
325
+ def node
326
+ values = variableContent.values
327
+ [probabilityVariableName.text_value.to_sym, values]
328
+ end
329
+ end
330
+
331
+ def _nt_VariableDeclaration
332
+ start_index = index
333
+ if node_cache[:VariableDeclaration].has_key?(index)
334
+ cached = node_cache[:VariableDeclaration][index]
335
+ if cached
336
+ node_cache[:VariableDeclaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
337
+ @index = cached.interval.end
338
+ end
339
+ return cached
340
+ end
341
+
342
+ i0, s0 = index, []
343
+ r1 = _nt_SEP
344
+ s0 << r1
345
+ if r1
346
+ r2 = _nt_VARIABLE
347
+ s0 << r2
348
+ if r2
349
+ r3 = _nt_SEP
350
+ s0 << r3
351
+ if r3
352
+ r4 = _nt_probabilityVariableName
353
+ s0 << r4
354
+ if r4
355
+ r5 = _nt_SEP
356
+ s0 << r5
357
+ if r5
358
+ r6 = _nt_variableContent
359
+ s0 << r6
360
+ if r6
361
+ r7 = _nt_SEP
362
+ s0 << r7
363
+ end
364
+ end
365
+ end
366
+ end
367
+ end
368
+ end
369
+ if s0.last
370
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
371
+ r0.extend(VariableDeclaration0)
372
+ r0.extend(VariableDeclaration1)
373
+ else
374
+ @index = i0
375
+ r0 = nil
376
+ end
377
+
378
+ node_cache[:VariableDeclaration][start_index] = r0
379
+
380
+ r0
381
+ end
382
+
383
+ module VariableContent0
384
+ def SEP
385
+ elements[0]
386
+ end
387
+
388
+ def Property
389
+ elements[1]
390
+ end
391
+ end
392
+
393
+ module VariableContent1
394
+ def SEP1
395
+ elements[0]
396
+ end
397
+
398
+ def list
399
+ elements[2]
400
+ end
401
+
402
+ def SEP2
403
+ elements[3]
404
+ end
405
+
406
+ def SEP3
407
+ elements[5]
408
+ end
409
+ end
410
+
411
+ module VariableContent2
412
+ def values
413
+ list.elements.select { |e| e.respond_to?(:values) }.map(&:values).flatten
414
+ end
415
+ end
416
+
417
+ def _nt_variableContent
418
+ start_index = index
419
+ if node_cache[:variableContent].has_key?(index)
420
+ cached = node_cache[:variableContent][index]
421
+ if cached
422
+ node_cache[:variableContent][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
423
+ @index = cached.interval.end
424
+ end
425
+ return cached
426
+ end
427
+
428
+ i0, s0 = index, []
429
+ r1 = _nt_SEP
430
+ s0 << r1
431
+ if r1
432
+ if (match_len = has_terminal?("{", false, index))
433
+ r2 = true
434
+ @index += match_len
435
+ else
436
+ terminal_parse_failure('"{"')
437
+ r2 = nil
438
+ end
439
+ s0 << r2
440
+ if r2
441
+ s3, i3 = [], index
442
+ loop do
443
+ i4 = index
444
+ i5, s5 = index, []
445
+ r6 = _nt_SEP
446
+ s5 << r6
447
+ if r6
448
+ r7 = _nt_Property
449
+ s5 << r7
450
+ end
451
+ if s5.last
452
+ r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
453
+ r5.extend(VariableContent0)
454
+ else
455
+ @index = i5
456
+ r5 = nil
457
+ end
458
+ if r5
459
+ r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
460
+ r4 = r5
461
+ else
462
+ r8 = _nt_variableDiscrete
463
+ if r8
464
+ r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
465
+ r4 = r8
466
+ else
467
+ @index = i4
468
+ r4 = nil
469
+ end
470
+ end
471
+ if r4
472
+ s3 << r4
473
+ else
474
+ break
475
+ end
476
+ end
477
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
478
+ s0 << r3
479
+ if r3
480
+ r9 = _nt_SEP
481
+ s0 << r9
482
+ if r9
483
+ if (match_len = has_terminal?("}", false, index))
484
+ r10 = true
485
+ @index += match_len
486
+ else
487
+ terminal_parse_failure('"}"')
488
+ r10 = nil
489
+ end
490
+ s0 << r10
491
+ if r10
492
+ r11 = _nt_SEP
493
+ s0 << r11
494
+ end
495
+ end
496
+ end
497
+ end
498
+ end
499
+ if s0.last
500
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
501
+ r0.extend(VariableContent1)
502
+ r0.extend(VariableContent2)
503
+ else
504
+ @index = i0
505
+ r0 = nil
506
+ end
507
+
508
+ node_cache[:variableContent][start_index] = r0
509
+
510
+ r0
511
+ end
512
+
513
+ module VariableDiscrete0
514
+ def SEP1
515
+ elements[0]
516
+ end
517
+
518
+ def VARIABLETYPE
519
+ elements[1]
520
+ end
521
+
522
+ def SEP2
523
+ elements[2]
524
+ end
525
+
526
+ def DISCRETE
527
+ elements[3]
528
+ end
529
+
530
+ def SEP3
531
+ elements[4]
532
+ end
533
+
534
+ def SEP4
535
+ elements[6]
536
+ end
537
+
538
+ def DECIMAL_LITERAL
539
+ elements[7]
540
+ end
541
+
542
+ def SEP5
543
+ elements[8]
544
+ end
545
+
546
+ def SEP6
547
+ elements[10]
548
+ end
549
+
550
+ def SEP7
551
+ elements[12]
552
+ end
553
+
554
+ def variableValuesList
555
+ elements[13]
556
+ end
557
+
558
+ def SEP8
559
+ elements[14]
560
+ end
561
+
562
+ def SEP9
563
+ elements[16]
564
+ end
565
+
566
+ def SEP10
567
+ elements[18]
568
+ end
569
+ end
570
+
571
+ module VariableDiscrete1
572
+ def values
573
+ variableValuesList.values
574
+ end
575
+ end
576
+
577
+ def _nt_variableDiscrete
578
+ start_index = index
579
+ if node_cache[:variableDiscrete].has_key?(index)
580
+ cached = node_cache[:variableDiscrete][index]
581
+ if cached
582
+ node_cache[:variableDiscrete][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
583
+ @index = cached.interval.end
584
+ end
585
+ return cached
586
+ end
587
+
588
+ i0, s0 = index, []
589
+ r1 = _nt_SEP
590
+ s0 << r1
591
+ if r1
592
+ r2 = _nt_VARIABLETYPE
593
+ s0 << r2
594
+ if r2
595
+ r3 = _nt_SEP
596
+ s0 << r3
597
+ if r3
598
+ r4 = _nt_DISCRETE
599
+ s0 << r4
600
+ if r4
601
+ r5 = _nt_SEP
602
+ s0 << r5
603
+ if r5
604
+ if (match_len = has_terminal?("[", false, index))
605
+ r6 = true
606
+ @index += match_len
607
+ else
608
+ terminal_parse_failure('"["')
609
+ r6 = nil
610
+ end
611
+ s0 << r6
612
+ if r6
613
+ r7 = _nt_SEP
614
+ s0 << r7
615
+ if r7
616
+ r8 = _nt_DECIMAL_LITERAL
617
+ s0 << r8
618
+ if r8
619
+ r9 = _nt_SEP
620
+ s0 << r9
621
+ if r9
622
+ if (match_len = has_terminal?("]", false, index))
623
+ r10 = true
624
+ @index += match_len
625
+ else
626
+ terminal_parse_failure('"]"')
627
+ r10 = nil
628
+ end
629
+ s0 << r10
630
+ if r10
631
+ r11 = _nt_SEP
632
+ s0 << r11
633
+ if r11
634
+ if (match_len = has_terminal?("{", false, index))
635
+ r12 = true
636
+ @index += match_len
637
+ else
638
+ terminal_parse_failure('"{"')
639
+ r12 = nil
640
+ end
641
+ s0 << r12
642
+ if r12
643
+ r13 = _nt_SEP
644
+ s0 << r13
645
+ if r13
646
+ r14 = _nt_variableValuesList
647
+ s0 << r14
648
+ if r14
649
+ r15 = _nt_SEP
650
+ s0 << r15
651
+ if r15
652
+ if (match_len = has_terminal?("}", false, index))
653
+ r16 = true
654
+ @index += match_len
655
+ else
656
+ terminal_parse_failure('"}"')
657
+ r16 = nil
658
+ end
659
+ s0 << r16
660
+ if r16
661
+ r17 = _nt_SEP
662
+ s0 << r17
663
+ if r17
664
+ if (match_len = has_terminal?(";", false, index))
665
+ r18 = true
666
+ @index += match_len
667
+ else
668
+ terminal_parse_failure('";"')
669
+ r18 = nil
670
+ end
671
+ s0 << r18
672
+ if r18
673
+ r19 = _nt_SEP
674
+ s0 << r19
675
+ end
676
+ end
677
+ end
678
+ end
679
+ end
680
+ end
681
+ end
682
+ end
683
+ end
684
+ end
685
+ end
686
+ end
687
+ end
688
+ end
689
+ end
690
+ end
691
+ end
692
+ end
693
+ if s0.last
694
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
695
+ r0.extend(VariableDiscrete0)
696
+ r0.extend(VariableDiscrete1)
697
+ else
698
+ @index = i0
699
+ r0 = nil
700
+ end
701
+
702
+ node_cache[:variableDiscrete][start_index] = r0
703
+
704
+ r0
705
+ end
706
+
707
+ module VariableValuesList0
708
+ def SEP
709
+ elements[0]
710
+ end
711
+
712
+ def probabilityVariableValue
713
+ elements[1]
714
+ end
715
+ end
716
+
717
+ module VariableValuesList1
718
+ def SEP
719
+ elements[0]
720
+ end
721
+
722
+ def probabilityVariableValue
723
+ elements[1]
724
+ end
725
+
726
+ def list
727
+ elements[2]
728
+ end
729
+ end
730
+
731
+ module VariableValuesList2
732
+ def values
733
+ [probabilityVariableValue.value] + list.elements.map { |e| e.elements[1].value }.flatten
734
+ end
735
+ end
736
+
737
+ def _nt_variableValuesList
738
+ start_index = index
739
+ if node_cache[:variableValuesList].has_key?(index)
740
+ cached = node_cache[:variableValuesList][index]
741
+ if cached
742
+ node_cache[:variableValuesList][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
743
+ @index = cached.interval.end
744
+ end
745
+ return cached
746
+ end
747
+
748
+ i0, s0 = index, []
749
+ r1 = _nt_SEP
750
+ s0 << r1
751
+ if r1
752
+ r2 = _nt_probabilityVariableValue
753
+ s0 << r2
754
+ if r2
755
+ s3, i3 = [], index
756
+ loop do
757
+ i4, s4 = index, []
758
+ r5 = _nt_SEP
759
+ s4 << r5
760
+ if r5
761
+ r6 = _nt_probabilityVariableValue
762
+ s4 << r6
763
+ end
764
+ if s4.last
765
+ r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
766
+ r4.extend(VariableValuesList0)
767
+ else
768
+ @index = i4
769
+ r4 = nil
770
+ end
771
+ if r4
772
+ s3 << r4
773
+ else
774
+ break
775
+ end
776
+ end
777
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
778
+ s0 << r3
779
+ end
780
+ end
781
+ if s0.last
782
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
783
+ r0.extend(VariableValuesList1)
784
+ r0.extend(VariableValuesList2)
785
+ else
786
+ @index = i0
787
+ r0 = nil
788
+ end
789
+
790
+ node_cache[:variableValuesList][start_index] = r0
791
+
792
+ r0
793
+ end
794
+
795
+ module ProbabilityVariableValue0
796
+ def value
797
+ self.text_value.to_sym
798
+ end
799
+ end
800
+
801
+ def _nt_probabilityVariableValue
802
+ start_index = index
803
+ if node_cache[:probabilityVariableValue].has_key?(index)
804
+ cached = node_cache[:probabilityVariableValue][index]
805
+ if cached
806
+ node_cache[:probabilityVariableValue][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
807
+ @index = cached.interval.end
808
+ end
809
+ return cached
810
+ end
811
+
812
+ r0 = _nt_VALUE
813
+ r0.extend(ProbabilityVariableValue0)
814
+ r0.extend(ProbabilityVariableValue0)
815
+
816
+ node_cache[:probabilityVariableValue][start_index] = r0
817
+
818
+ r0
819
+ end
820
+
821
+ module ProbabilityDeclaration0
822
+ def SEP1
823
+ elements[0]
824
+ end
825
+
826
+ def PROBABILITY
827
+ elements[1]
828
+ end
829
+
830
+ def SEP2
831
+ elements[2]
832
+ end
833
+
834
+ def probabilityVariablesList
835
+ elements[3]
836
+ end
837
+
838
+ def SEP3
839
+ elements[4]
840
+ end
841
+
842
+ def probabilityContent
843
+ elements[5]
844
+ end
845
+
846
+ def SEP4
847
+ elements[6]
848
+ end
849
+ end
850
+
851
+ module ProbabilityDeclaration1
852
+ def cpt
853
+ { variable: probabilityVariablesList.value,
854
+ parents: probabilityVariablesList.parents,
855
+ cpt: probabilityContent.cpt}
856
+ end
857
+ end
858
+
859
+ def _nt_ProbabilityDeclaration
860
+ start_index = index
861
+ if node_cache[:ProbabilityDeclaration].has_key?(index)
862
+ cached = node_cache[:ProbabilityDeclaration][index]
863
+ if cached
864
+ node_cache[:ProbabilityDeclaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
865
+ @index = cached.interval.end
866
+ end
867
+ return cached
868
+ end
869
+
870
+ i0, s0 = index, []
871
+ r1 = _nt_SEP
872
+ s0 << r1
873
+ if r1
874
+ r2 = _nt_PROBABILITY
875
+ s0 << r2
876
+ if r2
877
+ r3 = _nt_SEP
878
+ s0 << r3
879
+ if r3
880
+ r4 = _nt_probabilityVariablesList
881
+ s0 << r4
882
+ if r4
883
+ r5 = _nt_SEP
884
+ s0 << r5
885
+ if r5
886
+ r6 = _nt_probabilityContent
887
+ s0 << r6
888
+ if r6
889
+ r7 = _nt_SEP
890
+ s0 << r7
891
+ end
892
+ end
893
+ end
894
+ end
895
+ end
896
+ end
897
+ if s0.last
898
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
899
+ r0.extend(ProbabilityDeclaration0)
900
+ r0.extend(ProbabilityDeclaration1)
901
+ else
902
+ @index = i0
903
+ r0 = nil
904
+ end
905
+
906
+ node_cache[:ProbabilityDeclaration][start_index] = r0
907
+
908
+ r0
909
+ end
910
+
911
+ module ProbabilityVariablesList0
912
+ def SEP
913
+ elements[0]
914
+ end
915
+
916
+ def probabilityVariableName
917
+ elements[1]
918
+ end
919
+ end
920
+
921
+ module ProbabilityVariablesList1
922
+ def SEP1
923
+ elements[0]
924
+ end
925
+
926
+ def SEP2
927
+ elements[2]
928
+ end
929
+
930
+ def probabilityVariableName
931
+ elements[3]
932
+ end
933
+
934
+ def list
935
+ elements[4]
936
+ end
937
+
938
+ def SEP3
939
+ elements[5]
940
+ end
941
+
942
+ def SEP4
943
+ elements[7]
944
+ end
945
+ end
946
+
947
+ module ProbabilityVariablesList2
948
+ def value
949
+ probabilityVariableName.value
950
+ end
951
+
952
+ def parents
953
+ list.elements.map { |e| e.elements[1].value }.flatten
954
+ end
955
+ end
956
+
957
+ def _nt_probabilityVariablesList
958
+ start_index = index
959
+ if node_cache[:probabilityVariablesList].has_key?(index)
960
+ cached = node_cache[:probabilityVariablesList][index]
961
+ if cached
962
+ node_cache[:probabilityVariablesList][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
963
+ @index = cached.interval.end
964
+ end
965
+ return cached
966
+ end
967
+
968
+ i0, s0 = index, []
969
+ r1 = _nt_SEP
970
+ s0 << r1
971
+ if r1
972
+ if (match_len = has_terminal?("(", false, index))
973
+ r2 = true
974
+ @index += match_len
975
+ else
976
+ terminal_parse_failure('"("')
977
+ r2 = nil
978
+ end
979
+ s0 << r2
980
+ if r2
981
+ r3 = _nt_SEP
982
+ s0 << r3
983
+ if r3
984
+ r4 = _nt_probabilityVariableName
985
+ s0 << r4
986
+ if r4
987
+ s5, i5 = [], index
988
+ loop do
989
+ i6, s6 = index, []
990
+ r7 = _nt_SEP
991
+ s6 << r7
992
+ if r7
993
+ r8 = _nt_probabilityVariableName
994
+ s6 << r8
995
+ end
996
+ if s6.last
997
+ r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
998
+ r6.extend(ProbabilityVariablesList0)
999
+ else
1000
+ @index = i6
1001
+ r6 = nil
1002
+ end
1003
+ if r6
1004
+ s5 << r6
1005
+ else
1006
+ break
1007
+ end
1008
+ end
1009
+ r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
1010
+ s0 << r5
1011
+ if r5
1012
+ r9 = _nt_SEP
1013
+ s0 << r9
1014
+ if r9
1015
+ if (match_len = has_terminal?(")", false, index))
1016
+ r10 = true
1017
+ @index += match_len
1018
+ else
1019
+ terminal_parse_failure('")"')
1020
+ r10 = nil
1021
+ end
1022
+ s0 << r10
1023
+ if r10
1024
+ r11 = _nt_SEP
1025
+ s0 << r11
1026
+ end
1027
+ end
1028
+ end
1029
+ end
1030
+ end
1031
+ end
1032
+ end
1033
+ if s0.last
1034
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1035
+ r0.extend(ProbabilityVariablesList1)
1036
+ r0.extend(ProbabilityVariablesList2)
1037
+ else
1038
+ @index = i0
1039
+ r0 = nil
1040
+ end
1041
+
1042
+ node_cache[:probabilityVariablesList][start_index] = r0
1043
+
1044
+ r0
1045
+ end
1046
+
1047
+ module ProbabilityVariableName0
1048
+ def value
1049
+ self.text_value.to_sym
1050
+ end
1051
+ end
1052
+
1053
+ def _nt_probabilityVariableName
1054
+ start_index = index
1055
+ if node_cache[:probabilityVariableName].has_key?(index)
1056
+ cached = node_cache[:probabilityVariableName][index]
1057
+ if cached
1058
+ node_cache[:probabilityVariableName][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1059
+ @index = cached.interval.end
1060
+ end
1061
+ return cached
1062
+ end
1063
+
1064
+ r0 = _nt_WORD
1065
+ r0.extend(ProbabilityVariableName0)
1066
+ r0.extend(ProbabilityVariableName0)
1067
+
1068
+ node_cache[:probabilityVariableName][start_index] = r0
1069
+
1070
+ r0
1071
+ end
1072
+
1073
+ module ProbabilityContent0
1074
+ def SEP
1075
+ elements[0]
1076
+ end
1077
+
1078
+ def Property
1079
+ elements[1]
1080
+ end
1081
+ end
1082
+
1083
+ module ProbabilityContent1
1084
+ def SEP1
1085
+ elements[0]
1086
+ end
1087
+
1088
+ def SEP2
1089
+ elements[2]
1090
+ end
1091
+
1092
+ def list
1093
+ elements[3]
1094
+ end
1095
+
1096
+ def SEP3
1097
+ elements[4]
1098
+ end
1099
+
1100
+ def SEP4
1101
+ elements[6]
1102
+ end
1103
+ end
1104
+
1105
+ module ProbabilityContent2
1106
+ def cpt
1107
+ distributions = list.elements.select { |e| e.respond_to?(:given) }.map do |e|
1108
+ {given: e.given,
1109
+ distribution: e.distribution}
1110
+ end
1111
+ table = list.elements.select { |e| e.respond_to?(:table) }.map do |e|
1112
+ {table: e.table}
1113
+ end
1114
+ if distributions.empty? && !table.empty?
1115
+ return table.first
1116
+ elsif !distributions.empty? && table.empty?
1117
+ return distributions
1118
+ elsif distributions.empty? && table.empty?
1119
+ raise "Either distributions or table must be provided"
1120
+ else
1121
+ raise "Both - distributions or table cannot be provided at the same time"
1122
+ end
1123
+ end
1124
+ end
1125
+
1126
+ def _nt_probabilityContent
1127
+ start_index = index
1128
+ if node_cache[:probabilityContent].has_key?(index)
1129
+ cached = node_cache[:probabilityContent][index]
1130
+ if cached
1131
+ node_cache[:probabilityContent][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1132
+ @index = cached.interval.end
1133
+ end
1134
+ return cached
1135
+ end
1136
+
1137
+ i0, s0 = index, []
1138
+ r1 = _nt_SEP
1139
+ s0 << r1
1140
+ if r1
1141
+ if (match_len = has_terminal?("{", false, index))
1142
+ r2 = true
1143
+ @index += match_len
1144
+ else
1145
+ terminal_parse_failure('"{"')
1146
+ r2 = nil
1147
+ end
1148
+ s0 << r2
1149
+ if r2
1150
+ r3 = _nt_SEP
1151
+ s0 << r3
1152
+ if r3
1153
+ s4, i4 = [], index
1154
+ loop do
1155
+ i5 = index
1156
+ i6, s6 = index, []
1157
+ r7 = _nt_SEP
1158
+ s6 << r7
1159
+ if r7
1160
+ r8 = _nt_Property
1161
+ s6 << r8
1162
+ end
1163
+ if s6.last
1164
+ r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
1165
+ r6.extend(ProbabilityContent0)
1166
+ else
1167
+ @index = i6
1168
+ r6 = nil
1169
+ end
1170
+ if r6
1171
+ r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
1172
+ r5 = r6
1173
+ else
1174
+ r9 = _nt_ProbabilityDefaultEntry
1175
+ if r9
1176
+ r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
1177
+ r5 = r9
1178
+ else
1179
+ r10 = _nt_ProbabilityEntry
1180
+ if r10
1181
+ r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
1182
+ r5 = r10
1183
+ else
1184
+ r11 = _nt_ProbabilityTable
1185
+ if r11
1186
+ r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
1187
+ r5 = r11
1188
+ else
1189
+ @index = i5
1190
+ r5 = nil
1191
+ end
1192
+ end
1193
+ end
1194
+ end
1195
+ if r5
1196
+ s4 << r5
1197
+ else
1198
+ break
1199
+ end
1200
+ end
1201
+ r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
1202
+ s0 << r4
1203
+ if r4
1204
+ r12 = _nt_SEP
1205
+ s0 << r12
1206
+ if r12
1207
+ if (match_len = has_terminal?("}", false, index))
1208
+ r13 = true
1209
+ @index += match_len
1210
+ else
1211
+ terminal_parse_failure('"}"')
1212
+ r13 = nil
1213
+ end
1214
+ s0 << r13
1215
+ if r13
1216
+ r14 = _nt_SEP
1217
+ s0 << r14
1218
+ end
1219
+ end
1220
+ end
1221
+ end
1222
+ end
1223
+ end
1224
+ if s0.last
1225
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1226
+ r0.extend(ProbabilityContent1)
1227
+ r0.extend(ProbabilityContent2)
1228
+ else
1229
+ @index = i0
1230
+ r0 = nil
1231
+ end
1232
+
1233
+ node_cache[:probabilityContent][start_index] = r0
1234
+
1235
+ r0
1236
+ end
1237
+
1238
+ module ProbabilityEntry0
1239
+ def SEP1
1240
+ elements[0]
1241
+ end
1242
+
1243
+ def probabilityValuesList
1244
+ elements[1]
1245
+ end
1246
+
1247
+ def SEP2
1248
+ elements[2]
1249
+ end
1250
+
1251
+ def floatingPointList
1252
+ elements[3]
1253
+ end
1254
+
1255
+ def SEP3
1256
+ elements[4]
1257
+ end
1258
+
1259
+ def SEP4
1260
+ elements[6]
1261
+ end
1262
+ end
1263
+
1264
+ module ProbabilityEntry1
1265
+ def given
1266
+ probabilityValuesList.values
1267
+ end
1268
+ def distribution
1269
+ floatingPointList.values
1270
+ end
1271
+ end
1272
+
1273
+ def _nt_ProbabilityEntry
1274
+ start_index = index
1275
+ if node_cache[:ProbabilityEntry].has_key?(index)
1276
+ cached = node_cache[:ProbabilityEntry][index]
1277
+ if cached
1278
+ node_cache[:ProbabilityEntry][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1279
+ @index = cached.interval.end
1280
+ end
1281
+ return cached
1282
+ end
1283
+
1284
+ i0, s0 = index, []
1285
+ r1 = _nt_SEP
1286
+ s0 << r1
1287
+ if r1
1288
+ r2 = _nt_probabilityValuesList
1289
+ s0 << r2
1290
+ if r2
1291
+ r3 = _nt_SEP
1292
+ s0 << r3
1293
+ if r3
1294
+ r4 = _nt_floatingPointList
1295
+ s0 << r4
1296
+ if r4
1297
+ r5 = _nt_SEP
1298
+ s0 << r5
1299
+ if r5
1300
+ if (match_len = has_terminal?(";", false, index))
1301
+ r6 = true
1302
+ @index += match_len
1303
+ else
1304
+ terminal_parse_failure('";"')
1305
+ r6 = nil
1306
+ end
1307
+ s0 << r6
1308
+ if r6
1309
+ r7 = _nt_SEP
1310
+ s0 << r7
1311
+ end
1312
+ end
1313
+ end
1314
+ end
1315
+ end
1316
+ end
1317
+ if s0.last
1318
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1319
+ r0.extend(ProbabilityEntry0)
1320
+ r0.extend(ProbabilityEntry1)
1321
+ else
1322
+ @index = i0
1323
+ r0 = nil
1324
+ end
1325
+
1326
+ node_cache[:ProbabilityEntry][start_index] = r0
1327
+
1328
+ r0
1329
+ end
1330
+
1331
+ module ProbabilityValuesList0
1332
+ def SEP
1333
+ elements[0]
1334
+ end
1335
+
1336
+ def probabilityVariableValue
1337
+ elements[1]
1338
+ end
1339
+ end
1340
+
1341
+ module ProbabilityValuesList1
1342
+ def SEP1
1343
+ elements[0]
1344
+ end
1345
+
1346
+ def SEP2
1347
+ elements[2]
1348
+ end
1349
+
1350
+ def probabilityVariableValue
1351
+ elements[3]
1352
+ end
1353
+
1354
+ def list
1355
+ elements[4]
1356
+ end
1357
+
1358
+ def SEP3
1359
+ elements[5]
1360
+ end
1361
+
1362
+ end
1363
+
1364
+ module ProbabilityValuesList2
1365
+ def values
1366
+ [probabilityVariableValue.value] + list.elements.map { |e| e.elements[1].value }
1367
+ end
1368
+ end
1369
+
1370
+ def _nt_probabilityValuesList
1371
+ start_index = index
1372
+ if node_cache[:probabilityValuesList].has_key?(index)
1373
+ cached = node_cache[:probabilityValuesList][index]
1374
+ if cached
1375
+ node_cache[:probabilityValuesList][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1376
+ @index = cached.interval.end
1377
+ end
1378
+ return cached
1379
+ end
1380
+
1381
+ i0, s0 = index, []
1382
+ r1 = _nt_SEP
1383
+ s0 << r1
1384
+ if r1
1385
+ if (match_len = has_terminal?("(", false, index))
1386
+ r2 = true
1387
+ @index += match_len
1388
+ else
1389
+ terminal_parse_failure('"("')
1390
+ r2 = nil
1391
+ end
1392
+ s0 << r2
1393
+ if r2
1394
+ r3 = _nt_SEP
1395
+ s0 << r3
1396
+ if r3
1397
+ r4 = _nt_probabilityVariableValue
1398
+ s0 << r4
1399
+ if r4
1400
+ s5, i5 = [], index
1401
+ loop do
1402
+ i6, s6 = index, []
1403
+ r7 = _nt_SEP
1404
+ s6 << r7
1405
+ if r7
1406
+ r8 = _nt_probabilityVariableValue
1407
+ s6 << r8
1408
+ end
1409
+ if s6.last
1410
+ r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
1411
+ r6.extend(ProbabilityValuesList0)
1412
+ else
1413
+ @index = i6
1414
+ r6 = nil
1415
+ end
1416
+ if r6
1417
+ s5 << r6
1418
+ else
1419
+ break
1420
+ end
1421
+ end
1422
+ r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
1423
+ s0 << r5
1424
+ if r5
1425
+ r9 = _nt_SEP
1426
+ s0 << r9
1427
+ if r9
1428
+ if (match_len = has_terminal?(")", false, index))
1429
+ r10 = true
1430
+ @index += match_len
1431
+ else
1432
+ terminal_parse_failure('")"')
1433
+ r10 = nil
1434
+ end
1435
+ s0 << r10
1436
+ end
1437
+ end
1438
+ end
1439
+ end
1440
+ end
1441
+ end
1442
+ if s0.last
1443
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1444
+ r0.extend(ProbabilityValuesList1)
1445
+ r0.extend(ProbabilityValuesList2)
1446
+ else
1447
+ @index = i0
1448
+ r0 = nil
1449
+ end
1450
+
1451
+ node_cache[:probabilityValuesList][start_index] = r0
1452
+
1453
+ r0
1454
+ end
1455
+
1456
+ module ProbabilityDefaultEntry0
1457
+ def SEP1
1458
+ elements[0]
1459
+ end
1460
+
1461
+ def floatingPointList
1462
+ elements[1]
1463
+ end
1464
+
1465
+ def SEP2
1466
+ elements[2]
1467
+ end
1468
+
1469
+ def SEP3
1470
+ elements[4]
1471
+ end
1472
+ end
1473
+
1474
+ module ProbabilityDefaultEntry1
1475
+ def values
1476
+ floatingPointList.values
1477
+ end
1478
+ end
1479
+
1480
+ def _nt_ProbabilityDefaultEntry
1481
+ start_index = index
1482
+ if node_cache[:ProbabilityDefaultEntry].has_key?(index)
1483
+ cached = node_cache[:ProbabilityDefaultEntry][index]
1484
+ if cached
1485
+ node_cache[:ProbabilityDefaultEntry][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1486
+ @index = cached.interval.end
1487
+ end
1488
+ return cached
1489
+ end
1490
+
1491
+ i0, s0 = index, []
1492
+ r1 = _nt_SEP
1493
+ s0 << r1
1494
+ if r1
1495
+ r2 = _nt_floatingPointList
1496
+ s0 << r2
1497
+ if r2
1498
+ r3 = _nt_SEP
1499
+ s0 << r3
1500
+ if r3
1501
+ if (match_len = has_terminal?(";", false, index))
1502
+ r4 = true
1503
+ @index += match_len
1504
+ else
1505
+ terminal_parse_failure('";"')
1506
+ r4 = nil
1507
+ end
1508
+ s0 << r4
1509
+ if r4
1510
+ r5 = _nt_SEP
1511
+ s0 << r5
1512
+ end
1513
+ end
1514
+ end
1515
+ end
1516
+ if s0.last
1517
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1518
+ r0.extend(ProbabilityDefaultEntry0)
1519
+ r0.extend(ProbabilityDefaultEntry1)
1520
+ else
1521
+ @index = i0
1522
+ r0 = nil
1523
+ end
1524
+
1525
+ node_cache[:ProbabilityDefaultEntry][start_index] = r0
1526
+
1527
+ r0
1528
+ end
1529
+
1530
+ module ProbabilityTable0
1531
+ def SEP1
1532
+ elements[0]
1533
+ end
1534
+
1535
+ def TABLEVALUE
1536
+ elements[1]
1537
+ end
1538
+
1539
+ def SEP2
1540
+ elements[2]
1541
+ end
1542
+
1543
+ def floatingPointList
1544
+ elements[3]
1545
+ end
1546
+
1547
+ def SEP3
1548
+ elements[4]
1549
+ end
1550
+
1551
+ def SEP4
1552
+ elements[6]
1553
+ end
1554
+ end
1555
+
1556
+ module ProbabilityTable1
1557
+ def table
1558
+ floatingPointList.values
1559
+ end
1560
+ end
1561
+
1562
+ def _nt_ProbabilityTable
1563
+ start_index = index
1564
+ if node_cache[:ProbabilityTable].has_key?(index)
1565
+ cached = node_cache[:ProbabilityTable][index]
1566
+ if cached
1567
+ node_cache[:ProbabilityTable][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1568
+ @index = cached.interval.end
1569
+ end
1570
+ return cached
1571
+ end
1572
+
1573
+ i0, s0 = index, []
1574
+ r1 = _nt_SEP
1575
+ s0 << r1
1576
+ if r1
1577
+ r2 = _nt_TABLEVALUE
1578
+ s0 << r2
1579
+ if r2
1580
+ r3 = _nt_SEP
1581
+ s0 << r3
1582
+ if r3
1583
+ r4 = _nt_floatingPointList
1584
+ s0 << r4
1585
+ if r4
1586
+ r5 = _nt_SEP
1587
+ s0 << r5
1588
+ if r5
1589
+ if (match_len = has_terminal?(";", false, index))
1590
+ r6 = true
1591
+ @index += match_len
1592
+ else
1593
+ terminal_parse_failure('";"')
1594
+ r6 = nil
1595
+ end
1596
+ s0 << r6
1597
+ if r6
1598
+ r7 = _nt_SEP
1599
+ s0 << r7
1600
+ end
1601
+ end
1602
+ end
1603
+ end
1604
+ end
1605
+ end
1606
+ if s0.last
1607
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1608
+ r0.extend(ProbabilityTable0)
1609
+ r0.extend(ProbabilityTable1)
1610
+ else
1611
+ @index = i0
1612
+ r0 = nil
1613
+ end
1614
+
1615
+ node_cache[:ProbabilityTable][start_index] = r0
1616
+
1617
+ r0
1618
+ end
1619
+
1620
+ module FloatingPointList0
1621
+ def SEP
1622
+ elements[0]
1623
+ end
1624
+
1625
+ def floatingPointToken
1626
+ elements[1]
1627
+ end
1628
+ end
1629
+
1630
+ module FloatingPointList1
1631
+ def SEP
1632
+ elements[0]
1633
+ end
1634
+
1635
+ def floatingPointToken
1636
+ elements[1]
1637
+ end
1638
+
1639
+ def list
1640
+ elements[2]
1641
+ end
1642
+ end
1643
+
1644
+ module FloatingPointList2
1645
+ def values
1646
+ [floatingPointToken.value] + list.elements.map {|e| e.elements[1]}.select { |e| e.respond_to?(:value) }.map(&:value)
1647
+ end
1648
+ end
1649
+
1650
+ def _nt_floatingPointList
1651
+ start_index = index
1652
+ if node_cache[:floatingPointList].has_key?(index)
1653
+ cached = node_cache[:floatingPointList][index]
1654
+ if cached
1655
+ node_cache[:floatingPointList][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1656
+ @index = cached.interval.end
1657
+ end
1658
+ return cached
1659
+ end
1660
+
1661
+ i0, s0 = index, []
1662
+ r1 = _nt_SEP
1663
+ s0 << r1
1664
+ if r1
1665
+ r2 = _nt_floatingPointToken
1666
+ s0 << r2
1667
+ if r2
1668
+ s3, i3 = [], index
1669
+ loop do
1670
+ i4, s4 = index, []
1671
+ r5 = _nt_SEP
1672
+ s4 << r5
1673
+ if r5
1674
+ r6 = _nt_floatingPointToken
1675
+ s4 << r6
1676
+ end
1677
+ if s4.last
1678
+ r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
1679
+ r4.extend(FloatingPointList0)
1680
+ else
1681
+ @index = i4
1682
+ r4 = nil
1683
+ end
1684
+ if r4
1685
+ s3 << r4
1686
+ else
1687
+ break
1688
+ end
1689
+ end
1690
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
1691
+ s0 << r3
1692
+ end
1693
+ end
1694
+ if s0.last
1695
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1696
+ r0.extend(FloatingPointList1)
1697
+ r0.extend(FloatingPointList2)
1698
+ else
1699
+ @index = i0
1700
+ r0 = nil
1701
+ end
1702
+
1703
+ node_cache[:floatingPointList][start_index] = r0
1704
+
1705
+ r0
1706
+ end
1707
+
1708
+ module FloatingPointToken0
1709
+ def value
1710
+ self.text_value.to_f
1711
+ end
1712
+ end
1713
+
1714
+ def _nt_floatingPointToken
1715
+ start_index = index
1716
+ if node_cache[:floatingPointToken].has_key?(index)
1717
+ cached = node_cache[:floatingPointToken][index]
1718
+ if cached
1719
+ node_cache[:floatingPointToken][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1720
+ @index = cached.interval.end
1721
+ end
1722
+ return cached
1723
+ end
1724
+
1725
+ r0 = _nt_FLOATING_POINT_LITERAL
1726
+ r0.extend(FloatingPointToken0)
1727
+ r0.extend(FloatingPointToken0)
1728
+
1729
+ node_cache[:floatingPointToken][start_index] = r0
1730
+
1731
+ r0
1732
+ end
1733
+
1734
+ def _nt_Property
1735
+ start_index = index
1736
+ if node_cache[:Property].has_key?(index)
1737
+ cached = node_cache[:Property][index]
1738
+ if cached
1739
+ node_cache[:Property][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1740
+ @index = cached.interval.end
1741
+ end
1742
+ return cached
1743
+ end
1744
+
1745
+ r0 = _nt_PROPERTYSTRING
1746
+
1747
+ node_cache[:Property][start_index] = r0
1748
+
1749
+ r0
1750
+ end
1751
+
1752
+ def _nt_NETWORK
1753
+ start_index = index
1754
+ if node_cache[:NETWORK].has_key?(index)
1755
+ cached = node_cache[:NETWORK][index]
1756
+ if cached
1757
+ node_cache[:NETWORK][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1758
+ @index = cached.interval.end
1759
+ end
1760
+ return cached
1761
+ end
1762
+
1763
+ if (match_len = has_terminal?('network', false, index))
1764
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1765
+ @index += match_len
1766
+ else
1767
+ terminal_parse_failure('\'network\'')
1768
+ r0 = nil
1769
+ end
1770
+
1771
+ node_cache[:NETWORK][start_index] = r0
1772
+
1773
+ r0
1774
+ end
1775
+
1776
+ def _nt_VARIABLE
1777
+ start_index = index
1778
+ if node_cache[:VARIABLE].has_key?(index)
1779
+ cached = node_cache[:VARIABLE][index]
1780
+ if cached
1781
+ node_cache[:VARIABLE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1782
+ @index = cached.interval.end
1783
+ end
1784
+ return cached
1785
+ end
1786
+
1787
+ if (match_len = has_terminal?('variable', false, index))
1788
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1789
+ @index += match_len
1790
+ else
1791
+ terminal_parse_failure('\'variable\'')
1792
+ r0 = nil
1793
+ end
1794
+
1795
+ node_cache[:VARIABLE][start_index] = r0
1796
+
1797
+ r0
1798
+ end
1799
+
1800
+ def _nt_PROBABILITY
1801
+ start_index = index
1802
+ if node_cache[:PROBABILITY].has_key?(index)
1803
+ cached = node_cache[:PROBABILITY][index]
1804
+ if cached
1805
+ node_cache[:PROBABILITY][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1806
+ @index = cached.interval.end
1807
+ end
1808
+ return cached
1809
+ end
1810
+
1811
+ if (match_len = has_terminal?('probability', false, index))
1812
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1813
+ @index += match_len
1814
+ else
1815
+ terminal_parse_failure('\'probability\'')
1816
+ r0 = nil
1817
+ end
1818
+
1819
+ node_cache[:PROBABILITY][start_index] = r0
1820
+
1821
+ r0
1822
+ end
1823
+
1824
+ def _nt_PROPERTY
1825
+ start_index = index
1826
+ if node_cache[:PROPERTY].has_key?(index)
1827
+ cached = node_cache[:PROPERTY][index]
1828
+ if cached
1829
+ node_cache[:PROPERTY][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1830
+ @index = cached.interval.end
1831
+ end
1832
+ return cached
1833
+ end
1834
+
1835
+ if (match_len = has_terminal?('property', false, index))
1836
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1837
+ @index += match_len
1838
+ else
1839
+ terminal_parse_failure('\'property\'')
1840
+ r0 = nil
1841
+ end
1842
+
1843
+ node_cache[:PROPERTY][start_index] = r0
1844
+
1845
+ r0
1846
+ end
1847
+
1848
+ def _nt_VARIABLETYPE
1849
+ start_index = index
1850
+ if node_cache[:VARIABLETYPE].has_key?(index)
1851
+ cached = node_cache[:VARIABLETYPE][index]
1852
+ if cached
1853
+ node_cache[:VARIABLETYPE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1854
+ @index = cached.interval.end
1855
+ end
1856
+ return cached
1857
+ end
1858
+
1859
+ if (match_len = has_terminal?('type', false, index))
1860
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1861
+ @index += match_len
1862
+ else
1863
+ terminal_parse_failure('\'type\'')
1864
+ r0 = nil
1865
+ end
1866
+
1867
+ node_cache[:VARIABLETYPE][start_index] = r0
1868
+
1869
+ r0
1870
+ end
1871
+
1872
+ def _nt_DISCRETE
1873
+ start_index = index
1874
+ if node_cache[:DISCRETE].has_key?(index)
1875
+ cached = node_cache[:DISCRETE][index]
1876
+ if cached
1877
+ node_cache[:DISCRETE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1878
+ @index = cached.interval.end
1879
+ end
1880
+ return cached
1881
+ end
1882
+
1883
+ if (match_len = has_terminal?('discrete', false, index))
1884
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1885
+ @index += match_len
1886
+ else
1887
+ terminal_parse_failure('\'discrete\'')
1888
+ r0 = nil
1889
+ end
1890
+
1891
+ node_cache[:DISCRETE][start_index] = r0
1892
+
1893
+ r0
1894
+ end
1895
+
1896
+ def _nt_DEFAULTVALUE
1897
+ start_index = index
1898
+ if node_cache[:DEFAULTVALUE].has_key?(index)
1899
+ cached = node_cache[:DEFAULTVALUE][index]
1900
+ if cached
1901
+ node_cache[:DEFAULTVALUE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1902
+ @index = cached.interval.end
1903
+ end
1904
+ return cached
1905
+ end
1906
+
1907
+ if (match_len = has_terminal?('default', false, index))
1908
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1909
+ @index += match_len
1910
+ else
1911
+ terminal_parse_failure('\'default\'')
1912
+ r0 = nil
1913
+ end
1914
+
1915
+ node_cache[:DEFAULTVALUE][start_index] = r0
1916
+
1917
+ r0
1918
+ end
1919
+
1920
+ def _nt_TABLEVALUE
1921
+ start_index = index
1922
+ if node_cache[:TABLEVALUE].has_key?(index)
1923
+ cached = node_cache[:TABLEVALUE][index]
1924
+ if cached
1925
+ node_cache[:TABLEVALUE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1926
+ @index = cached.interval.end
1927
+ end
1928
+ return cached
1929
+ end
1930
+
1931
+ if (match_len = has_terminal?('table', false, index))
1932
+ r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
1933
+ @index += match_len
1934
+ else
1935
+ terminal_parse_failure('\'table\'')
1936
+ r0 = nil
1937
+ end
1938
+
1939
+ node_cache[:TABLEVALUE][start_index] = r0
1940
+
1941
+ r0
1942
+ end
1943
+
1944
+ module WORD0
1945
+ def LETTER
1946
+ elements[0]
1947
+ end
1948
+
1949
+ end
1950
+
1951
+ def _nt_WORD
1952
+ start_index = index
1953
+ if node_cache[:WORD].has_key?(index)
1954
+ cached = node_cache[:WORD][index]
1955
+ if cached
1956
+ node_cache[:WORD][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1957
+ @index = cached.interval.end
1958
+ end
1959
+ return cached
1960
+ end
1961
+
1962
+ i0, s0 = index, []
1963
+ r1 = _nt_LETTER
1964
+ s0 << r1
1965
+ if r1
1966
+ s2, i2 = [], index
1967
+ loop do
1968
+ i3 = index
1969
+ r4 = _nt_LETTER
1970
+ if r4
1971
+ r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
1972
+ r3 = r4
1973
+ else
1974
+ r5 = _nt_DIGIT
1975
+ if r5
1976
+ r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
1977
+ r3 = r5
1978
+ else
1979
+ @index = i3
1980
+ r3 = nil
1981
+ end
1982
+ end
1983
+ if r3
1984
+ s2 << r3
1985
+ else
1986
+ break
1987
+ end
1988
+ end
1989
+ r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
1990
+ s0 << r2
1991
+ end
1992
+ if s0.last
1993
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1994
+ r0.extend(WORD0)
1995
+ else
1996
+ @index = i0
1997
+ r0 = nil
1998
+ end
1999
+
2000
+ node_cache[:WORD][start_index] = r0
2001
+
2002
+ r0
2003
+ end
2004
+
2005
+ def _nt_LETTER
2006
+ start_index = index
2007
+ if node_cache[:LETTER].has_key?(index)
2008
+ cached = node_cache[:LETTER][index]
2009
+ if cached
2010
+ node_cache[:LETTER][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2011
+ @index = cached.interval.end
2012
+ end
2013
+ return cached
2014
+ end
2015
+
2016
+ if has_terminal?(@regexps[gr = '\A[a-zA-Z_-]'] ||= Regexp.new(gr), :regexp, index)
2017
+ r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
2018
+ @index += 1
2019
+ else
2020
+ terminal_parse_failure('[a-zA-Z_-]')
2021
+ r0 = nil
2022
+ end
2023
+
2024
+ node_cache[:LETTER][start_index] = r0
2025
+
2026
+ r0
2027
+ end
2028
+
2029
+ def _nt_VALUE
2030
+ start_index = index
2031
+ if node_cache[:VALUE].has_key?(index)
2032
+ cached = node_cache[:VALUE][index]
2033
+ if cached
2034
+ node_cache[:VALUE][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2035
+ @index = cached.interval.end
2036
+ end
2037
+ return cached
2038
+ end
2039
+
2040
+ s0, i0 = [], index
2041
+ loop do
2042
+ if has_terminal?(@regexps[gr = '\A[/<>=.+a-zA-Z_0-9-]'] ||= Regexp.new(gr), :regexp, index)
2043
+ r1 = true
2044
+ @index += 1
2045
+ else
2046
+ terminal_parse_failure('[/<>=.+a-zA-Z_0-9-]')
2047
+ r1 = nil
2048
+ end
2049
+ if r1
2050
+ s0 << r1
2051
+ else
2052
+ break
2053
+ end
2054
+ end
2055
+ if s0.empty?
2056
+ @index = i0
2057
+ r0 = nil
2058
+ else
2059
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
2060
+ end
2061
+
2062
+ node_cache[:VALUE][start_index] = r0
2063
+
2064
+ r0
2065
+ end
2066
+
2067
+ def _nt_DIGIT
2068
+ start_index = index
2069
+ if node_cache[:DIGIT].has_key?(index)
2070
+ cached = node_cache[:DIGIT][index]
2071
+ if cached
2072
+ node_cache[:DIGIT][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2073
+ @index = cached.interval.end
2074
+ end
2075
+ return cached
2076
+ end
2077
+
2078
+ if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index)
2079
+ r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
2080
+ @index += 1
2081
+ else
2082
+ terminal_parse_failure('[0-9]')
2083
+ r0 = nil
2084
+ end
2085
+
2086
+ node_cache[:DIGIT][start_index] = r0
2087
+
2088
+ r0
2089
+ end
2090
+
2091
+ module DECIMALLITERAL0
2092
+ def DIGIT
2093
+ elements[0]
2094
+ end
2095
+
2096
+ end
2097
+
2098
+ def _nt_DECIMAL_LITERAL
2099
+ start_index = index
2100
+ if node_cache[:DECIMAL_LITERAL].has_key?(index)
2101
+ cached = node_cache[:DECIMAL_LITERAL][index]
2102
+ if cached
2103
+ node_cache[:DECIMAL_LITERAL][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2104
+ @index = cached.interval.end
2105
+ end
2106
+ return cached
2107
+ end
2108
+
2109
+ i0, s0 = index, []
2110
+ r1 = _nt_DIGIT
2111
+ s0 << r1
2112
+ if r1
2113
+ s2, i2 = [], index
2114
+ loop do
2115
+ r3 = _nt_DIGIT
2116
+ if r3
2117
+ s2 << r3
2118
+ else
2119
+ break
2120
+ end
2121
+ end
2122
+ r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
2123
+ s0 << r2
2124
+ end
2125
+ if s0.last
2126
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
2127
+ r0.extend(DECIMALLITERAL0)
2128
+ else
2129
+ @index = i0
2130
+ r0 = nil
2131
+ end
2132
+
2133
+ node_cache[:DECIMAL_LITERAL][start_index] = r0
2134
+
2135
+ r0
2136
+ end
2137
+
2138
+ module FLOATINGPOINTLITERAL0
2139
+ end
2140
+
2141
+ module FLOATINGPOINTLITERAL1
2142
+ end
2143
+
2144
+ module FLOATINGPOINTLITERAL2
2145
+ def EXPONENT
2146
+ elements[1]
2147
+ end
2148
+ end
2149
+
2150
+ def _nt_FLOATING_POINT_LITERAL
2151
+ start_index = index
2152
+ if node_cache[:FLOATING_POINT_LITERAL].has_key?(index)
2153
+ cached = node_cache[:FLOATING_POINT_LITERAL][index]
2154
+ if cached
2155
+ node_cache[:FLOATING_POINT_LITERAL][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2156
+ @index = cached.interval.end
2157
+ end
2158
+ return cached
2159
+ end
2160
+
2161
+ i0 = index
2162
+ i1, s1 = index, []
2163
+ s2, i2 = [], index
2164
+ loop do
2165
+ r3 = _nt_DIGIT
2166
+ if r3
2167
+ s2 << r3
2168
+ else
2169
+ break
2170
+ end
2171
+ end
2172
+ if s2.empty?
2173
+ @index = i2
2174
+ r2 = nil
2175
+ else
2176
+ r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
2177
+ end
2178
+ s1 << r2
2179
+ if r2
2180
+ if (match_len = has_terminal?('.', false, index))
2181
+ r4 = true
2182
+ @index += match_len
2183
+ else
2184
+ terminal_parse_failure('\'.\'')
2185
+ r4 = nil
2186
+ end
2187
+ s1 << r4
2188
+ if r4
2189
+ s5, i5 = [], index
2190
+ loop do
2191
+ r6 = _nt_DIGIT
2192
+ if r6
2193
+ s5 << r6
2194
+ else
2195
+ break
2196
+ end
2197
+ end
2198
+ r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
2199
+ s1 << r5
2200
+ if r5
2201
+ r8 = _nt_EXPONENT
2202
+ if r8
2203
+ r7 = r8
2204
+ else
2205
+ r7 = instantiate_node(SyntaxNode,input, index...index)
2206
+ end
2207
+ s1 << r7
2208
+ end
2209
+ end
2210
+ end
2211
+ if s1.last
2212
+ r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
2213
+ r1.extend(FLOATINGPOINTLITERAL0)
2214
+ else
2215
+ @index = i1
2216
+ r1 = nil
2217
+ end
2218
+ if r1
2219
+ r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
2220
+ r0 = r1
2221
+ else
2222
+ i9, s9 = index, []
2223
+ if (match_len = has_terminal?('.', false, index))
2224
+ r10 = true
2225
+ @index += match_len
2226
+ else
2227
+ terminal_parse_failure('\'.\'')
2228
+ r10 = nil
2229
+ end
2230
+ s9 << r10
2231
+ if r10
2232
+ s11, i11 = [], index
2233
+ loop do
2234
+ r12 = _nt_DIGIT
2235
+ if r12
2236
+ s11 << r12
2237
+ else
2238
+ break
2239
+ end
2240
+ end
2241
+ if s11.empty?
2242
+ @index = i11
2243
+ r11 = nil
2244
+ else
2245
+ r11 = instantiate_node(SyntaxNode,input, i11...index, s11)
2246
+ end
2247
+ s9 << r11
2248
+ if r11
2249
+ r14 = _nt_EXPONENT
2250
+ if r14
2251
+ r13 = r14
2252
+ else
2253
+ r13 = instantiate_node(SyntaxNode,input, index...index)
2254
+ end
2255
+ s9 << r13
2256
+ end
2257
+ end
2258
+ if s9.last
2259
+ r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
2260
+ r9.extend(FLOATINGPOINTLITERAL1)
2261
+ else
2262
+ @index = i9
2263
+ r9 = nil
2264
+ end
2265
+ if r9
2266
+ r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
2267
+ r0 = r9
2268
+ else
2269
+ i15, s15 = index, []
2270
+ s16, i16 = [], index
2271
+ loop do
2272
+ r17 = _nt_DIGIT
2273
+ if r17
2274
+ s16 << r17
2275
+ else
2276
+ break
2277
+ end
2278
+ end
2279
+ if s16.empty?
2280
+ @index = i16
2281
+ r16 = nil
2282
+ else
2283
+ r16 = instantiate_node(SyntaxNode,input, i16...index, s16)
2284
+ end
2285
+ s15 << r16
2286
+ if r16
2287
+ r18 = _nt_EXPONENT
2288
+ s15 << r18
2289
+ end
2290
+ if s15.last
2291
+ r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
2292
+ r15.extend(FLOATINGPOINTLITERAL2)
2293
+ else
2294
+ @index = i15
2295
+ r15 = nil
2296
+ end
2297
+ if r15
2298
+ r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
2299
+ r0 = r15
2300
+ else
2301
+ @index = i0
2302
+ r0 = nil
2303
+ end
2304
+ end
2305
+ end
2306
+
2307
+ node_cache[:FLOATING_POINT_LITERAL][start_index] = r0
2308
+
2309
+ r0
2310
+ end
2311
+
2312
+ module EXPONENT0
2313
+ end
2314
+
2315
+ def _nt_EXPONENT
2316
+ start_index = index
2317
+ if node_cache[:EXPONENT].has_key?(index)
2318
+ cached = node_cache[:EXPONENT][index]
2319
+ if cached
2320
+ node_cache[:EXPONENT][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2321
+ @index = cached.interval.end
2322
+ end
2323
+ return cached
2324
+ end
2325
+
2326
+ i0, s0 = index, []
2327
+ if has_terminal?(@regexps[gr = '\A[eE]'] ||= Regexp.new(gr), :regexp, index)
2328
+ r1 = true
2329
+ @index += 1
2330
+ else
2331
+ terminal_parse_failure('[eE]')
2332
+ r1 = nil
2333
+ end
2334
+ s0 << r1
2335
+ if r1
2336
+ if has_terminal?(@regexps[gr = '\A[+-]'] ||= Regexp.new(gr), :regexp, index)
2337
+ r3 = true
2338
+ @index += 1
2339
+ else
2340
+ terminal_parse_failure('[+-]')
2341
+ r3 = nil
2342
+ end
2343
+ if r3
2344
+ r2 = r3
2345
+ else
2346
+ r2 = instantiate_node(SyntaxNode,input, index...index)
2347
+ end
2348
+ s0 << r2
2349
+ if r2
2350
+ s4, i4 = [], index
2351
+ loop do
2352
+ r5 = _nt_DIGIT
2353
+ if r5
2354
+ s4 << r5
2355
+ else
2356
+ break
2357
+ end
2358
+ end
2359
+ if s4.empty?
2360
+ @index = i4
2361
+ r4 = nil
2362
+ else
2363
+ r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
2364
+ end
2365
+ s0 << r4
2366
+ end
2367
+ end
2368
+ if s0.last
2369
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
2370
+ r0.extend(EXPONENT0)
2371
+ else
2372
+ @index = i0
2373
+ r0 = nil
2374
+ end
2375
+
2376
+ node_cache[:EXPONENT][start_index] = r0
2377
+
2378
+ r0
2379
+ end
2380
+
2381
+ module PROPERTYSTRING0
2382
+ def PROPERTY
2383
+ elements[0]
2384
+ end
2385
+
2386
+ end
2387
+
2388
+ def _nt_PROPERTYSTRING
2389
+ start_index = index
2390
+ if node_cache[:PROPERTYSTRING].has_key?(index)
2391
+ cached = node_cache[:PROPERTYSTRING][index]
2392
+ if cached
2393
+ node_cache[:PROPERTYSTRING][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2394
+ @index = cached.interval.end
2395
+ end
2396
+ return cached
2397
+ end
2398
+
2399
+ i0, s0 = index, []
2400
+ r1 = _nt_PROPERTY
2401
+ s0 << r1
2402
+ if r1
2403
+ s2, i2 = [], index
2404
+ loop do
2405
+ if index < input_length
2406
+ r3 = true
2407
+ @index += 1
2408
+ else
2409
+ terminal_parse_failure("any character")
2410
+ r3 = nil
2411
+ end
2412
+ if r3
2413
+ s2 << r3
2414
+ else
2415
+ break
2416
+ end
2417
+ end
2418
+ r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
2419
+ s0 << r2
2420
+ if r2
2421
+ if (match_len = has_terminal?(';', false, index))
2422
+ r4 = true
2423
+ @index += match_len
2424
+ else
2425
+ terminal_parse_failure('\';\'')
2426
+ r4 = nil
2427
+ end
2428
+ s0 << r4
2429
+ end
2430
+ end
2431
+ if s0.last
2432
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
2433
+ r0.extend(PROPERTYSTRING0)
2434
+ else
2435
+ @index = i0
2436
+ r0 = nil
2437
+ end
2438
+
2439
+ node_cache[:PROPERTYSTRING][start_index] = r0
2440
+
2441
+ r0
2442
+ end
2443
+
2444
+ def _nt_SEP
2445
+ start_index = index
2446
+ if node_cache[:SEP].has_key?(index)
2447
+ cached = node_cache[:SEP][index]
2448
+ if cached
2449
+ node_cache[:SEP][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2450
+ @index = cached.interval.end
2451
+ end
2452
+ return cached
2453
+ end
2454
+
2455
+ s0, i0 = [], index
2456
+ loop do
2457
+ if has_terminal?(@regexps[gr = '\A[\\r\\n\\t ,|]'] ||= Regexp.new(gr), :regexp, index)
2458
+ r1 = true
2459
+ @index += 1
2460
+ else
2461
+ terminal_parse_failure('[\\r\\n\\t ,|]')
2462
+ r1 = nil
2463
+ end
2464
+ if r1
2465
+ s0 << r1
2466
+ else
2467
+ break
2468
+ end
2469
+ end
2470
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
2471
+
2472
+ node_cache[:SEP][start_index] = r0
2473
+
2474
+ r0
2475
+ end
2476
+
2477
+ end
2478
+
2479
+ class BifParser < Treetop::Runtime::CompiledParser
2480
+ include Bif
2481
+ end
2482
+
2483
+ end
2484
+ end