kaiseki 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kaiseki.rb +1 -1
- data/lib/parser_choice.rb +8 -1
- data/lib/parser_symbol.rb +1 -1
- metadata +2 -2
data/lib/kaiseki.rb
CHANGED
data/lib/parser_choice.rb
CHANGED
@@ -6,7 +6,14 @@ module Kaiseki
|
|
6
6
|
error = true
|
7
7
|
@expected.each do |n|
|
8
8
|
begin
|
9
|
-
|
9
|
+
value = catch :SkipSuccess do
|
10
|
+
return n.parse stream, options
|
11
|
+
end
|
12
|
+
if value == :NotImplemented
|
13
|
+
next
|
14
|
+
else
|
15
|
+
throw :SkipSuccess
|
16
|
+
end
|
10
17
|
rescue ParseError
|
11
18
|
next
|
12
19
|
end
|
data/lib/parser_symbol.rb
CHANGED
@@ -6,7 +6,7 @@ module Kaiseki
|
|
6
6
|
options[:grammar].rules[@expected].parse stream, options.merge(:rule => @expected)
|
7
7
|
else
|
8
8
|
STDERR.puts "skipping #{self}: not implemented"
|
9
|
-
throw :SkipSuccess
|
9
|
+
throw :SkipSuccess, :NotImplemented
|
10
10
|
end
|
11
11
|
else
|
12
12
|
raise "can't use #{self} without a grammar"
|