diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-23 20:42:08 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-23 20:42:08 +0000 |
| commit | 8211df036e1d2d24e1084616fc3fc4891b06cfdd (patch) | |
| tree | 597f8b999cf5210a7ceff5ef1e1977f1de08c241 /lib/puppet/parser/grammar.ra | |
| parent | d20ac8e0b564e5413d571f2059de559e0783b72d (diff) | |
| download | puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.tar.gz puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.tar.xz puppet-8211df036e1d2d24e1084616fc3fc4891b06cfdd.zip | |
Many, many changes toward a completely functional system. The only current problems with my home config are that apache's stupid init script does not do status and that packages are not working as non-root users (which makes sense).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@703 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/grammar.ra')
| -rw-r--r-- | lib/puppet/parser/grammar.ra | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index 78fb9aa47..5fe801e15 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -25,18 +25,18 @@ program: statements { # this is mainly so we can test the parser separately from the # interpreter - if Puppet[:parseonly] - begin - if Puppet[:debug] - puts result.tree(0) - end - rescue NoMethodError => detail - Puppet.err detail - #exit(78) - end - #require 'puppet/parser/interpreter' - #result = Puppet::Server.new(result) - end +# if Puppet[:parseonly] +# begin +# if Puppet[:debug] +# puts result.tree(0) +# end +# rescue NoMethodError => detail +# Puppet.err detail +# #exit(78) +# end +# #require 'puppet/parser/interpreter' +# #result = Puppet::Server.new(result) +# end } statements: statement @@ -447,7 +447,7 @@ import: IMPORT QTEXT { Dir.chdir(dir) { Dir.glob(val[1]).each { |file| parser = Puppet::Parser::Parser.new() - parser.stack = self.stack + parser.files = self.files Puppet.debug("importing '%s'" % file) begin parser.file = file @@ -554,7 +554,7 @@ argumentlist: nothing arguments: argument | arguments COMMA argument { - if val[0].is_a?(AST::ASTArray) + if val[0].instance_of?(AST::ASTArray) val[0].push(val[2]) result = val[0] else @@ -567,14 +567,14 @@ arguments: argument } argument: name EQUALS rvalue { - result = AST::ASTArray.new( + result = AST::CompArgument.new( :line => @lexer.line, :file => @lexer.file, :children => [val[0],val[2]] ) } | name { - result = AST::ASTArray.new( + result = AST::CompArgument.new( :line => @lexer.line, :file => @lexer.file, :children => [val[0]] @@ -635,14 +635,15 @@ Puppet[:typecheck] = true Puppet[:paramcheck] = true ---- inner ---- -attr_reader :file, :files +attr_reader :file +attr_accessor :files # Create an AST array out of all of the args def aryfy(*args) if args[0].is_a?(AST::ASTArray) result = args.shift args.each { |arg| - args.push arg + result.push arg } else result = AST::ASTArray.new( |
