Rakefile in hotcell-0.0.1 vs Rakefile in hotcell-0.1.0

- old
+ new

@@ -1,17 +1,39 @@ -require "bundler/gem_tasks" +require 'bundler/gem_tasks' +require 'rake/extensiontask' +require 'rspec/core/rake_task' -namespace :build do +RSpec::Core::RakeTask.new(:spec) +Rake::ExtensionTask.new('lexerc') do |config| + config.lib_dir = 'lib/hotcell' +end + +task :default => :spec + +desc 'Builds all the project' +task :project do + %w(project:lexerr project:lexerc project:parser clobber compile).each do |task| + Rake::Task[task].invoke + end +end + +namespace :project do desc 'Build lexer' - task :lexer do - `ragel -R -T0 lib/hotcell/lexer.rl` + task :lexerr do + `ragel -R -F1 lib/hotcell/lexerr.rl` end + desc 'Build lexer' + task :lexerc do + `ragel -C -G2 ext/lexerc/lexerc.rl` + end + task :dot do - `ragel -Vp lib/hotcell/lexer.rl > lexer.dot` + `ragel -Vp lib/hotcell/lexerr.rl > lexerr.dot` + `ragel -Vp lib/hotcell/lexerc.rl > lexerc.dot` end desc 'Build parser' task :parser do - `racc -d -o lib/hotcell/parser.rb -O lib/hotcell/parser.out lib/hotcell/parser.y` + `racc -o lib/hotcell/parser.rb -O lib/hotcell/parser.out lib/hotcell/parser.y` end end