class Puppet::Parser::ParserFactory
The ParserFactory makes selection of parser possible. Currently, it is possible to switch between two different parsers:
-
classic_parser, the parser in 3.1
-
eparser, the Expression Based
Parser
Public Class Methods
code_merger()
click to toggle source
# File lib/puppet/parser/parser_factory.rb 27 def self.code_merger 28 Puppet::Pops::Parser::CodeMerger.new 29 end
evaluating_parser()
click to toggle source
Creates an instance of an E4ParserAdapter that adapts an EvaluatingParser to the 3x way of parsing.
# File lib/puppet/parser/parser_factory.rb 19 def self.evaluating_parser 20 unless defined?(Puppet::Parser::E4ParserAdapter) 21 require_relative '../../puppet/parser/e4_parser_adapter' 22 require_relative '../../puppet/pops/parser/code_merger' 23 end 24 E4ParserAdapter.new 25 end
parser()
click to toggle source
Produces a parser instance for the given environment
# File lib/puppet/parser/parser_factory.rb 12 def self.parser 13 evaluating_parser 14 end