bel_parser 1.0.0.alpha.32-java → 1.0.0.alpha.34-java
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 996f6947dea38645e71e33efaebcead06ee5bab2
|
4
|
+
data.tar.gz: 09735f4b89e359c1a9c1a1b6e3d8b064ac451e33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41199f5fed91e227ad6d61d7b1b1d5d45cba45ee1b7424766e69f720510a1af09162898e96ed5be1d38f53c3befc0ba738491adcc4b9002d7319b0709e3b08ce
|
7
|
+
data.tar.gz: ef610f25771dcc034027b84099f40e0470b7529d858d068db7347864a93b58bc14aaca118e873a998c5b9eba83c8bff86fa175689b0476d24519bdf81cfd9716
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.alpha.
|
1
|
+
1.0.0.alpha.34
|
@@ -128,13 +128,14 @@ module BELParser
|
|
128
128
|
end
|
129
129
|
return nil if statement.nil?
|
130
130
|
|
131
|
-
spec
|
131
|
+
spec ||= BELParser::Language.latest_supported_specification
|
132
|
+
comment = statement.comment && statement.comment.children[0]
|
132
133
|
|
133
134
|
Statement.new(
|
134
135
|
ast_to_term(statement.subject.term, spec, namespaces),
|
135
136
|
convert_relationship(statement.relationship, spec),
|
136
137
|
convert_object(statement.object, spec, namespaces),
|
137
|
-
|
138
|
+
comment)
|
138
139
|
end
|
139
140
|
|
140
141
|
def convert_relationship(ast, spec)
|
@@ -1558,7 +1558,9 @@ begin
|
|
1558
1558
|
when 23 then
|
1559
1559
|
begin
|
1560
1560
|
|
1561
|
-
|
1561
|
+
comment = @buffers[:comment] ||= comment(nil)
|
1562
|
+
statement = @buffers[:statement_stack][-1] << comment
|
1563
|
+
yield nested_statement(statement)
|
1562
1564
|
end
|
1563
1565
|
when 11 then
|
1564
1566
|
begin
|
@@ -1762,7 +1764,9 @@ begin
|
|
1762
1764
|
end
|
1763
1765
|
begin
|
1764
1766
|
|
1765
|
-
|
1767
|
+
comment = @buffers[:comment] ||= comment(nil)
|
1768
|
+
statement = @buffers[:statement_stack][-1] << comment
|
1769
|
+
yield nested_statement(statement)
|
1766
1770
|
end
|
1767
1771
|
when 18 then
|
1768
1772
|
begin
|
@@ -1873,7 +1877,7 @@ begin
|
|
1873
1877
|
end
|
1874
1878
|
begin
|
1875
1879
|
|
1876
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
1880
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
1877
1881
|
end
|
1878
1882
|
begin
|
1879
1883
|
|
@@ -2024,7 +2028,7 @@ begin
|
|
2024
2028
|
end
|
2025
2029
|
begin
|
2026
2030
|
|
2027
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
2031
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
2028
2032
|
end
|
2029
2033
|
begin
|
2030
2034
|
|
@@ -2062,7 +2066,7 @@ begin
|
|
2062
2066
|
end
|
2063
2067
|
begin
|
2064
2068
|
|
2065
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
2069
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
2066
2070
|
end
|
2067
2071
|
begin
|
2068
2072
|
|
@@ -3774,7 +3778,9 @@ begin
|
|
3774
3778
|
when 23 then
|
3775
3779
|
begin
|
3776
3780
|
|
3777
|
-
|
3781
|
+
comment = @buffers[:comment] ||= comment(nil)
|
3782
|
+
statement = @buffers[:statement_stack][-1] << comment
|
3783
|
+
yield nested_statement(statement)
|
3778
3784
|
end
|
3779
3785
|
when 11 then
|
3780
3786
|
begin
|
@@ -3978,7 +3984,9 @@ begin
|
|
3978
3984
|
end
|
3979
3985
|
begin
|
3980
3986
|
|
3981
|
-
|
3987
|
+
comment = @buffers[:comment] ||= comment(nil)
|
3988
|
+
statement = @buffers[:statement_stack][-1] << comment
|
3989
|
+
yield nested_statement(statement)
|
3982
3990
|
end
|
3983
3991
|
when 18 then
|
3984
3992
|
begin
|
@@ -4089,7 +4097,7 @@ begin
|
|
4089
4097
|
end
|
4090
4098
|
begin
|
4091
4099
|
|
4092
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
4100
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
4093
4101
|
end
|
4094
4102
|
begin
|
4095
4103
|
|
@@ -4240,7 +4248,7 @@ begin
|
|
4240
4248
|
end
|
4241
4249
|
begin
|
4242
4250
|
|
4243
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
4251
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
4244
4252
|
end
|
4245
4253
|
begin
|
4246
4254
|
|
@@ -4278,7 +4286,7 @@ begin
|
|
4278
4286
|
end
|
4279
4287
|
begin
|
4280
4288
|
|
4281
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
4289
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
4282
4290
|
end
|
4283
4291
|
begin
|
4284
4292
|
|
@@ -5990,7 +5998,9 @@ begin
|
|
5990
5998
|
when 23 then
|
5991
5999
|
begin
|
5992
6000
|
|
5993
|
-
|
6001
|
+
comment = @buffers[:comment] ||= comment(nil)
|
6002
|
+
statement = @buffers[:statement_stack][-1] << comment
|
6003
|
+
yield nested_statement(statement)
|
5994
6004
|
end
|
5995
6005
|
when 11 then
|
5996
6006
|
begin
|
@@ -6194,7 +6204,9 @@ begin
|
|
6194
6204
|
end
|
6195
6205
|
begin
|
6196
6206
|
|
6197
|
-
|
6207
|
+
comment = @buffers[:comment] ||= comment(nil)
|
6208
|
+
statement = @buffers[:statement_stack][-1] << comment
|
6209
|
+
yield nested_statement(statement)
|
6198
6210
|
end
|
6199
6211
|
when 18 then
|
6200
6212
|
begin
|
@@ -6305,7 +6317,7 @@ begin
|
|
6305
6317
|
end
|
6306
6318
|
begin
|
6307
6319
|
|
6308
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
6320
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
6309
6321
|
end
|
6310
6322
|
begin
|
6311
6323
|
|
@@ -6456,7 +6468,7 @@ begin
|
|
6456
6468
|
end
|
6457
6469
|
begin
|
6458
6470
|
|
6459
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
6471
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
6460
6472
|
end
|
6461
6473
|
begin
|
6462
6474
|
|
@@ -6494,7 +6506,7 @@ begin
|
|
6494
6506
|
end
|
6495
6507
|
begin
|
6496
6508
|
|
6497
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
6509
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
6498
6510
|
end
|
6499
6511
|
begin
|
6500
6512
|
|
@@ -8206,7 +8218,9 @@ begin
|
|
8206
8218
|
when 23 then
|
8207
8219
|
begin
|
8208
8220
|
|
8209
|
-
|
8221
|
+
comment = @buffers[:comment] ||= comment(nil)
|
8222
|
+
statement = @buffers[:statement_stack][-1] << comment
|
8223
|
+
yield nested_statement(statement)
|
8210
8224
|
end
|
8211
8225
|
when 11 then
|
8212
8226
|
begin
|
@@ -8410,7 +8424,9 @@ begin
|
|
8410
8424
|
end
|
8411
8425
|
begin
|
8412
8426
|
|
8413
|
-
|
8427
|
+
comment = @buffers[:comment] ||= comment(nil)
|
8428
|
+
statement = @buffers[:statement_stack][-1] << comment
|
8429
|
+
yield nested_statement(statement)
|
8414
8430
|
end
|
8415
8431
|
when 18 then
|
8416
8432
|
begin
|
@@ -8521,7 +8537,7 @@ begin
|
|
8521
8537
|
end
|
8522
8538
|
begin
|
8523
8539
|
|
8524
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
8540
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
8525
8541
|
end
|
8526
8542
|
begin
|
8527
8543
|
|
@@ -8672,7 +8688,7 @@ begin
|
|
8672
8688
|
end
|
8673
8689
|
begin
|
8674
8690
|
|
8675
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
8691
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
8676
8692
|
end
|
8677
8693
|
begin
|
8678
8694
|
|
@@ -8710,7 +8726,7 @@ begin
|
|
8710
8726
|
end
|
8711
8727
|
begin
|
8712
8728
|
|
8713
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
8729
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
8714
8730
|
end
|
8715
8731
|
begin
|
8716
8732
|
|
@@ -10422,7 +10438,9 @@ begin
|
|
10422
10438
|
when 23 then
|
10423
10439
|
begin
|
10424
10440
|
|
10425
|
-
|
10441
|
+
comment = @buffers[:comment] ||= comment(nil)
|
10442
|
+
statement = @buffers[:statement_stack][-1] << comment
|
10443
|
+
yield nested_statement(statement)
|
10426
10444
|
end
|
10427
10445
|
when 11 then
|
10428
10446
|
begin
|
@@ -10626,7 +10644,9 @@ begin
|
|
10626
10644
|
end
|
10627
10645
|
begin
|
10628
10646
|
|
10629
|
-
|
10647
|
+
comment = @buffers[:comment] ||= comment(nil)
|
10648
|
+
statement = @buffers[:statement_stack][-1] << comment
|
10649
|
+
yield nested_statement(statement)
|
10630
10650
|
end
|
10631
10651
|
when 18 then
|
10632
10652
|
begin
|
@@ -10737,7 +10757,7 @@ begin
|
|
10737
10757
|
end
|
10738
10758
|
begin
|
10739
10759
|
|
10740
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
10760
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
10741
10761
|
end
|
10742
10762
|
begin
|
10743
10763
|
|
@@ -10888,7 +10908,7 @@ begin
|
|
10888
10908
|
end
|
10889
10909
|
begin
|
10890
10910
|
|
10891
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
10911
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
10892
10912
|
end
|
10893
10913
|
begin
|
10894
10914
|
|
@@ -10926,7 +10946,7 @@ begin
|
|
10926
10946
|
end
|
10927
10947
|
begin
|
10928
10948
|
|
10929
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
10949
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
10930
10950
|
end
|
10931
10951
|
begin
|
10932
10952
|
|
@@ -12638,7 +12658,9 @@ begin
|
|
12638
12658
|
when 23 then
|
12639
12659
|
begin
|
12640
12660
|
|
12641
|
-
|
12661
|
+
comment = @buffers[:comment] ||= comment(nil)
|
12662
|
+
statement = @buffers[:statement_stack][-1] << comment
|
12663
|
+
yield nested_statement(statement)
|
12642
12664
|
end
|
12643
12665
|
when 11 then
|
12644
12666
|
begin
|
@@ -12842,7 +12864,9 @@ begin
|
|
12842
12864
|
end
|
12843
12865
|
begin
|
12844
12866
|
|
12845
|
-
|
12867
|
+
comment = @buffers[:comment] ||= comment(nil)
|
12868
|
+
statement = @buffers[:statement_stack][-1] << comment
|
12869
|
+
yield nested_statement(statement)
|
12846
12870
|
end
|
12847
12871
|
when 18 then
|
12848
12872
|
begin
|
@@ -12953,7 +12977,7 @@ begin
|
|
12953
12977
|
end
|
12954
12978
|
begin
|
12955
12979
|
|
12956
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
12980
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
12957
12981
|
end
|
12958
12982
|
begin
|
12959
12983
|
|
@@ -13104,7 +13128,7 @@ begin
|
|
13104
13128
|
end
|
13105
13129
|
begin
|
13106
13130
|
|
13107
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
13131
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
13108
13132
|
end
|
13109
13133
|
begin
|
13110
13134
|
|
@@ -13142,7 +13166,7 @@ begin
|
|
13142
13166
|
end
|
13143
13167
|
begin
|
13144
13168
|
|
13145
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
13169
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
13146
13170
|
end
|
13147
13171
|
begin
|
13148
13172
|
|
@@ -14854,7 +14878,9 @@ begin
|
|
14854
14878
|
when 23 then
|
14855
14879
|
begin
|
14856
14880
|
|
14857
|
-
|
14881
|
+
comment = @buffers[:comment] ||= comment(nil)
|
14882
|
+
statement = @buffers[:statement_stack][-1] << comment
|
14883
|
+
yield nested_statement(statement)
|
14858
14884
|
end
|
14859
14885
|
when 11 then
|
14860
14886
|
begin
|
@@ -15058,7 +15084,9 @@ begin
|
|
15058
15084
|
end
|
15059
15085
|
begin
|
15060
15086
|
|
15061
|
-
|
15087
|
+
comment = @buffers[:comment] ||= comment(nil)
|
15088
|
+
statement = @buffers[:statement_stack][-1] << comment
|
15089
|
+
yield nested_statement(statement)
|
15062
15090
|
end
|
15063
15091
|
when 18 then
|
15064
15092
|
begin
|
@@ -15169,7 +15197,7 @@ begin
|
|
15169
15197
|
end
|
15170
15198
|
begin
|
15171
15199
|
|
15172
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
15200
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
15173
15201
|
end
|
15174
15202
|
begin
|
15175
15203
|
|
@@ -15320,7 +15348,7 @@ begin
|
|
15320
15348
|
end
|
15321
15349
|
begin
|
15322
15350
|
|
15323
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
15351
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
15324
15352
|
end
|
15325
15353
|
begin
|
15326
15354
|
|
@@ -15358,7 +15386,7 @@ begin
|
|
15358
15386
|
end
|
15359
15387
|
begin
|
15360
15388
|
|
15361
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
15389
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
15362
15390
|
end
|
15363
15391
|
begin
|
15364
15392
|
|
@@ -17122,7 +17150,9 @@ begin
|
|
17122
17150
|
when 23 then
|
17123
17151
|
begin
|
17124
17152
|
|
17125
|
-
|
17153
|
+
comment = @buffers[:comment] ||= comment(nil)
|
17154
|
+
statement = @buffers[:statement_stack][-1] << comment
|
17155
|
+
yield nested_statement(statement)
|
17126
17156
|
end
|
17127
17157
|
when 11 then
|
17128
17158
|
begin
|
@@ -17326,7 +17356,9 @@ begin
|
|
17326
17356
|
end
|
17327
17357
|
begin
|
17328
17358
|
|
17329
|
-
|
17359
|
+
comment = @buffers[:comment] ||= comment(nil)
|
17360
|
+
statement = @buffers[:statement_stack][-1] << comment
|
17361
|
+
yield nested_statement(statement)
|
17330
17362
|
end
|
17331
17363
|
when 18 then
|
17332
17364
|
begin
|
@@ -17437,7 +17469,7 @@ begin
|
|
17437
17469
|
end
|
17438
17470
|
begin
|
17439
17471
|
|
17440
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
17472
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
17441
17473
|
end
|
17442
17474
|
begin
|
17443
17475
|
|
@@ -17588,7 +17620,7 @@ begin
|
|
17588
17620
|
end
|
17589
17621
|
begin
|
17590
17622
|
|
17591
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
17623
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
17592
17624
|
end
|
17593
17625
|
begin
|
17594
17626
|
|
@@ -17626,7 +17658,7 @@ begin
|
|
17626
17658
|
end
|
17627
17659
|
begin
|
17628
17660
|
|
17629
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
17661
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
17630
17662
|
end
|
17631
17663
|
begin
|
17632
17664
|
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}
|
23
23
|
|
24
24
|
action ast_object {
|
25
|
-
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] <<
|
25
|
+
@buffers[:statement_stack][-1] = @buffers[:statement_stack][-1] << @buffers[:object]
|
26
26
|
}
|
27
27
|
|
28
28
|
action statement_object_statement {
|
@@ -41,7 +41,9 @@
|
|
41
41
|
}
|
42
42
|
|
43
43
|
action yield_nested_statement {
|
44
|
-
|
44
|
+
comment = @buffers[:comment] ||= comment(nil)
|
45
|
+
statement = @buffers[:statement_stack][-1] << comment
|
46
|
+
yield nested_statement(statement)
|
45
47
|
}
|
46
48
|
|
47
49
|
inner_statement :=
|