bel_parser 1.0.0.alpha.38-java → 1.0.0.alpha.39-java
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/lib/bel_parser/ast_filter.rb +6 -2
- data/lib/bel_parser/parsers/ast/node.rb +113 -58
- data/lib/bel_parser/parsers/bel_script/define_annotation.rb +4175 -3097
- data/lib/bel_parser/parsers/bel_script/define_annotation.rl +142 -49
- data/lib/bel_parser/parsers/bel_script/define_namespace.rb +980 -461
- data/lib/bel_parser/parsers/bel_script/define_namespace.rl +79 -39
- data/lib/bel_parser/parsers/bel_script/set.rb +4878 -2743
- data/lib/bel_parser/parsers/bel_script/set.rl +114 -32
- data/lib/bel_parser/parsers/bel_script/set_document.rb +5839 -5292
- data/lib/bel_parser/parsers/bel_script/set_document.rl +130 -27
- data/lib/bel_parser/parsers/bel_script/unset.rb +321 -234
- data/lib/bel_parser/parsers/bel_script/unset.rl +49 -21
- data/lib/bel_parser/parsers/common/blank_line.rb +12 -11
- data/lib/bel_parser/parsers/common/blank_line.rl +12 -12
- data/lib/bel_parser/parsers/common/comment_line.rb +65 -40
- data/lib/bel_parser/parsers/common/comment_line.rl +26 -26
- data/lib/bel_parser/parsers/common/common.rl +60 -0
- data/lib/bel_parser/parsers/common/function.rb +319 -0
- data/lib/bel_parser/parsers/common/function.rl +149 -0
- data/lib/bel_parser/parsers/common/identifier.rb +72 -68
- data/lib/bel_parser/parsers/common/identifier.rl +73 -29
- data/lib/bel_parser/parsers/common/list.rb +1617 -1243
- data/lib/bel_parser/parsers/common/list.rl +120 -60
- data/lib/bel_parser/parsers/common/string.rb +114 -41
- data/lib/bel_parser/parsers/common/string.rl +91 -28
- data/lib/bel_parser/parsers/common.rb +1 -0
- data/lib/bel_parser/parsers/expression/comment.rb +70 -38
- data/lib/bel_parser/parsers/expression/comment.rl +37 -20
- data/lib/bel_parser/parsers/expression/nested_statement.rb +63116 -13958
- data/lib/bel_parser/parsers/expression/nested_statement.rl +53 -23
- data/lib/bel_parser/parsers/expression/observed_term.rb +32497 -5188
- data/lib/bel_parser/parsers/expression/observed_term.rl +25 -20
- data/lib/bel_parser/parsers/expression/parameter.rb +2861 -847
- data/lib/bel_parser/parsers/expression/parameter.rl +178 -21
- data/lib/bel_parser/parsers/expression/relationship.rb +73 -55
- data/lib/bel_parser/parsers/expression/relationship.rl +41 -23
- data/lib/bel_parser/parsers/expression/simple_statement.rb +42895 -7846
- data/lib/bel_parser/parsers/expression/simple_statement.rl +41 -24
- data/lib/bel_parser/parsers/expression/term.rb +16498 -2602
- data/lib/bel_parser/parsers/expression/term.rl +52 -35
- data/lib/bel_parser/parsers/line_parser.rb +1 -0
- data/lib/bel_parser/parsers/mixin/buffer.rb +4 -0
- data/lib/bel_parser/parsers/tracer.rb +19 -0
- data/lib/bel_parser/script/state/namespace_definition.rb +1 -0
- metadata +10 -7
@@ -7,26 +7,176 @@
|
|
7
7
|
include 'identifier.rl';
|
8
8
|
include 'string.rl';
|
9
9
|
|
10
|
-
action
|
11
|
-
|
10
|
+
action add_ident_param_value {
|
11
|
+
trace('PARAMETER add_ident_param_value')
|
12
|
+
ident = @buffers.delete(:ident)
|
13
|
+
value_node = value(ident, complete: ident.complete)
|
14
|
+
@buffers[:param_value] = value_node
|
12
15
|
}
|
13
16
|
|
14
|
-
action
|
15
|
-
|
16
|
-
|
17
|
+
action add_string_param_value {
|
18
|
+
trace('PARAMETER add_string_param_value')
|
19
|
+
string_node = @buffers.delete(:string)
|
20
|
+
value_node = value(string_node, complete: string_node.complete)
|
21
|
+
@buffers[:param_value] = value_node
|
17
22
|
}
|
18
23
|
|
19
|
-
action
|
20
|
-
|
21
|
-
|
24
|
+
action parameter_end {
|
25
|
+
trace('PARAMETER parameter_end')
|
26
|
+
param_node = parameter()
|
27
|
+
completed = true
|
28
|
+
prefix_node = @buffers.delete(:param_prefix)
|
29
|
+
unless prefix_node.nil?
|
30
|
+
param_node <<= prefix_node
|
31
|
+
unless prefix_node.complete
|
32
|
+
trace('PN incomplete')
|
33
|
+
completed = false
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
value_node = @buffers.delete(:param_value)
|
38
|
+
unless value_node.nil?
|
39
|
+
param_node <<= value_node
|
40
|
+
unless value_node.complete
|
41
|
+
trace('VN incomplete')
|
42
|
+
completed = false
|
43
|
+
end
|
44
|
+
else
|
45
|
+
completed = false
|
46
|
+
end
|
47
|
+
|
48
|
+
param_node.complete = completed
|
49
|
+
@buffers[:parameter] = param_node
|
22
50
|
}
|
23
51
|
|
24
|
-
action
|
52
|
+
action add_prefix {
|
53
|
+
trace('PARAMETER add_prefix')
|
54
|
+
ident = @buffers.delete(:ident)
|
55
|
+
prefix_node = prefix(ident, complete: ident.complete)
|
56
|
+
@buffers[:param_prefix] = prefix_node
|
57
|
+
}
|
58
|
+
|
59
|
+
action a_parameter_eof {
|
60
|
+
trace("PARAMETER a_parameter_eof")
|
61
|
+
param_node = parameter()
|
62
|
+
completed = true
|
63
|
+
prefix_node = @buffers.delete(:param_prefix)
|
64
|
+
unless prefix_node.nil?
|
65
|
+
param_node <<= prefix_node
|
66
|
+
unless prefix_node.complete
|
67
|
+
completed = false
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
string_value_node = @buffers.delete(:string)
|
72
|
+
unless string_value_node.nil?
|
73
|
+
param_node <<= string_value_node
|
74
|
+
unless string_value_node.complete
|
75
|
+
completed = false
|
76
|
+
end
|
77
|
+
else
|
78
|
+
completed = false
|
79
|
+
end
|
80
|
+
|
81
|
+
param_node.complete = completed
|
82
|
+
@buffers[:parameter] = param_node
|
83
|
+
}
|
84
|
+
|
85
|
+
action parameter_node_eof {
|
86
|
+
trace("PARAMETER parameter_node_eof")
|
87
|
+
param_node = parameter()
|
88
|
+
completed = true
|
89
|
+
prefix_node = @buffers.delete(:param_prefix)
|
90
|
+
unless prefix_node.nil?
|
91
|
+
param_node <<= prefix_node
|
92
|
+
unless prefix_node.complete
|
93
|
+
completed = false
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
string_value_node = @buffers.delete(:string)
|
98
|
+
unless string_value_node.nil?
|
99
|
+
param_node <<= string_value_node
|
100
|
+
unless string_value_node.complete
|
101
|
+
completed = false
|
102
|
+
end
|
103
|
+
else
|
104
|
+
completed = false
|
105
|
+
end
|
106
|
+
|
107
|
+
param_node.complete = completed
|
108
|
+
yield param_node
|
109
|
+
}
|
110
|
+
|
111
|
+
action yield_parameter {
|
112
|
+
trace('PARAMETER yield_parameter')
|
25
113
|
yield @buffers[:parameter]
|
26
114
|
}
|
27
115
|
|
28
|
-
|
29
|
-
|
116
|
+
prefix =
|
117
|
+
an_ident
|
118
|
+
COLON
|
119
|
+
;
|
120
|
+
|
121
|
+
ident_value =
|
122
|
+
an_ident
|
123
|
+
%add_ident_param_value
|
124
|
+
;
|
125
|
+
|
126
|
+
string_value =
|
127
|
+
a_string
|
128
|
+
%add_string_param_value
|
129
|
+
;
|
130
|
+
|
131
|
+
value =
|
132
|
+
ident_value |
|
133
|
+
string_value
|
134
|
+
;
|
135
|
+
|
136
|
+
parameter_prefix_value =
|
137
|
+
prefix
|
138
|
+
%add_prefix
|
139
|
+
SP*
|
140
|
+
value
|
141
|
+
;
|
142
|
+
|
143
|
+
parameter_prefix_maybe_value =
|
144
|
+
prefix
|
145
|
+
%add_prefix
|
146
|
+
SP*
|
147
|
+
value?
|
148
|
+
;
|
149
|
+
|
150
|
+
parameter_value =
|
151
|
+
SP*
|
152
|
+
value
|
153
|
+
;
|
154
|
+
|
155
|
+
a_parameter =
|
156
|
+
(
|
157
|
+
parameter_prefix_value |
|
158
|
+
parameter_value |
|
159
|
+
parameter_prefix_maybe_value
|
160
|
+
)
|
161
|
+
|
162
|
+
@eof(a_parameter_eof)
|
163
|
+
%parameter_end
|
164
|
+
;
|
165
|
+
|
166
|
+
parameter_node :=
|
167
|
+
(
|
168
|
+
parameter_prefix_value |
|
169
|
+
parameter_value |
|
170
|
+
parameter_prefix_maybe_value
|
171
|
+
)
|
172
|
+
@eof(parameter_node_eof)
|
173
|
+
%parameter_end
|
174
|
+
%yield_parameter
|
175
|
+
NL?
|
176
|
+
;
|
177
|
+
|
178
|
+
#BEL_PARAMETER = (an_ident ':')? @prefix SP* (a_string %string | an_ident %ident);
|
179
|
+
#bel_parameter := BEL_PARAMETER %yield_parameter_ast NL;
|
30
180
|
}%%
|
31
181
|
=end
|
32
182
|
# end: ragel
|
@@ -34,6 +184,7 @@
|
|
34
184
|
require_relative '../ast/node'
|
35
185
|
require_relative '../mixin/buffer'
|
36
186
|
require_relative '../nonblocking_io_wrapper'
|
187
|
+
require_relative '../tracer'
|
37
188
|
|
38
189
|
module BELParser
|
39
190
|
module Parsers
|
@@ -59,25 +210,31 @@ module BELParser
|
|
59
210
|
include Enumerable
|
60
211
|
include BELParser::Parsers::Buffer
|
61
212
|
include BELParser::Parsers::AST::Sexp
|
213
|
+
include BELParser::Parsers::Tracer
|
62
214
|
|
63
215
|
def initialize(content)
|
64
216
|
@content = content
|
65
|
-
# begin: ragel
|
217
|
+
# begin: ragel
|
66
218
|
%% write data;
|
67
|
-
# end: ragel
|
219
|
+
# end: ragel
|
68
220
|
end
|
69
221
|
|
70
222
|
def each
|
71
|
-
@buffers
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
223
|
+
@buffers = {}
|
224
|
+
@incomplete = {}
|
225
|
+
data = @content.unpack('C*')
|
226
|
+
p = 0
|
227
|
+
pe = data.length
|
228
|
+
p_start = 0
|
229
|
+
p_end = 0
|
230
|
+
id_start = 0
|
231
|
+
id_end = 0
|
232
|
+
eof = data.length
|
233
|
+
|
234
|
+
# begin: ragel
|
78
235
|
%% write init;
|
79
236
|
%% write exec;
|
80
|
-
# end: ragel
|
237
|
+
# end: ragel
|
81
238
|
end
|
82
239
|
end
|
83
240
|
end
|
@@ -9,6 +9,7 @@
|
|
9
9
|
require_relative '../ast/node'
|
10
10
|
require_relative '../mixin/buffer'
|
11
11
|
require_relative '../nonblocking_io_wrapper'
|
12
|
+
require_relative '../tracer'
|
12
13
|
|
13
14
|
module BELParser
|
14
15
|
module Parsers
|
@@ -34,18 +35,19 @@ module BELParser
|
|
34
35
|
include Enumerable
|
35
36
|
include BELParser::Parsers::Buffer
|
36
37
|
include BELParser::Parsers::AST::Sexp
|
38
|
+
include BELParser::Parsers::Tracer
|
37
39
|
|
38
40
|
def initialize(content)
|
39
41
|
@content = content
|
40
|
-
# begin: ragel
|
42
|
+
# begin: ragel
|
41
43
|
|
42
44
|
class << self
|
43
45
|
attr_accessor :_bel_trans_keys
|
44
46
|
private :_bel_trans_keys, :_bel_trans_keys=
|
45
47
|
end
|
46
48
|
self._bel_trans_keys = [
|
47
|
-
0, 0, 33, 126,
|
48
|
-
0
|
49
|
+
0, 0, 33, 126, 33, 126,
|
50
|
+
0
|
49
51
|
]
|
50
52
|
|
51
53
|
class << self
|
@@ -53,7 +55,7 @@ class << self
|
|
53
55
|
private :_bel_key_spans, :_bel_key_spans=
|
54
56
|
end
|
55
57
|
self._bel_key_spans = [
|
56
|
-
0, 94,
|
58
|
+
0, 94, 94
|
57
59
|
]
|
58
60
|
|
59
61
|
class << self
|
@@ -61,7 +63,7 @@ class << self
|
|
61
63
|
private :_bel_index_offsets, :_bel_index_offsets=
|
62
64
|
end
|
63
65
|
self._bel_index_offsets = [
|
64
|
-
0, 0, 95
|
66
|
+
0, 0, 95
|
65
67
|
]
|
66
68
|
|
67
69
|
class << self
|
@@ -81,21 +83,18 @@ self._bel_indicies = [
|
|
81
83
|
0, 0, 0, 0, 0, 0, 0, 0,
|
82
84
|
0, 0, 0, 0, 0, 0, 0, 0,
|
83
85
|
0, 0, 0, 0, 0, 0, 1, 2,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
97
|
-
3, 3, 3, 3, 3, 3, 3, 3,
|
98
|
-
3, 3, 3, 3, 1, 1, 0
|
86
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
87
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
88
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
89
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
90
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
91
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
92
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
93
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
94
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
95
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
96
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
97
|
+
2, 2, 2, 2, 2, 1, 0
|
99
98
|
]
|
100
99
|
|
101
100
|
class << self
|
@@ -103,7 +102,7 @@ class << self
|
|
103
102
|
private :_bel_trans_targs, :_bel_trans_targs=
|
104
103
|
end
|
105
104
|
self._bel_trans_targs = [
|
106
|
-
2, 0,
|
105
|
+
2, 0, 2
|
107
106
|
]
|
108
107
|
|
109
108
|
class << self
|
@@ -111,7 +110,15 @@ class << self
|
|
111
110
|
private :_bel_trans_actions, :_bel_trans_actions=
|
112
111
|
end
|
113
112
|
self._bel_trans_actions = [
|
114
|
-
1, 0,
|
113
|
+
1, 0, 0
|
114
|
+
]
|
115
|
+
|
116
|
+
class << self
|
117
|
+
attr_accessor :_bel_eof_actions
|
118
|
+
private :_bel_eof_actions, :_bel_eof_actions=
|
119
|
+
end
|
120
|
+
self._bel_eof_actions = [
|
121
|
+
0, 0, 2
|
115
122
|
]
|
116
123
|
|
117
124
|
class << self
|
@@ -121,29 +128,33 @@ self.bel_start = 1;
|
|
121
128
|
class << self
|
122
129
|
attr_accessor :bel_first_final
|
123
130
|
end
|
124
|
-
self.bel_first_final =
|
131
|
+
self.bel_first_final = 2;
|
125
132
|
class << self
|
126
133
|
attr_accessor :bel_error
|
127
134
|
end
|
128
135
|
self.bel_error = 0;
|
129
136
|
|
130
137
|
class << self
|
131
|
-
attr_accessor :
|
138
|
+
attr_accessor :bel_en_relationship_node
|
132
139
|
end
|
133
|
-
self.
|
140
|
+
self.bel_en_relationship_node = 1;
|
134
141
|
|
135
142
|
|
136
|
-
# end: ragel
|
143
|
+
# end: ragel
|
137
144
|
end
|
138
145
|
|
139
146
|
def each
|
140
|
-
@buffers
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
+
@buffers = {}
|
148
|
+
@incomplete = {}
|
149
|
+
stack = []
|
150
|
+
data = @content.unpack('C*')
|
151
|
+
p = 0
|
152
|
+
p_start = 0
|
153
|
+
p_end = 0
|
154
|
+
pe = data.length
|
155
|
+
eof = data.length
|
156
|
+
|
157
|
+
# begin: ragel
|
147
158
|
|
148
159
|
begin
|
149
160
|
p ||= 0
|
@@ -188,29 +199,11 @@ begin
|
|
188
199
|
cs = _bel_trans_targs[_trans]
|
189
200
|
if _bel_trans_actions[_trans] != 0
|
190
201
|
case _bel_trans_actions[_trans]
|
191
|
-
when 3 then
|
192
|
-
begin
|
193
|
-
|
194
|
-
@buffers[:relationship] << data[p].ord
|
195
|
-
end
|
196
202
|
when 1 then
|
197
203
|
begin
|
198
204
|
|
199
|
-
|
200
|
-
|
201
|
-
begin
|
202
|
-
|
203
|
-
@buffers[:relationship] << data[p].ord
|
204
|
-
end
|
205
|
-
when 2 then
|
206
|
-
begin
|
207
|
-
|
208
|
-
@buffers[:relationship] = relationship(
|
209
|
-
utf8_string(@buffers[:relationship]))
|
210
|
-
end
|
211
|
-
begin
|
212
|
-
|
213
|
-
yield @buffers[:relationship]
|
205
|
+
trace('RELATIONSHIP start_relationship')
|
206
|
+
p_start = p;
|
214
207
|
end
|
215
208
|
end
|
216
209
|
end
|
@@ -227,6 +220,31 @@ begin
|
|
227
220
|
end
|
228
221
|
end
|
229
222
|
if _goto_level <= _test_eof
|
223
|
+
if p == eof
|
224
|
+
case _bel_eof_actions[cs]
|
225
|
+
when 2 then
|
226
|
+
begin
|
227
|
+
|
228
|
+
trace('RELATIONSHIP stop_relationship')
|
229
|
+
# It's not you, it's me. You're a p and I'm a non-protein coding r. It
|
230
|
+
# would never work, I just can't reach you.
|
231
|
+
p_end = p;
|
232
|
+
end
|
233
|
+
begin
|
234
|
+
|
235
|
+
trace('RELATIONSHIP relationship_end')
|
236
|
+
chars = data[p_start...p_end]
|
237
|
+
completed = !chars.empty?
|
238
|
+
ast_node = relationship(utf8_string(chars), complete: completed)
|
239
|
+
@buffers[:relationship] = ast_node
|
240
|
+
end
|
241
|
+
begin
|
242
|
+
|
243
|
+
yield @buffers[:relationship]
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
230
248
|
end
|
231
249
|
if _goto_level <= _out
|
232
250
|
break
|
@@ -234,7 +252,7 @@ begin
|
|
234
252
|
end
|
235
253
|
end
|
236
254
|
|
237
|
-
# end: ragel
|
255
|
+
# end: ragel
|
238
256
|
end
|
239
257
|
end
|
240
258
|
end
|
@@ -244,7 +262,7 @@ end
|
|
244
262
|
|
245
263
|
if __FILE__ == $0
|
246
264
|
$stdin.each_line do |line|
|
247
|
-
BELParser::Parsers::Expression::Relationship.parse(line) { |obj|
|
265
|
+
BELParser::Parsers::Expression::Relationship.parse(line.strip) { |obj|
|
248
266
|
puts obj.inspect
|
249
267
|
}
|
250
268
|
end
|
@@ -6,28 +6,40 @@
|
|
6
6
|
include 'common.rl';
|
7
7
|
|
8
8
|
action start_relationship {
|
9
|
-
|
9
|
+
trace('RELATIONSHIP start_relationship')
|
10
|
+
p_start = p;
|
10
11
|
}
|
11
12
|
|
12
|
-
action
|
13
|
-
|
13
|
+
action stop_relationship {
|
14
|
+
trace('RELATIONSHIP stop_relationship')
|
15
|
+
# It's not you, it's me. You're a p and I'm a non-protein coding r. It
|
16
|
+
# would never work, I just can't reach you.
|
17
|
+
p_end = p;
|
14
18
|
}
|
15
19
|
|
16
|
-
action
|
17
|
-
|
18
|
-
|
20
|
+
action relationship_end {
|
21
|
+
trace('RELATIONSHIP relationship_end')
|
22
|
+
chars = data[p_start...p_end]
|
23
|
+
completed = !chars.empty?
|
24
|
+
ast_node = relationship(utf8_string(chars), complete: completed)
|
25
|
+
@buffers[:relationship] = ast_node
|
19
26
|
}
|
20
27
|
|
21
28
|
action yield_relationship {
|
22
29
|
yield @buffers[:relationship]
|
23
30
|
}
|
24
31
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
32
|
+
relationship =
|
33
|
+
RELATIONSHIP
|
34
|
+
>start_relationship
|
35
|
+
%stop_relationship
|
36
|
+
;
|
37
|
+
|
38
|
+
relationship_node :=
|
39
|
+
relationship
|
40
|
+
%relationship_end
|
41
|
+
%yield_relationship
|
42
|
+
;
|
31
43
|
}%%
|
32
44
|
=end
|
33
45
|
# end: ragel
|
@@ -35,6 +47,7 @@
|
|
35
47
|
require_relative '../ast/node'
|
36
48
|
require_relative '../mixin/buffer'
|
37
49
|
require_relative '../nonblocking_io_wrapper'
|
50
|
+
require_relative '../tracer'
|
38
51
|
|
39
52
|
module BELParser
|
40
53
|
module Parsers
|
@@ -60,25 +73,30 @@ module BELParser
|
|
60
73
|
include Enumerable
|
61
74
|
include BELParser::Parsers::Buffer
|
62
75
|
include BELParser::Parsers::AST::Sexp
|
76
|
+
include BELParser::Parsers::Tracer
|
63
77
|
|
64
78
|
def initialize(content)
|
65
79
|
@content = content
|
66
|
-
# begin: ragel
|
80
|
+
# begin: ragel
|
67
81
|
%% write data;
|
68
|
-
# end: ragel
|
82
|
+
# end: ragel
|
69
83
|
end
|
70
84
|
|
71
85
|
def each
|
72
|
-
@buffers
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
86
|
+
@buffers = {}
|
87
|
+
@incomplete = {}
|
88
|
+
stack = []
|
89
|
+
data = @content.unpack('C*')
|
90
|
+
p = 0
|
91
|
+
p_start = 0
|
92
|
+
p_end = 0
|
93
|
+
pe = data.length
|
94
|
+
eof = data.length
|
95
|
+
|
96
|
+
# begin: ragel
|
79
97
|
%% write init;
|
80
98
|
%% write exec;
|
81
|
-
# end: ragel
|
99
|
+
# end: ragel
|
82
100
|
end
|
83
101
|
end
|
84
102
|
end
|
@@ -88,7 +106,7 @@ end
|
|
88
106
|
|
89
107
|
if __FILE__ == $0
|
90
108
|
$stdin.each_line do |line|
|
91
|
-
BELParser::Parsers::Expression::Relationship.parse(line) { |obj|
|
109
|
+
BELParser::Parsers::Expression::Relationship.parse(line.strip) { |obj|
|
92
110
|
puts obj.inspect
|
93
111
|
}
|
94
112
|
end
|