Sha256: 44aabd8ea49b22518cdd2d6b78d9aa4b3fef1fcb7337f93422ac23f1286823e0
Contents?: true
Size: 856 Bytes
Versions: 10
Compression:
Stored size: 856 Bytes
Contents
require 'erb' require 'cucumber/platform' require 'cucumber/ast' require 'cucumber/parser/treetop_ext' require 'cucumber/parser/table' module Cucumber # Classes in this module parse feature files and translate the parse tree # (concrete syntax tree) into an abstract syntax tree (AST) using # <a href="http://martinfowler.com/dslwip/EmbeddedTranslation.html">Embedded translation</a>. # # The AST is built by the various <tt>#build</tt> methods in the parse tree. # # The AST classes are defined in the Cucumber::Ast module. module Parser def self.load_parser(keywords) template = File.open(File.dirname(__FILE__) + "/parser/i18n.tt", Cucumber.file_mode('r')).read erb = ERB.new(template) grammar = erb.result(binding) Treetop.load_from_string(grammar) require 'cucumber/parser/feature' end end end
Version data entries
10 entries across 10 versions & 1 rubygems