public
Fork of nathansobo/treetop
Description: A Ruby-based parsing DSL based on parsing expression grammars.
Homepage: http://treetop.rubyforge.org
Clone URL: git://github.com/juretta/treetop.git
Pending specs demonstrate wanted behavior for new Propagation result type 
returned from choice nodes
Nathan Sobo (author)
Fri Feb 29 17:38:12 -0800 2008
commit  9c28d778810ade6cab987ed8c081e5008157c80e
tree    005ce2523236b724ada1648068ba2d6eae98b9cd
parent  2dd5ed99e7baa7629db021e2e492785700c9224c
...
17
18
19
 
 
 
 
 
 
 
 
 
 
 
 
 
20
21
22
...
26
27
28
29
 
 
 
 
 
 
 
 
 
 
 
30
31
32
...
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
39
40
41
 
42
43
44
45
46
47
48
49
50
51
52
53
54
55
0
@@ -17,6 +17,19 @@ module ChoiceSpec
0
       result.should_not be_nil
0
       result.should respond_to(:baz_method)
0
     end
0
+
0
+
0
+ it "upon parsing a string matching the first alternative, returns a Propagation with the result of the first alternative as its result"
0
+
0
+ describe "upon parsing a string matching the second alternative" do
0
+ describe "the result" do
0
+ it "is an instance Propagation"
0
+ it "has the result of the second alternative as its #result"
0
+ it "has the failing result of the first alternative and the successful result of the second alternative as its dependencies"
0
+ end
0
+
0
+ it "records the failure of the first terminal"
0
+ end
0
   
0
     it "upon parsing a string matching the second alternative, records the failure of the first terminal" do
0
       result = parse('bar')
0
@@ -26,7 +39,17 @@ module ChoiceSpec
0
       failure.expected_string.should == 'foo'
0
       failure.index.should == 0
0
     end
0
-
0
+
0
+ describe "upon parsing a string matching the third alternative" do
0
+ describe "the result" do
0
+ it "is an instance Propagation"
0
+ it "has the result of the third alternative as its #result"
0
+ it "has the failing results of the first and second alternatives and the successful result of the third alternative as its dependencies"
0
+ end
0
+
0
+ it "records the failure of the first terminal and second terminals"
0
+ end
0
+
0
     it "upon parsing a string matching the third alternative, records the failure of the first two terminals" do
0
       result = parse('baz')
0
       

Comments

    No one has commented yet.