/
Rakefile
40 lines (32 loc) · 966 Bytes
/
Rakefile
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
29
30
31
32
33
34
35
36
37
38
39
require 'rubygems'
require 'burke'
require 'treetop'
require 'cucumber/rake/task'
Burke.setup do
name 'coal'
summary 'Enables low-level code to coexist with Ruby.'
author 'Aiden Nibali'
email 'dismal.denizen@gmail.com'
homepage 'http://github.com/dismaldenizen/coal'
dependencies do |d|
d['treetop'] = '~> 1.4'
d['libjit-ffi'] = '0.0.0'
end
clean %w[.yardoc tmp]
clobber %w[pkg doc html coverage]
end
namespace :compile do
desc 'Compile Treetop grammar'
task :grammar do
grammar_file = File.join(*%w[lib coal parser c.treetop])
output_file = File.join(*%w[lib coal parser treetop_parser.rb])
rm output_file if File.exists? output_file
Treetop::Compiler::GrammarCompiler.new.compile(grammar_file, output_file)
end
end
Cucumber::Rake::Task.new
task :cucumber => ['compile:grammar']
desc "Run benchmarks"
task :benchmarks => ['compile:grammar'] do |t|
require 'benchmarks/run'
end