diff options
author | Luke Kanies <luke@madstop.com> | 2008-10-22 18:30:57 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-10-22 18:30:57 -0500 |
commit | 801b8a643d353176675023adaa25f26d0ec67403 (patch) | |
tree | 10f93a48f33b426776797047c49db2948a0c2df9 | |
parent | 9742c26310e6b30095651cb4e224c681603af1ff (diff) | |
parent | b2c1149b5f374df77ad3e017749f22f6981a453f (diff) | |
download | puppet-801b8a643d353176675023adaa25f26d0ec67403.tar.gz puppet-801b8a643d353176675023adaa25f26d0ec67403.tar.xz puppet-801b8a643d353176675023adaa25f26d0ec67403.zip |
Merge branch '0.24.x'
Conflicts:
lib/puppet/type/user.rb
29 files changed, 1788 insertions, 969 deletions
@@ -8,6 +8,16 @@ set file paths to 'false' to disable the CRL. 0.24.6 + Adding support to the user type for: profiles, auths, project, + key/value pairs (extension to Solaris RBAC support added in + 0.24.6) + + Fixed #1662 - Configuration Reference still references 'section' + + Fixed #1460 - enhance redhat puppetmaster init.d script to easy start puppetmaster as a mongrel cluster + + Fixed #1663 - Regression relating to facter fact naming from 0.24.5 + Fixed #1655 - Provider::Confine::Variable tests are broken Fixed #1646 - service puppet status does not work as non-root diff --git a/conf/redhat/puppet.spec b/conf/redhat/puppet.spec index b5090ed38..d71b8626e 100644 --- a/conf/redhat/puppet.spec +++ b/conf/redhat/puppet.spec @@ -7,7 +7,7 @@ Summary: A network tool for managing many disparate systems Name: puppet -Version: 0.24.5 +Version: 0.24.6 Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base diff --git a/conf/redhat/server.init b/conf/redhat/server.init index 8266977de..6871b9a92 100644 --- a/conf/redhat/server.init +++ b/conf/redhat/server.init @@ -1,7 +1,8 @@ #!/bin/bash # puppetmaster This shell script enables the puppetmaster server. # -# Author: Duane Griffin <d.griffin@psenterprise.com> +# Authors: Duane Griffin <d.griffin@psenterprise.com> +# Peter Meier <peter.meier@immerda.ch> (Mongrel enhancements) # # chkconfig: - 65 45 # @@ -22,6 +23,11 @@ fi PUPPETMASTER_OPTS="" [ -n "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_OPTS="--manifest=${PUPPETMASTER_MANIFEST}" +if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then + PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS --servertype=mongrel" +elif [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -eq 1 ]; then + PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --masterport=${PUPPETMASTER_PORTS[0]}" +fi [ -n "$PUPPETMASTER_LOG" ] && PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --logdest=${PUPPETMASTER_LOG}" PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} \ ${PUPPETMASTER_EXTRA_OPTS}" @@ -36,8 +42,16 @@ start() { # Confirm the manifest exists if [ -r $PUPPETMASTER_MANIFEST ]; then - daemon $PUPPETMASTER $PUPPETMASTER_OPTS - RETVAL=$? + if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then + for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do + echo -en "\nPort: ${PUPPETMASTER_PORTS[$i]}" + daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=/var/run/puppet/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid + ret=$?; [ $ret != 0 ] && RETVAL=$ret + done + else + daemon $PUPPETMASTER $PUPPETMASTER_OPTS + RETVAL=$? + fi else failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST" echo @@ -50,8 +64,16 @@ start() { stop() { echo -n $"Stopping puppetmaster: " - killproc $PUPPETMASTER - RETVAL=$? + if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then + for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do + echo -en "\nPort: ${PUPPETMASTER_PORTS[$i]}" + killproc -p /var/run/puppet/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid puppetmaster + ret=$?; [ $ret != 0 ] && RETVAL=$ret + done + else + killproc $PUPPETMASTER + RETVAL=$? + fi echo [ $RETVAL -eq 0 ] && rm -f "$lockfile" return $RETVAL @@ -67,6 +89,20 @@ genconfig() { $PUPPETMASTER $PUPPETMASTER_OPTS --genconfig } +puppetmaster_status() { + if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then + for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do + echo -en "Port ${PUPPETMASTER_PORTS[$i]}: " + status -p /var/run/puppet/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid puppetmaster + ret=$?; [ $ret != 0 ] && RETVAL=$ret + done + else + status $PUPPETMASTER + RETVAL=$? + fi + return $RETVAL +} + case "$1" in start) start @@ -81,8 +117,7 @@ case "$1" in [ -f "$lockfile" ] && restart ;; status) - status $PUPPETMASTER - RETVAL=$? + puppetmaster_status ;; genconfig) genconfig diff --git a/conf/redhat/server.sysconfig b/conf/redhat/server.sysconfig index fe673cc40..befb40fee 100644 --- a/conf/redhat/server.sysconfig +++ b/conf/redhat/server.sysconfig @@ -5,5 +5,27 @@ # Specify syslog to send log messages to the system log. #PUPPETMASTER_LOG=syslog +# You may specify an alternate port or an array of ports on which +# puppetmaster should listen. Default is: 8140 +# If you specify more than one port, the puppetmaster ist automatically +# started with the servertype set to mongrel. This might be interesting +# if you'd like to run your puppetmaster in a loadbalanced cluster. +# Please note: this won't setup nor start any loadbalancer. +# If you'd like to run puppetmaster with mongrel as servertype but only +# on one (specified) port, you have to add --servertype=mongrel to +# PUPPETMASTER_EXTRA_OPTS. +# Default: Empty (Puppetmaster isn't started with mongrel, nor on a +# specific port) +# +# Please note: Due to reduced options in the rc-functions lib in RHEL/Centos +# versions prior to 5, this feature won't work. Fedora versions >= 8 are +# known to work. +#PUPPETMASTER_PORTS="" +# Puppetmaster on a different port, run with standard webrick servertype +#PUPPETMASTER_PORTS="8141" +# Example with multiple ports which will start puppetmaster with mongrel +# as a servertype +#PUPPETMASTER_PORTS=( 18140 18141 18142 18143 ) + # You may specify other parameters to the puppetmaster here #PUPPETMASTER_EXTRA_OPTS=--noca diff --git a/lib/puppet.rb b/lib/puppet.rb index cc3c8e304..ff714e441 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -25,7 +25,7 @@ require 'puppet/util/suidmanager' # it's also a place to find top-level commands like 'debug' module Puppet - PUPPETVERSION = '0.24.5' + PUPPETVERSION = '0.24.6' def Puppet.version return PUPPETVERSION diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index 7f07cc322..23c2934b9 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -79,7 +79,13 @@ fstatement: NAME LPAREN funcvalues RPAREN { :arguments => args, :ftype => :statement } - | NAME LPAREN RPAREN { + | NAME LPAREN funcvalues COMMA RPAREN { + args = aryfy(val[2]) + result = ast AST::Function, + :name => val[0], + :arguments => args, + :ftype => :statement +} | NAME LPAREN RPAREN { result = ast AST::Function, :name => val[0], :arguments => AST::ASTArray.new({}), @@ -93,15 +99,22 @@ fstatement: NAME LPAREN funcvalues RPAREN { :ftype => :statement } -funcvalues: namestrings - | resourcerefs - -namestrings: namestring - | namestrings COMMA namestring { +funcvalues: namestring + | resourceref + | funcvalues COMMA namestring { result = aryfy(val[0], val[2]) result.line = @lexer.line result.file = @lexer.file } + | funcvalues COMMA resourceref { + unless val[0].is_a?(AST::ASTArray) + val[0] = aryfy(val[0]) + end + + val[0].push(val[2]) + + result = val[0] +} # This is *almost* an rvalue, but I couldn't get a full # rvalue to work without scads of shift/reduce conflicts. @@ -116,17 +129,6 @@ namestring: name result = ast AST::Name, :value => val[0] } -resourcerefs: resourceref - | resourcerefs COMMA resourceref { - unless val[0].is_a?(AST::ASTArray) - val[0] = aryfy(val[0]) - end - - val[0].push(val[2]) - - result = val[0] -} - resource: classname LBRACE resourceinstances endsemi RBRACE { array = val[2] if array.instance_of?(AST::ResourceInstance) @@ -701,6 +703,13 @@ array: LBRACK rvalues RBRACK { else result = ast AST::ASTArray, :children => [val[1]] end +} + | LBRACK rvalues COMMA RBRACK { + if val[1].instance_of?(AST::ASTArray) + result = val[1] + else + result = ast AST::ASTArray, :children => [val[1]] + end } | LBRACK RBRACK { result = ast AST::ASTArray } diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb index b025d52c5..713f93eb0 100644 --- a/lib/puppet/parser/parser.rb +++ b/lib/puppet/parser/parser.rb @@ -29,7 +29,7 @@ module Puppet class Parser < Racc::Parser -module_eval <<'..end grammar.ra modeval..idf5ced460e1', 'grammar.ra', 732 +module_eval <<'..end grammar.ra modeval..id5cb4445525', 'grammar.ra', 741 # It got too annoying having code in a file that needs to be compiled. require 'puppet/parser/parser_support' @@ -41,7 +41,7 @@ require 'puppet/parser/parser_support' # $Id$ -..end grammar.ra modeval..idf5ced460e1 +..end grammar.ra modeval..id5cb4445525 ##### racc 1.4.5 generates ### @@ -65,670 +65,666 @@ racc_reduce_table = [ 1, 63, :_reduce_none, 1, 63, :_reduce_none, 4, 71, :_reduce_18, - 3, 71, :_reduce_19, - 2, 71, :_reduce_20, + 5, 71, :_reduce_19, + 3, 71, :_reduce_20, + 2, 71, :_reduce_21, 1, 77, :_reduce_none, 1, 77, :_reduce_none, + 3, 77, :_reduce_24, + 3, 77, :_reduce_25, 1, 78, :_reduce_none, - 3, 78, :_reduce_24, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_none, - 1, 80, :_reduce_32, - 1, 79, :_reduce_none, - 3, 79, :_reduce_34, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_33, + 5, 64, :_reduce_34, 5, 64, :_reduce_35, 5, 64, :_reduce_36, - 5, 64, :_reduce_37, - 5, 75, :_reduce_38, - 2, 65, :_reduce_39, - 1, 96, :_reduce_40, - 2, 96, :_reduce_41, - 2, 66, :_reduce_42, - 3, 97, :_reduce_43, - 3, 97, :_reduce_44, + 5, 75, :_reduce_37, + 2, 65, :_reduce_38, + 1, 94, :_reduce_39, + 2, 94, :_reduce_40, + 2, 66, :_reduce_41, + 3, 95, :_reduce_42, + 3, 95, :_reduce_43, + 1, 96, :_reduce_none, + 1, 96, :_reduce_none, + 3, 96, :_reduce_46, + 1, 97, :_reduce_none, + 3, 97, :_reduce_48, 1, 98, :_reduce_none, 1, 98, :_reduce_none, - 3, 98, :_reduce_47, - 1, 99, :_reduce_none, - 3, 99, :_reduce_49, + 3, 99, :_reduce_51, + 3, 99, :_reduce_52, 1, 100, :_reduce_none, 1, 100, :_reduce_none, - 3, 101, :_reduce_52, - 3, 101, :_reduce_53, - 1, 102, :_reduce_none, - 1, 102, :_reduce_none, - 4, 104, :_reduce_56, - 1, 90, :_reduce_none, - 3, 90, :_reduce_58, - 0, 91, :_reduce_none, - 1, 91, :_reduce_none, - 1, 106, :_reduce_61, - 1, 81, :_reduce_62, - 1, 83, :_reduce_63, - 1, 105, :_reduce_none, - 1, 105, :_reduce_none, - 1, 105, :_reduce_none, - 1, 105, :_reduce_none, - 1, 105, :_reduce_none, - 1, 105, :_reduce_none, - 3, 67, :_reduce_70, - 3, 76, :_reduce_71, - 0, 92, :_reduce_72, - 1, 92, :_reduce_73, - 3, 92, :_reduce_74, - 3, 109, :_reduce_75, - 3, 111, :_reduce_76, - 1, 112, :_reduce_none, - 1, 112, :_reduce_none, - 0, 95, :_reduce_79, - 1, 95, :_reduce_80, - 3, 95, :_reduce_81, - 1, 113, :_reduce_none, - 3, 113, :_reduce_83, + 4, 102, :_reduce_55, + 1, 88, :_reduce_none, + 3, 88, :_reduce_57, + 0, 89, :_reduce_none, + 1, 89, :_reduce_none, + 1, 104, :_reduce_60, + 1, 80, :_reduce_61, + 1, 82, :_reduce_62, 1, 103, :_reduce_none, 1, 103, :_reduce_none, 1, 103, :_reduce_none, 1, 103, :_reduce_none, 1, 103, :_reduce_none, 1, 103, :_reduce_none, + 3, 67, :_reduce_69, + 3, 76, :_reduce_70, + 0, 90, :_reduce_71, + 1, 90, :_reduce_72, + 3, 90, :_reduce_73, + 3, 107, :_reduce_74, + 3, 109, :_reduce_75, 1, 110, :_reduce_none, 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 1, 110, :_reduce_none, - 4, 85, :_reduce_100, - 3, 85, :_reduce_101, - 1, 87, :_reduce_102, - 1, 87, :_reduce_103, - 1, 84, :_reduce_104, - 4, 88, :_reduce_105, - 4, 88, :_reduce_106, - 6, 69, :_reduce_107, - 5, 69, :_reduce_108, - 0, 115, :_reduce_none, - 4, 115, :_reduce_110, - 3, 115, :_reduce_111, + 0, 93, :_reduce_78, + 1, 93, :_reduce_79, + 3, 93, :_reduce_80, + 1, 111, :_reduce_none, + 3, 111, :_reduce_82, + 1, 101, :_reduce_none, + 1, 101, :_reduce_none, + 1, 101, :_reduce_none, + 1, 101, :_reduce_none, + 1, 101, :_reduce_none, + 1, 101, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, 1, 108, :_reduce_none, - 3, 108, :_reduce_113, - 3, 108, :_reduce_114, - 3, 108, :_reduce_115, - 3, 108, :_reduce_116, - 3, 108, :_reduce_117, - 3, 108, :_reduce_118, - 2, 108, :_reduce_119, - 3, 108, :_reduce_120, - 3, 108, :_reduce_121, - 3, 108, :_reduce_122, - 3, 108, :_reduce_123, - 3, 108, :_reduce_124, - 3, 108, :_reduce_125, - 2, 108, :_reduce_126, - 3, 108, :_reduce_127, - 3, 108, :_reduce_128, - 3, 108, :_reduce_129, - 5, 68, :_reduce_130, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 1, 108, :_reduce_none, + 4, 84, :_reduce_99, + 3, 84, :_reduce_100, + 1, 86, :_reduce_101, + 1, 86, :_reduce_102, + 1, 83, :_reduce_103, + 4, 79, :_reduce_104, + 4, 79, :_reduce_105, + 6, 69, :_reduce_106, + 5, 69, :_reduce_107, + 0, 113, :_reduce_none, + 4, 113, :_reduce_109, + 3, 113, :_reduce_110, + 1, 106, :_reduce_none, + 3, 106, :_reduce_112, + 3, 106, :_reduce_113, + 3, 106, :_reduce_114, + 3, 106, :_reduce_115, + 3, 106, :_reduce_116, + 3, 106, :_reduce_117, + 2, 106, :_reduce_118, + 3, 106, :_reduce_119, + 3, 106, :_reduce_120, + 3, 106, :_reduce_121, + 3, 106, :_reduce_122, + 3, 106, :_reduce_123, + 3, 106, :_reduce_124, + 2, 106, :_reduce_125, + 3, 106, :_reduce_126, + 3, 106, :_reduce_127, + 3, 106, :_reduce_128, + 5, 68, :_reduce_129, + 1, 114, :_reduce_none, + 2, 114, :_reduce_131, + 5, 115, :_reduce_132, + 4, 115, :_reduce_133, 1, 116, :_reduce_none, - 2, 116, :_reduce_132, - 5, 117, :_reduce_133, - 4, 117, :_reduce_134, + 3, 116, :_reduce_135, + 3, 85, :_reduce_136, 1, 118, :_reduce_none, - 3, 118, :_reduce_136, - 3, 86, :_reduce_137, + 4, 118, :_reduce_138, 1, 120, :_reduce_none, - 4, 120, :_reduce_139, - 1, 122, :_reduce_none, - 3, 122, :_reduce_141, - 3, 121, :_reduce_142, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_none, - 1, 119, :_reduce_150, - 1, 123, :_reduce_151, - 3, 123, :_reduce_152, - 2, 70, :_reduce_153, - 6, 72, :_reduce_154, - 5, 72, :_reduce_155, - 6, 73, :_reduce_156, - 5, 73, :_reduce_157, - 6, 74, :_reduce_158, - 5, 74, :_reduce_159, - 1, 94, :_reduce_none, - 1, 89, :_reduce_none, - 1, 89, :_reduce_none, + 3, 120, :_reduce_140, + 3, 119, :_reduce_141, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_none, + 1, 117, :_reduce_149, + 1, 121, :_reduce_150, + 3, 121, :_reduce_151, + 2, 70, :_reduce_152, + 6, 72, :_reduce_153, + 5, 72, :_reduce_154, + 6, 73, :_reduce_155, + 5, 73, :_reduce_156, + 6, 74, :_reduce_157, + 5, 74, :_reduce_158, + 1, 92, :_reduce_none, + 1, 87, :_reduce_none, + 1, 87, :_reduce_none, + 1, 124, :_reduce_none, + 3, 124, :_reduce_163, 1, 126, :_reduce_none, - 3, 126, :_reduce_164, - 1, 128, :_reduce_none, - 1, 128, :_reduce_none, - 1, 128, :_reduce_none, + 1, 126, :_reduce_none, + 1, 126, :_reduce_none, + 1, 126, :_reduce_none, + 0, 62, :_reduce_168, + 0, 127, :_reduce_169, + 1, 122, :_reduce_none, + 3, 122, :_reduce_171, + 3, 122, :_reduce_172, 1, 128, :_reduce_none, - 0, 62, :_reduce_169, - 0, 129, :_reduce_170, - 1, 124, :_reduce_none, - 3, 124, :_reduce_172, - 3, 124, :_reduce_173, - 1, 130, :_reduce_none, - 3, 130, :_reduce_175, - 3, 131, :_reduce_176, - 1, 131, :_reduce_177, - 3, 131, :_reduce_178, - 1, 131, :_reduce_179, - 1, 127, :_reduce_none, - 2, 127, :_reduce_181, + 3, 128, :_reduce_174, + 3, 129, :_reduce_175, + 1, 129, :_reduce_176, + 3, 129, :_reduce_177, + 1, 129, :_reduce_178, 1, 125, :_reduce_none, - 2, 125, :_reduce_183, - 1, 132, :_reduce_none, - 1, 132, :_reduce_none, - 1, 82, :_reduce_186, - 3, 107, :_reduce_187, - 2, 107, :_reduce_188, - 1, 114, :_reduce_none, - 1, 114, :_reduce_none, - 0, 93, :_reduce_none, - 1, 93, :_reduce_192 ] + 2, 125, :_reduce_180, + 1, 123, :_reduce_none, + 2, 123, :_reduce_182, + 1, 130, :_reduce_none, + 1, 130, :_reduce_none, + 1, 81, :_reduce_185, + 3, 105, :_reduce_186, + 4, 105, :_reduce_187, + 2, 105, :_reduce_188, + 1, 112, :_reduce_none, + 1, 112, :_reduce_none, + 0, 91, :_reduce_none, + 1, 91, :_reduce_192 ] racc_reduce_n = 193 racc_shift_n = 317 racc_action_table = [ - 75, 54, 57, 273, 178, 39, 40, 201, 88, 238, - 51, 178, 89, 213, 245, 8, 265, 198, 199, 246, - 72, 75, 54, 57, 136, 90, 39, 40, 236, 237, - 136, 45, 39, 40, 129, 56, 59, 236, 237, 66, - 41, 72, 154, 44, 52, 76, 177, 162, 62, 92, - 146, 84, 45, 75, 54, 57, 56, 59, 45, 126, - 66, 41, 250, 167, 44, 52, 76, 41, -146, 62, - 44, -143, 84, 72, 75, 54, 57, 291, 156, 157, - 158, 144, 145, 147, 45, 234, 253, 286, 56, 59, - 290, 162, 66, 233, 72, 285, 37, 52, 76, 158, - 144, 62, 45, 4, 84, 45, 154, 167, 37, 56, - 59, 155, 162, 66, 146, 4, 8, 37, 52, 76, - 150, 154, 62, 45, 4, 84, 158, 144, 167, 146, - 148, 151, 153, 105, 230, 75, 54, 57, 198, 199, - 33, 34, 156, 157, 158, 144, 145, 147, 156, 157, - 158, 144, 138, 149, 152, 72, 154, 156, 157, 158, - 144, 145, 147, 257, 146, 162, 45, 75, 54, 57, - 56, 59, 245, -145, 66, 37, 45, 246, 183, 52, - 76, 167, 4, 62, 54, 57, 84, 72, 75, 54, - 57, 259, 156, 157, 158, 144, 145, 147, 45, 161, - 239, 161, 56, 59, 236, 237, 66, 137, 72, 154, - 136, 52, 76, 198, 299, 62, -147, 146, 84, 45, - 75, 54, 57, 56, 59, 197, 51, 66, -144, 198, - 199, -148, 52, 76, 54, 57, 62, 268, 178, 84, - 72, 75, 54, 57, 188, 156, 157, 158, 144, 145, - 147, 45, -149, -144, 88, 56, 59, -146, -148, 66, - -143, 72, 135, -147, 52, 76, -160, 271, 62, -145, - 161, 84, 45, 75, 54, 57, 56, 59, 272, 172, - 66, 156, 157, 158, 144, 52, 76, 132, 173, 62, - 89, 108, 84, 72, 75, 54, 57, 156, 157, 158, - 144, 145, 147, 174, 45, 287, 288, 289, 56, 59, - 180, 105, 66, 100, 72, 188, 184, 52, 76, 186, - -143, 62, 271, 302, 84, 45, 75, 54, 57, 56, - 59, -143, -146, 66, -144, -148, -145, 303, 52, 76, - 188, -146, 62, 71, 193, 84, 72, 75, 54, 57, - 156, 157, 158, 144, 145, 147, 191, 45, 38, 310, - -192, 56, 59, -145, 35, 66, 189, 72, -144, nil, - 52, 76, nil, nil, 62, nil, nil, 84, 45, 75, - 54, 57, 56, 59, nil, nil, 66, nil, nil, nil, - nil, 52, 76, nil, nil, 62, nil, nil, 84, 72, - 75, 54, 57, nil, nil, nil, nil, nil, nil, nil, - 45, nil, nil, nil, 56, 59, nil, nil, 66, nil, - 72, nil, nil, 52, 76, nil, nil, 62, nil, nil, - 84, 45, 75, 54, 57, 56, 59, nil, nil, 66, - nil, nil, nil, nil, 52, 76, nil, nil, 62, nil, - nil, 84, 72, 75, 54, 57, nil, nil, nil, nil, - nil, nil, nil, 45, nil, nil, nil, 56, 59, nil, - nil, 66, nil, 72, nil, nil, 52, 76, nil, nil, - 62, nil, nil, 84, 45, 75, 54, 57, 56, 59, - nil, nil, 66, nil, nil, nil, nil, 52, 76, nil, - nil, 62, nil, nil, 84, 72, 75, 54, 57, nil, - nil, nil, nil, nil, nil, nil, 45, 75, 54, 57, - 56, 59, nil, nil, 66, nil, 72, nil, nil, 52, - 76, nil, nil, 62, nil, nil, 84, 45, 75, 54, - 57, 56, 59, nil, nil, 66, nil, nil, 45, nil, - 52, 76, 56, 116, 62, nil, 66, 84, 72, nil, - nil, 111, 75, 54, 57, 62, nil, nil, nil, 45, - nil, nil, nil, 56, 59, nil, nil, 66, 75, 54, - 57, 141, 52, 76, nil, nil, 62, nil, nil, 84, - nil, nil, nil, 45, 75, 54, 57, 56, 59, nil, - nil, 66, nil, nil, nil, nil, 52, nil, nil, 45, - 62, nil, nil, 56, 59, nil, nil, 66, 75, 54, - 57, nil, 52, nil, nil, 45, 62, nil, nil, 56, - 59, nil, nil, 66, 75, 54, 57, nil, 52, nil, - nil, nil, 62, nil, 75, 54, 57, nil, nil, 45, - 75, 54, 57, 56, 59, nil, nil, 66, nil, nil, - nil, nil, 52, nil, nil, 45, 62, nil, nil, 56, - 59, nil, nil, 66, nil, 45, nil, nil, 52, 56, - 195, 45, 62, 66, nil, 56, 59, nil, 111, 66, - nil, nil, 62, nil, 52, 75, 54, 57, 62, nil, - nil, 51, 54, 57, nil, nil, nil, nil, nil, nil, - nil, 75, 54, 57, nil, nil, nil, 75, 54, 57, - nil, 48, nil, nil, nil, nil, 45, 75, 54, 57, - 56, 59, 45, nil, 66, nil, 56, 59, nil, 52, - 66, nil, 45, 62, 49, 52, 56, 59, 45, 62, - 66, nil, 56, 59, nil, 52, 66, nil, 45, 62, - nil, 52, 56, 59, nil, 62, 66, 54, 57, 54, - 57, 52, nil, nil, nil, 62, nil, nil, nil, nil, - nil, nil, nil, 54, 57, 54, 57, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 45, nil, 45, - nil, 56, 195, 56, 195, 66, nil, 66, 54, 57, - 111, 49, 111, 45, 62, 45, 62, 56, 195, 56, - 195, 66, nil, 66, nil, nil, 111, nil, 111, nil, - 62, nil, 62, 54, 57, 54, 57, 284, 45, nil, - nil, nil, 56, 195, nil, nil, 66, nil, nil, 54, - 57, 111, 208, nil, nil, 62, 54, 57, nil, nil, - nil, nil, nil, 45, nil, 45, nil, 56, 195, 56, - 195, 66, nil, 66, nil, nil, 111, nil, 111, 45, - 62, nil, 62, 56, 195, nil, 45, 66, 54, 57, - 56, 195, 111, nil, 66, nil, 62, nil, nil, 111, - nil, nil, nil, 62, 54, 57, nil, nil, 131, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 45, nil, - nil, nil, 56, 59, 203, nil, 66, nil, nil, nil, - 49, 52, nil, nil, 45, 62, nil, nil, 56, 59, - nil, nil, 66, 150, 154, nil, 49, 52, nil, nil, - nil, 62, 146, 148, 151, 153, 150, 154, nil, nil, - nil, nil, nil, nil, 212, 146, 148, 151, 153, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - 156, 157, 158, 144, 145, 147, nil, nil, nil, 149, - 152, 150, 154, 156, 157, 158, 144, 145, 147, nil, - 146, 148, 151, 153, 150, 154, nil, nil, nil, nil, - nil, nil, nil, 146, 148, 151, 153, nil, nil, nil, - nil, nil, nil, nil, 149, 152, nil, nil, 156, 157, - 158, 144, 145, 147, nil, nil, 296, nil, 152, 150, - 154, 156, 157, 158, 144, 145, 147, nil, 146, 148, - 151, 153, nil, nil, nil, nil, nil, 16, nil, 23, - 27, 294, 1, 5, nil, 10, nil, 13, nil, 20, - nil, 28, 149, 152, 4, 8, 156, 157, 158, 144, - 145, 147, 16, 293, 23, 27, nil, 1, 5, nil, - 10, nil, 13, nil, 20, nil, 28, nil, nil, 4, - 8, nil, 269, nil, 16, nil, 23, 27, nil, 1, - 5, nil, 10, nil, 13, nil, 20, nil, 28, nil, - nil, 4, 8, 16, 226, 23, 27, nil, 1, 5, - nil, 10, nil, 13, nil, 20, nil, 28, nil, nil, - 4, 8, nil, 308, nil, 16, nil, 23, 27, nil, - 1, 5, nil, 10, nil, 13, nil, 20, nil, 28, - nil, nil, 4, 8, 16, 312, 23, 27, nil, 1, - 5, nil, 10, nil, 13, nil, 20, nil, 28, nil, - nil, 4, 8, nil, 314, nil, 16, nil, 23, 27, - nil, 1, 5, nil, 10, nil, 13, nil, 20, nil, - 28, nil, nil, 4, 8, 16, 263, 23, 27, nil, - 1, 5, nil, 10, nil, 13, nil, 20, nil, 28, - nil, nil, 4, 8, nil, 315, nil, 16, nil, 23, - 27, nil, 1, 5, nil, 10, nil, 13, nil, 20, - nil, 28, nil, nil, 4, 8, 16, 256, 23, 27, - nil, 1, 5, nil, 10, nil, 13, nil, 20, nil, - 28, nil, nil, 4, 8, nil, 316, nil, 16, nil, - 23, 27, nil, 1, 5, nil, 10, nil, 13, nil, - 20, nil, 28, nil, nil, 4, 8, 16, nil, 23, - 27, nil, 1, 5, nil, 10, nil, 13, nil, 20, - nil, 28, nil, nil, 4, 8, 16, nil, 23, 27, - nil, 1, 5, nil, 10, nil, 13, nil, 20, nil, - 28, nil, nil, 4, 8, 16, nil, 23, 27, nil, - 1, 5, nil, 10, nil, 13, nil, 20, nil, 28, - nil, nil, 4, 8 ] + 75, 57, 61, 260, 179, 38, 40, 35, 44, 196, + 54, 287, 45, 239, 3, 6, 187, 298, 240, -145, + 74, 75, 57, 61, 286, 47, 38, 40, 194, 195, + 132, 49, 38, 40, 112, 60, 64, 194, 195, 70, + 41, 74, 149, 43, 55, 77, 178, 118, 66, 48, + 141, 87, 49, 75, 57, 61, 60, 64, 49, 109, + 70, 41, 253, 123, 43, 55, 77, 41, 105, 66, + 43, -146, 87, 74, 75, 57, 61, 202, 151, 152, + 153, 139, 140, 142, 49, 282, 128, 133, 60, 64, + 201, 239, 70, 281, 74, 149, 240, 55, 77, 271, + 118, 66, 179, 141, 87, 49, 75, 57, 61, 60, + 64, 49, 193, 70, 35, 132, 123, 174, 55, 77, + 192, 3, 66, 35, 258, 87, 74, 75, 57, 61, + 3, 151, 152, 153, 139, 140, 142, 49, 116, 35, + 155, 60, 64, 153, 139, 70, 3, 74, 149, -147, + 55, 77, -143, 118, 66, 156, 141, 87, 49, 75, + 57, 61, 60, 64, 49, 157, 70, 153, 139, 123, + 134, 55, 77, 57, 61, 66, 33, 34, 87, 74, + 75, 57, 61, 132, 151, 152, 153, 139, 140, 142, + 49, -145, 203, 274, 60, 64, 187, 188, 70, 275, + 74, 149, -142, 55, 77, -144, 118, 66, 45, 141, + 87, 49, 75, 57, 61, 60, 64, 49, 44, 70, + 57, 61, 123, -142, 55, 77, -159, 128, 66, 177, + 181, 87, 74, 75, 57, 61, -143, 151, 152, 153, + 139, 140, 142, 49, 116, 198, 278, 60, 64, 194, + 195, 70, 248, 74, 186, -145, 55, 77, 187, 188, + 66, 216, 183, 87, 49, 187, 217, -142, 60, 64, + 150, 283, 70, 151, 152, 153, 139, 55, 77, 145, + 149, 66, 284, 285, 87, 190, 105, 290, 141, 143, + 146, 148, 101, 190, 75, 57, 61, 151, 152, 153, + 139, 140, 142, 151, 152, 153, 139, 140, 142, 116, + 98, 97, 144, 147, 74, -142, 151, 152, 153, 139, + 140, 142, -144, -143, -147, 49, 75, 57, 61, 60, + 64, -144, 246, 70, 151, 152, 153, 139, 55, 77, + 244, 278, 66, 301, 302, 87, 74, 75, 57, 61, + -144, 179, -145, -148, 73, 190, -143, 49, 310, -192, + 37, 60, 64, -147, -146, 70, 292, 74, nil, nil, + 55, 77, nil, nil, 66, nil, nil, 87, 49, 75, + 57, 61, 60, 64, nil, nil, 70, nil, nil, nil, + nil, 55, 77, nil, nil, 66, nil, nil, 87, 74, + 75, 57, 61, nil, nil, nil, nil, nil, nil, nil, + 49, nil, nil, nil, 60, 64, nil, nil, 70, nil, + 74, nil, nil, 55, 77, nil, nil, 66, nil, nil, + 87, 49, 75, 57, 61, 60, 64, nil, nil, 70, + nil, nil, nil, nil, 55, 77, nil, nil, 66, nil, + nil, 87, 74, 75, 57, 61, nil, nil, nil, nil, + nil, nil, nil, 49, nil, nil, nil, 60, 64, nil, + nil, 70, nil, 74, nil, nil, 55, 77, nil, nil, + 66, nil, nil, 87, 49, 75, 57, 61, 60, 64, + nil, nil, 70, nil, nil, nil, nil, 55, 77, nil, + nil, 66, nil, nil, 87, 74, 75, 57, 61, nil, + nil, nil, nil, nil, nil, nil, 49, 75, 57, 61, + 60, 64, nil, nil, 70, nil, 74, nil, nil, 55, + 77, nil, nil, 66, nil, nil, 87, 49, 75, 57, + 61, 60, 64, nil, nil, 70, nil, nil, 49, nil, + 55, 77, 60, 64, 66, nil, 70, 87, 74, nil, + nil, 55, nil, nil, nil, 66, nil, nil, nil, 49, + 54, 57, 61, 60, 64, nil, nil, 70, nil, nil, + nil, nil, 55, 77, nil, nil, 66, nil, nil, 87, + 51, 75, 57, 61, nil, nil, nil, 75, 57, 61, + nil, 49, nil, nil, nil, 60, 64, nil, nil, 70, + nil, nil, nil, 52, 55, 75, 57, 61, 66, nil, + nil, nil, 49, nil, nil, nil, 60, 168, 49, nil, + 70, nil, 60, 209, nil, 161, 70, nil, nil, 66, + nil, 161, nil, nil, nil, 66, 49, nil, nil, nil, + 60, 64, nil, nil, 70, 75, 57, 61, 137, 55, + nil, nil, nil, 66, nil, 75, 57, 61, nil, nil, + nil, 75, 57, 61, nil, nil, nil, nil, nil, nil, + nil, 75, 57, 61, nil, nil, 49, 75, 57, 61, + 60, 64, nil, nil, 70, nil, 49, nil, nil, 55, + 60, 64, 49, 66, 70, nil, 60, 64, nil, 55, + 70, nil, 49, 66, nil, 55, 60, 64, 49, 66, + 70, nil, 60, 64, nil, 55, 70, nil, nil, 66, + nil, 55, 75, 57, 61, 66, nil, nil, 75, 57, + 61, nil, nil, nil, nil, nil, nil, nil, 75, 57, + 61, nil, nil, nil, nil, 57, 61, nil, nil, nil, + nil, nil, nil, 49, nil, 57, 61, 60, 64, 49, + nil, 70, nil, 60, 64, nil, 55, 70, nil, 49, + 66, nil, 55, 60, 64, 49, 66, 70, nil, 60, + 209, nil, 55, 70, nil, 49, 66, nil, 161, 60, + 209, nil, 66, 70, 57, 61, 57, 61, 161, nil, + nil, nil, 66, nil, nil, nil, nil, nil, nil, nil, + 57, 61, 57, 61, 270, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 49, nil, 49, nil, 60, 64, + 60, 209, 70, nil, 70, nil, 52, 55, nil, 161, + 49, 66, 49, 66, 60, 209, 60, 64, 70, nil, + 70, 57, 61, 161, 52, 55, nil, 66, nil, 66, + nil, 57, 61, nil, nil, 280, nil, 57, 61, nil, + nil, 130, nil, nil, nil, nil, nil, 57, 61, nil, + nil, 49, nil, nil, nil, 60, 64, 57, 61, 70, + 210, 49, nil, 52, 55, 60, 209, 49, 66, 70, + nil, 60, 209, nil, 161, 70, nil, 49, 66, nil, + 161, 60, 209, nil, 66, 70, nil, 49, 57, 61, + 161, 60, 209, nil, 66, 70, nil, nil, nil, nil, + 161, nil, nil, nil, 66, 145, 149, nil, 205, nil, + nil, nil, nil, nil, 141, 143, 146, 148, 49, nil, + nil, nil, 60, 64, nil, nil, 70, nil, nil, nil, + 52, 55, nil, nil, nil, 66, nil, nil, 144, 147, + 145, 149, 151, 152, 153, 139, 140, 142, 215, 141, + 143, 146, 148, 145, 149, nil, nil, nil, nil, nil, + nil, nil, 141, 143, 146, 148, nil, nil, nil, nil, + nil, nil, nil, 144, 147, 145, 149, 151, 152, 153, + 139, 140, 142, nil, 141, 143, 146, 148, 145, 149, + 151, 152, 153, 139, 140, 142, nil, 141, 143, 146, + 148, nil, nil, nil, nil, nil, nil, nil, nil, 147, + 289, nil, 151, 152, 153, 139, 140, 142, nil, nil, + nil, 144, 147, nil, nil, 151, 152, 153, 139, 140, + 142, 16, 294, 23, 26, nil, 1, 4, nil, 9, + nil, 13, nil, 20, nil, 27, nil, nil, 3, 6, + nil, 295, nil, 16, nil, 23, 26, nil, 1, 4, + nil, 9, nil, 13, nil, 20, nil, 27, nil, nil, + 3, 6, 16, 276, 23, 26, nil, 1, 4, nil, + 9, nil, 13, nil, 20, nil, 27, nil, nil, 3, + 6, nil, 307, nil, 16, nil, 23, 26, nil, 1, + 4, nil, 9, nil, 13, nil, 20, nil, 27, nil, + nil, 3, 6, 16, 230, 23, 26, nil, 1, 4, + nil, 9, nil, 13, nil, 20, nil, 27, nil, nil, + 3, 6, nil, 312, nil, 16, nil, 23, 26, nil, + 1, 4, nil, 9, nil, 13, nil, 20, nil, 27, + nil, nil, 3, 6, 16, 314, 23, 26, nil, 1, + 4, nil, 9, nil, 13, nil, 20, nil, 27, nil, + nil, 3, 6, nil, 256, nil, 16, nil, 23, 26, + nil, 1, 4, nil, 9, nil, 13, nil, 20, nil, + 27, nil, nil, 3, 6, 16, 315, 23, 26, nil, + 1, 4, nil, 9, nil, 13, nil, 20, nil, 27, + nil, nil, 3, 6, nil, 250, nil, 16, nil, 23, + 26, nil, 1, 4, nil, 9, nil, 13, nil, 20, + nil, 27, nil, nil, 3, 6, 16, 316, 23, 26, + nil, 1, 4, nil, 9, nil, 13, nil, 20, nil, + 27, nil, nil, 3, 6, nil, nil, nil, 16, nil, + 23, 26, nil, 1, 4, nil, 9, nil, 13, nil, + 20, nil, 27, nil, nil, 3, 6, 16, nil, 23, + 26, nil, 1, 4, nil, 9, nil, 13, nil, 20, + nil, 27, nil, nil, 3, 6, 16, nil, 23, 26, + nil, 1, 4, nil, 9, nil, 13, nil, 20, nil, + 27, nil, nil, 3, 6 ] racc_action_check = [ - 158, 158, 158, 232, 105, 129, 129, 135, 17, 170, - 59, 116, 17, 140, 174, 135, 202, 140, 140, 174, - 158, 84, 84, 84, 116, 17, 10, 10, 232, 232, - 59, 158, 126, 126, 42, 158, 158, 170, 170, 158, - 129, 84, 221, 129, 158, 158, 105, 162, 158, 17, - 221, 158, 84, 144, 144, 144, 84, 84, 162, 42, - 84, 10, 175, 162, 10, 84, 84, 126, 78, 84, - 126, 77, 84, 144, 145, 145, 145, 248, 221, 221, - 221, 221, 221, 221, 144, 165, 179, 242, 144, 144, - 248, 92, 144, 165, 145, 242, 5, 144, 144, 227, - 227, 144, 92, 5, 144, 145, 223, 92, 24, 145, - 145, 85, 90, 145, 223, 24, 24, 27, 145, 145, - 85, 85, 145, 90, 27, 145, 228, 228, 90, 85, - 85, 85, 85, 180, 159, 146, 146, 146, 159, 159, - 1, 1, 223, 223, 223, 223, 223, 223, 217, 217, - 217, 217, 71, 85, 85, 146, 218, 85, 85, 85, - 85, 85, 85, 185, 218, 235, 146, 157, 157, 157, - 146, 146, 291, 70, 146, 108, 235, 291, 108, 146, - 146, 235, 108, 146, 23, 23, 146, 157, 154, 154, - 154, 187, 218, 218, 218, 218, 218, 218, 157, 188, - 171, 189, 157, 157, 171, 171, 157, 68, 154, 220, - 195, 157, 157, 267, 267, 157, 67, 220, 157, 154, - 16, 16, 16, 154, 154, 134, 201, 154, 79, 134, - 134, 65, 154, 154, 173, 173, 154, 209, 161, 154, - 16, 147, 147, 147, 160, 220, 220, 220, 220, 220, - 220, 16, 80, 63, 61, 16, 16, 60, 81, 16, - 58, 147, 53, 82, 16, 16, 52, 226, 16, 87, - 89, 16, 147, 153, 153, 153, 147, 147, 231, 94, - 147, 215, 215, 215, 215, 147, 147, 50, 95, 147, - 97, 36, 147, 153, 152, 152, 152, 224, 224, 224, - 224, 224, 224, 99, 153, 245, 246, 247, 153, 153, - 106, 35, 153, 28, 152, 261, 109, 153, 153, 112, - 113, 153, 269, 271, 153, 152, 76, 76, 76, 152, - 152, 274, 276, 152, 277, 278, 280, 285, 152, 152, - 114, 115, 152, 15, 130, 152, 76, 151, 151, 151, - 216, 216, 216, 216, 216, 216, 127, 76, 6, 298, - 299, 76, 76, 125, 2, 76, 119, 151, 118, nil, - 76, 76, nil, nil, 76, nil, nil, 76, 151, 148, - 148, 148, 151, 151, nil, nil, 151, nil, nil, nil, - nil, 151, 151, nil, nil, 151, nil, nil, 151, 148, - 149, 149, 149, nil, nil, nil, nil, nil, nil, nil, - 148, nil, nil, nil, 148, 148, nil, nil, 148, nil, - 149, nil, nil, 148, 148, nil, nil, 148, nil, nil, - 148, 149, 72, 72, 72, 149, 149, nil, nil, 149, - nil, nil, nil, nil, 149, 149, nil, nil, 149, nil, - nil, 149, 72, 34, 34, 34, nil, nil, nil, nil, - nil, nil, nil, 72, nil, nil, nil, 72, 72, nil, - nil, 72, nil, 34, nil, nil, 72, 72, nil, nil, - 72, nil, nil, 72, 34, 150, 150, 150, 34, 34, - nil, nil, 34, nil, nil, nil, nil, 34, 34, nil, - nil, 34, nil, nil, 34, 150, 156, 156, 156, nil, - nil, nil, nil, nil, nil, nil, 150, 38, 38, 38, - 150, 150, nil, nil, 150, nil, 156, nil, nil, 150, - 150, nil, nil, 150, nil, nil, 150, 156, 33, 33, - 33, 156, 156, nil, nil, 156, nil, nil, 38, nil, - 156, 156, 38, 38, 156, nil, 38, 156, 33, nil, - nil, 38, 196, 196, 196, 38, nil, nil, nil, 33, - nil, nil, nil, 33, 33, nil, nil, 33, 75, 75, - 75, 75, 33, 33, nil, nil, 33, nil, nil, 33, - nil, nil, nil, 196, 51, 51, 51, 196, 196, nil, - nil, 196, nil, nil, nil, nil, 196, nil, nil, 75, - 196, nil, nil, 75, 75, nil, nil, 75, 268, 268, - 268, nil, 75, nil, nil, 51, 75, nil, nil, 51, - 51, nil, nil, 51, 20, 20, 20, nil, 51, nil, - nil, nil, 51, nil, 186, 186, 186, nil, nil, 268, - 287, 287, 287, 268, 268, nil, nil, 268, nil, nil, - nil, nil, 268, nil, nil, 20, 268, nil, nil, 20, - 20, nil, nil, 20, nil, 186, nil, nil, 20, 186, - 186, 287, 20, 186, nil, 287, 287, nil, 186, 287, - nil, nil, 186, nil, 287, 288, 288, 288, 287, nil, - nil, 13, 13, 13, nil, nil, nil, nil, nil, nil, - nil, 178, 178, 178, nil, nil, nil, 177, 177, 177, - nil, 13, nil, nil, nil, nil, 288, 88, 88, 88, - 288, 288, 13, nil, 288, nil, 13, 13, nil, 288, - 13, nil, 178, 288, 13, 13, 178, 178, 177, 13, - 178, nil, 177, 177, nil, 178, 177, nil, 88, 178, - nil, 177, 88, 88, nil, 177, 88, 208, 208, 132, - 132, 88, nil, nil, nil, 88, nil, nil, nil, nil, - nil, nil, nil, 233, 233, 234, 234, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 208, nil, 132, - nil, 208, 208, 132, 132, 208, nil, 132, 286, 286, - 208, 132, 132, 233, 208, 234, 132, 233, 233, 234, - 234, 233, nil, 234, nil, nil, 233, nil, 234, nil, - 233, nil, 234, 240, 240, 297, 297, 240, 286, nil, - nil, nil, 286, 286, nil, nil, 286, nil, nil, 137, - 137, 286, 137, nil, nil, 286, 172, 172, nil, nil, - nil, nil, nil, 240, nil, 297, nil, 240, 240, 297, - 297, 240, nil, 297, nil, nil, 240, nil, 297, 137, - 240, nil, 297, 137, 137, nil, 172, 137, 48, 48, - 172, 172, 137, nil, 172, nil, 137, nil, nil, 172, - nil, nil, nil, 172, 136, 136, nil, nil, 48, nil, - nil, nil, nil, nil, nil, nil, nil, nil, 48, nil, - nil, nil, 48, 48, 136, nil, 48, nil, nil, nil, - 48, 48, nil, nil, 136, 48, nil, nil, 136, 136, - nil, nil, 136, 222, 222, nil, 136, 136, nil, nil, - nil, 136, 222, 222, 222, 222, 139, 139, nil, nil, - nil, nil, nil, nil, 139, 139, 139, 139, 139, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - 222, 222, 222, 222, 222, 222, nil, nil, nil, 139, - 139, 102, 102, 139, 139, 139, 139, 139, 139, nil, - 102, 102, 102, 102, 219, 219, nil, nil, nil, nil, - nil, nil, nil, 219, 219, 219, 219, nil, nil, nil, - nil, nil, nil, nil, 102, 102, nil, nil, 102, 102, - 102, 102, 102, 102, nil, nil, 262, nil, 219, 101, - 101, 219, 219, 219, 219, 219, 219, nil, 101, 101, - 101, 101, nil, nil, nil, nil, nil, 262, nil, 262, - 262, 255, 262, 262, nil, 262, nil, 262, nil, 262, - nil, 262, 101, 101, 262, 262, 101, 101, 101, 101, - 101, 101, 255, 250, 255, 255, nil, 255, 255, nil, + 34, 34, 34, 191, 105, 112, 112, 17, 11, 125, + 64, 242, 11, 287, 17, 17, 273, 273, 287, 263, + 34, 153, 153, 153, 242, 11, 9, 9, 191, 191, + 64, 34, 109, 109, 39, 34, 34, 125, 125, 34, + 112, 153, 222, 112, 34, 34, 105, 48, 34, 11, + 222, 34, 153, 139, 139, 139, 153, 153, 48, 39, + 153, 9, 180, 48, 9, 153, 153, 109, 181, 153, + 109, 69, 153, 139, 140, 140, 140, 129, 222, 222, + 222, 222, 222, 222, 139, 236, 204, 68, 139, 139, + 129, 157, 139, 236, 140, 227, 157, 139, 139, 204, + 197, 139, 168, 227, 139, 140, 151, 151, 151, 140, + 140, 197, 120, 140, 101, 168, 197, 101, 140, 140, + 120, 101, 140, 26, 189, 140, 151, 141, 141, 141, + 26, 227, 227, 227, 227, 227, 227, 151, 190, 4, + 93, 151, 151, 232, 232, 151, 4, 141, 225, 67, + 151, 151, 65, 118, 151, 94, 225, 151, 141, 77, + 77, 77, 141, 141, 118, 96, 141, 231, 231, 118, + 73, 141, 141, 23, 23, 141, 1, 1, 141, 77, + 142, 142, 142, 209, 225, 225, 225, 225, 225, 225, + 77, 62, 131, 211, 77, 77, 131, 131, 77, 217, + 142, 224, 78, 77, 77, 173, 47, 77, 90, 224, + 77, 142, 16, 16, 16, 142, 142, 47, 59, 142, + 156, 156, 47, 58, 142, 142, 55, 50, 142, 102, + 106, 142, 16, 74, 74, 74, 167, 224, 224, 224, + 224, 224, 224, 16, 45, 127, 230, 16, 16, 127, + 127, 16, 166, 74, 113, 165, 16, 16, 113, 113, + 16, 136, 110, 16, 74, 136, 136, 163, 74, 74, + 84, 239, 74, 221, 221, 221, 221, 74, 74, 84, + 84, 74, 240, 241, 74, 162, 37, 245, 84, 84, + 84, 84, 36, 115, 87, 87, 87, 220, 220, 220, + 220, 220, 220, 228, 228, 228, 228, 228, 228, 248, + 30, 27, 84, 84, 87, 262, 84, 84, 84, 84, + 84, 84, 72, 264, 265, 87, 149, 149, 149, 87, + 87, 267, 160, 87, 219, 219, 219, 219, 87, 87, + 158, 276, 87, 278, 281, 87, 149, 148, 148, 148, + 89, 116, 79, 80, 15, 293, 81, 149, 297, 298, + 7, 149, 149, 83, 85, 149, 247, 148, nil, nil, + 149, 149, nil, nil, 149, nil, nil, 149, 148, 143, + 143, 143, 148, 148, nil, nil, 148, nil, nil, nil, + nil, 148, 148, nil, nil, 148, nil, nil, 148, 143, + 144, 144, 144, nil, nil, nil, nil, nil, nil, nil, + 143, nil, nil, nil, 143, 143, nil, nil, 143, nil, + 144, nil, nil, 143, 143, nil, nil, 143, nil, nil, + 143, 144, 33, 33, 33, 144, 144, nil, nil, 144, + nil, nil, nil, nil, 144, 144, nil, nil, 144, nil, + nil, 144, 33, 152, 152, 152, nil, nil, nil, nil, + nil, nil, nil, 33, nil, nil, nil, 33, 33, nil, + nil, 33, nil, 152, nil, nil, 33, 33, nil, nil, + 33, nil, nil, 33, 152, 147, 147, 147, 152, 152, + nil, nil, 152, nil, nil, nil, nil, 152, 152, nil, + nil, 152, nil, nil, 152, 147, 146, 146, 146, nil, + nil, nil, nil, nil, nil, nil, 147, 44, 44, 44, + 147, 147, nil, nil, 147, nil, 146, nil, nil, 147, + 147, nil, nil, 147, nil, nil, 147, 146, 145, 145, + 145, 146, 146, nil, nil, 146, nil, nil, 44, nil, + 146, 146, 44, 44, 146, nil, 44, 146, 145, nil, + nil, 44, nil, nil, nil, 44, nil, nil, nil, 145, + 13, 13, 13, 145, 145, nil, nil, 145, nil, nil, + nil, nil, 145, 145, nil, nil, 145, nil, nil, 145, + 13, 98, 98, 98, nil, nil, nil, 246, 246, 246, + nil, 13, nil, nil, nil, 13, 13, nil, nil, 13, + nil, nil, nil, 13, 13, 274, 274, 274, 13, nil, + nil, nil, 98, nil, nil, nil, 98, 98, 246, nil, + 98, nil, 246, 246, nil, 98, 246, nil, nil, 98, + nil, 246, nil, nil, nil, 246, 274, nil, nil, nil, + 274, 274, nil, nil, 274, 75, 75, 75, 75, 274, + nil, nil, nil, 274, nil, 54, 54, 54, nil, nil, + nil, 284, 284, 284, nil, nil, nil, nil, nil, nil, + nil, 178, 178, 178, nil, nil, 75, 20, 20, 20, + 75, 75, nil, nil, 75, nil, 54, nil, nil, 75, + 54, 54, 284, 75, 54, nil, 284, 284, nil, 54, + 284, nil, 178, 54, nil, 284, 178, 178, 20, 284, + 178, nil, 20, 20, nil, 178, 20, nil, nil, 178, + nil, 20, 179, 179, 179, 20, nil, nil, 283, 283, + 283, nil, nil, nil, nil, nil, nil, nil, 185, 185, + 185, nil, nil, nil, nil, 193, 193, nil, nil, nil, + nil, nil, nil, 179, nil, 192, 192, 179, 179, 283, + nil, 179, nil, 283, 283, nil, 179, 283, nil, 185, + 179, nil, 283, 185, 185, 193, 283, 185, nil, 193, + 193, nil, 185, 193, nil, 192, 185, nil, 193, 192, + 192, nil, 193, 192, 202, 202, 210, 210, 192, nil, + nil, nil, 192, nil, nil, nil, nil, nil, nil, nil, + 282, 282, 128, 128, 202, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 202, nil, 210, nil, 202, 202, + 210, 210, 202, nil, 210, nil, 202, 202, nil, 210, + 282, 202, 128, 210, 282, 282, 128, 128, 282, nil, + 128, 51, 51, 282, 128, 128, nil, 282, nil, 128, + nil, 234, 234, nil, nil, 234, nil, 296, 296, nil, + nil, 51, nil, nil, nil, nil, nil, 155, 155, nil, + nil, 51, nil, nil, nil, 51, 51, 133, 133, 51, + 133, 234, nil, 51, 51, 234, 234, 296, 51, 234, + nil, 296, 296, nil, 234, 296, nil, 155, 234, nil, + 296, 155, 155, nil, 296, 155, nil, 133, 132, 132, + 155, 133, 133, nil, 155, 133, nil, nil, nil, nil, + 133, nil, nil, nil, 133, 100, 100, nil, 132, nil, + nil, nil, nil, nil, 100, 100, 100, 100, 132, nil, + nil, nil, 132, 132, nil, nil, 132, nil, nil, nil, + 132, 132, nil, nil, nil, 132, nil, nil, 100, 100, + 135, 135, 100, 100, 100, 100, 100, 100, 135, 135, + 135, 135, 135, 226, 226, nil, nil, nil, nil, nil, + nil, nil, 226, 226, 226, 226, nil, nil, nil, nil, + nil, nil, nil, 135, 135, 223, 223, 135, 135, 135, + 135, 135, 135, nil, 223, 223, 223, 223, 99, 99, + 226, 226, 226, 226, 226, 226, nil, 99, 99, 99, + 99, nil, nil, nil, nil, nil, nil, nil, nil, 223, + 244, nil, 223, 223, 223, 223, 223, 223, nil, nil, + nil, 99, 99, nil, nil, 99, 99, 99, 99, 99, + 99, 244, 249, 244, 244, nil, 244, 244, nil, 244, + nil, 244, nil, 244, nil, 244, nil, nil, 244, 244, + nil, 255, nil, 249, nil, 249, 249, nil, 249, 249, + nil, 249, nil, 249, nil, 249, nil, 249, nil, nil, + 249, 249, 255, 229, 255, 255, nil, 255, 255, nil, 255, nil, 255, nil, 255, nil, 255, nil, nil, 255, - 255, nil, 225, nil, 250, nil, 250, 250, nil, 250, - 250, nil, 250, nil, 250, nil, 250, nil, 250, nil, - nil, 250, 250, 225, 155, 225, 225, nil, 225, 225, - nil, 225, nil, 225, nil, 225, nil, 225, nil, nil, - 225, 225, nil, 292, nil, 155, nil, 155, 155, nil, - 155, 155, nil, 155, nil, 155, nil, 155, nil, 155, - nil, nil, 155, 155, 292, 302, 292, 292, nil, 292, - 292, nil, 292, nil, 292, nil, 292, nil, 292, nil, - nil, 292, 292, nil, 303, nil, 302, nil, 302, 302, + 255, nil, 288, nil, 229, nil, 229, 229, nil, 229, + 229, nil, 229, nil, 229, nil, 229, nil, 229, nil, + nil, 229, 229, 288, 150, 288, 288, nil, 288, 288, + nil, 288, nil, 288, nil, 288, nil, 288, nil, nil, + 288, 288, nil, 301, nil, 150, nil, 150, 150, nil, + 150, 150, nil, 150, nil, 150, nil, 150, nil, 150, + nil, nil, 150, 150, 301, 302, 301, 301, nil, 301, + 301, nil, 301, nil, 301, nil, 301, nil, 301, nil, + nil, 301, 301, nil, 183, nil, 302, nil, 302, 302, nil, 302, 302, nil, 302, nil, 302, nil, 302, nil, - 302, nil, nil, 302, 302, 303, 191, 303, 303, nil, - 303, 303, nil, 303, nil, 303, nil, 303, nil, 303, - nil, nil, 303, 303, nil, 311, nil, 191, nil, 191, - 191, nil, 191, 191, nil, 191, nil, 191, nil, 191, - nil, 191, nil, nil, 191, 191, 311, 184, 311, 311, - nil, 311, 311, nil, 311, nil, 311, nil, 311, nil, - 311, nil, nil, 311, 311, nil, 313, nil, 184, nil, - 184, 184, nil, 184, 184, nil, 184, nil, 184, nil, - 184, nil, 184, nil, nil, 184, 184, 313, nil, 313, - 313, nil, 313, 313, nil, 313, nil, 313, nil, 313, - nil, 313, nil, nil, 313, 313, 0, nil, 0, 0, + 302, nil, nil, 302, 302, 183, 311, 183, 183, nil, + 183, 183, nil, 183, nil, 183, nil, 183, nil, 183, + nil, nil, 183, 183, nil, 177, nil, 311, nil, 311, + 311, nil, 311, 311, nil, 311, nil, 311, nil, 311, + nil, 311, nil, nil, 311, 311, 177, 313, 177, 177, + nil, 177, 177, nil, 177, nil, 177, nil, 177, nil, + 177, nil, nil, 177, 177, nil, nil, nil, 313, nil, + 313, 313, nil, 313, 313, nil, 313, nil, 313, nil, + 313, nil, 313, nil, nil, 313, 313, 19, nil, 19, + 19, nil, 19, 19, nil, 19, nil, 19, nil, 19, + nil, 19, nil, nil, 19, 19, 0, nil, 0, 0, nil, 0, 0, nil, 0, nil, 0, nil, 0, nil, - 0, nil, nil, 0, 0, 19, nil, 19, 19, nil, - 19, 19, nil, 19, nil, 19, nil, 19, nil, 19, - nil, nil, 19, 19 ] + 0, nil, nil, 0, 0 ] racc_action_pointer = [ - 1278, 127, 358, nil, nil, 58, 352, nil, nil, nil, - 23, nil, nil, 699, nil, 343, 218, 6, nil, 1297, - 632, nil, nil, 181, 70, nil, nil, 79, 271, nil, - nil, nil, nil, 536, 451, 273, 256, nil, 515, nil, - nil, nil, 24, nil, nil, nil, nil, nil, 885, nil, - 277, 592, 264, 252, nil, nil, nil, nil, 239, 8, - 236, 252, nil, 232, nil, 210, nil, 195, 186, nil, - 152, 152, 430, nil, nil, 576, 324, 50, 47, 207, - 231, 237, 242, nil, 19, 105, nil, 248, 725, 232, - 90, nil, 69, nil, 273, 278, nil, 284, nil, 281, - nil, 1024, 976, nil, nil, -5, 300, nil, 137, 310, - nil, nil, 280, 299, 330, 320, 2, nil, 347, 348, - nil, nil, nil, nil, nil, 342, 29, 350, nil, 2, - 321, nil, 766, nil, 220, -31, 901, 846, nil, 941, - 8, nil, nil, nil, 51, 72, 133, 239, 377, 398, - 483, 345, 292, 271, 186, 1117, 504, 165, -2, 129, - 234, 229, 25, nil, nil, 69, nil, nil, nil, nil, - -11, 156, 853, 231, -19, 56, nil, 715, 709, 79, - 95, nil, nil, nil, 1240, 156, 642, 184, 161, 163, - nil, 1199, nil, nil, nil, 188, 560, nil, nil, nil, - nil, 224, -7, nil, nil, nil, nil, nil, 764, 228, - nil, nil, nil, nil, nil, 229, 298, 96, 140, 989, - 193, 26, 928, 90, 245, 1095, 238, 45, 72, nil, - nil, 271, -20, 780, 782, 143, nil, nil, nil, nil, - 830, nil, 77, nil, nil, 292, 293, 284, 67, nil, - 1076, nil, nil, nil, nil, 1054, nil, nil, nil, nil, - nil, 305, 1029, nil, nil, nil, nil, 204, 616, 293, - nil, 317, nil, nil, 310, nil, 311, 313, 314, nil, - 315, nil, nil, nil, nil, 331, 805, 648, 693, nil, - nil, 139, 1136, nil, nil, nil, nil, 832, 352, 353, - nil, nil, 1158, 1177, nil, nil, nil, nil, nil, nil, - nil, 1218, nil, 1259, nil, nil, nil ] + 1308, 163, nil, nil, 101, nil, nil, 354, nil, 23, + nil, 6, nil, 568, nil, 354, 210, -31, nil, 1289, + 685, nil, nil, 170, nil, nil, 85, 269, nil, nil, + 304, nil, nil, 430, -2, nil, 257, 248, nil, 24, + nil, nil, nil, nil, 515, 206, nil, 184, 25, nil, + 217, 858, nil, nil, 663, 224, nil, nil, 202, 216, + nil, nil, 170, nil, 8, 131, nil, 128, 66, 50, + nil, nil, 301, 170, 231, 653, nil, 157, 181, 331, + 332, 335, nil, 342, 264, 343, nil, 292, nil, 329, + 202, nil, nil, 134, 145, nil, 143, nil, 589, 1013, + 930, 76, 223, nil, nil, -5, 220, nil, nil, 29, + 256, nil, 2, 249, nil, 283, 342, nil, 131, nil, + 96, nil, nil, nil, nil, -11, nil, 201, 819, 67, + nil, 187, 925, 894, nil, 965, 256, nil, nil, 51, + 72, 125, 178, 377, 398, 536, 504, 483, 345, 324, + 1147, 104, 451, 19, nil, 884, 217, 58, 334, nil, + 293, nil, 275, 246, nil, 234, 234, 215, 93, nil, + nil, nil, nil, 184, nil, nil, nil, 1248, 679, 730, + 55, 30, nil, 1207, nil, 746, nil, nil, nil, 117, + 100, -20, 762, 752, nil, nil, nil, 78, nil, nil, + nil, nil, 801, nil, 76, nil, nil, nil, nil, 161, + 803, 184, nil, nil, nil, nil, nil, 194, nil, 282, + 245, 221, 26, 1000, 185, 132, 978, 79, 251, 1106, + 217, 113, 89, nil, 868, nil, 75, nil, nil, 258, + 269, 260, 1, nil, 1043, 280, 595, 359, 271, 1065, + nil, nil, nil, nil, nil, 1084, nil, nil, nil, nil, + nil, nil, 294, -2, 302, 303, nil, 310, nil, nil, + nil, nil, nil, 7, 613, nil, 312, nil, 337, nil, + nil, 338, 817, 736, 669, nil, nil, -20, 1125, nil, + nil, nil, nil, 345, nil, nil, 874, 351, 352, nil, + nil, 1166, 1188, nil, nil, nil, nil, nil, nil, nil, + nil, 1229, nil, 1270, nil, nil, nil ] racc_action_default = [ - -169, -193, -193, -7, -162, -193, -193, -8, -160, -9, - -193, -10, -11, -161, -12, -193, -193, -193, -13, -1, - -193, -14, -2, -193, -193, -15, -3, -193, -40, -16, - -5, -17, -6, -193, -193, -79, -169, -161, -72, -167, - -166, -165, -169, -163, -168, -186, -33, -20, -193, -32, - -21, -193, -63, -22, -102, -23, -104, -103, -25, -62, - -26, -193, -61, -27, -149, -28, -150, -29, -193, -30, - -31, -193, -193, -112, -97, -193, -193, -91, -95, -92, - -99, -93, -98, -96, -193, -193, -94, -90, -193, -72, - -169, -42, -169, -4, -193, -153, -151, -193, -39, -169, - -41, -70, -71, -78, -80, -193, -191, -77, -193, -193, - -182, -63, -59, -65, -191, -68, -62, -57, -66, -193, - -148, -147, -69, -67, -73, -64, -193, -193, -180, -193, - -193, -19, -193, -82, -193, -193, -193, -193, 317, -193, - -193, -188, -126, -119, -193, -193, -193, -193, -193, -193, + -168, -193, -7, -161, -193, -8, -159, -193, -9, -193, + -10, -193, -11, -160, -12, -193, -193, -193, -13, -1, + -193, -14, -2, -193, -15, -3, -193, -39, -16, -5, + -193, -17, -6, -193, -193, -160, -168, -78, -166, -168, + -165, -164, -162, -167, -193, -71, -41, -168, -168, -185, + -21, -193, -33, -22, -193, -62, -23, -101, -26, -193, + -103, -102, -27, -148, -61, -28, -60, -29, -193, -30, + -149, -31, -32, -193, -193, -193, -96, -193, -90, -94, + -98, -91, -95, -92, -193, -97, -93, -193, -111, -89, + -193, -38, -4, -193, -152, -150, -168, -40, -71, -69, + -70, -193, -193, -181, -79, -193, -191, -76, -77, -193, + -193, -179, -193, -193, -81, -191, -193, -72, -168, -47, + -193, -54, -53, -61, -44, -193, -45, -193, -193, -193, + -20, -193, -193, -193, 317, -193, -193, -188, -125, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, -193, - -191, -193, -169, -46, -48, -193, -55, -62, -54, -45, - -193, -193, -193, -193, -170, -193, -171, -193, -193, -193, - -192, -183, -184, -185, -193, -193, -60, -193, -192, -72, - -181, -193, -164, -18, -24, -62, -193, -105, -189, -190, - -34, -193, -193, -101, -138, -143, -146, -144, -193, -193, - -145, -137, -129, -187, -115, -117, -121, -118, -123, -128, - -125, -122, -127, -124, -120, -193, -109, -113, -114, -116, - -106, -193, -193, -193, -193, -193, -51, -50, -44, -43, - -193, -131, -193, -135, -152, -179, -177, -193, -193, -174, - -193, -76, -75, -38, -81, -193, -157, -35, -58, -36, - -74, -191, -193, -159, -83, -100, -140, -191, -193, -109, - -108, -193, -37, -49, -85, -52, -89, -86, -87, -88, - -84, -53, -47, -132, -130, -193, -193, -193, -193, -172, - -173, -193, -193, -155, -156, -56, -158, -193, -193, -190, - -142, -107, -193, -193, -136, -178, -176, -175, -154, -141, - -139, -193, -111, -193, -134, -110, -133 ] + -193, -193, -193, -193, -118, -193, -193, -169, -193, -170, + -58, -62, -191, -64, -56, -67, -193, -65, -61, -147, + -68, -146, -66, -63, -184, -182, -183, -193, -193, -193, + -193, -192, -180, -193, -163, -193, -105, -189, -190, -193, + -192, -193, -193, -193, -50, -49, -43, -193, -42, -24, + -25, -18, -193, -104, -193, -100, -142, -145, -143, -61, + -193, -193, -136, -144, -137, -128, -186, -190, -114, -116, + -120, -117, -122, -127, -124, -121, -126, -123, -119, -193, + -108, -112, -113, -115, -193, -130, -193, -134, -151, -178, + -176, -193, -193, -173, -193, -193, -59, -193, -71, -193, + -156, -75, -74, -37, -80, -193, -158, -82, -36, -73, + -48, -51, -84, -88, -85, -86, -87, -83, -52, -46, + -19, -99, -139, -191, -193, -187, -108, -107, -193, -131, + -129, -193, -193, -193, -193, -171, -172, -193, -193, -154, + -34, -57, -35, -191, -155, -157, -193, -193, -190, -141, + -106, -193, -193, -135, -177, -175, -174, -153, -55, -140, + -138, -193, -110, -193, -133, -109, -132 ] racc_goto_table = [ - 2, 179, 93, 17, 209, 43, 19, 204, 47, 187, - 249, 122, 104, 46, 36, 70, 22, 114, 107, 2, - 241, 170, 17, 171, 117, 96, 270, 97, 15, 134, - 275, 281, 282, 297, 91, 240, 99, 106, 185, 243, - 125, 211, 112, 130, 267, 95, 64, 175, 46, 109, - 70, 42, 110, 140, 127, 231, 194, 247, 128, 67, - 248, 98, 181, nil, nil, nil, 159, nil, 160, 301, - 69, 64, nil, nil, nil, 209, nil, nil, 266, nil, - nil, 64, nil, nil, 121, nil, nil, nil, 283, nil, - nil, nil, nil, 232, 67, 123, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 69, nil, 243, nil, nil, - nil, 94, nil, nil, nil, 176, nil, 182, nil, nil, - nil, 190, nil, nil, 192, 65, nil, 307, nil, nil, - nil, 202, nil, nil, 70, 200, 46, nil, 70, 210, - nil, nil, 133, nil, nil, nil, nil, nil, nil, nil, - 120, nil, nil, 304, nil, 2, 295, 254, 17, 122, - 65, 225, 298, 107, 209, 64, 133, 309, 261, 64, - 64, 260, 258, nil, 210, 244, nil, nil, 67, 133, - nil, nil, 67, 121, 2, nil, nil, 17, 125, 69, - 255, 2, nil, 69, 17, nil, nil, 262, nil, 60, - nil, nil, 63, nil, nil, 64, nil, nil, 93, nil, - 210, nil, nil, nil, nil, nil, nil, nil, 121, 64, - nil, nil, nil, nil, 115, 2, nil, 118, 17, nil, - nil, nil, 121, nil, 60, 280, 280, 63, 93, nil, - nil, 64, 210, 123, 65, 93, nil, nil, 65, 120, - 2, nil, nil, 17, 121, 2, 292, nil, 17, nil, - nil, nil, 2, nil, nil, 17, 64, 64, 251, 252, - nil, nil, nil, 64, nil, 93, 168, nil, 168, 121, - 121, nil, nil, nil, 120, nil, 121, 264, 210, nil, - 279, 279, 2, nil, 93, 17, 93, nil, 120, 210, - nil, nil, 2, 2, nil, 17, 17, nil, 311, 313, - nil, 2, 58, 2, 17, nil, 17, 85, 60, 64, - 120, 63, 60, 206, nil, 63, 207, nil, nil, nil, - 64, nil, 121, nil, 101, 102, nil, 113, nil, nil, - nil, nil, nil, 121, nil, 278, 278, 58, 168, nil, - nil, nil, 120, nil, nil, nil, nil, nil, 206, 300, - nil, 207, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 115, 139, nil, 118, nil, 142, 305, 306, - nil, nil, nil, nil, nil, 143, nil, nil, nil, 166, - nil, 166, nil, nil, 206, nil, nil, 207, 120, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 120, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, - 276, 168, 277, 277, nil, nil, 206, nil, nil, 207, - nil, 58, nil, nil, nil, 58, 205, nil, nil, nil, - nil, nil, nil, nil, nil, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, nil, 227, 228, 229, - nil, 166, nil, nil, nil, nil, nil, nil, nil, nil, - nil, 205, 206, nil, nil, 207, nil, nil, nil, nil, - nil, nil, nil, 206, nil, 113, 207, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 205, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 274, 274, 166, nil, nil, nil, nil, 205, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 205, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 205 ] + 7, 92, 65, 11, 214, 115, 180, 19, 170, 243, + 107, 164, 211, 56, 50, 189, 104, 36, 235, 7, + 90, 71, 11, 15, 42, 199, 277, 63, 261, 268, + 22, 296, 125, 127, 237, 269, 113, 234, 46, 96, + 65, 106, 212, 245, 273, 94, 131, 158, 102, 39, + 110, 56, 129, 160, 241, 242, 91, 175, 162, 71, + nil, nil, 247, nil, nil, 63, 103, 136, 93, 111, + nil, nil, 300, nil, nil, nil, nil, nil, nil, nil, + nil, 272, nil, nil, nil, nil, nil, 167, nil, 211, + nil, nil, 114, nil, nil, nil, nil, 279, nil, 199, + 62, nil, 114, 191, nil, nil, 172, nil, nil, nil, + nil, nil, 63, 237, 176, nil, nil, 65, nil, nil, + nil, 65, 208, 114, 182, nil, 159, 184, 200, nil, + nil, nil, 56, 204, 122, 122, 71, nil, 62, 306, + 71, nil, 63, nil, 208, nil, 63, 63, nil, nil, + 7, nil, nil, 11, 107, nil, 170, 229, 69, 291, + 254, 303, nil, 259, nil, nil, nil, 309, nil, 63, + nil, nil, nil, 297, nil, 211, nil, 7, nil, nil, + 11, 264, 264, 7, 249, 165, 11, nil, nil, nil, + 255, 65, nil, 308, nil, nil, 69, nil, nil, 208, + 266, 266, 200, nil, nil, 122, 63, 63, 293, nil, + 71, 92, nil, nil, nil, 62, 63, nil, nil, 62, + 207, nil, nil, 208, 63, nil, 251, 252, nil, 7, + nil, 92, 11, 257, 58, 167, nil, 92, nil, nil, + nil, nil, 207, 171, 7, 67, nil, 11, 63, 7, + nil, 288, 11, nil, 172, 7, nil, nil, 11, nil, + 63, nil, nil, nil, nil, 72, nil, nil, 121, 121, + 92, 208, 58, 69, nil, 95, nil, 69, 171, 263, + 263, nil, nil, 67, 122, 208, nil, nil, 7, 62, + nil, 11, nil, 92, nil, 92, 63, 207, nil, nil, + 171, 7, 7, 72, 11, 11, nil, nil, 311, 313, + 63, 7, nil, 7, 11, nil, 11, nil, nil, 163, + nil, 207, 299, nil, nil, nil, nil, nil, nil, nil, + 169, 304, 305, 165, nil, nil, nil, 171, 171, 121, + nil, nil, nil, nil, nil, nil, nil, 69, nil, 58, + 173, nil, nil, 58, 206, 171, nil, nil, nil, nil, + 67, nil, nil, nil, 67, 169, nil, nil, nil, 207, + nil, nil, nil, nil, nil, nil, 206, nil, nil, 171, + 72, nil, nil, 207, 72, 213, nil, 169, nil, nil, + nil, 171, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 213, 238, nil, + nil, nil, nil, 262, 262, nil, nil, nil, 121, nil, + nil, nil, nil, 58, 265, 265, nil, 171, nil, 84, + nil, 206, nil, nil, 67, nil, nil, nil, nil, nil, + nil, 171, 169, nil, 267, 267, 99, 100, nil, nil, + nil, nil, nil, nil, 72, 206, nil, nil, nil, nil, + nil, nil, 213, nil, nil, nil, 169, 163, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 169, nil, + nil, nil, nil, nil, nil, nil, 213, 135, nil, nil, + 138, nil, nil, nil, nil, nil, nil, nil, 173, nil, + 154, nil, nil, 206, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 169, nil, nil, 206, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 169, nil, + nil, nil, nil, nil, 213, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 213, nil, + nil, nil, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, nil, 231, 232, 233 ] racc_goto_check = [ - 29, 34, 4, 35, 60, 69, 2, 62, 18, 34, - 72, 48, 53, 29, 30, 28, 3, 33, 50, 29, - 58, 39, 35, 39, 45, 28, 56, 35, 1, 54, - 44, 44, 40, 55, 38, 57, 30, 36, 32, 60, - 28, 61, 31, 18, 63, 64, 47, 65, 29, 66, - 28, 67, 3, 54, 68, 34, 21, 70, 3, 26, - 71, 5, 73, nil, nil, nil, 54, nil, 33, 56, - 27, 47, nil, nil, nil, 60, nil, nil, 62, nil, - nil, 47, nil, nil, 26, nil, nil, nil, 58, nil, - nil, nil, nil, 39, 26, 27, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 27, nil, 60, nil, nil, - nil, 51, nil, nil, nil, 3, nil, 30, nil, nil, - nil, 69, nil, nil, 69, 25, nil, 72, nil, nil, - nil, 18, nil, nil, 28, 29, 29, nil, 28, 28, - nil, nil, 51, nil, nil, nil, nil, nil, nil, nil, - 25, nil, nil, 60, nil, 29, 34, 53, 35, 48, - 25, 2, 34, 50, 60, 47, 51, 62, 33, 47, - 47, 50, 45, nil, 28, 28, nil, nil, 26, 51, - nil, nil, 26, 26, 29, nil, nil, 35, 28, 27, - 2, 29, nil, 27, 35, nil, nil, 2, nil, 23, - nil, nil, 24, nil, nil, 47, nil, nil, 4, nil, - 28, nil, nil, nil, nil, nil, nil, nil, 26, 47, - nil, nil, nil, nil, 23, 29, nil, 24, 35, nil, - nil, nil, 26, nil, 23, 28, 28, 24, 4, nil, - nil, 47, 28, 27, 25, 4, nil, nil, 25, 25, - 29, nil, nil, 35, 26, 29, 2, nil, 35, nil, - nil, nil, 29, nil, nil, 35, 47, 47, 51, 51, - nil, nil, nil, 47, nil, 4, 23, nil, 23, 26, - 26, nil, nil, nil, 25, nil, 26, 51, 28, nil, - 27, 27, 29, nil, 4, 35, 4, nil, 25, 28, - nil, nil, 29, 29, nil, 35, 35, nil, 2, 2, - nil, 29, 22, 29, 35, nil, 35, 49, 23, 47, - 25, 24, 23, 23, nil, 24, 24, nil, nil, nil, - 47, nil, 26, nil, 49, 49, nil, 22, nil, nil, - nil, nil, nil, 26, nil, 25, 25, 22, 23, nil, - nil, nil, 25, nil, nil, nil, nil, nil, 23, 51, - nil, 24, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 23, 49, nil, 24, nil, 49, 51, 51, - nil, nil, nil, nil, nil, 49, nil, nil, nil, 22, - nil, 22, nil, nil, 23, nil, nil, 24, 25, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, - nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, - 23, 23, 24, 24, nil, nil, 23, nil, nil, 24, - nil, 22, nil, nil, nil, 22, 22, nil, nil, nil, - nil, nil, nil, nil, nil, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, nil, 49, 49, 49, - nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, - nil, 22, 23, nil, nil, 24, nil, nil, nil, nil, - nil, nil, nil, 23, nil, 22, 24, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, 22, 22, 22, nil, nil, nil, nil, 22, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 22, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 22 ] + 20, 4, 23, 33, 60, 31, 32, 2, 46, 70, + 48, 43, 58, 20, 18, 32, 51, 28, 56, 20, + 33, 26, 33, 1, 67, 19, 54, 45, 42, 42, + 3, 53, 37, 37, 58, 38, 52, 55, 36, 28, + 23, 34, 59, 30, 61, 62, 52, 63, 64, 65, + 66, 20, 18, 29, 68, 69, 5, 71, 31, 26, + nil, nil, 32, nil, nil, 45, 3, 52, 49, 3, + nil, nil, 54, nil, nil, nil, nil, nil, nil, nil, + nil, 60, nil, nil, nil, nil, nil, 23, nil, 58, + nil, nil, 49, nil, nil, nil, nil, 56, nil, 19, + 22, nil, 49, 37, nil, nil, 26, nil, nil, nil, + nil, nil, 45, 58, 28, nil, nil, 23, nil, nil, + nil, 23, 23, 49, 67, nil, 3, 67, 20, nil, + nil, nil, 20, 18, 22, 22, 26, nil, 22, 70, + 26, nil, 45, nil, 23, nil, 45, 45, nil, nil, + 20, nil, nil, 33, 48, nil, 46, 2, 25, 43, + 51, 58, nil, 48, nil, nil, nil, 60, nil, 45, + nil, nil, nil, 32, nil, 58, nil, 20, nil, nil, + 33, 23, 23, 20, 2, 22, 33, nil, nil, nil, + 2, 23, nil, 32, nil, nil, 25, nil, nil, 23, + 26, 26, 20, nil, nil, 22, 45, 45, 31, nil, + 26, 4, nil, nil, nil, 22, 45, nil, nil, 22, + 22, nil, nil, 23, 45, nil, 49, 49, nil, 20, + nil, 4, 33, 49, 21, 23, nil, 4, nil, nil, + nil, nil, 22, 25, 20, 24, nil, 33, 45, 20, + nil, 2, 33, nil, 26, 20, nil, nil, 33, nil, + 45, nil, nil, nil, nil, 27, nil, nil, 21, 21, + 4, 23, 21, 25, nil, 27, nil, 25, 25, 22, + 22, nil, nil, 24, 22, 23, nil, nil, 20, 22, + nil, 33, nil, 4, nil, 4, 45, 22, nil, nil, + 25, 20, 20, 27, 33, 33, nil, nil, 2, 2, + 45, 20, nil, 20, 33, nil, 33, nil, nil, 21, + nil, 22, 49, nil, nil, nil, nil, nil, nil, nil, + 24, 49, 49, 22, nil, nil, nil, 25, 25, 21, + nil, nil, nil, nil, nil, nil, nil, 25, nil, 21, + 27, nil, nil, 21, 21, 25, nil, nil, nil, nil, + 24, nil, nil, nil, 24, 24, nil, nil, nil, 22, + nil, nil, nil, nil, nil, nil, 21, nil, nil, 25, + 27, nil, nil, 22, 27, 27, nil, 24, nil, nil, + nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 27, 27, nil, + nil, nil, nil, 21, 21, nil, nil, nil, 21, nil, + nil, nil, nil, 21, 24, 24, nil, 25, nil, 47, + nil, 21, nil, nil, 24, nil, nil, nil, nil, nil, + nil, 25, 24, nil, 27, 27, 47, 47, nil, nil, + nil, nil, nil, nil, 27, 21, nil, nil, nil, nil, + nil, nil, 27, nil, nil, nil, 24, 21, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 24, nil, + nil, nil, nil, nil, nil, nil, 27, 47, nil, nil, + 47, nil, nil, nil, nil, nil, nil, nil, 27, nil, + 47, nil, nil, 21, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, 24, nil, nil, 21, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 24, nil, + nil, nil, nil, nil, 27, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 27, nil, + nil, nil, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, nil, 47, 47, 47 ] racc_goto_pointer = [ - nil, 28, 6, 16, -17, 37, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, -5, nil, - nil, -76, 299, 186, 189, 112, 46, 57, 2, 0, - 9, 4, -74, -21, -105, 3, 2, nil, 17, -69, - -203, nil, nil, nil, -203, -14, nil, 33, -27, 301, - -17, 91, nil, -23, -22, -234, -200, -137, -152, nil, - -133, -96, -130, -164, 22, -52, 13, 41, 12, -5, - -117, -114, -164, -46 ] + nil, 23, 7, 30, -18, 39, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, nil, 1, -103, + 0, 221, 87, -11, 232, 145, 8, 252, 13, -45, + -117, -40, -100, 3, 4, nil, 27, -15, -162, nil, + nil, nil, -164, -87, nil, 14, -90, 413, -27, 48, + nil, -21, -8, -242, -204, -118, -137, nil, -121, -91, + -129, -166, 22, -49, 12, 40, 11, 15, -103, -102, + -148, -44 ] racc_goto_default = [ - nil, nil, nil, 169, 26, 30, 32, 3, 7, 9, - 11, 12, 14, 18, 21, 25, 29, 31, nil, 50, - 53, 55, 77, 78, 79, 81, 82, 86, 87, 74, - 6, nil, nil, nil, nil, 61, nil, 24, nil, nil, - 163, 235, 164, 165, nil, nil, 119, 80, 83, nil, - 124, 73, 103, nil, nil, 196, nil, nil, nil, 242, - 68, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil ] + nil, nil, nil, 124, 25, 29, 32, 2, 5, 8, + 10, 12, 14, 18, 21, 24, 28, 31, nil, 53, + 76, 78, 79, 81, 83, 85, 86, 89, 30, nil, + nil, nil, nil, 59, nil, 17, nil, nil, 126, 197, + 119, 120, nil, nil, 166, 80, 82, nil, 117, 88, + 108, nil, nil, 185, nil, nil, nil, 236, 68, nil, + nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil ] racc_token_table = { false => 0, @@ -890,9 +886,8 @@ Racc_token_to_s_table = [ 'resourceoverride', 'append', 'funcvalues', -'namestrings', -'resourcerefs', 'namestring', +'resourceref', 'name', 'variable', 'type', @@ -900,7 +895,6 @@ Racc_token_to_s_table = [ 'funcrvalue', 'selector', 'quotedtext', -'resourceref', 'classname', 'resourceinstances', 'endsemi', @@ -1030,18 +1024,29 @@ module_eval <<'.,.,', 'grammar.ra', 81 end .,., -module_eval <<'.,.,', 'grammar.ra', 87 +module_eval <<'.,.,', 'grammar.ra', 88 def _reduce_19( val, _values, result ) + args = aryfy(val[2]) result = ast AST::Function, :name => val[0], - :arguments => AST::ASTArray.new({}), + :arguments => args, :ftype => :statement result end .,., -module_eval <<'.,.,', 'grammar.ra', 94 +module_eval <<'.,.,', 'grammar.ra', 93 def _reduce_20( val, _values, result ) + result = ast AST::Function, + :name => val[0], + :arguments => AST::ASTArray.new({}), + :ftype => :statement + result + end +.,., + +module_eval <<'.,.,', 'grammar.ra', 100 + def _reduce_21( val, _values, result ) args = aryfy(val[1]) result = ast AST::Function, :name => val[0], @@ -1051,13 +1056,11 @@ module_eval <<'.,.,', 'grammar.ra', 94 end .,., - # reduce 21 omitted - # reduce 22 omitted # reduce 23 omitted -module_eval <<'.,.,', 'grammar.ra', 104 +module_eval <<'.,.,', 'grammar.ra', 108 def _reduce_24( val, _values, result ) result = aryfy(val[0], val[2]) result.line = @lexer.line @@ -1066,7 +1069,18 @@ module_eval <<'.,.,', 'grammar.ra', 104 end .,., - # reduce 25 omitted +module_eval <<'.,.,', 'grammar.ra', 117 + def _reduce_25( val, _values, result ) + unless val[0].is_a?(AST::ASTArray) + val[0] = aryfy(val[0]) + end + + val[0].push(val[2]) + + result = val[0] + result + end +.,., # reduce 26 omitted @@ -1080,30 +1094,17 @@ module_eval <<'.,.,', 'grammar.ra', 104 # reduce 31 omitted -module_eval <<'.,.,', 'grammar.ra', 117 - def _reduce_32( val, _values, result ) + # reduce 32 omitted + +module_eval <<'.,.,', 'grammar.ra', 130 + def _reduce_33( val, _values, result ) result = ast AST::Name, :value => val[0] result end .,., - # reduce 33 omitted - -module_eval <<'.,.,', 'grammar.ra', 128 +module_eval <<'.,.,', 'grammar.ra', 151 def _reduce_34( val, _values, result ) - unless val[0].is_a?(AST::ASTArray) - val[0] = aryfy(val[0]) - end - - val[0].push(val[2]) - - result = val[0] - result - end -.,., - -module_eval <<'.,.,', 'grammar.ra', 149 - def _reduce_35( val, _values, result ) array = val[2] if array.instance_of?(AST::ResourceInstance) array = [array] @@ -1126,31 +1127,31 @@ module_eval <<'.,.,', 'grammar.ra', 149 end .,., -module_eval <<'.,.,', 'grammar.ra', 152 - def _reduce_36( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 154 + def _reduce_35( val, _values, result ) # This is a deprecated syntax. error "All resource specifications require names" result end .,., -module_eval <<'.,.,', 'grammar.ra', 155 - def _reduce_37( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 157 + def _reduce_36( val, _values, result ) # a defaults setting for a type result = ast(AST::ResourceDefaults, :type => val[0], :params => val[2]) result end .,., -module_eval <<'.,.,', 'grammar.ra', 160 - def _reduce_38( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 162 + def _reduce_37( val, _values, result ) result = ast AST::ResourceOverride, :object => val[0], :params => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 187 - def _reduce_39( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 189 + def _reduce_38( val, _values, result ) type = val[0] if (type == :exported and ! Puppet[:storeconfigs]) and ! Puppet[:parseonly] @@ -1177,22 +1178,22 @@ module_eval <<'.,.,', 'grammar.ra', 187 end .,., -module_eval <<'.,.,', 'grammar.ra', 188 - def _reduce_40( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 190 + def _reduce_39( val, _values, result ) result = :virtual result end .,., -module_eval <<'.,.,', 'grammar.ra', 189 - def _reduce_41( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 191 + def _reduce_40( val, _values, result ) result = :exported result end .,., -module_eval <<'.,.,', 'grammar.ra', 212 - def _reduce_42( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 214 + def _reduce_41( val, _values, result ) if val[0] =~ /^[a-z]/ Puppet.warning addcontext("Collection names must now be capitalized") end @@ -1214,8 +1215,8 @@ module_eval <<'.,.,', 'grammar.ra', 212 end .,., -module_eval <<'.,.,', 'grammar.ra', 222 - def _reduce_43( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 224 + def _reduce_42( val, _values, result ) if val[1] result = val[1] result.form = :virtual @@ -1226,8 +1227,8 @@ module_eval <<'.,.,', 'grammar.ra', 222 end .,., -module_eval <<'.,.,', 'grammar.ra', 230 - def _reduce_44( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 232 + def _reduce_43( val, _values, result ) if val[1] result = val[1] result.form = :exported @@ -1238,33 +1239,33 @@ module_eval <<'.,.,', 'grammar.ra', 230 end .,., - # reduce 45 omitted + # reduce 44 omitted - # reduce 46 omitted + # reduce 45 omitted -module_eval <<'.,.,', 'grammar.ra', 238 - def _reduce_47( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 240 + def _reduce_46( val, _values, result ) result = ast AST::CollExpr, :test1 => val[0], :oper => val[1], :test2 => val[2] result end .,., - # reduce 48 omitted + # reduce 47 omitted -module_eval <<'.,.,', 'grammar.ra', 244 - def _reduce_49( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 246 + def _reduce_48( val, _values, result ) result = val[1] result.parens = true result end .,., - # reduce 50 omitted + # reduce 49 omitted - # reduce 51 omitted + # reduce 50 omitted -module_eval <<'.,.,', 'grammar.ra', 252 - def _reduce_52( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 254 + def _reduce_51( val, _values, result ) result = ast AST::CollExpr, :test1 => val[0], :oper => val[1], :test2 => val[2] #result = ast AST::CollExpr #result.push *val @@ -1272,8 +1273,8 @@ module_eval <<'.,.,', 'grammar.ra', 252 end .,., -module_eval <<'.,.,', 'grammar.ra', 257 - def _reduce_53( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 259 + def _reduce_52( val, _values, result ) result = ast AST::CollExpr, :test1 => val[0], :oper => val[1], :test2 => val[2] #result = ast AST::CollExpr #result.push *val @@ -1281,21 +1282,21 @@ module_eval <<'.,.,', 'grammar.ra', 257 end .,., - # reduce 54 omitted + # reduce 53 omitted - # reduce 55 omitted + # reduce 54 omitted -module_eval <<'.,.,', 'grammar.ra', 264 - def _reduce_56( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 266 + def _reduce_55( val, _values, result ) result = ast AST::ResourceInstance, :children => [val[0],val[2]] result end .,., - # reduce 57 omitted + # reduce 56 omitted -module_eval <<'.,.,', 'grammar.ra', 274 - def _reduce_58( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 276 + def _reduce_57( val, _values, result ) if val[0].instance_of?(AST::ResourceInstance) result = ast AST::ASTArray, :children => [val[0],val[2]] else @@ -1306,31 +1307,33 @@ module_eval <<'.,.,', 'grammar.ra', 274 end .,., - # reduce 59 omitted + # reduce 58 omitted - # reduce 60 omitted + # reduce 59 omitted -module_eval <<'.,.,', 'grammar.ra', 281 - def _reduce_61( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 283 + def _reduce_60( val, _values, result ) result = ast AST::Undef, :value => :undef result end .,., -module_eval <<'.,.,', 'grammar.ra', 285 - def _reduce_62( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 287 + def _reduce_61( val, _values, result ) result = ast AST::Name, :value => val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 289 - def _reduce_63( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 291 + def _reduce_62( val, _values, result ) result = ast AST::Type, :value => val[0] result end .,., + # reduce 63 omitted + # reduce 64 omitted # reduce 65 omitted @@ -1341,10 +1344,8 @@ module_eval <<'.,.,', 'grammar.ra', 289 # reduce 68 omitted - # reduce 69 omitted - -module_eval <<'.,.,', 'grammar.ra', 305 - def _reduce_70( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 307 + def _reduce_69( val, _values, result ) if val[0] =~ /::/ raise Puppet::ParseError, "Cannot assign to variables in other namespaces" end @@ -1355,30 +1356,30 @@ module_eval <<'.,.,', 'grammar.ra', 305 end .,., -module_eval <<'.,.,', 'grammar.ra', 310 - def _reduce_71( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 312 + def _reduce_70( val, _values, result ) variable = ast AST::Name, :value => val[0] result = ast AST::VarDef, :name => variable, :value => val[2], :append => true result end .,., -module_eval <<'.,.,', 'grammar.ra', 315 - def _reduce_72( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 317 + def _reduce_71( val, _values, result ) result = ast AST::ASTArray result end .,., -module_eval <<'.,.,', 'grammar.ra', 315 - def _reduce_73( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 317 + def _reduce_72( val, _values, result ) result = val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 324 - def _reduce_74( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 326 + def _reduce_73( val, _values, result ) if val[0].instance_of?(AST::ASTArray) val[0].push(val[2]) result = val[0] @@ -1389,41 +1390,41 @@ module_eval <<'.,.,', 'grammar.ra', 324 end .,., -module_eval <<'.,.,', 'grammar.ra', 328 - def _reduce_75( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 330 + def _reduce_74( val, _values, result ) result = ast AST::ResourceParam, :param => val[0], :value => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 333 - def _reduce_76( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 335 + def _reduce_75( val, _values, result ) result = ast AST::ResourceParam, :param => val[0], :value => val[2], :add => true result end .,., - # reduce 77 omitted + # reduce 76 omitted - # reduce 78 omitted + # reduce 77 omitted -module_eval <<'.,.,', 'grammar.ra', 341 - def _reduce_79( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 343 + def _reduce_78( val, _values, result ) result = ast AST::ASTArray result end .,., -module_eval <<'.,.,', 'grammar.ra', 341 - def _reduce_80( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 343 + def _reduce_79( val, _values, result ) result = val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 350 - def _reduce_81( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 352 + def _reduce_80( val, _values, result ) if val[0].instance_of?(AST::ASTArray) val[0].push(val[2]) result = val[0] @@ -1434,10 +1435,10 @@ module_eval <<'.,.,', 'grammar.ra', 350 end .,., - # reduce 82 omitted + # reduce 81 omitted -module_eval <<'.,.,', 'grammar.ra', 359 - def _reduce_83( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 361 + def _reduce_82( val, _values, result ) if val[0].instance_of?(AST::ASTArray) result = val[0].push(val[2]) else @@ -1447,6 +1448,8 @@ module_eval <<'.,.,', 'grammar.ra', 359 end .,., + # reduce 83 omitted + # reduce 84 omitted # reduce 85 omitted @@ -1477,10 +1480,8 @@ module_eval <<'.,.,', 'grammar.ra', 359 # reduce 98 omitted - # reduce 99 omitted - -module_eval <<'.,.,', 'grammar.ra', 386 - def _reduce_100( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 388 + def _reduce_99( val, _values, result ) args = aryfy(val[2]) result = ast AST::Function, :name => val[0], @@ -1490,8 +1491,8 @@ module_eval <<'.,.,', 'grammar.ra', 386 end .,., -module_eval <<'.,.,', 'grammar.ra', 391 - def _reduce_101( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 393 + def _reduce_100( val, _values, result ) result = ast AST::Function, :name => val[0], :arguments => AST::ASTArray.new({}), @@ -1500,44 +1501,44 @@ module_eval <<'.,.,', 'grammar.ra', 391 end .,., -module_eval <<'.,.,', 'grammar.ra', 395 - def _reduce_102( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 397 + def _reduce_101( val, _values, result ) result = ast AST::String, :value => val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 397 - def _reduce_103( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 399 + def _reduce_102( val, _values, result ) result = ast AST::FlatString, :value => val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 401 - def _reduce_104( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 403 + def _reduce_103( val, _values, result ) result = ast AST::Boolean, :value => val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 406 - def _reduce_105( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 408 + def _reduce_104( val, _values, result ) Puppet.warning addcontext("Deprecation notice: Resource references should now be capitalized") result = ast AST::ResourceReference, :type => val[0], :title => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 408 - def _reduce_106( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 410 + def _reduce_105( val, _values, result ) result = ast AST::ResourceReference, :type => val[0], :title => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 421 - def _reduce_107( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 423 + def _reduce_106( val, _values, result ) args = { :test => val[1], :statements => val[3] @@ -1552,8 +1553,8 @@ module_eval <<'.,.,', 'grammar.ra', 421 end .,., -module_eval <<'.,.,', 'grammar.ra', 433 - def _reduce_108( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 435 + def _reduce_107( val, _values, result ) args = { :test => val[1], :statements => ast(AST::Nop) @@ -1568,145 +1569,145 @@ module_eval <<'.,.,', 'grammar.ra', 433 end .,., - # reduce 109 omitted + # reduce 108 omitted -module_eval <<'.,.,', 'grammar.ra', 438 - def _reduce_110( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 440 + def _reduce_109( val, _values, result ) result = ast AST::Else, :statements => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 441 - def _reduce_111( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 443 + def _reduce_110( val, _values, result ) result = ast AST::Else, :statements => ast(AST::Nop) result end .,., - # reduce 112 omitted + # reduce 111 omitted -module_eval <<'.,.,', 'grammar.ra', 458 +module_eval <<'.,.,', 'grammar.ra', 460 + def _reduce_112( val, _values, result ) + result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] + result + end +.,., + +module_eval <<'.,.,', 'grammar.ra', 463 def _reduce_113( val, _values, result ) result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 461 +module_eval <<'.,.,', 'grammar.ra', 466 def _reduce_114( val, _values, result ) result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 464 +module_eval <<'.,.,', 'grammar.ra', 469 def _reduce_115( val, _values, result ) result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 467 +module_eval <<'.,.,', 'grammar.ra', 472 def _reduce_116( val, _values, result ) result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 470 +module_eval <<'.,.,', 'grammar.ra', 475 def _reduce_117( val, _values, result ) result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 473 +module_eval <<'.,.,', 'grammar.ra', 478 def _reduce_118( val, _values, result ) - result = ast AST::ArithmeticOperator, :operator => val[1], :lval => val[0], :rval => val[2] + result = ast AST::Minus, :value => val[1] result end .,., -module_eval <<'.,.,', 'grammar.ra', 476 +module_eval <<'.,.,', 'grammar.ra', 481 def _reduce_119( val, _values, result ) - result = ast AST::Minus, :value => val[1] + result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 479 +module_eval <<'.,.,', 'grammar.ra', 484 def _reduce_120( val, _values, result ) result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 482 +module_eval <<'.,.,', 'grammar.ra', 487 def _reduce_121( val, _values, result ) result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 485 +module_eval <<'.,.,', 'grammar.ra', 490 def _reduce_122( val, _values, result ) result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 488 +module_eval <<'.,.,', 'grammar.ra', 493 def _reduce_123( val, _values, result ) result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 491 +module_eval <<'.,.,', 'grammar.ra', 496 def _reduce_124( val, _values, result ) result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 494 +module_eval <<'.,.,', 'grammar.ra', 499 def _reduce_125( val, _values, result ) - result = ast AST::ComparisonOperator, :operator => val[1], :lval => val[0], :rval => val[2] + result = ast AST::Not, :value => val[1] result end .,., -module_eval <<'.,.,', 'grammar.ra', 497 +module_eval <<'.,.,', 'grammar.ra', 502 def _reduce_126( val, _values, result ) - result = ast AST::Not, :value => val[1] + result = ast AST::BooleanOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 500 +module_eval <<'.,.,', 'grammar.ra', 505 def _reduce_127( val, _values, result ) result = ast AST::BooleanOperator, :operator => val[1], :lval => val[0], :rval => val[2] result end .,., -module_eval <<'.,.,', 'grammar.ra', 503 +module_eval <<'.,.,', 'grammar.ra', 508 def _reduce_128( val, _values, result ) - result = ast AST::BooleanOperator, :operator => val[1], :lval => val[0], :rval => val[2] - result - end -.,., - -module_eval <<'.,.,', 'grammar.ra', 506 - def _reduce_129( val, _values, result ) result = val[1] result end .,., -module_eval <<'.,.,', 'grammar.ra', 514 - def _reduce_130( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 516 + def _reduce_129( val, _values, result ) options = val[3] unless options.instance_of?(AST::ASTArray) options = ast AST::ASTArray, :children => [val[3]] @@ -1716,10 +1717,10 @@ module_eval <<'.,.,', 'grammar.ra', 514 end .,., - # reduce 131 omitted + # reduce 130 omitted -module_eval <<'.,.,', 'grammar.ra', 524 - def _reduce_132( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 526 + def _reduce_131( val, _values, result ) if val[0].instance_of?(AST::ASTArray) val[0].push val[1] result = val[0] @@ -1730,15 +1731,15 @@ module_eval <<'.,.,', 'grammar.ra', 524 end .,., -module_eval <<'.,.,', 'grammar.ra', 528 - def _reduce_133( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 530 + def _reduce_132( val, _values, result ) result = ast AST::CaseOpt, :value => val[0], :statements => val[3] result end .,., -module_eval <<'.,.,', 'grammar.ra', 533 - def _reduce_134( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 535 + def _reduce_133( val, _values, result ) result = ast(AST::CaseOpt, :value => val[0], :statements => ast(AST::ASTArray) @@ -1747,10 +1748,10 @@ module_eval <<'.,.,', 'grammar.ra', 533 end .,., - # reduce 135 omitted + # reduce 134 omitted -module_eval <<'.,.,', 'grammar.ra', 543 - def _reduce_136( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 545 + def _reduce_135( val, _values, result ) if val[0].instance_of?(AST::ASTArray) val[0].push(val[2]) result = val[0] @@ -1761,26 +1762,26 @@ module_eval <<'.,.,', 'grammar.ra', 543 end .,., -module_eval <<'.,.,', 'grammar.ra', 547 - def _reduce_137( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 549 + def _reduce_136( val, _values, result ) result = ast AST::Selector, :param => val[0], :values => val[2] result end .,., - # reduce 138 omitted + # reduce 137 omitted -module_eval <<'.,.,', 'grammar.ra', 549 - def _reduce_139( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 551 + def _reduce_138( val, _values, result ) result = val[1] result end .,., - # reduce 140 omitted + # reduce 139 omitted -module_eval <<'.,.,', 'grammar.ra', 560 - def _reduce_141( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 562 + def _reduce_140( val, _values, result ) if val[0].instance_of?(AST::ASTArray) val[0].push(val[2]) result = val[0] @@ -1791,13 +1792,15 @@ module_eval <<'.,.,', 'grammar.ra', 560 end .,., -module_eval <<'.,.,', 'grammar.ra', 564 - def _reduce_142( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 566 + def _reduce_141( val, _values, result ) result = ast AST::ResourceParam, :param => val[0], :value => val[2] result end .,., + # reduce 142 omitted + # reduce 143 omitted # reduce 144 omitted @@ -1810,31 +1813,29 @@ module_eval <<'.,.,', 'grammar.ra', 564 # reduce 148 omitted - # reduce 149 omitted - -module_eval <<'.,.,', 'grammar.ra', 575 - def _reduce_150( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 577 + def _reduce_149( val, _values, result ) result = ast AST::Default, :value => val[0] result end .,., -module_eval <<'.,.,', 'grammar.ra', 577 - def _reduce_151( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 579 + def _reduce_150( val, _values, result ) result = [val[0].value] result end .,., -module_eval <<'.,.,', 'grammar.ra', 581 - def _reduce_152( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 583 + def _reduce_151( val, _values, result ) results = val[0] << val[2].value result end .,., -module_eval <<'.,.,', 'grammar.ra', 589 - def _reduce_153( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 591 + def _reduce_152( val, _values, result ) val[1].each do |file| import(file) end @@ -1844,8 +1845,8 @@ module_eval <<'.,.,', 'grammar.ra', 589 end .,., -module_eval <<'.,.,', 'grammar.ra', 599 - def _reduce_154( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 601 + def _reduce_153( val, _values, result ) newdefine classname(val[1]), :arguments => val[2], :code => val[4] @lexer.indefine = false result = nil @@ -1855,8 +1856,8 @@ module_eval <<'.,.,', 'grammar.ra', 599 end .,., -module_eval <<'.,.,', 'grammar.ra', 603 - def _reduce_155( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 605 + def _reduce_154( val, _values, result ) newdefine classname(val[1]), :arguments => val[2] @lexer.indefine = false result = nil @@ -1864,8 +1865,8 @@ module_eval <<'.,.,', 'grammar.ra', 603 end .,., -module_eval <<'.,.,', 'grammar.ra', 611 - def _reduce_156( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 613 + def _reduce_155( val, _values, result ) # Our class gets defined in the parent namespace, not our own. @lexer.namepop newclass classname(val[1]), :code => val[4], :parent => val[2] @@ -1874,8 +1875,8 @@ module_eval <<'.,.,', 'grammar.ra', 611 end .,., -module_eval <<'.,.,', 'grammar.ra', 616 - def _reduce_157( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 618 + def _reduce_156( val, _values, result ) # Our class gets defined in the parent namespace, not our own. @lexer.namepop newclass classname(val[1]), :parent => val[2] @@ -1884,32 +1885,32 @@ module_eval <<'.,.,', 'grammar.ra', 616 end .,., -module_eval <<'.,.,', 'grammar.ra', 621 - def _reduce_158( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 623 + def _reduce_157( val, _values, result ) newnode val[1], :parent => val[2], :code => val[4] result = nil result end .,., -module_eval <<'.,.,', 'grammar.ra', 624 - def _reduce_159( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 626 + def _reduce_158( val, _values, result ) newnode val[1], :parent => val[2] result = nil result end .,., + # reduce 159 omitted + # reduce 160 omitted # reduce 161 omitted # reduce 162 omitted - # reduce 163 omitted - -module_eval <<'.,.,', 'grammar.ra', 638 - def _reduce_164( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 640 + def _reduce_163( val, _values, result ) result = val[0] result = [result] unless result.is_a?(Array) result << val[2] @@ -1917,49 +1918,49 @@ module_eval <<'.,.,', 'grammar.ra', 638 end .,., + # reduce 164 omitted + # reduce 165 omitted # reduce 166 omitted # reduce 167 omitted - # reduce 168 omitted - -module_eval <<'.,.,', 'grammar.ra', 647 - def _reduce_169( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 649 + def _reduce_168( val, _values, result ) result = nil result end .,., -module_eval <<'.,.,', 'grammar.ra', 651 - def _reduce_170( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 653 + def _reduce_169( val, _values, result ) result = ast AST::ASTArray, :children => [] result end .,., - # reduce 171 omitted + # reduce 170 omitted -module_eval <<'.,.,', 'grammar.ra', 656 - def _reduce_172( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 658 + def _reduce_171( val, _values, result ) result = nil result end .,., -module_eval <<'.,.,', 'grammar.ra', 660 - def _reduce_173( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 662 + def _reduce_172( val, _values, result ) result = val[1] result = [result] unless result[0].is_a?(Array) result end .,., - # reduce 174 omitted + # reduce 173 omitted -module_eval <<'.,.,', 'grammar.ra', 667 - def _reduce_175( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 669 + def _reduce_174( val, _values, result ) result = val[0] result = [result] unless result[0].is_a?(Array) result << val[2] @@ -1967,66 +1968,77 @@ module_eval <<'.,.,', 'grammar.ra', 667 end .,., -module_eval <<'.,.,', 'grammar.ra', 672 - def _reduce_176( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 674 + def _reduce_175( val, _values, result ) Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0], val[2]] result end .,., -module_eval <<'.,.,', 'grammar.ra', 676 - def _reduce_177( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 678 + def _reduce_176( val, _values, result ) Puppet.warning addcontext("Deprecation notice: must now include '$' in prototype") result = [val[0]] result end .,., -module_eval <<'.,.,', 'grammar.ra', 678 - def _reduce_178( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 680 + def _reduce_177( val, _values, result ) result = [val[0], val[2]] result end .,., -module_eval <<'.,.,', 'grammar.ra', 680 - def _reduce_179( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 682 + def _reduce_178( val, _values, result ) result = [val[0]] result end .,., - # reduce 180 omitted + # reduce 179 omitted -module_eval <<'.,.,', 'grammar.ra', 685 - def _reduce_181( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 687 + def _reduce_180( val, _values, result ) result = val[1] result end .,., - # reduce 182 omitted + # reduce 181 omitted -module_eval <<'.,.,', 'grammar.ra', 690 - def _reduce_183( val, _values, result ) +module_eval <<'.,.,', 'grammar.ra', 692 + def _reduce_182( val, _values, result ) result = val[1] result end .,., + # reduce 183 omitted + # reduce 184 omitted - # reduce 185 omitted +module_eval <<'.,.,', 'grammar.ra', 698 + def _reduce_185( val, _values, result ) + result = ast AST::Variable, :value => val[0] + result + end +.,., -module_eval <<'.,.,', 'grammar.ra', 696 +module_eval <<'.,.,', 'grammar.ra', 706 def _reduce_186( val, _values, result ) - result = ast AST::Variable, :value => val[0] + if val[1].instance_of?(AST::ASTArray) + result = val[1] + else + result = ast AST::ASTArray, :children => [val[1]] + end result end .,., -module_eval <<'.,.,', 'grammar.ra', 704 +module_eval <<'.,.,', 'grammar.ra', 713 def _reduce_187( val, _values, result ) if val[1].instance_of?(AST::ASTArray) result = val[1] @@ -2037,7 +2049,7 @@ module_eval <<'.,.,', 'grammar.ra', 704 end .,., -module_eval <<'.,.,', 'grammar.ra', 706 +module_eval <<'.,.,', 'grammar.ra', 715 def _reduce_188( val, _values, result ) result = ast AST::ASTArray result @@ -2050,7 +2062,7 @@ module_eval <<'.,.,', 'grammar.ra', 706 # reduce 191 omitted -module_eval <<'.,.,', 'grammar.ra', 711 +module_eval <<'.,.,', 'grammar.ra', 720 def _reduce_192( val, _values, result ) result = nil result diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb index fc716b0fd..036f6604e 100644 --- a/lib/puppet/parser/templatewrapper.rb +++ b/lib/puppet/parser/templatewrapper.rb @@ -42,8 +42,13 @@ class Puppet::Parser::TemplateWrapper return scope.catalog.classes end - # Allow templates to access the defined tags + # Allow templates to access the tags defined in the current scope def tags + return scope.tags + end + + # Allow templates to access the all the defined tags + def all_tags return scope.catalog.tags end @@ -78,7 +83,12 @@ class Puppet::Parser::TemplateWrapper # to the regular methods. benchmark(:debug, "Bound template variables for #{file}") do scope.to_hash.each { |name, value| - instance_variable_set("@#{name}", value) + if name.kind_of?(String) + realname = name.gsub(/[^\w]/, "_") + else + realname = name + end + instance_variable_set("@#{realname}", value) } end diff --git a/lib/puppet/property/keyvalue.rb b/lib/puppet/property/keyvalue.rb new file mode 100644 index 000000000..6c0800c79 --- /dev/null +++ b/lib/puppet/property/keyvalue.rb @@ -0,0 +1,96 @@ +#This subclass of property manages string key value pairs. + +#In order to use this property: +# - the @should value must be an array of keyvalue pairs separated by the 'separator' +# - the retrieve method should return a hash with the keys as symbols +# IMPORTANT NOTE: In order for this property to work there must also be a 'membership' parameter +# The class that inherits from property should override that method with the symbol for the membership + +require 'puppet/property' + +module Puppet + class Property + class KeyValue < Property + + def hash_to_key_value_s(hash) + hash.select { |k,v| true }.map { |pair| pair.join(separator) }.join(delimiter) + end + + def should_to_s(should_value) + hash_to_key_value_s(should_value) + end + + def is_to_s(current_value) + hash_to_key_value_s(current_value) + end + + def membership + :key_value_membership + end + + def inclusive? + @resource[membership] == :inclusive + end + + def hashify(key_value_array) + #turns string array into a hash + key_value_array.inject({}) do |hash, key_value| + tmp = key_value.split(separator) + hash[tmp[0].intern] = tmp[1] + hash + end + end + + def process_current_hash(current) + return {} if current == :absent + + #inclusive means we are managing everything so if it isn't in should, its gone + if inclusive? + current.each_key { |key| current[key] = nil } + end + current + end + + def should + unless defined? @should and @should + return nil + end + + members = hashify(@should) + current = process_current_hash(retrieve) + + #shared keys will get overwritten by members + current.merge(members) + end + + def separator + "=" + end + + def delimiter + ";" + end + + def retrieve + #ok, some 'convention' if the keyvalue property is named properties, provider should implement a properties method + if key_hash = provider.send(name) and key_hash != :absent + return key_hash + else + return :absent + end + end + + def insync?(is) + unless defined? @should and @should + return true + end + + unless is + return true + end + + return (is == self.should) + end + end + end +end diff --git a/lib/puppet/provider/user/user_role_add.rb b/lib/puppet/provider/user/user_role_add.rb index 819516dc4..00fc24b3a 100644 --- a/lib/puppet/provider/user/user_role_add.rb +++ b/lib/puppet/provider/user/user_role_add.rb @@ -11,6 +11,8 @@ Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd do options :comment, :method => :gecos options :groups, :flag => "-G" options :roles, :flag => "-R" + options :auths, :flag => "-A" + options :profiles, :flag => "-P" verify :gid, "GID must be an integer" do |value| value.is_a? Integer @@ -26,6 +28,24 @@ Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd do has_feature :manages_passwords end + #must override this to hand the keyvalue pairs + def add_properties + cmd = [] + Puppet::Type.type(:user).validproperties.each do |property| + next if property == :ensure + # the value needs to be quoted, mostly because -c might + # have spaces in it + if value = @resource.should(property) and value != "" + if property == :keys + cmd += build_keys_cmd(value) + else + cmd << flag(property) << value + end + end + end + cmd + end + def user_attributes @user_attributes ||= UserAttr.get_attributes_by_name(@resource[:name]) end @@ -57,6 +77,7 @@ Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd do def transition(type) cmd = [command(:modify)] cmd << "-K" << "type=#{type}" + cmd += add_properties cmd << @resource[:name] end @@ -85,5 +106,51 @@ Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd do user_attributes[:roles] end end + + def auths + if user_attributes + user_attributes[:auths] + end + end + + def profiles + if user_attributes + user_attributes[:profiles] + end + end + + def project + if user_attributes + user_attributes[:project] + end + end + + def managed_attributes + [:name, :type, :roles, :auths, :profiles, :project] + end + + def remove_managed_attributes + managed = managed_attributes + user_attributes.select { |k,v| !managed.include?(k) }.inject({}) { |hash, array| hash[array[0]] = array[1]; hash } + end + + def keys + if user_attributes + #we have to get rid of all the keys we are managing another way + remove_managed_attributes + end + end + + def build_keys_cmd(keys_hash) + cmd = [] + keys_hash.each do |k,v| + cmd << "-K" << "#{k}=#{v}" + end + cmd + end + + def keys=(keys_hash) + run([command(:modify)] + build_keys_cmd(keys_hash) << @resource[:name], "modify attribute key pairs") + end end diff --git a/lib/puppet/provider/user/useradd.rb b/lib/puppet/provider/user/useradd.rb index b327db384..6996dd69a 100644 --- a/lib/puppet/provider/user/useradd.rb +++ b/lib/puppet/provider/user/useradd.rb @@ -23,8 +23,22 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ has_feature :manages_passwords end - def addcmd - cmd = [command(:add)] + def check_allow_dup + @resource.allowdupe? ? ["-o"] : [] + end + + def check_manage_home + cmd = [] + if @resource.managehome? + cmd << "-m" + elsif %w{Fedora RedHat}.include?(Facter.value("operatingsystem")) + cmd << "-M" + end + cmd + end + + def add_properties + cmd = [] Puppet::Type.type(:user).validproperties.each do |property| next if property == :ensure # the value needs to be quoted, mostly because -c might @@ -33,20 +47,15 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ cmd << flag(property) << value end end + cmd + end - if @resource.allowdupe? - cmd << "-o" - end - - if @resource.managehome? - cmd << "-m" - elsif %w{Fedora RedHat}.include?(Facter.value("operatingsystem")) - cmd << "-M" - end - + def addcmd + cmd = [command(:add)] + cmd += add_properties + cmd += check_allow_dup + cmd += check_manage_home cmd << @resource[:name] - - cmd end # Retrieve the password using the Shadow Password library diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb index 2c424e098..8e82c8adf 100644 --- a/lib/puppet/reference/configuration.rb +++ b/lib/puppet/reference/configuration.rb @@ -49,10 +49,6 @@ On The Command-Line +++++++++++++++++++ Every Puppet executable (with the exception of ``puppetdoc``) accepts all of the parameters below, but not all of the arguments make sense for every executable. -Each parameter has a section listed with it in parentheses; often, that section -will map to an executable (e.g., ``puppetd``), in which case it probably only -makes sense for that one executable. If ``main`` is listed as the section, -it is most likely an option that is valid for everyone. I have tried to be as thorough as possible in the descriptions of the arguments, so it should be obvious whether an argument is appropriate or not. @@ -121,9 +117,6 @@ Note that this invocation will replace the contents of any pre-existing `puppet.conf` file, so make a backup of your present config if it contains valuable information. -All parameters will be under a single section heading matching the name of -the process used to generate the configuraiton ('puppetd', in this case). - Like the `--genconfig` argument, the executables also accept a `--genmanifest` argument, which will generate a manifest that can be used to manage all of Puppet's directories and files and prints it to standard output. This can diff --git a/lib/puppet/type/file/selcontext.rb b/lib/puppet/type/file/selcontext.rb index b2c89e6f8..d5111caf8 100644 --- a/lib/puppet/type/file/selcontext.rb +++ b/lib/puppet/type/file/selcontext.rb @@ -56,28 +56,45 @@ module Puppet end Puppet.type(:file).newproperty(:seluser, :parent => Puppet::SELFileContext) do - desc "What the SELinux User context of the file should be." + desc "What the SELinux user component of the context of the file should be. + Any valid SELinux user component is accepted. For example ``user_u``. + If not specified it defaults to the value returned by matchpathcon for + the file, if any exists. Only valid on systems with SELinux support + enabled." @event = :file_changed defaultto { self.retrieve_default_context(:seluser) } end Puppet.type(:file).newproperty(:selrole, :parent => Puppet::SELFileContext) do - desc "What the SELinux Role context of the file should be." + desc "What the SELinux role component of the context of the file should be. + Any valid SELinux role component is accepted. For example ``role_r``. + If not specified it defaults to the value returned by matchpathcon for + the file, if any exists. Only valid on systems with SELinux support + enabled." @event = :file_changed defaultto { self.retrieve_default_context(:selrole) } end Puppet.type(:file).newproperty(:seltype, :parent => Puppet::SELFileContext) do - desc "What the SELinux Type context of the file should be." + desc "What the SELinux type component of the context of the file should be. + Any valid SELinux type component is accepted. For example ``tmp_t``. + If not specified it defaults to the value returned by matchpathcon for + the file, if any exists. Only valid on systems with SELinux support + enabled." @event = :file_changed defaultto { self.retrieve_default_context(:seltype) } end Puppet.type(:file).newproperty(:selrange, :parent => Puppet::SELFileContext) do - desc "What the SELinux Range context of the file should be." + desc "What the SELinux range component of the context of the file should be. + Any valid SELinux range component is accepted. For example ``s0`` or + ``SystemHigh``. If not specified it defaults to the value returned by + matchpathcon for the file, if any exists. Only valid on systems with + SELinux support enabled and that have support for MCS (Multi-Category + Security)." @event = :file_changed defaultto { self.retrieve_default_context(:selrange) } diff --git a/lib/puppet/type/selboolean.rb b/lib/puppet/type/selboolean.rb index d12dd3bcb..b1f12cae4 100644 --- a/lib/puppet/type/selboolean.rb +++ b/lib/puppet/type/selboolean.rb @@ -4,7 +4,8 @@ module Puppet newtype(:selboolean) do - @doc = "Enable or disable SELinux booleans." + @doc = "Manages SELinux booleans on systems with SELinux support. The supported booleans + are any of the ones found in /selinux/booleans/." newparam(:name) do desc "The name of the SELinux boolean to be managed." @@ -12,13 +13,14 @@ module Puppet end newproperty(:value) do - desc "Whether the the SELinux boolean should be enabled or disabled. Possible values are ``on`` or ``off``." + desc "Whether the the SELinux boolean should be enabled or disabled." newvalue(:on) newvalue(:off) end newparam(:persistent) do - desc "If set true, SELinux booleans will be written to disk and persist accross reboots." + desc "If set true, SELinux booleans will be written to disk and persist accross reboots. + The default is ``false``." defaultto :false newvalues(:true, :false) diff --git a/lib/puppet/type/selmodule.rb b/lib/puppet/type/selmodule.rb index 1f02912ad..883cd954d 100644 --- a/lib/puppet/type/selmodule.rb +++ b/lib/puppet/type/selmodule.rb @@ -3,36 +3,40 @@ # Puppet::Type.newtype(:selmodule) do - @doc = "Enable or disable SELinux policy modules." + @doc = "Manages loading and unloading of SELinux policy modules + on the system. Requires SELinux support. See man semodule(8) + for more information on SELinux policy modules." ensurable newparam(:name) do - desc "The name of the SELinux policy to be managed." + desc "The name of the SELinux policy to be managed. You should not + include the customary trailing .pp extension." isnamevar end newparam(:selmoduledir) do desc "The directory to look for the compiled pp module file in. - Currently defaults to /usr/share/selinux/targeted" + Currently defaults to /usr/share/selinux/targeted. If selmodulepath + is not specified the module will be looked for in this directory in a + in a file called NAME.pp, where NAME is the value of the name parameter." defaultto "/usr/share/selinux/targeted" end newparam(:selmodulepath) do - desc "The full path in which to look for the compiled pp - module file in. You only need to use this if the module file - is not in the directory pointed at by selmoduledir." + desc "The full path to the compiled .pp policy module. You only need to use + this if the module file is not in the directory pointed at by selmoduledir." end newproperty(:syncversion) do - desc "If set to 'true', the policy will be reloaded if the + desc "If set to ``true``, the policy will be reloaded if the version found in the on-disk file differs from the loaded - version. If set to 'false' (the default) the the only check + version. If set to ``false`` (the default) the the only check that will be made is if the policy is loaded at all or not." newvalue(:true) diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index e0a11f00b..929e45d14 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -1,6 +1,7 @@ require 'etc' require 'facter' require 'puppet/property/list' +require 'puppet/property/keyvalue' module Puppet newtype(:user) do @@ -137,6 +138,7 @@ module Puppet end end + newproperty(:groups, :parent => Puppet::Property::List) do desc "The groups of which the user is a member. The primary group should not be listed. Multiple groups should be @@ -147,25 +149,7 @@ module Puppet raise ArgumentError, "Group names must be provided, not numbers" end if value.include?(",") - raise ArgumentError, "Group names must be provided as an array, not as a comma-separated list '%s'" % value - end - end - end - - newproperty(:roles, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do - desc "The roles of which the user the user has. The roles should be - specified as an array." - - def membership - :role_membership - end - - validate do |value| - if value =~ /^\d+$/ - raise ArgumentError, "Role names must be provided, not numbers" - end - if value.include?(",") - raise ArgumentError, "Role names must be provided as an array, not a comma-separated list" + raise ArgumentError, "Group names must be provided as an array, not a comma-separated list" end end end @@ -187,19 +171,9 @@ module Puppet defaultto :minimum end - newparam(:role_membership) do - desc "Whether specified roles should be treated as the only roles - of which the user is a member or whether they should merely - be treated as the minimum membership list." - - newvalues(:inclusive, :minimum) - - defaultto :minimum - end - newparam(:allowdupe, :boolean => true) do desc "Whether to allow duplicate UIDs." - + newvalues(:true, :false) defaultto false @@ -233,7 +207,19 @@ module Puppet group end } - autos = groups.reject { |g| g.is_a?(Integer) } + groups.each { |group| + case group + when Integer: + if obj = Puppet.type(:group).find { |gobj| + gobj.should(:gid) == group + } + autos << obj + + end + else + autos << group + end + } end if obj = @parameters[:groups] and groups = obj.should @@ -261,6 +247,118 @@ module Puppet prophash } end + + newproperty(:roles, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do + desc "The roles the user has. Multiple roles should be + specified as an array." + + def membership + :role_membership + end + + validate do |value| + if value =~ /^\d+$/ + raise ArgumentError, "Role names must be provided, not numbers" + end + if value.include?(",") + raise ArgumentError, "Role names must be provided as an array, not a comma-separated list" + end + end + end + + newparam(:role_membership) do + desc "Whether specified roles should be treated as the only roles + of which the user is a member or whether they should merely + be treated as the minimum membership list." + + newvalues(:inclusive, :minimum) + + defaultto :minimum + end + + newproperty(:auths, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do + desc "The auths the user has. Multiple auths should be + specified as an array." + + def membership + :auth_membership + end + + validate do |value| + if value =~ /^\d+$/ + raise ArgumentError, "Auth names must be provided, not numbers" + end + if value.include?(",") + raise ArgumentError, "Auth names must be provided as an array, not a comma-separated list" + end + end + end + + newparam(:auth_membership) do + desc "Whether specified auths should be treated as the only auths + of which the user is a member or whether they should merely + be treated as the minimum membership list." + + newvalues(:inclusive, :minimum) + + defaultto :minimum + end + + newproperty(:profiles, :parent => Puppet::Property::List, :required_features => :manages_solaris_rbac) do + desc "The profiles the user has. Multiple profiles should be + specified as an array." + + def membership + :profile_membership + end + + validate do |value| + if value =~ /^\d+$/ + raise ArgumentError, "Profile names must be provided, not numbers" + end + if value.include?(",") + raise ArgumentError, "Profile names must be provided as an array, not a comma-separated list" + end + end + end + + newparam(:profile_membership) do + desc "Whether specified roles should be treated as the only roles + of which the user is a member or whether they should merely + be treated as the minimum membership list." + + newvalues(:inclusive, :minimum) + + defaultto :minimum + end + + newproperty(:keys, :parent => Puppet::Property::KeyValue, :required_features => :manages_solaris_rbac) do + desc "Specify user attributes in an array of keyvalue pairs" + + def membership + :key_membership + end + + validate do |value| + unless value.include?("=") + raise ArgumentError, "key value pairs must be seperated by an =" + end + end + end + + newparam(:key_membership) do + desc "Whether specified key value pairs should be treated as the only attributes + of the user or whether they should merely + be treated as the minimum list." + + newvalues(:inclusive, :minimum) + + defaultto :minimum + end + + newproperty(:project, :required_features => :manages_solaris_rbac) do + desc "The name of the project associated with a user" + end end end diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb index 0a4af3ca1..148748950 100644 --- a/lib/puppet/util/selinux.rb +++ b/lib/puppet/util/selinux.rb @@ -6,8 +6,12 @@ # are available. At this time (2008-09-26) these bindings aren't bundled on # any SELinux-using distribution I know of. +require 'puppet/util' + module Puppet::Util::SELinux + include Puppet::Util + def selinux_support? FileTest.exists?("/selinux/enforce") end @@ -103,10 +107,15 @@ module Puppet::Util::SELinux when :selrange flag = "-l" else - flag = "" + flag = nil end - execute(["/usr/bin/chcon","-h",flag,value,file]) + if flag.nil? + cmd = ["/usr/bin/chcon","-h",value,file] + else + cmd = ["/usr/bin/chcon","-h",flag,value,file] + end + execute(cmd) return true end diff --git a/spec/unit/parser/parser.rb b/spec/unit/parser/parser.rb index c0d22a2cc..07aad588d 100755 --- a/spec/unit/parser/parser.rb +++ b/spec/unit/parser/parser.rb @@ -142,4 +142,36 @@ describe Puppet::Parser do end + describe Puppet::Parser, "when parsing function calls" do + + it "should not raise errors with no arguments" do + lambda { @parser.parse("tag()") }.should_not raise_error + end + + it "should not raise errors with rvalue function with no args" do + lambda { @parser.parse("$a = template()") }.should_not raise_error + end + + it "should not raise errors with arguments" do + lambda { @parser.parse("notice(1)") }.should_not raise_error + end + + it "should not raise errors with multiple arguments" do + lambda { @parser.parse("notice(1,2)") }.should_not raise_error + end + + it "should not raise errors with multiple arguments and a trailing comma" do + lambda { @parser.parse("notice(1,2,)") }.should_not raise_error + end + + end + + describe Puppet::Parser, "when parsing arrays with trailing comma" do + + it "should not raise errors with a trailing comma" do + lambda { @parser.parse("$a = [1,2,]") }.should_not raise_error + end + + end + end diff --git a/spec/unit/parser/templatewrapper.rb b/spec/unit/parser/templatewrapper.rb index 20ea76921..532776223 100755 --- a/spec/unit/parser/templatewrapper.rb +++ b/spec/unit/parser/templatewrapper.rb @@ -62,10 +62,16 @@ describe Puppet::Parser::TemplateWrapper do tw.classes().should == ["class1", "class2"] end - it "should allow you to retrieve the defined tags with tags" do + it "should allow you to retrieve all the tags with all_tags" do catalog = mock 'catalog', :tags => ["tag1", "tag2"] @scope.expects(:catalog).returns( catalog ) tw = Puppet::Parser::TemplateWrapper.new(@scope, @file) + tw.all_tags().should == ["tag1","tag2"] + end + + it "should allow you to retrieve the tags defined in the current scope" do + @scope.expects(:tags).returns( ["tag1", "tag2"] ) + tw = Puppet::Parser::TemplateWrapper.new(@scope, @file) tw.tags().should == ["tag1","tag2"] end @@ -78,5 +84,27 @@ describe Puppet::Parser::TemplateWrapper do @tw.result @tw.instance_variable_get("@one").should == "foo" - end + end + + it "should not error out if one of the variables is a symbol" do + template_mock = mock("template", :result => "woot!") + File.expects(:read).with("/tmp/fake_template").returns("template contents") + ERB.expects(:new).with("template contents", 0, "-").returns(template_mock) + + @scope.expects(:to_hash).returns(:_timestamp => "1234") + @tw.result + end + + %w{! . ; :}.each do |badchar| + it "should translate #{badchar} to _ when setting the instance variables" do + template_mock = mock("template", :result => "woot!") + File.expects(:read).with("/tmp/fake_template").returns("template contents") + ERB.expects(:new).with("template contents", 0, "-").returns(template_mock) + + @scope.expects(:to_hash).returns("one#{badchar}" => "foo") + @tw.result + + @tw.instance_variable_get("@one_").should == "foo" + end + end end diff --git a/spec/unit/property/keyvalue.rb b/spec/unit/property/keyvalue.rb new file mode 100644 index 000000000..6f9eef531 --- /dev/null +++ b/spec/unit/property/keyvalue.rb @@ -0,0 +1,168 @@ +#!/usr/bin/env ruby + +Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") } + +require 'puppet/property/keyvalue' + +klass = Puppet::Property::KeyValue + +describe klass do + + it "should be a subclass of Property" do + klass.superclass.must == Puppet::Property + end + + describe "as an instance" do + before do + # Wow that's a messy interface to the resource. + klass.initvars + @resource = stub 'resource', :[]= => nil, :property => nil + @property = klass.new(:resource => @resource) + end + + it "should have a , as default delimiter" do + @property.delimiter.should == ";" + end + + it "should have a = as default separator" do + @property.separator.should == "=" + end + + it "should have a :membership as default membership" do + @property.membership.should == :key_value_membership + end + + it "should return the same value passed into should_to_s" do + @property.should_to_s({:foo => "baz", :bar => "boo"}) == "foo=baz;bar=boo" + end + + it "should return the passed in array values joined with the delimiter from is_to_s" do + @property.is_to_s({"foo" => "baz" , "bar" => "boo"}).should == "foo=baz;bar=boo" + end + + describe "when calling inclusive?" do + it "should use the membership method to look up on the @resource" do + @property.expects(:membership).returns(:key_value_membership) + @resource.expects(:[]).with(:key_value_membership) + @property.inclusive? + end + + it "should return true when @resource[membership] == inclusive" do + @property.stubs(:membership).returns(:key_value_membership) + @resource.stubs(:[]).with(:key_value_membership).returns(:inclusive) + @property.inclusive?.must == true + end + + it "should return false when @resource[membership] != inclusive" do + @property.stubs(:membership).returns(:key_value_membership) + @resource.stubs(:[]).with(:key_value_membership).returns(:minimum) + @property.inclusive?.must == false + end + end + + describe "when calling process_current_hash" do + it "should return {} if hash is :absent" do + @property.process_current_hash(:absent).must == {} + end + + it "should set every key to nil if inclusive?" do + @property.stubs(:inclusive?).returns(true) + @property.process_current_hash({:foo => "bar", :do => "re"}).must == { :foo => nil, :do => nil } + end + + it "should return the hash if !inclusive?" do + @property.stubs(:inclusive?).returns(false) + @property.process_current_hash({:foo => "bar", :do => "re"}).must == {:foo => "bar", :do => "re"} + end + end + + describe "when calling should" do + it "should return nil if @should is nil" do + @property.should.must == nil + end + + it "should call process_current_hash" do + @property.should = ["foo=baz", "bar=boo"] + @property.stubs(:retrieve).returns({:do => "re", :mi => "fa" }) + @property.expects(:process_current_hash).returns({}) + @property.should + end + + it "should return the hashed values of @should and the nilled values of retrieve if inclusive" do + @property.should = ["foo=baz", "bar=boo"] + @property.expects(:retrieve).returns({:do => "re", :mi => "fa" }) + @property.expects(:inclusive?).returns(true) + @property.should.must == { :foo => "baz", :bar => "boo", :do => nil, :mi => nil } + end + + it "should return the hashed @should + the unique values of retrieve if !inclusive" do + @property.should = ["foo=baz", "bar=boo"] + @property.expects(:retrieve).returns({:foo => "diff", :do => "re", :mi => "fa"}) + @property.expects(:inclusive?).returns(false) + @property.should.must == { :foo => "baz", :bar => "boo", :do => "re", :mi => "fa" } + end + end + + describe "when calling retrieve" do + before do + @provider = mock("provider") + @property.stubs(:provider).returns(@provider) + end + + it "should send 'name' to the provider" do + @provider.expects(:send).with(:keys) + @property.expects(:name).returns(:keys) + @property.retrieve + end + + it "should return a hash with the provider returned info" do + @provider.stubs(:send).with(:keys).returns({"do" => "re", "mi" => "fa" }) + @property.stubs(:name).returns(:keys) + @property.retrieve == {"do" => "re", "mi" => "fa" } + end + + it "should return :absent when the provider returns :absent" do + @provider.stubs(:send).with(:keys).returns(:absent) + @property.stubs(:name).returns(:keys) + @property.retrieve == :absent + end + end + + describe "when calling hashify" do + it "should return the array hashified" do + @property.hashify(["foo=baz", "bar=boo"]).must == { :foo => "baz", :bar => "boo" } + end + end + + describe "when calling insync?" do + before do + @provider = mock("provider") + @property.stubs(:provider).returns(@provider) + @property.stubs(:name).returns(:prop_name) + end + + it "should return true unless @should is defined and not nil" do + @property.insync?("foo") == true + end + + it "should return true if the passed in values is nil" do + @property.should = "foo" + @property.insync?(nil) == true + end + + it "should return true if hashified should value == (retrieved) value passed in" do + @provider.stubs(:prop_name).returns({ :foo => "baz", :bar => "boo" }) + @property.should = ["foo=baz", "bar=boo"] + @property.expects(:inclusive?).returns(true) + @property.insync?({ :foo => "baz", :bar => "boo" }).must == true + end + + it "should return false if prepared value != should value" do + @provider.stubs(:prop_name).returns({ "foo" => "bee", "bar" => "boo" }) + @property.should = ["foo=baz", "bar=boo"] + @property.expects(:inclusive?).returns(true) + @property.insync?({ "foo" => "bee", "bar" => "boo" }).must == false + end + end + end +end diff --git a/spec/unit/provider/user/user_role_add.rb b/spec/unit/provider/user/user_role_add.rb index e9bd9a68f..fc2074d44 100644 --- a/spec/unit/provider/user/user_role_add.rb +++ b/spec/unit/provider/user/user_role_add.rb @@ -42,9 +42,9 @@ describe provider_class do end describe "when calling transition" do - it "should return foomod setting the type to bar" do + it "should return the type set to whatever is passed in" do @provider.expects(:command).with(:modify).returns("foomod") - @provider.transition("bar").should == ["foomod", "-K", "type=bar", "fakeval"] + @provider.transition("bar").include?("type=bar") end end @@ -115,17 +115,77 @@ describe provider_class do end end - describe "when getting roles" do + [:roles, :auths, :profiles].each do |val| + describe "when getting #{val}" do + it "should get the user_attributes" do + @provider.expects(:user_attributes) + @provider.send(val) + end + + it "should get the #{val} attribute" do + attributes = mock("attributes") + attributes.expects(:[]).with(val) + @provider.stubs(:user_attributes).returns(attributes) + @provider.send(val) + end + end + end + + describe "when getting the keys" do it "should get the user_attributes" do @provider.expects(:user_attributes) - @provider.roles + @provider.keys + end + + it "should call removed_managed_attributes" do + @provider.stubs(:user_attributes).returns({ :type => "normal", :foo => "something" }) + @provider.expects(:remove_managed_attributes) + @provider.keys + end + + it "should removed managed attribute (type, auths, roles, etc)" do + @provider.stubs(:user_attributes).returns({ :type => "normal", :foo => "something" }) + @provider.keys.should == { :foo => "something" } + end + end + + describe "when adding properties" do + it "should call build_keys_cmd" do + @resource.stubs(:should).returns "" + @resource.expects(:should).with(:keys).returns({ :foo => "bar" }) + @provider.expects(:build_keys_cmd).returns([]) + @provider.add_properties + end + + it "should add the elements of the keys hash to an array" do + @resource.stubs(:should).returns "" + @resource.expects(:should).with(:keys).returns({ :foo => "bar"}) + @provider.add_properties.must == ["-K", "foo=bar"] + end + end + + describe "when calling build_keys_cmd" do + it "should build cmd array with keypairs seperated by -K ending with user" do + @provider.build_keys_cmd({"foo" => "bar", "baz" => "boo"}).should.eql? ["-K", "foo=bar", "-K", "baz=boo"] + end + end + + describe "when setting the keys" do + before do + @provider.stubs(:is_role?).returns(false) + end + + it "should run a command" do + @provider.expects(:run) + @provider.keys=({}) end - it "should get the :roles attribute" do - attributes = mock("attributes") - attributes.expects(:[]).with(:roles) - @provider.stubs(:user_attributes).returns(attributes) - @provider.roles + it "should build the command" do + @resource.stubs(:[]).with(:name).returns("someuser") + @provider.stubs(:command).returns("usermod") + @provider.expects(:build_keys_cmd).returns(["-K", "foo=bar"]) + @provider.expects(:run).with(["usermod", "-K", "foo=bar", "someuser"], "modify attribute key pairs") + @provider.keys=({}) end end end diff --git a/spec/unit/provider/user/useradd.rb b/spec/unit/provider/user/useradd.rb index 96a785589..463212e4e 100755 --- a/spec/unit/provider/user/useradd.rb +++ b/spec/unit/provider/user/useradd.rb @@ -7,25 +7,109 @@ provider_class = Puppet::Type.type(:user).provider(:useradd) describe provider_class do before do @resource = stub("resource", :name => "myuser", :managehome? => nil) + @resource.stubs(:should).returns "fakeval" + @resource.stubs(:[]).returns "fakeval" @provider = provider_class.new(@resource) end # #1360 it "should add -o when allowdupe is enabled and the user is being created" do - @resource.stubs(:should).returns "fakeval" - @resource.stubs(:[]).returns "fakeval" @resource.expects(:allowdupe?).returns true @provider.expects(:execute).with { |args| args.include?("-o") } - @provider.create end it "should add -o when allowdupe is enabled and the uid is being modified" do - @resource.stubs(:should).returns "fakeval" - @resource.stubs(:[]).returns "fakeval" @resource.expects(:allowdupe?).returns true @provider.expects(:execute).with { |args| args.include?("-o") } @provider.uid = 150 end + + describe "when checking to add allow dup" do + it "should check allow dup" do + @resource.expects(:allowdupe?) + @provider.check_allow_dup + end + + it "should return an array with a flag if dup is allowed" do + @resource.stubs(:allowdupe?).returns true + @provider.check_allow_dup.must == ["-o"] + end + + it "should return an empty array if no dup is allowed" do + @resource.stubs(:allowdupe?).returns false + @provider.check_allow_dup.must == [] + end + end + + describe "when checking manage home" do + it "should check manage home" do + @resource.expects(:managehome?) + @provider.check_manage_home + end + + it "should return an array with -m flag if home is managed" do + @resource.stubs(:managehome?).returns true + @provider.check_manage_home.must == ["-m"] + end + + it "should return an array with -M if home is not managed and on Redhat" do + Facter.stubs(:value).with("operatingsystem").returns("RedHat") + @resource.stubs(:managehome?).returns false + @provider.check_manage_home.must == ["-M"] + end + + it "should return an empty array if home is not managed and not on Redhat" do + Facter.stubs(:value).with("operatingsystem").returns("some OS") + @resource.stubs(:managehome?).returns false + @provider.check_manage_home.must == [] + end + end + + describe "when adding properties" do + it "should get the valid properties" + it "should not add the ensure property" + it "should add the flag and value to an array" + it "should return and array of flags and values" + end + + describe "when calling addcmd" do + before do + @resource.stubs(:allowdupe?).returns true + @resource.stubs(:managehome?).returns true + end + + it "should call command with :add" do + @provider.expects(:command).with(:add) + @provider.addcmd + end + + it "should add properties" do + @provider.expects(:add_properties).returns([]) + @provider.addcmd + end + + it "should check and add if dup allowed" do + @provider.expects(:check_allow_dup).returns([]) + @provider.addcmd + end + + it "should check and add if home is managed" do + @provider.expects(:check_manage_home).returns([]) + @provider.addcmd + end + + it "should add the resource :name" do + @resource.expects(:[]).with(:name) + @provider.addcmd + end + + it "should return an array with full command" do + @provider.stubs(:command).with(:add).returns("useradd") + @provider.stubs(:add_properties).returns(["-G", "somegroup"]) + @resource.stubs(:[]).with(:name).returns("someuser") + @provider.addcmd.must == ["useradd", "-G", "somegroup", "-o", "-m", "someuser"] + end + end end diff --git a/spec/unit/type/file/selinux.rb b/spec/unit/type/file/selinux.rb index cee47c342..d346be362 100644 --- a/spec/unit/type/file/selinux.rb +++ b/spec/unit/type/file/selinux.rb @@ -56,6 +56,7 @@ property = Puppet::Type.type(:file).attrclass(param) end it "should be able to detect matchpathcon defaults" do + @sel.stubs(:debug) @sel.expects(:get_selinux_default_context).with("/my/file").returns "user_u:role_r:type_t:s0" expectedresult = case param when :seluser then "user_u" diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb index 1271753d4..227a500f1 100755 --- a/spec/unit/type/user.rb +++ b/spec/unit/type/user.rb @@ -30,13 +30,19 @@ describe user do user.provider_feature(:manages_passwords).should_not be_nil end + it "should have a manages_solaris_rbac feature" do + user.provider_feature(:manages_solaris_rbac).should_not be_nil + end + describe "instances" do it "should have a valid provider" do user.create(:name => "foo").provider.class.ancestors.should be_include(Puppet::Provider) end end - [:ensure, :uid, :gid, :home, :comment, :shell, :password, :groups].each do |property| + properties = [:ensure, :uid, :gid, :home, :comment, :shell, :password, :groups, :roles, :auths, :profiles, :project, :keys] + + properties.each do |property| it "should have a %s property" % property do user.attrclass(property).ancestors.should be_include(Puppet::Property) end @@ -182,4 +188,16 @@ describe user do @password.change_to_s("other", "mypass").should_not be_include("mypass") end end + + describe "when manages_solaris_rbac is enabled" do + before do + @provider.stubs(:satisfies?).returns(false) + @provider.expects(:satisfies?).with(:manages_solaris_rbac).returns(true) + end + + it "should support a :role value for ensure" do + @ensure = user.attrclass(:ensure).new(:resource => @resource) + lambda { @ensure.should = :role }.should_not raise_error + end + end end diff --git a/spec/unit/util/selinux.rb b/spec/unit/util/selinux.rb index 515c3a273..7a56f914a 100644 --- a/spec/unit/util/selinux.rb +++ b/spec/unit/util/selinux.rb @@ -117,7 +117,7 @@ describe Puppet::Util::SELinux do it "should use chcon to set a context" do self.expects(:selinux_support?).returns true - self.expects(:execute).with(["/usr/bin/chcon","-h","","user_u:role_r:type_t:s0","/foo"]).returns 0 + self.expects(:execute).with(["/usr/bin/chcon","-h","user_u:role_r:type_t:s0","/foo"]).returns 0 set_selinux_context("/foo", "user_u:role_r:type_t:s0").should be_true end diff --git a/test/data/snippets/arraytrailingcomma.pp b/test/data/snippets/arraytrailingcomma.pp new file mode 100644 index 000000000..a410f9553 --- /dev/null +++ b/test/data/snippets/arraytrailingcomma.pp @@ -0,0 +1,3 @@ +file { + ["/tmp/arraytrailingcomma1","/tmp/arraytrailingcomma2", ]: content => "tmp" +} diff --git a/test/data/snippets/funccomma.pp b/test/data/snippets/funccomma.pp new file mode 100644 index 000000000..32e34f92e --- /dev/null +++ b/test/data/snippets/funccomma.pp @@ -0,0 +1,5 @@ +@file { + ["/tmp/funccomma1","/tmp/funccomma2"]: content => "1" +} + +realize( File["/tmp/funccomma1"], File["/tmp/funccomma2"] , ) diff --git a/test/language/parser.rb b/test/language/parser.rb index b1a0de3cf..30baea49f 100755 --- a/test/language/parser.rb +++ b/test/language/parser.rb @@ -56,6 +56,19 @@ class TestParser < Test::Unit::TestCase } end + def test_arrayrvalueswithtrailingcomma + parser = mkparser + ret = nil + file = tempfile() + assert_nothing_raised { + parser.string = "file { \"#{file}\": mode => [755, 640,] }" + } + + assert_nothing_raised { + ret = parser.parse + } + end + def mkmanifest(file) name = File.join(tmpdir, "file%s" % rand(100)) @@tmpfiles << name diff --git a/test/language/snippets.rb b/test/language/snippets.rb index 95a518388..069f7aced 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -445,6 +445,20 @@ class TestSnippets < Test::Unit::TestCase "Did not make second file from duplicate subclass names") end + def snippet_funccomma + assert_file("/tmp/funccomma1", + "Did not make first file from trailing function comma") + assert_file("/tmp/funccomma2", + "Did not make second file from trailing function comma") + end + + def snippet_arraytrailingcomma + assert_file("/tmp/arraytrailingcomma1", + "Did not make first file from array") + assert_file("/tmp/arraytrailingcomma2", + "Did not make second file from array") + end + # Iterate across each of the snippets and create a test. Dir.entries(snippetdir).sort.each { |file| next if file =~ /^\./ |