Sha256: c37ba2f8c22818dec3fc2d93432d24f50977913be0cdbfc1cf6bc3e16d93476c
Contents?: true
Size: 940 Bytes
Versions: 2
Compression:
Stored size: 940 Bytes
Contents
require 'erb' require 'treetop' require 'treetop/runtime' require 'treetop/ruby_extensions' require 'cucumber/platform' require 'cucumber/ast' require 'cucumber/parser/file_parser' require 'cucumber/parser/treetop_ext' 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aslakhellesoy-cucumber-0.1.16.5 | lib/cucumber/parser.rb |
aslakhellesoy-cucumber-0.1.99.1 | lib/cucumber/parser.rb |