public
Description: A Ruby-based parsing DSL based on parsing expression grammars.
Homepage: http://treetop.rubyforge.org
Clone URL: git://github.com/nathansobo/treetop.git
Reorganized specs and fixed requires to expand_path. Started on 
IntervalSkipList.
Nathan Sobo (author)
Fri Jan 18 11:32:51 -0800 2008
commit  f00df0c2ea80331990077cbe934ee5af25310f43
tree    59031d4aa0c9969dfbac5513c57f3f5a31352347
parent  6badf35050c838ef49125889b20b29c91162c4b8
...
3
4
5
6
7
 
 
...
3
4
5
 
6
7
8
0
@@ -3,4 +3,5 @@ require "#{dir}/runtime/compiled_parser"
0
 require "#{dir}/runtime/syntax_node"
0
 require "#{dir}/runtime/node_cache"
0
 require "#{dir}/runtime/parse_cache"
0
-require "#{dir}/runtime/terminal_parse_failure"
0
\ No newline at end of file
0
+require "#{dir}/runtime/terminal_parse_failure"
0
+require "#{dir}/runtime/interval_skip_list"
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module AndPredicateSpec
0
   describe "An &-predicated terminal symbol" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module AnythingSymbolSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module CharacterClassSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module ChoiceSpec
0
   describe "A choice between terminal symbols" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 BENCHMARK = false
0
 
0
 module CircularCompilationSpec
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 describe "An expression for braces surrounding zero or more letters followed by semicolons" do
0
   testing_expression "'{' ([a-z] ';')* '}'"
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 describe Compiler::GrammarCompiler do
0
   attr_reader :compiler, :source_path_with_treetop_extension, :source_path_with_tt_extension, :target_path, :alternate_target_path
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module GrammarSpec
0
   module Bar
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module NonterminalSymbolSpec
0
   describe "A nonterminal symbol followed by a block" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module NotPredicateSpec
0
   describe "A !-predicated terminal symbol" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module OneOrMoreSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module OptionalSpec
0
   describe "An optional terminal symbol" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module ParenthesizedExpressionSpec
0
   describe "An unadorned expression inside of parentheses" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module ParsingRuleSpec
0
   describe "a grammar with one parsing rule" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module SequenceSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module TerminalSymbolSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module TerminalSymbolSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module ZeroOrMoreSpec
0
   class Foo < Treetop::Runtime::SyntaxNode
...
1
2
 
3
4
5
...
 
 
1
2
3
4
0
@@ -1,5 +1,4 @@
0
-dir = File.dirname(__FILE__)
0
-require File.join(dir, '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 module GrammarCompositionSpec
0
   describe "several composed grammars" do
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-require File.join(File.dirname(__FILE__), '..', 'spec_helper')
0
+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
0
 
0
 describe String do
0
   before do
...
91
92
93
94
 
95
96
 
 
 
 
 
 
 
 
97
...
91
92
93
 
94
95
96
97
98
99
100
101
102
103
104
105
0
@@ -91,6 +91,14 @@ module Treetop
0
     end
0
 
0
     Spec::Example::ExampleGroupFactory.register(:compiler, self)
0
- Spec::Example::ExampleGroupFactory.register(:parser, self)
0
+ Spec::Example::ExampleGroupFactory.register(:runtime, self)
0
   end
0
 end
0
+
0
+class Symbol
0
+ def to_proc
0
+ lambda do |x|
0
+ x.send(self)
0
+ end
0
+ end
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.