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

Version Path
aslakhellesoy-cucumber-0.1.99.10 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.11 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.12 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.2 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.3 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.5 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.6 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.7 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.8 lib/cucumber/parser.rb
aslakhellesoy-cucumber-0.1.99.9 lib/cucumber/parser.rb