oga/task/lexer.rake

20 lines
503 B
Ruby
Raw Normal View History

2014-02-26 18:50:16 +00:00
rule '.rb' => '.rl' do |task|
sh "ragel -F1 -R #{task.source} -o #{task.name}"
end
rule '.c' => ['.rl', 'ext/ragel/base_lexer.rl'] do |task|
sh "ragel -I ext/ragel -C -G2 #{task.source} -o #{task.name}"
end
rule '.java' => ['.rl', 'ext/ragel/base_lexer.rl'] do |task|
sh "ragel -I ext/ragel -J #{task.source} -o #{task.name}"
2014-05-06 08:20:30 +00:00
end
desc 'Generates the lexers'
2014-05-06 08:20:30 +00:00
multitask :lexer => [
'ext/c/lexer.c',
2014-05-14 06:48:49 +00:00
'ext/java/org/liboga/xml/Lexer.java',
'lib/oga/xpath/lexer.rb',
'lib/oga/css/lexer.rb'
2014-05-06 08:20:30 +00:00
]