Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (25 sloc) 0.777 kb
cde75ce first commit
Marc Divins and Josep M. Bach authored
1 # encoding: utf-8
2 require 'bundler'
3 Bundler::GemHelper.install_tasks
4
5 require 'rake/testtask'
6 Rake::TestTask.new do |t|
7 t.libs << "test"
8 t.test_files = FileList['./test/**/*_test.rb']
9 end
10
5a5aee4 Josep M. Bach Let's start with the rex/rexical duo
txus authored
11 desc "Regenerate Gherkin-ruby lexer and parser."
12 task :regenerate do
13 has_rex = `which rex`
14 has_racc = `which racc`
15
16 if has_rex && has_racc
17 `rex lib/gherkin/parser/gherkin.rex -o lib/gherkin/parser/lexer.rb`
1c3b328 Nathaniel Talbott Add racc debugging ability.
ntalbott authored
18 `racc #{'--debug' if ENV['DEBUG_RACC']} lib/gherkin/parser/gherkin.y -o lib/gherkin/parser/parser.rb`
5a5aee4 Josep M. Bach Let's start with the rex/rexical duo
txus authored
19 else
20 puts "You need both Rexical and Racc to do that. Install them by doing:"
21 puts
22 puts "\t\tgem install rexical"
23 puts "\t\tgem install racc"
24 puts
25 puts "Or just type `bundle install`."
26 end
27 end
28
29 task :default => [:regenerate, :test]
Something went wrong with that request. Please try again.