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 26 def self.code_merger 27 Puppet::Pops::Parser::CodeMerger.new 28 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 18 def self.evaluating_parser 19 unless defined?(Puppet::Parser::E4ParserAdapter) 20 require_relative '../../puppet/parser/e4_parser_adapter' 21 require_relative '../../puppet/pops/parser/code_merger' 22 end 23 E4ParserAdapter.new 24 end
parser()
click to toggle source
Produces a parser instance for the given environment
# File lib/puppet/parser/parser_factory.rb 11 def self.parser 12 evaluating_parser 13 end