puppetlabs/puppet — pull request #2385 by ffrank (2014-02-24 23:55:21+00:00)
Title: (PUP-1041) nagios: parse empty parameter values in definitions

This is a valid nagios defintion:

define host {
parents
use linux-server
}

According to Erik Dalen, the empty value explicitly selects the default
instead of the value that was inherited from the host template in use.

The naginator provider will not accept this definition, because the
nagios config parser expects a value for each and every parameter.

Fix this by adding an according rule to the grammar.

Also, the lexer must be altered, because parameters and values are lexed
differently and returned as distinct tokens. When encountering newline
while scanning for a parameter value, the lexer must give up and reset
its internal state. (Otherwise, it would not accept another parameter
name or the end of the current definition block.)