Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9e4f6c6847
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.551 kB
class SyntaxGenerator
def generate
require 'erb'
require 'gherkin/i18n'
template = ERB.new(IO.read(File.dirname(__FILE__) + '/lexer.erb.py'))
syntax = template.result(binding)
syntax_file = File.dirname(__FILE__) + '/gherkin_lexer/__init__.py'
File.open(syntax_file, "w") do |io|
io.write(syntax)
end
end
def escape(s)
s.gsub(/'/, "\\\\'").gsub(/\*/, "\\\\*")
end
end
desc 'Generate Gherkin lexer for all languages supported by Cucumber'
task :generate do
SyntaxGenerator.new.generate
end
Jump to Line
Something went wrong with that request. Please try again.