bel_parser 1.0.0.alpha.5 → 1.0.0.alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/bel2_validator +2 -2
- data/lib/bel_parser/expression/parser.rb +1 -1
- data/lib/bel_parser/expression/{term_validator.rb → validator.rb} +8 -3
- data/lib/bel_parser/language/expression_validator.rb +12 -36
- data/lib/bel_parser/language/semantics/signature_mapping.rb +10 -14
- data/lib/bel_parser/language/syntax/invalid_function.rb +11 -10
- data/lib/bel_parser/language/syntax/invalid_relationship.rb +42 -0
- data/lib/bel_parser/language/syntax/undefined_namespace.rb +12 -18
- data/lib/bel_parser/language/version1_0/return_types/molecular_activity.rb +1 -1
- data/lib/bel_parser/language/version2_0/functions/protein_abundance.rb +9 -19
- data/lib/bel_parser/parser.rb +1 -1
- data/lib/bel_parser/parsers/ast/node.rb +53 -7
- data/lib/bel_parser/parsers/expression/{statement_nested.rb → nested_statement.rb} +58 -58
- data/lib/bel_parser/parsers/expression/{statement_nested.rl → nested_statement.rl} +6 -6
- data/lib/bel_parser/parsers/expression/{statement_observed_term.rb → observed_term.rb} +14 -14
- data/lib/bel_parser/parsers/expression/{statement_observed_term.rl → observed_term.rl} +5 -5
- data/lib/bel_parser/parsers/expression/{statement_simple.rb → simple_statement.rb} +37 -37
- data/lib/bel_parser/parsers/expression/{statement_simple.rl → simple_statement.rl} +6 -6
- data/lib/bel_parser/parsers/expression.rb +3 -3
- data/lib/bel_parser/parsers/line_parser.rb +3 -3
- data/lib/bel_parser/script/parser.rb +1 -1
- metadata +9 -8
@@ -1379,17 +1379,17 @@ class << self
|
|
1379
1379
|
end
|
1380
1380
|
self.bel_en_comment = 65;
|
1381
1381
|
class << self
|
1382
|
-
attr_accessor :
|
1382
|
+
attr_accessor :bel_en_simple_statement
|
1383
1383
|
end
|
1384
|
-
self.
|
1384
|
+
self.bel_en_simple_statement = 69;
|
1385
1385
|
class << self
|
1386
1386
|
attr_accessor :bel_en_inner_statement
|
1387
1387
|
end
|
1388
1388
|
self.bel_en_inner_statement = 103;
|
1389
1389
|
class << self
|
1390
|
-
attr_accessor :
|
1390
|
+
attr_accessor :bel_en_nested_statement
|
1391
1391
|
end
|
1392
|
-
self.
|
1392
|
+
self.bel_en_nested_statement = 1;
|
1393
1393
|
|
1394
1394
|
|
1395
1395
|
begin
|
@@ -1522,7 +1522,7 @@ begin
|
|
1522
1522
|
begin
|
1523
1523
|
|
1524
1524
|
@buffers[:comment] ||= comment(nil)
|
1525
|
-
yield
|
1525
|
+
yield simple_statement(
|
1526
1526
|
statement(
|
1527
1527
|
@buffers[:subject],
|
1528
1528
|
@buffers[:relationship],
|
@@ -1747,7 +1747,7 @@ begin
|
|
1747
1747
|
begin
|
1748
1748
|
|
1749
1749
|
@buffers[:comment] ||= comment(nil)
|
1750
|
-
yield
|
1750
|
+
yield simple_statement(
|
1751
1751
|
statement(
|
1752
1752
|
@buffers[:subject],
|
1753
1753
|
@buffers[:relationship],
|
@@ -1785,7 +1785,7 @@ begin
|
|
1785
1785
|
begin
|
1786
1786
|
|
1787
1787
|
@buffers[:comment] ||= comment(nil)
|
1788
|
-
yield
|
1788
|
+
yield simple_statement(
|
1789
1789
|
statement(
|
1790
1790
|
@buffers[:subject],
|
1791
1791
|
@buffers[:relationship],
|
@@ -3595,17 +3595,17 @@ class << self
|
|
3595
3595
|
end
|
3596
3596
|
self.bel_en_comment = 65;
|
3597
3597
|
class << self
|
3598
|
-
attr_accessor :
|
3598
|
+
attr_accessor :bel_en_simple_statement
|
3599
3599
|
end
|
3600
|
-
self.
|
3600
|
+
self.bel_en_simple_statement = 69;
|
3601
3601
|
class << self
|
3602
3602
|
attr_accessor :bel_en_inner_statement
|
3603
3603
|
end
|
3604
3604
|
self.bel_en_inner_statement = 103;
|
3605
3605
|
class << self
|
3606
|
-
attr_accessor :
|
3606
|
+
attr_accessor :bel_en_nested_statement
|
3607
3607
|
end
|
3608
|
-
self.
|
3608
|
+
self.bel_en_nested_statement = 1;
|
3609
3609
|
|
3610
3610
|
|
3611
3611
|
begin
|
@@ -3738,7 +3738,7 @@ begin
|
|
3738
3738
|
begin
|
3739
3739
|
|
3740
3740
|
@buffers[:comment] ||= comment(nil)
|
3741
|
-
yield
|
3741
|
+
yield simple_statement(
|
3742
3742
|
statement(
|
3743
3743
|
@buffers[:subject],
|
3744
3744
|
@buffers[:relationship],
|
@@ -3963,7 +3963,7 @@ begin
|
|
3963
3963
|
begin
|
3964
3964
|
|
3965
3965
|
@buffers[:comment] ||= comment(nil)
|
3966
|
-
yield
|
3966
|
+
yield simple_statement(
|
3967
3967
|
statement(
|
3968
3968
|
@buffers[:subject],
|
3969
3969
|
@buffers[:relationship],
|
@@ -4001,7 +4001,7 @@ begin
|
|
4001
4001
|
begin
|
4002
4002
|
|
4003
4003
|
@buffers[:comment] ||= comment(nil)
|
4004
|
-
yield
|
4004
|
+
yield simple_statement(
|
4005
4005
|
statement(
|
4006
4006
|
@buffers[:subject],
|
4007
4007
|
@buffers[:relationship],
|
@@ -5811,17 +5811,17 @@ class << self
|
|
5811
5811
|
end
|
5812
5812
|
self.bel_en_comment = 65;
|
5813
5813
|
class << self
|
5814
|
-
attr_accessor :
|
5814
|
+
attr_accessor :bel_en_simple_statement
|
5815
5815
|
end
|
5816
|
-
self.
|
5816
|
+
self.bel_en_simple_statement = 69;
|
5817
5817
|
class << self
|
5818
5818
|
attr_accessor :bel_en_inner_statement
|
5819
5819
|
end
|
5820
5820
|
self.bel_en_inner_statement = 103;
|
5821
5821
|
class << self
|
5822
|
-
attr_accessor :
|
5822
|
+
attr_accessor :bel_en_nested_statement
|
5823
5823
|
end
|
5824
|
-
self.
|
5824
|
+
self.bel_en_nested_statement = 1;
|
5825
5825
|
|
5826
5826
|
|
5827
5827
|
begin
|
@@ -5954,7 +5954,7 @@ begin
|
|
5954
5954
|
begin
|
5955
5955
|
|
5956
5956
|
@buffers[:comment] ||= comment(nil)
|
5957
|
-
yield
|
5957
|
+
yield simple_statement(
|
5958
5958
|
statement(
|
5959
5959
|
@buffers[:subject],
|
5960
5960
|
@buffers[:relationship],
|
@@ -6179,7 +6179,7 @@ begin
|
|
6179
6179
|
begin
|
6180
6180
|
|
6181
6181
|
@buffers[:comment] ||= comment(nil)
|
6182
|
-
yield
|
6182
|
+
yield simple_statement(
|
6183
6183
|
statement(
|
6184
6184
|
@buffers[:subject],
|
6185
6185
|
@buffers[:relationship],
|
@@ -6217,7 +6217,7 @@ begin
|
|
6217
6217
|
begin
|
6218
6218
|
|
6219
6219
|
@buffers[:comment] ||= comment(nil)
|
6220
|
-
yield
|
6220
|
+
yield simple_statement(
|
6221
6221
|
statement(
|
6222
6222
|
@buffers[:subject],
|
6223
6223
|
@buffers[:relationship],
|
@@ -8027,17 +8027,17 @@ class << self
|
|
8027
8027
|
end
|
8028
8028
|
self.bel_en_comment = 65;
|
8029
8029
|
class << self
|
8030
|
-
attr_accessor :
|
8030
|
+
attr_accessor :bel_en_simple_statement
|
8031
8031
|
end
|
8032
|
-
self.
|
8032
|
+
self.bel_en_simple_statement = 69;
|
8033
8033
|
class << self
|
8034
8034
|
attr_accessor :bel_en_inner_statement
|
8035
8035
|
end
|
8036
8036
|
self.bel_en_inner_statement = 103;
|
8037
8037
|
class << self
|
8038
|
-
attr_accessor :
|
8038
|
+
attr_accessor :bel_en_nested_statement
|
8039
8039
|
end
|
8040
|
-
self.
|
8040
|
+
self.bel_en_nested_statement = 1;
|
8041
8041
|
|
8042
8042
|
|
8043
8043
|
begin
|
@@ -8170,7 +8170,7 @@ begin
|
|
8170
8170
|
begin
|
8171
8171
|
|
8172
8172
|
@buffers[:comment] ||= comment(nil)
|
8173
|
-
yield
|
8173
|
+
yield simple_statement(
|
8174
8174
|
statement(
|
8175
8175
|
@buffers[:subject],
|
8176
8176
|
@buffers[:relationship],
|
@@ -8395,7 +8395,7 @@ begin
|
|
8395
8395
|
begin
|
8396
8396
|
|
8397
8397
|
@buffers[:comment] ||= comment(nil)
|
8398
|
-
yield
|
8398
|
+
yield simple_statement(
|
8399
8399
|
statement(
|
8400
8400
|
@buffers[:subject],
|
8401
8401
|
@buffers[:relationship],
|
@@ -8433,7 +8433,7 @@ begin
|
|
8433
8433
|
begin
|
8434
8434
|
|
8435
8435
|
@buffers[:comment] ||= comment(nil)
|
8436
|
-
yield
|
8436
|
+
yield simple_statement(
|
8437
8437
|
statement(
|
8438
8438
|
@buffers[:subject],
|
8439
8439
|
@buffers[:relationship],
|
@@ -10243,17 +10243,17 @@ class << self
|
|
10243
10243
|
end
|
10244
10244
|
self.bel_en_comment = 65;
|
10245
10245
|
class << self
|
10246
|
-
attr_accessor :
|
10246
|
+
attr_accessor :bel_en_simple_statement
|
10247
10247
|
end
|
10248
|
-
self.
|
10248
|
+
self.bel_en_simple_statement = 69;
|
10249
10249
|
class << self
|
10250
10250
|
attr_accessor :bel_en_inner_statement
|
10251
10251
|
end
|
10252
10252
|
self.bel_en_inner_statement = 103;
|
10253
10253
|
class << self
|
10254
|
-
attr_accessor :
|
10254
|
+
attr_accessor :bel_en_nested_statement
|
10255
10255
|
end
|
10256
|
-
self.
|
10256
|
+
self.bel_en_nested_statement = 1;
|
10257
10257
|
|
10258
10258
|
|
10259
10259
|
begin
|
@@ -10386,7 +10386,7 @@ begin
|
|
10386
10386
|
begin
|
10387
10387
|
|
10388
10388
|
@buffers[:comment] ||= comment(nil)
|
10389
|
-
yield
|
10389
|
+
yield simple_statement(
|
10390
10390
|
statement(
|
10391
10391
|
@buffers[:subject],
|
10392
10392
|
@buffers[:relationship],
|
@@ -10611,7 +10611,7 @@ begin
|
|
10611
10611
|
begin
|
10612
10612
|
|
10613
10613
|
@buffers[:comment] ||= comment(nil)
|
10614
|
-
yield
|
10614
|
+
yield simple_statement(
|
10615
10615
|
statement(
|
10616
10616
|
@buffers[:subject],
|
10617
10617
|
@buffers[:relationship],
|
@@ -10649,7 +10649,7 @@ begin
|
|
10649
10649
|
begin
|
10650
10650
|
|
10651
10651
|
@buffers[:comment] ||= comment(nil)
|
10652
|
-
yield
|
10652
|
+
yield simple_statement(
|
10653
10653
|
statement(
|
10654
10654
|
@buffers[:subject],
|
10655
10655
|
@buffers[:relationship],
|
@@ -12459,17 +12459,17 @@ class << self
|
|
12459
12459
|
end
|
12460
12460
|
self.bel_en_comment = 65;
|
12461
12461
|
class << self
|
12462
|
-
attr_accessor :
|
12462
|
+
attr_accessor :bel_en_simple_statement
|
12463
12463
|
end
|
12464
|
-
self.
|
12464
|
+
self.bel_en_simple_statement = 69;
|
12465
12465
|
class << self
|
12466
12466
|
attr_accessor :bel_en_inner_statement
|
12467
12467
|
end
|
12468
12468
|
self.bel_en_inner_statement = 103;
|
12469
12469
|
class << self
|
12470
|
-
attr_accessor :
|
12470
|
+
attr_accessor :bel_en_nested_statement
|
12471
12471
|
end
|
12472
|
-
self.
|
12472
|
+
self.bel_en_nested_statement = 1;
|
12473
12473
|
|
12474
12474
|
|
12475
12475
|
begin
|
@@ -12602,7 +12602,7 @@ begin
|
|
12602
12602
|
begin
|
12603
12603
|
|
12604
12604
|
@buffers[:comment] ||= comment(nil)
|
12605
|
-
yield
|
12605
|
+
yield simple_statement(
|
12606
12606
|
statement(
|
12607
12607
|
@buffers[:subject],
|
12608
12608
|
@buffers[:relationship],
|
@@ -12827,7 +12827,7 @@ begin
|
|
12827
12827
|
begin
|
12828
12828
|
|
12829
12829
|
@buffers[:comment] ||= comment(nil)
|
12830
|
-
yield
|
12830
|
+
yield simple_statement(
|
12831
12831
|
statement(
|
12832
12832
|
@buffers[:subject],
|
12833
12833
|
@buffers[:relationship],
|
@@ -12865,7 +12865,7 @@ begin
|
|
12865
12865
|
begin
|
12866
12866
|
|
12867
12867
|
@buffers[:comment] ||= comment(nil)
|
12868
|
-
yield
|
12868
|
+
yield simple_statement(
|
12869
12869
|
statement(
|
12870
12870
|
@buffers[:subject],
|
12871
12871
|
@buffers[:relationship],
|
@@ -14675,17 +14675,17 @@ class << self
|
|
14675
14675
|
end
|
14676
14676
|
self.bel_en_comment = 65;
|
14677
14677
|
class << self
|
14678
|
-
attr_accessor :
|
14678
|
+
attr_accessor :bel_en_simple_statement
|
14679
14679
|
end
|
14680
|
-
self.
|
14680
|
+
self.bel_en_simple_statement = 69;
|
14681
14681
|
class << self
|
14682
14682
|
attr_accessor :bel_en_inner_statement
|
14683
14683
|
end
|
14684
14684
|
self.bel_en_inner_statement = 103;
|
14685
14685
|
class << self
|
14686
|
-
attr_accessor :
|
14686
|
+
attr_accessor :bel_en_nested_statement
|
14687
14687
|
end
|
14688
|
-
self.
|
14688
|
+
self.bel_en_nested_statement = 1;
|
14689
14689
|
|
14690
14690
|
|
14691
14691
|
begin
|
@@ -14818,7 +14818,7 @@ begin
|
|
14818
14818
|
begin
|
14819
14819
|
|
14820
14820
|
@buffers[:comment] ||= comment(nil)
|
14821
|
-
yield
|
14821
|
+
yield simple_statement(
|
14822
14822
|
statement(
|
14823
14823
|
@buffers[:subject],
|
14824
14824
|
@buffers[:relationship],
|
@@ -15043,7 +15043,7 @@ begin
|
|
15043
15043
|
begin
|
15044
15044
|
|
15045
15045
|
@buffers[:comment] ||= comment(nil)
|
15046
|
-
yield
|
15046
|
+
yield simple_statement(
|
15047
15047
|
statement(
|
15048
15048
|
@buffers[:subject],
|
15049
15049
|
@buffers[:relationship],
|
@@ -15081,7 +15081,7 @@ begin
|
|
15081
15081
|
begin
|
15082
15082
|
|
15083
15083
|
@buffers[:comment] ||= comment(nil)
|
15084
|
-
yield
|
15084
|
+
yield simple_statement(
|
15085
15085
|
statement(
|
15086
15086
|
@buffers[:subject],
|
15087
15087
|
@buffers[:relationship],
|
@@ -15525,7 +15525,7 @@ require_relative '../nonblocking_io_wrapper'
|
|
15525
15525
|
module BELParser
|
15526
15526
|
module Parsers
|
15527
15527
|
module Expression
|
15528
|
-
module
|
15528
|
+
module NestedStatement
|
15529
15529
|
|
15530
15530
|
class << self
|
15531
15531
|
|
@@ -16928,17 +16928,17 @@ class << self
|
|
16928
16928
|
end
|
16929
16929
|
self.bel_en_comment = 65;
|
16930
16930
|
class << self
|
16931
|
-
attr_accessor :
|
16931
|
+
attr_accessor :bel_en_simple_statement
|
16932
16932
|
end
|
16933
|
-
self.
|
16933
|
+
self.bel_en_simple_statement = 69;
|
16934
16934
|
class << self
|
16935
16935
|
attr_accessor :bel_en_inner_statement
|
16936
16936
|
end
|
16937
16937
|
self.bel_en_inner_statement = 103;
|
16938
16938
|
class << self
|
16939
|
-
attr_accessor :
|
16939
|
+
attr_accessor :bel_en_nested_statement
|
16940
16940
|
end
|
16941
|
-
self.
|
16941
|
+
self.bel_en_nested_statement = 1;
|
16942
16942
|
|
16943
16943
|
|
16944
16944
|
# end: ragel
|
@@ -17086,7 +17086,7 @@ begin
|
|
17086
17086
|
begin
|
17087
17087
|
|
17088
17088
|
@buffers[:comment] ||= comment(nil)
|
17089
|
-
yield
|
17089
|
+
yield simple_statement(
|
17090
17090
|
statement(
|
17091
17091
|
@buffers[:subject],
|
17092
17092
|
@buffers[:relationship],
|
@@ -17311,7 +17311,7 @@ begin
|
|
17311
17311
|
begin
|
17312
17312
|
|
17313
17313
|
@buffers[:comment] ||= comment(nil)
|
17314
|
-
yield
|
17314
|
+
yield simple_statement(
|
17315
17315
|
statement(
|
17316
17316
|
@buffers[:subject],
|
17317
17317
|
@buffers[:relationship],
|
@@ -17349,7 +17349,7 @@ begin
|
|
17349
17349
|
begin
|
17350
17350
|
|
17351
17351
|
@buffers[:comment] ||= comment(nil)
|
17352
|
-
yield
|
17352
|
+
yield simple_statement(
|
17353
17353
|
statement(
|
17354
17354
|
@buffers[:subject],
|
17355
17355
|
@buffers[:relationship],
|
@@ -17792,7 +17792,7 @@ end
|
|
17792
17792
|
|
17793
17793
|
if __FILE__ == $0
|
17794
17794
|
$stdin.each_line do |line|
|
17795
|
-
BELParser::Parsers::Expression::
|
17795
|
+
BELParser::Parsers::Expression::NestedStatement.parse(line) { |obj|
|
17796
17796
|
puts obj.inspect
|
17797
17797
|
}
|
17798
17798
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
%%{
|
4
4
|
machine bel;
|
5
5
|
|
6
|
-
include '
|
6
|
+
include 'simple_statement.rl';
|
7
7
|
|
8
8
|
action statement_init {
|
9
9
|
@buffers[:statement_stack] = [ statement() ]
|
@@ -40,7 +40,7 @@
|
|
40
40
|
fret;
|
41
41
|
}
|
42
42
|
|
43
|
-
action
|
43
|
+
action yield_nested_statement {
|
44
44
|
yield nested_statement(@buffers[:statement_stack][-1])
|
45
45
|
}
|
46
46
|
|
@@ -64,10 +64,10 @@
|
|
64
64
|
# ')' @ast_object
|
65
65
|
;
|
66
66
|
|
67
|
-
|
67
|
+
nested_statement :=
|
68
68
|
outer_statement
|
69
69
|
SP*
|
70
|
-
COMMENT? %
|
70
|
+
COMMENT? %yield_nested_statement
|
71
71
|
NL;
|
72
72
|
}%%
|
73
73
|
=end
|
@@ -80,7 +80,7 @@ require_relative '../nonblocking_io_wrapper'
|
|
80
80
|
module BELParser
|
81
81
|
module Parsers
|
82
82
|
module Expression
|
83
|
-
module
|
83
|
+
module NestedStatement
|
84
84
|
|
85
85
|
class << self
|
86
86
|
|
@@ -131,7 +131,7 @@ end
|
|
131
131
|
|
132
132
|
if __FILE__ == $0
|
133
133
|
$stdin.each_line do |line|
|
134
|
-
BELParser::Parsers::Expression::
|
134
|
+
BELParser::Parsers::Expression::NestedStatement.parse(line) { |obj|
|
135
135
|
puts obj.inspect
|
136
136
|
}
|
137
137
|
end
|
@@ -647,9 +647,9 @@ class << self
|
|
647
647
|
end
|
648
648
|
self.bel_en_comment = 58;
|
649
649
|
class << self
|
650
|
-
attr_accessor :
|
650
|
+
attr_accessor :bel_en_observed_term
|
651
651
|
end
|
652
|
-
self.
|
652
|
+
self.bel_en_observed_term = 1;
|
653
653
|
|
654
654
|
|
655
655
|
begin
|
@@ -1850,9 +1850,9 @@ class << self
|
|
1850
1850
|
end
|
1851
1851
|
self.bel_en_comment = 58;
|
1852
1852
|
class << self
|
1853
|
-
attr_accessor :
|
1853
|
+
attr_accessor :bel_en_observed_term
|
1854
1854
|
end
|
1855
|
-
self.
|
1855
|
+
self.bel_en_observed_term = 1;
|
1856
1856
|
|
1857
1857
|
|
1858
1858
|
begin
|
@@ -3053,9 +3053,9 @@ class << self
|
|
3053
3053
|
end
|
3054
3054
|
self.bel_en_comment = 58;
|
3055
3055
|
class << self
|
3056
|
-
attr_accessor :
|
3056
|
+
attr_accessor :bel_en_observed_term
|
3057
3057
|
end
|
3058
|
-
self.
|
3058
|
+
self.bel_en_observed_term = 1;
|
3059
3059
|
|
3060
3060
|
|
3061
3061
|
begin
|
@@ -4256,9 +4256,9 @@ class << self
|
|
4256
4256
|
end
|
4257
4257
|
self.bel_en_comment = 58;
|
4258
4258
|
class << self
|
4259
|
-
attr_accessor :
|
4259
|
+
attr_accessor :bel_en_observed_term
|
4260
4260
|
end
|
4261
|
-
self.
|
4261
|
+
self.bel_en_observed_term = 1;
|
4262
4262
|
|
4263
4263
|
|
4264
4264
|
begin
|
@@ -5459,9 +5459,9 @@ class << self
|
|
5459
5459
|
end
|
5460
5460
|
self.bel_en_comment = 58;
|
5461
5461
|
class << self
|
5462
|
-
attr_accessor :
|
5462
|
+
attr_accessor :bel_en_observed_term
|
5463
5463
|
end
|
5464
|
-
self.
|
5464
|
+
self.bel_en_observed_term = 1;
|
5465
5465
|
|
5466
5466
|
|
5467
5467
|
begin
|
@@ -6028,7 +6028,7 @@ require_relative '../nonblocking_io_wrapper'
|
|
6028
6028
|
module BELParser
|
6029
6029
|
module Parsers
|
6030
6030
|
module Expression
|
6031
|
-
module
|
6031
|
+
module ObservedTerm
|
6032
6032
|
|
6033
6033
|
class << self
|
6034
6034
|
|
@@ -6699,9 +6699,9 @@ class << self
|
|
6699
6699
|
end
|
6700
6700
|
self.bel_en_comment = 58;
|
6701
6701
|
class << self
|
6702
|
-
attr_accessor :
|
6702
|
+
attr_accessor :bel_en_observed_term
|
6703
6703
|
end
|
6704
|
-
self.
|
6704
|
+
self.bel_en_observed_term = 1;
|
6705
6705
|
|
6706
6706
|
|
6707
6707
|
# end: ragel
|
@@ -7281,7 +7281,7 @@ end
|
|
7281
7281
|
|
7282
7282
|
if __FILE__ == $0
|
7283
7283
|
$stdin.each_line do |line|
|
7284
|
-
BELParser::Parsers::Expression::
|
7284
|
+
BELParser::Parsers::Expression::ObservedTerm.parse(line) { |obj|
|
7285
7285
|
puts obj.inspect
|
7286
7286
|
}
|
7287
7287
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
include 'term.rl';
|
7
7
|
include 'comment.rl';
|
8
8
|
|
9
|
-
action
|
9
|
+
action yield_observed_term {
|
10
10
|
@buffers[:comment] ||= comment(nil)
|
11
11
|
yield observed_term(
|
12
12
|
statement(
|
@@ -16,10 +16,10 @@
|
|
16
16
|
@buffers[:comment]))
|
17
17
|
}
|
18
18
|
|
19
|
-
|
19
|
+
observed_term :=
|
20
20
|
outer_term
|
21
21
|
SP*
|
22
|
-
COMMENT? %
|
22
|
+
COMMENT? %yield_observed_term
|
23
23
|
NL;
|
24
24
|
}%%
|
25
25
|
=end
|
@@ -32,7 +32,7 @@ require_relative '../nonblocking_io_wrapper'
|
|
32
32
|
module BELParser
|
33
33
|
module Parsers
|
34
34
|
module Expression
|
35
|
-
module
|
35
|
+
module ObservedTerm
|
36
36
|
|
37
37
|
class << self
|
38
38
|
|
@@ -82,7 +82,7 @@ end
|
|
82
82
|
|
83
83
|
if __FILE__ == $0
|
84
84
|
$stdin.each_line do |line|
|
85
|
-
BELParser::Parsers::Expression::
|
85
|
+
BELParser::Parsers::Expression::ObservedTerm.parse(line) { |obj|
|
86
86
|
puts obj.inspect
|
87
87
|
}
|
88
88
|
end
|