diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-27 22:21:44 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-27 22:21:44 +0000 |
commit | 8c821c09eebe117bd8b100b6dc416ded0588b979 (patch) | |
tree | aacd4fb7d966eae215917e5556e9e08eeb43bc53 /lib/puppet/parser/parser.rb | |
parent | 37c10d176d8d3b7bb1920bbda66c6f0429b66730 (diff) | |
download | puppet-8c821c09eebe117bd8b100b6dc416ded0588b979.tar.gz puppet-8c821c09eebe117bd8b100b6dc416ded0588b979.tar.xz puppet-8c821c09eebe117bd8b100b6dc416ded0588b979.zip |
Mostly, this is a refactoring commit. There is one significant new feature,
though: overrides now only work within a class heirarchy, which is to say that
a subclass can override an element in a base class, but a child scope cannot
otherwise override an element in a base scope.
I've also done a good bit of refactoring, though; notably, AST#evaluate now
takes named arguments, and I changed the 'name' parameter to 'type' in all of
the Component classes (this was all internal, but was confusing as it was).
I also removed the need for the autonaming stuff -- it's now acceptable for
components not to have names, and everything behaves correctly. I haven't yet
removed the autoname code, though; I'll do that on the next commit.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@952 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/parser.rb')
-rw-r--r-- | lib/puppet/parser/parser.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb index f87c0d808..3030ea3fc 100644 --- a/lib/puppet/parser/parser.rb +++ b/lib/puppet/parser/parser.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by racc 1.4.5 +# This file is automatically generated by racc 1.4.4 # from racc grammer file "grammar.ra". # @@ -29,7 +29,7 @@ module Puppet class Parser < Racc::Parser -module_eval <<'..end grammar.ra modeval..id352a7e96a4', 'grammar.ra', 718 +module_eval <<'..end grammar.ra modeval..id427de77f6a', 'grammar.ra', 718 attr_reader :file attr_accessor :files @@ -144,9 +144,9 @@ def string=(string) end # $Id$ -..end grammar.ra modeval..id352a7e96a4 +..end grammar.ra modeval..id427de77f6a -##### racc 1.4.5 generates ### +##### racc 1.4.4 generates ### racc_reduce_table = [ 0, 0, :racc_error, @@ -1195,7 +1195,7 @@ module_eval <<'.,.,', 'grammar.ra', 493 module_eval <<'.,.,', 'grammar.ra', 504 def _reduce_72( val, _values, result ) result = AST::CompDef.new( - :name => AST::Name.new(:value => val[1], :line => @lexer.line), + :type => AST::Name.new(:value => val[1], :line => @lexer.line), :args => val[2], :file => @lexer.file, :line => @lexer.line, @@ -1209,7 +1209,7 @@ module_eval <<'.,.,', 'grammar.ra', 504 module_eval <<'.,.,', 'grammar.ra', 517 def _reduce_73( val, _values, result ) result = AST::CompDef.new( - :name => AST::Name.new(:value => val[1], :line => @lexer.line), + :type => AST::Name.new(:value => val[1], :line => @lexer.line), :args => val[2], :file => @lexer.file, :line => @lexer.line, @@ -1228,7 +1228,7 @@ module_eval <<'.,.,', 'grammar.ra', 534 def _reduce_74( val, _values, result ) #:args => val[2], args = { - :name => AST::Name.new(:value => val[1], :line => @lexer.line), + :type => AST::Name.new(:value => val[1], :line => @lexer.line), :file => @lexer.file, :line => @lexer.line, :keyword => val[0], @@ -1246,7 +1246,7 @@ module_eval <<'.,.,', 'grammar.ra', 534 module_eval <<'.,.,', 'grammar.ra', 551 def _reduce_75( val, _values, result ) args = { - :name => AST::Name.new(:value => val[1], :line => @lexer.line), + :type => AST::Name.new(:value => val[1], :line => @lexer.line), :file => @lexer.file, :line => @lexer.line, :keyword => val[0], |