Skip to content

Commit

Permalink
+ Switched to hoe's racc plugin to clean up rakefile and builds
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 6111]
  • Loading branch information
zenspider committed Jan 5, 2011
1 parent bc25807 commit 9908ee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Expand Up @@ -7,6 +7,7 @@ bin/ruby_parse
lib/gauntlet_rubyparser.rb
lib/ruby_lexer.rb
lib/ruby_parser.y
lib/ruby_parser.rb
lib/ruby_parser_extras.rb
test/test_ruby_lexer.rb
test/test_ruby_parser.rb
Expand Down
27 changes: 2 additions & 25 deletions Rakefile
Expand Up @@ -4,12 +4,13 @@ require 'rubygems'
require 'hoe'

Hoe.plugin :seattlerb
Hoe.plugin :racc

Hoe.add_include_dirs("../../ParseTree/dev/test",
"../../RubyInline/dev/lib",
"../../sexp_processor/dev/lib")

hoe = Hoe.spec 'ruby_parser' do
Hoe.spec 'ruby_parser' do
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'

self.rubyforge_name = 'parsetree'
Expand All @@ -18,35 +19,11 @@ hoe = Hoe.spec 'ruby_parser' do
extra_deps << ['sexp_processor', '~> 3.0']
end

hoe.spec.files += ['lib/ruby_parser.rb'] # jim.... cmon man

[:default, :multi, :test].each do |t|
task t => :parser
end

path = "pkg/ruby_parser-#{hoe.version}"
task path => :parser do
Dir.chdir path do
sh "rake parser"
end
end

desc "build the parser"
task :parser => ["lib/ruby_parser.rb"]

rule '.rb' => '.y' do |t|
# -v = verbose
# -t = debugging parser ~4% reduction in speed -- keep for now
# -l = no-line-convert
sh "racc -v -t -l -o #{t.name} #{t.source}"
end

task :clean do
rm_rf(Dir["**/*~"] +
Dir["**/*.diff"] +
Dir["coverage.info"] +
Dir["coverage"] +
Dir["lib/ruby_parser.rb"] +
Dir["lib/*.output"])
end

Expand Down

0 comments on commit 9908ee8

Please sign in to comment.