0
@@ -55,22 +55,22 @@ module IterativeParsingSpec
0
parser.max_terminal_failure_last_index.should == 13
0
- the =
node_cache.get_result(:the, 0)
0
+ the =
result_cache.get_result(:the, 0)
0
the.text_value.should == "the"
0
- green =
node_cache.get_result(:color, 4)
0
+ green =
result_cache.get_result(:color, 4)
0
green.element.text_value.should == "green"
0
- failure =
node_cache.get_result(:dog, 10)
0
+ failure =
result_cache.get_result(:dog, 10)
0
failure.should be_an_instance_of(ParseFailure)
0
failure.interval.should == (10..10)
0
parser.expire(12..13, 0)
0
- node_cache.should_not have_result(:dog, 10)
0
- node_cache.should_not have_result(:color, 4)
0
- node_cache.should_not have_result(:foo, 0)
0
+ result_cache.should_not have_result(:dog, 10)
0
+ result_cache.should_not have_result(:color, 4)
0
+ result_cache.should_not have_result(:foo, 0)
0
new_result = parser.reparse
0
@@ -102,16 +102,16 @@ module IterativeParsingSpec
0
result = parse('foobarbaz')
0
result.should_not be_nil
0
- node_cache = parser.send(:expirable_result_cache)
0
- node_cache.should have_result(:a, 0)
0
- node_cache.should have_result(:b, 0)
0
- node_cache.should have_result(:c, 3)
0
+ result_cache = parser.send(:expirable_result_cache)
0
+ result_cache.should have_result(:a, 0)
0
+ result_cache.should have_result(:b, 0)
0
+ result_cache.should have_result(:c, 3)
0
-
node_cache.expire(7..8, 0)
0
+
result_cache.expire(7..8, 0)
0
- node_cache.should_not have_result(:a, 0)
0
- node_cache.should_not have_result(:b, 0)
0
- node_cache.should_not have_result(:c, 3)
0
+ result_cache.should_not have_result(:a, 0)
0
+ result_cache.should_not have_result(:b, 0)
0
+ result_cache.should_not have_result(:c, 3)
0
@@ -131,32 +131,32 @@ module IterativeParsingSpec
0
it "expires the results of choices that depend on failures that are invalidated as the user types" do
0
parse(input).should_not be_nil
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:number, 0)
0
- node_cache.should_not have_result(:addition, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should_not have_result(:addition, 0)
0
+ result_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:number, 0)
0
- node_cache.should_not have_result(:addition, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should_not have_result(:addition, 0)
0
+ result_cache.should have_result(:number, 0)
0
reparse.should_not be_nil
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:addition, 2)
0
- node_cache.should have_result(:number, 2)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:addition, 2)
0
+ result_cache.should have_result(:number, 2)
0
@@ -180,52 +180,52 @@ module IterativeParsingSpec
0
it "expires the stale failure of addition as successive characters are added to the buffer" do
0
parse(input, :return_parse_failure => true, :return_propagations => true)
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:primary, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:primary, 0)
0
+ result_cache.should have_result(:number, 0)
0
- node_cache.should_not have_result(:addition, 0)
0
- node_cache.should_not have_result(:primary, 0)
0
- node_cache.should have_result(:number, 0)
0
+ result_cache.should_not have_result(:addition, 0)
0
+ result_cache.should_not have_result(:primary, 0)
0
+ result_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:addition, 1)
0
- node_cache.should have_result(:primary, 0)
0
- node_cache.should have_result(:primary, 1)
0
- node_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:number, 1)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:addition, 1)
0
+ result_cache.should have_result(:primary, 0)
0
+ result_cache.should have_result(:primary, 1)
0
+ result_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:number, 1)
0
- node_cache.should_not have_result(:addition, 0)
0
- node_cache.should_not have_result(:addition, 1)
0
- node_cache.should_not have_result(:primary, 0)
0
- node_cache.should have_result(:primary, 1)
0
- node_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:number, 1)
0
+ result_cache.should_not have_result(:addition, 0)
0
+ result_cache.should_not have_result(:addition, 1)
0
+ result_cache.should_not have_result(:primary, 0)
0
+ result_cache.should have_result(:primary, 1)
0
+ result_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:number, 1)
0
- node_cache.should have_result(:addition, 0)
0
- node_cache.should have_result(:addition, 1)
0
- node_cache.should have_result(:primary, 0)
0
- node_cache.should have_result(:primary, 1)
0
- node_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:number, 1)
0
+ result_cache.should have_result(:addition, 0)
0
+ result_cache.should have_result(:addition, 1)
0
+ result_cache.should have_result(:primary, 0)
0
+ result_cache.should have_result(:primary, 1)
0
+ result_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:number, 1)
0
- node_cache.should_not have_result(:addition, 0)
0
- node_cache.should_not have_result(:addition, 1)
0
- node_cache.should_not have_result(:addition, 2)
0
- node_cache.should_not have_result(:primary, 0)
0
- node_cache.should have_result(:primary, 1) # is this true?
0
- node_cache.should_not have_result(:primary, 2)
0
- node_cache.should have_result(:number, 0)
0
- node_cache.should have_result(:number, 1)
0
- node_cache.should_not have_result(:number, 2)
0
+ result_cache.should_not have_result(:addition, 0)
0
+ result_cache.should_not have_result(:addition, 1)
0
+ result_cache.should_not have_result(:addition, 2)
0
+ result_cache.should_not have_result(:primary, 0)
0
+ result_cache.should have_result(:primary, 1) # is this true?
0
+ result_cache.should_not have_result(:primary, 2)
0
+ result_cache.should have_result(:number, 0)
0
+ result_cache.should have_result(:number, 1)
0
+ result_cache.should_not have_result(:number, 2)
0
@@ -266,12 +266,12 @@ module IterativeParsingSpec
0
-
node_cache.should_not have_result(:number, 1)
0
+
result_cache.should_not have_result(:number, 1)
0
parser.reparse.should_not be_nil
0
-
node_cache.should_not have_result(:number, 1)
0
+
result_cache.should_not have_result(:number, 1)
0
parser.reparse.should_not be_nil
Comments
No one has commented yet.