Skip to content

Commit

Permalink
Make specs use the generated metagrammar.rb so debugging the parser i…
Browse files Browse the repository at this point in the history
…s easier and so there's never a mismatch between the parser that gets tested (via eval) and the parser that gets packaged (metagrammar.rb)

(cherry picked from commit d6ab4c3)
  • Loading branch information
jgarber authored and cjheath committed Jan 17, 2010
1 parent 0440003 commit d22299a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/compiler/character_class_spec.rb
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '..', 'spec_helper')
require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")

module CharacterClassSpec
class Foo < Treetop::Runtime::SyntaxNode
Expand Down
1 change: 1 addition & 0 deletions spec/compiler/circular_compilation_spec.rb
@@ -1,5 +1,6 @@
require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")
BENCHMARK = false
METAGRAMMAR_PATH = File.join(TREETOP_ROOT, 'compiler', 'metagrammar.treetop')

module CircularCompilationSpec
describe "a parser for the metagrammar" do
Expand Down
4 changes: 1 addition & 3 deletions spec/spec_helper.rb
Expand Up @@ -3,9 +3,7 @@
require 'benchmark'
require 'spec'

unless $bootstrapped_gen_1_metagrammar
load File.join(dir, '..', 'lib', 'treetop', 'bootstrap_gen_1_metagrammar.rb')
end
require File.join(dir, '..', 'lib', 'treetop')
include Treetop

Spec::Runner.configure do |config|
Expand Down

0 comments on commit d22299a

Please sign in to comment.