summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#7523) Refactor the grammar to reduce duplicationNick Lewis2011-05-171-1196/+913
| | | | | | | | | | | | | | | | | | This commit unifies some paths in the grammar, which had previously been duplicated to avoid shift/reduce conflicts. Merging these paths together and separating only the conflicting structures leads to a cleaner grammar, with fewer holes. Several bugs are fixed as a result: (#3129) Nested class names beginning with numbers work correctly (#5268) Hyphens in class names work correctly (#5817) Hashes and arrays can now be passed to functions (hashes require parentheses) Additionally, expressions are now legal in most places where they would make sense, when previously only bare rvalues were allowed. Paired-With: Markus Roberts Reviewed-By: Matt Robinson
* (#6928) Remove --parseonlyNick Lewis2011-04-131-3/+3
| | | | | | This has been removed in favor of 'puppet parser validate <manifest>'. Paired-With: Jesse Wolfe
* Merge branch '2.6.next' into nextMatt Robinson2011-03-071-1722/+1825
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a particularly nasty merge, so rather than hold up merges into next any longer, I'm going to push this merge with a few outstanding problems. The tests that were failing in the following areas have been marked pending, and will be addressed separately, immediately following this push. TODO: Verify that brice's rdoc change is still valid: tests to show that line numbers from class, define and node get into the ast Fix mount parsed_spec spec/unit/provider/mount/parsed_spec.rb * 2.6.next: (85 commits) (#5148) Fix failing spec due to timezone (#5148) Add support for PSON to facts (#6338) Remove inventory indirection, and move to facts indirection (#6445) Fix inline docs: puppet agent does not accept --mkusers Update CHANGELOG and version for 2.6.6rc1 (#6541) Fix content with checksum truncation bug (#6418) Recursive files shouldn't be audited (#6541) maint: whitespace cleanup on the file integration spec (#6541) Fix content with checksum truncation bug (#5466) Write specs for output of puppet resource (#5466) Monkey patch Symbol so that you can sort them (#5466) Fixed puppet resource bug with trailing , Update CHANGELOG for 2.6.5 (#4922) Don't truncate remotely-sourced files on 404 (#6338) Remove unused version control tags Maint: Align tabs in a code block in the Augeas type. (#6509) Inline docs: Fix erroneous code block in directoryservice provider for computer type Maint: Rewrite comments about symlinks to reflect best practice. (#6509) Inline docs: Fix broken lists in Launchd provider. (#6509) Inline docs: Fix broken code blocks in zpool type ... Manually Resolved Conflicts: lib/puppet/application/inspect.rb lib/puppet/defaults.rb lib/puppet/file_bucket/dipper.rb lib/puppet/network/http/handler.rb lib/puppet/node/facts.rb lib/puppet/parser/parser.rb lib/puppet/parser/parser_support.rb lib/puppet/util/command_line/puppet lib/puppet/util/command_line/puppetd lib/puppet/util/command_line/puppetmasterd lib/puppet/util/monkey_patches.rb lib/puppet/util/rdoc/parser.rb spec/unit/application/agent_spec.rb spec/unit/file_bucket/file_spec.rb spec/unit/indirector/file_bucket_file/file_spec.rb spec/unit/network/http/handler_spec.rb spec/unit/parser/parser_spec.rb spec/unit/provider/mount/parsed_spec.rb
| * Revert "(#5935) Allow functions to accept negated values"Nick Lewis2011-02-211-977/+962
| | | | | | | | | | | | | | | | This reverts commit e3c59df2b246fe5e764272f21b631a5d2f28687f. This commit is being reverted because the solution is incomplete, and a better solution is out of scope for this release. A more complete solution will be implemented in the future.
| * (#5935) Allow functions to accept negated valuesNick Lewis2011-02-171-962/+977
| | | | | | | | | | | | | | | | | | function(-1) was failing because the grammar wasn't allowing negated values in function calls. This fix makes the negation of any value which was previously legal as a function argument also now legal as a function argument. Paired-With: Max Martin Paired-With: Markus Roberts
| * (Fixes #6269) merge changes from masterzen that resolve the issue.Daniel Pittman2011-02-121-392/+400
| |\ | | | | | | | | | parser.rb manually rebuilt to resolve global grammer chances.
| | * Fix #6269 - Hashes only work with two levels of accessBrice Figureau2011-02-121-799/+792
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following manifest was failing: $hash = { 'a' => { 'b' => { 'c' => 'it works' } } } $out = $hash['a']['b']['c'] because of a typo in the grammar. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | (#5516) Rebuild parser.rb after merge.Daniel Pittman2011-02-121-1541/+1630
| | | | | | | | | | | | | | | The automatically generated parser.rb needed to be rebuilt to make the syntax changes functional; this commits only that rebuild.
| * | Fix #5516 - Hashes can't be used in selectorsBrice Figureau2011-02-121-426/+415
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The following manifest was producing a parse error: $int = { 'eth0' => 'bla' } $foo = $int['eth0'] ? { 'bla' => 'foo', default => 'bleh' } because selectors didn't support hash access. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge remote branch 'paul/ticket/next/4685' into nextJesse Wolfe2010-09-091-1881/+1743
|\ \ | | | | | | | | | | | | | | | | | | Conflicts resolved manually, by Paul Berry: lib/puppet/parser/ast/astarray.rb lib/puppet/parser/grammar.ra lib/puppet/parser/parser.rb (by rebuilding from grammar.ra)
| * | Modified the error message that is generated when a class, definition,Paul Berry2010-09-071-136/+137
| | | | | | | | | | | | | | | or node occurs in a conditional construct so that it contains the proper line number.
| * | [#4685] Classes, defines, and nodes allowed inside of non-evaluated conditionalsPaul Berry2010-09-011-1135/+1098
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ASTArray#evaluate() was responsible for checking whether the user had tried to declare a class, define, or node in a prohibited location (such as a conditional construct). This meant that errors would only be reported to the user if the conditional code was actually evaluated. Moved the checking into the parser, so that errors are always reported.
* | | [4638] Cleanup of plurals and inheritance relationships in ASTPaul Berry2010-08-271-246/+208
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the grammar so that the following "plural" constructs always parse as an ASTArray: - funcvalues - rvalues - resourceinstances - anyparams - params - caseopts - casevalues And the following "singluar" construct never parses as an ASTArray: - statement The previous behavior was for these constructs to parse as a scalar when they represented a single item and an ASTArray when they contained zero or multiple items. ("Statement" could sometimes represent a single item because a single resource declaration could represent multiple resources). This complicated other grammar rules and caused ambiguous handling of nested arrays. Also made these changes to the AST class hierarchy: - ResourceInstance no longer derives from ASTArray. This relationship was not meaningful because a ResourceInstance is a (title, parameters) pair, not an array, and it produced complications when we wanted to represent an array of ResourceInstance objects. - Resource no longer derives from ResourceReference. No significant functionality was being inherited and the relationship doesn't make sense in an AST context. - ResourceOverride no longer derives from Resource. No significant functionality was being inherited and the relationship doesn't make sense in an AST context. - Resource can now represent a compound resource instance such as "notify { foo: ; bar: }". This saves the parser from having to use represent a statement as an array of objects. - ASTArray's evaluate method never flattens out arrays of arrays.
* / [#4496]+[#4521]+[#4522] Add structures to the AST to represent type ↵Paul Berry2010-08-131-1389/+1476
|/ | | | | | | | | | | | | | | | | | | definitions (classes, definitions, and nodes). Previously, type definitions were not represented directly in the AST. Instead, the parser would instantiate types and insert them into known_resource_types as soon as they were parsed. This made it difficult to distinguish which types had come from the file that was just parsed and which types had been loaded previously, which led to bug 4496. A side-effect of this change is that the user is no longer allowed to define types inside of conditional constructs (such as if/else). This was allowed before but had unexpected semantics (bugs 4521 and 4522). It is still possible, however, to place an "include" statement inside a conditional construct, and have that "include" statement trigger the autoloading of a file that instantiates types.
* [#2713] Enable ELSIFJesse Wolfe2010-07-011-854/+900
|
* Fix #3871 - Add the 'in' operatorBrice Figureau2010-02-171-1012/+1032
| | | | | | | | | | | | | | | | | | | | | | | This operator allows to find if the left operand is in the right one. The left operand must be resort to a string, but the right operand can be: * a string * an array * a hash (the search is done on the keys) This syntax can be used in any place where an expression is supported. Syntax: $eatme = 'eat' if $eatme in ['ate', 'eat'] { ... } $value = 'beat generation' if 'eat' in $value { notice("on the road") } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing #3651 failing to pop comment stack for some constructsMarkus Roberts2010-02-171-121/+123
| | | | | Puppetdoc got confused because it wasn't popping the comment context for collections and resource defaults. This commit adds the popping.
* Fixing #448 - relationships have their own syntaxLuke Kanies2010-02-171-1758/+1710
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now specify relationships directly in the language: File[/foo] -> Service[bar] Specifies a normal dependency while: File[/foo] ~> Service[bar] Specifies a subscription. You can also do relationship chaining, specifying multiple relationships on a single line: File[/foo] -> Package[baz] -> Service[bar] Note that while it's confusing, you don't have to have all of the arrows be the same direction: File[/foo] -> Service[bar] <~ Package[baz] This can provide some succinctness at the cost of readability. You can also specify full resources, rather than just resource refs: file { "/foo": ensure => present } -> package { bar: ensure => installed } But wait! There's more! You can also specify a subscription on either side of the relationship marker: yumrepo { foo: .... } package { bar: provider => yum, ... } Yumrepo <| |> -> Package <| provider == yum |> This, finally, provides easy many to many relationships in Puppet, but it also opens the door to massive dependency cycles. This last feature is a very powerful stick, and you can considerably hurt yourself with it. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #3668 - fixed autoloading classes from modulesLuke Kanies2010-02-171-712/+721
| | | | | | | | | | | This involved essentially moving all of the importing and loading code out of the Parser and into a new 'TypeLoader' class. The parser and the ResourceTypeCollection classes now delegate to that class for all file handling. Most of the code paths are also now much cleaner, and a bit of redundancy was removed. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Markus's patch concerning string interpolationJesse Wolfe2010-04-121-1671/+1753
| | | | | | | | | | | From email: Some of the errors I needed to track down were actually coming from my string interpolation branch: * I wasn't handling "Foo ${1} bar" as a regexp back reference (and I don't like it, but hey) * I wasn't warning about & passing on the "unneeded" backslash in strings like 'foo\"bar' * I fumbled part of the conflict resolution with Brice's hash patch.
* Moving the string interpolation parsing to the parser/lexerMarkus Roberts2010-02-171-1062/+1120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the syntactic aspects of string interpolation up into the lexer/parser phase, preparatory to moving the semantic portions down to the as yet unnamed futures resolution phase. This is an enabling move, designed to allow: * Futures resolution in and between interpolated strings * Interpolation of hash elements into strings * Removal of certain order-dependent paths * Further modularization of the lexer/parser The key change is switching from viewing strings with interpolation as single lexical entities (which await later special case processing) to viewing them as formulas for constructing strings, with the internal structure of the string exposed by the parser. Thus a string like: "Hello $name, are you enjoying ${language_feature}?" internally becomes something like: concat("Hello ",$name,", are you enjoying ",$language_feature,"?") where "concat" is an internal string concatenation function. A few test cases to show the user observable effects of this change: notice("string with ${'a nested single quoted string'} inside it.") $v2 = 3+4 notice("string with ${['an array ',3,'+',4,'=',$v2]} in it.") notice("string with ${(3+5)/4} nested math ops in it.") ...and so forth. The key changes in the internals are: * Unification of SQTEXT and DQTEXT into a new token type STRING (since nothing past the lexer cares about the distinction. * Creation of several new token types to represent the components of an interpolated string: DQPRE The initial portion of an interpolated string DQMID The portion of a string betwixt two interpolations DQPOST The final portion of an interpolated string DQCONT The as-yet-unlexed portion after an interpolation Thus, in the example above (phantom curly braces added for clarity), DQPRE "Hello ${ DQMID }, are you enjoying ${ DQPOST }?" DQCONT is a bookkeeping token and is never generated. * Creation of a DOLLAR_VAR token to strip the "$" off of variables with explicit dollar signs, so that the VARIABLEs produced from things like "Test ${x}" (where the "$" has already been consumed) do not fail for want of a "$" * Reworking the grammar rules in the obvious way * Introduction of a "concatenation" AST node type (which will be going away in a subsequent refactor). Note finally that this is a component of a set of interrelated refactors, and some of the changes around the edges of the above will only makes sense in context of the other parts.
* Finishing renaming :params to :parameters internallyLuke Kanies2010-02-171-5/+5
| | | | | | | | | | | | I had only done this partway, because it seemed easier, but not surprisingly, it ended up being more complex. In addition to those renames, this commit includes fixes to whatever tests I needed to fix to confirm that things were again working. I think most of these broken tests have been broken for a while. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding support for class parametersLuke Kanies2010-02-171-6/+3
| | | | | | | | | This is functional syntactically but not yet through the whole system, because of the changes made to how resource types are managed. See the next commit for that fix. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Partially fixing #2954 - Adding class parametersLuke Kanies2010-02-171-687/+663
| | | | | | | | This isn't 100% functional yet - I need to refactor some of the internals to make the class lookup work everywhere. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing Interpreter classLuke Kanies2010-02-171-3/+2
| | | | | | | It's no longer necessary, given the new ResourceTypeCollection class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Allow adding single key to hashesBrice Figureau2010-02-171-845/+891
| | | | | | | | | | This patch allow this syntax: $hash[mykey] = 12 If the key already exist an error is raised. Hashes are essentially write only, like puppet variables. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2389 - Enhance Puppet DSL with HashesBrice Figureau2010-02-171-917/+1084
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring a new container syntax to the Puppet DSL: hashes. Hashes are defined like Ruby Hash: { key1 => val1, ... } Hash keys are strings, but hash values can be any possible right values admitted in Puppet DSL (ie function call, variables access...) Currently it is possible: 1) to assign hashes to variable $myhash = { key1 => "myval", key2 => $b } 2) to access hash members (recursively) from a variable containing a hash (works for array too): $myhash = { key => { subkey => "b" }} notice($myhash[key][subjey]] 3) to use hash member access as resource title 4) to use hash in default definition parameter or resource parameter if the type supports it (known for the moment). It is not possible to string interpolate an hash access. If it proves to be an issue it can be added or work-arounded with a string concatenation operator easily. It is not possible to use an hash as a resource title. This might be possible once we support compound resource title. Unlike the proposed syntax in the ticket it is not possible to assign individual hash member (mostly to respect write once nature of variable in puppet). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Implement node matching with regexesBrice Figureau2009-08-011-567/+554
| | | | | | | This patch enhance AST::HostName to support regexes, and modifies the parser to allow regex to be used as node name. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>]
* Make sure node are referenced by their namesBrice Figureau2009-08-011-566/+563
| | | | | | | | | This patch uses the unused AST::HostName as the only way to reference a node in the AST nodes array. The AST::HostName respect the hash properties of the underlying string, to keep the O(1) hash properties. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Enhance selector and case statements to match with regexpBrice Figureau2009-08-011-561/+618
| | | | | | | | | | | | | | | | | | | | | | | | | The case and selector statements define ephemeral vars, like 'if'. Usage: case statement: $var = "foobar" case $var { "foo": { notify { "got a foo": } } /(.*)bar$/: { notify{ "hey we got a $1": } } } and for selector: $val = $test ? { /^match.*$/ => "matched", default => "default" } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2033 - Allow regexp in if expressionBrice Figureau2009-08-011-629/+643
| | | | | | | | | | | | | | | | | | | This changeset introduces regexp in if expression with the use of the =~ (match) and !~ (not match) operator. Usage: if $uname =~ /Linux|Debian/ { ... } Moreover this patch creates ephemeral variables ($0 to $9) in the current scope which contains the regex captures: if $uname =~ /(Linux|Debian)/ { notice("this is a $1 system") } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add AST::Regex, an AST leaf node representing a regexBrice Figureau2009-08-011-38/+47
| | | | | | Add a regex rule (unused for the moment) to the parser. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add regexes and regex match operators to the parserBrice Figureau2009-08-011-775/+771
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Make sure the parser sees the correct line numberBrice Figureau2009-07-101-171/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Careful inspection of the parser code show that when we associate a source line number for an AST node, we use the current line number of the currently lexed token. In many case, this is correct, but there are some cases where this is incorrect. Unfortunately due to how LALR parser works the ast node creation of a statement can appear _after_ we lexed another token after the current statement: 1. $foo = 1 2. 3. class test When the parser asks for the class token, it can reduce the assignement statement into the AST VarDef node, because no other grammar rule match. Unfortunately we already lexed the class token so we affect to the VarDef node the line number 3 instead of 1. This is not a real issue for error reporting, but becomes a real concern when we associate documentation comments to AST node for puppetdoc. The solution is to enhance the tokens lexed and returned to the parser to carry their declaration line number. Thus a token value becomes a hash: { :value => tokenvalue, :line } Next, each time we create an AST node, we use the line number of the correct token (ie the foo line number in the previous example). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1088 - Collections overridesBrice Figureau2009-03-141-706/+749
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset defines a new syntax to override collection of resources (virtual or not). This feature is not constrained to the override in inherited context as usual resource override. The collection of resource supports a query like regular collection of virtual or exported resources. Usage example: file { "/tmp/testing": content => "whatever" } File<| |> { mode => 0600 } It also introduces a different behaviour for collection of catalog resources. Before this patch, only virtual resources were collected, now all resources (virtual or no) are collected and can be overriden. That means it is now possible to do: File <| |> { mode => 0600 } And all the Files resources will have mode 0600. It is then possible to have this puppet pattern: file { "/tmp/a": content => "a" } file { "/tmp/b": content => "b" } File <| title != "/tmp/a" |> { require => File["/tmp/b"] } which means that every File requires a file. Moreover it is now possible to define resource overriding without respecting the override on inheritance rule: class a { file { "/tmp/testing": content => "whatever" } } class b { include a File<| |> { mode => 0600 } } include b Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add a doc attribute to AST nodes and fill it with the last seen commentsBrice Figureau2008-11-171-98/+114
| | | | | | | | | | | | | The lexer maintains a stack of last seen comments. On blank lines the lexer flush the comments. On each opening brace the lexer enters a new stack level. On each block AST nodes, the stack is popped. Each AST nodes has a doc property that is filled with the last seen comments on node creation (in fact only on important node creation representing statements). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #936 - Allow trailing comma in array definitionBrice Figureau2008-10-211-388/+386
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #636 - Allow extraneous comma in function argument listBrice Figureau2008-10-211-865/+879
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1109 - allow empty if or else branchesBrice Figureau2008-10-071-563/+610
| | | | | | | | | | | | This changesets allow empty if or else branches: if true { } else { } It works by emitting on the parser stack an AST node that doesn't do anything (a no-op). This allows the less intrusive code as no part of the if evaluation code has been touched.
* Fix #381 - Allow multiple resource overrides or referencesBrice Figureau2008-10-051-366/+348
| | | | | | | | | | | | | | | | | | | | | | | Allow this syntax: Resource[title1,title2] { param => value } as a compact form of Resource[title1] { param => value } Resource[title2] { param => value } This patch also introduces for free the possibility to group class references by type: exec { test: require => File["file1","file2","File3"] } which is completely equivalent to: exec { test: require => [ File["file1"],File["file2"],File["File3"] ] }
* Add parser for arbitrary expressionsBrice Figureau2008-10-011-634/+930
| | | | | | | | | | | | | | | | The expressions can be used in if 'test' and in the right side of assignements. The expressions can contain any number of sub-expressions combined by either arithmetic operators, comparison operators, or boolean operators. Random Usage Examples: $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) or if ($a < 10) and ($a + 10 != 200) { ... }
* Add an append (+=) variable operator:Brice Figureau2008-09-211-708/+729
| | | | | | | | | | | | | | | | | | | The append variable operator can be used to append something to a variable defined in a parent scope, containing either a string or an array. The main use is to append array elements in classes to a variable globally defined in a node. Example: $ssh_users = ['brice', 'admin1'] class backup { $ssh_users += ['backup_operator'] ... } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing #1242 -- lack of storeconfigs only produces warning, not exception.Luke Kanies2008-05-261-4/+4
| | | | | Exporting or collecting resources no longer raises an exception when no storeconfigs is enabled, it just produces a warning.
* Fixed #968 again, this time with tests -- parseonly works,Luke Kanies2008-02-131-4/+5
| | | | | including not compiling the configurations, and also storeconfigs is no longer required during parse-testing.
* Removing the Id tags from all of the filesLuke Kanies2007-10-031-1/+0
|
* Removed TYPE token, replacing it with CLASSREF token, in the grammar and ↵Michael V. O'Brien2007-09-101-570/+549
| | | | lexer. Updated CLASSREF token regex in the lexer.
* Fixed #774, which fixed fully qualified collection statementsMichael V. O'Brien2007-09-101-628/+623
|
* Renaming some ast resource classes and files so they make a lot more sense.Luke Kanies2007-09-061-9/+9
|
* And we have multiple environment support in the parser. The only remaining ↵Luke Kanies2007-08-251-2/+2
| | | | piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
* Fixing #314 and #729; here's the changelog:luke2007-08-031-227/+10
| | | | | | | | | | | | | | | Refactored how the parser and interpreter relate, so parsing is now effectively an atomic process (thus fixing #314 and #729). This makes the interpreter less prone to error and less prone to show the error to the clients. Note that this means that if a configuration fails to parse, then the previous, parseable configuration will be used instead, so the client will not know that the configuration failed to parse. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2742 980ebf18-57e1-0310-9a29-db15c13687c0