forked from nathansobo/treetop
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (23 loc) · 660 Bytes
/
Rakefile
File metadata and controls
28 lines (23 loc) · 660 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'rake'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
task :default => :spec
Spec::Rake::SpecTask.new do |t|
t.pattern = 'spec/**/*spec.rb'
t.libs << 'spec'
end
load "./treetop.gemspec"
Rake::GemPackageTask.new($gemspec) do |pkg|
pkg.need_tar = true
end
task :spec => 'lib/treetop/compiler/metagrammar.treetop'
file 'lib/treetop/compiler/metagrammar.treetop' do |t|
unless $bootstrapped_gen_1_metagrammar
load File.expand_path('../lib/treetop/bootstrap_gen_1_metagrammar.rb', __FILE__)
end
Treetop::Compiler::GrammarCompiler.new.compile(METAGRAMMAR_PATH)
end
task :version do
puts RUBY_VERSION
end