Removed Ragel Ruby patches
These are included in Ragel 6.9.
This commit is contained in:
parent
88f3dfc749
commit
ad26446a5f
|
@ -1,19 +1,5 @@
|
||||||
rule '.rb' => '.rl' do |task|
|
rule '.rb' => '.rl' do |task|
|
||||||
sh "ragel -F1 -R #{task.source} -o #{task.name}"
|
sh "ragel -F1 -R #{task.source} -o #{task.name}"
|
||||||
|
|
||||||
puts "Applying patch http://git.io/ow6e1A to #{task.name}"
|
|
||||||
|
|
||||||
# Patches the lexer based on http://git.io/ow6e1A.
|
|
||||||
input = File.read(task.source)
|
|
||||||
output = File.read(task.name)
|
|
||||||
getkey = input.match(/getkey\s+(.+);/)[1]
|
|
||||||
|
|
||||||
output = output.gsub(getkey, '_wide')
|
|
||||||
output = output.gsub('_trans = if', "_wide = #{getkey}\n _trans = if")
|
|
||||||
|
|
||||||
File.open(task.name, 'w') do |handle|
|
|
||||||
handle.write(output)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
rule '.c' => ['.rl', 'ext/ragel/base_lexer.rl'] do |task|
|
rule '.c' => ['.rl', 'ext/ragel/base_lexer.rl'] do |task|
|
||||||
|
|
Loading…
Reference in New Issue