Issue #14704 has been updated by Josh Cooper.
Status changed from Needs Decision to Accepted
Priority changed from Urgent to Normal
Puppet's grammar defines a hash `key` with the following production:
<pre>
key: NAME { result = val[0][:value] }
| quotedtext { result = val[0] }
</pre>
where `NAME` is defined to be those strings matching
`%r{((::)?[a-z0-9][-\w]*)(::[a-z0-9][-\w]*)*}` (excluding uppercase). Puppet is
generating an error as Brice mentioned because CLASSREF is defined to be
`%r{((::){0,1}[A-Z][-\w]*)+}`. Since quoting the `key` is a valid workaround,
I'm reducing the priority of this bug.
I've also talked this over with Nick L. He suggested that we could change the
grammar so that the `key` nonterminal be modified to accept any `rvalue`, and
modify the `rvalue` to include all of puppet's keywords, e.g. if, unless, etc.
This would of course be a large change, e.g. 3.x.
----------------------------------------
Bug #14704: Capitalised hash keys do not parse
https://projects.puppetlabs.com/issues/14704#change-67600
Author: James Turnbull
Status: Accepted
Priority: Normal
Assignee: Daniel Pittman
Category: parser
Target version:
Affected Puppet version: 2.7.14
Keywords: hash key capitalised parse error
Branch:
Hash keys with leading capitals do not parse.
This does not parse:
<pre>
$packages = {
Mysql-cluster => {version => '7.1.21-1.sles11'}
}
</pre>
This parses:
<pre>
$packages = {
mysql-cluster => {version => '7.1.21-1.sles11'}
}
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.